Skip to content

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

fix(channels): deliver relay messages when the bus has no subscribers

Steven Enamakel95f5300387cb
diff --git a/crates/openhuman-core/src/channels/bus/delivery.rs b/crates/openhuman-core/src/channels/bus/delivery.rs
index bd092c6e57..f27402365b 100644
--- a/crates/openhuman-core/src/channels/bus/delivery.rs
+++ b/crates/openhuman-core/src/channels/bus/delivery.rs
@@ -123,7 +123,9 @@ impl ManagedTransport {
fn request_channel(request: &ProgressiveTransportRequest) -> &str {
match request {
- ProgressiveTransportRequest::Send { channel, .. }
+ ProgressiveTransportRequest::OutputEvent { channel, .. }
+ | ProgressiveTransportRequest::Send { channel, .. }
+ | ProgressiveTransportRequest::SendTyped { channel, .. }
| ProgressiveTransportRequest::Edit { channel, .. }
| ProgressiveTransportRequest::Delete { channel, .. }
| ProgressiveTransportRequest::Typing { channel, .. } => channel,
diff --git a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs
index 030a6093b0..3f661745d1 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs
@@ -392,7 +392,13 @@ impl Channel for ModuleChannel {
}
fn capabilities(&self) -> tinychannels_bus::ChannelCapabilities {
- self.interaction.capabilities
+ let legacy = self.interaction.capabilities;
+ let mut capabilities = tinychannels_bus::ChannelCapabilities::unknown();
+ capabilities.remote_control = legacy.remote_control;
+ capabilities.chat_approvals = legacy.chat_approvals;
+ capabilities.progressive_edits = legacy.progressive_edits;
+ capabilities.history_key_ignores_thread = legacy.history_key_ignores_thread;
+ capabilities
}
fn supports_reactions(&self) -> bool {
diff --git a/crates/openhuman-core/src/channels/runtime/startup/relay.rs b/crates/openhuman-core/src/channels/runtime/startup/relay.rs
index d44f29551e..45d9b6aaa4 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/relay.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/relay.rs
@@ -29,7 +29,10 @@ impl tinychannels::relay::RelayInboundHandler for RelayInboundMessageHandler {
"invalid inbound envelope: {error}"
))
})?;
- let msg = tinychannels::legacy_message_from_inbound_envelope(&envelope, 0);
+ // Non-text content (voice notes, media) has no legacy projection; the
+ // processor prepares it from the envelope instead.
+ let msg = tinychannels::legacy_message_from_inbound_envelope(&envelope, 0)
+ .unwrap_or_default();
self.tx
.send(RuntimeChannelMessage::with_inbound_envelope(msg, envelope))
.await