From 3d5a5118d85f718e81fc0e9f157231c5d5c9027f Mon Sep 17 00:00:00 2001 From: vvillait88 Date: Fri, 24 Jul 2026 21:46:40 -0700 Subject: [PATCH 1/2] feat: expose refreshable on CredentialItem GET /v1/credentials now returns refreshable per credential: true when a live refresh token can still mint a replacement. The list includes an expired credential while that holds, because revoking it is what stops the renewal and a row that never lists can never be revoked. Optional on the wire, so a client reading an older API build is unaffected. --- src/types.ts | 4 ++++ tests/sessions-credentials.test.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/types.ts b/src/types.ts index 9810843..4d20e5f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -633,6 +633,10 @@ export interface CredentialItem { expires_at: string | null; last_used_at: string | null; created_at: string; + /** `true` when a live refresh token can still mint a replacement for this + * credential. An expired credential is listed only while this holds, since + * revoking it is what stops the renewal. */ + refreshable?: boolean; } export interface AccountVerification { diff --git a/tests/sessions-credentials.test.ts b/tests/sessions-credentials.test.ts index 5a2776a..3570d04 100644 --- a/tests/sessions-credentials.test.ts +++ b/tests/sessions-credentials.test.ts @@ -293,6 +293,7 @@ const CREDENTIAL_LIST_RESPONSE = { expires_at: '2027-04-09T00:00:00Z', last_used_at: '2026-04-08T12:00:00Z', created_at: '2026-04-01T00:00:00Z', + refreshable: true, }, { id: 'cred_def456', @@ -315,6 +316,9 @@ describe('AgentScore.listCredentials()', () => { expect(result.credentials).toHaveLength(2); expect(result.credentials[0].id).toBe('cred_abc123'); expect(result.credentials[1].last_used_at).toBeNull(); + expect(result.credentials[0].refreshable).toBe(true); + // Optional on the wire: an older API build omits the key entirely. + expect(result.credentials[1].refreshable).toBeUndefined(); }); it('sends GET request to /v1/credentials', async () => { From c6e52de6034185eab774774c4f7d7e51bced243e Mon Sep 17 00:00:00 2001 From: vvillait88 Date: Fri, 24 Jul 2026 21:49:35 -0700 Subject: [PATCH 2/2] chore: 2.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2baef7c..e55b968 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agent-score/sdk", - "version": "2.6.4", + "version": "2.7.0", "description": "TypeScript client for the AgentScore APIs", "main": "./dist/index.js", "module": "./dist/index.mjs",