a3s_code_core/task/mod.rs
1//! Task Lifecycle Management
2//!
3//! Provides unified Task abstraction for all operations in a3s-code.
4//! This module brings together tool calls, agents, workflows, and background
5//! tasks under a common lifecycle management framework.
6//!
7//! ## Task Types
8//!
9//! - `Tool` - Direct tool execution
10//! - `Agent` - Sub-agent execution
11//! - `Workflow` - DAG-based workflow execution
12//! - `Idle` - Memory consolidation task
13//!
14//! ## Example
15//!
16//! ```rust,ignore
17//! use a3s_code_core::task::{TaskManager, TaskId, TaskType};
18//!
19//! let manager = TaskManager::new();
20//! let task_id = manager.spawn(Task {
21//! kind: TaskType::Tool { name: "read".into(), args: json!({"file_path": "test.txt"}) },
22//! ..Default::default()
23//! });
24//!
25//! let result = manager.wait(task_id).await;
26//! ```
27
28pub mod coordinator;
29pub mod idle;
30pub mod manager;
31pub mod progress;
32pub mod types;
33
34pub use coordinator::Coordinator;
35pub use idle::{IdlePhase, IdleTask, IdleTurn};
36pub use manager::{TaskManager, TaskResult};
37pub use progress::{AgentProgress, ProgressTracker, TaskTokenUsage, ToolActivity};
38pub use types::{Task, TaskId, TaskStatus, TaskType};