You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow explicitly enabled installed plugins to register declared trusted tool policies and agent tool result middleware, with trusted policy ids scoped by plugin owner.\n\nVerification covered targeted plugin/agent tests, typecheck, build, lint, local autoreview, and a Blacksmith Testbox runtime proof (tbx_01ktr1nq0rhq47fjkwrepm7fd3).
Inspect shows identity, load status, source, manifest capabilities, policy flags, diagnostics, install metadata, bundle capabilities, and any detected MCP or LSP server support without importing plugin runtime by default. Add `--runtime` to load the plugin module and include registered hooks, tools, commands, services, gateway methods, and HTTP routes. Runtime inspection reports missing plugin dependencies directly; installs and repairs stay in `openclaw plugins install`, `openclaw plugins update`, and `openclaw doctor --fix`.
420
+
Inspect shows identity, load status, source, manifest capabilities, policy flags, diagnostics, install metadata, bundle capabilities, and any detected MCP or LSP server support without importing plugin runtime by default. JSON output includes the plugin manifest contracts, such as `contracts.agentToolResultMiddleware` and `contracts.trustedToolPolicies`, so operators can audit trusted-surface declarations before enabling or restarting a plugin. Add `--runtime` to load the plugin module and include registered hooks, tools, commands, services, gateway methods, and HTTP routes. Runtime inspection reports missing plugin dependencies directly; installs and repairs stay in `openclaw plugins install`, `openclaw plugins update`, and `openclaw doctor --fix`.
421
421
422
422
Plugin-owned CLI commands are usually installed as root `openclaw` command groups, but plugins may also register nested commands under a core parent such as `openclaw nodes`. After `inspect --runtime` shows a command under `cliCommands`, run it at the listed path; for example a plugin that registers `demo-git` can be verified with `openclaw demo-git ping`.
|`embeddedExtensionFactories`|`string[]`| Codex app-server extension factory ids, currently `codex-app-server`. |
658
+
|`agentToolResultMiddleware`|`string[]`| Runtime ids this plugin may register tool-result middleware for. |
659
+
|`trustedToolPolicies`|`string[]`| Plugin-local trusted pre-tool policy ids an installed plugin may register. Bundled plugins may register policies without this field. |
|`api.session.state.registerSessionExtension(...)`| Plugin-owned, JSON-compatible session state projected through Gateway sessions |
189
189
|`api.session.workflow.enqueueNextTurnInjection(...)`| Durable exactly-once context injected into the next agent turn for one session |
190
-
|`api.registerTrustedToolPolicy(...)`|Bundled/trusted pre-plugin tool policy that can block or rewrite tool params|
190
+
|`api.registerTrustedToolPolicy(...)`|Manifest-gated trusted pre-plugin tool policy that can block or rewrite tool params |
191
191
|`api.registerToolMetadata(...)`| Tool catalog display metadata without changing the tool implementation |
192
192
|`api.registerCommand(...)`| Scoped plugin commands; command results can set `continueAgent: true`; Discord native commands support `descriptionLocalizations`|
193
193
|`api.session.controls.registerControlUiDescriptor(...)`| Control UI contribution descriptors for session, tool, run, or settings surfaces |
@@ -235,7 +235,10 @@ The contracts intentionally split authority:
235
235
- External plugins can own session extensions, UI descriptors, commands, tool
236
236
metadata, next-turn injections, and normal hooks.
237
237
- Trusted tool policies run before ordinary `before_tool_call` hooks and are
238
-
bundled-only because they participate in host safety policy.
238
+
host-trusted. Bundled policies run first; installed-plugin policies require
239
+
explicit enablement plus their local ids in
240
+
`contracts.trustedToolPolicies`, and run next in plugin-load order. Policy ids
241
+
are scoped to the registering plugin.
239
242
- Reserved command ownership is bundled-only. External plugins should use their
240
243
own command names or aliases.
241
244
-`allowPromptInjection=false` disables prompt-mutating hooks including
@@ -260,16 +263,18 @@ Examples of non-Plan consumers:
260
263
</Note>
261
264
262
265
<Accordiontitle="When to use tool-result middleware">
263
-
Bundled plugins can use `api.registerAgentToolResultMiddleware(...)` when
266
+
Bundled plugins and explicitly enabled installed plugins with matching
267
+
manifest contracts can use `api.registerAgentToolResultMiddleware(...)` when
264
268
they need to rewrite a tool result after execution and before the runtime
265
269
feeds that result back into the model. This is the trusted runtime-neutral
266
270
seam for async output reducers such as tokenjuice.
267
271
268
-
Bundled plugins must declare `contracts.agentToolResultMiddleware` for each
269
-
targeted runtime, for example `["openclaw", "codex"]`. External plugins
270
-
cannot register this middleware; keep normal OpenClaw plugin hooks for work
271
-
that does not need pre-model tool-result timing. The old embedded-runner-only
272
-
extension factory registration path has been removed.
272
+
Plugins must declare `contracts.agentToolResultMiddleware` for each targeted
273
+
runtime, for example `["openclaw", "codex"]`. Installed plugins without that
274
+
contract, or without explicit enablement, cannot register this middleware; keep
275
+
normal OpenClaw plugin hooks for work that does not need pre-model tool-result
276
+
timing. The old
277
+
embedded-runner-only extension factory registration path has been removed.
0 commit comments