Skip to main content

broadcast_turn_message

Function broadcast_turn_message 

Source
pub fn broadcast_turn_message(
    target_agent: &str,
    recipients: usize,
    msg_id: &str,
    body: &str,
) -> String
Expand description

The text an agent receives for one target of a Swarm broadcast: a one-line header, then the body.

[BROADCAST:FROM=user VIA=swarm TO=agent1 RECIPIENTS=7 MSGID=<id> TS=<unix secs>]
<what the user typed>

This is deliberately not a jekt: a broadcast is the human typing once to several panes, so it travels the user-turn path and carries no TIER, TRUST or ESCALATE. Only srv writes this header — neutralize_markers rewrites [BROADCAST: (and [JEKT:) inside every delivered body, so a jekt, a chat-bridge message or the broadcast text itself cannot forge one. See docs/specs/SPEC_SWARM_BROADCAST_AS_USER_MESSAGE_2026_10_01.md.