@devries-cameron20 / composio Mirror · read-only / commits / a6fe09159
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 22:15 UTC

feat(core): add custom tools support to session.use() via v3.1 attach (#3350)

## Summary - `composio.use(id, { customTools, customToolkits })` now POSTs to `/api/v3.1/tool_router/session/{id}/attach` with inline `experimental.custom_*` when customs are supplied, hydrating the session and binding the local-tools map (mirrors `composio.create`'s customs path). Without options it keeps using the v3 retrieve endpoint. - Caches the raw `CustomTool[]` / `CustomToolkit[]` arrays on `CustomToolsMap` so the SDK has what it needs to re-inject inline customs on subsequent v3.1 search/execute/execute_meta calls (foundation for the v3.1 source-of-truth design). - Pairs with backend PR #9707 (v3.1 inline customs). ## Test plan - [x] `pnpm test` — `customTool.test.ts` (49) + `customToolRouting.test.ts` (36) pass - [x] `pnpm test:e2e:node` against staging (`COMPOSIO_BASE_URL=https://staging-backend.composio.dev`) — 26/26 pass on Node 20.19.0 + 22.12.0 - [x] Standalone fixture run against staging — all 12 checkpoints OK (LOCAL_EXECUTE, ZOD_DEFAULTS, ERROR_HANDLING, ZOD_VALIDATION_FAIL, MULTIPLE_TOOLS, SESSION_CONTEXT, CASE_INSENSITIVE, PREFIXED_SLUG, CHAINED_EXECUTE, NONEXISTENT_TOOL, TOOLS_WRAPPING, ALL_OK) - [x] tsc --noEmit clean on @composio/core (after bumping @composio/client to 0.1.0-alpha.68) ## Notes - Docs intentionally not included; will follow once the SDK is released. - The attach endpoint isn't yet in @composio/client, so it's called via the generic client.post<SessionRetrieveResponse>(...). Response is fully typed since attach returns the same shape as GET /session/{id} plus experimental.custom_*. 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Abir Taheer committed May 6, 2026 at 22:15 UTC a6fe0915921172a025ea1fdb844fcc8210a7680e

No changes.