Skip to main content

deliver_person_broadcast

Function deliver_person_broadcast 

Source
pub(crate) async fn deliver_person_broadcast(
    deps: &AgentTurnDeps,
    block_id: String,
    text: String,
    from: MessageOrigin,
) -> Result<(), String>
Expand description

One target of a Swarm broadcast: the person’s words. To an agent that can work they go as a turn; to one out of quota by its plan they are kept and its check starts at once, instead of being refused (resolve_pending then waits for the check, for every such target together); any other agent that cannot work refuses them as before. Only this path keeps: a task start or an agent’s message to a limited agent (deliver_broadcast_turn) still refuses, since it undoes its work on a refusal.