Versions in this module Expand all Collapse all v0 v0.1.0 Mar 18, 2026 Changes in this version + const DefaultTimeout + const MaxOutputBytes + var BashDef = ToolDef + var CheckforDef = ToolDef + var CleanDiffDef = ToolDef + var ConflictsDef = ToolDef + var DeleteDef = ToolDef + var ErrsDef = ToolDef + var ImportsDef = ToolDef + var NotabDef = ToolDef + var ReadDef = ToolDef + var RepforDef = ToolDef + var SigDef = ToolDef + var SpliceDef = ToolDef + var SplitDef = ToolDef + var StumpDef = ToolDef + var TabcountDef = ToolDef + var TransformDef = ToolDef + var UTF8Def = ToolDef + var WriteDef = ToolDef + func AtomicWrite(path string, content []byte) error + func ContextWithReadTracker(ctx context.Context, rt *ReadTracker) context.Context + func WalkFiles(opts WalkOptions) ([]string, error) + type APITool struct + Description string + InputSchema map[string]any + Name string + type AfterFunc func(ctx context.Context, call ToolCall, result ToolResult, elapsed time.Duration) + type BeforeFunc func(ctx context.Context, call ToolCall) + type BuiltinFunc func(ctx context.Context, input map[string]any, workDir string) Result + type CSExtractor struct + func (e *CSExtractor) Extensions() []string + func (e *CSExtractor) Extract(filePath string, exportedOnly bool) (*FileShape, error) + type Executor struct + func NewExecutor(registry *Registry, workDir string) *Executor + func (e *Executor) Execute(ctx context.Context, name string, input map[string]any) Result + func (e *Executor) ExecuteJSON(ctx context.Context, name string, rawInput json.RawMessage) Result + func (e *Executor) ReadTracker() *ReadTracker + type FieldDef struct + Name string + Tag string + Type string + type FileShape struct + Constants []ValueDef + File string + Functions []FuncDef + Imports []string + Package string + Types []TypeDef + Variables []ValueDef + type FilterFunc func(def ToolDef) bool + func ExcludeDangerous() FilterFunc + func ExcludeNames(names ...string) FilterFunc + func IncludeNames(names ...string) FilterFunc + func ReadOnlyTools() FilterFunc + type FlagSpec struct + Flag string + Positional bool + Type string + type FuncDef struct + Line int + Name string + Receiver string + Signature string + type Middleware func(ctx context.Context, call ToolCall, ...) ToolResult + func DenyListMiddleware(names ...string) Middleware + func LogMiddleware(before BeforeFunc, after AfterFunc) Middleware + type ReadTracker struct + func NewReadTracker() *ReadTracker + func ReadTrackerFromContext(ctx context.Context) *ReadTracker + func (rt *ReadTracker) CheckWrite(path string) error + func (rt *ReadTracker) Clear() + func (rt *ReadTracker) Len() int + func (rt *ReadTracker) RecordRead(path string) error + func (rt *ReadTracker) RecordWrite(path string) error + func (rt *ReadTracker) WasRead(path string) bool + type Registry struct + func DefaultRegistry() *Registry + func NewRegistry() *Registry + func TerseRegistry() *Registry + func ToolRegistry(toolSets ...[]ToolDef) *Registry + func (r *Registry) APITools() []APITool + func (r *Registry) CheckBinaries() map[string]error + func (r *Registry) Defs() []ToolDef + func (r *Registry) Filter(fn FilterFunc) *Registry + func (r *Registry) Get(name string) (ToolDef, bool) + func (r *Registry) Len() int + func (r *Registry) Names() []string + func (r *Registry) Register(def ToolDef) + func (r *Registry) Remove(name string) + type Result struct + Error string + IsError bool + Output string + func (r Result) Content() string + type TSExtractor struct + func (e *TSExtractor) Extensions() []string + func (e *TSExtractor) Extract(filePath string, exportedOnly bool) (*FileShape, error) + type ToolCall struct + ID string + Input json.RawMessage + Name string + type ToolDef struct + Binary string + Builtin BuiltinFunc + Description string + FlagMap map[string]FlagSpec + InputSchema map[string]any + Name string + NeedsCLI bool + StdinParam string + Timeout time.Duration + func BuiltinTools() []ToolDef + func CoreTools() []ToolDef + func TerseTools() []ToolDef + func (d ToolDef) IsBuiltinTool() bool + type ToolResult struct + Content string + ID string + IsError bool + Name string + type ToolRunner struct + func NewToolRunner(executor *Executor) *ToolRunner + func (r *ToolRunner) Executor() *Executor + func (r *ToolRunner) Run(ctx context.Context, call ToolCall) ToolResult + func (r *ToolRunner) Use(mw ...Middleware) + type TypeDef struct + Embeds []string + Fields []FieldDef + Kind string + Line int + Methods []FuncDef + Name string + Underlying string + type ValueDef struct + Line int + Name string + Type string + Value string + type WalkOptions struct + Dirs []string + Ext string + Files []string + Recursive bool + SkipHidden bool