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
Copy file name to clipboardExpand all lines: docs/architecture/local-agent-kernel.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ Sensitive operations should check capabilities before they mutate state or alloc
123
123
- sandbox allocation;
124
124
- tool invocation.
125
125
126
-
Capability grants, revokes, and denied checks are audited. Embedded agent runs now materialize the active step as a task lease and transcript events, then wrap the effective tool set with the local ToolBroker outside tests unless explicitly disabled with `OPENCLAW_RUNTIME_TOOL_BROKER=off`. Set `OPENCLAW_RUNTIME_TOOL_BROKER=daemon` to use the `sparsekerneld` run-ledger and ToolBroker path; daemon setup failures fall back to the local runtime broker. Set `OPENCLAW_RUNTIME_TOOL_CAPABILITY_MODE=strict` to stop auto-granting sensitive tools such as `exec`, `read`, `write`, and `browser`; those tools then fail closed unless a capability already exists or `OPENCLAW_RUNTIME_TOOL_ALLOW_SENSITIVE=1` is set for compatibility. Set `OPENCLAW_RUNTIME_TOOL_SANDBOX_EXEC=1` to route `exec`, `bash`, and `shell` shaped tools through the sandbox broker command runner instead of the ambient in-process tool implementation when the active agent has sandbox allocation capability. Native in-process plugins remain trusted by default. When `OPENCLAW_RUNTIME_PLUGIN_PROCESS_BOUNDARY=subprocess` or `OPENCLAW_RUNTIME_PLUGIN_PROCESS=strict` is set, plugin tools with subprocess metadata execute through a JSON stdin/stdout worker via the sandbox broker, emit subprocess and sandbox audit events, and fail closed if the worker would use `local/no_isolation` without an explicit trusted-worker opt-out; plugin tools without subprocess metadata fail closed.
126
+
Capability grants, revokes, and denied checks are audited. Embedded agent runs now materialize the active step as a task lease and transcript events, then wrap the effective tool set with the local ToolBroker outside tests unless explicitly disabled with `OPENCLAW_RUNTIME_TOOL_BROKER=off`. Set `OPENCLAW_RUNTIME_TOOL_BROKER=daemon` to use the `sparsekerneld` run-ledger and ToolBroker path; daemon setup failures fall back to the local runtime broker. Set `OPENCLAW_RUNTIME_TOOL_CAPABILITY_MODE=strict` to stop auto-granting sensitive tools such as `exec`, `read`, `write`, and `browser`; those tools then fail closed unless a capability already exists or `OPENCLAW_RUNTIME_TOOL_ALLOW_SENSITIVE=1` is set for compatibility. Set `OPENCLAW_RUNTIME_TOOL_SANDBOX_EXEC=1` to route `exec`, `bash`, and `shell` shaped tools through the sandbox broker command runner instead of the ambient in-process tool implementation when the active agent has sandbox allocation capability. Native in-process plugins remain trusted by default, but individual plugin tools can declare `processBoundary: "subprocess_required"` and operators can set `OPENCLAW_RUNTIME_PLUGIN_TRUST_DEFAULT=untrusted` to require subprocess workers for non-bundled plugin tools. When a subprocess boundary is required, plugin tools with subprocess metadata execute through a JSON stdin/stdout worker via the sandbox broker, emit subprocess and sandbox audit events, and fail closed if the worker would use `local/no_isolation` without an explicit trusted-worker opt-out; plugin tools without subprocess metadata fail closed.
127
127
128
128
The SparseKernel daemon now exposes the v0 run and ToolBroker lifecycle over local JSON: session upsert/list, transcript append/list, task enqueue/claim-by-id/claim-next/heartbeat/complete/fail, tool-call create/start/complete/fail/list, browser acquire/release, sandbox allocate/release, and artifact access. Tool-call create checks `tool` / `<tool-name>` / `invoke`; completion records small structured output plus `artifact_ids`; and every transition writes audit records. See [Tool Broker](/architecture/tool-broker).
Copy file name to clipboardExpand all lines: docs/architecture/security-boundaries.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ SparseKernel security claims must be precise.
26
26
- Persisted lease metadata records the selected backend and policy intent; it is audit/accounting state, not isolation by itself.
27
27
- Untrusted plugins must not get ambient host authority.
28
28
- The subprocess-required plugin mode runs explicit JSON workers through the sandbox broker. It auto-selects an available isolated backend when possible, but it still only becomes suitable for untrusted code when the selected backend is a real isolation backend; `local/no_isolation` is blocked by default for plugin subprocess workers and should only be enabled for trusted local workers.
29
+
- Plugin tool `processBoundary: "subprocess_required"` and `OPENCLAW_RUNTIME_PLUGIN_TRUST_DEFAULT=untrusted` are fail-closed controls for brokered tool execution; they do not make existing in-process plugin initialization safe.
29
30
- Secrets should be referenced, not stored as plaintext in SQLite.
30
31
31
32
Capabilities are the v0 policy primitive. They are intentionally simple: subject, resource, action, optional constraints, optional expiry. Denied sensitive checks are audit-logged.
Copy file name to clipboardExpand all lines: docs/architecture/tool-broker.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,4 +42,4 @@ For exec-shaped tools, set `OPENCLAW_RUNTIME_TOOL_SANDBOX_EXEC=1` to route `exec
42
42
43
43
Sandbox allocations persist the selected backend and trust-zone policy snapshot in resource-lease metadata. A restarted broker object can recover whether an allocation was local/no-isolation, bwrap, minijail, or Docker without relying on an in-memory map. Docker command execution is explicit: callers must provide `dockerImage` or `OPENCLAW_SPARSEKERNEL_DOCKER_IMAGE`, the wrapper uses `--pull never`, drops Linux capabilities, sets `no-new-privileges`, applies read-only root/tmpfs defaults, maps trust-zone memory/process limits to Docker flags, and keeps container networking disabled unless a policy proxy is configured. `OPENCLAW_RUNTIME_SANDBOX_REQUIRE_PROXY=1` makes network-allowing sandbox allocations fail closed unless the trust zone has a valid loopback proxy reference and the selected backend can carry that proxy path; Docker workers receive `HTTP_PROXY`/`HTTPS_PROXY`/`ALL_PROXY` pointing at `host.docker.internal`. `OPENCLAW_RUNTIME_SANDBOX_REQUIRE_HARD_EGRESS=1` is stricter: network-allowing sandbox allocations fail closed because current v0 backends do not provide bypass-proof host egress enforcement.
44
44
45
-
V0 does not move native plugins out of process by default. It establishes the ledger and API contract so OpenClaw adapters can route invocation through SparseKernel now, then move untrusted or community plugins behind stronger process or sandbox boundaries later. Set `OPENCLAW_RUNTIME_PLUGIN_PROCESS_BOUNDARY=subprocess` or `OPENCLAW_RUNTIME_PLUGIN_PROCESS=strict` to require plugin tools to provide subprocess metadata. Opt-in workers receive a JSON request on stdin with `protocol`, `pluginId`, `toolName`, `toolCallId`, `params`, and broker context, and must return an `AgentToolResult` JSON object on stdout. Plugin subprocess workers now execute through the sandbox broker as `plugin_untrusted` leases by default, so allocation capability, command audit events, usage records, and release accounting apply to plugin workers too. When no explicit backend is configured, the broker auto-selects the first available isolated plugin backend from `bwrap`, `minijail`, then Docker when a plugin Docker image is configured. Operators can override the order with `OPENCLAW_RUNTIME_PLUGIN_SANDBOX_BACKENDS`, force one backend with `OPENCLAW_RUNTIME_PLUGIN_SANDBOX_BACKEND`, or provide Docker with `OPENCLAW_RUNTIME_PLUGIN_DOCKER_IMAGE`. The broker fails closed when only `local/no_isolation` remains unless the plugin marks the subprocess sandbox `requireIsolated: false` or `OPENCLAW_RUNTIME_PLUGIN_ALLOW_NO_ISOLATION=1` is set for trusted local workers. Plugin tools without subprocess metadata fail closed with `plugin_tool.subprocess_required` audit records.
45
+
V0 does not move every native plugin out of process by default. It establishes the ledger and API contract so OpenClaw adapters can route invocation through SparseKernel now, then move untrusted or community plugins behind stronger process or sandbox boundaries incrementally. A plugin tool can now register `processBoundary: "subprocess_required"` plus subprocess worker metadata to require an out-of-process boundary for that tool. Set `OPENCLAW_RUNTIME_PLUGIN_PROCESS_BOUNDARY=subprocess` or `OPENCLAW_RUNTIME_PLUGIN_PROCESS=strict` to require all plugin tools to provide subprocess metadata. Set `OPENCLAW_RUNTIME_PLUGIN_TRUST_DEFAULT=untrusted` to require subprocess metadata for non-bundled plugin tools unless the tool explicitly opts into `processBoundary: "in_process"` for trusted local code. Opt-in workers receive a JSON request on stdin with `protocol`, `pluginId`, `toolName`, `toolCallId`, `params`, and broker context, and must return an `AgentToolResult` JSON object on stdout. Plugin subprocess workers now execute through the sandbox broker as `plugin_untrusted` leases by default, so allocation capability, command audit events, usage records, and release accounting apply to plugin workers too. When no explicit backend is configured, the broker auto-selects the first available isolated plugin backend from `bwrap`, `minijail`, then Docker when a plugin Docker image is configured. Operators can override the order with `OPENCLAW_RUNTIME_PLUGIN_SANDBOX_BACKENDS`, force one backend with `OPENCLAW_RUNTIME_PLUGIN_SANDBOX_BACKEND`, or provide Docker with `OPENCLAW_RUNTIME_PLUGIN_DOCKER_IMAGE`. The broker fails closed when only `local/no_isolation` remains unless the plugin marks the subprocess sandbox `requireIsolated: false` or `OPENCLAW_RUNTIME_PLUGIN_ALLOW_NO_ISOLATION=1` is set for trusted local workers. Plugin tools without subprocess metadata fail closed with `plugin_tool.subprocess_required` audit records.
0 commit comments