nodetools

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

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 NewTools

func NewTools() []tools.Tool

func Register

func Register(registry *tools.Registry) error

func SetWriteSafeRoot

func SetWriteSafeRoot(root string)

Types

type NodeFileReadTool

type NodeFileReadTool struct {
	tools.BaseTool
}

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, raw json.RawMessage) (string, error)

Execute reads a file from the worker workspace.

func (*NodeFileReadTool) Validate

func (t *NodeFileReadTool) Validate(raw json.RawMessage) error

Validate checks node file read tool input.

type NodeFileWriteTool

type NodeFileWriteTool struct {
	tools.BaseTool
}

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, raw json.RawMessage) (string, error)

Execute writes a file to the worker workspace.

func (*NodeFileWriteTool) Validate

func (t *NodeFileWriteTool) Validate(raw json.RawMessage) error

Validate checks node file write tool input.

type NodeShellTool

type NodeShellTool struct {
	tools.BaseTool
	// contains filtered or unexported fields
}

NodeShellTool executes shell commands in the worker environment.

func NewNodeShellTool

func NewNodeShellTool() *NodeShellTool

NewNodeShellTool creates a worker-local node shell tool.

func (*NodeShellTool) Execute

func (t *NodeShellTool) Execute(ctx context.Context, raw json.RawMessage) (string, error)

Execute runs the shell command in the worker environment.

func (*NodeShellTool) Validate

func (t *NodeShellTool) Validate(raw json.RawMessage) error

Validate checks node shell tool input.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL