You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/architecture/compatibility_0.3.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,6 +168,18 @@ These fields coexist alongside the v1.0 `supportedInterfaces` field. v1.0 client
168
168
169
169
`Legacy_0_3_AgentInterface` is a separate record from `AgentInterface` because they serialize to different JSON field names (`transport`/`url` vs `protocolBinding`/`url`/`tenant`).
170
170
171
+
### Version-Aware Push Notifications
172
+
173
+
Push notification payloads are formatted according to the protocol version used when the push notification configuration was registered. The v0.3 transport handlers pass `A2AProtocol_v0_3.PROTOCOL_VERSION` when constructing the `ServerCallContext`, which propagates through to `PushNotificationConfigStore.setInfo()`. When a notification is later sent:
174
+
175
+
1.`BasePushNotificationSender` retrieves the protocol version stored alongside each push notification configuration
176
+
2. It looks up a `PushNotificationPayloadFormatter` matching that version (discovered via CDI)
177
+
3. The formatter serializes the payload in the appropriate wire format:
178
+
-**v0.3** (`PushNotificationPayloadFormatter_v0_3`): sends a v0.3 `Task` JSON object, skipping `Message` events (not supported in v0.3 push notifications)
179
+
-**v1.0** (default): sends a `StreamResponse` wrapper containing the event
180
+
181
+
If no protocol version is stored (e.g., for configurations created before this feature), the version defaults to `AgentInterface.CURRENT_PROTOCOL_VERSION` (`"1.0"`).
@@ -536,10 +548,10 @@ For JSON-RPC and REST, multi-version convenience modules are also available that
536
548
537
549
## Status
538
550
539
-
The v0.3 compatibility layer is fully implemented: spec types, gRPC generation, conversion layer, all three transport handlers (JSON-RPC, gRPC, REST), client API and transports, reference servers, multi-version deployment, test infrastructure, 125+ integration tests, and TCK module are all in place.
551
+
The v0.3 compatibility layer is fully implemented: spec types, gRPC generation, conversion layer, all three transport handlers (JSON-RPC, gRPC, REST), client API and transports, reference servers, multi-version deployment, version-aware push notifications, test infrastructure, 125+ integration tests, and TCK module are all in place.
540
552
541
553
🔲 **Outstanding:**
542
-
- Push notification test porting (requires TestHttpClient; version-aware push notifications in PR #857)
554
+
- Push notification test porting (requires TestHttpClient)
543
555
- Test metadata classes (classpath scanning)
544
556
- Replace FQNs with imports (97 occurrences in 34 files)
545
557
- Unify AgentCard producers across reference modules
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -373,6 +373,10 @@ The two interface lists serve different clients:
373
373
-`additionalInterfaces` — used by **v0.3 clients** to discover endpoints (uses `Legacy_0_3_AgentInterface` with v0.3 field names: `transport`/`url`)
374
374
-`url` and `preferredTransport` — top-level fields that v0.3 clients use to discover the primary endpoint
375
375
376
+
#### Push Notification Behavior
377
+
378
+
Push notification payloads are automatically formatted to match the protocol version used when the push notification configuration was registered. When a v0.3 client registers a push notification configuration (via any transport), the server records the protocol version alongside the configuration. When a notification is later sent to that webhook, the payload is formatted as a v0.3 Task object. Configurations registered by v1.0 clients receive v1.0 `StreamResponse` payloads as usual. This happens transparently — no additional configuration is needed beyond adding the compat reference module.
379
+
376
380
## A2A Client
377
381
378
382
The A2A Java SDK provides a Java client implementation of the [Agent2Agent (A2A) Protocol](https://a2a-protocol.org/), allowing communication with A2A servers. The Java client implementation supports the following transports:
@@ -776,7 +780,7 @@ AgentCard card = new A2ACardResolver("http://localhost:1234").getAgentCard();
Copy file name to clipboardExpand all lines: compat-0.3/reference/jsonrpc/src/main/java/org/a2aproject/sdk/compat03/server/apps/quarkus/A2AServerRoutes_v0_3.java
Copy file name to clipboardExpand all lines: compat-0.3/reference/jsonrpc/src/main/java/org/a2aproject/sdk/compat03/server/apps/quarkus/CallContextFactory_v0_3.java
Copy file name to clipboardExpand all lines: compat-0.3/reference/rest/src/main/java/org/a2aproject/sdk/compat03/server/rest/quarkus/A2AServerRoutes_v0_3.java
Copy file name to clipboardExpand all lines: compat-0.3/reference/rest/src/main/java/org/a2aproject/sdk/compat03/server/rest/quarkus/CallContextFactory_v0_3.java
0 commit comments