Skip to content

Let application code speak only the latest AdCP version, converting requests and responses for older counterparts #47

Open

Description

@bokelley

Implements adcontextprotocol/adcp#8373 in this SDK, for both client and server. The thesis: application code speaks only the latest AdCP version the SDK supports, and the SDK translates in both directions.

  • Client: negotiate the highest version both sides support, per seller and per call. Convert requests down to that version and responses up to the latest shape, between every consecutive minor version pair (3.2 and 3.1 now, 3.3 and 3.2 next), chained for larger gaps. Validate against the version on the wire.
  • Server: convert an older buyer's request up to the latest shape before the handler sees it, and convert the handler's response down to the version being served. Handlers shouldn't branch on version.
  • Account keys: follow the rule the spec issue settles. Refusing shouldn't be the default (see "The account key" in the spec issue).
  • Visibility: report every field dropped when converting down.
  • Conformance: run the shared cross-version cases once they exist.

Current state in this SDK

Please confirm against the list above. The spec issue describes the gaps we found in the TypeScript SDK, as a reference.

Activity

  1. bokelley commented on Oct 24, 2026

    @bokelley
    ContributorAuthor

    The shared conformance cases for this work are proposed in adcontextprotocol/adcp#8433, at static/compliance/source/test-vectors/version-translation/ (DR-0032 and DR-0033 in adcontextprotocol/adcp#8410). They hold:

    • 20 conversion cases: client request down, client response up, server response down. Each has an exact expected output or a refusal.
    • 5 negotiation cases.
    • 4 account-key sequences: one-to-one reduction, collisions in either order, all-or-nothing claims per request, and migration after a seller upgrade.

    The TypeScript reference is merged: adcontextprotocol/adcp-client#3372 (client and server) and #3376 (follow-ups). Its consumer test is adcontextprotocol/adcp-client#3399, which shows how to run the vectors.

    Running the same vectors is what keeps buyer and seller behavior identical across SDKs. The review rule from DR-0033, that every minor-release change needs a pathway back, is now in this repo's reviewer config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions