Skip to content

Commit da4226b

Browse files
authored
Merge branch 'main' into jules_wip_14959778467806306980
2 parents b9b52ea + 3ef4240 commit da4226b

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

.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/

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

src/a2a/grpc/a2a_pb2.py

Lines changed: 4 additions & 4 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")

0 commit comments

Comments
 (0)