From 57fe08b2e5de6fc5d69c25e87f75f9ebb1c9aeed Mon Sep 17 00:00:00 2001 From: vvillait88 Date: Fri, 24 Jul 2026 21:46:59 -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. NotRequired, so a client reading an older API build is unaffected. --- agentscore/types.py | 4 ++++ tests/test_client.py | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/agentscore/types.py b/agentscore/types.py index 626e2ef..cb50592 100644 --- a/agentscore/types.py +++ b/agentscore/types.py @@ -420,6 +420,10 @@ class CredentialItem(TypedDict): created_at: str expires_at: str | None last_used_at: str | None + # 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: NotRequired[bool] class _CredentialCreateResponseRequired(TypedDict): diff --git a/tests/test_client.py b/tests/test_client.py index 749db7a..cbc85f9 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1245,6 +1245,7 @@ def test_create_credential_raises_on_error(): "created_at": "2024-01-01T00:00:00Z", "expires_at": "2024-04-01T00:00:00Z", "last_used_at": None, + "refreshable": False, }, { "id": "cred_def456", @@ -1266,6 +1267,10 @@ def test_list_credentials_success(): assert len(result["credentials"]) == 2 assert result["credentials"][0]["id"] == "cred_abc123" assert result["credentials"][1]["id"] == "cred_def456" + assert result["credentials"][0]["refreshable"] is False + # Optional on the wire: a credential listed by an older API build carries no + # such key, and reading it must not raise. + assert result["credentials"][1].get("refreshable") is None @respx.mock From 9a061e8239cb75d6dfad0a35919e92578758d781 Mon Sep 17 00:00:00 2001 From: vvillait88 Date: Fri, 24 Jul 2026 21:49:44 -0700 Subject: [PATCH 2/2] chore: 2.6.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 881e75b..e6d5a52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "agentscore-py" -version = "2.5.3" +version = "2.6.0" description = "Python client for the AgentScore APIs" readme = "README.md" license = "MIT"