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(modules): expose pre-core module client behind modules feature
Steven Enamakel71d34c9a24d0
diff --git a/crates/openhuman-embed/Cargo.toml b/crates/openhuman-embed/Cargo.tomlindex 641227d0a5..42d33b64eb 100644--- a/crates/openhuman-embed/Cargo.toml+++ b/crates/openhuman-embed/Cargo.toml@@ -23,7 +23,7 @@ inference = ["openhuman-core/inference"]documents = ["openhuman-core/documents"]hosting = ["openhuman-core/hosting"]tinymemes = ["openhuman-core/tinymemes"]-modules = ["openhuman-core/modules"]+modules = ["openhuman-core/modules", "tinybus/modules"]voice = ["openhuman-core/voice"]web3 = ["openhuman-core/web3"]# Storage drivers for `[storage] url` (see the core `storage` domain).diff --git a/crates/openhuman-embed/src/modules.rs b/crates/openhuman-embed/src/modules.rsindex d789ba355d..7c874948f6 100644--- a/crates/openhuman-embed/src/modules.rs+++ b/crates/openhuman-embed/src/modules.rs@@ -21,10 +21,15 @@ pub mod browser {pub use openhuman_core::modules::browser::MODULE_ID;}-/// Pre-core calls through the process-wide loader, with explicit runtime configuration.+/// Pre-core calls through the process-wide loader, with explicit runtime+/// configuration: [`client`] builds a [`ModuleClient`] over the same resolver+/// the core uses, so a module loads once per process whoever asks first.+#[cfg(feature = "modules")]+pub use openhuman_core::modules::ops::client;+#[cfg(feature = "modules")]pub use tinybus::module::{ModuleCallError, ModuleClient};-#[cfg(all(test, not(feature = "modules"), not(feature = "default")))]+#[cfg(all(test, feature = "modules"))]#[path = "modules_tests.rs"]mod tests;diff --git a/crates/openhuman-embed/src/modules_tests.rs b/crates/openhuman-embed/src/modules_tests.rsindex e3b6605614..041dc9ae40 100644--- a/crates/openhuman-embed/src/modules_tests.rs+++ b/crates/openhuman-embed/src/modules_tests.rs@@ -1,11 +1,10 @@use super::*;#[tokio::test]-async fn pre_core_client_without_a_loader_returns_unavailable() {+async fn pre_core_client_with_modules_disabled_returns_unavailable() {let mut config = crate::config::RuntimeConfig::default();- config.modules.enabled = true;- config.modules.allow_download = false;- let result = crate::modules::ops::client(config)+ config.modules.enabled = false;+ let result = client(config).call::<serde_json::Value>("tinyhosts", "Providers", ()).await;assert_eq!(result, Err(ModuleCallError::Unavailable));