Skip to content

Commit f903658

Browse files
committed
Merge remote-tracking branch 'upstream/main' into poc/agent-catalog
Signed-off-by: Shingo OKAWA <[email protected]>
2 parents 5f29959 + 4767a95 commit f903658

27 files changed

+4180
-51
lines changed

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ omit =
55
*/site-packages/*
66
*/__init__.py
77
*/noxfile.py*
8+
src/a2a/grpc/*
89

910
[report]
1011
exclude_lines =
@@ -15,4 +16,4 @@ exclude_lines =
1516
if TYPE_CHECKING
1617
@abstractmethod
1718
pass
18-
raise ImportError
19+
raise ImportError

.github/actions/spelling/allow.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ coro
3131
datamodel
3232
dunders
3333
genai
34+
getkwargs
3435
gle
3536
httpapi
3637
ietf
@@ -40,14 +41,24 @@ langgraph
4041
lifecycles
4142
linkset
4243
linting
44+
lstrips
45+
mockurl
4346
oauthoidc
47+
<<<<<<< HEAD
4448
ognis
49+
=======
50+
oidc
51+
>>>>>>> upstream/main
4552
opensource
4653
poc
4754
protoc
4855
pyi
4956
pyversions
57+
resub
5058
socio
5159
sse
5260
tagwords
61+
taskupdate
62+
testuuid
63+
typeerror
5364
vulnz

.github/workflows/unit-tests.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ jobs:
4040
- name: Install dependencies
4141
run: uv sync --dev
4242

43-
- name: Run tests
44-
run: uv run pytest
43+
- name: Run tests and check coverage
44+
run: uv run pytest --cov=a2a --cov-report=xml --cov-fail-under=85
4545

46-
- name: Upload coverage report
47-
uses: actions/upload-artifact@v4
48-
with:
49-
name: coverage-report-${{ matrix.python-version }}
50-
path: coverage.xml
51-
if-no-files-found: ignore
46+
- name: Show coverage summary in log
47+
run: uv run coverage report

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,33 @@ jobs:
6262
--use-subclass-enum
6363
echo "Codegen finished."
6464
65+
- name: Install Buf
66+
uses: bufbuild/buf-setup-action@v1
67+
68+
- name: Run buf generate
69+
run: |
70+
set -euo pipefail # Exit immediately if a command exits with a non-zero status
71+
72+
echo "Running buf generate..."
73+
buf generate
74+
uv run scripts/grpc_gen_post_processor.py
75+
echo "Buf generate finished."
76+
6577
- name: Create Pull Request with Updates
6678
uses: peter-evans/create-pull-request@v6
6779
with:
6880
token: ${{ secrets.A2A_BOT_PAT }}
6981
committer: "a2a-bot <[email protected]>"
7082
author: "a2a-bot <[email protected]>"
71-
commit-message: "chore: Update A2A types from specification 🤖"
72-
title: "chore: Update A2A types from specification 🤖"
83+
commit-message: "feat: Update A2A types from specification 🤖"
84+
title: "feat: Update A2A types from specification 🤖"
7385
body: |
7486
This PR updates `src/a2a/types.py` based on the latest `specification/json/a2a.json` from [google-a2a/A2A](https://github.com/google-a2a/A2A/commit/${{ github.event.client_payload.sha }}).
7587
branch: "auto-update-a2a-types-${{ github.event.client_payload.sha }}"
7688
base: main
7789
labels: |
7890
automated
7991
dependencies
80-
add-paths: ${{ steps.vars.outputs.GENERATED_FILE }}
92+
add-paths: |
93+
${{ steps.vars.outputs.GENERATED_FILE }}
94+
src/a2a/grpc/

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## [0.2.8](https://github.com/google-a2a/a2a-python/compare/v0.2.7...v0.2.8) (2025-06-12)
4+
5+
6+
### Features
7+
8+
* Add HTTP Headers to ServerCallContext for Improved Handler Access ([#182](https://github.com/google-a2a/a2a-python/issues/182)) ([d5e5f5f](https://github.com/google-a2a/a2a-python/commit/d5e5f5f7e7a3cab7de13cff545a874fc58d85e46))
9+
* Update A2A types from specification 🤖 ([#191](https://github.com/google-a2a/a2a-python/issues/191)) ([174230b](https://github.com/google-a2a/a2a-python/commit/174230bf6dfb6bf287d233a101b98cc4c79cad19))
10+
11+
12+
### Bug Fixes
13+
14+
* Add `protobuf==6.31.1` to dependencies ([#189](https://github.com/google-a2a/a2a-python/issues/189)) ([ae1c31c](https://github.com/google-a2a/a2a-python/commit/ae1c31c1da47f6965c02e0564dc7d3791dd03e2c)), closes [#185](https://github.com/google-a2a/a2a-python/issues/185)
15+
16+
## [0.2.7](https://github.com/google-a2a/a2a-python/compare/v0.2.6...v0.2.7) (2025-06-11)
17+
18+
19+
### Features
20+
21+
* Update A2A types from specification 🤖 ([#179](https://github.com/google-a2a/a2a-python/issues/179)) ([3ef4240](https://github.com/google-a2a/a2a-python/commit/3ef42405f6096281fe90b1df399731bd009bde12))
22+
323
## [0.2.6](https://github.com/google-a2a/a2a-python/compare/v0.2.5...v0.2.6) (2025-06-09)
424

525

buf.gen.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ managed:
1919
plugins:
2020
# Generate python protobuf related code
2121
# Generates *_pb2.py files, one for each .proto
22-
- remote: buf.build/protocolbuffers/python:v29.3
22+
- remote: buf.build/protocolbuffers/python
2323
out: src/a2a/grpc
2424
# Generate python service code.
2525
# Generates *_pb2_grpc.py
2626
- remote: buf.build/grpc/python
2727
out: src/a2a/grpc
2828
# Generates *_pb2.pyi files.
29-
- remote: buf.build/protocolbuffers/pyi:v29.3
29+
- remote: buf.build/protocolbuffers/pyi
3030
out: src/a2a/grpc

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies = [
2020
"grpcio>=1.60",
2121
"grpcio-tools>=1.60",
2222
"grpcio_reflection>=1.7.0",
23+
"protobuf==6.31.1",
2324
]
2425

2526
classifiers = [

src/a2a/grpc/a2a_pb2.py

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/a2a/grpc/a2a_pb2.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import datetime
2+
13
from google.api import annotations_pb2 as _annotations_pb2
24
from google.api import client_pb2 as _client_pb2
35
from google.api import field_behavior_pb2 as _field_behavior_pb2
@@ -7,7 +9,8 @@ from google.protobuf.internal import containers as _containers
79
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
810
from google.protobuf import descriptor as _descriptor
911
from google.protobuf import message as _message
10-
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
12+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
13+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
1114

1215
DESCRIPTOR: _descriptor.FileDescriptor
1316

@@ -77,7 +80,7 @@ class TaskStatus(_message.Message):
7780
state: TaskState
7881
update: Message
7982
timestamp: _timestamp_pb2.Timestamp
80-
def __init__(self, state: _Optional[_Union[TaskState, str]] = ..., update: _Optional[_Union[Message, _Mapping]] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
83+
def __init__(self, state: _Optional[_Union[TaskState, str]] = ..., update: _Optional[_Union[Message, _Mapping]] = ..., timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
8184

8285
class Part(_message.Message):
8386
__slots__ = ("text", "file", "data")

src/a2a/grpc/a2a_pb2_grpc.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class A2AServiceStub(object):
1616
- TaskPushNotification are a resource whose parent is a task. They have get,
1717
list and create methods.
1818
- AgentCard is a static resource with only a get method.
19-
Of particular note of deviation from JSONRPC approach the request metadata
2019
fields are not present as they don't comply with AIP rules, and the
2120
optional history_length on the get task method is not present as it also
2221
violates AIP-127 and AIP-131.
@@ -86,7 +85,6 @@ class A2AServiceServicer(object):
8685
- TaskPushNotification are a resource whose parent is a task. They have get,
8786
list and create methods.
8887
- AgentCard is a static resource with only a get method.
89-
Of particular note of deviation from JSONRPC approach the request metadata
9088
fields are not present as they don't comply with AIP rules, and the
9189
optional history_length on the get task method is not present as it also
9290
violates AIP-127 and AIP-131.
@@ -228,7 +226,6 @@ class A2AService(object):
228226
- TaskPushNotification are a resource whose parent is a task. They have get,
229227
list and create methods.
230228
- AgentCard is a static resource with only a get method.
231-
Of particular note of deviation from JSONRPC approach the request metadata
232229
fields are not present as they don't comply with AIP rules, and the
233230
optional history_length on the get task method is not present as it also
234231
violates AIP-127 and AIP-131.

0 commit comments

Comments
 (0)