Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-core/src/core/bus.rs,crates/openhuman-core/src/core/bus_tests.

Steven Enamakelf744de5ae4a3
diff --git a/crates/openhuman-core/src/core/bus.rs b/crates/openhuman-core/src/core/bus.rs
index 90dbbbeeed..7fa32919a0 100644
--- a/crates/openhuman-core/src/core/bus.rs
+++ b/crates/openhuman-core/src/core/bus.rs
@@ -96,7 +96,9 @@ pub const EVENTS_INTERFACE: &str = "ai.tinyhumans.openhuman.Events";
/// subscriber rebuilds its dispatch context from it instead of reading an
/// ambient one.
/// `2.0.0` retires the obsolete desktop push-to-talk transcript event.
-pub const EVENTS_VERSION: Version = Version::new(2, 0, 0);
+/// `2.1.0` adds the inbound event queue variants `InboundEventDropped`,
+/// `InboundDeferred` and `InboundDeadLettered` (additive).
+pub const EVENTS_VERSION: Version = Version::new(2, 1, 0);
/// The bus. Initialised once by [`init`]; safe to touch before that.
pub static BUS: OnceBus<DomainEvent> = OnceBus::new();
diff --git a/crates/openhuman-core/src/core/bus_tests.rs b/crates/openhuman-core/src/core/bus_tests.rs
index e2e8f0afc9..4f2f0b2aa9 100644
--- a/crates/openhuman-core/src/core/bus_tests.rs
+++ b/crates/openhuman-core/src/core/bus_tests.rs
@@ -24,7 +24,7 @@ fn the_manifest_declares_the_catalog_in_both_directions() {
#[test]
fn removing_an_event_advances_the_catalog_major_version() {
- assert_eq!(EVENTS_VERSION, tinybus::Version::new(2, 0, 0));
+ assert_eq!(EVENTS_VERSION, tinybus::Version::new(2, 1, 0));
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/core/events.rs b/crates/openhuman-core/src/core/events.rs
index 6867f8f093..0a5fb7689f 100644
--- a/crates/openhuman-core/src/core/events.rs
+++ b/crates/openhuman-core/src/core/events.rs
@@ -971,6 +971,39 @@ pub enum DomainEvent {
routed: bool,
},
+ // ── Inbound event queues ────────────────────────────────────────────
+ /// The inbound event queues ended an event without delivering it: a
+ /// redelivery of an event already taken, a gate or noise filter, or an
+ /// invalid envelope. `source` is the module source (`composio:<toolkit>`,
+ /// `webhook:<tunnel>`); `event_id` is the source's own id.
+ InboundEventDropped {
+ source: String,
+ event_id: String,
+ /// The module's reason, snake case (e.g. `duplicate`, `noise`).
+ reason: String,
+ },
+ /// Triage of a queued inbound event asked to run again later; the queue
+ /// redelivers it at `defer_until_ms` instead of dropping it.
+ InboundDeferred {
+ source: String,
+ event_id: String,
+ /// Unix epoch milliseconds the triage asked to run again at.
+ defer_until_ms: i64,
+ /// Already scrubbed; safe to log.
+ reason: String,
+ },
+ /// A queued inbound event will not be delivered: triage reached a terminal
+ /// state, or the delivery ran out of attempts. It is parked in the
+ /// dead-letter queue (`inbound.dead`, `inbound.redrive`).
+ InboundDeadLettered {
+ source: String,
+ event_id: String,
+ /// The delivery attempt that gave up.
+ attempt: u32,
+ /// Already scrubbed; safe to log.
+ detail: String,
+ },
+
// ── Device pairing ──────────────────────────────────────────────────
/// A mobile device completed the X25519 handshake and is now paired.
DevicePaired {
@@ -1406,6 +1439,10 @@ impl DomainEvent {
Self::NotificationIngested { .. } | Self::NotificationTriaged { .. } => "notification",
+ Self::InboundEventDropped { .. }
+ | Self::InboundDeferred { .. }
+ | Self::InboundDeadLettered { .. } => "inbound",
+
Self::DevicePaired { .. }
| Self::DeviceRevoked { .. }
| Self::DevicePeerOnline { .. }
@@ -1530,6 +1567,9 @@ impl DomainEvent {
Self::TriggerEscalationFailed { .. } => "TriggerEscalationFailed",
Self::NotificationIngested { .. } => "NotificationIngested",
Self::NotificationTriaged { .. } => "NotificationTriaged",
+ Self::InboundEventDropped { .. } => "InboundEventDropped",
+ Self::InboundDeferred { .. } => "InboundDeferred",
+ Self::InboundDeadLettered { .. } => "InboundDeadLettered",
Self::DevicePaired { .. } => "DevicePaired",
Self::DeviceRevoked { .. } => "DeviceRevoked",
Self::DevicePeerOnline { .. } => "DevicePeerOnline",