@adcp/sdk 14.0.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/lib/adapters/implicit-account-store.d.mts +12 -7
  2. package/dist/lib/adapters/implicit-account-store.d.ts +12 -7
  3. package/dist/lib/adapters/implicit-account-store.js +69 -15
  4. package/dist/lib/adapters/implicit-account-store.mjs +69 -15
  5. package/dist/lib/core/AgentClient.d.mts +1 -0
  6. package/dist/lib/core/AgentClient.d.ts +1 -0
  7. package/dist/lib/core/AgentClient.js +3 -0
  8. package/dist/lib/core/AgentClient.mjs +3 -0
  9. package/dist/lib/core/SingleAgentClient.d.mts +35 -2
  10. package/dist/lib/core/SingleAgentClient.d.ts +35 -2
  11. package/dist/lib/core/SingleAgentClient.js +377 -36
  12. package/dist/lib/core/SingleAgentClient.mjs +387 -38
  13. package/dist/lib/core/TaskExecutor.d.mts +3 -1
  14. package/dist/lib/core/TaskExecutor.d.ts +3 -1
  15. package/dist/lib/core/TaskExecutor.js +17 -12
  16. package/dist/lib/core/TaskExecutor.mjs +17 -12
  17. package/dist/lib/core/account-key.d.mts +3 -0
  18. package/dist/lib/core/account-key.d.ts +3 -0
  19. package/dist/lib/core/account-key.js +41 -0
  20. package/dist/lib/core/account-key.mjs +17 -0
  21. package/dist/lib/core/account-resolution.d.mts +2 -0
  22. package/dist/lib/core/account-resolution.d.ts +2 -0
  23. package/dist/lib/core/buyer-account-registry.d.mts +93 -0
  24. package/dist/lib/core/buyer-account-registry.d.ts +93 -0
  25. package/dist/lib/core/buyer-account-registry.js +602 -0
  26. package/dist/lib/core/buyer-account-registry.mjs +578 -0
  27. package/dist/lib/core/product-cache.d.mts +18 -0
  28. package/dist/lib/core/product-cache.d.ts +18 -0
  29. package/dist/lib/core/product-cache.js +137 -0
  30. package/dist/lib/core/product-cache.mjs +112 -0
  31. package/dist/lib/errors/index.d.mts +40 -1
  32. package/dist/lib/errors/index.d.ts +40 -1
  33. package/dist/lib/errors/index.js +69 -3
  34. package/dist/lib/errors/index.mjs +64 -3
  35. package/dist/lib/governance/authorization.d.mts +17 -1
  36. package/dist/lib/governance/authorization.d.ts +17 -1
  37. package/dist/lib/governance/authorization.js +55 -7
  38. package/dist/lib/governance/authorization.mjs +59 -7
  39. package/dist/lib/governance/index.d.mts +2 -2
  40. package/dist/lib/governance/index.d.ts +2 -2
  41. package/dist/lib/governance/index.js +2 -0
  42. package/dist/lib/governance/index.mjs +3 -1
  43. package/dist/lib/index.d.mts +7 -4
  44. package/dist/lib/index.d.ts +7 -4
  45. package/dist/lib/index.js +29 -0
  46. package/dist/lib/index.mjs +31 -1
  47. package/dist/lib/net/agent-transport-fetch.d.mts +4 -0
  48. package/dist/lib/net/agent-transport-fetch.d.ts +4 -0
  49. package/dist/lib/net/agent-transport-fetch.js +18 -5
  50. package/dist/lib/net/agent-transport-fetch.mjs +17 -5
  51. package/dist/lib/protocols/a2a.js +9 -1
  52. package/dist/lib/protocols/a2a.mjs +9 -1
  53. package/dist/lib/protocols/index.js +9 -2
  54. package/dist/lib/protocols/index.mjs +9 -2
  55. package/dist/lib/protocols/mcp-modern.js +2 -1
  56. package/dist/lib/protocols/mcp-modern.mjs +2 -1
  57. package/dist/lib/protocols/mcp.js +5 -2
  58. package/dist/lib/protocols/mcp.mjs +5 -2
  59. package/dist/lib/protocols/rawResponseCapture.d.mts +6 -0
  60. package/dist/lib/protocols/rawResponseCapture.d.ts +6 -0
  61. package/dist/lib/protocols/rawResponseCapture.js +41 -29
  62. package/dist/lib/protocols/rawResponseCapture.mjs +40 -29
  63. package/dist/lib/protocols/signedRequestRejection.d.mts +9 -0
  64. package/dist/lib/protocols/signedRequestRejection.d.ts +9 -0
  65. package/dist/lib/protocols/signedRequestRejection.js +209 -0
  66. package/dist/lib/protocols/signedRequestRejection.mjs +189 -0
  67. package/dist/lib/protocols/transportDiagnostics.d.mts +1 -0
  68. package/dist/lib/protocols/transportDiagnostics.d.ts +1 -0
  69. package/dist/lib/protocols/transportDiagnostics.js +2 -0
  70. package/dist/lib/protocols/transportDiagnostics.mjs +1 -0
  71. package/dist/lib/registry/types.generated.d.mts +112 -45
  72. package/dist/lib/registry/types.generated.d.ts +112 -45
  73. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  74. package/dist/lib/server/account-provisioning.d.mts +2 -0
  75. package/dist/lib/server/account-provisioning.d.ts +2 -0
  76. package/dist/lib/server/account-provisioning.js +30 -0
  77. package/dist/lib/server/account-provisioning.mjs +6 -0
  78. package/dist/lib/server/account-reference-warnings.d.mts +12 -0
  79. package/dist/lib/server/account-reference-warnings.d.ts +12 -0
  80. package/dist/lib/server/account-reference-warnings.js +48 -0
  81. package/dist/lib/server/account-reference-warnings.mjs +23 -0
  82. package/dist/lib/server/auth-signature.js +1 -0
  83. package/dist/lib/server/auth-signature.mjs +1 -0
  84. package/dist/lib/server/create-adcp-server.d.mts +34 -0
  85. package/dist/lib/server/create-adcp-server.d.ts +34 -0
  86. package/dist/lib/server/create-adcp-server.js +225 -14
  87. package/dist/lib/server/create-adcp-server.mjs +225 -14
  88. package/dist/lib/server/decisioning/account.d.mts +2 -0
  89. package/dist/lib/server/decisioning/account.d.ts +2 -0
  90. package/dist/lib/server/decisioning/runtime/from-platform.js +49 -10
  91. package/dist/lib/server/decisioning/runtime/from-platform.mjs +49 -10
  92. package/dist/lib/server/index.d.mts +2 -2
  93. package/dist/lib/server/index.d.ts +2 -2
  94. package/dist/lib/server/index.js +2 -0
  95. package/dist/lib/server/index.mjs +3 -1
  96. package/dist/lib/signing/agent-resolver/consistency.d.mts +6 -13
  97. package/dist/lib/signing/agent-resolver/consistency.d.ts +6 -13
  98. package/dist/lib/signing/agent-resolver/consistency.js +0 -1
  99. package/dist/lib/signing/agent-resolver/consistency.mjs +0 -1
  100. package/dist/lib/signing/agent-resolver/errors.d.mts +3 -1
  101. package/dist/lib/signing/agent-resolver/errors.d.ts +3 -1
  102. package/dist/lib/signing/agent-resolver/errors.js +6 -0
  103. package/dist/lib/signing/agent-resolver/errors.mjs +6 -0
  104. package/dist/lib/signing/agent-resolver/fetch-helpers.d.mts +11 -0
  105. package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +11 -0
  106. package/dist/lib/signing/agent-resolver/fetch-helpers.js +37 -2
  107. package/dist/lib/signing/agent-resolver/fetch-helpers.mjs +40 -3
  108. package/dist/lib/signing/agent-resolver/jwks-set.js +24 -3
  109. package/dist/lib/signing/agent-resolver/jwks-set.mjs +24 -3
  110. package/dist/lib/signing/agent-resolver/legacy-brand.d.mts +15 -0
  111. package/dist/lib/signing/agent-resolver/legacy-brand.d.ts +15 -0
  112. package/dist/lib/signing/agent-resolver/legacy-brand.js +60 -0
  113. package/dist/lib/signing/agent-resolver/legacy-brand.mjs +36 -0
  114. package/dist/lib/signing/agent-resolver/operator-authorization.d.mts +13 -0
  115. package/dist/lib/signing/agent-resolver/operator-authorization.d.ts +13 -0
  116. package/dist/lib/signing/agent-resolver/operator-authorization.js +108 -0
  117. package/dist/lib/signing/agent-resolver/operator-authorization.mjs +84 -0
  118. package/dist/lib/signing/agent-resolver/resolve-agent.d.mts +14 -4
  119. package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +14 -4
  120. package/dist/lib/signing/agent-resolver/resolve-agent.js +148 -137
  121. package/dist/lib/signing/agent-resolver/resolve-agent.mjs +157 -139
  122. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +7 -1
  123. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +7 -1
  124. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +50 -17
  125. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +50 -17
  126. package/dist/lib/signing/agent-resolver/select-agent.d.mts +14 -15
  127. package/dist/lib/signing/agent-resolver/select-agent.d.ts +14 -15
  128. package/dist/lib/signing/agent-resolver/select-agent.js +98 -13
  129. package/dist/lib/signing/agent-resolver/select-agent.mjs +95 -13
  130. package/dist/lib/signing/brand-jwks.d.mts +29 -75
  131. package/dist/lib/signing/brand-jwks.d.ts +29 -75
  132. package/dist/lib/signing/brand-jwks.js +120 -182
  133. package/dist/lib/signing/brand-jwks.mjs +120 -182
  134. package/dist/lib/signing/errors.d.mts +7 -3
  135. package/dist/lib/signing/errors.d.ts +7 -3
  136. package/dist/lib/signing/errors.js +7 -2
  137. package/dist/lib/signing/errors.mjs +7 -2
  138. package/dist/lib/signing/jwks-https.d.mts +7 -0
  139. package/dist/lib/signing/jwks-https.d.ts +7 -0
  140. package/dist/lib/signing/jwks-https.js +31 -8
  141. package/dist/lib/signing/jwks-https.mjs +31 -8
  142. package/dist/lib/signing/jwks.d.mts +8 -0
  143. package/dist/lib/signing/jwks.d.ts +8 -0
  144. package/dist/lib/signing/middleware.js +2 -1
  145. package/dist/lib/signing/middleware.mjs +2 -1
  146. package/dist/lib/signing/publisher-pins.d.mts +11 -0
  147. package/dist/lib/signing/publisher-pins.d.ts +11 -0
  148. package/dist/lib/signing/publisher-pins.js +125 -0
  149. package/dist/lib/signing/publisher-pins.mjs +101 -0
  150. package/dist/lib/signing/server.d.mts +1 -0
  151. package/dist/lib/signing/server.d.ts +1 -0
  152. package/dist/lib/signing/types.d.mts +5 -0
  153. package/dist/lib/signing/types.d.ts +5 -0
  154. package/dist/lib/signing/verifier.js +50 -5
  155. package/dist/lib/signing/verifier.mjs +50 -5
  156. package/dist/lib/signing/webhook-verifier.d.mts +7 -2
  157. package/dist/lib/signing/webhook-verifier.d.ts +7 -2
  158. package/dist/lib/signing/webhook-verifier.js +42 -2
  159. package/dist/lib/signing/webhook-verifier.mjs +42 -2
  160. package/dist/lib/testing/storyboard/account-policy.d.mts +2 -0
  161. package/dist/lib/testing/storyboard/account-policy.d.ts +2 -0
  162. package/dist/lib/testing/storyboard/account-policy.js +35 -0
  163. package/dist/lib/testing/storyboard/account-policy.mjs +11 -0
  164. package/dist/lib/testing/storyboard/context.js +6 -0
  165. package/dist/lib/testing/storyboard/context.mjs +6 -0
  166. package/dist/lib/testing/storyboard/request-builder.js +12 -2
  167. package/dist/lib/testing/storyboard/request-builder.mjs +12 -2
  168. package/dist/lib/testing/storyboard/runner.js +3 -2
  169. package/dist/lib/testing/storyboard/runner.mjs +3 -2
  170. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  171. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  172. package/dist/lib/types/accept-proposal.d.ts +19 -1
  173. package/dist/lib/types/buy-products.d.ts +19 -1
  174. package/dist/lib/types/check-governance.d.ts +19 -1
  175. package/dist/lib/types/comply-test-controller.d.ts +19 -1
  176. package/dist/lib/types/control-media-buy.d.ts +19 -1
  177. package/dist/lib/types/core.generated.d.mts +14 -1
  178. package/dist/lib/types/core.generated.d.ts +14 -1
  179. package/dist/lib/types/create-media-buy.d.ts +14 -1
  180. package/dist/lib/types/get-media-buys.d.ts +14 -1
  181. package/dist/lib/types/get-products.d.ts +19 -1
  182. package/dist/lib/types/list-products.d.ts +19 -1
  183. package/dist/lib/types/refine-proposals.d.ts +19 -1
  184. package/dist/lib/types/request-proposals.d.ts +19 -1
  185. package/dist/lib/types/schemas.generated.d.ts +12 -3
  186. package/dist/lib/types/schemas.generated.js +4 -1
  187. package/dist/lib/types/schemas.generated.mjs +4 -1
  188. package/dist/lib/types/tools.generated.d.mts +14 -1
  189. package/dist/lib/types/tools.generated.d.ts +14 -1
  190. package/dist/lib/types/update-media-buy.d.ts +14 -1
  191. package/dist/lib/version.d.mts +3 -3
  192. package/dist/lib/version.d.ts +3 -3
  193. package/dist/lib/version.js +3 -3
  194. package/dist/lib/version.mjs +3 -3
  195. package/dist/lib/webhooks/index.d.mts +24 -0
  196. package/dist/lib/webhooks/index.d.ts +24 -0
  197. package/dist/lib/webhooks/index.js +50 -24
  198. package/dist/lib/webhooks/index.mjs +49 -24
  199. package/dist/lib/wholesale-feed-sync/index.d.mts +2 -0
  200. package/dist/lib/wholesale-feed-sync/index.d.ts +2 -0
  201. package/dist/lib/wholesale-feed-sync/index.js +7 -0
  202. package/dist/lib/wholesale-feed-sync/index.mjs +4 -0
  203. package/dist/lib/wholesale-feed-sync/mirror.d.mts +97 -0
  204. package/dist/lib/wholesale-feed-sync/mirror.d.ts +97 -0
  205. package/dist/lib/wholesale-feed-sync/mirror.js +350 -0
  206. package/dist/lib/wholesale-feed-sync/mirror.mjs +322 -0
  207. package/dist/lib/wholesale-feed-sync/sync.d.mts +13 -29
  208. package/dist/lib/wholesale-feed-sync/sync.d.ts +13 -29
  209. package/dist/lib/wholesale-feed-sync/sync.js +208 -281
  210. package/dist/lib/wholesale-feed-sync/sync.mjs +213 -281
  211. package/dist/lib/wholesale-feed-sync/types.d.mts +4 -3
  212. package/dist/lib/wholesale-feed-sync/types.d.ts +4 -3
  213. package/docs/README.md +6 -0
  214. package/docs/TYPE-SUMMARY.md +2 -2
  215. package/docs/guides/BUILD-AN-AGENT.md +2 -2
  216. package/docs/guides/BUYER-QUICKSTART-3.2.md +2 -0
  217. package/docs/guides/BUYER-STORAGE.md +3 -0
  218. package/docs/guides/FIRST-CALL-TO-A-SELLER.md +106 -0
  219. package/docs/guides/SIGNING-GUIDE.md +16 -7
  220. package/docs/guides/account-resolution.md +132 -10
  221. package/docs/llms.txt +3 -2
  222. package/docs/migration-14.0-to-14.1.md +85 -0
  223. package/docs/migration-14.x-rc-worksheet.md +4 -4
  224. package/docs/migration-4.x-to-5.x.md +1 -0
  225. package/docs/migration-agent-resolution-3.3.md +125 -0
  226. package/docs/recipes/verifying-inbound-webhooks.md +60 -15
  227. package/package.json +3 -2
  228. package/skills/adcp-brand.previous/SKILL.md +0 -200
  229. package/skills/adcp-creative.previous/SKILL.md +0 -305
  230. package/skills/adcp-governance.previous/SKILL.md +0 -566
  231. package/skills/adcp-measurement.previous/SKILL.md +0 -136
  232. package/skills/adcp-media-buy.previous/SKILL.md +0 -556
  233. package/skills/adcp-si.previous/SKILL.md +0 -206
  234. package/skills/adcp-signals.previous/SKILL.md +0 -204
@@ -1,556 +0,0 @@
1
- ---
2
- name: adcp-media-buy
3
- description: Execute AdCP Media Buy Protocol operations with sales agents - discover advertising products, create and manage campaigns, sync creatives, and track delivery. Use when users want to buy advertising, create media buys, interact with ad sales agents, or test advertising APIs.
4
- ---
5
-
6
- # AdCP Media Buy Protocol
7
-
8
- This skill enables you to execute the AdCP Media Buy Protocol with sales agents. Use the standard MCP tools (`get_products`, `create_media_buy`, `sync_creatives`, etc.) exposed by the connected agent.
9
-
10
- > **Buyer-side basics** — idempotency replay, `oneOf` variants, async `status:'submitted'` polling, error recovery from `adcp_error.issues[]` — live in `skills/call-adcp-agent/SKILL.md`. This skill covers per-task semantics only.
11
-
12
- ## Overview
13
-
14
- > **3.2 targeting-aware discovery:** These fields are available only when the
15
- > seller serves AdCP 3.2+ and the installed SDK exposes the 3.2 schema. Check
16
- > `get_adcp_capabilities.adcp.supported_versions`, pin the selected release in
17
- > `adcp_version`, and validate the echoed served release before sending them.
18
- > A missing release-precision declaration, a 3.1-or-earlier result, or a
19
- > major-only declaration is not evidence of support: omit the 3.2 fields and use
20
- > legacy targeting filters or explicit brief prose. Do not probe by sending
21
- > unknown fields because a legacy open schema may accept and ignore them. The public
22
- > training agent serves this flow at `adcp_version: "3.2"`.
23
-
24
- The Media Buy Protocol provides these common standardized tasks:
25
-
26
- | Task | Purpose | Response Time |
27
- |------|---------|---------------|
28
- | `list_products` | Read matching offers without seller curation | ~1-5s |
29
- | `request_proposals` | Request seller-authored draft plans | ~60s or async |
30
- | `refine_proposals` | Revise drafts or finalize unchanged terms into inventory holds | ~60s or async |
31
- | `decline_proposals` | Record terminal buyer disposition | ~1-5s |
32
- | `accept_proposal` | Accept a finalized proposal into a MediaBuy | Minutes-Days |
33
- | `get_products` | Use the 3.x compatibility facade for discovery and proposals | ~60s |
34
- | `get_adcp_capabilities` | See agent capabilities, supported protocols, and publisher properties | ~1s |
35
- | `create_media_buy` | Create direct buys or use the 3.x proposal adapter | Minutes-Days |
36
- | `update_media_buy` | Modify campaigns | Minutes-Days |
37
- | `get_media_buys` | Retrieve campaign state and status | ~1-5s |
38
- | `sync_creatives` | Upload creative assets | Minutes-Days |
39
- | `sync_catalogs` | Sync product feeds and catalogs | Minutes-Days |
40
- | `list_creatives` | Query creative library | ~1s |
41
- | `get_media_buy_delivery` | Get performance data | ~60s |
42
- | `provide_performance_feedback` | Share outcomes with publishers | ~1-5s |
43
-
44
- ## Typical Workflow
45
-
46
- 1. **Discover products**: use `list_products`, or `request_proposals` with a brief
47
- 2. **Verify the offer**: inspect formats, pricing, forecast, `overlay_support`, and any `targeting_resolution`
48
- 3. **Negotiate and hold**: revise a draft as needed, then finalize it without changing terms
49
- 4. **Accept or decline**: call `accept_proposal` for the held snapshot or `decline_proposals` when the buyer stops pursuing it
50
- 5. **Upload creatives**: use `sync_creatives` to add creative assets
51
- 6. **Monitor delivery**: use `get_media_buy_delivery` to track performance
52
-
53
- ---
54
-
55
- ## Canonical formats (AdCP 3.2)
56
-
57
- Products carry `format_options[]`: a list of `ProductFormatDeclaration` entries describing the creative shapes the product accepts. Each declaration carries:
58
-
59
- - `format_kind` — one of the 15 canonicals: `image`, `html5`, `display_tag`, `image_carousel`, `video_hosted`, `video_vast`, `audio_hosted`, `audio_vast`, `audio_daast`, `sponsored_placement`, `native_in_feed`, `responsive_creative`, `agent_placement`, `seller_rendered_stateful_display`, or `coordinated_placements`; use `custom` only with `format_shape` and `format_schema`
60
- - `params` — per-canonical parameters narrowing the format (dimensions, durations, codecs, char limits, CTA enums)
61
- - Optional `format_option_id` — disambiguates product options and identifies publisher-catalog declarations when paired with `publisher_domain`
62
- - Optional `v1_format_ref: [{agent_url, id}]` — array linking this v2 declaration to one or more v1 named formats (for dual emission during the v1↔v2 migration). Multi-size declarations should carry one ref per size
63
- - Optional `seller_preference: "preferred" | "accepted" | "discouraged"` — soft routing hint when a multi-format product has several options at the same price
64
-
65
- **Multi-format products.** A flexible publisher slot is one product with N format_options entries — e.g., Pinnacle Media's homepage accepts image OR html5 OR display_tag at multiple sizes via three format_options, one per type. Buyer picks the creative type they ship.
66
-
67
- **Size flexibility.** Display canonicals (image / html5 / display_tag) declare size in one of three modes: fixed (`width`+`height`), multi-size (`sizes: [{w,h}]` — mirrors OpenRTB `banner.format[]`), or responsive (`min_width`/`max_width`/`min_height`/`max_height`). Modes are mutually exclusive.
68
-
69
- **Discovering publisher catalogs.** Call `GET https://agenticadvertising.org/api/registry/publisher?domain=<publisher_domain>` for publisher-origin → AgenticAdvertising.org community-catalog → fail-closed resolution and provenance. Add `&include=placements` for provenance-labeled placement summaries with resolved canonical format options. The lookup's top-level `formats[]` remains a lossy display summary; fetch the returned raw registry or hosting URL when you need custom schema fields or other omitted declaration fields. Do not infer publisher authority from a seller's product catalog. Seller-specific deliverability comes from that seller's `Product.format_options[]`.
70
-
71
- **Conversion tracking lives elsewhere.** Pixel-firing, conversion events, and attribution belong on `sync_event_sources` / `event_log` (campaign-scoped), NOT on creative format declarations. Sending `pixel_id` in `platform_extensions` on a format is a category error.
72
-
73
- **Error codes specific to canonical formats.** `FORMAT_PROJECTION_FAILED`, `FORMAT_DECLARATION_DIVERGENT`, `FORMAT_DECLARATION_V1_AMBIGUOUS`, `FORMAT_CAPABILITY_UNRESOLVED`, `FORMAT_DECLARATION_V1_LOSSY_MULTI_SIZE` — all non-fatal advisories surfaced via the response `errors[]` array. See `static/schemas/source/enums/error-code.json` for full recovery semantics.
74
-
75
- See `docs/creative/canonical-formats.mdx` for the full vocabulary, narrowing rules, and worked examples.
76
-
77
- ---
78
-
79
- ## Task Reference
80
-
81
- ### get_products
82
-
83
- Discover buyable product configurations. Choose each request surface by what it
84
- means:
85
-
86
- - `brief`: goals, context, semantic audience intent, preferences, and
87
- requirements without a structured representation.
88
- - `filters`: hard offer filters such as metadata, dates, budget, availability,
89
- commercial fit, and reporting support. They decide which products may be
90
- returned and apply in `brief`, `wholesale`, and `refine`.
91
- - `targeting_overlay`: exact delivery constraints known now. Use this for
92
- countries, ages, placements, properties, collections, and other typed
93
- targeting so availability, price, and forecast already reflect them.
94
- - `required_overlay_support`: targeting dimensions whose values will be chosen
95
- independently on packages later. This requests capability, not one product
96
- per value.
97
-
98
- Prefer a structured field whenever one exists. It uses fewer tokens, is applied
99
- by code, and avoids lossy inference. Explicit hard targeting written only in a
100
- brief is still binding; when a seller extracts a structured predicate from
101
- prose that materially affects eligibility, pricing, or forecasting, require one response-level confirmation in
102
- `GetProductsResponse.targeting_resolution.brief_targeting`.
103
-
104
- **Request:**
105
-
106
- ```json
107
- {
108
- "buying_mode": "brief",
109
- "brief": "Premium video for a developer-tool launch; prioritize engineering and open-source contexts",
110
- "brand": {
111
- "domain": "example.com"
112
- },
113
- "filters": {
114
- "channels": ["olv", "ctv"],
115
- "delivery_type": "guaranteed",
116
- "pricing_currencies": ["USD"]
117
- },
118
- "targeting_overlay": {
119
- "geo_countries": ["US"],
120
- "demographics": {
121
- "age": { "min": 18, "max": 44, "include_unknown": false }
122
- }
123
- },
124
- "required_overlay_support": {
125
- "geo_metros": { "systems": ["nielsen_dma"] }
126
- }
127
- }
128
- ```
129
-
130
- **Key fields:**
131
- - `buying_mode` (string): `"brief"`, `"wholesale"`, or `"refine"`
132
- - `brief` (string): Natural-language curation input; hard statements remain requirements
133
- - `brand` (object): Brand identity - `{ "domain": "acmecorp.com" }`
134
- - `filters` (object, optional): Hard offer filters that decide which products may be returned
135
- - `targeting_overlay` (object, optional): Concrete targeting applied during discovery and carried into purchase
136
- - `required_overlay_support` (object, optional): Dimensions the product must allow packages to select later
137
-
138
- **Response contains:**
139
-
140
- - `products`: Array of matching products with `product_id`, `name`, `description`, `pricing_options`
141
- - Each product includes canonical `format_options[]` and targeting capabilities
142
- - `overlay_support`: binding product-scoped dimensions selectable later
143
- - `targeting_resolution.modifications`: sparse differences from the requested structured overlay; selecting the product accepts them
144
- - Response `targeting_resolution.brief_targeting`: the seller's single structured interpretation of hard targeting inferred from prose
145
- - No `targeting_resolution` means exact acceptance of the structured overlay only; it does not prove how prose was interpreted
146
-
147
- Treat `product_id` as the opaque identity of this configured offer. Keep it
148
- within the same discovery/refinement context and purchase it before
149
- `expires_at`; do not assume it is a permanent cross-session ID.
150
-
151
- ---
152
-
153
- ### create_media_buy
154
-
155
- Create an advertising campaign from selected products.
156
-
157
- **Request:**
158
-
159
- ```json
160
- {
161
- "brand": {
162
- "domain": "acme.com"
163
- },
164
- "packages": [
165
- {
166
- "product_id": "prod_configured_us_18_44",
167
- "pricing_option_id": "cpm-standard",
168
- "budget": 10000,
169
- "targeting_overlay": {
170
- "geo_metros": [
171
- { "system": "nielsen_dma", "values": ["501"] }
172
- ]
173
- }
174
- }
175
- ],
176
- "start_time": "asap",
177
- "end_time": "2024-03-31T23:59:59Z"
178
- }
179
- ```
180
-
181
- **Key fields:**
182
-
183
- - `brand` (object, required): Brand identity - `{ "domain": "acmecorp.com" }`
184
- - `packages` (array, required): Products to purchase, each with:
185
- - `product_id`: From `get_products` response
186
- - `pricing_option_id`: From product's `pricing_options`
187
- - `budget`: Amount in dollars
188
- - `bid_price`: Required for auction pricing
189
- - `targeting_overlay`: Package targeting permitted by the selected product's `overlay_support`; it composes with targeting already bound during discovery and must not silently broaden it
190
- - `creative_ids` or `creatives`: Creative assignments
191
- - `start_time` (string, required): `"asap"` or an ISO 8601 datetime (e.g., `"2024-06-01T00:00:00Z"`)
192
- - `end_time` (string, required): ISO 8601 datetime
193
-
194
- **Response contains:**
195
-
196
- - `media_buy_id`: The created campaign identifier
197
- - `status`: Current lifecycle state — `pending_creatives` (no creatives assigned yet), `pending_start` (waiting for flight date), or `active` (serving immediately)
198
- - `packages`: Created packages with their IDs
199
-
200
- ---
201
-
202
- ### update_media_buy
203
-
204
- Modify an existing campaign.
205
-
206
- **Request:**
207
-
208
- ```json
209
- {
210
- "idempotency_key": "update-mb-abc123-2024-04-pause",
211
- "media_buy_id": "mb_abc123",
212
- "updates": {
213
- "budget_change": 5000,
214
- "end_time": "2024-04-30T23:59:59Z",
215
- "status": "paused"
216
- }
217
- }
218
- ```
219
-
220
- **Key fields:**
221
-
222
- - `media_buy_id` (string, required): The campaign to update
223
- - `updates` (object): Changes to apply - budget_change, end_time, status, targeting, etc.
224
-
225
- ---
226
-
227
- ### sync_catalogs
228
-
229
- Sync product catalogs, store locations, job postings, and other structured feeds to a seller account. Supports inline items or external feed URLs. When called without catalogs, returns existing catalogs (discovery mode).
230
-
231
- **Request:**
232
-
233
- ```json
234
- {
235
- "account": {
236
- "account_id": "acct_123"
237
- },
238
- "catalogs": [
239
- {
240
- "catalog_id": "winter-collection",
241
- "name": "Winter 2025 Collection",
242
- "type": "product",
243
- "items": [
244
- {
245
- "id": "sku-001",
246
- "name": "Wool Coat",
247
- "price": 299.99,
248
- "currency": "USD"
249
- }
250
- ]
251
- }
252
- ]
253
- }
254
- ```
255
-
256
- **Key fields:**
257
-
258
- - `account` (object, required): Account that owns the catalogs — `{ account_id }`
259
- - `catalogs` (array, optional): Catalog objects to sync. Omit for discovery mode.
260
- - `type` (string, required): `offering`, `product`, `inventory`, `store`, `promotion`, `hotel`, `flight`, `job`, `vehicle`, `real_estate`, `education`, `destination`, `app`
261
- - `items` (array): Inline catalog data (mutually exclusive with `url`)
262
- - `url` (string): External feed URL (mutually exclusive with `items`)
263
- - `feed_format` (string): `google_merchant_center`, `facebook_catalog`, `shopify`, `linkedin_jobs`, `custom`
264
- - `delete_missing` (boolean, optional): Remove catalogs not in this sync (use with caution)
265
- - `dry_run` (boolean, optional): Preview changes without applying
266
-
267
- ---
268
-
269
- ### sync_creatives
270
-
271
- Upload and manage creative assets.
272
-
273
- **Request:**
274
-
275
- ```json
276
- {
277
- "creatives": [
278
- {
279
- "creative_id": "hero_video_30s",
280
- "name": "Brand Hero Video",
281
- "format_kind": "video_hosted",
282
- "format_option_ref": {
283
- "scope": "product",
284
- "format_option_id": "video_30s"
285
- },
286
- "assets": {
287
- "video": {
288
- "url": "https://cdn.example.com/hero.mp4",
289
- "width": 1920,
290
- "height": 1080,
291
- "duration_ms": 30000
292
- }
293
- }
294
- }
295
- ],
296
- "assignments": {
297
- "hero_video_30s": ["pkg_001", "pkg_002"]
298
- }
299
- }
300
- ```
301
-
302
- **Key fields:**
303
-
304
- - `creatives` (array, required): Creative assets to sync
305
- - `creative_id`: Your unique identifier
306
- - `format_kind`: Canonical format accepted by the selected product
307
- - `format_option_ref`: Product or publisher option when `format_kind` alone is ambiguous
308
- - `assets`: Asset content (video, image, html, etc.)
309
- - `assignments` (object, optional): Map creative_id to package IDs
310
- - `dry_run` (boolean): Preview changes without applying
311
- - `delete_missing` (boolean): Archive creatives not in this sync
312
-
313
- ---
314
-
315
- ### list_creatives
316
-
317
- Query the creative library with filtering.
318
-
319
- **Request:**
320
-
321
- ```json
322
- {
323
- "filters": {
324
- "status": ["active"]
325
- },
326
- "limit": 20
327
- }
328
- ```
329
-
330
- ---
331
-
332
- ### get_media_buys
333
-
334
- Retrieve media buy state: status, valid_actions, creative approvals, pending formats, and optional delivery snapshots or revision history.
335
-
336
- **Request:**
337
-
338
- ```json
339
- {
340
- "media_buy_ids": ["mb_abc123"],
341
- "include_snapshot": true,
342
- "include_history": 5
343
- }
344
- ```
345
-
346
- **Key fields:**
347
-
348
- - `media_buy_ids` (array, optional): Specific media buy IDs to retrieve
349
- - `account` (object, optional): Filter to a specific account
350
- - `status_filter` (string or array, optional): Filter by status — `pending_creatives`, `pending_start`, `active`, `paused`, `completed`, `rejected`, `canceled`. Defaults to `["active"]` when no IDs provided.
351
- - `include_snapshot` (boolean, optional): Include near-real-time delivery snapshots per package
352
- - `include_history` (integer, optional): Include the last N revision history entries per media buy
353
-
354
- **Response contains:**
355
-
356
- - `media_buys`: Array with `media_buy_id`, `status`, `valid_actions`, `packages`, creative approval state
357
- - Optional `snapshot` per package (impressions, spend, pacing)
358
- - Optional `history` entries (revision, timestamp, actor, action, summary)
359
-
360
- #### Relationship-scoped indicators
361
-
362
- Before querying indicators, read `get_adcp_capabilities.media_buy.supported_indicator_types`. Indicators may appear at three levels:
363
-
364
- - buy: `get_media_buys.media_buys[]` (`budget_constrained`)
365
- - package: `packages[]` (`creative_diversity_low`, `audience_saturation`, `inventory_shortfall_forecast`, `pacing_risk`, `budget_constrained`)
366
- - assignment: `creative_approvals[]` and the matching `list_creatives.assignments.assigned_packages[]` (`creative_fatigue`, `creative_quality_opportunity`)
367
-
368
- `indicators` omitted means unknown. A present array requires `indicator_types_evaluated` and `indicators_as_of`; empty means clear only for those named types and coverage. `scope` narrows an assertion; `indicators_evaluated_scope` declares partial publisher/placement coverage. Creative-library sellers advertise `list_creatives` in `relationship_notifications.projection_tasks`; those sellers include `media_buy_id`, approval state, and any `approval_scopes` on every reverse assignment row. Every seller repairs through `get_media_buys`.
369
-
370
- For portfolio discovery, call `list_creatives` with `filters.indicator_types`, `include_assignments: true`, `assignment_projection: "matching"`, a bounded `assignment_limit`, `fields: ["creative_id", "assignments"]`, and cursor pagination. The seller still returns the released required creative envelope; `fields` limits optional payload. Check `assignments_truncated`; use `get_media_buys` for complete repair. Key evaluated state by seller + `media_buy_id` + `package_id` + `creative_id` + type + normalized placement scope.
371
-
372
- Never clear from filtered disappearance or failure. Reread directly without `indicator_types`; clear only a named evaluated type in covered scope from a strictly newer snapshot. Equal-timestamp conflicts are no-ops. Direct assignment deletion retires its keys.
373
-
374
- Indicator polling through `get_media_buys` does not require webhooks. Sellers may additionally declare `indicators.changed` and may independently declare `creative.assignment_changed`; creative-library sellers may advertise the bounded `list_creatives` reverse projection. Subscriptions are prospective, so establish a complete `get_media_buys` baseline after activation by enumerating known IDs or requesting every media-buy status and exhausting pagination, without `indicator_types`. Verify, dedupe, and reread `get_media_buys`; webhook payloads are invalidations, not state. Timestamp-only reevaluation does not fire, while material in-place creative updates invalidate prior assignment evaluations. Root `warnings[]` on completed `buy_products`, `accept_proposal`, or `control_media_buy` calls are immediate receipts; `create_media_buy` and `update_media_buy` facades mirror them. Inventory and pacing warning codes require the matching advertised durable indicator type.
375
-
376
- ---
377
-
378
- ### provide_performance_feedback
379
-
380
- Submit one compact optimizer-ready assertion. Measurement agents call a buyer-controlled orchestrator gateway; the orchestrator authenticates and normalizes provider output, then calls each seller under the buyer's identity. Measurement providers do not receive seller-account grants.
381
-
382
- **Request:**
383
-
384
- ```json
385
- {
386
- "idempotency_key": "feedback-mb-abc123-2025-01-final",
387
- "media_buy_id": "mb_abc123",
388
- "measurement_period": {
389
- "start": "2025-01-01T00:00:00Z",
390
- "end": "2025-01-31T23:59:59Z"
391
- },
392
- "performance_index": 1.2,
393
- "baseline": "campaign_target",
394
- "metric": {
395
- "scope": "standard",
396
- "metric_id": "conversions"
397
- },
398
- "producer": { "domain": "pinnacle-measurement.example" },
399
- "methodology": "deterministic_attribution",
400
- "final": true
401
- }
402
- ```
403
-
404
- **Key fields:**
405
-
406
- - `idempotency_key` (string, required): Stable key for this logical assertion; retries reuse the same key and payload
407
- - `media_buy_id` (string, required): Publisher's media buy identifier
408
- - `measurement_period` (object, required): Time period with `start` and `end` (ISO 8601)
409
- - `performance_index` (number, required): Normalized score — 1.0 equals `baseline`, lower underperforms, higher outperforms. Use observed/baseline for higher-is-better ratios and baseline/observed for lower-is-better ratios such as CPA.
410
- - `baseline` (string, required for compact-contract producers): `campaign_target`, `control_group`, `seller_history`, `buyer_portfolio`, `market_benchmark`, or `other`
411
- - `package_id` (string, optional): Specific package for package-level feedback
412
- - `creative_id` (string, optional): Specific creative for creative-level feedback
413
- - `metric` (object, optional): Standard/vendor metric identity; preferred over deprecated `metric_type`
414
- - `producer` (BrandRef, conditionally required): Measurement provider that produced the analysis; required when `methodology` or `methodology_version` is present. The orchestrator verifies it against provider identity before preserving it on seller submissions
415
- - `methodology`, `methodology_version` (string, optional): Provider-scoped open identifiers
416
- - `study_ref` (string, optional): Opaque correlation reference, never an experiment-execution instruction
417
- - `evidence` / `evidence_ref` (optional): Small inline summary and provider-hosted detail
418
- - `final`, `as_of`, `supersedes_feedback_id` (optional): Maturation and immutable revision fields
419
-
420
- Sellers declaring `media_buy.performance_feedback` also list `measurement.core` in top-level `experimental_features` and return `feedback_id`. When `reports_application_status` is true, inspect `application_status`: `accepted` is not an application claim; `applied` means the signal entered optimizer inputs; `not_applied` includes a reason. Do not confuse this with the response envelope's task `status`.
421
-
422
- Do not send raw measurement datasets through this task or through `report_usage`. In the first gateway tier the provider reads delivery through the orchestrator's `get_media_buy_delivery` task and returns only the compact decision signal through `provide_performance_feedback`.
423
-
424
- ---
425
-
426
- ### get_media_buy_delivery
427
-
428
- Retrieve performance metrics for a campaign.
429
-
430
- **Request:**
431
-
432
- ```json
433
- {
434
- "media_buy_id": "mb_abc123",
435
- "granularity": "daily",
436
- "date_range": {
437
- "start": "2024-01-01",
438
- "end": "2024-01-31"
439
- }
440
- }
441
- ```
442
-
443
- **Response contains:**
444
-
445
- - `delivery`: Aggregated metrics (impressions, spend, clicks, etc.)
446
- - `by_package`: Breakdown by package
447
- - `timeseries`: Data points over time if granularity specified
448
-
449
- ---
450
-
451
- ## Key Concepts
452
-
453
- ### Brand identity
454
-
455
- Brand context is provided by domain reference:
456
-
457
- ```json
458
- {
459
- "brand": {
460
- "domain": "acmecorp.com"
461
- }
462
- }
463
- ```
464
-
465
- The agent resolves the domain to retrieve the brand's identity (name, colors, guidelines, etc.) from its `brand.json` file.
466
-
467
- ### Canonical format options
468
-
469
- Products declare their closed accepted set directly:
470
-
471
- ```json
472
- {
473
- "format_option_id": "display_image_300x250",
474
- "format_kind": "image",
475
- "params": { "width": 300, "height": 250 }
476
- }
477
- ```
478
-
479
- Buyers select the option with `format_option_refs[]` on the package and submit a manifest using `format_kind` plus `format_option_ref`. Compound named format IDs are deprecated in 3.2.
480
-
481
- ### Pricing Options
482
-
483
- Products include `pricing_options` array. Each option has:
484
-
485
- - `pricing_option_id`: Use this in `create_media_buy`
486
- - `pricing_model`: "cpm", "cpm-auction", "flat-fee", etc.
487
- - `price`: Base price (for fixed pricing)
488
- - `floor`: Minimum bid (for auction)
489
-
490
- For auction pricing, include `bid_price` in your package.
491
-
492
- ### Asynchronous Operations
493
-
494
- Operations like `create_media_buy` and `sync_creatives` may require human approval. The response includes:
495
-
496
- - `status: "pending"` - Operation awaiting approval
497
- - `task_id` - For tracking async progress
498
-
499
- Poll or use webhooks to check completion status.
500
-
501
- ---
502
-
503
- ## Error Handling
504
-
505
- Common error patterns:
506
-
507
- - **400 Bad Request**: Invalid parameters - check required fields
508
- - **401 Unauthorized**: Invalid or missing authentication token
509
- - **404 Not Found**: Invalid product_id, media_buy_id, or creative_id
510
- - **422 Validation Error**: Schema validation failure - check field types
511
-
512
- Error responses include:
513
-
514
- ```json
515
- {
516
- "errors": [
517
- {
518
- "code": "VALIDATION_ERROR",
519
- "message": "budget must be greater than 0",
520
- "field": "packages[0].budget"
521
- }
522
- ]
523
- }
524
- ```
525
-
526
- ---
527
-
528
- ## Testing Mode
529
-
530
- Use **sandbox mode** for testing without real transactions. Sandbox is account-level — once a request references a sandbox account, the entire request is treated as sandbox with no real platform calls or spend.
531
-
532
- Check whether the agent supports sandbox via `get_adcp_capabilities`:
533
-
534
- ```json
535
- {
536
- "account": {
537
- "sandbox": true
538
- }
539
- }
540
- ```
541
-
542
- To enter sandbox mode, set `sandbox: true` on the account reference:
543
-
544
- ```json
545
- {
546
- "account": {
547
- "brand": { "domain": "acme-corp.com" },
548
- "operator": "acme-corp.com",
549
- "sandbox": true
550
- }
551
- }
552
- ```
553
-
554
- Some sync tasks (`sync_creatives`, `sync_catalogs`) also support a `dry_run` parameter that previews changes without applying them. This is orthogonal to sandbox — you can use `dry_run` in both sandbox and production accounts.
555
-
556
- See [Sandbox mode](https://docs.adcontextprotocol.org/docs/media-buy/advanced-topics/sandbox) for full details.