Skip to content

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

refactor(composio): update composio controller registration mechanism

Steven Enamakelcc22a7e3be36
diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rs
index fd57cb55af..e0ced0cfcc 100644
--- a/crates/openhuman-core/src/core/all.rs
+++ b/crates/openhuman-core/src/core/all.rs
@@ -296,10 +296,10 @@ fn build_registered_controllers() -> Vec<GroupedController> {
crate::desktop::app_state::all_app_state_registered_controllers(),
);
// Composio integration controllers
- push(
+ push_entries(
&mut controllers,
DomainGroup::Integrations,
- crate::integrations::composio::all_composio_registered_controllers(),
+ crate::integrations::composio::all_composio_controller_entries(),
);
// Scheduled job management
push(
diff --git a/crates/openhuman-core/src/core/all_bound_controller_tests.rs b/crates/openhuman-core/src/core/all_bound_controller_tests.rs
index 2795ce9759..9094ea747c 100644
--- a/crates/openhuman-core/src/core/all_bound_controller_tests.rs
+++ b/crates/openhuman-core/src/core/all_bound_controller_tests.rs
@@ -220,7 +220,11 @@ fn production_registry_binds_threads_upsert_to_its_declared_parser() {
.filter(|grouped| grouped.controller.is_bound())
.map(|grouped| grouped.controller.schema.method_name())
.collect();
- assert_eq!(bound_methods, ["threads.upsert"], "staged bound inventory");
+ assert_eq!(
+ bound_methods,
+ ["composio.execute", "threads.upsert"],
+ "staged bound inventory"
+ );
assert!(
entry.is_bound(),
"threads.upsert must be bound at the production registration site"
diff --git a/crates/openhuman-core/src/integrations/composio/mod.rs b/crates/openhuman-core/src/integrations/composio/mod.rs
index 19d43ab4ec..5bbefec802 100644
--- a/crates/openhuman-core/src/integrations/composio/mod.rs
+++ b/crates/openhuman-core/src/integrations/composio/mod.rs
@@ -77,6 +77,7 @@ pub use ops::{
fetch_connected_integrations_status, invalidate_connected_integrations_cache,
FetchConnectedIntegrationsStatus,
};
+pub(crate) use schemas::all_controller_entries as all_composio_controller_entries;
pub use schemas::{
all_controller_schemas as all_composio_controller_schemas,
all_registered_controllers as all_composio_registered_controllers,
diff --git a/crates/openhuman-core/src/integrations/composio/schemas.rs b/crates/openhuman-core/src/integrations/composio/schemas.rs
index fd53ddbfae..d7e6a23cdc 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas.rs
@@ -28,6 +28,7 @@ mod util;
#[path = "schemas_tests.rs"]
mod tests;
+pub(crate) use registry::all_controller_entries;
pub use registry::{all_controller_schemas, all_registered_controllers};
pub use definitions::schemas;
diff --git a/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs b/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs
index 3ef616536a..df60118d3d 100644
--- a/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs
+++ b/crates/openhuman-core/src/integrations/composio/schemas/handlers_tools_tests.rs
@@ -70,7 +70,10 @@ fn execute_parser_preserves_tool_first_errors_and_connection_type_error() {
("tool".into(), json!(" ")),
("connection_id".into(), json!(7)),
]);
- assert_eq!(parse_execute(empty_tool).unwrap_err(), "'tool' must not be empty");
+ assert_eq!(
+ parse_execute(empty_tool).unwrap_err(),
+ "'tool' must not be empty"
+ );
let invalid_connection = Map::from_iter([
("tool".into(), json!("GMAIL_SEND_EMAIL")),