Skip to content

refactor(composio): drop the in-process HTTP client; route backend calls through the tinyconnectors module - #6796

Merged
senamakel merged 34 commits into
tinyhumansai:mainfrom
senamakel:vendor-extract-w2-composio
Sep 30, 2026
Merged

senamakel merged 34 commits into
tinyhumansai:mainfrom
senamakel:vendor-extract-w2-composio

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

Wave 2 removes the in-process Composio HTTP client. Backend-route callers now go through the tinyconnectors module. Only the direct-mode readers stay, and they are waiting on tinyconnectors#32. The net change is −3.7k lines.

Stacked on #6789 (→ #6786 → #6785 → #6781). The base is main because upstream branch creation is restricted.

Removed

  • ComposioClient, build_composio_client, resolve_client, create_direct_composio_tool_for_api_key
  • client/{connections,execute,triggers}.rs
  • ComposioTool as an agent Tool, which nothing registered in production. Its v2 fallbacks, connect URL, list_actions and ComposioAction go with it.
  • Their mock-backend tests: the module already covers that behaviour in its own suite.

Kept, slimmed

  • client/factory.rs now holds ComposioRoute { Backend, Direct(..) } and resolve_composio_route, which replaces create_composio_client.
  • It keeps mode selection, the host-pinned credential and the credential checks, with the user-facing messages unchanged:
    • "composio direct mode selected but no api key is configured…"
    • "…no backend session token…"
    • "unknown composio mode…"
  • DirectComposioClient is a non-Tool reader that only lists connected accounts and v3 tool schemas.

Per-caller migration

Caller Now
execute_dispatch, subagent_host/ops/provider.rs, memory_host::is_available, connection_created_subscriber (gate) resolve_composio_route
tools/{authorize,list_toolkits,list_tools,list_connections,connect} (backend arm) route check, then module AUTHORIZE / LIST_TOOLKITS / LIST_TOOLS / LIST_CONNECTIONS; the direct-mode messages are unchanged
connected_integrations/fetch_uncached.rs (backend arm) module LIST_TOOLKITS + LIST_CONNECTIONS + LIST_TOOLS
catalog/contract.rs, slack/rpc.rs, memory_host::list_connections, ops/connections.rs, connect.rs liveness backend arm uses the module; direct arm stays on direct_list_*
connection_created_subscriber readiness poll module LIST_CONNECTIONS with the reloaded live config

Waiting on a module release

  • Direct-mode direct_list_connections / direct_list_tools: these stay in OpenHuman. The pinned v0.10.3 DirectRoute omits limit=200 and toolkit_versions=latest (Direct-mode Composio client returns zero tools for Outlook (and other post-launch toolkits) #3932), and it comma-joins tags. Switching now would regress users with many accounts. tinyconnectors#32 fixes this, and after a release DirectComposioClient, client/direct.rs and probably direct_auth can go.
  • connected_integrations/backend_tools.rs: stays. In direct mode it makes one best-effort GET for backend tool schemas, because the module holds a single route. Removing it needs a per-call route override in the module.
  • The vendor/tinyconnectors gitlink is unchanged (v0.10.3), and there are no exemption changes.

Verification

  • cargo check --tests -p openhuman -p openhuman-cli --features "$(bash scripts/ci/product-features.sh)" is clean. The app manifest and openhuman-embed/openhuman-tinyhumans --tests also compile.
  • Full lib suite with the product features: 10310 passed, 0 failed. The integrations::composio subset alone is 373 passed.
  • raw_coverage_all: 157 passed, 1 failed, across two runs. The failure is tool_registry_entries_include_connected_mcp_client_tools, which also fails on the original base f3f434e5b7, so it is not caused by this PR. Two composio connector-module races in that binary are serialized by CONNECTOR_MODULE_LOCK; that fix landed in refactor(core): move time/goals tools, conversation store and composio execute into vendor crates #6785 and is merged here.
  • rust:layout, check-agent-runtime-boundary, check-feature-forwarding, check-gated-test-allowlist and check-submodule-monotonic upstream/main HEAD all pass. check-module-pins fails only on tinywallet and tinychannels, both from test: drop 45 quarantined raw-coverage files, dedupe vendor-covered tests, repoint vendor pins #6781.

Merge order

Merge after #6789. Then, once tinyconnectors#32 is released and pinned, a follow-up PR removes the direct readers.

senamakel and others added 30 commits September 30, 2026 09:22
Split the monolithic client.rs into dedicated submodules for connections, execution, factory, and triggers, improving code organization and maintainability. The public API remains unchanged, with all types re-exported from the client module.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
When a tool execution returns a result without a tool name, the system now falls back to the tool's own name instead of failing. This prevents crashes when external tools omit the name field in their response payload.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the construction tool's parameter types in the Composio integration to match the expected schema, fixing a type mismatch that caused validation errors when submitting construction requests.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
When constructing a tool from a JSON value, the code now returns an error if the tool name is missing or empty, instead of silently proceeding with an invalid state. This prevents downstream failures and makes the error condition explicit.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Changed the field name from `type` to `tool_type` in the tool construction logic to avoid a naming conflict with Rust's reserved keyword. This ensures the composio integration correctly serializes and deserializes tool type information without compilation errors.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
When a tool execution request lacks a connection ID, the system now returns a clear error message instead of panicking. This improves robustness by gracefully handling incomplete input data.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Moves the direct client and tool modules into a dedicated `tools/direct` subdirectory to improve code organization and maintainability. The HTTP error handling and discovery logic are also relocated into this new structure, keeping related functionality grouped together without changing any runtime behavior.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
When the Composio API returns an empty tool list during discovery, the client now returns an empty set instead of failing with an error. This allows integrations to proceed without tools when none are available, matching the expected behaviour for accounts that have not yet configured any tools.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a direct execution mode that allows composio integrations to run actions without requiring an active connection. This enables stateless, one-off tool invocations where a pre-established connection is not available or desired. The change adds a new dispatch path and supporting error handling for the direct mode, while keeping the existing connection-based flow intact.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
When the Composio API returns an empty list of toolkits during authorization, the previous code would panic or produce an error. This change adds a check for an empty response and returns a clear error message instead, allowing the authorization flow to fail gracefully rather than crashing.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Fixes the tool listing endpoint to properly return available tools instead of connections, and updates the connection listing to use the correct API path. The connect endpoint now correctly handles the authentication flow by passing the required parameters.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
When fetching uncached connected integrations, the system now returns an empty list instead of failing when no integrations are found. This prevents errors in downstream processes that expect a valid response even when no integrations have been configured.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
When fetching connected integrations, the system now gracefully handles cases where backend tools are not available by returning an empty list instead of failing. This prevents errors when integrations exist but their corresponding backend tool definitions are missing or not yet synchronized.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduces the contract module for the Composio catalog integration, defining the data structures and interfaces needed to interact with the Composio API for catalog operations. This establishes the foundational types for managing tool and app catalog entries within the integration layer.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…sio_route

Replaced the `create_composio_client` function with `resolve_composio_route` across all Composio integration points, and updated callers to use the new connector-module API for backend operations instead of the removed `ComposioClient` struct. This completes the migration to a route-based dispatch model where the live `composio.mode` toggle is honoured on every invocation without caching a pre-resolved client.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
An extra closing brace was left after the `DirectComposioClient` impl block, which would cause a compilation error. Removing it restores the correct syntax.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…,crates/openhuman-core/src/inte

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds unit tests for the Composio integration client to verify its core functionality and ensure reliability.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Renamed two test files to use underscores instead of hyphens in their names, ensuring consistent naming conventions across the test suite.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Renamed the test file to follow the standard Rust test module naming convention, ensuring it is properly recognized by the test runner and preventing it from being ignored during test execution.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…sioClient

Update the test files to use the new `DirectComposioClient` constructor instead of the old `ComposioTool` wrapper, removing the now-unnecessary `None` and `test_security()` arguments. This aligns the tests with the refactored public API that no longer requires those parameters.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed several test files across the composio integration and related modules that are no longer needed, cleaning up the codebase by eliminating stale or redundant test suites.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed the unused `MAX_ERROR_BODY_LEN` re-export from the test module in the integration client, and removed the unused `discovery` module imports from the Composio direct tools module that were no longer needed by the test code.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Three raw coverage test files for composio tools were removed as they are no longer needed for the test suite.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
This change introduces a new end-to-end test file that validates raw coverage reporting for composio tools when used directly, ensuring the coverage tooling correctly captures and reports coverage data in this scenario.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…k leftovers

Adds end-to-end raw coverage tests for the owned domain scenario and the composio network leftovers case, ensuring these paths are covered by automated testing.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The raw coverage e2e test now properly handles cases where no coverage data is available, preventing a panic when processing empty coverage results. This ensures the test suite remains stable when run against codebases with no instrumented lines.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed three unused imports from the composio raw coverage end-to-end test file to eliminate compiler warnings and keep the test code clean.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Added a README file to document the Composio integration module, providing users with setup instructions and usage guidance for the integration.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the pinned commit for the vendor/tinyconnectors submodule to incorporate upstream changes.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
senamakel and others added 3 commits September 30, 2026 09:42
Updated the pinned commit for the vendor/tinyconnectors subproject to incorporate upstream changes.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformat function calls and definitions across multiple composio integration files to keep arguments on a single line where they fit within the standard line length, and wrap them consistently when they do not. This improves code readability and aligns with the project's formatting conventions without changing any runtime behaviour.

Auto-committed-on: dragonfly
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 6e82439d-a446-4c8d-ba62-000293c7deea

📥 Commits

Reviewing files that changed from the base of the PR and between 21a8664 and cd5f23f.

📒 Files selected for processing (60)
  • crates/openhuman-core/src/agent/learning/linkedin_enrichment_tests.rs
  • crates/openhuman-core/src/agent/session_host/turn/tools.rs
  • crates/openhuman-core/src/agent/subagent_host/ops/provider.rs
  • crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs
  • crates/openhuman-core/src/integrations/client.rs
  • crates/openhuman-core/src/integrations/composio/README.md
  • crates/openhuman-core/src/integrations/composio/action_tool.rs
  • crates/openhuman-core/src/integrations/composio/action_tool_tests.rs
  • crates/openhuman-core/src/integrations/composio/catalog/contract.rs
  • crates/openhuman-core/src/integrations/composio/client.rs
  • crates/openhuman-core/src/integrations/composio/client/connections.rs
  • crates/openhuman-core/src/integrations/composio/client/direct.rs
  • crates/openhuman-core/src/integrations/composio/client/execute.rs
  • crates/openhuman-core/src/integrations/composio/client/factory.rs
  • crates/openhuman-core/src/integrations/composio/client/triggers.rs
  • crates/openhuman-core/src/integrations/composio/client_authorize_and_execute_tests.rs
  • crates/openhuman-core/src/integrations/composio/client_tests.rs
  • crates/openhuman-core/src/integrations/composio/client_triggers_and_factory_tests.rs
  • crates/openhuman-core/src/integrations/composio/connected_integrations.rs
  • crates/openhuman-core/src/integrations/composio/connected_integrations/backend_tools.rs
  • crates/openhuman-core/src/integrations/composio/connected_integrations/fetch_uncached.rs
  • crates/openhuman-core/src/integrations/composio/execute_dispatch.rs
  • crates/openhuman-core/src/integrations/composio/mod.rs
  • crates/openhuman-core/src/integrations/composio/ops/connections.rs
  • crates/openhuman-core/src/integrations/composio/ops/direct_mode.rs
  • crates/openhuman-core/src/integrations/composio/ops/error_utils.rs
  • crates/openhuman-core/src/integrations/composio/ops/mod.rs
  • crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs
  • crates/openhuman-core/src/integrations/composio/ops_tests.rs
  • crates/openhuman-core/src/integrations/composio/tools.rs
  • crates/openhuman-core/src/integrations/composio/tools/authorize.rs
  • crates/openhuman-core/src/integrations/composio/tools/connect.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct/connections.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct/discovery.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct/execution.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct/http_errors.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct/tool_impl.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct/types.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct_tests.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rs
  • crates/openhuman-core/src/integrations/composio/tools/direct_tests_sanitization_and_connected_accounts_tests.rs
  • crates/openhuman-core/src/integrations/composio/tools/list_connections.rs
  • crates/openhuman-core/src/integrations/composio/tools/list_toolkits.rs
  • crates/openhuman-core/src/integrations/composio/tools/list_tools.rs
  • crates/openhuman-core/src/integrations/composio/tools_direct_mode_routing_tests.rs
  • crates/openhuman-core/src/integrations/composio/tools_host_credential_tests.rs
  • crates/openhuman-core/src/integrations/composio/tools_tests.rs
  • crates/openhuman-core/src/memory/sync/composio/bus/connection_created_subscriber.rs
  • crates/openhuman-core/src/memory/sync/composio/providers/slack/rpc.rs
  • crates/openhuman-core/src/modules/memory_host.rs
  • crates/openhuman-core/src/modules/memory_host_tests.rs
  • crates/openhuman-core/src/security/credentials/ops/composio.rs
  • tests/raw_coverage/composio_raw_coverage_e2e.rs
  • tests/raw_coverage/composio_tools_direct_raw_coverage_e2e.rs
  • tests/raw_coverage/owned_domain_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_composio_round24_raw_coverage_e2e.rs
  • tests/raw_coverage/tools_composio_round26_raw_coverage_e2e.rs
 _________________________________________________________________
< This PR is a classic: 'small change' with 'large consequences'. >
 -----------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit 3ae3356 into tinyhumansai:main Sep 30, 2026
26 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant