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(integrations): add local-only integration test coverage
Steven Enamakel99a010f1e533
diff --git a/crates/openhuman-core/src/media/generation/mod.rs b/crates/openhuman-core/src/media/generation/mod.rsindex 43c241bf04..e2d5246bed 100644--- a/crates/openhuman-core/src/media/generation/mod.rs+++ b/crates/openhuman-core/src/media/generation/mod.rs@@ -23,6 +23,6 @@ pub mod tools;pub use artifact_tool::MediaArtifactTool;pub use provider::{GeneratorRouter, MediaGenerators};pub use tools::{- media_tools_for_config, media_tools_from, MediaReferenceAllowlist, MediaListModelsTool, IMAGE_TOOL_NAME,- LIST_MODELS_TOOL_NAME, VIDEO_TOOL_NAME,+ media_tools_for_config, media_tools_from, MediaListModelsTool, MediaReferenceAllowlist,+ IMAGE_TOOL_NAME, LIST_MODELS_TOOL_NAME, VIDEO_TOOL_NAME,};diff --git a/crates/openhuman-tinyhumans/src/integrations/client/construct.rs b/crates/openhuman-tinyhumans/src/integrations/client/construct.rsindex b2ffe99760..05c02a5f22 100644--- a/crates/openhuman-tinyhumans/src/integrations/client/construct.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client/construct.rs@@ -16,7 +16,8 @@ pub struct IntegrationClient {/// `Authorization: Bearer`, a TinyHumans API key rides `x-api-key` (see/// [`crate::client::credential_headers`]). The 401 handling in `errors.rs`/// branches on which one it is.- pub(super) credential: openhuman_embed::__host::security::credentials::session_support::BackendCredential,+ pub(super) credential:+ openhuman_embed::__host::security::credentials::session_support::BackendCredential,pub(super) budget_config: Option<Arc<openhuman_embed::__host::config::Config>>,// The binary download path never rode the SDK: file storage also consumes// Content-Type and Content-Disposition, and the presigned-redirect hopdiff --git a/crates/openhuman-tinyhumans/src/integrations/client/errors.rs b/crates/openhuman-tinyhumans/src/integrations/client/errors.rsindex b5fb7c4896..3ddd9a1fb1 100644--- a/crates/openhuman-tinyhumans/src/integrations/client/errors.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client/errors.rs@@ -36,7 +36,9 @@ pub(crate) fn extract_error_detail(body: &str, max_bytes: usize) -> String {if let Some(msg) = v.get("error").and_then(|e| e.as_str()) {let trimmed = msg.trim();if !trimmed.is_empty() {- return openhuman_embed::__host::util::truncate_at_byte_boundary(trimmed, max_bytes);+ return openhuman_embed::__host::util::truncate_at_byte_boundary(+ trimmed, max_bytes,+ );}}}@@ -138,10 +140,12 @@ fn handle_session_jwt_unauthorized(method: &str, path: &str, url: &str, detail:// is already free of secrets (it names the path + sanitized backend// `error` detail), but re-scrub for defense-in-depth before it reaches the// subscriber's logs.- openhuman_embed::__host::core::bus::BUS.publish(openhuman_embed::__host::core::events::DomainEvent::SessionExpired {- source: format!("integrations.{method}:{path}"),- reason: tinyinference_core::sanitize::sanitize_api_error(&message),- });+ openhuman_embed::__host::core::bus::BUS.publish(+ openhuman_embed::__host::core::events::DomainEvent::SessionExpired {+ source: format!("integrations.{method}:{path}"),+ reason: tinyinference_core::sanitize::sanitize_api_error(&message),+ },+ );message}diff --git a/crates/openhuman-tinyhumans/src/integrations/client/pricing.rs b/crates/openhuman-tinyhumans/src/integrations/client/pricing.rsindex 72194d7ed2..bad9a1781b 100644--- a/crates/openhuman-tinyhumans/src/integrations/client/pricing.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client/pricing.rs@@ -16,7 +16,8 @@ impl IntegrationClient {.get_or_init(|| async {match self.get::<IntegrationPricing>(- &openhuman_embed::__host::security::approval::ApprovalTurnContext::default(),+ &openhuman_embed::__host::security::approval::ApprovalTurnContext::default(+ ),"/agent-integrations/pricing",).await@@ -94,7 +95,9 @@ pub async fn pricing_for_config(/// stock_prices) gate tool registration at their own level.////// [`resolve_backend_credential`]: openhuman_embed::__host::security::credentials::session_support::resolve_backend_credential-pub fn build_client(config: &openhuman_embed::__host::config::Config) -> Option<Arc<IntegrationClient>> {+pub fn build_client(+ config: &openhuman_embed::__host::config::Config,+) -> Option<Arc<IntegrationClient>> {// Use the integrations-specific resolver: when `config.api_url` is set// to a local-AI endpoint (Ollama, vLLM, …), it would still be perfect// for `/v1/chat/completions`, but reusing it as the base for backend@@ -122,7 +125,9 @@ pub fn build_client(config: &openhuman_embed::__host::config::Config) -> Option<fn build_client_with_credential(config: &openhuman_embed::__host::config::Config,backend_url: String,- credential: Option<openhuman_embed::__host::security::credentials::session_support::BackendCredential>,+ credential: Option<+ openhuman_embed::__host::security::credentials::session_support::BackendCredential,+ >,) -> Option<Arc<IntegrationClient>> {use openhuman_embed::__host::security::credentials::session_support::BackendCredential;diff --git a/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rs b/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rsindex fc0d6cba14..6a3f837a10 100644--- a/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client/pricing_tests.rs@@ -65,8 +65,7 @@ async fn pricing_for_config_short_circuits_in_direct_mode() {// Build a client pointed at an unreachable backend — if the// short-circuit fires, we never actually attempt the network call// and the empty default struct comes back immediately.- let client =- IntegrationClient::new("http://127.0.0.1:0".into(), "test".into());+ let client = IntegrationClient::new("http://127.0.0.1:0".into(), "test".into());let mut config = openhuman_embed::__host::config::Config::default();config.composio.mode = "direct".into();diff --git a/crates/openhuman-tinyhumans/src/integrations/client/requests.rs b/crates/openhuman-tinyhumans/src/integrations/client/requests.rsindex 9b4a7f9371..d1a4c0ac7d 100644--- a/crates/openhuman-tinyhumans/src/integrations/client/requests.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client/requests.rs@@ -13,7 +13,9 @@ pub(super) fn managed_budget_applies_to_path(path: &str) -> bool {/// Build the egress descriptor for a managed-backend round-trip. The query/// string is stripped so only the endpoint (the "to where") is described, never/// any data carried in the query.-pub(super) fn backend_egress_descriptor(path: &str) -> openhuman_embed::__host::egress::EgressDescriptor {+pub(super) fn backend_egress_descriptor(+ path: &str,+) -> openhuman_embed::__host::egress::EgressDescriptor {let endpoint = path.split('?').next().unwrap_or(path);openhuman_embed::__host::egress::EgressDescriptor::integration(endpoint)}diff --git a/crates/openhuman-tinyhumans/src/integrations/client_api_key_tests.rs b/crates/openhuman-tinyhumans/src/integrations/client_api_key_tests.rsindex 4891bc99d8..cddaedf12a 100644--- a/crates/openhuman-tinyhumans/src/integrations/client_api_key_tests.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client_api_key_tests.rs@@ -24,7 +24,8 @@ fn record(seen: &Seen, headers: &HeaderMap) {.and_then(|value| value.to_str().ok()).map(str::to_owned)};- seen.lock().unwrap()+ seen.lock()+ .unwrap().push((header("x-api-key"), header("authorization")));}diff --git a/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rs b/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rsindex 6de29d19eb..a1f17b6792 100644--- a/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client_error_propagation_tests.rs@@ -90,7 +90,10 @@ fn managed_budget_gate_applies_to_agent_integration_paths() {#[test]fn backend_egress_descriptor_strips_query_and_targets_backend() {let desc = backend_egress_descriptor("/agent-integrations/composio/execute?foo=bar");- assert_eq!(desc.reason, openhuman_embed::__host::egress::EgressReason::Integration);+ assert_eq!(+ desc.reason,+ openhuman_embed::__host::egress::EgressReason::Integration+ );assert_eq!(desc.provider_slug, "openhuman_backend");// Query stripped — only the endpoint is disclosed, never carried data.assert_eq!(desc.service, "/agent-integrations/composio/execute");@@ -161,14 +164,15 @@ async fn verb_methods_never_expose_admin_or_webhook_routes() {);}-#[tokio::test]async fn integration_requests_carry_the_host_attribution() {// The SDK transport stamps the host's product identity; which identity it// is belongs to the host.let seen = product_identity_seen_by_backend().await;assert!(- seen.sdk.as_deref().is_some_and(|identity| !identity.is_empty()),+ seen.sdk+ .as_deref()+ .is_some_and(|identity| !identity.is_empty()),"agent-integration traffic must be attributed like every other backend call");assert_eq!(diff --git a/crates/openhuman-tinyhumans/src/integrations/client_session_expiry_tests.rs b/crates/openhuman-tinyhumans/src/integrations/client_session_expiry_tests.rsindex 7a770c818e..4d44edf6e0 100644--- a/crates/openhuman-tinyhumans/src/integrations/client_session_expiry_tests.rs+++ b/crates/openhuman-tinyhumans/src/integrations/client_session_expiry_tests.rs@@ -122,7 +122,9 @@ async fn get_401_session_jwt_classifies_as_session_expired() {/// widened to swallow other statuses, this catches it.#[tokio::test]async fn non_401_4xx_does_not_classify_as_session_expired() {- use openhuman_embed::__host::core::observability::{expected_error_kind, is_session_expired_message};+ use openhuman_embed::__host::core::observability::{+ expected_error_kind, is_session_expired_message,+ };// 403 — e.g. an authz/scope rejection on a backend-mediated provider// resource. This is NOT a dead session; it must stay a generic backenddiff --git a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/delete.rs b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/delete.rsindex 62529bd23e..79d291e79b 100644--- a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/delete.rs+++ b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/delete.rs@@ -73,7 +73,10 @@ impl Tool for StorageDeleteFileTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/download.rs b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/download.rsindex e05f9b815b..ebfc500e24 100644--- a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/download.rs+++ b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/download.rs@@ -162,7 +162,10 @@ impl Tool for StorageDownloadFileTool {context: Option<&dyn ToolRunContext>,) -> anyhow::Result<ToolResult> {let action_dir = action_dir_for_context(&self.action_dir, context, self.name());- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &action_dir, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/link.rs b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/link.rsindex bafe5fe654..52317099b8 100644--- a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/link.rs+++ b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/link.rs@@ -76,7 +76,10 @@ impl Tool for StorageGetLinkTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/list.rs b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/list.rsindex 6470c88200..1a846e6877 100644--- a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/list.rs+++ b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/list.rs@@ -50,7 +50,10 @@ impl Tool for StorageListFilesTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(_args, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/upload.rs b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/upload.rsindex 2cf6c491f8..941a0f3083 100644--- a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/upload.rs+++ b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/upload.rs@@ -196,7 +196,10 @@ impl Tool for StorageUploadFileTool {context: Option<&dyn ToolRunContext>,) -> anyhow::Result<ToolResult> {let action_dir = action_dir_for_context(&self.action_dir, context, self.name());- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &action_dir, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/visibility.rs b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/visibility.rsindex 62938d113c..35ee71ebb4 100644--- a/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/visibility.rs+++ b/crates/openhuman-tinyhumans/src/integrations/file_storage/tools/visibility.rs@@ -75,7 +75,10 @@ impl Tool for StorageSetVisibilityTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/media/provider_tests.rs b/crates/openhuman-tinyhumans/src/integrations/media/provider_tests.rsindex aa87c86b6a..53e0aadfb5 100644--- a/crates/openhuman-tinyhumans/src/integrations/media/provider_tests.rs+++ b/crates/openhuman-tinyhumans/src/integrations/media/provider_tests.rs@@ -32,8 +32,13 @@ macro_rules! disclosed_routing {/// two guards built for different chats do not share a destination.#[tokio::test]async fn a_guard_discloses_to_the_chat_it_was_built_for() {- openhuman_embed::__host::core::bus::init().await.expect("bus init");- let mut rx = openhuman_embed::__host::core::bus::BUS.get().unwrap().receiver();+ openhuman_embed::__host::core::bus::init()+ .await+ .expect("bus init");+ let mut rx = openhuman_embed::__host::core::bus::BUS+ .get()+ .unwrap()+ .receiver();let chat_a = ApprovalChatContext {thread_id: "thread-media-a".into(),diff --git a/crates/openhuman-tinyhumans/src/integrations/mod.rs b/crates/openhuman-tinyhumans/src/integrations/mod.rsindex d9a16c8bd3..caee3d24c3 100644--- a/crates/openhuman-tinyhumans/src/integrations/mod.rs+++ b/crates/openhuman-tinyhumans/src/integrations/mod.rs@@ -48,7 +48,9 @@ pub(crate) fn register(_options: &InstallOptions) {#[cfg(feature = "web3")]web3::register();composio::register();- log::debug!("[tinyhumans] integrations: tool sources, wallet backend and composio route registered");+ log::debug!(+ "[tinyhumans] integrations: tool sources, wallet backend and composio route registered"+ );}/// The id the file-storage tool source registers under.diff --git a/crates/openhuman-tinyhumans/src/integrations/tools/families_tests.rs b/crates/openhuman-tinyhumans/src/integrations/tools/families_tests.rsindex c2411769fc..e4beea6fdc 100644--- a/crates/openhuman-tinyhumans/src/integrations/tools/families_tests.rs+++ b/crates/openhuman-tinyhumans/src/integrations/tools/families_tests.rs@@ -164,7 +164,6 @@ async fn all_tools_executes_stock_family_against_fake_backend() {assert_eq!(requests[2].body["requireGreeks"], serde_json::json!(true));}-#[tokio::test]async fn all_tools_executes_google_places_family_against_fake_backend() {let backend = spawn_fake_integration_backend().await;diff --git a/crates/openhuman-tinyhumans/src/integrations/tools/google_places.rs b/crates/openhuman-tinyhumans/src/integrations/tools/google_places.rsindex e69772dbed..268abcece0 100644--- a/crates/openhuman-tinyhumans/src/integrations/tools/google_places.rs+++ b/crates/openhuman-tinyhumans/src/integrations/tools/google_places.rs@@ -138,7 +138,10 @@ impl Tool for GooglePlacesSearchTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}@@ -262,7 +265,10 @@ impl Tool for GooglePlacesDetailsTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/tools/stock_prices.rs b/crates/openhuman-tinyhumans/src/integrations/tools/stock_prices.rsindex 55f306d7b9..11b35ab730 100644--- a/crates/openhuman-tinyhumans/src/integrations/tools/stock_prices.rs+++ b/crates/openhuman-tinyhumans/src/integrations/tools/stock_prices.rs@@ -187,7 +187,10 @@ impl Tool for StockQuoteTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}@@ -300,7 +303,10 @@ impl Tool for StockExchangeRateTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}@@ -414,7 +420,10 @@ impl Tool for StockOptionsTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}@@ -543,7 +552,10 @@ impl Tool for StockCryptoSeriesTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}@@ -671,7 +683,10 @@ impl Tool for StockCommodityTool {_options: tinytools::ToolCallOptions,context: Option<&dyn tinytools::ToolRunContext>,) -> anyhow::Result<ToolResult> {- let approval = openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(context);+ let approval =+ openhuman_embed::__host::agent::tinyagents::host::run_context::approval_for_tool(+ context,+ );self.run(args, &approval).await}}diff --git a/crates/openhuman-tinyhumans/src/integrations/web3/client.rs b/crates/openhuman-tinyhumans/src/integrations/web3/client.rsindex 3c3c1158fc..96e06573c2 100644--- a/crates/openhuman-tinyhumans/src/integrations/web3/client.rs+++ b/crates/openhuman-tinyhumans/src/integrations/web3/client.rs@@ -11,8 +11,8 @@ use std::sync::Arc;use serde_json::Value;-use openhuman_embed::__host::config::Config;use crate::integrations::IntegrationClient;+use openhuman_embed::__host::config::Config;const LOG_PREFIX: &str = "[web3]";diff --git a/crates/openhuman-tinyhumans/tests/integrations_local_only.rs b/crates/openhuman-tinyhumans/tests/integrations_local_only.rsindex 93db6da621..b5eb2f4557 100644--- a/crates/openhuman-tinyhumans/tests/integrations_local_only.rs+++ b/crates/openhuman-tinyhumans/tests/integrations_local_only.rs@@ -203,7 +203,6 @@ async fn local_only_rejects_user_data_verb_before_transport() {);}-#[tokio::test]async fn standard_mode_lets_a_user_data_verb_reach_the_transport() {let _serial = POLICY_LOCK.lock().await;