Documentation
¶
Overview ¶
Package claude builds and runs the sandboxed `claude` command: it parses the launcher's arguments, constructs the `nono wrap … claude …` invocation (including the hook settings injected in hook mode), and executes it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArgs ¶
BuildArgs constructs the nono executable path and the argv used to launch Claude under the sandbox for cfg. In hook mode it grants read-only access to the frozen policy snapshot at snapshotPath and injects the PreToolUse hook via `claude --settings`, routing it through that snapshot; otherwise it disables the Bash and Monitor tools.
func Run ¶
Run ensures the sandbox is up, launches Claude under it, and — if this call started the sandbox — tears it down when Claude exits. It replaces the old syscall.Exec approach so the launcher can outlive Claude and run teardown.
func ValidatePassthrough ¶
ValidatePassthrough rejects claude passthrough options that agent-sandbox reserves for itself (currently --settings, used to inject the hook config).
Types ¶
type Options ¶
Options is the split invocation for the claude launcher: options passed through to `nono wrap` and options passed through to `claude`.
func ParseArgs ¶
ParseArgs splits the raw args passed to the claude/debug command into the config-file path and the nono/claude passthrough options. The first standalone "--" separates nono options (before) from claude options (after); with no "--", every token is a nono option. A "--config <val>" or "--config=<val>" appearing in the nono region sets the config path and is removed from the nono options. defaultConfig is used when no "--config" is given. This is needed because the command disables cobra flag parsing to pass options verbatim.