Skip to content

Feat/jrpc engine v2#377

Merged
chaitanyapotti merged 12 commits intomasterfrom
feat/jrpc-engine-v2
Feb 19, 2026
Merged

Feat/jrpc engine v2#377
chaitanyapotti merged 12 commits intomasterfrom
feat/jrpc-engine-v2

Conversation

@lwin-kyaw
Copy link
Contributor

@lwin-kyaw lwin-kyaw commented Feb 10, 2026

Motivation and Context

Jira Link:

Description

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Medium Risk
Adds a substantial new JSON-RPC execution path and error/coercion behavior (engine + server + legacy bridge), which could affect request handling semantics and error propagation even though the legacy engine remains available.

Overview
Introduces JRPCEngineV2 under src/jrpc/v2, a new JSON-RPC middleware engine with a new middleware signature, immutable (deep-frozen) requests/results, typed context via MiddlewareContext, explicit request-vs-notification handling, and lifecycle support (destroy, asMiddleware, factory create()).

Adds JRPCServer to coerce raw inputs into well-formed JSON-RPC calls, return non-throwing responses for requests, and serialize errors, plus asLegacyMiddleware + compatibility utilities to run V2 engines/middleware inside the legacy JRPCEngine while propagating request/context changes. Also updates JRPC exports and utilities (e.g., isRequest/isNotification, getUniqueId, stable stringify) and enhances JsonRpcError serialization to better preserve/serialize cause, with comprehensive new V2-focused tests and docs.

Written by Cursor Bugbot for commit 7ff19da. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Base automatically changed from fix/jrpc-errors to master February 11, 2026 08:53
@chaitanyapotti chaitanyapotti merged commit 4dc4d41 into master Feb 19, 2026
5 checks passed
@chaitanyapotti chaitanyapotti deleted the feat/jrpc-engine-v2 branch February 19, 2026 09:50
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

Comments