algocline_engine/execution/mod.rs
1//! `algocline-engine::execution` — v2 execution module.
2//!
3//! Provides the engine-level session lifecycle machinery:
4//!
5//! - [`SessionRecord`] — per-session ownership bundle (state, broadcast tx,
6//! cancellation token, join handle, response senders).
7//! - [`SessionRegistryV2`] — registry that spawns, tracks, and controls v2
8//! sessions (coexists with the legacy `SessionRegistry` in `session.rs`).
9//! - [`driver_loop`] — background async fn that drives a session to completion,
10//! embedding the four cooperative cancellation checkpoints (Crux R2).
11//! - [`BroadcastObserverHandle`] — concrete [`algocline_core::execution::ObserverHandle`]
12//! implementation backed by a `broadcast::Receiver<ProgressEvent>` (Crux R3).
13//!
14//! # Design invariants
15//!
16//! - **Crux R1**: No `rmcp::*`, `progressToken`, `_meta`, `notifications/*`, or
17//! `mcp_`-prefixed identifiers in this module tree.
18//! - **Crux R2**: Cancellation uses `CancellationToken::cancel()` only;
19//! `JoinHandle::abort()` and process-kill paths are absent.
20//! - **Crux R3**: `observe()` is sync and returns a valid handle even with zero
21//! pre-registered observers (sink-free fan-out).
22
23mod driver;
24mod observer;
25mod record;
26mod registry;
27
28pub use observer::BroadcastObserverHandle;
29pub use record::SessionRecord;
30pub use registry::SessionRegistryV2;