Documentation
¶
Overview ¶
Package devtools gives a coding agent a shell and file tools over one workspace directory: shell, read_file, write_file, edit_file, list_dir and grep. Register them with [Register].
Paths are confined to the workspace root so the model gets a clear error for a path outside it. This is not a security boundary (a shell command can go anywhere the process can); run the agent in a sandbox for that.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Shell runs commands as Shell + "-c" + command (default: bash if present, else sh).
Shell string
// DefaultTimeout is a command's timeout when the model sets none (default 10m).
DefaultTimeout time.Duration
// MaxTimeout caps the timeout the model may ask for (default 1h).
MaxTimeout time.Duration
// MaxOutputBytes caps a tool result; longer output keeps its head and tail
// (default 16 KiB).
MaxOutputBytes int
// Env is extra environment for commands, as KEY=VALUE.
Env []string
}
Options tunes the tools. Zero values pick the defaults.
Click to show internal directories.
Click to hide internal directories.