Skip to content

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

chore(composio): disable scope filtering in list-tools request

Steven Enamakel4bbeb5cf5dbf
diff --git a/src/openhuman/integrations/composio/ops/tools_ops.rs b/src/openhuman/integrations/composio/ops/tools_ops.rs
index 3ade2ed163..aa616d2299 100644
--- a/src/openhuman/integrations/composio/ops/tools_ops.rs
+++ b/src/openhuman/integrations/composio/ops/tools_ops.rs
@@ -12,13 +12,27 @@ use super::error_utils::{report_composio_op_error, should_forward_tags, OpResult
/// # What moved
///
/// The direct route used to be a second implementation here: prefetch the
-/// connected toolkits, fetch v3 schemas for them, then re-apply OpenHuman's
-/// curated whitelist and the user's scope preference. All of it is the module's
-/// now, including the scope filter.
+/// connected toolkits, then fetch v3 schemas for them. That is the module's
+/// now, and this function no longer branches on which route is live.
///
-/// The filter is deliberately *not* mirrored here. Two places deciding what a
-/// user permitted is how one of them ends up stale and permissive, and the
-/// permissive one is the one that lets an action through.
+/// # Why the scope filter is asked for `false`
+///
+/// The module can filter a listing by the user's scope preference, and
+/// eventually it should — it is the half that also refuses an `Execute`, and
+/// one component deciding both is the only arrangement that cannot disagree
+/// with itself.
+///
+/// It cannot yet, because the preference is not stored where the module can
+/// see it. The rows live in the bound memory driver's KV tier
+/// (`super::user_scopes`), and the module reads its own state directory. Asking
+/// it to filter today would filter against *its* defaults — `read+write`, no
+/// `admin` — rather than against what the user actually chose, and the two
+/// would disagree the moment anyone touched the toggle.
+///
+/// So enforcement stays whole on this side for now: `super::super::tools`
+/// applies the preference to what the agent sees, which is the path that leads
+/// to an action being run. Phase 4 moves the store, and this flag flips with
+/// it.
pub async fn composio_list_tools(
config: &Config,
toolkits: Option<Vec<String>>,
@@ -34,7 +48,7 @@ pub async fn composio_list_tools(
let request = ComposioListToolsRequest {
toolkits: toolkits.unwrap_or_default(),
tags: effective_tags.unwrap_or_default(),
- ..ComposioListToolsRequest::default()
+ apply_user_scopes: false,
};
let named = request.toolkits.len();