Expand description
Opt-in context windows within a stable logical session. Rollover seals eligible source evidence before changing the next request; never calls an LLM summarizer or clears environment state. A durable successor starts fresh elapsed time; cumulative resource/cost budgets remain unchanged.
Structs§
- Continuation
State - Prepared
Rollover - Successor
Budget - Size budget for successor selection, in conservative-estimator tokens for the successor’s MESSAGES (fixed system/tool-schema overhead subtracted).
- Token
Calibration - Provider-reported vs conservatively estimated footprint of ONE request. The user-visible context number is the provider’s; the policy’s is the estimate. Their ratio converts a target into estimator units.
Constants§
Functions§
- restore_
window - Resume restores only window metadata from a verified source reference. It never enables mode or reconstructs capability/consent from model text.
- rollover
- successor_
budget - Convert the configured successor footprint (
target_tokens, in the units the user sees — provider-reported whencalibrationis known) into a conservative-estimator budget for the retained messages. - validate_
restored_ history - What a turn does with a resumed head before its first request:
restore_window, whose lookup never refuses the turn. A head whose archive is not in the chat’s store goes on at window 1. Call even when automatic management is off.