CompactionRecord
Interface: CompactionRecord
Defined in: src/core/agent/window/types.ts:137
What one OVER-BUDGET visit to summarizeOldest (what .compaction()
configures) put in the ledger.
Extends
Properties
iteration
readonlyiteration:number
Defined in: src/core/agent/window/types.ts:121
ReAct iteration this visit belongs to.
Inherited from
measuredTokens
readonlymeasuredTokens:number
Defined in: src/core/agent/window/types.ts:139
Adapter-reported input tokens of the last call — what tripped the check.
overBudget
readonlyoverBudget:boolean
Defined in: src/core/agent/window/types.ts:143
True when the measurement was over budget (a fold was attempted).
refusals
readonlyrefusals: readonlyWindowRefusal[]
Defined in: src/core/agent/window/types.ts:130
Every turn that refused to leave, named.
Inherited from
removedMessageCount
readonlyremovedMessageCount:number
Defined in: src/core/agent/window/types.ts:125
How many messages left the window.
Inherited from
WindowRecord.removedMessageCount
removedStageIds
readonlyremovedStageIds: readonlystring[]
Defined in: src/core/agent/window/types.ts:123
runtimeStageIds of the stages that appended the messages that left.
Inherited from
strategy
readonlystrategy:string
Defined in: src/core/agent/window/types.ts:119
WindowStrategy.name of the strategy that decided — 'summarize-oldest',
'sliding-window', 'token-budget', or your own. Narrow on it.
Inherited from
summarizerSkipped?
readonlyoptionalsummarizerSkipped?:boolean
Defined in: src/core/agent/window/types.ts:158
Present and true when the summarizer was deliberately NOT called this
iteration (8.14.0): this exact span had already come back
'replacement-not-smaller', and the same span through the same summarizer
gives the same answer. No call, so no summarizerTokens and no cost tick.
It is recorded rather than left out because a decision not to spend is still a decision. A record with this flag and one without are different facts, and a reader adding up an agent's fold attempts needs to see both.
summarizerTokens?
readonlyoptionalsummarizerTokens?:object
Defined in: src/core/agent/window/types.ts:147
What the summarizer call itself cost, when it reported usage.
input
readonlyinput:number
output
readonlyoutput:number
summaryChars
readonlysummaryChars:number
Defined in: src/core/agent/window/types.ts:145
Length of the summary text the summarizer produced (0 when none).
thresholdTokens
readonlythresholdTokens:number
Defined in: src/core/agent/window/types.ts:141
The budget it was compared against.
windowCharsAfter
readonlywindowCharsAfter:number
Defined in: src/core/agent/window/types.ts:128
Inherited from
windowCharsBefore
readonlywindowCharsBefore:number
Defined in: src/core/agent/window/types.ts:127
Window size in chars before / after this visit. Exact, and not tokens.
