@devries-cameron20 / composio Mirror · read-only / commits / 49a23fed2
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

fix(cli): add account_type to SessionLinkResponse test mocks

@composio/client@0.1.0-alpha.71 (just bumped in 483af3607) tightened SessionLinkResponse to require `account_type: 'PRIVATE' | 'SHARED'` — the four test mocks of `client.toolRouter.session.link` no longer satisfy the typed surface. CI was failing Build + Typecheck + every E2E job with the same 3 errors at connected-accounts.link.cmd.test.ts:287, 341, 373 (cascade — Typecheck fails first, Build/E2E inherit). All fixed by adding `account_type: 'PRIVATE' as const` at the four mock sites (3 in connected-accounts.link.cmd.test.ts, 1 in test-layer.ts default). PRIVATE chosen as the default because that matches what the backend now returns when account_type isn't supplied on input. Lesson: when bumping @composio/client, run `pnpm -r typecheck` at the workspace root, not just `pnpm --filter @composio/core typecheck`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

venkat82 committed May 12, 2026 at 00:06 UTC 49a23fed2480c7c8639094694b8261a8f924943d
2 files changed +4
ts/packages/cli/test/__utils__/services/test-layer.ts
+1
@@ -1160,6 +1160,7 @@ export const TestLayer = (input?: TestLiveInput) =>
1160 connected_account_id: 'con_test_link',
1161 link_token: 'lt_test_token',
1162 redirect_url: 'https://app.composio.dev/link?token=lt_test_token',
1163 + account_type: 'PRIVATE' as const,
1164 })),
1165 proxyExecute:
1166 toolRouterOverrides?.proxyExecute ??
ts/packages/cli/test/src/commands/connected-accounts/connected-accounts.link.cmd.test.ts
+3
@@ -96,6 +96,7 @@ describe('CLI: composio dev connected-accounts link', () => {
96 connected_account_id: 'con_test_link',
97 link_token: 'lt_test_token',
98 redirect_url: 'https://app.composio.dev/link?token=lt_test_token',
99 + account_type: 'PRIVATE' as const,
100 }));
101
102 afterEach(() => {
@@ -288,6 +289,7 @@ describe('CLI: composio dev connected-accounts link', () => {
289 connected_account_id: '',
290 link_token: 'lt_test_token',
291 redirect_url: '',
292 + account_type: 'PRIVATE' as const,
293 }),
294 },
295 })
@@ -374,6 +376,7 @@ describe('CLI: composio dev connected-accounts link', () => {
376 connected_account_id: 'con_second_link',
377 link_token: 'lt_test_token',
378 redirect_url: 'https://app.composio.dev/link?token=lt_test_token',
379 + account_type: 'PRIVATE' as const,
380 }),
381 },
382 fixture: 'global-test-user-id',