Documentation
¶
Overview ¶
Package summary_buffer provides an inline auto-compacting memory.history provider. It keeps the most recent N messages verbatim and replaces older ones with an LLM-generated summary, emitted in place as a system message at the head of the buffer.
Unlike nexus.memory.compaction — which is an external coordinator that emits memory.compacted for a separate history plugin to adopt — this plugin serves memory.history directly, so the summarised view is what the ReAct agent sees on each request.
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) GetHistory() []events.Message
- 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 inline auto-compaction for the memory.history buffer.
func (*Plugin) Capabilities ¶
func (p *Plugin) Capabilities() []engine.Capability
Capabilities advertises both memory.history (direct history provider) and memory.compaction (since triggering-plus-summarising is this plugin's core behaviour). Running alongside nexus.memory.compaction is a misconfiguration — both would advertise memory.compaction and the engine warns on the ambiguity.
func (*Plugin) ConfigSchema ¶
ConfigSchema implements engine.ConfigSchemaProvider.
func (*Plugin) Dependencies ¶
func (*Plugin) GetHistory ¶
GetHistory returns a copy of the current buffer for in-process callers.
func (*Plugin) Requires ¶
func (p *Plugin) Requires() []engine.Requirement
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription