pub fn wake_action(
drained: &[DrainedEvent],
messages: &[SharedMessage],
busy: bool,
auto_turn_enabled: bool,
consecutive_auto_turns: u32,
) -> WakeActionExpand description
Decide what the caller should do after draining the queue.
Rules (in order):
- Nothing drained →
Nothing. - Any
Injectedevent + idle + auto-turn enabled + last message isrole=user+ consecutive cap not reached →RunTurn. - Otherwise →
Forward(show events; caller may still steer/display).
Convenience wrapper over wake_action_with_cap using the default
AUTO_TURN_CAP. Production callers should pass the configured cap.