Skip to content

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

refactor(composio): update provider module references

Steven Enamakel3cde6109af9a
diff --git a/src/openhuman/flows/ops.rs b/src/openhuman/flows/ops.rs
index d71c423622..879346031e 100644
--- a/src/openhuman/flows/ops.rs
+++ b/src/openhuman/flows/ops.rs
@@ -2419,7 +2419,7 @@ pub(crate) fn toolkit_has_curated_catalog(toolkit: &str) -> bool {
// provider data rather than wire vocabulary. `toolkit_from_slug` and
// friends moved and are named at `tinymemory_api::composio` above; these
// two cannot until the registry itself goes behind the module.
- use crate::openhuman::memory::sync::composio::providers::{catalog_for_toolkit, get_provider};
+ use crate::openhuman::integrations::composio::providers::{catalog_for_toolkit, get_provider};
get_provider(toolkit)
.and_then(|p| p.curated_tools())
.or_else(|| catalog_for_toolkit(toolkit))
diff --git a/src/openhuman/flows/tinyflows/caps/ops.rs b/src/openhuman/flows/tinyflows/caps/ops.rs
index e2210a78de..2af18c7ba9 100644
--- a/src/openhuman/flows/tinyflows/caps/ops.rs
+++ b/src/openhuman/flows/tinyflows/caps/ops.rs
@@ -155,7 +155,7 @@ async fn flow_tool_allowed(
slug: &str,
connected_toolkits: Option<&[String]>,
) -> bool {
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, classify_unknown, find_curated, get_provider,
load_user_scope_or_default, toolkit_from_slug,
};
@@ -228,7 +228,7 @@ async fn flow_tool_allowed(
/// offline (a registry lookup) so the common cataloged-toolkit path never pays
/// for a connected-set fetch.
fn slug_needs_connected_set(slug: &str) -> bool {
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, get_provider, toolkit_from_slug,
};
match toolkit_from_slug(slug) {
@@ -283,7 +283,7 @@ async fn connected_toolkit_slugs(config: &Config) -> Option<Vec<String>> {
/// [`CommandClass`] the autonomy-tier gate ([`enforce_node_tier_gate`])
/// evaluates it under.
///
-/// Reuses [`curated_scope_for`](crate::openhuman::memory::sync::composio::providers::curated_scope_for),
+/// Reuses [`curated_scope_for`](crate::openhuman::integrations::composio::providers::curated_scope_for),
/// the same catalog walk `composio::ops`'s `gated_tools` hints use — a
/// registered native provider's `curated_tools()` first, then the static
/// `catalog_for_toolkit` fallback. **Fail-safe by construction:** only a
@@ -296,7 +296,7 @@ async fn connected_toolkit_slugs(config: &Config) -> Option<Vec<String>> {
/// (prompts under Supervised/Full, blocks under ReadOnly).
///
/// Deliberately does **not** fall back to
-/// [`classify_unknown`](crate::openhuman::memory::sync::composio::providers::classify_unknown)
+/// [`classify_unknown`](crate::openhuman::integrations::composio::providers::classify_unknown)
/// for uncurated slugs: that heuristic is tuned for the *curation*
/// allowlist (`flow_tool_allowed`'s Path B — "is this slug even visible to
/// the agent"), not for deciding whether a real side-effecting call skips
@@ -307,7 +307,7 @@ async fn connected_toolkit_slugs(config: &Config) -> Option<Vec<String>> {
/// from what actually gates (a parallel re-implementation would list
/// permissions that never prompt, or miss ones that do).
pub(crate) async fn classify_composio_action_for_tier(slug: &str) -> CommandClass {
- use crate::openhuman::memory::sync::composio::providers::{curated_scope_for, ToolScope};
+ use crate::openhuman::integrations::composio::providers::{curated_scope_for, ToolScope};
match curated_scope_for(slug) {
Some(ToolScope::Read) => CommandClass::Read,
@@ -1245,7 +1245,7 @@ mod tests {
/// but simply doesn't contain it.
#[tokio::test]
async fn unknown_toolkit_still_rejects() {
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, get_provider,
};
let config = Config::default();
@@ -1276,7 +1276,7 @@ mod tests {
/// The exact same slug rejects above without a connection.
#[tokio::test]
async fn connected_uncatalogued_toolkit_now_passes() {
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, get_provider,
};
assert!(catalog_for_toolkit("flowstestkit").is_none());
@@ -1328,7 +1328,7 @@ mod tests {
/// which passes.
#[tokio::test]
async fn expired_live_catalog_entry_is_treated_as_a_cache_miss() {
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, get_provider,
};
assert!(catalog_for_toolkit("flowsexpiredkit").is_none());
@@ -1368,7 +1368,7 @@ mod tests {
/// sufficient, the slug itself must be real.
#[tokio::test]
async fn connected_uncatalogued_toolkit_rejects_a_hallucinated_slug() {
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, get_provider,
};
assert!(catalog_for_toolkit("flowstestkit").is_none());
diff --git a/src/openhuman/flows/tinyflows/caps/tools/composio.rs b/src/openhuman/flows/tinyflows/caps/tools/composio.rs
index ca90be58b3..069b5d6aa4 100644
--- a/src/openhuman/flows/tinyflows/caps/tools/composio.rs
+++ b/src/openhuman/flows/tinyflows/caps/tools/composio.rs
@@ -97,7 +97,7 @@ impl ToolBackend for ComposioToolBackend {
})?;
// Autonomy-tier gate (Phase 2, made effect-aware): the node's
// [`CommandClass`] is derived from the action's curated
- // [`ToolScope`](crate::openhuman::memory::sync::composio::providers::ToolScope)
+ // [`ToolScope`](crate::openhuman::integrations::composio::providers::ToolScope)
// via [`classify_composio_action_for_tier`] — a curated Read action
// (e.g. `TWITTER_RECENT_SEARCH`) is `CommandClass::Read`, which every
// tier `Allow`s; a curated Write/Admin action, or anything not
diff --git a/src/openhuman/integrations/composio/catalog.rs b/src/openhuman/integrations/composio/catalog.rs
index bc1c66fc29..1449dfdcf3 100644
--- a/src/openhuman/integrations/composio/catalog.rs
+++ b/src/openhuman/integrations/composio/catalog.rs
@@ -288,7 +288,7 @@ pub(crate) async fn fetch_live_toolkit_catalog(
config: &Config,
toolkit: &str,
) -> Option<Vec<ToolContract>> {
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, find_curated, get_provider,
};
@@ -599,8 +599,8 @@ pub(crate) fn apply_probe_override(mut contract: ToolContract) -> ToolContract {
/// "assume Read".
fn resolve_composio_action_scope(
slug: &str,
-) -> Option<crate::openhuman::memory::sync::composio::providers::ToolScope> {
- use crate::openhuman::memory::sync::composio::providers::{
+) -> Option<crate::openhuman::integrations::composio::providers::ToolScope> {
+ use crate::openhuman::integrations::composio::providers::{
catalog_for_toolkit, classify_unknown, find_curated, get_provider, toolkit_from_slug,
};
@@ -647,7 +647,7 @@ pub(crate) async fn probe_tool_output_sample(
}
match resolve_composio_action_scope(slug) {
- Some(crate::openhuman::memory::sync::composio::providers::ToolScope::Read) => {}
+ Some(crate::openhuman::integrations::composio::providers::ToolScope::Read) => {}
Some(other) => {
tracing::warn!(
target: "flows",
@@ -683,7 +683,7 @@ pub(crate) async fn probe_tool_output_sample(
}
let Some(toolkit) =
- crate::openhuman::memory::sync::composio::providers::toolkit_from_slug(slug)
+ crate::openhuman::integrations::composio::providers::toolkit_from_slug(slug)
else {
return Err(format!(
"get_tool_output_sample: could not extract a toolkit from slug '{slug}' — it must \
@@ -775,7 +775,7 @@ pub(crate) async fn probe_tool_output_sample(
/// in the toolkit's live catalog — so callers can skip the preflight rather
/// than block execution on a catalog hiccup.
pub(crate) async fn composio_required_args(config: &Config, slug: &str) -> Option<Vec<String>> {
- let toolkit = crate::openhuman::memory::sync::composio::providers::toolkit_from_slug(slug)?;
+ let toolkit = crate::openhuman::integrations::composio::providers::toolkit_from_slug(slug)?;
let contracts = fetch_live_toolkit_catalog(config, &toolkit).await?;
contracts
.iter()
@@ -796,7 +796,7 @@ pub(crate) async fn composio_required_args(config: &Config, slug: &str) -> Optio
/// unknown" rather than blocking or guessing. `Some(vec![])` means the
/// schema was found but names no top-level properties.
pub(crate) async fn composio_response_fields(config: &Config, slug: &str) -> Option<Vec<String>> {
- let toolkit = crate::openhuman::memory::sync::composio::providers::toolkit_from_slug(slug)?;
+ let toolkit = crate::openhuman::integrations::composio::providers::toolkit_from_slug(slug)?;
let contracts = fetch_live_toolkit_catalog(config, &toolkit).await?;
let contract = contracts
.iter()
diff --git a/src/openhuman/integrations/composio/catalog_tests.rs b/src/openhuman/integrations/composio/catalog_tests.rs
index 869d855fce..f56c6b355d 100644
--- a/src/openhuman/integrations/composio/catalog_tests.rs
+++ b/src/openhuman/integrations/composio/catalog_tests.rs
@@ -255,7 +255,7 @@ fn cache_probe_result_redacts_the_raw_sample_before_caching() {
#[test]
fn resolve_composio_action_scope_uses_the_curated_catalog_when_available() {
- use crate::openhuman::memory::sync::composio::providers::ToolScope;
+ use crate::openhuman::integrations::composio::providers::ToolScope;
// GITHUB_LIST_REPOSITORY_ISSUES is curated as Read (github/tools.rs).
assert_eq!(
resolve_composio_action_scope("GITHUB_LIST_REPOSITORY_ISSUES"),
@@ -285,7 +285,7 @@ fn resolve_composio_action_scope_rejects_an_uncurated_slug_on_a_cataloged_toolki
#[test]
fn resolve_composio_action_scope_falls_back_to_the_verb_heuristic_only_without_a_static_catalog() {
- use crate::openhuman::memory::sync::composio::providers::ToolScope;
+ use crate::openhuman::integrations::composio::providers::ToolScope;
assert_eq!(
resolve_composio_action_scope("MADEUPTOOLKIT_LIST_THINGS"),
Some(ToolScope::Read)
diff --git a/src/openhuman/integrations/composio/identity.rs b/src/openhuman/integrations/composio/identity.rs
index bd60c653be..ab0ffa7c3a 100644
--- a/src/openhuman/integrations/composio/identity.rs
+++ b/src/openhuman/integrations/composio/identity.rs
@@ -7,7 +7,7 @@
//! `git config user.name`).
//!
//! The lookup goes through the per-toolkit
-//! [`ComposioProvider::fetch_user_profile`](crate::openhuman::memory::sync::composio::providers::ComposioProvider::fetch_user_profile)
+//! [`ComposioProvider::fetch_user_profile`](crate::openhuman::integrations::composio::providers::ComposioProvider::fetch_user_profile)
//! call, which already knows the right Composio action slug for each
//! toolkit (`GITHUB_GET_THE_AUTHENTICATED_USER`,
//! `GMAIL_GET_PROFILE`, …) and the JSON field that holds the username.
@@ -115,7 +115,7 @@ pub async fn connection_identity(config: &Config, toolkit: &str) -> Option<Strin
#[cfg(test)]
mod tests {
use super::*;
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
register_provider, ComposioProvider, ProviderArc, ProviderUserProfile,
};
use async_trait::async_trait;
diff --git a/src/openhuman/integrations/composio/mod.rs b/src/openhuman/integrations/composio/mod.rs
index f923a7e918..91e0bf0e16 100644
--- a/src/openhuman/integrations/composio/mod.rs
+++ b/src/openhuman/integrations/composio/mod.rs
@@ -66,7 +66,7 @@ pub use crate::openhuman::memory::sync::composio::bus::{
pub use crate::openhuman::memory::sync::composio::periodic::{
record_sync_success, start_periodic_sync,
};
-pub use crate::openhuman::memory::sync::composio::providers::{
+pub use crate::openhuman::integrations::composio::providers::{
all_providers as all_composio_providers, get_provider as get_composio_provider,
init_default_providers as init_default_composio_providers, ComposioProvider, ProviderContext,
ProviderUserProfile, SyncOutcome, SyncReason,
diff --git a/src/openhuman/integrations/composio/ops/mod.rs b/src/openhuman/integrations/composio/ops/mod.rs
index b4795a8f4b..d5eecce3b6 100644
--- a/src/openhuman/integrations/composio/ops/mod.rs
+++ b/src/openhuman/integrations/composio/ops/mod.rs
@@ -90,9 +90,9 @@ pub(crate) use super::connected_integrations::sync_cache_with_connections;
#[cfg(test)]
pub(crate) use crate::openhuman::config::Config;
#[cfg(test)]
-pub(crate) use crate::openhuman::memory::sync::composio::providers::sync_state::SyncState;
+pub(crate) use crate::openhuman::integrations::composio::providers::sync_state::SyncState;
#[cfg(test)]
-pub(crate) use crate::openhuman::memory::sync::composio::providers::SyncReason;
+pub(crate) use crate::openhuman::integrations::composio::providers::SyncReason;
#[cfg(test)]
pub(crate) use connections::enrich_connections_with_identity;
#[cfg(test)]
diff --git a/src/openhuman/integrations/composio/ops_tests.rs b/src/openhuman/integrations/composio/ops_tests.rs
index 27fbdb7c63..a632d4faf5 100644
--- a/src/openhuman/integrations/composio/ops_tests.rs
+++ b/src/openhuman/integrations/composio/ops_tests.rs
@@ -2588,7 +2588,7 @@ async fn enrich_populates_email_from_cached_profile() {
// `Once`-guarded, so a test that omits it passes only while some
// earlier test in the same binary happened to run first.
crate::openhuman::memory::host_impls::install_for_tests();
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
profile::persist_provider_profile, ProviderUserProfile,
};
let tmp = tempfile::tempdir().unwrap();
@@ -2628,7 +2628,7 @@ async fn enrich_populates_handle_for_github() {
// `Once`-guarded, so a test that omits it passes only while some
// earlier test in the same binary happened to run first.
crate::openhuman::memory::host_impls::install_for_tests();
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
profile::persist_provider_profile, ProviderUserProfile,
};
let tmp = tempfile::tempdir().unwrap();
@@ -2676,7 +2676,7 @@ async fn enrich_handles_multiple_connections_same_toolkit() {
// earlier test in the same binary happened to run first.
crate::openhuman::memory::host_impls::install_for_tests();
// Two Gmail accounts — each gets its own identity label, not "Account N".
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
profile::persist_provider_profile, ProviderUserProfile,
};
let tmp = tempfile::tempdir().unwrap();
@@ -2722,7 +2722,7 @@ async fn enrich_leaves_unmatched_connection_unchanged() {
crate::openhuman::memory::host_impls::install_for_tests();
// Connection whose id has no cached profile row is returned with all
// identity fields as None — the UI falls back to "toolkit · connection_id".
- use crate::openhuman::memory::sync::composio::providers::{
+ use crate::openhuman::integrations::composio::providers::{
profile::persist_provider_profile, ProviderUserProfile,
};
let tmp = tempfile::tempdir().unwrap();
diff --git a/src/openhuman/integrations/task_sources/filter.rs b/src/openhuman/integrations/task_sources/filter.rs
index 5851e9b609..2871c51a1a 100644
--- a/src/openhuman/integrations/task_sources/filter.rs
+++ b/src/openhuman/integrations/task_sources/filter.rs
@@ -6,7 +6,7 @@
//! `FilterSpec` variant into the shared filter envelope and stamps the
//! per-fetch cap.
-use crate::openhuman::memory::sync::composio::providers::TaskFetchFilter;
+use crate::openhuman::integrations::composio::providers::TaskFetchFilter;
use super::types::FilterSpec;
diff --git a/src/openhuman/integrations/task_sources/mod.rs b/src/openhuman/integrations/task_sources/mod.rs
index 9fb5e1c2b7..2931cc7a1f 100644
--- a/src/openhuman/integrations/task_sources/mod.rs
+++ b/src/openhuman/integrations/task_sources/mod.rs
@@ -13,7 +13,7 @@
//! logic lives in the sibling modules, persistence is SQLite in
//! `store.rs`, and the RPC surface is wired through `schemas.rs`.
//!
-//! [`fetch_tasks`]: crate::openhuman::memory::sync::composio::providers::ComposioProvider::fetch_tasks
+//! [`fetch_tasks`]: crate::openhuman::integrations::composio::providers::ComposioProvider::fetch_tasks
pub mod bus;
pub mod enrich;
@@ -27,7 +27,7 @@ pub mod store;
pub mod tools;
pub mod types;
-pub use crate::openhuman::memory::sync::composio::providers::{
+pub use crate::openhuman::integrations::composio::providers::{
NormalizedTask, TaskContainer, TaskFetchFilter, TaskKind,
};
pub use periodic::start_periodic_poll;
diff --git a/src/openhuman/integrations/task_sources/ops.rs b/src/openhuman/integrations/task_sources/ops.rs
index d394344096..fa471aba60 100644
--- a/src/openhuman/integrations/task_sources/ops.rs
+++ b/src/openhuman/integrations/task_sources/ops.rs
@@ -10,7 +10,7 @@ use std::sync::Arc;
use serde_json::{json, Value};
use crate::openhuman::config::Config;
-use crate::openhuman::memory::sync::composio::providers::{
+use crate::openhuman::integrations::composio::providers::{
get_provider, NormalizedTask, ProviderContext, TaskContainer,
};
use crate::rpc::RpcOutcome;
diff --git a/src/openhuman/integrations/task_sources/pipeline.rs b/src/openhuman/integrations/task_sources/pipeline.rs
index e722e1fd23..165bccd9a8 100644
--- a/src/openhuman/integrations/task_sources/pipeline.rs
+++ b/src/openhuman/integrations/task_sources/pipeline.rs
@@ -14,7 +14,7 @@ use std::collections::HashSet;
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
use crate::openhuman::config::Config;
-use crate::openhuman::memory::sync::composio::providers::{get_provider, ProviderContext};
+use crate::openhuman::integrations::composio::providers::{get_provider, ProviderContext};
use super::types::{FetchOutcome, FetchReason, TaskSource};
use super::{enrich, filter, route, store};
diff --git a/src/openhuman/integrations/task_sources/pipeline_tests.rs b/src/openhuman/integrations/task_sources/pipeline_tests.rs
index 624e3c0516..ab160007e8 100644
--- a/src/openhuman/integrations/task_sources/pipeline_tests.rs
+++ b/src/openhuman/integrations/task_sources/pipeline_tests.rs
@@ -2,7 +2,7 @@ use super::*;
use crate::openhuman::config::Config;
use crate::openhuman::integrations::task_sources::store;
use crate::openhuman::integrations::task_sources::types::{FilterSpec, ProviderSlug, SourceTarget};
-use crate::openhuman::memory::sync::composio::providers::{
+use crate::openhuman::integrations::composio::providers::{
register_provider, ComposioProvider, NormalizedTask, ProviderContext, ProviderUserProfile,
TaskFetchFilter,
};
diff --git a/src/openhuman/integrations/task_sources/store.rs b/src/openhuman/integrations/task_sources/store.rs
index 62a1e6f720..ed1080e68c 100644
--- a/src/openhuman/integrations/task_sources/store.rs
+++ b/src/openhuman/integrations/task_sources/store.rs
@@ -19,7 +19,7 @@ use sha2::{Digest, Sha256};
use uuid::Uuid;
use crate::openhuman::config::Config;
-use crate::openhuman::memory::sync::composio::providers::NormalizedTask;
+use crate::openhuman::integrations::composio::providers::NormalizedTask;
use super::types::{
FetchReason, FilterSpec, ProviderSlug, SourceTarget, TaskSource, TaskSourcePatch,
diff --git a/src/openhuman/integrations/task_sources/types.rs b/src/openhuman/integrations/task_sources/types.rs
index 663475bcec..01841f8f5e 100644
--- a/src/openhuman/integrations/task_sources/types.rs
+++ b/src/openhuman/integrations/task_sources/types.rs
@@ -64,7 +64,7 @@ pub enum FilterSpec {
/// How to fetch: Composio connection, local `gh`/REST, or `auto`
/// (Composio-first with local fallback). Defaults to `auto`.
#[serde(default)]
- fetch_mode: crate::openhuman::memory::sync::composio::providers::GithubFetchMode,
+ fetch_mode: crate::openhuman::integrations::composio::providers::GithubFetchMode,
#[serde(default)]
extra: Value,
},
diff --git a/src/openhuman/memory/read_rpc/admin.rs b/src/openhuman/memory/read_rpc/admin.rs
index 6a5c22db6e..b168a7e101 100644
--- a/src/openhuman/memory/read_rpc/admin.rs
+++ b/src/openhuman/memory/read_rpc/admin.rs
@@ -2,7 +2,7 @@ use anyhow::{Context, Result};
use crate::openhuman::config::Config;
use crate::openhuman::memory::api::provider::ForgetSelector;
-use crate::openhuman::memory::sync::composio::providers::sync_state::KV_NAMESPACE;
+use crate::openhuman::integrations::composio::providers::sync_state::KV_NAMESPACE;
use crate::rpc::RpcOutcome;
use tinymemory_api::chunks::SourceKind;