Skip to content

Stage 3 follow-ups: cross-version harness, downshift, type surfacing, 4.0 cleanup #1069

@bokelley

Description

@bokelley

Context

Stage 3 of the per-instance adcpVersion work has shipped:

This issue captures the deferred follow-ups that were intentionally scoped out of those PRs.

Work items

1. Stage 3 Phase D — cross-version test harness

Spin up a 3.1 seller (createAdcpServer({ adcpVersion: '3.1.0-beta.1' })) and a 3.0 buyer (new SingleAgentClient({ adcpVersion: '3.0.1' })) in the same Node process. Assert the matrix:

Buyer Seller Expected
3.0 3.0 full support, baseline
3.1 3.1 full support, both fields on the wire
3.0 3.1 works — 3.1 sellers MUST accept 3.0 buyers per minor compat
3.1 3.0 works for 3.0-shaped requests; new 3.1-only features get VERSION_UNSUPPORTED
3.x 4.0 (when shipped) clean VERSION_UNSUPPORTED, no silent corruption

This was the original Phase D goal in #1053's changeset. Blocked on the AdCP spec repo tagging a 3.1.0-beta.X release containing #3493 — without 3.1 schemas in the SDK build, there's no second bundle to test against.

2. Multi-version "release served" downshift on response echo

Per spec PR #3493 rule 6: a 3.1 seller serving a 3.0 buyer at 3.0 MUST echo adcp_version: '3.0', not '3.1'. Today's SDK (#1067) always echoes the seller's own pin via injectVersionIntoResponse. Correct for single-version sellers; wrong for sellers that declare multiple supported_versions.

Requires:

  • Server config knob for declaring multi-version capability (likely supportedVersions: string[] on createAdcpServer config, mapping to adcp.supported_versions on capability response)
  • Dispatch threads incoming request.adcp_version through to injectVersionIntoResponse
  • Pick the highest mutually-supported version, echo that
  • Test coverage in the Phase D matrix above

3. Buyer-side response-echo introspection (typed signal on TaskResult)

Today the seller's adcp_version echo is in the response body but the SDK doesn't surface it as a typed signal on TaskResult. Callers can read it directly from result.data.adcp_version. Adding result.adcpVersion?: string (and probably result.versionDowngraded?: boolean derived by comparing to the buyer's pin) makes downgrade-detection a first-class observable.

4. Compliance storyboard 3.1 tracks

When adcontextprotocol/adcp publishes the 3.1 storyboard tarball, our compliance/cache/ resync via npm run sync-schemas pulls new tracks. Adopters then run adcp storyboard run --version 3.1.0-beta.1 against their dev deployments. No SDK code change needed — purely a documentation/sample update once the tarball lands.

5. AdCP 4.0 cleanup

When AdCP 4.0 ships and adcp_major_version is removed per spec PR #3493's migration table:

  • Drop integer wire emission from buildVersionEnvelope
  • Drop majorVersions integer array from parseCapabilitiesResponse / AdcpCapabilities
  • Remove requireV3 deprecated alias on SingleAgentClient and AgentClient
  • Retire the legacy Agent class entirely (deprecation warning lands in feat: wire adcpVersion per-instance through validators + protocol; lift fence (Stage 3 B+C) #1053)
  • Drop requireV3ForMutations config option
  • Field-disagreement check becomes single-field absence (no adcp_major_version to disagree with)

Major SDK bump. Far in the future.

6. Widen AdcpMajorVersion type when major-4 schemas land

Currently AdcpMajorVersion = 2 | 3 in src/lib/version.ts. When AdCP 4.x schemas ship, widen to 2 | 3 | 4 at source. Mechanical change. Required for requireSupportedMajor's legacy-path cast to stay sound.

Related

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions