tool

package
v1.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTools

func LoadTools(defs []Def, workDir string, logger *zap.Logger) ([]fantasy.AgentTool, error)

Types

type Def

type Def struct {
	Name        string
	Description string
	Binary      string
	Args        []string
	Doc         string
}

type Input

type Input struct {
	Input string `json:"input" jsonschema:"description=Command string passed to the tool; shell-split into argv"`
}

Input is what the LLM writes when it calls a BIN tool: a single free-form command string. The runtime shell-splits this into argv and execs the tool binary directly — no JSON envelope, no stdin stuffing, no wrapper per tool. The field stays named "input" so existing LLM tool-call schemas advertised via jsonschema reflection keep working without a tool-call migration.

Jump to

Keyboard shortcuts

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