Skip to main content

Module continuation

Module continuation 

Source
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§

ContinuationState
PreparedRollover
SuccessorBudget
Size budget for successor selection, in conservative-estimator tokens for the successor’s MESSAGES (fixed system/tool-schema overhead subtracted).
TokenCalibration
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§

ARCHIVE_NAMESPACE
GUIDANCE

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 when calibration is 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.

Type Aliases§

SharedContinuation