Documentation
¶
Overview ¶
Package shell provides permission-gated command execution tools for agents that explicitly opt into local coding workflows.
Index ¶
Constants ¶
View Source
const ( // ToolName is the model-visible name of the shell execution tool. ToolName = "shell_exec" // DefaultTimeout caps a single shell_exec call when ExecOptions.Timeout // is zero. DefaultTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecOptions ¶
type ExecOptions struct {
// Executor runs the validated command. Nil uses glue.LocalExecutor{}.
Executor glue.Executor
// WorkDir is the workspace root. Required.
WorkDir string
// Env is the exact child environment. The model cannot add env vars.
Env []string
// AllowedBinaries is a basename allowlist. Empty means deny all.
AllowedBinaries []string
// Timeout caps each command. Zero falls back to DefaultTimeout.
Timeout time.Duration
// MaxOutputBytes caps stdout and stderr independently. Zero falls
// back to glue.DefaultExecMaxOutputBytes.
MaxOutputBytes int
}
ExecOptions configures Exec.
Click to show internal directories.
Click to hide internal directories.