Skip to content

feat: use ProtoJSON for JSON wire payloads#23

Merged
muscariello merged 5 commits intomainfrom
feat/protojson-wire-payloads
Apr 5, 2026
Merged

feat: use ProtoJSON for JSON wire payloads#23
muscariello merged 5 commits intomainfrom
feat/protojson-wire-payloads

Conversation

@muscariello
Copy link
Copy Markdown
Member

@muscariello muscariello commented Apr 5, 2026

Summary

  • make a2a.proto the wire-format source of truth for JSON payload bodies by generating ProtoJSON-capable types in a2a-pb
  • add a shared a2a_pb::protojson_conv bridge between native Rust models and protobuf/ProtoJSON payloads
  • move JSON-RPC and REST request, response, and streaming payload serialization onto ProtoJSON while keeping the handwritten JSON-RPC envelope and REST path/query handling
  • accept null repeated and map fields from generated ProtoJSON serde as empty collections for cross-SDK compatibility
  • accept bare host:port gRPC endpoints by normalizing them to http://... before connecting so cross-SDK agent cards remain usable

Testing

  • cargo test -p agntcy-a2a-pb -p agntcy-a2a-client -p agntcy-a2a-server -p agntcy-a2a-grpc

@muscariello muscariello requested a review from a team as a code owner April 5, 2026 20:39
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 83.14176% with 44 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
a2a-client/src/rest.rs 57.89% 16 Missing ⚠️
a2a-server/src/rest.rs 70.83% 14 Missing ⚠️
a2a-client/src/jsonrpc.rs 82.50% 7 Missing ⚠️
a2a-pb/src/protojson_conv.rs 94.23% 3 Missing ⚠️
a2a-grpc/src/client.rs 91.30% 2 Missing ⚠️
a2a-server/src/jsonrpc.rs 96.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@muscariello muscariello merged commit 8668746 into main Apr 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants