ContextState
Defined in: src/context-manager/types.ts:42
Experimental
State passed to strategies during apply().
Properties
Section titled “Properties”messages
Section titled “messages”messages: Message[];Defined in: src/context-manager/types.ts:44
Experimental
The agent’s current message array (the context window). Strategies mutate this in place.
agent: LocalAgent;Defined in: src/context-manager/types.ts:47
Experimental
The agent instance.
utilization
Section titled “utilization”utilization: number;Defined in: src/context-manager/types.ts:50
Experimental
Current context utilization ratio (0-1+). Above 1.0 means overflow.
overflow?
Section titled “overflow?”optional overflow?: boolean;Defined in: src/context-manager/types.ts:57
Experimental
Set when running in response to a ContextWindowOverflowError.
Strategies should bypass utilization gates when true — the provider
already rejected the request, so the estimate is not trustworthy.
stash?
Section titled “stash?”optional stash?: Stash;Defined in: src/context-manager/types.ts:60
Experimental
L1 stash for persisting offloaded content. Present when storage is configured.