Skip to content

jsonrpc: Specify mandatory jsonrpc Version Property#52

Merged
agu-z merged 2 commits intoagentclientprotocol:mainfrom
tyranron:jsonrpc-version
Sep 2, 2025
Merged

jsonrpc: Specify mandatory jsonrpc Version Property#52
agu-z merged 2 commits intoagentclientprotocol:mainfrom
tyranron:jsonrpc-version

Conversation

@tyranron
Copy link
Copy Markdown
Contributor

@tyranron tyranron commented Sep 1, 2025

Closes zed-industries/zed#37128

Synopsis

ACP protocol uses 2.0 version of JSON-RPC protocol, and JSON-RPC 2.0 Specification requires "jsonrpc": "2.0" field to be always present.

Solution

Provide rpc::JsonRpcMessage as a wrapper for rpc::OutgoingMessage when sending them.

rpc::IncomingMessage are not wrapped on receiving for better compatibility with other parties, which may miss this field.

Changelog

Release Notes:

  • jsonrpc: Fixed missing "jsonrpc": "2.0" field

@cla-bot cla-bot Bot added the cla-signed label Sep 1, 2025
@tyranron
Copy link
Copy Markdown
Contributor Author

tyranron commented Sep 1, 2025

rpc::IncomingMessage are not wrapped on receiving for better compatibility with other parties, which may miss this field.

I thought this way would be better. However, if you insist, I'll add wrapping to rpc::IncomingMessages too.

Another way would be making it optional for deserialization, which I'm in favor with.

@agu-z
Copy link
Copy Markdown
Contributor

agu-z commented Sep 2, 2025

Looks good! Thank you for your contribution @tyranron ❤️

@agu-z agu-z merged commit 1405ed1 into agentclientprotocol:main Sep 2, 2025
1 check passed
@tyranron tyranron deleted the jsonrpc-version branch September 2, 2025 10:16
nerzhulart pushed a commit to nerzhulart/agent-client-protocol that referenced this pull request Oct 21, 2025
…tocol#52)

* Wrap outgoing `rpc::OutgoingMessage` into `rpc::JsonRpcMessage`

* Wrap when sending errors too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI: Missing jsonrpc Version Property in ACP

2 participants