Skip to content

feat(schemas): release-precision version negotiation (allOf envelope)#107

Draft
bokelley wants to merge 1 commit into
mainfrom
bokelley/release-precision-version-negotiation
Draft

feat(schemas): release-precision version negotiation (allOf envelope)#107
bokelley wants to merge 1 commit into
mainfrom
bokelley/release-precision-version-negotiation

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Pulls in the spec change from adcontextprotocol/adcp#3493 (merged): every AdCP request and response schema now composes shared adcp_version and adcp_major_version fields via allOf $ref to a new core/version-envelope.json rather than declaring them inline.

Filing as a draft because (a) adcp/schemas/VERSION is pinned to latest until the next named version is cut (likely 3.1.0-beta.1), and (b) SDK ergonomics on top of the regenerated types are deliberately scoped out — see "Out of scope" below.

What's in this PR

Three changes, all small:

  1. Bump adcp/schemas/VERSION to latest so the schema sync picks up the post-merge bundle. Re-pin to the next named version (3.1.0-beta.1 or 3.1.0-rc.0) before this PR is ready to land.

  2. Teach adcp/schemas/generate.py to inline root-level allOf $ref envelopes before emitting Go structs. The generator previously read schema.get('properties') directly and would have lost every envelope-only field. New _inline_root_allof helper merges envelope-referenced properties + required into the parent. Conservative: only handles allOf members that are pure $ref to object schemas; anything else is left for the rest of the generator to handle.

  3. Regenerate adcp/types_gen.go. 40 request/response structs gain AdcpVersion string next to existing AdcpMajorVersion int. No hand-written types in types.go / responses.go / inputs.go declared the version fields, so the regen is the full surface.

The bundle bump also pulls in canonical agent skills via download.sh (the skills/adcp-* and skills/call-adcp-agent SKILL.md files). These are synced bundle artifacts per skills/README.md; they're new to this PR because the previous pin (3.0.0) predated the manifest-driven skill sync added in #100.

Verification

  • go test ./... (root + adcp/ submodule) — green.
  • python3 lint.pyNo schema drift.
  • Build clean: go build ./... from both module roots.

Out of scope (follow-up)

The wire-level types are correct after this PR. Real SDK ergonomics need a follow-up:

  • Constructor option for setting the pin (e.g. WithAdcpVersion("3.1")) with auto-mirror to AdcpMajorVersion.
  • Typed VersionUnsupportedError exposing error.data.supported_versions per error-details/version-unsupported.json.
  • Response-echo helpers for reading the seller-served AdcpVersion and validating against the pin.
  • Wire-shape normalization for SDK consumers that key bundles by full semver ("3.1.0-beta.1""3.1-beta.1" per the wire shape rule).

These are all tracked under adcontextprotocol/adcp#3570 (Tier 1 epic) for the 3.1 GA milestone.

Refs

Pulls in the spec change from adcontextprotocol/adcp#3493 (merged): every
AdCP request and response schema now composes shared `adcp_version` and
`adcp_major_version` fields via `allOf` `$ref` to a new
`core/version-envelope.json` rather than declaring them inline.

Three changes here:

* Bump `adcp/schemas/VERSION` to `latest` until the next named version is
  cut (likely `3.1.0-beta.1`). Re-pin before this PR merges.

* Teach `adcp/schemas/generate.py` to inline root-level `allOf $ref`
  envelopes before emitting Go structs. The generator previously read
  `schema.get('properties')` directly and would have lost every
  envelope-only field. New `_inline_root_allof` helper merges
  envelope-referenced `properties` and `required` into the parent
  schema. Conservative: only handles allOf members that are pure
  `$ref` to object schemas; anything else is left for the rest of
  the generator to handle.

* Regenerate `adcp/types_gen.go`. 40 request/response structs gain
  `AdcpVersion string` next to existing `AdcpMajorVersion int`. No
  hand-written types in `types.go` / `responses.go` / `inputs.go`
  declared the version fields, so the regen is the full surface.

`go test ./...` green; schema drift lint (`python3 lint.py`) clean.

Out of scope for this PR (call out for follow-up):

* SDK constructor option for setting the pin (e.g. `WithAdcpVersion("3.1")`)
  with auto-mirror to `AdcpMajorVersion`.
* Typed `VersionUnsupportedError` exposing `error.data.supported_versions`
  per `error-details/version-unsupported.json`.
* Helpers for reading the response-echoed `AdcpVersion` and validating
  against the pinned release.
* Wire-shape normalization helper for SDK consumers that key bundles by
  full semver (`"3.1.0-beta.1"` → `"3.1-beta.1"`).

These are tracked under adcontextprotocol/adcp#3570 (Tier 1 epic) for
the 3.1 GA milestone.

Refs: adcontextprotocol/adcp#3493, adcontextprotocol/adcp#3570
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.

1 participant