toolrunner

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Defs

func Defs() []bridle.ToolDef

Defs returns the JSON-schema tool surface for the local lane. The funnel passes these as TurnRequest.Tools alongside the LocalToolRunner.

Types

type Config

type Config struct {
	// WorkDir is the root for relative file paths and the cwd for bash.
	// Required; New returns an error if empty.
	WorkDir string

	// LynxaiBaseURL is the base URL of the shared lynxai service
	// (e.g. "http://127.0.0.1:7878"). Empty disables web_fetch/web_extract
	// (they return a tool-level error telling the model web access is off).
	LynxaiBaseURL string
	// LynxaiKey is an optional bearer token for lynxai (reverse-proxy auth).
	LynxaiKey string

	// HTTPClient is used for lynxai calls. Nil → a client with a 60s timeout.
	HTTPClient *http.Client

	// BashTimeout caps a single bash command. Zero → 120s.
	BashTimeout time.Duration

	// MaxOutputBytes caps captured stdout/stderr and file reads. Zero → 1<<20 (1 MiB).
	MaxOutputBytes int
}

Config configures a LocalToolRunner. Zero values are filled with sane defaults by New.

type LocalToolRunner

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

LocalToolRunner executes the local coding-agent tool suite in-process. It implements bridle.ToolRunner.

func New

func New(cfg Config) (*LocalToolRunner, error)

New builds a LocalToolRunner, filling defaults. Returns an error if WorkDir is empty.

func (*LocalToolRunner) Run

Run routes a tool call to its handler. Unknown tools return an error.

Jump to

Keyboard shortcuts

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