Skip to content

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

feat(composio): add identity schemas and contract module

Steven Enamakel5c3cf299ffb3
diff --git a/crates/openhuman-core/src/integrations/composio/contract/mod.rs b/crates/openhuman-core/src/integrations/composio/contract/mod.rs
index 7ff3bdfdcf..f5333c779c 100644
--- a/crates/openhuman-core/src/integrations/composio/contract/mod.rs
+++ b/crates/openhuman-core/src/integrations/composio/contract/mod.rs
@@ -1,6 +1,6 @@
//! The Composio vocabulary the host's integration code shares: toolkit
//! catalogs (curated action lists and descriptions), connected-identity
-//! profiles, per-toolkit user scope preferences, sync run shapes and the
+//! profiles, per-toolkit user scope preferences and the
//! normalised task shape.
//!
//! These types used to be part of TinyMemory's v1 bus contract, which carried
@@ -10,7 +10,6 @@
pub mod catalogs;
pub mod profile;
-pub mod runs;
pub mod scopes;
pub mod tasks;
@@ -18,7 +17,6 @@ pub use profile::{
canonicalize, normalize_connection_identifier, render_connected_identities_section,
ConnectedIdentity, IdentityKind, ProviderUserProfile,
};
-pub use runs::{SyncOutcome, SyncReason};
pub use scopes::{
agent_ready_toolkits, classify_unknown, find_curated, toolkit_from_slug, CuratedTool,
ToolScope, UserScopePref,
diff --git a/crates/openhuman-core/src/integrations/composio/mod.rs b/crates/openhuman-core/src/integrations/composio/mod.rs
index 9e54cd58ef..467688aee0 100644
--- a/crates/openhuman-core/src/integrations/composio/mod.rs
+++ b/crates/openhuman-core/src/integrations/composio/mod.rs
@@ -24,11 +24,6 @@
//! connection-created and config-changed subscribers keep the
//! integrations cache fresh.
//!
-//! - **Memory sync** (`ops::sync`) — `composio_sync` / `run_sync_pass` read a
-//! connection through the connector module and store the records via
-//! `memory::sources::composio`. Scheduling is memory's (v2 source
-//! schedules); this domain has no periodic loop.
-//!
//! ## Socket.IO trigger flow
//!
//! ```text
@@ -64,7 +59,7 @@ pub mod trigger_history;
pub mod types;
pub use crate::agent::prompts::types::ConnectedIntegration;
-pub use crate::integrations::composio::providers::{ProviderUserProfile, SyncOutcome, SyncReason};
+pub use crate::integrations::composio::providers::ProviderUserProfile;
pub use action_tool::ComposioActionTool;
pub use bus::{
register_composio_trigger_subscriber, ComposioConfigChangedSubscriber,
diff --git a/crates/openhuman-core/src/integrations/composio/ops/mod.rs b/crates/openhuman-core/src/integrations/composio/ops/mod.rs
index 5d59ee386f..235e3b3aca 100644
--- a/crates/openhuman-core/src/integrations/composio/ops/mod.rs
+++ b/crates/openhuman-core/src/integrations/composio/ops/mod.rs
@@ -19,18 +19,14 @@
//! | `execute` | `composio_execute` |
//! | `triggers` | GitHub repos + trigger CRUD + trigger history |
//! | `providers_ops` | `composio_get_user_profile`, `composio_refresh_all_identities` |
-//! | `sync` | `composio_sync`, `run_sync_pass` (connector records → memory) |
//! | `direct_mode` | `composio_get_mode`, `composio_set_api_key`, `_clear_...` |
//! | `user_scopes` | per-toolkit agent scope prefs, in a workspace JSON file |
-//! | `pass_failure` | when a connector pass failed; the sync retry schedule (openhuman#6255) |
mod connections;
mod direct_mode;
mod error_utils;
mod execute;
-mod pass_failure;
mod providers_ops;
-mod sync;
mod toolkits;
mod tools_ops;
mod triggers;
@@ -48,7 +44,6 @@ pub use execute::composio_execute;
pub use providers_ops::{
composio_get_user_profile, composio_refresh_all_identities, RefreshIdentitiesReport,
};
-pub use sync::{composio_sync, run_sync_pass, SyncPassOutcome, SYNC_PASS_MAX_ITEMS};
pub use toolkits::{
composio_list_agent_ready_toolkits, composio_list_capabilities, composio_list_toolkits,
};
@@ -93,17 +88,12 @@ pub(crate) use super::connected_integrations::sync_cache_with_connections;
#[cfg(test)]
pub(crate) use crate::config::Config;
#[cfg(test)]
-pub(crate) use crate::integrations::composio::providers::SyncReason;
-#[cfg(test)]
pub(crate) use connections::enrich_connections_with_identity;
#[cfg(test)]
pub(crate) use error_utils::{
backend_mode_without_session, classify_composio_failure_tag, direct_mode_without_key,
extract_backend_returned_status,
};
-#[cfg(test)]
-pub(crate) use sync::parse_sync_reason;
-
#[cfg(test)]
#[path = "../ops_tests.rs"]
mod tests;
diff --git a/crates/openhuman-core/src/integrations/composio/providers/mod.rs b/crates/openhuman-core/src/integrations/composio/providers/mod.rs
index 66c3768aa0..26eaf099ba 100644
--- a/crates/openhuman-core/src/integrations/composio/providers/mod.rs
+++ b/crates/openhuman-core/src/integrations/composio/providers/mod.rs
@@ -1,9 +1,9 @@
//! The Composio provider surface: curated catalogs, scope verdicts, the
-//! identity vocabulary and the run types, all from
+//! identity vocabulary and the task types, all from
//! [`crate::integrations::composio::contract`]. They are `&'static str`
//! tables, pure functions and inert payload types. Reading a connected
//! account goes through the connector module ([`super::module_client`]):
-//! profile fetch, action execution and sync (`ops::sync::run_sync_pass`).
+//! profile fetch and action execution.
// ── The contract half ───────────────────────────────────────────────────────
pub use crate::integrations::composio::contract::catalogs::{
@@ -18,6 +18,5 @@ pub use crate::integrations::composio::contract::tasks::{
GithubFetchMode, NormalizedTask, TaskContainer, TaskFetchFilter, TaskKind,
};
pub use crate::integrations::composio::contract::{
- render_connected_identities_section, ConnectedIdentity, ProviderUserProfile, SyncOutcome,
- SyncReason,
+ render_connected_identities_section, ConnectedIdentity, ProviderUserProfile,
};
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/definitions.rs b/crates/openhuman-core/src/integrations/composio/schemas/definitions.rs
index 692fbee5a8..ae6ec4afa9 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/definitions.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/definitions.rs
@@ -279,36 +279,6 @@ pub fn schemas(function: &str) -> ControllerSchema {
required: true,
}],
},
- "sync" => ControllerSchema {
- namespace: "composio",
- function: "sync",
- description:
- "Start a background sync of a Composio connection into memory: the connector \
- module reads the account and each record is stored as a memory document. \
- Fails up front when memory is off.",
- inputs: vec![
- FieldSchema {
- name: "connection_id",
- ty: TypeSchema::String,
- comment: "Composio connection id (from list_connections / authorize).",
- required: true,
- },
- FieldSchema {
- name: "reason",
- ty: TypeSchema::Option(Box::new(TypeSchema::String)),
- comment:
- "Optional reason: 'manual' (default), 'periodic', 'connection_created'.",
- required: false,
- },
- ],
- outputs: vec![FieldSchema {
- name: "outcome",
- ty: TypeSchema::Json,
- comment: "SyncOutcome: { toolkit, connectionId, reason, itemsIngested, \
- startedAtMs, finishedAtMs, summary, details }.",
- required: true,
- }],
- },
"list_trigger_history" => ControllerSchema {
namespace: "composio",
function: "list_trigger_history",
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs b/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
index b7203111d6..fcfb64190f 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_identity.rs
@@ -25,15 +25,6 @@ pub(super) fn handle_refresh_all_identities(_params: Map<String, Value>) -> Cont
})
}
-pub(super) fn handle_sync(params: Map<String, Value>) -> ControllerFuture {
- Box::pin(async move {
- let config = config_rpc::load_config_with_timeout().await?;
- let connection_id = read_required_non_empty(&params, "connection_id")?;
- let reason = read_optional::<String>(&params, "reason")?;
- to_json(ops::composio_sync(&config, &connection_id, reason).await?)
- })
-}
-
pub(super) fn handle_get_user_scopes(params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let toolkit = match read_required_non_empty(&params, "toolkit") {
diff --git a/vendor/tinyconnectors b/vendor/tinyconnectors
index d6a2744620..051ea8adca 160000
--- a/vendor/tinyconnectors
+++ b/vendor/tinyconnectors
@@ -1 +1 @@
-Subproject commit d6a2744620e138fe22a83a22d8e7264ae7d7cb49
+Subproject commit 051ea8adcabfee965be097bf2cbe91328f35ac3d