Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 4 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions tests/sessions-credentials.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 () => {
Expand Down