builtin

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolNameSearchTool = "search_tool"
	ToolNameAddTool    = "add_tool"
)
View Source
const (
	ToolNameReadFile           = "read_file"
	ToolNameReadMultipleFiles  = "read_multiple_files"
	ToolNameEditFile           = "edit_file"
	ToolNameWriteFile          = "write_file"
	ToolNameDirectoryTree      = "directory_tree"
	ToolNameListDirectory      = "list_directory"
	ToolNameSearchFilesContent = "search_files_content"
	ToolNameMkdir              = "create_directory"
	ToolNameRmdir              = "remove_directory"
)
View Source
const (
	ToolNameLSPWorkspace        = "lsp_workspace"
	ToolNameLSPHover            = "lsp_hover"
	ToolNameLSPDefinition       = "lsp_definition"
	ToolNameLSPReferences       = "lsp_references"
	ToolNameLSPDocumentSymbols  = "lsp_document_symbols"
	ToolNameLSPWorkspaceSymbols = "lsp_workspace_symbols"
	ToolNameLSPDiagnostics      = "lsp_diagnostics"
	ToolNameLSPRename           = "lsp_rename"
	ToolNameLSPCodeActions      = "lsp_code_actions"
	ToolNameLSPFormat           = "lsp_format"
	ToolNameLSPCallHierarchy    = "lsp_call_hierarchy"
	ToolNameLSPTypeHierarchy    = "lsp_type_hierarchy"
	ToolNameLSPImplementations  = "lsp_implementations"
	ToolNameLSPSignatureHelp    = "lsp_signature_help"
	ToolNameLSPInlayHints       = "lsp_inlay_hints"
)
View Source
const (
	ToolNameAddMemory      = "add_memory"
	ToolNameGetMemories    = "get_memories"
	ToolNameDeleteMemory   = "delete_memory"
	ToolNameSearchMemories = "search_memories"
	ToolNameUpdateMemory   = "update_memory"
)
View Source
const (
	ToolNameChangeModel = "change_model"
	ToolNameRevertModel = "revert_model"
)
View Source
const (
	ToolNameShell              = "shell"
	ToolNameRunShellBackground = "run_background_job"
	ToolNameListBackgroundJobs = "list_background_jobs"
	ToolNameViewBackgroundJob  = "view_background_job"
	ToolNameStopBackgroundJob  = "stop_background_job"
)
View Source
const (
	ToolNameReadSkill     = "read_skill"
	ToolNameReadSkillFile = "read_skill_file"
)
View Source
const (
	ToolNameCreateTask       = "create_task"
	ToolNameGetTask          = "get_task"
	ToolNameUpdateTask       = "update_task"
	ToolNameDeleteTask       = "delete_task"
	ToolNameListTasks        = "list_tasks"
	ToolNameNextTask         = "next_task"
	ToolNameAddDependency    = "add_dependency"
	ToolNameRemoveDependency = "remove_dependency"
)
View Source
const (
	ToolNameCreateTodo  = "create_todo"
	ToolNameCreateTodos = "create_todos"
	ToolNameUpdateTodos = "update_todos"
	ToolNameListTodos   = "list_todos"
)
View Source
const (
	ToolNameFetch = "fetch"
)
View Source
const ToolNameHandoff = "handoff"
View Source
const ToolNameThink = "think"
View Source
const ToolNameTransferTask = "transfer_task"
View Source
const ToolNameUserPrompt = "user_prompt"

Variables

View Source
var NewSharedTodoTool = sync.OnceValue(func() *TodoTool { return NewTodoTool() })

Functions

This section is empty.

Types

type APITool

type APITool struct {
	// contains filtered or unexported fields
}

func NewAPITool

func NewAPITool(config latest.APIToolConfig, expander *js.Expander) *APITool

func (*APITool) Instructions

func (t *APITool) Instructions() string

func (*APITool) Tools

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

type AddDependencyArgs

type AddDependencyArgs struct {
	TaskID      string `json:"taskId" jsonschema:"The task that depends on another"`
	DependsOnID string `json:"dependsOnId" jsonschema:"The task that must be completed first"`
}

type AddMemoryArgs

type AddMemoryArgs struct {
	Memory   string `json:"memory" jsonschema:"The memory content to store"`
	Category string `json:"category,omitempty" jsonschema:"Optional category to organize the memory (e.g. preference, fact, project)"`
}

type AddToolArgs

type AddToolArgs struct {
	Name string `json:"name" jsonschema:"The name of the tool to activate"`
}

type CallHierarchyArgs

type CallHierarchyArgs struct {
	PositionArgs
	Direction string `json:"direction" jsonschema:"Direction: 'incoming' (who calls this) or 'outgoing' (what this calls)"`
}

CallHierarchyArgs for getting call hierarchy.

type ChangeModelArgs

type ChangeModelArgs struct {
	Model string `json:"model" jsonschema:"The model to switch to. Must be one of the available models."`
}

ChangeModelArgs are the arguments for the change_model tool.

type CodeActionsArgs

type CodeActionsArgs struct {
	File      string `json:"file" jsonschema:"Absolute path to the source file"`
	StartLine int    `json:"start_line" jsonschema:"Start line of the range (1-based)"`
	EndLine   int    `json:"end_line,omitempty" jsonschema:"End line of the range (1-based, defaults to start_line)"`
}

CodeActionsArgs for getting available code actions.

type CreateDirectoryArgs

type CreateDirectoryArgs struct {
	Paths []string `json:"paths" jsonschema:"Array of directory paths to create"`
}

type CreateTaskArgs

type CreateTaskArgs struct {
	Title        string   `json:"title" jsonschema:"Short title for the task"`
	Description  string   `json:"description,omitempty" jsonschema:"Task description (ignored if path is given)"`
	Path         string   `json:"path,omitempty" jsonschema:"Path to a markdown file whose content becomes the task description"`
	Priority     string   `json:"priority,omitempty" jsonschema:"Priority: critical, high, medium (default), or low"`
	Dependencies []string `json:"dependencies,omitempty" jsonschema:"IDs of tasks that must be completed before this one"`
}

type CreateTodoArgs

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

type CreateTodosArgs

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

type DB

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
	SearchMemories(ctx context.Context, query, category string) ([]database.UserMemory, error)
	UpdateMemory(ctx context.Context, memory database.UserMemory) error
}

type DeferredToolset

type DeferredToolset struct {
	// contains filtered or unexported fields
}

func NewDeferredToolset

func NewDeferredToolset() *DeferredToolset

func (*DeferredToolset) AddSource

func (d *DeferredToolset) AddSource(toolset tools.ToolSet, deferAll bool, toolNames []string)

func (*DeferredToolset) HasSources

func (d *DeferredToolset) HasSources() bool

func (*DeferredToolset) Instructions

func (d *DeferredToolset) Instructions() string

func (*DeferredToolset) Start

func (d *DeferredToolset) Start(ctx context.Context) error

func (*DeferredToolset) Stop

func (*DeferredToolset) Tools

func (d *DeferredToolset) Tools(context.Context) ([]tools.Tool, error)

type DeleteMemoryArgs

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

type DeleteTaskArgs

type DeleteTaskArgs struct {
	ID string `json:"id" jsonschema:"Task ID to delete"`
}

type DirectoryTreeArgs

type DirectoryTreeArgs struct {
	Path string `json:"path" jsonschema:"The directory path to traverse (relative to working directory)"`
}

type DirectoryTreeMeta

type DirectoryTreeMeta struct {
	FileCount int  `json:"fileCount"`
	DirCount  int  `json:"dirCount"`
	Truncated bool `json:"truncated"`
}

type Edit

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

type EditFileArgs

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

type FetchResult

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

type FetchTool struct {
	// contains filtered or unexported fields
}

func NewFetchTool

func NewFetchTool(options ...FetchToolOption) *FetchTool

func (*FetchTool) Instructions

func (t *FetchTool) Instructions() string

func (*FetchTool) Tools

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

type FetchToolArgs

type FetchToolArgs struct {
	URLs    []string `json:"urls"`
	Timeout int      `json:"timeout,omitempty"`
	Format  string   `json:"format,omitempty"`
}

type FetchToolOption

type FetchToolOption func(*FetchTool)

func WithTimeout

func WithTimeout(timeout time.Duration) FetchToolOption

type FileArgs

type FileArgs struct {
	File string `json:"file" jsonschema:"Absolute path to the source file"`
}

FileArgs is for tools that only need a file path.

type FileSystemOpt

type FileSystemOpt func(*FilesystemTool)

func WithIgnoreVCS

func WithIgnoreVCS(ignoreVCS bool) FileSystemOpt

func WithPostEditCommands

func WithPostEditCommands(postEditCommands []PostEditConfig) FileSystemOpt

type FilesystemTool

type FilesystemTool struct {
	// contains filtered or unexported fields
}

func NewFilesystemTool

func NewFilesystemTool(workingDir string, opts ...FileSystemOpt) *FilesystemTool

func (*FilesystemTool) Instructions

func (t *FilesystemTool) Instructions() string

func (*FilesystemTool) Tools

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

type GetTaskArgs

type GetTaskArgs struct {
	ID string `json:"id" jsonschema:"Task ID"`
}

type HandoffArgs

type HandoffArgs struct {
	Agent string `json:"agent" jsonschema:"The name of the agent to hand off the conversation to."`
}

type HandoffTool

type HandoffTool struct{}

func NewHandoffTool

func NewHandoffTool() *HandoffTool

func (*HandoffTool) Tools

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

type InlayHintsArgs

type InlayHintsArgs struct {
	File      string `json:"file" jsonschema:"Absolute path to the source file"`
	StartLine int    `json:"start_line,omitempty" jsonschema:"Start line of range (1-based, default: 1)"`
	EndLine   int    `json:"end_line,omitempty" jsonschema:"End line of range (1-based, default: end of file)"`
}

InlayHintsArgs for getting inlay hints.

type LSPTool

type LSPTool struct {
	// contains filtered or unexported fields
}

LSPTool implements tools.ToolSet for connecting to any LSP server. It provides stateless code intelligence tools that automatically manage the LSP server lifecycle and document state.

func NewLSPTool

func NewLSPTool(command string, args, env []string, workingDir string) *LSPTool

NewLSPTool creates a new LSP tool that connects to an LSP server.

func (*LSPTool) HandlesFile

func (t *LSPTool) HandlesFile(path string) bool

HandlesFile checks if this LSP handles the given file based on its extension.

func (*LSPTool) Instructions

func (t *LSPTool) Instructions() string

func (*LSPTool) SetFileTypes

func (t *LSPTool) SetFileTypes(fileTypes []string)

SetFileTypes sets the file types (extensions) that this LSP server handles.

func (*LSPTool) Start

func (t *LSPTool) Start(ctx context.Context) error

func (*LSPTool) Stop

func (t *LSPTool) Stop(ctx context.Context) error

func (*LSPTool) Tools

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

type ListDirectoryArgs

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

type ListDirectoryMeta

type ListDirectoryMeta struct {
	Files     []string `json:"files"`
	Dirs      []string `json:"dirs"`
	Truncated bool     `json:"truncated"`
}

type ListTasksArgs

type ListTasksArgs struct {
	Status   string `json:"status,omitempty" jsonschema:"Filter by effective status: pending, in_progress, done, blocked"`
	Priority string `json:"priority,omitempty" jsonschema:"Filter by priority level: critical, high, medium, low"`
}

type MemoryTodoStorage

type MemoryTodoStorage struct {
	// contains filtered or unexported fields
}

MemoryTodoStorage is an in-memory, concurrency-safe implementation of TodoStorage.

func NewMemoryTodoStorage

func NewMemoryTodoStorage() *MemoryTodoStorage

func (*MemoryTodoStorage) Add

func (s *MemoryTodoStorage) Add(todo Todo)

func (*MemoryTodoStorage) All

func (s *MemoryTodoStorage) All() []Todo

func (*MemoryTodoStorage) Clear

func (s *MemoryTodoStorage) Clear()

func (*MemoryTodoStorage) FindByID

func (s *MemoryTodoStorage) FindByID(id string) int

func (*MemoryTodoStorage) Len

func (s *MemoryTodoStorage) Len() int

func (*MemoryTodoStorage) Update

func (s *MemoryTodoStorage) Update(index int, fn func(Todo) Todo)

type MemoryTool

type MemoryTool struct {
	// contains filtered or unexported fields
}

func NewMemoryTool

func NewMemoryTool(manager DB) *MemoryTool

func NewMemoryToolWithPath

func NewMemoryToolWithPath(manager DB, dbPath string) *MemoryTool

NewMemoryToolWithPath creates a MemoryTool and records the database path for user-visible identification in warnings and error messages.

func (*MemoryTool) Describe

func (t *MemoryTool) Describe() string

Describe returns a short, user-visible description of this toolset instance.

func (*MemoryTool) Instructions

func (t *MemoryTool) Instructions() string

func (*MemoryTool) Tools

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

type ModelPickerTool

type ModelPickerTool struct {
	// contains filtered or unexported fields
}

ModelPickerTool provides tools for dynamically switching the agent's model mid-conversation.

func NewModelPickerTool

func NewModelPickerTool(models []string) *ModelPickerTool

NewModelPickerTool creates a new ModelPickerTool with the given list of allowed models.

func (*ModelPickerTool) AllowedModels

func (t *ModelPickerTool) AllowedModels() []string

AllowedModels returns the list of models this tool allows switching to.

func (*ModelPickerTool) Instructions

func (t *ModelPickerTool) Instructions() string

Instructions returns guidance for the LLM on when and how to use the model picker tools.

func (*ModelPickerTool) Tools

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

Tools returns the change_model and revert_model tool definitions.

type OpenAPITool

type OpenAPITool struct {
	// contains filtered or unexported fields
}

OpenAPITool generates HTTP tools from an OpenAPI specification.

func NewOpenAPITool

func NewOpenAPITool(specURL string, headers map[string]string) *OpenAPITool

NewOpenAPITool creates a new OpenAPI toolset from the given spec URL.

func (*OpenAPITool) Instructions

func (t *OpenAPITool) Instructions() string

Instructions returns usage instructions for the OpenAPI toolset.

func (*OpenAPITool) Tools

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

Tools fetches and parses the OpenAPI specification, returning a tool for each operation.

type PositionArgs

type PositionArgs struct {
	File      string `json:"file" jsonschema:"Absolute path to the source file"`
	Line      int    `json:"line" jsonschema:"Line number (1-based)"`
	Character int    `json:"character" jsonschema:"Character position on the line (1-based)"`
}

PositionArgs is the base for all position-based tool arguments.

type PostEditConfig

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 QueryRAGArgs

type QueryRAGArgs struct {
	Query string `json:"query" jsonschema:"Search query"`
}

type QueryResult

type QueryResult struct {
	SourcePath string  `json:"source_path" jsonschema:"Path to the source document"`
	Content    string  `json:"content" jsonschema:"Relevant document chunk content"`
	Similarity float64 `json:"similarity" jsonschema:"Similarity score (0-1)"`
	ChunkIndex int     `json:"chunk_index" jsonschema:"Index of the chunk within the source document"`
}

type RAGTool

type RAGTool struct {
	// contains filtered or unexported fields
}

RAGTool provides document querying capabilities for a single RAG source

func NewRAGTool

func NewRAGTool(manager *rag.Manager, toolName string) *RAGTool

NewRAGTool creates a new RAG tool for a single RAG manager toolName is the name to use for the tool (typically from config or manager name)

func (*RAGTool) Instructions

func (t *RAGTool) Instructions() string

func (*RAGTool) Tools

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

type ReadFileArgs

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

type ReadFileMeta

type ReadFileMeta struct {
	Path      string `json:"path"`
	Content   string `json:"content"`
	LineCount int    `json:"lineCount"`
	Error     string `json:"error,omitempty"`
}

type ReadMultipleFilesArgs

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 ReadMultipleFilesMeta

type ReadMultipleFilesMeta struct {
	Files []ReadFileMeta `json:"files"`
}

type ReferencesArgs

type ReferencesArgs struct {
	PositionArgs
	IncludeDeclaration *bool `json:"include_declaration,omitempty" jsonschema:"Include the declaration in results (default: true)"`
}

ReferencesArgs extends PositionArgs with an include_declaration option.

type RemoveDependencyArgs

type RemoveDependencyArgs struct {
	TaskID      string `json:"taskId" jsonschema:"The task to remove the dependency from"`
	DependsOnID string `json:"dependsOnId" jsonschema:"The dependency to remove"`
}

type RemoveDirectoryArgs

type RemoveDirectoryArgs struct {
	Paths []string `json:"paths" jsonschema:"Array of directory paths to remove"`
}

type RenameArgs

type RenameArgs struct {
	PositionArgs
	NewName string `json:"new_name" jsonschema:"The new name for the symbol"`
}

RenameArgs extends PositionArgs with the new name.

type RunShellArgs

type RunShellArgs struct {
	Cmd     string `json:"cmd" jsonschema:"The shell command to execute"`
	Cwd     string `json:"cwd,omitempty" jsonschema:"The working directory to execute the command in (default: \".\")"`
	Timeout int    `json:"timeout,omitempty" jsonschema:"Command execution timeout in seconds (default: 30)"`
}

type RunShellBackgroundArgs

type RunShellBackgroundArgs struct {
	Cmd string `json:"cmd" jsonschema:"The shell command to execute in the background"`
	Cwd string `json:"cwd,omitempty" jsonschema:"The working directory to execute the command in (default: \".\")"`
}

type ScriptShellTool

type ScriptShellTool struct {
	// contains filtered or unexported fields
}

func NewScriptShellTool

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

func (*ScriptShellTool) Instructions

func (t *ScriptShellTool) Instructions() string

func (*ScriptShellTool) Tools

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

type SearchFilesContentArgs

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 SearchFilesContentMeta

type SearchFilesContentMeta struct {
	MatchCount int `json:"matchCount"`
	FileCount  int `json:"fileCount"`
}

type SearchMemoriesArgs

type SearchMemoriesArgs struct {
	Query    string `json:"query,omitempty" jsonschema:"Keywords to search for in memory content (space-separated, all must match)"`
	Category string `json:"category,omitempty" jsonschema:"Optional category to filter by"`
}

type SearchToolArgs

type SearchToolArgs struct {
	Query string `json:"query" jsonschema:"Search query to find tools by name or description (case-insensitive)"`
}

type SearchToolResult

type SearchToolResult struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type ShellTool

type ShellTool struct {
	// contains filtered or unexported fields
}

ShellTool provides shell command execution capabilities.

func NewShellTool

func NewShellTool(env []string, runConfig *config.RuntimeConfig) *ShellTool

NewShellTool creates a new shell tool.

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 SkillsToolset

type SkillsToolset struct {
	// contains filtered or unexported fields
}

SkillsToolset provides the read_skill and read_skill_file tools that let an agent load skill content and supporting resources by name. It hides whether a skill is local or remote — the agent just sees a name and description.

func NewSkillsToolset

func NewSkillsToolset(loadedSkills []skills.Skill) *SkillsToolset

func (*SkillsToolset) Instructions

func (s *SkillsToolset) Instructions() string

func (*SkillsToolset) ReadSkillContent

func (s *SkillsToolset) ReadSkillContent(name string) (string, error)

ReadSkillContent returns the content of a skill's SKILL.md by name.

func (*SkillsToolset) ReadSkillFile

func (s *SkillsToolset) ReadSkillFile(skillName, relativePath string) (string, error)

ReadSkillFile returns the content of a supporting file within a skill. The path is relative to the skill's base directory (e.g. "references/FORMS.md").

func (*SkillsToolset) Skills

func (s *SkillsToolset) Skills() []skills.Skill

Skills returns the loaded skills (used by the app layer for slash commands).

func (*SkillsToolset) Tools

func (s *SkillsToolset) Tools(context.Context) ([]tools.Tool, error)

type StopBackgroundJobArgs

type StopBackgroundJobArgs struct {
	JobID string `json:"job_id" jsonschema:"The ID of the background job to stop"`
}

type Task

type Task struct {
	ID           string       `json:"id"`
	Title        string       `json:"title"`
	Description  string       `json:"description"`
	Priority     TaskPriority `json:"priority"`
	Status       TaskStatus   `json:"status"`
	Dependencies []string     `json:"dependencies"`
	CreatedAt    string       `json:"createdAt"`
	UpdatedAt    string       `json:"updatedAt"`
}

type TaskPriority

type TaskPriority string
const (
	PriorityCritical TaskPriority = "critical"
	PriorityHigh     TaskPriority = "high"
	PriorityMedium   TaskPriority = "medium"
	PriorityLow      TaskPriority = "low"
)

type TaskStatus

type TaskStatus string
const (
	StatusPending    TaskStatus = "pending"
	StatusInProgress TaskStatus = "in_progress"
	StatusDone       TaskStatus = "done"
	StatusBlocked    TaskStatus = "blocked"
)

type TasksTool

type TasksTool struct {
	// contains filtered or unexported fields
}

func NewTasksTool

func NewTasksTool(storagePath string) *TasksTool

func (*TasksTool) Instructions

func (t *TasksTool) Instructions() string

func (*TasksTool) Tools

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

type ThinkArgs

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

type ThinkTool

type ThinkTool struct {
	// contains filtered or unexported fields
}

func NewThinkTool

func NewThinkTool() *ThinkTool

func (*ThinkTool) Instructions

func (t *ThinkTool) Instructions() string

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 TodoOption

type TodoOption func(*TodoTool)

TodoOption is a functional option for configuring a TodoTool.

func WithStorage

func WithStorage(storage TodoStorage) TodoOption

WithStorage sets a custom storage implementation for the TodoTool. The provided storage must not be nil.

type TodoStorage

type TodoStorage interface {
	// Add appends a new todo item.
	Add(todo Todo)
	// All returns a copy of all todo items.
	All() []Todo
	// Len returns the number of todo items.
	Len() int
	// FindByID returns the index of the todo with the given ID, or -1 if not found.
	FindByID(id string) int
	// Update modifies the todo at the given index using the provided function.
	Update(index int, fn func(Todo) Todo)
	// Clear removes all todo items.
	Clear()
}

TodoStorage defines the storage layer for todo items.

type TodoTool

type TodoTool struct {
	// contains filtered or unexported fields
}

func NewTodoTool

func NewTodoTool(opts ...TodoOption) *TodoTool

func (*TodoTool) Instructions

func (t *TodoTool) Instructions() string

func (*TodoTool) Tools

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

type TodoUpdate

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

type TransferTaskArgs

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{}

func NewTransferTaskTool

func NewTransferTaskTool() *TransferTaskTool

func (*TransferTaskTool) Tools

type TypeHierarchyArgs

type TypeHierarchyArgs struct {
	PositionArgs
	Direction string `json:"direction" jsonschema:"Direction: 'supertypes' (parent types) or 'subtypes' (child types)"`
}

TypeHierarchyArgs for getting type hierarchy.

type UpdateMemoryArgs

type UpdateMemoryArgs struct {
	ID       string `json:"id" jsonschema:"The ID of the memory to update"`
	Memory   string `json:"memory" jsonschema:"The new memory content"`
	Category string `json:"category,omitempty" jsonschema:"Optional new category for the memory"`
}

type UpdateTaskArgs

type UpdateTaskArgs struct {
	ID           string   `json:"id" jsonschema:"Task ID to update"`
	Title        string   `json:"title,omitempty" jsonschema:"New title"`
	Description  string   `json:"description,omitempty" jsonschema:"New description"`
	Path         string   `json:"path,omitempty" jsonschema:"Read new description from this file"`
	Priority     string   `json:"priority,omitempty" jsonschema:"New priority: critical, high, medium, or low"`
	Status       string   `json:"status,omitempty" jsonschema:"New status: pending, in_progress, done, or blocked"`
	Dependencies []string `json:"dependencies,omitempty" jsonschema:"Replace dependency list with these task IDs"`
}

type UpdateTodosArgs

type UpdateTodosArgs struct {
	Updates []TodoUpdate `json:"updates" jsonschema:"List of todo updates"`
}

type UserPromptArgs

type UserPromptArgs struct {
	Message string         `json:"message" jsonschema:"The message/question to display to the user"`
	Title   string         `json:"title,omitempty" jsonschema:"Optional title for the dialog window (defaults to 'Question')"`
	Schema  map[string]any `` /* 157-byte string literal not displayed */
}

type UserPromptResponse

type UserPromptResponse struct {
	Action  string         `json:"action" jsonschema:"The user action: accept, decline, or cancel"`
	Content map[string]any `json:"content,omitempty" jsonschema:"The user response data (only present when action is accept)"`
}

type UserPromptTool

type UserPromptTool struct {
	// contains filtered or unexported fields
}

func NewUserPromptTool

func NewUserPromptTool() *UserPromptTool

func (*UserPromptTool) Instructions

func (t *UserPromptTool) Instructions() string

func (*UserPromptTool) SetElicitationHandler

func (t *UserPromptTool) SetElicitationHandler(handler tools.ElicitationHandler)

func (*UserPromptTool) Tools

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

type ViewBackgroundJobArgs

type ViewBackgroundJobArgs struct {
	JobID string `json:"job_id" jsonschema:"The ID of the background job to view"`
}

type WorkspaceArgs

type WorkspaceArgs struct{}

WorkspaceArgs is empty - the workspace tool takes no arguments.

type WorkspaceSymbolsArgs

type WorkspaceSymbolsArgs struct {
	Query string `json:"query" jsonschema:"Search query to filter symbols (supports fuzzy matching)"`
}

WorkspaceSymbolsArgs for searching symbols across the workspace.

type WriteFileArgs

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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