Expand description
Sandbox — how a process is constrained.
The split this contract exists to keep: a backend decides how to constrain, the kernel decides what to constrain and whether to at all. The policy below is the kernel’s; an implementation may only report how much of it it managed to deliver.
The hard invariant: a policy that asked for constraint must never
silently become an unconstrained run. A backend that cannot deliver says
so through Enforcement, and the caller — with
sandbox.require — decides whether to refuse. A warn! nobody
reads is not a decision.
Structs§
- Confined
- A command, after the sandbox has had its say.
- Confinement
Report - What the session’s sandbox holds a command to, found once when the session is built. The permission policy reads it and never probes the sandbox itself.
- Egress
Proxy sandbox.network.proxy: the proxy a sandboxed command’s traffic must go through. Addresses, never names, so that nothing has to be resolved to write the rule or the variables.- Sandbox
Policy - What to constrain. The kernel’s, not a backend’s.
- Sandbox
Settings - The engine’s sandbox settings for a session, as
settings.json’ssandboxsection gave them: what a command is held to, before any one call narrows it. EverySandboxPolicya command or the engine’s own git runs under is derived from this, here.
Enums§
- Enforcement
- How much of the policy is actually in force.
- Network
Mode - Read
Scope - What a confined command may read.
- Sandbox
Mode - Which backend ran. Advisory — for logs and tests.
Traits§
- Sandbox
- How a process is constrained.
Functions§
- default_
deny_ read - Default deny-read paths — credential stores that almost never want to be
inside an LLM tool result. User can override via
sandbox.allow_readin settings.json. Returned absolute (HOMEresolved). - default_
deny_ read_ in default_deny_readfor the home directoryhome.