NormalizePath strips a leading ‘@’ from a path if present.
type Bash
Bash is a tool for executing shell commands.
Security note: commands are executed as-is via `bash -c`. The subprocess runs in an isolated environment containing only an explicit allowlist of variables (PATH, HOME, LANG, TERM, TMPDIR, USER, SHELL). Extra variables can be injected via EnvAllowlist. DenyPatterns blocks commands by substring match before execution.
typeBashstruct{// Cwd is the working directory for commands.Cwdstring// Timeout for command execution.Timeouttime.Duration// DenyPatterns is an optional list of substrings that, if found in the// command, will cause execution to be rejected. Checked case-insensitively.// Example: []string{"rm -rf /", "dd if=", "> /dev/sd"}DenyPatterns[]string// EnvAllowlist is an optional list of KEY=VALUE pairs to inject into the// subprocess environment in addition to the default allowlist.EnvAllowlist[]string}
Tool is the universal tool interface — anything the agent can do.
typeToolinterface{Name()stringDescription()stringSchema()json.RawMessage// JSON Schema for parametersExecute(ctxcontext.Context,argsjson.RawMessage,updateToolUpdate)(*ToolResult,error)IsReadOnly()bool}
type ToolCall
ToolCall represents a tool invocation from the LLM.