Expand description
App module — event loop, state, input dispatch, render.
The App entry point takes a shared EngineState handle
(fed by a WsSubscriber owned elsewhere) and a
zero_commands::DispatchContext, then runs the TUI event
loop until the operator exits.
Re-exports§
pub use mode::Mode;pub use session::SessionSink;pub use state::ActiveOverlay;pub use state::AppState;pub use state::FrictionOutcome;pub use state::FrictionPause;
Modules§
- event_
ring - Bounded ring of
EngineEvents for the live-stream pane. - input
- Input translation — turn crossterm key events into app state
mutations. Isolated from the event loop so unit tests can drive
keystrokes directly against an
AppState. - log
- Conversation log — append-only list of entries the operator has seen. The widget renders the tail that fits the visible area.
- mode
- The five modes (ADR-015).
Calibration,Scars,Risk, andNetworkare overlays dispatched byzero-commands, not modes. - picker
- Slash-command picker — live-filtered list of commands the operator can tab-complete into the prompt.
- prompt
- Prompt buffer — backing state for the prompt widget.
- render
- Top-level render — composes status bar, prompt, and the per-mode pane into a single frame.
- session
- Session glue — adapts
zero_session::Storeto the TUI. - state
- Top-level app state — composed of mode, conversation log, prompt buffer, and a shared handle to the engine-state mirror.
- terminal
- RAII wrapper around the crossterm terminal — enters raw mode + alternate screen on construction, restores on drop.