Skip to content

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

feat(channels): add controllers module

Steven Enamakel2303d36b57a3
diff --git a/crates/openhuman-core/src/channels/controllers/mod.rs b/crates/openhuman-core/src/channels/controllers/mod.rs
index 4ea5019e70..63ef974091 100644
--- a/crates/openhuman-core/src/channels/controllers/mod.rs
+++ b/crates/openhuman-core/src/channels/controllers/mod.rs
@@ -12,10 +12,16 @@ pub use definitions::{
ChannelCapability, ChannelDefinition, FieldRequirement,
};
-pub use schemas::{
- all_controller_schemas as all_channels_controller_schemas,
- all_registered_controllers as all_channels_registered_controllers,
-};
+pub use schemas::all_controller_schemas as all_channels_controller_schemas;
+
+/// Every controller of the channels domain: the `channels.*` connection
+/// management above, plus the hosted-channel relay
+/// (`channel.relay_inbound`, `providers::relay`).
+pub fn all_channels_registered_controllers() -> Vec<crate::core::all::RegisteredController> {
+ let mut controllers = schemas::all_registered_controllers();
+ controllers.extend(crate::channels::providers::relay::all_relay_registered_controllers());
+ controllers
+}
/// Cross-module helpers from the channel controller layer that callers
/// outside the controller registry need (e.g. the welcome agent's
diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rs
index 91ba88cb25..3c400bee05 100644
--- a/crates/openhuman-core/src/core/all.rs
+++ b/crates/openhuman-core/src/core/all.rs
@@ -501,14 +501,6 @@ fn build_registered_controllers() -> Vec<GroupedController> {
DomainGroup::Channels,
crate::channels::controllers::all_channels_registered_controllers(),
);
- // Messages a gateway relays in from a hosted chat platform
- // (`channel.relay_inbound`), run on the caller's own channel threads.
- #[cfg(feature = "channels")]
- push(
- &mut controllers,
- DomainGroup::Channels,
- crate::channels::providers::relay::all_relay_registered_controllers(),
- );
// Persistent configuration management
push(
&mut controllers,