Skip to content

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

refactor(integrations): use upstream crates directly for shared helpers

Steven Enamakel0da4a140cc5c
diff --git a/crates/openhuman-core/src/flows/memory_tools.rs b/crates/openhuman-core/src/flows/memory_tools.rs
index 68bd4d24b6..992ec27ed7 100644
--- a/crates/openhuman-core/src/flows/memory_tools.rs
+++ b/crates/openhuman-core/src/flows/memory_tools.rs
@@ -460,7 +460,7 @@ impl Tool for FlowMemoryRememberTool {
if key.is_empty() {
return Ok(ToolResult::error("key cannot be empty".to_string()));
}
- if crate::security::scrub::has_likely_secret(content) {
+ if tinymemory_integrations::safety::has_likely_secret(content) {
tracing::warn!(
target: "flows",
key_chars = key.chars().count(),
diff --git a/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs b/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs
index 6eabe81ffa..d853380f3e 100644
--- a/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs
@@ -355,7 +355,7 @@ impl MemoryProvider for OpenHumanMemory {
// up front rather than spend that approval round-trip on a write
// that was always going to be rejected (review fix — see #5227).
let content = value_to_content(&value);
- if crate::security::scrub::has_likely_secret(&content) {
+ if tinymemory_integrations::safety::has_likely_secret(&content) {
tracing::warn!(
target: "flows",
key_chars = key.chars().count(),
diff --git a/crates/openhuman-core/src/integrations/composio/action_tool.rs b/crates/openhuman-core/src/integrations/composio/action_tool.rs
index eaf755afa8..550fbeb3dc 100644
--- a/crates/openhuman-core/src/integrations/composio/action_tool.rs
+++ b/crates/openhuman-core/src/integrations/composio/action_tool.rs
@@ -379,7 +379,7 @@ impl ComposioActionTool {
// baked into a client this tool captured at construction.
let res = super::module_client::call::<_, super::types::ComposioExecuteResponse>(
&live_config,
- super::module_client::methods::EXECUTE,
+ tinyconnectors_bus::names::methods::EXECUTE,
super::types::ComposioExecuteRequest {
tool: self.action_name.clone(),
arguments: args,
diff --git a/crates/openhuman-core/src/integrations/composio/module_client.rs b/crates/openhuman-core/src/integrations/composio/module_client.rs
index d68cdf4690..1780c7dec9 100644
--- a/crates/openhuman-core/src/integrations/composio/module_client.rs
+++ b/crates/openhuman-core/src/integrations/composio/module_client.rs
@@ -12,12 +12,10 @@
//!
//! # What the member names do *not* depend on
//!
-//! [`methods`] comes from `tinyconnectors_bus`, an ordinary dependency with no
+//! The method constants come from `tinyconnectors_bus`, an ordinary dependency with no
//! feature gate. A gates-off build can still name a member and match on the
//! contract; it just cannot call one.
-pub use tinyconnectors_bus::names::methods;
-
/// Whether a member failure is the module refusing an operation the live route
/// does not offer.
///
diff --git a/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs
index 6ba02a5098..58313179b6 100644
--- a/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs
+++ b/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs
@@ -245,8 +245,8 @@ async fn composio_list_connections_via_mock_counts_active() {
#[cfg(feature = "modules")]
#[tokio::test]
async fn composio_list_connections_drops_the_module_route_once_signed_out() {
- use crate::integrations::composio::module_client::methods;
use crate::modules::connectors::{last_route_is_none, proxy_without_reconcile};
+ use tinyconnectors_bus::names::methods;
let _serialised = module_guard().await;
let app = Router::new().route(
diff --git a/crates/openhuman-core/src/integrations/composio/processing.rs b/crates/openhuman-core/src/integrations/composio/processing.rs
index 49aafbf776..0cc3b09158 100644
--- a/crates/openhuman-core/src/integrations/composio/processing.rs
+++ b/crates/openhuman-core/src/integrations/composio/processing.rs
@@ -3,7 +3,7 @@
use crate::config::Config;
use tinyconnectors_bus::{FilterResponseRequest, PrepareArgumentsRequest, PreparedArguments};
-use super::module_client::methods;
+use tinyconnectors_bus::names::methods;
/// Apply the connector's validation, calendar defaults and task window rules.
pub(crate) async fn prepare(
diff --git a/crates/openhuman-core/src/integrations/composio/trigger_history.rs b/crates/openhuman-core/src/integrations/composio/trigger_history.rs
index a271a24751..56e2030c73 100644
--- a/crates/openhuman-core/src/integrations/composio/trigger_history.rs
+++ b/crates/openhuman-core/src/integrations/composio/trigger_history.rs
@@ -7,12 +7,12 @@ use tinyconnectors_bus::{
};
use tokio::sync::Mutex;
-use super::module_client::methods;
use super::types::{
ComposioTriggerEvent, ComposioTriggerHistoryEntry, ComposioTriggerHistoryResult,
};
use crate::config::Config;
use crate::modules::client::ModuleClient;
+use tinyconnectors_bus::names::methods;
static GLOBAL_TRIGGER_HISTORY: OnceLock<Arc<TriggerHistory>> = OnceLock::new();
diff --git a/crates/openhuman-core/src/integrations/mod.rs b/crates/openhuman-core/src/integrations/mod.rs
index 450a6d0249..939ac1b3f9 100644
--- a/crates/openhuman-core/src/integrations/mod.rs
+++ b/crates/openhuman-core/src/integrations/mod.rs
@@ -14,7 +14,6 @@ pub mod tools;
pub mod types;
pub use client::{build_client, pricing_for_config, IntegrationClient};
-pub use tinytools::ToolScope;
pub use types::{
BackendResponse, IntegrationPricing, IntegrationPricingEntry, PricingIntegrations,
};
diff --git a/crates/openhuman-core/src/integrations/tools/google_places_tests.rs b/crates/openhuman-core/src/integrations/tools/google_places_tests.rs
index db59db5e5b..dd6a48ee56 100644
--- a/crates/openhuman-core/src/integrations/tools/google_places_tests.rs
+++ b/crates/openhuman-core/src/integrations/tools/google_places_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use crate::integrations::ToolScope;
+use tinytools::ToolScope;
fn test_client() -> Arc<IntegrationClient> {
Arc::new(IntegrationClient::new("http://test".into(), "tok".into()))
diff --git a/crates/openhuman-core/src/integrations/tools/stock_prices_tests.rs b/crates/openhuman-core/src/integrations/tools/stock_prices_tests.rs
index df7ea6e318..f87e6a8c44 100644
--- a/crates/openhuman-core/src/integrations/tools/stock_prices_tests.rs
+++ b/crates/openhuman-core/src/integrations/tools/stock_prices_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use crate::integrations::ToolScope;
+use tinytools::ToolScope;
fn test_client() -> Arc<IntegrationClient> {
Arc::new(IntegrationClient::new("http://test".into(), "tok".into()))
diff --git a/crates/openhuman-core/src/security/scrub.rs b/crates/openhuman-core/src/security/scrub.rs
index 71773726dc..b8a8dfc9f9 100644
--- a/crates/openhuman-core/src/security/scrub.rs
+++ b/crates/openhuman-core/src/security/scrub.rs
@@ -10,8 +10,6 @@
use serde_json::Value;
use tinymemory_integrations::safety::{Policy, Sanitized};
-pub use tinymemory_integrations::safety::has_likely_secret;
-
/// The scrubbing policy every caller in this process applies.
#[must_use]
pub const fn host_policy() -> Policy {