Expand description
Structured task ownership for attached agent work.
This module deliberately knows nothing about prompts, models, ACP, or transports. It owns only the facts required to make a child lifecycle finite and observable: an owner, a cancellation signal, a terminal result, and a supervisor that remains responsive while work runs.
Structs§
- Cancellation
- A cancellation observation passed to task work.
- Supervisor
- The lifecycle supervisor. It is an actor-style command loop: state changes are synchronous inside the loop, while task work runs outside it. This is what keeps cancellation, completion, and control messages moving while a caller waits for a child.
- Task
Context - Context given to one task’s work function.
- Task
Handle - A capability for observing and cancelling one task. Cloning a handle does not clone or rerun the work; all handles observe the same terminal record.
- TaskId
- An identifier unique within one
Supervisor.
Enums§
- Lifecycle
Error - Errors returned while creating or controlling a task.
- Task
State - The only states a task can expose.
Runningis non-terminal; every other state is terminal and is published at most once. - Wait
Error - Errors returned by a bounded wait. A timed-out wait is safe to retry: the task’s terminal state remains in the supervisor and is never consumed.