Skip to content

Commit 04afa5d

Browse files
kev1nclaude
andcommitted
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) <noreply@anthropic.com>
1 parent a377d9e commit 04afa5d

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

‎__tests__/login.test.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,27 @@ describe('credential selection', () => {
175175
clientId: 'aa_client_trial',
176176
});
177177
});
178+
179+
it('saves a trial key from a signup response without the retired claim fields', async () => {
180+
const homeDir = await tempDir();
181+
const ctx = commandContext(homeDir, async () => json({
182+
secret: 'aa_live_trial',
183+
keyId: 'key_trial',
184+
capUsd: 0.15,
185+
expiresAt: '2026-08-09T12:00:00.000Z',
186+
clientId: 'aa_client_trial',
187+
}));
188+
189+
await signupCommand(ctx, {});
190+
191+
expect(await readConfig(getConfigPath(homeDir))).toEqual({
192+
apiKey: 'aa_live_trial',
193+
keyId: 'key_trial',
194+
capUsd: 0.15,
195+
expiresAt: '2026-08-09T12:00:00.000Z',
196+
clientId: 'aa_client_trial',
197+
});
198+
});
178199
});
179200

180201
describe('device token polling', () => {

‎src/types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface SignupResponse {
2222
secret: string;
2323
keyId: string;
2424
capUsd: number;
25-
verificationStatus: string;
25+
verificationStatus?: string;
2626
expiresAt: string;
2727
clientId?: string;
2828
upgrade?: SignupUpgrade;

0 commit comments

Comments
 (0)