@adcp/sdk 6.5.0 → 6.7.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 (1167) hide show
  1. package/ADCP_VERSION +1 -1
  2. package/AGENTS.md +4 -0
  3. package/README.md +29 -16
  4. package/bin/adcp-resolve.js +166 -0
  5. package/bin/adcp.js +547 -9
  6. package/compliance/cache/{3.0.1 → 3.0.5}/index.json +2 -2
  7. package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/audience-sync/index.yaml +1 -1
  8. package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/index.yaml +3 -3
  9. package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-social/index.yaml +7 -0
  10. package/compliance/cache/{3.0.1 → 3.0.5}/universal/runner-output-contract.yaml +23 -4
  11. package/compliance/cache/{3.0.1 → 3.0.5}/universal/storyboard-schema.yaml +106 -1
  12. package/compliance/cache/{3.0.1 → 3.0.5}/universal/v3-envelope-integrity.yaml +4 -2
  13. package/dist/lib/adapters/implicit-account-store.d.ts +170 -0
  14. package/dist/lib/adapters/implicit-account-store.d.ts.map +1 -0
  15. package/dist/lib/adapters/implicit-account-store.js +313 -0
  16. package/dist/lib/adapters/implicit-account-store.js.map +1 -0
  17. package/dist/lib/adapters/index.d.ts +4 -0
  18. package/dist/lib/adapters/index.d.ts.map +1 -1
  19. package/dist/lib/adapters/index.js +19 -1
  20. package/dist/lib/adapters/index.js.map +1 -1
  21. package/dist/lib/adapters/oauth-passthrough-resolver.d.ts +191 -0
  22. package/dist/lib/adapters/oauth-passthrough-resolver.d.ts.map +1 -0
  23. package/dist/lib/adapters/oauth-passthrough-resolver.js +178 -0
  24. package/dist/lib/adapters/oauth-passthrough-resolver.js.map +1 -0
  25. package/dist/lib/adapters/roster-account-store.d.ts +221 -0
  26. package/dist/lib/adapters/roster-account-store.d.ts.map +1 -0
  27. package/dist/lib/adapters/roster-account-store.js +194 -0
  28. package/dist/lib/adapters/roster-account-store.js.map +1 -0
  29. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
  30. package/dist/lib/auth/oauth/ClientCredentialsFlow.js +5 -1
  31. package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
  32. package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
  33. package/dist/lib/auth/oauth/discovery.js +6 -1
  34. package/dist/lib/auth/oauth/discovery.js.map +1 -1
  35. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  36. package/dist/lib/core/SingleAgentClient.d.ts +22 -0
  37. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  38. package/dist/lib/core/SingleAgentClient.js +117 -23
  39. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  40. package/dist/lib/index.d.ts +3 -3
  41. package/dist/lib/index.d.ts.map +1 -1
  42. package/dist/lib/index.js +22 -7
  43. package/dist/lib/index.js.map +1 -1
  44. package/dist/lib/mock-server/creative-template/seed-data.d.ts +45 -0
  45. package/dist/lib/mock-server/creative-template/seed-data.d.ts.map +1 -0
  46. package/dist/lib/mock-server/creative-template/seed-data.js +149 -0
  47. package/dist/lib/mock-server/creative-template/seed-data.js.map +1 -0
  48. package/dist/lib/mock-server/creative-template/server.d.ts +13 -0
  49. package/dist/lib/mock-server/creative-template/server.d.ts.map +1 -0
  50. package/dist/lib/mock-server/creative-template/server.js +325 -0
  51. package/dist/lib/mock-server/creative-template/server.js.map +1 -0
  52. package/dist/lib/mock-server/index.d.ts +64 -0
  53. package/dist/lib/mock-server/index.d.ts.map +1 -0
  54. package/dist/lib/mock-server/index.js +225 -0
  55. package/dist/lib/mock-server/index.js.map +1 -0
  56. package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts +46 -0
  57. package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts.map +1 -0
  58. package/dist/lib/mock-server/sales-guaranteed/seed-data.js +167 -0
  59. package/dist/lib/mock-server/sales-guaranteed/seed-data.js.map +1 -0
  60. package/dist/lib/mock-server/sales-guaranteed/server.d.ts +14 -0
  61. package/dist/lib/mock-server/sales-guaranteed/server.d.ts.map +1 -0
  62. package/dist/lib/mock-server/sales-guaranteed/server.js +893 -0
  63. package/dist/lib/mock-server/sales-guaranteed/server.js.map +1 -0
  64. package/dist/lib/mock-server/sales-social/seed-data.d.ts +34 -0
  65. package/dist/lib/mock-server/sales-social/seed-data.d.ts.map +1 -0
  66. package/dist/lib/mock-server/sales-social/seed-data.js +42 -0
  67. package/dist/lib/mock-server/sales-social/seed-data.js.map +1 -0
  68. package/dist/lib/mock-server/sales-social/server.d.ts +17 -0
  69. package/dist/lib/mock-server/sales-social/server.d.ts.map +1 -0
  70. package/dist/lib/mock-server/sales-social/server.js +1219 -0
  71. package/dist/lib/mock-server/sales-social/server.js.map +1 -0
  72. package/dist/lib/mock-server/signal-marketplace/seed-data.d.ts +77 -0
  73. package/dist/lib/mock-server/signal-marketplace/seed-data.d.ts.map +1 -0
  74. package/dist/lib/mock-server/signal-marketplace/seed-data.js +194 -0
  75. package/dist/lib/mock-server/signal-marketplace/seed-data.js.map +1 -0
  76. package/dist/lib/mock-server/signal-marketplace/server.d.ts +15 -0
  77. package/dist/lib/mock-server/signal-marketplace/server.d.ts.map +1 -0
  78. package/dist/lib/mock-server/signal-marketplace/server.js +382 -0
  79. package/dist/lib/mock-server/signal-marketplace/server.js.map +1 -0
  80. package/dist/lib/protocols/mcp.d.ts +4 -4
  81. package/dist/lib/protocols/mcp.d.ts.map +1 -1
  82. package/dist/lib/protocols/mcp.js +19 -13
  83. package/dist/lib/protocols/mcp.js.map +1 -1
  84. package/dist/lib/schemas-data/3.0/a2ui/bound-value.json +1 -1
  85. package/dist/lib/schemas-data/3.0/a2ui/component.json +1 -1
  86. package/dist/lib/schemas-data/3.0/a2ui/si-catalog.json +25 -25
  87. package/dist/lib/schemas-data/3.0/a2ui/surface.json +2 -2
  88. package/dist/lib/schemas-data/3.0/a2ui/user-action.json +1 -1
  89. package/dist/lib/schemas-data/3.0/account/get-account-financials-request.json +5 -5
  90. package/dist/lib/schemas-data/3.0/account/get-account-financials-response.json +10 -10
  91. package/dist/lib/schemas-data/3.0/account/list-accounts-request.json +4 -4
  92. package/dist/lib/schemas-data/3.0/account/list-accounts-response.json +6 -6
  93. package/dist/lib/schemas-data/3.0/account/report-usage-request.json +5 -5
  94. package/dist/lib/schemas-data/3.0/account/report-usage-response.json +4 -4
  95. package/dist/lib/schemas-data/3.0/account/sync-accounts-request.json +9 -9
  96. package/dist/lib/schemas-data/3.0/account/sync-accounts-response.json +12 -12
  97. package/dist/lib/schemas-data/3.0/account/sync-governance-request.json +5 -5
  98. package/dist/lib/schemas-data/3.0/account/sync-governance-response.json +8 -8
  99. package/dist/lib/schemas-data/3.0/adagents.json +32 -32
  100. package/dist/lib/schemas-data/3.0/brand/acquire-rights-request.json +8 -8
  101. package/dist/lib/schemas-data/3.0/brand/acquire-rights-response.json +14 -14
  102. package/dist/lib/schemas-data/3.0/brand/creative-approval-request.json +4 -4
  103. package/dist/lib/schemas-data/3.0/brand/creative-approval-response.json +10 -10
  104. package/dist/lib/schemas-data/3.0/brand/get-brand-identity-request.json +3 -3
  105. package/dist/lib/schemas-data/3.0/brand/get-brand-identity-response.json +8 -8
  106. package/dist/lib/schemas-data/3.0/brand/get-rights-request.json +7 -7
  107. package/dist/lib/schemas-data/3.0/brand/get-rights-response.json +9 -9
  108. package/dist/lib/schemas-data/3.0/brand/revocation-notification.json +4 -4
  109. package/dist/lib/schemas-data/3.0/brand/rights-pricing-option.json +5 -5
  110. package/dist/lib/schemas-data/3.0/brand/rights-terms.json +3 -3
  111. package/dist/lib/schemas-data/3.0/brand/update-rights-request.json +4 -4
  112. package/dist/lib/schemas-data/3.0/brand/update-rights-response.json +9 -9
  113. package/dist/lib/schemas-data/3.0/brand.json +14 -14
  114. package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-request.json +2 -2
  115. package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-response.json +35 -4
  116. package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-request.json +2 -2
  117. package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-response.json +35 -4
  118. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-request.json +2 -2
  119. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-response.json +35 -4
  120. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-request.json +2 -2
  121. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-response.json +35 -4
  122. package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-request.json +2 -2
  123. package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-response.json +35 -4
  124. package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-request.json +2 -2
  125. package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-response.json +35 -4
  126. package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-request.json +2 -2
  127. package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-response.json +35 -4
  128. package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-request.json +2 -2
  129. package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-response.json +2 -2
  130. package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-request.json +2 -2
  131. package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-response.json +2 -2
  132. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-request.json +2 -2
  133. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-response.json +40 -6
  134. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-request.json +7 -4
  135. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-response.json +35 -4
  136. package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-request.json +2 -2
  137. package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-response.json +38 -7
  138. package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-request.json +2 -2
  139. package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-response.json +40 -6
  140. package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-request.json +11 -5
  141. package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-response.json +40 -6
  142. package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-request.json +7 -4
  143. package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-response.json +101 -8
  144. package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-request.json +7 -4
  145. package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-response.json +110 -11
  146. package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-request.json +7 -4
  147. package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-response.json +68 -6
  148. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-request.json +2 -2
  149. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-response.json +35 -4
  150. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-request.json +2 -2
  151. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-response.json +35 -4
  152. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-request.json +2 -2
  153. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-response.json +35 -4
  154. package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-request.json +2 -2
  155. package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-response.json +38 -7
  156. package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-request.json +2 -2
  157. package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-response.json +35 -4
  158. package/dist/lib/schemas-data/3.0/bundled/media-buy/package-request.json +7 -4
  159. package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-request.json +2 -2
  160. package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-response.json +35 -4
  161. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-request.json +2 -2
  162. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-response.json +68 -6
  163. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-request.json +2 -2
  164. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-response.json +68 -6
  165. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-request.json +2 -2
  166. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-response.json +68 -6
  167. package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-request.json +11 -5
  168. package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-response.json +35 -4
  169. package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-request.json +2 -2
  170. package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-response.json +2 -2
  171. package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-request.json +2 -2
  172. package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-response.json +2 -2
  173. package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-request.json +2 -2
  174. package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-response.json +2 -2
  175. package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-request.json +2 -2
  176. package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-response.json +2 -2
  177. package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-request.json +2 -2
  178. package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-response.json +2 -2
  179. package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-request.json +2 -2
  180. package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-response.json +2 -2
  181. package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-request.json +2 -2
  182. package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-response.json +36 -5
  183. package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-request.json +2 -2
  184. package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-response.json +35 -4
  185. package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-request.json +2 -2
  186. package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-response.json +35 -4
  187. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-request.json +2 -2
  188. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-response.json +35 -4
  189. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-request.json +2 -2
  190. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-response.json +35 -4
  191. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-request.json +2 -2
  192. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-response.json +35 -4
  193. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-request.json +2 -2
  194. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-response.json +35 -4
  195. package/dist/lib/schemas-data/3.0/collection/base-collection-source.json +3 -3
  196. package/dist/lib/schemas-data/3.0/collection/collection-list-changed-webhook.json +2 -2
  197. package/dist/lib/schemas-data/3.0/collection/collection-list-filters.json +7 -7
  198. package/dist/lib/schemas-data/3.0/collection/collection-list.json +5 -5
  199. package/dist/lib/schemas-data/3.0/collection/create-collection-list-request.json +7 -7
  200. package/dist/lib/schemas-data/3.0/collection/create-collection-list-response.json +4 -4
  201. package/dist/lib/schemas-data/3.0/collection/delete-collection-list-request.json +4 -4
  202. package/dist/lib/schemas-data/3.0/collection/delete-collection-list-response.json +3 -3
  203. package/dist/lib/schemas-data/3.0/collection/get-collection-list-request.json +4 -4
  204. package/dist/lib/schemas-data/3.0/collection/get-collection-list-response.json +10 -10
  205. package/dist/lib/schemas-data/3.0/collection/list-collection-lists-request.json +5 -5
  206. package/dist/lib/schemas-data/3.0/collection/list-collection-lists-response.json +5 -5
  207. package/dist/lib/schemas-data/3.0/collection/update-collection-list-request.json +7 -7
  208. package/dist/lib/schemas-data/3.0/collection/update-collection-list-response.json +4 -4
  209. package/dist/lib/schemas-data/3.0/content-standards/artifact-webhook-payload.json +3 -3
  210. package/dist/lib/schemas-data/3.0/content-standards/artifact.json +7 -7
  211. package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-request.json +4 -4
  212. package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-response.json +8 -8
  213. package/dist/lib/schemas-data/3.0/content-standards/content-standards.json +7 -7
  214. package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-request.json +7 -7
  215. package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-response.json +6 -6
  216. package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-request.json +3 -3
  217. package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-response.json +7 -7
  218. package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-request.json +4 -4
  219. package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-response.json +8 -8
  220. package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-request.json +5 -5
  221. package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-response.json +8 -8
  222. package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-request.json +7 -7
  223. package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-response.json +6 -6
  224. package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-request.json +4 -4
  225. package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-response.json +8 -8
  226. package/dist/lib/schemas-data/3.0/core/account-ref.json +2 -2
  227. package/dist/lib/schemas-data/3.0/core/account.json +9 -9
  228. package/dist/lib/schemas-data/3.0/core/activation-key.json +1 -1
  229. package/dist/lib/schemas-data/3.0/core/ad-inventory-config.json +1 -1
  230. package/dist/lib/schemas-data/3.0/core/agent-encryption-key.json +1 -1
  231. package/dist/lib/schemas-data/3.0/core/agent-signing-key.json +1 -1
  232. package/dist/lib/schemas-data/3.0/core/app-item.json +4 -4
  233. package/dist/lib/schemas-data/3.0/core/assets/asset-union.json +53 -0
  234. package/dist/lib/schemas-data/3.0/core/assets/audio-asset.json +3 -3
  235. package/dist/lib/schemas-data/3.0/core/assets/brief-asset.json +2 -2
  236. package/dist/lib/schemas-data/3.0/core/assets/catalog-asset.json +2 -2
  237. package/dist/lib/schemas-data/3.0/core/assets/css-asset.json +2 -2
  238. package/dist/lib/schemas-data/3.0/core/assets/daast-asset.json +4 -4
  239. package/dist/lib/schemas-data/3.0/core/assets/html-asset.json +2 -2
  240. package/dist/lib/schemas-data/3.0/core/assets/image-asset.json +2 -2
  241. package/dist/lib/schemas-data/3.0/core/assets/javascript-asset.json +3 -3
  242. package/dist/lib/schemas-data/3.0/core/assets/markdown-asset.json +2 -2
  243. package/dist/lib/schemas-data/3.0/core/assets/text-asset.json +2 -2
  244. package/dist/lib/schemas-data/3.0/core/assets/url-asset.json +6 -5
  245. package/dist/lib/schemas-data/3.0/core/assets/vast-asset.json +4 -4
  246. package/dist/lib/schemas-data/3.0/core/assets/video-asset.json +7 -7
  247. package/dist/lib/schemas-data/3.0/core/assets/webhook-asset.json +7 -7
  248. package/dist/lib/schemas-data/3.0/core/async-response-data.json +25 -25
  249. package/dist/lib/schemas-data/3.0/core/attribution-window.json +4 -4
  250. package/dist/lib/schemas-data/3.0/core/audience-member.json +3 -3
  251. package/dist/lib/schemas-data/3.0/core/audience-selector.json +4 -4
  252. package/dist/lib/schemas-data/3.0/core/brand-id.json +1 -1
  253. package/dist/lib/schemas-data/3.0/core/brand-ref.json +2 -2
  254. package/dist/lib/schemas-data/3.0/core/business-entity.json +2 -2
  255. package/dist/lib/schemas-data/3.0/core/cancellation-policy.json +2 -2
  256. package/dist/lib/schemas-data/3.0/core/catalog-field-mapping.json +2 -2
  257. package/dist/lib/schemas-data/3.0/core/catalog.json +7 -7
  258. package/dist/lib/schemas-data/3.0/core/catchment.json +5 -5
  259. package/dist/lib/schemas-data/3.0/core/collection-distribution.json +2 -2
  260. package/dist/lib/schemas-data/3.0/core/collection-list-ref.json +1 -1
  261. package/dist/lib/schemas-data/3.0/core/collection-selector.json +1 -1
  262. package/dist/lib/schemas-data/3.0/core/collection.json +13 -13
  263. package/dist/lib/schemas-data/3.0/core/content-rating.json +2 -2
  264. package/dist/lib/schemas-data/3.0/core/context.json +1 -1
  265. package/dist/lib/schemas-data/3.0/core/creative-asset.json +6 -52
  266. package/dist/lib/schemas-data/3.0/core/creative-assignment.json +1 -1
  267. package/dist/lib/schemas-data/3.0/core/creative-brief.json +4 -4
  268. package/dist/lib/schemas-data/3.0/core/creative-consumption.json +1 -1
  269. package/dist/lib/schemas-data/3.0/core/creative-filters.json +4 -4
  270. package/dist/lib/schemas-data/3.0/core/creative-item.json +1 -1
  271. package/dist/lib/schemas-data/3.0/core/creative-manifest.json +7 -53
  272. package/dist/lib/schemas-data/3.0/core/creative-policy.json +3 -3
  273. package/dist/lib/schemas-data/3.0/core/creative-variable.json +1 -1
  274. package/dist/lib/schemas-data/3.0/core/creative-variant.json +5 -5
  275. package/dist/lib/schemas-data/3.0/core/data-provider-signal-selector.json +1 -1
  276. package/dist/lib/schemas-data/3.0/core/date-range.json +1 -1
  277. package/dist/lib/schemas-data/3.0/core/datetime-range.json +1 -1
  278. package/dist/lib/schemas-data/3.0/core/daypart-target.json +2 -2
  279. package/dist/lib/schemas-data/3.0/core/deadline-policy.json +1 -1
  280. package/dist/lib/schemas-data/3.0/core/delivery-forecast.json +7 -7
  281. package/dist/lib/schemas-data/3.0/core/delivery-metrics.json +5 -5
  282. package/dist/lib/schemas-data/3.0/core/deployment.json +3 -3
  283. package/dist/lib/schemas-data/3.0/core/destination-item.json +4 -4
  284. package/dist/lib/schemas-data/3.0/core/destination.json +1 -1
  285. package/dist/lib/schemas-data/3.0/core/diagnostic-issue.json +1 -1
  286. package/dist/lib/schemas-data/3.0/core/duration.json +1 -1
  287. package/dist/lib/schemas-data/3.0/core/education-item.json +4 -4
  288. package/dist/lib/schemas-data/3.0/core/error.json +34 -3
  289. package/dist/lib/schemas-data/3.0/core/event-custom-data.json +2 -2
  290. package/dist/lib/schemas-data/3.0/core/event-source-health.json +3 -3
  291. package/dist/lib/schemas-data/3.0/core/event.json +6 -6
  292. package/dist/lib/schemas-data/3.0/core/ext.json +1 -1
  293. package/dist/lib/schemas-data/3.0/core/feature-requirement.json +1 -1
  294. package/dist/lib/schemas-data/3.0/core/flight-item.json +4 -4
  295. package/dist/lib/schemas-data/3.0/core/forecast-point.json +18 -18
  296. package/dist/lib/schemas-data/3.0/core/forecast-range.json +1 -1
  297. package/dist/lib/schemas-data/3.0/core/format-id.json +1 -1
  298. package/dist/lib/schemas-data/3.0/core/format.json +42 -42
  299. package/dist/lib/schemas-data/3.0/core/frequency-cap.json +4 -4
  300. package/dist/lib/schemas-data/3.0/core/generation-credential.json +3 -3
  301. package/dist/lib/schemas-data/3.0/core/geo-breakdown-support.json +3 -3
  302. package/dist/lib/schemas-data/3.0/core/hotel-item.json +4 -4
  303. package/dist/lib/schemas-data/3.0/core/identifier.json +2 -2
  304. package/dist/lib/schemas-data/3.0/core/industry-identifier.json +2 -2
  305. package/dist/lib/schemas-data/3.0/core/insertion-order.json +1 -1
  306. package/dist/lib/schemas-data/3.0/core/installment-deadlines.json +2 -2
  307. package/dist/lib/schemas-data/3.0/core/installment.json +9 -9
  308. package/dist/lib/schemas-data/3.0/core/job-item.json +3 -3
  309. package/dist/lib/schemas-data/3.0/core/limited-series.json +1 -1
  310. package/dist/lib/schemas-data/3.0/core/material-deadline.json +1 -1
  311. package/dist/lib/schemas-data/3.0/core/mcp-webhook-payload.json +5 -5
  312. package/dist/lib/schemas-data/3.0/core/measurement-readiness.json +5 -5
  313. package/dist/lib/schemas-data/3.0/core/measurement-terms.json +3 -3
  314. package/dist/lib/schemas-data/3.0/core/measurement-window.json +1 -1
  315. package/dist/lib/schemas-data/3.0/core/media-buy-features.json +1 -1
  316. package/dist/lib/schemas-data/3.0/core/media-buy.json +7 -7
  317. package/dist/lib/schemas-data/3.0/core/offering-asset-group.json +16 -16
  318. package/dist/lib/schemas-data/3.0/core/offering.json +5 -5
  319. package/dist/lib/schemas-data/3.0/core/optimization-goal.json +6 -6
  320. package/dist/lib/schemas-data/3.0/core/outcome-measurement.json +2 -2
  321. package/dist/lib/schemas-data/3.0/core/overlay.json +1 -1
  322. package/dist/lib/schemas-data/3.0/core/package.json +14 -14
  323. package/dist/lib/schemas-data/3.0/core/pagination-request.json +1 -1
  324. package/dist/lib/schemas-data/3.0/core/pagination-response.json +1 -1
  325. package/dist/lib/schemas-data/3.0/core/performance-feedback.json +3 -3
  326. package/dist/lib/schemas-data/3.0/core/performance-standard.json +4 -4
  327. package/dist/lib/schemas-data/3.0/core/placement-definition.json +5 -5
  328. package/dist/lib/schemas-data/3.0/core/placement.json +2 -2
  329. package/dist/lib/schemas-data/3.0/core/planned-delivery.json +5 -5
  330. package/dist/lib/schemas-data/3.0/core/price.json +1 -1
  331. package/dist/lib/schemas-data/3.0/core/pricing-option.json +10 -10
  332. package/dist/lib/schemas-data/3.0/core/product-allocation.json +4 -4
  333. package/dist/lib/schemas-data/3.0/core/product-filters.json +16 -16
  334. package/dist/lib/schemas-data/3.0/core/product.json +28 -28
  335. package/dist/lib/schemas-data/3.0/core/property-id.json +1 -1
  336. package/dist/lib/schemas-data/3.0/core/property-list-ref.json +1 -1
  337. package/dist/lib/schemas-data/3.0/core/property-tag.json +1 -1
  338. package/dist/lib/schemas-data/3.0/core/property.json +6 -6
  339. package/dist/lib/schemas-data/3.0/core/proposal.json +6 -6
  340. package/dist/lib/schemas-data/3.0/core/protocol-envelope.json +3 -3
  341. package/dist/lib/schemas-data/3.0/core/provenance.json +6 -6
  342. package/dist/lib/schemas-data/3.0/core/publisher-property-selector.json +3 -3
  343. package/dist/lib/schemas-data/3.0/core/push-notification-config.json +2 -2
  344. package/dist/lib/schemas-data/3.0/core/real-estate-item.json +4 -4
  345. package/dist/lib/schemas-data/3.0/core/reference-asset.json +1 -1
  346. package/dist/lib/schemas-data/3.0/core/reporting-capabilities.json +5 -5
  347. package/dist/lib/schemas-data/3.0/core/reporting-webhook.json +3 -3
  348. package/dist/lib/schemas-data/3.0/core/requirements/asset-requirements.json +13 -13
  349. package/dist/lib/schemas-data/3.0/core/requirements/audio-asset-requirements.json +1 -1
  350. package/dist/lib/schemas-data/3.0/core/requirements/catalog-field-binding.json +4 -4
  351. package/dist/lib/schemas-data/3.0/core/requirements/catalog-requirements.json +5 -5
  352. package/dist/lib/schemas-data/3.0/core/requirements/css-asset-requirements.json +1 -1
  353. package/dist/lib/schemas-data/3.0/core/requirements/daast-asset-requirements.json +1 -1
  354. package/dist/lib/schemas-data/3.0/core/requirements/html-asset-requirements.json +1 -1
  355. package/dist/lib/schemas-data/3.0/core/requirements/image-asset-requirements.json +2 -2
  356. package/dist/lib/schemas-data/3.0/core/requirements/javascript-asset-requirements.json +1 -1
  357. package/dist/lib/schemas-data/3.0/core/requirements/markdown-asset-requirements.json +1 -1
  358. package/dist/lib/schemas-data/3.0/core/requirements/offering-asset-constraint.json +4 -4
  359. package/dist/lib/schemas-data/3.0/core/requirements/text-asset-requirements.json +1 -1
  360. package/dist/lib/schemas-data/3.0/core/requirements/url-asset-requirements.json +2 -2
  361. package/dist/lib/schemas-data/3.0/core/requirements/vast-asset-requirements.json +1 -1
  362. package/dist/lib/schemas-data/3.0/core/requirements/video-asset-requirements.json +6 -6
  363. package/dist/lib/schemas-data/3.0/core/requirements/webhook-asset-requirements.json +1 -1
  364. package/dist/lib/schemas-data/3.0/core/response.json +1 -1
  365. package/dist/lib/schemas-data/3.0/core/rights-constraint.json +4 -4
  366. package/dist/lib/schemas-data/3.0/core/seller-agent-ref.json +1 -1
  367. package/dist/lib/schemas-data/3.0/core/signal-definition.json +3 -3
  368. package/dist/lib/schemas-data/3.0/core/signal-filters.json +2 -2
  369. package/dist/lib/schemas-data/3.0/core/signal-id.json +1 -1
  370. package/dist/lib/schemas-data/3.0/core/signal-pricing-option.json +2 -2
  371. package/dist/lib/schemas-data/3.0/core/signal-pricing.json +6 -6
  372. package/dist/lib/schemas-data/3.0/core/signal-targeting.json +4 -4
  373. package/dist/lib/schemas-data/3.0/core/special.json +2 -2
  374. package/dist/lib/schemas-data/3.0/core/start-timing.json +1 -1
  375. package/dist/lib/schemas-data/3.0/core/store-item.json +3 -3
  376. package/dist/lib/schemas-data/3.0/core/talent.json +2 -2
  377. package/dist/lib/schemas-data/3.0/core/targeting.json +20 -20
  378. package/dist/lib/schemas-data/3.0/core/tasks-get-request.json +3 -3
  379. package/dist/lib/schemas-data/3.0/core/tasks-get-response.json +7 -7
  380. package/dist/lib/schemas-data/3.0/core/tasks-list-request.json +11 -11
  381. package/dist/lib/schemas-data/3.0/core/tasks-list-response.json +6 -6
  382. package/dist/lib/schemas-data/3.0/core/user-match.json +3 -3
  383. package/dist/lib/schemas-data/3.0/core/vehicle-item.json +4 -4
  384. package/dist/lib/schemas-data/3.0/core/vendor-pricing-option.json +2 -2
  385. package/dist/lib/schemas-data/3.0/core/x-entity-types.json +1 -1
  386. package/dist/lib/schemas-data/3.0/creative/asset-types/index.json +5 -5
  387. package/dist/lib/schemas-data/3.0/creative/creative-feature-result.json +2 -2
  388. package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-request.json +5 -5
  389. package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-response.json +7 -7
  390. package/dist/lib/schemas-data/3.0/creative/get-creative-features-request.json +5 -5
  391. package/dist/lib/schemas-data/3.0/creative/get-creative-features-response.json +8 -8
  392. package/dist/lib/schemas-data/3.0/creative/list-creative-formats-request.json +11 -11
  393. package/dist/lib/schemas-data/3.0/creative/list-creative-formats-response.json +7 -7
  394. package/dist/lib/schemas-data/3.0/creative/list-creatives-request.json +8 -8
  395. package/dist/lib/schemas-data/3.0/creative/list-creatives-response.json +14 -60
  396. package/dist/lib/schemas-data/3.0/creative/preview-creative-request.json +11 -11
  397. package/dist/lib/schemas-data/3.0/creative/preview-creative-response.json +12 -12
  398. package/dist/lib/schemas-data/3.0/creative/preview-render.json +1 -1
  399. package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-input-required.json +3 -3
  400. package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-submitted.json +3 -3
  401. package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-working.json +3 -3
  402. package/dist/lib/schemas-data/3.0/creative/sync-creatives-request.json +7 -7
  403. package/dist/lib/schemas-data/3.0/creative/sync-creatives-response.json +13 -13
  404. package/dist/lib/schemas-data/3.0/enums/account-scope.json +1 -1
  405. package/dist/lib/schemas-data/3.0/enums/account-status.json +1 -1
  406. package/dist/lib/schemas-data/3.0/enums/action-source.json +1 -1
  407. package/dist/lib/schemas-data/3.0/enums/adcp-protocol.json +1 -1
  408. package/dist/lib/schemas-data/3.0/enums/adjustment-kind.json +1 -1
  409. package/dist/lib/schemas-data/3.0/enums/advertiser-industry.json +1 -1
  410. package/dist/lib/schemas-data/3.0/enums/age-verification-method.json +1 -1
  411. package/dist/lib/schemas-data/3.0/enums/assessment-status.json +1 -1
  412. package/dist/lib/schemas-data/3.0/enums/asset-content-type.json +1 -1
  413. package/dist/lib/schemas-data/3.0/enums/attribution-model.json +1 -1
  414. package/dist/lib/schemas-data/3.0/enums/audience-source.json +1 -1
  415. package/dist/lib/schemas-data/3.0/enums/audience-status.json +1 -1
  416. package/dist/lib/schemas-data/3.0/enums/audio-channel-layout.json +1 -1
  417. package/dist/lib/schemas-data/3.0/enums/auth-scheme.json +1 -1
  418. package/dist/lib/schemas-data/3.0/enums/available-metric.json +1 -1
  419. package/dist/lib/schemas-data/3.0/enums/billing-party.json +1 -1
  420. package/dist/lib/schemas-data/3.0/enums/binary-verdict.json +1 -1
  421. package/dist/lib/schemas-data/3.0/enums/brand-agent-type.json +1 -1
  422. package/dist/lib/schemas-data/3.0/enums/canceled-by.json +1 -1
  423. package/dist/lib/schemas-data/3.0/enums/catalog-action.json +1 -1
  424. package/dist/lib/schemas-data/3.0/enums/catalog-item-status.json +1 -1
  425. package/dist/lib/schemas-data/3.0/enums/catalog-type.json +1 -1
  426. package/dist/lib/schemas-data/3.0/enums/channels.json +1 -1
  427. package/dist/lib/schemas-data/3.0/enums/cloud-storage-protocol.json +1 -1
  428. package/dist/lib/schemas-data/3.0/enums/co-branding-requirement.json +1 -1
  429. package/dist/lib/schemas-data/3.0/enums/collection-cadence.json +1 -1
  430. package/dist/lib/schemas-data/3.0/enums/collection-kind.json +1 -1
  431. package/dist/lib/schemas-data/3.0/enums/collection-relationship.json +1 -1
  432. package/dist/lib/schemas-data/3.0/enums/collection-status.json +1 -1
  433. package/dist/lib/schemas-data/3.0/enums/consent-basis.json +1 -1
  434. package/dist/lib/schemas-data/3.0/enums/content-id-type.json +1 -1
  435. package/dist/lib/schemas-data/3.0/enums/content-rating-system.json +1 -1
  436. package/dist/lib/schemas-data/3.0/enums/creative-action.json +1 -1
  437. package/dist/lib/schemas-data/3.0/enums/creative-agent-capability.json +1 -1
  438. package/dist/lib/schemas-data/3.0/enums/creative-approval-status.json +1 -1
  439. package/dist/lib/schemas-data/3.0/enums/creative-identifier-type.json +1 -1
  440. package/dist/lib/schemas-data/3.0/enums/creative-quality.json +1 -1
  441. package/dist/lib/schemas-data/3.0/enums/creative-sort-field.json +1 -1
  442. package/dist/lib/schemas-data/3.0/enums/creative-status.json +1 -1
  443. package/dist/lib/schemas-data/3.0/enums/daast-tracking-event.json +1 -1
  444. package/dist/lib/schemas-data/3.0/enums/daast-version.json +1 -1
  445. package/dist/lib/schemas-data/3.0/enums/day-of-week.json +1 -1
  446. package/dist/lib/schemas-data/3.0/enums/delegation-authority.json +1 -1
  447. package/dist/lib/schemas-data/3.0/enums/delivery-type.json +1 -1
  448. package/dist/lib/schemas-data/3.0/enums/demographic-system.json +1 -1
  449. package/dist/lib/schemas-data/3.0/enums/derivative-type.json +1 -1
  450. package/dist/lib/schemas-data/3.0/enums/device-platform.json +1 -1
  451. package/dist/lib/schemas-data/3.0/enums/device-type.json +1 -1
  452. package/dist/lib/schemas-data/3.0/enums/digital-source-type.json +1 -1
  453. package/dist/lib/schemas-data/3.0/enums/dimension-unit.json +1 -1
  454. package/dist/lib/schemas-data/3.0/enums/disclosure-persistence.json +1 -1
  455. package/dist/lib/schemas-data/3.0/enums/disclosure-position.json +1 -1
  456. package/dist/lib/schemas-data/3.0/enums/distance-unit.json +1 -1
  457. package/dist/lib/schemas-data/3.0/enums/distribution-identifier-type.json +1 -1
  458. package/dist/lib/schemas-data/3.0/enums/error-code.json +185 -2
  459. package/dist/lib/schemas-data/3.0/enums/escalation-severity.json +1 -1
  460. package/dist/lib/schemas-data/3.0/enums/event-type.json +1 -1
  461. package/dist/lib/schemas-data/3.0/enums/exclusivity.json +1 -1
  462. package/dist/lib/schemas-data/3.0/enums/feature-check-status.json +1 -1
  463. package/dist/lib/schemas-data/3.0/enums/feed-format.json +1 -1
  464. package/dist/lib/schemas-data/3.0/enums/feedback-source.json +1 -1
  465. package/dist/lib/schemas-data/3.0/enums/forecast-method.json +1 -1
  466. package/dist/lib/schemas-data/3.0/enums/forecast-range-unit.json +1 -1
  467. package/dist/lib/schemas-data/3.0/enums/forecastable-metric.json +1 -1
  468. package/dist/lib/schemas-data/3.0/enums/format-id-parameter.json +1 -1
  469. package/dist/lib/schemas-data/3.0/enums/frame-rate-type.json +1 -1
  470. package/dist/lib/schemas-data/3.0/enums/frequency-cap-scope.json +1 -1
  471. package/dist/lib/schemas-data/3.0/enums/genre-taxonomy.json +1 -1
  472. package/dist/lib/schemas-data/3.0/enums/geo-level.json +1 -1
  473. package/dist/lib/schemas-data/3.0/enums/gop-type.json +1 -1
  474. package/dist/lib/schemas-data/3.0/enums/governance-decision.json +1 -1
  475. package/dist/lib/schemas-data/3.0/enums/governance-domain.json +1 -1
  476. package/dist/lib/schemas-data/3.0/enums/governance-mode.json +1 -1
  477. package/dist/lib/schemas-data/3.0/enums/governance-phase.json +1 -1
  478. package/dist/lib/schemas-data/3.0/enums/history-entry-type.json +1 -1
  479. package/dist/lib/schemas-data/3.0/enums/http-method.json +1 -1
  480. package/dist/lib/schemas-data/3.0/enums/identifier-types.json +1 -1
  481. package/dist/lib/schemas-data/3.0/enums/installment-status.json +1 -1
  482. package/dist/lib/schemas-data/3.0/enums/javascript-module-type.json +1 -1
  483. package/dist/lib/schemas-data/3.0/enums/landing-page-requirement.json +1 -1
  484. package/dist/lib/schemas-data/3.0/enums/makegood-remedy.json +1 -1
  485. package/dist/lib/schemas-data/3.0/enums/markdown-flavor.json +1 -1
  486. package/dist/lib/schemas-data/3.0/enums/match-id-type.json +1 -1
  487. package/dist/lib/schemas-data/3.0/enums/match-type.json +1 -1
  488. package/dist/lib/schemas-data/3.0/enums/media-buy-status.json +1 -1
  489. package/dist/lib/schemas-data/3.0/enums/media-buy-valid-action.json +1 -1
  490. package/dist/lib/schemas-data/3.0/enums/metric-type.json +1 -1
  491. package/dist/lib/schemas-data/3.0/enums/metro-system.json +1 -1
  492. package/dist/lib/schemas-data/3.0/enums/moov-atom-position.json +1 -1
  493. package/dist/lib/schemas-data/3.0/enums/notification-type.json +1 -1
  494. package/dist/lib/schemas-data/3.0/enums/outcome-type.json +1 -1
  495. package/dist/lib/schemas-data/3.0/enums/pacing.json +1 -1
  496. package/dist/lib/schemas-data/3.0/enums/payment-terms.json +1 -1
  497. package/dist/lib/schemas-data/3.0/enums/performance-standard-metric.json +1 -1
  498. package/dist/lib/schemas-data/3.0/enums/policy-category.json +1 -1
  499. package/dist/lib/schemas-data/3.0/enums/policy-enforcement.json +1 -1
  500. package/dist/lib/schemas-data/3.0/enums/postal-system.json +1 -1
  501. package/dist/lib/schemas-data/3.0/enums/preview-output-format.json +1 -1
  502. package/dist/lib/schemas-data/3.0/enums/pricing-model.json +1 -1
  503. package/dist/lib/schemas-data/3.0/enums/production-quality.json +1 -1
  504. package/dist/lib/schemas-data/3.0/enums/property-type.json +1 -1
  505. package/dist/lib/schemas-data/3.0/enums/proposal-status.json +1 -1
  506. package/dist/lib/schemas-data/3.0/enums/publisher-identifier-types.json +1 -1
  507. package/dist/lib/schemas-data/3.0/enums/purchase-type.json +1 -1
  508. package/dist/lib/schemas-data/3.0/enums/reach-unit.json +1 -1
  509. package/dist/lib/schemas-data/3.0/enums/reporting-frequency.json +1 -1
  510. package/dist/lib/schemas-data/3.0/enums/response-type.json +1 -1
  511. package/dist/lib/schemas-data/3.0/enums/restricted-attribute.json +1 -1
  512. package/dist/lib/schemas-data/3.0/enums/right-type.json +1 -1
  513. package/dist/lib/schemas-data/3.0/enums/right-use.json +1 -1
  514. package/dist/lib/schemas-data/3.0/enums/rights-billing-period.json +1 -1
  515. package/dist/lib/schemas-data/3.0/enums/scan-type.json +1 -1
  516. package/dist/lib/schemas-data/3.0/enums/si-session-status.json +1 -1
  517. package/dist/lib/schemas-data/3.0/enums/signal-catalog-type.json +1 -1
  518. package/dist/lib/schemas-data/3.0/enums/signal-source.json +1 -1
  519. package/dist/lib/schemas-data/3.0/enums/signal-value-type.json +1 -1
  520. package/dist/lib/schemas-data/3.0/enums/snapshot-unavailable-reason.json +1 -1
  521. package/dist/lib/schemas-data/3.0/enums/sort-direction.json +1 -1
  522. package/dist/lib/schemas-data/3.0/enums/sort-metric.json +1 -1
  523. package/dist/lib/schemas-data/3.0/enums/special-category.json +1 -1
  524. package/dist/lib/schemas-data/3.0/enums/specialism.json +1 -1
  525. package/dist/lib/schemas-data/3.0/enums/talent-role.json +1 -1
  526. package/dist/lib/schemas-data/3.0/enums/task-status.json +1 -1
  527. package/dist/lib/schemas-data/3.0/enums/task-type.json +1 -1
  528. package/dist/lib/schemas-data/3.0/enums/transport-mode.json +1 -1
  529. package/dist/lib/schemas-data/3.0/enums/travel-time-unit.json +1 -1
  530. package/dist/lib/schemas-data/3.0/enums/uid-type.json +1 -1
  531. package/dist/lib/schemas-data/3.0/enums/universal-macro.json +1 -1
  532. package/dist/lib/schemas-data/3.0/enums/update-frequency.json +1 -1
  533. package/dist/lib/schemas-data/3.0/enums/url-asset-type.json +1 -1
  534. package/dist/lib/schemas-data/3.0/enums/validation-mode.json +1 -1
  535. package/dist/lib/schemas-data/3.0/enums/vast-tracking-event.json +1 -1
  536. package/dist/lib/schemas-data/3.0/enums/vast-version.json +1 -1
  537. package/dist/lib/schemas-data/3.0/enums/viewability-standard.json +1 -1
  538. package/dist/lib/schemas-data/3.0/enums/wcag-level.json +1 -1
  539. package/dist/lib/schemas-data/3.0/enums/webhook-response-type.json +1 -1
  540. package/dist/lib/schemas-data/3.0/enums/webhook-security-method.json +1 -1
  541. package/dist/lib/schemas-data/3.0/error-details/account-setup-required.json +2 -2
  542. package/dist/lib/schemas-data/3.0/error-details/audience-too-small.json +2 -2
  543. package/dist/lib/schemas-data/3.0/error-details/budget-too-low.json +2 -2
  544. package/dist/lib/schemas-data/3.0/error-details/conflict.json +2 -2
  545. package/dist/lib/schemas-data/3.0/error-details/creative-rejected.json +2 -2
  546. package/dist/lib/schemas-data/3.0/error-details/policy-violation.json +2 -2
  547. package/dist/lib/schemas-data/3.0/error-details/rate-limited.json +1 -1
  548. package/dist/lib/schemas-data/3.0/error-details/vendor-error-codes.json +1 -1
  549. package/dist/lib/schemas-data/3.0/extensions/extension-meta.json +1 -1
  550. package/dist/lib/schemas-data/3.0/extensions/index.json +2 -2
  551. package/dist/lib/schemas-data/3.0/governance/attribute-definition.json +1 -1
  552. package/dist/lib/schemas-data/3.0/governance/audience-constraints.json +3 -3
  553. package/dist/lib/schemas-data/3.0/governance/check-governance-request.json +7 -7
  554. package/dist/lib/schemas-data/3.0/governance/check-governance-response.json +6 -6
  555. package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-request.json +4 -4
  556. package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-response.json +9 -9
  557. package/dist/lib/schemas-data/3.0/governance/policy-category-definition.json +2 -2
  558. package/dist/lib/schemas-data/3.0/governance/policy-entry.json +6 -6
  559. package/dist/lib/schemas-data/3.0/governance/policy-ref.json +1 -1
  560. package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-request.json +6 -6
  561. package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-response.json +4 -4
  562. package/dist/lib/schemas-data/3.0/governance/sync-plans-request.json +13 -13
  563. package/dist/lib/schemas-data/3.0/governance/sync-plans-response.json +4 -4
  564. package/dist/lib/schemas-data/3.0/index.json +364 -364
  565. package/dist/lib/schemas-data/3.0/manifest.json +1190 -0
  566. package/dist/lib/schemas-data/3.0/manifest.schema.json +202 -0
  567. package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-input-required.json +4 -4
  568. package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-submitted.json +3 -3
  569. package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-working.json +3 -3
  570. package/dist/lib/schemas-data/3.0/media-buy/build-creative-request.json +11 -11
  571. package/dist/lib/schemas-data/3.0/media-buy/build-creative-response.json +17 -17
  572. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-input-required.json +4 -4
  573. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-submitted.json +3 -3
  574. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-working.json +3 -3
  575. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-request.json +12 -12
  576. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-response.json +15 -15
  577. package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-request.json +17 -17
  578. package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-response.json +24 -24
  579. package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-request.json +7 -7
  580. package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-response.json +19 -19
  581. package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-input-required.json +4 -4
  582. package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-submitted.json +3 -3
  583. package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-working.json +3 -3
  584. package/dist/lib/schemas-data/3.0/media-buy/get-products-request.json +11 -11
  585. package/dist/lib/schemas-data/3.0/media-buy/get-products-response.json +8 -8
  586. package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-request.json +11 -11
  587. package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-response.json +7 -7
  588. package/dist/lib/schemas-data/3.0/media-buy/log-event-request.json +4 -4
  589. package/dist/lib/schemas-data/3.0/media-buy/log-event-response.json +6 -6
  590. package/dist/lib/schemas-data/3.0/media-buy/package-request.json +12 -12
  591. package/dist/lib/schemas-data/3.0/media-buy/package-update.json +13 -13
  592. package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-request.json +6 -6
  593. package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-response.json +6 -6
  594. package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-request.json +7 -7
  595. package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-response.json +9 -9
  596. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-input-required.json +3 -3
  597. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-submitted.json +3 -3
  598. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-working.json +3 -3
  599. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-request.json +7 -7
  600. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-response.json +9 -9
  601. package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-request.json +5 -5
  602. package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-response.json +10 -10
  603. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-input-required.json +3 -3
  604. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-submitted.json +3 -3
  605. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-working.json +3 -3
  606. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-request.json +10 -10
  607. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-response.json +10 -10
  608. package/dist/lib/schemas-data/3.0/pricing-options/cpa-option.json +4 -4
  609. package/dist/lib/schemas-data/3.0/pricing-options/cpc-option.json +4 -4
  610. package/dist/lib/schemas-data/3.0/pricing-options/cpcv-option.json +4 -4
  611. package/dist/lib/schemas-data/3.0/pricing-options/cpm-option.json +4 -4
  612. package/dist/lib/schemas-data/3.0/pricing-options/cpp-option.json +5 -5
  613. package/dist/lib/schemas-data/3.0/pricing-options/cpv-option.json +4 -4
  614. package/dist/lib/schemas-data/3.0/pricing-options/flat-rate-option.json +4 -4
  615. package/dist/lib/schemas-data/3.0/pricing-options/price-breakdown.json +2 -2
  616. package/dist/lib/schemas-data/3.0/pricing-options/price-guidance.json +1 -1
  617. package/dist/lib/schemas-data/3.0/pricing-options/time-option.json +4 -4
  618. package/dist/lib/schemas-data/3.0/pricing-options/vcpm-option.json +4 -4
  619. package/dist/lib/schemas-data/3.0/property/authorization-result.json +1 -1
  620. package/dist/lib/schemas-data/3.0/property/base-property-source.json +4 -4
  621. package/dist/lib/schemas-data/3.0/property/create-property-list-request.json +7 -7
  622. package/dist/lib/schemas-data/3.0/property/create-property-list-response.json +4 -4
  623. package/dist/lib/schemas-data/3.0/property/delete-property-list-request.json +4 -4
  624. package/dist/lib/schemas-data/3.0/property/delete-property-list-response.json +3 -3
  625. package/dist/lib/schemas-data/3.0/property/delivery-record.json +3 -3
  626. package/dist/lib/schemas-data/3.0/property/get-property-list-request.json +4 -4
  627. package/dist/lib/schemas-data/3.0/property/get-property-list-response.json +7 -7
  628. package/dist/lib/schemas-data/3.0/property/list-property-lists-request.json +5 -5
  629. package/dist/lib/schemas-data/3.0/property/list-property-lists-response.json +5 -5
  630. package/dist/lib/schemas-data/3.0/property/property-error.json +2 -2
  631. package/dist/lib/schemas-data/3.0/property/property-feature-definition.json +2 -2
  632. package/dist/lib/schemas-data/3.0/property/property-feature-result.json +4 -4
  633. package/dist/lib/schemas-data/3.0/property/property-feature-value.json +2 -2
  634. package/dist/lib/schemas-data/3.0/property/property-feature.json +1 -1
  635. package/dist/lib/schemas-data/3.0/property/property-list-changed-webhook.json +2 -2
  636. package/dist/lib/schemas-data/3.0/property/property-list-filters.json +5 -5
  637. package/dist/lib/schemas-data/3.0/property/property-list.json +6 -6
  638. package/dist/lib/schemas-data/3.0/property/update-property-list-request.json +7 -7
  639. package/dist/lib/schemas-data/3.0/property/update-property-list-response.json +4 -4
  640. package/dist/lib/schemas-data/3.0/property/validate-property-delivery-request.json +5 -5
  641. package/dist/lib/schemas-data/3.0/property/validate-property-delivery-response.json +4 -4
  642. package/dist/lib/schemas-data/3.0/property/validation-result.json +5 -5
  643. package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-request.json +3 -3
  644. package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-response.json +26 -26
  645. package/dist/lib/schemas-data/3.0/signals/activate-signal-request.json +5 -5
  646. package/dist/lib/schemas-data/3.0/signals/activate-signal-response.json +7 -7
  647. package/dist/lib/schemas-data/3.0/signals/get-signals-request.json +8 -8
  648. package/dist/lib/schemas-data/3.0/signals/get-signals-response.json +10 -10
  649. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-capabilities.json +1 -1
  650. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-request.json +3 -3
  651. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-response.json +4 -4
  652. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-identity.json +1 -1
  653. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-request.json +5 -5
  654. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-response.json +7 -7
  655. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-request.json +3 -3
  656. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-response.json +7 -7
  657. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-request.json +3 -3
  658. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-response.json +5 -5
  659. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-ui-element.json +1 -1
  660. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  661. package/dist/lib/server/adcp-server.d.ts +21 -0
  662. package/dist/lib/server/adcp-server.d.ts.map +1 -1
  663. package/dist/lib/server/adcp-server.js +22 -1
  664. package/dist/lib/server/adcp-server.js.map +1 -1
  665. package/dist/lib/server/auth-signature.d.ts.map +1 -1
  666. package/dist/lib/server/auth-signature.js +21 -0
  667. package/dist/lib/server/auth-signature.js.map +1 -1
  668. package/dist/lib/server/auth.d.ts +24 -0
  669. package/dist/lib/server/auth.d.ts.map +1 -1
  670. package/dist/lib/server/auth.js +71 -3
  671. package/dist/lib/server/auth.js.map +1 -1
  672. package/dist/lib/server/create-adcp-server.d.ts +203 -21
  673. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  674. package/dist/lib/server/create-adcp-server.js +322 -13
  675. package/dist/lib/server/create-adcp-server.js.map +1 -1
  676. package/dist/lib/server/decisioning/account.d.ts +340 -21
  677. package/dist/lib/server/decisioning/account.d.ts.map +1 -1
  678. package/dist/lib/server/decisioning/account.js +150 -4
  679. package/dist/lib/server/decisioning/account.js.map +1 -1
  680. package/dist/lib/server/decisioning/admin-router.d.ts.map +1 -1
  681. package/dist/lib/server/decisioning/admin-router.js +5 -1
  682. package/dist/lib/server/decisioning/admin-router.js.map +1 -1
  683. package/dist/lib/server/decisioning/buyer-agent.d.ts +465 -0
  684. package/dist/lib/server/decisioning/buyer-agent.d.ts.map +1 -0
  685. package/dist/lib/server/decisioning/buyer-agent.js +372 -0
  686. package/dist/lib/server/decisioning/buyer-agent.js.map +1 -0
  687. package/dist/lib/server/decisioning/capabilities.d.ts +39 -7
  688. package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
  689. package/dist/lib/server/decisioning/compose.d.ts +93 -0
  690. package/dist/lib/server/decisioning/compose.d.ts.map +1 -0
  691. package/dist/lib/server/decisioning/compose.js +81 -0
  692. package/dist/lib/server/decisioning/compose.js.map +1 -0
  693. package/dist/lib/server/decisioning/context.d.ts +11 -0
  694. package/dist/lib/server/decisioning/context.d.ts.map +1 -1
  695. package/dist/lib/server/decisioning/index.d.ts +12 -3
  696. package/dist/lib/server/decisioning/index.d.ts.map +1 -1
  697. package/dist/lib/server/decisioning/index.js +45 -2
  698. package/dist/lib/server/decisioning/index.js.map +1 -1
  699. package/dist/lib/server/decisioning/platform-helpers.d.ts +269 -0
  700. package/dist/lib/server/decisioning/platform-helpers.d.ts.map +1 -0
  701. package/dist/lib/server/decisioning/platform-helpers.js +316 -0
  702. package/dist/lib/server/decisioning/platform-helpers.js.map +1 -0
  703. package/dist/lib/server/decisioning/platform.d.ts +127 -4
  704. package/dist/lib/server/decisioning/platform.d.ts.map +1 -1
  705. package/dist/lib/server/decisioning/platform.js.map +1 -1
  706. package/dist/lib/server/decisioning/resolve-presets.d.ts +129 -0
  707. package/dist/lib/server/decisioning/resolve-presets.d.ts.map +1 -0
  708. package/dist/lib/server/decisioning/resolve-presets.js +142 -0
  709. package/dist/lib/server/decisioning/resolve-presets.js.map +1 -0
  710. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts +8 -0
  711. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts.map +1 -0
  712. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js +101 -0
  713. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -0
  714. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +91 -8
  715. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
  716. package/dist/lib/server/decisioning/runtime/from-platform.js +764 -130
  717. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
  718. package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -1
  719. package/dist/lib/server/decisioning/runtime/to-context.js +1 -0
  720. package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -1
  721. package/dist/lib/server/decisioning/runtime/validate-platform.d.ts.map +1 -1
  722. package/dist/lib/server/decisioning/runtime/validate-platform.js +31 -3
  723. package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -1
  724. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +83 -6
  725. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
  726. package/dist/lib/server/decisioning/specialisms/brand-rights.js +12 -5
  727. package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -1
  728. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +41 -4
  729. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
  730. package/dist/lib/server/decisioning/specialisms/creative.d.ts +47 -3
  731. package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
  732. package/dist/lib/server/decisioning/specialisms/sales.d.ts +115 -9
  733. package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
  734. package/dist/lib/server/decisioning/tenant-registry.d.ts.map +1 -1
  735. package/dist/lib/server/decisioning/tenant-registry.js +8 -3
  736. package/dist/lib/server/decisioning/tenant-registry.js.map +1 -1
  737. package/dist/lib/server/decisioning/tenant-store.d.ts +200 -0
  738. package/dist/lib/server/decisioning/tenant-store.d.ts.map +1 -0
  739. package/dist/lib/server/decisioning/tenant-store.js +182 -0
  740. package/dist/lib/server/decisioning/tenant-store.js.map +1 -0
  741. package/dist/lib/server/decisioning/validate-specialisms.d.ts +66 -0
  742. package/dist/lib/server/decisioning/validate-specialisms.d.ts.map +1 -0
  743. package/dist/lib/server/decisioning/validate-specialisms.js +119 -0
  744. package/dist/lib/server/decisioning/validate-specialisms.js.map +1 -0
  745. package/dist/lib/server/index.d.ts +11 -2
  746. package/dist/lib/server/index.d.ts.map +1 -1
  747. package/dist/lib/server/index.js +35 -3
  748. package/dist/lib/server/index.js.map +1 -1
  749. package/dist/lib/server/media-buy-store.d.ts +126 -0
  750. package/dist/lib/server/media-buy-store.d.ts.map +1 -0
  751. package/dist/lib/server/media-buy-store.js +171 -0
  752. package/dist/lib/server/media-buy-store.js.map +1 -0
  753. package/dist/lib/server/redact.d.ts +52 -0
  754. package/dist/lib/server/redact.d.ts.map +1 -0
  755. package/dist/lib/server/redact.js +86 -0
  756. package/dist/lib/server/redact.js.map +1 -0
  757. package/dist/lib/server/responses.d.ts +60 -1
  758. package/dist/lib/server/responses.d.ts.map +1 -1
  759. package/dist/lib/server/responses.js +110 -1
  760. package/dist/lib/server/responses.js.map +1 -1
  761. package/dist/lib/server/serve.d.ts.map +1 -1
  762. package/dist/lib/server/serve.js +35 -1
  763. package/dist/lib/server/serve.js.map +1 -1
  764. package/dist/lib/server/state-machine.d.ts +80 -0
  765. package/dist/lib/server/state-machine.d.ts.map +1 -0
  766. package/dist/lib/server/state-machine.js +125 -0
  767. package/dist/lib/server/state-machine.js.map +1 -0
  768. package/dist/lib/server/test-controller.d.ts +48 -0
  769. package/dist/lib/server/test-controller.d.ts.map +1 -1
  770. package/dist/lib/server/test-controller.js +89 -10
  771. package/dist/lib/server/test-controller.js.map +1 -1
  772. package/dist/lib/server/upstream-helpers.d.ts +182 -0
  773. package/dist/lib/server/upstream-helpers.d.ts.map +1 -0
  774. package/dist/lib/server/upstream-helpers.js +140 -0
  775. package/dist/lib/server/upstream-helpers.js.map +1 -0
  776. package/dist/lib/signing/agent-resolver/canonicalize.d.ts +44 -0
  777. package/dist/lib/signing/agent-resolver/canonicalize.d.ts.map +1 -0
  778. package/dist/lib/signing/agent-resolver/canonicalize.js +85 -0
  779. package/dist/lib/signing/agent-resolver/canonicalize.js.map +1 -0
  780. package/dist/lib/signing/agent-resolver/capabilities-types.d.ts +54 -0
  781. package/dist/lib/signing/agent-resolver/capabilities-types.d.ts.map +1 -0
  782. package/dist/lib/signing/agent-resolver/capabilities-types.js +49 -0
  783. package/dist/lib/signing/agent-resolver/capabilities-types.js.map +1 -0
  784. package/dist/lib/signing/agent-resolver/consistency.d.ts +84 -0
  785. package/dist/lib/signing/agent-resolver/consistency.d.ts.map +1 -0
  786. package/dist/lib/signing/agent-resolver/consistency.js +121 -0
  787. package/dist/lib/signing/agent-resolver/consistency.js.map +1 -0
  788. package/dist/lib/signing/agent-resolver/errors.d.ts +68 -0
  789. package/dist/lib/signing/agent-resolver/errors.d.ts.map +1 -0
  790. package/dist/lib/signing/agent-resolver/errors.js +45 -0
  791. package/dist/lib/signing/agent-resolver/errors.js.map +1 -0
  792. package/dist/lib/signing/agent-resolver/etld.d.ts +25 -0
  793. package/dist/lib/signing/agent-resolver/etld.d.ts.map +1 -0
  794. package/dist/lib/signing/agent-resolver/etld.js +75 -0
  795. package/dist/lib/signing/agent-resolver/etld.js.map +1 -0
  796. package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +41 -0
  797. package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts.map +1 -0
  798. package/dist/lib/signing/agent-resolver/fetch-helpers.js +85 -0
  799. package/dist/lib/signing/agent-resolver/fetch-helpers.js.map +1 -0
  800. package/dist/lib/signing/agent-resolver/index.d.ts +26 -0
  801. package/dist/lib/signing/agent-resolver/index.d.ts.map +1 -0
  802. package/dist/lib/signing/agent-resolver/index.js +33 -0
  803. package/dist/lib/signing/agent-resolver/index.js.map +1 -0
  804. package/dist/lib/signing/agent-resolver/jwks-set.d.ts +76 -0
  805. package/dist/lib/signing/agent-resolver/jwks-set.d.ts.map +1 -0
  806. package/dist/lib/signing/agent-resolver/jwks-set.js +124 -0
  807. package/dist/lib/signing/agent-resolver/jwks-set.js.map +1 -0
  808. package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +123 -0
  809. package/dist/lib/signing/agent-resolver/resolve-agent.d.ts.map +1 -0
  810. package/dist/lib/signing/agent-resolver/resolve-agent.js +398 -0
  811. package/dist/lib/signing/agent-resolver/resolve-agent.js.map +1 -0
  812. package/dist/lib/signing/agent-resolver/select-agent.d.ts +54 -0
  813. package/dist/lib/signing/agent-resolver/select-agent.d.ts.map +1 -0
  814. package/dist/lib/signing/agent-resolver/select-agent.js +94 -0
  815. package/dist/lib/signing/agent-resolver/select-agent.js.map +1 -0
  816. package/dist/lib/signing/agent-resolver/strict-json.d.ts +44 -0
  817. package/dist/lib/signing/agent-resolver/strict-json.d.ts.map +1 -0
  818. package/dist/lib/signing/agent-resolver/strict-json.js +219 -0
  819. package/dist/lib/signing/agent-resolver/strict-json.js.map +1 -0
  820. package/dist/lib/signing/capability-priming.d.ts.map +1 -1
  821. package/dist/lib/signing/capability-priming.js +2 -55
  822. package/dist/lib/signing/capability-priming.js.map +1 -1
  823. package/dist/lib/signing/protocol-response.d.ts +18 -0
  824. package/dist/lib/signing/protocol-response.d.ts.map +1 -0
  825. package/dist/lib/signing/protocol-response.js +69 -0
  826. package/dist/lib/signing/protocol-response.js.map +1 -0
  827. package/dist/lib/signing/server.d.ts +1 -0
  828. package/dist/lib/signing/server.d.ts.map +1 -1
  829. package/dist/lib/signing/server.js +10 -1
  830. package/dist/lib/signing/server.js.map +1 -1
  831. package/dist/lib/signing/testing.d.ts +64 -0
  832. package/dist/lib/signing/testing.d.ts.map +1 -1
  833. package/dist/lib/signing/testing.js +100 -5
  834. package/dist/lib/signing/testing.js.map +1 -1
  835. package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
  836. package/dist/lib/testing/compliance/comply.js +2 -0
  837. package/dist/lib/testing/compliance/comply.js.map +1 -1
  838. package/dist/lib/testing/compliance/types.d.ts +8 -0
  839. package/dist/lib/testing/compliance/types.d.ts.map +1 -1
  840. package/dist/lib/testing/storyboard/agent-routing.d.ts +92 -0
  841. package/dist/lib/testing/storyboard/agent-routing.d.ts.map +1 -0
  842. package/dist/lib/testing/storyboard/agent-routing.js +291 -0
  843. package/dist/lib/testing/storyboard/agent-routing.js.map +1 -0
  844. package/dist/lib/testing/storyboard/context.d.ts +22 -0
  845. package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
  846. package/dist/lib/testing/storyboard/context.js +35 -8
  847. package/dist/lib/testing/storyboard/context.js.map +1 -1
  848. package/dist/lib/testing/storyboard/default-invariants.js +6 -35
  849. package/dist/lib/testing/storyboard/default-invariants.js.map +1 -1
  850. package/dist/lib/testing/storyboard/index.d.ts +1 -1
  851. package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
  852. package/dist/lib/testing/storyboard/index.js.map +1 -1
  853. package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
  854. package/dist/lib/testing/storyboard/loader.js +84 -12
  855. package/dist/lib/testing/storyboard/loader.js.map +1 -1
  856. package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
  857. package/dist/lib/testing/storyboard/request-builder.js +14 -1
  858. package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
  859. package/dist/lib/testing/storyboard/runner.d.ts +17 -0
  860. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  861. package/dist/lib/testing/storyboard/runner.js +867 -144
  862. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  863. package/dist/lib/testing/storyboard/types.d.ts +254 -12
  864. package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
  865. package/dist/lib/testing/storyboard/types.js.map +1 -1
  866. package/dist/lib/testing/storyboard/validations.d.ts +65 -0
  867. package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
  868. package/dist/lib/testing/storyboard/validations.js +529 -2
  869. package/dist/lib/testing/storyboard/validations.js.map +1 -1
  870. package/dist/lib/testing/test-controller.d.ts +59 -1
  871. package/dist/lib/testing/test-controller.d.ts.map +1 -1
  872. package/dist/lib/testing/test-controller.js +30 -0
  873. package/dist/lib/testing/test-controller.js.map +1 -1
  874. package/dist/lib/testing/types.d.ts +14 -0
  875. package/dist/lib/testing/types.d.ts.map +1 -1
  876. package/dist/lib/types/core.generated.d.ts +299 -141
  877. package/dist/lib/types/core.generated.d.ts.map +1 -1
  878. package/dist/lib/types/core.generated.js +2 -2
  879. package/dist/lib/types/error-codes.d.ts +168 -108
  880. package/dist/lib/types/error-codes.d.ts.map +1 -1
  881. package/dist/lib/types/error-codes.js +23 -190
  882. package/dist/lib/types/error-codes.js.map +1 -1
  883. package/dist/lib/types/error-details.aliases.d.ts +48 -0
  884. package/dist/lib/types/error-details.aliases.d.ts.map +1 -0
  885. package/dist/lib/types/error-details.aliases.js +41 -0
  886. package/dist/lib/types/error-details.aliases.js.map +1 -0
  887. package/dist/lib/types/index.d.ts +14 -1
  888. package/dist/lib/types/index.d.ts.map +1 -1
  889. package/dist/lib/types/index.js +4 -0
  890. package/dist/lib/types/index.js.map +1 -1
  891. package/dist/lib/types/inline-enums.generated.d.ts +2 -4
  892. package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
  893. package/dist/lib/types/inline-enums.generated.js +10 -7
  894. package/dist/lib/types/inline-enums.generated.js.map +1 -1
  895. package/dist/lib/types/manifest.generated.d.ts +280 -0
  896. package/dist/lib/types/manifest.generated.d.ts.map +1 -0
  897. package/dist/lib/types/manifest.generated.js +339 -0
  898. package/dist/lib/types/manifest.generated.js.map +1 -0
  899. package/dist/lib/types/schemas.generated.d.ts +27229 -25160
  900. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  901. package/dist/lib/types/schemas.generated.js +584 -533
  902. package/dist/lib/types/schemas.generated.js.map +1 -1
  903. package/dist/lib/types/tools.generated.d.ts +146 -21
  904. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  905. package/dist/lib/types/v2-5/tools.generated.d.ts +48 -1
  906. package/dist/lib/types/v2-5/tools.generated.d.ts.map +1 -1
  907. package/dist/lib/upstream-recorder/index.d.ts +57 -0
  908. package/dist/lib/upstream-recorder/index.d.ts.map +1 -0
  909. package/dist/lib/upstream-recorder/index.js +62 -0
  910. package/dist/lib/upstream-recorder/index.js.map +1 -0
  911. package/dist/lib/upstream-recorder/recorder.d.ts +35 -0
  912. package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -0
  913. package/dist/lib/upstream-recorder/recorder.js +507 -0
  914. package/dist/lib/upstream-recorder/recorder.js.map +1 -0
  915. package/dist/lib/upstream-recorder/types.d.ts +365 -0
  916. package/dist/lib/upstream-recorder/types.d.ts.map +1 -0
  917. package/dist/lib/upstream-recorder/types.js +30 -0
  918. package/dist/lib/upstream-recorder/types.js.map +1 -0
  919. package/dist/lib/utils/capabilities.d.ts +66 -3
  920. package/dist/lib/utils/capabilities.d.ts.map +1 -1
  921. package/dist/lib/utils/capabilities.js +111 -3
  922. package/dist/lib/utils/capabilities.js.map +1 -1
  923. package/dist/lib/utils/error-extraction.d.ts +24 -0
  924. package/dist/lib/utils/error-extraction.d.ts.map +1 -1
  925. package/dist/lib/utils/error-extraction.js +0 -2
  926. package/dist/lib/utils/error-extraction.js.map +1 -1
  927. package/dist/lib/utils/format-render-builders.d.ts +2 -1
  928. package/dist/lib/utils/format-render-builders.d.ts.map +1 -1
  929. package/dist/lib/utils/format-render-builders.js +0 -23
  930. package/dist/lib/utils/format-render-builders.js.map +1 -1
  931. package/dist/lib/utils/glob.d.ts +28 -0
  932. package/dist/lib/utils/glob.d.ts.map +1 -0
  933. package/dist/lib/utils/glob.js +37 -0
  934. package/dist/lib/utils/glob.js.map +1 -0
  935. package/dist/lib/utils/redact-secrets.d.ts +37 -0
  936. package/dist/lib/utils/redact-secrets.d.ts.map +1 -0
  937. package/dist/lib/utils/redact-secrets.js +65 -0
  938. package/dist/lib/utils/redact-secrets.js.map +1 -0
  939. package/dist/lib/utils/tool-request-schemas.d.ts.map +1 -1
  940. package/dist/lib/utils/tool-request-schemas.js +1 -0
  941. package/dist/lib/utils/tool-request-schemas.js.map +1 -1
  942. package/dist/lib/validation/hints.d.ts +50 -0
  943. package/dist/lib/validation/hints.d.ts.map +1 -0
  944. package/dist/lib/validation/hints.js +194 -0
  945. package/dist/lib/validation/hints.js.map +1 -0
  946. package/dist/lib/validation/schema-errors.d.ts +2 -1
  947. package/dist/lib/validation/schema-errors.d.ts.map +1 -1
  948. package/dist/lib/validation/schema-errors.js +39 -4
  949. package/dist/lib/validation/schema-errors.js.map +1 -1
  950. package/dist/lib/validation/schema-loader.d.ts +13 -0
  951. package/dist/lib/validation/schema-loader.d.ts.map +1 -1
  952. package/dist/lib/validation/schema-loader.js +20 -0
  953. package/dist/lib/validation/schema-loader.js.map +1 -1
  954. package/dist/lib/validation/schema-validator.d.ts +107 -2
  955. package/dist/lib/validation/schema-validator.d.ts.map +1 -1
  956. package/dist/lib/validation/schema-validator.js +205 -12
  957. package/dist/lib/validation/schema-validator.js.map +1 -1
  958. package/dist/lib/validation/sync-creatives.d.ts +30 -0
  959. package/dist/lib/validation/sync-creatives.d.ts.map +1 -1
  960. package/dist/lib/version.d.ts +7 -7
  961. package/dist/lib/version.d.ts.map +1 -1
  962. package/dist/lib/version.js +9 -5
  963. package/dist/lib/version.js.map +1 -1
  964. package/docs/guides/BUILD-AN-AGENT.md +267 -137
  965. package/docs/llms.txt +110 -55
  966. package/examples/CONTRIBUTING.md +173 -0
  967. package/examples/README.md +32 -0
  968. package/examples/comply-controller-seller.ts +9 -17
  969. package/examples/decisioning-platform-broadcast-tv.ts +3 -2
  970. package/examples/decisioning-platform-implicit-accounts.ts +168 -0
  971. package/examples/decisioning-platform-mock-seller.ts +3 -2
  972. package/examples/decisioning-platform-multi-tenant-db.ts +317 -0
  973. package/examples/decisioning-platform-programmatic.ts +3 -2
  974. package/examples/hello-cluster.ts +421 -0
  975. package/examples/hello_creative_adapter_template.ts +528 -0
  976. package/examples/hello_seller_adapter_guaranteed.ts +1080 -0
  977. package/examples/hello_seller_adapter_multi_tenant.ts +1046 -0
  978. package/examples/hello_seller_adapter_social.ts +829 -0
  979. package/examples/hello_signals_adapter_marketplace.ts +532 -0
  980. package/examples/seller-test-controller.ts +22 -28
  981. package/package.json +30 -3
  982. package/skills/SHAPE-GOTCHAS.md +233 -0
  983. package/skills/build-brand-rights-agent/SKILL.md +121 -16
  984. package/skills/build-creative-agent/SKILL.md +25 -1
  985. package/skills/build-decisioning-platform/advanced/MULTI-TENANT.md +104 -28
  986. package/skills/build-holdco-agent/SKILL.md +250 -0
  987. package/skills/build-seller-agent/SKILL.md +313 -49
  988. package/skills/build-seller-agent/specialisms/sales-broadcast-tv.md +2 -0
  989. package/skills/build-seller-agent/specialisms/sales-guaranteed.md +18 -0
  990. package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +2 -0
  991. package/skills/build-seller-agent/specialisms/sales-social.md +63 -2
  992. package/skills/build-signals-agent/SKILL.md +2 -0
  993. package/skills/call-adcp-agent.previous/SKILL.md +8 -86
  994. package/skills/run-by-experts/SKILL.md +116 -0
  995. package/skills/triage-storyboard-failure/SKILL.md +96 -0
  996. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/brand/index.yaml +0 -0
  997. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/creative/index.yaml +0 -0
  998. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/governance/index.yaml +0 -0
  999. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/creative-reception.yaml +0 -0
  1000. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/index.yaml +0 -0
  1001. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1002. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
  1003. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1004. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
  1005. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
  1006. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
  1007. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1008. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1009. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1010. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1011. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1012. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1013. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1014. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/refine_products.yaml +0 -0
  1015. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/state-machine.yaml +0 -0
  1016. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/signals/index.yaml +0 -0
  1017. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/sponsored-intelligence/index.yaml +0 -0
  1018. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/brand/index.yaml +0 -0
  1019. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/creative/index.yaml +0 -0
  1020. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/governance/index.yaml +0 -0
  1021. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/creative-reception.yaml +0 -0
  1022. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/index.yaml +0 -0
  1023. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1024. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
  1025. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1026. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
  1027. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
  1028. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
  1029. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1030. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1031. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1032. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1033. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1034. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1035. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1036. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
  1037. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/state-machine.yaml +0 -0
  1038. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/signals/index.yaml +0 -0
  1039. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/sponsored-intelligence/index.yaml +0 -0
  1040. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
  1041. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/collection-lists/index.yaml +0 -0
  1042. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/content-standards/index.yaml +0 -0
  1043. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-ad-server/index.yaml +0 -0
  1044. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/generative-seller.yaml +0 -0
  1045. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/index.yaml +0 -0
  1046. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-template/index.yaml +0 -0
  1047. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-aware-seller/index.yaml +0 -0
  1048. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-delivery-monitor/index.yaml +0 -0
  1049. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/denied.yaml +0 -0
  1050. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/index.yaml +0 -0
  1051. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/property-lists/index.yaml +0 -0
  1052. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-broadcast-tv/index.yaml +0 -0
  1053. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-catalog-driven/index.yaml +0 -0
  1054. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-guaranteed/index.yaml +0 -0
  1055. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-non-guaranteed/index.yaml +0 -0
  1056. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-proposal-mode/index.yaml +0 -0
  1057. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/index.yaml +0 -0
  1058. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
  1059. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-owned/index.yaml +0 -0
  1060. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/acme-outdoor.yaml +0 -0
  1061. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/bistro-oranje.yaml +0 -0
  1062. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/nova-motors.yaml +0 -0
  1063. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/osei-natural.yaml +0 -0
  1064. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/signed-requests-runner.yaml +0 -0
  1065. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/substitution-observer-runner.yaml +0 -0
  1066. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/summit-foods.yaml +0 -0
  1067. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/webhook-receiver-runner.yaml +0 -0
  1068. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
  1069. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/002-full-plan.json +0 -0
  1070. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
  1071. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
  1072. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
  1073. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
  1074. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
  1075. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
  1076. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
  1077. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
  1078. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
  1079. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/README.md +0 -0
  1080. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/canonicalization.json +0 -0
  1081. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/keys.json +0 -0
  1082. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
  1083. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
  1084. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
  1085. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
  1086. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
  1087. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
  1088. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
  1089. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
  1090. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
  1091. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
  1092. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
  1093. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
  1094. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
  1095. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
  1096. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
  1097. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
  1098. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
  1099. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
  1100. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
  1101. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
  1102. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
  1103. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
  1104. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
  1105. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
  1106. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
  1107. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
  1108. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
  1109. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
  1110. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
  1111. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
  1112. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
  1113. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
  1114. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
  1115. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
  1116. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
  1117. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
  1118. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
  1119. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
  1120. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
  1121. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/README.md +0 -0
  1122. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/keys.json +0 -0
  1123. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
  1124. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
  1125. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
  1126. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
  1127. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
  1128. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
  1129. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
  1130. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
  1131. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
  1132. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
  1133. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
  1134. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
  1135. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
  1136. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
  1137. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
  1138. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
  1139. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
  1140. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
  1141. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
  1142. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
  1143. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
  1144. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
  1145. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
  1146. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
  1147. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
  1148. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
  1149. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
  1150. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
  1151. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/capability-discovery.yaml +0 -0
  1152. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/collection-lists-pagination-integrity.yaml +0 -0
  1153. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/content-standards-pagination-integrity.yaml +0 -0
  1154. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/deterministic-testing.yaml +0 -0
  1155. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/error-compliance.yaml +0 -0
  1156. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/fictional-entities.yaml +0 -0
  1157. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-media-buys-pagination-integrity.yaml +0 -0
  1158. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-signals-pagination-integrity.yaml +0 -0
  1159. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/idempotency.yaml +0 -0
  1160. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-creative-formats.yaml +0 -0
  1161. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-list-accounts.yaml +0 -0
  1162. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity.yaml +0 -0
  1163. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/property-lists-pagination-integrity.yaml +0 -0
  1164. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/schema-validation.yaml +0 -0
  1165. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/security.yaml +0 -0
  1166. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/signed-requests.yaml +0 -0
  1167. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/webhook-emission.yaml +0 -0
@@ -17,6 +17,7 @@ exports.listStrictOnlyFailures = listStrictOnlyFailures;
17
17
  exports.summarizeStrictValidation = summarizeStrictValidation;
18
18
  exports.runStoryboardStep = runStoryboardStep;
19
19
  exports.applyBrandInvariant = applyBrandInvariant;
20
+ exports.applyDisableSandboxHint = applyDisableSandboxHint;
20
21
  exports.applyIdempotencyInvariant = applyIdempotencyInvariant;
21
22
  exports.getFirstStepPreview = getFirstStepPreview;
22
23
  const client_1 = require("../client");
@@ -28,6 +29,9 @@ const rejection_hints_1 = require("./rejection-hints");
28
29
  const shape_drift_hints_1 = require("./shape-drift-hints");
29
30
  const strict_validation_hints_1 = require("./strict-validation-hints");
30
31
  const validations_1 = require("./validations");
32
+ const path_1 = require("./path");
33
+ const redact_secrets_1 = require("../../utils/redact-secrets");
34
+ const test_controller_1 = require("../test-controller");
31
35
  const request_builder_1 = require("./request-builder");
32
36
  const client_2 = require("../client");
33
37
  const idempotency_1 = require("../../utils/idempotency");
@@ -39,6 +43,7 @@ const probe_dispatch_1 = require("./request-signing/probe-dispatch");
39
43
  const webhook_receiver_1 = require("./webhook-receiver");
40
44
  const webhook_assertions_1 = require("./webhook-assertions");
41
45
  const seeding_1 = require("./seeding");
46
+ const agent_routing_1 = require("./agent-routing");
42
47
  const types_1 = require("./types");
43
48
  const assertions_1 = require("./assertions");
44
49
  // ────────────────────────────────────────────────────────────
@@ -52,6 +57,7 @@ const SKIP_DETAILS = {
52
57
  missing_test_controller: 'Skipped: deterministic_testing phase requires comply_test_controller, which the agent did not advertise.',
53
58
  unsatisfied_contract: 'Skipped: test-kit contract is out of scope for this grading run.',
54
59
  peer_branch_taken: 'Skipped: a peer branch in the same any_of branch set already contributed the aggregation flag.',
60
+ peer_substituted: 'Skipped: a same-phase peer step established equivalent state via `provides_state_for`.',
55
61
  };
56
62
  const CONTROLLER_SEEDING_FAILED_DETAIL = 'Skipped: pre-flight comply_test_controller seeding failed; the agent was not populated with the storyboard fixtures the remaining phases depend on.';
57
63
  const OAUTH_NOT_ADVERTISED_DETAIL = 'Skipped: agent does not advertise OAuth — /.well-known/oauth-protected-resource returned 404 (RFC 9728 §3). API-key path must carry auth_mechanism_verified for this storyboard to pass.';
@@ -230,6 +236,170 @@ function applyBranchSetGrading(phases, phaseResults, branchSetByPhaseId, contrib
230
236
  }
231
237
  return { skippedDelta };
232
238
  }
239
+ // ────────────────────────────────────────────────────────────
240
+ // task_completion. context_outputs path resolution
241
+ // ────────────────────────────────────────────────────────────
242
+ /** Marker prefix on `context_outputs.path` that opts a capture into the
243
+ * poll-tasks-get-for-the-completion-artifact resolution flow. The remainder
244
+ * of the path is resolved against the artifact's `data`, not the immediate
245
+ * submitted envelope. */
246
+ const TASK_COMPLETION_PATH_PREFIX = 'task_completion.';
247
+ /** Hard cap on how long the runner blocks one step waiting for a task to
248
+ * reach terminal state. Long enough to cover most HITL approval flows that
249
+ * are expected to complete inline; short enough that a stuck task surfaces
250
+ * the failure on the step that authored the dependency rather than the
251
+ * storyboard wall-clock budget. Override with `STORYBOARD_TASK_POLL_TIMEOUT_MS`. */
252
+ const TASK_COMPLETION_DEFAULT_TIMEOUT_MS = 30_000;
253
+ /** Per-poll cadence inside `pollTaskCompletion`. Scaled tight enough that
254
+ * short HITL flows complete in a couple of polls; the bound is still the
255
+ * outer timeout race. Override with `STORYBOARD_TASK_POLL_INTERVAL_MS`. */
256
+ const TASK_COMPLETION_DEFAULT_POLL_INTERVAL_MS = 1_500;
257
+ /** Defensive task_id pattern. AdCP doesn't constrain `task_id` shape on the
258
+ * wire, but unbounded strings are an SSRF / log-injection lever — we cap
259
+ * the length and reject control characters before the value reaches the
260
+ * SDK's tasks/get JSON-RPC param. */
261
+ const TASK_ID_MAX_LEN = 256;
262
+ // eslint-disable-next-line no-control-regex -- intentional: reject control chars in task_id
263
+ const TASK_ID_CONTROL_CHAR_RE = /[\x00-\x1F\x7F]/;
264
+ /** Non-terminal task statuses that carry a `task_id` and warrant polling
265
+ * the artifact for `task_completion.<inner>` captures. Per the AdCP
266
+ * `tasks-get-response.json` enum, all three are explicitly non-terminal:
267
+ * `submitted` (HITL or async-signed-IO), `working` ("expect completion
268
+ * within 120 seconds"), and `input-required` (waiting on the buyer to
269
+ * supply additional info — relevant when the storyboard test harness
270
+ * satisfies the input requirement). The 30s default poll timeout still
271
+ * bounds the worst case for storyboards that test these arms directly. */
272
+ const POLL_ELIGIBLE_STATUSES = new Set(['submitted', 'working', 'input-required']);
273
+ function isPollEligibleEnvelope(data) {
274
+ if (data == null || typeof data !== 'object')
275
+ return false;
276
+ const obj = data;
277
+ return (typeof obj.status === 'string' &&
278
+ POLL_ELIGIBLE_STATUSES.has(obj.status) &&
279
+ typeof obj.task_id === 'string' &&
280
+ obj.task_id.length > 0);
281
+ }
282
+ function isValidTaskId(taskId) {
283
+ if (taskId.length === 0 || taskId.length > TASK_ID_MAX_LEN)
284
+ return false;
285
+ if (TASK_ID_CONTROL_CHAR_RE.test(taskId))
286
+ return false;
287
+ return true;
288
+ }
289
+ function remapTaskCompletionOutputs(outputs) {
290
+ return outputs.map(o => {
291
+ if (typeof o.path === 'string' && o.path.startsWith(TASK_COMPLETION_PATH_PREFIX)) {
292
+ return { ...o, path: o.path.slice(TASK_COMPLETION_PATH_PREFIX.length) };
293
+ }
294
+ return o;
295
+ });
296
+ }
297
+ async function resolveTaskCompletionOutputs(taskResult, outputs, client, webhookReceiver) {
298
+ const hasTaskCompletionPath = outputs.some(o => typeof o.path === 'string' && o.path.startsWith(TASK_COMPLETION_PATH_PREFIX));
299
+ if (!hasTaskCompletionPath)
300
+ return { attempted: false };
301
+ if (!taskResult || !isPollEligibleEnvelope(taskResult.data))
302
+ return { attempted: false };
303
+ const taskId = taskResult.data.task_id;
304
+ if (!isValidTaskId(taskId))
305
+ return { attempted: false };
306
+ const timeoutMs = readEnvIntOrDefault(process.env['STORYBOARD_TASK_POLL_TIMEOUT_MS'], TASK_COMPLETION_DEFAULT_TIMEOUT_MS);
307
+ const pollIntervalMs = readEnvIntOrDefault(process.env['STORYBOARD_TASK_POLL_INTERVAL_MS'], TASK_COMPLETION_DEFAULT_POLL_INTERVAL_MS);
308
+ // The SDK's `pollTaskCompletion` lives on the executor — accessed via the
309
+ // SingleAgentClient instance the storyboard runner created in
310
+ // `getOrCreateClient`. The runner historically uses `client: any` for
311
+ // dynamic dispatch (see task-map.ts:80) so this cast doesn't widen
312
+ // existing surface.
313
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- dynamic SDK access
314
+ const dynamicClient = client;
315
+ const executor = dynamicClient?.executor;
316
+ const agent = dynamicClient?.agent;
317
+ const canPoll = !!(executor?.pollTaskCompletion && agent);
318
+ const canWebhook = !!webhookReceiver;
319
+ if (!canPoll && !canWebhook)
320
+ return { attempted: false };
321
+ const racers = [];
322
+ // Poll path. Note: when the outer race resolves first, the SDK's
323
+ // `pollTaskCompletion` keeps polling internally until it observes a
324
+ // terminal state. The runner's outer timeout is enough to bound the
325
+ // *step* duration; the inner loop continuation is a known limitation
326
+ // pending an AbortSignal addition to the SDK.
327
+ if (canPoll) {
328
+ racers.push(executor.pollTaskCompletion(agent, taskId, pollIntervalMs).then((result) => ({
329
+ kind: 'poll',
330
+ result,
331
+ })));
332
+ }
333
+ // Webhook path. Per `tasks-get-response.json`, sellers MAY use webhook-
334
+ // only HITL completion (no polling). When a `--webhook-receiver` is
335
+ // active, race the receiver's `wait` (filtered by `task_id`) against
336
+ // the poll. The webhook payload's `result` field is the artifact's
337
+ // `data` (per the framework's task webhook payload shape, mirroring
338
+ // the HITL completion shape from `from-platform.ts`).
339
+ //
340
+ // Note: `webhook.wait` keeps an internal `setTimeout(timeout_ms)` that
341
+ // we can't cancel from here. When the poll wins or the outer timeout
342
+ // fires first, that internal timer continues until `timeout_ms`
343
+ // elapses. Acceptable because the receiver is process-scoped (closed
344
+ // on storyboard exit) and runner-owned receivers aren't injected.
345
+ if (webhookReceiver) {
346
+ racers.push(webhookReceiver
347
+ .wait({ body: { task_id: taskId } }, timeoutMs)
348
+ .then((result) => ({ kind: 'webhook', result })));
349
+ }
350
+ let timer;
351
+ const timeoutRacer = new Promise(resolve => {
352
+ timer = setTimeout(() => resolve({ kind: 'timeout' }), timeoutMs);
353
+ // Don't keep the event loop alive on this handle — the runner's
354
+ // wall-clock budget is already enforced by the storyboard runner
355
+ // shell, and a hung task shouldn't delay process exit by `timeoutMs`.
356
+ timer.unref?.();
357
+ });
358
+ racers.push(timeoutRacer);
359
+ try {
360
+ const winner = await Promise.race(racers);
361
+ if (winner.kind === 'timeout') {
362
+ return { attempted: true, timedOut: true, pollTimeoutMs: timeoutMs };
363
+ }
364
+ if (winner.kind === 'poll') {
365
+ const polled = winner.result;
366
+ if (polled.success === false)
367
+ return { attempted: true, taskFailed: true };
368
+ return { attempted: true, data: polled.data };
369
+ }
370
+ // Webhook win.
371
+ const waitResult = winner.result;
372
+ if (waitResult.timed_out) {
373
+ return { attempted: true, timedOut: true, pollTimeoutMs: timeoutMs };
374
+ }
375
+ const webhookBody = waitResult.webhook.body;
376
+ // Fail-closed on the success path: require `status === 'completed'`.
377
+ // The framework's `buildTaskWebhookPayload` always emits `status`, so a
378
+ // missing or non-completed value means either a malformed webhook or a
379
+ // genuine terminal-failed/canceled/rejected outcome — both should
380
+ // attribute to `capture_task_failed`, not silently fall through to a
381
+ // capture against an undefined `result`.
382
+ if (webhookBody?.status === 'completed') {
383
+ return { attempted: true, data: webhookBody.result };
384
+ }
385
+ return { attempted: true, taskFailed: true };
386
+ }
387
+ catch {
388
+ return { attempted: true, taskFailed: true };
389
+ }
390
+ finally {
391
+ if (timer)
392
+ clearTimeout(timer);
393
+ }
394
+ }
395
+ function readEnvIntOrDefault(value, fallback) {
396
+ if (!value)
397
+ return fallback;
398
+ const parsed = Number.parseInt(value, 10);
399
+ if (!Number.isFinite(parsed) || parsed <= 0)
400
+ return fallback;
401
+ return parsed;
402
+ }
233
403
  function extractionFromTaskResult(taskResult) {
234
404
  if (!taskResult)
235
405
  return { path: 'none' };
@@ -242,16 +412,8 @@ function extractionFromTaskResult(taskResult) {
242
412
  return { path: 'error' };
243
413
  return taskResult.data !== undefined && taskResult.data !== null ? { path: 'structured_content' } : { path: 'none' };
244
414
  }
245
- /**
246
- * Keys whose values must never appear verbatim in a compliance report.
247
- * Matching is case-insensitive and structural: any property whose final
248
- * path segment matches is replaced with `'[redacted]'` before the payload
249
- * is persisted on a step result. The contract spec calls for exactly this:
250
- * "Secrets SHOULD be redacted with the literal string '[redacted]'".
251
- */
252
- const SECRET_KEY_PATTERN = /^(authorization|credentials?|token|api[_-]?key|password|secret|client[_-]secret|refresh[_-]token|access[_-]token|bearer|session[_-]token|session[_-]id|offering[_-]token|cookie|set[_-]cookie)$/i;
253
415
  function __redactSecretsForTest(value) {
254
- return redactSecrets(value);
416
+ return (0, redact_secrets_1.redactSecrets)(value);
255
417
  }
256
418
  function __filterResponseHeadersForTest(headers) {
257
419
  return filterResponseHeaders(headers);
@@ -259,23 +421,6 @@ function __filterResponseHeadersForTest(headers) {
259
421
  function __defaultAuthHeadersForRawProbeForTest(options) {
260
422
  return defaultAuthHeadersForRawProbe(options);
261
423
  }
262
- function redactSecrets(value, depth = 0) {
263
- if (depth > 32)
264
- return value; // cheap cycle guard
265
- if (Array.isArray(value))
266
- return value.map(v => redactSecrets(v, depth + 1));
267
- if (value && typeof value === 'object') {
268
- const out = {};
269
- for (const [k, v] of Object.entries(value)) {
270
- out[k] =
271
- SECRET_KEY_PATTERN.test(k) && (typeof v === 'string' || typeof v === 'number')
272
- ? '[redacted]'
273
- : redactSecrets(v, depth + 1);
274
- }
275
- return out;
276
- }
277
- return value;
278
- }
279
424
  /**
280
425
  * Response headers to echo on a RunnerResponseRecord. Everything else is
281
426
  * dropped — agents can (and do) include `set-cookie`, echoed `authorization`,
@@ -326,8 +471,15 @@ async function runStoryboard(agentUrlOrUrls, storyboard, options = {}) {
326
471
  // fired, and the runtime's grading depends on the invariants holding.
327
472
  // `validateStoryboardShape` is idempotent so the double-pass is safe.
328
473
  (0, loader_1.validateStoryboardShape)(storyboard);
474
+ // Per-specialism routing (#1066). Mutually exclusive with replica-array
475
+ // dispatch and `_client`. Validate the shape of `options.agents` here so
476
+ // misconfigured callers fail fast with a clear error rather than getting
477
+ // silently routed to the first URL or a stale single-agent client.
478
+ if (options.agents !== undefined) {
479
+ validateAgentsMap(agentUrlOrUrls, storyboard, options);
480
+ }
329
481
  const agentUrls = Array.isArray(agentUrlOrUrls) ? agentUrlOrUrls : [agentUrlOrUrls];
330
- if (agentUrls.length === 0) {
482
+ if (!options.agents && agentUrls.length === 0) {
331
483
  throw new Error('runStoryboard: at least one agent URL required');
332
484
  }
333
485
  const isMultiInstance = agentUrls.length > 1;
@@ -350,8 +502,94 @@ async function runStoryboard(agentUrlOrUrls, storyboard, options = {}) {
350
502
  }
351
503
  return runMultiPass(agentUrls, storyboard, options);
352
504
  }
505
+ if (options.agents) {
506
+ // Project the agents map's URLs into the legacy `agentUrls` array so
507
+ // downstream signatures (per-step `agent_url:` records, etc.) keep
508
+ // working unchanged. The routing dispatcher inside
509
+ // `executeStoryboardPass` reads `options.agents` directly for the
510
+ // actual per-tool routing.
511
+ const projected = Object.values(options.agents).map(e => e.url);
512
+ return executeStoryboardPass(projected, storyboard, options, 0);
513
+ }
353
514
  return executeStoryboardPass(agentUrls, storyboard, options, 0);
354
515
  }
516
+ /**
517
+ * Validate the shape and consistency of `StoryboardRunOptions.agents` (#1066).
518
+ *
519
+ * Catches the failure modes that would otherwise surface as confusing
520
+ * runtime errors deep inside discovery or dispatch:
521
+ *
522
+ * - empty map
523
+ * - `default_agent` referencing an unknown key
524
+ * - `step.agent` referencing an unknown key
525
+ * - co-existence with `multi_instance_strategy` (replicas, different concept)
526
+ * - co-existence with `_client` (single client cannot serve multiple agents)
527
+ * - first positional arg passed alongside the map (ambiguous routing intent)
528
+ */
529
+ function validateAgentsMap(agentUrlOrUrls, storyboard, options) {
530
+ const agents = options.agents;
531
+ const keys = Object.keys(agents);
532
+ if (keys.length === 0) {
533
+ throw new Error('runStoryboard: `agents` is set but contains no entries. ' + 'Either remove the key or supply at least one agent.');
534
+ }
535
+ for (const key of keys) {
536
+ const entry = agents[key];
537
+ if (!entry || typeof entry.url !== 'string' || entry.url === '') {
538
+ throw new Error(`runStoryboard: agents['${key}'] missing a non-empty \`url\`. ` + 'Each entry must declare its endpoint URL.');
539
+ }
540
+ }
541
+ if (options.default_agent !== undefined && !(options.default_agent in agents)) {
542
+ throw new Error(`runStoryboard: \`default_agent\` "${options.default_agent}" is not a key in \`agents\`. ` +
543
+ `Available keys: ${keys.join(', ')}.`);
544
+ }
545
+ // Per-step `agent:` overrides must reference an agent that's actually in
546
+ // the map. Walk the storyboard once at entry so authoring errors surface
547
+ // before the first network call.
548
+ for (const phase of storyboard.phases ?? []) {
549
+ for (const step of phase.steps ?? []) {
550
+ if (step.agent !== undefined && !(step.agent in agents)) {
551
+ throw new Error(`runStoryboard: step "${step.id}" declares \`agent: "${step.agent}"\` but ` +
552
+ `that key is not in the agents map. Available keys: ${keys.join(', ')}.`);
553
+ }
554
+ }
555
+ }
556
+ if (options.multi_instance_strategy !== undefined) {
557
+ throw new Error('runStoryboard: `agents` (per-specialism routing) is incompatible with ' +
558
+ '`multi_instance_strategy` (replica round-robin). They are different concepts — ' +
559
+ 'replicas test horizontal scaling of one agent, the agents map routes per tool ' +
560
+ 'across different agents. Use one or the other.');
561
+ }
562
+ if (options._client) {
563
+ throw new Error('runStoryboard: `agents` is incompatible with `_client` override. ' +
564
+ 'A single client cannot serve multiple agents; per-agent clients are ' +
565
+ 'constructed from the map.');
566
+ }
567
+ // Controller seeding (`prerequisites.controller_seeding: true`) currently
568
+ // dispatches against the FIRST per-agent client only, which works for
569
+ // single-tenant runs but is the wrong shape under routed mode: a
570
+ // cross-specialism storyboard's `fixtures:` block typically declares
571
+ // seeds owned by different tenants (e.g., `seed_product` for sales,
572
+ // `seed_signal_provider` for signals). Per-tenant seed dispatch is a
573
+ // larger change tracked separately. Until that lands, fail-fast and
574
+ // tell the operator to seed each tenant out-of-band and pass
575
+ // `skip_controller_seeding: true`.
576
+ if (storyboard.prerequisites?.controller_seeding === true && options.skip_controller_seeding !== true) {
577
+ throw new Error('runStoryboard: `agents` + `prerequisites.controller_seeding: true` is not yet supported. ' +
578
+ 'Controller seeding currently targets a single tenant; cross-tenant seed routing is a ' +
579
+ 'follow-up. Pre-seed each tenant out-of-band and pass `skip_controller_seeding: true` to ' +
580
+ 'opt out of the runner-side seeding loop.');
581
+ }
582
+ // First positional arg must be empty when `agents` is set. Allowing a
583
+ // non-empty value is ambiguous: is the map authoritative, or is the
584
+ // positional arg a hidden default? Reject and require the caller to
585
+ // express intent through `agents` + `default_agent`.
586
+ const firstArgEmpty = agentUrlOrUrls === '' || (Array.isArray(agentUrlOrUrls) && agentUrlOrUrls.length === 0);
587
+ if (!firstArgEmpty) {
588
+ throw new Error('runStoryboard: pass `""` (or `[]`) as the first argument when using ' +
589
+ '`options.agents`. The agents map is authoritative for routing; mixing ' +
590
+ 'a positional URL with the map is ambiguous.');
591
+ }
592
+ }
355
593
  /**
356
594
  * Build a minimal StoryboardResult for a storyboard skipped by a
357
595
  * `requires_capability` predicate. The single synthetic step carries
@@ -529,40 +767,87 @@ function buildRequiredToolsMissingResult(agentUrls, storyboard, detail) {
529
767
  async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOffset, preSeeded) {
530
768
  const start = Date.now();
531
769
  const isMultiInstance = agentUrls.length > 1;
532
- // Build one client per URL. In single-URL mode `_client` (from comply()) is
533
- // honored so the shared MCP transport is reused across storyboards.
534
- const clients = agentUrls.map(url => (0, client_1.getOrCreateClient)(url, options));
535
- // Discover agent profile against the first instance; all instances are
536
- // expected to run the same code behind a shared state store, so one probe
537
- // is sufficient. For multi-instance runs, skipping N-1 redundant
538
- // get_agent_info calls also keeps CI output clean.
770
+ const useRouting = options.agents !== undefined;
771
+ // Per-specialism routing builds its own clients + per-agent discovery; the
772
+ // legacy single/multi-instance path discovers against the first replica.
773
+ let clients;
774
+ let routingContext;
539
775
  let profile;
540
- if (!options._client) {
541
- const discovered = await (0, client_1.getOrDiscoverProfile)(clients[0], options);
542
- // Discovery failure must surface as a HARD STORYBOARD FAILURE, not a
543
- // silent empty `agentTools: []` that lets every step skip with
544
- // `missing_tool`. The latter mode produces "X/X clean" summaries with
545
- // 100% skipped invisible CI failure when transport setup is broken
546
- // (auth misconfig, MCP transport-fallback bugs, network policy, etc.).
547
- // See: https://github.com/adcontextprotocol/adcp-client/issues/...
548
- if (discovered.step.passed === false) {
776
+ if (useRouting) {
777
+ try {
778
+ routingContext = await (0, agent_routing_1.buildRoutingContext)(storyboard, options);
779
+ }
780
+ catch (err) {
781
+ const detail = err?.message ?? String(err);
782
+ const failedStep = {
783
+ step: err instanceof agent_routing_1.DiscoveryFailure
784
+ ? `Discover agent capabilities (${err.agentKey})`
785
+ : 'Build agent routing index',
786
+ passed: false,
787
+ duration_ms: 0,
788
+ error: detail,
789
+ };
549
790
  if (!options._client)
550
791
  await (0, protocols_1.closeConnections)(options.protocol);
551
- return buildDiscoveryFailedResult(agentUrls, storyboard, discovered.step);
792
+ return buildDiscoveryFailedResult(agentUrls, storyboard, failedStep);
552
793
  }
553
- profile = discovered.profile;
554
- // Populate agentTools and _profile from discovered profile if not already set.
555
- // _profile is threaded into executeStep so capability-based skip gates
556
- // (e.g. account-mode branching) can read raw_capabilities at step time.
557
- if (!options.agentTools && profile?.tools) {
558
- options = { ...options, agentTools: profile.tools, _profile: profile };
794
+ clients = [...routingContext.clients.values()];
795
+ // Pick the first agent's profile as the "primary" for downstream code
796
+ // that reads single-profile fields (library_version on per-step result
797
+ // records, raw_capabilities for `requires_capability`). Per-step
798
+ // accuracy across N agents is a follow-up; today's storyboards that
799
+ // use `requires_capability` are single-tenant authored.
800
+ profile = [...routingContext.profiles.values()][0];
801
+ // For `required_tools` gating, union every agent's advertised tools so
802
+ // a storyboard that needs ≥1 of [sync_governance, activate_signal]
803
+ // passes the gate when any tenant in the map serves either one.
804
+ const unionedTools = new Set();
805
+ for (const p of routingContext.profiles.values()) {
806
+ for (const t of p.tools ?? [])
807
+ unionedTools.add(t);
808
+ }
809
+ if (!options.agentTools) {
810
+ options = { ...options, agentTools: [...unionedTools], _profile: profile };
559
811
  }
560
812
  else if (profile && !options._profile) {
561
813
  options = { ...options, _profile: profile };
562
814
  }
563
815
  }
564
816
  else {
565
- profile = options._profile;
817
+ // Build one client per URL. In single-URL mode `_client` (from comply()) is
818
+ // honored so the shared MCP transport is reused across storyboards.
819
+ clients = agentUrls.map(url => (0, client_1.getOrCreateClient)(url, options));
820
+ // Discover agent profile against the first instance; all instances are
821
+ // expected to run the same code behind a shared state store, so one probe
822
+ // is sufficient. For multi-instance runs, skipping N-1 redundant
823
+ // get_agent_info calls also keeps CI output clean.
824
+ if (!options._client) {
825
+ const discovered = await (0, client_1.getOrDiscoverProfile)(clients[0], options);
826
+ // Discovery failure must surface as a HARD STORYBOARD FAILURE, not a
827
+ // silent empty `agentTools: []` that lets every step skip with
828
+ // `missing_tool`. The latter mode produces "X/X clean" summaries with
829
+ // 100% skipped — invisible CI failure when transport setup is broken
830
+ // (auth misconfig, MCP transport-fallback bugs, network policy, etc.).
831
+ // See: https://github.com/adcontextprotocol/adcp-client/issues/...
832
+ if (discovered.step.passed === false) {
833
+ if (!options._client)
834
+ await (0, protocols_1.closeConnections)(options.protocol);
835
+ return buildDiscoveryFailedResult(agentUrls, storyboard, discovered.step);
836
+ }
837
+ profile = discovered.profile;
838
+ // Populate agentTools and _profile from discovered profile if not already set.
839
+ // _profile is threaded into executeStep so capability-based skip gates
840
+ // (e.g. account-mode branching) can read raw_capabilities at step time.
841
+ if (!options.agentTools && profile?.tools) {
842
+ options = { ...options, agentTools: profile.tools, _profile: profile };
843
+ }
844
+ else if (profile && !options._profile) {
845
+ options = { ...options, _profile: profile };
846
+ }
847
+ }
848
+ else {
849
+ profile = options._profile;
850
+ }
566
851
  }
567
852
  // Evaluate requires_capability predicate before any phase setup.
568
853
  // When the agent explicitly declared it doesn't support what this storyboard
@@ -624,23 +909,31 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
624
909
  const priorProbes = new Map();
625
910
  const contextProvenance = new Map();
626
911
  const priorA2aEnvelopes = new Map();
912
+ const stepRequestStarts = new Map();
627
913
  const phaseResults = [];
628
914
  let passedCount = 0;
629
915
  let failedCount = 0;
630
916
  let skippedCount = 0;
631
- // Stateful-cascade flags live at storyboard scope, NOT phase scope —
632
- // cross-phase storyboards (e.g. signal_marketplace/governance_denied:
633
- // setup in phases 1-2, consumption in phase 3) need the cascade to
634
- // survive phase boundaries. Once a stateful step in any phase failed
635
- // or skipped to materialize state, every downstream stateful step
636
- // stays cascade-skipped regardless of which phase it lives in.
637
- let statefulFailed = false;
638
- // `substitution_chain` is set when the trigger came from a
639
- // deferred-and-unrescued `peer_substitutes_for` declaration (#1144) so
640
- // the cascade-detail message can name the substitute(s) that didn't
641
- // pass. Absent for the immediate-trip path and the legacy any-peer
642
- // not_applicable path.
643
- let statefulSkipTrigger = null;
917
+ const phaseStatefulCascades = new Map();
918
+ // Phase IDs in declaration order, accumulated as we iterate so the
919
+ // default `depends_on` resolution ("all prior phases") doesn't re-scan
920
+ // the storyboard. Phases push their own id at end-of-phase.
921
+ const priorPhaseIds = [];
922
+ // Helpers for per-phase cascade state.
923
+ const effectiveDependsOn = (phase, prior) => phase.depends_on ?? prior;
924
+ const cascadeForPhase = (phase, prior) => {
925
+ // Within-phase cascade always counts — stateful steps later in this
926
+ // phase depend on state from stateful steps earlier in this phase.
927
+ if (phaseStatefulCascades.has(phase.id)) {
928
+ return { tripped: true, trigger: phaseStatefulCascades.get(phase.id) ?? null };
929
+ }
930
+ for (const depId of effectiveDependsOn(phase, prior)) {
931
+ if (phaseStatefulCascades.has(depId)) {
932
+ return { tripped: true, trigger: phaseStatefulCascades.get(depId) ?? null };
933
+ }
934
+ }
935
+ return { tripped: false };
936
+ };
644
937
  // Step results whose failures the main loop added to failedCount. The
645
938
  // branch-set post-pass decrements only for entries that were actually
646
939
  // counted, so an optional phase that hit `presenceDetected` (a PRM 2xx
@@ -671,8 +964,13 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
671
964
  const allSteps = flattenSteps(storyboard);
672
965
  // Inner passes always dispatch round-robin; only the outer runMultiPass
673
966
  // caller knows about the multi-pass strategy. This keeps createDispatcher's
674
- // strategy parameter narrow.
675
- const dispatch = createDispatcher(agentUrls, clients, 'round-robin', dispatchOffset);
967
+ // strategy parameter narrow. Per-specialism routing (#1066) takes the
968
+ // routing dispatcher path, which reads `options.agents` directly and
969
+ // ignores `agentUrls` ordering for selection (still uses URL list for
970
+ // result-record `agent_url:` echo).
971
+ const dispatch = routingContext && options.agents
972
+ ? createRoutingDispatcher(routingContext, options, options.agents)
973
+ : createDispatcher(agentUrls, clients, 'round-robin', dispatchOffset);
676
974
  // Resolve cross-step assertions declared on `storyboard.invariants`.
677
975
  // `resolveAssertions` throws on unknown ids — fail fast here rather than
678
976
  // silently skip, since a missing assertion means unknown conformance gaps.
@@ -816,10 +1114,12 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
816
1114
  // Path (2): index of declared substitutions for this phase. Map keys
817
1115
  // are target step IDs (the steps being substituted FOR); values are the
818
1116
  // step IDs that declared the substitution. Built once per phase from
819
- // each step's `peer_substitutes_for` field.
1117
+ // each step's `provides_state_for` field (or the deprecated
1118
+ // `peer_substitutes_for` synonym; the loader normalizes both onto
1119
+ // `provides_state_for` at parse time, so reading either works).
820
1120
  const phaseSubstitutes = new Map();
821
1121
  for (const declaringStep of phase.steps) {
822
- const decl = declaringStep.peer_substitutes_for;
1122
+ const decl = declaringStep.provides_state_for ?? declaringStep.peer_substitutes_for;
823
1123
  if (decl === undefined)
824
1124
  continue;
825
1125
  const targets = Array.isArray(decl) ? decl : [decl];
@@ -836,9 +1136,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
836
1136
  // references the leftmost step.
837
1137
  let phasePendingMissingTool = null;
838
1138
  // Targets actually rescued by a passing declared substitute. Populated
839
- // when a step with `peer_substitutes_for: X` passes every X in its
840
- // declaration list lands here.
1139
+ // when a step with `provides_state_for: X` (or the deprecated synonym
1140
+ // `peer_substitutes_for: X`) passes — every X in its declaration list
1141
+ // lands here.
841
1142
  const phaseRescuedTargets = new Set();
1143
+ // Map from rescued target id → the substitute step id that rescued it.
1144
+ // Populated when the substitute passes; consumed at phase end to format
1145
+ // the spec-mandated `peer_substituted` detail string. First substitute
1146
+ // wins if multiple peers cover the same target.
1147
+ const phaseRescueSource = new Map();
842
1148
  // Stateful step IDs in the phase. Used at phase end to decide whether
843
1149
  // a deferred not_applicable trigger should cascade: if the sole stateful
844
1150
  // step in the phase returned not_applicable AND there were no peers that
@@ -940,12 +1246,18 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
940
1246
  // reason is `missing_tool` (a benign, passed: true skip) —
941
1247
  // not `prerequisite_failed` (a failed skip). This distinguishes
942
1248
  // "this agent has a real setup bug" from "this agent doesn't
943
- // claim this surface, by design" (adcp-client#1169).
1249
+ // claim this surface, by design" (adcp-client#1169 / #1171).
944
1250
  //
945
1251
  // Uses resolveTaskName so that $test_kit.* steps are checked
946
1252
  // against the resolved concrete task name, not the template
947
1253
  // string (which would never be in agentTools).
948
- if (statefulFailed && step.stateful) {
1254
+ //
1255
+ // Per-phase cascade scoping (#1161): consults `phase.depends_on`
1256
+ // (default: all prior phases) plus the current phase's own
1257
+ // within-phase cascade state. Replaces the storyboard-scope
1258
+ // `statefulFailed` boolean.
1259
+ const cascade = step.stateful ? cascadeForPhase(phase, priorPhaseIds) : { tripped: false };
1260
+ if (cascade.tripped && step.stateful) {
949
1261
  const resolvedTask = resolveTaskName(step, options);
950
1262
  if (options.agentTools && resolvedTask && !options.agentTools.includes(resolvedTask)) {
951
1263
  const toolDetail = `Agent did not advertise tool "${resolvedTask}"; agent tools: [${options.agentTools.join(', ')}].`;
@@ -969,10 +1281,11 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
969
1281
  skippedCount++;
970
1282
  continue;
971
1283
  }
972
- const detail = statefulSkipTrigger
973
- ? statefulSkipTrigger.substitution_chain
974
- ? `Skipped: prior stateful step "${statefulSkipTrigger.stepId}" skipped (${statefulSkipTrigger.reason}); ${statefulSkipTrigger.substitution_chain}; state never materialized.`
975
- : `Skipped: prior stateful step "${statefulSkipTrigger.stepId}" skipped (${statefulSkipTrigger.reason}); state never materialized.`
1284
+ const trigger = cascade.trigger;
1285
+ const detail = trigger
1286
+ ? trigger.substitution_chain
1287
+ ? `Skipped: prior stateful step "${trigger.stepId}" skipped (${trigger.reason}); ${trigger.substitution_chain}; state never materialized.`
1288
+ : `Skipped: prior stateful step "${trigger.stepId}" skipped (${trigger.reason}); state never materialized.`
976
1289
  : 'Skipped: prior stateful step failed.';
977
1290
  stepResults.push({
978
1291
  storyboard_id: storyboard.id,
@@ -994,7 +1307,38 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
994
1307
  phasePassed = false;
995
1308
  continue;
996
1309
  }
997
- const assignment = dispatch.nextFor(step);
1310
+ let assignment;
1311
+ try {
1312
+ assignment = dispatch.nextFor(step);
1313
+ }
1314
+ catch (err) {
1315
+ // Routing failures land here when no agent in the map serves a
1316
+ // step's tool's protocol. Build-time conflict detection already
1317
+ // catches the multi-claim case, so this branch covers genuine
1318
+ // coverage gaps (storyboard authored a tool the topology can't
1319
+ // serve) and unmapped tools without a `default_agent`. Render as
1320
+ // a failed step with the routing error verbatim so the report
1321
+ // tells the operator exactly what's missing.
1322
+ const detail = err instanceof agent_routing_1.RoutingError ? err.message : (err?.message ?? String(err));
1323
+ const failed = {
1324
+ storyboard_id: storyboard.id,
1325
+ step_id: step.id,
1326
+ phase_id: phase.id,
1327
+ title: step.title,
1328
+ task: step.task,
1329
+ passed: false,
1330
+ duration_ms: 0,
1331
+ validations: [],
1332
+ context,
1333
+ error: detail,
1334
+ extraction: { path: 'none' },
1335
+ };
1336
+ stepResults.push(failed);
1337
+ priorStepResults.set(step.id, failed);
1338
+ failedCount++;
1339
+ phasePassed = false;
1340
+ continue;
1341
+ }
998
1342
  const rawResult = await executeStep(assignment.client, step, phase.id, context, allSteps, options, {
999
1343
  contributions,
1000
1344
  priorStepResults,
@@ -1004,10 +1348,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1004
1348
  runnerVars,
1005
1349
  contextProvenance,
1006
1350
  priorA2aEnvelopes,
1351
+ stepRequestStarts,
1007
1352
  agentLibraryVersion: profile?.library_version,
1008
1353
  });
1009
1354
  const result = { ...rawResult, storyboard_id: storyboard.id };
1010
- if (isMultiInstance) {
1355
+ if (isMultiInstance || useRouting) {
1356
+ // Echo per-step routing on the result so JUnit/CI consumers and
1357
+ // bug reports show which agent served which tool. In routed mode
1358
+ // every step gets the field; in replica round-robin only when
1359
+ // there are 2+ URLs.
1011
1360
  result.agent_url = assignment.agentUrl;
1012
1361
  result.agent_index = assignment.instanceIndex + 1;
1013
1362
  }
@@ -1118,13 +1467,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1118
1467
  }
1119
1468
  }
1120
1469
  else {
1121
- statefulFailed = true;
1122
- // Record provenance for the cascade detail message. First trip
1123
- // wins subsequent triggers don't overwrite, since the cascade
1124
- // text references the originating diagnostic (the leftmost
1470
+ // Trip this phase's cascade. First trip wins — subsequent
1471
+ // triggers don't overwrite, since the cascade text
1472
+ // references the originating diagnostic (the leftmost
1125
1473
  // missing-state stateful step in the phase).
1126
- if (statefulSkipTrigger === null) {
1127
- statefulSkipTrigger = { stepId: step.id, reason: result.skip_reason ?? 'missing_tool' };
1474
+ if (!phaseStatefulCascades.has(phase.id)) {
1475
+ phaseStatefulCascades.set(phase.id, {
1476
+ stepId: step.id,
1477
+ reason: result.skip_reason ?? 'missing_tool',
1478
+ });
1128
1479
  }
1129
1480
  }
1130
1481
  }
@@ -1163,14 +1514,20 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1163
1514
  if (step.stateful) {
1164
1515
  phaseEstablishedStatefulState = true;
1165
1516
  // Path (2) rescue tracking: a passing step that declared
1166
- // `peer_substitutes_for: X` rescues X. Recorded against every
1517
+ // `provides_state_for: X` (or the deprecated synonym
1518
+ // `peer_substitutes_for`) rescues X. Recorded against every
1167
1519
  // declared target so phase-end resolution sees the target as
1168
1520
  // covered even if its skip arrives later in the loop.
1169
- const decl = step.peer_substitutes_for;
1521
+ const decl = step.provides_state_for ?? step.peer_substitutes_for;
1170
1522
  if (decl !== undefined) {
1171
1523
  const targets = Array.isArray(decl) ? decl : [decl];
1172
1524
  for (const target of targets) {
1173
1525
  phaseRescuedTargets.add(target);
1526
+ // Track the rescuing substitute's id so phase-end can format
1527
+ // the contract-mandated `peer_substituted` detail string.
1528
+ if (!phaseRescueSource.has(target)) {
1529
+ phaseRescueSource.set(target, step.id);
1530
+ }
1174
1531
  }
1175
1532
  }
1176
1533
  }
@@ -1188,13 +1545,13 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1188
1545
  countedAsFailed.add(result);
1189
1546
  }
1190
1547
  if (step.stateful) {
1191
- statefulFailed = true;
1192
1548
  // Real failure takes precedence over a prior skip-trigger in
1193
1549
  // the cascade detail message — failures are the worse
1194
1550
  // diagnostic, so downstream cascade-skipped steps should
1195
1551
  // reference the failure rather than the earlier benign-ish
1196
- // missing-state skip.
1197
- statefulSkipTrigger = null;
1552
+ // missing-state skip. `null` trigger encodes "real failure,
1553
+ // detail says 'prior stateful step failed'."
1554
+ phaseStatefulCascades.set(phase.id, null);
1198
1555
  }
1199
1556
  // In multi-instance mode, annotate the failure with the cross-instance
1200
1557
  // attribution block so CI readers pattern-match it as a deployment bug.
@@ -1210,46 +1567,70 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1210
1567
  //
1211
1568
  // Cascade fires ONLY when there was at least one other stateful step in
1212
1569
  // the phase that could have served as a substitute — i.e. the phase had
1213
- // peer steps, but none of them established state. A peer that passed
1214
- // (e.g. `list_accounts` substituting for an explicit-mode `sync_accounts`)
1215
- // cancels the trigger entirely. A peer that *failed* already tripped
1216
- // `statefulFailed` at the failure site with the worse-diagnostic real-
1217
- // failure message; we defer to that and don't overwrite.
1570
+ // peer steps, but none of them established state (#1146). A peer that
1571
+ // passed (e.g. `list_accounts` substituting for an explicit-mode
1572
+ // `sync_accounts`) cancels the trigger entirely. A peer that *failed*
1573
+ // already tripped this phase's cascade at the failure site with the
1574
+ // worse-diagnostic real-failure message; we defer to that and don't
1575
+ // overwrite.
1218
1576
  //
1219
1577
  // When the not_applicable step was the SOLE stateful step in the phase
1220
1578
  // (no peers existed at all), the cascade does NOT fire. That platform
1221
1579
  // simply doesn't use this sync pathway — which is valid. Cascading on a
1222
- // sole not_applicable would incorrectly penalise adapters like citrusad,
1223
- // amazon, criteo, and google that manage account state implicitly and
1224
- // have no list_accounts peer in the account_setup phase (adcp-client#1144).
1225
- if (phasePendingNotApplicable && !phaseEstablishedStatefulState && !statefulFailed) {
1580
+ // sole not_applicable would incorrectly penalise adapters that manage
1581
+ // state implicitly and have no list_accounts peer (adcp-client#1146).
1582
+ if (phasePendingNotApplicable && !phaseEstablishedStatefulState && !phaseStatefulCascades.has(phase.id)) {
1226
1583
  const hadStatefulPeers = phaseStatefulStepIds.some(id => id !== phasePendingNotApplicable.stepId);
1227
1584
  if (hadStatefulPeers) {
1228
- statefulFailed = true;
1229
- if (statefulSkipTrigger === null) {
1230
- statefulSkipTrigger = phasePendingNotApplicable;
1231
- }
1585
+ phaseStatefulCascades.set(phase.id, phasePendingNotApplicable);
1232
1586
  }
1233
1587
  }
1234
1588
  // Phase-end cascade resolution for deferred `missing_tool` triggers
1235
1589
  // (#1144). A stateful step that skipped with a hard-missing reason
1236
- // and had at least one declared substitute (`peer_substitutes_for`)
1237
- // was deferred above. If none of the declared substitutes passed,
1238
- // the substitution path failed to establish state promote to a
1239
- // hard cascade with a detail message that names the substitute(s)
1240
- // tried so adopters reading the report see the substitution chain
1241
- // rather than a bare `missing_tool` cascade origin.
1242
- if (phasePendingMissingTool && !phaseRescuedTargets.has(phasePendingMissingTool.stepId) && !statefulFailed) {
1243
- statefulFailed = true;
1244
- if (statefulSkipTrigger === null) {
1245
- const subs = phasePendingMissingTool.substitutes;
1246
- const subsList = subs.length === 1 ? `"${subs[0]}"` : subs.map(s => `"${s}"`).join(', ');
1247
- statefulSkipTrigger = {
1248
- stepId: phasePendingMissingTool.stepId,
1249
- reason: phasePendingMissingTool.reason,
1250
- substitution_chain: `declared substitute ${subsList} did not pass`,
1251
- };
1252
- }
1590
+ // and had at least one declared substitute (`provides_state_for`,
1591
+ // formerly `peer_substitutes_for`) was deferred above. If none of
1592
+ // the declared substitutes passed, the substitution path failed to
1593
+ // establish state — promote to a hard cascade with a detail message
1594
+ // that names the substitute(s) tried so adopters reading the report
1595
+ // see the substitution chain rather than a bare `missing_tool`
1596
+ // cascade origin.
1597
+ if (phasePendingMissingTool &&
1598
+ !phaseRescuedTargets.has(phasePendingMissingTool.stepId) &&
1599
+ !phaseStatefulCascades.has(phase.id)) {
1600
+ const subs = phasePendingMissingTool.substitutes;
1601
+ const subsList = subs.length === 1 ? `"${subs[0]}"` : subs.map(s => `"${s}"`).join(', ');
1602
+ phaseStatefulCascades.set(phase.id, {
1603
+ stepId: phasePendingMissingTool.stepId,
1604
+ reason: phasePendingMissingTool.reason,
1605
+ substitution_chain: `declared substitute ${subsList} did not pass`,
1606
+ });
1607
+ }
1608
+ // Phase-end re-grading for rescued targets (adcp#3734, AdCP 3.0.3+).
1609
+ // When a deferred `missing_tool` / `missing_test_controller` skip was
1610
+ // rescued by a passing same-phase substitute, the spec mandates the
1611
+ // target be re-graded with `skip_reason: 'peer_substituted'` and the
1612
+ // detail string `"<target_step_id> state provided by <phase_id>.<substitute_step_id>"`
1613
+ // — see `runner-output-contract.yaml` > `skip_result.reasons.peer_substituted`.
1614
+ // Without this re-grading the target keeps its original `missing_tool`
1615
+ // grade, which is misleading: state DID materialize, just via a
1616
+ // declared substitute path. Tracked: adcp-client#1267.
1617
+ for (const target of phaseRescuedTargets) {
1618
+ const sourceId = phaseRescueSource.get(target);
1619
+ if (!sourceId)
1620
+ continue;
1621
+ const targetResult = stepResults.find(r => r.step_id === target);
1622
+ if (!targetResult || !targetResult.skipped)
1623
+ continue;
1624
+ // Only re-grade hard-missing-state skips. Other skip reasons (e.g.
1625
+ // `prerequisite_failed`, `peer_branch_taken`) on the target are
1626
+ // outside the substitute-rescue contract. Uses the same helper as
1627
+ // the deferral path (line ~1269 above) so the two sides stay in
1628
+ // lockstep when a future RunnerSkipReason joins the family.
1629
+ if (!isHardMissingStateSkipReason(targetResult.skip_reason))
1630
+ continue;
1631
+ const detail = `${target} state provided by ${phase.id}.${sourceId}`;
1632
+ targetResult.skip_reason = 'peer_substituted';
1633
+ targetResult.skip = { reason: 'peer_substituted', detail };
1253
1634
  }
1254
1635
  phaseResults.push({
1255
1636
  phase_id: phase.id,
@@ -1258,6 +1639,9 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1258
1639
  steps: stepResults,
1259
1640
  duration_ms: Date.now() - phaseStart,
1260
1641
  });
1642
+ // Accumulate phase id for default `depends_on` resolution in the next
1643
+ // iteration — phases declared later see this one as a prior phase.
1644
+ priorPhaseIds.push(phase.id);
1261
1645
  }
1262
1646
  // Branch-set post-pass: phases in a branch set (explicit `branch_set:`
1263
1647
  // declaration or implicit detection via shared `contributes_to` + a later
@@ -1313,6 +1697,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1313
1697
  phaseResults.unshift(seedingPhaseResult);
1314
1698
  const schemasUsed = collectSchemasUsed(phaseResults);
1315
1699
  const strictSummary = summarizeStrictValidation(phaseResults);
1700
+ const validationsNotApplicable = countValidationsNotApplicable(phaseResults);
1316
1701
  const result = {
1317
1702
  storyboard_id: storyboard.id,
1318
1703
  storyboard_title: storyboard.title,
@@ -1322,6 +1707,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1322
1707
  // individually); the aggregating wrapper relabels the top-level result
1323
1708
  // `multi-pass`.
1324
1709
  ...(isMultiInstance && { multi_instance_strategy: 'round-robin' }),
1710
+ ...(routingContext && { agent_map: { ...routingContext.agentMap } }),
1325
1711
  overall_passed: failedCount === 0 && requiredPhasesPassed && !assertionsFailed,
1326
1712
  phases: phaseResults,
1327
1713
  context,
@@ -1329,6 +1715,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
1329
1715
  passed_count: passedCount,
1330
1716
  failed_count: failedCount,
1331
1717
  skipped_count: skippedCount,
1718
+ ...(validationsNotApplicable > 0 ? { validations_not_applicable: validationsNotApplicable } : {}),
1332
1719
  tested_at: new Date().toISOString(),
1333
1720
  ...(schemasUsed.length > 0 ? { schemas_used: schemasUsed } : {}),
1334
1721
  ...(assertionResults.length > 0 ? { assertions: assertionResults } : {}),
@@ -1392,6 +1779,7 @@ async function runMultiPass(agentUrls, storyboard, options) {
1392
1779
  passed_count: result.passed_count,
1393
1780
  failed_count: result.failed_count,
1394
1781
  skipped_count: result.skipped_count,
1782
+ ...(result.validations_not_applicable ? { validations_not_applicable: result.validations_not_applicable } : {}),
1395
1783
  duration_ms: result.total_duration_ms,
1396
1784
  });
1397
1785
  }
@@ -1400,6 +1788,7 @@ async function runMultiPass(agentUrls, storyboard, options) {
1400
1788
  const passed = passes.reduce((sum, p) => sum + p.passed_count, 0);
1401
1789
  const failed = passes.reduce((sum, p) => sum + p.failed_count, 0);
1402
1790
  const skipped = passes.reduce((sum, p) => sum + p.skipped_count, 0);
1791
+ const notApplicable = passes.reduce((sum, p) => sum + (p.validations_not_applicable ?? 0), 0);
1403
1792
  const schemasUsed = passResults.flatMap(r => r.schemas_used ?? []);
1404
1793
  const schemasDedup = [...new Map(schemasUsed.map(s => [s.schema_id, s])).values()];
1405
1794
  // Assertions are scoped per-pass — each pass's runner resolved them
@@ -1421,6 +1810,7 @@ async function runMultiPass(agentUrls, storyboard, options) {
1421
1810
  passed_count: passed,
1422
1811
  failed_count: failed,
1423
1812
  skipped_count: skipped,
1813
+ ...(notApplicable > 0 ? { validations_not_applicable: notApplicable } : {}),
1424
1814
  tested_at: new Date().toISOString(),
1425
1815
  ...(schemasDedup.length > 0 ? { schemas_used: schemasDedup } : {}),
1426
1816
  ...(assertionsAgg.length > 0 ? { assertions: assertionsAgg } : {}),
@@ -1431,6 +1821,27 @@ async function runMultiPass(agentUrls, storyboard, options) {
1431
1821
  * from every validation result with a schema_id; dropping empties keeps
1432
1822
  * the list proportional to what actually ran.
1433
1823
  */
1824
+ /**
1825
+ * Count validation results graded `not_applicable` across every step. Per
1826
+ * runner-output-contract.yaml v2.0.0 these come from the forward-compat
1827
+ * default in the validation dispatcher: when a storyboard declares an
1828
+ * authored `check` value the runner does not implement, the dispatcher
1829
+ * grades it `passed: true, not_applicable: true` rather than failing the
1830
+ * step. Surfacing the count separately lets consumers distinguish
1831
+ * "runner is older than the storyboard" from clean passes.
1832
+ */
1833
+ function countValidationsNotApplicable(phases) {
1834
+ let n = 0;
1835
+ for (const phase of phases) {
1836
+ for (const step of phase.steps) {
1837
+ for (const v of step.validations) {
1838
+ if (v.not_applicable)
1839
+ n++;
1840
+ }
1841
+ }
1842
+ }
1843
+ return n;
1844
+ }
1434
1845
  function collectSchemasUsed(phases) {
1435
1846
  const seen = new Set();
1436
1847
  const out = [];
@@ -1566,14 +1977,21 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
1566
1977
  const context = { ...options.context };
1567
1978
  if (options.context)
1568
1979
  (0, context_1.forwardAliasCache)(options.context, context);
1569
- const webhookReceiver = options.webhook_receiver
1570
- ? await (0, webhook_receiver_1.createWebhookReceiver)({
1571
- ...(options.webhook_receiver.mode && { mode: options.webhook_receiver.mode }),
1572
- ...(options.webhook_receiver.host !== undefined && { host: options.webhook_receiver.host }),
1573
- ...(options.webhook_receiver.port !== undefined && { port: options.webhook_receiver.port }),
1574
- ...(options.webhook_receiver.public_url !== undefined && { public_url: options.webhook_receiver.public_url }),
1575
- })
1576
- : undefined;
1980
+ // `_webhookReceiver` is a test-only injection point; production callers
1981
+ // pass `webhook_receiver` and the runner constructs the listener.
1982
+ const injectedReceiver = options._webhookReceiver;
1983
+ const webhookReceiver = injectedReceiver ??
1984
+ (options.webhook_receiver
1985
+ ? await (0, webhook_receiver_1.createWebhookReceiver)({
1986
+ ...(options.webhook_receiver.mode && { mode: options.webhook_receiver.mode }),
1987
+ ...(options.webhook_receiver.host !== undefined && { host: options.webhook_receiver.host }),
1988
+ ...(options.webhook_receiver.port !== undefined && { port: options.webhook_receiver.port }),
1989
+ ...(options.webhook_receiver.public_url !== undefined && {
1990
+ public_url: options.webhook_receiver.public_url,
1991
+ }),
1992
+ })
1993
+ : undefined);
1994
+ const ownsWebhookReceiver = !injectedReceiver && !!webhookReceiver;
1577
1995
  const runnerVars = (0, context_1.createRunnerVariables)({
1578
1996
  ...(webhookReceiver && { webhookBase: webhookReceiver.base_url }),
1579
1997
  });
@@ -1583,7 +2001,7 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
1583
2001
  const allSteps = flattenSteps(storyboard);
1584
2002
  const found = allSteps.find(s => s.step.id === stepId);
1585
2003
  if (!found) {
1586
- if (webhookReceiver)
2004
+ if (ownsWebhookReceiver && webhookReceiver)
1587
2005
  await webhookReceiver.close();
1588
2006
  throw new Error(`Step "${stepId}" not found in storyboard "${storyboard.id}". ` +
1589
2007
  `Available steps: ${allSteps.map(s => s.step.id).join(', ')}`);
@@ -1601,12 +2019,13 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
1601
2019
  runnerVars,
1602
2020
  contextProvenance,
1603
2021
  priorA2aEnvelopes: new Map(),
2022
+ stepRequestStarts: new Map(),
1604
2023
  agentLibraryVersion: profile?.library_version,
1605
2024
  });
1606
2025
  if (!options._client) {
1607
2026
  await (0, protocols_1.closeConnections)(options.protocol);
1608
2027
  }
1609
- if (webhookReceiver)
2028
+ if (ownsWebhookReceiver && webhookReceiver)
1610
2029
  await webhookReceiver.close();
1611
2030
  return result;
1612
2031
  }
@@ -1620,6 +2039,7 @@ client, step, phaseId, context, allSteps, options, state) {
1620
2039
  priorProbes: new Map(),
1621
2040
  agentUrl: '',
1622
2041
  contextProvenance: new Map(),
2042
+ stepRequestStarts: new Map(),
1623
2043
  };
1624
2044
  // HTTP probe tasks bypass the MCP client entirely.
1625
2045
  if (probes_1.PROBE_TASKS.has(step.task)) {
@@ -1761,6 +2181,19 @@ client, step, phaseId, context, allSteps, options, state) {
1761
2181
  // prevents session-key divergence across create/get/update/delete steps
1762
2182
  // when individual builders or sample_request YAML omit brand.
1763
2183
  request = applyBrandInvariant(request, options, effectiveStep.task);
2184
+ // Per-run sandbox-bypass hint (#841). When the operator passes
2185
+ // `--no-sandbox` (or sets `disable_sandbox: true` programmatically), the
2186
+ // runner stamps `ext.adcp.disable_sandbox: true` on every outgoing
2187
+ // request. Adopters that read this field bypass their internal sandbox
2188
+ // routing — env-var fallbacks, brand-domain heuristics, fixture
2189
+ // substitutes — and exercise their real adapter path. Agents that
2190
+ // don't recognize the field ignore it (per spec, `ext` is accepted
2191
+ // without error and not echoed). Gated on the schema check that
2192
+ // `applyBrandInvariant` uses for `account` and `brand` so tools whose
2193
+ // `additionalProperties: false` schema would reject `ext` aren't broken.
2194
+ if (options.disable_sandbox === true) {
2195
+ request = applyDisableSandboxHint(request, effectiveStep.task);
2196
+ }
1764
2197
  // Mutating AdCP requests require idempotency_key per spec. Storyboard
1765
2198
  // yamls generally omit it so authors don't have to remember it on every
1766
2199
  // mutating step — mint one here on the runner's behalf, matching how a
@@ -1773,7 +2206,32 @@ client, step, phaseId, context, allSteps, options, state) {
1773
2206
  const unresolvedVars = findUnresolvedContextVars(request);
1774
2207
  if (unresolvedVars.length > 0 && !step.expect_error) {
1775
2208
  const next = getNextStepPreview(step.id, allSteps, context, runState.runnerVars);
1776
- const detail = `Skipped: unresolved context variables from prior steps: ${unresolvedVars.join(', ')}.`;
2209
+ const detail = `Skipped: unresolved context variables from prior steps: ${unresolvedVars.map(v => v.key).join(', ')}.`;
2210
+ // Per runner-output-contract.yaml v2.0.0, a skipped consumer step MUST
2211
+ // carry an `unresolved_substitution` validation result for each missing
2212
+ // token — `expected` is the token string, `actual` / `json_pointer` /
2213
+ // `request` / `response` are null (pre-wire failure; no response payload
2214
+ // exists). Surfacing this as a validation rather than only a skip detail
2215
+ // keeps the runner-output contract's "failed/skipped steps include at
2216
+ // least one validation result" invariant intact and lets dashboards
2217
+ // attribute the cascade origin without parsing the skip message.
2218
+ const seenTokens = new Set();
2219
+ const synthesized = [];
2220
+ for (const v of unresolvedVars) {
2221
+ if (seenTokens.has(v.token))
2222
+ continue;
2223
+ seenTokens.add(v.token);
2224
+ synthesized.push({
2225
+ check: 'unresolved_substitution',
2226
+ passed: false,
2227
+ description: `request token "${v.token}" did not resolve — prior step did not populate context.${v.key}`,
2228
+ json_pointer: null,
2229
+ expected: v.token,
2230
+ actual: null,
2231
+ schema_id: null,
2232
+ schema_url: null,
2233
+ });
2234
+ }
1777
2235
  return {
1778
2236
  step_id: step.id,
1779
2237
  phase_id: phaseId,
@@ -1784,7 +2242,7 @@ client, step, phaseId, context, allSteps, options, state) {
1784
2242
  skip_reason: 'prerequisite_failed',
1785
2243
  skip: buildSkip('prerequisite_failed', detail),
1786
2244
  duration_ms: 0,
1787
- validations: [],
2245
+ validations: synthesized,
1788
2246
  context,
1789
2247
  error: detail,
1790
2248
  next,
@@ -1821,6 +2279,14 @@ client, step, phaseId, context, allSteps, options, state) {
1821
2279
  let httpResult;
1822
2280
  let responseRecord;
1823
2281
  let a2aEnvelope;
2282
+ // Capture the ISO timestamp immediately before the step's AdCP request
2283
+ // dispatch. `upstream_traffic` validations use this as the default
2284
+ // `since_timestamp` window bound when querying the controller. Recorded
2285
+ // on `runState.stepRequestStarts` so a later step's `since: prior_step_id`
2286
+ // reference can resolve back to it.
2287
+ const requestStartIso = new Date().toISOString();
2288
+ if (runState.stepRequestStarts)
2289
+ runState.stepRequestStarts.set(step.id, requestStartIso);
1824
2290
  if (useRawProbe) {
1825
2291
  const started = Date.now();
1826
2292
  try {
@@ -1842,7 +2308,7 @@ client, step, phaseId, context, allSteps, options, state) {
1842
2308
  const filteredHeaders = filterResponseHeaders(httpResult.headers);
1843
2309
  responseRecord = {
1844
2310
  transport: 'mcp',
1845
- payload: redactSecrets(httpResult.body),
2311
+ payload: (0, redact_secrets_1.redactSecrets)(httpResult.body),
1846
2312
  ...(typeof httpResult.status === 'number' ? { status: httpResult.status } : {}),
1847
2313
  ...(filteredHeaders && { headers: filteredHeaders }),
1848
2314
  duration_ms: durationMs,
@@ -1902,7 +2368,7 @@ client, step, phaseId, context, allSteps, options, state) {
1902
2368
  if (taskResult) {
1903
2369
  responseRecord = {
1904
2370
  transport: options.protocol === 'a2a' ? 'a2a' : 'mcp',
1905
- payload: redactSecrets(taskResult.data ?? taskResult.error ?? null),
2371
+ payload: (0, redact_secrets_1.redactSecrets)(taskResult.data ?? taskResult.error ?? null),
1906
2372
  duration_ms: stepResult.duration_ms,
1907
2373
  };
1908
2374
  }
@@ -1910,7 +2376,7 @@ client, step, phaseId, context, allSteps, options, state) {
1910
2376
  const requestRecord = {
1911
2377
  transport: useRawProbe ? 'mcp' : options.protocol === 'a2a' ? 'a2a' : 'mcp',
1912
2378
  operation: effectiveStep.task,
1913
- payload: redactSecrets(request),
2379
+ payload: (0, redact_secrets_1.redactSecrets)(request),
1914
2380
  ...(runState.agentUrl ? { url: runState.agentUrl } : {}),
1915
2381
  };
1916
2382
  // Feature-unsupported or unknown-tool errors → treat as skip
@@ -1968,6 +2434,14 @@ client, step, phaseId, context, allSteps, options, state) {
1968
2434
  }
1969
2435
  return resolved;
1970
2436
  });
2437
+ // Pre-fetch upstream_traffic data: any `check: upstream_traffic`
2438
+ // validation needs the controller's `query_upstream_traffic` response,
2439
+ // but the validation dispatcher is synchronous. Async-fetch here once
2440
+ // per unique `since_timestamp` window so the validator can grade
2441
+ // synchronously. Adopters who don't advertise the scenario short-
2442
+ // circuit to a single `advertised: false` marker and every
2443
+ // upstream_traffic check on the step grades not_applicable.
2444
+ const upstreamTraffic = await prefetchUpstreamTraffic(step.id, resolvedValidations, client, options, runState, requestStartIso);
1971
2445
  const vctx = {
1972
2446
  taskName: effectiveStep.task,
1973
2447
  ...(taskResult && { taskResult }),
@@ -1979,6 +2453,8 @@ client, step, phaseId, context, allSteps, options, state) {
1979
2453
  ...(responseRecord && { response: responseRecord }),
1980
2454
  storyboardContext: context,
1981
2455
  ...(a2aEnvelope && { a2aEnvelope }),
2456
+ ...(upstreamTraffic && { upstreamTraffic }),
2457
+ ...(step.sample_request && { storyboardStep: { sample_request: step.sample_request } }),
1982
2458
  ...(() => {
1983
2459
  // Walk back through the run's captured A2A envelopes and use
1984
2460
  // the most recent prior step's envelope as the comparison
@@ -2001,7 +2477,6 @@ client, step, phaseId, context, allSteps, options, state) {
2001
2477
  };
2002
2478
  validations = (0, validations_1.runValidations)(resolvedValidations, vctx);
2003
2479
  }
2004
- const allValidationsPassed = validations.every(v => v.passed);
2005
2480
  // Persist the captured A2A envelope keyed by step id so cross-step
2006
2481
  // validators (`a2a_context_continuity`) on subsequent steps can
2007
2482
  // compare against it. Only fires when this step actually captured
@@ -2038,14 +2513,83 @@ client, step, phaseId, context, allSteps, options, state) {
2038
2513
  // ensures the minted value from any same-step $generate:…#<key> inline
2039
2514
  // substitution is visible here.
2040
2515
  if (step.context_outputs?.length) {
2041
- const explicit = (0, context_1.applyContextOutputsWithProvenance)(hasData && taskResult ? taskResult.data : undefined, step.context_outputs, step.id, effectiveStep.task, updatedContext);
2516
+ // Resolve `task_completion.<path>` outputs against the eventual task
2517
+ // artifact rather than the immediate response. When the immediate
2518
+ // response is a submitted-arm envelope (HITL / async-signed-IO flows),
2519
+ // the seller-assigned IDs only exist on the completion artifact — the
2520
+ // sync-shape path resolves to nothing and the storyboard fails on
2521
+ // `capture_path_not_resolvable` for a value the seller correctly
2522
+ // produces, just on a later message. The `task_completion.` prefix is
2523
+ // an explicit author-side opt-in: "poll tasks/get for terminal status,
2524
+ // then resolve the rest of the path against the artifact data."
2525
+ //
2526
+ // Polling failures (timeout, terminal failed/canceled/rejected) emit
2527
+ // `capture_poll_timeout` instead of recycling
2528
+ // `capture_path_not_resolvable` so the failure-class is distinct from
2529
+ // the original "field absent in immediate response" diagnostic.
2530
+ const taskCompletionResolution = await resolveTaskCompletionOutputs(taskResult, step.context_outputs, client, runState.webhookReceiver);
2531
+ // `'data' in resolution` distinguishes "polled, artifact had no data"
2532
+ // (use undefined → outputs fail with capture_path_not_resolvable) from
2533
+ // "did not poll" (fall back to the immediate response data).
2534
+ const extractionData = 'data' in taskCompletionResolution
2535
+ ? taskCompletionResolution.data
2536
+ : hasData && taskResult
2537
+ ? taskResult.data
2538
+ : undefined;
2539
+ const remappedOutputs = remapTaskCompletionOutputs(step.context_outputs);
2540
+ const explicit = (0, context_1.applyContextOutputsWithProvenance)(extractionData, remappedOutputs, step.id, effectiveStep.task, updatedContext);
2042
2541
  Object.assign(updatedContext, explicit.values);
2043
2542
  if (runState.contextProvenance) {
2044
2543
  for (const [key, entry] of Object.entries(explicit.provenance)) {
2045
2544
  runState.contextProvenance.set(key, entry);
2046
2545
  }
2047
2546
  }
2547
+ // Per runner-output-contract.yaml v2.0.0, a `context_outputs.path` that
2548
+ // resolves to absent / null / "" is a producer-side conformance failure
2549
+ // on THIS step (capture_path_not_resolvable), not on a downstream
2550
+ // consumer. Synthesize a failed validation_result so the failure is
2551
+ // attributed where it actually originated. Emitted regardless of whether
2552
+ // the step's authored validations passed — a clean response_schema with
2553
+ // a failed capture is the exact case adcp#3796 set out to fix.
2554
+ if (explicit.failures && explicit.failures.length > 0) {
2555
+ for (const failure of explicit.failures) {
2556
+ const wasTaskCompletion = step.context_outputs.some(o => o.key === failure.key && typeof o.path === 'string' && o.path.startsWith(TASK_COMPLETION_PATH_PREFIX));
2557
+ const pollTimedOut = wasTaskCompletion && taskCompletionResolution.timedOut === true;
2558
+ const taskFailed = wasTaskCompletion && taskCompletionResolution.taskFailed === true;
2559
+ const originalPath = wasTaskCompletion ? `${TASK_COMPLETION_PATH_PREFIX}${failure.path}` : failure.path;
2560
+ let check;
2561
+ let description;
2562
+ if (pollTimedOut) {
2563
+ check = 'capture_poll_timeout';
2564
+ description = `context_outputs path "${originalPath}" (key "${failure.key}") did not resolve before tasks/get poll timed out (${taskCompletionResolution.pollTimeoutMs}ms)`;
2565
+ }
2566
+ else if (taskFailed) {
2567
+ check = 'capture_task_failed';
2568
+ description = `context_outputs path "${originalPath}" (key "${failure.key}") did not resolve because the task reached a terminal failed/canceled/rejected state`;
2569
+ }
2570
+ else {
2571
+ check = 'capture_path_not_resolvable';
2572
+ description = `context_outputs path "${originalPath}" (key "${failure.key}") did not resolve to a usable value`;
2573
+ }
2574
+ const synthetic = {
2575
+ check,
2576
+ passed: false,
2577
+ description,
2578
+ json_pointer: (0, path_1.toJsonPointer)(failure.path),
2579
+ expected: originalPath,
2580
+ actual: failure.resolved,
2581
+ schema_id: null,
2582
+ schema_url: null,
2583
+ ...(requestRecord && { request: requestRecord }),
2584
+ ...(responseRecord && { response: responseRecord }),
2585
+ };
2586
+ validations.push(synthetic);
2587
+ }
2588
+ }
2048
2589
  }
2590
+ // Re-evaluate after any synthesized capture-failure validations are
2591
+ // appended — the step's overall pass/fail must reflect them.
2592
+ const allValidationsPassedFinal = validations.every(v => v.passed);
2049
2593
  // Emit context-value-rejected hints when the seller's error lists the
2050
2594
  // values it would have accepted and the rejected request value traces
2051
2595
  // back to a prior-step $context.* write. Non-fatal: doesn't flip
@@ -2070,7 +2614,7 @@ client, step, phaseId, context, allSteps, options, state) {
2070
2614
  // Hints trace to context that existed BEFORE this step's own writes,
2071
2615
  // since the rejected value can't have come from this step's own
2072
2616
  // extraction.
2073
- const stepFailed = !(passed && allValidationsPassed);
2617
+ const stepFailed = !(passed && allValidationsPassedFinal);
2074
2618
  const contextRejectionHints = stepFailed && runState.contextProvenance
2075
2619
  ? (0, rejection_hints_1.detectContextRejectionHints)(taskResult, request, context, runState.contextProvenance, effectiveStep.task)
2076
2620
  : [];
@@ -2112,13 +2656,13 @@ client, step, phaseId, context, allSteps, options, state) {
2112
2656
  phase_id: phaseId,
2113
2657
  title: step.title,
2114
2658
  task: step.task,
2115
- passed: passed && allValidationsPassed,
2659
+ passed: passed && allValidationsPassedFinal,
2116
2660
  expect_error: step.expect_error,
2117
2661
  duration_ms: stepResult.duration_ms,
2118
2662
  // Legacy `response` field (new code reads `response_record`).
2119
2663
  // Redact in case a downstream consumer still keys off it; the
2120
2664
  // modern `response_record.payload` path is already redacted.
2121
- response: redactSecrets(taskResult?.data),
2665
+ response: (0, redact_secrets_1.redactSecrets)(taskResult?.data),
2122
2666
  validations,
2123
2667
  context: updatedContext,
2124
2668
  ...(runState.contextProvenance &&
@@ -2179,7 +2723,7 @@ async function executeProbeStep(step, phaseId, context, allSteps, options, runSt
2179
2723
  const responseRecord = httpResult
2180
2724
  ? {
2181
2725
  transport: 'http',
2182
- payload: redactSecrets(httpResult.body),
2726
+ payload: (0, redact_secrets_1.redactSecrets)(httpResult.body),
2183
2727
  status: httpResult.status,
2184
2728
  ...(filteredProbeHeaders && { headers: filteredProbeHeaders }),
2185
2729
  duration_ms: duration,
@@ -2323,14 +2867,14 @@ function parseLastA2aMessageSendCapture(captures) {
2323
2867
  // `envelope.result` keeps presence-of-key fidelity for validators
2324
2868
  // that need to distinguish "result was null" from "result was
2325
2869
  // omitted". Both paths run through `redactSecrets`.
2326
- const redactedResult = envelope.result !== undefined ? redactSecrets(envelope.result) : null;
2870
+ const redactedResult = envelope.result !== undefined ? (0, redact_secrets_1.redactSecrets)(envelope.result) : null;
2327
2871
  return {
2328
2872
  result: redactedResult,
2329
2873
  envelope: {
2330
2874
  ...(envelope.jsonrpc !== undefined && { jsonrpc: envelope.jsonrpc }),
2331
2875
  ...(envelope.id !== undefined && { id: envelope.id }),
2332
2876
  ...(envelope.result !== undefined && { result: redactedResult }),
2333
- ...(envelope.error !== undefined && { error: redactSecrets(envelope.error) }),
2877
+ ...(envelope.error !== undefined && { error: (0, redact_secrets_1.redactSecrets)(envelope.error) }),
2334
2878
  },
2335
2879
  http_status: cap.status,
2336
2880
  };
@@ -2572,7 +3116,17 @@ function applyBrandInvariant(request, options, taskName) {
2572
3116
  const acct = existingAccount;
2573
3117
  const isNaturalKeyVariant = 'brand' in acct || 'operator' in acct;
2574
3118
  if (isNaturalKeyVariant) {
2575
- result.account = { ...acct, brand };
3119
+ const merged = { ...acct, brand };
3120
+ // The natural-key arm of AccountReference requires `operator` (per
3121
+ // schemas/cache/{version}/core/account-ref.json). A fixture or earlier
3122
+ // context-extraction step that produced `{brand, sandbox}` without
3123
+ // operator would otherwise be passed through and rejected by a
3124
+ // strict-validating seller. Default operator to brand.domain — same
3125
+ // convention `resolveAccount` uses for synthetic refs.
3126
+ if (typeof merged.operator !== 'string' && typeof brand.domain === 'string') {
3127
+ merged.operator = brand.domain;
3128
+ }
3129
+ result.account = merged;
2576
3130
  }
2577
3131
  }
2578
3132
  }
@@ -2584,6 +3138,44 @@ function applyBrandInvariant(request, options, taskName) {
2584
3138
  }
2585
3139
  return result;
2586
3140
  }
3141
+ /**
3142
+ * Inject `ext.adcp.disable_sandbox: true` into the outgoing request when the
3143
+ * operator passed `--no-sandbox` (or `disable_sandbox: true` programmatically).
3144
+ * Issue #841.
3145
+ *
3146
+ * `ext` is the spec-blessed channel for read-by-agent extensions and is
3147
+ * accepted-without-error on every tool, so the schema check is conservative
3148
+ * — only inject when the tool's request schema permits a top-level `ext`
3149
+ * field. Tools with `additionalProperties: false` that don't list `ext`
3150
+ * would fail strict AJV validation otherwise.
3151
+ *
3152
+ * Merging strategy: preserve any existing `ext.adcp` block the storyboard
3153
+ * fixture or builder authored (e.g. vendor extensions a future scenario
3154
+ * might exercise). The injected `disable_sandbox` flag rides alongside
3155
+ * those rather than overwriting them.
3156
+ */
3157
+ function applyDisableSandboxHint(request, taskName) {
3158
+ if (taskName && !(0, schema_loader_1.schemaAllowsTopLevelField)(taskName, 'ext'))
3159
+ return request;
3160
+ const existingExt = request.ext;
3161
+ const existingExtObj = existingExt != null && typeof existingExt === 'object' && !Array.isArray(existingExt)
3162
+ ? existingExt
3163
+ : {};
3164
+ const existingAdcpExt = existingExtObj.adcp;
3165
+ const existingAdcpExtObj = existingAdcpExt != null && typeof existingAdcpExt === 'object' && !Array.isArray(existingAdcpExt)
3166
+ ? existingAdcpExt
3167
+ : {};
3168
+ return {
3169
+ ...request,
3170
+ ext: {
3171
+ ...existingExtObj,
3172
+ adcp: {
3173
+ ...existingAdcpExtObj,
3174
+ disable_sandbox: true,
3175
+ },
3176
+ },
3177
+ };
3178
+ }
2587
3179
  /**
2588
3180
  * Mint an `idempotency_key` for mutating storyboard requests when one wasn't
2589
3181
  * supplied. Storyboard `sample_request` blocks generally omit it; the runner
@@ -2617,8 +3209,109 @@ function truncateError(error) {
2617
3209
  return undefined;
2618
3210
  return error.length > MAX_ERROR_LENGTH ? error.slice(0, MAX_ERROR_LENGTH) + '...[truncated]' : error;
2619
3211
  }
3212
+ /**
3213
+ * Pre-fetch `query_upstream_traffic` responses for every unique
3214
+ * `since_timestamp` window declared by `upstream_traffic` validations on
3215
+ * THIS step. The dispatcher is synchronous; the controller call is async
3216
+ * — running it once here keeps the validator simple and avoids redundant
3217
+ * controller traffic when a step has multiple upstream_traffic checks
3218
+ * sharing a window.
3219
+ *
3220
+ * Returns `undefined` when the step declares no upstream_traffic checks
3221
+ * (no work to do), or a context with `advertised: false` when the
3222
+ * controller does not advertise `query_upstream_traffic` (every check
3223
+ * grades not_applicable per the spec's adopter-opt-in rule).
3224
+ */
3225
+ async function prefetchUpstreamTraffic(stepId, resolvedValidations, client, options, runState, requestStartIso) {
3226
+ const upstreamChecks = resolvedValidations.filter(v => v.check === 'upstream_traffic');
3227
+ if (upstreamChecks.length === 0)
3228
+ return undefined;
3229
+ const advertised = options._controllerCapabilities?.detected === true &&
3230
+ options._controllerCapabilities.scenarios.includes('query_upstream_traffic');
3231
+ if (!advertised) {
3232
+ return {
3233
+ advertised: false,
3234
+ queries: new Map(),
3235
+ thisStepSince: requestStartIso,
3236
+ };
3237
+ }
3238
+ // Resolve `since: prior_step_id` references against runState's
3239
+ // recorded request timestamps. Validations that name an unknown step
3240
+ // fall back to this step's own start (matching default behavior).
3241
+ const priorStepSinceMap = new Map();
3242
+ const unresolvedSinceRefs = new Set();
3243
+ const sinceTimestamps = new Set([requestStartIso]);
3244
+ for (const v of upstreamChecks) {
3245
+ if (!v.since)
3246
+ continue;
3247
+ const priorStart = runState.stepRequestStarts?.get(v.since);
3248
+ if (priorStart) {
3249
+ priorStepSinceMap.set(v.since, priorStart);
3250
+ sinceTimestamps.add(priorStart);
3251
+ }
3252
+ else {
3253
+ // Spec PR adcp#3816: a `since: prior_step_id` that doesn't resolve
3254
+ // is a storyboard authoring bug — silently masking it as "use this
3255
+ // step's start" lets misspelled refs pass vacuously. Track and
3256
+ // surface as a typed failure on the validation result.
3257
+ priorStepSinceMap.set(v.since, requestStartIso);
3258
+ unresolvedSinceRefs.add(v.since);
3259
+ }
3260
+ }
3261
+ const queries = new Map();
3262
+ for (const sinceTs of sinceTimestamps) {
3263
+ // Per spec PR adcp#3816: runners SHOULD subtract a clock-skew tolerance
3264
+ // (50ms minimum, 250ms recommended) before sending the bound to the
3265
+ // controller, so a recorded call timestamped microseconds before the
3266
+ // runner's clock measurement isn't silently excluded. We use 250ms (the
3267
+ // spec's recommended value).
3268
+ const adjustedSince = new Date(new Date(sinceTs).getTime() - 250).toISOString();
3269
+ const params = { since_timestamp: adjustedSince, limit: 100 };
3270
+ const requestRecord = {
3271
+ transport: options.protocol === 'a2a' ? 'a2a' : 'mcp',
3272
+ operation: 'comply_test_controller',
3273
+ payload: (0, redact_secrets_1.redactSecrets)({ scenario: 'query_upstream_traffic', params }),
3274
+ ...(runState.agentUrl ? { url: runState.agentUrl } : {}),
3275
+ };
3276
+ const startMs = Date.now();
3277
+ let payload;
3278
+ try {
3279
+ const result = await (0, test_controller_1.queryUpstreamTraffic)(client, params, options);
3280
+ if ('success' in result && result.success === true) {
3281
+ payload = result;
3282
+ }
3283
+ else {
3284
+ const errResult = result;
3285
+ const message = errResult.error_detail
3286
+ ? `${errResult.error ?? 'controller_error'}: ${errResult.error_detail}`
3287
+ : (errResult.error ?? 'controller returned a non-success response');
3288
+ payload = { error: message };
3289
+ }
3290
+ }
3291
+ catch (err) {
3292
+ payload = { error: err instanceof Error ? err.message : String(err) };
3293
+ }
3294
+ const responseRecord = {
3295
+ transport: options.protocol === 'a2a' ? 'a2a' : 'mcp',
3296
+ payload: (0, redact_secrets_1.redactSecrets)(payload),
3297
+ duration_ms: Date.now() - startMs,
3298
+ };
3299
+ queries.set(sinceTs, { request: requestRecord, response: responseRecord, payload });
3300
+ }
3301
+ return {
3302
+ advertised: true,
3303
+ queries,
3304
+ thisStepSince: requestStartIso,
3305
+ ...(priorStepSinceMap.size > 0 ? { priorStepSinceMap } : {}),
3306
+ ...(unresolvedSinceRefs.size > 0 ? { unresolvedSinceRefs } : {}),
3307
+ };
3308
+ }
2620
3309
  /**
2621
3310
  * Find any "$context.xxx" strings that weren't resolved during injection.
3311
+ * Returns one entry per occurrence with both the bare key (for legacy
3312
+ * detail-string formatting) and the full token (for the
3313
+ * `unresolved_substitution` validation result's `expected` field, per
3314
+ * runner-output-contract.yaml v2.0.0).
2622
3315
  */
2623
3316
  function findUnresolvedContextVars(obj) {
2624
3317
  const vars = [];
@@ -2626,7 +3319,7 @@ function findUnresolvedContextVars(obj) {
2626
3319
  if (typeof val === 'string') {
2627
3320
  const match = val.match(/^\$context\.(\w+)$/);
2628
3321
  if (match?.[1])
2629
- vars.push(match[1]);
3322
+ vars.push({ key: match[1], token: val });
2630
3323
  }
2631
3324
  else if (Array.isArray(val)) {
2632
3325
  val.forEach(walk);
@@ -2696,6 +3389,36 @@ function createDispatcher(agentUrls, clients, _strategy, startOffset = 0) {
2696
3389
  },
2697
3390
  };
2698
3391
  }
3392
+ /**
3393
+ * Per-specialism routing dispatcher (#1066). Picks the agent that claims
3394
+ * each step's tool's protocol via the routing context. Throws
3395
+ * `RoutingError` mid-step when no route can be determined; the runner's
3396
+ * step loop catches and converts to a synthetic `unroutable_task` skip.
3397
+ *
3398
+ * `instanceIndex` reflects the agent key's insertion order in the map —
3399
+ * deterministic and matches the index used for downstream `agent_urls`
3400
+ * exposure on the storyboard result.
3401
+ */
3402
+ function createRoutingDispatcher(ctx, options, agents) {
3403
+ const keyOrder = Object.keys(agents);
3404
+ const keyToIndex = new Map(keyOrder.map((k, i) => [k, i]));
3405
+ return {
3406
+ nextFor(step) {
3407
+ const key = (0, agent_routing_1.resolveAgentForStep)(step, options, ctx);
3408
+ const client = ctx.clients.get(key);
3409
+ const url = agents[key]?.url;
3410
+ if (!client || !url) {
3411
+ throw new agent_routing_1.RoutingError(`Internal: resolved agent key "${key}" has no client/url. ` +
3412
+ `This indicates a bug in routing-context construction.`, step.task, `key ${key} unbound`);
3413
+ }
3414
+ return {
3415
+ client,
3416
+ agentUrl: url,
3417
+ instanceIndex: keyToIndex.get(key) ?? 0,
3418
+ };
3419
+ },
3420
+ };
3421
+ }
2699
3422
  const HORIZONTAL_SCALING_DOCS_URL = 'https://adcontextprotocol.org/docs/building/validate-your-agent#verifying-cross-instance-state';
2700
3423
  const NOT_FOUND_PATTERN = /not[_ ]found|not-found|\b404\b/i;
2701
3424
  // Agent-controlled text (error messages, response payloads) lands in terminal