Optional organizationOptional modeOptional routing mode (customFlags.mode, persona id, etc.).
Optional profileCompaction profile id used for this update (if profile routing is enabled).
Optional memoryEffective long-term memory policy for this conversation at the time of compaction. Implementations should respect this (e.g., allow per-conversation opt-out).
The rolling summary markdown (human-readable).
The structured memory JSON (memory_json) emitted by the compactor.
Optional summaryTimestamp up to which messages are considered summarized.
Optional summaryWhen this summary snapshot was updated.
Optional turnWith 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.
Optional recordWith 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.
Optional contributorWith 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.
Optional organization context (multi-tenant / org-scoped memory).