toolkit

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package toolkit is the machine that answers requests for tools: an open gives its instructions and its entries, and a call runs one tool. Its tools are written in its definition, or one job answers every request.

Index

Constants

View Source
const (
	Open   = "open"
	Call   = "call"
	Resume = "resume"
	Cancel = "cancel"
)

What a request asks, as its do: says.

View Source
const (
	KindTool    = "tool"
	KindToolkit = "toolkit"
)

The kinds of entry an open gives.

View Source
const (
	DefaultResume = 10 * time.Minute
)

DefaultResume is how long a resume waits for work to end by default, and defaultWait how long it waits between two asks where the answer gives no time.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool

type Tool struct {
	Description string           `json:"description"`
	Args        map[string]any   `json:"args,omitzero"`
	Job         *machine.JobSpec `json:"job"`
	// Machine is the file of the machine the tool names, and Call its
	// location. Job runs it with the input the tool fixes.
	Machine string `json:"machine,omitzero"`
	Call    string `json:"call,omitzero"`
}

Tool is a named job a call runs, with its description and the shape of its arguments, a JSON Schema of an object. Written machine: or call: it names a machine, whose description it takes, and its arguments are that machine's input without the names the tool fixes.

type Toolkit

type Toolkit struct {
	// Instructions are the text an open gives, filled from the input.
	Instructions string           `json:"instructions,omitzero"`
	Tools        map[string]*Tool `json:"tools,omitzero"`
	// Job answers every request, in place of Instructions and Tools.
	Job *machine.JobSpec `json:"job,omitzero"`
	// Resume is how long a resume waits for work to end; ten minutes if it
	// says nothing.
	Resume machine.Duration `json:"resume,omitzero"`
}

Toolkit is the full form of the fields of a definition that only a toolkit has. It has Tools, or Job.

Jump to

Keyboard shortcuts

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