Skip to content

feat: defined compat-specific consts and mappings#478

Merged
JakubWorek merged 2 commits into
epic/1.0_breaking_changesfrom
jakubworek/define-compat-specific-constants-and-mappings
May 15, 2026
Merged

feat: defined compat-specific consts and mappings#478
JakubWorek merged 2 commits into
epic/1.0_breaking_changesfrom
jakubworek/define-compat-specific-constants-and-mappings

Conversation

@JakubWorek
Copy link
Copy Markdown
Collaborator

Description

Defined compat layer specific constants (eg LEGACY_HTTP_EXTENSION_HEADER).
Created mappings between v0.3 and v1.0 method names and helper methods for translating them.

Closes #472 🦕

@JakubWorek JakubWorek requested a review from a team as a code owner May 15, 2026 11:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

🧪 Code Coverage

⬇️ Download Full Report

Base PR Delta
src/compat/v0_3/server/error.ts 51.92% 59.61% 🟢 +7.69%
src/compat/v0_3/constants.ts (new) 100%
src/compat/v0_3/index.ts (new) 0%
Total 88.52% 88.75% 🟢 +0.23%

Generated by coverage-comment.yml

@JakubWorek JakubWorek linked an issue May 15, 2026 that may be closed by this pull request
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 introduces a compatibility layer for the legacy A2A v0.3 protocol, including constants and bi-directional method mappings between legacy JSON-RPC, legacy gRPC, and v1.0. It also adds comprehensive unit tests to verify these mappings. The reviewer recommended updating the lookup utility to use the standard JSON-RPC 'Method not found' error code (-32601) and suggested using hasOwnProperty to prevent potential issues with prototype properties during method lookups.

Comment thread src/compat/v0_3/constants.ts
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 introduces a compatibility layer for the legacy A2A v0.3 protocol, including method name mappings between legacy JSON-RPC, legacy gRPC, and v1.0. It also adds a suite of unit tests to ensure mapping accuracy and bidirectional consistency. Feedback was provided to improve the robustness of the method lookup logic by using hasOwnProperty to avoid potential prototype pollution or unexpected behavior from untrusted input keys.

Comment thread src/compat/v0_3/constants.ts
@bartek-gralewicz bartek-gralewicz changed the title feat: defined comapt specific consts and mappings feat: defined compat-specific consts and mappings May 15, 2026
Comment thread src/compat/v0_3/constants.ts Outdated
Copy link
Copy Markdown
Contributor

@bartek-gralewicz bartek-gralewicz left a comment

Choose a reason for hiding this comment

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

At some point, we'll probably need some simple REST mapping as well (dropped /v1 prefix in the endpoint). For now, this looks like a good base.

@JakubWorek JakubWorek merged commit db0c595 into epic/1.0_breaking_changes May 15, 2026
9 checks passed
@JakubWorek JakubWorek deleted the jakubworek/define-compat-specific-constants-and-mappings branch May 15, 2026 13:25
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.

feat(compat): Define compat-specific constants and mappings

2 participants