-
Notifications
You must be signed in to change notification settings - Fork 109
refactor: extract JSON-RPC specific logic from client #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c156b2f to
ede8673
Compare
yarolegovich
requested changes
Nov 12, 2025
This was referenced Nov 12, 2025
Closed
a9487aa to
4317636
Compare
yarolegovich
approved these changes
Nov 12, 2025
swapydapy
requested changes
Nov 13, 2025
herczyn
approved these changes
Nov 18, 2025
Member
herczyn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
swapydapy
approved these changes
Nov 19, 2025
ishymko
added a commit
that referenced
this pull request
Nov 27, 2025
# Description As a next step after #169, define a transport agnostic client. # Changes ## Main - Define `Client` built around core types, not JSON-RPC wrappers. - Define `ClientFactory` to dynamically select transport among available based on agent card and factory level preferences. ## Misc - Rename `A2ATransport` to `Transport` (this type is not yet exported via `index.ts`). - Add `AbortSignal` to `Transport` and new client for cancellation. - Add basic E2E test for `sendMessage` and `sendMessageStream` using server SDK wired up with real expressjs app and invoked via newly created client. - Fix `getTaskPushNotificationConfig` types in transport. # TODOs - Client interceptors. - Extensions support. Re #137, #142 Release-As: 0.3.6
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently
A2AClientdefined inclient.tsuses JSON-RPC types in its interface, i.e.sendMessageusesSendMessageResponsewhich contains JSON-RPC fields likeidandjsonrpcversion. It was also the case for Python SDK which required introducing a new client.py keeping the old one as legacy.py for backward compatibility (see #348).As a first step of introducing a transport-agnostic client, extract JSON-RPC specific logic into a transport abstraction and switch existing
A2AClientto it in a backward compatible way to take advantage of existing tests.Note: new types are not exported from
index.ts, this will be done once new client is ready.Changes
A2ATransportabstraction without using JSON-RPC types.JsonRpcTransportfrom existingA2AClient.JsonRpcTransportfromA2AClient- new transports are not going to be added into this client as it uses JSON-RPC types. This is done in a backward compatible way, existing behavior is preserved: returning JSON-RPC errors as objects, populating JSON-RPC specific fields.Re #137, #142