the swarm controller streams every inter-agent message from the agents' terminal rows
This commit is contained in:
parent
87b1f94ac6
commit
c32906b893
11 changed files with 520 additions and 12 deletions
|
|
@ -7,4 +7,5 @@
|
|||
pub mod agents;
|
||||
pub mod agents_md;
|
||||
pub mod forge;
|
||||
pub mod messages;
|
||||
pub mod schedules;
|
||||
|
|
|
|||
20
swarm-controller-api/src/messages.rs
Normal file
20
swarm-controller-api/src/messages.rs
Normal 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>,
|
||||
}
|
||||
Loading…
Reference in a new issue