Documentation
¶
Overview ¶
Package tooltimeout implements nexus.gate.tool_timeout, a per-call deadline gate for tool invocations. It observes tool.invoke, starts a timer per call, and on expiry synthesizes a tool.result error plus a tool.timeout event so the agent's bookkeeping unwinds even when a tool hangs. The engine cancels the timed-out call's dispatch context on that tool.timeout (see engine.ToolCallContexts), so tools that honor it stop working too.
The gate is on by default: nexus.tool.catalog auto-activates it through Requires(), so every profile that dispatches tools through the catalog gets a per-call deadline without listing the gate. The default deadline is a backstop (minutes, not seconds) sized above every shipped tool's own timeout, and tools whose wait is bounded by a human or by their own wall-clock budget are exempt by default (see builtinPerTool), as is any tool whose definition carries events.ToolTagAwaitsHuman (see awaitsHuman).
Index ¶
- func New() engine.Plugin
- type Plugin
- func (p *Plugin) Capabilities() []engine.Capability
- func (p *Plugin) ConfigSchema() []byte
- 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 watches tool.invoke / tool.result and synthesizes a tool.result error + tool.timeout event when a call exceeds its deadline. It does not veto before:tool.invoke; other gates remain free to refuse the call.
func (*Plugin) Capabilities ¶
func (p *Plugin) Capabilities() []engine.Capability
func (*Plugin) ConfigSchema ¶
ConfigSchema implements engine.ConfigSchemaProvider.
func (*Plugin) Dependencies ¶
func (*Plugin) Requires ¶
func (p *Plugin) Requires() []engine.Requirement
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription