@devries-cameron20 / composio Mirror · read-only / commits / 0fd919651
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): support REVOKED status added in Apollo #9550 (#3344)

# Description Apollo (hermes#9550) added a new \`REVOKED\` value to the connected-account status enum, alongside the existing \`INITIALIZING | INITIATED | ACTIVE | FAILED | EXPIRED | INACTIVE\`. The Apollo public-API response schema is \`z.nativeEnum(ConnectionStatusEnum)\`, so any list / get / status-update endpoint can now return \`REVOKED\` and clients must handle it. This PR fixes every hand-written place in the TS and Python SDKs that hard-coded the prior 6-value set and would either (a) fail-fast against \`REVOKED\` (Zod / Effect Schema parse error) or (b) silently misclassify it. ## TypeScript SDK — BREAKING fixes | File | Change | Severity | |---|---|---| | \`ts/packages/core/src/types/connectedAccounts.types.ts\` | Add \`REVOKED\` to \`ConnectedAccountStatuses\` and \`ConnectedAccountStatusSchema\` (\`z.enum\`) | BREAKING — \`z.enum().parse()\` would throw on responses containing the new value | | \`ts/packages/cli/src/models/connected-accounts.ts\` | Add \`REVOKED\` to Effect \`Schema.Literal(...)\` for \`ConnectedAccountItem.status\` | BREAKING — \`Schema.Literal()\` enforces literal matching | | \`ts/packages/cli/src/services/tool-router-session-connections.ts\` | Add \`'REVOKED'\` case to the \`normalizeConnectedAccountStatus\` switch | BREAKING — silent fall-through to \`'INACTIVE'\` masked the new status | | \`ts/packages/cli/src/services/composio-clients.ts\` | Replace the explicit 6-value cast with a generic that resolves to whatever the Stainless client currently accepts | Forwards \`REVOKED\` to Apollo; auto-tracks future Stainless regenerations | | \`ts/packages/core/src/models/ConnectedAccounts.ts\` | Cast \`statuses\` to the Stainless params type so \`REVOKED\` (already accepted by Apollo) flows through until \`@composio/client\` is regenerated | Adapter shim; remove once \`@composio/client\` is regenerated | ## Python SDK — DEGRADED fixes | File | Change | Severity | |---|---|---| | \`python/composio/core/models/webhook_events.py\` | Add \`REVOKED\` to \`ConnectionStatusEnum\` | DEGRADED — code that checked \`status in ConnectionStatusEnum\` would have failed to recognise the new value | | \`python/composio/core/models/connected_accounts.py\` | \`ConnectionRequest.wait_for_connection\` now fails fast on terminal non-ACTIVE states (\`FAILED\` / \`EXPIRED\` / \`INACTIVE\` / \`REVOKED\`) instead of looping until the 60s timeout | DEGRADED — REVOKED used to look identical to "still pending" until the timeout fired | The Stainless-generated \`@composio/client\` (TS) and \`composio_client\` (Python) packages will pick up \`REVOKED\` automatically when regenerated; this PR covers the hand-written SDK code only. # How did I test this PR - \`pnpm typecheck\` (root) — clean (\`9 successful, 9 total\`) - \`pnpm test\` (root) — 694 passed, 1 skipped (75 test files); examples validation \`Validated 22 example packages\` - Python: \`ruff check\` and \`ruff format --check\` clean on both edited files - Smoke-tested Python imports + enum membership: \`\`\` PYTHON: imports OK, REVOKED present: REVOKED \`\`\` Triggered by: sarthak@composio.dev | Source: web Session: https://zen-api-production-4c98.up.railway.app/dashboard/#/chat/zen-14dc825802da

Alberto Schiabel committed May 7, 2026 at 12:19 UTC 0fd9196515d15925414d299404ea3a53118a638d

No changes.