@github-actions[bot]2w ago
OpenAPI Changelog (Production)
❌ Breaking changes
- ℹ️ GET /api/v3/cli/get-session – added the required property
entity_idto the response with the200status
The CLI login flow's GET /api/v3/cli/get-session response didn't include the consumer entity ID (consumer-${userId}-${orgId}), so connected accounts created via the dashboard were invisible to the CLI and vice versa. Datadog shows 30K+ entity mismatch errors and 257K+ "connected account not found" errors per week from this root cause.
This adds an entity_id field to the get-session response by:
linkedProject to also fetch the org (for its nanoId)getConsumerUserId() to derive the same entity ID the dashboard usesentity_id (nullable, null when session is pending)Changes:
apps/apollo/src/lib/cli_sessions/dbUtils/index.ts — expand linkedProject include to { include: { org: true } }apps/apollo/src/pages/api/v3/cli/get-session.ts — add entity_id to response schema and compute it from linked account + project orgBackward compatible: existing CLI clients that don't read entity_id are unaffected. No DB migration needed.
Note: The CLI side still needs to consume entity_id and write it as test_user_id in ~/.composio/user_data.json — that's a separate change in the CLI/SDK repo.
tsc --noEmit (all errors are pre-existing, unrelated to this change)Project.org and Org.nanoId relations existentity_id is purely additive (new nullable field), no breaking changes to existing consumers