feat(schema): add produced_by to format.assets[] to distinguish input/output slots#4023
Draft
feat(schema): add produced_by to format.assets[] to distinguish input/output slots#4023
Conversation
…/output slots Adds optional `produced_by: enum ["buyer", "build_creative"]` with default "buyer" to both baseIndividualAsset and baseGroupAsset in format.json. - produced_by: 'buyer' (default) — buyer provides asset in build_creative inputs - produced_by: 'build_creative' — agent generates asset in the response; buyers MUST NOT include it in requests Adds if/then constraint enforcing required: false when produced_by is 'build_creative', preventing the undefined required: true + build_creative state. Adds default: false to baseIndividualAsset.required for symmetry with baseGroupAsset. Resolves conformance ambiguity in adapters that declared output slots using required: false (the only legal option in 3.0.x). render_time deferred. Closes #4021 https://claude.ai/code/${CLAUDE_CODE_REMOTE_SESSION_ID}
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.
Closes #4021
Summary
Adds optional
produced_by: enum ["buyer", "build_creative"]with default"buyer"to bothbaseIndividualAssetandbaseGroupAssetinstatic/schemas/source/core/format.json.This resolves a conformance ambiguity where creative adapters had to declare output slots (assets the
build_creativeagent generates, not the buyer) usingrequired: false— the only legal expression available in 3.0.x. Buyer agents readingproduced_by: "build_creative"on a slot now know they MUST NOT supply it inbuild_creativeinput requests; agents receiving such a slot in input MUST return an error.The change covers both
baseIndividualAsset(individual asset slots) andbaseGroupAsset(slots within repeatable groups). Anif/thenconstraint is added to both defs to enforcerequired: falsewhenproduced_by: "build_creative", preventing the undefinedrequired: true + build_creativestate.default: falseis also added tobaseIndividualAsset.requiredfor symmetry withbaseGroupAsset.render_time(for impression-serving-time DCO assets) is intentionally deferred — there is no current AdCP task boundary for that lifecycle phase.Non-breaking justification
Adds optional fields (
produced_by) with backward-compatible defaults ("buyer"). All existingformat.assets[]declarations that omitproduced_byare treated asproduced_by: "buyer"by consumers — no existing format or manifest changes required. Theif/thenconstraint only fires whenproduced_byis explicitly set to"build_creative", which is new usage.Nits (not fixed)
descriptionstring, which JSON Schema validators do not enforce. Enforcement is delegated to the adapter validation layer (consistent with howbuild_creativeerror handling works today). A follow-up issue should add a distinctOUTPUT_ONLY_ASSET_PROVIDEDerror code tobuild_creative's error table for unambiguous implementation guidance.Pre-PR review
if/thenpattern matches existingparameters_from_format_id/dimensionsprecedent in the same file,default: falsesymmetry resolved. Nit: normative language in description is unenforced by validators (acknowledged above).produced_byenum maps to OpenRTB 2.6 §3.2.7 and Native 1.2 §4.2 named-role precedent;if/thenconstraint prevents undefined dual-boolean state;minorchangeset bump confirmed correct. Nit: description wording for MUST-subject (acknowledged above).Session: https://claude.ai/code/${CLAUDE_CODE_REMOTE_SESSION_ID}
Generated by Claude Code