Documentation
¶
Index ¶
- func NewFSMemory(cfg FSMemoryConfig) (agentkit.ToolPack, error)
- func NewFSWorkspace(cfg FSWorkspaceConfig, deps FSWorkspaceDeps) (agentkit.ToolPack, error)
- type EditInput
- type FSMemoryConfig
- type FSWorkspaceConfig
- type FSWorkspaceDeps
- type FileEdit
- type FindInput
- type GrepInput
- type ListDirInput
- type ReadInput
- type WriteInput
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 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 1000.
MaxResults int `json:"maxResults,omitempty"`
// MaxListEntries is ls cap per call; defaults to 500.
MaxListEntries int `json:"maxListEntries,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 1000.
MaxResults int `json:"maxResults,omitempty"`
// MaxListEntries is ls cap per call; defaults to 500.
MaxListEntries int `json:"maxListEntries,omitempty"`
// ReadOnly rejects write and edit operations.
ReadOnly bool `json:"readOnly,omitempty"`
// Unrestricted disables path permission checks; paths are not confined to root.
Unrestricted bool `json:"unrestricted,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 FindInput ¶
type FindInput struct {
Pattern string `json:"pattern" jsonschema:"Glob pattern to match files, e.g. *.go or **/*.json"`
Path string `json:"path,omitempty" jsonschema:"Directory to search (default: workspace root)"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum number of results (default: 1000)"`
}
type GrepInput ¶
type GrepInput struct {
Pattern string `json:"pattern" jsonschema:"Search pattern (regex or literal string)"`
Path string `json:"path,omitempty" jsonschema:"Directory or file to search (default: workspace root)"`
Glob string `json:"glob,omitempty" jsonschema:"Optional filename glob filter, e.g. *.go"`
IgnoreCase bool `json:"ignoreCase,omitempty" jsonschema:"Case-insensitive search"`
Literal bool `json:"literal,omitempty" jsonschema:"Treat pattern as a literal string instead of a regex"`
Context int `json:"context,omitempty" jsonschema:"Lines of context to show before and after each match"`
Limit int `json:"limit,omitempty" jsonschema:"Maximum number of matches to return (default: 100)"`
}
type ListDirInput ¶
type WriteInput ¶
Click to show internal directories.
Click to hide internal directories.