Expand description
In-memory background-task registry.
§Design
When the agent tool is called with run_in_background: true, the
work is spawned into a tokio::task and a TaskId is returned
immediately. The TaskRegistry holds:
- the live
JoinHandle(sotask_stopcan cancel), - the captured
TaskStatus(sotask_get/task_listcan report), - the output buffer (so
task_outputcan stream partial results).
This is in-memory only by design. Tasks do not survive process restart. If a task is still running when the process exits, its output is lost. The spec explicitly calls this out as acceptable for Phase D.
Structs§
- TaskId
- Opaque task ID. Wrapped so callers can’t accidentally pass a random
Stringwhere a task ID is expected. - Task
Registry - Process-wide registry of in-flight background tasks.
- Task
State - Full state of a single background task.
Enums§
- Task
Status - Lifecycle status of a background task.