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 injects the PreToolUse hook via `claude --settings`; otherwise it disables the Bash and Monitor tools.
func Run ¶
Run builds the launch command for cfg and replaces the current process with it via syscall.Exec. It returns only on failure.
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.