Expose v0.3 to v1.0 conversion helpers as public API

Open Beginner friendly
#646 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript

Research direction

The needed conversion helpers are internal functions in dist/compat/v0_3/client/index.js and the server compat index.js. Start by examining these files to understand the existing conversion logic for role mapping, task-state mapping, and part $case mapping. The task is to modify the export statements in these files and potentially the top-level entry point to make the helpers public. Verify the changes by checking that the new exports are accessible from @a2a-js/sdk/compat/v0_3 and that existing tests still pass.

Written by the indexing model from the issue text.

Description

Hi, thanks again for the ongoing work on the SDK and the legacyCompat layer.

We're on 1.0.1, migrating from 0.3.14. We have a receiving endpoint that is not an SDK client: agents reply to us via push notification against our own Express callback route. We receive a raw v0.3 body and have to convert it to v1.0 ourselves before handing it to the rest of our v1.0 pipeline.

The SDK already contains exactly the converters we need, internally named functions in dist/compat/v0_3/client/index.js and the server compat index.js. They are just not part of the public exports. From @a2a-js/sdk/compat/v0_3/client only LegacyJsonRpcTransport, LegacyRestTransport, isLegacyAgentCard, and parseLegacyAgentCard are exported, and no v0.3 to v1.0 conversion helpers are re-exported from the top-level entry either.

As a result we had to hand-reimplement the v0.3 wire to core conversion (role mapping, task-state mapping, part $case mapping including file bytes/uri, status/artifact/task/statusUpdate/artifactUpdate shapes), duplicating logic that already exists and is maintained inside the SDK.

Would you be open to exposing the v0.3 to v1.0 converters as public API from @a2a-js/sdk/compat/v0_3?

Thanks again for the great work on the SDK.

Dominant language
TypeScript
Stars
623
Forks
171
Avg merge
3d 20h
Merged PRs (30d)
32

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from a2aproject/a2a-js

All issues in a2aproject/a2a-js

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.