Skip to main content

Module drone_decision

Module drone_decision 

Source
Expand description

The answer a Drone run waits for when it needs attention (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md §3.3, “the step that was in flight”).

After a restart, a step with effects that was running may already have done its work, so the run does not repeat it: it waits, needs_attention, for a person or an agent to say what to do with that step. It lives in the core so the RPC handler can answer without reaching up into drone/; the executor is the one that waits.

Enums§

Decision
What to do with the step that was running. Cancelling the run is not here: it is cancel_run, which ends a waiting run as it ends any other.

Functions§

decide
Answer the run run_id. Err when it is not waiting (it was answered already, it ended, or it never needed attention).
is_waiting
Whether the run run_id is waiting for an answer.
stop_waiting
The run run_id is no longer waiting (it was answered, or it ended).
wait_for_decision
The run run_id is waiting: the receiver gets the answer. A run that waits again replaces its earlier wait.