Documentation
¶
Overview ¶
Package core provides the built-in core tools for KIT's coding agent. These tools are direct fantasy.AgentTool implementations — no MCP layer, no JSON-RPC, no serialization overhead. They match the pi coding agent's core tool set: bash, read, write, edit, grep, find, ls.
Index ¶
- func AllTools(opts ...ToolOption) []fantasy.AgentTool
- func CodingTools(opts ...ToolOption) []fantasy.AgentTool
- func NewBashTool(opts ...ToolOption) fantasy.AgentTool
- func NewEditTool(opts ...ToolOption) fantasy.AgentTool
- func NewFindTool(opts ...ToolOption) fantasy.AgentTool
- func NewGrepTool(opts ...ToolOption) fantasy.AgentTool
- func NewLsTool(opts ...ToolOption) fantasy.AgentTool
- func NewReadTool(opts ...ToolOption) fantasy.AgentTool
- func NewWriteTool(opts ...ToolOption) fantasy.AgentTool
- func ReadOnlyTools(opts ...ToolOption) []fantasy.AgentTool
- type ToolConfig
- type ToolOption
- type TruncationResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllTools ¶
func AllTools(opts ...ToolOption) []fantasy.AgentTool
AllTools returns all available core tools.
func CodingTools ¶
func CodingTools(opts ...ToolOption) []fantasy.AgentTool
CodingTools returns the default set of core tools for a coding agent: bash, read, write, edit. This matches pi's codingTools collection.
func NewBashTool ¶
func NewBashTool(opts ...ToolOption) fantasy.AgentTool
NewBashTool creates the bash core tool.
func NewEditTool ¶
func NewEditTool(opts ...ToolOption) fantasy.AgentTool
NewEditTool creates the edit core tool.
func NewFindTool ¶
func NewFindTool(opts ...ToolOption) fantasy.AgentTool
NewFindTool creates the find core tool.
func NewGrepTool ¶
func NewGrepTool(opts ...ToolOption) fantasy.AgentTool
NewGrepTool creates the grep core tool.
func NewLsTool ¶
func NewLsTool(opts ...ToolOption) fantasy.AgentTool
NewLsTool creates the ls core tool.
func NewReadTool ¶
func NewReadTool(opts ...ToolOption) fantasy.AgentTool
NewReadTool creates the read core tool.
func NewWriteTool ¶
func NewWriteTool(opts ...ToolOption) fantasy.AgentTool
NewWriteTool creates the write core tool.
func ReadOnlyTools ¶
func ReadOnlyTools(opts ...ToolOption) []fantasy.AgentTool
ReadOnlyTools returns tools for read-only exploration: read, grep, find, ls. This matches pi's readOnlyTools collection.
Types ¶
type ToolConfig ¶
type ToolConfig struct {
WorkDir string
}
ToolConfig holds configuration for tool construction.
func ApplyOptions ¶
func ApplyOptions(opts []ToolOption) ToolConfig
ApplyOptions applies the given ToolOptions to a ToolConfig and returns it.
type ToolOption ¶
type ToolOption func(*ToolConfig)
ToolOption configures tool behavior.
func WithWorkDir ¶
func WithWorkDir(dir string) ToolOption
WithWorkDir sets the working directory for file-based tools. If empty, os.Getwd() is used at execution time.