@adcp/sdk 16.0.0-beta.8 → 16.0.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 (371) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +5 -2
  3. package/bin/adcp.js +10 -13
  4. package/dist/lib/core/AgentClient.d.mts +8 -5
  5. package/dist/lib/core/AgentClient.d.ts +8 -5
  6. package/dist/lib/core/AgentClient.js +9 -4
  7. package/dist/lib/core/AgentClient.mjs +9 -4
  8. package/dist/lib/core/SingleAgentClient.d.mts +19 -112
  9. package/dist/lib/core/SingleAgentClient.d.ts +19 -112
  10. package/dist/lib/core/SingleAgentClient.js +270 -252
  11. package/dist/lib/core/SingleAgentClient.mjs +275 -253
  12. package/dist/lib/core/TaskExecutor.d.mts +1 -16
  13. package/dist/lib/core/TaskExecutor.d.ts +1 -16
  14. package/dist/lib/core/TaskExecutor.js +34 -51
  15. package/dist/lib/core/TaskExecutor.mjs +12 -29
  16. package/dist/lib/core/product-cache.d.mts +3 -1
  17. package/dist/lib/core/product-cache.d.ts +3 -1
  18. package/dist/lib/core/product-cache.js +2 -1
  19. package/dist/lib/core/product-cache.mjs +2 -1
  20. package/dist/lib/errors/index.d.mts +2 -8
  21. package/dist/lib/errors/index.d.ts +2 -8
  22. package/dist/lib/errors/index.js +4 -4
  23. package/dist/lib/errors/index.mjs +4 -4
  24. package/dist/lib/identity-3.3/revocation.js +6 -7
  25. package/dist/lib/identity-3.3/revocation.mjs +6 -7
  26. package/dist/lib/index.d.mts +4 -4
  27. package/dist/lib/index.d.ts +4 -4
  28. package/dist/lib/index.js +0 -14
  29. package/dist/lib/index.mjs +0 -14
  30. package/dist/lib/media-buy/compatibility.d.mts +1 -1
  31. package/dist/lib/media-buy/compatibility.d.ts +1 -1
  32. package/dist/lib/media-buy/compatibility.js +26 -45
  33. package/dist/lib/media-buy/compatibility.mjs +26 -45
  34. package/dist/lib/media-buy/legacy-purchase-continuation.d.mts +2 -2
  35. package/dist/lib/media-buy/legacy-purchase-continuation.d.ts +2 -2
  36. package/dist/lib/protocols/index.js +14 -22
  37. package/dist/lib/protocols/index.mjs +5 -13
  38. package/dist/lib/registry/types.d.mts +3 -2
  39. package/dist/lib/registry/types.d.ts +3 -2
  40. package/dist/lib/registry/types.generated.d.mts +51 -11
  41. package/dist/lib/registry/types.generated.d.ts +51 -11
  42. package/dist/lib/reporting/source/conformance.d.mts +8 -8
  43. package/dist/lib/reporting/source/conformance.d.ts +8 -8
  44. package/dist/lib/reporting/source/manifest.d.mts +27 -27
  45. package/dist/lib/reporting/source/manifest.d.ts +27 -27
  46. package/dist/lib/server/create-adcp-server.js +7 -1
  47. package/dist/lib/server/create-adcp-server.mjs +7 -1
  48. package/dist/lib/signing/crypto.d.mts +1 -1
  49. package/dist/lib/signing/crypto.d.ts +1 -1
  50. package/dist/lib/signing/crypto.js +2 -45
  51. package/dist/lib/signing/crypto.mjs +2 -46
  52. package/dist/lib/signing/web-bot-auth.d.mts +18 -10
  53. package/dist/lib/signing/web-bot-auth.d.ts +18 -10
  54. package/dist/lib/signing/web-bot-auth.js +29 -24
  55. package/dist/lib/signing/web-bot-auth.mjs +29 -24
  56. package/dist/lib/testing/compliance/comply.js +0 -8
  57. package/dist/lib/testing/compliance/comply.mjs +0 -8
  58. package/dist/lib/testing/compliance/storyboard-tracks.js +11 -0
  59. package/dist/lib/testing/compliance/storyboard-tracks.mjs +11 -0
  60. package/dist/lib/testing/index.d.mts +2 -0
  61. package/dist/lib/testing/index.d.ts +2 -0
  62. package/dist/lib/testing/index.js +5 -0
  63. package/dist/lib/testing/index.mjs +3 -0
  64. package/dist/lib/testing/scenarios/capabilities.d.mts +2 -2
  65. package/dist/lib/testing/scenarios/capabilities.d.ts +2 -2
  66. package/dist/lib/testing/scenarios/capabilities.js +8 -41
  67. package/dist/lib/testing/scenarios/capabilities.mjs +9 -42
  68. package/dist/lib/testing/storyboard/creative-build-probe.d.mts +34 -0
  69. package/dist/lib/testing/storyboard/creative-build-probe.d.ts +34 -0
  70. package/dist/lib/testing/storyboard/creative-build-probe.js +395 -0
  71. package/dist/lib/testing/storyboard/creative-build-probe.mjs +373 -0
  72. package/dist/lib/testing/storyboard/index.d.mts +2 -0
  73. package/dist/lib/testing/storyboard/index.d.ts +2 -0
  74. package/dist/lib/testing/storyboard/index.js +5 -0
  75. package/dist/lib/testing/storyboard/index.mjs +3 -0
  76. package/dist/lib/testing/storyboard/loader.js +12 -0
  77. package/dist/lib/testing/storyboard/loader.mjs +12 -0
  78. package/dist/lib/testing/storyboard/property-list-reference.d.mts +15 -0
  79. package/dist/lib/testing/storyboard/property-list-reference.d.ts +15 -0
  80. package/dist/lib/testing/storyboard/property-list-reference.js +514 -0
  81. package/dist/lib/testing/storyboard/property-list-reference.mjs +487 -0
  82. package/dist/lib/testing/storyboard/runner.js +318 -58
  83. package/dist/lib/testing/storyboard/runner.mjs +322 -58
  84. package/dist/lib/testing/storyboard/types.d.mts +38 -16
  85. package/dist/lib/testing/storyboard/types.d.ts +38 -16
  86. package/dist/lib/testing/storyboard/types.js +1 -0
  87. package/dist/lib/testing/storyboard/types.mjs +1 -0
  88. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  89. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  90. package/dist/lib/testing/storyboard/validations.js +64 -0
  91. package/dist/lib/testing/storyboard/validations.mjs +67 -1
  92. package/dist/lib/testing/types.d.mts +15 -1
  93. package/dist/lib/testing/types.d.ts +15 -1
  94. package/dist/lib/types/schemas.generated.d.ts +65 -65
  95. package/dist/lib/types/wellknown-schemas.generated.d.mts +21 -21
  96. package/dist/lib/types/wellknown-schemas.generated.d.ts +21 -21
  97. package/dist/lib/utils/adcp-version-config.js +6 -0
  98. package/dist/lib/utils/adcp-version-config.mjs +6 -0
  99. package/dist/lib/utils/capabilities.d.mts +7 -9
  100. package/dist/lib/utils/capabilities.d.ts +7 -9
  101. package/dist/lib/utils/capabilities.js +14 -28
  102. package/dist/lib/utils/capabilities.mjs +14 -27
  103. package/dist/lib/utils/creative-adapter.d.mts +15 -113
  104. package/dist/lib/utils/creative-adapter.d.ts +15 -113
  105. package/dist/lib/utils/creative-adapter.js +7 -106
  106. package/dist/lib/utils/creative-adapter.mjs +7 -102
  107. package/dist/lib/utils/format-renders.d.mts +20 -80
  108. package/dist/lib/utils/format-renders.d.ts +20 -80
  109. package/dist/lib/utils/format-renders.js +7 -67
  110. package/dist/lib/utils/format-renders.mjs +7 -66
  111. package/dist/lib/utils/index.d.mts +1 -2
  112. package/dist/lib/utils/index.d.ts +1 -2
  113. package/dist/lib/utils/index.js +0 -7
  114. package/dist/lib/utils/index.mjs +0 -6
  115. package/dist/lib/utils/preview-normalizer.d.mts +31 -80
  116. package/dist/lib/utils/preview-normalizer.d.ts +31 -80
  117. package/dist/lib/utils/preview-normalizer.js +5 -50
  118. package/dist/lib/utils/preview-normalizer.mjs +5 -49
  119. package/dist/lib/utils/pricing-adapter.d.mts +2 -36
  120. package/dist/lib/utils/pricing-adapter.d.ts +2 -36
  121. package/dist/lib/utils/pricing-adapter.js +0 -105
  122. package/dist/lib/utils/pricing-adapter.mjs +0 -100
  123. package/dist/lib/utils/request-normalizer.d.mts +1 -2
  124. package/dist/lib/utils/request-normalizer.d.ts +1 -2
  125. package/dist/lib/v2/projection/catalog.d.mts +4 -0
  126. package/dist/lib/v2/projection/catalog.d.ts +4 -0
  127. package/dist/lib/v2/projection/creative-delivery.d.mts +17 -9
  128. package/dist/lib/v2/projection/creative-delivery.d.ts +17 -9
  129. package/dist/lib/v2/projection/creative-delivery.js +78 -10
  130. package/dist/lib/v2/projection/creative-delivery.mjs +77 -10
  131. package/dist/lib/v2/projection/legacy-metadata.d.mts +12 -0
  132. package/dist/lib/v2/projection/legacy-metadata.d.ts +12 -0
  133. package/dist/lib/v2/projection/legacy-metadata.js +41 -1
  134. package/dist/lib/v2/projection/legacy-metadata.mjs +37 -1
  135. package/dist/lib/v2/projection/legacy-normalization.d.mts +1 -1
  136. package/dist/lib/v2/projection/legacy-normalization.d.ts +1 -1
  137. package/dist/lib/v2/projection/v1-to-v2.js +13 -0
  138. package/dist/lib/v2/projection/v1-to-v2.mjs +14 -0
  139. package/dist/lib/validation/client-hooks.d.mts +1 -4
  140. package/dist/lib/validation/client-hooks.d.ts +1 -4
  141. package/dist/lib/validation/get-products-request.d.mts +1 -1
  142. package/dist/lib/validation/get-products-request.d.ts +1 -1
  143. package/dist/lib/validation/schema-loader.js +6 -0
  144. package/dist/lib/validation/schema-loader.mjs +6 -0
  145. package/dist/lib/validation/schema-validator.js +1 -26
  146. package/dist/lib/validation/schema-validator.mjs +1 -26
  147. package/dist/lib/version.d.mts +5 -5
  148. package/dist/lib/version.d.ts +5 -5
  149. package/dist/lib/version.js +3 -5
  150. package/dist/lib/version.mjs +3 -5
  151. package/docs/TYPE-SUMMARY.md +2 -2
  152. package/docs/development/PROTOCOL_DIFFERENCES.md +1 -1
  153. package/docs/guides/CONFORMANCE.md +25 -0
  154. package/docs/guides/CREATIVE-BUILD-PROBE.md +156 -0
  155. package/docs/guides/CREATIVE-DELIVERY.md +63 -7
  156. package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +15 -18
  157. package/docs/guides/REPORTING-STABILITY.md +7 -7
  158. package/docs/guides/VALIDATE-YOUR-AGENT.md +5 -0
  159. package/docs/llms.txt +3 -3
  160. package/docs/migration-13-to-14.md +20 -16
  161. package/docs/migration-14.x-rc-worksheet.md +5 -5
  162. package/docs/migration-4.x-to-5.x.md +12 -7
  163. package/docs/migration-agent-identity-3.3.md +44 -19
  164. package/docs/migration-drop-adcp-2.md +25 -0
  165. package/docs/migration-reporting-storage-package.md +3 -3
  166. package/docs/releases/16.0.0.md +20 -0
  167. package/package.json +3 -18
  168. package/skills/call-adcp-agent/SKILL.md +23 -25
  169. package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.mts +0 -3
  170. package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts +0 -3
  171. package/dist/lib/adapters/legacy/v2-5/create_media_buy.js +0 -33
  172. package/dist/lib/adapters/legacy/v2-5/create_media_buy.mjs +0 -9
  173. package/dist/lib/adapters/legacy/v2-5/get_products.d.mts +0 -8
  174. package/dist/lib/adapters/legacy/v2-5/get_products.d.ts +0 -8
  175. package/dist/lib/adapters/legacy/v2-5/get_products.js +0 -33
  176. package/dist/lib/adapters/legacy/v2-5/get_products.mjs +0 -9
  177. package/dist/lib/adapters/legacy/v2-5/index.d.mts +0 -34
  178. package/dist/lib/adapters/legacy/v2-5/index.d.ts +0 -34
  179. package/dist/lib/adapters/legacy/v2-5/index.js +0 -50
  180. package/dist/lib/adapters/legacy/v2-5/index.mjs +0 -25
  181. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.mts +0 -8
  182. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts +0 -8
  183. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js +0 -33
  184. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.mjs +0 -9
  185. package/dist/lib/adapters/legacy/v2-5/preview_creative.d.mts +0 -3
  186. package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts +0 -3
  187. package/dist/lib/adapters/legacy/v2-5/preview_creative.js +0 -33
  188. package/dist/lib/adapters/legacy/v2-5/preview_creative.mjs +0 -9
  189. package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.mts +0 -11
  190. package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +0 -11
  191. package/dist/lib/adapters/legacy/v2-5/sync_creatives.js +0 -32
  192. package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs +0 -8
  193. package/dist/lib/adapters/legacy/v2-5/types.d.mts +0 -39
  194. package/dist/lib/adapters/legacy/v2-5/types.d.ts +0 -39
  195. package/dist/lib/adapters/legacy/v2-5/types.js +0 -16
  196. package/dist/lib/adapters/legacy/v2-5/types.mjs +0 -0
  197. package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.mts +0 -3
  198. package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts +0 -3
  199. package/dist/lib/adapters/legacy/v2-5/update_media_buy.js +0 -35
  200. package/dist/lib/adapters/legacy/v2-5/update_media_buy.mjs +0 -11
  201. package/dist/lib/schemas-data/v2.5/_provenance.json +0 -8
  202. package/dist/lib/schemas-data/v2.5/adagents.json +0 -494
  203. package/dist/lib/schemas-data/v2.5/core/activation-key.json +0 -50
  204. package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +0 -32
  205. package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +0 -21
  206. package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +0 -87
  207. package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +0 -21
  208. package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +0 -38
  209. package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +0 -21
  210. package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +0 -31
  211. package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +0 -21
  212. package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +0 -26
  213. package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +0 -87
  214. package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +0 -44
  215. package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +0 -71
  216. package/dist/lib/schemas-data/v2.5/core/async-response-data.json +0 -88
  217. package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +0 -33
  218. package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +0 -409
  219. package/dist/lib/schemas-data/v2.5/core/context.json +0 -8
  220. package/dist/lib/schemas-data/v2.5/core/creative-asset.json +0 -125
  221. package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +0 -31
  222. package/dist/lib/schemas-data/v2.5/core/creative-filters.json +0 -111
  223. package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +0 -72
  224. package/dist/lib/schemas-data/v2.5/core/creative-policy.json +0 -27
  225. package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +0 -171
  226. package/dist/lib/schemas-data/v2.5/core/deployment.json +0 -93
  227. package/dist/lib/schemas-data/v2.5/core/destination.json +0 -53
  228. package/dist/lib/schemas-data/v2.5/core/error.json +0 -40
  229. package/dist/lib/schemas-data/v2.5/core/ext.json +0 -8
  230. package/dist/lib/schemas-data/v2.5/core/format-id.json +0 -47
  231. package/dist/lib/schemas-data/v2.5/core/format.json +0 -324
  232. package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +0 -18
  233. package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +0 -152
  234. package/dist/lib/schemas-data/v2.5/core/measurement.json +0 -48
  235. package/dist/lib/schemas-data/v2.5/core/media-buy.json +0 -62
  236. package/dist/lib/schemas-data/v2.5/core/package.json +0 -72
  237. package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +0 -90
  238. package/dist/lib/schemas-data/v2.5/core/placement.json +0 -34
  239. package/dist/lib/schemas-data/v2.5/core/pricing-option.json +0 -35
  240. package/dist/lib/schemas-data/v2.5/core/product-filters.json +0 -102
  241. package/dist/lib/schemas-data/v2.5/core/product.json +0 -153
  242. package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +0 -115
  243. package/dist/lib/schemas-data/v2.5/core/promoted-products.json +0 -67
  244. package/dist/lib/schemas-data/v2.5/core/property-id.json +0 -14
  245. package/dist/lib/schemas-data/v2.5/core/property-tag.json +0 -16
  246. package/dist/lib/schemas-data/v2.5/core/property.json +0 -62
  247. package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +0 -146
  248. package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +0 -92
  249. package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +0 -48
  250. package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +0 -71
  251. package/dist/lib/schemas-data/v2.5/core/response.json +0 -24
  252. package/dist/lib/schemas-data/v2.5/core/signal-filters.json +0 -35
  253. package/dist/lib/schemas-data/v2.5/core/start-timing.json +0 -18
  254. package/dist/lib/schemas-data/v2.5/core/sub-asset.json +0 -79
  255. package/dist/lib/schemas-data/v2.5/core/targeting.json +0 -50
  256. package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +0 -43
  257. package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +0 -166
  258. package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +0 -192
  259. package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +0 -183
  260. package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +0 -101
  261. package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +0 -73
  262. package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +0 -61
  263. package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +0 -164
  264. package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +0 -245
  265. package/dist/lib/schemas-data/v2.5/creative/preview-render.json +0 -225
  266. package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +0 -11
  267. package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +0 -22
  268. package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +0 -11
  269. package/dist/lib/schemas-data/v2.5/enums/available-metric.json +0 -18
  270. package/dist/lib/schemas-data/v2.5/enums/channels.json +0 -18
  271. package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +0 -12
  272. package/dist/lib/schemas-data/v2.5/enums/creative-action.json +0 -14
  273. package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +0 -13
  274. package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +0 -15
  275. package/dist/lib/schemas-data/v2.5/enums/creative-status.json +0 -19
  276. package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +0 -20
  277. package/dist/lib/schemas-data/v2.5/enums/daast-version.json +0 -11
  278. package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +0 -15
  279. package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +0 -13
  280. package/dist/lib/schemas-data/v2.5/enums/feed-format.json +0 -12
  281. package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +0 -13
  282. package/dist/lib/schemas-data/v2.5/enums/format-category.json +0 -16
  283. package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +0 -11
  284. package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +0 -13
  285. package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +0 -11
  286. package/dist/lib/schemas-data/v2.5/enums/http-method.json +0 -11
  287. package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +0 -34
  288. package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +0 -12
  289. package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +0 -12
  290. package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +0 -11
  291. package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +0 -19
  292. package/dist/lib/schemas-data/v2.5/enums/metric-type.json +0 -17
  293. package/dist/lib/schemas-data/v2.5/enums/notification-type.json +0 -13
  294. package/dist/lib/schemas-data/v2.5/enums/pacing.json +0 -17
  295. package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +0 -11
  296. package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +0 -25
  297. package/dist/lib/schemas-data/v2.5/enums/property-type.json +0 -16
  298. package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +0 -19
  299. package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +0 -12
  300. package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +0 -12
  301. package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +0 -11
  302. package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +0 -103
  303. package/dist/lib/schemas-data/v2.5/enums/task-status.json +0 -29
  304. package/dist/lib/schemas-data/v2.5/enums/task-type.json +0 -27
  305. package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +0 -13
  306. package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +0 -12
  307. package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +0 -11
  308. package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +0 -25
  309. package/dist/lib/schemas-data/v2.5/enums/vast-version.json +0 -14
  310. package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +0 -13
  311. package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +0 -12
  312. package/dist/lib/schemas-data/v2.5/index.json +0 -604
  313. package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +0 -31
  314. package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +0 -65
  315. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +0 -31
  316. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +0 -16
  317. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +0 -36
  318. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +0 -126
  319. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +0 -97
  320. package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +0 -54
  321. package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +0 -285
  322. package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +0 -38
  323. package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +0 -21
  324. package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +0 -34
  325. package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +0 -28
  326. package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +0 -33
  327. package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +0 -26
  328. package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +0 -70
  329. package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +0 -58
  330. package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +0 -61
  331. package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +0 -137
  332. package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +0 -437
  333. package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +0 -80
  334. package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +0 -88
  335. package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +0 -66
  336. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +0 -25
  337. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +0 -16
  338. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +0 -46
  339. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +0 -178
  340. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +0 -149
  341. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +0 -24
  342. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +0 -16
  343. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +0 -36
  344. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +0 -129
  345. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +0 -99
  346. package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +0 -52
  347. package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +0 -52
  348. package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +0 -81
  349. package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +0 -52
  350. package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +0 -73
  351. package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +0 -88
  352. package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +0 -93
  353. package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +0 -81
  354. package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +0 -52
  355. package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +0 -33
  356. package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +0 -32
  357. package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +0 -68
  358. package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +0 -59
  359. package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +0 -100
  360. package/dist/lib/types/v2-5/index.d.mts +0 -1
  361. package/dist/lib/types/v2-5/index.d.ts +0 -1
  362. package/dist/lib/types/v2-5/index.js +0 -22
  363. package/dist/lib/types/v2-5/index.mjs +0 -1
  364. package/dist/lib/types/v2-5/tools.generated.d.mts +0 -3568
  365. package/dist/lib/types/v2-5/tools.generated.d.ts +0 -3568
  366. package/dist/lib/types/v2-5/tools.generated.js +0 -16
  367. package/dist/lib/types/v2-5/tools.generated.mjs +0 -0
  368. package/dist/lib/utils/sync-creatives-adapter.d.mts +0 -33
  369. package/dist/lib/utils/sync-creatives-adapter.d.ts +0 -33
  370. package/dist/lib/utils/sync-creatives-adapter.js +0 -83
  371. package/dist/lib/utils/sync-creatives-adapter.mjs +0 -59
@@ -0,0 +1,373 @@
1
+ import { matchesFixtureRequirements, normalizeFixtureMatchExpression } from "./fixture-resolution.mjs";
2
+ import {
3
+ getSchemaDocumentByRef,
4
+ getSchemaValidatorByRef,
5
+ withServedValidationVersion
6
+ } from "../../validation/schema-loader.mjs";
7
+ import { ADCP_VERSION } from "../../version.mjs";
8
+ import { SECRET_KEY_PATTERN } from "../../utils/redact-secrets.mjs";
9
+ import { MAX_JSON_DEPTH } from "../../utils/json-depth.mjs";
10
+ import { canonicalizeAgentUrl } from "../../discovery/resolve-agent-properties.mjs";
11
+ const INPUT_FIELDS = /* @__PURE__ */ new Set([
12
+ "message",
13
+ "creative_manifest",
14
+ "creative_id",
15
+ "transformer_id",
16
+ "config",
17
+ "target_format_id"
18
+ ]);
19
+ const TRUST_FIELDS = /^(auth|private[_-]?key|bearer[_-]?token|id[_-]?token|jwk|jwks|jwks[_-]?uri|x[_-]api[_-]key|signing[_-]?key|secret[_-]?key|hmac[_-]?key|client[_-]?key)$/i;
20
+ const isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
21
+ function at(value, ...keys) {
22
+ for (const key of keys) value = isRecord(value) ? value[key] : void 0;
23
+ return value;
24
+ }
25
+ function displayDiagnostic(value, limit) {
26
+ let displayed = "";
27
+ for (const char of value) {
28
+ const escaped = JSON.stringify(char).slice(1, -1).replace(/[\u007f-\u009f\u2028\u2029]/g, (control) => `\\u${control.charCodeAt(0).toString(16).padStart(4, "0")}`);
29
+ if (displayed.length + escaped.length > limit - 1) return `${displayed}\u2026`;
30
+ displayed += escaped;
31
+ }
32
+ return displayed;
33
+ }
34
+ function displayUnknownKind(kind) {
35
+ return `"${displayDiagnostic(kind.slice(0, 128), 768)}"`;
36
+ }
37
+ function displayValidationErrors(errors) {
38
+ const message = errors.slice(0, 8).map((error) => `${(error.instancePath || "/").slice(0, 2048)} ${(error.message ?? "").slice(0, 2048)}`).join("; ");
39
+ return displayDiagnostic(message, 2048);
40
+ }
41
+ function validateCreativeBuildProbeSpec(value) {
42
+ if (!isRecord(value) || Object.keys(value).some((key) => key !== "context_prefix" && key !== "message") || typeof value.context_prefix !== "string" || !/^[a-z][a-z0-9_]*$/.test(value.context_prefix) || typeof value.message !== "string" || value.message.trim().length === 0) {
43
+ throw new Error("creative_build_probe requires context_prefix (lowercase identifier) and a nonempty message");
44
+ }
45
+ }
46
+ function containsSecretField(value, depth = 0, seen = /* @__PURE__ */ new Set()) {
47
+ if (depth > MAX_JSON_DEPTH) throw new Error("creative_build_probe: fixture nesting exceeds the JSON depth bound");
48
+ if (typeof value === "string" && /^https?:\/\//i.test(value)) {
49
+ let url;
50
+ try {
51
+ url = new URL(value);
52
+ } catch {
53
+ throw new Error("creative_build_probe: invalid URL in fixture");
54
+ }
55
+ return !!(url.username || url.password) || [...url.searchParams.keys()].some((key) => SECRET_KEY_PATTERN.test(key) || TRUST_FIELDS.test(key));
56
+ }
57
+ if (!value || typeof value !== "object") return false;
58
+ if (seen.has(value)) throw new Error("creative_build_probe: fixture must be acyclic JSON");
59
+ seen.add(value);
60
+ const found = Array.isArray(value) ? value.some((item) => containsSecretField(item, depth + 1, seen)) : Object.entries(value).some(
61
+ ([key, item]) => SECRET_KEY_PATTERN.test(key) || TRUST_FIELDS.test(key) || containsSecretField(item, depth + 1, seen)
62
+ );
63
+ seen.delete(value);
64
+ return found;
65
+ }
66
+ function validateRecipeBudget(value, location) {
67
+ let nodes = 0;
68
+ let bytes = 0;
69
+ const ancestors = /* @__PURE__ */ new Set();
70
+ const visit = (item, depth) => {
71
+ if (++nodes > 1e5 || depth > MAX_JSON_DEPTH)
72
+ throw new Error(`${location}: recipe exceeds the fixture node/depth budget`);
73
+ if (typeof item === "string") bytes += Buffer.byteLength(item, "utf8");
74
+ if (bytes > 4 * 1024 * 1024) throw new Error(`${location}: recipe exceeds the 4 MiB fixture string budget`);
75
+ if (!item || typeof item !== "object") return;
76
+ if (ancestors.has(item)) throw new Error(`${location}: recipe must be acyclic JSON`);
77
+ ancestors.add(item);
78
+ for (const [key, child] of Object.entries(item)) {
79
+ bytes += Buffer.byteLength(key, "utf8");
80
+ visit(child, depth + 1);
81
+ }
82
+ ancestors.delete(item);
83
+ };
84
+ visit(value, 0);
85
+ }
86
+ function validateInput(value, location, validateManifest) {
87
+ if (!isRecord(value) || Object.keys(value).some((key) => !INPUT_FIELDS.has(key))) {
88
+ throw new Error(
89
+ `${location}: input may only contain message, creative_manifest, creative_id, transformer_id, config and target_format_id`
90
+ );
91
+ }
92
+ if (containsSecretField(value))
93
+ throw new Error(`${location}: input must not carry credential or trust-material fields`);
94
+ for (const key of ["message", "creative_id", "transformer_id"]) {
95
+ if (value[key] !== void 0 && (typeof value[key] !== "string" || value[key].trim().length === 0)) {
96
+ throw new Error(`${location}: ${key} must be a nonempty string`);
97
+ }
98
+ }
99
+ if (value.config !== void 0 && (!isRecord(value.config) || !value.transformer_id))
100
+ throw new Error(
101
+ `${location}: this probe contract requires config to be an object bound to a provisioned transformer_id`
102
+ );
103
+ if (value.creative_id && value.creative_manifest)
104
+ throw new Error(
105
+ `${location}: this probe contract requires one unambiguous source, not both creative_id and creative_manifest`
106
+ );
107
+ if (value.creative_manifest !== void 0) {
108
+ const manifest = value.creative_manifest;
109
+ if (!validateManifest || !validateManifest(manifest)) {
110
+ throw new Error(`${location}: creative_manifest must be a complete manifest, including format and assets`);
111
+ }
112
+ }
113
+ if (!value.message && !value.creative_manifest && !value.creative_id && !value.transformer_id) {
114
+ throw new Error(
115
+ `${location}: input must identify a brief, source manifest or provisioned library creative/transformer`
116
+ );
117
+ }
118
+ }
119
+ function resolveCreativeBuildProbe(creative, spec, testKit, adcpVersion, governanceEnforcement) {
120
+ return resolveCreativeBuildProbeWithSchemas(
121
+ creative,
122
+ spec,
123
+ testKit,
124
+ governanceEnforcement,
125
+ adcpVersion,
126
+ captureRequestSchemas(adcpVersion)
127
+ );
128
+ }
129
+ function captureRequestSchemas(adcpVersion) {
130
+ return {
131
+ request: getSchemaDocumentByRef("media-buy/build-creative-request.json", adcpVersion)?.schema,
132
+ validateManifest: getSchemaValidatorByRef("core/creative-manifest.json", adcpVersion),
133
+ validateFormatId: getSchemaValidatorByRef("core/format-id.json", adcpVersion),
134
+ formatIdProperties: at(getSchemaDocumentByRef("core/format-id.json", adcpVersion)?.schema, "properties")
135
+ };
136
+ }
137
+ function prepareCreativeBuildProbe(capabilities, spec, testKit, adcpVersion) {
138
+ const requestSchemas = captureRequestSchemas(adcpVersion);
139
+ return withServedValidationVersion(
140
+ capabilities,
141
+ adcpVersion ?? ADCP_VERSION,
142
+ (catalogVersion) => resolveCreativeBuildProbeWithSchemas(
143
+ at(capabilities, "creative"),
144
+ spec,
145
+ testKit,
146
+ at(capabilities, "adcp", "governance_enforcement"),
147
+ catalogVersion,
148
+ requestSchemas
149
+ )
150
+ );
151
+ }
152
+ function resolveCreativeBuildProbeWithSchemas(creative, spec, testKit, governanceEnforcement, catalogAdcpVersion, requestSchemas) {
153
+ validateCreativeBuildProbeSpec(spec);
154
+ if (isRecord(creative) && creative.supported_formats !== void 0 && !Array.isArray(creative.supported_formats)) {
155
+ return { status: "failed", detail: "creative.supported_formats: malformed catalog (expected array)" };
156
+ }
157
+ if (!isRecord(creative) || !Array.isArray(creative.supported_formats)) {
158
+ return {
159
+ status: "unsatisfied",
160
+ detail: `fixture_unsatisfied: creative_format:${spec.context_prefix}: no advertised creative build catalog`
161
+ };
162
+ }
163
+ const recipes = isRecord(testKit) && testKit.creative_build_probes !== void 0 ? testKit.creative_build_probes : [];
164
+ if (!Array.isArray(recipes)) throw new Error("test_kit.creative_build_probes must be an array");
165
+ if (recipes.some(
166
+ (recipe) => isRecord(recipe) && isRecord(recipe.input) && recipe.input.creative_manifest !== void 0
167
+ ) && !requestSchemas.validateManifest) {
168
+ return {
169
+ status: "unsatisfied",
170
+ detail: `fixture_unsatisfied: creative_format:${spec.context_prefix}: selected-version source manifest schema validator is unavailable`
171
+ };
172
+ }
173
+ const normalized = recipes.map((recipe, index) => {
174
+ const location = `test_kit.creative_build_probes[${index}]`;
175
+ validateRecipeBudget(recipe, location);
176
+ if (!isRecord(recipe) || Object.keys(recipe).some((key) => key !== "match" && key !== "input")) {
177
+ throw new Error(`${location}: expected only match and input`);
178
+ }
179
+ const match = normalizeFixtureMatchExpression(recipe.match, `${location}.match`);
180
+ if (match.length === 0) throw new Error(`${location}: at least one explicit match predicate is required`);
181
+ validateInput(recipe.input, location, requestSchemas.validateManifest);
182
+ return { match, input: recipe.input };
183
+ });
184
+ const catalogDocument = getSchemaDocumentByRef("protocol/get-adcp-capabilities-response.json", catalogAdcpVersion);
185
+ const catalog = catalogDocument?.schema;
186
+ const selectedVersion = catalogDocument?.resolvedVersion ?? catalogAdcpVersion ?? "selected bundle";
187
+ const item = at(catalog, "properties", "creative", "properties", "supported_formats", "items");
188
+ const request = requestSchemas.request;
189
+ const canonicalSelector = !!at(request, "properties", "target_capability_id");
190
+ const legacySelector = !!at(request, "properties", "target_format_id");
191
+ const catalogRequest = getSchemaDocumentByRef("media-buy/build-creative-request.json", catalogAdcpVersion)?.schema;
192
+ const canonicalCatalog = !!at(catalogRequest, "properties", "target_capability_id");
193
+ const requestIdPattern = at(request, "properties", "target_capability_id", "pattern");
194
+ const canonicalAddressable = (route) => canonicalCatalog && canonicalSelector && typeof route.capability_id === "string" && (typeof requestIdPattern !== "string" || new RegExp(requestIdPattern).test(route.capability_id));
195
+ const ref = at(item, "properties", "format", "$ref");
196
+ const formatRef = typeof ref === "string" ? ref.replace(/^(?:https:\/\/adcontextprotocol\.org)?\/schemas\/(?:(?:v?\d[^/]*|latest)\/)?/, "") : void 0;
197
+ const validateFormat = formatRef ? getSchemaValidatorByRef(formatRef, catalogAdcpVersion) : void 0;
198
+ const validateKind = getSchemaValidatorByRef("core/canonical-format-kind.json", catalogAdcpVersion);
199
+ if (!validateFormat || !validateKind || !catalogRequest || !canonicalSelector && !legacySelector) {
200
+ return {
201
+ status: "unsatisfied",
202
+ detail: `fixture_unsatisfied: creative_format:${spec.context_prefix}: selected-version creative catalog schema validators are unavailable`
203
+ };
204
+ }
205
+ for (const recipe of normalized) {
206
+ if (recipe.input.target_format_id !== void 0) {
207
+ if (!legacySelector)
208
+ throw new Error(
209
+ "test_kit.creative_build_probes: target_format_id is not supported by the selected build request"
210
+ );
211
+ const validateId = requestSchemas.validateFormatId;
212
+ if (!validateId)
213
+ return {
214
+ status: "unsatisfied",
215
+ detail: `fixture_unsatisfied: creative_format:${spec.context_prefix}: selected-version legacy FormatID schema validator is unavailable`
216
+ };
217
+ if (!validateId(recipe.input.target_format_id))
218
+ throw new Error(
219
+ "test_kit.creative_build_probes: target_format_id must be a selected-version valid provisioned FormatID"
220
+ );
221
+ }
222
+ }
223
+ const idPattern = at(item, "properties", "capability_id", "pattern");
224
+ const hasOperations = at(item, "properties", "operations") !== void 0;
225
+ const isBuildRoute = (entry) => !hasOperations || entry.operations === void 0 || Array.isArray(entry.operations) && entry.operations.includes("build");
226
+ const selectorProperties = at(
227
+ getSchemaDocumentByRef("core/format-id.json", catalogAdcpVersion)?.schema,
228
+ "properties"
229
+ );
230
+ const requestSelectorProperties = requestSchemas.formatIdProperties;
231
+ const requestHasPixelRatio = at(requestSelectorProperties, "pixel_ratio") !== void 0;
232
+ const legacyDimensions = ["width", "height", "duration_ms", "pixel_ratio"].filter(
233
+ (key) => at(selectorProperties, key) !== void 0
234
+ );
235
+ const unavailableKinds = /* @__PURE__ */ new Set();
236
+ const ids = /* @__PURE__ */ new Set();
237
+ const buildRoutes = [];
238
+ for (const [index, entry] of creative.supported_formats.entries()) {
239
+ const location = `creative.supported_formats[${index}]`;
240
+ const invalid = (detail) => ({
241
+ status: "failed",
242
+ detail: `${location}: ${detail}`
243
+ });
244
+ if (!isRecord(entry)) return invalid("malformed catalog entry (expected object)");
245
+ if (entry.capability_id !== void 0) {
246
+ if (typeof entry.capability_id !== "string" || typeof idPattern === "string" && !new RegExp(idPattern).test(entry.capability_id) || canonicalCatalog && ids.has(entry.capability_id)) {
247
+ return invalid("capability_id must be usable and unique within the catalog");
248
+ }
249
+ ids.add(entry.capability_id);
250
+ }
251
+ const operations = entry.operations;
252
+ if (hasOperations && operations !== void 0 && (!Array.isArray(operations) || operations.length === 0 || operations.some(
253
+ (operation, index2) => typeof operation !== "string" || !["build", "validate", "preview"].includes(operation) || operations.indexOf(operation) !== index2
254
+ ))) {
255
+ return invalid("operations must be a nonempty unique array of build, validate or preview");
256
+ }
257
+ if (!isRecord(entry.format) || typeof entry.format.format_kind !== "string" || !isRecord(entry.format.params)) {
258
+ return invalid("format must declare format_kind and params");
259
+ }
260
+ if (!canonicalCatalog && !validateKind(entry.format.format_kind)) {
261
+ unavailableKinds.add(entry.format.format_kind);
262
+ if (isBuildRoute(entry)) buildRoutes.push(entry);
263
+ continue;
264
+ }
265
+ if (!validateFormat(entry.format) || !validateKind(entry.format.format_kind)) {
266
+ return invalid(
267
+ `malformed format declaration: ${displayValidationErrors([...validateFormat.errors ?? [], ...validateKind.errors ?? []])}`
268
+ );
269
+ }
270
+ const validateParams = getSchemaValidatorByRef(
271
+ `formats/canonical/${entry.format.format_kind}.json`,
272
+ catalogAdcpVersion
273
+ );
274
+ if (entry.format.format_kind !== "custom" && !validateParams) {
275
+ unavailableKinds.add(entry.format.format_kind);
276
+ if (isBuildRoute(entry)) buildRoutes.push(entry);
277
+ continue;
278
+ }
279
+ if (validateParams && !validateParams(entry.format.params) || validateFormat && !validateFormat(entry.format) || validateKind && !validateKind(entry.format.format_kind)) {
280
+ return invalid(
281
+ `malformed format declaration: ${displayValidationErrors([...validateParams?.errors ?? [], ...validateFormat?.errors ?? [], ...validateKind?.errors ?? []])}`
282
+ );
283
+ }
284
+ if (isBuildRoute(entry)) buildRoutes.push(entry);
285
+ }
286
+ if (isRecord(governanceEnforcement) && Array.isArray(governanceEnforcement.tasks) && governanceEnforcement.tasks.some(
287
+ (task) => isRecord(task) && task.task === "build_creative" && Array.isArray(task.modes) && task.modes.includes("signed_context")
288
+ )) {
289
+ return {
290
+ status: "unsatisfied",
291
+ detail: `fixture_unsatisfied: creative_format:${spec.context_prefix}: payload-bound build governance authorization is not prepared by this runner contract`
292
+ };
293
+ }
294
+ for (const route of buildRoutes) {
295
+ const knownKind = validateKind(route.format.format_kind);
296
+ if (!knownKind || route.format.format_kind !== "custom" && !getSchemaValidatorByRef(
297
+ `formats/canonical/${route.format.format_kind}.json`,
298
+ catalogAdcpVersion
299
+ ))
300
+ continue;
301
+ let source = "test_kit";
302
+ const usable = (input2) => {
303
+ if (input2.transformer_id) return creative.supports_transformers === true;
304
+ if (input2.creative_id) return creative.has_creative_library === true;
305
+ if (input2.creative_manifest)
306
+ return creative.supports_transformation === true || creative.supports_generation === true;
307
+ return creative.supports_generation === true;
308
+ };
309
+ const format = route.format;
310
+ const legacyBindingAgrees = (input2) => {
311
+ if (input2.target_format_id === void 0) return canonicalAddressable(route);
312
+ if (format.canonical_formats_only === true || !isRecord(input2.target_format_id)) return false;
313
+ if (!Array.isArray(format.v1_format_ref)) return true;
314
+ const target = input2.target_format_id;
315
+ const targetUrl = typeof target.agent_url === "string" ? canonicalizeAgentUrl(target.agent_url) : null;
316
+ if (targetUrl === null) return false;
317
+ return format.v1_format_ref.some(
318
+ (ref2) => isRecord(ref2) && ref2.id === target.id && typeof ref2.agent_url === "string" && typeof target.agent_url === "string" && canonicalizeAgentUrl(ref2.agent_url) === targetUrl && legacyDimensions.every(
319
+ (key) => key === "pixel_ratio" ? (ref2[key] ?? 1) === (requestHasPixelRatio ? target[key] ?? 1 : 1) : ref2[key] === void 0 || ref2[key] === target[key]
320
+ )
321
+ );
322
+ };
323
+ const selectedRecipe = normalized.find(
324
+ (recipe) => matchesFixtureRequirements(route, recipe.match) && usable(recipe.input) && legacyBindingAgrees(recipe.input)
325
+ );
326
+ let input = selectedRecipe?.input;
327
+ const kindValidator = getSchemaValidatorByRef("core/canonical-format-kind.json", catalogAdcpVersion);
328
+ const emptyCompleteFormat = format.technical_requirements_complete === true && format.format_kind !== "custom" && kindValidator?.(format.format_kind) === true && Object.keys(format.params).length === 0 && Object.keys(format).every(
329
+ (key) => [
330
+ "format_kind",
331
+ "params",
332
+ "technical_requirements_complete",
333
+ "display_name",
334
+ "seller_preference",
335
+ "experimental",
336
+ "sample_render_url",
337
+ "format_option_id",
338
+ "publisher_domain",
339
+ "applies_to_channels",
340
+ "canonical_formats_only"
341
+ ].includes(key)
342
+ ) && Object.keys(route).every((key) => ["capability_id", "operations", "format"].includes(key));
343
+ if (!input && canonicalAddressable(route) && creative.supports_generation === true && buildRoutes.length === 1 && emptyCompleteFormat) {
344
+ source = "generation";
345
+ const manifest = { format_kind: format.format_kind, assets: {} };
346
+ const validateManifest = requestSchemas.validateManifest;
347
+ if (!validateManifest?.(manifest)) continue;
348
+ input = { message: spec.message, creative_manifest: manifest };
349
+ }
350
+ if (!input) continue;
351
+ const useCanonicalSelector = input.target_format_id === void 0;
352
+ const context = useCanonicalSelector ? { [`${spec.context_prefix}_capability_id`]: route.capability_id } : { [`${spec.context_prefix}_target_format_id`]: structuredClone(input.target_format_id) };
353
+ for (const key of ["message", "creative_manifest", "creative_id", "transformer_id", "config"]) {
354
+ if (input[key] !== void 0) context[`${spec.context_prefix}_${key}`] = structuredClone(input[key]);
355
+ }
356
+ return {
357
+ status: "resolved",
358
+ ...useCanonicalSelector ? { capabilityId: route.capability_id } : { formatId: structuredClone(input.target_format_id) },
359
+ context,
360
+ source,
361
+ requirements: selectedRecipe?.match ?? []
362
+ };
363
+ }
364
+ return {
365
+ status: "unsatisfied",
366
+ detail: `fixture_unsatisfied: creative_format:${spec.context_prefix}: no routable build entry has a known-valid generation input or a matching provisioned test-kit recipe${unavailableKinds.size ? `; ${unavailableKinds.size} unvalidated kind(s) in schema bundle ${selectedVersion}: ${[...unavailableKinds].slice(0, 8).map(displayUnknownKind).join(", ")}${unavailableKinds.size > 8 ? ", \u2026" : ""}` : ""}`
367
+ };
368
+ }
369
+ export {
370
+ prepareCreativeBuildProbe,
371
+ resolveCreativeBuildProbe,
372
+ validateCreativeBuildProbeSpec
373
+ };
@@ -36,3 +36,5 @@ export type { SandboxBrand, SandboxAgent, SandboxEntities, BrandJson } from './s
36
36
  export { BrandJsonSchema, AdagentsJsonSchema } from '../../types/wellknown-schemas.generated.mjs';
37
37
  export type { AdagentsJson } from '../../types/wellknown-schemas.generated.mjs';
38
38
  export { getSandboxEntities, getSandboxBrands, getSandboxBrand, isSandboxDomain, clearSandboxCache, } from './sandbox-entities.mjs';
39
+ export { resolveCreativeBuildProbe, validateCreativeBuildProbeSpec } from './creative-build-probe.mjs';
40
+ export type { CreativeBuildProbeSpec, CreativeBuildProbeInputFixture, CreativeBuildProbeResolution, } from './creative-build-probe.mjs';
@@ -36,3 +36,5 @@ export type { SandboxBrand, SandboxAgent, SandboxEntities, BrandJson } from './s
36
36
  export { BrandJsonSchema, AdagentsJsonSchema } from '../../types/wellknown-schemas.generated';
37
37
  export type { AdagentsJson } from '../../types/wellknown-schemas.generated';
38
38
  export { getSandboxEntities, getSandboxBrands, getSandboxBrand, isSandboxDomain, clearSandboxCache, } from './sandbox-entities';
39
+ export { resolveCreativeBuildProbe, validateCreativeBuildProbeSpec } from './creative-build-probe';
40
+ export type { CreativeBuildProbeSpec, CreativeBuildProbeInputFixture, CreativeBuildProbeResolution, } from './creative-build-probe';
@@ -98,6 +98,7 @@ __export(storyboard_exports, {
98
98
  resolveAssertions: () => import_assertions.resolveAssertions,
99
99
  resolveBundleOrStoryboard: () => import_compliance.resolveBundleOrStoryboard,
100
100
  resolveCapabilityPath: () => import_runner.resolveCapabilityPath,
101
+ resolveCreativeBuildProbe: () => import_creative_build_probe.resolveCreativeBuildProbe,
101
102
  resolvePath: () => import_path.resolvePath,
102
103
  resolveStoryboardsForCapabilities: () => import_compliance.resolveStoryboardsForCapabilities,
103
104
  runStoryboard: () => import_runner.runStoryboard,
@@ -105,6 +106,7 @@ __export(storyboard_exports, {
105
106
  runValidations: () => import_validations.runValidations,
106
107
  setPath: () => import_path.setPath,
107
108
  summarizeStrictValidation: () => import_runner.summarizeStrictValidation,
109
+ validateCreativeBuildProbeSpec: () => import_creative_build_probe.validateCreativeBuildProbeSpec,
108
110
  validateFixtureResolutionDeclarations: () => import_fixture_resolution.validateFixtureResolutionDeclarations,
109
111
  validateRateLimitTripSpec: () => import_rate_limit_trip.validateRateLimitTripSpec,
110
112
  validateTestKit: () => import_test_kit.validateTestKit
@@ -133,6 +135,7 @@ var import_rate_limit_trip = require('./rate-limit-trip.js');
133
135
  var import_test_kit = require('./test-kit.js');
134
136
  var import_wellknown_schemas = require('../../types/wellknown-schemas.generated.js');
135
137
  var import_sandbox_entities = require('./sandbox-entities.js');
138
+ var import_creative_build_probe = require('./creative-build-probe.js');
136
139
  (0, import_default_invariants.registerDefaultInvariants)();
137
140
  // Annotate the CommonJS export names for ESM import in node:
138
141
  0 && (module.exports = {
@@ -216,6 +219,7 @@ var import_sandbox_entities = require('./sandbox-entities.js');
216
219
  resolveAssertions,
217
220
  resolveBundleOrStoryboard,
218
221
  resolveCapabilityPath,
222
+ resolveCreativeBuildProbe,
219
223
  resolvePath,
220
224
  resolveStoryboardsForCapabilities,
221
225
  runStoryboard,
@@ -223,6 +227,7 @@ var import_sandbox_entities = require('./sandbox-entities.js');
223
227
  runValidations,
224
228
  setPath,
225
229
  summarizeStrictValidation,
230
+ validateCreativeBuildProbeSpec,
226
231
  validateFixtureResolutionDeclarations,
227
232
  validateRateLimitTripSpec,
228
233
  validateTestKit
@@ -95,6 +95,7 @@ import {
95
95
  isSandboxDomain,
96
96
  clearSandboxCache
97
97
  } from "./sandbox-entities.mjs";
98
+ import { resolveCreativeBuildProbe, validateCreativeBuildProbeSpec } from "./creative-build-probe.mjs";
98
99
  export {
99
100
  AdagentsJsonSchema,
100
101
  BrandJsonSchema,
@@ -176,6 +177,7 @@ export {
176
177
  resolveAssertions,
177
178
  resolveBundleOrStoryboard,
178
179
  resolveCapabilityPath,
180
+ resolveCreativeBuildProbe,
179
181
  resolvePath,
180
182
  resolveStoryboardsForCapabilities,
181
183
  runStoryboard,
@@ -183,6 +185,7 @@ export {
183
185
  runValidations,
184
186
  setPath,
185
187
  summarizeStrictValidation,
188
+ validateCreativeBuildProbeSpec,
186
189
  validateFixtureResolutionDeclarations,
187
190
  validateRateLimitTripSpec,
188
191
  validateTestKit
@@ -30,6 +30,7 @@ var import_fs = require("fs");
30
30
  var import_yaml = require("yaml");
31
31
  var import_idempotency = require('../../utils/idempotency.js');
32
32
  var import_fixture_resolution = require('./fixture-resolution.js');
33
+ var import_creative_build_probe = require('./creative-build-probe.js');
33
34
  var import_semver = require("semver");
34
35
  var import_phase_condition = require('./phase-condition.js');
35
36
  const BRANCH_SET_SEMANTICS = ["any_of"];
@@ -84,6 +85,7 @@ function normalizeValidationOnlyTasks(storyboard) {
84
85
  return changed ? { ...storyboard, phases } : storyboard;
85
86
  }
86
87
  function validateStoryboardShape(storyboard) {
88
+ if (storyboard.creative_build_probe !== void 0) (0, import_creative_build_probe.validateCreativeBuildProbeSpec)(storyboard.creative_build_probe);
87
89
  validateRequires(storyboard);
88
90
  validateRequiresAllCapabilities(storyboard);
89
91
  (0, import_fixture_resolution.validateFixtureResolutionDeclarations)(storyboard);
@@ -100,6 +102,16 @@ function validateStoryboardShape(storyboard) {
100
102
  throw new Error(`[${storyboard.id}] phase '${phase.id}' step '${step.id}': missing task and validations`);
101
103
  }
102
104
  }
105
+ if (step.validations?.some((validation) => validation.check === "property_list_reference")) {
106
+ if (storyboard.requires?.[0] !== "property_list_reference_runner")
107
+ throw new Error(
108
+ `[${storyboard.id}] ${step.id}: property_list_reference requires property_list_reference_runner as the first storyboard requirement.`
109
+ );
110
+ if (step.parallel_dispatch)
111
+ throw new Error(
112
+ `[${storyboard.id}] ${step.id}: property_list_reference requires one issued reference, without parallel_dispatch.`
113
+ );
114
+ }
103
115
  resolveContributesShorthand(storyboard.id, phase, step);
104
116
  validateFixtureForMutatingStep(storyboard.id, phase, step);
105
117
  validateOmitFlagCoherence(storyboard.id, phase, step);
@@ -2,6 +2,7 @@ import { readFileSync } from "fs";
2
2
  import { parse } from "yaml";
3
3
  import { MUTATING_TASKS } from "../../utils/idempotency.mjs";
4
4
  import { validateFixtureResolutionDeclarations } from "./fixture-resolution.mjs";
5
+ import { validateCreativeBuildProbeSpec } from "./creative-build-probe.mjs";
5
6
  import { valid as validSemver } from "semver";
6
7
  import { parsePhaseCondition } from "./phase-condition.mjs";
7
8
  const BRANCH_SET_SEMANTICS = ["any_of"];
@@ -56,6 +57,7 @@ function normalizeValidationOnlyTasks(storyboard) {
56
57
  return changed ? { ...storyboard, phases } : storyboard;
57
58
  }
58
59
  function validateStoryboardShape(storyboard) {
60
+ if (storyboard.creative_build_probe !== void 0) validateCreativeBuildProbeSpec(storyboard.creative_build_probe);
59
61
  validateRequires(storyboard);
60
62
  validateRequiresAllCapabilities(storyboard);
61
63
  validateFixtureResolutionDeclarations(storyboard);
@@ -72,6 +74,16 @@ function validateStoryboardShape(storyboard) {
72
74
  throw new Error(`[${storyboard.id}] phase '${phase.id}' step '${step.id}': missing task and validations`);
73
75
  }
74
76
  }
77
+ if (step.validations?.some((validation) => validation.check === "property_list_reference")) {
78
+ if (storyboard.requires?.[0] !== "property_list_reference_runner")
79
+ throw new Error(
80
+ `[${storyboard.id}] ${step.id}: property_list_reference requires property_list_reference_runner as the first storyboard requirement.`
81
+ );
82
+ if (step.parallel_dispatch)
83
+ throw new Error(
84
+ `[${storyboard.id}] ${step.id}: property_list_reference requires one issued reference, without parallel_dispatch.`
85
+ );
86
+ }
75
87
  resolveContributesShorthand(storyboard.id, phase, step);
76
88
  validateFixtureForMutatingStep(storyboard.id, phase, step);
77
89
  validateOmitFlagCoherence(storyboard.id, phase, step);
@@ -0,0 +1,15 @@
1
+ import type { StoryboardValidation, ValidationResult } from './types.mjs';
2
+ export declare function rememberPropertyListCredentials(data: unknown, paths?: readonly string[]): void;
3
+ export declare function redactPropertyListCredentials<T>(value: T): T;
4
+ export declare function withPropertyListCredentialRedaction<T>(run: () => Promise<T>): Promise<T>;
5
+ interface ProbeOptions {
6
+ agentUrl: string;
7
+ version?: string;
8
+ signal?: AbortSignal;
9
+ allowHttp?: boolean;
10
+ /** Scrub suite credentials if an issuer reflects them; never forward them. */
11
+ redactValues?: readonly string[];
12
+ }
13
+ /** Implements adcp#8289's property_list_reference_check using the official MCP client. */
14
+ export declare function verifyPropertyListReference(validation: StoryboardValidation, creation: unknown, options: ProbeOptions): Promise<ValidationResult>;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { StoryboardValidation, ValidationResult } from './types';
2
+ export declare function rememberPropertyListCredentials(data: unknown, paths?: readonly string[]): void;
3
+ export declare function redactPropertyListCredentials<T>(value: T): T;
4
+ export declare function withPropertyListCredentialRedaction<T>(run: () => Promise<T>): Promise<T>;
5
+ interface ProbeOptions {
6
+ agentUrl: string;
7
+ version?: string;
8
+ signal?: AbortSignal;
9
+ allowHttp?: boolean;
10
+ /** Scrub suite credentials if an issuer reflects them; never forward them. */
11
+ redactValues?: readonly string[];
12
+ }
13
+ /** Implements adcp#8289's property_list_reference_check using the official MCP client. */
14
+ export declare function verifyPropertyListReference(validation: StoryboardValidation, creation: unknown, options: ProbeOptions): Promise<ValidationResult>;
15
+ export {};