Documentation
¶
Index ¶
- type Provider
- func (p *Provider) AddConstraint(ctx context.Context, userID int64, agentID string, text string) ([]memory.ConstraintEntry, error)
- func (p *Provider) AdvanceSessionSnapshot(ctx context.Context, sessionID string, userID int64, agentID string) error
- func (p *Provider) Append(ctx context.Context, session memory.Session, msgs ...ai.Message) error
- func (p *Provider) Assemble(ctx context.Context, session memory.Session, budget, freshTail int) ([]ai.Message, error)
- func (p *Provider) Bootstrap(ctx context.Context, session memory.Session) error
- func (p *Provider) Close() error
- func (p *Provider) GetAgentSoul(ctx context.Context, userID int64, agentID string) (string, error)
- func (p *Provider) GetAgentSoulAt(ctx context.Context, userID int64, agentID string, version int64) (string, error)
- func (p *Provider) GetConstraints(ctx context.Context, userID int64, agentID string) ([]memory.ConstraintEntry, error)
- func (p *Provider) GetConstraintsAt(ctx context.Context, userID int64, agentID string, version int64) ([]memory.ConstraintEntry, error)
- func (p *Provider) GetOrCreateSessionSnapshot(ctx context.Context, sessionID string, userID int64, agentID string) (memory.SessionSnapshot, error)
- func (p *Provider) GetProfile(ctx context.Context, userID int64, agentID string) (string, error)
- func (p *Provider) GetProfileAt(ctx context.Context, userID int64, agentID string, version int64) (string, error)
- func (p *Provider) ListInfo(ctx context.Context, opts memory.ListOptions) ([]memory.SessionInfo, error)
- func (p *Provider) LoadHistory(ctx context.Context, sessionID string) ([]ai.Message, error)
- func (p *Provider) LoadInfo(ctx context.Context, sessionID string) (memory.SessionInfo, error)
- func (p *Provider) Name() string
- func (p *Provider) ReadChangelog(ctx context.Context, userID int64, agentID string, scope string, limit int) ([]memory.ChangeEntry, error)
- func (p *Provider) RemoveConstraint(ctx context.Context, userID int64, agentID string, id string) ([]memory.ConstraintEntry, error)
- func (p *Provider) SaveInfo(ctx context.Context, info memory.SessionInfo) error
- func (p *Provider) SetAgentSoul(ctx context.Context, userID int64, agentID string, content string) error
- func (p *Provider) SetProfile(ctx context.Context, userID int64, agentID string, content string) error
- func (p *Provider) Stats(ctx context.Context, session memory.Session) (memory.SessionStats, error)
- func (p *Provider) WriteChangelog(ctx context.Context, entry memory.ChangeEntry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements a minimal sliding-window memory provider. It stores messages in the same schema as LCM but does not write summaries or context items. Assemble returns the last N messages that fit within the token budget.
func (*Provider) AddConstraint ¶ added in v0.18.0
func (p *Provider) AddConstraint(ctx context.Context, userID int64, agentID string, text string) ([]memory.ConstraintEntry, error)
AddConstraint implements memory.ConstraintStore.
func (*Provider) AdvanceSessionSnapshot ¶ added in v0.18.0
func (p *Provider) AdvanceSessionSnapshot(ctx context.Context, sessionID string, userID int64, agentID string) error
AdvanceSessionSnapshot implements memory.SessionSnapshotStore.
func (*Provider) Assemble ¶
func (p *Provider) Assemble(ctx context.Context, session memory.Session, budget, freshTail int) ([]ai.Message, error)
Assemble implements memory.Provider. Returns the last N messages that fit within budget, always honouring freshTail.
func (*Provider) GetAgentSoul ¶
func (*Provider) GetAgentSoulAt ¶ added in v0.18.0
func (p *Provider) GetAgentSoulAt(ctx context.Context, userID int64, agentID string, version int64) (string, error)
GetAgentSoulAt implements memory.VersionedProfileStore.
func (*Provider) GetConstraints ¶ added in v0.18.0
func (p *Provider) GetConstraints(ctx context.Context, userID int64, agentID string) ([]memory.ConstraintEntry, error)
GetConstraints implements memory.ConstraintStore.
func (*Provider) GetConstraintsAt ¶ added in v0.18.0
func (p *Provider) GetConstraintsAt(ctx context.Context, userID int64, agentID string, version int64) ([]memory.ConstraintEntry, error)
GetConstraintsAt implements memory.VersionedConstraintStore.
func (*Provider) GetOrCreateSessionSnapshot ¶ added in v0.18.0
func (p *Provider) GetOrCreateSessionSnapshot(ctx context.Context, sessionID string, userID int64, agentID string) (memory.SessionSnapshot, error)
GetOrCreateSessionSnapshot implements memory.SessionSnapshotStore.
func (*Provider) GetProfile ¶
func (*Provider) GetProfileAt ¶ added in v0.18.0
func (p *Provider) GetProfileAt(ctx context.Context, userID int64, agentID string, version int64) (string, error)
GetProfileAt implements memory.VersionedProfileStore.
func (*Provider) ListInfo ¶
func (p *Provider) ListInfo(ctx context.Context, opts memory.ListOptions) ([]memory.SessionInfo, error)
ListInfo implements memory.SessionManager.
func (*Provider) LoadHistory ¶
LoadHistory implements memory.SessionManager.
func (*Provider) ReadChangelog ¶ added in v0.18.0
func (p *Provider) ReadChangelog(ctx context.Context, userID int64, agentID string, scope string, limit int) ([]memory.ChangeEntry, error)
ReadChangelog implements memory.ChangelogReader.
func (*Provider) RemoveConstraint ¶ added in v0.18.0
func (p *Provider) RemoveConstraint(ctx context.Context, userID int64, agentID string, id string) ([]memory.ConstraintEntry, error)
RemoveConstraint implements memory.ConstraintStore.
func (*Provider) SetAgentSoul ¶
func (*Provider) SetProfile ¶
func (*Provider) WriteChangelog ¶ added in v0.18.0
WriteChangelog implements memory.ChangelogWriter.