pub fn wake_text_for(
task: &SessionTask,
transition: TaskTransition,
) -> Option<String>Expand description
Render the wake text for a task transition under the task’s wake_policy.
Returns None when the policy does not wake on this transition (so the
caller enqueues nothing). This encodes the same gating the between-turn
waker uses (DbSessionTaskRegistry::maybe_wake_*) so mid-turn and
between-turn delivery agree on when a wake fires:
Silent— never.OnTerminal— only on a terminal transition.OnActivity— terminal,awaiting_input, and outbound messages.
The text is rendered purely from the task snapshot: the terminal summary / result path, the awaiting-input prompt, or the latest progress / detail for a message. The full message thread stays in the task record; the wake tells the agent to look.