Plugins
Reading of docs/plugins/README.md. If this page and that file disagree, the source file wins.
Plugins
Section titled “Plugins”This folder says how to ship packs for the Inhuman harness. The subjects are surfaces, install, commands, and reference sketches.
The target design is plugins/hooks-notify-vs-transform-2026-09-20.md, revised 2026-09-22. That note is authoritative for the proposed API.
Interception has two kinds.
A guard stands on the critical path. It sees raw values. It may narrow or replace. It fails closed. It is content-addressed. It is bound to a host-owned consent store. A change to a guard is reviewed at install or update.
The phases a hook may declare are :pre, :post, and :post-fail. Hooks run in parallel. A hook receives filtered values only. A hook fails open. A hook never blocks.
guard/turn and guard/round set chain position at lifecycle boundaries. Parallel hook/turn and hook/round contribute self/notify. invoke is single-use. Re-entrancy limits are per lineage.
Tool-argument schema repair is host machinery. Read caching is host machinery. Neither is a plugin surface. There is no react registration. There is no producer registration.
Behavior is selected per bot. A definition chooses plugin.scm, an optional environment, configuration, and receiver bindings. Each running agent pins the revision. That agent owns its registrations, its private state, and its notifications. plugin.json also declares session, project, and global Scheme state modules with define/method APIs. Bots use call/method or injected callables. They do not need a target bot. They do not expose model tools for that call. State scope owns the log and the rollback semantics. Packages supply trusted code and optional shared resources.
Migration and acceptance scenarios are in plugins/plugin-surface-implementation-2026-09-21.md.
polish.md, lifecycle.md, and plugins/reference/ describe the behavior capability in packages/harness-server/src/plugin-surface. It is an Arrival EnvCapability. Author-facing forms are symbol.macro. Handler lambdas cross with toJS. A callback passed into one of those lambdas is reverse Rosetta. The session loop stores the pin. It joins behavior notes with loopEnd. It does not call loadProgram. It does not call dispatchBoundary.
plugins/tldr.md documents InhumanPlugin. Host builtins still construct that class. The builtins are shell, toolkit, scheme-repl, and the JS tasks projection. They compile it with applyPackPlugins. The pack loader does not import plugins[]. loopEnd still joins until a later removal. plugins/plugin-shape-2026-09-20.md and plugins/hooks-design-review-2026-09-20.md are historical context.
Author guides:
- polish.md — behavior selection, guards, hooks, state methods, consent
- lifecycle.md — register vs callback, turn/round, tool chain, replay
plugins/reference/—plugin.jsonandhooks.scm. Shipped slash-commands stay inpackages/harness-server/src/defaults/commands/plugins/tldr.md— module bag the host builtins still load- install.md — npm into the kernel folder +
config.json - commands.md — Client Scheme sandbox vs JSON-RPC commit
Extension plugins are not driver providers. Drivers are not the behavior surface. drivers[] is still parsed. It is projected onto DriverSpec. That merge is unsupported. No exemplar pack declares a driver. A driver provider is a runtime package registered by product composition. It is not a pack loaded through plugin manifests. It is not loaded through the plugin loader. Exterior for a behavior pack is connections on existing drivers (/connect, MCP servers), pack tools, and commands. The internal doc is ../runtime/drivers.md.
Product nouns stay in their homes. Link them. Do not re-host them.
| Noun home | Path |
|---|---|
| Grain / regions / catalog | ../canon/grain.md |
| Proposals | ../canon/proposals.md |
| Permission / LICENSE WHEN | ../runtime/approval.md |
| Always-on FS toolkit | ../canon/standard-toolkit.md |
Operator day-to-day is not this tree. It is ../client/operate.md. Exemplar packs are ../plugins/. The tool constructor is ../packages/harness-plugin-sdk/README.md.