Skip to content

Commit 58eb30d

Browse files
committed
docs: update v1.0 migration guide to clarify enum mappings and AgentCard field changes
1 parent affa5a8 commit 58eb30d

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

docs/migrations/v1_0/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ This affects every enum in the SDK: `TaskState`, `Role`.
6868

6969
| Enum | v0.3 | v1.0 |
7070
|---|---|---|
71-
| `TaskState` | *(no equivalent — protobuf default)* | `TaskState.TASK_STATE_UNSPECIFIED` |
7271
| `TaskState` | `TaskState.submitted` | `TaskState.TASK_STATE_SUBMITTED` |
7372
| `TaskState` | `TaskState.working` | `TaskState.TASK_STATE_WORKING` |
7473
| `TaskState` | `TaskState.completed` | `TaskState.TASK_STATE_COMPLETED` |
@@ -77,18 +76,19 @@ This affects every enum in the SDK: `TaskState`, `Role`.
7776
| `TaskState` | `TaskState.input_required` | `TaskState.TASK_STATE_INPUT_REQUIRED` |
7877
| `TaskState` | `TaskState.auth_required` | `TaskState.TASK_STATE_AUTH_REQUIRED` |
7978
| `TaskState` | `TaskState.rejected` | `TaskState.TASK_STATE_REJECTED` |
79+
| `TaskState` | | `TaskState.TASK_STATE_UNSPECIFIED` (new) |
8080
|||
81-
| `Role` | *(no equivalent — protobuf default)* | `Role.ROLE_UNSPECIFIED` |
8281
| `Role` | `Role.user` | `Role.ROLE_USER` |
8382
| `Role` | `Role.agent` | `Role.ROLE_AGENT` |
83+
| `Role` | | `Role.ROLE_UNSPECIFIED` (new) |
8484

8585
> **Example**: [`a2a-mcp-without-framework/server/agent_executor.py` in PR #509](https://github.com/a2aproject/a2a-samples/pull/509/changes#diff-1f9b098f9f82ee40666ee61db56dc2246281423c445bcf017079c53a0a05954f)
8686
8787
### Message and Part construction
8888

8989
Constructing messages is simplified in v1.0. The old API required wrapping content in an intermediate type (`TextPart`, `FilePart`, `DataPart`) before placing it inside a `Part`. In v1.0, `Part` is a single unified message — set the content type directly on it and the wrapper types are gone entirely.
9090

91-
Key differences:
91+
Key changes:
9292
- `Part(TextPart(text=...))``Part(text=...)` (flat union field)
9393
- `Role.user``Role.ROLE_USER`, `Role.agent``Role.ROLE_AGENT`
9494

@@ -115,7 +115,6 @@ from a2a.types import Role
115115

116116
# Use the helper function to create `Hello` message
117117
message = new_text_message(text="Hello", role=Role.ROLE_USER)
118-
119118
```
120119

121120
Without helper utils, you can still construct directly
@@ -137,12 +136,12 @@ message = Message(
137136
### AgentCard Structure
138137

139138
Key changes:
140-
- Added `AgentInterface` class to support multiple transport bindings via the `supported_interfaces` field in AgentCard.
141-
- The `url` parameter in `AgentCapabilities` is removed and is now part of `AgentInterface`.
139+
- Added `AgentInterface` class to support multiple transport bindings via the newly added `supported_interfaces` field in AgentCard.
140+
- The `url` parameter in `AgentCard` is removed and is now part of `AgentInterface`.
142141
- Accepted values for `AgentInterface.protocol_binding`: `'JSONRPC'`, `'HTTP+JSON'`, `'GRPC'`
143142
- The `AgentCard.capabilities` field is renamed to `AgentCard.agent_capabilities`.
144143
- The `AgentCard.supports_authenticated_extended_card` field is renamed to `AgentCapabilities.extended_agent_card`.
145-
- The `AgentCapabilities.input_modes` and `AgentCapabilities.output_modes` fields are removed; use `AgentCard.default_input_modes` / `AgentCard.default_output_modes` for card-level defaults, or `AgentSkill.input_modes` / `AgentSkill.output_modes` for per-skill overrides.
144+
- The `AgentCapabilities.input_modes` and `AgentCapabilities.output_modes` fields are removed; use `AgentCard.default_input_modes` and `AgentCard.default_output_modes` for card-level defaults, or `AgentSkill.input_modes` and `AgentSkill.output_modes` for per-skill overrides.
146145
- The `examples` parameter in `AgentCard` is removed and is now part of `AgentSkill`.
147146

148147
**Before (v0.3):**

0 commit comments

Comments
 (0)