Skip to main content

Module stop

Module stop 

Source
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.
ScheduleRequest
A future wake-up an agent requested for itself via the schedule self-tool. The reactive daemon arms it relative to now and re-invokes the agent with instruction when 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.
SubscriptionRequest
A resource (un)subscription an agent requested for itself via the subscribe/unsubscribe/await_resource self-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. Not Eq, because a condition may carry a JSON number.

Enums§

SubscriptionAction
TerminalStatus