react

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: 12 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 ReAct agent plugin.

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

func (p *Plugin) ConfigSchema() []byte

ConfigSchema implements engine.ConfigSchemaProvider.

func (*Plugin) Dependencies

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

func (*Plugin) Emissions

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

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 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) 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