swarm-controller: send one operator message to several agents
The swarm UI's broadcast page (#5524) needs the controller to do the fan-out, so POST /api/agents/broadcast takes {agents, body} and answers 200 with {results: [{agent, sent, reason?}]} in request order. - agent_input.rs: the single-agent send is now send_one, which both routes call; the single route maps its outcome to the same statuses and texts as before. The broadcast validates the whole request first (sender, empty body, empty or duplicated agents, more than 64, a name outside the roster), then sends up to 16 at once with the single route's no-responders window. - main.rs: wires the route. - docs/swarm/ui.md: describes the route next to the single-agent one.
This commit is contained in:
parent
ef507b8912
commit
484a9fd4c1
3 changed files with 356 additions and 32 deletions
|
|
@ -3697,6 +3697,7 @@ fn build_app(state: AppState) -> axum::Router {
|
|||
.routes(routes!(subagent_term::stream_subagent_term))
|
||||
.routes(routes!(agent_state_stream::stream_agent_state))
|
||||
.routes(routes!(agent_input::post_agent_input))
|
||||
.routes(routes!(agent_input::post_agents_broadcast))
|
||||
.routes(routes!(agent_control::post_agent_cancel))
|
||||
.routes(routes!(
|
||||
claude_login::post_claude_login,
|
||||
|
|
|
|||
Loading…
Reference in a new issue