-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @interactors/cli
#264
base: main
Are you sure you want to change the base?
Add @interactors/cli
#264
Conversation
🦋 Changeset detectedLatest commit: c67dbfa The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for interactors canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 I'll leave it to @cowboyd to do the review but this is exciting
@wKich This is looking awesome!!! I'm thinking that we should perhaps make only a single global property on the interface InteractorAgent {
run(interaction: Interaction): Result<void>;
interactors: Record<string, InteractorConstructor>;
matchers: Record<string, MatcherConstructor>;
}; The other thing I'm thinking is that the The next step is that we need to generate the constructors that will be used on the client side to send the data over to the agent. |
I've opened a ticket #265 to have a more complete picture of what the CLI should accomplish. Let's start with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use it today and was almost successful, but not quite.
- For simplicity's sake, Let's get rid of
interactors.config.js
for now and say that everything has to be specified on the command line via arguments and options. - The directory loading using dynamic
import()
will load relative to the module that is calling it, so we can't use relative paths. Instead, we want to import relative to the directory from which the CLI was invoked, so we should import absolute paths that are resolved relative toprocess.cwd()
- The opposite is true of the
agent.template.ts
. It is being read relative to process.cwd(), but we need to copy the agent template to thedist
directory as part of the build and read it relative to the interactors cli sources.
packages/core/src/filter-set.ts
Outdated
import { matcherDescription } from './matcher'; | ||
import { MaybeMatcher } from '../dist'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { matcherDescription } from './matcher'; | |
import { MaybeMatcher } from '../dist'; | |
import { MaybeMatcher, matcherDescription } from './matcher'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing the build to fail. Looks like maybe VSCode was importing this automatically.
5fe211d
to
d9a8f45
Compare
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
As part of adding the `dev` command, this makes each command have its own file.
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
Signed-off-by: Dmitriy Lazarev <w@kich.dev>
e8d21dc
to
c67dbfa
Compare
Motivation
First step towards to bigtest v2. Changes to generate environmental
agent.ts
with desired interactorsApproach
Changed initialisation for matchers through using
createMatcher
and added abstract classes for matchers and interactors to correctly identify defined themAdded
@interactors/cli
with ability to generateagent.ts
TODOs and Open Questions
ok
anderr
function from manually writtenagent.ts