Skip to main content

codewhale_core/engine/thread/
mod.rs

1//! `RuntimeThreadManager` split per #3313 (issue #5261).
2//!
3//! The TUI's `crates/tui/src/runtime_threads.rs` (≈8,259 lines, `monitor_turn`
4//! ≈1,035 lines) is the largest file in the tree. The split is pure code
5//! motion, persisted JSON shape unchanged:
6//! - `store` — `RuntimeThreadStore` / persisted JSON state
7//!   (`<root>/{threads,turns,items,events}` + `state.json`)
8//! - `executor` — turn execution (`monitor_turn`, `handle_deepseek_turn`,
9//!   steer/subagent drains, `refresh_system_prompt`, compaction, parallel
10//!   tool exec, `StuckGuard`/`ReadRepeatGuard`/`ToolCallBudget`, stream retry)
11//! - `events` — `RuntimeEventEnvelope` mapping + `EventMsg` fan-out
12//! - `types` — `ThreadId`/`SessionId`, `ThreadStatus`, `Thread` etc
13//!
14//! This cut lands the four files and the re-exports so `crates/tui` can
15//! `pub use codewhale_core::engine::thread::*` and the next slice can `git mv`
16//! the impls file-by-file without a flag day. The behaviour stays in the TUI
17//! until the move completes; `core` already owns the boundary.
18
19pub mod events;
20pub mod executor;
21pub mod store;
22pub mod types;
23
24pub use events::*;
25pub use store::*;
26pub use types::*;