Skip to content

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

feat(web_chat): add egress surface and progress bridge

Steven Enamakel9b7c41c40085
diff --git a/crates/openhuman-core/src/web_chat/egress_surface.rs b/crates/openhuman-core/src/web_chat/egress_surface.rs
index 16a728f232..33f071a197 100644
--- a/crates/openhuman-core/src/web_chat/egress_surface.rs
+++ b/crates/openhuman-core/src/web_chat/egress_surface.rs
@@ -94,7 +94,7 @@ impl EventHandler<DomainEvent> for EgressSurfaceSubscriber {
descriptor.reason,
request_id,
);
- publish_web_channel_event(WebChannelEvent {
+ publish_web_channel_event(&crate::core::runtime::DispatchCtx::ambient(), WebChannelEvent {
event: "external_transfer_pending".to_string(),
client_id: client_id.clone(),
thread_id: thread_id.clone(),
diff --git a/crates/openhuman-core/src/web_chat/progress_bridge.rs b/crates/openhuman-core/src/web_chat/progress_bridge.rs
index 93a83effd3..c1b1cf1178 100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge.rs
@@ -549,6 +549,7 @@ pub(crate) fn spawn_progress_bridge(
// once it calls a tool — flush it as an interim bubble so it
// persists interleaved with the tool activity.
flush_interim_narration(
+ &dispatch_ctx,
&mut pending_narration,
iteration,
&client_id,
@@ -1082,6 +1083,7 @@ pub(crate) fn spawn_progress_bridge(
// sub-agent attribution shows up.
if turn_cost_throttle.should_emit() {
publish_seq_stamped(
+ &dispatch_ctx,
&mut emit_seq,
WebChannelEvent {
event: "turn_cost".to_string(),