Expand description
Task Lifecycle Management
Provides unified Task abstraction for all operations in a3s-code. This module brings together tool calls, agents, workflows, and background tasks under a common lifecycle management framework.
§Task Types
Tool- Direct tool executionAgent- Sub-agent executionWorkflow- DAG-based workflow executionIdle- Memory consolidation task
§Example
ⓘ
use a3s_code_core::task::{TaskManager, TaskId, TaskType};
let manager = TaskManager::new();
let task_id = manager.spawn(Task {
kind: TaskType::Tool { name: "read".into(), args: json!({"file_path": "test.txt"}) },
..Default::default()
});
let result = manager.wait(task_id).await;Re-exports§
pub use coordinator::Coordinator;pub use idle::IdlePhase;pub use idle::IdleTask;pub use idle::IdleTurn;pub use manager::TaskManager;pub use manager::TaskResult;pub use progress::AgentProgress;pub use progress::ProgressTracker;pub use progress::TaskTokenUsage;pub use progress::ToolActivity;pub use types::Task;pub use types::TaskId;pub use types::TaskStatus;pub use types::TaskType;
Modules§
- coordinator
- Coordinator - Multi-agent Task Coordination
- idle
- Idle Task - Explicit Memory Consolidation
- manager
- Task Manager - Centralized Task Lifecycle Management
- progress
- Progress Tracking for Task Execution
- types
- Task Types and Definitions