Skip to content

feat(harness): add support for plugins - #29

Open
sanchitrk wants to merge 8 commits into
devfrom
harness-with-plugins
Open

feat(harness): add support for plugins#29
sanchitrk wants to merge 8 commits into
devfrom
harness-with-plugins

Conversation

@sanchitrk

Copy link
Copy Markdown
Contributor

No description provided.

sanchitrk and others added 8 commits September 10, 2026 13:22
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant