capped

package
v0.32.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 11 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 capped conversation memory plugin.

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin maintains a sliding window of LLM-native conversation messages for the active session and exposes them to other plugins (agents, compaction) via a synchronous bus query. Storage format mirrors events.Message exactly — roles are "user", "assistant" (with ToolCalls populated when the model requested tools), and "tool" (with ToolCallID) — so consumers can feed the buffer directly into an LLMRequest without translation.

func (*Plugin) Capabilities

func (p *Plugin) Capabilities() []engine.Capability

Capabilities advertises this plugin as the default provider of "memory.history" — the LLM-native conversation buffer consumed via "memory.history.query" by agents and compactors.

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

func (p *Plugin) GetHistory() []events.Message

GetHistory returns a copy of the current message buffer. Retained for in-process callers (tests, embedders) — event-driven consumers should use the "memory.history.query" bus event instead.

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

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