Versions in this module Expand all Collapse all v0 v0.4.3 Nov 9, 2026 v0.4.2 Nov 4, 2026 Changes in this version + const ExecuteExtraToolName + const SearchExtraToolsName + func BackgroundTasksDisabled() bool + func Capture(tc *ToolContext, s string) string + func CaptureOnce(tc *ToolContext, s string) string + func EnsureRipgrep() string + func InteractiveShellDisabled() bool + func RenderDeferredToolsBlock(names []string) string + func RenderTodoReminder(todos []Todo) string + func RipgrepPath() string + func ValidateInput(schema map[string]any, raw json.RawMessage) error + type Answer struct + Selected []string + type AskUserFunc func(ctx context.Context, q Question) Answer + type CoreTool interface + Call func(ctx context.Context, input json.RawMessage, tc *ToolContext) (Result, error) + CheckPermissions func(ctx context.Context, input json.RawMessage, pc permission.Context) permission.Decision + Description func() string + InputSchema func() map[string]any + IsConcurrencySafe func(input json.RawMessage) bool + IsReadOnly func(input json.RawMessage) bool + Name func() string + Prompt func() string + func Build(s Spec) CoreTool + func DefaultTools() []CoreTool + func NewAskUserQuestion(ask AskUserFunc) CoreTool + func NewBash() CoreTool + func NewEdit() CoreTool + func NewExecuteExtraTool(reg *Registry, unlock *UnlockSet) CoreTool + func NewGlob() CoreTool + func NewGrep() CoreTool + func NewLS() CoreTool + func NewMonitor() CoreTool + func NewMultiEdit() CoreTool + func NewRead() CoreTool + func NewSearchExtraTools(reg *Registry, deferred []string) CoreTool + func NewShellClose() CoreTool + func NewShellList() CoreTool + func NewShellOpen() CoreTool + func NewShellRead() CoreTool + func NewShellSend() CoreTool + func NewSleep() CoreTool + func NewTaskList() CoreTool + func NewTaskOutput() CoreTool + func NewTaskStop() CoreTool + func NewWebFetch(cfg WebFetchConfig) CoreTool + func NewWebSearch(cfg WebSearchConfig) (CoreTool, error) + func NewWrite() CoreTool + func ShellSessionTools() []CoreTool + type Manager struct + func NewManager(sessionID string) (*Manager, error) + func (m *Manager) Background(id string) + func (m *Manager) Cleanup() + func (m *Manager) DrainNotifications() []Notification + func (m *Manager) Forget(id string) + func (m *Manager) Get(id string) (TaskInfo, bool) + func (m *Manager) Kill(id string) bool + func (m *Manager) KillAll() int + func (m *Manager) List() []TaskInfo + func (m *Manager) Output(id string, maxBytes int) (string, error) + func (m *Manager) RunForeground(ctx context.Context, spec SpawnSpec, timeout time.Duration) (t *Task, finished bool, output string, err error) + func (m *Manager) Spawn(spec SpawnSpec) (*Task, error) + func (m *Manager) Wait(ctx context.Context, id string, timeout time.Duration) (TaskInfo, bool) + type Notification struct + Kind TaskKind + OutputPath string + Status TaskStatus + Summary string + TaskID string + func (n Notification) String() string + type Option struct + Description string + Label string + func (o *Option) UnmarshalJSON(data []byte) error + type ProgressInfo struct + Message string + type Question struct + Header string + MultiSelect bool + Options []Option + Question string + type Registry struct + func NewRegistry(tools ...CoreTool) *Registry + func (r *Registry) Add(t CoreTool) + func (r *Registry) Get(name string) (CoreTool, bool) + func (r *Registry) List() []CoreTool + func (r *Registry) Schemas() []llm.ToolSchema + type Result struct + Content []llm.ContentBlock + Extra []llm.Message + IsError bool + func Errorf(s string) Result + func Text(s string) Result + func (r Result) Flatten() string + type SearchResult struct + Description string + Position int + Title string + URL string + func WebSearchProbe(ctx context.Context, cfg WebSearchConfig, query string, limit int) ([]SearchResult, error) + type SpawnSpec struct + Command string + Description string + Env []string + Kind TaskKind + WorkingDir string + type Spec struct + Concurrent func(json.RawMessage) bool + Description string + Name string + Permissions func(ctx context.Context, input json.RawMessage, pc permission.Context) permission.Decision + Prompt string + RawInput bool + ReadOnly func(json.RawMessage) bool + Run func(ctx context.Context, input json.RawMessage, tc *ToolContext) (Result, error) + Schema map[string]any + type Task struct + Command string + Description string + EndTime time.Time + ExitCode int + ID string + Kind TaskKind + OutputPath string + StartTime time.Time + Status TaskStatus + type TaskInfo struct + Backgrounded bool + Command string + Description string + EndTime time.Time + ExitCode int + ID string + Kind TaskKind + OutputPath string + StartTime time.Time + Status TaskStatus + type TaskKind string + const KindBash + const KindMonitor + type TaskStatus string + const TaskCompleted + const TaskFailed + const TaskKilled + const TaskRunning + func (s TaskStatus) Terminal() bool + type Todo struct + Content string + Status TodoStatus + type TodoStatus string + const TodoCompleted + const TodoInProgress + const TodoPending + type TodoStore struct + func NewTodoStore() *TodoStore + func (s *TodoStore) List() []Todo + func (s *TodoStore) Tool() CoreTool + type ToolContext struct + AgentID string + Emit func(ProgressInfo) + Env []string + MaxOutputChars int + OutputDir string + Tasks *Manager + ToolUseID string + WorkingDir string + type UnlockSet struct + func NewUnlockSet(initial ...string) *UnlockSet + func (s *UnlockSet) Add(names ...string) + func (s *UnlockSet) Has(name string) bool + func (s *UnlockSet) List() []string + type WebFetchConfig struct + CACert string + InsecureTLS bool + Proxy string + type WebSearchConfig struct + Backend string + BraveAPIKey string + CACert string + DeepSeekAPIKey string + DeepSeekBaseURL string + DeepSeekModel string + InsecureTLS bool + Proxy string + TavilyAPIKey string