pub fn decide(inputs: &StateInputs<'_>) -> Option<AgentState>Expand description
The state, or None when nothing tracks this agent’s turns (a terminal
pane: shell / cmd, or any controller that isn’t an agent’s) or its
process state is unknown. Saying nothing beats a wrong idle.
A turn wins over everything, as in the process broker’s lifecycle_from:
a turn that runs is evidence the agent can work. Then a usage limit that
hasn’t reset (or whose reset isn’t known) is limited, and a refused
sign-in signed_out, whatever the process state: anything started on that
account fails the same way. Other failure classes are transient and don’t
change the state. The subprocess controller runs one process per turn, so
its process exiting cleanly between turns is idle, not stopped.