Skip to content

Commit a680c18

Browse files
committed
chore: merge main and fix tests for proto refactor
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
2 parents 4487307 + cb7cdb3 commit a680c18

38 files changed

Lines changed: 1991 additions & 72 deletions

.github/actions/spelling/allow.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@ initdb
4747
inmemory
4848
INR
4949
isready
50+
jku
5051
JPY
5152
JSONRPCt
53+
jwk
54+
jwks
5255
JWS
56+
jws
57+
kid
5358
kwarg
5459
langgraph
5560
lifecycles

.github/workflows/linter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'a2aproject/a2a-python'
1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
- name: Set up Python
1717
uses: actions/setup-python@v6
1818
with:

.github/workflows/python-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v5
15+
- uses: actions/checkout@v6
1616

1717
- name: Install uv
1818
uses: astral-sh/setup-uv@v7
@@ -26,7 +26,7 @@ jobs:
2626
run: uv build
2727

2828
- name: Upload distributions
29-
uses: actions/upload-artifact@v5
29+
uses: actions/upload-artifact@v6
3030
with:
3131
name: release-dists
3232
path: dist/
@@ -40,7 +40,7 @@ jobs:
4040

4141
steps:
4242
- name: Retrieve release distributions
43-
uses: actions/download-artifact@v6
43+
uses: actions/download-artifact@v7
4444
with:
4545
name: release-dists
4646
path: dist/

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Mark stale issues and pull requests
77

88
on:
99
schedule:
10-
# Scheduled to run at 10.30PM UTC everyday (1530PDT/1430PST)
10+
# Scheduled to run at 10.30PM UTC every day (1530PDT/1430PST)
1111
- cron: "30 22 * * *"
1212
workflow_dispatch:
1313

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
python-version: ['3.10', '3.13']
4040
steps:
4141
- name: Checkout code
42-
uses: actions/checkout@v5
42+
uses: actions/checkout@v6
4343
- name: Set up test environment variables
4444
run: |
4545
echo "POSTGRES_TEST_DSN=postgresql+asyncpg://a2a:a2a_password@localhost:5432/a2a_test" >> $GITHUB_ENV

.github/workflows/update-a2a-types.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
pull-requests: write
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
- name: Set up Python
1717
uses: actions/setup-python@v6
1818
with:
@@ -42,7 +42,7 @@ jobs:
4242
uv run scripts/grpc_gen_post_processor.py
4343
echo "Buf generate finished."
4444
- name: Create Pull Request with Updates
45-
uses: peter-evans/create-pull-request@v7
45+
uses: peter-evans/create-pull-request@v8
4646
with:
4747
token: ${{ secrets.A2A_BOT_PAT }}
4848
committer: a2a-bot <a2a-bot@google.com>

CHANGELOG.md

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,60 @@
11
# Changelog
22

3-
## [0.4.0](https://github.com/a2aproject/a2a-python/compare/v0.3.14...v0.4.0) (2025-11-19)
3+
## [0.3.22](https://github.com/a2aproject/a2a-python/compare/v0.3.21...v0.3.22) (2025-12-16)
4+
5+
6+
### Features
7+
8+
* Add custom ID generators to SimpleRequestContextBuilder ([#594](https://github.com/a2aproject/a2a-python/issues/594)) ([04bcafc](https://github.com/a2aproject/a2a-python/commit/04bcafc737cf426d9975c76e346335ff992363e2))
9+
10+
11+
### Code Refactoring
12+
13+
* Move agent card signature verification into `A2ACardResolver` ([6fa6a6c](https://github.com/a2aproject/a2a-python/commit/6fa6a6cf3875bdf7bfc51fb1a541a3f3e8381dc0))
14+
15+
## [0.3.21](https://github.com/a2aproject/a2a-python/compare/v0.3.20...v0.3.21) (2025-12-12)
16+
17+
18+
### Documentation
19+
20+
* Fixing typos ([#586](https://github.com/a2aproject/a2a-python/issues/586)) ([5fea21f](https://github.com/a2aproject/a2a-python/commit/5fea21fb34ecea55e588eb10139b5d47020a76cb))
21+
22+
## [0.3.20](https://github.com/a2aproject/a2a-python/compare/v0.3.19...v0.3.20) (2025-12-03)
23+
24+
25+
### Bug Fixes
26+
27+
* Improve streaming errors handling ([#576](https://github.com/a2aproject/a2a-python/issues/576)) ([7ea7475](https://github.com/a2aproject/a2a-python/commit/7ea7475091df2ee40d3035ef1bc34ee2f86524ee))
28+
29+
## [0.3.19](https://github.com/a2aproject/a2a-python/compare/v0.3.18...v0.3.19) (2025-11-25)
30+
31+
32+
### Bug Fixes
33+
34+
* **jsonrpc, rest:** `extensions` support in `get_card` methods in `json-rpc` and `rest` transports ([#564](https://github.com/a2aproject/a2a-python/issues/564)) ([847f18e](https://github.com/a2aproject/a2a-python/commit/847f18eff59985f447c39a8e5efde87818b68d15))
35+
36+
## [0.3.18](https://github.com/a2aproject/a2a-python/compare/v0.3.17...v0.3.18) (2025-11-24)
37+
38+
39+
### Bug Fixes
40+
41+
* return updated `agent_card` in `JsonRpcTransport.get_card()` ([#552](https://github.com/a2aproject/a2a-python/issues/552)) ([0ce239e](https://github.com/a2aproject/a2a-python/commit/0ce239e98f67ccbf154f2edcdbcee43f3b080ead))
42+
43+
## [0.3.17](https://github.com/a2aproject/a2a-python/compare/v0.3.16...v0.3.17) (2025-11-24)
44+
45+
46+
### Features
47+
48+
* **client:** allow specifying `history_length` via call-site `MessageSendConfiguration` in `BaseClient.send_message` ([53bbf7a](https://github.com/a2aproject/a2a-python/commit/53bbf7ae3ad58fb0c10b14da05cf07c0a7bd9651))
49+
50+
## [0.3.16](https://github.com/a2aproject/a2a-python/compare/v0.3.15...v0.3.16) (2025-11-21)
51+
52+
53+
### Bug Fixes
54+
55+
* Ensure metadata propagation for `Task` `ToProto` and `FromProto` conversion ([#557](https://github.com/a2aproject/a2a-python/issues/557)) ([fc31d03](https://github.com/a2aproject/a2a-python/commit/fc31d03e8c6acb68660f6d1924262e16933c5d50))
56+
57+
## [0.3.15](https://github.com/a2aproject/a2a-python/compare/v0.3.14...v0.3.15) (2025-11-19)
458

559

660
### Features
@@ -66,7 +120,7 @@
66120
### Bug Fixes
67121

68122
* apply `history_length` for `message/send` requests ([#498](https://github.com/a2aproject/a2a-python/issues/498)) ([a49f94e](https://github.com/a2aproject/a2a-python/commit/a49f94ef23d81b8375e409b1c1e51afaf1da1956))
69-
* **client:** `A2ACardResolver.get_agent_card` will auto-populate with `agent_card_path` when `relative_card_path` is empty ([#508](https://github.com/a2aproject/a2a-python/issues/508)) ([ba24ead](https://github.com/a2aproject/a2a-python/commit/ba24eadb5b6fcd056a008e4cbcef03b3f72a37c3))
123+
* **client:** `A2ACardResolver.get_agent_card` will autopopulate with `agent_card_path` when `relative_card_path` is empty ([#508](https://github.com/a2aproject/a2a-python/issues/508)) ([ba24ead](https://github.com/a2aproject/a2a-python/commit/ba24eadb5b6fcd056a008e4cbcef03b3f72a37c3))
70124

71125

72126
### Documentation
@@ -403,8 +457,8 @@
403457
* Event consumer should stop on input_required ([#167](https://github.com/a2aproject/a2a-python/issues/167)) ([51c2d8a](https://github.com/a2aproject/a2a-python/commit/51c2d8addf9e89a86a6834e16deb9f4ac0e05cc3))
404458
* Fix Release Version ([#161](https://github.com/a2aproject/a2a-python/issues/161)) ([011d632](https://github.com/a2aproject/a2a-python/commit/011d632b27b201193813ce24cf25e28d1335d18e))
405459
* generate StrEnum types for enums ([#134](https://github.com/a2aproject/a2a-python/issues/134)) ([0c49dab](https://github.com/a2aproject/a2a-python/commit/0c49dabcdb9d62de49fda53d7ce5c691b8c1591c))
406-
* library should released as 0.2.6 ([d8187e8](https://github.com/a2aproject/a2a-python/commit/d8187e812d6ac01caedf61d4edaca522e583d7da))
407-
* remove error types from enqueable events ([#138](https://github.com/a2aproject/a2a-python/issues/138)) ([511992f](https://github.com/a2aproject/a2a-python/commit/511992fe585bd15e956921daeab4046dc4a50a0a))
460+
* library should be released as 0.2.6 ([d8187e8](https://github.com/a2aproject/a2a-python/commit/d8187e812d6ac01caedf61d4edaca522e583d7da))
461+
* remove error types from enqueueable events ([#138](https://github.com/a2aproject/a2a-python/issues/138)) ([511992f](https://github.com/a2aproject/a2a-python/commit/511992fe585bd15e956921daeab4046dc4a50a0a))
408462
* **stream:** don't block event loop in EventQueue ([#151](https://github.com/a2aproject/a2a-python/issues/151)) ([efd9080](https://github.com/a2aproject/a2a-python/commit/efd9080b917c51d6e945572fd123b07f20974a64))
409463
* **task_updater:** fix potential duplicate artifact_id from default v… ([#156](https://github.com/a2aproject/a2a-python/issues/156)) ([1f0a769](https://github.com/a2aproject/a2a-python/commit/1f0a769c1027797b2f252e4c894352f9f78257ca))
410464

Gemini.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- uv as package manager
55

66
## How to run all tests
7-
1. If dependencies are not installed install them using following command
7+
1. If dependencies are not installed, install them using the following command
88
```
99
uv sync --all-extras
1010
```

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0"]
3737
telemetry = ["opentelemetry-api>=1.33.0", "opentelemetry-sdk>=1.33.0"]
3838
postgresql = ["sqlalchemy[asyncio,postgresql-asyncpg]>=2.0.0"]
3939
mysql = ["sqlalchemy[asyncio,aiomysql]>=2.0.0"]
40+
signing = ["PyJWT>=2.0.0"]
4041
sqlite = ["sqlalchemy[asyncio,aiosqlite]>=2.0.0"]
4142

4243
sql = ["a2a-sdk[postgresql,mysql,sqlite]"]
@@ -47,6 +48,7 @@ all = [
4748
"a2a-sdk[encryption]",
4849
"a2a-sdk[grpc]",
4950
"a2a-sdk[telemetry]",
51+
"a2a-sdk[signing]",
5052
]
5153

5254
[project.urls]
@@ -98,6 +100,7 @@ style = "pep440"
98100
dev = [
99101
"datamodel-code-generator>=0.30.0",
100102
"mypy>=1.15.0",
103+
"PyJWT>=2.0.0",
101104
"pytest>=8.3.5",
102105
"pytest-asyncio>=0.26.0",
103106
"pytest-cov>=6.1.1",

src/a2a/client/base_client.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import AsyncGenerator, AsyncIterator
1+
from collections.abc import AsyncGenerator, AsyncIterator, Callable
22
from typing import Any
33

44
from a2a.client.client import (
@@ -47,6 +47,7 @@ async def send_message(
4747
self,
4848
request: Message,
4949
*,
50+
configuration: SendMessageConfiguration | None = None,
5051
context: ClientCallContext | None = None,
5152
request_metadata: dict[str, Any] | None = None,
5253
extensions: list[str] | None = None,
@@ -59,6 +60,7 @@ async def send_message(
5960
6061
Args:
6162
request: The message to send to the agent.
63+
configuration: Optional per-call overrides for message sending behavior.
6264
context: The client call context.
6365
request_metadata: Extensions Metadata attached to the request.
6466
extensions: List of extensions to be activated.
@@ -75,6 +77,14 @@ async def send_message(
7577
else None
7678
),
7779
)
80+
81+
if configuration:
82+
config.MergeFrom(configuration)
83+
# Proto3 doesn't support HasField for scalars, so MergeFrom won't
84+
# override with default values (e.g. False). We explicitly set it here
85+
# assuming configuration is authoritative.
86+
config.blocking = configuration.blocking
87+
7888
send_message_request = SendMessageRequest(
7989
message=request, configuration=config, metadata=request_metadata
8090
)
@@ -254,6 +264,7 @@ async def get_extended_agent_card(
254264
*,
255265
context: ClientCallContext | None = None,
256266
extensions: list[str] | None = None,
267+
signature_verifier: Callable[[AgentCard], None] | None = None,
257268
) -> AgentCard:
258269
"""Retrieves the agent's card.
259270
@@ -263,12 +274,15 @@ async def get_extended_agent_card(
263274
Args:
264275
context: The client call context.
265276
extensions: List of extensions to be activated.
277+
signature_verifier: A callable used to verify the agent card's signatures.
266278
267279
Returns:
268280
The `AgentCard` for the agent.
269281
"""
270282
card = await self._transport.get_extended_agent_card(
271-
context=context, extensions=extensions
283+
context=context,
284+
extensions=extensions,
285+
signature_verifier=signature_verifier,
272286
)
273287
self._card = card
274288
return card

0 commit comments

Comments
 (0)