Expand description
Native Rust sandbox runtime for AI agents, rewritten from Anthropic’s sandbox-runtime.
Structs§
- Config
- The settings one sandbox runs under.
- Profile
Conflict - A path a Windows session asks to grant, and the exclusion of the profile read grant it meets.
- Profile
Exclusions - The paths a profile read grant keeps out of a session’s grants, as
profile statusrecords them. - Sandbox
- A sandbox started from a
Config. Wrap each command that is to run in it withSandbox::command, and drop it when they have all ended, since the proxy stops with it. - Setup
Version - The setup version of the install and of this build.
- Windows
Status - What the install says about the sandbox, read without elevation.
Enums§
- Config
Error - Why a settings file was refused.
- Loopback
Mode - Whether the sandbox user may connect to loopback.
- Profile
State - Whether the profile read grant is in place, as
profile statusreports it. - Start
Error - Why a sandbox did not start.
- User
State - Whether a command can be launched as the sandbox user.
- Wrap
Error - Why a command was not wrapped.
Constants§
- PROFILE_
READ_ ENV_ VARS - The variables that point a sandboxed tool at the real user’s config files
in place, in upstream’s order.
profile statusmay report any of them, and a status keeps no other name it reports.
Functions§
- refusal_
for_ exit - The error a srt-win query that exits with
codestands for, when it is one of the exits a host acts on: 15 for no usable install, 18 for seclogon. - run_
args - Runs the command
argsname inside a sandbox, then exits the process with its status. The arguments are thecrabpotcommand line without the program’s name:-s/--settings,-c,-dand--. - run_
from_ args - Takes over the process when its first argument is
--crabpot: runs the command the rest of the arguments name inside a sandbox, and exits with its status. Any other arguments leave it a no-op, so a host calls it first thing inmain(ADR-0010). - windows_
preflight - Checks what
windows_statusreads, and the session this process runs in, against what a command needs, and returns the status when all of it holds. - windows_
preflight_ for windows_preflightfor the installconfig’swindows.sublayerGuidnames.- windows_
status - Reads what the install says about the sandbox, by running this binary
again as srt-win (
--srt-win) foruser status,wfp statusandprofile status, under the default WFP sublayer. None of them needs elevation. - windows_
status_ for windows_statusfor the installconfig’swindows.sublayerGuidnames, as upstream’s status call reads it, with this binary’s runner check filled in.