Skip to main content

Crate crabpot

Crate crabpot 

Source
Expand description

Native Rust sandbox runtime for AI agents, rewritten from Anthropic’s sandbox-runtime.

Structs§

Config
The settings one sandbox runs under.
ProfileConflict
A path a Windows session asks to grant, and the exclusion of the profile read grant it meets.
ProfileExclusions
The paths a profile read grant keeps out of a session’s grants, as profile status records them.
Sandbox
A sandbox started from a Config. Wrap each command that is to run in it with Sandbox::command, and drop it when they have all ended, since the proxy stops with it.
SetupVersion
The setup version of the install and of this build.
WindowsStatus
What the install says about the sandbox, read without elevation.

Enums§

ConfigError
Why a settings file was refused.
LoopbackMode
Whether the sandbox user may connect to loopback.
ProfileState
Whether the profile read grant is in place, as profile status reports it.
StartError
Why a sandbox did not start.
UserState
Whether a command can be launched as the sandbox user.
WrapError
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 status may 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 code stands 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 args name inside a sandbox, then exits the process with its status. The arguments are the crabpot command line without the program’s name: -s/--settings, -c, -d and --.
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 in main (ADR-0010).
windows_preflight
Checks what windows_status reads, 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_preflight for the install config’s windows.sublayerGuid names.
windows_status
Reads what the install says about the sandbox, by running this binary again as srt-win (--srt-win) for user status, wfp status and profile status, under the default WFP sublayer. None of them needs elevation.
windows_status_for
windows_status for the install config’s windows.sublayerGuid names, as upstream’s status call reads it, with this binary’s runner check filled in.