Skip to main content

Module input

Module input 

Source
Expand description

StatusContext is the canonical, tool-agnostic model parsed from a statusline JSON payload (Claude Code today; per-tool normalizers are added as other tools wire in). Rate-limit windows live on DataContext::usage() and are not parsed from stdin; see docs/specs/input-schema.md for the full contract.

Structs§

ContextWindow
CostMetrics
GitWorktree
ModelInfo
OutputStyle
Active output style. Kept as a struct (rather than collapsing to Option<String>) so name can later evolve to an enum with a Custom(String) variant without breaking downstream type signatures. See ADR-0008.
Percent
Percentage in 0.0..=100.0. Construction outside that range returns None so normalizers can translate to ParseError::InvalidValue.
SourcePos
StatusContext
The canonical, tool-agnostic input to the rendering pipeline. Arc around raw keeps StatusContext::clone at O(1) when segments cache.
TurnUsage
Per-turn token breakdown from context_window.current_usage. All counts are for the most recent API call only — use ContextWindow’s total_*_tokens for cumulative session values.
WorkspaceInfo

Enums§

EffortLevel
JsonType
ParseError
Tool
VimMode
Vim editing mode reflected from Claude Code’s vim.mode field. Command is Vim’s :-prefix command-line buffer, not “a command was run”.

Functions§

parse
Parse a Claude Code statusline JSON payload into a StatusContext.