From 04afa5d169771aa6ea78e44a10fde9e976fdf615 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Sat, 26 Sep 2026 13:47:13 -0500 Subject: [PATCH] Stop requiring verificationStatus in the signup response The gateway retired the agent-key claim flow (getanyapi-com/anyapi#1307) and will drop verificationStatus, claimToken, and claimUrl from POST /agent/signup once the SDKs and this CLI release. The CLI never read claimToken or claimUrl; SignupResponse.verificationStatus is now optional so the type matches a response without it. The CLI never validated the field at runtime, so the new test (a signup response with none of the three fields saves the trial key) also passes without the type change; it guards the tolerance the gateway drop relies on. Co-Authored-By: Claude Opus 5.5 (1M context) --- __tests__/login.test.ts | 21 +++++++++++++++++++++ src/types.ts | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/__tests__/login.test.ts b/__tests__/login.test.ts index 924323a..9c957de 100644 --- a/__tests__/login.test.ts +++ b/__tests__/login.test.ts @@ -175,6 +175,27 @@ describe('credential selection', () => { clientId: 'aa_client_trial', }); }); + + it('saves a trial key from a signup response without the retired claim fields', async () => { + const homeDir = await tempDir(); + const ctx = commandContext(homeDir, async () => json({ + secret: 'aa_live_trial', + keyId: 'key_trial', + capUsd: 0.15, + expiresAt: '2026-08-09T12:00:00.000Z', + clientId: 'aa_client_trial', + })); + + await signupCommand(ctx, {}); + + expect(await readConfig(getConfigPath(homeDir))).toEqual({ + apiKey: 'aa_live_trial', + keyId: 'key_trial', + capUsd: 0.15, + expiresAt: '2026-08-09T12:00:00.000Z', + clientId: 'aa_client_trial', + }); + }); }); describe('device token polling', () => { diff --git a/src/types.ts b/src/types.ts index 5d5a7d3..3d0ee5c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -22,7 +22,7 @@ export interface SignupResponse { secret: string; keyId: string; capUsd: number; - verificationStatus: string; + verificationStatus?: string; expiresAt: string; clientId?: string; upgrade?: SignupUpgrade;