Documentation
¶
Overview ¶
Copyright 2026 Teradata
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package tools provides tool types compatible with Crush's interface.
Index ¶
- Constants
- type AgenticFetchParams
- type AgenticFetchPermissionsParams
- type BashParams
- type BashPermissionsParams
- type BashResponseMetadata
- type DownloadParams
- type DownloadPermissionsParams
- type EditParams
- type EditPermissionsParams
- type EditResponseMetadata
- type FetchParams
- type FetchPermissionsParams
- type GlobParams
- type GrepParams
- type JobKillParams
- type JobKillResponseMetadata
- type JobOutputParams
- type JobOutputResponseMetadata
- type LSParams
- type LSPermissionsParams
- type MultiEditParams
- type MultiEditPermissionsParams
- type MultiEditResponseMetadata
- type SourcegraphParams
- type TodosParams
- type TodosResponseMetadata
- type ViewParams
- type ViewPermissionsParams
- type ViewResponseMetadata
- type WebFetchParams
- type WebSearchParams
- type WriteParams
- type WritePermissionsParams
Constants ¶
const ( AgenticFetchToolName = "agentic_fetch" EditToolName = "edit" WriteToolName = "write" MultiEditToolName = "multi_edit" BashToolName = "bash" DownloadToolName = "download" ReadToolName = "read" FetchToolName = "fetch" ViewToolName = "view" LSToolName = "ls" JobOutputToolName = "job_output" JobKillToolName = "job_kill" WebFetchToolName = "web_fetch" WebSearchToolName = "web_search" GlobToolName = "glob" GrepToolName = "grep" SourcegraphToolName = "sourcegraph" DiagnosticsToolName = "diagnostics" TodosToolName = "todos" )
Tool name constants.
const BashNoOutput = "(no output)"
BashNoOutput is the message shown when there's no output.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgenticFetchParams ¶
AgenticFetchParams contains agentic fetch parameters.
type AgenticFetchPermissionsParams ¶
AgenticFetchPermissionsParams contains agentic fetch tool parameters.
type BashParams ¶
type BashParams struct {
Command string `json:"command"`
Description string `json:"description,omitempty"`
Timeout int `json:"timeout,omitempty"`
RunInBackground bool `json:"run_in_background,omitempty"`
}
BashParams contains bash input parameters.
type BashPermissionsParams ¶
BashPermissionsParams contains bash tool parameters.
type BashResponseMetadata ¶
type BashResponseMetadata struct {
ExitCode int `json:"exit_code"`
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
Output string `json:"output,omitempty"`
Background bool `json:"background,omitempty"`
ShellID string `json:"shell_id,omitempty"`
Description string `json:"description,omitempty"`
}
BashResponseMetadata contains bash response metadata.
type DownloadParams ¶
type DownloadParams struct {
URL string `json:"url"`
FilePath string `json:"file_path"`
Timeout int `json:"timeout,omitempty"`
}
DownloadParams contains download parameters.
type DownloadPermissionsParams ¶
DownloadPermissionsParams contains download tool parameters.
type EditParams ¶
type EditParams struct {
FilePath string `json:"file_path"`
OldString string `json:"old_string"`
NewString string `json:"new_string"`
}
EditParams contains edit parameters.
type EditPermissionsParams ¶
type EditPermissionsParams struct {
FilePath string
OldString string
NewString string
OldContent string
NewContent string
}
EditPermissionsParams contains edit tool parameters.
type EditResponseMetadata ¶
type EditResponseMetadata struct {
Success bool `json:"success"`
Message string `json:"message,omitempty"`
OldContent string `json:"old_content,omitempty"`
NewContent string `json:"new_content,omitempty"`
}
EditResponseMetadata contains edit response metadata.
type FetchParams ¶
type FetchParams struct {
URL string `json:"url"`
Format string `json:"format,omitempty"`
Timeout int `json:"timeout,omitempty"`
}
FetchParams contains fetch parameters.
type FetchPermissionsParams ¶
type FetchPermissionsParams struct {
URL string
}
FetchPermissionsParams contains fetch tool parameters.
type GlobParams ¶
GlobParams contains glob parameters.
type GrepParams ¶
type GrepParams struct {
Pattern string `json:"pattern"`
Path string `json:"path,omitempty"`
Include string `json:"include,omitempty"`
LiteralText bool `json:"literal_text,omitempty"`
}
GrepParams contains grep parameters.
type JobKillParams ¶
type JobKillParams struct {
ShellID string `json:"shell_id"`
}
JobKillParams contains job kill parameters.
type JobKillResponseMetadata ¶
type JobKillResponseMetadata struct {
Success bool `json:"success"`
Message string `json:"message"`
Description string `json:"description,omitempty"`
Command string `json:"command,omitempty"`
}
JobKillResponseMetadata contains job kill response metadata.
type JobOutputParams ¶
type JobOutputParams struct {
ShellID string `json:"shell_id"`
}
JobOutputParams contains job output parameters.
type JobOutputResponseMetadata ¶
type JobOutputResponseMetadata struct {
Output string `json:"output"`
Status string `json:"status"`
ShellID string `json:"shell_id"`
Description string `json:"description,omitempty"`
Command string `json:"command,omitempty"`
}
JobOutputResponseMetadata contains job output response metadata.
type LSPermissionsParams ¶
LSPermissionsParams contains ls tool parameters.
type MultiEditParams ¶
type MultiEditParams struct {
FilePath string `json:"file_path"`
Edits []EditParams `json:"edits"`
}
MultiEditParams contains multi-edit parameters.
type MultiEditPermissionsParams ¶
type MultiEditPermissionsParams struct {
FilePath string
Edits []EditPermissionsParams
OldContent string
NewContent string
}
MultiEditPermissionsParams contains multi-edit tool parameters.
type MultiEditResponseMetadata ¶
type MultiEditResponseMetadata struct {
Success bool `json:"success"`
Count int `json:"count"`
Message string `json:"message,omitempty"`
OldContent string `json:"old_content,omitempty"`
NewContent string `json:"new_content,omitempty"`
EditsApplied int `json:"edits_applied,omitempty"`
EditsFailed int `json:"edits_failed,omitempty"`
}
MultiEditResponseMetadata contains multi-edit response metadata.
type SourcegraphParams ¶
type SourcegraphParams struct {
Query string `json:"query"`
Count int `json:"count,omitempty"`
ContextWindow int `json:"context_window,omitempty"`
}
SourcegraphParams contains sourcegraph parameters.
type TodosParams ¶
TodosParams contains todos parameters.
type TodosResponseMetadata ¶
type TodosResponseMetadata struct {
Todos []session.Todo `json:"todos"`
IsNew bool `json:"is_new,omitempty"`
JustStarted string `json:"just_started,omitempty"` // ID of just-started todo
JustCompleted []string `json:"just_completed,omitempty"` // IDs of just-completed todos
Total int `json:"total"`
Completed int `json:"completed"`
}
TodosResponseMetadata contains todos response metadata.
type ViewParams ¶
type ViewParams struct {
FilePath string `json:"file_path"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
}
ViewParams contains view parameters.
type ViewPermissionsParams ¶
ViewPermissionsParams contains view tool parameters.
type ViewResponseMetadata ¶
type ViewResponseMetadata struct {
FilePath string `json:"file_path"`
TotalLines int `json:"total_lines"`
Offset int `json:"offset"`
Limit int `json:"limit"`
Content string `json:"content,omitempty"`
}
ViewResponseMetadata contains view response metadata.
type WebFetchParams ¶
WebFetchParams contains web fetch parameters.
type WebSearchParams ¶
type WebSearchParams struct {
Query string `json:"query"`
}
WebSearchParams contains web search parameters.
type WriteParams ¶
WriteParams contains write parameters.