Skip to content

Commit 82236fd

Browse files
authored
Merge branch 'main' into sql-support
2 parents a6be65a + e75f27d commit 82236fd

File tree

7 files changed

+162
-91
lines changed

7 files changed

+162
-91
lines changed

.github/workflows/security.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Bandit
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
analyze:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
security-events: write
11+
actions: read
12+
contents: read
13+
steps:
14+
- name: Perform Bandit Analysis
15+
uses: PyCQA/bandit-action@v1
16+
with:
17+
severity: medium
18+
confidence: medium
19+
targets: "src/a2a"

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2-
"python.testing.pytestArgs": ["tests"],
2+
"python.testing.pytestArgs": [
3+
"tests"
4+
],
35
"python.testing.unittestEnabled": false,
46
"python.testing.pytestEnabled": true,
57
"editor.formatOnSave": true,
@@ -12,4 +14,10 @@
1214
}
1315
},
1416
"ruff.importStrategy": "fromEnvironment",
17+
"files.insertFinalNewline": true,
18+
"files.trimFinalNewlines": false,
19+
"files.trimTrailingWhitespace": false,
20+
"editor.rulers": [
21+
80
22+
]
1523
}

CHANGELOG.md

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

3+
## [0.2.10](https://github.com/a2aproject/a2a-python/compare/v0.2.9...v0.2.10) (2025-06-30)
4+
5+
6+
### ⚠ BREAKING CHANGES
7+
8+
* Update to A2A Spec Version [0.2.5](https://github.com/a2aproject/A2A/releases/tag/v0.2.5) ([#197](https://github.com/a2aproject/a2a-python/issues/197))
9+
10+
### Features
11+
12+
* Add `append` and `last_chunk` to `add_artifact` method on `TaskUpdater` ([#186](https://github.com/a2aproject/a2a-python/issues/186)) ([8c6560f](https://github.com/a2aproject/a2a-python/commit/8c6560fd403887fab9d774bfcc923a5f6f459364))
13+
* add a2a routes to existing app ([#188](https://github.com/a2aproject/a2a-python/issues/188)) ([32fecc7](https://github.com/a2aproject/a2a-python/commit/32fecc7194a61c2f5be0b8795d5dc17cdbab9040))
14+
* Add middleware to the client SDK ([#171](https://github.com/a2aproject/a2a-python/issues/171)) ([efaabd3](https://github.com/a2aproject/a2a-python/commit/efaabd3b71054142109b553c984da1d6e171db24))
15+
* Add more task state management methods to TaskUpdater ([#208](https://github.com/a2aproject/a2a-python/issues/208)) ([2b3bf6d](https://github.com/a2aproject/a2a-python/commit/2b3bf6d53ac37ed93fc1b1c012d59c19060be000))
16+
* raise error for tasks in terminal states ([#215](https://github.com/a2aproject/a2a-python/issues/215)) ([a0bf13b](https://github.com/a2aproject/a2a-python/commit/a0bf13b208c90b439b4be1952c685e702c4917a0))
17+
18+
### Bug Fixes
19+
20+
* `consume_all` doesn't catch `asyncio.TimeoutError` in python 3.10 ([#216](https://github.com/a2aproject/a2a-python/issues/216)) ([39307f1](https://github.com/a2aproject/a2a-python/commit/39307f15a1bb70eb77aee2211da038f403571242))
21+
* Append metadata and context id when processing TaskStatusUpdateE… ([#238](https://github.com/a2aproject/a2a-python/issues/238)) ([e106020](https://github.com/a2aproject/a2a-python/commit/e10602033fdd4f4e6b61af717ffc242d772545b3))
22+
* Fix reference to `grpc.aio.ServicerContext` ([#237](https://github.com/a2aproject/a2a-python/issues/237)) ([0c1987b](https://github.com/a2aproject/a2a-python/commit/0c1987bb85f3e21089789ee260a0c62ac98b66a5))
23+
* Fixes Short Circuit clause for context ID ([#236](https://github.com/a2aproject/a2a-python/issues/236)) ([a5509e6](https://github.com/a2aproject/a2a-python/commit/a5509e6b37701dfb5c729ccc12531e644a12f8ae))
24+
* Resolve `APIKeySecurityScheme` parsing failed ([#226](https://github.com/a2aproject/a2a-python/issues/226)) ([aa63b98](https://github.com/a2aproject/a2a-python/commit/aa63b982edc2a07fd0df0b01fb9ad18d30b35a79))
25+
* send notifications on message not streaming ([#219](https://github.com/a2aproject/a2a-python/issues/219)) ([91539d6](https://github.com/a2aproject/a2a-python/commit/91539d69e5c757712c73a41ab95f1ec6656ef5cd)), closes [#218](https://github.com/a2aproject/a2a-python/issues/218)
26+
27+
## [0.2.9](https://github.com/a2aproject/a2a-python/compare/v0.2.8...v0.2.9) (2025-06-24)
28+
29+
### Bug Fixes
30+
31+
* Set `protobuf==5.29.5` and `fastapi>=0.115.2` to prevent version conflicts ([#224](https://github.com/a2aproject/a2a-python/issues/224)) ([1412a85](https://github.com/a2aproject/a2a-python/commit/1412a855b4980d8373ed1cea38c326be74069633))
32+
333
## [0.2.8](https://github.com/a2aproject/a2a-python/compare/v0.2.7...v0.2.8) (2025-06-12)
434

535

src/a2a/grpc/a2a_pb2.py

Lines changed: 78 additions & 78 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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,15 @@ class AgentInterface(_message.Message):
202202
def __init__(self, url: _Optional[str] = ..., transport: _Optional[str] = ...) -> None: ...
203203

204204
class AgentCard(_message.Message):
205-
__slots__ = ("name", "description", "url", "preferred_transport", "additional_interfaces", "provider", "version", "documentation_url", "capabilities", "security_schemes", "security", "default_input_modes", "default_output_modes", "skills", "supports_authenticated_extended_card")
205+
__slots__ = ("protocol_version", "name", "description", "url", "preferred_transport", "additional_interfaces", "provider", "version", "documentation_url", "capabilities", "security_schemes", "security", "default_input_modes", "default_output_modes", "skills", "supports_authenticated_extended_card")
206206
class SecuritySchemesEntry(_message.Message):
207207
__slots__ = ("key", "value")
208208
KEY_FIELD_NUMBER: _ClassVar[int]
209209
VALUE_FIELD_NUMBER: _ClassVar[int]
210210
key: str
211211
value: SecurityScheme
212212
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[SecurityScheme, _Mapping]] = ...) -> None: ...
213+
PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int]
213214
NAME_FIELD_NUMBER: _ClassVar[int]
214215
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
215216
URL_FIELD_NUMBER: _ClassVar[int]
@@ -225,6 +226,7 @@ class AgentCard(_message.Message):
225226
DEFAULT_OUTPUT_MODES_FIELD_NUMBER: _ClassVar[int]
226227
SKILLS_FIELD_NUMBER: _ClassVar[int]
227228
SUPPORTS_AUTHENTICATED_EXTENDED_CARD_FIELD_NUMBER: _ClassVar[int]
229+
protocol_version: str
228230
name: str
229231
description: str
230232
url: str
@@ -240,7 +242,7 @@ class AgentCard(_message.Message):
240242
default_output_modes: _containers.RepeatedScalarFieldContainer[str]
241243
skills: _containers.RepeatedCompositeFieldContainer[AgentSkill]
242244
supports_authenticated_extended_card: bool
243-
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., url: _Optional[str] = ..., preferred_transport: _Optional[str] = ..., additional_interfaces: _Optional[_Iterable[_Union[AgentInterface, _Mapping]]] = ..., provider: _Optional[_Union[AgentProvider, _Mapping]] = ..., version: _Optional[str] = ..., documentation_url: _Optional[str] = ..., capabilities: _Optional[_Union[AgentCapabilities, _Mapping]] = ..., security_schemes: _Optional[_Mapping[str, SecurityScheme]] = ..., security: _Optional[_Iterable[_Union[Security, _Mapping]]] = ..., default_input_modes: _Optional[_Iterable[str]] = ..., default_output_modes: _Optional[_Iterable[str]] = ..., skills: _Optional[_Iterable[_Union[AgentSkill, _Mapping]]] = ..., supports_authenticated_extended_card: bool = ...) -> None: ...
245+
def __init__(self, protocol_version: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., url: _Optional[str] = ..., preferred_transport: _Optional[str] = ..., additional_interfaces: _Optional[_Iterable[_Union[AgentInterface, _Mapping]]] = ..., provider: _Optional[_Union[AgentProvider, _Mapping]] = ..., version: _Optional[str] = ..., documentation_url: _Optional[str] = ..., capabilities: _Optional[_Union[AgentCapabilities, _Mapping]] = ..., security_schemes: _Optional[_Mapping[str, SecurityScheme]] = ..., security: _Optional[_Iterable[_Union[Security, _Mapping]]] = ..., default_input_modes: _Optional[_Iterable[str]] = ..., default_output_modes: _Optional[_Iterable[str]] = ..., skills: _Optional[_Iterable[_Union[AgentSkill, _Mapping]]] = ..., supports_authenticated_extended_card: bool = ...) -> None: ...
244246

245247
class AgentProvider(_message.Message):
246248
__slots__ = ("url", "organization")

src/a2a/grpc/a2a_pb2_grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class A2AServiceStub(object):
1414
- Messages are not a standard resource so there is no get/delete/update/list
1515
interface, only a send and stream custom methods.
1616
- Tasks have a get interface and custom cancel and subscribe methods.
17-
- TaskPushNotificationConfig are a resource whose parent is a task.
17+
- TaskPushNotificationConfig are a resource whose parent is a task.
1818
They have get, list and create methods.
1919
- AgentCard is a static resource with only a get method.
2020
fields are not present as they don't comply with AIP rules, and the
@@ -88,7 +88,7 @@ class A2AServiceServicer(object):
8888
- Messages are not a standard resource so there is no get/delete/update/list
8989
interface, only a send and stream custom methods.
9090
- Tasks have a get interface and custom cancel and subscribe methods.
91-
- TaskPushNotificationConfig are a resource whose parent is a task.
91+
- TaskPushNotificationConfig are a resource whose parent is a task.
9292
They have get, list and create methods.
9393
- AgentCard is a static resource with only a get method.
9494
fields are not present as they don't comply with AIP rules, and the
@@ -241,7 +241,7 @@ class A2AService(object):
241241
- Messages are not a standard resource so there is no get/delete/update/list
242242
interface, only a send and stream custom methods.
243243
- Tasks have a get interface and custom cancel and subscribe methods.
244-
- TaskPushNotificationConfig are a resource whose parent is a task.
244+
- TaskPushNotificationConfig are a resource whose parent is a task.
245245
They have get, list and create methods.
246246
- AgentCard is a static resource with only a get method.
247247
fields are not present as they don't comply with AIP rules, and the

src/a2a/types.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ class AgentSkill(BaseModel):
106106
Description of the skill - will be used by the client or a human
107107
as a hint to understand what the skill does.
108108
"""
109-
examples: list[str] | None = None
109+
examples: list[str] | None = Field(
110+
default=None, examples=[['I need a recipe for bread']]
111+
)
110112
"""
111113
The set of example scenarios that the skill can perform.
112114
Will be used by the client as a hint to understand how the skill can be used.
@@ -129,7 +131,7 @@ class AgentSkill(BaseModel):
129131
"""
130132
Supported media types for output.
131133
"""
132-
tags: list[str]
134+
tags: list[str] = Field(..., examples=[['cooking', 'customer support', 'billing']])
133135
"""
134136
Set of tagwords describing classes of capabilities for this specific skill.
135137
"""
@@ -1038,7 +1040,7 @@ class GetTaskPushNotificationConfigRequest(BaseModel):
10381040
params: TaskIdParams | GetTaskPushNotificationConfigParams
10391041
"""
10401042
A Structured value that holds the parameter values to be used during the invocation of the method.
1041-
TaskIdParams type is deprecated for this method
1043+
TaskIdParams type is deprecated for this method use `GetTaskPushNotificationConfigParams` instead.
10421044
"""
10431045

10441046

@@ -1493,7 +1495,7 @@ class TaskStatus(BaseModel):
14931495
Additional status updates for client
14941496
"""
14951497
state: TaskState
1496-
timestamp: str | None = None
1498+
timestamp: str | None = Field(default=None, examples=['2023-10-27T10:00:00Z'])
14971499
"""
14981500
ISO 8601 datetime string when the status was recorded.
14991501
"""
@@ -1586,7 +1588,9 @@ class AgentCard(BaseModel):
15861588
"""
15871589
Supported media types for output.
15881590
"""
1589-
description: str
1591+
description: str = Field(
1592+
..., examples=['Agent that helps users with recipes and cooking.']
1593+
)
15901594
"""
15911595
A human-readable description of the agent. Used to assist users and
15921596
other agents in understanding what the agent can do.
@@ -1599,14 +1603,18 @@ class AgentCard(BaseModel):
15991603
"""
16001604
A URL to an icon for the agent.
16011605
"""
1602-
name: str
1606+
name: str = Field(..., examples=['Recipe Agent'])
16031607
"""
16041608
Human readable name of the agent.
16051609
"""
16061610
preferredTransport: str | None = None
16071611
"""
16081612
The transport of the preferred endpoint. If empty, defaults to JSONRPC.
16091613
"""
1614+
protocolVersion: str | None = '0.2.5'
1615+
"""
1616+
The version of the A2A protocol this agent supports.
1617+
"""
16101618
provider: AgentProvider | None = None
16111619
"""
16121620
The service provider of the agent
@@ -1633,7 +1641,7 @@ class AgentCard(BaseModel):
16331641
A URL to the address the agent is hosted at. This represents the
16341642
preferred endpoint as declared by the agent.
16351643
"""
1636-
version: str
1644+
version: str = Field(..., examples=['1.0.0'])
16371645
"""
16381646
The version of the agent - format is up to the provider.
16391647
"""
@@ -1770,6 +1778,8 @@ class JSONRPCResponse(
17701778
| CancelTaskSuccessResponse
17711779
| SetTaskPushNotificationConfigSuccessResponse
17721780
| GetTaskPushNotificationConfigSuccessResponse
1781+
| ListTaskPushNotificationConfigSuccessResponse
1782+
| DeleteTaskPushNotificationConfigSuccessResponse
17731783
]
17741784
):
17751785
root: (
@@ -1780,6 +1790,8 @@ class JSONRPCResponse(
17801790
| CancelTaskSuccessResponse
17811791
| SetTaskPushNotificationConfigSuccessResponse
17821792
| GetTaskPushNotificationConfigSuccessResponse
1793+
| ListTaskPushNotificationConfigSuccessResponse
1794+
| DeleteTaskPushNotificationConfigSuccessResponse
17831795
)
17841796
"""
17851797
Represents a JSON-RPC 2.0 Response object.

0 commit comments

Comments
 (0)