Skip to content

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

refactor(runtime): adjust message processing flow

Steven Enamakel67194dab57d6
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor.rs
index e75bdfe458..0d5eb6b29c 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor.rs
@@ -86,7 +86,11 @@ impl From<ChannelMessage> for RuntimeChannelMessage {
#[cfg(test)]
pub(crate) use approval::channel_has_approval_surface;
pub(crate) use reset::reset_durable_channel_session;
-pub(crate) use turn::{process_channel_message, process_channel_runtime_message};
+pub(crate) use turn::process_channel_runtime_message;
+
+pub(crate) async fn process_channel_message(ctx: Arc<ChannelRuntimeContext>, msg: ChannelMessage) {
+ process_channel_runtime_message(ctx, RuntimeChannelMessage::from(msg)).await;
+}
/// Run every inbound message through the agent pipeline, at most
/// `max_in_flight_messages` at a time, until `rx` closes.
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
index 9925e83fab..856fa5fffd 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
@@ -25,13 +25,6 @@ use super::super::host_agent::{self, HostRoute};
use super::approval::{channel_has_approval_surface, try_route_approval_reply};
use super::RuntimeChannelMessage;
-pub(crate) async fn process_channel_message(
- ctx: Arc<ChannelRuntimeContext>,
- msg: traits::ChannelMessage,
-) {
- process_channel_runtime_message(ctx, RuntimeChannelMessage::from(msg)).await;
-}
-
pub(crate) async fn process_channel_runtime_message(
ctx: Arc<ChannelRuntimeContext>,
runtime_msg: RuntimeChannelMessage,