Commit 1cc993c
refactor!: upgrade SDK to A2A 1.0 specs (#572)
## Summary
This PR migrates the a2a-python SDK from Pydantic-based types to
protobuf-generated types, completing the upgrade to A2A v1.0. Fixes #559
## Breaking Changes
- Replace Pydantic-based type system with protobuf types from `a2a_pb2`
- Update `Part` usage from `Part(root=TextPart(text=...))` to
`Part(text=...)`
- Update `Role` enum from `Role.user`/`Role.agent` to
`Role.ROLE_USER`/`Role.ROLE_AGENT`
- Update `TaskState` enum to use `TASK_STATE_*` prefix
## Changes
- Update all source files to use proto types directly from `a2a_pb2`
- Replace `model_dump()` with `MessageToDict()` for JSON serialization
- Replace `model_copy(deep=True)` with `CopyFrom()` for proto cloning
- Add new types module with proto imports and SDK-specific extras
- Add `proto_utils` module with identity conversion utilities
- Fix REST handler resource name formats for push notification configs
- Fix gRPC handler to use `SubscribeToTask` instead of
`TaskSubscription`
- Fix database task store to handle proto objects from ORM
- Update all test files for proto patterns and assertions
- Fix spelling check failures by updating allow list
- Fix inclusive language check failures:
- Replace `master` with `main` in documentation
- Rename `Dummy` classes to `Mock` in tests
## Testing
- **601 tests passing**
- 23 tests skipped (expected - require DB connections or cryptography
deps)
## Related
Builds on top of PR #556
Release-As: 1.0.0
---------
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Co-authored-by: Lukasz Kawka <luk.kawka@gmail.com>
Co-authored-by: Agent2Agent (A2A) Bot <a2a-bot@google.com>
Co-authored-by: Didier Durand <2927957+didier-durand@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Iva Sokolaj <102302011+sokoliva@users.noreply.github.com>
Co-authored-by: Will Chen <36873565+chenweiyang0204@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent 3bfbea9 commit 1cc993c
137 files changed
Lines changed: 7216 additions & 10837 deletions
File tree
- .github
- actions/spelling
- workflows
- scripts
- src/a2a
- client
- auth
- transports
- extensions
- grpc
- server
- agent_execution
- apps
- jsonrpc
- rest
- events
- request_handlers
- tasks
- types
- utils
- tests
- auth
- client
- transports
- e2e
- push_notifications
- extensions
- integration
- server
- agent_execution
- apps
- jsonrpc
- rest
- events
- request_handlers
- tasks
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
22 | 51 | | |
23 | 52 | | |
| 53 | + | |
| 54 | + | |
24 | 55 | | |
25 | 56 | | |
26 | 57 | | |
| |||
29 | 60 | | |
30 | 61 | | |
31 | 62 | | |
32 | | - | |
33 | 63 | | |
34 | 64 | | |
35 | | - | |
36 | 65 | | |
37 | 66 | | |
38 | 67 | | |
39 | 68 | | |
40 | | - | |
41 | 69 | | |
42 | 70 | | |
43 | 71 | | |
44 | | - | |
| 72 | + | |
45 | 73 | | |
| 74 | + | |
46 | 75 | | |
47 | 76 | | |
48 | | - | |
49 | 77 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
53 | 83 | | |
54 | 84 | | |
55 | 85 | | |
56 | 86 | | |
57 | | - | |
58 | 87 | | |
| 88 | + | |
59 | 89 | | |
60 | 90 | | |
61 | 91 | | |
62 | 92 | | |
63 | 93 | | |
| 94 | + | |
| 95 | + | |
64 | 96 | | |
65 | 97 | | |
| 98 | + | |
66 | 99 | | |
67 | | - | |
68 | 100 | | |
| 101 | + | |
| 102 | + | |
69 | 103 | | |
| 104 | + | |
70 | 105 | | |
71 | 106 | | |
72 | 107 | | |
73 | 108 | | |
74 | 109 | | |
75 | 110 | | |
76 | 111 | | |
77 | | - | |
78 | | - | |
79 | 112 | | |
80 | 113 | | |
| 114 | + | |
| 115 | + | |
81 | 116 | | |
82 | 117 | | |
83 | 118 | | |
84 | | - | |
85 | 119 | | |
| 120 | + | |
86 | 121 | | |
87 | 122 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | | - | |
| 27 | + | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 29 | | |
36 | 30 | | |
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
42 | | - | |
43 | 36 | | |
44 | 37 | | |
45 | | - | |
| 38 | + | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
50 | | - | |
51 | | - | |
| 43 | + | |
| 44 | + | |
52 | 45 | | |
53 | 46 | | |
54 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
3 | 29 | | |
4 | 30 | | |
5 | 31 | | |
| |||
94 | 120 | | |
95 | 121 | | |
96 | 122 | | |
97 | | - | |
| 123 | + | |
98 | 124 | | |
99 | 125 | | |
100 | 126 | | |
| |||
431 | 457 | | |
432 | 458 | | |
433 | 459 | | |
434 | | - | |
435 | | - | |
| 460 | + | |
| 461 | + | |
436 | 462 | | |
437 | 463 | | |
438 | 464 | | |
| |||
0 commit comments