Skip to content
1 min read · 194 words

Interface: AssembleCompactedTurnsResult<M, TC>

Defined in: src/batteries/context/compact/summarizer.ts:215

assembleCompactedTurns's return value: the compacted turns PLUS the rolling state a caller must persist and pass back in as options.priorState on the next call (this battery is stateless between calls by design — no private fields, no globalThis).

Type Parameters

Type ParameterDefault type
M extends RelevanceMessageRelevanceMessage
TC extends RelevanceToolCallRelevanceToolCall

Properties

PropertyTypeDescriptionDefined in
coveredOldernumberHow many older-region turns summary covers — persist and pass back in as priorState.coveredOlder next call.src/batteries/context/compact/summarizer.ts:227
summarystring | nullThe rolling summary text after this call (unchanged from priorState.summary when the threshold didn't fire this call) — persist and pass back in as priorState.summary next call.src/batteries/context/compact/summarizer.ts:224
turnsHistoryTurn<M, TC>[][syntheticSummaryTurn, ...verbatimRecentTurns] when older turns exist and have been summarized at least once; otherwise just the verbatim turns unchanged (nothing to compact yet).src/batteries/context/compact/summarizer.ts:221