catalog

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() engine.Plugin

New creates a new tool catalog plugin.

Types

type Plugin

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

Plugin maintains a live registry of tool definitions emitted on "tool.register" and answers synchronous "tool.catalog.query" requests so agent plugins don't each need to cache the same list. Registration order is preserved; last-write-wins when a tool with the same Name re-registers.

Because it is the one place that knows every registered tool, it also owns the unknown-tool fallback: a tool.invoke naming a tool that is neither registered nor offered by any tool.catalog.query responder (e.g. the active AG-UI run's client tools), and that no subscriber answered synchronously, gets an error tool.result ("unknown tool: <name>") so the waiting agent loop recovers on its next iteration instead of hanging the turn.

func (*Plugin) Capabilities

func (p *Plugin) Capabilities() []engine.Capability

Capabilities advertises this plugin as the provider of "tool.catalog" — the shared registry agents query via "tool.catalog.query" to build each LLM request's tools list.

func (*Plugin) Dependencies

func (p *Plugin) Dependencies() []string

func (*Plugin) Emissions

func (p *Plugin) Emissions() []string

Emissions lists what the unknown-tool fallback emits: a tool.catalog.query to see run-scoped tools other plugins contribute, and the synthesized error result (through the before:tool.result gate, like any tool's result).

func (*Plugin) ID

func (p *Plugin) ID() string

func (*Plugin) Init

func (p *Plugin) Init(ctx engine.PluginContext) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Ready

func (p *Plugin) Ready() error

func (*Plugin) Requires

func (p *Plugin) Requires() []engine.Requirement

Requires auto-activates nexus.gate.tool_timeout so a per-call deadline is on by default wherever tools are dispatched: a tool.result that never arrives (a vetoed before:tool.result, a handler that never answers) would otherwise hang the waiting agent loop for good. No Default config — the gate's own defaults apply (10m backstop, HITL/delegation tools exempt); an operator tunes or disables it with a nexus.gate.tool_timeout block (enabled: false). Optional so an embedder that does not register the gate still boots.

func (*Plugin) Shutdown

func (p *Plugin) Shutdown(_ context.Context) error

func (*Plugin) Subscriptions

func (p *Plugin) Subscriptions() []engine.EventSubscription

func (*Plugin) Version

func (p *Plugin) Version() string

Jump to

Keyboard shortcuts

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