feat(schemas): release-precision version negotiation (allOf envelope)#107
Draft
bokelley wants to merge 1 commit into
Draft
feat(schemas): release-precision version negotiation (allOf envelope)#107bokelley wants to merge 1 commit into
bokelley wants to merge 1 commit into
Conversation
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
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pulls in the spec change from adcontextprotocol/adcp#3493 (merged): every AdCP request and response schema now composes shared
adcp_versionandadcp_major_versionfields viaallOf$refto a newcore/version-envelope.jsonrather than declaring them inline.Filing as a draft because (a)
adcp/schemas/VERSIONis pinned tolatestuntil the next named version is cut (likely3.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:
Bump
adcp/schemas/VERSIONtolatestso the schema sync picks up the post-merge bundle. Re-pin to the next named version (3.1.0-beta.1or3.1.0-rc.0) before this PR is ready to land.Teach
adcp/schemas/generate.pyto inline root-levelallOf $refenvelopes before emitting Go structs. The generator previously readschema.get('properties')directly and would have lost every envelope-only field. New_inline_root_allofhelper merges envelope-referencedproperties+requiredinto the parent. Conservative: only handlesallOfmembers that are pure$refto object schemas; anything else is left for the rest of the generator to handle.Regenerate
adcp/types_gen.go. 40 request/response structs gainAdcpVersion stringnext to existingAdcpMajorVersion int. No hand-written types intypes.go/responses.go/inputs.godeclared the version fields, so the regen is the full surface.The bundle bump also pulls in canonical agent skills via
download.sh(theskills/adcp-*andskills/call-adcp-agentSKILL.md files). These are synced bundle artifacts perskills/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.py—No schema drift.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:
WithAdcpVersion("3.1")) with auto-mirror toAdcpMajorVersion.VersionUnsupportedErrorexposingerror.data.supported_versionspererror-details/version-unsupported.json.AdcpVersionand validating against the pin."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
specs/version-negotiation.md