cobre_tui/lib.rs
1//! # cobre-tui
2//!
3//! Interactive terminal UI for the [Cobre](https://github.com/cobre-rs/cobre) power systems solver.
4//!
5//! Provides real-time training monitoring, convergence visualization, cut
6//! inspection, and simulation progress tracking using `ratatui` and `crossterm`.
7//! Consumed by `cobre-cli` as a library.
8//!
9//! ## Consumption modes
10//!
11//! - **Co-hosted** — in-process broadcast channel subscription within the
12//! `cobre` binary, activated by `cobre run --tui`. Renders on rank 0
13//! alongside the training loop.
14//! - **Standalone pipe** — reads JSON-lines from stdin, e.g.:
15//! `mpiexec cobre run ... --output-format json-lines | cobre-tui`
16//! Enables monitoring of remote or already-running jobs.
17//!
18//! Both modes consume the same event types defined in `cobre-core`.
19//!
20//! ## Design principles
21//!
22//! - **Depends only on `cobre-core`** for event type definitions. No solver,
23//! IO, or stochastic dependencies.
24//! - **Iteration-boundary safety**: all interactive operations (pause, inspect,
25//! adjust stopping rules) operate at iteration boundaries only.
26//!
27//! ## Status
28//!
29//! This crate is in early development. The API **will** change.
30//!
31//! See the [repository](https://github.com/cobre-rs/cobre) for the full roadmap.