Documentation
¶
Index ¶
- func New() engine.Plugin
- type Plugin
- func (p *Plugin) Capabilities() []engine.Capability
- func (p *Plugin) Dependencies() []string
- func (p *Plugin) Emissions() []string
- func (p *Plugin) ID() string
- func (p *Plugin) Init(ctx engine.PluginContext) error
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() error
- func (p *Plugin) Requires() []engine.Requirement
- func (p *Plugin) Shutdown(_ context.Context) error
- func (p *Plugin) Subscriptions() []engine.EventSubscription
- func (p *Plugin) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*Plugin) Emissions ¶
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) 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) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription