rustyclaw_core/threads/mod.rs
1//! Unified Agent Thread System
2//!
3//! All concurrent agent-managed work is represented as threads:
4//! - Chat threads (user-interactive conversations)
5//! - Sub-agent threads (spawned workers)
6//! - Background threads (long-running monitors)
7//! - Task threads (one-shot work that returns a result)
8//!
9//! All threads share:
10//! - Unique ID and label
11//! - Agent-settable description
12//! - Status tracking
13//! - Sidebar visibility
14//! - Event emission on state changes
15
16mod model;
17mod manager;
18mod events;
19pub mod subtask;
20
21pub use model::*;
22pub use manager::*;
23pub use events::*;
24pub use subtask::{
25 SubtaskHandle, SubtaskRegistry, SubtaskResult, SpawnOptions,
26 spawn_subagent, spawn_task, spawn_background,
27};
28
29// Backwards compatibility: TaskId is now ThreadId
30pub type TaskId = ThreadId;