Documentation
¶
Overview ¶
Package tool defines tool contracts and built-in tool implementations.
Index ¶
- Constants
- Variables
- func AppendUniqueRange(dst []lsp.Range, value lsp.Range) []lsp.Range
- func BestEffortCodeActionRanges(filePath string, startLine, startCharacter, endLine, endCharacter int) []lsp.Range
- func BestEffortPositionCandidates(filePath string, line, character int) []int
- func CommandScopedNetworkTarget(command string, prefixRule []string) string
- func CurrentObservedResourceState(kind ObservedResourceKind, path string) (string, bool, error)
- func CurrentObservedResourceVersion(kind ObservedResourceKind, path string) (string, bool, error)
- func DecodeArgs(toolName string, args json.RawMessage, dst any) error
- func DecodeArgsStrict(toolName string, args json.RawMessage, dst any, allowedFields ...string) error
- func DefaultErrorText(toolName string, err error) string
- func FormatDiagnostics(files []CodeIntelFileDiagnostics) string
- func InvalidArguments(toolName string, cause error) error
- func IsMCPToolName(name string) bool
- func MCPToolName(serverName, remoteToolName string) string
- func MCPToolNameComponent(value string) string
- func MarshalStructuredResult(value any) (json.RawMessage, error)
- func NewCodeIntelNoticeError(kind CodeIntelNoticeKind, message string) error
- func NormalizeArgumentError(toolName string, err error) error
- func NormalizeSearchArguments(args json.RawMessage, service *searchsvc.Service) (json.RawMessage, error)
- func NormalizeWebSearchArguments(args json.RawMessage, service *websearchsvc.Service) (json.RawMessage, error)
- func ParseMCPToolName(name string) (string, string, bool)
- func PolicyListContainsTool(list []string, name string) bool
- func ReadObservedVersion(path string) (string, error)
- func ToolPatternMatches(pattern, name string) bool
- func WithFileMutationLock(path string, fn func() error) error
- func WorkspaceEditHasChanges(edit *lsp.WorkspaceEdit) bool
- func WriteFileAtomically(path string, content []byte, mode os.FileMode) error
- type ApplyPatch
- type ApplyPatchChangedFile
- type ApplyPatchOperation
- type ApplyPatchOperationKind
- type ApplyPatchStructuredResult
- type ApplyPatchTool
- type ApplyPatchUpdateHunk
- type BashTool
- type BeforeFileMutation
- type CodeActionTool
- type CodeIntel
- type CodeIntelCodeActionRequest
- type CodeIntelCodeActionResult
- type CodeIntelDiagnostic
- type CodeIntelFileDiagnostics
- type CodeIntelLocation
- type CodeIntelMutationSummary
- type CodeIntelNotice
- type CodeIntelNoticeError
- type CodeIntelNoticeKind
- type CodeIntelReference
- type CodeIntelReferenceKind
- type CodeIntelRefsMode
- type CodeIntelRefsRequest
- type CodeIntelRefsResult
- type CodeIntelRenameRequest
- type CodeIntelSymbol
- type CodeIntelSymbolsResult
- type CodeIntelTraceEdge
- type CodeIntelTraceMode
- type CodeIntelTraceNode
- type CodeIntelTraceRequest
- type CodeIntelTraceResult
- type Definition
- type DefinitionTool
- type DiagnosticsTool
- type ExecutionContext
- func (e ExecutionContext) AskQuestion(request QuestionRequest) (QuestionResponse, error)
- func (e ExecutionContext) CodeIntel() (CodeIntel, error)
- func (e ExecutionContext) EmitToolOutput(stream, chunk string) error
- func (e ExecutionContext) Memories() (MemoryManager, error)
- func (e ExecutionContext) ResolvePath(access workspace.Access, path string) (workspace.Decision, error)
- func (e ExecutionContext) Skills() (SkillCatalog, error)
- func (e ExecutionContext) Tasks() (TaskManager, error)
- func (e ExecutionContext) WorkflowPhaseOutput() (WorkflowPhaseOutputManager, error)
- func (e ExecutionContext) WorkflowReviewResult() (WorkflowReviewResultManager, error)
- type ExecutionEffect
- type ExecutionIntent
- type ExecutionRequest
- type ExecutionRequestIntrospector
- type ExecutionRuntime
- type GitDiffTool
- type GitShowTool
- type GitStatusTool
- type InputFormat
- type InputKind
- type InvalidArgumentsError
- type LocateTool
- type MemoryDeleteRequest
- type MemoryManager
- type MemoryRecord
- type MemorySaveRequest
- type MemoryTool
- type MkdirTool
- type MutationRange
- type NetworkIntrospector
- type NetworkRequest
- type NormalizedInputKeyProvider
- type ObservedResource
- type ObservedResourceKind
- type OutputChunk
- type OutputEmitter
- type PathIntrospector
- type PathRequest
- type QuestionAsker
- type QuestionRequest
- type QuestionResponse
- type QuestionTool
- type ReadTool
- type RefsTool
- type RenameSymbolTool
- type Result
- type SearchSkillsTool
- type SearchTool
- func (SearchTool) Definition() Definition
- func (SearchTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
- func (SearchTool) NormalizedInputKey(args json.RawMessage) (string, error)
- func (SearchTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
- type SkillCatalog
- type SkillDocument
- type SkillMatch
- type SkillSection
- type SkillTool
- type SymbolsTool
- type TaskBlockRequest
- type TaskCompleteRequest
- type TaskCreateRequest
- type TaskCreateResult
- type TaskManager
- type TaskProgressUpdateRequest
- type TaskRecord
- type TaskReviewRequest
- type TaskReviewTool
- type TaskWorkflowTool
- type TestTool
- type TextMutation
- type Tool
- type TraceTool
- type WebFetchTool
- func (WebFetchTool) Definition() Definition
- func (t WebFetchTool) Execute(ctx context.Context, _ ExecutionContext, args json.RawMessage) (Result, error)
- func (WebFetchTool) NetworkRequests(args json.RawMessage) ([]NetworkRequest, error)
- func (WebFetchTool) NormalizedInputKey(args json.RawMessage) (string, error)
- type WebSearchTool
- type WorkflowPhaseOutputManager
- type WorkflowPhaseOutputRecord
- type WorkflowPhaseOutputRequest
- type WorkflowPhaseOutputTool
- type WorkflowReviewFinding
- type WorkflowReviewResultManager
- type WorkflowReviewResultRecord
- type WorkflowReviewResultRequest
- type WorkflowReviewResultTool
- type WriteTool
Constants ¶
View Source
const ( ReadToolName = "read" DefaultReadLimit = 1000 )
View Source
const ( WorkflowReviewOverallCorrectnessCorrect = "correct" WorkflowReviewOverallCorrectnessIncorrect = "incorrect" )
View Source
const ApplyPatchToolName = "apply_patch"
View Source
const (
BashToolName = "bash"
)
View Source
const CodeActionToolName = "code_action"
View Source
const DefinitionToolName = "definition"
View Source
const DiagnosticsToolName = "diagnostics"
View Source
const LocateToolName = "locate"
View Source
const MCPToolNamePrefix = "mcp_"
View Source
const MCPToolWildcard = "mcp:*"
View Source
const MemoryContentMaxChars = 2000
View Source
const MemoryToolName = "memory"
View Source
const QuestionToolName = "question"
View Source
const RefsToolName = "refs"
View Source
const RenameSymbolToolName = "rename_symbol"
View Source
const SearchSkillsToolName = "search_skills"
View Source
const SearchToolName = "search"
View Source
const SkillToolName = "skill"
View Source
const SymbolsToolName = "symbols"
View Source
const TaskReviewToolName = "task_review"
View Source
const TaskWorkflowToolName = "task_workflow"
View Source
const TestToolName = "test"
View Source
const TraceToolName = "trace"
View Source
const (
WebFetchToolName = "web_fetch"
)
View Source
const (
WebSearchToolName = "web_search"
)
View Source
const WorkflowPhaseOutputToolName = "workflow_phase_output"
View Source
const WorkflowReviewResultToolName = "workflow_review_result"
View Source
const WriteToolName = "write"
Variables ¶
View Source
var ( ErrApplyPatchNoFilesModified = errors.New("patch produced the same file content; nothing changed") ErrApplyPatchHunkNoMatch = errors.New("hunk did not match") ErrApplyPatchHunkAmbiguous = errors.New("hunk matched multiple locations") )
View Source
var ( ErrApplyPatchEmpty = errors.New("patch is empty") ErrApplyPatchMissingBegin = errors.New("patch is missing first line: *** Begin Patch") ErrApplyPatchMissingEnd = errors.New("patch is missing final line: *** End Patch") ErrApplyPatchNoOperations = errors.New("patch must contain at least one file operation") ErrApplyPatchEmptyPath = errors.New("file path is required") ErrApplyPatchAbsolutePath = errors.New("absolute paths are not allowed") ErrApplyPatchParentPath = errors.New("paths must stay inside the workspace") ErrApplyPatchUnknownHeader = errors.New("unknown patch header") ErrApplyPatchEmptyAdd = errors.New("add file operation must include at least one added line") ErrApplyPatchEmptyUpdate = errors.New("update file operation must include a move or at least one changed line") ErrApplyPatchMalformedLine = errors.New("invalid patch syntax") ErrApplyPatchReadLinePrefixes = errors.New("patch lines must not include read output line number prefixes") )
View Source
var ( ErrCodeActionPathRequired = errors.New("path is required") ErrCodeActionStartLineInvalid = errors.New("start_line must be at least 1") ErrCodeActionEndLineInvalid = errors.New("end_line must be at least 1") ErrCodeActionStartCharacterInvalid = errors.New("start_character must be at least 0") ErrCodeActionEndCharacterInvalid = errors.New("end_character must be at least 0") ErrCodeActionRangeInvalid = errors.New("end position must not be before the start position") )
View Source
var ( ErrRuntimeOwnedExecution = errors.New("generic execution is runtime-owned and must be executed by the runtime service") ErrCommandRequired = errors.New("command is required") ErrCommandWorkingDirMissing = errors.New("working_directory must exist") ErrCommandWorkingDirNotDir = errors.New("working_directory must be a directory") ErrShellCommandRequired = errors.New("command is required") )
View Source
var ( ErrDefinitionPathRequired = errors.New("path is required") ErrDefinitionLineRequired = errors.New("line must be >= 1") ErrDefinitionCharacterInvalid = errors.New("provide character >= 0 or symbol") ErrSymbolsQueryRequired = errors.New("query is required") ErrTraceModeRequired = errors.New("mode must be callers, callees, or graph") ErrTraceDepthInvalid = errors.New("depth must be between 1 and 4") ErrTraceMaxNodesInvalid = errors.New("max_nodes must be between 1 and 500") ErrRefsModeInvalid = errors.New("mode must be all, readers, or writers") ErrRefsMaxResultsInvalid = errors.New("max_results must be between 1 and 500") ErrDiagnosticsPathsRequired = errors.New("paths must contain at least one file") ErrDiagnosticsPathBlank = errors.New("paths must not contain blank entries") ErrDiagnosticsPathLimitInvalid = errors.New("paths must contain at most 32 files") )
View Source
var ( ErrLocatePathRequired = errors.New("path is required") ErrLocatePathNotFolder = errors.New("path must be a directory") ErrLocateMaxMatchesInvalid = fmt.Errorf("max_matches must be between 1 and %d", searchMaxMatchesLimit) )
View Source
var ( ErrMemoryActionInvalid = errors.New("action must be save, list, or delete") ErrMemoryContentRequired = errors.New("content is required for save") ErrMemoryIDRequired = errors.New("id is required for delete") )
View Source
var ( ErrMkdirPathRequired = errors.New("path is required") ErrMkdirPathExistsFile = errors.New("path exists and is not a directory") )
View Source
var ( ErrQuestionRequired = errors.New("question is required") ErrQuestionOptionsEmpty = errors.New("options is required") ErrQuestionOptionInvalid = errors.New("options must not contain empty values") )
View Source
var ( ErrReadPathsRequired = errors.New("path or paths is required") ErrReadPathRequired = ErrReadPathsRequired ErrReadPathConflict = errors.New("use either path or paths, not both") ErrReadEmptyPath = errors.New("paths must not contain empty values") ErrReadOffsetInvalid = errors.New("offset must be at least 0") ErrReadLimitInvalid = errors.New("limit must be at least 1") )
View Source
var ( ErrRenameSymbolPathRequired = errors.New("path is required") ErrRenameSymbolLineInvalid = errors.New("line must be at least 1") ErrRenameSymbolCharacterInvalid = errors.New("character must be at least 0") ErrRenameSymbolNewNameRequired = errors.New("new_name is required") )
View Source
var ( ErrSearchQueryRequired = errors.New("query is required") ErrSearchPathRequired = errors.New("path is required") ErrSearchModeInvalid = errors.New("mode must be lexical or hybrid") ErrSearchMaxMatchesInvalid = fmt.Errorf("max_matches must be between 1 and %d", searchMaxMatchesLimit) )
View Source
var ( ErrTaskActionRequired = errors.New("action is required") ErrTaskInputIDRequired = errors.New("task_id is required") ErrTaskParentInputInvalid = errors.New("parent_task_id must reference another task") ErrTaskInputTitleRequired = errors.New("title is required") ErrTaskInputUpdateRequired = errors.New("status, progress, or notes is required") ErrTaskStatusInvalid = errors.New("status must be pending or in_progress when set") ErrTaskCompleteActionOnly = errors.New("use action complete to mark a task done; status only accepts pending or in_progress") ErrTaskSummaryRequired = errors.New("summary is required") ErrTaskBlockReasonRequired = errors.New("block_reason is required") ErrTaskReviewStatusInvalid = errors.New("review_status must be pass, concern, fail, or accepted") ErrTaskReviewSummaryNeeded = errors.New("review_summary is required") ErrTaskWorkflowFieldUnsupported = errors.New("field is not supported for this task_workflow action") ErrTaskReviewFieldUnsupported = errors.New("field is not supported for this task_review action") )
View Source
var ( ErrTestPathRequired = errors.New("path must not be empty") ErrTestTimeoutInvalid = fmt.Errorf("timeout must be between %d and %d milliseconds; timeout uses milliseconds, so 90000 means 90 seconds and 600 means 0.6 seconds", testMinTimeoutMS, testMaxTimeoutMS) ErrTestFilterUnsupported = errors.New("filter is not supported for the selected test framework") ErrTestPathTargetUnsupported = errors.New("path targeting is not supported for the selected test framework") ErrTestWatchModeUnsupported = errors.New("test only supports one-shot commands, not watcher or server modes") )
View Source
var ( ErrWebFetchURLRequired = errors.New("url is required") ErrWebFetchURLInvalid = errors.New("url must be a valid http or https URL") ErrWebFetchURLSearch = errors.New("url must be a direct page URL, not a search engine") ErrWebFetchMethodInvalid = errors.New(`method must be one of "GET", "POST", "PUT", "PATCH", "DELETE", or "HEAD"`) ErrWebFetchFormatInvalid = errors.New(`format must be one of "auto", "markdown", "text", "json", or "raw"`) ErrWebFetchBodyMethod = errors.New("body is only supported for POST, PUT, PATCH, or DELETE") ErrWebFetchBinaryResponse = errors.New("response content type is not supported for web_fetch") ErrWebFetchBodyTooLarge = errors.New("response body exceeds the maximum size") ErrWebFetchCrossHostRedir = errors.New("redirect to a different host is not allowed") )
View Source
var ( ErrWebSearchQueryRequired = errors.New("query is required") ErrWebSearchLimitInvalid = fmt.Errorf("limit must be between 1 and %d", webSearchMaxLimit) ErrWebSearchFreshnessDaysInvalid = errors.New("freshness_days must be greater than zero") ErrWebSearchServiceRequired = errors.New("web search service is required") ErrWebSearchProviderRequired = errors.New("web search provider is required") ErrWebSearchProviderInvalid = errors.New("provider must not be blank") )
View Source
var ( ErrWorkflowReviewPassRequired = errors.New("review_pass is required") ErrWorkflowReviewOverallCorrectnessInvalid = errors.New("overall_correctness must be correct or incorrect") ErrWorkflowReviewOverallSummaryRequired = errors.New("overall_summary is required") ErrWorkflowReviewFindingSeverityInvalid = errors.New("finding severity must be P0, P1, P2, or P3") ErrWorkflowReviewFindingPathRequired = errors.New("finding path is required") ErrWorkflowReviewFindingLineInvalid = errors.New("finding line must be > 0") ErrWorkflowReviewFindingTitleRequired = errors.New("finding title is required") ErrWorkflowReviewFindingExplanationRequired = errors.New("finding explanation is required") )
View Source
var ( ErrWritePathRequired = errors.New("path is required") ErrWriteContentRequired = errors.New("content is required") )
View Source
var (
ErrBashCommandRequired = errors.New("cmd is required")
)
View Source
var ErrCodeIntelRequired = errors.New("code intel is required")
View Source
var ErrGitDiffStagedRequired = errors.New("staged is required")
View Source
var ErrGitRepositoryRequired = errors.New("workspace directory is not inside a git repository")
View Source
var ErrGitShowRevisionRequired = errors.New("rev is required")
View Source
var ErrGitStatusNoArguments = errors.New("git_status takes no fields")
View Source
var ErrInvalidArguments = errors.New("tool arguments are invalid")
View Source
var ErrMemoryManagerRequired = errors.New("memory manager is required")
View Source
var ErrQuestionAskerRequired = errors.New("question asker is required")
View Source
var ErrSkillCatalogRequired = errors.New("skill catalog is required")
View Source
var ErrStructuredResultInvalid = errors.New("structured result must be valid JSON")
View Source
var ErrTaskManagerRequired = errors.New("task manager is required")
View Source
var ErrTaskReviewActionInvalid = errors.New("action must be list or review")
View Source
var ErrTaskWorkflowActionInvalid = errors.New("action must be list, create, update, block, or complete")
View Source
var ErrTestFrameworkNotDetected = errors.New("could not detect a supported test framework from the selected path")
View Source
var ErrWorkflowPhaseOutputFieldsRequired = errors.New("fields must include at least one non-empty value")
View Source
var ErrWorkflowPhaseOutputManagerRequired = errors.New("workflow phase output manager is required")
View Source
var ErrWorkflowReviewResultManagerRequired = errors.New("workflow review result manager is required")
View Source
var ErrWorkspaceRequired = errors.New("workspace scope is required")
Functions ¶
func CurrentObservedResourceState ¶
func CurrentObservedResourceState(kind ObservedResourceKind, path string) (string, bool, error)
func CurrentObservedResourceVersion ¶
func CurrentObservedResourceVersion(kind ObservedResourceKind, path string) (string, bool, error)
func DecodeArgs ¶
func DecodeArgs(toolName string, args json.RawMessage, dst any) error
func DecodeArgsStrict ¶
func DefaultErrorText ¶
func FormatDiagnostics ¶
func FormatDiagnostics(files []CodeIntelFileDiagnostics) string
func InvalidArguments ¶
func IsMCPToolName ¶
func MCPToolName ¶
func MCPToolNameComponent ¶
func MarshalStructuredResult ¶
func MarshalStructuredResult(value any) (json.RawMessage, error)
func NewCodeIntelNoticeError ¶
func NewCodeIntelNoticeError(kind CodeIntelNoticeKind, message string) error
func NormalizeArgumentError ¶
func NormalizeSearchArguments ¶
func NormalizeSearchArguments(args json.RawMessage, service *searchsvc.Service) (json.RawMessage, error)
func NormalizeWebSearchArguments ¶
func NormalizeWebSearchArguments(args json.RawMessage, service *websearchsvc.Service) (json.RawMessage, error)
func PolicyListContainsTool ¶
func ReadObservedVersion ¶
ReadObservedVersion returns the same full-file content token that the read tool records in Result.ObservedResources for successful text-file reads.
func ToolPatternMatches ¶
func WithFileMutationLock ¶
func WorkspaceEditHasChanges ¶
func WorkspaceEditHasChanges(edit *lsp.WorkspaceEdit) bool
Types ¶
type ApplyPatch ¶
type ApplyPatch struct {
Operations []ApplyPatchOperation
}
func ParseApplyPatch ¶
func ParseApplyPatch(patch string) (ApplyPatch, error)
type ApplyPatchChangedFile ¶
type ApplyPatchOperation ¶
type ApplyPatchOperation struct {
Kind ApplyPatchOperationKind
Path string
MovePath string
Lines []string
Hunks []ApplyPatchUpdateHunk
}
type ApplyPatchOperationKind ¶
type ApplyPatchOperationKind string
const ( ApplyPatchOperationAdd ApplyPatchOperationKind = "add" ApplyPatchOperationDelete ApplyPatchOperationKind = "delete" ApplyPatchOperationUpdate ApplyPatchOperationKind = "update" )
type ApplyPatchStructuredResult ¶
type ApplyPatchStructuredResult struct {
ChangedFiles []ApplyPatchChangedFile `json:"changed_files"`
}
type ApplyPatchTool ¶
type ApplyPatchTool struct{}
func NewApplyPatchTool ¶
func NewApplyPatchTool() ApplyPatchTool
func (ApplyPatchTool) Definition ¶
func (ApplyPatchTool) Definition() Definition
func (ApplyPatchTool) Execute ¶
func (ApplyPatchTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (ApplyPatchTool) PathRequests ¶
func (ApplyPatchTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type ApplyPatchUpdateHunk ¶
type BashTool ¶
type BashTool struct{}
func NewBashTool ¶
func NewBashTool() BashTool
func (BashTool) Definition ¶
func (BashTool) Definition() Definition
func (BashTool) Execute ¶
func (BashTool) Execute(context.Context, ExecutionContext, json.RawMessage) (Result, error)
func (BashTool) ExecutionRequest ¶
func (BashTool) ExecutionRequest(workspaceRoot string, args json.RawMessage) (ExecutionRequest, bool, error)
type BeforeFileMutation ¶
type CodeActionTool ¶
type CodeActionTool struct{}
func NewCodeActionTool ¶
func NewCodeActionTool() CodeActionTool
func (CodeActionTool) Definition ¶
func (CodeActionTool) Definition() Definition
func (CodeActionTool) Execute ¶
func (CodeActionTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (CodeActionTool) PathRequests ¶
func (CodeActionTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type CodeIntel ¶
type CodeIntel interface {
Definition(ctx context.Context, filePath string, line, character int) ([]CodeIntelLocation, error)
Diagnostics(ctx context.Context, filePaths []string) ([]CodeIntelFileDiagnostics, error)
Symbols(ctx context.Context, query string) (CodeIntelSymbolsResult, error)
Trace(ctx context.Context, request CodeIntelTraceRequest) (CodeIntelTraceResult, error)
Refs(ctx context.Context, request CodeIntelRefsRequest) (CodeIntelRefsResult, error)
RenameSymbol(ctx context.Context, request CodeIntelRenameRequest) (CodeIntelMutationSummary, error)
ApplyCodeAction(ctx context.Context, request CodeIntelCodeActionRequest) (CodeIntelCodeActionResult, error)
}
type CodeIntelCodeActionResult ¶
type CodeIntelCodeActionResult struct {
Title string `json:"title,omitempty"`
Summary CodeIntelMutationSummary `json:"summary,omitempty"`
}
type CodeIntelDiagnostic ¶
type CodeIntelFileDiagnostics ¶
type CodeIntelFileDiagnostics struct {
Path string `json:"path"`
Error string `json:"error,omitempty"`
Diagnostics []CodeIntelDiagnostic `json:"diagnostics,omitempty"`
}
type CodeIntelLocation ¶
type CodeIntelNotice ¶
type CodeIntelNotice struct {
Kind CodeIntelNoticeKind `json:"kind,omitempty"`
Message string `json:"message,omitempty"`
}
func AsCodeIntelNotice ¶
func AsCodeIntelNotice(err error) (*CodeIntelNotice, bool)
type CodeIntelNoticeError ¶
type CodeIntelNoticeError struct {
Notice CodeIntelNotice
}
func (*CodeIntelNoticeError) Error ¶
func (e *CodeIntelNoticeError) Error() string
type CodeIntelNoticeKind ¶
type CodeIntelNoticeKind string
const ( CodeIntelNoticeKindUnsupported CodeIntelNoticeKind = "unsupported" )
type CodeIntelReference ¶
type CodeIntelReference struct {
Kind CodeIntelReferenceKind `json:"kind,omitempty"`
Path string `json:"path,omitempty"`
Line int `json:"line,omitempty"`
Character int `json:"character,omitempty"`
Snippet string `json:"snippet,omitempty"`
}
type CodeIntelReferenceKind ¶
type CodeIntelReferenceKind string
const ( CodeIntelReferenceKindRead CodeIntelReferenceKind = "read" CodeIntelReferenceKindWrite CodeIntelReferenceKind = "write" CodeIntelReferenceKindReference CodeIntelReferenceKind = "reference" )
type CodeIntelRefsMode ¶
type CodeIntelRefsMode string
const ( CodeIntelRefsModeAll CodeIntelRefsMode = "all" CodeIntelRefsModeReaders CodeIntelRefsMode = "readers" CodeIntelRefsModeWriters CodeIntelRefsMode = "writers" )
type CodeIntelRefsRequest ¶
type CodeIntelRefsResult ¶
type CodeIntelRefsResult struct {
Supported bool `json:"supported"`
Found bool `json:"found"`
Notice *CodeIntelNotice `json:"notice,omitempty"`
Target CodeIntelTraceNode `json:"target,omitempty"`
References []CodeIntelReference `json:"references,omitempty"`
Truncated bool `json:"truncated,omitempty"`
ClassificationSupported bool `json:"classification_supported,omitempty"`
ClassificationIncomplete bool `json:"classification_incomplete,omitempty"`
}
type CodeIntelRenameRequest ¶
type CodeIntelSymbol ¶
type CodeIntelSymbolsResult ¶
type CodeIntelSymbolsResult struct {
Symbols []CodeIntelSymbol `json:"symbols,omitempty"`
Notice *CodeIntelNotice `json:"notice,omitempty"`
}
type CodeIntelTraceEdge ¶
type CodeIntelTraceMode ¶
type CodeIntelTraceMode string
const ( CodeIntelTraceModeCallers CodeIntelTraceMode = "callers" CodeIntelTraceModeCallees CodeIntelTraceMode = "callees" CodeIntelTraceModeGraph CodeIntelTraceMode = "graph" )
type CodeIntelTraceNode ¶
type CodeIntelTraceRequest ¶
type CodeIntelTraceResult ¶
type CodeIntelTraceResult struct {
Supported bool `json:"supported"`
Found bool `json:"found"`
Notice *CodeIntelNotice `json:"notice,omitempty"`
RootID string `json:"root_id,omitempty"`
Nodes []CodeIntelTraceNode `json:"nodes,omitempty"`
Edges []CodeIntelTraceEdge `json:"edges,omitempty"`
Truncated bool `json:"truncated,omitempty"`
}
type Definition ¶
type Definition struct {
Name string
Description string
ProviderDescription string
InputKind InputKind
InputSchema json.RawMessage
InputFormat *InputFormat
ProviderInputSchema json.RawMessage
ArgumentExamples []string
RequiresWorkspace bool
// ProviderRichGuidance keeps schema descriptions and a compact example in the
// provider-facing tool surface for tools where precise usage materially
// reduces bad calls.
ProviderRichGuidance bool
// ParallelSafe means Execute is read-only, does not use direct permission,
// network, or execution append paths, and may run concurrently while the
// runtime commits durable tool events later in provider order.
ParallelSafe bool
}
func (Definition) InputKindOrDefault ¶
func (d Definition) InputKindOrDefault() InputKind
func (Definition) ProviderDescriptionText ¶
func (d Definition) ProviderDescriptionText() string
type DefinitionTool ¶
type DefinitionTool struct{}
func NewDefinitionTool ¶
func NewDefinitionTool() DefinitionTool
func (DefinitionTool) Definition ¶
func (DefinitionTool) Definition() Definition
func (DefinitionTool) Execute ¶
func (DefinitionTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (DefinitionTool) PathRequests ¶
func (DefinitionTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type DiagnosticsTool ¶
type DiagnosticsTool struct{}
func NewDiagnosticsTool ¶
func NewDiagnosticsTool() DiagnosticsTool
func (DiagnosticsTool) Definition ¶
func (DiagnosticsTool) Definition() Definition
func (DiagnosticsTool) Execute ¶
func (DiagnosticsTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (DiagnosticsTool) PathRequests ¶
func (DiagnosticsTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type ExecutionContext ¶
type ExecutionContext struct {
SessionID string
Workspace *workspace.Scope
Search *searchsvc.Service
WebSearch *websearchsvc.Service
OutputEmitter OutputEmitter
BeforeMutation BeforeFileMutation
QuestionAsker QuestionAsker
TaskManager TaskManager
CodeIntelAPI CodeIntel
MemoryManager MemoryManager
SkillCatalog SkillCatalog
WorkflowOutput WorkflowPhaseOutputManager
WorkflowReview WorkflowReviewResultManager
}
func (ExecutionContext) AskQuestion ¶
func (e ExecutionContext) AskQuestion(request QuestionRequest) (QuestionResponse, error)
func (ExecutionContext) CodeIntel ¶
func (e ExecutionContext) CodeIntel() (CodeIntel, error)
func (ExecutionContext) EmitToolOutput ¶
func (e ExecutionContext) EmitToolOutput(stream, chunk string) error
func (ExecutionContext) Memories ¶
func (e ExecutionContext) Memories() (MemoryManager, error)
func (ExecutionContext) ResolvePath ¶
func (ExecutionContext) Skills ¶
func (e ExecutionContext) Skills() (SkillCatalog, error)
func (ExecutionContext) Tasks ¶
func (e ExecutionContext) Tasks() (TaskManager, error)
func (ExecutionContext) WorkflowPhaseOutput ¶ added in v0.5.0
func (e ExecutionContext) WorkflowPhaseOutput() (WorkflowPhaseOutputManager, error)
func (ExecutionContext) WorkflowReviewResult ¶ added in v0.5.0
func (e ExecutionContext) WorkflowReviewResult() (WorkflowReviewResultManager, error)
type ExecutionEffect ¶
type ExecutionEffect string
const ( ExecutionEffectUnknown ExecutionEffect = "unknown" ExecutionEffectRead ExecutionEffect = "read" ExecutionEffectWrite ExecutionEffect = "write" ExecutionEffectNetwork ExecutionEffect = "network" ExecutionEffectProcess ExecutionEffect = "process" )
func BashArgumentsExecutionEffect ¶
func BashArgumentsExecutionEffect(args json.RawMessage) (ExecutionEffect, error)
type ExecutionIntent ¶
type ExecutionIntent string
const ( ExecutionIntentUnknown ExecutionIntent = "unknown" ExecutionIntentOneShot ExecutionIntent = "one_shot" ExecutionIntentWatcher ExecutionIntent = "watcher" ExecutionIntentServer ExecutionIntent = "server" )
type ExecutionRequest ¶
type ExecutionRequest struct {
Kind string
Preview string
WorkingDirectory string
Command []string
ShellCommand string
PathRequests []PathRequest
OpaquePathReason string
NetworkTargets []string
Intent ExecutionIntent
IntentCommand string
Effect ExecutionEffect
ReadyPatterns []string
TimeoutMS int
LoginShell bool
ShellProgram string
TTY bool
YieldTimeMS int
MaxOutputTokens int
PrefixRule []string
}
type ExecutionRequestIntrospector ¶
type ExecutionRequestIntrospector interface {
ExecutionRequest(workspaceRoot string, args json.RawMessage) (ExecutionRequest, bool, error)
}
type ExecutionRuntime ¶
type GitDiffTool ¶
type GitDiffTool struct{}
func NewGitDiffTool ¶
func NewGitDiffTool() GitDiffTool
func (GitDiffTool) Definition ¶
func (GitDiffTool) Definition() Definition
func (GitDiffTool) Execute ¶
func (GitDiffTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type GitShowTool ¶
type GitShowTool struct{}
func NewGitShowTool ¶
func NewGitShowTool() GitShowTool
func (GitShowTool) Definition ¶
func (GitShowTool) Definition() Definition
func (GitShowTool) Execute ¶
func (GitShowTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type GitStatusTool ¶
type GitStatusTool struct{}
func NewGitStatusTool ¶
func NewGitStatusTool() GitStatusTool
func (GitStatusTool) Definition ¶
func (GitStatusTool) Definition() Definition
func (GitStatusTool) Execute ¶
func (GitStatusTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type InputFormat ¶
type InvalidArgumentsError ¶
func (*InvalidArgumentsError) Error ¶
func (e *InvalidArgumentsError) Error() string
func (*InvalidArgumentsError) Is ¶
func (e *InvalidArgumentsError) Is(target error) bool
func (*InvalidArgumentsError) Unwrap ¶
func (e *InvalidArgumentsError) Unwrap() error
type LocateTool ¶
type LocateTool struct{}
func NewLocateTool ¶
func NewLocateTool() LocateTool
func (LocateTool) Definition ¶
func (LocateTool) Definition() Definition
func (LocateTool) Execute ¶
func (LocateTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (LocateTool) NormalizedInputKey ¶
func (LocateTool) NormalizedInputKey(args json.RawMessage) (string, error)
func (LocateTool) PathRequests ¶
func (LocateTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type MemoryDeleteRequest ¶
type MemoryDeleteRequest struct {
ID string
}
type MemoryManager ¶
type MemoryManager interface {
SaveMemory(MemorySaveRequest) (MemoryRecord, error)
ListMemories() ([]MemoryRecord, error)
DeleteMemory(MemoryDeleteRequest) error
}
type MemoryRecord ¶
type MemorySaveRequest ¶
type MemorySaveRequest struct {
Content string
}
type MemoryTool ¶
type MemoryTool struct{}
func NewMemoryTool ¶
func NewMemoryTool() MemoryTool
func (MemoryTool) Definition ¶
func (MemoryTool) Definition() Definition
func (MemoryTool) Execute ¶
func (MemoryTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type MkdirTool ¶
type MkdirTool struct{}
func NewMkdirTool ¶
func NewMkdirTool() MkdirTool
func (MkdirTool) Definition ¶
func (MkdirTool) Definition() Definition
func (MkdirTool) Execute ¶
func (MkdirTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (MkdirTool) PathRequests ¶
func (MkdirTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type MutationRange ¶
type NetworkIntrospector ¶
type NetworkIntrospector interface {
NetworkRequests(json.RawMessage) ([]NetworkRequest, error)
}
type NetworkRequest ¶
type NormalizedInputKeyProvider ¶
type NormalizedInputKeyProvider interface {
NormalizedInputKey(json.RawMessage) (string, error)
}
type ObservedResource ¶
type ObservedResource struct {
Kind ObservedResourceKind
Path string
Version string
State string
Complete bool
StartLine int
EndLine int
TotalLines int
}
func ObserveDirEntriesResource ¶
func ObserveDirEntriesResource(path string) (ObservedResource, bool)
func ReadDirWithObservedResource ¶
func ReadDirWithObservedResource(path string) ([]os.DirEntry, *ObservedResource, error)
type ObservedResourceKind ¶
type ObservedResourceKind string
const ( ObservedResourceFileContent ObservedResourceKind = "file_content" ObservedResourceDirEntries ObservedResourceKind = "dir_entries" )
type OutputChunk ¶
type OutputEmitter ¶
type OutputEmitter func(OutputChunk) error
type PathIntrospector ¶
type PathIntrospector interface {
PathRequests(json.RawMessage) ([]PathRequest, error)
}
type QuestionAsker ¶
type QuestionAsker func(QuestionRequest) (QuestionResponse, error)
type QuestionRequest ¶
type QuestionResponse ¶
type QuestionTool ¶
type QuestionTool struct{}
func NewQuestionTool ¶
func NewQuestionTool() QuestionTool
func (QuestionTool) Definition ¶
func (QuestionTool) Definition() Definition
func (QuestionTool) Execute ¶
func (QuestionTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (QuestionTool) NormalizedInputKey ¶
func (QuestionTool) NormalizedInputKey(args json.RawMessage) (string, error)
type ReadTool ¶
type ReadTool struct{}
func NewReadTool ¶
func NewReadTool() ReadTool
func (ReadTool) Definition ¶
func (ReadTool) Definition() Definition
func (ReadTool) Execute ¶
func (ReadTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (ReadTool) NormalizedInputKey ¶
func (ReadTool) NormalizedInputKey(args json.RawMessage) (string, error)
func (ReadTool) PathRequests ¶
func (ReadTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type RefsTool ¶
type RefsTool struct{}
func NewRefsTool ¶
func NewRefsTool() RefsTool
func (RefsTool) Definition ¶
func (RefsTool) Definition() Definition
func (RefsTool) Execute ¶
func (RefsTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (RefsTool) PathRequests ¶
func (RefsTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type RenameSymbolTool ¶
type RenameSymbolTool struct{}
func NewRenameSymbolTool ¶
func NewRenameSymbolTool() RenameSymbolTool
func (RenameSymbolTool) Definition ¶
func (RenameSymbolTool) Definition() Definition
func (RenameSymbolTool) Execute ¶
func (RenameSymbolTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (RenameSymbolTool) PathRequests ¶
func (RenameSymbolTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type Result ¶
type Result struct {
Output string
Error string
StructuredResult json.RawMessage
Execution *ExecutionRuntime
PendingQuestionID string
MutationRanges []MutationRange
TextMutations []TextMutation
ObservedResources []ObservedResource
}
type SearchSkillsTool ¶
type SearchSkillsTool struct{}
func NewSearchSkillsTool ¶
func NewSearchSkillsTool() SearchSkillsTool
func (SearchSkillsTool) Definition ¶
func (SearchSkillsTool) Definition() Definition
func (SearchSkillsTool) Execute ¶
func (SearchSkillsTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type SearchTool ¶
type SearchTool struct{}
func NewSearchTool ¶
func NewSearchTool() SearchTool
func (SearchTool) Definition ¶
func (SearchTool) Definition() Definition
func (SearchTool) Execute ¶
func (SearchTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (SearchTool) NormalizedInputKey ¶
func (SearchTool) NormalizedInputKey(args json.RawMessage) (string, error)
func (SearchTool) PathRequests ¶
func (SearchTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type SkillCatalog ¶
type SkillCatalog interface {
SearchSkills(query string, limit int) ([]SkillMatch, error)
LoadSkill(id string) (SkillDocument, error)
}
type SkillDocument ¶
type SkillDocument struct {
ID string `json:"id"`
Description string `json:"description,omitempty"`
WhenToUse string `json:"when_to_use,omitempty"`
Arguments []string `json:"arguments,omitempty"`
Source string `json:"source,omitempty"`
Path string `json:"path,omitempty"`
Content string `json:"content,omitempty"`
Sections []SkillSection `json:"sections,omitempty"`
}
type SkillMatch ¶
type SkillMatch struct {
ID string `json:"id"`
Description string `json:"description,omitempty"`
WhenToUse string `json:"when_to_use,omitempty"`
Arguments []string `json:"arguments,omitempty"`
Source string `json:"source,omitempty"`
Path string `json:"path,omitempty"`
Reasons []string `json:"reasons,omitempty"`
}
type SkillSection ¶
type SkillTool ¶
type SkillTool struct{}
func NewSkillTool ¶
func NewSkillTool() SkillTool
func (SkillTool) Definition ¶
func (SkillTool) Definition() Definition
func (SkillTool) Execute ¶
func (SkillTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type SymbolsTool ¶
type SymbolsTool struct{}
func NewSymbolsTool ¶
func NewSymbolsTool() SymbolsTool
func (SymbolsTool) Definition ¶
func (SymbolsTool) Definition() Definition
func (SymbolsTool) Execute ¶
func (SymbolsTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type TaskBlockRequest ¶
type TaskCompleteRequest ¶
type TaskCreateRequest ¶
type TaskCreateResult ¶
type TaskCreateResult struct {
Task TaskRecord `json:"task"`
ParentTask *TaskRecord `json:"parent_task,omitempty"`
Message string `json:"message,omitempty"`
}
type TaskManager ¶
type TaskManager interface {
ListTasks() ([]TaskRecord, error)
CreateTask(TaskCreateRequest) (TaskCreateResult, error)
UpdateTaskProgress(TaskProgressUpdateRequest) (TaskRecord, error)
BlockTask(TaskBlockRequest) (TaskRecord, error)
CompleteTask(TaskCompleteRequest) (TaskRecord, error)
ReviewTask(TaskReviewRequest) (TaskRecord, error)
}
type TaskRecord ¶
type TaskRecord struct {
TaskID string `json:"task_id"`
ParentTaskID string `json:"parent_task_id,omitempty"`
WorkflowID string `json:"workflow_id,omitempty"`
WorkflowPhaseID string `json:"workflow_phase_id,omitempty"`
Title string `json:"title"`
Kind string `json:"kind,omitempty"`
Status string `json:"status"`
Notes string `json:"notes,omitempty"`
Progress string `json:"progress,omitempty"`
BlockReason string `json:"block_reason,omitempty"`
ReviewStatus string `json:"review_status,omitempty"`
ReviewSummary string `json:"review_summary,omitempty"`
}
type TaskReviewRequest ¶
type TaskReviewTool ¶
type TaskReviewTool struct{}
func NewTaskReviewTool ¶
func NewTaskReviewTool() TaskReviewTool
func (TaskReviewTool) Definition ¶
func (TaskReviewTool) Definition() Definition
func (TaskReviewTool) Execute ¶
func (TaskReviewTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (TaskReviewTool) NormalizedInputKey ¶
func (TaskReviewTool) NormalizedInputKey(args json.RawMessage) (string, error)
type TaskWorkflowTool ¶
type TaskWorkflowTool struct{}
func NewTaskWorkflowTool ¶
func NewTaskWorkflowTool() TaskWorkflowTool
func (TaskWorkflowTool) Definition ¶
func (TaskWorkflowTool) Definition() Definition
func (TaskWorkflowTool) Execute ¶
func (TaskWorkflowTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (TaskWorkflowTool) NormalizedInputKey ¶
func (TaskWorkflowTool) NormalizedInputKey(args json.RawMessage) (string, error)
type TestTool ¶
type TestTool struct{}
func NewTestTool ¶
func NewTestTool() TestTool
func (TestTool) Definition ¶
func (TestTool) Definition() Definition
func (TestTool) Execute ¶
func (TestTool) Execute(context.Context, ExecutionContext, json.RawMessage) (Result, error)
func (TestTool) ExecutionRequest ¶
func (TestTool) ExecutionRequest(workspaceRoot string, args json.RawMessage) (ExecutionRequest, bool, error)
type TextMutation ¶
type Tool ¶
type Tool interface {
Definition() Definition
Execute(context.Context, ExecutionContext, json.RawMessage) (Result, error)
}
func AllBuiltInTools ¶
func AllBuiltInTools() []Tool
AllBuiltInTools returns the full built-in tool catalog, including config-gated tools that are not always registered in the runtime surface. Use this for schema and argument-metadata lookups, not runtime registration.
func DefaultRuntimeTools ¶
func DefaultRuntimeTools() []Tool
DefaultRuntimeTools is the baseline production tool surface exposed by kodacode before any config-gated runtime tools are appended.
type TraceTool ¶
type TraceTool struct{}
func NewTraceTool ¶
func NewTraceTool() TraceTool
func (TraceTool) Definition ¶
func (TraceTool) Definition() Definition
func (TraceTool) Execute ¶
func (TraceTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (TraceTool) PathRequests ¶
func (TraceTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
type WebFetchTool ¶
type WebFetchTool struct {
// contains filtered or unexported fields
}
func NewWebFetchTool ¶
func NewWebFetchTool() WebFetchTool
func (WebFetchTool) Definition ¶
func (WebFetchTool) Definition() Definition
func (WebFetchTool) Execute ¶
func (t WebFetchTool) Execute(ctx context.Context, _ ExecutionContext, args json.RawMessage) (Result, error)
func (WebFetchTool) NetworkRequests ¶
func (WebFetchTool) NetworkRequests(args json.RawMessage) ([]NetworkRequest, error)
func (WebFetchTool) NormalizedInputKey ¶
func (WebFetchTool) NormalizedInputKey(args json.RawMessage) (string, error)
type WebSearchTool ¶
type WebSearchTool struct{}
func NewWebSearchTool ¶
func NewWebSearchTool() WebSearchTool
func (WebSearchTool) Definition ¶
func (WebSearchTool) Definition() Definition
func (WebSearchTool) Execute ¶
func (WebSearchTool) Execute(ctx context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (WebSearchTool) NormalizedInputKey ¶
func (WebSearchTool) NormalizedInputKey(args json.RawMessage) (string, error)
type WorkflowPhaseOutputManager ¶ added in v0.5.0
type WorkflowPhaseOutputManager interface {
RecordWorkflowPhaseOutput(WorkflowPhaseOutputRequest) (WorkflowPhaseOutputRecord, error)
}
type WorkflowPhaseOutputRecord ¶ added in v0.5.0
type WorkflowPhaseOutputRequest ¶ added in v0.5.0
type WorkflowPhaseOutputTool ¶ added in v0.5.0
type WorkflowPhaseOutputTool struct{}
func NewWorkflowPhaseOutputTool ¶ added in v0.5.0
func NewWorkflowPhaseOutputTool() WorkflowPhaseOutputTool
func (WorkflowPhaseOutputTool) Definition ¶ added in v0.5.0
func (WorkflowPhaseOutputTool) Definition() Definition
func (WorkflowPhaseOutputTool) Execute ¶ added in v0.5.0
func (WorkflowPhaseOutputTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type WorkflowReviewFinding ¶ added in v0.5.0
type WorkflowReviewResultManager ¶ added in v0.5.0
type WorkflowReviewResultManager interface {
RecordWorkflowReviewResult(WorkflowReviewResultRequest) (WorkflowReviewResultRecord, error)
}
type WorkflowReviewResultRecord ¶ added in v0.5.0
type WorkflowReviewResultRequest ¶ added in v0.5.0
type WorkflowReviewResultRequest struct {
ReviewPass string
Findings []WorkflowReviewFinding
OverallCorrectness string
OverallSummary string
}
type WorkflowReviewResultTool ¶ added in v0.5.0
type WorkflowReviewResultTool struct{}
func NewWorkflowReviewResultTool ¶ added in v0.5.0
func NewWorkflowReviewResultTool() WorkflowReviewResultTool
func (WorkflowReviewResultTool) Definition ¶ added in v0.5.0
func (WorkflowReviewResultTool) Definition() Definition
func (WorkflowReviewResultTool) Execute ¶ added in v0.5.0
func (WorkflowReviewResultTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
type WriteTool ¶
type WriteTool struct{}
func NewWriteTool ¶
func NewWriteTool() WriteTool
func (WriteTool) Definition ¶
func (WriteTool) Definition() Definition
func (WriteTool) Execute ¶
func (WriteTool) Execute(_ context.Context, ectx ExecutionContext, args json.RawMessage) (Result, error)
func (WriteTool) PathRequests ¶
func (WriteTool) PathRequests(args json.RawMessage) ([]PathRequest, error)
Source Files
¶
- apply_patch.go
- apply_patch_parse.go
- apply_patch_validate.go
- bash.go
- bash_effect.go
- bash_intent.go
- bash_network.go
- bash_paths.go
- bash_paths_literal.go
- bash_paths_resolve.go
- bash_paths_visit.go
- bash_paths_workdir.go
- code_action.go
- codeintel.go
- codeintel_format.go
- codeintel_position.go
- command_common.go
- defaults.go
- definition.go
- definition_fallback.go
- definition_input.go
- diagnostics.go
- doc.go
- execution_runtime.go
- file_mode.go
- file_mutation.go
- git_diff.go
- git_review.go
- git_show.go
- git_status.go
- input_error.go
- locate.go
- mcp.go
- memory.go
- memory_input.go
- memory_manager.go
- mkdir.go
- observed_resource.go
- policy_match.go
- question.go
- read.go
- read_execute.go
- read_format.go
- read_parse.go
- read_render.go
- read_scan.go
- read_version.go
- read_version_state_linux.go
- refs.go
- rename_symbol.go
- reuse_key.go
- search.go
- search_input.go
- search_skills.go
- skill.go
- skill_catalog.go
- skill_sections.go
- structured_result.go
- symbols.go
- task_actions.go
- task_manager.go
- task_output.go
- task_review.go
- task_review_input.go
- task_workflow.go
- task_workflow_input.go
- test.go
- test_command.go
- test_detect.go
- test_input.go
- tool.go
- trace.go
- web_fetch.go
- web_fetch_format.go
- web_search.go
- workflow_phase_output.go
- workflow_review_result.go
- write.go
Click to show internal directories.
Click to hide internal directories.