Skip to content

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

feat(channels): add configured channel to route context

Steven Enamakeled69ffc94489
diff --git a/crates/openhuman-core/src/channels/routes.rs b/crates/openhuman-core/src/channels/routes.rs
index d9972eb559..02cbc369b7 100644
--- a/crates/openhuman-core/src/channels/routes.rs
+++ b/crates/openhuman-core/src/channels/routes.rs
@@ -204,6 +204,12 @@ where
},
history_len,
session_scope: reset_scope.map(Box::new),
+ configured_channel: target_channel
+ .filter(|channel| channel.name() == msg.channel)
+ .map(|channel| tinychannels_bus::module_control::ConfiguredControlChannel {
+ name: channel.name().to_owned(),
+ capabilities: channel.capabilities(),
+ }),
providers: provider_descriptors(),
},),
)
diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rs
index a01219a0b3..8863ed337f 100644
--- a/crates/openhuman-core/src/channels/routes_tests.rs
+++ b/crates/openhuman-core/src/channels/routes_tests.rs
@@ -117,6 +117,7 @@ async fn module_route_help_response(
},
history_len: 0,
session_scope: None,
+ configured_channel: None,
providers,
};
let response: ChannelControlResult = crate::channels::module_fixture::client()