Interface CompactionEntry

interface CompactionEntry {
    id: string;
    timestamp: number;
    turnRange: [number, number];
    strategy: CompactionStrategy;
    inputTokens: number;
    outputTokens: number;
    compressionRatio: number;
    summary: string;
    droppedContent: string[];
    preservedEntities: string[];
    tracesCreated: string[];
    observationNotes?: ObservationNote[];
    emotionalContext?: EmotionalContext;
    durationMs: number;
}

Properties

id: string
timestamp: number
turnRange: [number, number]

Inclusive turn range that was compacted.

Strategy that produced this compaction.

inputTokens: number

Token count of the raw messages before compaction.

outputTokens: number

Token count of the produced summary.

compressionRatio: number

Compression ratio (inputTokens / outputTokens).

summary: string

The summary text that replaced the raw messages.

droppedContent: string[]

Content fragments intentionally dropped (low importance).

preservedEntities: string[]

Named entities preserved in the summary.

tracesCreated: string[]

Memory trace IDs created from this compaction.

observationNotes?: ObservationNote[]

Observation notes extracted during compaction (hybrid strategy).

emotionalContext?: EmotionalContext

Emotional context at time of compaction.

durationMs: number

Duration of the compaction operation in ms.