feat(runtime): add TaskRegistry — in-memory task lifecycle management

Implements the runtime backbone for TaskCreate/TaskGet/TaskList/TaskStop/
TaskUpdate/TaskOutput tool surface parity. Thread-safe (Arc<Mutex>) registry
supporting:

- Create tasks with prompt/description
- Status transitions (Created → Running → Completed/Failed/Stopped)
- Message passing (update with user messages)
- Output accumulation (append_output for subprocess capture)
- Team assignment (for TeamCreate orchestration)
- List with optional status filter
- Remove/cleanup

7 new unit tests covering all CRUD + error paths.
Next: wire registry into tool dispatch to replace current stubs.
This commit is contained in:
Jobdori
2026-04-03 17:18:22 +09:00
parent a98f2b6903
commit 5ea138e680
2 changed files with 336 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ mod remote;
pub mod sandbox;
mod session;
mod sse;
pub mod task_registry;
mod usage;
pub use bash::{execute_bash, BashCommandInput, BashCommandOutput};