Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

Align TypeScript SDK Commons requests with Protocol‑Commons v1.1.0#24

Closed
GsCommand wants to merge 1 commit into
mainfrom
codex/fix-sdk-to-match-v1.1.0-protocol-contract
Closed

Align TypeScript SDK Commons requests with Protocol‑Commons v1.1.0#24
GsCommand wants to merge 1 commit into
mainfrom
codex/fix-sdk-to-match-v1.1.0-protocol-contract

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • The TypeScript SDK was constructing Commons requests using a nested body and x402/actor wrappers which contradict the Protocol‑Commons v1.1.0 schemas that require a flat top‑level input string shape.
  • This change makes the SDK the single source of truth for request construction follow Protocol‑Commons v1.1.0 exactly while preserving response‑side compatibility only where needed.

Description

  • Implemented a canonical flat request builder buildCommonsRequest() and exported CommonsRequest and verb‑specific types so request typing matches the v1.1.0 schemas exactly, and marked actor in ClientOptions as deprecated.
  • Updated all Commons verb helpers to use buildCommonsRequest() and to send a flat payload { verb, version, input, mode? } instead of nested input, limits, actor, or x402 wrappers; call() now posts the canonical payload.
  • Updated the CLI to accept the flat Commons input (--input) and adjusted examples/docs (README.md, typescript-sdk/README.md, EXAMPLES.md, QUICKSTART.md) to teach the flat request shape.
  • Updated and added unit and smoke tests to assert the flat request structure and removed reliance on request‑side x402/actor defaults while preserving legacy response normalization (receipt envelope parsing) only.

Testing

  • Ran type checking with npm run typecheck in typescript-sdk, which completed successfully.
  • Ran the package tests with npm test in typescript-sdk, which ran unit and CLI smoke suites and passed (52 passed, 0 failed) and the CLI smoke tests passed.

Codex Task

@GsCommand GsCommand closed this Apr 24, 2026
@GsCommand GsCommand deleted the codex/fix-sdk-to-match-v1.1.0-protocol-contract branch April 24, 2026 03:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant