Skip to content

Commit 3ef4240

Browse files
authored
feat: Update A2A types from specification 🤖 (#179)
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/).
1 parent 1fecf0a commit 3ef4240

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

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)