feat(harness): add support for plugins - #29
Open
sanchitrk wants to merge 8 commits into
Open
Conversation
Two threads on the plugin branch.
Host cwd is now passed, never discovered. `process.cwd()` meant two
different things depending on who read it -- the OS process's directory, or
a session's sandbox mount -- and every consumer guessed. `Harness.layer`
now captures it once as `hostCwd` and threads it down; `Settings.Options.cwd`,
`PluginLoader.Options.hostCwd` and `SandboxDriverLoader.Options.hostCwd` are
required, so omitting one is a type error rather than a silent host read.
`Settings.layer` had never been passed a directory at all and resolved
against `process.cwd()` on its own. That worked only because the values
happened to agree; they stop agreeing the moment a layer is built from
elsewhere.
`sandbox/io.ts` and `sandbox/control.ts` keep theirs. `SandboxIO.host()`
means "the sandbox that is the host process", so the process directory is
its definition, not a fallback -- and the controller's local root must agree
with it. Parameterizing one half of that pair would let them diverge.
Plugin hardening: `setup` no longer double-wraps a typed SetupError;
`idPattern` requires exactly three segments; `validate` returns the author's
object rather than the Struct-decoded copy, which was stripping undeclared
properties and repointing `this` inside the `setup() {}` shorthand;
`guidelines.ts` folds into the default prompt plugin; `ToolRegistration`
moves to `tool/schema.ts` so the executor shares the contract without
importing plugin assembly; `errorMessage` is shared by the executor and the
loop's outer catch so one defect reads the same either way.
…ckage smoke Plugin fixtures move to typed tool/, prompt/, event/, and host/ modules; malformed ones stay invalid so runtime validation is still covered. Adds shared remote Bash coverage through Harness plus tool output retention tests, and moves errorMessage to src/util so the loop and executor share it. The package smoke now declines native build scripts explicitly and pins @effect/platform-node-shared, whose caret range drifts across prerelease tags. Co-Authored-By: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.