Interface RollingSummaryMemoryUpdate

interface RollingSummaryMemoryUpdate {
    userId: string;
    organizationId?: string;
    sessionId: string;
    conversationId: string;
    personaId: string;
    mode?: string;
    profileId?: null | string;
    memoryPolicy?: ResolvedLongTermMemoryPolicy;
    summaryText: string;
    summaryJson: any;
    summaryUptoTimestamp?: null | number;
    summaryUpdatedAt?: null | number;
    turnScopes?: TurnScopes;
    recordSelfChange?: (<T>(input) => Promise<ProposalResult<T>>);
    contributorIds?: string[];
}

Properties

userId: string
organizationId?: string

Optional organization context (multi-tenant / org-scoped memory).

sessionId: string
conversationId: string
personaId: string
mode?: string

Optional routing mode (customFlags.mode, persona id, etc.).

profileId?: null | string

Compaction profile id used for this update (if profile routing is enabled).

Effective long-term memory policy for this conversation at the time of compaction. Implementations should respect this (e.g., allow per-conversation opt-out).

summaryText: string

The rolling summary markdown (human-readable).

summaryJson: any

The structured memory JSON (memory_json) emitted by the compactor.

summaryUptoTimestamp?: null | number

Timestamp up to which messages are considered summarized.

summaryUpdatedAt?: null | number

When this summary snapshot was updated.

turnScopes?: TurnScopes

With a learning layer: the turn's scope ids, from the GMI's learner session. The sink files the user, persona and conversation targets under them and records the upsert through recordSelfChange; without them it files under the plain ids and records nothing, as with no layer.

recordSelfChange?: (<T>(input) => Promise<ProposalResult<T>>)

With turnScopes: the learner session's recorder, bound to the turn. A sink that files under the turn's scope ids records each upsert through it as one memory write, or files nothing.

Type declaration

contributorIds?: string[]

With turnScopes: the explicit user ids whose messages this compaction and the conversation's earlier ones summarized. Each trace the sink files records them, and the recorder notes a session row for each with the write, so forgetUser for any of them finds the trace, in the session's scopes and in its learner's own.