OffloadConditions
Defined in: src/context-manager/strategies/offload/base.ts:51
Experimental
Conditions that determine when an offload strategy fires.
Granularity is determined by which conditions are set:
thresholdonly → per-block, eager (act on each block above this size on message arrival)utilizationonly → message-level (remove/summarize oldest messages when utilization exceeded)- Both → message-level, targeting only messages with blocks over the threshold
When multiple strategies target the same content, they don’t conflict — strategies run as an ordered pipeline, and once an earlier strategy shrinks a block, it falls below the next strategy’s threshold and gets skipped automatically.
Properties
Section titled “Properties”threshold?
Section titled “threshold?”optional threshold?: number;Defined in: src/context-manager/strategies/offload/base.ts:53
Experimental
Token threshold above which individual blocks are offloaded.
utilization?
Section titled “utilization?”optional utilization?: number;Defined in: src/context-manager/strategies/offload/base.ts:56
Experimental
Context utilization ratio (0-1+) above which the strategy fires.
preserveRecent?
Section titled “preserveRecent?”optional preserveRecent?: number;Defined in: src/context-manager/strategies/offload/base.ts:63
Experimental
How many recent matching messages to leave untouched.
- Integer (1 or above): absolute count of messages to preserve.
- Decimal (between 0 and 1 exclusive): ratio of matching messages to preserve (e.g. 0.7 = keep 70%).