Watch
0
0
Fork
You've already forked hyperhive
0

remove the needs_update system event: nothing emits it

Refs #5948
This commit is contained in:
atlas 2026-11-01 22:49:01 +01:00
commit 99752f81d9

View file

@ -1,8 +1,6 @@
//! Reserved recipient names/senders and the out-of-band `HelperEvent`
//! payload hive-c0re pushes into the manager's inbox.
//! Reserved recipient names and senders.
use hive_types::Ident;
use serde::{Deserialize, Serialize};
/// Logical name of the human operator: the sender of operator-authored
/// messages. Not a recipient — `send` to it fails with
@ -18,8 +16,7 @@ pub const OPERATOR_SEND_REFUSAL: &str = "send failed: `operator` is not a send r
Without them there is no direct channel to the operator: they read your `set_status` \
line and turn output on the dashboard, and your logs.";
/// Sender hive-c0re uses for events it pushes into the manager's inbox.
/// Manager harness recognises this and parses the body as a `HelperEvent`.
/// Sender hive-c0re uses for messages it pushes into an agent's inbox.
pub const SYSTEM_SENDER: &str = "system";
/// Parse `s` as a [`Ident`] for use as `Message.from`, falling back to
@ -41,17 +38,6 @@ pub fn trusted_sender(s: &str) -> Ident {
.unwrap_or_else(|_| Ident::parse(SYSTEM_SENDER).expect("SYSTEM_SENDER is a valid Ident"))
}
/// Out-of-band events the host-side daemon pushes to the manager's inbox.
/// Serialised as JSON in `Message::body` (sender = `SYSTEM_SENDER`).
/// Per-variant triggers + the optional `sha`/`tag` semantics live in
/// `docs/agent-lifecycle/config-changes.md::Helper events`.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "event", rename_all = "snake_case")]
pub enum HelperEvent {
/// A sub-agent's recorded flake rev is stale relative to hyperhive.
NeedsUpdate { agent: String },
}
#[cfg(test)]
mod reserved_name_tests {
use super::{OPERATOR_RECIPIENT, SYSTEM_SENDER};