@devries-cameron20 / composio Mirror · read-only / commits / 22bc3f9eb
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, 21:00 UTC

feat(connected-accounts): namespace SHARED-connection surface under experimental (#3424)

## Summary Moves the SHARED connected-accounts surface in the TypeScript SDK under the `experimental` namespace, mirroring the wire-level restructure of the same fields. Same precedent as `experimental_createTool` / `experimental_createToolkit` — the namespace tells callers the shape may still change. Python equivalent: #3412. - `connectedAccounts.link()` and `session.authorize()`: flat `accountType` / `aclConfigForShared` options → single `experimental: {...}` block - `composio.connectedAccounts.updateAcl(...)` → top-level `experimental_updateAcl(composio, id, opts)` export - `composio.connectedAccounts.list(...)` now exposes `accountType: 'PRIVATE' | 'SHARED' | 'ALL'` (flat — the wire keeps this as a query param) - `@composio/client` bumped `0.1.0-alpha.71` → `0.1.0-alpha.72` so the generated typed client carries the `Experimental` namespaces Pinning a SHARED connection in a session (`connectedAccounts: { gmail: [...] }`) and direct execute by `connectedAccountId` are unchanged — only the connection-create / patch / authorize surfaces moved. ## Caller migration ```typescript // before await composio.connectedAccounts.link('user_id', 'auth_config_id', { accountType: 'SHARED', aclConfigForShared: { allowAllUsers: true }, }); await composio.connectedAccounts.updateAcl('ca_abc', { allowAllUsers: true }); await session.authorize('github', { accountType: 'SHARED', aclConfigForShared: { allowAllUsers: true }, }); // after import { experimental_updateAcl } from '@composio/core'; await composio.connectedAccounts.link('user_id', 'auth_config_id', { experimental: { accountType: 'SHARED', aclConfigForShared: { allowAllUsers: true }, }, }); await experimental_updateAcl(composio, 'ca_abc', { allowAllUsers: true }); await session.authorize('github', { experimental: { accountType: 'SHARED', aclConfigForShared: { allowAllUsers: true }, }, }); // new — list SHARED connections const shared = await composio.connectedAccounts.list({ accountType: 'SHARED', userIds: ['user_creator'], }); ``` ## Tests - `link()` forwards the experimental block / omits it when not provided / preserves explicit empty arrays - `link()` maps the `acl_config_for_shared is only valid on SHARED` 400 to `ComposioAclOnlyForSharedError`; unrelated errors fall back to `ComposioFailedToCreateConnectedAccountLink` - `experimental_updateAcl()` PATCH body construction, deny-list handling, `ValidationError` when no fields provided, same 400-mapper as `link()` - `authorize()` forwards the experimental block; ACL caps (1000-entry list, 256-char userId, non-empty) still enforced - `list({ accountType: 'SHARED' })` delegates the flat filter through to the client ## Test plan - [ ] `pnpm typecheck` clean (core) - [ ] `pnpm test` → 919 passed - [ ] Once published, follow-up docs PR (#3406) removes `// @noErrors` directives from TypeScript code samples 🤖 Generated with [Claude Code](https://claude.com/claude-code)

venkat82 committed May 13, 2026 at 19:18 UTC 22bc3f9eb009a011dfecb15a1363513415bb6e09

No changes.