Skip to content

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

test(tinyhumans): add fake integrations backend for request recording

Steven Enamakele7b6214b939c
diff --git a/Cargo.lock b/Cargo.lock
index 64ba9f3b2b..0674cbae49 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5690,6 +5690,7 @@ dependencies = [
"futures",
"log",
"openhuman-embed",
+ "parking_lot",
"reqwest 0.12.28",
"sentry",
"serde",
diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rs
index 10e9a4b636..97e140106f 100644
--- a/crates/openhuman-embed/src/host_internals.rs
+++ b/crates/openhuman-embed/src/host_internals.rs
@@ -125,7 +125,7 @@ pub mod config {
pub use openhuman_core::config::{
active_workspace_dir, active_workspace_dir_cached, active_workspace_snapshot,
build_runtime_proxy_client_with_timeouts, load_config_with_timeout, workspace_handle,
- Config, MODEL_MANAGED_DEFAULT,
+ Config, PrivacyMode, MODEL_MANAGED_DEFAULT,
};
pub mod app_env {
diff --git a/crates/openhuman-tinyhumans/Cargo.toml b/crates/openhuman-tinyhumans/Cargo.toml
index 7d6d304d04..50b9446333 100644
--- a/crates/openhuman-tinyhumans/Cargo.toml
+++ b/crates/openhuman-tinyhumans/Cargo.toml
@@ -119,6 +119,8 @@ tinyagents-harness = { path = "../../vendor/tinyagents/crates/tinyagents-harness
futures = "0.3"
tokio = { version = "1", features = ["full", "test-util"] }
wiremock = "0.6"
+# The fake integrations backend (`integrations::test_support`) records requests.
+parking_lot = "0.12"
tokio-util = { version = "0.7", features = ["rt", "io"] }
# Feature unification with openhuman-cli's dev-dependencies. Cargo builds the
# core once per distinct feature set of its dependencies, and the tests of
diff --git a/crates/openhuman-tinyhumans/src/integrations/mod.rs b/crates/openhuman-tinyhumans/src/integrations/mod.rs
index 314d1de0f5..d9a16c8bd3 100644
--- a/crates/openhuman-tinyhumans/src/integrations/mod.rs
+++ b/crates/openhuman-tinyhumans/src/integrations/mod.rs
@@ -56,6 +56,9 @@ pub const FILE_STORAGE_SOURCE_ID: &str = "tinyhumans-file-storage";
/// The id the Google Places / stock tool source registers under.
pub const INTEGRATION_TOOLS_SOURCE_ID: &str = "tinyhumans-integrations";
+#[cfg(test)]
+mod test_support;
+
#[cfg(test)]
#[path = "mod_tests.rs"]
mod tests;