From ac407cfa58a130aa0e737abdee749746a14c87f3 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Nov 2026 05:08:19 +0000 Subject: [PATCH 1/2] chore(sdk-python): bump amw-sdk version to 0.5.1 Update version from 0.5.0 to 0.5.1 in: - pyproject.toml - src/b2a_sdk/__init__.py - src/b2a_sdk/client.py User-Agent - src/b2a_sdk/x402.py User-Agent - tests/test_trust_client.py version assertion Add CHANGELOG.md entry for 0.5.1 documenting the receipt verification timezone fix from PR #368 (commit 4bf3fd4f, closes #358). This is a version-bump-only change carrying the already-merged fix. Signed-off-by: Cursor Agent Co-authored-by: Christopher --- sdk/python/CHANGELOG.md | 9 +++++++++ sdk/python/pyproject.toml | 2 +- sdk/python/src/b2a_sdk/__init__.py | 2 +- sdk/python/src/b2a_sdk/client.py | 2 +- sdk/python/src/b2a_sdk/x402.py | 2 +- sdk/python/tests/test_trust_client.py | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/sdk/python/CHANGELOG.md b/sdk/python/CHANGELOG.md index d8c8c9a68..8a365db96 100644 --- a/sdk/python/CHANGELOG.md +++ b/sdk/python/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.5.1 + +### Fixed + +- **Receipt verification timezone fix**: `Receipt.verify()` no longer returns + `MISMATCH` on genuine receipts where `created_at` lacks a timezone. The + verifier now normalizes timestamps before comparison (PR #368, fixes #358, + commit 4bf3fd4f). + ## Unreleased — 0.5.0 `pyproject.toml` carries `0.5.0` from here on. `0.4.0` is published and diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 07dd16a10..08ffb4991 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "amw-sdk" -version = "0.5.0" +version = "0.5.1" description = "Python SDK for governed MCP permits, idempotent agent-tool calls, receipts, and audit evidence" readme = "README.md" license = "Apache-2.0" diff --git a/sdk/python/src/b2a_sdk/__init__.py b/sdk/python/src/b2a_sdk/__init__.py index 124e9ef45..26ed39c43 100644 --- a/sdk/python/src/b2a_sdk/__init__.py +++ b/sdk/python/src/b2a_sdk/__init__.py @@ -48,7 +48,7 @@ verify_resolution_chain, ) -__version__ = "0.5.0" +__version__ = "0.5.1" # The HTTP client surface (client, edge_client, and the decorators that wrap it) # pulls in httpx. Load those names lazily via PEP 562 so importing the package — diff --git a/sdk/python/src/b2a_sdk/client.py b/sdk/python/src/b2a_sdk/client.py index 012e10854..7fc669ad1 100644 --- a/sdk/python/src/b2a_sdk/client.py +++ b/sdk/python/src/b2a_sdk/client.py @@ -217,7 +217,7 @@ def __init__( headers = { "X-API-Key": api_key, "Content-Type": "application/json", - "User-Agent": "amw-sdk/0.5.0", + "User-Agent": "amw-sdk/0.5.1", } if bearer_token is not None: token = bearer_token.strip() diff --git a/sdk/python/src/b2a_sdk/x402.py b/sdk/python/src/b2a_sdk/x402.py index 75a016336..7942e0cfa 100644 --- a/sdk/python/src/b2a_sdk/x402.py +++ b/sdk/python/src/b2a_sdk/x402.py @@ -101,7 +101,7 @@ def __init__( # Source of truth for the User-Agent string is # AgentMiddlewareClient.__init__ in client.py (it exposes no # importable constant); keep the two in lockstep. - "User-Agent": "amw-sdk/0.5.0", + "User-Agent": "amw-sdk/0.5.1", }, timeout=timeout, transport=transport, diff --git a/sdk/python/tests/test_trust_client.py b/sdk/python/tests/test_trust_client.py index 4a0c45e92..037158079 100644 --- a/sdk/python/tests/test_trust_client.py +++ b/sdk/python/tests/test_trust_client.py @@ -86,7 +86,7 @@ async def test_default_base_url_is_localhost_never_a_hosted_server() -> None: async def test_discover_tools_returns_typed_definitions() -> None: async def handler(request: httpx.Request) -> httpx.Response: assert request.url.path == "/mcp/tools.json" - assert request.headers["user-agent"] == "amw-sdk/0.5.0" + assert request.headers["user-agent"] == "amw-sdk/0.5.1" return httpx.Response( 200, json={ From 447f98d524251da58619d222dd0343ce0bb0b68c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Nov 2026 05:15:19 +0000 Subject: [PATCH 2/2] chore(sdk-python): update gateway SDK version references to 0.5.1 Update gateway's well-known endpoint and test comment to reflect the SDK version bump from 0.5.0 to 0.5.1. This fixes the failing test_wedge_honesty.py::test_agent_json_sdk_integrations_are_honest test which verifies the gateway's advertised SDK version matches pyproject.toml. Signed-off-by: Cursor Agent Co-authored-by: Christopher --- gateway/app/routers/well_known.py | 4 ++-- gateway/tests/test_wedge_honesty.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gateway/app/routers/well_known.py b/gateway/app/routers/well_known.py index 70f9cdd34..bbda228a8 100644 --- a/gateway/app/routers/well_known.py +++ b/gateway/app/routers/well_known.py @@ -341,13 +341,13 @@ def _integration_manifest() -> dict[str, Any]: # field describes what ``install`` below produces, so it tracks the # source, not the newest tag. The two are named separately because # they differ whenever source has moved past the last release. - "version": "0.5.0", + "version": "0.5.1", "path": "sdk/python/", "install": "pip install -e ./sdk/python", "latest_release_tag": "python-sdk-v0.4.0", "note": ( "Install from source in sdk/python/ (import package " - "b2a_sdk), which yields 0.5.0 pre-release. Latest cut " + "b2a_sdk), which yields 0.5.1 pre-release. Latest cut " "release is tag python-sdk-v0.4.0. Not published to PyPI." ), }, diff --git a/gateway/tests/test_wedge_honesty.py b/gateway/tests/test_wedge_honesty.py index db7eb3436..e90c4eef9 100644 --- a/gateway/tests/test_wedge_honesty.py +++ b/gateway/tests/test_wedge_honesty.py @@ -205,7 +205,7 @@ async def test_agent_json_sdk_integrations_are_honest(client): assert "pip install amw-sdk" not in json.dumps(python_sdk) assert "not published" in python_sdk["note"].lower() # 0.4.0 was cut as tag python-sdk-v0.4.0 (see sdk/python/CHANGELOG.md); - # the source tree has since moved to an unreleased 0.5.0. + # the source tree has since moved to an unreleased 0.5.1. assert python_sdk["latest_release_tag"] == "python-sdk-v0.4.0" typescript_sdk = integrations["typescript_sdk"]