pub enum BusFrameV1 {
Show 22 variants
Hello {
instance_id: String,
agents: Vec<BusAgentV1>,
cursors: BTreeMap<String, u64>,
},
Presence {
agent_id: String,
state: PresenceState,
profile: Option<PresenceProfileV1>,
},
Publish {
client_msg_id: String,
channel: String,
to: Option<String>,
from: String,
kind: String,
priority: BusPriority,
privacy: BusPrivacy,
body: Value,
},
Ack {
channel: String,
seq: u64,
},
Published {
client_msg_id: String,
channel: String,
seq: u64,
server_time: UtcTimestamp,
},
Deliver {
seq: u64,
channel: String,
from: String,
to: Option<String>,
kind: String,
priority: BusPriority,
privacy: BusPrivacy,
body: Value,
server_time: UtcTimestamp,
},
PresenceUpdate {
agent_id: String,
instance_id: String,
role: String,
vault_id: String,
state: PresenceState,
server_time: UtcTimestamp,
profile_id: Option<String>,
profile: Option<PresenceProfileV1>,
},
Control {
control_id: String,
target_agent: Option<String>,
target_ref: Option<String>,
action: ControlAction,
reason: String,
issued_by: String,
seq: u64,
server_time: UtcTimestamp,
},
HandoffOffer {
handoff_id: String,
channel: String,
from: String,
to: String,
bundle_ref: String,
deadline: UtcTimestamp,
},
HandoffAck {
handoff_id: String,
by: String,
},
HandoffReject {
handoff_id: String,
by: String,
reason: String,
},
Message(AgentMessageV1),
MessageStored(MessageStoredV1),
MessageDeliver(MessageDeliveryV1),
MessageReceipt(MessageReceiptV1),
MessageStatus(MessageStatusV1),
TaskEvent(TaskEventV1),
KnowledgeEvent(KnowledgeEventV1),
Ping {
nonce: u64,
},
Pong {
nonce: u64,
},
Error {
client_msg_id: Option<String>,
error: HiveErrorDetailV1,
},
Unknown,
}Expand description
One WebSocket frame (also the items of BusPollV1).
Variants§
Hello
client → service, first frame.
Fields
agents: Vec<BusAgentV1>Presence
client → service.
Fields
state: PresenceStateprofile: Option<PresenceProfileV1>1.9 (section 5): the agent’s self-reported profile.
Publish
client → service.
Ack
client → service: everything up to seq on channel is processed.
Published
service → client: a publish was stored.
Deliver
service → client.
PresenceUpdate
service → client.
Fields
state: PresenceStateserver_time: UtcTimestampprofile: Option<PresenceProfileV1>1.9 (section 5): what the agent announced.
Control
service → client.
HandoffOffer
either direction.
Fields
deadline: UtcTimestampHandoffAck
receiver → service → offerer.
HandoffReject
receiver → service → offerer.
Message(AgentMessageV1)
1.9 (section 2), client → service: an agent message.
MessageStored(MessageStoredV1)
1.9, service → sender: the message was stored (its gid).
MessageDeliver(MessageDeliveryV1)
1.9, service → client.
MessageReceipt(MessageReceiptV1)
1.9, client → service: delivered or read.
MessageStatus(MessageStatusV1)
1.9, service → sender.
TaskEvent(TaskEventV1)
1.9, service → client: a task changed (section 1).
KnowledgeEvent(KnowledgeEventV1)
1.9, service → client: a knowledge revision was released, quarantined or rolled back (section 3).
Ping
Pong
Error
service → client: a frame was refused; the socket stays open.
Unknown
A frame type this engine does not know; ignored.
Implementations§
Source§impl BusFrameV1
impl BusFrameV1
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Checks the service applies to client frames (and the engine before sending).