Skip to content

feat: add capability_id to PackageRequest and Package (v2 format-selection at create_media_buy)#4844

Closed
bokelley wants to merge 1 commit into
mainfrom
claude/issue-4842-package-request-capability-id
Closed

feat: add capability_id to PackageRequest and Package (v2 format-selection at create_media_buy)#4844
bokelley wants to merge 1 commit into
mainfrom
claude/issue-4842-package-request-capability-id

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Closes #4842

Summary

AdCP's v2 format-selection path (capability_id) was already wired at discovery (ProductFormatDeclaration via get_products) and fulfillment (creative-manifest, creative-asset via sync_creatives), but the buy-creation step (PackageRequest / create_media_buy) was stuck on the v1 format_ids[] vocabulary. Buyers had to translate back through v1_format_ref[] — the exact bridge this PR removes.

Changes:

  • media-buy/package-request.json — adds capability_id?: string as the v2 alternative to format_ids[]. Full normative resolution rules (4 states: capability_id-only, both, v1-only, neither) and UNSUPPORTED_FEATURE error-on-miss behavior in the field description.
  • core/package.json — adds capability_id?: string on the confirmed Package response; sellers echo it when the buyer used the v2 path.
  • core/x-entity-types.json — registers new entity type product_format_declaration and annotates all four capability_id fields across the full storyboard (creative-manifest, creative-asset, package-request, core/package) with x-entity: "product_format_declaration".
  • core/creative-manifest.json, core/creative-asset.json — adds x-entity: "product_format_declaration" to existing capability_id fields (these were un-annotated; fixed as part of the same storyboard consistency pass).
  • docs/media-buy/task-reference/create_media_buy.mdx — adds capability_id row to the Package Object table, footnote, and a new "v2 format selection" subsection with resolution-rule table and example. Updates stale normative text ("format IDs are required" → "format specification tells the publisher…").
  • .changeset/package-request-capability-id.mdminor bump (additive optional field on published schema surface).

Non-breaking justification

package-request.json has "additionalProperties": true at the root. Old sellers ignore capability_id and continue processing format_ids[] unchanged. No existing required field was modified. The v1 format_ids[]-only path is explicitly preserved in all four resolution-rule states.

Pre-PR review

Two expert passes completed (2-iteration cap per playbook).

Pass 1 blockers (all fixed before push):

  • x-entity annotation missing on capability_id → added product_format_declaration to registry; annotated all four cross-storyboard capability_id fields
  • Error code UNSUPPORTED_FEATURE (not VALIDATION_ERROR) — aligned with product-format-declaration.json closed-set norm
  • Real company names in doc examples → replaced with fictional names (streamhaus_homepage_takeover_premium, pinnacle_reels_vertical)
  • Stale normative text ("Format IDs are required") → fixed at both sites in create_media_buy.mdx

Pass 2 (post-fix):

  • ad-tech-protocol-expert: BLOCKED — capability_id on creative-manifest.json and creative-asset.json missing x-entity annotation → fixed in the same commit
  • code-reviewer: APPROVED

Final compliance build: 244 x-entity annotations, 30/32 entity types in use. ✅


Opened by the AdCP triage agent · session


Generated by Claude Code

…t-selection gap at create_media_buy

Adds `capability_id?: string` to `PackageRequest` (v2 write path) and the
confirmed `Package` response (echo), so buyers can use the same stable
publisher-scoped identifier from `ProductFormatDeclaration` (discovery via
get_products) through buy creation without translating back through v1_format_ref[].

Existing `format_ids[]`-based requests are unchanged (additive only).
Sellers echo `capability_id` on the confirmed package when the buyer supplied it.
Normative resolution rules (capability_id-only, both, v1-only, neither) and
UNSUPPORTED_FEATURE error-on-miss behavior added to schema descriptions and MDX docs.

x-entity: "product_format_declaration" registered and applied to all four
`capability_id` fields across the full storyboard — creative-manifest.json,
creative-asset.json, package-request.json, and core/package.json.

Closes #4842

https://claude.ai/code/session_01BaWxg6AXPsEdPUTVSmfYS1
@bokelley

Copy link
Copy Markdown
Contributor Author

Closing as superseded by current main. The v2 create_media_buy format-selection path has landed as capability_ids[] on PackageRequest, with corresponding create_media_buy docs and UNSUPPORTED_FEATURE guidance. This draft uses the older singular capability_id shape and would roll back the current array design.

@bokelley bokelley closed this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PackageRequest lacks v2 capability_id path — V2 mental model breaks at create_media_buy boundary

2 participants