executortools

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package executortools implements the tool set served by the local executor over the executor-registry tunnel. Each tool is a pure Go function receiving JSON arguments and returning an ExecuteResponse.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteRequest

type ExecuteRequest struct {
	ExecutorID string          `json:"executor_id"`
	Tool       string          `json:"tool"`
	Arguments  json.RawMessage `json:"arguments"`
	TimeoutMs  int             `json:"timeout_ms,omitempty"`
}

ExecuteRequest mirrors the wire format that executor-registry forwards over the yamux stream (body of POST /tool/execute).

type ExecuteResponse

type ExecuteResponse struct {
	Output   string `json:"output"`
	ExitCode int    `json:"exit_code"`
}

ExecuteResponse is the single unified response shape returned for every tool call. Output is free-form text; ExitCode is 0 on success.

type ToolExecutor

type ToolExecutor struct {
	WorkDir string
}

ToolExecutor dispatches tool calls to per-tool handlers rooted at WorkDir.

func New

func New(workDir string) *ToolExecutor

New returns a new ToolExecutor rooted at workDir.

func (*ToolExecutor) Execute

Execute dispatches to the per-tool handler. Unknown tools return exit 1.

Jump to

Keyboard shortcuts

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