Expand description
The session’s own facts: its header and the sections an inspector draws from it.
Each is held by the core from the same event the matching
SessionUpdate is built from, so this hands over what the core has
rather than deriving anything: a view reads the session instead of
folding the update stream a second time.
Re-exports§
use forge_primitives::git_diff::PrRefresh;🔒use forge_primitives::runtime::AvailableModel;🔒use forge_primitives::CurrentModel;🔒use forge_primitives::EffortLevel;🔒use forge_primitives::MonitorRecord;🔒use forge_primitives::PermissionMode;🔒use forge_primitives::SessionId;🔒use forge_primitives::SessionSlot;🔒use crate::surface::ViewSurface;🔒
Structs§
- Context
Usage - How full the session’s context window is, from the bridge’s last
answer. Both halves are
Optionbecause the upstream probe reports them independently. - McpServers
- The MCP servers a session’s bridge last reported, and the failure standing beside them when the read did not complete.
- Process
Entry - One descendant process the scanner found alive. Field shape is
driven by what a view’s process row builder needs (PID + cmdline +
memory for the metadata line) + the cmdline-matching needed for
wire-tracked overlay (
process_cmdline_matches_tool_input). - Process
Snapshot - Snapshot of
claude’s descendant processes at one point in time. Always succeeds - failures (sysinfo errors, process gone) collapse to an emptyprocessesvec. - Session
Header - What a session header states about the session.
- Work
Snapshot - A seat’s last scan of its working tree, and when it was taken.
Functions§
- basename_
exe - Strip the executable’s directory from a cmdline headline so the row
reads
cargo nextest run, not/opt/homebrew/bin/cargo nextest run. Only the FIRST token (the executable) is basenamed; args are kept verbatim (they carry the distinguishing detail). A first token with no/(e.g. apostgres: walwriterprocess title) is unchanged. - extract_
inner_ command - Unwrap a shell-wrapper cmdline to the user command inside it.
Recognizes the shape claude wraps Bash tool calls in (captured via
ps -axww):/bin/zsh -c source <snapshot> ... && eval '<CMD>' < /dev/null && pwd -P >| /tmp/claude-<hash>-cwd. The inner command is single-quoted betweeneval 'and' < /dev/null. ReturnsNonewhencmdlineis not a recognized wrapper (non-shell processes pass through unchanged at the call site). - measurement_
of 🔒 - The measurement a refresh’s own answer represents: its state, the instant it was established, and git’s words when it could not run.