Documentation
¶
Index ¶
- func NewFSMemory(cfg FSMemoryConfig) (agentkit.ToolPack, error)
- func NewFSWorkspace(cfg FSWorkspaceConfig, deps FSWorkspaceDeps) (agentkit.ToolPack, error)
- type EditInput
- type EditOutput
- type FSMemoryConfig
- type FSWorkspaceConfig
- type FSWorkspaceDeps
- type FileEdit
- type FindInput
- type FindOutput
- type GrepInput
- type GrepOutput
- type ListDirInput
- type ListDirOutput
- type ReadInput
- type ReadOutput
- type WriteInput
- type WriteOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFSMemory ¶
func NewFSMemory(cfg FSMemoryConfig) (agentkit.ToolPack, error)
NewFSMemory registers tool/fs-memory: In-memory workspace file tools for tests and smoke runs.
func NewFSWorkspace ¶
func NewFSWorkspace(cfg FSWorkspaceConfig, deps FSWorkspaceDeps) (agentkit.ToolPack, error)
NewFSWorkspace registers tool/fs-workspace: Workspace file tools (read, write, edit, grep, find, ls).
Types ¶
type EditOutput ¶
type FSMemoryConfig ¶
type FSMemoryConfig struct {
// Files is seed contents, keyed by path.
Files map[string]string `json:"files"`
// MaxBytes is read truncation limit; defaults to 1 MiB.
MaxBytes int `json:"maxBytes,omitempty"`
// MaxMatches is grep cap per call; defaults to 100.
MaxMatches int `json:"maxMatches,omitempty"`
// MaxResults is find cap per call; defaults to 200.
MaxResults int `json:"maxResults,omitempty"`
// Tools limits which model tools are registered; empty means all six.
Tools []string `json:"tools,omitempty"`
}
type FSWorkspaceConfig ¶
type FSWorkspaceConfig struct {
// Root is directory relative to the workspace root; may use the global: or local: scope prefix.
Root string `json:"root"`
// MaxBytes is read truncation limit; defaults to 1 MiB.
MaxBytes int `json:"maxBytes,omitempty"`
// MaxMatches is grep cap per call; defaults to 100.
MaxMatches int `json:"maxMatches,omitempty"`
// MaxResults is find cap per call; defaults to 200.
MaxResults int `json:"maxResults,omitempty"`
// ReadOnly rejects write and edit operations.
ReadOnly bool `json:"readOnly,omitempty"`
// Tools limits which model tools are registered; empty means all six (read, write, edit, grep, find, ls).
Tools []string `json:"tools,omitempty"`
}
type FSWorkspaceDeps ¶
type FindOutput ¶
type FindOutput = filesystem.FindResult
type GrepInput ¶
type GrepInput struct {
Pattern string `json:"pattern" jsonschema:"required,description=Regular expression to search for"`
Path string `json:"path" jsonschema:"description=Directory or file to search (default: workspace root)"`
Glob string `json:"glob" jsonschema:"description=Optional filename glob filter, e.g. *.go"`
IgnoreCase bool `json:"ignoreCase" jsonschema:"description=Case-insensitive search"`
}
type GrepOutput ¶
type GrepOutput = filesystem.GrepResult
type ListDirInput ¶
type ListDirInput struct {
Path string `json:"path" jsonschema:"description=Directory path relative to the workspace (default: root)"`
}
type ListDirOutput ¶
type ListDirOutput struct {
Entries []filesystem.DirEntry `json:"entries"`
}
type ReadInput ¶
type ReadInput struct {
Path string `json:"path" jsonschema:"required,description=File path relative to the workspace"`
}
type ReadOutput ¶
type ReadOutput struct {
Content string `json:"content"`
}
type WriteInput ¶
type WriteOutput ¶
type WriteOutput struct {
Path string `json:"path"`
}
Click to show internal directories.
Click to hide internal directories.