builtin

package
v0.3.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolRead       = "read"
	ToolList       = "list"
	ToolGlob       = "glob"
	ToolGrep       = "grep"
	ToolApplyPatch = "apply_patch"
	ToolWrite      = "write"
	ToolShell      = "shell"
	ToolWebSearch  = "web_search"
)

Variables

This section is empty.

Functions

func RegisterReadOnlyWorkspace

func RegisterReadOnlyWorkspace(reg *tools.Registry, opts WorkspaceOptions) error

func RegisterSearch

func RegisterSearch(reg *tools.Registry, opts SearchOptions) error

func RegisterSelected

func RegisterSelected(reg *tools.Registry, opts SelectedOptions, names ...string) error

func RegisterShell

func RegisterShell(reg *tools.Registry, opts ShellOptions) error

func RegisterWorkspaceMutation

func RegisterWorkspaceMutation(reg *tools.Registry, opts WorkspaceOptions) error

Types

type CommandRequest

type CommandRequest struct {
	Command   string
	Workdir   string
	TimeoutMS int
}

type CommandResult

type CommandResult struct {
	Stdout     string
	Stderr     string
	ExitCode   int
	DurationMS int64
}

type CommandRunner

type CommandRunner interface {
	Run(context.Context, CommandRequest) (CommandResult, error)
}

type SearchOptions

type SearchOptions struct {
	Provider         string
	APIKey           string
	Endpoint         string
	DefaultTimeoutMS int
	HTTPClient       *http.Client
}

type SelectedOptions

type SelectedOptions struct {
	Workspace WorkspaceOptions
	Shell     ShellOptions
	Search    SearchOptions
}

type ShellOptions

type ShellOptions struct {
	CWD              string
	Runner           CommandRunner
	DefaultTimeoutMS int
	MaxOutputBytes   int
}

type WorkspaceOptions

type WorkspaceOptions struct {
	Root              string
	MaxReadBytes      int
	MaxReadLines      int
	AllowExternalRead bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL