Skip to content
2 min read · 349 words

Interface: SandboxToolsOptions

Defined in: src/batteries/sandbox/tools/index.ts:37

Options for constructing the sandbox's eight untrusted filesystem tools.

Properties

PropertyTypeDescriptionDefined in
artifactMinter?ArtifactMinterFactory for artifacts returned by file-query tools; defaults to the battery minter.src/batteries/sandbox/tools/index.ts:70
fileSystemSandboxFileSystemThe filesystem capability used for stat, traversal, reads, and writes.src/batteries/sandbox/tools/index.ts:48
gateGateRequired approval callback for every tool, including reads and searches. Remarks A read of .env is an exfiltration event, and search_files is a secret-discovery primitive, so construction rejects a missing gate with E_SANDBOX_GATE_REQUIRED. Calling the gate is a real suspension: a harness without a decider leaves the turn waiting rather than silently allowing the operation.src/batteries/sandbox/tools/index.ts:60
handleSandboxHandleThe handle that owns this tool set and issues its reader epoch. Remarks File-backed readers retain this epoch and check it before every operation. After SandboxHandle.dispose they fail with E_SANDBOX_NOT_INITIALIZED rather than falling through to the host filesystem.src/batteries/sandbox/tools/index.ts:46
mimeResolver?MimeResolverResolves MIME types while staging a file; defaults to the extension resolver.src/batteries/sandbox/tools/index.ts:72
pathTranslatorPathTranslatorTranslates model-visible paths into the sandbox backend and back.src/batteries/sandbox/tools/index.ts:50
registeredTools?readonly string[]Tools which are not registered are not named in descriptions.src/batteries/sandbox/tools/index.ts:84
search?SandboxSearchSearch backend for search_files and find_files. Remarks These tools spawn rg through the sandbox enforcer and are OS-enforced; they do not have the in-process filesystem tools' weaker enforcement boundary.src/batteries/sandbox/tools/index.ts:68
trustTier"first-party" | "third-party-public" | "third-party-private"Configuration-supplied provenance for staged media. Remarks This value cannot be inferred from source: core requires an explicit trust tier and batteries must not auto-classify content.src/batteries/sandbox/tools/index.ts:82
writeRootstringExplicit host write root; it is never inferred.src/batteries/sandbox/tools/index.ts:74