The comment in the `TransportProtocol` enum incorrectly stated that
JSON-RPC was "(mandatory)" while gRPC and HTTP+JSON were "(optional)".
This contradicted the A2A specification which clearly states that all
three transport protocols are equally optional.
According to the specification Section 3.2:
- **Section 3.2.1**: "Agents **MAY** support JSON-RPC 2.0 transport"
- **Section 3.2.2**: "Agents **MAY** support gRPC transport"
- **Section 3.2.3**: "Agents **MAY** support REST-style HTTP+JSON
transport"
The specification explicitly states: "All three protocols are considered
equal in status, and agents may choose to implement any combination of
them based on their requirements."
**Before:**
```typescript
export enum TransportProtocol {
JSONRPC = "JSONRPC", // JSON-RPC 2.0 over HTTP (mandatory)
GRPC = "GRPC", // gRPC over HTTP/2 (optional)
HTTP_JSON = "HTTP+JSON", // REST-style HTTP with JSON (optional)
}
```
**After:**
```typescript
export enum TransportProtocol {
JSONRPC = "JSONRPC", // JSON-RPC 2.0 over HTTP (optional)
GRPC = "GRPC", // gRPC over HTTP/2 (optional)
HTTP_JSON = "HTTP+JSON", // REST-style HTTP with JSON (optional)
}
```
This change ensures the code documentation accurately reflects the
specification requirements and prevents confusion for developers
implementing A2A-compliant agents.
Fixes #1098.
<!-- START COPILOT CODING AGENT TIPS -->
---
馃挰 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey3.medallia.com/?EAHeSx-AP01bZqG0Ld9QLQ) to start
the survey.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: darrelmiller <447694+darrelmiller@users.noreply.github.com>
Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com>
Co-authored-by: Darrel <darrmi@microsoft.com>
A2A Types
Core objects and method types for A2A Protocol
Steps to update
- Clone this repository.
- Run
npm install - Update
types.tswith required changes - Run
npm run generate, this will updatea2a.json. - Verify the updates and push to the repository.
DO NOT DIRECTLY CHANGE a2a.json file. THIS MUST BE GENERATED USING npm run generate