Skip to main content

Module sandbox

Module sandbox 

Source
Expand description

Sandbox integration for bash tool execution.

When a BashSandbox is provided via ToolContext::with_sandbox, the bash built-in tool routes commands through that sandbox instead of std::process::Command. The workspace directory is mounted read-write at /workspace inside the sandbox.

The concrete sandbox implementation is supplied by the host application (e.g., SafeClaw can provide an A3S Box–backed implementation after the user installs a3s-box). This crate defines only the trait contract.

Modules§

srt
Local command sandbox backed by the srt process wrapper.

Structs§

SandboxCommandRequest
Complete request passed to sandbox implementations that support the execution controls used by the built-in bash tool.
SandboxExecutionOutput
Output from the extended sandbox execution contract.
SandboxOutput
Output from running a command inside a sandbox.

Constants§

PROTECTED_WORKSPACE_DIRECTORIES
Workspace-relative directories whose contents can change the agent, repository, editor, or tool control plane.
PROTECTED_WORKSPACE_FILES
Workspace-relative files that can change command discovery or repository behavior even though they are not contained in a protected directory.

Traits§

BashSandbox
Abstraction over sandbox bash execution used by the bash built-in tool.

Functions§

is_protected_workspace_path
Return whether a workspace-relative path targets protected control metadata.