Skip to content

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

build(channels): gate runtime modules behind channels feature

Steven Enamakel087f2ad8e88f
diff --git a/crates/openhuman-core/src/channels/runtime/mod.rs b/crates/openhuman-core/src/channels/runtime/mod.rs
index 1578957d72..1784fa26cf 100644
--- a/crates/openhuman-core/src/channels/runtime/mod.rs
+++ b/crates/openhuman-core/src/channels/runtime/mod.rs
@@ -1,30 +1,39 @@
//! Channel runtime entry points.
+#[cfg(feature = "channels")]
pub(crate) mod dispatch;
+#[cfg(feature = "channels")]
pub(crate) mod session;
+#[cfg(feature = "channels")]
mod startup;
pub(crate) mod turn_driver;
-#[cfg(test)]
+#[cfg(all(test, feature = "channels"))]
pub(crate) use startup::prepare_module_runtime_for_test_in_context;
+#[cfg(feature = "channels")]
pub(crate) use startup::prepare_runtime_limits;
+#[cfg(feature = "channels")]
pub use startup::start_channels;
+#[cfg(feature = "channels")]
pub(crate) use startup::start_channels_with_session;
+#[cfg(feature = "channels")]
pub(crate) use startup::ChannelHandle;
-#[cfg(test)]
+#[cfg(all(test, feature = "channels"))]
pub(crate) use startup::TestChannel;
-#[cfg(test)]
+#[cfg(all(test, feature = "channels"))]
pub(crate) use startup::{prepare_module_runtime_for_test, ModuleRuntimeTestGuard};
// The hosted-channel relay (`channels::providers::relay`) runs one message
// through the same pipeline, with a context built from the caller's config.
-#[cfg(test)]
+#[cfg(all(test, feature = "channels"))]
pub(crate) use dispatch::process_channel_message;
+#[cfg(feature = "channels")]
pub(crate) use dispatch::{process_channel_runtime_message, RuntimeChannelMessage};
+#[cfg(feature = "channels")]
pub(crate) use startup::{build_channel_turn_parts, runtime_context, PromptToolDescs};
-#[cfg(test)]
+#[cfg(all(test, feature = "channels"))]
pub mod test_support;
// Re-exported for `channels::tests` only; omit in normal lib builds to avoid unused-import warnings.
-#[cfg(test)]
+#[cfg(all(test, feature = "channels"))]
pub(crate) use dispatch::run_message_dispatch_loop;