Documentation
¶
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 implements the ReAct (Reason + Act) agent loop.
Conversation history, tool registration, and streaming display are owned by sibling plugins (nexus.memory.capped, nexus.tool.catalog, and the IO plugins respectively); ReAct queries them per-turn via the bus instead of maintaining its own copies. Slash-command parsing is handled by nexus.control.cancel via a before:io.input veto.
The plugin declares its hard dependencies via Requires() so the engine auto-activates them with sensible defaults when the user has not listed them explicitly. See docs/plugins/auto-activation.md and CLAUDE.md for the expansion and merge rules.
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
Requires declares the sibling plugins ReAct needs to function, referenced by capability rather than concrete plugin ID so alternate providers can satisfy them (e.g. a forthcoming nexus.memory.simple for tests).
"memory.history" is the source of truth for LLM-native history; ReAct queries it via "memory.history.query" rather than maintaining its own p.history. Default config gives the resolved provider a 100-message sliding window with persistence on — the same setup the default profile has used historically (applies to nexus.memory.capped; other providers ignore unknown keys).
"control.cancel" owns the /resume slash command and cancel turn tracking; without it, /resume typed by the user would land in history as a literal message.
"tool.catalog" is the shared tool registry; ReAct queries it via "tool.catalog.query" to build each LLM request's tools list.
Auto-activation obeys the merge rule documented in engine.Requirement: if the user has supplied any config for the resolved provider ID, the user's config wins entirely and Default is discarded.
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription