Documentation
¶
Overview ¶
Package tool defines the unit of capability an agent execution node can invoke. A tool is a function over bytes plus a Runtime; it knows nothing about sandboxing, scheduling, or metrics. The control plane composes those concerns around it: the workspace view a tool receives is already scoped to its policy's areas, and the tasks it spawns are gated by its policy's spawn allowlist.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds the tools a deployment may dispatch to. It is safe for concurrent use.
type Runtime ¶
type Runtime interface {
// Workspace returns the tool's sandboxed view of the shared workspace.
Workspace() workspace.Workspace
// Spawn submits a sub-task back into the tool's own deployment and
// returns its task ID without waiting for the result. This is how an
// agent calls another agent: the child task competes for a node like
// any other work. The policy's spawn allowlist gates which tools may
// be targeted; the default is none.
Spawn(ctx context.Context, t task.Task) (string, error)
}
Runtime is the capability surface a tool executes against. Both methods are confined by the tool's sandbox policy before the tool ever sees them.
Click to show internal directories.
Click to hide internal directories.