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(sdk): add allow_multiple guard to connectedAccounts.link()
Bring `link()` to parity with `initiate()` so the duplicate-connection guard moves with customers as Composio-managed redirectable-OAuth callers migrate from `connected_accounts/create` to `connected_accounts/link` (SEC-339). - TS: add `allowMultiple?: boolean` to `CreateConnectedAccountLinkOptions`. `link()` now pre-flights `connectedAccounts.list({ statuses: ['ACTIVE'] })` and throws `ComposioMultipleConnectedAccountsError` when an active connection exists and `allowMultiple` is not `true`. - Python: add `allow_multiple: bool = False` to `connected_accounts.link()` with the same guard and the same `ComposioMultipleConnectedAccountsError`. - Tests: existing `link()` tests now mock `list` returning empty (default no-existing-connection path); new tests cover the raise path and the opt-in `allowMultiple=True` skip path. Also add multi_account parity tests on the Python tool_router create() to mirror the TS suite. Behavior change is intentional and patched separately with `.changeset/sdk-link-allow-multiple.md`. The user-facing changelog entry is split into a separate docs PR alongside the sandbox-size docs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>