-
Notifications
You must be signed in to change notification settings - Fork 73
feat: add reference_assets to product_card_detailed #5583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
garvitkaushik-123
wants to merge
3
commits into
adcontextprotocol:main
Choose a base branch
from
garvitkaushik-123:feat/product-card-reference-assets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+145
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "adcontextprotocol": minor | ||
| --- | ||
|
|
||
| Add `reference_assets` array to `product_card_detailed` for typed seller collateral (coverage maps, sample renders, environment photos, media kits). New schema: `core/product-card-reference-asset.json`. |
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
63 changes: 63 additions & 0 deletions
63
static/schemas/source/core/product-card-reference-asset.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "$id": "/schemas/core/product-card-reference-asset.json", | ||
| "title": "Product Card Reference Asset", | ||
| "description": "Typed seller collateral for buyer-facing product cards. Each entry carries a semantic role (coverage_map, sample_render, etc.) and a canonical asset payload. Distinct from hero_image/carousel_images (display-oriented) and from core/reference-asset.json (creative-generation oriented).", | ||
| "type": "object", | ||
| "properties": { | ||
| "role": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "coverage_map", | ||
| "sample_render", | ||
| "environment_photo", | ||
| "media_kit", | ||
| "logo", | ||
| "other" | ||
| ], | ||
| "description": "Semantic role of this asset. coverage_map: geographic or audience reach visualization; sample_render: mockup of ad placement in context; environment_photo: photo of the physical or digital environment; media_kit: downloadable media kit or spec sheet; logo: seller or property logo; other: seller-defined role (provide role_label)." | ||
| }, | ||
| "role_label": { | ||
| "type": "string", | ||
| "description": "Human-readable label for the asset role. Required when role is 'other'; optional otherwise." | ||
| }, | ||
| "asset": { | ||
| "oneOf": [ | ||
| { "$ref": "/schemas/core/assets/image-asset.json" }, | ||
| { "$ref": "/schemas/core/assets/video-asset.json" }, | ||
| { "$ref": "/schemas/core/assets/markdown-asset.json" }, | ||
| { "$ref": "/schemas/core/assets/url-asset.json" } | ||
| ], | ||
| "description": "The asset payload, discriminated on asset_type (image, video, markdown, url)." | ||
| }, | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Optional human-readable context about this asset." | ||
| } | ||
| }, | ||
| "required": [ | ||
| "role", | ||
| "asset" | ||
| ], | ||
| "allOf": [ | ||
| { | ||
| "if": { | ||
| "properties": { | ||
| "role": { | ||
| "type": "string", | ||
| "const": "other" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "role" | ||
| ] | ||
| }, | ||
| "then": { | ||
| "required": [ | ||
| "role_label" | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| "additionalProperties": true | ||
| } | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Medium: The description claims
role_labelis "Required when role is 'other'", but the schema does not encode that — noif/then, androle_labelis absent fromrequired. A seller emitting{"role": "other"}with no label validates clean, and buyer agents get an unlabeledotherslot. The stated contract and the enforced contract diverge. Encode it:"if": {"properties": {"role": {"const": "other"}}}, "then": {"required": ["role_label"]}. Otherwise soften the prose to "SHOULD provide."