Watch
0
0
Fork
You've already forked hyperhive
0

the swarm controller streams every inter-agent message from the agents' terminal rows

This commit is contained in:
atlas 2026-10-18 17:27:32 +02:00
commit c32906b893
11 changed files with 520 additions and 12 deletions

View file

@ -7,4 +7,5 @@
pub mod agents;
pub mod agents_md;
pub mod forge;
pub mod messages;
pub mod schedules;

View file

@ -0,0 +1,20 @@
//! `GET /api/messages/stream`: the swarm-wide message feed.
use serde::{Deserialize, Serialize};
/// One message between two parties, as one event of `GET /api/messages/stream`.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]
pub struct SwarmMessage {
/// When the sender's terminal row was stamped, ISO 8601 / RFC 3339 UTC.
pub ts: String,
/// An agent, or a non-agent sender such as `reminder`, `compact` or the
/// operator's name.
pub from: String,
/// The receiving agent.
pub to: String,
pub body: String,
/// `markdown` or `diff`; absent for plain text.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub body_format: Option<String>,
}