Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewShellBash ¶
func NewShellBash(cfg ShellBashConfig, deps ShellBashDeps) (agentkit.Tool, error)
NewShellBash registers tool/shell-bash: Execute bash commands rooted in the workspace (tool name: bash).
Best practices:
- Keep commands non-interactive; avoid pagers and prompts.
- For unattended runs pair with policy/shell-allowlist in strict mode.
Types ¶
type ShellBashConfig ¶
type ShellBashConfig struct {
// WorkDir is working directory relative to the workspace root.
WorkDir string `json:"workDir"`
// TimeoutSeconds is per-command limit; 0 falls back to the built-in default.
TimeoutSeconds int `json:"timeoutSeconds"`
// Commands optionally overrides env var names injected for shell-bash.<token>.
// Default: scope is derived from the command's first token; keys come from L1 scopedEnv,
// secrets.enc.json (/env add), or shell-bash.json manifest allowlist.
Commands map[string][]string `json:"commands,omitempty"`
}
type ShellBashDeps ¶
type ShellBashDeps struct {
Workspace workspace.Service `json:"workspace"`
Credentials credentials.Store `json:"credentials,omitempty"`
}
type ShellInput ¶
type ShellInput struct {
Command string `json:"command" jsonschema:"Shell command to execute"`
}
type ShellOutput ¶
Click to show internal directories.
Click to hide internal directories.