Skip to content

Commit 5f29959

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

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

CHANGELOG.md

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

3+
## [0.2.6](https://github.com/google-a2a/a2a-python/compare/v0.2.5...v0.2.6) (2025-06-09)
4+
5+
6+
### ⚠ BREAKING CHANGES
7+
8+
* Add FastAPI JSONRPC Application ([#104](https://github.com/google-a2a/a2a-python/issues/104))
9+
10+
### Features
11+
12+
* Add FastAPI JSONRPC Application ([#104](https://github.com/google-a2a/a2a-python/issues/104)) ([0e66e1f](https://github.com/google-a2a/a2a-python/commit/0e66e1f81f98d7e2cf50b1c100e35d13ad7149dc))
13+
* Add gRPC server and client support ([#162](https://github.com/google-a2a/a2a-python/issues/162)) ([a981605](https://github.com/google-a2a/a2a-python/commit/a981605dbb32e87bd241b64bf2e9bb52831514d1))
14+
* add reject method to task_updater ([#147](https://github.com/google-a2a/a2a-python/issues/147)) ([2a6ef10](https://github.com/google-a2a/a2a-python/commit/2a6ef109f8b743f8eb53d29090cdec7df143b0b4))
15+
* Add timestamp to `TaskStatus` updates on `TaskUpdater` ([#140](https://github.com/google-a2a/a2a-python/issues/140)) ([0c9df12](https://github.com/google-a2a/a2a-python/commit/0c9df125b740b947b0e4001421256491b5f87920))
16+
* **spec:** Add an optional iconUrl field to the AgentCard 🤖 ([a1025f4](https://github.com/google-a2a/a2a-python/commit/a1025f406acd88e7485a5c0f4dd8a42488c41fa2))
17+
18+
19+
### Bug Fixes
20+
21+
* Correctly adapt starlette BaseUser to A2A User ([#133](https://github.com/google-a2a/a2a-python/issues/133)) ([88d45eb](https://github.com/google-a2a/a2a-python/commit/88d45ebd935724e6c3ad614bf503defae4de5d85))
22+
* Event consumer should stop on input_required ([#167](https://github.com/google-a2a/a2a-python/issues/167)) ([51c2d8a](https://github.com/google-a2a/a2a-python/commit/51c2d8addf9e89a86a6834e16deb9f4ac0e05cc3))
23+
* Fix Release Version ([#161](https://github.com/google-a2a/a2a-python/issues/161)) ([011d632](https://github.com/google-a2a/a2a-python/commit/011d632b27b201193813ce24cf25e28d1335d18e))
24+
* generate StrEnum types for enums ([#134](https://github.com/google-a2a/a2a-python/issues/134)) ([0c49dab](https://github.com/google-a2a/a2a-python/commit/0c49dabcdb9d62de49fda53d7ce5c691b8c1591c))
25+
* library should released as 0.2.6 ([d8187e8](https://github.com/google-a2a/a2a-python/commit/d8187e812d6ac01caedf61d4edaca522e583d7da))
26+
* remove error types from enqueable events ([#138](https://github.com/google-a2a/a2a-python/issues/138)) ([511992f](https://github.com/google-a2a/a2a-python/commit/511992fe585bd15e956921daeab4046dc4a50a0a))
27+
* **stream:** don't block event loop in EventQueue ([#151](https://github.com/google-a2a/a2a-python/issues/151)) ([efd9080](https://github.com/google-a2a/a2a-python/commit/efd9080b917c51d6e945572fd123b07f20974a64))
28+
* **task_updater:** fix potential duplicate artifact_id from default v… ([#156](https://github.com/google-a2a/a2a-python/issues/156)) ([1f0a769](https://github.com/google-a2a/a2a-python/commit/1f0a769c1027797b2f252e4c894352f9f78257ca))
29+
30+
31+
### Documentation
32+
33+
* remove final and metadata fields from docstring ([#66](https://github.com/google-a2a/a2a-python/issues/66)) ([3c50ee1](https://github.com/google-a2a/a2a-python/commit/3c50ee1f64c103a543c8afb6d2ac3a11063b0f43))
34+
* Update Links to Documentation Site ([5e7d418](https://github.com/google-a2a/a2a-python/commit/5e7d4180f7ae0ebeb76d976caa5ef68b4277ce54))
35+
336
## [0.2.5](https://github.com/google-a2a/a2a-python/compare/v0.2.4...v0.2.5) (2025-05-27)
437

538

scripts/grpc_gen_post_processor.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"""
2+
Fix absolute imports in *_pb2_grpc.py files.
3+
Example:
4+
import a2a_pb2 as a2a__pb2
5+
from . import a2a_pb2 as a2a__pb2
6+
"""
7+
8+
import re
9+
import sys
10+
11+
from pathlib import Path
12+
13+
14+
def process_generated_code(src_folder: str = 'src/a2a/grpc'):
15+
"""Post processor for the generated code."""
16+
dir_path = Path(src_folder)
17+
print(dir_path)
18+
if not dir_path.is_dir():
19+
print('Source folder not found')
20+
sys.exit(1)
21+
22+
grpc_pattern = '**/*_pb2_grpc.py'
23+
files = dir_path.glob(grpc_pattern)
24+
25+
for file in files:
26+
print(f'Processing {file}')
27+
try:
28+
with file.open('r', encoding='utf-8') as f:
29+
src_content = f.read()
30+
31+
# Change import a2a_pb2 as a2a__pb2
32+
import_pattern = r'^import (\w+_pb2) as (\w+__pb2)$'
33+
# to from . import a2a_pb2 as a2a__pb2
34+
replacement_pattern = r'from . import \1 as \2'
35+
36+
fixed_src_content = re.sub(
37+
import_pattern,
38+
replacement_pattern,
39+
src_content,
40+
flags=re.MULTILINE,
41+
)
42+
43+
if fixed_src_content != src_content:
44+
with file.open('w', encoding='utf-8') as f:
45+
f.write(fixed_src_content)
46+
print('Imports fixed')
47+
else:
48+
print('No changes needed')
49+
50+
except Exception as e:
51+
print(f'Error processing file {file}: {e}')
52+
sys.exit(1)
53+
54+
55+
if __name__ == '__main__':
56+
process_generated_code()

0 commit comments

Comments
 (0)