@adcp/sdk 17.0.0-beta.0 → 17.0.0-beta.2

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 (277) hide show
  1. package/dist/lib/adapters/keyed-account-store.js +1 -1
  2. package/dist/lib/adapters/keyed-account-store.mjs +1 -1
  3. package/dist/lib/adapters/version/3.0/brand-fields.d.mts +7 -1
  4. package/dist/lib/adapters/version/3.0/brand-fields.d.ts +7 -1
  5. package/dist/lib/adapters/version/3.0/brand-fields.js +139 -3
  6. package/dist/lib/adapters/version/3.0/brand-fields.mjs +136 -2
  7. package/dist/lib/adapters/version/3.0/index.js +6 -0
  8. package/dist/lib/adapters/version/3.0/index.mjs +7 -1
  9. package/dist/lib/adapters/version/3.1/bidding.js +1 -1
  10. package/dist/lib/adapters/version/3.1/bidding.mjs +1 -1
  11. package/dist/lib/adapters/version/types.d.mts +5 -0
  12. package/dist/lib/adapters/version/types.d.ts +5 -0
  13. package/dist/lib/canonical-references/index.js +2 -0
  14. package/dist/lib/canonical-references/index.mjs +2 -0
  15. package/dist/lib/client/account-changes.d.mts +3 -1
  16. package/dist/lib/client/account-changes.d.ts +3 -1
  17. package/dist/lib/client/account-changes.js +22 -2
  18. package/dist/lib/client/account-changes.mjs +22 -2
  19. package/dist/lib/conformance/oracle.js +3 -2
  20. package/dist/lib/conformance/oracle.mjs +3 -2
  21. package/dist/lib/core/AgentClient.d.mts +165 -1
  22. package/dist/lib/core/AgentClient.d.ts +165 -1
  23. package/dist/lib/core/AgentClient.js +446 -8
  24. package/dist/lib/core/AgentClient.mjs +446 -8
  25. package/dist/lib/core/ConversationTypes.d.mts +8 -0
  26. package/dist/lib/core/ConversationTypes.d.ts +8 -0
  27. package/dist/lib/core/ProtocolResponseParser.d.mts +1 -1
  28. package/dist/lib/core/ProtocolResponseParser.d.ts +1 -1
  29. package/dist/lib/core/ProtocolResponseParser.js +28 -18
  30. package/dist/lib/core/ProtocolResponseParser.mjs +11 -1
  31. package/dist/lib/core/ResponseValidator.js +1 -1
  32. package/dist/lib/core/ResponseValidator.mjs +1 -1
  33. package/dist/lib/core/SingleAgentClient.d.mts +122 -7
  34. package/dist/lib/core/SingleAgentClient.d.ts +122 -7
  35. package/dist/lib/core/SingleAgentClient.js +601 -96
  36. package/dist/lib/core/SingleAgentClient.mjs +590 -84
  37. package/dist/lib/core/TaskExecutor.d.mts +7 -0
  38. package/dist/lib/core/TaskExecutor.d.ts +7 -0
  39. package/dist/lib/core/TaskExecutor.js +23 -8
  40. package/dist/lib/core/TaskExecutor.mjs +23 -8
  41. package/dist/lib/core/task-status.d.mts +2 -0
  42. package/dist/lib/core/task-status.d.ts +2 -0
  43. package/dist/lib/core/task-status.js +11 -2
  44. package/dist/lib/core/task-status.mjs +9 -1
  45. package/dist/lib/errors/index.d.mts +22 -0
  46. package/dist/lib/errors/index.d.ts +22 -0
  47. package/dist/lib/errors/index.js +43 -0
  48. package/dist/lib/errors/index.mjs +42 -0
  49. package/dist/lib/identity-3.3/trust.d.mts +1 -4
  50. package/dist/lib/identity-3.3/trust.d.ts +1 -4
  51. package/dist/lib/identity-3.3/trust.js +34 -21
  52. package/dist/lib/identity-3.3/trust.mjs +34 -21
  53. package/dist/lib/identity-3.3/validation.js +5 -3
  54. package/dist/lib/identity-3.3/validation.mjs +6 -4
  55. package/dist/lib/index.d.mts +7 -53
  56. package/dist/lib/index.d.ts +7 -53
  57. package/dist/lib/index.js +13 -0
  58. package/dist/lib/index.mjs +9 -0
  59. package/dist/lib/media-buy/compatibility.js +6 -1
  60. package/dist/lib/media-buy/compatibility.mjs +6 -1
  61. package/dist/lib/protocols/mcp-modern.d.mts +2 -0
  62. package/dist/lib/protocols/mcp-modern.d.ts +2 -0
  63. package/dist/lib/protocols/mcp-modern.js +31 -5
  64. package/dist/lib/protocols/mcp-modern.mjs +31 -5
  65. package/dist/lib/protocols/mcp-scope.d.mts +6 -1
  66. package/dist/lib/protocols/mcp-scope.d.ts +6 -1
  67. package/dist/lib/protocols/mcp-scope.js +25 -3
  68. package/dist/lib/protocols/mcp-scope.mjs +24 -3
  69. package/dist/lib/protocols/mcp.js +12 -6
  70. package/dist/lib/protocols/mcp.mjs +13 -6
  71. package/dist/lib/reporting/inspection.js +1 -0
  72. package/dist/lib/reporting/inspection.mjs +1 -0
  73. package/dist/lib/reporting/ledger/coverage.d.mts +5 -0
  74. package/dist/lib/reporting/ledger/coverage.d.ts +5 -0
  75. package/dist/lib/reporting/ledger/coverage.js +37 -3
  76. package/dist/lib/reporting/ledger/coverage.mjs +36 -3
  77. package/dist/lib/reporting/ledger/handler.js +7 -4
  78. package/dist/lib/reporting/ledger/handler.mjs +7 -4
  79. package/dist/lib/reporting/ledger/producer.js +215 -69
  80. package/dist/lib/reporting/ledger/producer.mjs +217 -70
  81. package/dist/lib/reporting/ledger/schedule.d.mts +2 -2
  82. package/dist/lib/reporting/ledger/schedule.d.ts +2 -2
  83. package/dist/lib/reporting/ledger/schedule.js +8 -5
  84. package/dist/lib/reporting/ledger/schedule.mjs +8 -5
  85. package/dist/lib/reporting/ledger/status-ingest.d.mts +1 -1
  86. package/dist/lib/reporting/ledger/status-ingest.d.ts +1 -1
  87. package/dist/lib/reporting/ledger/status-ingest.js +4 -3
  88. package/dist/lib/reporting/ledger/status-ingest.mjs +4 -3
  89. package/dist/lib/reporting/ledger/types.d.mts +36 -1
  90. package/dist/lib/reporting/ledger/types.d.ts +36 -1
  91. package/dist/lib/reporting/service/index.d.mts +14 -1
  92. package/dist/lib/reporting/service/index.d.ts +14 -1
  93. package/dist/lib/reporting/service/index.js +24 -12
  94. package/dist/lib/reporting/service/index.mjs +24 -12
  95. package/dist/lib/schemas/browser.d.mts +2 -0
  96. package/dist/lib/schemas/browser.d.ts +2 -0
  97. package/dist/lib/schemas/browser.js +3 -0
  98. package/dist/lib/schemas/browser.mjs +2 -0
  99. package/dist/lib/schemas/index.d.mts +5 -3
  100. package/dist/lib/schemas/index.d.ts +5 -3
  101. package/dist/lib/schemas/index.js +5 -0
  102. package/dist/lib/schemas/index.mjs +4 -0
  103. package/dist/lib/server/account-response-identity.d.mts +17 -0
  104. package/dist/lib/server/account-response-identity.d.ts +17 -0
  105. package/dist/lib/server/account-response-identity.js +52 -0
  106. package/dist/lib/server/account-response-identity.mjs +28 -0
  107. package/dist/lib/server/account-sync-contract.js +2 -2
  108. package/dist/lib/server/account-sync-contract.mjs +2 -2
  109. package/dist/lib/server/create-adcp-server.js +33 -20
  110. package/dist/lib/server/create-adcp-server.mjs +36 -12
  111. package/dist/lib/server/decisioning/account.d.mts +36 -10
  112. package/dist/lib/server/decisioning/account.d.ts +36 -10
  113. package/dist/lib/server/decisioning/account.js +33 -14
  114. package/dist/lib/server/decisioning/account.mjs +33 -14
  115. package/dist/lib/server/decisioning/runtime/from-platform.d.mts +5 -5
  116. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +5 -5
  117. package/dist/lib/server/decisioning/runtime/from-platform.js +4 -4
  118. package/dist/lib/server/decisioning/runtime/from-platform.mjs +4 -4
  119. package/dist/lib/server/media-buy-store.d.mts +26 -12
  120. package/dist/lib/server/media-buy-store.d.ts +26 -12
  121. package/dist/lib/server/media-buy-store.js +69 -21
  122. package/dist/lib/server/media-buy-store.mjs +69 -21
  123. package/dist/lib/server/notification-subscriptions/runtime.d.mts +1 -1
  124. package/dist/lib/server/notification-subscriptions/runtime.d.ts +1 -1
  125. package/dist/lib/server/notification-subscriptions/runtime.js +4 -0
  126. package/dist/lib/server/notification-subscriptions/runtime.mjs +4 -0
  127. package/dist/lib/server/responses.js +9 -1
  128. package/dist/lib/server/responses.mjs +9 -1
  129. package/dist/lib/signing/agent-fetch.d.mts +1 -1
  130. package/dist/lib/signing/agent-fetch.d.ts +1 -1
  131. package/dist/lib/signing/agent-fetch.js +3 -3
  132. package/dist/lib/signing/agent-fetch.mjs +3 -3
  133. package/dist/lib/testing/client.d.mts +1 -0
  134. package/dist/lib/testing/client.d.ts +1 -0
  135. package/dist/lib/testing/client.js +6 -5
  136. package/dist/lib/testing/client.mjs +6 -5
  137. package/dist/lib/testing/storyboard/agent-routing.d.mts +5 -2
  138. package/dist/lib/testing/storyboard/agent-routing.d.ts +5 -2
  139. package/dist/lib/testing/storyboard/agent-routing.js +11 -4
  140. package/dist/lib/testing/storyboard/agent-routing.mjs +11 -4
  141. package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +60 -14
  142. package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +60 -14
  143. package/dist/lib/testing/storyboard/compliance.d.mts +2 -5
  144. package/dist/lib/testing/storyboard/compliance.d.ts +2 -5
  145. package/dist/lib/testing/storyboard/compliance.js +62 -13
  146. package/dist/lib/testing/storyboard/compliance.mjs +63 -14
  147. package/dist/lib/testing/storyboard/context.d.mts +13 -3
  148. package/dist/lib/testing/storyboard/context.d.ts +13 -3
  149. package/dist/lib/testing/storyboard/context.js +15 -10
  150. package/dist/lib/testing/storyboard/context.mjs +15 -10
  151. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +2 -0
  152. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +2 -0
  153. package/dist/lib/testing/storyboard/request-signing/vector-loader.js +11 -0
  154. package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +10 -0
  155. package/dist/lib/testing/storyboard/runner.js +141 -13
  156. package/dist/lib/testing/storyboard/runner.mjs +141 -13
  157. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  158. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  159. package/dist/lib/testing/storyboard/validations.js +4 -1
  160. package/dist/lib/testing/storyboard/validations.mjs +4 -1
  161. package/dist/lib/testing/test-controller.js +3 -0
  162. package/dist/lib/testing/test-controller.mjs +3 -0
  163. package/dist/lib/types/accept-proposal.d.ts +20 -28
  164. package/dist/lib/types/asset-instances.d.mts +1 -1
  165. package/dist/lib/types/asset-instances.d.ts +1 -1
  166. package/dist/lib/types/buy-products.d.ts +20 -28
  167. package/dist/lib/types/check-governance.d.ts +20 -28
  168. package/dist/lib/types/comply-test-controller.d.ts +20 -28
  169. package/dist/lib/types/control-media-buy.d.ts +20 -28
  170. package/dist/lib/types/core.generated.d.mts +273 -184
  171. package/dist/lib/types/core.generated.d.ts +273 -184
  172. package/dist/lib/types/create-media-buy.d.ts +20 -28
  173. package/dist/lib/types/get-media-buys.d.ts +20 -28
  174. package/dist/lib/types/get-products.d.ts +20 -28
  175. package/dist/lib/types/index.d.mts +6 -1
  176. package/dist/lib/types/index.d.ts +6 -1
  177. package/dist/lib/types/index.js +6 -1
  178. package/dist/lib/types/index.mjs +4 -1
  179. package/dist/lib/types/inline-enums.generated.d.mts +30 -4
  180. package/dist/lib/types/inline-enums.generated.d.ts +30 -4
  181. package/dist/lib/types/inline-enums.generated.js +41 -2
  182. package/dist/lib/types/inline-enums.generated.mjs +28 -2
  183. package/dist/lib/types/list-products.d.ts +20 -28
  184. package/dist/lib/types/list-proposals.d.ts +20 -28
  185. package/dist/lib/types/media-buy-delivery-report.d.mts +6 -0
  186. package/dist/lib/types/media-buy-delivery-report.d.ts +6 -0
  187. package/dist/lib/types/media-buy-delivery-report.js +16 -0
  188. package/dist/lib/types/media-buy-delivery-report.mjs +0 -0
  189. package/dist/lib/types/refine-proposals.d.ts +20 -28
  190. package/dist/lib/types/request-proposals.d.ts +20 -28
  191. package/dist/lib/types/schemas.generated.d.ts +63113 -127273
  192. package/dist/lib/types/schemas.generated.js +759 -770
  193. package/dist/lib/types/schemas.generated.mjs +759 -770
  194. package/dist/lib/types/targeting-keys.generated.d.mts +4 -0
  195. package/dist/lib/types/targeting-keys.generated.d.ts +4 -0
  196. package/dist/lib/types/targeting-keys.generated.js +109 -0
  197. package/dist/lib/types/targeting-keys.generated.mjs +84 -0
  198. package/dist/lib/types/tools.generated.d.mts +2 -68
  199. package/dist/lib/types/tools.generated.d.ts +2 -68
  200. package/dist/lib/types/update-media-buy.d.ts +20 -28
  201. package/dist/lib/utils/adcp-version-config.js +5 -2
  202. package/dist/lib/utils/adcp-version-config.mjs +5 -2
  203. package/dist/lib/utils/envelope-status-compat.d.mts +18 -1
  204. package/dist/lib/utils/envelope-status-compat.d.ts +18 -1
  205. package/dist/lib/utils/envelope-status-compat.js +11 -5
  206. package/dist/lib/utils/envelope-status-compat.mjs +11 -5
  207. package/dist/lib/utils/response-unwrapper.js +18 -10
  208. package/dist/lib/utils/response-unwrapper.mjs +18 -10
  209. package/dist/lib/v2/format-schema/resolver.js +1 -1
  210. package/dist/lib/v2/format-schema/resolver.mjs +1 -1
  211. package/dist/lib/v2/projection/creative-delivery.js +159 -39
  212. package/dist/lib/v2/projection/creative-delivery.mjs +163 -39
  213. package/dist/lib/v2/projection/index.d.mts +1 -0
  214. package/dist/lib/v2/projection/index.d.ts +1 -0
  215. package/dist/lib/v2/projection/index.js +3 -0
  216. package/dist/lib/v2/projection/index.mjs +2 -0
  217. package/dist/lib/v2/projection/legacy-metadata.d.mts +19 -0
  218. package/dist/lib/v2/projection/legacy-metadata.d.ts +19 -0
  219. package/dist/lib/v2/projection/legacy-metadata.js +91 -0
  220. package/dist/lib/v2/projection/legacy-metadata.mjs +86 -0
  221. package/dist/lib/v2/projection/v1-to-v2.d.mts +1 -1
  222. package/dist/lib/v2/projection/v1-to-v2.d.ts +1 -1
  223. package/dist/lib/v2/projection/v1-to-v2.js +12 -9
  224. package/dist/lib/v2/projection/v1-to-v2.mjs +12 -9
  225. package/dist/lib/validation/budget-allocation.d.mts +3 -3
  226. package/dist/lib/validation/budget-allocation.d.ts +3 -3
  227. package/dist/lib/validation/compact-schema.d.mts +27 -0
  228. package/dist/lib/validation/compact-schema.d.ts +27 -0
  229. package/dist/lib/validation/compact-schema.js +276 -0
  230. package/dist/lib/validation/compact-schema.mjs +250 -0
  231. package/dist/lib/validation/media-buy-delivery-report.d.mts +8 -0
  232. package/dist/lib/validation/media-buy-delivery-report.d.ts +8 -0
  233. package/dist/lib/validation/media-buy-delivery-report.js +31 -0
  234. package/dist/lib/validation/media-buy-delivery-report.mjs +7 -0
  235. package/dist/lib/validation/nonempty-array.d.mts +15 -0
  236. package/dist/lib/validation/nonempty-array.d.ts +15 -0
  237. package/dist/lib/validation/nonempty-array.js +41 -0
  238. package/dist/lib/validation/nonempty-array.mjs +7 -0
  239. package/dist/lib/validation/schema-diagnostic-origins.d.mts +21 -0
  240. package/dist/lib/validation/schema-diagnostic-origins.d.ts +21 -0
  241. package/dist/lib/validation/schema-diagnostic-origins.js +193 -0
  242. package/dist/lib/validation/schema-diagnostic-origins.mjs +169 -0
  243. package/dist/lib/validation/schema-loader.js +86 -16
  244. package/dist/lib/validation/schema-loader.mjs +82 -16
  245. package/dist/lib/validation/schema-validator.d.mts +10 -19
  246. package/dist/lib/validation/schema-validator.d.ts +10 -19
  247. package/dist/lib/validation/schema-validator.js +136 -43
  248. package/dist/lib/validation/schema-validator.mjs +140 -44
  249. package/dist/lib/validation/sync-creatives.d.mts +22 -22
  250. package/dist/lib/validation/sync-creatives.d.ts +22 -22
  251. package/dist/lib/version.d.mts +3 -3
  252. package/dist/lib/version.d.ts +3 -3
  253. package/dist/lib/version.js +3 -3
  254. package/dist/lib/version.mjs +3 -3
  255. package/dist/lib/webhooks/index.d.mts +3 -0
  256. package/dist/lib/webhooks/index.d.ts +3 -0
  257. package/dist/lib/webhooks/index.js +3 -0
  258. package/dist/lib/webhooks/index.mjs +2 -0
  259. package/dist/lib/webhooks/media-buy-delivery.d.mts +43 -0
  260. package/dist/lib/webhooks/media-buy-delivery.d.ts +43 -0
  261. package/dist/lib/webhooks/media-buy-delivery.js +119 -0
  262. package/dist/lib/webhooks/media-buy-delivery.mjs +94 -0
  263. package/docs/TYPE-SUMMARY.md +2 -2
  264. package/docs/guides/COLLECTION-FIXTURE-FOUNDATION.md +11 -0
  265. package/docs/guides/DELIVERY-WEBHOOK-PARSING.md +142 -0
  266. package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +27 -1
  267. package/docs/guides/REPORTING-LEDGER.md +93 -0
  268. package/docs/guides/REPORTING-STABILITY.md +1 -1
  269. package/docs/guides/TYPED-CLIENT-TOOLS.md +49 -0
  270. package/docs/llms.txt +2 -2
  271. package/docs/migration-14.x-rc-worksheet.md +4 -4
  272. package/docs/migration-16-to-17.md +202 -2
  273. package/docs/migration-6.6-to-6.7.md +14 -0
  274. package/docs/migration-account-change-feed.md +15 -0
  275. package/docs/migration-reporting-storage-package.md +1 -1
  276. package/docs/recipes/verifying-inbound-webhooks.md +18 -2
  277. package/package.json +2 -2
@@ -726,7 +726,7 @@ function remapTaskCompletionOutputs(outputs) {
726
726
  return o;
727
727
  });
728
728
  }
729
- async function resolveTaskCompletionOutputs(taskResult, outputs, client, webhookReceiver, originatingTaskName) {
729
+ async function resolveTaskCompletionOutputs(taskResult, outputs, client, webhookReceiver, originatingTaskName, responseAdcpVersion) {
730
730
  const hasTaskCompletionPath = outputs.some(
731
731
  (o) => typeof o.path === "string" && o.path.startsWith(TASK_COMPLETION_PATH_PREFIX)
732
732
  );
@@ -779,7 +779,10 @@ async function resolveTaskCompletionOutputs(taskResult, outputs, client, webhook
779
779
  if (winner.kind === "poll") {
780
780
  const polled = winner.result;
781
781
  if (polled.success === false) return { attempted: true, taskFailed: true };
782
- return { attempted: true, data: normalizeTaskCompletionData(polled.data, originatingTaskName) };
782
+ return {
783
+ attempted: true,
784
+ data: normalizeTaskCompletionData(polled.data, originatingTaskName, responseAdcpVersion)
785
+ };
783
786
  }
784
787
  const waitResult = winner.result;
785
788
  if (waitResult.timed_out) {
@@ -787,7 +790,10 @@ async function resolveTaskCompletionOutputs(taskResult, outputs, client, webhook
787
790
  }
788
791
  const webhookBody = waitResult.webhook.body;
789
792
  if (webhookBody?.status === "completed") {
790
- return { attempted: true, data: normalizeTaskCompletionData(webhookBody.result, originatingTaskName) };
793
+ return {
794
+ attempted: true,
795
+ data: normalizeTaskCompletionData(webhookBody.result, originatingTaskName, responseAdcpVersion)
796
+ };
791
797
  }
792
798
  return { attempted: true, taskFailed: true };
793
799
  } catch {
@@ -796,18 +802,19 @@ async function resolveTaskCompletionOutputs(taskResult, outputs, client, webhook
796
802
  if (timer) clearTimeout(timer);
797
803
  }
798
804
  }
799
- function normalizeTaskCompletionData(data, taskName) {
805
+ function normalizeTaskCompletionData(data, taskName, adcpVersion) {
800
806
  if (data == null || typeof data !== "object" || Array.isArray(data)) return data;
801
807
  const original = data;
802
- const compat = injectLegacyEnvelopeStatus(original, { toolName: taskName });
808
+ const compatOptions = { toolName: taskName, adcpVersion };
809
+ const compat = injectLegacyEnvelopeStatus(original, compatOptions);
803
810
  if (!("status" in original) && "status" in compat) {
804
811
  const { status: _status, ...rest } = compat;
805
- return normalizeLegacyMediaBuyStatusForReturn(rest, { toolName: taskName });
812
+ return normalizeLegacyMediaBuyStatusForReturn(rest, compatOptions);
806
813
  }
807
814
  if ((taskName === "create_media_buy" || taskName === "update_media_buy") && typeof original.status === "string" && compat.status === "completed" && typeof compat.media_buy_status === "string") {
808
- return normalizeLegacyMediaBuyStatusForReturn({ ...compat, status: original.status }, { toolName: taskName });
815
+ return normalizeLegacyMediaBuyStatusForReturn({ ...compat, status: original.status }, compatOptions);
809
816
  }
810
- return normalizeLegacyMediaBuyStatusForReturn(compat, { toolName: taskName });
817
+ return normalizeLegacyMediaBuyStatusForReturn(compat, compatOptions);
811
818
  }
812
819
  function readEnvIntOrDefault(value, fallback) {
813
820
  if (!value) return fallback;
@@ -1945,9 +1952,10 @@ async function prepareStoryboardFixturesBody(agentUrl, storyboard, options) {
1945
1952
  options = snapshotPreparationOptions(options);
1946
1953
  }
1947
1954
  const callerOwnsClients = hasTestClientScope();
1948
- const preparationOptions = resolvePreparationRouteOptions(agentUrls[0], options);
1955
+ const runOptions = options;
1956
+ const preparationOptions = resolvePreparationRouteOptions(agentUrls[0], runOptions);
1949
1957
  const resolution = getOrCreateClientResolution(agentUrls[0], preparationOptions);
1950
- const client = resolution.client;
1958
+ let client = resolution.client;
1951
1959
  const finishPreparation = (seeding, disposition) => {
1952
1960
  if (!scopeStillMatches()) {
1953
1961
  return refusePreparation(driftRefusal, seeding ?? void 0);
@@ -1957,6 +1965,45 @@ async function prepareStoryboardFixturesBody(agentUrl, storyboard, options) {
1957
1965
  options = preparationOptions;
1958
1966
  try {
1959
1967
  let profile = options._profile;
1968
+ let discoveryStep;
1969
+ let routingContext;
1970
+ const failDiscovery = (step, failedProfile) => {
1971
+ const failed = buildDiscoveryFailedResult(agentUrls, storyboard, step, failedProfile);
1972
+ return finishPreparation(
1973
+ { phase: failed.phases[0], allPassed: false, passedCount: 0, failedCount: 1 },
1974
+ { status: "failed", detail: step.error ?? "agent discovery failed before fixture preparation" }
1975
+ );
1976
+ };
1977
+ if (runOptions.agents && (storyboardCapabilityPredicates(storyboard).length > 0 || storyboard.required_tools?.length || storyboard.required_any_of_tools?.length)) {
1978
+ try {
1979
+ validateAgentsMap(agentUrl, storyboard, runOptions);
1980
+ routingContext = await buildRoutingContext(storyboard, { ...runOptions, discovery_resilient: false });
1981
+ } catch (error) {
1982
+ const failedStep = error instanceof DiscoveryFailure ? error.step : void 0;
1983
+ return await failDiscovery({
1984
+ ...failedStep,
1985
+ step: failedStep?.step ?? "Discover preparation topology",
1986
+ passed: false,
1987
+ duration_ms: failedStep?.duration_ms ?? 0,
1988
+ error: redactOAuthUrlsInText(
1989
+ error instanceof DiscoveryFailure ? `Discovery failed for agent "${error.agentKey}" (${redactOAuthUrlForOutput(error.url)}): ${error.underlying}` : error instanceof Error ? error.message : String(error)
1990
+ )
1991
+ });
1992
+ }
1993
+ for (const routeProfile of routingContext.profiles.values()) {
1994
+ const failure = describeProfileDiscoveryFailure(
1995
+ routeProfile,
1996
+ runOptions._requireValidCapabilityEvidence === true,
1997
+ runOptions._allowCapabilityDiagnostic === true
1998
+ );
1999
+ if (failure) return await failDiscovery(failure, routeProfile);
2000
+ }
2001
+ const firstKey = Object.keys(runOptions.agents)[0];
2002
+ profile = routingContext.profiles.get(firstKey);
2003
+ client = routingContext.clients.get(firstKey);
2004
+ discoveryStep = routingContext.discoverySteps?.get(firstKey);
2005
+ options = { ...options, _profile: profile, agentTools: normalizeAgentToolNames(profile.tools) };
2006
+ }
1960
2007
  const suppliedFailure = profile && describeProfileDiscoveryFailure(
1961
2008
  profile,
1962
2009
  options._requireValidCapabilityEvidence === true,
@@ -1969,8 +2016,9 @@ async function prepareStoryboardFixturesBody(agentUrl, storyboard, options) {
1969
2016
  { status: "failed", detail: suppliedFailure.error ?? "agent discovery failed" }
1970
2017
  );
1971
2018
  }
1972
- if (!profile && !resolution.reusedShared) {
2019
+ if (!profile) {
1973
2020
  const discovered = await getOrDiscoverStoryboardProfile(client, options);
2021
+ discoveryStep = discovered.evidence ?? discovered.step;
1974
2022
  if (discovered.step.passed === false) {
1975
2023
  const failed = buildDiscoveryFailedResult(agentUrls, storyboard, discovered.step, discovered.profile);
1976
2024
  return await finishPreparation(
@@ -1991,6 +2039,80 @@ async function prepareStoryboardFixturesBody(agentUrl, storyboard, options) {
1991
2039
  };
1992
2040
  }
1993
2041
  if (!scopeStillMatches()) return await refusePreparation(driftRefusal);
2042
+ let capabilityUnmet;
2043
+ const applicabilityTools = routingContext ? [...new Set([...routingContext.profiles.values()].flatMap((p) => normalizeAgentToolNames(p.tools) ?? []))] : options.agentTools;
2044
+ try {
2045
+ if (routingContext && runOptions.agents) {
2046
+ const dispatch = createRoutingDispatcher(routingContext, runOptions, runOptions.agents);
2047
+ const defaultProfile = runOptions.default_agent ? routingContext.profiles.get(runOptions.default_agent) : void 0;
2048
+ const rootDetails = storyboard.phases.flatMap(
2049
+ (phase) => phase.steps.filter((step) => step.task !== VALIDATION_ONLY_TASK).map((step) => {
2050
+ const selected = dispatch.nextFor(step);
2051
+ const owner = runOptions.default_agent ? defaultProfile : selected.profile;
2052
+ return evaluateStoryboardCapabilityGates(
2053
+ storyboard,
2054
+ owner,
2055
+ normalizeAgentToolNames(owner?.tools),
2056
+ runOptions.adcpVersion
2057
+ );
2058
+ })
2059
+ );
2060
+ capabilityUnmet = rootDetails.length > 0 && rootDetails.every((detail) => detail !== null) ? rootDetails[0] : null;
2061
+ } else {
2062
+ capabilityUnmet = evaluateStoryboardCapabilityGates(
2063
+ storyboard,
2064
+ profile,
2065
+ options.agentTools,
2066
+ options.adcpVersion
2067
+ );
2068
+ }
2069
+ } catch (error) {
2070
+ return await failDiscovery({
2071
+ step: "Resolve preparation routes",
2072
+ passed: false,
2073
+ duration_ms: 0,
2074
+ error: redactOAuthUrlsInText(error instanceof Error ? error.message : String(error))
2075
+ });
2076
+ }
2077
+ const missingFamily = applicabilityTools && storyboard.required_any_of_tools?.find((family) => !hasAnyRequiredTool(family.tools, applicabilityTools));
2078
+ const unmetDetail = capabilityUnmet ?? (missingFamily ? `missing_required_tool_family: needs ${missingFamily.tools.join(" or ")}` + (missingFamily.rationale ? ` (${missingFamily.rationale})` : "") : null) ?? (storyboard.required_tools?.length && applicabilityTools && !hasAnyRequiredTool(storyboard.required_tools, applicabilityTools) ? `agent does not advertise any of [${storyboard.required_tools.join(", ")}]` : null);
2079
+ if (unmetDetail !== null) {
2080
+ const observations = routingContext && runOptions.agents ? Object.entries(runOptions.agents).map(([key, entry]) => ({
2081
+ key,
2082
+ url: entry.url,
2083
+ step: routingContext.discoverySteps?.get(key)
2084
+ })) : [{ key: "discovery", url: agentUrls[0], step: discoveryStep }];
2085
+ const steps = observations.map(({ key, url, step }) => ({
2086
+ storyboard_id: storyboard.id,
2087
+ phase_id: "discovery",
2088
+ step_id: key,
2089
+ title: step ? "Agent capability discovery" : "Supplied agent capability profile",
2090
+ task: step?.task ?? "",
2091
+ passed: true,
2092
+ duration_ms: step?.duration_ms ?? 0,
2093
+ validations: [],
2094
+ context: {},
2095
+ ...routingContext && { agent_url: redactOAuthUrlForOutput(url) },
2096
+ extraction: step?.extraction ?? { path: "none" },
2097
+ ...step?.request && { request: step.request },
2098
+ ...step?.response_record && { response_record: step.response_record }
2099
+ }));
2100
+ return await finishPreparation(
2101
+ {
2102
+ phase: {
2103
+ phase_id: "discovery",
2104
+ phase_title: "Agent capability discovery",
2105
+ passed: true,
2106
+ duration_ms: steps.reduce((total, step) => total + step.duration_ms, 0),
2107
+ steps
2108
+ },
2109
+ allPassed: true,
2110
+ passedCount: steps.length,
2111
+ failedCount: 0
2112
+ },
2113
+ { status: "unsupported", reason: "not_applicable", detail: unmetDetail }
2114
+ );
2115
+ }
1994
2116
  const context = createRunContext(storyboard, options).context;
1995
2117
  const seeding = await runControllerSeeding(client, storyboard, options, context);
1996
2118
  if (!seeding) {
@@ -5883,7 +6005,12 @@ async function executeStep(client, step, storyboardId, phaseId, context, allStep
5883
6005
  };
5884
6006
  const hasData = taskResult?.data !== void 0 && taskResult?.data !== null;
5885
6007
  if (passed && hasData && taskResult && !(effectiveStep.task === "sync_accounts" && request.dry_run === true)) {
5886
- const extracted = extractContextWithProvenance(effectiveStep.task, taskResult.data, step.id);
6008
+ const extracted = extractContextWithProvenance(
6009
+ effectiveStep.task,
6010
+ taskResult.data,
6011
+ step.id,
6012
+ options._serverAdcpVersion ?? options.adcpVersion
6013
+ );
5887
6014
  const conventionUnset = [];
5888
6015
  for (const group of extracted.clearGroups ?? []) {
5889
6016
  if (group.when && !group.when.values.includes(updatedContext[group.when.key])) continue;
@@ -5914,7 +6041,8 @@ async function executeStep(client, step, storyboardId, phaseId, context, allStep
5914
6041
  step.context_outputs,
5915
6042
  client,
5916
6043
  runState.webhookReceiver,
5917
- effectiveStep.task
6044
+ effectiveStep.task,
6045
+ options._serverAdcpVersion ?? options.adcpVersion
5918
6046
  );
5919
6047
  const extractionData = "data" in taskCompletionResolution ? taskCompletionResolution.data : hasData && taskResult ? taskResult.data : void 0;
5920
6048
  const remappedOutputs = remapTaskCompletionOutputs(step.context_outputs);
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.0";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.2";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.0";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "17.0.0-beta.2";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -295,8 +295,11 @@ function validateResponseSchemaForVersion(validation, ctx, taskResult) {
295
295
  return rest;
296
296
  })();
297
297
  const schema = import_response_schemas.TOOL_RESPONSE_SCHEMAS[taskName];
298
- const dataForValidation = Array.isArray(dataWithoutMessage) ? dataWithoutMessage : (0, import_envelope_status_compat.injectLegacyEnvelopeStatus)(dataWithoutMessage, { toolName: taskName });
299
298
  const responseAdcpVersion = ctx.responseAdcpVersion ?? ctx.adcpVersion;
299
+ const dataForValidation = Array.isArray(dataWithoutMessage) ? dataWithoutMessage : (0, import_envelope_status_compat.injectLegacyEnvelopeStatus)(dataWithoutMessage, {
300
+ toolName: taskName,
301
+ adcpVersion: responseAdcpVersion
302
+ });
300
303
  const parseResult = schema?.safeParse(
301
304
  (0, import_response_schemas.prepareResponseForSchemaValidation)(taskName, dataForValidation, responseAdcpVersion)
302
305
  );
@@ -276,8 +276,11 @@ function validateResponseSchemaForVersion(validation, ctx, taskResult) {
276
276
  return rest;
277
277
  })();
278
278
  const schema = TOOL_RESPONSE_SCHEMAS[taskName];
279
- const dataForValidation = Array.isArray(dataWithoutMessage) ? dataWithoutMessage : injectLegacyEnvelopeStatus(dataWithoutMessage, { toolName: taskName });
280
279
  const responseAdcpVersion = ctx.responseAdcpVersion ?? ctx.adcpVersion;
280
+ const dataForValidation = Array.isArray(dataWithoutMessage) ? dataWithoutMessage : injectLegacyEnvelopeStatus(dataWithoutMessage, {
281
+ toolName: taskName,
282
+ adcpVersion: responseAdcpVersion
283
+ });
281
284
  const parseResult = schema?.safeParse(
282
285
  prepareResponseForSchemaValidation(taskName, dataForValidation, responseAdcpVersion)
283
286
  );
@@ -31,6 +31,7 @@ __export(test_controller_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(test_controller_exports);
33
33
  var import_client = require('./client.js');
34
+ var import_errors = require('../errors/index.js');
34
35
  const TOOL_NAME = "comply_test_controller";
35
36
  const DEFAULT_SANDBOX_ACCOUNT = { brand: { domain: "test.example" }, operator: "test.example", sandbox: true };
36
37
  function buildAccount(options) {
@@ -84,6 +85,8 @@ async function detectController(client, profile, options) {
84
85
  }
85
86
  return { detected: false };
86
87
  } catch (error) {
88
+ if (error instanceof import_errors.ProtocolFeatureUnsupportedError && error.adcpError.details?.feature === "adcp_version")
89
+ throw error;
87
90
  (0, import_client.getLogger)().warn(
88
91
  { tool: TOOL_NAME, error: error instanceof Error ? error.message : String(error) },
89
92
  "comply_test_controller list_scenarios failed \u2014 treating as unavailable"
@@ -1,4 +1,5 @@
1
1
  import { getLogger, resolveAccount } from "./client.mjs";
2
+ import { ProtocolFeatureUnsupportedError } from "../errors/index.mjs";
2
3
  const TOOL_NAME = "comply_test_controller";
3
4
  const DEFAULT_SANDBOX_ACCOUNT = { brand: { domain: "test.example" }, operator: "test.example", sandbox: true };
4
5
  function buildAccount(options) {
@@ -52,6 +53,8 @@ async function detectController(client, profile, options) {
52
53
  }
53
54
  return { detected: false };
54
55
  } catch (error) {
56
+ if (error instanceof ProtocolFeatureUnsupportedError && error.adcpError.details?.feature === "adcp_version")
57
+ throw error;
55
58
  getLogger().warn(
56
59
  { tool: TOOL_NAME, error: error instanceof Error ? error.message : String(error) },
57
60
  "comply_test_controller list_scenarios failed \u2014 treating as unavailable"
@@ -1101,26 +1101,22 @@ export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'frida
1101
1101
  export type DaypartTarget = {
1102
1102
  /**
1103
1103
  * Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
1104
- *
1105
- * @minItems 1
1106
1104
  */
1107
- days: [DayOfWeek, ...DayOfWeek[]];
1105
+ days: DayOfWeek[];
1108
1106
  /**
1109
1107
  * Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
1108
+ * @minimum 0
1109
+ * @maximum 23
1110
+ * @format int
1110
1111
  */
1111
- start_hour?: number;
1112
+ start_hour: number;
1112
1113
  /**
1113
1114
  * End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
1115
+ * @minimum 1
1116
+ * @maximum 24
1117
+ * @format int
1114
1118
  */
1115
- end_hour?: number;
1116
- /**
1117
- * Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
1118
- */
1119
- start_time?: string;
1120
- /**
1121
- * Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
1122
- */
1123
- end_time?: string;
1119
+ end_hour: number;
1124
1120
  /**
1125
1121
  * Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
1126
1122
  */
@@ -1129,29 +1125,23 @@ export type DaypartTarget = {
1129
1125
  * Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
1130
1126
  */
1131
1127
  label?: string;
1132
- } & ({} | {}) & {
1128
+ start_time?: never;
1129
+ end_time?: never;
1130
+ } | {
1133
1131
  /**
1134
1132
  * Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
1135
- *
1136
- * @minItems 1
1137
- */
1138
- days: [DayOfWeek, ...DayOfWeek[]];
1139
- /**
1140
- * Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
1141
- */
1142
- start_hour?: number;
1143
- /**
1144
- * End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
1145
1133
  */
1146
- end_hour?: number;
1134
+ days: DayOfWeek[];
1147
1135
  /**
1148
1136
  * Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
1137
+ * @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
1149
1138
  */
1150
- start_time?: string;
1139
+ start_time: string;
1151
1140
  /**
1152
1141
  * Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
1142
+ * @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
1153
1143
  */
1154
- end_time?: string;
1144
+ end_time: string;
1155
1145
  /**
1156
1146
  * Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
1157
1147
  */
@@ -1160,7 +1150,9 @@ export type DaypartTarget = {
1160
1150
  * Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
1161
1151
  */
1162
1152
  label?: string;
1163
- } & ({} | {});
1153
+ start_hour?: never;
1154
+ end_hour?: never;
1155
+ };
1164
1156
 
1165
1157
  /**
1166
1158
  * Seller-authored integrity pin over one third-party-published definition that a proposal's commercial_terms reference: a publisher-catalog format option, publisher-catalog placement, adagents.json collection, or data-provider signal. content_digest is the lowercase-hex SHA-256 of the RFC 8785 (JCS) serialization of the kind's closed projection of the published entry, defined normatively in docs/media-buy/specification.mdx#definition-pins. Pins live inside commercial_terms, so terms_digest covers the pin but not the definition it names: a published definition can change while terms_digest still verifies, and re-verifying the pin is what detects it. Request inputs never carry pins.
@@ -31,4 +31,4 @@ export type AssetInstance = AssetVariant;
31
31
  * switch-case helpers.
32
32
  */
33
33
  export type AssetInstanceType = AssetInstance['asset_type'];
34
- export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
34
+ export type { AssetVariant, ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
@@ -31,4 +31,4 @@ export type AssetInstance = AssetVariant;
31
31
  * switch-case helpers.
32
32
  */
33
33
  export type AssetInstanceType = AssetInstance['asset_type'];
34
- export type { ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
34
+ export type { AssetVariant, ImageAsset, VideoAsset, AudioAsset, TextAsset, HTMLAsset, URLAsset, CSSAsset, JavaScriptAsset, MarkdownAsset, VASTAsset, DAASTAsset, BriefAsset, VideoBriefAsset, CatalogAsset, WebhookAsset, ZipAsset, PublishedPostAsset, CardAsset, PixelTrackerAsset, VASTTrackerAsset, DAASTTrackerAsset, DisplayTagAsset, };
@@ -1177,26 +1177,22 @@ export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'frida
1177
1177
  export type DaypartTarget = {
1178
1178
  /**
1179
1179
  * Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
1180
- *
1181
- * @minItems 1
1182
1180
  */
1183
- days: [DayOfWeek, ...DayOfWeek[]];
1181
+ days: DayOfWeek[];
1184
1182
  /**
1185
1183
  * Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
1184
+ * @minimum 0
1185
+ * @maximum 23
1186
+ * @format int
1186
1187
  */
1187
- start_hour?: number;
1188
+ start_hour: number;
1188
1189
  /**
1189
1190
  * End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
1191
+ * @minimum 1
1192
+ * @maximum 24
1193
+ * @format int
1190
1194
  */
1191
- end_hour?: number;
1192
- /**
1193
- * Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
1194
- */
1195
- start_time?: string;
1196
- /**
1197
- * Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
1198
- */
1199
- end_time?: string;
1195
+ end_hour: number;
1200
1196
  /**
1201
1197
  * Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
1202
1198
  */
@@ -1205,29 +1201,23 @@ export type DaypartTarget = {
1205
1201
  * Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
1206
1202
  */
1207
1203
  label?: string;
1208
- } & ({} | {}) & {
1204
+ start_time?: never;
1205
+ end_time?: never;
1206
+ } | {
1209
1207
  /**
1210
1208
  * Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
1211
- *
1212
- * @minItems 1
1213
- */
1214
- days: [DayOfWeek, ...DayOfWeek[]];
1215
- /**
1216
- * Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
1217
- */
1218
- start_hour?: number;
1219
- /**
1220
- * End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
1221
1209
  */
1222
- end_hour?: number;
1210
+ days: DayOfWeek[];
1223
1211
  /**
1224
1212
  * Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
1213
+ * @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
1225
1214
  */
1226
- start_time?: string;
1215
+ start_time: string;
1227
1216
  /**
1228
1217
  * Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
1218
+ * @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
1229
1219
  */
1230
- end_time?: string;
1220
+ end_time: string;
1231
1221
  /**
1232
1222
  * Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
1233
1223
  */
@@ -1236,7 +1226,9 @@ export type DaypartTarget = {
1236
1226
  * Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
1237
1227
  */
1238
1228
  label?: string;
1239
- } & ({} | {});
1229
+ start_hour?: never;
1230
+ end_hour?: never;
1231
+ };
1240
1232
 
1241
1233
  /**
1242
1234
  * Restrict delivery to specific time windows. Each entry specifies days of week, an hour range, and an optional timezone that defaults to inventory_local. A concrete IANA zone uses one shared civil-time clock, while inventory_local evaluates each inventory unit in its seller-assigned local timezone. Entries are independent and MAY use different clocks.
@@ -1608,26 +1608,22 @@ export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'frida
1608
1608
  export type DaypartTarget = {
1609
1609
  /**
1610
1610
  * Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
1611
- *
1612
- * @minItems 1
1613
1611
  */
1614
- days: [DayOfWeek, ...DayOfWeek[]];
1612
+ days: DayOfWeek[];
1615
1613
  /**
1616
1614
  * Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
1615
+ * @minimum 0
1616
+ * @maximum 23
1617
+ * @format int
1617
1618
  */
1618
- start_hour?: number;
1619
+ start_hour: number;
1619
1620
  /**
1620
1621
  * End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
1622
+ * @minimum 1
1623
+ * @maximum 24
1624
+ * @format int
1621
1625
  */
1622
- end_hour?: number;
1623
- /**
1624
- * Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
1625
- */
1626
- start_time?: string;
1627
- /**
1628
- * Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
1629
- */
1630
- end_time?: string;
1626
+ end_hour: number;
1631
1627
  /**
1632
1628
  * Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
1633
1629
  */
@@ -1636,29 +1632,23 @@ export type DaypartTarget = {
1636
1632
  * Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
1637
1633
  */
1638
1634
  label?: string;
1639
- } & ({} | {}) & {
1635
+ start_time?: never;
1636
+ end_time?: never;
1637
+ } | {
1640
1638
  /**
1641
1639
  * Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.
1642
- *
1643
- * @minItems 1
1644
- */
1645
- days: [DayOfWeek, ...DayOfWeek[]];
1646
- /**
1647
- * Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.
1648
- */
1649
- start_hour?: number;
1650
- /**
1651
- * End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.
1652
1640
  */
1653
- end_hour?: number;
1641
+ days: DayOfWeek[];
1654
1642
  /**
1655
1643
  * Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.
1644
+ * @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
1656
1645
  */
1657
- start_time?: string;
1646
+ start_time: string;
1658
1647
  /**
1659
1648
  * Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.
1649
+ * @pattern ^([01][0-9]|2[0-3]):[0-5][0-9]$
1660
1650
  */
1661
- end_time?: string;
1651
+ end_time: string;
1662
1652
  /**
1663
1653
  * Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.
1664
1654
  */
@@ -1667,7 +1657,9 @@ export type DaypartTarget = {
1667
1657
  * Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')
1668
1658
  */
1669
1659
  label?: string;
1670
- } & ({} | {});
1660
+ start_hour?: never;
1661
+ end_hour?: never;
1662
+ };
1671
1663
 
1672
1664
  /**
1673
1665
  * Seller-authored integrity pin over one third-party-published definition that a proposal's commercial_terms reference: a publisher-catalog format option, publisher-catalog placement, adagents.json collection, or data-provider signal. content_digest is the lowercase-hex SHA-256 of the RFC 8785 (JCS) serialization of the kind's closed projection of the published entry, defined normatively in docs/media-buy/specification.mdx#definition-pins. Pins live inside commercial_terms, so terms_digest covers the pin but not the definition it names: a published definition can change while terms_digest still verifies, and re-verifying the pin is what detects it. Request inputs never carry pins.