The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(channels): thread preparation mode through inbound dispatch
Steven Enamakel9d5265199989
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex adaae71c27..d50e0eb97b 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -24,12 +24,13 @@ use super::RuntimeChannelMessage;fn channel_inbound_preparation_request(source: tinychannels_bus::module_inbound::ChannelInboundSource,+ preparation_mode: tinychannels_bus::module_inbound::ChannelInboundPreparationMode,) -> tinychannels_bus::module_inbound::PrepareChannelInboundRequest {tinychannels_bus::module_inbound::PrepareChannelInboundRequest {source,namespace: "main".into(),session_policy: Default::default(),- preparation_mode: Default::default(),+ preparation_mode,}}@@ -66,7 +67,10 @@ pub(crate) async fn process_channel_runtime_message(};match crate::modules::channel_controller::prepare_inbound(&crate::channels::context::module_client(&ctx).await,- channel_inbound_preparation_request(source),+ channel_inbound_preparation_request(+ source,+ tinychannels_bus::module_inbound::ChannelInboundPreparationMode::LegacyText,+ ),).await{diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn_tests.rsindex 69552cbc3e..82f1115340 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn_tests.rs@@ -42,10 +42,13 @@ async fn native_inbound_preparation_preserves_image_envelope_for_typed_turns() {..Default::default()};- let request = channel_inbound_preparation_request(ChannelInboundSource::Envelope {- envelope: envelope.clone(),- timestamp: 1,- });+ let request = channel_inbound_preparation_request(+ ChannelInboundSource::Envelope {+ envelope: envelope.clone(),+ timestamp: 1,+ },+ tinychannels_bus::module_inbound::ChannelInboundPreparationMode::Typed,+ );let prepared: PreparedChannelInbound = crate::modules::channel_controller::prepare_inbound(&crate::channels::module_fixture::client().await,request,@@ -58,4 +61,17 @@ async fn native_inbound_preparation_preserves_image_envelope_for_typed_turns() {assert_eq!(prepared.envelope.conversation, envelope.conversation);assert_eq!(prepared.envelope.message_id, "provider-message-7");assert!(prepared.message.content.is_empty());++ let legacy = crate::modules::channel_controller::prepare_inbound(+ &crate::channels::module_fixture::client().await,+ channel_inbound_preparation_request(+ ChannelInboundSource::Envelope {+ envelope,+ timestamp: 1,+ },+ Default::default(),+ ),+ )+ .await;+ assert!(legacy.is_err(), "legacy callers must still reject rich-only input");}