#[non_exhaustive]pub struct SnapshotState {Show 15 fields
pub items: Vec<Item>,
pub active_turn: Option<TurnRef>,
pub queued_turns: Vec<TurnRef>,
pub pending_approvals: Vec<PendingApprovalPointer>,
pub pending_user_inputs: Vec<PendingUserInputPointer>,
pub approval_mode: EffectiveApprovalModeState,
pub effective_model: Option<EffectiveModel>,
pub goal: Option<Goal>,
pub todo_list: Option<TodoListState>,
pub branch: Option<BranchState>,
pub name: Option<String>,
pub token_usage: CumulativeTokenUsage,
pub context_usage: Option<ContextUsage>,
pub reasoning_effort: Option<ReasoningEffortState>,
pub turn_count: u64,
}Expand description
The complete folded view at the snapshot cursor.
Additive-optional evolution applies exactly as everywhere else; unknown members MUST be ignored, and preserved if re-serialized.
One served site does not satisfy this type today, escalated under a
tracked change. The genesis snapshot rung serves state: {"items": [...]}
alone, while the anchored rung serves the full folded state. A
schema-validating client resuming with {"history": "snapshot"} against the
real fold therefore sees the other required members missing. The fix is a
serving change in the lane (serialize the SessionViewState the genesis
path already folds, as the anchored path does) plus its own RED against the
real fold; it is not a shape change here, because the protocol spec ratifies
this shape.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.items: Vec<Item>Every item, in first-opened order, each at its latest revision at the snapshot cursor. One schema per kind, shared with the notification item object — which is what makes snapshot+suffix a pure splice.
active_turn: Option<TurnRef>The running foreground turn; null when none is running.
queued_turns: Vec<TurnRef>Admitted-but-not-launched submits, in launch order.
pending_approvals: Vec<PendingApprovalPointer>The pending-approval half of the pending set.
pending_user_inputs: Vec<PendingUserInputPointer>The pending-user-input half of the pending set.
approval_mode: EffectiveApprovalModeStateThe effective approval mode at this cursor — the same object the
Session carries.
effective_model: Option<EffectiveModel>Latest effective model; null when no fact has landed.
goal: Option<Goal>Latest goal block; null when no fact has landed.
todo_list: Option<TodoListState>Latest todo list; null when no fact has landed.
branch: Option<BranchState>Latest branch observation; null when no fact has landed.
name: Option<String>The settled canonical session name; null when the session was never
named. Folds the same durable session/nameChanged record
Session.name reports.
token_usage: CumulativeTokenUsageThe cumulative block of the last session/tokenUsage event; zeroes
when none.
context_usage: Option<ContextUsage>The latest (windowTokens, usedTokens, pressure) triple. the protocol
spec says “null/absent” and the protocol spec worked example OMITS the
member; the binary omits it too, so this is the absent arm — the four
siblings above are present-null in the same frame. the governing rules
admits one or the other, never both; escalated under a tracked change.
reasoning_effort: Option<ReasoningEffortState>The latest session-default reasoning effort with its source; ABSENT until a set lands.
turn_count: u64Completed-turn count at this cursor.