Expand description
Terminal statuses — the stop-condition disjunction.
TerminalStatus is the single authority for why a run ended: a run
stops for exactly one of these reasons, and crate::exit maps each to an
exit code. “partial” is not a status — it is a property of the result
body, so a run can complete while still carrying a partial answer; see
Outcome. The two fatal-infra aborts (intelligence unreachable, a
required MCP server down) are aborts rather than variants here: they never
reach a terminal status and short-circuit to exit codes 4 / 6 directly.
Structs§
- Outcome
- A finished run: its terminal status, whether the result body is partial, the distilled result value, and any self-requested future wake-ups / resource (un)subscriptions. This is what a run hands back to its caller — a parent supervisor reads the same shape for a child it spawned.
- Schedule
Request - A future wake-up an agent requested for itself via the
scheduleself-tool. The reactive daemon arms it relative to now and re-invokes the agent withinstructionwhen it fires — the agent setting its own next tick. Honoured only under a long-lived daemon: a one-shot run exits before any “later” could arrive, so the request is carried on the outcome but never armed. - Subscription
Request - A resource (un)subscription an agent requested for itself via the
subscribe/unsubscribe/await_resourceself-tools. The reactive daemon applies it to its live subscriptions + router after the run, so an agent can widen or narrow what wakes it. Honoured only under a daemon. NotEq, because aconditionmay carry a JSON number.