builtin

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewSharedTodoTool = sync.OnceValue(NewTodoTool)

Functions

This section is empty.

Types

type AddAllowedDirectoryArgs added in v1.7.1

type AddAllowedDirectoryArgs struct {
	Path      string `json:"path" jsonschema:"The directory path to add to allowed directories"`
	Reason    string `json:"reason" jsonschema:"Explanation of why this directory needs to be added"`
	Confirmed bool   `json:"confirmed,omitempty" jsonschema:"Set to true to confirm that you consent to adding this directory"`
}

type AddMemoryArgs added in v1.7.1

type AddMemoryArgs struct {
	Memory string `json:"memory" jsonschema:"The memory content to store"`
}

type CreateDirectoryArgs added in v1.7.1

type CreateDirectoryArgs struct {
	Path string `json:"path" jsonschema:"The directory path to create"`
}

type CreateTodoArgs added in v1.7.1

type CreateTodoArgs struct {
	Description string `json:"description" jsonschema:"Description of the todo item"`
}

type CreateTodosArgs added in v1.7.1

type CreateTodosArgs struct {
	Descriptions []string `json:"descriptions" jsonschema:"Descriptions of the todo items"`
}

type DB added in v1.8.0

type DB interface {
	AddMemory(ctx context.Context, memory database.UserMemory) error
	GetMemories(ctx context.Context) ([]database.UserMemory, error)
	DeleteMemory(ctx context.Context, memory database.UserMemory) error
}

type DeleteMemoryArgs added in v1.7.1

type DeleteMemoryArgs struct {
	ID string `json:"id" jsonschema:"The ID of the memory to delete"`
}

type DirectoryTreeArgs added in v1.7.1

type DirectoryTreeArgs struct {
	Path     string `json:"path" jsonschema:"The directory path to traverse"`
	MaxDepth int    `json:"max_depth,omitempty" jsonschema:"Maximum depth to traverse (optional)"`
}

type Edit added in v1.7.1

type Edit struct {
	OldText string `json:"oldText" jsonschema:"The exact text to replace"`
	NewText string `json:"newText" jsonschema:"The replacement text"`
}

type EditFileArgs added in v1.7.1

type EditFileArgs struct {
	Path  string `json:"path" jsonschema:"The file path to edit"`
	Edits []Edit `json:"edits" jsonschema:"Array of edit operations"`
}

type FetchResult added in v1.6.0

type FetchResult struct {
	URL           string `json:"url"`
	StatusCode    int    `json:"statusCode"`
	Status        string `json:"status"`
	ContentType   string `json:"contentType,omitempty"`
	ContentLength int    `json:"contentLength"`
	Body          string `json:"body,omitempty"`
	Error         string `json:"error,omitempty"`
}

type FetchTool added in v1.6.0

type FetchTool struct {
	tools.ElicitationTool
	// contains filtered or unexported fields
}

func NewFetchTool added in v1.6.0

func NewFetchTool(options ...FetchToolOption) *FetchTool

func (*FetchTool) Instructions added in v1.6.0

func (t *FetchTool) Instructions() string

func (*FetchTool) Start added in v1.6.0

func (t *FetchTool) Start(context.Context) error

func (*FetchTool) Stop added in v1.6.0

func (t *FetchTool) Stop(context.Context) error

func (*FetchTool) Tools added in v1.6.0

func (t *FetchTool) Tools(context.Context) ([]tools.Tool, error)

type FetchToolOption added in v1.6.0

type FetchToolOption func(*FetchTool)

func WithTimeout added in v1.6.0

func WithTimeout(timeout time.Duration) FetchToolOption

type FileInfo added in v1.5.14

type FileInfo struct {
	Name    string `json:"name"`
	Size    int64  `json:"size"`
	Mode    string `json:"mode"`
	ModTime string `json:"modTime"`
	IsDir   bool   `json:"isDir"`
}

type FileSystemOpt

type FileSystemOpt func(*FilesystemTool)

func WithPostEditCommands added in v1.2.0

func WithPostEditCommands(postEditCommands []PostEditConfig) FileSystemOpt

type FilesystemTool

type FilesystemTool struct {
	tools.ElicitationTool
	// contains filtered or unexported fields
}

func NewFilesystemTool

func NewFilesystemTool(allowedDirectories []string, opts ...FileSystemOpt) *FilesystemTool

func (*FilesystemTool) Instructions

func (t *FilesystemTool) Instructions() string

func (*FilesystemTool) Start

func (t *FilesystemTool) Start(context.Context) error

func (*FilesystemTool) Stop

func (*FilesystemTool) Tools

func (t *FilesystemTool) Tools(context.Context) ([]tools.Tool, error)

type GetFileInfoArgs added in v1.7.1

type GetFileInfoArgs struct {
	Path string `json:"path" jsonschema:"The file or directory path to inspect"`
}

type ListDirectoryArgs added in v1.7.1

type ListDirectoryArgs struct {
	Path string `json:"path" jsonschema:"The directory path to list"`
}

type MemoryTool

type MemoryTool struct {
	tools.ElicitationTool
	// contains filtered or unexported fields
}

func NewMemoryTool

func NewMemoryTool(manager DB) *MemoryTool

func (*MemoryTool) Instructions

func (t *MemoryTool) Instructions() string

func (*MemoryTool) Start

func (t *MemoryTool) Start(context.Context) error

func (*MemoryTool) Stop

func (t *MemoryTool) Stop(context.Context) error

func (*MemoryTool) Tools

func (t *MemoryTool) Tools(context.Context) ([]tools.Tool, error)

type MoveFileArgs added in v1.7.1

type MoveFileArgs struct {
	Source      string `json:"source" jsonschema:"The source path"`
	Destination string `json:"destination" jsonschema:"The destination path"`
}

type PostEditConfig added in v1.2.0

type PostEditConfig struct {
	Path string // File path pattern (glob-style)
	Cmd  string // Command to execute (with $path placeholder)
}

PostEditConfig represents a post-edit command configuration

type ReadFileArgs added in v1.7.1

type ReadFileArgs struct {
	Path string `json:"path" jsonschema:"The file path to read"`
}

type ReadMultipleFilesArgs added in v1.7.1

type ReadMultipleFilesArgs struct {
	Paths []string `json:"paths" jsonschema:"Array of file paths to read"`
	JSON  bool     `json:"json,omitempty" jsonschema:"Whether to return the result as JSON"`
}

type RunShellArgs added in v1.7.1

type RunShellArgs struct {
	Cmd string `json:"cmd" jsonschema:"The shell command to execute"`
	Cwd string `json:"cwd" jsonschema:"The working directory to execute the command in"`
}

type ScriptShellTool

type ScriptShellTool struct {
	tools.ElicitationTool
	// contains filtered or unexported fields
}

func NewScriptShellTool

func NewScriptShellTool(shellTools map[string]latest.ScriptShellToolConfig, env []string) *ScriptShellTool

func (*ScriptShellTool) Instructions

func (t *ScriptShellTool) Instructions() string

func (*ScriptShellTool) Start

func (*ScriptShellTool) Stop

func (*ScriptShellTool) Tools

func (t *ScriptShellTool) Tools(context.Context) ([]tools.Tool, error)

type SearchFilesArgs added in v1.0.0

type SearchFilesArgs struct {
	Path            string   `json:"path" jsonschema:"The starting directory path"`
	Pattern         string   `json:"pattern" jsonschema:"The search pattern"`
	ExcludePatterns []string `json:"excludePatterns,omitempty" jsonschema:"Patterns to exclude from search"`
}

type SearchFilesContentArgs added in v1.7.1

type SearchFilesContentArgs struct {
	Path            string   `json:"path" jsonschema:"The starting directory path"`
	Query           string   `json:"query" jsonschema:"The text or regex pattern to search for"`
	IsRegex         bool     `json:"is_regex,omitempty" jsonschema:"If true, treat query as regex; otherwise literal text"`
	ExcludePatterns []string `json:"excludePatterns,omitempty" jsonschema:"Patterns to exclude from search"`
}

type ShellTool

type ShellTool struct {
	tools.ElicitationTool
	// contains filtered or unexported fields
}

func NewShellTool

func NewShellTool(env []string) *ShellTool

func (*ShellTool) Instructions

func (t *ShellTool) Instructions() string

func (*ShellTool) Start

func (t *ShellTool) Start(context.Context) error

func (*ShellTool) Stop

func (t *ShellTool) Stop(context.Context) error

func (*ShellTool) Tools

func (t *ShellTool) Tools(context.Context) ([]tools.Tool, error)

type ThinkArgs added in v1.7.1

type ThinkArgs struct {
	Thought string `json:"thought" jsonschema:"The thought to think about"`
}

type ThinkTool

type ThinkTool struct {
	tools.ElicitationTool
	// contains filtered or unexported fields
}

func NewThinkTool

func NewThinkTool() *ThinkTool

func (*ThinkTool) Instructions

func (t *ThinkTool) Instructions() string

func (*ThinkTool) Start

func (t *ThinkTool) Start(context.Context) error

func (*ThinkTool) Stop

func (t *ThinkTool) Stop(context.Context) error

func (*ThinkTool) Tools

func (t *ThinkTool) Tools(context.Context) ([]tools.Tool, error)

type Todo

type Todo struct {
	ID          string `json:"id" jsonschema:"ID of the todo item"`
	Description string `json:"description" jsonschema:"Description of the todo item"`
	Status      string `json:"status" jsonschema:"New status (pending, in-progress,completed)"`
}

type TodoTool

type TodoTool struct {
	tools.ElicitationTool
	// contains filtered or unexported fields
}

func NewTodoTool

func NewTodoTool() *TodoTool

func (*TodoTool) Instructions

func (t *TodoTool) Instructions() string

func (*TodoTool) Start

func (t *TodoTool) Start(context.Context) error

func (*TodoTool) Stop

func (t *TodoTool) Stop(context.Context) error

func (*TodoTool) Tools

func (t *TodoTool) Tools(context.Context) ([]tools.Tool, error)

type TransferTaskArgs added in v1.7.1

type TransferTaskArgs struct {
	Agent          string `json:"agent" jsonschema:"The name of the agent to transfer the task to."`
	Task           string `json:"task" jsonschema:"A clear and concise description of the task the member should achieve."`
	ExpectedOutput string `json:"expected_output" jsonschema:"The expected output from the member (optional)."`
}

type TransferTaskTool

type TransferTaskTool struct {
	tools.ElicitationTool
}

func NewTransferTaskTool

func NewTransferTaskTool() *TransferTaskTool

func (*TransferTaskTool) Instructions

func (t *TransferTaskTool) Instructions() string

func (*TransferTaskTool) Start

func (*TransferTaskTool) Stop

func (*TransferTaskTool) Tools

type TreeNode

type TreeNode struct {
	Name     string      `json:"name"`
	Type     string      `json:"type"`
	Children []*TreeNode `json:"children,omitempty"`
}

type UpdateTodoArgs added in v1.7.1

type UpdateTodoArgs struct {
	ID     string `json:"id" jsonschema:"ID of the todo item"`
	Status string `json:"status" jsonschema:"New status (pending, in-progress,completed)"`
}

type WriteFileArgs added in v1.7.1

type WriteFileArgs struct {
	Path    string `json:"path" jsonschema:"The file path to write"`
	Content string `json:"content" jsonschema:"The content to write to the file"`
}

Jump to

Keyboard shortcuts

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