@adcp/sdk 6.6.0 → 6.8.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 (1218) 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 +462 -11
  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/derived-account-store.d.ts +152 -0
  14. package/dist/lib/adapters/derived-account-store.d.ts.map +1 -0
  15. package/dist/lib/adapters/derived-account-store.js +135 -0
  16. package/dist/lib/adapters/derived-account-store.js.map +1 -0
  17. package/dist/lib/adapters/implicit-account-store.d.ts +172 -0
  18. package/dist/lib/adapters/implicit-account-store.d.ts.map +1 -0
  19. package/dist/lib/adapters/implicit-account-store.js +315 -0
  20. package/dist/lib/adapters/implicit-account-store.js.map +1 -0
  21. package/dist/lib/adapters/index.d.ts +5 -0
  22. package/dist/lib/adapters/index.d.ts.map +1 -1
  23. package/dist/lib/adapters/index.js +25 -1
  24. package/dist/lib/adapters/index.js.map +1 -1
  25. package/dist/lib/adapters/oauth-passthrough-resolver.d.ts +193 -0
  26. package/dist/lib/adapters/oauth-passthrough-resolver.d.ts.map +1 -0
  27. package/dist/lib/adapters/oauth-passthrough-resolver.js +180 -0
  28. package/dist/lib/adapters/oauth-passthrough-resolver.js.map +1 -0
  29. package/dist/lib/adapters/roster-account-store.d.ts +282 -0
  30. package/dist/lib/adapters/roster-account-store.d.ts.map +1 -0
  31. package/dist/lib/adapters/roster-account-store.js +216 -0
  32. package/dist/lib/adapters/roster-account-store.js.map +1 -0
  33. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
  34. package/dist/lib/auth/oauth/ClientCredentialsFlow.js +5 -1
  35. package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
  36. package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
  37. package/dist/lib/auth/oauth/discovery.js +6 -1
  38. package/dist/lib/auth/oauth/discovery.js.map +1 -1
  39. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  40. package/dist/lib/core/SingleAgentClient.d.ts +22 -0
  41. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  42. package/dist/lib/core/SingleAgentClient.js +86 -23
  43. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  44. package/dist/lib/index.d.ts +4 -4
  45. package/dist/lib/index.d.ts.map +1 -1
  46. package/dist/lib/index.js +27 -7
  47. package/dist/lib/index.js.map +1 -1
  48. package/dist/lib/mock-server/creative-ad-server/seed-data.d.ts +81 -0
  49. package/dist/lib/mock-server/creative-ad-server/seed-data.d.ts.map +1 -0
  50. package/dist/lib/mock-server/creative-ad-server/seed-data.js +200 -0
  51. package/dist/lib/mock-server/creative-ad-server/seed-data.js.map +1 -0
  52. package/dist/lib/mock-server/creative-ad-server/server.d.ts +39 -0
  53. package/dist/lib/mock-server/creative-ad-server/server.d.ts.map +1 -0
  54. package/dist/lib/mock-server/creative-ad-server/server.js +618 -0
  55. package/dist/lib/mock-server/creative-ad-server/server.js.map +1 -0
  56. package/dist/lib/mock-server/creative-template/server.d.ts.map +1 -1
  57. package/dist/lib/mock-server/creative-template/server.js +54 -9
  58. package/dist/lib/mock-server/creative-template/server.js.map +1 -1
  59. package/dist/lib/mock-server/index.d.ts +27 -1
  60. package/dist/lib/mock-server/index.d.ts.map +1 -1
  61. package/dist/lib/mock-server/index.js +289 -15
  62. package/dist/lib/mock-server/index.js.map +1 -1
  63. package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts +46 -0
  64. package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts.map +1 -0
  65. package/dist/lib/mock-server/sales-guaranteed/seed-data.js +167 -0
  66. package/dist/lib/mock-server/sales-guaranteed/seed-data.js.map +1 -0
  67. package/dist/lib/mock-server/sales-guaranteed/server.d.ts +14 -0
  68. package/dist/lib/mock-server/sales-guaranteed/server.d.ts.map +1 -0
  69. package/dist/lib/mock-server/sales-guaranteed/server.js +893 -0
  70. package/dist/lib/mock-server/sales-guaranteed/server.js.map +1 -0
  71. package/dist/lib/mock-server/sales-non-guaranteed/seed-data.d.ts +66 -0
  72. package/dist/lib/mock-server/sales-non-guaranteed/seed-data.d.ts.map +1 -0
  73. package/dist/lib/mock-server/sales-non-guaranteed/seed-data.js +193 -0
  74. package/dist/lib/mock-server/sales-non-guaranteed/seed-data.js.map +1 -0
  75. package/dist/lib/mock-server/sales-non-guaranteed/server.d.ts +33 -0
  76. package/dist/lib/mock-server/sales-non-guaranteed/server.d.ts.map +1 -0
  77. package/dist/lib/mock-server/sales-non-guaranteed/server.js +782 -0
  78. package/dist/lib/mock-server/sales-non-guaranteed/server.js.map +1 -0
  79. package/dist/lib/mock-server/sales-social/seed-data.d.ts +34 -0
  80. package/dist/lib/mock-server/sales-social/seed-data.d.ts.map +1 -0
  81. package/dist/lib/mock-server/sales-social/seed-data.js +42 -0
  82. package/dist/lib/mock-server/sales-social/seed-data.js.map +1 -0
  83. package/dist/lib/mock-server/sales-social/server.d.ts +17 -0
  84. package/dist/lib/mock-server/sales-social/server.d.ts.map +1 -0
  85. package/dist/lib/mock-server/sales-social/server.js +1219 -0
  86. package/dist/lib/mock-server/sales-social/server.js.map +1 -0
  87. package/dist/lib/mock-server/signal-marketplace/server.d.ts.map +1 -1
  88. package/dist/lib/mock-server/signal-marketplace/server.js +58 -9
  89. package/dist/lib/mock-server/signal-marketplace/server.js.map +1 -1
  90. package/dist/lib/mock-server/sponsored-intelligence/seed-data.d.ts +50 -0
  91. package/dist/lib/mock-server/sponsored-intelligence/seed-data.d.ts.map +1 -0
  92. package/dist/lib/mock-server/sponsored-intelligence/seed-data.js +133 -0
  93. package/dist/lib/mock-server/sponsored-intelligence/seed-data.js.map +1 -0
  94. package/dist/lib/mock-server/sponsored-intelligence/server.d.ts +13 -0
  95. package/dist/lib/mock-server/sponsored-intelligence/server.d.ts.map +1 -0
  96. package/dist/lib/mock-server/sponsored-intelligence/server.js +609 -0
  97. package/dist/lib/mock-server/sponsored-intelligence/server.js.map +1 -0
  98. package/dist/lib/protocols/mcp.d.ts +4 -4
  99. package/dist/lib/protocols/mcp.d.ts.map +1 -1
  100. package/dist/lib/protocols/mcp.js +20 -54
  101. package/dist/lib/protocols/mcp.js.map +1 -1
  102. package/dist/lib/schemas-data/3.0/a2ui/bound-value.json +1 -1
  103. package/dist/lib/schemas-data/3.0/a2ui/component.json +1 -1
  104. package/dist/lib/schemas-data/3.0/a2ui/si-catalog.json +25 -25
  105. package/dist/lib/schemas-data/3.0/a2ui/surface.json +2 -2
  106. package/dist/lib/schemas-data/3.0/a2ui/user-action.json +1 -1
  107. package/dist/lib/schemas-data/3.0/account/get-account-financials-request.json +5 -5
  108. package/dist/lib/schemas-data/3.0/account/get-account-financials-response.json +10 -10
  109. package/dist/lib/schemas-data/3.0/account/list-accounts-request.json +4 -4
  110. package/dist/lib/schemas-data/3.0/account/list-accounts-response.json +6 -6
  111. package/dist/lib/schemas-data/3.0/account/report-usage-request.json +5 -5
  112. package/dist/lib/schemas-data/3.0/account/report-usage-response.json +4 -4
  113. package/dist/lib/schemas-data/3.0/account/sync-accounts-request.json +9 -9
  114. package/dist/lib/schemas-data/3.0/account/sync-accounts-response.json +12 -12
  115. package/dist/lib/schemas-data/3.0/account/sync-governance-request.json +5 -5
  116. package/dist/lib/schemas-data/3.0/account/sync-governance-response.json +8 -8
  117. package/dist/lib/schemas-data/3.0/adagents.json +32 -32
  118. package/dist/lib/schemas-data/3.0/brand/acquire-rights-request.json +8 -8
  119. package/dist/lib/schemas-data/3.0/brand/acquire-rights-response.json +14 -14
  120. package/dist/lib/schemas-data/3.0/brand/creative-approval-request.json +4 -4
  121. package/dist/lib/schemas-data/3.0/brand/creative-approval-response.json +10 -10
  122. package/dist/lib/schemas-data/3.0/brand/get-brand-identity-request.json +3 -3
  123. package/dist/lib/schemas-data/3.0/brand/get-brand-identity-response.json +8 -8
  124. package/dist/lib/schemas-data/3.0/brand/get-rights-request.json +7 -7
  125. package/dist/lib/schemas-data/3.0/brand/get-rights-response.json +9 -9
  126. package/dist/lib/schemas-data/3.0/brand/revocation-notification.json +4 -4
  127. package/dist/lib/schemas-data/3.0/brand/rights-pricing-option.json +5 -5
  128. package/dist/lib/schemas-data/3.0/brand/rights-terms.json +3 -3
  129. package/dist/lib/schemas-data/3.0/brand/update-rights-request.json +4 -4
  130. package/dist/lib/schemas-data/3.0/brand/update-rights-response.json +9 -9
  131. package/dist/lib/schemas-data/3.0/brand.json +14 -14
  132. package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-request.json +2 -2
  133. package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-response.json +35 -4
  134. package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-request.json +2 -2
  135. package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-response.json +35 -4
  136. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-request.json +2 -2
  137. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-response.json +35 -4
  138. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-request.json +2 -2
  139. package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-response.json +35 -4
  140. package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-request.json +2 -2
  141. package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-response.json +35 -4
  142. package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-request.json +2 -2
  143. package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-response.json +35 -4
  144. package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-request.json +2 -2
  145. package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-response.json +35 -4
  146. package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-request.json +2 -2
  147. package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-response.json +2 -2
  148. package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-request.json +2 -2
  149. package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-response.json +2 -2
  150. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-request.json +2 -2
  151. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-response.json +40 -6
  152. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-request.json +7 -4
  153. package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-response.json +35 -4
  154. package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-request.json +2 -2
  155. package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-response.json +38 -7
  156. package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-request.json +2 -2
  157. package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-response.json +40 -6
  158. package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-request.json +11 -5
  159. package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-response.json +40 -6
  160. package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-request.json +7 -4
  161. package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-response.json +101 -8
  162. package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-request.json +7 -4
  163. package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-response.json +110 -11
  164. package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-request.json +7 -4
  165. package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-response.json +68 -6
  166. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-request.json +2 -2
  167. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-response.json +35 -4
  168. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-request.json +2 -2
  169. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-response.json +35 -4
  170. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-request.json +2 -2
  171. package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-response.json +35 -4
  172. package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-request.json +2 -2
  173. package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-response.json +38 -7
  174. package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-request.json +2 -2
  175. package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-response.json +35 -4
  176. package/dist/lib/schemas-data/3.0/bundled/media-buy/package-request.json +7 -4
  177. package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-request.json +2 -2
  178. package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-response.json +35 -4
  179. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-request.json +2 -2
  180. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-response.json +68 -6
  181. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-request.json +2 -2
  182. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-response.json +68 -6
  183. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-request.json +2 -2
  184. package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-response.json +68 -6
  185. package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-request.json +11 -5
  186. package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-response.json +35 -4
  187. package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-request.json +2 -2
  188. package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-response.json +2 -2
  189. package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-request.json +2 -2
  190. package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-response.json +2 -2
  191. package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-request.json +2 -2
  192. package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-response.json +2 -2
  193. package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-request.json +2 -2
  194. package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-response.json +2 -2
  195. package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-request.json +2 -2
  196. package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-response.json +2 -2
  197. package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-request.json +2 -2
  198. package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-response.json +2 -2
  199. package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-request.json +2 -2
  200. package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-response.json +36 -5
  201. package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-request.json +2 -2
  202. package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-response.json +35 -4
  203. package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-request.json +2 -2
  204. package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-response.json +35 -4
  205. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-request.json +2 -2
  206. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-response.json +35 -4
  207. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-request.json +2 -2
  208. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-response.json +35 -4
  209. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-request.json +2 -2
  210. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-response.json +35 -4
  211. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-request.json +2 -2
  212. package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-response.json +35 -4
  213. package/dist/lib/schemas-data/3.0/collection/base-collection-source.json +3 -3
  214. package/dist/lib/schemas-data/3.0/collection/collection-list-changed-webhook.json +2 -2
  215. package/dist/lib/schemas-data/3.0/collection/collection-list-filters.json +7 -7
  216. package/dist/lib/schemas-data/3.0/collection/collection-list.json +5 -5
  217. package/dist/lib/schemas-data/3.0/collection/create-collection-list-request.json +7 -7
  218. package/dist/lib/schemas-data/3.0/collection/create-collection-list-response.json +4 -4
  219. package/dist/lib/schemas-data/3.0/collection/delete-collection-list-request.json +4 -4
  220. package/dist/lib/schemas-data/3.0/collection/delete-collection-list-response.json +3 -3
  221. package/dist/lib/schemas-data/3.0/collection/get-collection-list-request.json +4 -4
  222. package/dist/lib/schemas-data/3.0/collection/get-collection-list-response.json +10 -10
  223. package/dist/lib/schemas-data/3.0/collection/list-collection-lists-request.json +5 -5
  224. package/dist/lib/schemas-data/3.0/collection/list-collection-lists-response.json +5 -5
  225. package/dist/lib/schemas-data/3.0/collection/update-collection-list-request.json +7 -7
  226. package/dist/lib/schemas-data/3.0/collection/update-collection-list-response.json +4 -4
  227. package/dist/lib/schemas-data/3.0/content-standards/artifact-webhook-payload.json +3 -3
  228. package/dist/lib/schemas-data/3.0/content-standards/artifact.json +7 -7
  229. package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-request.json +4 -4
  230. package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-response.json +8 -8
  231. package/dist/lib/schemas-data/3.0/content-standards/content-standards.json +7 -7
  232. package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-request.json +7 -7
  233. package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-response.json +6 -6
  234. package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-request.json +3 -3
  235. package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-response.json +7 -7
  236. package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-request.json +4 -4
  237. package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-response.json +8 -8
  238. package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-request.json +5 -5
  239. package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-response.json +8 -8
  240. package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-request.json +7 -7
  241. package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-response.json +6 -6
  242. package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-request.json +4 -4
  243. package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-response.json +8 -8
  244. package/dist/lib/schemas-data/3.0/core/account-ref.json +2 -2
  245. package/dist/lib/schemas-data/3.0/core/account.json +9 -9
  246. package/dist/lib/schemas-data/3.0/core/activation-key.json +1 -1
  247. package/dist/lib/schemas-data/3.0/core/ad-inventory-config.json +1 -1
  248. package/dist/lib/schemas-data/3.0/core/agent-encryption-key.json +1 -1
  249. package/dist/lib/schemas-data/3.0/core/agent-signing-key.json +1 -1
  250. package/dist/lib/schemas-data/3.0/core/app-item.json +4 -4
  251. package/dist/lib/schemas-data/3.0/core/assets/asset-union.json +53 -0
  252. package/dist/lib/schemas-data/3.0/core/assets/audio-asset.json +3 -3
  253. package/dist/lib/schemas-data/3.0/core/assets/brief-asset.json +2 -2
  254. package/dist/lib/schemas-data/3.0/core/assets/catalog-asset.json +2 -2
  255. package/dist/lib/schemas-data/3.0/core/assets/css-asset.json +2 -2
  256. package/dist/lib/schemas-data/3.0/core/assets/daast-asset.json +4 -4
  257. package/dist/lib/schemas-data/3.0/core/assets/html-asset.json +2 -2
  258. package/dist/lib/schemas-data/3.0/core/assets/image-asset.json +2 -2
  259. package/dist/lib/schemas-data/3.0/core/assets/javascript-asset.json +3 -3
  260. package/dist/lib/schemas-data/3.0/core/assets/markdown-asset.json +2 -2
  261. package/dist/lib/schemas-data/3.0/core/assets/text-asset.json +2 -2
  262. package/dist/lib/schemas-data/3.0/core/assets/url-asset.json +6 -5
  263. package/dist/lib/schemas-data/3.0/core/assets/vast-asset.json +4 -4
  264. package/dist/lib/schemas-data/3.0/core/assets/video-asset.json +7 -7
  265. package/dist/lib/schemas-data/3.0/core/assets/webhook-asset.json +7 -7
  266. package/dist/lib/schemas-data/3.0/core/async-response-data.json +25 -25
  267. package/dist/lib/schemas-data/3.0/core/attribution-window.json +4 -4
  268. package/dist/lib/schemas-data/3.0/core/audience-member.json +3 -3
  269. package/dist/lib/schemas-data/3.0/core/audience-selector.json +4 -4
  270. package/dist/lib/schemas-data/3.0/core/brand-id.json +1 -1
  271. package/dist/lib/schemas-data/3.0/core/brand-ref.json +2 -2
  272. package/dist/lib/schemas-data/3.0/core/business-entity.json +2 -2
  273. package/dist/lib/schemas-data/3.0/core/cancellation-policy.json +2 -2
  274. package/dist/lib/schemas-data/3.0/core/catalog-field-mapping.json +2 -2
  275. package/dist/lib/schemas-data/3.0/core/catalog.json +7 -7
  276. package/dist/lib/schemas-data/3.0/core/catchment.json +5 -5
  277. package/dist/lib/schemas-data/3.0/core/collection-distribution.json +2 -2
  278. package/dist/lib/schemas-data/3.0/core/collection-list-ref.json +1 -1
  279. package/dist/lib/schemas-data/3.0/core/collection-selector.json +1 -1
  280. package/dist/lib/schemas-data/3.0/core/collection.json +13 -13
  281. package/dist/lib/schemas-data/3.0/core/content-rating.json +2 -2
  282. package/dist/lib/schemas-data/3.0/core/context.json +1 -1
  283. package/dist/lib/schemas-data/3.0/core/creative-asset.json +6 -52
  284. package/dist/lib/schemas-data/3.0/core/creative-assignment.json +1 -1
  285. package/dist/lib/schemas-data/3.0/core/creative-brief.json +4 -4
  286. package/dist/lib/schemas-data/3.0/core/creative-consumption.json +1 -1
  287. package/dist/lib/schemas-data/3.0/core/creative-filters.json +4 -4
  288. package/dist/lib/schemas-data/3.0/core/creative-item.json +1 -1
  289. package/dist/lib/schemas-data/3.0/core/creative-manifest.json +7 -53
  290. package/dist/lib/schemas-data/3.0/core/creative-policy.json +3 -3
  291. package/dist/lib/schemas-data/3.0/core/creative-variable.json +1 -1
  292. package/dist/lib/schemas-data/3.0/core/creative-variant.json +5 -5
  293. package/dist/lib/schemas-data/3.0/core/data-provider-signal-selector.json +1 -1
  294. package/dist/lib/schemas-data/3.0/core/date-range.json +1 -1
  295. package/dist/lib/schemas-data/3.0/core/datetime-range.json +1 -1
  296. package/dist/lib/schemas-data/3.0/core/daypart-target.json +2 -2
  297. package/dist/lib/schemas-data/3.0/core/deadline-policy.json +1 -1
  298. package/dist/lib/schemas-data/3.0/core/delivery-forecast.json +7 -7
  299. package/dist/lib/schemas-data/3.0/core/delivery-metrics.json +5 -5
  300. package/dist/lib/schemas-data/3.0/core/deployment.json +3 -3
  301. package/dist/lib/schemas-data/3.0/core/destination-item.json +4 -4
  302. package/dist/lib/schemas-data/3.0/core/destination.json +1 -1
  303. package/dist/lib/schemas-data/3.0/core/diagnostic-issue.json +1 -1
  304. package/dist/lib/schemas-data/3.0/core/duration.json +1 -1
  305. package/dist/lib/schemas-data/3.0/core/education-item.json +4 -4
  306. package/dist/lib/schemas-data/3.0/core/error.json +34 -3
  307. package/dist/lib/schemas-data/3.0/core/event-custom-data.json +2 -2
  308. package/dist/lib/schemas-data/3.0/core/event-source-health.json +3 -3
  309. package/dist/lib/schemas-data/3.0/core/event.json +6 -6
  310. package/dist/lib/schemas-data/3.0/core/ext.json +1 -1
  311. package/dist/lib/schemas-data/3.0/core/feature-requirement.json +1 -1
  312. package/dist/lib/schemas-data/3.0/core/flight-item.json +4 -4
  313. package/dist/lib/schemas-data/3.0/core/forecast-point.json +18 -18
  314. package/dist/lib/schemas-data/3.0/core/forecast-range.json +1 -1
  315. package/dist/lib/schemas-data/3.0/core/format-id.json +1 -1
  316. package/dist/lib/schemas-data/3.0/core/format.json +42 -42
  317. package/dist/lib/schemas-data/3.0/core/frequency-cap.json +4 -4
  318. package/dist/lib/schemas-data/3.0/core/generation-credential.json +3 -3
  319. package/dist/lib/schemas-data/3.0/core/geo-breakdown-support.json +3 -3
  320. package/dist/lib/schemas-data/3.0/core/hotel-item.json +4 -4
  321. package/dist/lib/schemas-data/3.0/core/identifier.json +2 -2
  322. package/dist/lib/schemas-data/3.0/core/industry-identifier.json +2 -2
  323. package/dist/lib/schemas-data/3.0/core/insertion-order.json +1 -1
  324. package/dist/lib/schemas-data/3.0/core/installment-deadlines.json +2 -2
  325. package/dist/lib/schemas-data/3.0/core/installment.json +9 -9
  326. package/dist/lib/schemas-data/3.0/core/job-item.json +3 -3
  327. package/dist/lib/schemas-data/3.0/core/limited-series.json +1 -1
  328. package/dist/lib/schemas-data/3.0/core/material-deadline.json +1 -1
  329. package/dist/lib/schemas-data/3.0/core/mcp-webhook-payload.json +5 -5
  330. package/dist/lib/schemas-data/3.0/core/measurement-readiness.json +5 -5
  331. package/dist/lib/schemas-data/3.0/core/measurement-terms.json +3 -3
  332. package/dist/lib/schemas-data/3.0/core/measurement-window.json +1 -1
  333. package/dist/lib/schemas-data/3.0/core/media-buy-features.json +1 -1
  334. package/dist/lib/schemas-data/3.0/core/media-buy.json +7 -7
  335. package/dist/lib/schemas-data/3.0/core/offering-asset-group.json +16 -16
  336. package/dist/lib/schemas-data/3.0/core/offering.json +5 -5
  337. package/dist/lib/schemas-data/3.0/core/optimization-goal.json +6 -6
  338. package/dist/lib/schemas-data/3.0/core/outcome-measurement.json +2 -2
  339. package/dist/lib/schemas-data/3.0/core/overlay.json +1 -1
  340. package/dist/lib/schemas-data/3.0/core/package.json +14 -14
  341. package/dist/lib/schemas-data/3.0/core/pagination-request.json +1 -1
  342. package/dist/lib/schemas-data/3.0/core/pagination-response.json +1 -1
  343. package/dist/lib/schemas-data/3.0/core/performance-feedback.json +3 -3
  344. package/dist/lib/schemas-data/3.0/core/performance-standard.json +4 -4
  345. package/dist/lib/schemas-data/3.0/core/placement-definition.json +5 -5
  346. package/dist/lib/schemas-data/3.0/core/placement.json +2 -2
  347. package/dist/lib/schemas-data/3.0/core/planned-delivery.json +5 -5
  348. package/dist/lib/schemas-data/3.0/core/price.json +1 -1
  349. package/dist/lib/schemas-data/3.0/core/pricing-option.json +10 -10
  350. package/dist/lib/schemas-data/3.0/core/product-allocation.json +4 -4
  351. package/dist/lib/schemas-data/3.0/core/product-filters.json +16 -16
  352. package/dist/lib/schemas-data/3.0/core/product.json +28 -28
  353. package/dist/lib/schemas-data/3.0/core/property-id.json +1 -1
  354. package/dist/lib/schemas-data/3.0/core/property-list-ref.json +1 -1
  355. package/dist/lib/schemas-data/3.0/core/property-tag.json +1 -1
  356. package/dist/lib/schemas-data/3.0/core/property.json +6 -6
  357. package/dist/lib/schemas-data/3.0/core/proposal.json +6 -6
  358. package/dist/lib/schemas-data/3.0/core/protocol-envelope.json +3 -3
  359. package/dist/lib/schemas-data/3.0/core/provenance.json +6 -6
  360. package/dist/lib/schemas-data/3.0/core/publisher-property-selector.json +3 -3
  361. package/dist/lib/schemas-data/3.0/core/push-notification-config.json +2 -2
  362. package/dist/lib/schemas-data/3.0/core/real-estate-item.json +4 -4
  363. package/dist/lib/schemas-data/3.0/core/reference-asset.json +1 -1
  364. package/dist/lib/schemas-data/3.0/core/reporting-capabilities.json +5 -5
  365. package/dist/lib/schemas-data/3.0/core/reporting-webhook.json +3 -3
  366. package/dist/lib/schemas-data/3.0/core/requirements/asset-requirements.json +13 -13
  367. package/dist/lib/schemas-data/3.0/core/requirements/audio-asset-requirements.json +1 -1
  368. package/dist/lib/schemas-data/3.0/core/requirements/catalog-field-binding.json +4 -4
  369. package/dist/lib/schemas-data/3.0/core/requirements/catalog-requirements.json +5 -5
  370. package/dist/lib/schemas-data/3.0/core/requirements/css-asset-requirements.json +1 -1
  371. package/dist/lib/schemas-data/3.0/core/requirements/daast-asset-requirements.json +1 -1
  372. package/dist/lib/schemas-data/3.0/core/requirements/html-asset-requirements.json +1 -1
  373. package/dist/lib/schemas-data/3.0/core/requirements/image-asset-requirements.json +2 -2
  374. package/dist/lib/schemas-data/3.0/core/requirements/javascript-asset-requirements.json +1 -1
  375. package/dist/lib/schemas-data/3.0/core/requirements/markdown-asset-requirements.json +1 -1
  376. package/dist/lib/schemas-data/3.0/core/requirements/offering-asset-constraint.json +4 -4
  377. package/dist/lib/schemas-data/3.0/core/requirements/text-asset-requirements.json +1 -1
  378. package/dist/lib/schemas-data/3.0/core/requirements/url-asset-requirements.json +2 -2
  379. package/dist/lib/schemas-data/3.0/core/requirements/vast-asset-requirements.json +1 -1
  380. package/dist/lib/schemas-data/3.0/core/requirements/video-asset-requirements.json +6 -6
  381. package/dist/lib/schemas-data/3.0/core/requirements/webhook-asset-requirements.json +1 -1
  382. package/dist/lib/schemas-data/3.0/core/response.json +1 -1
  383. package/dist/lib/schemas-data/3.0/core/rights-constraint.json +4 -4
  384. package/dist/lib/schemas-data/3.0/core/seller-agent-ref.json +1 -1
  385. package/dist/lib/schemas-data/3.0/core/signal-definition.json +3 -3
  386. package/dist/lib/schemas-data/3.0/core/signal-filters.json +2 -2
  387. package/dist/lib/schemas-data/3.0/core/signal-id.json +1 -1
  388. package/dist/lib/schemas-data/3.0/core/signal-pricing-option.json +2 -2
  389. package/dist/lib/schemas-data/3.0/core/signal-pricing.json +6 -6
  390. package/dist/lib/schemas-data/3.0/core/signal-targeting.json +4 -4
  391. package/dist/lib/schemas-data/3.0/core/special.json +2 -2
  392. package/dist/lib/schemas-data/3.0/core/start-timing.json +1 -1
  393. package/dist/lib/schemas-data/3.0/core/store-item.json +3 -3
  394. package/dist/lib/schemas-data/3.0/core/talent.json +2 -2
  395. package/dist/lib/schemas-data/3.0/core/targeting.json +20 -20
  396. package/dist/lib/schemas-data/3.0/core/tasks-get-request.json +3 -3
  397. package/dist/lib/schemas-data/3.0/core/tasks-get-response.json +7 -7
  398. package/dist/lib/schemas-data/3.0/core/tasks-list-request.json +11 -11
  399. package/dist/lib/schemas-data/3.0/core/tasks-list-response.json +6 -6
  400. package/dist/lib/schemas-data/3.0/core/user-match.json +3 -3
  401. package/dist/lib/schemas-data/3.0/core/vehicle-item.json +4 -4
  402. package/dist/lib/schemas-data/3.0/core/vendor-pricing-option.json +2 -2
  403. package/dist/lib/schemas-data/3.0/core/x-entity-types.json +1 -1
  404. package/dist/lib/schemas-data/3.0/creative/asset-types/index.json +5 -5
  405. package/dist/lib/schemas-data/3.0/creative/creative-feature-result.json +2 -2
  406. package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-request.json +5 -5
  407. package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-response.json +7 -7
  408. package/dist/lib/schemas-data/3.0/creative/get-creative-features-request.json +5 -5
  409. package/dist/lib/schemas-data/3.0/creative/get-creative-features-response.json +8 -8
  410. package/dist/lib/schemas-data/3.0/creative/list-creative-formats-request.json +11 -11
  411. package/dist/lib/schemas-data/3.0/creative/list-creative-formats-response.json +7 -7
  412. package/dist/lib/schemas-data/3.0/creative/list-creatives-request.json +8 -8
  413. package/dist/lib/schemas-data/3.0/creative/list-creatives-response.json +14 -60
  414. package/dist/lib/schemas-data/3.0/creative/preview-creative-request.json +11 -11
  415. package/dist/lib/schemas-data/3.0/creative/preview-creative-response.json +12 -12
  416. package/dist/lib/schemas-data/3.0/creative/preview-render.json +1 -1
  417. package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-input-required.json +3 -3
  418. package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-submitted.json +3 -3
  419. package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-working.json +3 -3
  420. package/dist/lib/schemas-data/3.0/creative/sync-creatives-request.json +7 -7
  421. package/dist/lib/schemas-data/3.0/creative/sync-creatives-response.json +13 -13
  422. package/dist/lib/schemas-data/3.0/enums/account-scope.json +1 -1
  423. package/dist/lib/schemas-data/3.0/enums/account-status.json +1 -1
  424. package/dist/lib/schemas-data/3.0/enums/action-source.json +1 -1
  425. package/dist/lib/schemas-data/3.0/enums/adcp-protocol.json +1 -1
  426. package/dist/lib/schemas-data/3.0/enums/adjustment-kind.json +1 -1
  427. package/dist/lib/schemas-data/3.0/enums/advertiser-industry.json +1 -1
  428. package/dist/lib/schemas-data/3.0/enums/age-verification-method.json +1 -1
  429. package/dist/lib/schemas-data/3.0/enums/assessment-status.json +1 -1
  430. package/dist/lib/schemas-data/3.0/enums/asset-content-type.json +1 -1
  431. package/dist/lib/schemas-data/3.0/enums/attribution-model.json +1 -1
  432. package/dist/lib/schemas-data/3.0/enums/audience-source.json +1 -1
  433. package/dist/lib/schemas-data/3.0/enums/audience-status.json +1 -1
  434. package/dist/lib/schemas-data/3.0/enums/audio-channel-layout.json +1 -1
  435. package/dist/lib/schemas-data/3.0/enums/auth-scheme.json +1 -1
  436. package/dist/lib/schemas-data/3.0/enums/available-metric.json +1 -1
  437. package/dist/lib/schemas-data/3.0/enums/billing-party.json +1 -1
  438. package/dist/lib/schemas-data/3.0/enums/binary-verdict.json +1 -1
  439. package/dist/lib/schemas-data/3.0/enums/brand-agent-type.json +1 -1
  440. package/dist/lib/schemas-data/3.0/enums/canceled-by.json +1 -1
  441. package/dist/lib/schemas-data/3.0/enums/catalog-action.json +1 -1
  442. package/dist/lib/schemas-data/3.0/enums/catalog-item-status.json +1 -1
  443. package/dist/lib/schemas-data/3.0/enums/catalog-type.json +1 -1
  444. package/dist/lib/schemas-data/3.0/enums/channels.json +1 -1
  445. package/dist/lib/schemas-data/3.0/enums/cloud-storage-protocol.json +1 -1
  446. package/dist/lib/schemas-data/3.0/enums/co-branding-requirement.json +1 -1
  447. package/dist/lib/schemas-data/3.0/enums/collection-cadence.json +1 -1
  448. package/dist/lib/schemas-data/3.0/enums/collection-kind.json +1 -1
  449. package/dist/lib/schemas-data/3.0/enums/collection-relationship.json +1 -1
  450. package/dist/lib/schemas-data/3.0/enums/collection-status.json +1 -1
  451. package/dist/lib/schemas-data/3.0/enums/consent-basis.json +1 -1
  452. package/dist/lib/schemas-data/3.0/enums/content-id-type.json +1 -1
  453. package/dist/lib/schemas-data/3.0/enums/content-rating-system.json +1 -1
  454. package/dist/lib/schemas-data/3.0/enums/creative-action.json +1 -1
  455. package/dist/lib/schemas-data/3.0/enums/creative-agent-capability.json +1 -1
  456. package/dist/lib/schemas-data/3.0/enums/creative-approval-status.json +1 -1
  457. package/dist/lib/schemas-data/3.0/enums/creative-identifier-type.json +1 -1
  458. package/dist/lib/schemas-data/3.0/enums/creative-quality.json +1 -1
  459. package/dist/lib/schemas-data/3.0/enums/creative-sort-field.json +1 -1
  460. package/dist/lib/schemas-data/3.0/enums/creative-status.json +1 -1
  461. package/dist/lib/schemas-data/3.0/enums/daast-tracking-event.json +1 -1
  462. package/dist/lib/schemas-data/3.0/enums/daast-version.json +1 -1
  463. package/dist/lib/schemas-data/3.0/enums/day-of-week.json +1 -1
  464. package/dist/lib/schemas-data/3.0/enums/delegation-authority.json +1 -1
  465. package/dist/lib/schemas-data/3.0/enums/delivery-type.json +1 -1
  466. package/dist/lib/schemas-data/3.0/enums/demographic-system.json +1 -1
  467. package/dist/lib/schemas-data/3.0/enums/derivative-type.json +1 -1
  468. package/dist/lib/schemas-data/3.0/enums/device-platform.json +1 -1
  469. package/dist/lib/schemas-data/3.0/enums/device-type.json +1 -1
  470. package/dist/lib/schemas-data/3.0/enums/digital-source-type.json +1 -1
  471. package/dist/lib/schemas-data/3.0/enums/dimension-unit.json +1 -1
  472. package/dist/lib/schemas-data/3.0/enums/disclosure-persistence.json +1 -1
  473. package/dist/lib/schemas-data/3.0/enums/disclosure-position.json +1 -1
  474. package/dist/lib/schemas-data/3.0/enums/distance-unit.json +1 -1
  475. package/dist/lib/schemas-data/3.0/enums/distribution-identifier-type.json +1 -1
  476. package/dist/lib/schemas-data/3.0/enums/error-code.json +185 -2
  477. package/dist/lib/schemas-data/3.0/enums/escalation-severity.json +1 -1
  478. package/dist/lib/schemas-data/3.0/enums/event-type.json +1 -1
  479. package/dist/lib/schemas-data/3.0/enums/exclusivity.json +1 -1
  480. package/dist/lib/schemas-data/3.0/enums/feature-check-status.json +1 -1
  481. package/dist/lib/schemas-data/3.0/enums/feed-format.json +1 -1
  482. package/dist/lib/schemas-data/3.0/enums/feedback-source.json +1 -1
  483. package/dist/lib/schemas-data/3.0/enums/forecast-method.json +1 -1
  484. package/dist/lib/schemas-data/3.0/enums/forecast-range-unit.json +1 -1
  485. package/dist/lib/schemas-data/3.0/enums/forecastable-metric.json +1 -1
  486. package/dist/lib/schemas-data/3.0/enums/format-id-parameter.json +1 -1
  487. package/dist/lib/schemas-data/3.0/enums/frame-rate-type.json +1 -1
  488. package/dist/lib/schemas-data/3.0/enums/frequency-cap-scope.json +1 -1
  489. package/dist/lib/schemas-data/3.0/enums/genre-taxonomy.json +1 -1
  490. package/dist/lib/schemas-data/3.0/enums/geo-level.json +1 -1
  491. package/dist/lib/schemas-data/3.0/enums/gop-type.json +1 -1
  492. package/dist/lib/schemas-data/3.0/enums/governance-decision.json +1 -1
  493. package/dist/lib/schemas-data/3.0/enums/governance-domain.json +1 -1
  494. package/dist/lib/schemas-data/3.0/enums/governance-mode.json +1 -1
  495. package/dist/lib/schemas-data/3.0/enums/governance-phase.json +1 -1
  496. package/dist/lib/schemas-data/3.0/enums/history-entry-type.json +1 -1
  497. package/dist/lib/schemas-data/3.0/enums/http-method.json +1 -1
  498. package/dist/lib/schemas-data/3.0/enums/identifier-types.json +1 -1
  499. package/dist/lib/schemas-data/3.0/enums/installment-status.json +1 -1
  500. package/dist/lib/schemas-data/3.0/enums/javascript-module-type.json +1 -1
  501. package/dist/lib/schemas-data/3.0/enums/landing-page-requirement.json +1 -1
  502. package/dist/lib/schemas-data/3.0/enums/makegood-remedy.json +1 -1
  503. package/dist/lib/schemas-data/3.0/enums/markdown-flavor.json +1 -1
  504. package/dist/lib/schemas-data/3.0/enums/match-id-type.json +1 -1
  505. package/dist/lib/schemas-data/3.0/enums/match-type.json +1 -1
  506. package/dist/lib/schemas-data/3.0/enums/media-buy-status.json +1 -1
  507. package/dist/lib/schemas-data/3.0/enums/media-buy-valid-action.json +1 -1
  508. package/dist/lib/schemas-data/3.0/enums/metric-type.json +1 -1
  509. package/dist/lib/schemas-data/3.0/enums/metro-system.json +1 -1
  510. package/dist/lib/schemas-data/3.0/enums/moov-atom-position.json +1 -1
  511. package/dist/lib/schemas-data/3.0/enums/notification-type.json +1 -1
  512. package/dist/lib/schemas-data/3.0/enums/outcome-type.json +1 -1
  513. package/dist/lib/schemas-data/3.0/enums/pacing.json +1 -1
  514. package/dist/lib/schemas-data/3.0/enums/payment-terms.json +1 -1
  515. package/dist/lib/schemas-data/3.0/enums/performance-standard-metric.json +1 -1
  516. package/dist/lib/schemas-data/3.0/enums/policy-category.json +1 -1
  517. package/dist/lib/schemas-data/3.0/enums/policy-enforcement.json +1 -1
  518. package/dist/lib/schemas-data/3.0/enums/postal-system.json +1 -1
  519. package/dist/lib/schemas-data/3.0/enums/preview-output-format.json +1 -1
  520. package/dist/lib/schemas-data/3.0/enums/pricing-model.json +1 -1
  521. package/dist/lib/schemas-data/3.0/enums/production-quality.json +1 -1
  522. package/dist/lib/schemas-data/3.0/enums/property-type.json +1 -1
  523. package/dist/lib/schemas-data/3.0/enums/proposal-status.json +1 -1
  524. package/dist/lib/schemas-data/3.0/enums/publisher-identifier-types.json +1 -1
  525. package/dist/lib/schemas-data/3.0/enums/purchase-type.json +1 -1
  526. package/dist/lib/schemas-data/3.0/enums/reach-unit.json +1 -1
  527. package/dist/lib/schemas-data/3.0/enums/reporting-frequency.json +1 -1
  528. package/dist/lib/schemas-data/3.0/enums/response-type.json +1 -1
  529. package/dist/lib/schemas-data/3.0/enums/restricted-attribute.json +1 -1
  530. package/dist/lib/schemas-data/3.0/enums/right-type.json +1 -1
  531. package/dist/lib/schemas-data/3.0/enums/right-use.json +1 -1
  532. package/dist/lib/schemas-data/3.0/enums/rights-billing-period.json +1 -1
  533. package/dist/lib/schemas-data/3.0/enums/scan-type.json +1 -1
  534. package/dist/lib/schemas-data/3.0/enums/si-session-status.json +1 -1
  535. package/dist/lib/schemas-data/3.0/enums/signal-catalog-type.json +1 -1
  536. package/dist/lib/schemas-data/3.0/enums/signal-source.json +1 -1
  537. package/dist/lib/schemas-data/3.0/enums/signal-value-type.json +1 -1
  538. package/dist/lib/schemas-data/3.0/enums/snapshot-unavailable-reason.json +1 -1
  539. package/dist/lib/schemas-data/3.0/enums/sort-direction.json +1 -1
  540. package/dist/lib/schemas-data/3.0/enums/sort-metric.json +1 -1
  541. package/dist/lib/schemas-data/3.0/enums/special-category.json +1 -1
  542. package/dist/lib/schemas-data/3.0/enums/specialism.json +1 -1
  543. package/dist/lib/schemas-data/3.0/enums/talent-role.json +1 -1
  544. package/dist/lib/schemas-data/3.0/enums/task-status.json +1 -1
  545. package/dist/lib/schemas-data/3.0/enums/task-type.json +1 -1
  546. package/dist/lib/schemas-data/3.0/enums/transport-mode.json +1 -1
  547. package/dist/lib/schemas-data/3.0/enums/travel-time-unit.json +1 -1
  548. package/dist/lib/schemas-data/3.0/enums/uid-type.json +1 -1
  549. package/dist/lib/schemas-data/3.0/enums/universal-macro.json +1 -1
  550. package/dist/lib/schemas-data/3.0/enums/update-frequency.json +1 -1
  551. package/dist/lib/schemas-data/3.0/enums/url-asset-type.json +1 -1
  552. package/dist/lib/schemas-data/3.0/enums/validation-mode.json +1 -1
  553. package/dist/lib/schemas-data/3.0/enums/vast-tracking-event.json +1 -1
  554. package/dist/lib/schemas-data/3.0/enums/vast-version.json +1 -1
  555. package/dist/lib/schemas-data/3.0/enums/viewability-standard.json +1 -1
  556. package/dist/lib/schemas-data/3.0/enums/wcag-level.json +1 -1
  557. package/dist/lib/schemas-data/3.0/enums/webhook-response-type.json +1 -1
  558. package/dist/lib/schemas-data/3.0/enums/webhook-security-method.json +1 -1
  559. package/dist/lib/schemas-data/3.0/error-details/account-setup-required.json +2 -2
  560. package/dist/lib/schemas-data/3.0/error-details/audience-too-small.json +2 -2
  561. package/dist/lib/schemas-data/3.0/error-details/budget-too-low.json +2 -2
  562. package/dist/lib/schemas-data/3.0/error-details/conflict.json +2 -2
  563. package/dist/lib/schemas-data/3.0/error-details/creative-rejected.json +2 -2
  564. package/dist/lib/schemas-data/3.0/error-details/policy-violation.json +2 -2
  565. package/dist/lib/schemas-data/3.0/error-details/rate-limited.json +1 -1
  566. package/dist/lib/schemas-data/3.0/error-details/vendor-error-codes.json +1 -1
  567. package/dist/lib/schemas-data/3.0/extensions/extension-meta.json +1 -1
  568. package/dist/lib/schemas-data/3.0/extensions/index.json +2 -2
  569. package/dist/lib/schemas-data/3.0/governance/attribute-definition.json +1 -1
  570. package/dist/lib/schemas-data/3.0/governance/audience-constraints.json +3 -3
  571. package/dist/lib/schemas-data/3.0/governance/check-governance-request.json +7 -7
  572. package/dist/lib/schemas-data/3.0/governance/check-governance-response.json +6 -6
  573. package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-request.json +4 -4
  574. package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-response.json +9 -9
  575. package/dist/lib/schemas-data/3.0/governance/policy-category-definition.json +2 -2
  576. package/dist/lib/schemas-data/3.0/governance/policy-entry.json +6 -6
  577. package/dist/lib/schemas-data/3.0/governance/policy-ref.json +1 -1
  578. package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-request.json +6 -6
  579. package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-response.json +4 -4
  580. package/dist/lib/schemas-data/3.0/governance/sync-plans-request.json +13 -13
  581. package/dist/lib/schemas-data/3.0/governance/sync-plans-response.json +4 -4
  582. package/dist/lib/schemas-data/3.0/index.json +364 -364
  583. package/dist/lib/schemas-data/3.0/manifest.json +1190 -0
  584. package/dist/lib/schemas-data/3.0/manifest.schema.json +202 -0
  585. package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-input-required.json +4 -4
  586. package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-submitted.json +3 -3
  587. package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-working.json +3 -3
  588. package/dist/lib/schemas-data/3.0/media-buy/build-creative-request.json +11 -11
  589. package/dist/lib/schemas-data/3.0/media-buy/build-creative-response.json +17 -17
  590. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-input-required.json +4 -4
  591. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-submitted.json +3 -3
  592. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-working.json +3 -3
  593. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-request.json +12 -12
  594. package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-response.json +15 -15
  595. package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-request.json +17 -17
  596. package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-response.json +24 -24
  597. package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-request.json +7 -7
  598. package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-response.json +19 -19
  599. package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-input-required.json +4 -4
  600. package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-submitted.json +3 -3
  601. package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-working.json +3 -3
  602. package/dist/lib/schemas-data/3.0/media-buy/get-products-request.json +11 -11
  603. package/dist/lib/schemas-data/3.0/media-buy/get-products-response.json +8 -8
  604. package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-request.json +11 -11
  605. package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-response.json +7 -7
  606. package/dist/lib/schemas-data/3.0/media-buy/log-event-request.json +4 -4
  607. package/dist/lib/schemas-data/3.0/media-buy/log-event-response.json +6 -6
  608. package/dist/lib/schemas-data/3.0/media-buy/package-request.json +12 -12
  609. package/dist/lib/schemas-data/3.0/media-buy/package-update.json +13 -13
  610. package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-request.json +6 -6
  611. package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-response.json +6 -6
  612. package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-request.json +7 -7
  613. package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-response.json +9 -9
  614. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-input-required.json +3 -3
  615. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-submitted.json +3 -3
  616. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-working.json +3 -3
  617. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-request.json +7 -7
  618. package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-response.json +9 -9
  619. package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-request.json +5 -5
  620. package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-response.json +10 -10
  621. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-input-required.json +3 -3
  622. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-submitted.json +3 -3
  623. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-working.json +3 -3
  624. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-request.json +10 -10
  625. package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-response.json +10 -10
  626. package/dist/lib/schemas-data/3.0/pricing-options/cpa-option.json +4 -4
  627. package/dist/lib/schemas-data/3.0/pricing-options/cpc-option.json +4 -4
  628. package/dist/lib/schemas-data/3.0/pricing-options/cpcv-option.json +4 -4
  629. package/dist/lib/schemas-data/3.0/pricing-options/cpm-option.json +4 -4
  630. package/dist/lib/schemas-data/3.0/pricing-options/cpp-option.json +5 -5
  631. package/dist/lib/schemas-data/3.0/pricing-options/cpv-option.json +4 -4
  632. package/dist/lib/schemas-data/3.0/pricing-options/flat-rate-option.json +4 -4
  633. package/dist/lib/schemas-data/3.0/pricing-options/price-breakdown.json +2 -2
  634. package/dist/lib/schemas-data/3.0/pricing-options/price-guidance.json +1 -1
  635. package/dist/lib/schemas-data/3.0/pricing-options/time-option.json +4 -4
  636. package/dist/lib/schemas-data/3.0/pricing-options/vcpm-option.json +4 -4
  637. package/dist/lib/schemas-data/3.0/property/authorization-result.json +1 -1
  638. package/dist/lib/schemas-data/3.0/property/base-property-source.json +4 -4
  639. package/dist/lib/schemas-data/3.0/property/create-property-list-request.json +7 -7
  640. package/dist/lib/schemas-data/3.0/property/create-property-list-response.json +4 -4
  641. package/dist/lib/schemas-data/3.0/property/delete-property-list-request.json +4 -4
  642. package/dist/lib/schemas-data/3.0/property/delete-property-list-response.json +3 -3
  643. package/dist/lib/schemas-data/3.0/property/delivery-record.json +3 -3
  644. package/dist/lib/schemas-data/3.0/property/get-property-list-request.json +4 -4
  645. package/dist/lib/schemas-data/3.0/property/get-property-list-response.json +7 -7
  646. package/dist/lib/schemas-data/3.0/property/list-property-lists-request.json +5 -5
  647. package/dist/lib/schemas-data/3.0/property/list-property-lists-response.json +5 -5
  648. package/dist/lib/schemas-data/3.0/property/property-error.json +2 -2
  649. package/dist/lib/schemas-data/3.0/property/property-feature-definition.json +2 -2
  650. package/dist/lib/schemas-data/3.0/property/property-feature-result.json +4 -4
  651. package/dist/lib/schemas-data/3.0/property/property-feature-value.json +2 -2
  652. package/dist/lib/schemas-data/3.0/property/property-feature.json +1 -1
  653. package/dist/lib/schemas-data/3.0/property/property-list-changed-webhook.json +2 -2
  654. package/dist/lib/schemas-data/3.0/property/property-list-filters.json +5 -5
  655. package/dist/lib/schemas-data/3.0/property/property-list.json +6 -6
  656. package/dist/lib/schemas-data/3.0/property/update-property-list-request.json +7 -7
  657. package/dist/lib/schemas-data/3.0/property/update-property-list-response.json +4 -4
  658. package/dist/lib/schemas-data/3.0/property/validate-property-delivery-request.json +5 -5
  659. package/dist/lib/schemas-data/3.0/property/validate-property-delivery-response.json +4 -4
  660. package/dist/lib/schemas-data/3.0/property/validation-result.json +5 -5
  661. package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-request.json +3 -3
  662. package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-response.json +26 -26
  663. package/dist/lib/schemas-data/3.0/signals/activate-signal-request.json +5 -5
  664. package/dist/lib/schemas-data/3.0/signals/activate-signal-response.json +7 -7
  665. package/dist/lib/schemas-data/3.0/signals/get-signals-request.json +8 -8
  666. package/dist/lib/schemas-data/3.0/signals/get-signals-response.json +10 -10
  667. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-capabilities.json +1 -1
  668. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-request.json +3 -3
  669. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-response.json +4 -4
  670. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-identity.json +1 -1
  671. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-request.json +5 -5
  672. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-response.json +7 -7
  673. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-request.json +3 -3
  674. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-response.json +7 -7
  675. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-request.json +3 -3
  676. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-response.json +5 -5
  677. package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-ui-element.json +1 -1
  678. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  679. package/dist/lib/server/account-mode.d.ts +113 -0
  680. package/dist/lib/server/account-mode.d.ts.map +1 -0
  681. package/dist/lib/server/account-mode.js +125 -0
  682. package/dist/lib/server/account-mode.js.map +1 -0
  683. package/dist/lib/server/adcp-server.d.ts +21 -0
  684. package/dist/lib/server/adcp-server.d.ts.map +1 -1
  685. package/dist/lib/server/adcp-server.js +63 -1
  686. package/dist/lib/server/adcp-server.js.map +1 -1
  687. package/dist/lib/server/auth-signature.d.ts.map +1 -1
  688. package/dist/lib/server/auth-signature.js +21 -0
  689. package/dist/lib/server/auth-signature.js.map +1 -1
  690. package/dist/lib/server/auth.d.ts +59 -0
  691. package/dist/lib/server/auth.d.ts.map +1 -1
  692. package/dist/lib/server/auth.js +71 -3
  693. package/dist/lib/server/auth.js.map +1 -1
  694. package/dist/lib/server/create-adcp-server.d.ts +220 -21
  695. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  696. package/dist/lib/server/create-adcp-server.js +349 -14
  697. package/dist/lib/server/create-adcp-server.js.map +1 -1
  698. package/dist/lib/server/ctx-metadata/store.d.ts +1 -1
  699. package/dist/lib/server/ctx-metadata/store.d.ts.map +1 -1
  700. package/dist/lib/server/ctx-metadata/store.js +1 -0
  701. package/dist/lib/server/ctx-metadata/store.js.map +1 -1
  702. package/dist/lib/server/decisioning/account.d.ts +345 -21
  703. package/dist/lib/server/decisioning/account.d.ts.map +1 -1
  704. package/dist/lib/server/decisioning/account.js +150 -4
  705. package/dist/lib/server/decisioning/account.js.map +1 -1
  706. package/dist/lib/server/decisioning/admin-router.d.ts.map +1 -1
  707. package/dist/lib/server/decisioning/admin-router.js +5 -1
  708. package/dist/lib/server/decisioning/admin-router.js.map +1 -1
  709. package/dist/lib/server/decisioning/buyer-agent.d.ts +498 -0
  710. package/dist/lib/server/decisioning/buyer-agent.d.ts.map +1 -0
  711. package/dist/lib/server/decisioning/buyer-agent.js +382 -0
  712. package/dist/lib/server/decisioning/buyer-agent.js.map +1 -0
  713. package/dist/lib/server/decisioning/capabilities.d.ts +32 -5
  714. package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
  715. package/dist/lib/server/decisioning/compose.d.ts +124 -0
  716. package/dist/lib/server/decisioning/compose.d.ts.map +1 -0
  717. package/dist/lib/server/decisioning/compose.js +48 -0
  718. package/dist/lib/server/decisioning/compose.js.map +1 -0
  719. package/dist/lib/server/decisioning/context.d.ts +11 -0
  720. package/dist/lib/server/decisioning/context.d.ts.map +1 -1
  721. package/dist/lib/server/decisioning/index.d.ts +13 -3
  722. package/dist/lib/server/decisioning/index.d.ts.map +1 -1
  723. package/dist/lib/server/decisioning/index.js +46 -2
  724. package/dist/lib/server/decisioning/index.js.map +1 -1
  725. package/dist/lib/server/decisioning/platform-helpers.d.ts +287 -0
  726. package/dist/lib/server/decisioning/platform-helpers.d.ts.map +1 -0
  727. package/dist/lib/server/decisioning/platform-helpers.js +336 -0
  728. package/dist/lib/server/decisioning/platform-helpers.js.map +1 -0
  729. package/dist/lib/server/decisioning/platform.d.ts +141 -20
  730. package/dist/lib/server/decisioning/platform.d.ts.map +1 -1
  731. package/dist/lib/server/decisioning/platform.js.map +1 -1
  732. package/dist/lib/server/decisioning/resolve-presets.d.ts +129 -0
  733. package/dist/lib/server/decisioning/resolve-presets.d.ts.map +1 -0
  734. package/dist/lib/server/decisioning/resolve-presets.js +142 -0
  735. package/dist/lib/server/decisioning/resolve-presets.js.map +1 -0
  736. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts +8 -0
  737. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts.map +1 -0
  738. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js +101 -0
  739. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -0
  740. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +91 -8
  741. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
  742. package/dist/lib/server/decisioning/runtime/from-platform.js +928 -146
  743. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
  744. package/dist/lib/server/decisioning/runtime/observed-modes.d.ts +40 -0
  745. package/dist/lib/server/decisioning/runtime/observed-modes.d.ts.map +1 -0
  746. package/dist/lib/server/decisioning/runtime/observed-modes.js +82 -0
  747. package/dist/lib/server/decisioning/runtime/observed-modes.js.map +1 -0
  748. package/dist/lib/server/decisioning/runtime/protocol-for-tool.js +2 -2
  749. package/dist/lib/server/decisioning/runtime/protocol-for-tool.js.map +1 -1
  750. package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -1
  751. package/dist/lib/server/decisioning/runtime/to-context.js +1 -0
  752. package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -1
  753. package/dist/lib/server/decisioning/runtime/validate-platform.d.ts.map +1 -1
  754. package/dist/lib/server/decisioning/runtime/validate-platform.js +40 -4
  755. package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -1
  756. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +83 -6
  757. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
  758. package/dist/lib/server/decisioning/specialisms/brand-rights.js +12 -5
  759. package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -1
  760. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +41 -4
  761. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
  762. package/dist/lib/server/decisioning/specialisms/creative.d.ts +47 -3
  763. package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
  764. package/dist/lib/server/decisioning/specialisms/sales.d.ts +115 -9
  765. package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
  766. package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.d.ts +125 -0
  767. package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.d.ts.map +1 -0
  768. package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.js +52 -0
  769. package/dist/lib/server/decisioning/specialisms/sponsored-intelligence.js.map +1 -0
  770. package/dist/lib/server/decisioning/tenant-registry.d.ts +16 -0
  771. package/dist/lib/server/decisioning/tenant-registry.d.ts.map +1 -1
  772. package/dist/lib/server/decisioning/tenant-registry.js +8 -3
  773. package/dist/lib/server/decisioning/tenant-registry.js.map +1 -1
  774. package/dist/lib/server/decisioning/tenant-store.d.ts +200 -0
  775. package/dist/lib/server/decisioning/tenant-store.d.ts.map +1 -0
  776. package/dist/lib/server/decisioning/tenant-store.js +182 -0
  777. package/dist/lib/server/decisioning/tenant-store.js.map +1 -0
  778. package/dist/lib/server/decisioning/validate-specialisms.d.ts +66 -0
  779. package/dist/lib/server/decisioning/validate-specialisms.d.ts.map +1 -0
  780. package/dist/lib/server/decisioning/validate-specialisms.js +119 -0
  781. package/dist/lib/server/decisioning/validate-specialisms.js.map +1 -0
  782. package/dist/lib/server/index.d.ts +14 -2
  783. package/dist/lib/server/index.d.ts.map +1 -1
  784. package/dist/lib/server/index.js +41 -3
  785. package/dist/lib/server/index.js.map +1 -1
  786. package/dist/lib/server/media-buy-store.d.ts +126 -0
  787. package/dist/lib/server/media-buy-store.d.ts.map +1 -0
  788. package/dist/lib/server/media-buy-store.js +171 -0
  789. package/dist/lib/server/media-buy-store.js.map +1 -0
  790. package/dist/lib/server/redact.d.ts +52 -0
  791. package/dist/lib/server/redact.d.ts.map +1 -0
  792. package/dist/lib/server/redact.js +86 -0
  793. package/dist/lib/server/redact.js.map +1 -0
  794. package/dist/lib/server/responses.d.ts +60 -1
  795. package/dist/lib/server/responses.d.ts.map +1 -1
  796. package/dist/lib/server/responses.js +110 -1
  797. package/dist/lib/server/responses.js.map +1 -1
  798. package/dist/lib/server/serve.d.ts.map +1 -1
  799. package/dist/lib/server/serve.js +53 -1
  800. package/dist/lib/server/serve.js.map +1 -1
  801. package/dist/lib/server/state-machine.d.ts +80 -0
  802. package/dist/lib/server/state-machine.d.ts.map +1 -0
  803. package/dist/lib/server/state-machine.js +125 -0
  804. package/dist/lib/server/state-machine.js.map +1 -0
  805. package/dist/lib/server/test-controller.d.ts +51 -0
  806. package/dist/lib/server/test-controller.d.ts.map +1 -1
  807. package/dist/lib/server/test-controller.js +112 -30
  808. package/dist/lib/server/test-controller.js.map +1 -1
  809. package/dist/lib/server/upstream-helpers.d.ts +182 -0
  810. package/dist/lib/server/upstream-helpers.d.ts.map +1 -0
  811. package/dist/lib/server/upstream-helpers.js +140 -0
  812. package/dist/lib/server/upstream-helpers.js.map +1 -0
  813. package/dist/lib/signing/agent-resolver/canonicalize.d.ts +44 -0
  814. package/dist/lib/signing/agent-resolver/canonicalize.d.ts.map +1 -0
  815. package/dist/lib/signing/agent-resolver/canonicalize.js +85 -0
  816. package/dist/lib/signing/agent-resolver/canonicalize.js.map +1 -0
  817. package/dist/lib/signing/agent-resolver/capabilities-types.d.ts +54 -0
  818. package/dist/lib/signing/agent-resolver/capabilities-types.d.ts.map +1 -0
  819. package/dist/lib/signing/agent-resolver/capabilities-types.js +49 -0
  820. package/dist/lib/signing/agent-resolver/capabilities-types.js.map +1 -0
  821. package/dist/lib/signing/agent-resolver/consistency.d.ts +84 -0
  822. package/dist/lib/signing/agent-resolver/consistency.d.ts.map +1 -0
  823. package/dist/lib/signing/agent-resolver/consistency.js +121 -0
  824. package/dist/lib/signing/agent-resolver/consistency.js.map +1 -0
  825. package/dist/lib/signing/agent-resolver/errors.d.ts +68 -0
  826. package/dist/lib/signing/agent-resolver/errors.d.ts.map +1 -0
  827. package/dist/lib/signing/agent-resolver/errors.js +45 -0
  828. package/dist/lib/signing/agent-resolver/errors.js.map +1 -0
  829. package/dist/lib/signing/agent-resolver/etld.d.ts +25 -0
  830. package/dist/lib/signing/agent-resolver/etld.d.ts.map +1 -0
  831. package/dist/lib/signing/agent-resolver/etld.js +75 -0
  832. package/dist/lib/signing/agent-resolver/etld.js.map +1 -0
  833. package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +41 -0
  834. package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts.map +1 -0
  835. package/dist/lib/signing/agent-resolver/fetch-helpers.js +85 -0
  836. package/dist/lib/signing/agent-resolver/fetch-helpers.js.map +1 -0
  837. package/dist/lib/signing/agent-resolver/index.d.ts +26 -0
  838. package/dist/lib/signing/agent-resolver/index.d.ts.map +1 -0
  839. package/dist/lib/signing/agent-resolver/index.js +33 -0
  840. package/dist/lib/signing/agent-resolver/index.js.map +1 -0
  841. package/dist/lib/signing/agent-resolver/jwks-set.d.ts +76 -0
  842. package/dist/lib/signing/agent-resolver/jwks-set.d.ts.map +1 -0
  843. package/dist/lib/signing/agent-resolver/jwks-set.js +124 -0
  844. package/dist/lib/signing/agent-resolver/jwks-set.js.map +1 -0
  845. package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +123 -0
  846. package/dist/lib/signing/agent-resolver/resolve-agent.d.ts.map +1 -0
  847. package/dist/lib/signing/agent-resolver/resolve-agent.js +398 -0
  848. package/dist/lib/signing/agent-resolver/resolve-agent.js.map +1 -0
  849. package/dist/lib/signing/agent-resolver/select-agent.d.ts +54 -0
  850. package/dist/lib/signing/agent-resolver/select-agent.d.ts.map +1 -0
  851. package/dist/lib/signing/agent-resolver/select-agent.js +94 -0
  852. package/dist/lib/signing/agent-resolver/select-agent.js.map +1 -0
  853. package/dist/lib/signing/agent-resolver/strict-json.d.ts +44 -0
  854. package/dist/lib/signing/agent-resolver/strict-json.d.ts.map +1 -0
  855. package/dist/lib/signing/agent-resolver/strict-json.js +219 -0
  856. package/dist/lib/signing/agent-resolver/strict-json.js.map +1 -0
  857. package/dist/lib/signing/capability-priming.d.ts.map +1 -1
  858. package/dist/lib/signing/capability-priming.js +2 -55
  859. package/dist/lib/signing/capability-priming.js.map +1 -1
  860. package/dist/lib/signing/protocol-response.d.ts +18 -0
  861. package/dist/lib/signing/protocol-response.d.ts.map +1 -0
  862. package/dist/lib/signing/protocol-response.js +69 -0
  863. package/dist/lib/signing/protocol-response.js.map +1 -0
  864. package/dist/lib/signing/server.d.ts +1 -0
  865. package/dist/lib/signing/server.d.ts.map +1 -1
  866. package/dist/lib/signing/server.js +10 -1
  867. package/dist/lib/signing/server.js.map +1 -1
  868. package/dist/lib/signing/testing.d.ts +64 -0
  869. package/dist/lib/signing/testing.d.ts.map +1 -1
  870. package/dist/lib/signing/testing.js +100 -5
  871. package/dist/lib/signing/testing.js.map +1 -1
  872. package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
  873. package/dist/lib/testing/compliance/comply.js +2 -0
  874. package/dist/lib/testing/compliance/comply.js.map +1 -1
  875. package/dist/lib/testing/compliance/types.d.ts +8 -0
  876. package/dist/lib/testing/compliance/types.d.ts.map +1 -1
  877. package/dist/lib/testing/comply-controller.d.ts +23 -2
  878. package/dist/lib/testing/comply-controller.d.ts.map +1 -1
  879. package/dist/lib/testing/comply-controller.js +19 -2
  880. package/dist/lib/testing/comply-controller.js.map +1 -1
  881. package/dist/lib/testing/index.d.ts +1 -1
  882. package/dist/lib/testing/index.d.ts.map +1 -1
  883. package/dist/lib/testing/index.js.map +1 -1
  884. package/dist/lib/testing/storyboard/agent-routing.d.ts +92 -0
  885. package/dist/lib/testing/storyboard/agent-routing.d.ts.map +1 -0
  886. package/dist/lib/testing/storyboard/agent-routing.js +291 -0
  887. package/dist/lib/testing/storyboard/agent-routing.js.map +1 -0
  888. package/dist/lib/testing/storyboard/context.d.ts +22 -0
  889. package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
  890. package/dist/lib/testing/storyboard/context.js +35 -8
  891. package/dist/lib/testing/storyboard/context.js.map +1 -1
  892. package/dist/lib/testing/storyboard/default-invariants.js +6 -35
  893. package/dist/lib/testing/storyboard/default-invariants.js.map +1 -1
  894. package/dist/lib/testing/storyboard/index.d.ts +1 -1
  895. package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
  896. package/dist/lib/testing/storyboard/index.js.map +1 -1
  897. package/dist/lib/testing/storyboard/loader.js +46 -12
  898. package/dist/lib/testing/storyboard/loader.js.map +1 -1
  899. package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
  900. package/dist/lib/testing/storyboard/request-builder.js +14 -1
  901. package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
  902. package/dist/lib/testing/storyboard/runner.d.ts +17 -0
  903. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  904. package/dist/lib/testing/storyboard/runner.js +800 -92
  905. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  906. package/dist/lib/testing/storyboard/types.d.ts +221 -12
  907. package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
  908. package/dist/lib/testing/storyboard/types.js.map +1 -1
  909. package/dist/lib/testing/storyboard/validations.d.ts +65 -0
  910. package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
  911. package/dist/lib/testing/storyboard/validations.js +511 -2
  912. package/dist/lib/testing/storyboard/validations.js.map +1 -1
  913. package/dist/lib/testing/test-controller.d.ts +65 -1
  914. package/dist/lib/testing/test-controller.d.ts.map +1 -1
  915. package/dist/lib/testing/test-controller.js +36 -0
  916. package/dist/lib/testing/test-controller.js.map +1 -1
  917. package/dist/lib/testing/types.d.ts +14 -0
  918. package/dist/lib/testing/types.d.ts.map +1 -1
  919. package/dist/lib/types/core.generated.d.ts +299 -141
  920. package/dist/lib/types/core.generated.d.ts.map +1 -1
  921. package/dist/lib/types/core.generated.js +2 -2
  922. package/dist/lib/types/error-codes.d.ts +168 -108
  923. package/dist/lib/types/error-codes.d.ts.map +1 -1
  924. package/dist/lib/types/error-codes.js +23 -190
  925. package/dist/lib/types/error-codes.js.map +1 -1
  926. package/dist/lib/types/error-details.aliases.d.ts +48 -0
  927. package/dist/lib/types/error-details.aliases.d.ts.map +1 -0
  928. package/dist/lib/types/error-details.aliases.js +41 -0
  929. package/dist/lib/types/error-details.aliases.js.map +1 -0
  930. package/dist/lib/types/index.d.ts +15 -1
  931. package/dist/lib/types/index.d.ts.map +1 -1
  932. package/dist/lib/types/index.js +7 -0
  933. package/dist/lib/types/index.js.map +1 -1
  934. package/dist/lib/types/inline-enums.generated.d.ts +2 -4
  935. package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
  936. package/dist/lib/types/inline-enums.generated.js +10 -7
  937. package/dist/lib/types/inline-enums.generated.js.map +1 -1
  938. package/dist/lib/types/manifest.generated.d.ts +280 -0
  939. package/dist/lib/types/manifest.generated.d.ts.map +1 -0
  940. package/dist/lib/types/manifest.generated.js +339 -0
  941. package/dist/lib/types/manifest.generated.js.map +1 -0
  942. package/dist/lib/types/schemas.generated.d.ts +27229 -25160
  943. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  944. package/dist/lib/types/schemas.generated.js +584 -533
  945. package/dist/lib/types/schemas.generated.js.map +1 -1
  946. package/dist/lib/types/tools.generated.d.ts +146 -21
  947. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  948. package/dist/lib/types/v2-5/tools.generated.d.ts +48 -1
  949. package/dist/lib/types/v2-5/tools.generated.d.ts.map +1 -1
  950. package/dist/lib/upstream-recorder/index.d.ts +57 -0
  951. package/dist/lib/upstream-recorder/index.d.ts.map +1 -0
  952. package/dist/lib/upstream-recorder/index.js +62 -0
  953. package/dist/lib/upstream-recorder/index.js.map +1 -0
  954. package/dist/lib/upstream-recorder/recorder.d.ts +35 -0
  955. package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -0
  956. package/dist/lib/upstream-recorder/recorder.js +507 -0
  957. package/dist/lib/upstream-recorder/recorder.js.map +1 -0
  958. package/dist/lib/upstream-recorder/types.d.ts +365 -0
  959. package/dist/lib/upstream-recorder/types.d.ts.map +1 -0
  960. package/dist/lib/upstream-recorder/types.js +30 -0
  961. package/dist/lib/upstream-recorder/types.js.map +1 -0
  962. package/dist/lib/utils/capabilities.d.ts +44 -3
  963. package/dist/lib/utils/capabilities.d.ts.map +1 -1
  964. package/dist/lib/utils/capabilities.js +67 -3
  965. package/dist/lib/utils/capabilities.js.map +1 -1
  966. package/dist/lib/utils/error-extraction.d.ts +24 -0
  967. package/dist/lib/utils/error-extraction.d.ts.map +1 -1
  968. package/dist/lib/utils/error-extraction.js +0 -2
  969. package/dist/lib/utils/error-extraction.js.map +1 -1
  970. package/dist/lib/utils/format-render-builders.d.ts +2 -1
  971. package/dist/lib/utils/format-render-builders.d.ts.map +1 -1
  972. package/dist/lib/utils/format-render-builders.js +0 -23
  973. package/dist/lib/utils/format-render-builders.js.map +1 -1
  974. package/dist/lib/utils/glob.d.ts +30 -0
  975. package/dist/lib/utils/glob.d.ts.map +1 -0
  976. package/dist/lib/utils/glob.js +39 -0
  977. package/dist/lib/utils/glob.js.map +1 -0
  978. package/dist/lib/utils/redact-secrets.d.ts +37 -0
  979. package/dist/lib/utils/redact-secrets.d.ts.map +1 -0
  980. package/dist/lib/utils/redact-secrets.js +65 -0
  981. package/dist/lib/utils/redact-secrets.js.map +1 -0
  982. package/dist/lib/utils/tool-request-schemas.d.ts.map +1 -1
  983. package/dist/lib/utils/tool-request-schemas.js +1 -0
  984. package/dist/lib/utils/tool-request-schemas.js.map +1 -1
  985. package/dist/lib/validation/hints.d.ts +50 -0
  986. package/dist/lib/validation/hints.d.ts.map +1 -0
  987. package/dist/lib/validation/hints.js +194 -0
  988. package/dist/lib/validation/hints.js.map +1 -0
  989. package/dist/lib/validation/schema-errors.d.ts +2 -1
  990. package/dist/lib/validation/schema-errors.d.ts.map +1 -1
  991. package/dist/lib/validation/schema-errors.js +39 -4
  992. package/dist/lib/validation/schema-errors.js.map +1 -1
  993. package/dist/lib/validation/schema-loader.d.ts +13 -0
  994. package/dist/lib/validation/schema-loader.d.ts.map +1 -1
  995. package/dist/lib/validation/schema-loader.js +20 -0
  996. package/dist/lib/validation/schema-loader.js.map +1 -1
  997. package/dist/lib/validation/schema-validator.d.ts +107 -2
  998. package/dist/lib/validation/schema-validator.d.ts.map +1 -1
  999. package/dist/lib/validation/schema-validator.js +205 -12
  1000. package/dist/lib/validation/schema-validator.js.map +1 -1
  1001. package/dist/lib/validation/sync-creatives.d.ts +30 -0
  1002. package/dist/lib/validation/sync-creatives.d.ts.map +1 -1
  1003. package/dist/lib/version.d.ts +7 -7
  1004. package/dist/lib/version.d.ts.map +1 -1
  1005. package/dist/lib/version.js +9 -5
  1006. package/dist/lib/version.js.map +1 -1
  1007. package/docs/guides/BUILD-AN-AGENT.md +267 -137
  1008. package/docs/llms.txt +110 -55
  1009. package/examples/CONTRIBUTING.md +173 -0
  1010. package/examples/README.md +48 -0
  1011. package/examples/comply-controller-seller.ts +9 -17
  1012. package/examples/decisioning-platform-broadcast-tv.ts +3 -2
  1013. package/examples/decisioning-platform-implicit-accounts.ts +168 -0
  1014. package/examples/decisioning-platform-mock-seller.ts +3 -2
  1015. package/examples/decisioning-platform-multi-tenant-db.ts +317 -0
  1016. package/examples/decisioning-platform-programmatic.ts +3 -2
  1017. package/examples/hello-cluster.ts +460 -0
  1018. package/examples/hello_creative_adapter_ad_server.ts +790 -0
  1019. package/examples/hello_creative_adapter_template.ts +528 -0
  1020. package/examples/hello_seller_adapter_guaranteed.ts +1138 -0
  1021. package/examples/hello_seller_adapter_multi_tenant.ts +1046 -0
  1022. package/examples/hello_seller_adapter_non_guaranteed.ts +1020 -0
  1023. package/examples/hello_seller_adapter_social.ts +829 -0
  1024. package/examples/hello_si_adapter_brand.ts +572 -0
  1025. package/examples/hello_signals_adapter_marketplace.ts +532 -0
  1026. package/examples/seller-test-controller.ts +22 -28
  1027. package/package.json +32 -4
  1028. package/skills/SHAPE-GOTCHAS.md +233 -0
  1029. package/skills/build-brand-rights-agent/SKILL.md +121 -16
  1030. package/skills/build-creative-agent/SKILL.md +128 -184
  1031. package/skills/build-decisioning-platform/advanced/MULTI-TENANT.md +104 -28
  1032. package/skills/build-generative-seller-agent/SKILL.md +15 -9
  1033. package/skills/build-governance-agent/SKILL.md +20 -11
  1034. package/skills/build-holdco-agent/SKILL.md +250 -0
  1035. package/skills/build-retail-media-agent/SKILL.md +10 -8
  1036. package/skills/build-seller-agent/SKILL.md +315 -49
  1037. package/skills/build-seller-agent/specialisms/sales-broadcast-tv.md +2 -0
  1038. package/skills/build-seller-agent/specialisms/sales-guaranteed.md +18 -0
  1039. package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +9 -29
  1040. package/skills/build-seller-agent/specialisms/sales-social.md +63 -2
  1041. package/skills/build-si-agent/SKILL.md +251 -196
  1042. package/skills/build-signals-agent/SKILL.md +4 -0
  1043. package/skills/call-adcp-agent/SKILL.md +7 -1
  1044. package/skills/run-by-experts/SKILL.md +116 -0
  1045. package/skills/triage-storyboard-failure/SKILL.md +96 -0
  1046. package/skills/call-adcp-agent.previous/SKILL.md +0 -339
  1047. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/brand/index.yaml +0 -0
  1048. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/creative/index.yaml +0 -0
  1049. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/governance/index.yaml +0 -0
  1050. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/creative-reception.yaml +0 -0
  1051. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/index.yaml +0 -0
  1052. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1053. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
  1054. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1055. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
  1056. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
  1057. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
  1058. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1059. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1060. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1061. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1062. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1063. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1064. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1065. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/refine_products.yaml +0 -0
  1066. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/state-machine.yaml +0 -0
  1067. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/signals/index.yaml +0 -0
  1068. /package/compliance/cache/{3.0.1 → 3.0.5}/domains/sponsored-intelligence/index.yaml +0 -0
  1069. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/brand/index.yaml +0 -0
  1070. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/creative/index.yaml +0 -0
  1071. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/governance/index.yaml +0 -0
  1072. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/creative-reception.yaml +0 -0
  1073. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/index.yaml +0 -0
  1074. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1075. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
  1076. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1077. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
  1078. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
  1079. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
  1080. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1081. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1082. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1083. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1084. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1085. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1086. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1087. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
  1088. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/state-machine.yaml +0 -0
  1089. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/signals/index.yaml +0 -0
  1090. /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/sponsored-intelligence/index.yaml +0 -0
  1091. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
  1092. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/collection-lists/index.yaml +0 -0
  1093. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/content-standards/index.yaml +0 -0
  1094. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-ad-server/index.yaml +0 -0
  1095. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/generative-seller.yaml +0 -0
  1096. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/index.yaml +0 -0
  1097. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-template/index.yaml +0 -0
  1098. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-aware-seller/index.yaml +0 -0
  1099. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-delivery-monitor/index.yaml +0 -0
  1100. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/denied.yaml +0 -0
  1101. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/index.yaml +0 -0
  1102. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/property-lists/index.yaml +0 -0
  1103. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-broadcast-tv/index.yaml +0 -0
  1104. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-catalog-driven/index.yaml +0 -0
  1105. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-guaranteed/index.yaml +0 -0
  1106. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-non-guaranteed/index.yaml +0 -0
  1107. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-proposal-mode/index.yaml +0 -0
  1108. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/index.yaml +0 -0
  1109. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
  1110. /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-owned/index.yaml +0 -0
  1111. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/acme-outdoor.yaml +0 -0
  1112. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/bistro-oranje.yaml +0 -0
  1113. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/nova-motors.yaml +0 -0
  1114. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/osei-natural.yaml +0 -0
  1115. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/signed-requests-runner.yaml +0 -0
  1116. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/substitution-observer-runner.yaml +0 -0
  1117. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/summit-foods.yaml +0 -0
  1118. /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/webhook-receiver-runner.yaml +0 -0
  1119. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
  1120. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/002-full-plan.json +0 -0
  1121. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
  1122. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
  1123. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
  1124. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
  1125. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
  1126. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
  1127. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
  1128. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
  1129. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
  1130. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/README.md +0 -0
  1131. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/canonicalization.json +0 -0
  1132. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/keys.json +0 -0
  1133. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
  1134. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
  1135. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
  1136. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
  1137. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
  1138. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
  1139. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
  1140. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
  1141. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
  1142. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
  1143. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
  1144. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
  1145. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
  1146. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
  1147. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
  1148. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
  1149. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
  1150. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
  1151. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
  1152. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
  1153. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
  1154. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
  1155. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
  1156. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
  1157. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
  1158. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
  1159. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
  1160. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
  1161. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
  1162. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
  1163. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
  1164. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
  1165. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
  1166. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
  1167. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
  1168. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
  1169. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
  1170. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
  1171. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
  1172. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/README.md +0 -0
  1173. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/keys.json +0 -0
  1174. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
  1175. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
  1176. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
  1177. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
  1178. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
  1179. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
  1180. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
  1181. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
  1182. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
  1183. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
  1184. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
  1185. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
  1186. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
  1187. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
  1188. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
  1189. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
  1190. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
  1191. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
  1192. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
  1193. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
  1194. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
  1195. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
  1196. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
  1197. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
  1198. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
  1199. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
  1200. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
  1201. /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
  1202. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/capability-discovery.yaml +0 -0
  1203. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/collection-lists-pagination-integrity.yaml +0 -0
  1204. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/content-standards-pagination-integrity.yaml +0 -0
  1205. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/deterministic-testing.yaml +0 -0
  1206. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/error-compliance.yaml +0 -0
  1207. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/fictional-entities.yaml +0 -0
  1208. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-media-buys-pagination-integrity.yaml +0 -0
  1209. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-signals-pagination-integrity.yaml +0 -0
  1210. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/idempotency.yaml +0 -0
  1211. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-creative-formats.yaml +0 -0
  1212. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-list-accounts.yaml +0 -0
  1213. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity.yaml +0 -0
  1214. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/property-lists-pagination-integrity.yaml +0 -0
  1215. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/schema-validation.yaml +0 -0
  1216. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/security.yaml +0 -0
  1217. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/signed-requests.yaml +0 -0
  1218. /package/compliance/cache/{3.0.1 → 3.0.5}/universal/webhook-emission.yaml +0 -0
@@ -38,9 +38,10 @@
38
38
  * `tasks/get` wire handler, per-server + module-level `publishStatusChange`.
39
39
  *
40
40
  * **Still deferred (rc.1+):** MCP Resources subscription projection for
41
- * `publishStatusChange`; `resolveAccount(undefined, { authInfo, toolName })`
42
- * refactor for `provide_performance_feedback` / `list_creative_formats`
43
- * no-account path in `'explicit'`-mode adopters (see `SalesPlatform` JSDoc).
41
+ * `publishStatusChange`. The no-account tool surface (`preview_creative`,
42
+ * `list_creative_formats`, `provide_performance_feedback`) is now typed
43
+ * via `NoAccountCtx<TCtxMeta>` handlers receive `ctx.account: Account |
44
+ * undefined` and must narrow before reading `ctx_metadata`.
44
45
  *
45
46
  * Status: Preview / 6.0. Not yet exported from the public `./server`
46
47
  * subpath; reach in via `@adcp/sdk/server/decisioning/runtime` for
@@ -49,6 +50,7 @@
49
50
  * @public
50
51
  */
51
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
+ exports.INTENTIONALLY_UNHYDRATED_ENTITIES = exports.ENTITY_TO_RESOURCE_KIND = void 0;
52
54
  exports.createAdcpServerFromPlatform = createAdcpServerFromPlatform;
53
55
  exports._resetMergeSeamDedupe = _resetMergeSeamDedupe;
54
56
  exports.getAllAdcpMigrations = getAllAdcpMigrations;
@@ -58,12 +60,14 @@ const account_1 = require("../account");
58
60
  const async_outcome_1 = require("../async-outcome");
59
61
  const errors_1 = require("../../errors");
60
62
  const validate_platform_1 = require("./validate-platform");
63
+ const validate_specialisms_1 = require("../validate-specialisms");
61
64
  const to_context_1 = require("./to-context");
62
65
  const ctx_metadata_1 = require("../../ctx-metadata");
63
66
  const idempotency_1 = require("../../idempotency");
64
67
  const pg_1 = require("../../idempotency/backends/pg");
65
68
  const postgres_task_registry_1 = require("./postgres-task-registry");
66
69
  const async_outcome_2 = require("../async-outcome");
70
+ const entity_hydration_generated_1 = require("./entity-hydration.generated");
67
71
  const zod_1 = require("zod");
68
72
  const task_registry_1 = require("./task-registry");
69
73
  const protocol_for_tool_1 = require("./protocol-for-tool");
@@ -85,6 +89,10 @@ const DEFAULT_FRAMEWORK_LOGGER = {
85
89
  const status_changes_1 = require("../status-changes");
86
90
  const comply_controller_1 = require("../../../testing/comply-controller");
87
91
  const seed_merge_1 = require("../../../testing/seed-merge");
92
+ const adcp_server_1 = require("../../adcp-server");
93
+ const account_mode_1 = require("../../account-mode");
94
+ const test_controller_1 = require("../../test-controller");
95
+ const observed_modes_1 = require("./observed-modes");
88
96
  const normalize_errors_1 = require("../../normalize-errors");
89
97
  /**
90
98
  * Apply `normalizeErrors` to a sync_creatives row's optional `errors`
@@ -100,6 +108,80 @@ function normalizeRowErrors(row) {
100
108
  return row;
101
109
  return { ...row, errors: (0, normalize_errors_1.normalizeErrors)(row.errors) };
102
110
  }
111
+ /**
112
+ * Enforce the documented inline-`account_id` refusal for resolution modes
113
+ * that declare the field meaningless on the wire — `'implicit'` (since
114
+ * #1364) and `'derived'` (since adcp-client#1468). Both modes share the
115
+ * same wire contract: the buyer does not pass `account_id` inline; the
116
+ * framework derives the tenant from the authenticated principal (after a
117
+ * `sync_accounts` step for `'implicit'`; directly for `'derived'`).
118
+ *
119
+ * Throws `AdcpError('INVALID_REQUEST')` before reaching the adopter's
120
+ * `accounts.resolve`, so each adopter doesn't reimplement the same
121
+ * `if (ref?.account_id) return null` branch and the wire response is
122
+ * consistent across both modes. The brand+operator union arm is
123
+ * permitted — only `account_id`-shaped references are refused.
124
+ *
125
+ * Mode-specific message and suggestion: `'implicit'` adopters get the
126
+ * `sync_accounts`-first guidance; `'derived'` adopters get the single-
127
+ * tenant explanation (no `sync_accounts` step exists in derived mode —
128
+ * the auth principal alone identifies the tenant).
129
+ *
130
+ * Documented at `AccountStore.resolution` in `account.ts`.
131
+ */
132
+ function refuseInlineAccountIdWhenForbidden(resolution, ref) {
133
+ if (resolution !== 'implicit' && resolution !== 'derived')
134
+ return;
135
+ if ((0, account_1.refAccountId)(ref) === undefined)
136
+ return;
137
+ if (resolution === 'implicit') {
138
+ throw new async_outcome_1.AdcpError('INVALID_REQUEST', {
139
+ message: 'This platform resolves accounts from the authenticated principal — call sync_accounts first; do not pass account.account_id inline.',
140
+ field: 'account.account_id',
141
+ suggestion: 'Call sync_accounts to associate accounts with your principal, then omit account_id on subsequent calls.',
142
+ });
143
+ }
144
+ throw new async_outcome_1.AdcpError('INVALID_REQUEST', {
145
+ message: 'This single-tenant agent identifies the tenant from the authenticated principal alone — do not pass account.account_id inline; the field is meaningless on the wire for derived-resolution agents.',
146
+ field: 'account.account_id',
147
+ suggestion: 'Omit the account field; the framework derives the tenant from your authenticated credential.',
148
+ });
149
+ }
150
+ /**
151
+ * Dev-mode warning when a multi-id read tool returns fewer rows than
152
+ * the buyer requested — the canonical signal that the platform is
153
+ * silently truncating to `<id_field>[0]` (closes #1342, follow-up
154
+ * #1399, extended in #1410 to additional read-by-id surfaces). Catches
155
+ * the bug class where adopters write the recommended pattern wrong on
156
+ * first pass; quiet in production where legitimate misses (deleted,
157
+ * archived, cross-account) are routine and warning on every miss would
158
+ * be noise.
159
+ *
160
+ * Suppressible via `ADCP_SUPPRESS_MULTI_ID_WARN=1` for adopters whose
161
+ * legitimate-miss rate is high (deleted-account-rich datasets, etc.).
162
+ *
163
+ * Sync / upsert surfaces (`syncCreatives`, `syncCatalogs`, `syncPlans`)
164
+ * are intentionally out of scope — those have a different shape where
165
+ * pass-through is the obvious pattern and "did all rows roundtrip?"
166
+ * isn't a clean question.
167
+ */
168
+ function warnIfTruncatedMultiIdResponse(toolName, idFieldName, requestedIds, responseArray, logger) {
169
+ if (process.env.NODE_ENV === 'production')
170
+ return;
171
+ if (process.env.ADCP_SUPPRESS_MULTI_ID_WARN === '1')
172
+ return;
173
+ if (!requestedIds || requestedIds.length === 0)
174
+ return;
175
+ const returned = Array.isArray(responseArray) ? responseArray.length : 0;
176
+ if (returned >= requestedIds.length)
177
+ return;
178
+ // Empty `<id_field>` is filtered above as paginated-mode (no truncation
179
+ // possible without a request to compare against).
180
+ logger.warn(`[adcp/sdk] ${toolName}: platform returned ${returned} row${returned === 1 ? '' : 's'} for ${requestedIds.length} requested ${idFieldName} — ` +
181
+ `the platform may be silently truncating to ${idFieldName}[0]. ` +
182
+ `See https://github.com/adcontextprotocol/adcp-client/issues/1342 for the multi-id pass-through contract. ` +
183
+ `Suppress with ADCP_SUPPRESS_MULTI_ID_WARN=1 if legitimate misses (deleted / cross-account) are routine.`);
184
+ }
103
185
  // Use `DecisioningPlatform<any, any>` for the generic constraint. The default
104
186
  // `TCtxMeta = Record<string, unknown>` doesn't accept adopter metadata interfaces
105
187
  // without an index signature (e.g., `interface MyMeta { brand_id: string }`),
@@ -107,6 +189,37 @@ function normalizeRowErrors(row) {
107
189
  // framework, so we don't need to constrain it here.
108
190
  function createAdcpServerFromPlatform(platform, opts) {
109
191
  (0, validate_platform_1.validatePlatform)(platform);
192
+ // Specialism→required-tools coverage check (adcp-client#1299).
193
+ //
194
+ // For each specialism declared in `capabilities.specialisms[]`, verify the
195
+ // platform exposes a method matching every tool the manifest's
196
+ // `SPECIALISM_REQUIRED_TOOLS` lists for that specialism. Catches the
197
+ // common adopter mistake of declaring `'sales-non-guaranteed'` while
198
+ // forgetting to implement `getProducts` / `createMediaBuy` / etc. —
199
+ // would otherwise surface as a runtime error when a buyer actually
200
+ // calls the missing tool.
201
+ //
202
+ // Default behavior is console.warn — strictSpecialismValidation: true
203
+ // escalates to a thrown `PlatformConfigError`. The check is method-
204
+ // presence-anywhere on the platform (not method-on-specific-field) so
205
+ // adopters with non-standard layouts (e.g., a single mega-platform vs.
206
+ // the conventional sales/creative/accounts split) aren't false-positively
207
+ // flagged.
208
+ {
209
+ const specialisms = platform.capabilities.specialisms;
210
+ const issues = (0, validate_specialisms_1.validateSpecialismRequiredTools)(platform, specialisms);
211
+ if (issues.length > 0) {
212
+ const messages = issues.map(validate_specialisms_1.formatSpecialismIssue);
213
+ if (opts.strictSpecialismValidation === true) {
214
+ throw new validate_platform_1.PlatformConfigError(`Platform missing methods for ${issues.length} specialism-required tool(s). ` +
215
+ `Strict mode (\`strictSpecialismValidation: true\`) treats this as fatal.\n` +
216
+ messages.map(m => ` - ${m}`).join('\n'));
217
+ }
218
+ // eslint-disable-next-line no-console
219
+ for (const message of messages)
220
+ console.warn(message);
221
+ }
222
+ }
110
223
  // Compliance-testing capability/adapter consistency.
111
224
  //
112
225
  // Two failure modes the framework refuses to ship:
@@ -388,6 +501,23 @@ function createAdcpServerFromPlatform(platform, opts) {
388
501
  ...opts,
389
502
  ...(autoSeedStore != null && { testController: makeAutoSeedBridge(autoSeedStore) }),
390
503
  ...(projectedCapabilitiesConfig != null && { capabilities: projectedCapabilitiesConfig }),
504
+ // Buyer-agent registry (Phase 1 of #1269). Threaded through from the
505
+ // platform so the v5 dispatcher can call `agentRegistry.resolve()` on
506
+ // every request and populate `ctx.agent`. When the platform omits the
507
+ // field, the v5 surface stays unchanged.
508
+ //
509
+ // Precedence: this spread runs AFTER `...opts`, so `platform.agentRegistry`
510
+ // wins over any `opts.agentRegistry` an adopter passes via the v5 escape
511
+ // hatch. Same convention as the `idempotency` spread below — the platform
512
+ // is the authoritative v6 surface; opts is a low-level escape hatch.
513
+ ...(platform.agentRegistry !== undefined && { agentRegistry: platform.agentRegistry }),
514
+ // Server-level `instructions` (closes #1312). Same precedence pattern as
515
+ // `agentRegistry` above — platform-declared instructions win over the
516
+ // v5 `opts.instructions` escape hatch when both are present, so v6
517
+ // adopters can colocate platform facts / decision policy with the rest
518
+ // of their platform declaration.
519
+ ...(platform.instructions !== undefined && { instructions: platform.instructions }),
520
+ ...(platform.onInstructionsError !== undefined && { onInstructionsError: platform.onInstructionsError }),
391
521
  // Pool-derived stores override the spread above when adopters supplied
392
522
  // `pool` but no explicit per-store opt. Explicit values still win.
393
523
  ...(effectiveIdempotency !== undefined && { idempotency: effectiveIdempotency }),
@@ -408,10 +538,16 @@ function createAdcpServerFromPlatform(platform, opts) {
408
538
  let resolved = false;
409
539
  let resolvedAccountId;
410
540
  try {
411
- const account = await platform.accounts.resolve(ref, {
412
- ...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
413
- toolName: ctx.toolName,
414
- });
541
+ // Enforce the JSDoc contract documented at `AccountStore.resolution`:
542
+ // implicit-mode and derived-mode platforms refuse inline `account_id`
543
+ // references. Implicit: buyers call sync_accounts first, then the
544
+ // framework resolves from the auth principal. Derived: single-tenant;
545
+ // the principal alone identifies the tenant. The brand+operator union
546
+ // arm is permitted (implicit's sync_accounts onboarding flow); only
547
+ // the `{ account_id }` arm is refused. Closes adcp-client#1364
548
+ // (implicit) and adcp-client#1468 (derived).
549
+ refuseInlineAccountIdWhenForbidden(platform.accounts.resolution, ref);
550
+ const account = await platform.accounts.resolve(ref, toResolveCtx(ctx, ctx.toolName));
415
551
  resolved = account != null;
416
552
  resolvedAccountId = account?.id;
417
553
  return account;
@@ -453,10 +589,7 @@ function createAdcpServerFromPlatform(platform, opts) {
453
589
  let resolved = false;
454
590
  let resolvedAccountId;
455
591
  try {
456
- const account = await platform.accounts.resolve(undefined, {
457
- ...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
458
- toolName: ctx.toolName,
459
- });
592
+ const account = await platform.accounts.resolve(undefined, toResolveCtx(ctx, ctx.toolName));
460
593
  resolved = account != null;
461
594
  resolvedAccountId = account?.id;
462
595
  return account;
@@ -478,49 +611,73 @@ function createAdcpServerFromPlatform(platform, opts) {
478
611
  },
479
612
  // Merge: platform-derived handlers WIN per-key over adopter-supplied
480
613
  // custom handlers. Adopter handlers fill gaps for tools the v6 platform
481
- // doesn't yet model (getMediaBuys, listCreativeFormats, content-standards
482
- // CRUD, sync_event_sources, etc.). See `CreateAdcpServerFromPlatformOptions`
483
- // JSDoc for the migration-seam contract.
614
+ // doesn't yet model (content-standards CRUD, sync_event_sources, etc.).
615
+ // See `CreateAdcpServerFromPlatformOptions` JSDoc for the migration-seam
616
+ // contract.
484
617
  mediaBuy: mergeHandlers(opts.mediaBuy, buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observability, fwLogger, {
485
618
  allowPrivateWebhookUrls: opts.allowPrivateWebhookUrls === true,
486
619
  autoEmitCompletionWebhooks: opts.autoEmitCompletionWebhooks !== false,
487
- }, ctxFor, effectiveCtxMetadata), 'mediaBuy', mergeOpts),
620
+ }, ctxFor, effectiveCtxMetadata, opts.mediaBuyStore), 'mediaBuy', mergeOpts),
488
621
  creative: mergeHandlers(opts.creative, buildCreativeHandlers(platform, taskRegistry, taskWebhookEmit, observability, fwLogger, {
489
622
  allowPrivateWebhookUrls: opts.allowPrivateWebhookUrls === true,
490
623
  autoEmitCompletionWebhooks: opts.autoEmitCompletionWebhooks !== false,
491
624
  }, ctxFor), 'creative', mergeOpts),
492
625
  eventTracking: mergeHandlers(opts.eventTracking, buildEventTrackingHandlers(platform, ctxFor), 'eventTracking', mergeOpts),
493
626
  signals: mergeHandlers(opts.signals, buildSignalsHandlers(platform, ctxFor, effectiveCtxMetadata, fwLogger), 'signals', mergeOpts),
627
+ sponsoredIntelligence: mergeHandlers(opts.sponsoredIntelligence, buildSponsoredIntelligenceHandlers(platform, ctxFor, effectiveCtxMetadata, fwLogger), 'sponsoredIntelligence', mergeOpts),
494
628
  governance: mergeHandlers(opts.governance, buildGovernanceHandlers(platform, ctxFor), 'governance', mergeOpts),
495
629
  accounts: mergeHandlers(opts.accounts, buildAccountHandlers(platform, ctxFor), 'accounts', mergeOpts),
496
630
  brandRights: mergeHandlers(opts.brandRights, buildBrandRightsHandlers(platform, ctxFor, effectiveCtxMetadata, fwLogger), 'brandRights', mergeOpts),
497
631
  customTools: {
498
632
  ...opts.customTools,
499
- tasks_get: buildTasksGetTool(platform, taskRegistry),
633
+ tasks_get: buildTasksGetTool(platform, taskRegistry, platform.agentRegistry, fwLogger),
500
634
  },
501
635
  };
502
636
  const server = (0, create_adcp_server_1.createAdcpServer)(config);
503
637
  // Wire `comply_test_controller` if the adopter supplied adapters.
504
638
  // `createComplyController` builds the tool definition + handler + raw
505
- // dispatch; `register(server)` calls server.registerTool. Sandbox
506
- // gating is the adopter's job (per-request via complyTest.sandboxGate
507
- // or environment-level by guarding the createAdcpServerFromPlatform
508
- // call site itself).
639
+ // dispatch. The framework registers the tool itself (bypassing
640
+ // `controller.register(server)`) so the sandbox-authority gate can
641
+ // resolve the calling account through `platform.accounts.resolve`
642
+ // BEFORE dispatching — under no circumstances should the controller
643
+ // operate on a `live`-mode account, regardless of what the caller
644
+ // claims on the wire. See `docs/proposals/lifecycle-state-and-sandbox-authority.md`
645
+ // for the full three-mode design and #1435 phase 2.
509
646
  if (opts.complyTest != null) {
510
647
  let complyConfig = opts.complyTest;
511
648
  if (autoSeedStore != null) {
512
649
  // Inject auto-seed adapters for `seed_product` and `seed_pricing_option`
513
650
  // when the adopter didn't wire explicit ones. Explicit adapters win — the
514
- // spread only fills the undefined slots. Each write is keyed by the
515
- // request's `account.account_id` so two sandbox accounts can seed the
516
- // same `product_id` without colliding.
651
+ // spread only fills the undefined slots.
652
+ //
653
+ // **Namespace key: raw `account.account_id`.** The adapter does NOT call
654
+ // `platform.accounts.resolve` even though that would seem symmetric with
655
+ // the bridge's `ctx.account?.id` read — calling resolve here without
656
+ // `authInfo` (which `ComplyControllerContext` doesn't expose) lets a
657
+ // caller spoof `account.account_id: 'victim'` and have a non-validating
658
+ // resolver write seeds into the victim's resolved namespace. Raw id is
659
+ // the safe choice: a caller can only write to their own claimed id, and
660
+ // the sandboxGate already filters non-sandbox traffic.
661
+ //
662
+ // **Trade-off.** Adopters whose resolver maps `account_id` to a distinct
663
+ // internal id (e.g., `acc_1` → `tenant_a:acc_1`) will see seeded fixtures
664
+ // disappear — the adapter writes to `acc_1`, the bridge reads
665
+ // `tenant_a:acc_1`, no match. That's a documented limitation, not a
666
+ // security issue: silent test loss, not cross-tenant pollution. The
667
+ // architectural fix (widen `ComplyControllerContext` to expose the
668
+ // framework-resolved account so writes match reads even under mapping
669
+ // resolvers) is tracked at #1216. Mapping-resolver adopters wire
670
+ // explicit seed adapters today.
517
671
  const explicitSeed = opts.complyTest.seed ?? {};
518
672
  const autoSeed = { ...explicitSeed };
519
673
  if (!explicitSeed.product) {
520
674
  autoSeed.product = async (params, ctx) => {
521
675
  const accountId = readAutoSeedAccountId(ctx.input);
522
- if (accountId == null)
676
+ if (accountId == null) {
677
+ fwLogger.warn('[adcp/auto-seed] seed_product fired without `account.account_id`; dropping write. ' +
678
+ 'Verify the request envelope carries an account ref and the sandboxGate is configured correctly.', { product_id: params.product_id });
523
679
  return;
680
+ }
524
681
  autoSeedStoreFor(autoSeedStore, accountId).set(params.product_id, {
525
682
  ...params.fixture,
526
683
  product_id: params.product_id,
@@ -530,8 +687,11 @@ function createAdcpServerFromPlatform(platform, opts) {
530
687
  if (!explicitSeed.pricing_option) {
531
688
  autoSeed.pricing_option = async (params, ctx) => {
532
689
  const accountId = readAutoSeedAccountId(ctx.input);
533
- if (accountId == null)
690
+ if (accountId == null) {
691
+ fwLogger.warn('[adcp/auto-seed] seed_pricing_option fired without `account.account_id`; dropping write. ' +
692
+ 'Verify the request envelope carries an account ref and the sandboxGate is configured correctly.', { product_id: params.product_id, pricing_option_id: params.pricing_option_id });
534
693
  return;
694
+ }
535
695
  const accountStore = autoSeedStoreFor(autoSeedStore, accountId);
536
696
  const existing = accountStore.get(params.product_id);
537
697
  const pricingOption = { ...params.fixture, pricing_option_id: params.pricing_option_id };
@@ -550,7 +710,131 @@ function createAdcpServerFromPlatform(platform, opts) {
550
710
  complyConfig = { ...opts.complyTest, seed: autoSeed };
551
711
  }
552
712
  const controller = (0, comply_controller_1.createComplyController)(complyConfig);
553
- controller.register(server);
713
+ // Manual registration with framework-side sandbox-authority gate. See
714
+ // top-of-block rationale and `docs/proposals/lifecycle-state-and-sandbox-authority.md`.
715
+ //
716
+ // Trust boundary: the gate consults the *resolved* account from
717
+ // `platform.accounts.resolve`, NOT a buyer-supplied claim like
718
+ // `account.sandbox === true` on the wire. The resolver is the only
719
+ // thing that names the account's mode; the gate refuses dispatch when
720
+ // mode is `live` (or the resolver fails to produce an account, modulo
721
+ // the env / context fallbacks below).
722
+ //
723
+ // Fallback paths (deprecated):
724
+ // - `context.sandbox === true` admits when no account resolved. Useful
725
+ // during the migration window for adopters whose wire shape carries
726
+ // sandbox routing in `context` but whose resolver isn't yet returning
727
+ // `mode: 'sandbox'`.
728
+ // - `process.env.ADCP_SANDBOX === '1'` admits unconditionally — the
729
+ // historical pattern. KEPT for back-compat so existing test platforms
730
+ // don't break on upgrade. Fails closed if the same process has ever
731
+ // resolved an explicit `mode: 'live'` account from the resolver: that
732
+ // pairing is a misconfiguration (env var should be unset on prod) and
733
+ // leaving it open re-exposes the live principal we just gated against.
734
+ //
735
+ // `list_scenarios` is exempt — it's the discovery probe used by buyer
736
+ // tooling to distinguish "controller wired but locked" from "controller
737
+ // missing entirely". Read-only and reveals nothing beyond which scenarios
738
+ // the adopter advertised in capabilities.
739
+ const mcp = (0, adcp_server_1.getSdkServer)(server);
740
+ if (mcp == null) {
741
+ // Non-MCP server — fall back to the controller's own registration so
742
+ // adopters wiring a custom transport keep the v5 behavior. The gate is
743
+ // an MCP-side concern; A2A and other transports are wired separately.
744
+ controller.register(server);
745
+ }
746
+ else {
747
+ // Permit a top-level `account` field on the wire so the gate can read
748
+ // the buyer's account ref. The canonical AdCP shape strips it (account
749
+ // routes through `context.account`), but adopters' storyboard fixtures
750
+ // commonly send it at the top level — `TOOL_INPUT_SHAPE`'s JSDoc in
751
+ // `src/lib/server/test-controller.ts` documents this extension as the
752
+ // supported escape hatch.
753
+ //
754
+ // Schema is the full canonical `AccountReference` per
755
+ // `schemas/cache/3.0.5/core/account-ref.json`: oneOf
756
+ // { account_id } — explicit accounts
757
+ // { brand, operator, sandbox? } — implicit accounts
758
+ // Modeled here as a single object with all four fields optional so
759
+ // either arm passes; resolvers narrow on the shape at dispatch.
760
+ // `brand` content is `unknown()` because the inner `brand-ref.json`
761
+ // shape is itself a oneOf and resolvers (not the gate) validate it.
762
+ // Top-level `.strict()` still blocks unknown keys at the framework
763
+ // boundary so a buyer can't stuff `__proto__` / arbitrary payloads
764
+ // into adopters' resolvers.
765
+ const gatedInputSchema = {
766
+ ...controller.toolDefinition.inputSchema,
767
+ account: zod_1.z
768
+ .object({
769
+ account_id: zod_1.z.string().min(1).optional(),
770
+ brand: zod_1.z.unknown().optional(),
771
+ operator: zod_1.z.string().optional(),
772
+ sandbox: zod_1.z.boolean().optional(),
773
+ })
774
+ .strict()
775
+ .optional(),
776
+ };
777
+ mcp.registerTool(controller.toolDefinition.name, {
778
+ description: controller.toolDefinition.description,
779
+ inputSchema: gatedInputSchema,
780
+ }, (async (input, extra) => {
781
+ // Probe exempt — capability discovery, no state mutation.
782
+ if (input.scenario === 'list_scenarios') {
783
+ return controller.handle(input);
784
+ }
785
+ // Read account ref from top-level (extended shape) or from
786
+ // `context.account` (canonical AdCP routing). First non-null wins.
787
+ const refFromTop = input.account;
788
+ const refFromContext = input.context?.account;
789
+ const accountRef = refFromTop ?? refFromContext;
790
+ let resolvedAccount = null;
791
+ try {
792
+ resolvedAccount = await platform.accounts.resolve(accountRef, {
793
+ ...(extra?.authInfo !== undefined && { authInfo: extra.authInfo }),
794
+ toolName: 'comply_test_controller',
795
+ });
796
+ }
797
+ catch {
798
+ // Resolver failures fall through to the wire-ref / env fallbacks.
799
+ // Treat as "no account resolved" — fail-closed by default unless a
800
+ // fallback admits.
801
+ }
802
+ // Record the resolved account's explicit mode (if any). Used by the
803
+ // env-fallback fail-closed guard below.
804
+ (0, observed_modes_1.recordResolvedAccountMode)(resolvedAccount);
805
+ const accountIsSandbox = resolvedAccount != null && (0, account_mode_1.isSandboxOrMockAccount)(resolvedAccount);
806
+ // Spec-defined fallback for the unresolved-account path: read
807
+ // `sandbox: true` off the wire `AccountReference` (per
808
+ // `core/account-ref.json`). Only consulted when the resolver
809
+ // returned `null` — if the resolver names the account, the
810
+ // resolver wins. The buyer's wire claim never overrides a
811
+ // resolved live account.
812
+ const refSandbox = accountRef?.sandbox === true;
813
+ const envSandbox = process.env.ADCP_SANDBOX === '1';
814
+ const wouldAdmitOnlyViaEnv = envSandbox && !accountIsSandbox && !(resolvedAccount == null && refSandbox);
815
+ // Fail-closed guard on the env fallback. If the env var is the only
816
+ // signal that would admit AND this process has ever resolved an
817
+ // explicit `mode: 'live'` account from the resolver, the env is
818
+ // misconfigured. Refuse loudly so operators notice, instead of
819
+ // silently downgrading the gate for live principals.
820
+ if (wouldAdmitOnlyViaEnv && (0, observed_modes_1.hasObservedLiveMode)()) {
821
+ throw new Error('comply_test_controller: ADCP_SANDBOX=1 is set but this process has resolved at least one ' +
822
+ 'live-mode account from platform.accounts.resolve. Remove ADCP_SANDBOX from your prod ' +
823
+ 'environment; gate the controller via mode: "sandbox" on resolved sandbox accounts instead. ' +
824
+ 'See docs/proposals/lifecycle-state-and-sandbox-authority.md.');
825
+ }
826
+ const allowed = accountIsSandbox || (resolvedAccount == null && refSandbox) || envSandbox;
827
+ if (!allowed) {
828
+ return (0, test_controller_1.toMcpResponse)({
829
+ success: false,
830
+ error: 'FORBIDDEN',
831
+ error_detail: 'comply_test_controller requires a sandbox or mock account; ' +
832
+ 'resolved account is in live mode (or no account resolved).',
833
+ });
834
+ }
835
+ return controller.handle(input);
836
+ }));
837
+ }
554
838
  }
555
839
  return Object.assign(server, {
556
840
  getTaskState: async (taskId, expectedAccountId) => {
@@ -592,7 +876,7 @@ function createAdcpServerFromPlatform(platform, opts) {
592
876
  * (`resolution: 'derived'`) get scoping for free via the auth-derived
593
877
  * resolver.
594
878
  */
595
- function buildTasksGetTool(platform, taskRegistry) {
879
+ function buildTasksGetTool(platform, taskRegistry, agentRegistry, logger) {
596
880
  const inputShape = {
597
881
  // Cap task_id length: framework-issued task ids are
598
882
  // `task_<UUIDv4>` = 41 chars. Cap at 128 so a malicious buyer can't
@@ -633,12 +917,64 @@ function buildTasksGetTool(platform, taskRegistry) {
633
917
  // `resolveAccount` dispatch flow in `create-adcp-server.ts:2380-2398`.
634
918
  handler: async (args, extra) => {
635
919
  const ref = args.account;
920
+ // Resolve the buyer agent (when an `agentRegistry` is configured) so
921
+ // adopters' `accounts.resolve` impl sees `ctx.agent` — same contract as
922
+ // every other AccountStore method. Bypasses the dispatcher's
923
+ // resolution-and-status-enforcement seam at
924
+ // `create-adcp-server.ts:2748-2832` deliberately:
925
+ //
926
+ // - **Status enforcement is intentionally skipped on tasks_get
927
+ // polls.** A buyer agent suspended AFTER kicking off an HITL task
928
+ // must still be able to learn the task's terminal state — refusing
929
+ // the poll would strand work with no visibility. Hard-cutoff
930
+ // sellers implement that policy inside their `accounts.resolve`
931
+ // or downstream by reading `ctx.agent.status` themselves.
932
+ // - **Registry failures don't break the poll.** A transient registry
933
+ // error during a read poll falls through to `agent: undefined`;
934
+ // adopters who require a resolved agent for tenant scoping can
935
+ // return null from their `accounts.resolve` and the existing
936
+ // ACCOUNT_NOT_FOUND surface fires.
937
+ let agent;
938
+ if (agentRegistry !== undefined) {
939
+ try {
940
+ const resolved = await agentRegistry.resolve({
941
+ ...(extra?.authInfo?.credential !== undefined && { credential: extra.authInfo.credential }),
942
+ ...(extra?.authInfo?.extra !== undefined && { extra: extra.authInfo.extra }),
943
+ });
944
+ if (resolved != null) {
945
+ // Mirror the dispatcher's freeze contract: lock the resolved
946
+ // record (and `billing_capabilities` Set if present) so adopter
947
+ // code cannot mutate shared registry state across requests.
948
+ // See `create-adcp-server.ts:2762-2779` for the full rationale.
949
+ if (!Object.isFrozen(resolved)) {
950
+ if (resolved.billing_capabilities instanceof Set) {
951
+ Object.freeze(resolved.billing_capabilities);
952
+ }
953
+ Object.freeze(resolved);
954
+ }
955
+ agent = resolved;
956
+ }
957
+ }
958
+ catch (err) {
959
+ // Swallow to keep the poll alive (see policy comment above), but
960
+ // log so upstream-IDP outages are visible to operators. Without
961
+ // this log, buyers seeing REFERENCE_NOT_FOUND for valid tasks
962
+ // (because adopters' resolvers return null without `ctx.agent`)
963
+ // would be invisible in adopter logs. Per security-reviewer
964
+ // defense-in-depth note on PR #1323.
965
+ logger.warn?.('Buyer-agent registry resolution failed during tasks_get poll', {
966
+ error: err instanceof Error ? err.message : String(err),
967
+ });
968
+ }
969
+ }
636
970
  const resolveCtx = {
637
971
  ...(extra?.authInfo !== undefined && { authInfo: extra.authInfo }),
638
972
  toolName: 'tasks_get',
973
+ ...(agent !== undefined && { agent }),
639
974
  };
640
975
  let resolvedAccountId;
641
976
  if (ref) {
977
+ refuseInlineAccountIdWhenForbidden(platform.accounts.resolution, ref);
642
978
  try {
643
979
  const resolved = await platform.accounts.resolve(ref, resolveCtx);
644
980
  if (resolved)
@@ -974,9 +1310,16 @@ async function runWithTokenRefresh(fn, refresh) {
974
1310
  recovery: 'correctable',
975
1311
  });
976
1312
  }
977
- refresh.account.authInfo.token = refreshed.token;
978
- if (refreshed.expiresAt !== undefined) {
979
- refresh.account.authInfo.expiresAt = refreshed.expiresAt;
1313
+ // `authInfo` became optional in #1286. Token refresh only fires after an
1314
+ // AUTH_REQUIRED throw meaning an upstream call attempted to use a
1315
+ // token, which means `authInfo` was populated before the throw.
1316
+ // Defensive guard: if for some reason it isn't, the refreshed token
1317
+ // still flows on the next request rather than crashing here.
1318
+ if (refresh.account.authInfo) {
1319
+ refresh.account.authInfo.token = refreshed.token;
1320
+ if (refreshed.expiresAt !== undefined) {
1321
+ refresh.account.authInfo.expiresAt = refreshed.expiresAt;
1322
+ }
980
1323
  }
981
1324
  return fn();
982
1325
  }
@@ -1053,11 +1396,11 @@ async function routeIfHandoff(taskRegistry, opts, result, project) {
1053
1396
  // but didn't go through ctx.handoffToTask. Treat as a sync
1054
1397
  // success arm with an empty body (caller-supplied projection
1055
1398
  // shapes the result; this branch is defensive).
1056
- return project(result);
1399
+ return await project(result);
1057
1400
  }
1058
1401
  return dispatchHitl(taskRegistry, opts, async (taskId) => {
1059
1402
  const inner = await taskFn((0, to_context_1.buildHandoffContext)(taskRegistry, taskId));
1060
- return project(inner);
1403
+ return await project(inner);
1061
1404
  });
1062
1405
  }
1063
1406
  // Catch the most common LLM-scaffolded mistake: hand-rolling a
@@ -1079,7 +1422,7 @@ async function routeIfHandoff(taskRegistry, opts, result, project) {
1079
1422
  `task registry and the buyer ends up polling a task_id the framework ` +
1080
1423
  `never registered.`);
1081
1424
  }
1082
- const projected = project(result);
1425
+ const projected = await project(result);
1083
1426
  if (opts.autoEmitCompletion === true && opts.pushNotificationUrl) {
1084
1427
  // Auto-emit completion webhook on sync-success arm — fire-and-forget.
1085
1428
  // Awaiting inline would let an attacker-controlled
@@ -1383,6 +1726,31 @@ function bucketWebhookError(msg) {
1383
1726
  function makeCtxFor(ctxMetadataStore) {
1384
1727
  return handlerCtx => (0, to_context_1.buildRequestContext)(handlerCtx, ctxMetadataStore);
1385
1728
  }
1729
+ /**
1730
+ * Project a framework `HandlerContext` / `RequestContext` to the public
1731
+ * `ResolveContext` shape passed to every `AccountStore` method
1732
+ * (`resolve`, `upsert`, `list`, `reportUsage`, `getAccountFinancials`).
1733
+ *
1734
+ * Single source of truth for the threading shape: when `ResolveContext`
1735
+ * gains a new field, update this function and every account-method call
1736
+ * site picks it up. The alternative (inline literals at each call site)
1737
+ * is what produced the original asymmetric `agent` gap on `reportUsage`
1738
+ * and `getAccountFinancials` — fixed by routing all six framework call
1739
+ * sites through here.
1740
+ *
1741
+ * `toolName` is supplied per call site (handlers hardcode their tool
1742
+ * name; the dispatcher's `resolveAccount` / `resolveAccountFromAuth`
1743
+ * paths read it off `RequestContext.toolName`). Spread guards keep
1744
+ * `authInfo` / `agent` keys absent rather than `undefined` — adopters
1745
+ * can use `'authInfo' in ctx` as a presence check.
1746
+ */
1747
+ function toResolveCtx(ctx, toolName) {
1748
+ return {
1749
+ ...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
1750
+ toolName,
1751
+ ...(ctx.agent != null && { agent: ctx.agent }),
1752
+ };
1753
+ }
1386
1754
  /**
1387
1755
  * Auto-store helper. After a publisher returns resources from a discovery
1388
1756
  * tool (`getProducts`, `getMediaBuys`, etc.), persist each resource's wire
@@ -1434,6 +1802,69 @@ async function autoStoreResources(store, accountId, kind, resources, idField, lo
1434
1802
  `to reference these resources on a subsequent mutating call.`);
1435
1803
  }
1436
1804
  }
1805
+ /**
1806
+ * Persist `packages[].targeting_overlay` from a successful
1807
+ * `create_media_buy`. Called from the createMediaBuy projection so the
1808
+ * persistence applies to both the sync arm and the HITL completion arm
1809
+ * (the projection runs after the handoff fn resolves).
1810
+ *
1811
+ * Failures are logged + swallowed: a successful seller response must
1812
+ * never be turned into an error by the auto-echo plumbing.
1813
+ */
1814
+ async function persistTargetingOverlayFromCreate(store, accountId, request, result, logger) {
1815
+ if (!store || !accountId)
1816
+ return;
1817
+ if (result == null || typeof result !== 'object')
1818
+ return;
1819
+ try {
1820
+ await store.persistFromCreate(accountId, request, result);
1821
+ }
1822
+ catch (err) {
1823
+ const msg = err instanceof Error ? err.message : String(err);
1824
+ logger.warn(`[adcp/decisioning] mediaBuyStore.persistFromCreate failed: ${msg}`);
1825
+ }
1826
+ }
1827
+ /**
1828
+ * Apply an `update_media_buy` patch to the persisted media-buy store.
1829
+ * Per-field merge inside `targeting_overlay`: omitted keeps prior,
1830
+ * present-non-null replaces, present-null clears.
1831
+ *
1832
+ * Failures are logged + swallowed for the same reason as the create
1833
+ * path — the seller's update succeeded; auto-merge is best-effort.
1834
+ */
1835
+ async function persistTargetingOverlayFromUpdate(store, accountId, mediaBuyId, patch, logger) {
1836
+ if (!store || !accountId)
1837
+ return;
1838
+ try {
1839
+ await store.mergeFromUpdate(accountId, mediaBuyId, patch);
1840
+ }
1841
+ catch (err) {
1842
+ const msg = err instanceof Error ? err.message : String(err);
1843
+ logger.warn(`[adcp/decisioning] mediaBuyStore.mergeFromUpdate failed: ${msg}`);
1844
+ }
1845
+ }
1846
+ /**
1847
+ * Backfill missing `packages[].targeting_overlay` on a `get_media_buys`
1848
+ * response from the persisted store. Mutates the response. Packages the
1849
+ * seller already echoed are left alone.
1850
+ *
1851
+ * Failures are logged + swallowed: a partial-echo response is strictly
1852
+ * better than a hard error wiping out the seller's correctly-returned
1853
+ * media-buy data.
1854
+ */
1855
+ async function backfillTargetingOverlay(store, accountId, result, logger) {
1856
+ if (!store || !accountId)
1857
+ return;
1858
+ if (result == null || typeof result !== 'object')
1859
+ return;
1860
+ try {
1861
+ await store.backfill(accountId, result);
1862
+ }
1863
+ catch (err) {
1864
+ const msg = err instanceof Error ? err.message : String(err);
1865
+ logger.warn(`[adcp/decisioning] mediaBuyStore.backfill failed: ${msg}`);
1866
+ }
1867
+ }
1437
1868
  /**
1438
1869
  * Auto-hydrate helper. Before invoking a publisher's mutating handler,
1439
1870
  * walk the request's resource references and attach the full wire
@@ -1594,6 +2025,135 @@ async function hydrateSingleResource(store, accountId, kind, id, attachField, ta
1594
2025
  configurable: true,
1595
2026
  });
1596
2027
  }
2028
+ /**
2029
+ * Spec `x-entity` annotation → SDK `ResourceKind`. The SDK only hydrates
2030
+ * resource kinds it has a backing store for; unmapped entities (e.g.
2031
+ * `vendor_pricing_option`, `governance_plan`) are gracefully skipped.
2032
+ *
2033
+ * The annotation acts as a renaming-firewall: if the spec renames
2034
+ * `media_buy_id` → `mediabuy_id`, the `x-entity: "media_buy"` tag travels
2035
+ * with the field and the codegen step in `scripts/generate-entity-hydration.ts`
2036
+ * picks up the new field name automatically — no SDK code change required.
2037
+ *
2038
+ * Adding a new `ResourceKind` for hydration is a coordinated change: add
2039
+ * it to `ResourceKind` (in `ctx-metadata/store.ts`) and to this map.
2040
+ */
2041
+ /** @internal Exported for the coverage test in `test/lib/x-entity-hydration.test.js`. */
2042
+ exports.ENTITY_TO_RESOURCE_KIND = {
2043
+ media_buy: 'media_buy',
2044
+ package: 'package',
2045
+ creative: 'creative',
2046
+ audience: 'audience',
2047
+ // Spec quirk: `signal_activation_id` is a SEPARATE entity from `signal`
2048
+ // (per AdCP `core/x-entity-types.json` — the activation handle is
2049
+ // scoped to the issuing signals agent, not interchangeable with the
2050
+ // catalog's `signal_id`). The SDK collapses them onto the existing
2051
+ // `signal` ResourceKind for backward-compat: adopters already seed
2052
+ // the cache keyed by `signal_agent_segment_id` under `kind: 'signal'`.
2053
+ // Splitting `signal_activation` to its own ResourceKind would orphan
2054
+ // those entries. Tracked upstream — file an `adcp` issue if/when this
2055
+ // collapse causes confusion.
2056
+ signal_activation_id: 'signal',
2057
+ rights_grant: 'rights_grant',
2058
+ property_list: 'property_list',
2059
+ collection_list: 'collection_list',
2060
+ account: 'account',
2061
+ product: 'product',
2062
+ // SI session lifecycle, hydrated on `si_send_message` /
2063
+ // `si_terminate_session` from the entry the framework auto-stores after
2064
+ // `si_initiate_session`. See `buildSponsoredIntelligenceHandlers`.
2065
+ si_session: 'si_session',
2066
+ };
2067
+ /**
2068
+ * `x-entity` values the SDK does NOT hydrate today — graceful skip rather
2069
+ * than failure. Entries here are documented intentional skips so a future
2070
+ * code reader can distinguish "we forgot to map this" from "the SDK
2071
+ * doesn't model this kind."
2072
+ *
2073
+ * The codegen-derived `TOOL_ENTITY_FIELDS` map carries every `x-entity`
2074
+ * the spec emits on dispatchable tools (webhook-only payloads like
2075
+ * `creative_approval` are filtered out at codegen time); this allowlist
2076
+ * + `ENTITY_TO_RESOURCE_KIND` together must cover the full set,
2077
+ * enforced by a test (`test/lib/x-entity-hydration.test.js`) that
2078
+ * imports both.
2079
+ *
2080
+ * @internal Exported for the coverage test; not part of the public API.
2081
+ */
2082
+ exports.INTENTIONALLY_UNHYDRATED_ENTITIES = new Set([
2083
+ 'vendor_pricing_option', // Scoped to issuing vendor agent; adopters seed pricing context themselves.
2084
+ 'governance_plan', // No SDK ResourceKind yet; campaign-governance follow-up.
2085
+ 'governance_check', // Transient request envelope; not stored.
2086
+ 'event_source', // No SDK ResourceKind yet.
2087
+ 'offering', // SI offering catalog; correlation handled by brand-side `offering_token`, not framework hydration.
2088
+ 'rights_holder_brand', // Read-through `get_brand_identity`; not separately stored.
2089
+ 'advertiser_brand', // Same as above.
2090
+ ]);
2091
+ /**
2092
+ * Per-tool, per-field destination property name for hydrated resources.
2093
+ *
2094
+ * The hydrator's default is to derive the destination from the field name
2095
+ * by stripping the `_id` suffix (e.g. `media_buy_id` → attach as
2096
+ * `params.media_buy`). Three cases need explicit overrides because their
2097
+ * historical attach-fields don't match that convention — adopters already
2098
+ * read these in handler code and a rename would be wire-visible behavior:
2099
+ *
2100
+ * - `acquire_rights.rights_id` → `params.rights` (NOT `rights_grant`).
2101
+ * Predates the entity-driven hydrator. Kept for backward-compat.
2102
+ * - `activate_signal.signal_agent_segment_id` → `params.signal`
2103
+ * (NOT `signal_agent_segment` — `_id` suffix isn't on the boundary
2104
+ * the convention strips).
2105
+ * - `update_rights.rights_id` → `params.rights_grant` (NOT `rights`).
2106
+ * Diverges from `acquire_rights`'s historical `params.rights` because
2107
+ * the wire payloads model different things — acquire takes an
2108
+ * offering selection, update modifies an existing grant.
2109
+ *
2110
+ * Other tools either follow the convention (`update_media_buy`,
2111
+ * `provide_performance_feedback`) or don't currently have hydration
2112
+ * registered (the unmapped `x-entity` skips above).
2113
+ */
2114
+ const HYDRATION_ATTACH_FIELD_OVERRIDES = {
2115
+ acquire_rights: { rights_id: 'rights' },
2116
+ activate_signal: { signal_agent_segment_id: 'signal' },
2117
+ update_rights: { rights_id: 'rights_grant' },
2118
+ };
2119
+ function deriveAttachField(toolName, field) {
2120
+ const override = HYDRATION_ATTACH_FIELD_OVERRIDES[toolName]?.[field];
2121
+ if (override)
2122
+ return override;
2123
+ // Default: strip the `_id` suffix so `media_buy_id` → `media_buy`,
2124
+ // `creative_id` → `creative`, etc. This is the convention every existing
2125
+ // hydration call site followed before the schema-driven refactor.
2126
+ return field.endsWith('_id') ? field.slice(0, -3) : field;
2127
+ }
2128
+ /**
2129
+ * Schema-driven auto-hydration for a tool's request payload.
2130
+ *
2131
+ * Walks the codegen-derived `TOOL_ENTITY_FIELDS` table for the named tool,
2132
+ * looks up each spec-tagged identifier on `params`, maps the `x-entity`
2133
+ * annotation to a `ResourceKind`, and attaches the resolved record at the
2134
+ * conventional destination field. Replaces the four hand-rolled
2135
+ * `hydrateSingleResource` call sites that hardcoded `(field_name, kind)`
2136
+ * pairs and were vulnerable to a silent break under a future spec rename
2137
+ * (protocol-expert review of #1086 → tracked as #1109).
2138
+ */
2139
+ async function hydrateForTool(store, accountId, toolName, params, logger) {
2140
+ if (!store || !accountId || params == null || typeof params !== 'object')
2141
+ return;
2142
+ const fields = entity_hydration_generated_1.TOOL_ENTITY_FIELDS[toolName];
2143
+ if (!fields || fields.length === 0)
2144
+ return;
2145
+ const paramsRecord = params;
2146
+ for (const { field, xEntity } of fields) {
2147
+ const id = paramsRecord[field];
2148
+ if (typeof id !== 'string' || id.length === 0)
2149
+ continue;
2150
+ const kind = exports.ENTITY_TO_RESOURCE_KIND[xEntity];
2151
+ if (!kind)
2152
+ continue; // Unknown entity — graceful skip; don't break unknown verbs.
2153
+ const attachField = deriveAttachField(toolName, field);
2154
+ await hydrateSingleResource(store, accountId, kind, id, attachField, params, logger);
2155
+ }
2156
+ }
1597
2157
  /**
1598
2158
  * Extract the buyer's push-notification webhook config from a request body
1599
2159
  * and validate the URL + token against SSRF / replay primitives.
@@ -1806,92 +2366,121 @@ function validatePushNotificationToken(token) {
1806
2366
  }
1807
2367
  return { ok: true };
1808
2368
  }
1809
- function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observability, logger, pushOpts, ctxFor, ctxMetadataStore) {
2369
+ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observability, logger, pushOpts, ctxFor, ctxMetadataStore, mediaBuyStore) {
1810
2370
  const sales = platform.sales;
1811
2371
  if (!sales)
1812
2372
  return undefined;
2373
+ // Core lifecycle methods are optional on the SalesPlatform interface
2374
+ // (#1341) — the per-specialism mapping in `RequiredPlatformsFor<S>`
2375
+ // enforces "you claimed `sales-non-guaranteed`, therefore you must
2376
+ // implement getProducts" at the type level, while specialisms whose
2377
+ // upstream owns bidding (`sales-social`) skip them entirely. The
2378
+ // dispatcher mirrors that with conditional spreads — we don't register
2379
+ // a wire handler when the platform method is absent, so the merge seam
2380
+ // (`opts.mediaBuy.X`) can supply it OR the framework returns
2381
+ // `METHOD_NOT_FOUND` from `tools/list` for the unsupported tool.
1813
2382
  return {
1814
- getProducts: async (params, ctx) => {
1815
- const reqCtx = ctxFor(ctx);
1816
- return projectSync(async () => {
1817
- const result = await sales.getProducts(params, reqCtx);
1818
- // Auto-store products: persist each Product's wire shape +
1819
- // ctx_metadata so subsequent createMediaBuy / updateMediaBuy
1820
- // calls referencing product_id can hydrate the full Product
1821
- // automatically (publisher sees `req.packages[i].product`).
1822
- await autoStoreResources(ctxMetadataStore, reqCtx.account?.id, 'product', result?.products, 'product_id', logger);
1823
- return result;
1824
- }, r => r);
1825
- },
1826
- createMediaBuy: async (params, ctx) => {
1827
- const reqCtx = ctxFor(ctx);
1828
- // Auto-hydrate: walk `params.packages`, attach the full Product object
1829
- // (including `ctx_metadata`) at `pkg.product`. Publisher reads
1830
- // `pkg.product.format_ids`, `pkg.product.ctx_metadata?.gam?.ad_unit_ids`
1831
- // directly no separate lookup, no boilerplate.
1832
- await hydratePackagesWithProducts(ctxMetadataStore, reqCtx.account?.id, params?.packages, logger);
1833
- return projectSync(async () => {
1834
- const push = extractPushConfig(params, logger, { allowPrivateWebhookUrls: pushOpts.allowPrivateWebhookUrls });
1835
- const result = await sales.createMediaBuy(params, reqCtx);
1836
- return routeIfHandoff(taskRegistry, {
1837
- tool: 'create_media_buy',
1838
- accountId: reqCtx.account.id,
1839
- pushNotificationUrl: push.url,
1840
- pushNotificationToken: push.token,
1841
- emitWebhook: taskWebhookEmit ?? ctx.emitWebhook,
1842
- autoEmitCompletion: pushOpts.autoEmitCompletionWebhooks,
1843
- observability,
1844
- logger,
1845
- }, result, r => r // identity projection for createMediaBuy
1846
- );
1847
- }, r => r);
1848
- },
1849
- updateMediaBuy: async (params, ctx) => {
1850
- const reqCtx = ctxFor(ctx);
1851
- // `media_buy_id` is required on the wire schema, but `validation: 'off'`
1852
- // mode skips the schema parse — guard at the seam so platform code can
1853
- // trust the value rather than re-checking. Also catches buyers calling
1854
- // with the param missing under an off-spec server config.
1855
- const { media_buy_id } = params;
1856
- if (!media_buy_id) {
1857
- return (0, errors_1.adcpError)('INVALID_REQUEST', {
1858
- message: 'update_media_buy requires media_buy_id',
1859
- field: 'media_buy_id',
1860
- });
1861
- }
1862
- // Auto-hydrate: attach the full MediaBuy (wire shape + ctx_metadata)
1863
- // at `req.media_buy`. Publisher reads `req.media_buy.ctx_metadata?.gam`
1864
- // directly — no separate lookup. Misses are silent; publisher falls
1865
- // back to its own DB.
1866
- await hydrateSingleResource(ctxMetadataStore, reqCtx.account?.id, 'media_buy', media_buy_id, 'media_buy', params, logger);
1867
- return projectSync(async () => {
1868
- const push = extractPushConfig(params, logger, {
1869
- allowPrivateWebhookUrls: pushOpts.allowPrivateWebhookUrls,
1870
- });
1871
- const result = await sales.updateMediaBuy(media_buy_id, params, reqCtx);
1872
- // F12 sync auto-emit. updateMediaBuy is sync-only on the
1873
- // platform interface (no TaskHandoff arm — spec response
1874
- // doesn't include Submitted), so we don't route through
1875
- // routeIfHandoff. Fire-and-forget to keep slowloris webhook
1876
- // receivers from blocking the sync response.
1877
- if (pushOpts.autoEmitCompletionWebhooks && push.url) {
1878
- const emitOpts = {
1879
- tool: 'update_media_buy',
2383
+ ...(sales.getProducts && {
2384
+ getProducts: async (params, ctx) => {
2385
+ const reqCtx = ctxFor(ctx);
2386
+ return projectSync(async () => {
2387
+ const result = await sales.getProducts(params, reqCtx);
2388
+ // Auto-store products: persist each Product's wire shape +
2389
+ // ctx_metadata so subsequent createMediaBuy / updateMediaBuy
2390
+ // calls referencing product_id can hydrate the full Product
2391
+ // automatically (publisher sees `req.packages[i].product`).
2392
+ await autoStoreResources(ctxMetadataStore, reqCtx.account?.id, 'product', result?.products, 'product_id', logger);
2393
+ return result;
2394
+ }, r => r);
2395
+ },
2396
+ }),
2397
+ ...(sales.createMediaBuy && {
2398
+ createMediaBuy: async (params, ctx) => {
2399
+ const reqCtx = ctxFor(ctx);
2400
+ // Auto-hydrate: walk `params.packages`, attach the full Product object
2401
+ // (including `ctx_metadata`) at `pkg.product`. Publisher reads
2402
+ // `pkg.product.format_ids`, `pkg.product.ctx_metadata?.gam?.ad_unit_ids`
2403
+ // directly no separate lookup, no boilerplate.
2404
+ await hydratePackagesWithProducts(ctxMetadataStore, reqCtx.account?.id, params?.packages, logger);
2405
+ return projectSync(async () => {
2406
+ const push = extractPushConfig(params, logger, {
2407
+ allowPrivateWebhookUrls: pushOpts.allowPrivateWebhookUrls,
2408
+ });
2409
+ const result = await sales.createMediaBuy(params, reqCtx);
2410
+ return routeIfHandoff(taskRegistry, {
2411
+ tool: 'create_media_buy',
1880
2412
  accountId: reqCtx.account.id,
1881
2413
  pushNotificationUrl: push.url,
1882
- ...(push.token !== undefined && { pushNotificationToken: push.token }),
2414
+ pushNotificationToken: push.token,
1883
2415
  emitWebhook: taskWebhookEmit ?? ctx.emitWebhook,
1884
- ...(observability && { observability }),
2416
+ autoEmitCompletion: pushOpts.autoEmitCompletionWebhooks,
2417
+ observability,
1885
2418
  logger,
1886
- };
1887
- void emitSyncCompletionWebhook(emitOpts, result).catch((err) => {
1888
- const msg = err instanceof Error ? err.message : String(err);
1889
- logger.warn(`[adcp/decisioning] sync completion webhook background-error: ${msg}`);
2419
+ }, result, async (r) => {
2420
+ await persistTargetingOverlayFromCreate(mediaBuyStore, reqCtx.account?.id, params, r, logger);
2421
+ return r;
2422
+ });
2423
+ }, r => r);
2424
+ },
2425
+ }),
2426
+ ...(sales.updateMediaBuy && {
2427
+ updateMediaBuy: async (params, ctx) => {
2428
+ const reqCtx = ctxFor(ctx);
2429
+ // `media_buy_id` is required on the wire schema, but `validation: 'off'`
2430
+ // mode skips the schema parse — guard at the seam so platform code can
2431
+ // trust the value rather than re-checking. Also catches buyers calling
2432
+ // with the param missing under an off-spec server config.
2433
+ const { media_buy_id } = params;
2434
+ if (!media_buy_id) {
2435
+ return (0, errors_1.adcpError)('INVALID_REQUEST', {
2436
+ message: 'update_media_buy requires media_buy_id',
2437
+ field: 'media_buy_id',
1890
2438
  });
1891
2439
  }
1892
- return result;
1893
- }, r => r);
1894
- },
2440
+ // Auto-hydrate: attach the full MediaBuy (wire shape + ctx_metadata)
2441
+ // at `req.media_buy`. Publisher reads `req.media_buy.ctx_metadata?.gam`
2442
+ // directly — no separate lookup. Misses are silent; publisher falls
2443
+ // back to its own DB. Schema-driven via `x-entity` (#1109).
2444
+ await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'update_media_buy', params, logger);
2445
+ return projectSync(async () => {
2446
+ const push = extractPushConfig(params, logger, {
2447
+ allowPrivateWebhookUrls: pushOpts.allowPrivateWebhookUrls,
2448
+ });
2449
+ const result = await sales.updateMediaBuy(media_buy_id, params, reqCtx);
2450
+ // Persist optimistically: the platform method returned without
2451
+ // throwing, so the patch was accepted at the seam. If the
2452
+ // publisher returned an error envelope on the success path
2453
+ // (rare but possible — `update_media_buy` can return a Failed
2454
+ // status arm in the wire schema), the persisted overlay
2455
+ // diverges from the seller's view of the buy. Adopters who
2456
+ // need stricter coupling should not return error-shaped
2457
+ // success arms; the spec's preferred shape is to throw an
2458
+ // `AdcpError` for genuine failures.
2459
+ await persistTargetingOverlayFromUpdate(mediaBuyStore, reqCtx.account?.id, media_buy_id, params, logger);
2460
+ // F12 sync auto-emit. updateMediaBuy is sync-only on the
2461
+ // platform interface (no TaskHandoff arm — spec response
2462
+ // doesn't include Submitted), so we don't route through
2463
+ // routeIfHandoff. Fire-and-forget to keep slowloris webhook
2464
+ // receivers from blocking the sync response.
2465
+ if (pushOpts.autoEmitCompletionWebhooks && push.url) {
2466
+ const emitOpts = {
2467
+ tool: 'update_media_buy',
2468
+ accountId: reqCtx.account.id,
2469
+ pushNotificationUrl: push.url,
2470
+ ...(push.token !== undefined && { pushNotificationToken: push.token }),
2471
+ emitWebhook: taskWebhookEmit ?? ctx.emitWebhook,
2472
+ ...(observability && { observability }),
2473
+ logger,
2474
+ };
2475
+ void emitSyncCompletionWebhook(emitOpts, result).catch((err) => {
2476
+ const msg = err instanceof Error ? err.message : String(err);
2477
+ logger.warn(`[adcp/decisioning] sync completion webhook background-error: ${msg}`);
2478
+ });
2479
+ }
2480
+ return result;
2481
+ }, r => r);
2482
+ },
2483
+ }),
1895
2484
  syncCreatives: async (params, ctx) => {
1896
2485
  const reqCtx = ctxFor(ctx);
1897
2486
  const creatives = params.creatives ?? [];
@@ -1915,10 +2504,16 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
1915
2504
  }, result, rows => ({ creatives: rows.map(normalizeRowErrors) }));
1916
2505
  }, r => r);
1917
2506
  },
1918
- getMediaBuyDelivery: async (params, ctx) => {
1919
- const reqCtx = ctxFor(ctx);
1920
- return projectSync(() => sales.getMediaBuyDelivery(params, reqCtx), actuals => actuals);
1921
- },
2507
+ ...(sales.getMediaBuyDelivery && {
2508
+ getMediaBuyDelivery: async (params, ctx) => {
2509
+ const reqCtx = ctxFor(ctx);
2510
+ return projectSync(async () => {
2511
+ const result = await sales.getMediaBuyDelivery(params, reqCtx);
2512
+ warnIfTruncatedMultiIdResponse('getMediaBuyDelivery', 'media_buy_ids', params.media_buy_ids, result?.media_buy_deliveries, logger);
2513
+ return result;
2514
+ }, actuals => actuals);
2515
+ },
2516
+ }),
1922
2517
  // Optional methods — return UNSUPPORTED_FEATURE when the platform omits
1923
2518
  // them. Adopters that haven't migrated to the v6 platform interface for
1924
2519
  // these specific tools can still pass raw handlers via opts.mediaBuy
@@ -1937,7 +2532,9 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
1937
2532
  const reqCtx = ctxFor(ctx);
1938
2533
  return projectSync(async () => {
1939
2534
  const result = await sales.getMediaBuys(params, reqCtx);
2535
+ warnIfTruncatedMultiIdResponse('getMediaBuys', 'media_buy_ids', params.media_buy_ids, result?.media_buys, logger);
1940
2536
  await autoStoreResources(ctxMetadataStore, reqCtx.account?.id, 'media_buy', result?.media_buys, 'media_buy_id', logger);
2537
+ await backfillTargetingOverlay(mediaBuyStore, reqCtx.account?.id, result, logger);
1941
2538
  return result;
1942
2539
  }, r => r);
1943
2540
  },
@@ -1947,15 +2544,13 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
1947
2544
  const reqCtx = ctxFor(ctx);
1948
2545
  // Auto-hydrate `req.media_buy` from the prior createMediaBuy /
1949
2546
  // getMediaBuys store entry, plus `req.creative` when the buyer
1950
- // scoped feedback to a specific creative. Both fields are optional
1951
- // hydration targets adopters who only care about the feedback
1952
- // payload itself can ignore them.
1953
- const accountId = reqCtx.account?.id;
1954
- await hydrateSingleResource(ctxMetadataStore, accountId, 'media_buy', params.media_buy_id, 'media_buy', params, logger);
1955
- const creativeId = params.creative_id;
1956
- if (creativeId) {
1957
- await hydrateSingleResource(ctxMetadataStore, accountId, 'creative', creativeId, 'creative', params, logger);
1958
- }
2547
+ // scoped feedback to a specific creative, plus `req.package`
2548
+ // when scoped to a package. All three are optional hydration
2549
+ // targets adopters who only care about the feedback payload
2550
+ // itself can ignore them. Schema-driven via `x-entity` (#1109);
2551
+ // package hydration is additive vs the prior hardcoded version
2552
+ // (silent no-op when packages aren't seeded).
2553
+ await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'provide_performance_feedback', params, logger);
1959
2554
  return projectSync(() => sales.providePerformanceFeedback(params, reqCtx), r => r);
1960
2555
  },
1961
2556
  }),
@@ -1968,7 +2563,11 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
1968
2563
  ...(sales.listCreatives && {
1969
2564
  listCreatives: async (params, ctx) => {
1970
2565
  const reqCtx = ctxFor(ctx);
1971
- return projectSync(() => sales.listCreatives(params, reqCtx), r => r);
2566
+ return projectSync(async () => {
2567
+ const result = await sales.listCreatives(params, reqCtx);
2568
+ warnIfTruncatedMultiIdResponse('listCreatives', 'creative_ids', params.creative_ids, result?.creatives, logger);
2569
+ return result;
2570
+ }, r => r);
1972
2571
  },
1973
2572
  }),
1974
2573
  };
@@ -2013,14 +2612,31 @@ function buildCreativeHandlers(platform, taskRegistry, taskWebhookEmit, observab
2013
2612
  return projectSync(() => creative.buildCreative(params, reqCtx), ret => projectBuildCreativeReturn(ret));
2014
2613
  },
2015
2614
  previewCreative: async (params, ctx) => {
2016
- if (!('previewCreative' in creative)) {
2615
+ if (!('previewCreative' in creative) || creative.previewCreative == null) {
2017
2616
  return (0, errors_1.adcpError)('UNSUPPORTED_FEATURE', {
2018
- message: 'preview_creative not supported by this platform',
2617
+ message: 'preview_creative: this creative platform did not implement previewCreative. ' +
2618
+ 'Add `previewCreative(req, ctx)` to your CreativeBuilderPlatform / CreativeAdServerPlatform literal.',
2019
2619
  });
2020
2620
  }
2021
2621
  const reqCtx = ctxFor(ctx);
2022
2622
  return projectSync(() => creative.previewCreative(params, reqCtx), preview => preview);
2023
2623
  },
2624
+ // No-account tool — `list_creative_formats` request schema doesn't carry
2625
+ // `account`. The framework's `resolveAccountFromAuth` runs and accepts a
2626
+ // null return; the platform method receives `ctx.account` possibly
2627
+ // undefined per `NoAccountCtx`. Wired identically on both
2628
+ // `CreativeBuilderPlatform` and `CreativeAdServerPlatform`.
2629
+ listCreativeFormats: async (params, ctx) => {
2630
+ if (!('listCreativeFormats' in creative) || creative.listCreativeFormats == null) {
2631
+ return (0, errors_1.adcpError)('UNSUPPORTED_FEATURE', {
2632
+ message: 'list_creative_formats: this creative platform did not implement listCreativeFormats. ' +
2633
+ 'Add `listCreativeFormats(req, ctx)` to your CreativeBuilderPlatform / CreativeAdServerPlatform literal, ' +
2634
+ 'or delegate via `capabilities.creative_agents`.',
2635
+ });
2636
+ }
2637
+ const reqCtx = ctxFor(ctx);
2638
+ return projectSync(() => creative.listCreativeFormats(params, reqCtx), r => r);
2639
+ },
2024
2640
  syncCreatives: async (params, ctx) => {
2025
2641
  const reqCtx = ctxFor(ctx);
2026
2642
  const creatives = params.creatives ?? [];
@@ -2054,7 +2670,11 @@ function buildCreativeHandlers(platform, taskRegistry, taskWebhookEmit, observab
2054
2670
  });
2055
2671
  }
2056
2672
  const reqCtx = ctxFor(ctx);
2057
- return projectSync(() => creative.listCreatives(params, reqCtx), r => r);
2673
+ return projectSync(async () => {
2674
+ const result = await creative.listCreatives(params, reqCtx);
2675
+ warnIfTruncatedMultiIdResponse('listCreatives', 'creative_ids', params.creative_ids, result?.creatives, logger);
2676
+ return result;
2677
+ }, r => r);
2058
2678
  },
2059
2679
  getCreativeDelivery: async (params, ctx) => {
2060
2680
  if (!('getCreativeDelivery' in creative)) {
@@ -2063,7 +2683,11 @@ function buildCreativeHandlers(platform, taskRegistry, taskWebhookEmit, observab
2063
2683
  });
2064
2684
  }
2065
2685
  const reqCtx = ctxFor(ctx);
2066
- return projectSync(() => creative.getCreativeDelivery(params, reqCtx), r => r);
2686
+ return projectSync(async () => {
2687
+ const result = await creative.getCreativeDelivery(params, reqCtx);
2688
+ warnIfTruncatedMultiIdResponse('getCreativeDelivery', 'creative_ids', params.creative_ids, result?.creative_deliveries, logger);
2689
+ return result;
2690
+ }, r => r);
2067
2691
  },
2068
2692
  };
2069
2693
  }
@@ -2114,6 +2738,10 @@ function buildSignalsHandlers(platform, ctxFor, ctxMetadataStore, logger) {
2114
2738
  const reqCtx = ctxFor(ctx);
2115
2739
  return projectSync(async () => {
2116
2740
  const result = await signals.getSignals(params, reqCtx);
2741
+ // signal_ids is `SignalID[]` (`{source, data_provider_domain, id}`
2742
+ // objects), not bare strings — but the helper's truncation-detection
2743
+ // is purely length-based, so the object element type is irrelevant.
2744
+ warnIfTruncatedMultiIdResponse('getSignals', 'signal_ids', params.signal_ids, result?.signals, logger);
2117
2745
  // Auto-store signals so subsequent activate_signal can hydrate
2118
2746
  // `req.signal` from the publisher's prior catalog entry.
2119
2747
  await autoStoreResources(ctxMetadataStore, reqCtx.account?.id, 'signal', result?.signals, 'signal_agent_segment_id', logger);
@@ -2125,11 +2753,133 @@ function buildSignalsHandlers(platform, ctxFor, ctxMetadataStore, logger) {
2125
2753
  // Auto-hydrate `req.signal` from the prior getSignals store entry —
2126
2754
  // publisher reads pricing options, agent segment id, ctx_metadata
2127
2755
  // directly without the buyer round-tripping the full signal object.
2128
- await hydrateSingleResource(ctxMetadataStore, reqCtx.account?.id, 'signal', params.signal_agent_segment_id, 'signal', params, logger);
2756
+ // Schema-driven via `x-entity` (#1109): `signal_agent_segment_id`
2757
+ // carries `x-entity: "signal_activation_id"`, mapped to ResourceKind
2758
+ // `signal`; attached at `params.signal` per the override table.
2759
+ await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'activate_signal', params, logger);
2129
2760
  return projectSync(() => signals.activateSignal(params, reqCtx), r => r);
2130
2761
  },
2131
2762
  };
2132
2763
  }
2764
+ /**
2765
+ * Adapt `SponsoredIntelligencePlatform` (v6 protocol-keyed shape) onto the v5
2766
+ * `SponsoredIntelligenceHandlers` handler-bag the dispatcher consumes.
2767
+ *
2768
+ * Auto-store on `initiateSession`: stash a session record keyed by
2769
+ * `session_id` under `ResourceKind: 'si_session'`. The framework's
2770
+ * schema-driven hydrator (TOOL_ENTITY_FIELDS for `si_send_message` /
2771
+ * `si_terminate_session`) attaches that record at `params.session` on
2772
+ * subsequent calls so the platform reads transcript context from
2773
+ * `req.session` without manual `ctx.store.get`.
2774
+ *
2775
+ * Hydrate on `sendMessage` / `terminateSession`: schema-driven
2776
+ * `hydrateForTool` reads `params.session_id`, looks up the stored
2777
+ * session, and attaches at `params.session`.
2778
+ */
2779
+ function buildSponsoredIntelligenceHandlers(platform, ctxFor, ctxMetadataStore, logger) {
2780
+ const si = platform.sponsoredIntelligence;
2781
+ if (!si)
2782
+ return undefined;
2783
+ return {
2784
+ getOffering: async (params, ctx) => {
2785
+ const reqCtx = ctxFor(ctx);
2786
+ return projectSync(() => si.getOffering(params, reqCtx), r => r);
2787
+ },
2788
+ initiateSession: async (params, ctx) => {
2789
+ const reqCtx = ctxFor(ctx);
2790
+ return projectSync(async () => {
2791
+ const result = await si.initiateSession(params, reqCtx);
2792
+ // Auto-store the session record so subsequent `sendMessage` /
2793
+ // `terminateSession` calls hydrate `req.session` without a
2794
+ // manual lookup. Stored payload preserves the bits the brand
2795
+ // engine needs to resume context across turns: identity
2796
+ // consent, offering scoping, negotiated capabilities,
2797
+ // placement provenance, and any media-buy linkage. The full
2798
+ // request intent is stored alongside so brand handlers can
2799
+ // re-read what the user originally asked for. Production
2800
+ // brand engines that own transcript state in their own
2801
+ // backend can ignore this and read from their own store —
2802
+ // see SponsoredIntelligencePlatform JSDoc.
2803
+ if (ctxMetadataStore && reqCtx.account?.id) {
2804
+ const sessionId = result?.session_id;
2805
+ if (typeof sessionId === 'string' && sessionId.length > 0) {
2806
+ const reqRec = params;
2807
+ const resRec = result;
2808
+ const sessionRecord = {
2809
+ session_id: sessionId,
2810
+ // Request-side scoping the brand engine needs across turns.
2811
+ intent: reqRec.intent,
2812
+ offering_id: reqRec.offering_id,
2813
+ offering_token: reqRec.offering_token,
2814
+ placement: reqRec.placement,
2815
+ media_buy_id: reqRec.media_buy_id,
2816
+ identity: reqRec.identity,
2817
+ supported_capabilities: reqRec.supported_capabilities,
2818
+ // Response-side state.
2819
+ negotiated_capabilities: resRec.negotiated_capabilities,
2820
+ session_status: resRec.session_status,
2821
+ session_ttl_seconds: resRec.session_ttl_seconds,
2822
+ };
2823
+ try {
2824
+ await ctxMetadataStore.setResource(reqCtx.account.id, 'si_session', sessionId, sessionRecord);
2825
+ }
2826
+ catch (err) {
2827
+ const msg = err instanceof Error ? err.message : String(err);
2828
+ logger.warn(`[adcp/decisioning] auto-store si_session ${sessionId} failed: ${msg}`);
2829
+ }
2830
+ }
2831
+ }
2832
+ return result;
2833
+ }, r => r);
2834
+ },
2835
+ sendMessage: async (params, ctx) => {
2836
+ const reqCtx = ctxFor(ctx);
2837
+ // Auto-hydrate `req.session` from the stored si_session record. The
2838
+ // schema-driven hydrator reads `params.session_id` and attaches the
2839
+ // stored session at `params.session` (via the `_id` → strip
2840
+ // convention; `session_id` → `session`).
2841
+ await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'si_send_message', params, logger);
2842
+ return projectSync(() => si.sendMessage(params, reqCtx), r => r);
2843
+ },
2844
+ terminateSession: async (params, ctx) => {
2845
+ const reqCtx = ctxFor(ctx);
2846
+ await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'si_terminate_session', params, logger);
2847
+ return projectSync(async () => {
2848
+ const result = await si.terminateSession(params, reqCtx);
2849
+ // Persist `acp_handoff` and terminal `session_status` onto the
2850
+ // stored session record so a re-terminate replay (which is
2851
+ // naturally idempotent on `session_id` per the spec) hydrates
2852
+ // the same handoff payload via `req.session` without the
2853
+ // adopter having to remember to write through. Honors the
2854
+ // platform interface JSDoc contract:
2855
+ // "Re-terminating a closed session MUST return the same
2856
+ // payload, including any acp_handoff block."
2857
+ if (ctxMetadataStore && reqCtx.account?.id) {
2858
+ const sessionId = params?.session_id;
2859
+ if (typeof sessionId === 'string' && sessionId.length > 0) {
2860
+ const resRec = result;
2861
+ try {
2862
+ const existing = await ctxMetadataStore.getEntry(reqCtx.account.id, 'si_session', sessionId);
2863
+ const merged = {
2864
+ ...(existing?.resource ?? { session_id: sessionId }),
2865
+ session_status: resRec.session_status,
2866
+ acp_handoff: resRec.acp_handoff,
2867
+ follow_up: resRec.follow_up,
2868
+ terminated: resRec.terminated,
2869
+ };
2870
+ await ctxMetadataStore.setResource(reqCtx.account.id, 'si_session', sessionId, merged);
2871
+ }
2872
+ catch (err) {
2873
+ const msg = err instanceof Error ? err.message : String(err);
2874
+ logger.warn(`[adcp/decisioning] auto-store si_session ${sessionId} on terminate failed: ${msg}`);
2875
+ }
2876
+ }
2877
+ }
2878
+ return result;
2879
+ }, r => r);
2880
+ },
2881
+ };
2882
+ }
2133
2883
  function buildBrandRightsHandlers(platform, ctxFor, ctxMetadataStore, logger) {
2134
2884
  const br = platform.brandRights;
2135
2885
  if (!br)
@@ -2159,9 +2909,29 @@ function buildBrandRightsHandlers(platform, ctxFor, ctxMetadataStore, logger) {
2159
2909
  const reqCtx = ctxFor(ctx);
2160
2910
  // Auto-hydrate `req.rights` from the prior getRights catalog entry.
2161
2911
  // Publisher reads selected pricing option + ctx_metadata directly.
2162
- await hydrateSingleResource(ctxMetadataStore, reqCtx.account?.id, 'rights_grant', params.rights_id, 'rights', params, logger);
2912
+ // Schema-driven via `x-entity` (#1109); destination field stays at
2913
+ // `params.rights` per the override table — historical, predates
2914
+ // the entity-driven hydrator and `updateRights`'s convention of
2915
+ // `params.rights_grant`. Adopters already read this field, so a
2916
+ // rename would be wire-visible behavior.
2917
+ await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'acquire_rights', params, logger);
2163
2918
  return projectSync(() => br.acquireRights(params, reqCtx), r => r);
2164
2919
  },
2920
+ // `update_rights` modifies an existing grant. The framework hydrates
2921
+ // the grant record from `req.rights_id` so the implementation reads
2922
+ // the resolved state from `ctx.store` (or as `params.rights_grant`
2923
+ // — see field-name divergence note on `acquireRights` above; this
2924
+ // tool attaches under `rights_grant` because the wire payload has
2925
+ // no `rights` field). Schema-driven via `x-entity` (#1109). Async
2926
+ // delivery — when the change requires rights-holder counter-
2927
+ // signature — rides the buyer's `push_notification_config` webhook;
2928
+ // the immediate response carries `implementation_date: null` to
2929
+ // signal pending state.
2930
+ updateRights: async (params, ctx) => {
2931
+ const reqCtx = ctxFor(ctx);
2932
+ await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'update_rights', params, logger);
2933
+ return projectSync(() => br.updateRights(params, reqCtx), r => r);
2934
+ },
2165
2935
  };
2166
2936
  }
2167
2937
  function buildGovernanceHandlers(platform, ctxFor) {
@@ -2288,18 +3058,27 @@ function buildAccountHandlers(platform, ctxFor) {
2288
3058
  // closer to the truth than a fabricated UNSUPPORTED_FEATURE envelope.
2289
3059
  const handlers = {};
2290
3060
  if (accounts.upsert) {
2291
- handlers.syncAccounts = async (params, _ctx) => {
3061
+ handlers.syncAccounts = async (params, ctx) => {
2292
3062
  const refs = (params.accounts ?? []);
2293
- return projectSync(() => accounts.upsert(refs), rows => ({ accounts: rows }));
3063
+ const resolveCtx = toResolveCtx(ctx, 'sync_accounts');
3064
+ return projectSync(() => accounts.upsert(refs, resolveCtx), rows => ({ accounts: rows.map(account_1.toWireSyncAccountRow) }));
3065
+ };
3066
+ }
3067
+ if (accounts.syncGovernance) {
3068
+ handlers.syncGovernance = async (params, ctx) => {
3069
+ const entries = params.accounts;
3070
+ const resolveCtx = toResolveCtx(ctx, 'sync_governance');
3071
+ return projectSync(() => accounts.syncGovernance(entries, resolveCtx), rows => ({ accounts: rows.map(account_1.toWireSyncGovernanceRow) }));
2294
3072
  };
2295
3073
  }
2296
3074
  if (accounts.list) {
2297
- handlers.listAccounts = async (params, _ctx) => {
3075
+ handlers.listAccounts = async (params, ctx) => {
2298
3076
  const filter = params;
3077
+ const resolveCtx = toResolveCtx(ctx, 'list_accounts');
2299
3078
  // Wrap in projectSync so adopter `throw new AdcpError('PERMISSION_DENIED', ...)`
2300
3079
  // from the list impl projects to the structured wire envelope rather
2301
3080
  // than falling through to the framework's `SERVICE_UNAVAILABLE` mapping.
2302
- return projectSync(() => accounts.list(filter), page => ({
3081
+ return projectSync(() => accounts.list(filter, resolveCtx), page => ({
2303
3082
  accounts: page.items.map(account_1.toWireAccount),
2304
3083
  ...(page.nextCursor != null && { next_cursor: page.nextCursor }),
2305
3084
  }));
@@ -2307,10 +3086,7 @@ function buildAccountHandlers(platform, ctxFor) {
2307
3086
  }
2308
3087
  if (accounts.reportUsage) {
2309
3088
  handlers.reportUsage = async (params, ctx) => {
2310
- const resolveCtx = {
2311
- ...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
2312
- toolName: 'report_usage',
2313
- };
3089
+ const resolveCtx = toResolveCtx(ctx, 'report_usage');
2314
3090
  return projectSync(() => accounts.reportUsage(params, resolveCtx), r => r);
2315
3091
  };
2316
3092
  }
@@ -2320,10 +3096,8 @@ function buildAccountHandlers(platform, ctxFor) {
2320
3096
  // platform method runs. Adopters fronting an upstream platform read
2321
3097
  // tokens / upstream IDs off `ctx.account.ctx_metadata` without
2322
3098
  // having to re-resolve from `params.account`.
2323
- const resolveCtx = {
2324
- ...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
2325
- toolName: 'get_account_financials',
2326
- };
3099
+ const resolveCtx = toResolveCtx(ctx, 'get_account_financials');
3100
+ refuseInlineAccountIdWhenForbidden(accounts.resolution, params.account);
2327
3101
  const resolved = await accounts.resolve(params.account, resolveCtx);
2328
3102
  if (!resolved) {
2329
3103
  throw new async_outcome_1.AdcpError('ACCOUNT_NOT_FOUND', {
@@ -2340,11 +3114,19 @@ function buildAccountHandlers(platform, ctxFor) {
2340
3114
  // ────────────────────────────────────────────────────────────
2341
3115
  // Auto-seed helpers (catalog-backed comply sandbox; issue #1091)
2342
3116
  // ────────────────────────────────────────────────────────────
2343
- // Pull the request's account_id from the comply tool input. Sandbox-flagged
2344
- // requests carry it on `input.account.account_id`; non-sandbox traffic is
2345
- // already short-circuited by `complyTest.sandboxGate`, so a missing id here
2346
- // means the adapter fired outside the gated path drop the write rather
2347
- // than collapse it into a shared namespace.
3117
+ // Auto-seed namespace key extractor. Used by both the write side (the
3118
+ // `seed.product` / `seed.pricing_option` adapter closures injected
3119
+ // inline in the auto-seed wiring) and the read side (`makeAutoSeedBridge`
3120
+ // when `ctx.account?.id` is absenti.e., the framework didn't
3121
+ // pre-resolve the account on a custom dispatcher path).
3122
+ //
3123
+ // Write-side rationale: the adapter cannot reach the framework-resolved
3124
+ // `ctx.account.id` (the comply-controller's `ComplyControllerContext`
3125
+ // only exposes `{ input }`), and calling `platform.accounts.resolve`
3126
+ // here without `authInfo` would let a caller spoof `account.account_id`
3127
+ // and write into another tenant's resolved namespace. The architectural
3128
+ // fix (widen `ComplyControllerContext` to surface the resolved account)
3129
+ // is tracked at #1216 — until then, raw id is the secure choice.
2348
3130
  function readAutoSeedAccountId(input) {
2349
3131
  const account = input.account;
2350
3132
  if (account == null || typeof account !== 'object')