Skip to main content

trusty_code/tui_client/
mod.rs

1//! `CodeEngine` — the `trusty-code-tui` engine adapter for `tcode tui` (issue
2//! #3415, DOC-50 §3.3/§3.4; retransported onto the daemon's Unix socket in
3//! #6637).
4//!
5//! Why: see `crate::tui_client`'s doc comment on the `pub mod tui_client;`
6//! declaration in `lib.rs` for the full rationale (ephemeral `--stdio` CLI
7//! client vs. long-lived daemon client).
8//! What: [`uds_rpc`] (the framed JSON-RPC client over the daemon socket),
9//! [`error::EngineError`] (this module's unified error type), and
10//! [`engine::CodeEngine`] (the `trusty_code_tui::TuiEngine` impl itself — the
11//! module most callers want).
12//!
13//! `discovery`, `rpc` and `sse` are gone (#6637). Discovery answered "which
14//! `TCODE_DAEMON_URL` or `http_addr` file names a live daemon"; the socket path
15//! is derived from the data directory, so there is nothing to discover. `rpc`
16//! and `sse` were the HTTP and Server-Sent-Events halves, replaced by
17//! [`uds_rpc::UdsRpcClient::call`] and [`uds_rpc::UdsRpcClient::open_stream`].
18//! Test: see each submodule's own docs; the full engine flow against a real
19//! daemon socket lives in `tests/tui_client_engine.rs`.
20//!
21//! [`uds_rpc`]: crate::tui_client::uds_rpc
22//! [`error::EngineError`]: crate::tui_client::error::EngineError
23//! [`engine::CodeEngine`]: crate::tui_client::engine::CodeEngine
24//! [`uds_rpc::UdsRpcClient::call`]: crate::tui_client::uds_rpc::UdsRpcClient::call
25//! [`uds_rpc::UdsRpcClient::open_stream`]: crate::tui_client::uds_rpc::UdsRpcClient::open_stream
26
27pub mod engine;
28mod engine_state;
29pub mod error;
30mod prompter_claim;
31mod session_events;
32mod splash;
33pub mod uds_rpc;
34mod workstream_subscription;
35
36pub use engine::{CancelOutcome, CodeEngine};
37pub use error::EngineError;