Expand description
CodeEngine — the trusty-code-tui engine adapter driving a long-lived
tcode serve daemon for the interactive tcode tui (#3415, DOC-50
§3.3/§3.4, epic #3411 Slice 3; retransported onto the daemon’s Unix socket
in #6637).
Why: cli_client (above) spawns an EPHEMERAL --stdio child per CLI
invocation — the right shape for one-shot commands, wrong for an
interactive REPL that needs to hold a session open, stream responses
live, and observe workstream activation pushed from OTHER clients. This
module is the daemon counterpart: a thin trusty_code_tui::TuiEngine
implementation that dials the daemon’s socket and translates its responses
into trusty_code_tui::ReplEvents — no business logic of its own (DOC-39
§2.1 thin-client axiom).
What: tui_client::uds_rpc (the framed JSON-RPC client, unary calls and
streams) and tui_client::engine::CodeEngine (the TuiEngine impl
itself). The discovery/rpc/sse trio went with the HTTP transport —
the socket path is derived rather than discovered, and the two SSE routes
are now the session.events and workstream.events stream methods.
Test: tui_client::*::tests for the pure helpers; the full
setup/stream/cancel/workstream-activation flow against a real daemon socket
in tests/tui_client_engine.rs.
CodeEngine — the trusty-code-tui engine adapter for tcode tui (issue
#3415, DOC-50 §3.3/§3.4; retransported onto the daemon’s Unix socket in
#6637).
Why: see crate::tui_client’s doc comment on the pub mod tui_client;
declaration in lib.rs for the full rationale (ephemeral --stdio CLI
client vs. long-lived daemon client).
What: uds_rpc (the framed JSON-RPC client over the daemon socket),
error::EngineError (this module’s unified error type), and
engine::CodeEngine (the trusty_code_tui::TuiEngine impl itself — the
module most callers want).
discovery, rpc and sse are gone (#6637). Discovery answered “which
TCODE_DAEMON_URL or http_addr file names a live daemon”; the socket path
is derived from the data directory, so there is nothing to discover. rpc
and sse were the HTTP and Server-Sent-Events halves, replaced by
uds_rpc::UdsRpcClient::call and uds_rpc::UdsRpcClient::open_stream.
Test: see each submodule’s own docs; the full engine flow against a real
daemon socket lives in tests/tui_client_engine.rs.
Re-exports§
pub use engine::CancelOutcome;pub use engine::CodeEngine;pub use error::EngineError;
Modules§
- engine
CodeEngine: thetrusty_code_tui::TuiEngineadapter driving a long-livedtcode servedaemon over its Unix socket (issue #3415, DOC-50 §3.3/§3.4; retransported in #6637).- error
EngineError:crate::tui_client::CodeEngine’s unified error type.- uds_rpc
UdsRpcClient: the JSON-RPC clienttcode tuidrives the daemon with, over the daemon’s hardened Unix socket (#6637).