Documentation
¶
Index ¶
- func NewAppendDiaryTool(workspacePath string) (tool.InvokableTool, error)
- func NewCronTool(service *cron.Service) (tool.InvokableTool, error)
- func NewExecTool(timeoutSec int, restrictToWorkspace bool, workspaceDir string) (tool.InvokableTool, error)
- func NewListDirTool(workspacePath string) (tool.InvokableTool, error)
- func NewReadFileTool(workspacePath string) (tool.InvokableTool, error)
- func NewReadMemoryTool(workspacePath string) (tool.InvokableTool, error)
- func NewWebFetchTool() (tool.InvokableTool, error)
- func NewWebSearchTool(apiKey string, maxResults int) (tool.InvokableTool, error)
- func NewWriteFileTool(workspacePath string) (tool.InvokableTool, error)
- func NewWriteMemoryTool(workspacePath string) (tool.InvokableTool, error)
- type AppendDiaryInput
- type AppendDiaryOutput
- type CronToolInput
- type ExecInput
- type ExecOutput
- type ListDirInput
- type ReadFileInput
- type ReadFileOutput
- type ReadMemoryInput
- type ReadMemoryOutput
- type Registry
- func (r *Registry) Execute(ctx context.Context, name string, argsJSON string) (string, error)
- func (r *Registry) Get(name string) (tool.InvokableTool, bool)
- func (r *Registry) GetToolInfos(ctx context.Context) ([]*schema.ToolInfo, error)
- func (r *Registry) List() []tool.InvokableTool
- func (r *Registry) Names() []string
- func (r *Registry) Register(t tool.InvokableTool) error
- type WebFetchInput
- type WebFetchOutput
- type WebSearchInput
- type WebSearchOutput
- type WebSearchResult
- type WriteFileInput
- type WriteMemoryInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAppendDiaryTool ¶ added in v0.1.4
func NewAppendDiaryTool(workspacePath string) (tool.InvokableTool, error)
func NewCronTool ¶ added in v0.2.0
func NewCronTool(service *cron.Service) (tool.InvokableTool, error)
NewCronTool creates an agent tool for managing cron jobs.
func NewExecTool ¶
func NewExecTool(timeoutSec int, restrictToWorkspace bool, workspaceDir string) (tool.InvokableTool, error)
NewExecTool creates the exec tool
func NewListDirTool ¶
func NewListDirTool(workspacePath string) (tool.InvokableTool, error)
NewListDirTool creates the list_dir tool
func NewReadFileTool ¶
func NewReadFileTool(workspacePath string) (tool.InvokableTool, error)
NewReadFileTool creates the read_file tool
func NewReadMemoryTool ¶ added in v0.1.4
func NewReadMemoryTool(workspacePath string) (tool.InvokableTool, error)
func NewWebFetchTool ¶ added in v0.1.4
func NewWebFetchTool() (tool.InvokableTool, error)
func NewWebSearchTool ¶ added in v0.1.4
func NewWebSearchTool(apiKey string, maxResults int) (tool.InvokableTool, error)
func NewWriteFileTool ¶
func NewWriteFileTool(workspacePath string) (tool.InvokableTool, error)
NewWriteFileTool creates the write_file tool
func NewWriteMemoryTool ¶ added in v0.1.4
func NewWriteMemoryTool(workspacePath string) (tool.InvokableTool, error)
Types ¶
type AppendDiaryInput ¶ added in v0.1.4
type AppendDiaryInput struct {
Entry string `json:"entry" jsonschema:"required,description=Diary entry content to append"`
}
type AppendDiaryOutput ¶ added in v0.1.4
type AppendDiaryOutput struct {
DiaryPath string `json:"diary_path"`
}
type CronToolInput ¶ added in v0.2.0
type CronToolInput struct {
Action string `` /* 153-byte string literal not displayed */
Name string `json:"name,omitempty" jsonschema:"description=Job name (required for add)"`
Message string `json:"message,omitempty" jsonschema:"description=Message to send to agent (required for add)"`
EverySeconds int64 `json:"every_seconds,omitempty" jsonschema:"description=Repeat interval in seconds (for add with every schedule)"`
CronExpr string `json:"cron_expr,omitempty" jsonschema:"description=Cron expression like '0 9 * * *' (for add with cron schedule)"`
AtTimestamp string `json:"at_timestamp,omitempty" jsonschema:"description=RFC3339 timestamp for one-shot (for add with at schedule)"`
JobID string `json:"job_id,omitempty" jsonschema:"description=Job ID (required for remove/enable/disable)"`
Deliver bool `json:"deliver,omitempty" jsonschema:"description=If true deliver response directly without agent processing"`
}
type ExecInput ¶
type ExecInput struct {
Command string `json:"command" jsonschema:"required,description=Shell command to execute"`
WorkingDir string `json:"working_dir" jsonschema:"description=Working directory for the command"`
}
ExecInput parameters for exec tool
type ExecOutput ¶
type ExecOutput struct {
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
ExitCode int `json:"exit_code"`
}
ExecOutput result of exec tool
type ListDirInput ¶
type ListDirInput struct {
Path string `json:"path" jsonschema:"required,description=Directory path to list"`
}
ListDirInput parameters for list_dir tool
type ReadFileInput ¶
type ReadFileInput struct {
Path string `json:"path" jsonschema:"required,description=Absolute path to the file"`
Offset int `json:"offset" jsonschema:"description=Starting line number (0-based)"`
Limit int `json:"limit" jsonschema:"description=Maximum number of lines to read"`
}
ReadFileInput parameters for read_file tool
type ReadFileOutput ¶
ReadFileOutput result of read_file tool
type ReadMemoryInput ¶ added in v0.1.4
type ReadMemoryInput struct{}
type ReadMemoryOutput ¶ added in v0.1.4
type ReadMemoryOutput struct {
Content string `json:"content"`
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages tools by name
func (*Registry) Get ¶
func (r *Registry) Get(name string) (tool.InvokableTool, bool)
Get retrieves a tool by name
func (*Registry) GetToolInfos ¶
GetToolInfos returns all tool schemas for ChatModel binding
type WebFetchInput ¶ added in v0.1.4
type WebFetchOutput ¶ added in v0.1.4
type WebSearchInput ¶ added in v0.1.4
type WebSearchOutput ¶ added in v0.1.4
type WebSearchOutput struct {
Query string `json:"query"`
Results []WebSearchResult `json:"results"`
}
type WebSearchResult ¶ added in v0.1.4
type WriteFileInput ¶
type WriteFileInput struct {
Path string `json:"path" jsonschema:"required,description=Absolute path to the file"`
Content string `json:"content" jsonschema:"required,description=Content to write"`
}
WriteFileInput parameters for write_file tool
type WriteMemoryInput ¶ added in v0.1.4
type WriteMemoryInput struct {
Content string `json:"content" jsonschema:"required,description=Content to store as long-term memory"`
}
Click to show internal directories.
Click to hide internal directories.