Skip to content

feat: Remove JSON-RPC Client#353

Merged
bartek-gralewicz merged 5 commits into
epic/1.0_breaking_changesfrom
bgralewicz/remove_json_rpc_client
Mar 16, 2026
Merged

feat: Remove JSON-RPC Client#353
bartek-gralewicz merged 5 commits into
epic/1.0_breaking_changesfrom
bgralewicz/remove_json_rpc_client

Conversation

@bartek-gralewicz
Copy link
Copy Markdown
Contributor

@bartek-gralewicz bartek-gralewicz commented Mar 13, 2026

Description

Remove old JSON-RPC Client along with its usage and unit tests. Deleted compatibility code that was present in json_rpc_transport.ts.

List of changes:

  • Removed client.ts and client.spec.ts.
  • Moved exports of A2AStreamEventData and SendMessageResult to src/index.js.
  • Updated relevant imports.
  • Updated client_auth.spec.ts to use transport logic directly.
  • Removed no longer needed compatibility code from json_rpc_transport.ts.

Fixes (partially) #179 🦕

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request marks a significant step in streamlining the client-side architecture by removing the outdated JSON-RPC specific client. The change consolidates common types, updates import paths, and refines error handling within the JSON-RPC transport, aligning the codebase with a more modern, transport-agnostic client approach. This cleanup reduces technical debt and prepares the library for future enhancements.

Highlights

  • JSON-RPC Client Removal: The legacy JSON-RPC client (A2AClient) and its associated files, including unit tests, have been completely removed from the codebase. This deprecates the old client in favor of the multi-transport client architecture.
  • Type Export Centralization: Key types such as A2AStreamEventData and SendMessageResult have been moved from the removed client file to src/index.ts to centralize their definitions and make them accessible across the library.
  • Import Path Updates: Various client-side files (interceptors.ts, multitransport-client.ts, grpc_transport.ts, json_rpc_transport.ts, rest_transport.ts, transport.ts, util.ts, e2e.spec.ts) have been updated to reflect the new locations of moved types and the removal of the old client.
  • JSON-RPC Transport Error Handling Refinement: Compatibility code for JSON-RPC specific error classes has been removed from json_rpc_transport.ts, and the error mapping now directly uses the base error types, simplifying error handling.
Changelog
  • .betterer.results
    • Updated TypeScript Strict Mode entries to reflect removed files.
  • src/client/client.ts
    • Removed the entire A2AClient class and its related types.
  • src/client/index.ts
    • Removed exports for A2AClient and A2AClientOptions.
  • src/client/interceptors.ts
    • Updated import path for A2AStreamEventData.
  • src/client/multitransport-client.ts
    • Updated imports for A2AStreamEventData and SendMessageResult.
  • src/client/transports/grpc/grpc_transport.ts
    • Updated imports for A2AStreamEventData and SendMessageResult.
  • src/client/transports/json_rpc_transport.ts
    • Updated imports for A2AStreamEventData and SendMessageResult.
    • Removed legacy JSON-RPC specific error classes.
    • Updated error mapping to use base error types directly.
  • src/client/transports/rest_transport.ts
    • Updated imports for A2AStreamEventData and SendMessageResult.
  • src/client/transports/transport.ts
    • Updated imports for A2AStreamEventData and SendMessageResult.
  • src/index.ts
    • Added exports for A2AStreamEventData and SendMessageResult.
  • test/client/client.spec.ts
    • Removed all unit tests for the A2AClient.
  • test/client/client_auth.spec.ts
    • Removed all authentication-related unit tests for the A2AClient.
  • test/client/multitransport-client.spec.ts
    • Updated import path for A2AStreamEventData.
  • test/client/util.ts
    • Updated import path for SendMessageResult.
  • test/e2e.spec.ts
    • Updated import path for A2AStreamEventData.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@bartek-gralewicz bartek-gralewicz changed the title (feat): Remove JSON-RPC Client feat: Remove JSON-RPC Client Mar 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 13, 2026

🧪 Code Coverage

⬇️ Download Full Report

Main PR Delta
src/client/card-resolver.ts 96.82% 95.23% 🔴 -1.59%
src/client/multitransport-client.ts 97.66% 97.72% 🟢 +0.06%
src/client/transports/grpc/grpc_transport.ts 93.92% 93.53% 🔴 -0.39%
src/client/transports/json_rpc_transport.ts 62.57% 60.5% 🔴 -2.07%
src/client/transports/rest_transport.ts 85.8% 86.68% 🟢 +0.88%
src/server/express/rest_handler.ts 85.76% 85.44% 🔴 -0.32%
src/server/push_notification/push_notification_store.ts 89.18% 83.78% 🔴 -5.40%
src/server/request_handler/default_request_handler.ts 79.69% 79.31% 🔴 -0.38%
src/server/result_manager.ts 61.7% 62.79% 🟢 +1.09%
src/server/transports/jsonrpc/jsonrpc_transport_handler.ts 76.68% 73.13% 🔴 -3.55%
src/server/transports/rest/rest_transport_handler.ts 98.78% 98.85% 🟢 +0.07%
src/types/converters/from_proto.ts 71.59% 66.66% 🔴 -4.93%
src/types/converters/id_decoding.ts 52% 76% 🟢 +24.00%
src/types/converters/to_proto.ts 69.38% 54.38% 🔴 -15.00%
src/json_rpc_types.ts (new) 0%
Total 80.84% 82.5% 🟢 +1.66%

Generated by coverage-comment.yml

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively removes the deprecated JSON-RPC client and its related test files, which is a great cleanup. The changes also include moving shared types to a central location and updating imports accordingly. The suggestion to use predefined error code constants instead of magic numbers in json_rpc_transport.ts has been retained to enhance maintainability. Overall, this is a solid refactoring.

Comment thread src/client/transports/json_rpc_transport.ts
@bartek-gralewicz bartek-gralewicz marked this pull request as ready for review March 16, 2026 08:54
@bartek-gralewicz bartek-gralewicz requested a review from a team as a code owner March 16, 2026 08:54
Comment thread src/client/transports/json_rpc_transport.ts
Comment thread test/client/client_auth.spec.ts
@bartek-gralewicz bartek-gralewicz merged commit c29f4f8 into epic/1.0_breaking_changes Mar 16, 2026
11 checks passed
@bartek-gralewicz bartek-gralewicz deleted the bgralewicz/remove_json_rpc_client branch March 16, 2026 10:22
bartek-gralewicz added a commit that referenced this pull request Mar 23, 2026
# Description

Remove old JSON-RPC Client along with its usage and unit tests. Deleted
compatibility code that was present in `json_rpc_transport.ts`.

# List of changes:

- Removed `client.ts` and `client.spec.ts`.
- Moved exports of `A2AStreamEventData` and `SendMessageResult` to
`src/index.js`.
- Updated relevant imports.
- Updated `client_auth.spec.ts` to use transport logic directly.
- Removed no longer needed compatibility code from
`json_rpc_transport.ts`.

Fixes (partially) #179 🦕
ishymko added a commit that referenced this pull request May 11, 2026
🤖 I have created a release *beep* *boop*
---

## 1.0.0-alpha.0 (2026-05-11)

See the [v0.3 -> v1.0-alpha.0 migration
guide](https://github.com/a2aproject/a2a-js/blob/v1.0.0-alpha.0/docs/migration-guide.md).

**Note**: Enabling backward compatibility with v0.3 is tracked in
[#452](#452).


### ⚠ BREAKING CHANGES

* Drop support for node 18
([#368](#368))
* Make ServerCallContext parameter mandatory across all places
([#405](#405))
* Remove JSON-RPC client
([#353](#353))
* Remove transport-specific exports
([#404](#404))
* Update codebase to use A2A 1.0.0 data model
([#375](#375))
* Remove A2AExpressApp
([#363](#363))

### Features

* Add A2A Version Header
([#422](#422))
([b5f3db7](b5f3db7))
* Add cache-headers logic to the agent card handler
([#435](#435))
([955b52b](955b52b))
* Add resource scoping
([#450](#450))
([c527086](c527086))
* Add support for custom authentication scheme and credentials in
auth-headers ([#430](#430))
([5a4389b](5a4389b))
* AgentCardSignature support
([#448](#448))
([4a41a8c](4a41a8c))
* Enforce events ordering
([#437](#437))
([157cf48](157cf48))
* Enriched Error Model
([#427](#427))
([c130778](c130778))
* Implement listTasks method
([#383](#383))
([7d4c472](7d4c472))
* Send current task as the first event after subscribing to it
([#418](#418))
([4bfcf5f](4bfcf5f))
* Support multi-tenancy
([#419](#419))
([1877877](1877877))

### Code Refactoring

* remove A2AExpressApp
([#363](#363))
([0b84728](0b84728))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: bartek-gralewicz <bgralewicz@google.com>
Co-authored-by: Ivan Shymko <ishymko@google.com>
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