Documentation
¶
Overview ¶
Package nodetools provides worker-local tools for operating an assistant node.
Index ¶
Constants ¶
View Source
const ( ToolNameNodeShell = "terminal" ToolNameNodeFileRead = "read" ToolNameNodeFileWrite = "write" )
Variables ¶
This section is empty.
Functions ¶
func SetWriteSafeRoot ¶
func SetWriteSafeRoot(root string)
Types ¶
type NodeFileReadTool ¶
NodeFileReadTool reads files from the worker workspace.
func NewNodeFileReadTool ¶
func NewNodeFileReadTool() *NodeFileReadTool
NewNodeFileReadTool creates a worker-local node file read tool.
func (*NodeFileReadTool) Execute ¶
func (t *NodeFileReadTool) Execute(ctx context.Context, input map[string]interface{}) (string, error)
Execute reads a file from the worker workspace.
func (*NodeFileReadTool) Validate ¶
func (t *NodeFileReadTool) Validate(input map[string]interface{}) error
Validate checks node file read tool input.
type NodeFileWriteTool ¶
NodeFileWriteTool writes files to the worker workspace.
func NewNodeFileWriteTool ¶
func NewNodeFileWriteTool() *NodeFileWriteTool
NewNodeFileWriteTool creates a worker-local node file write tool.
func (*NodeFileWriteTool) Execute ¶
func (t *NodeFileWriteTool) Execute(ctx context.Context, input map[string]interface{}) (string, error)
Execute writes a file to the worker workspace.
func (*NodeFileWriteTool) Validate ¶
func (t *NodeFileWriteTool) Validate(input map[string]interface{}) error
Validate checks node file write tool input.
type NodeShellTool ¶
NodeShellTool executes shell commands in the worker environment.
func NewNodeShellTool ¶
func NewNodeShellTool() *NodeShellTool
NewNodeShellTool creates a worker-local node shell tool.
func (*NodeShellTool) Validate ¶
func (t *NodeShellTool) Validate(input map[string]interface{}) error
Validate checks node shell tool input.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.