script

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScriptTool

type ScriptTool struct {
	Name        string
	Description string
	ScriptPath  string
	Content     string
	Version     string
	Parameters  schema.JSON
}

ScriptTool represents a script-based tool

type ScriptToolProvider

type ScriptToolProvider struct {
	// contains filtered or unexported fields
}

ScriptToolProvider implements the ToolProvider interface for script-based tools

func NewScriptToolProvider

func NewScriptToolProvider(name string, cacheDir string) (*ScriptToolProvider, error)

NewScriptToolProvider creates a new script tool provider

func (*ScriptToolProvider) AddToolDefinition

func (stp *ScriptToolProvider) AddToolDefinition(tool *ast.Tool) ([]tools.Tool, error)

AddToolDefinition adds a tool to the provider

func (*ScriptToolProvider) Close

func (stp *ScriptToolProvider) Close() error

Close cleans up resources

func (*ScriptToolProvider) ExecuteTool

func (stp *ScriptToolProvider) ExecuteTool(execCtx *execcontext.ExecutionContext, toolName string, parameters json.RawMessage) (*tools.Result, error)

ExecuteTool executes a script tool

func (*ScriptToolProvider) GetName

func (stp *ScriptToolProvider) GetName() string

GetName returns the provider name

func (*ScriptToolProvider) GetType

func (stp *ScriptToolProvider) GetType() ast.ToolType

Jump to

Keyboard shortcuts

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