@adcp/sdk 16.0.0-beta.7 → 16.0.0-beta.9

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 (408) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +20 -0
  3. package/bin/adcp.js +10 -13
  4. package/dist/lib/conformance/index.d.mts +2 -0
  5. package/dist/lib/conformance/index.d.ts +2 -0
  6. package/dist/lib/conformance/index.js +3 -0
  7. package/dist/lib/conformance/index.mjs +2 -0
  8. package/dist/lib/conformance/property-lists.d.mts +14 -0
  9. package/dist/lib/conformance/property-lists.d.ts +14 -0
  10. package/dist/lib/conformance/property-lists.js +45 -0
  11. package/dist/lib/conformance/property-lists.mjs +21 -0
  12. package/dist/lib/conformance/runConformance.js +20 -1
  13. package/dist/lib/conformance/runConformance.mjs +20 -1
  14. package/dist/lib/conformance/types.d.mts +3 -0
  15. package/dist/lib/conformance/types.d.ts +3 -0
  16. package/dist/lib/core/AgentClient.d.mts +8 -5
  17. package/dist/lib/core/AgentClient.d.ts +8 -5
  18. package/dist/lib/core/AgentClient.js +9 -4
  19. package/dist/lib/core/AgentClient.mjs +9 -4
  20. package/dist/lib/core/SingleAgentClient.d.mts +32 -115
  21. package/dist/lib/core/SingleAgentClient.d.ts +32 -115
  22. package/dist/lib/core/SingleAgentClient.js +379 -273
  23. package/dist/lib/core/SingleAgentClient.mjs +387 -275
  24. package/dist/lib/core/TaskExecutor.d.mts +1 -16
  25. package/dist/lib/core/TaskExecutor.d.ts +1 -16
  26. package/dist/lib/core/TaskExecutor.js +34 -51
  27. package/dist/lib/core/TaskExecutor.mjs +12 -29
  28. package/dist/lib/core/product-cache.d.mts +3 -1
  29. package/dist/lib/core/product-cache.d.ts +3 -1
  30. package/dist/lib/core/product-cache.js +2 -1
  31. package/dist/lib/core/product-cache.mjs +2 -1
  32. package/dist/lib/errors/index.d.mts +2 -8
  33. package/dist/lib/errors/index.d.ts +2 -8
  34. package/dist/lib/errors/index.js +4 -4
  35. package/dist/lib/errors/index.mjs +4 -4
  36. package/dist/lib/identifiers.d.mts +53 -0
  37. package/dist/lib/identifiers.d.ts +53 -0
  38. package/dist/lib/identifiers.js +212 -0
  39. package/dist/lib/identifiers.mjs +163 -0
  40. package/dist/lib/index.d.mts +7 -5
  41. package/dist/lib/index.d.ts +7 -5
  42. package/dist/lib/index.js +2 -14
  43. package/dist/lib/index.mjs +1 -14
  44. package/dist/lib/media-buy/compatibility.d.mts +1 -1
  45. package/dist/lib/media-buy/compatibility.d.ts +1 -1
  46. package/dist/lib/media-buy/compatibility.js +26 -45
  47. package/dist/lib/media-buy/compatibility.mjs +26 -45
  48. package/dist/lib/media-buy/index.d.mts +1 -1
  49. package/dist/lib/media-buy/index.d.ts +1 -1
  50. package/dist/lib/media-buy/legacy-purchase-continuation.d.mts +2 -2
  51. package/dist/lib/media-buy/legacy-purchase-continuation.d.ts +2 -2
  52. package/dist/lib/media-buy/property-policy.d.mts +15 -1
  53. package/dist/lib/media-buy/property-policy.d.ts +15 -1
  54. package/dist/lib/media-buy/property-policy.js +135 -3
  55. package/dist/lib/media-buy/property-policy.mjs +134 -3
  56. package/dist/lib/protocols/index.js +14 -22
  57. package/dist/lib/protocols/index.mjs +5 -13
  58. package/dist/lib/registry/index.d.mts +12 -0
  59. package/dist/lib/registry/index.d.ts +12 -0
  60. package/dist/lib/registry/index.js +159 -5
  61. package/dist/lib/registry/index.mjs +156 -4
  62. package/dist/lib/registry/types.d.mts +26 -2
  63. package/dist/lib/registry/types.d.ts +26 -2
  64. package/dist/lib/registry/types.generated.d.mts +51 -11
  65. package/dist/lib/registry/types.generated.d.ts +51 -11
  66. package/dist/lib/reporting/source/conformance.d.mts +8 -8
  67. package/dist/lib/reporting/source/conformance.d.ts +8 -8
  68. package/dist/lib/reporting/source/manifest.d.mts +27 -27
  69. package/dist/lib/reporting/source/manifest.d.ts +27 -27
  70. package/dist/lib/server/create-adcp-server.js +6 -0
  71. package/dist/lib/server/create-adcp-server.mjs +6 -0
  72. package/dist/lib/server/decisioning/specialisms/lists.d.mts +4 -4
  73. package/dist/lib/server/decisioning/specialisms/lists.d.ts +4 -4
  74. package/dist/lib/server/index.d.mts +3 -0
  75. package/dist/lib/server/index.d.ts +3 -0
  76. package/dist/lib/server/index.js +8 -1
  77. package/dist/lib/server/index.mjs +4 -0
  78. package/dist/lib/server/property-lists.d.mts +36 -0
  79. package/dist/lib/server/property-lists.d.ts +36 -0
  80. package/dist/lib/server/property-lists.js +154 -0
  81. package/dist/lib/server/property-lists.mjs +129 -0
  82. package/dist/lib/server/targeting-helpers.d.mts +2 -0
  83. package/dist/lib/server/targeting-helpers.d.ts +2 -0
  84. package/dist/lib/server/targeting-helpers.js +28 -1
  85. package/dist/lib/server/targeting-helpers.mjs +18 -1
  86. package/dist/lib/signing/parser.js +2 -2
  87. package/dist/lib/signing/parser.mjs +2 -2
  88. package/dist/lib/signing/server.d.mts +1 -1
  89. package/dist/lib/signing/server.d.ts +1 -1
  90. package/dist/lib/signing/server.mjs +5 -1
  91. package/dist/lib/signing/webhook-verifier.d.mts +11 -0
  92. package/dist/lib/signing/webhook-verifier.d.ts +11 -0
  93. package/dist/lib/signing/webhook-verifier.js +11 -3
  94. package/dist/lib/signing/webhook-verifier.mjs +11 -3
  95. package/dist/lib/supply-path/verify.js +12 -2
  96. package/dist/lib/supply-path/verify.mjs +2 -2
  97. package/dist/lib/testing/compliance/comply.js +0 -8
  98. package/dist/lib/testing/compliance/comply.mjs +0 -8
  99. package/dist/lib/testing/compliance/storyboard-tracks.js +11 -0
  100. package/dist/lib/testing/compliance/storyboard-tracks.mjs +11 -0
  101. package/dist/lib/testing/index.d.mts +2 -0
  102. package/dist/lib/testing/index.d.ts +2 -0
  103. package/dist/lib/testing/index.js +5 -0
  104. package/dist/lib/testing/index.mjs +3 -0
  105. package/dist/lib/testing/scenarios/capabilities.d.mts +2 -2
  106. package/dist/lib/testing/scenarios/capabilities.d.ts +2 -2
  107. package/dist/lib/testing/scenarios/capabilities.js +8 -41
  108. package/dist/lib/testing/scenarios/capabilities.mjs +9 -42
  109. package/dist/lib/testing/storyboard/creative-build-probe.d.mts +34 -0
  110. package/dist/lib/testing/storyboard/creative-build-probe.d.ts +34 -0
  111. package/dist/lib/testing/storyboard/creative-build-probe.js +395 -0
  112. package/dist/lib/testing/storyboard/creative-build-probe.mjs +373 -0
  113. package/dist/lib/testing/storyboard/index.d.mts +2 -0
  114. package/dist/lib/testing/storyboard/index.d.ts +2 -0
  115. package/dist/lib/testing/storyboard/index.js +5 -0
  116. package/dist/lib/testing/storyboard/index.mjs +3 -0
  117. package/dist/lib/testing/storyboard/loader.js +12 -0
  118. package/dist/lib/testing/storyboard/loader.mjs +12 -0
  119. package/dist/lib/testing/storyboard/property-list-reference.d.mts +15 -0
  120. package/dist/lib/testing/storyboard/property-list-reference.d.ts +15 -0
  121. package/dist/lib/testing/storyboard/property-list-reference.js +514 -0
  122. package/dist/lib/testing/storyboard/property-list-reference.mjs +487 -0
  123. package/dist/lib/testing/storyboard/runner.js +318 -58
  124. package/dist/lib/testing/storyboard/runner.mjs +322 -58
  125. package/dist/lib/testing/storyboard/types.d.mts +38 -16
  126. package/dist/lib/testing/storyboard/types.d.ts +38 -16
  127. package/dist/lib/testing/storyboard/types.js +1 -0
  128. package/dist/lib/testing/storyboard/types.mjs +1 -0
  129. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  130. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  131. package/dist/lib/testing/storyboard/validations.js +64 -0
  132. package/dist/lib/testing/storyboard/validations.mjs +67 -1
  133. package/dist/lib/testing/types.d.mts +15 -1
  134. package/dist/lib/testing/types.d.ts +15 -1
  135. package/dist/lib/types/schemas.generated.d.ts +65 -65
  136. package/dist/lib/types/wellknown-schemas.generated.d.mts +21 -21
  137. package/dist/lib/types/wellknown-schemas.generated.d.ts +21 -21
  138. package/dist/lib/utils/adcp-version-config.js +6 -0
  139. package/dist/lib/utils/adcp-version-config.mjs +6 -0
  140. package/dist/lib/utils/capabilities.d.mts +7 -9
  141. package/dist/lib/utils/capabilities.d.ts +7 -9
  142. package/dist/lib/utils/capabilities.js +14 -28
  143. package/dist/lib/utils/capabilities.mjs +14 -27
  144. package/dist/lib/utils/creative-adapter.d.mts +15 -113
  145. package/dist/lib/utils/creative-adapter.d.ts +15 -113
  146. package/dist/lib/utils/creative-adapter.js +7 -106
  147. package/dist/lib/utils/creative-adapter.mjs +7 -102
  148. package/dist/lib/utils/format-renders.d.mts +20 -80
  149. package/dist/lib/utils/format-renders.d.ts +20 -80
  150. package/dist/lib/utils/format-renders.js +7 -67
  151. package/dist/lib/utils/format-renders.mjs +7 -66
  152. package/dist/lib/utils/index.d.mts +1 -2
  153. package/dist/lib/utils/index.d.ts +1 -2
  154. package/dist/lib/utils/index.js +0 -7
  155. package/dist/lib/utils/index.mjs +0 -6
  156. package/dist/lib/utils/preview-normalizer.d.mts +31 -80
  157. package/dist/lib/utils/preview-normalizer.d.ts +31 -80
  158. package/dist/lib/utils/preview-normalizer.js +5 -50
  159. package/dist/lib/utils/preview-normalizer.mjs +5 -49
  160. package/dist/lib/utils/pricing-adapter.d.mts +2 -36
  161. package/dist/lib/utils/pricing-adapter.d.ts +2 -36
  162. package/dist/lib/utils/pricing-adapter.js +0 -105
  163. package/dist/lib/utils/pricing-adapter.mjs +0 -100
  164. package/dist/lib/utils/request-normalizer.d.mts +1 -2
  165. package/dist/lib/utils/request-normalizer.d.ts +1 -2
  166. package/dist/lib/v2/projection/creative-delivery.d.mts +2 -0
  167. package/dist/lib/v2/projection/creative-delivery.d.ts +2 -0
  168. package/dist/lib/v2/projection/creative-delivery.js +7 -0
  169. package/dist/lib/v2/projection/creative-delivery.mjs +6 -0
  170. package/dist/lib/v2/projection/legacy-metadata.d.mts +12 -0
  171. package/dist/lib/v2/projection/legacy-metadata.d.ts +12 -0
  172. package/dist/lib/v2/projection/legacy-metadata.js +41 -1
  173. package/dist/lib/v2/projection/legacy-metadata.mjs +37 -1
  174. package/dist/lib/v2/projection/legacy-normalization.d.mts +1 -1
  175. package/dist/lib/v2/projection/legacy-normalization.d.ts +1 -1
  176. package/dist/lib/v2/projection/v1-to-v2.js +13 -0
  177. package/dist/lib/v2/projection/v1-to-v2.mjs +14 -0
  178. package/dist/lib/validation/client-hooks.d.mts +1 -4
  179. package/dist/lib/validation/client-hooks.d.ts +1 -4
  180. package/dist/lib/validation/get-products-request.d.mts +1 -1
  181. package/dist/lib/validation/get-products-request.d.ts +1 -1
  182. package/dist/lib/validation/schema-loader.js +6 -0
  183. package/dist/lib/validation/schema-loader.mjs +6 -0
  184. package/dist/lib/validation/schema-validator.js +1 -26
  185. package/dist/lib/validation/schema-validator.mjs +1 -26
  186. package/dist/lib/version.d.mts +5 -5
  187. package/dist/lib/version.d.ts +5 -5
  188. package/dist/lib/version.js +3 -5
  189. package/dist/lib/version.mjs +3 -5
  190. package/docs/TYPE-SUMMARY.md +2 -2
  191. package/docs/development/PROTOCOL_DIFFERENCES.md +1 -1
  192. package/docs/guides/CONFORMANCE.md +25 -0
  193. package/docs/guides/CREATIVE-BUILD-PROBE.md +156 -0
  194. package/docs/guides/CREATIVE-DELIVERY.md +45 -6
  195. package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +15 -18
  196. package/docs/guides/PROPERTY-LISTS.md +264 -0
  197. package/docs/guides/SIGNING-GUIDE.md +25 -0
  198. package/docs/guides/VALIDATE-YOUR-AGENT.md +5 -0
  199. package/docs/llms.txt +2 -2
  200. package/docs/migration-13-to-14.md +20 -16
  201. package/docs/migration-14.x-rc-worksheet.md +5 -5
  202. package/docs/migration-4.x-to-5.x.md +12 -7
  203. package/docs/migration-drop-adcp-2.md +25 -0
  204. package/package.json +3 -18
  205. package/skills/call-adcp-agent/SKILL.md +23 -25
  206. package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.mts +0 -3
  207. package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts +0 -3
  208. package/dist/lib/adapters/legacy/v2-5/create_media_buy.js +0 -33
  209. package/dist/lib/adapters/legacy/v2-5/create_media_buy.mjs +0 -9
  210. package/dist/lib/adapters/legacy/v2-5/get_products.d.mts +0 -8
  211. package/dist/lib/adapters/legacy/v2-5/get_products.d.ts +0 -8
  212. package/dist/lib/adapters/legacy/v2-5/get_products.js +0 -33
  213. package/dist/lib/adapters/legacy/v2-5/get_products.mjs +0 -9
  214. package/dist/lib/adapters/legacy/v2-5/index.d.mts +0 -34
  215. package/dist/lib/adapters/legacy/v2-5/index.d.ts +0 -34
  216. package/dist/lib/adapters/legacy/v2-5/index.js +0 -50
  217. package/dist/lib/adapters/legacy/v2-5/index.mjs +0 -25
  218. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.mts +0 -8
  219. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts +0 -8
  220. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js +0 -33
  221. package/dist/lib/adapters/legacy/v2-5/list_creative_formats.mjs +0 -9
  222. package/dist/lib/adapters/legacy/v2-5/preview_creative.d.mts +0 -3
  223. package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts +0 -3
  224. package/dist/lib/adapters/legacy/v2-5/preview_creative.js +0 -33
  225. package/dist/lib/adapters/legacy/v2-5/preview_creative.mjs +0 -9
  226. package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.mts +0 -11
  227. package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +0 -11
  228. package/dist/lib/adapters/legacy/v2-5/sync_creatives.js +0 -32
  229. package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs +0 -8
  230. package/dist/lib/adapters/legacy/v2-5/types.d.mts +0 -39
  231. package/dist/lib/adapters/legacy/v2-5/types.d.ts +0 -39
  232. package/dist/lib/adapters/legacy/v2-5/types.js +0 -16
  233. package/dist/lib/adapters/legacy/v2-5/types.mjs +0 -0
  234. package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.mts +0 -3
  235. package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts +0 -3
  236. package/dist/lib/adapters/legacy/v2-5/update_media_buy.js +0 -35
  237. package/dist/lib/adapters/legacy/v2-5/update_media_buy.mjs +0 -11
  238. package/dist/lib/schemas-data/v2.5/_provenance.json +0 -8
  239. package/dist/lib/schemas-data/v2.5/adagents.json +0 -494
  240. package/dist/lib/schemas-data/v2.5/core/activation-key.json +0 -50
  241. package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +0 -32
  242. package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +0 -21
  243. package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +0 -87
  244. package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +0 -21
  245. package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +0 -38
  246. package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +0 -21
  247. package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +0 -31
  248. package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +0 -21
  249. package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +0 -26
  250. package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +0 -87
  251. package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +0 -44
  252. package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +0 -71
  253. package/dist/lib/schemas-data/v2.5/core/async-response-data.json +0 -88
  254. package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +0 -33
  255. package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +0 -409
  256. package/dist/lib/schemas-data/v2.5/core/context.json +0 -8
  257. package/dist/lib/schemas-data/v2.5/core/creative-asset.json +0 -125
  258. package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +0 -31
  259. package/dist/lib/schemas-data/v2.5/core/creative-filters.json +0 -111
  260. package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +0 -72
  261. package/dist/lib/schemas-data/v2.5/core/creative-policy.json +0 -27
  262. package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +0 -171
  263. package/dist/lib/schemas-data/v2.5/core/deployment.json +0 -93
  264. package/dist/lib/schemas-data/v2.5/core/destination.json +0 -53
  265. package/dist/lib/schemas-data/v2.5/core/error.json +0 -40
  266. package/dist/lib/schemas-data/v2.5/core/ext.json +0 -8
  267. package/dist/lib/schemas-data/v2.5/core/format-id.json +0 -47
  268. package/dist/lib/schemas-data/v2.5/core/format.json +0 -324
  269. package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +0 -18
  270. package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +0 -152
  271. package/dist/lib/schemas-data/v2.5/core/measurement.json +0 -48
  272. package/dist/lib/schemas-data/v2.5/core/media-buy.json +0 -62
  273. package/dist/lib/schemas-data/v2.5/core/package.json +0 -72
  274. package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +0 -90
  275. package/dist/lib/schemas-data/v2.5/core/placement.json +0 -34
  276. package/dist/lib/schemas-data/v2.5/core/pricing-option.json +0 -35
  277. package/dist/lib/schemas-data/v2.5/core/product-filters.json +0 -102
  278. package/dist/lib/schemas-data/v2.5/core/product.json +0 -153
  279. package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +0 -115
  280. package/dist/lib/schemas-data/v2.5/core/promoted-products.json +0 -67
  281. package/dist/lib/schemas-data/v2.5/core/property-id.json +0 -14
  282. package/dist/lib/schemas-data/v2.5/core/property-tag.json +0 -16
  283. package/dist/lib/schemas-data/v2.5/core/property.json +0 -62
  284. package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +0 -146
  285. package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +0 -92
  286. package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +0 -48
  287. package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +0 -71
  288. package/dist/lib/schemas-data/v2.5/core/response.json +0 -24
  289. package/dist/lib/schemas-data/v2.5/core/signal-filters.json +0 -35
  290. package/dist/lib/schemas-data/v2.5/core/start-timing.json +0 -18
  291. package/dist/lib/schemas-data/v2.5/core/sub-asset.json +0 -79
  292. package/dist/lib/schemas-data/v2.5/core/targeting.json +0 -50
  293. package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +0 -43
  294. package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +0 -166
  295. package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +0 -192
  296. package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +0 -183
  297. package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +0 -101
  298. package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +0 -73
  299. package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +0 -61
  300. package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +0 -164
  301. package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +0 -245
  302. package/dist/lib/schemas-data/v2.5/creative/preview-render.json +0 -225
  303. package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +0 -11
  304. package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +0 -22
  305. package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +0 -11
  306. package/dist/lib/schemas-data/v2.5/enums/available-metric.json +0 -18
  307. package/dist/lib/schemas-data/v2.5/enums/channels.json +0 -18
  308. package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +0 -12
  309. package/dist/lib/schemas-data/v2.5/enums/creative-action.json +0 -14
  310. package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +0 -13
  311. package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +0 -15
  312. package/dist/lib/schemas-data/v2.5/enums/creative-status.json +0 -19
  313. package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +0 -20
  314. package/dist/lib/schemas-data/v2.5/enums/daast-version.json +0 -11
  315. package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +0 -15
  316. package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +0 -13
  317. package/dist/lib/schemas-data/v2.5/enums/feed-format.json +0 -12
  318. package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +0 -13
  319. package/dist/lib/schemas-data/v2.5/enums/format-category.json +0 -16
  320. package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +0 -11
  321. package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +0 -13
  322. package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +0 -11
  323. package/dist/lib/schemas-data/v2.5/enums/http-method.json +0 -11
  324. package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +0 -34
  325. package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +0 -12
  326. package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +0 -12
  327. package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +0 -11
  328. package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +0 -19
  329. package/dist/lib/schemas-data/v2.5/enums/metric-type.json +0 -17
  330. package/dist/lib/schemas-data/v2.5/enums/notification-type.json +0 -13
  331. package/dist/lib/schemas-data/v2.5/enums/pacing.json +0 -17
  332. package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +0 -11
  333. package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +0 -25
  334. package/dist/lib/schemas-data/v2.5/enums/property-type.json +0 -16
  335. package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +0 -19
  336. package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +0 -12
  337. package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +0 -12
  338. package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +0 -11
  339. package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +0 -103
  340. package/dist/lib/schemas-data/v2.5/enums/task-status.json +0 -29
  341. package/dist/lib/schemas-data/v2.5/enums/task-type.json +0 -27
  342. package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +0 -13
  343. package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +0 -12
  344. package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +0 -11
  345. package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +0 -25
  346. package/dist/lib/schemas-data/v2.5/enums/vast-version.json +0 -14
  347. package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +0 -13
  348. package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +0 -12
  349. package/dist/lib/schemas-data/v2.5/index.json +0 -604
  350. package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +0 -31
  351. package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +0 -65
  352. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +0 -31
  353. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +0 -16
  354. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +0 -36
  355. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +0 -126
  356. package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +0 -97
  357. package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +0 -54
  358. package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +0 -285
  359. package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +0 -38
  360. package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +0 -21
  361. package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +0 -34
  362. package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +0 -28
  363. package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +0 -33
  364. package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +0 -26
  365. package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +0 -70
  366. package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +0 -58
  367. package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +0 -61
  368. package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +0 -137
  369. package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +0 -437
  370. package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +0 -80
  371. package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +0 -88
  372. package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +0 -66
  373. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +0 -25
  374. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +0 -16
  375. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +0 -46
  376. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +0 -178
  377. package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +0 -149
  378. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +0 -24
  379. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +0 -16
  380. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +0 -36
  381. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +0 -129
  382. package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +0 -99
  383. package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +0 -52
  384. package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +0 -52
  385. package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +0 -81
  386. package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +0 -52
  387. package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +0 -73
  388. package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +0 -88
  389. package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +0 -93
  390. package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +0 -81
  391. package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +0 -52
  392. package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +0 -33
  393. package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +0 -32
  394. package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +0 -68
  395. package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +0 -59
  396. package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +0 -100
  397. package/dist/lib/types/v2-5/index.d.mts +0 -1
  398. package/dist/lib/types/v2-5/index.d.ts +0 -1
  399. package/dist/lib/types/v2-5/index.js +0 -22
  400. package/dist/lib/types/v2-5/index.mjs +0 -1
  401. package/dist/lib/types/v2-5/tools.generated.d.mts +0 -3568
  402. package/dist/lib/types/v2-5/tools.generated.d.ts +0 -3568
  403. package/dist/lib/types/v2-5/tools.generated.js +0 -16
  404. package/dist/lib/types/v2-5/tools.generated.mjs +0 -0
  405. package/dist/lib/utils/sync-creatives-adapter.d.mts +0 -33
  406. package/dist/lib/utils/sync-creatives-adapter.d.ts +0 -33
  407. package/dist/lib/utils/sync-creatives-adapter.js +0 -83
  408. package/dist/lib/utils/sync-creatives-adapter.mjs +0 -59
@@ -21,7 +21,7 @@
21
21
  * one-time fetch token sellers store in their secret manager; `delete_*`
22
22
  * revokes the token. Tokens are scoped per-seller for revocation.
23
23
  *
24
- * Status: Preview / 6.0.
24
+ * For standalone list-token reads, use registerPropertyListTool from @adcp/sdk/server.
25
25
  *
26
26
  * @public
27
27
  */
@@ -42,19 +42,19 @@ export type ListCollectionListsPayload = ServerPayload<ListCollectionListsRespon
42
42
  export type DeleteCollectionListPayload = ServerPayload<DeleteCollectionListResponse>;
43
43
  export interface PropertyListsPlatform<TCtxMeta = Record<string, unknown>> {
44
44
  /**
45
- * Create a property list. Returns a `fetch_token` the buyer stores in
45
+ * Create a property list. Returns an `auth_token` the buyer stores in
46
46
  * their secret manager. Token is scoped to this list_id; MUST NOT be
47
47
  * reused across lists.
48
48
  */
49
49
  createPropertyList(req: CreatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<CreatePropertyListPayload>;
50
50
  /** Patch an existing property list. */
51
51
  updatePropertyList(req: UpdatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<UpdatePropertyListPayload>;
52
- /** Read a property list by id. Sellers call this with the fetch_token. */
52
+ /** Read a property list by id. Sellers call this with the auth_token. */
53
53
  getPropertyList(req: GetPropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<GetPropertyListPayload>;
54
54
  /** Discover property lists the caller is authorized to read. */
55
55
  listPropertyLists(req: ListPropertyListsRequest, ctx: Ctx<TCtxMeta>): Promise<ListPropertyListsPayload>;
56
56
  /**
57
- * Delete a property list. MUST revoke the fetch_token immediately and
57
+ * Delete a property list. MUST revoke the auth_token immediately and
58
58
  * signal cache invalidation to sellers (reduced cache_valid_until or
59
59
  * a list-changed webhook). Compromise-driven revocation MUST also
60
60
  * trigger this path.
@@ -21,7 +21,7 @@
21
21
  * one-time fetch token sellers store in their secret manager; `delete_*`
22
22
  * revokes the token. Tokens are scoped per-seller for revocation.
23
23
  *
24
- * Status: Preview / 6.0.
24
+ * For standalone list-token reads, use registerPropertyListTool from @adcp/sdk/server.
25
25
  *
26
26
  * @public
27
27
  */
@@ -42,19 +42,19 @@ export type ListCollectionListsPayload = ServerPayload<ListCollectionListsRespon
42
42
  export type DeleteCollectionListPayload = ServerPayload<DeleteCollectionListResponse>;
43
43
  export interface PropertyListsPlatform<TCtxMeta = Record<string, unknown>> {
44
44
  /**
45
- * Create a property list. Returns a `fetch_token` the buyer stores in
45
+ * Create a property list. Returns an `auth_token` the buyer stores in
46
46
  * their secret manager. Token is scoped to this list_id; MUST NOT be
47
47
  * reused across lists.
48
48
  */
49
49
  createPropertyList(req: CreatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<CreatePropertyListPayload>;
50
50
  /** Patch an existing property list. */
51
51
  updatePropertyList(req: UpdatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<UpdatePropertyListPayload>;
52
- /** Read a property list by id. Sellers call this with the fetch_token. */
52
+ /** Read a property list by id. Sellers call this with the auth_token. */
53
53
  getPropertyList(req: GetPropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<GetPropertyListPayload>;
54
54
  /** Discover property lists the caller is authorized to read. */
55
55
  listPropertyLists(req: ListPropertyListsRequest, ctx: Ctx<TCtxMeta>): Promise<ListPropertyListsPayload>;
56
56
  /**
57
- * Delete a property list. MUST revoke the fetch_token immediately and
57
+ * Delete a property list. MUST revoke the auth_token immediately and
58
58
  * signal cache invalidation to sellers (reduced cache_valid_until or
59
59
  * a list-changed webhook). Compromise-driven revocation MUST also
60
60
  * trigger this path.
@@ -105,3 +105,6 @@ export { createDerivedAccountStore, type DerivedAccountStoreOptions, type Derive
105
105
  export { ConformanceClient, WebSocketTransport, type ConformanceClientOptions, type ConformanceStatus, } from './socket-mode/index.mjs';
106
106
  export { mediaBuyActionResolver } from './media-buy-action-resolver.mjs';
107
107
  export type { SellerActionDecision, SellerActionResolutionOptions, SellerActionResolution, } from './media-buy-action-resolver.mjs';
108
+ export * from '../identifiers.mjs';
109
+ export { registerPropertyListTool, sendPropertyListChanged } from './property-lists.mjs';
110
+ export type { PropertyListPage, PropertyListToolOptions, PropertyListChangedNotification, SendPropertyListChangedOptions, } from './property-lists.mjs';
@@ -105,3 +105,6 @@ export { createDerivedAccountStore, type DerivedAccountStoreOptions, type Derive
105
105
  export { ConformanceClient, WebSocketTransport, type ConformanceClientOptions, type ConformanceStatus, } from './socket-mode';
106
106
  export { mediaBuyActionResolver } from './media-buy-action-resolver';
107
107
  export type { SellerActionDecision, SellerActionResolutionOptions, SellerActionResolution, } from './media-buy-action-resolver';
108
+ export * from '../identifiers';
109
+ export { registerPropertyListTool, sendPropertyListChanged } from './property-lists';
110
+ export type { PropertyListPage, PropertyListToolOptions, PropertyListChangedNotification, SendPropertyListChangedOptions, } from './property-lists';
@@ -254,6 +254,7 @@ __export(server_exports, {
254
254
  redisWebhookDeliveryRecoveryBackend: () => import_webhook_delivery.redisWebhookDeliveryRecoveryBackend,
255
255
  redisWebhookDeliveryStore: () => import_webhook_delivery.redisWebhookDeliveryStore,
256
256
  registerAdcpTaskTool: () => import_tasks.registerAdcpTaskTool,
257
+ registerPropertyListTool: () => import_property_lists.registerPropertyListTool,
257
258
  registerTestController: () => import_test_controller.registerTestController,
258
259
  replaceAccountFinancialsIfSeeded: () => import_test_controller_bridge.replaceAccountFinancialsIfSeeded,
259
260
  requireAuthenticatedOrSigned: () => import_auth_signature.requireAuthenticatedOrSigned,
@@ -269,6 +270,7 @@ __export(server_exports, {
269
270
  scopeCtxMetadataKey: () => import_ctx_metadata.scopeCtxMetadataKey,
270
271
  scopedStore: () => import_state_store.scopedStore,
271
272
  scrubExtensions: () => import_wire_safe.scrubExtensions,
273
+ sendPropertyListChanged: () => import_property_lists.sendPropertyListChanged,
272
274
  serve: () => import_serve.serve,
273
275
  signatureErrorCodeFromCause: () => import_auth.signatureErrorCodeFromCause,
274
276
  stripCtxMetadata: () => import_ctx_metadata.stripCtxMetadata,
@@ -353,6 +355,8 @@ var import_keyed_account_backend = require('../adapters/keyed-account-backend.js
353
355
  var import_derived_account_store = require('../adapters/derived-account-store.js');
354
356
  var import_socket_mode = require('./socket-mode/index.js');
355
357
  var import_media_buy_action_resolver = require('./media-buy-action-resolver.js');
358
+ __reExport(server_exports, require('../identifiers.js'), module.exports);
359
+ var import_property_lists = require('./property-lists.js');
356
360
  // Annotate the CommonJS export names for ESM import in node:
357
361
  0 && (module.exports = {
358
362
  A2AInvocationError,
@@ -590,6 +594,7 @@ var import_media_buy_action_resolver = require('./media-buy-action-resolver.js')
590
594
  redisWebhookDeliveryRecoveryBackend,
591
595
  redisWebhookDeliveryStore,
592
596
  registerAdcpTaskTool,
597
+ registerPropertyListTool,
593
598
  registerTestController,
594
599
  replaceAccountFinancialsIfSeeded,
595
600
  requireAuthenticatedOrSigned,
@@ -605,6 +610,7 @@ var import_media_buy_action_resolver = require('./media-buy-action-resolver.js')
605
610
  scopeCtxMetadataKey,
606
611
  scopedStore,
607
612
  scrubExtensions,
613
+ sendPropertyListChanged,
608
614
  serve,
609
615
  signatureErrorCodeFromCause,
610
616
  stripCtxMetadata,
@@ -631,5 +637,6 @@ var import_media_buy_action_resolver = require('./media-buy-action-resolver.js')
631
637
  verifyProposalTermsDigest,
632
638
  verifySignatureAsAuthenticator,
633
639
  wrapEnvelope,
634
- ...require('./decisioning/index.js')
640
+ ...require('./decisioning/index.js'),
641
+ ...require('../identifiers.js')
635
642
  });
@@ -302,6 +302,8 @@ import {
302
302
  WebSocketTransport
303
303
  } from "./socket-mode/index.mjs";
304
304
  import { mediaBuyActionResolver } from "./media-buy-action-resolver.mjs";
305
+ export * from "../identifiers.mjs";
306
+ import { registerPropertyListTool, sendPropertyListChanged } from "./property-lists.mjs";
305
307
  export {
306
308
  A2AInvocationError,
307
309
  ACCOUNT_NOTIFICATION_TYPES,
@@ -538,6 +540,7 @@ export {
538
540
  redisWebhookDeliveryRecoveryBackend,
539
541
  redisWebhookDeliveryStore,
540
542
  registerAdcpTaskTool,
543
+ registerPropertyListTool,
541
544
  registerTestController,
542
545
  replaceAccountFinancialsIfSeeded,
543
546
  requireAuthenticatedOrSigned,
@@ -553,6 +556,7 @@ export {
553
556
  scopeCtxMetadataKey,
554
557
  scopedStore,
555
558
  scrubExtensions,
559
+ sendPropertyListChanged,
556
560
  serve,
557
561
  signatureErrorCodeFromCause,
558
562
  stripCtxMetadata,
@@ -0,0 +1,36 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { GetPropertyListRequest, GetPropertyListResponse } from '../types/tools.generated.mjs';
3
+ import type { WebhookEmitter, WebhookEmitParams, WebhookEmitResult } from './webhook-emitter.mjs';
4
+ export type PropertyListPage = Pick<GetPropertyListResponse, 'list' | 'identifiers' | 'pagination' | 'resolved_at' | 'cache_valid_until' | 'coverage_gaps'>;
5
+ export interface PropertyListToolOptions<TPrincipal> {
6
+ /** Verify this token's access to this exact list on every request/page. Return null/false to deny access. */
7
+ verifyToken: (input: {
8
+ listId: string;
9
+ token: string;
10
+ }) => TPrincipal | null | false | Promise<TPrincipal | null | false>;
11
+ /** Load an authorized page. Honor resolve:false without resolving identifiers. Cursors must be bound to the list and principal. */
12
+ loadPage: (request: GetPropertyListRequest, principal: TPrincipal) => Promise<PropertyListPage>;
13
+ }
14
+ /**
15
+ * Register a read-only MCP tool using per-list tokens, independently of normal
16
+ * platform account credentials. Tokens arrive through Authorization: Bearer
17
+ * or x-adcp-auth, never tool arguments. Mount on an MCP endpoint whose HTTP
18
+ * auth layer permits list tokens through to this verifier.
19
+ */
20
+ export declare function registerPropertyListTool<TPrincipal>(server: McpServer, options: PropertyListToolOptions<TPrincipal>): import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
21
+ export interface PropertyListChangedNotification {
22
+ list_id: string;
23
+ list_name?: string;
24
+ resolved_at: string;
25
+ cache_valid_until?: string;
26
+ change_summary?: {
27
+ properties_added?: number;
28
+ properties_removed?: number;
29
+ total_properties?: number;
30
+ };
31
+ }
32
+ export type SendPropertyListChangedOptions = Pick<WebhookEmitParams, 'url' | 'delivery_id' | 'retries' | 'attemptAuthorizationContext'> & {
33
+ notification: PropertyListChangedNotification;
34
+ };
35
+ /** Send a summary-only notification through the SDK's signed, retrying delivery kernel. Reuse delivery_id and notification for retries. */
36
+ export declare function sendPropertyListChanged(emitter: WebhookEmitter, options: SendPropertyListChangedOptions): Promise<WebhookEmitResult>;
@@ -0,0 +1,36 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { GetPropertyListRequest, GetPropertyListResponse } from '../types/tools.generated';
3
+ import type { WebhookEmitter, WebhookEmitParams, WebhookEmitResult } from './webhook-emitter';
4
+ export type PropertyListPage = Pick<GetPropertyListResponse, 'list' | 'identifiers' | 'pagination' | 'resolved_at' | 'cache_valid_until' | 'coverage_gaps'>;
5
+ export interface PropertyListToolOptions<TPrincipal> {
6
+ /** Verify this token's access to this exact list on every request/page. Return null/false to deny access. */
7
+ verifyToken: (input: {
8
+ listId: string;
9
+ token: string;
10
+ }) => TPrincipal | null | false | Promise<TPrincipal | null | false>;
11
+ /** Load an authorized page. Honor resolve:false without resolving identifiers. Cursors must be bound to the list and principal. */
12
+ loadPage: (request: GetPropertyListRequest, principal: TPrincipal) => Promise<PropertyListPage>;
13
+ }
14
+ /**
15
+ * Register a read-only MCP tool using per-list tokens, independently of normal
16
+ * platform account credentials. Tokens arrive through Authorization: Bearer
17
+ * or x-adcp-auth, never tool arguments. Mount on an MCP endpoint whose HTTP
18
+ * auth layer permits list tokens through to this verifier.
19
+ */
20
+ export declare function registerPropertyListTool<TPrincipal>(server: McpServer, options: PropertyListToolOptions<TPrincipal>): import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
21
+ export interface PropertyListChangedNotification {
22
+ list_id: string;
23
+ list_name?: string;
24
+ resolved_at: string;
25
+ cache_valid_until?: string;
26
+ change_summary?: {
27
+ properties_added?: number;
28
+ properties_removed?: number;
29
+ total_properties?: number;
30
+ };
31
+ }
32
+ export type SendPropertyListChangedOptions = Pick<WebhookEmitParams, 'url' | 'delivery_id' | 'retries' | 'attemptAuthorizationContext'> & {
33
+ notification: PropertyListChangedNotification;
34
+ };
35
+ /** Send a summary-only notification through the SDK's signed, retrying delivery kernel. Reuse delivery_id and notification for retries. */
36
+ export declare function sendPropertyListChanged(emitter: WebhookEmitter, options: SendPropertyListChangedOptions): Promise<WebhookEmitResult>;
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var property_lists_exports = {};
20
+ __export(property_lists_exports, {
21
+ registerPropertyListTool: () => registerPropertyListTool,
22
+ sendPropertyListChanged: () => sendPropertyListChanged
23
+ });
24
+ module.exports = __toCommonJS(property_lists_exports);
25
+ var import_zod = require("zod");
26
+ var import_schemas = require('../types/schemas.generated.js');
27
+ var import_wire_shape = require('./ctx-metadata/wire-shape.js');
28
+ function registerPropertyListTool(server, options) {
29
+ return server.registerTool(
30
+ "get_property_list",
31
+ {
32
+ description: "Retrieve an authorized property list and a page of resolved identifiers.",
33
+ inputSchema: import_schemas.GetPropertyListRequestSchema,
34
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true }
35
+ },
36
+ async (request, extra) => {
37
+ const denied = () => toolError("PERMISSION_DENIED", "Property list access denied.", request.context);
38
+ const headers = extra.requestInfo?.headers ?? {};
39
+ for (const name of ["authorization", "x-adcp-auth"]) {
40
+ const values = Object.entries(headers).filter(([key]) => key.toLowerCase() === name);
41
+ if (values.length > 1 || values.length === 1 && typeof values[0][1] !== "string") return denied();
42
+ }
43
+ const readHeader = (name) => {
44
+ const values = Object.entries(headers).filter(([key]) => key.toLowerCase() === name);
45
+ if (values.length !== 1 || typeof values[0][1] !== "string") return void 0;
46
+ return values[0][1];
47
+ };
48
+ const authorization = readHeader("authorization");
49
+ const bearer = authorization?.match(/^Bearer ([^\s]+)$/i)?.[1];
50
+ const adcpToken = readHeader("x-adcp-auth");
51
+ const authenticatedToken = extra.authInfo?.token;
52
+ const tokens = [bearer, adcpToken, authenticatedToken].filter((token) => token !== void 0);
53
+ if (!tokens.length || tokens.some((token) => !token || token !== tokens[0]) || authorization !== void 0 && !bearer)
54
+ return denied();
55
+ let principal;
56
+ try {
57
+ principal = await options.verifyToken({ listId: request.list_id, token: tokens[0] });
58
+ } catch {
59
+ return denied();
60
+ }
61
+ if (principal === null || principal === false || principal === void 0) return denied();
62
+ try {
63
+ const page = await options.loadPage(request, principal);
64
+ if (page.list.list_id !== request.list_id) throw new Error("Invalid list identity");
65
+ if (request.resolve !== false && !Array.isArray(page.identifiers))
66
+ throw new Error("Missing resolved identifiers");
67
+ const limit = request.pagination?.max_results ?? 1e3;
68
+ if (request.resolve !== false && (page.identifiers?.length ?? 0) > limit) throw new Error("Invalid page size");
69
+ if (page.pagination?.has_more && !page.pagination.cursor) throw new Error("Missing continuation cursor");
70
+ if (!page.pagination?.has_more && page.pagination?.cursor) throw new Error("Unexpected continuation cursor");
71
+ const payload = import_schemas.GetPropertyListResponseSchema.parse({
72
+ list: Object.fromEntries(
73
+ [
74
+ "list_id",
75
+ "name",
76
+ "description",
77
+ "account",
78
+ "base_properties",
79
+ "filters",
80
+ "brand",
81
+ "webhook_url",
82
+ "cache_duration_hours",
83
+ "created_at",
84
+ "updated_at",
85
+ "property_count",
86
+ "pricing_options"
87
+ ].filter((key) => Object.hasOwn(page.list, key)).map((key) => [key, page.list[key]])
88
+ ),
89
+ ...page.identifiers !== void 0 ? { identifiers: page.identifiers.map((identifier) => ({ type: identifier.type, value: identifier.value })) } : {},
90
+ ...page.pagination !== void 0 ? {
91
+ pagination: {
92
+ has_more: page.pagination.has_more,
93
+ cursor: page.pagination.cursor,
94
+ total_count: page.pagination.total_count
95
+ }
96
+ } : {},
97
+ ...page.resolved_at !== void 0 ? { resolved_at: page.resolved_at } : {},
98
+ ...page.cache_valid_until !== void 0 ? { cache_valid_until: page.cache_valid_until } : {},
99
+ ...page.coverage_gaps !== void 0 ? { coverage_gaps: page.coverage_gaps } : {},
100
+ status: "completed",
101
+ ...request.resolve === false ? { identifiers: void 0, pagination: void 0 } : {},
102
+ ...request.context ? { context: request.context } : {}
103
+ });
104
+ (0, import_wire_shape.stripCtxMetadata)({ property_list: payload.list });
105
+ return { content: [{ type: "text", text: JSON.stringify(payload) }], structuredContent: payload };
106
+ } catch {
107
+ return toolError("INTERNAL_ERROR", "Property list could not be loaded.", request.context);
108
+ }
109
+ }
110
+ );
111
+ }
112
+ function toolError(code, message, context) {
113
+ const payload = { status: "failed", errors: [{ code, message }], ...context !== void 0 ? { context } : {} };
114
+ return {
115
+ isError: true,
116
+ content: [{ type: "text", text: JSON.stringify(payload) }],
117
+ structuredContent: payload
118
+ };
119
+ }
120
+ async function sendPropertyListChanged(emitter, options) {
121
+ const { notification, ...delivery } = options;
122
+ const dateTime = import_zod.z.string().datetime({ offset: true });
123
+ if (!notification.list_id || !dateTime.safeParse(notification.resolved_at).success || notification.cache_valid_until !== void 0 && !dateTime.safeParse(notification.cache_valid_until).success) {
124
+ throw new TypeError("Property-list notifications require a list_id and valid timestamps");
125
+ }
126
+ const summary = notification.change_summary === void 0 ? void 0 : Object.fromEntries(
127
+ ["properties_added", "properties_removed", "total_properties"].filter(
128
+ (key) => Object.hasOwn(notification.change_summary, key) && notification.change_summary[key] !== void 0
129
+ ).map((key) => [key, notification.change_summary[key]])
130
+ );
131
+ for (const count of Object.values(summary ?? {})) {
132
+ if (typeof count !== "number" || !Number.isSafeInteger(count) || count < 0)
133
+ throw new TypeError("Property-list change counts must be nonnegative integers");
134
+ }
135
+ return emitter.emit({
136
+ ...delivery,
137
+ authentication: null,
138
+ signingProfile: "adcp/webhook-signing/v1",
139
+ payload: {
140
+ event: "property_list_changed",
141
+ list_id: notification.list_id,
142
+ resolved_at: notification.resolved_at,
143
+ ...notification.list_name !== void 0 ? { list_name: notification.list_name } : {},
144
+ ...notification.cache_valid_until !== void 0 ? { cache_valid_until: notification.cache_valid_until } : {},
145
+ ...summary !== void 0 ? { change_summary: summary } : {},
146
+ signature: "rfc9421"
147
+ }
148
+ });
149
+ }
150
+ // Annotate the CommonJS export names for ESM import in node:
151
+ 0 && (module.exports = {
152
+ registerPropertyListTool,
153
+ sendPropertyListChanged
154
+ });
@@ -0,0 +1,129 @@
1
+ import { z } from "zod";
2
+ import { GetPropertyListRequestSchema, GetPropertyListResponseSchema } from "../types/schemas.generated.mjs";
3
+ import { stripCtxMetadata } from "./ctx-metadata/wire-shape.mjs";
4
+ function registerPropertyListTool(server, options) {
5
+ return server.registerTool(
6
+ "get_property_list",
7
+ {
8
+ description: "Retrieve an authorized property list and a page of resolved identifiers.",
9
+ inputSchema: GetPropertyListRequestSchema,
10
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true }
11
+ },
12
+ async (request, extra) => {
13
+ const denied = () => toolError("PERMISSION_DENIED", "Property list access denied.", request.context);
14
+ const headers = extra.requestInfo?.headers ?? {};
15
+ for (const name of ["authorization", "x-adcp-auth"]) {
16
+ const values = Object.entries(headers).filter(([key]) => key.toLowerCase() === name);
17
+ if (values.length > 1 || values.length === 1 && typeof values[0][1] !== "string") return denied();
18
+ }
19
+ const readHeader = (name) => {
20
+ const values = Object.entries(headers).filter(([key]) => key.toLowerCase() === name);
21
+ if (values.length !== 1 || typeof values[0][1] !== "string") return void 0;
22
+ return values[0][1];
23
+ };
24
+ const authorization = readHeader("authorization");
25
+ const bearer = authorization?.match(/^Bearer ([^\s]+)$/i)?.[1];
26
+ const adcpToken = readHeader("x-adcp-auth");
27
+ const authenticatedToken = extra.authInfo?.token;
28
+ const tokens = [bearer, adcpToken, authenticatedToken].filter((token) => token !== void 0);
29
+ if (!tokens.length || tokens.some((token) => !token || token !== tokens[0]) || authorization !== void 0 && !bearer)
30
+ return denied();
31
+ let principal;
32
+ try {
33
+ principal = await options.verifyToken({ listId: request.list_id, token: tokens[0] });
34
+ } catch {
35
+ return denied();
36
+ }
37
+ if (principal === null || principal === false || principal === void 0) return denied();
38
+ try {
39
+ const page = await options.loadPage(request, principal);
40
+ if (page.list.list_id !== request.list_id) throw new Error("Invalid list identity");
41
+ if (request.resolve !== false && !Array.isArray(page.identifiers))
42
+ throw new Error("Missing resolved identifiers");
43
+ const limit = request.pagination?.max_results ?? 1e3;
44
+ if (request.resolve !== false && (page.identifiers?.length ?? 0) > limit) throw new Error("Invalid page size");
45
+ if (page.pagination?.has_more && !page.pagination.cursor) throw new Error("Missing continuation cursor");
46
+ if (!page.pagination?.has_more && page.pagination?.cursor) throw new Error("Unexpected continuation cursor");
47
+ const payload = GetPropertyListResponseSchema.parse({
48
+ list: Object.fromEntries(
49
+ [
50
+ "list_id",
51
+ "name",
52
+ "description",
53
+ "account",
54
+ "base_properties",
55
+ "filters",
56
+ "brand",
57
+ "webhook_url",
58
+ "cache_duration_hours",
59
+ "created_at",
60
+ "updated_at",
61
+ "property_count",
62
+ "pricing_options"
63
+ ].filter((key) => Object.hasOwn(page.list, key)).map((key) => [key, page.list[key]])
64
+ ),
65
+ ...page.identifiers !== void 0 ? { identifiers: page.identifiers.map((identifier) => ({ type: identifier.type, value: identifier.value })) } : {},
66
+ ...page.pagination !== void 0 ? {
67
+ pagination: {
68
+ has_more: page.pagination.has_more,
69
+ cursor: page.pagination.cursor,
70
+ total_count: page.pagination.total_count
71
+ }
72
+ } : {},
73
+ ...page.resolved_at !== void 0 ? { resolved_at: page.resolved_at } : {},
74
+ ...page.cache_valid_until !== void 0 ? { cache_valid_until: page.cache_valid_until } : {},
75
+ ...page.coverage_gaps !== void 0 ? { coverage_gaps: page.coverage_gaps } : {},
76
+ status: "completed",
77
+ ...request.resolve === false ? { identifiers: void 0, pagination: void 0 } : {},
78
+ ...request.context ? { context: request.context } : {}
79
+ });
80
+ stripCtxMetadata({ property_list: payload.list });
81
+ return { content: [{ type: "text", text: JSON.stringify(payload) }], structuredContent: payload };
82
+ } catch {
83
+ return toolError("INTERNAL_ERROR", "Property list could not be loaded.", request.context);
84
+ }
85
+ }
86
+ );
87
+ }
88
+ function toolError(code, message, context) {
89
+ const payload = { status: "failed", errors: [{ code, message }], ...context !== void 0 ? { context } : {} };
90
+ return {
91
+ isError: true,
92
+ content: [{ type: "text", text: JSON.stringify(payload) }],
93
+ structuredContent: payload
94
+ };
95
+ }
96
+ async function sendPropertyListChanged(emitter, options) {
97
+ const { notification, ...delivery } = options;
98
+ const dateTime = z.string().datetime({ offset: true });
99
+ if (!notification.list_id || !dateTime.safeParse(notification.resolved_at).success || notification.cache_valid_until !== void 0 && !dateTime.safeParse(notification.cache_valid_until).success) {
100
+ throw new TypeError("Property-list notifications require a list_id and valid timestamps");
101
+ }
102
+ const summary = notification.change_summary === void 0 ? void 0 : Object.fromEntries(
103
+ ["properties_added", "properties_removed", "total_properties"].filter(
104
+ (key) => Object.hasOwn(notification.change_summary, key) && notification.change_summary[key] !== void 0
105
+ ).map((key) => [key, notification.change_summary[key]])
106
+ );
107
+ for (const count of Object.values(summary ?? {})) {
108
+ if (typeof count !== "number" || !Number.isSafeInteger(count) || count < 0)
109
+ throw new TypeError("Property-list change counts must be nonnegative integers");
110
+ }
111
+ return emitter.emit({
112
+ ...delivery,
113
+ authentication: null,
114
+ signingProfile: "adcp/webhook-signing/v1",
115
+ payload: {
116
+ event: "property_list_changed",
117
+ list_id: notification.list_id,
118
+ resolved_at: notification.resolved_at,
119
+ ...notification.list_name !== void 0 ? { list_name: notification.list_name } : {},
120
+ ...notification.cache_valid_until !== void 0 ? { cache_valid_until: notification.cache_valid_until } : {},
121
+ ...summary !== void 0 ? { change_summary: summary } : {},
122
+ signature: "rfc9421"
123
+ }
124
+ });
125
+ }
126
+ export {
127
+ registerPropertyListTool,
128
+ sendPropertyListChanged
129
+ };
@@ -56,6 +56,8 @@ export declare const defaultResolvedListCache: ResolvedListCache;
56
56
  export declare function clearDefaultResolvedListCache(): void;
57
57
  export type ResolveListCallTool = (agentUrl: string, toolName: 'get_property_list' | 'get_collection_list', args: Record<string, unknown>, authToken?: string) => Promise<unknown>;
58
58
  export interface ResolveListOptions {
59
+ /** Require schema-valid property-list pages with identifiers when resolving. Used for certification. */
60
+ strictResponseValidation?: boolean;
59
61
  /** Maximum page size when calling get_property_list / get_collection_list. Defaults to 1000. */
60
62
  pageSize?: number;
61
63
  /** Maximum number of pages to walk before treating pagination as unsafe. Defaults to 100. */
@@ -56,6 +56,8 @@ export declare const defaultResolvedListCache: ResolvedListCache;
56
56
  export declare function clearDefaultResolvedListCache(): void;
57
57
  export type ResolveListCallTool = (agentUrl: string, toolName: 'get_property_list' | 'get_collection_list', args: Record<string, unknown>, authToken?: string) => Promise<unknown>;
58
58
  export interface ResolveListOptions {
59
+ /** Require schema-valid property-list pages with identifiers when resolving. Used for certification. */
60
+ strictResponseValidation?: boolean;
59
61
  /** Maximum page size when calling get_property_list / get_collection_list. Defaults to 1000. */
60
62
  pageSize?: number;
61
63
  /** Maximum number of pages to walk before treating pagination as unsafe. Defaults to 100. */
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var targeting_helpers_exports = {};
20
30
  __export(targeting_helpers_exports, {
@@ -75,7 +85,7 @@ async function resolvePropertyList(ref, options = {}) {
75
85
  const cache = cacheForOptions(options);
76
86
  const nowMs = nowMsForOptions(options);
77
87
  const cacheKey = resolvedListCacheKey("property", structurallyNormalizedRef, options);
78
- const cached = cacheKey ? cache?.get(cacheKey, nowMs) : void 0;
88
+ const cached = cacheKey && !options.strictResponseValidation ? cache?.get(cacheKey, nowMs) : void 0;
79
89
  if (cached) return cached;
80
90
  const normalizedRef = options.callTool ? structurallyNormalizedRef : await normalizePropertyListReference(structurallyNormalizedRef, { resolveDns: false });
81
91
  const result = await fetchResolvedPropertyList(normalizedRef, options);
@@ -89,6 +99,7 @@ async function fetchResolvedPropertyList(ref, options) {
89
99
  let cacheValidUntil;
90
100
  let missingCacheValidUntil = false;
91
101
  let cursor;
102
+ const seenCursors = /* @__PURE__ */ new Set();
92
103
  for (let pageIndex = 0; pageIndex < maxPagesForOptions(options); pageIndex += 1) {
93
104
  const args = buildResolveListArgs(ref.list_id, pageSizeForOptions(options), cursor);
94
105
  const raw = await callTool(ref.agent_url, "get_property_list", args, ref.auth_token);
@@ -96,6 +107,20 @@ async function fetchResolvedPropertyList(ref, options) {
96
107
  throw new Error("property_list_invalid_response");
97
108
  }
98
109
  const response = raw;
110
+ if (response.status !== void 0 && response.status !== "completed" || raw.errors !== void 0 && (!Array.isArray(raw.errors) || raw.errors.some((error) => !error || typeof error !== "object" || error.severity !== "warning")) || raw.adcp_error !== void 0 || !Array.isArray(response.identifiers)) {
111
+ throw new Error("property_list_invalid_response");
112
+ }
113
+ if (options.strictResponseValidation) {
114
+ const { GetPropertyListResponseSchema } = await import("../types/schemas.generated.js");
115
+ if (!GetPropertyListResponseSchema.safeParse(raw).success || response.status !== "completed" || response.identifiers.length > pageSizeForOptions(options)) {
116
+ throw new Error("property_list_invalid_response");
117
+ }
118
+ }
119
+ if (!response.list || response.list.list_id !== ref.list_id || response.identifiers !== void 0 && (!Array.isArray(response.identifiers) || response.identifiers.some(
120
+ (identifier) => !identifier || typeof identifier !== "object" || typeof identifier.type !== "string" || typeof identifier.value !== "string"
121
+ ))) {
122
+ throw new Error("property_list_invalid_response");
123
+ }
99
124
  listId = response.list.list_id;
100
125
  identifiers.push(...response.identifiers ?? []);
101
126
  if (typeof response.cache_valid_until === "string") {
@@ -118,6 +143,8 @@ async function fetchResolvedPropertyList(ref, options) {
118
143
  if (!pagination.cursor) {
119
144
  throw new Error("property_list_invalid_pagination");
120
145
  }
146
+ if (seenCursors.has(pagination.cursor)) throw new Error("property_list_invalid_pagination");
147
+ seenCursors.add(pagination.cursor);
121
148
  cursor = pagination.cursor;
122
149
  }
123
150
  throw new Error("property_list_pagination_limit_exceeded");
@@ -44,7 +44,7 @@ async function resolvePropertyList(ref, options = {}) {
44
44
  const cache = cacheForOptions(options);
45
45
  const nowMs = nowMsForOptions(options);
46
46
  const cacheKey = resolvedListCacheKey("property", structurallyNormalizedRef, options);
47
- const cached = cacheKey ? cache?.get(cacheKey, nowMs) : void 0;
47
+ const cached = cacheKey && !options.strictResponseValidation ? cache?.get(cacheKey, nowMs) : void 0;
48
48
  if (cached) return cached;
49
49
  const normalizedRef = options.callTool ? structurallyNormalizedRef : await normalizePropertyListReference(structurallyNormalizedRef, { resolveDns: false });
50
50
  const result = await fetchResolvedPropertyList(normalizedRef, options);
@@ -58,6 +58,7 @@ async function fetchResolvedPropertyList(ref, options) {
58
58
  let cacheValidUntil;
59
59
  let missingCacheValidUntil = false;
60
60
  let cursor;
61
+ const seenCursors = /* @__PURE__ */ new Set();
61
62
  for (let pageIndex = 0; pageIndex < maxPagesForOptions(options); pageIndex += 1) {
62
63
  const args = buildResolveListArgs(ref.list_id, pageSizeForOptions(options), cursor);
63
64
  const raw = await callTool(ref.agent_url, "get_property_list", args, ref.auth_token);
@@ -65,6 +66,20 @@ async function fetchResolvedPropertyList(ref, options) {
65
66
  throw new Error("property_list_invalid_response");
66
67
  }
67
68
  const response = raw;
69
+ if (response.status !== void 0 && response.status !== "completed" || raw.errors !== void 0 && (!Array.isArray(raw.errors) || raw.errors.some((error) => !error || typeof error !== "object" || error.severity !== "warning")) || raw.adcp_error !== void 0 || !Array.isArray(response.identifiers)) {
70
+ throw new Error("property_list_invalid_response");
71
+ }
72
+ if (options.strictResponseValidation) {
73
+ const { GetPropertyListResponseSchema } = await import("../types/schemas.generated.mjs");
74
+ if (!GetPropertyListResponseSchema.safeParse(raw).success || response.status !== "completed" || response.identifiers.length > pageSizeForOptions(options)) {
75
+ throw new Error("property_list_invalid_response");
76
+ }
77
+ }
78
+ if (!response.list || response.list.list_id !== ref.list_id || response.identifiers !== void 0 && (!Array.isArray(response.identifiers) || response.identifiers.some(
79
+ (identifier) => !identifier || typeof identifier !== "object" || typeof identifier.type !== "string" || typeof identifier.value !== "string"
80
+ ))) {
81
+ throw new Error("property_list_invalid_response");
82
+ }
68
83
  listId = response.list.list_id;
69
84
  identifiers.push(...response.identifiers ?? []);
70
85
  if (typeof response.cache_valid_until === "string") {
@@ -87,6 +102,8 @@ async function fetchResolvedPropertyList(ref, options) {
87
102
  if (!pagination.cursor) {
88
103
  throw new Error("property_list_invalid_pagination");
89
104
  }
105
+ if (seenCursors.has(pagination.cursor)) throw new Error("property_list_invalid_pagination");
106
+ seenCursors.add(pagination.cursor);
90
107
  cursor = pagination.cursor;
91
108
  }
92
109
  throw new Error("property_list_pagination_limit_exceeded");