Skip to main content

Crate ralph_tui

Crate ralph_tui 

Source
Expand description

§ralph-tui

Terminal user interface for the Ralph Orchestrator framework.

Built with ratatui and crossterm, this crate provides:

  • Read-only observation dashboard for monitoring agent orchestration
  • Real-time display of agent messages and state
  • Keyboard navigation and search

§Data source modes

The TUI operates in three modes:

  1. In-process (default): Embedded in the orchestration loop. Receives events via an EventBus observer closure and streaming output via shared Arc<Mutex<Vec<Line>>> handles.

  2. RPC client: Connects to a running ralph-api server over HTTP/WS and consumes the same RPC v1 stream the web dashboard uses. Start with Tui::connect.

  3. Subprocess RPC: Spawns ralph run --rpc as a subprocess and communicates via JSON lines over stdin/stdout. Start with Tui::spawn.

Re-exports§

pub use rpc_client::RpcClient;
pub use rpc_source::run_rpc_event_reader;
pub use rpc_writer::RpcWriter;
pub use state::TuiState;
pub use text_renderer::text_to_lines;
pub use widgets::footer;
pub use widgets::header;

Modules§

input
Simple key-to-action input handling for observation-only TUI.
rpc_bridge
Bridges RPC v1 stream events into TUI state updates.
rpc_client
RPC v1 client for connecting the TUI to a remote ralph-api server.
rpc_source
RPC event source for reading JSON-RPC events from a subprocess.
rpc_writer
RPC command writer for sending commands to a subprocess.
state
State management for the TUI.
state_mutations
Shared TuiState mutation helpers.
text_renderer
Text-to-lines rendering for TUI display.
update_check
widgets

Structs§

App
Main TUI application for read-only observation.
Tui
Main TUI handle that integrates with the event bus.

Functions§

dispatch_action
Dispatches an action to the TuiState.