Skip to content

Commit bd6837f

Browse files
bokelleyclaude
andauthored
feat(schemas): fetch + bundle v2.5 schemas from pinned upstream SHA (stage 4b1) (#670)
New scripts/sync_legacy_schemas.py pins each legacy bundle to a commit SHA from adcontextprotocol/adcp, fetches the zipball via GitHub API, and extracts static/schemas/source/ into schemas/cache/{bundle_key}/. SHA itself is the integrity check. v2.5 pinned to 4e553ad9 (2.5-maintenance branch tip): 158 upstream files + 29 synthesized into bundled/ (so schema_loader._build_index discovers request/response pairs uniformly). fix_schema_refs.py extended to accept --bundle-key and to handle both ref shapes (/schemas/VERSION/... and bare /schemas/...). The sync invokes it automatically. Adopters can now get_validator("sync_creatives", "request", version="2.5") and get a real v2.5 validator (39 keys discovered). Stage 4b2 wires pre-adapter validation in the dispatcher. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4e3473a commit bd6837f

190 files changed

Lines changed: 13947 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

schemas/cache/2.5/adagents.json

Lines changed: 493 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "List Creative Formats Request (Creative Agent)",
4+
"description": "Request parameters for discovering creative formats provided by this creative agent",
5+
"type": "object",
6+
"properties": {
7+
"format_ids": {
8+
"type": "array",
9+
"description": "Return only these specific format IDs",
10+
"items": {
11+
"$ref": "../../core/format-id.json"
12+
}
13+
},
14+
"type": {
15+
"type": "string",
16+
"description": "Filter by format type (technical categories with distinct requirements)",
17+
"enum": [
18+
"audio",
19+
"video",
20+
"display",
21+
"dooh"
22+
]
23+
},
24+
"asset_types": {
25+
"type": "array",
26+
"description": "Filter to formats that include these asset types. For third-party tags, search for 'html' or 'javascript'. E.g., ['image', 'text'] returns formats with images and text, ['javascript'] returns formats accepting JavaScript tags.",
27+
"items": {
28+
"type": "string",
29+
"enum": [
30+
"image",
31+
"video",
32+
"audio",
33+
"text",
34+
"html",
35+
"javascript",
36+
"url"
37+
]
38+
}
39+
},
40+
"max_width": {
41+
"type": "integer",
42+
"description": "Maximum width in pixels (inclusive). Returns formats with width <= this value. Omit for responsive/fluid formats."
43+
},
44+
"max_height": {
45+
"type": "integer",
46+
"description": "Maximum height in pixels (inclusive). Returns formats with height <= this value. Omit for responsive/fluid formats."
47+
},
48+
"min_width": {
49+
"type": "integer",
50+
"description": "Minimum width in pixels (inclusive). Returns formats with width >= this value."
51+
},
52+
"min_height": {
53+
"type": "integer",
54+
"description": "Minimum height in pixels (inclusive). Returns formats with height >= this value."
55+
},
56+
"is_responsive": {
57+
"type": "boolean",
58+
"description": "Filter for responsive formats that adapt to container size. When true, returns formats without fixed dimensions."
59+
},
60+
"name_search": {
61+
"type": "string",
62+
"description": "Search for formats by name (case-insensitive partial match)"
63+
},
64+
"context": {
65+
"$ref": "../../core/context.json"
66+
},
67+
"ext": {
68+
"$ref": "../../core/ext.json"
69+
}
70+
},
71+
"additionalProperties": true
72+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "List Creative Formats Response (Creative Agent)",
4+
"description": "Response payload for list_creative_formats task from creative agent - returns full format definitions",
5+
"type": "object",
6+
"properties": {
7+
"formats": {
8+
"type": "array",
9+
"description": "Full format definitions for all formats this agent supports. Each format's authoritative source is indicated by its agent_url field.",
10+
"items": {
11+
"$ref": "../../core/format.json"
12+
}
13+
},
14+
"creative_agents": {
15+
"type": "array",
16+
"description": "Optional: Creative agents that provide additional formats. Buyers can recursively query these agents to discover more formats. No authentication required for list_creative_formats.",
17+
"items": {
18+
"type": "object",
19+
"properties": {
20+
"agent_url": {
21+
"type": "string",
22+
"format": "uri",
23+
"description": "Base URL for the creative agent (e.g., 'https://reference.adcp.org', 'https://dco.example.com'). Call list_creative_formats on this URL to get its formats."
24+
},
25+
"agent_name": {
26+
"type": "string",
27+
"description": "Human-readable name for the creative agent"
28+
},
29+
"capabilities": {
30+
"type": "array",
31+
"description": "Capabilities this creative agent provides",
32+
"items": {
33+
"$ref": "../../enums/creative-agent-capability.json"
34+
}
35+
}
36+
},
37+
"required": [
38+
"agent_url"
39+
]
40+
}
41+
},
42+
"errors": {
43+
"type": "array",
44+
"description": "Task-specific errors and warnings",
45+
"items": {
46+
"$ref": "../../core/error.json"
47+
}
48+
},
49+
"context": {
50+
"$ref": "../../core/context.json"
51+
},
52+
"ext": {
53+
"$ref": "../../core/ext.json"
54+
}
55+
},
56+
"required": [
57+
"formats"
58+
],
59+
"additionalProperties": true
60+
}
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Preview Creative Request",
4+
"description": "Request to generate previews of one or more creative manifests. Accepts either a single creative request or an array of requests for batch processing.",
5+
"oneOf": [
6+
{
7+
"type": "object",
8+
"description": "Single creative preview request",
9+
"properties": {
10+
"request_type": {
11+
"type": "string",
12+
"const": "single",
13+
"description": "Discriminator indicating this is a single preview request"
14+
},
15+
"format_id": {
16+
"$ref": "../../core/format-id.json",
17+
"description": "Format identifier for rendering the preview"
18+
},
19+
"creative_manifest": {
20+
"$ref": "../../core/creative-manifest.json",
21+
"description": "Complete creative manifest with all required assets (including promoted_offerings if required by the format)"
22+
},
23+
"inputs": {
24+
"type": "array",
25+
"description": "Array of input sets for generating multiple preview variants. Each input set defines macros and context values for one preview rendering. If not provided, creative agent will generate default previews.",
26+
"items": {
27+
"type": "object",
28+
"properties": {
29+
"name": {
30+
"type": "string",
31+
"description": "Human-readable name for this input set (e.g., 'Sunny morning on mobile', 'Evening podcast ad', 'Desktop dark mode')"
32+
},
33+
"macros": {
34+
"type": "object",
35+
"description": "Macro values to use for this preview. Supports all universal macros from the format's supported_macros list. See docs/creative/universal-macros.md for available macros.",
36+
"additionalProperties": {
37+
"type": "string"
38+
}
39+
},
40+
"context_description": {
41+
"type": "string",
42+
"description": "Natural language description of the context for AI-generated content (e.g., 'User just searched for running shoes', 'Podcast discussing weather patterns', 'Article about electric vehicles')"
43+
}
44+
},
45+
"required": [
46+
"name"
47+
],
48+
"additionalProperties": true
49+
}
50+
},
51+
"template_id": {
52+
"type": "string",
53+
"description": "Specific template ID for custom format rendering"
54+
},
55+
"output_format": {
56+
"$ref": "../../enums/preview-output-format.json",
57+
"default": "url",
58+
"description": "Output format for previews. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML for direct embedding). Default: 'url' for backward compatibility."
59+
},
60+
"context": {
61+
"$ref": "../../core/context.json"
62+
},
63+
"ext": {
64+
"$ref": "../../core/ext.json"
65+
}
66+
},
67+
"required": [
68+
"request_type",
69+
"format_id",
70+
"creative_manifest"
71+
],
72+
"additionalProperties": true
73+
},
74+
{
75+
"type": "object",
76+
"description": "Batch preview request for multiple creatives (5-10x faster than individual calls)",
77+
"properties": {
78+
"request_type": {
79+
"type": "string",
80+
"const": "batch",
81+
"description": "Discriminator indicating this is a batch preview request"
82+
},
83+
"requests": {
84+
"type": "array",
85+
"description": "Array of preview requests (1-50 items). Each follows the single request structure.",
86+
"items": {
87+
"type": "object",
88+
"properties": {
89+
"format_id": {
90+
"$ref": "../../core/format-id.json",
91+
"description": "Format identifier for rendering the preview"
92+
},
93+
"creative_manifest": {
94+
"$ref": "../../core/creative-manifest.json",
95+
"description": "Complete creative manifest with all required assets"
96+
},
97+
"inputs": {
98+
"type": "array",
99+
"description": "Array of input sets for generating multiple preview variants",
100+
"items": {
101+
"type": "object",
102+
"properties": {
103+
"name": {
104+
"type": "string",
105+
"description": "Human-readable name for this input set"
106+
},
107+
"macros": {
108+
"type": "object",
109+
"description": "Macro values to use for this preview",
110+
"additionalProperties": {
111+
"type": "string"
112+
}
113+
},
114+
"context_description": {
115+
"type": "string",
116+
"description": "Natural language description of the context for AI-generated content"
117+
}
118+
},
119+
"required": [
120+
"name"
121+
],
122+
"additionalProperties": true
123+
}
124+
},
125+
"template_id": {
126+
"type": "string",
127+
"description": "Specific template ID for custom format rendering"
128+
},
129+
"output_format": {
130+
"$ref": "../../enums/preview-output-format.json",
131+
"default": "url",
132+
"description": "Output format for this preview. 'url' returns preview_url, 'html' returns preview_html."
133+
}
134+
},
135+
"required": [
136+
"format_id",
137+
"creative_manifest"
138+
],
139+
"additionalProperties": true
140+
},
141+
"minItems": 1,
142+
"maxItems": 50
143+
},
144+
"output_format": {
145+
"$ref": "../../enums/preview-output-format.json",
146+
"default": "url",
147+
"description": "Default output format for all requests in this batch. Individual requests can override this. 'url' returns preview_url (iframe-embeddable URL), 'html' returns preview_html (raw HTML for direct embedding)."
148+
},
149+
"context": {
150+
"$ref": "../../core/context.json"
151+
},
152+
"ext": {
153+
"$ref": "../../core/ext.json"
154+
}
155+
},
156+
"required": [
157+
"request_type",
158+
"requests"
159+
],
160+
"additionalProperties": true
161+
}
162+
]
163+
}

0 commit comments

Comments
 (0)