SessionContextUsageParams
session/contextUsage params: context-window
pressure — the counted-once occupancy at the latest provider-reported
durable fact, joined with the host’s pressure basis. Replace wholesale;
emitted only when the (windowTokens, usedTokens, pressure) triple
changes value (identical adoptions emit nothing).
Fields and variants
Section titled “Fields and variants”pressuresessionIdsourceRangeusedTokensviewCursorwindowTokens
Source
schema/msp/experimental/msp.schema.json#/types/SessionContextUsageParams
{ "description": "`session/contextUsage` params: context-window\npressure — the counted-once occupancy at the latest provider-reported\ndurable fact, joined with the host's pressure basis. Replace wholesale;\nemitted only when the `(windowTokens, usedTokens, pressure)` triple\nchanges value (identical adoptions emit nothing).", "properties": { "pressure": { "$ref": "#/$defs/ContextPressureLevel", "description": "Server-computed pressure level over the basis thresholds." }, "sessionId": { "description": "The owning session.", "type": "string" }, "sourceRange": { "$ref": "#/$defs/SourceRange", "description": "The durable records this event folded from." }, "usedTokens": { "description": "Counted-once prompt tokens plus output tokens of the driving\nrecord, saturating — the honest occupancy floor.", "type": "integer" }, "viewCursor": { "description": "Opaque, strictly monotonic view cursor.", "type": "string" }, "windowTokens": { "description": "The effective context-window size from the host's pressure basis;\nabsent when the basis has no limit — the limit part is omitted,\nnever invented.", "type": "integer" } }, "required": [ "pressure", "sessionId", "sourceRange", "usedTokens", "viewCursor" ], "type": "object"}