Documentation
¶
Index ¶
- Constants
- Variables
- type APITool
- type AddDependencyArgs
- type AddMemoryArgs
- type AddToolArgs
- type CallHierarchyArgs
- type ChangeModelArgs
- type CodeActionsArgs
- type CreateDirectoryArgs
- type CreateTaskArgs
- type CreateTodoArgs
- type CreateTodoOutput
- type CreateTodosArgs
- type CreateTodosOutput
- type DB
- type DeferredToolset
- func (d *DeferredToolset) AddSource(toolset tools.ToolSet, deferAll bool, toolNames []string)
- func (d *DeferredToolset) HasSources() bool
- func (d *DeferredToolset) Instructions() string
- func (d *DeferredToolset) Start(ctx context.Context) error
- func (d *DeferredToolset) Stop(context.Context) error
- func (d *DeferredToolset) Tools(context.Context) ([]tools.Tool, error)
- type DeleteMemoryArgs
- type DeleteTaskArgs
- type DirectoryTreeArgs
- type DirectoryTreeMeta
- type Edit
- type EditFileArgs
- type FetchResult
- type FetchTool
- type FetchToolArgs
- type FetchToolOption
- type FileArgs
- type FileSystemOpt
- type FilesystemTool
- type GetTaskArgs
- type HandoffArgs
- type HandoffTool
- type InlayHintsArgs
- type LSPBackend
- type LSPMultiplexer
- type LSPTool
- func (t *LSPTool) HandlesFile(path string) bool
- func (t *LSPTool) Instructions() string
- func (t *LSPTool) SetFileTypes(fileTypes []string)
- func (t *LSPTool) Start(context.Context) error
- func (t *LSPTool) Stop(context.Context) error
- func (t *LSPTool) Tools(context.Context) ([]tools.Tool, error)
- func (t *LSPTool) WorkingDir() string
- type ListDirectoryArgs
- type ListDirectoryMeta
- type ListTasksArgs
- type ListTodosOutput
- type MemoryTodoStorage
- type MemoryTool
- type ModelPickerTool
- type OpenAPITool
- type PositionArgs
- type PostEditConfig
- type RAGEventCallback
- type RAGTool
- type ReadFileArgs
- type ReadFileMeta
- type ReadMultipleFilesArgs
- type ReadMultipleFilesMeta
- type ReferencesArgs
- type RemoveDependencyArgs
- type RemoveDirectoryArgs
- type RenameArgs
- type RunShellArgs
- type RunShellBackgroundArgs
- type RunSkillArgs
- type ScriptShellTool
- type SearchFilesContentArgs
- type SearchFilesContentMeta
- type SearchMemoriesArgs
- type SearchToolArgs
- type SearchToolResult
- type ShellTool
- type SkillsToolset
- func (s *SkillsToolset) FindSkill(name string) *skills.Skill
- func (s *SkillsToolset) Instructions() string
- func (s *SkillsToolset) ReadSkillContent(ctx context.Context, name string) (string, error)
- func (s *SkillsToolset) ReadSkillFile(skillName, relativePath string) (string, error)
- func (s *SkillsToolset) Skills() []skills.Skill
- func (s *SkillsToolset) Tools(context.Context) ([]tools.Tool, error)
- type StopBackgroundJobArgs
- type Task
- type TaskPriority
- type TaskStatus
- type TasksTool
- type ThinkArgs
- type ThinkTool
- type Todo
- type TodoOption
- type TodoStorage
- type TodoTool
- type TodoUpdate
- type TransferTaskArgs
- type TransferTaskTool
- type TypeHierarchyArgs
- type UpdateMemoryArgs
- type UpdateTaskArgs
- type UpdateTodosArgs
- type UpdateTodosOutput
- type UserPromptArgs
- type UserPromptResponse
- type UserPromptTool
- type ViewBackgroundJobArgs
- type WorkspaceArgs
- type WorkspaceSymbolsArgs
- type WriteFileArgs
Constants ¶
const ( ToolNameSearchTool = "search_tool" ToolNameAddTool = "add_tool" )
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" )
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" )
const ( ToolNameAddMemory = "add_memory" ToolNameGetMemories = "get_memories" ToolNameDeleteMemory = "delete_memory" ToolNameSearchMemories = "search_memories" ToolNameUpdateMemory = "update_memory" )
const ( ToolNameChangeModel = "change_model" ToolNameRevertModel = "revert_model" )
const ( ToolNameShell = "shell" ToolNameRunShellBackground = "run_background_job" ToolNameListBackgroundJobs = "list_background_jobs" ToolNameViewBackgroundJob = "view_background_job" ToolNameStopBackgroundJob = "stop_background_job" )
const ( ToolNameReadSkill = "read_skill" ToolNameReadSkillFile = "read_skill_file" ToolNameRunSkill = "run_skill" )
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" )
const ( ToolNameCreateTodo = "create_todo" ToolNameCreateTodos = "create_todos" ToolNameUpdateTodos = "update_todos" ToolNameListTodos = "list_todos" )
const (
ToolNameFetch = "fetch"
)
const ToolNameHandoff = "handoff"
const ToolNameThink = "think"
const ToolNameTransferTask = "transfer_task"
const ToolNameUserPrompt = "user_prompt"
Variables ¶
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 ¶
type AddDependencyArgs ¶
type AddMemoryArgs ¶
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 CreateTodoOutput ¶ added in v1.31.0
type CreateTodosArgs ¶
type CreateTodosArgs struct {
Descriptions []string `json:"descriptions" jsonschema:"Descriptions of the todo items"`
}
type CreateTodosOutput ¶ added in v1.30.1
type CreateTodosOutput struct {
Created []Todo `json:"created" jsonschema:"List of created todo items"`
AllTodos []Todo `json:"all_todos" jsonschema:"Current state of all todo items"`
Reminder string `json:"reminder,omitempty" jsonschema:"Reminder about incomplete todos that still need to be completed"`
}
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
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 EditFileArgs ¶
type EditFileArgs struct {
Path string `json:"path" jsonschema:"The file path to edit"`
Edits []Edit `json:"edits" jsonschema:"Array of edit operations"`
}
func ParseEditFileArgs ¶ added in v1.47.0
func ParseEditFileArgs(data []byte) (EditFileArgs, error)
ParseEditFileArgs parses LLM-generated edit_file arguments, handling two common failure modes:
- The outer JSON itself is malformed — typically extra closing braces/brackets or stray escape sequences caused by the model losing track of nesting depth when the text payload contains structural characters (e.g. YAML, Dockerfiles).
- The "edits" field is double-serialized (a JSON string instead of an array).
type FetchResult ¶
type FetchTool ¶
type FetchTool struct {
// contains filtered or unexported fields
}
func NewFetchTool ¶
func NewFetchTool(options ...FetchToolOption) *FetchTool
func (*FetchTool) Instructions ¶
type FetchToolArgs ¶
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
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
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 LSPBackend ¶ added in v1.30.1
LSPBackend pairs a raw LSPTool (used for file-type routing) with an optionally-wrapped ToolSet (used for tool enumeration, so that per-toolset config like tool filters, instructions, or toon wrappers are respected).
type LSPMultiplexer ¶ added in v1.30.1
type LSPMultiplexer struct {
// contains filtered or unexported fields
}
LSPMultiplexer combines multiple LSP backends into a single toolset. It presents one set of lsp_* tools and routes each call to the appropriate backend based on the file extension in the tool arguments.
func NewLSPMultiplexer ¶ added in v1.30.1
func NewLSPMultiplexer(backends []LSPBackend) *LSPMultiplexer
NewLSPMultiplexer creates a multiplexer that routes LSP tool calls to the appropriate backend based on file type.
func (*LSPMultiplexer) Instructions ¶ added in v1.30.1
func (m *LSPMultiplexer) Instructions() string
func (*LSPMultiplexer) Start ¶ added in v1.30.1
func (m *LSPMultiplexer) Start(ctx context.Context) error
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 ¶
NewLSPTool creates a new LSP tool that connects to an LSP server.
func (*LSPTool) HandlesFile ¶
HandlesFile checks if this LSP handles the given file based on its extension.
func (*LSPTool) Instructions ¶
func (*LSPTool) SetFileTypes ¶
SetFileTypes sets the file types (extensions) that this LSP server handles.
func (*LSPTool) WorkingDir ¶ added in v1.48.0
WorkingDir returns the working directory of the LSP server process. This is intended for testing only.
type ListDirectoryArgs ¶
type ListDirectoryArgs struct {
Path string `json:"path" jsonschema:"The directory path to list"`
}
type ListDirectoryMeta ¶
type ListTasksArgs ¶
type ListTodosOutput ¶ added in v1.30.1
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
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
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.
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.
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 RAGEventCallback ¶ added in v1.37.0
RAGEventCallback is called to forward RAG manager events during initialization.
type RAGTool ¶
type RAGTool struct {
// contains filtered or unexported fields
}
RAGTool provides document querying capabilities for a single RAG source.
func NewRAGTool ¶
NewRAGTool creates a new RAG tool for a single RAG manager.
func (*RAGTool) Instructions ¶
func (*RAGTool) SetEventCallback ¶ added in v1.37.0
func (t *RAGTool) SetEventCallback(cb RAGEventCallback)
SetEventCallback sets a callback to receive RAG manager events during initialization. Must be called before Start().
func (*RAGTool) Start ¶ added in v1.37.0
Start initializes the RAG manager (indexes documents) and starts a file watcher for incremental updates.
type ReadFileArgs ¶
type ReadFileArgs struct {
Path string `json:"path" jsonschema:"The file path to read"`
}
type ReadFileMeta ¶
type ReadMultipleFilesArgs ¶
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 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)"`
}
func (*RunShellArgs) UnmarshalJSON ¶ added in v1.49.1
func (a *RunShellArgs) UnmarshalJSON(data []byte) error
UnmarshalJSON accepts both the canonical "cmd" key and the common alias "command" for the shell command parameter.
The advertised schema still declares "cmd" as the canonical name, but many models (particularly ones biased by Anthropic's built-in bash tool and other ecosystems that use "command") occasionally emit "command" instead. Accepting both prevents a wasted turn on an empty-command error while keeping the canonical contract unchanged. When "cmd" is present with a non-blank value it wins; a blank (empty or whitespace-only) "cmd" falls back to "command" so a valid alias is not silently shadowed.
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: \".\")"`
}
func (*RunShellBackgroundArgs) UnmarshalJSON ¶ added in v1.49.1
func (a *RunShellBackgroundArgs) UnmarshalJSON(data []byte) error
UnmarshalJSON accepts both "cmd" (canonical) and "command" (common alias), mirroring RunShellArgs.UnmarshalJSON. See its comment for rationale.
type RunSkillArgs ¶ added in v1.32.5
type RunSkillArgs struct {
Name string `json:"name" jsonschema:"The name of the skill to run as a sub-agent"`
Task string `json:"task" jsonschema:"A clear description of the task the skill sub-agent should achieve"`
}
RunSkillArgs specifies the parameters for the run_skill tool.
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
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 SearchMemoriesArgs ¶
type SearchToolArgs ¶
type SearchToolArgs struct {
Query string `json:"query" jsonschema:"Search query to find tools by name or description (case-insensitive)"`
}
type SearchToolResult ¶
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 ¶
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, workingDir string) *SkillsToolset
func (*SkillsToolset) FindSkill ¶ added in v1.32.5
func (s *SkillsToolset) FindSkill(name string) *skills.Skill
FindSkill returns the skill with the given name, or nil if not found.
func (*SkillsToolset) Instructions ¶
func (s *SkillsToolset) Instructions() string
func (*SkillsToolset) ReadSkillContent ¶
ReadSkillContent returns the content of a skill's SKILL.md by name. For local skills, it expands any !`command` patterns in the content by executing the commands and replacing the patterns with their stdout output. Command expansion is disabled for remote skills to prevent arbitrary code execution.
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).
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 (*TasksTool) Instructions ¶
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 ¶
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 ¶
type TodoUpdate ¶
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
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 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 UpdateTodosOutput ¶ added in v1.30.1
type UpdateTodosOutput struct {
Updated []TodoUpdate `json:"updated,omitempty" jsonschema:"List of successfully updated todos"`
NotFound []string `json:"not_found,omitempty" jsonschema:"IDs of todos that were not found"`
AllTodos []Todo `json:"all_todos" jsonschema:"Current state of all todo items"`
Reminder string `json:"reminder,omitempty" jsonschema:"Reminder about incomplete todos that still need to be completed"`
}
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 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)
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.