Versions in this module Expand all Collapse all v1 v1.0.0 Sep 16, 2026 Changes in this version + const ScopeVersionV1 + func BuildLegacyDirectAliases(agentID, channel, account, peerID string) []string + func BuildLegacyMainAlias(agentID string) string + func BuildLegacyPeerAlias(agentID, channel, peerKind, peerID string) string + func BuildMainSessionKey(agentID string) string + func BuildOpaqueSessionKey(alias string) string + func BuildSessionKey(scope SessionScope) string + func CanonicalScopeSignature(scope SessionScope) string + func CanonicalSessionIdentityID(channel, rawID string, identityLinks map[string][]string) string + func IsExplicitSessionKey(key string) bool + func IsLegacyAgentSessionKey(key string) bool + func IsOpaqueSessionKey(key string) bool + func ResolveAgentID(store any, sessionKey string) string + type Allocation struct + MainAliases []string + MainSessionKey string + Scope SessionScope + SessionAliases []string + SessionKey string + func AllocateRouteSession(input AllocationInput) Allocation + type AllocationInput struct + AgentID string + Context bus.InboundContext + SessionPolicy routing.SessionPolicy + type JSONLBackend struct + func NewJSONLBackend(store memory.Store) *JSONLBackend + func (b *JSONLBackend) AddFullMessage(sessionKey string, msg providers.Message) + func (b *JSONLBackend) AddMessage(sessionKey, role, content string) + func (b *JSONLBackend) Close() error + func (b *JSONLBackend) EnsureSessionMetadata(sessionKey string, scope *SessionScope, aliases []string) + func (b *JSONLBackend) GetHistory(key string) []providers.Message + func (b *JSONLBackend) GetSessionScope(sessionKey string) *SessionScope + func (b *JSONLBackend) GetSummary(key string) string + func (b *JSONLBackend) ListSessions() []string + func (b *JSONLBackend) ResolveSessionKey(sessionKey string) string + func (b *JSONLBackend) Save(key string) error + func (b *JSONLBackend) SetHistory(key string, history []providers.Message) + func (b *JSONLBackend) SetSummary(key, summary string) + func (b *JSONLBackend) TruncateHistory(key string, keepLast int) + type MetadataAwareSessionStore interface + EnsureSessionMetadata func(sessionKey string, scope *SessionScope, aliases []string) + GetSessionScope func(sessionKey string) *SessionScope + ResolveSessionKey func(sessionKey string) string + type ParsedLegacySessionKey struct + AgentID string + Rest string + func ParseLegacyAgentSessionKey(sessionKey string) *ParsedLegacySessionKey + type Session struct + Created time.Time + Key string + Messages []providers.Message + Summary string + Updated time.Time + type SessionManager struct + func NewSessionManager(storage string) *SessionManager + func (sm *SessionManager) AddFullMessage(sessionKey string, msg providers.Message) + func (sm *SessionManager) AddMessage(sessionKey, role, content string) + func (sm *SessionManager) Close() error + func (sm *SessionManager) GetHistory(key string) []providers.Message + func (sm *SessionManager) GetOrCreate(key string) *Session + func (sm *SessionManager) GetSummary(key string) string + func (sm *SessionManager) ListSessions() []string + func (sm *SessionManager) Save(key string) error + func (sm *SessionManager) SetHistory(key string, history []providers.Message) + func (sm *SessionManager) SetSummary(key string, summary string) + func (sm *SessionManager) TruncateHistory(key string, keepLast int) + type SessionScope struct + Account string + AgentID string + Channel string + Dimensions []string + Values map[string]string + Version int + func CloneScope(scope *SessionScope) *SessionScope + type SessionStore interface + AddFullMessage func(sessionKey string, msg providers.Message) + AddMessage func(sessionKey, role, content string) + Close func() error + GetHistory func(key string) []providers.Message + GetSummary func(key string) string + ListSessions func() []string + Save func(key string) error + SetHistory func(key string, history []providers.Message) + SetSummary func(key, summary string) + TruncateHistory func(key string, keepLast int)