@adcp/sdk 5.25.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/README.md +45 -7
  2. package/dist/lib/compliance-fixtures/index.d.ts +1 -1
  3. package/dist/lib/compliance-fixtures/index.js +1 -1
  4. package/dist/lib/conformance/runners.d.ts.map +1 -1
  5. package/dist/lib/conformance/runners.js +13 -1
  6. package/dist/lib/conformance/runners.js.map +1 -1
  7. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  8. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  9. package/dist/lib/core/SingleAgentClient.js +15 -0
  10. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  11. package/dist/lib/core/TaskExecutor.d.ts +7 -0
  12. package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
  13. package/dist/lib/core/TaskExecutor.js +9 -2
  14. package/dist/lib/core/TaskExecutor.js.map +1 -1
  15. package/dist/lib/index.d.ts +1 -1
  16. package/dist/lib/index.d.ts.map +1 -1
  17. package/dist/lib/index.js +7 -8
  18. package/dist/lib/index.js.map +1 -1
  19. package/dist/lib/protocols/index.d.ts +3 -1
  20. package/dist/lib/protocols/index.d.ts.map +1 -1
  21. package/dist/lib/protocols/index.js +23 -14
  22. package/dist/lib/protocols/index.js.map +1 -1
  23. package/dist/lib/schemas/index.d.ts +1 -1
  24. package/dist/lib/schemas/index.js +1 -1
  25. package/dist/lib/server/create-adcp-server.d.ts +142 -11
  26. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  27. package/dist/lib/server/create-adcp-server.js +211 -2
  28. package/dist/lib/server/create-adcp-server.js.map +1 -1
  29. package/dist/lib/server/ctx-metadata/backends/memory.d.ts +27 -0
  30. package/dist/lib/server/ctx-metadata/backends/memory.d.ts.map +1 -0
  31. package/dist/lib/server/ctx-metadata/backends/memory.js +72 -0
  32. package/dist/lib/server/ctx-metadata/backends/memory.js.map +1 -0
  33. package/dist/lib/server/ctx-metadata/backends/pg.d.ts +62 -0
  34. package/dist/lib/server/ctx-metadata/backends/pg.d.ts.map +1 -0
  35. package/dist/lib/server/ctx-metadata/backends/pg.js +145 -0
  36. package/dist/lib/server/ctx-metadata/backends/pg.js.map +1 -0
  37. package/dist/lib/server/ctx-metadata/index.d.ts +15 -0
  38. package/dist/lib/server/ctx-metadata/index.d.ts.map +1 -0
  39. package/dist/lib/server/ctx-metadata/index.js +28 -0
  40. package/dist/lib/server/ctx-metadata/index.js.map +1 -0
  41. package/dist/lib/server/ctx-metadata/store.d.ts +177 -0
  42. package/dist/lib/server/ctx-metadata/store.d.ts.map +1 -0
  43. package/dist/lib/server/ctx-metadata/store.js +327 -0
  44. package/dist/lib/server/ctx-metadata/store.js.map +1 -0
  45. package/dist/lib/server/ctx-metadata/wire-shape.d.ts +55 -0
  46. package/dist/lib/server/ctx-metadata/wire-shape.d.ts.map +1 -0
  47. package/dist/lib/server/ctx-metadata/wire-shape.js +121 -0
  48. package/dist/lib/server/ctx-metadata/wire-shape.js.map +1 -0
  49. package/dist/lib/server/decisioning/account.d.ts +309 -0
  50. package/dist/lib/server/decisioning/account.d.ts.map +1 -0
  51. package/dist/lib/server/decisioning/account.js +102 -0
  52. package/dist/lib/server/decisioning/account.js.map +1 -0
  53. package/dist/lib/server/decisioning/admin-router.d.ts +75 -0
  54. package/dist/lib/server/decisioning/admin-router.d.ts.map +1 -0
  55. package/dist/lib/server/decisioning/admin-router.js +120 -0
  56. package/dist/lib/server/decisioning/admin-router.js.map +1 -0
  57. package/dist/lib/server/decisioning/assembly-helpers.d.ts +204 -0
  58. package/dist/lib/server/decisioning/assembly-helpers.d.ts.map +1 -0
  59. package/dist/lib/server/decisioning/assembly-helpers.js +173 -0
  60. package/dist/lib/server/decisioning/assembly-helpers.js.map +1 -0
  61. package/dist/lib/server/decisioning/async-outcome.d.ts +154 -0
  62. package/dist/lib/server/decisioning/async-outcome.d.ts.map +1 -0
  63. package/dist/lib/server/decisioning/async-outcome.js +239 -0
  64. package/dist/lib/server/decisioning/async-outcome.js.map +1 -0
  65. package/dist/lib/server/decisioning/capabilities.d.ts +251 -0
  66. package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -0
  67. package/dist/lib/server/decisioning/capabilities.js +16 -0
  68. package/dist/lib/server/decisioning/capabilities.js.map +1 -0
  69. package/dist/lib/server/decisioning/context.d.ts +212 -0
  70. package/dist/lib/server/decisioning/context.d.ts.map +1 -0
  71. package/dist/lib/server/decisioning/context.js +26 -0
  72. package/dist/lib/server/decisioning/context.js.map +1 -0
  73. package/dist/lib/server/decisioning/errors-typed.d.ts +104 -0
  74. package/dist/lib/server/decisioning/errors-typed.d.ts.map +1 -0
  75. package/dist/lib/server/decisioning/errors-typed.js +304 -0
  76. package/dist/lib/server/decisioning/errors-typed.js.map +1 -0
  77. package/dist/lib/server/decisioning/helpers.d.ts +131 -0
  78. package/dist/lib/server/decisioning/helpers.d.ts.map +1 -0
  79. package/dist/lib/server/decisioning/helpers.js +134 -0
  80. package/dist/lib/server/decisioning/helpers.js.map +1 -0
  81. package/dist/lib/server/decisioning/index.d.ts +46 -0
  82. package/dist/lib/server/decisioning/index.d.ts.map +1 -0
  83. package/dist/lib/server/decisioning/index.js +120 -0
  84. package/dist/lib/server/decisioning/index.js.map +1 -0
  85. package/dist/lib/server/decisioning/list-helpers.d.ts +53 -0
  86. package/dist/lib/server/decisioning/list-helpers.d.ts.map +1 -0
  87. package/dist/lib/server/decisioning/list-helpers.js +96 -0
  88. package/dist/lib/server/decisioning/list-helpers.js.map +1 -0
  89. package/dist/lib/server/decisioning/manifest-helpers.d.ts +56 -0
  90. package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -0
  91. package/dist/lib/server/decisioning/manifest-helpers.js +78 -0
  92. package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -0
  93. package/dist/lib/server/decisioning/pagination.d.ts +21 -0
  94. package/dist/lib/server/decisioning/pagination.d.ts.map +1 -0
  95. package/dist/lib/server/decisioning/pagination.js +12 -0
  96. package/dist/lib/server/decisioning/pagination.js.map +1 -0
  97. package/dist/lib/server/decisioning/platform.d.ts +188 -0
  98. package/dist/lib/server/decisioning/platform.d.ts.map +1 -0
  99. package/dist/lib/server/decisioning/platform.js +19 -0
  100. package/dist/lib/server/decisioning/platform.js.map +1 -0
  101. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +510 -0
  102. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -0
  103. package/dist/lib/server/decisioning/runtime/from-platform.js +2196 -0
  104. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -0
  105. package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.ts +114 -0
  106. package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.ts.map +1 -0
  107. package/dist/lib/server/decisioning/runtime/postgres-task-registry.js +247 -0
  108. package/dist/lib/server/decisioning/runtime/postgres-task-registry.js.map +1 -0
  109. package/dist/lib/server/decisioning/runtime/protocol-for-tool.d.ts +32 -0
  110. package/dist/lib/server/decisioning/runtime/protocol-for-tool.d.ts.map +1 -0
  111. package/dist/lib/server/decisioning/runtime/protocol-for-tool.js +127 -0
  112. package/dist/lib/server/decisioning/runtime/protocol-for-tool.js.map +1 -0
  113. package/dist/lib/server/decisioning/runtime/task-registry.d.ts +105 -0
  114. package/dist/lib/server/decisioning/runtime/task-registry.d.ts.map +1 -0
  115. package/dist/lib/server/decisioning/runtime/task-registry.js +96 -0
  116. package/dist/lib/server/decisioning/runtime/task-registry.js.map +1 -0
  117. package/dist/lib/server/decisioning/runtime/to-context.d.ts +54 -0
  118. package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -0
  119. package/dist/lib/server/decisioning/runtime/to-context.js +166 -0
  120. package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -0
  121. package/dist/lib/server/decisioning/runtime/validate-platform.d.ts +20 -0
  122. package/dist/lib/server/decisioning/runtime/validate-platform.d.ts.map +1 -0
  123. package/dist/lib/server/decisioning/runtime/validate-platform.js +93 -0
  124. package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -0
  125. package/dist/lib/server/decisioning/specialisms/audiences.d.ts +72 -0
  126. package/dist/lib/server/decisioning/specialisms/audiences.d.ts.map +1 -0
  127. package/dist/lib/server/decisioning/specialisms/audiences.js +15 -0
  128. package/dist/lib/server/decisioning/specialisms/audiences.js.map +1 -0
  129. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +92 -0
  130. package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -0
  131. package/dist/lib/server/decisioning/specialisms/brand-rights.js +28 -0
  132. package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -0
  133. package/dist/lib/server/decisioning/specialisms/campaign-governance.d.ts +67 -0
  134. package/dist/lib/server/decisioning/specialisms/campaign-governance.d.ts.map +1 -0
  135. package/dist/lib/server/decisioning/specialisms/campaign-governance.js +31 -0
  136. package/dist/lib/server/decisioning/specialisms/campaign-governance.js.map +1 -0
  137. package/dist/lib/server/decisioning/specialisms/content-standards.d.ts +78 -0
  138. package/dist/lib/server/decisioning/specialisms/content-standards.d.ts.map +1 -0
  139. package/dist/lib/server/decisioning/specialisms/content-standards.js +35 -0
  140. package/dist/lib/server/decisioning/specialisms/content-standards.js.map +1 -0
  141. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +81 -0
  142. package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -0
  143. package/dist/lib/server/decisioning/specialisms/creative-ad-server.js +28 -0
  144. package/dist/lib/server/decisioning/specialisms/creative-ad-server.js.map +1 -0
  145. package/dist/lib/server/decisioning/specialisms/creative.d.ts +144 -0
  146. package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -0
  147. package/dist/lib/server/decisioning/specialisms/creative.js +19 -0
  148. package/dist/lib/server/decisioning/specialisms/creative.js.map +1 -0
  149. package/dist/lib/server/decisioning/specialisms/lists.d.ts +61 -0
  150. package/dist/lib/server/decisioning/specialisms/lists.d.ts.map +1 -0
  151. package/dist/lib/server/decisioning/specialisms/lists.js +30 -0
  152. package/dist/lib/server/decisioning/specialisms/lists.js.map +1 -0
  153. package/dist/lib/server/decisioning/specialisms/sales.d.ts +163 -0
  154. package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -0
  155. package/dist/lib/server/decisioning/specialisms/sales.js +64 -0
  156. package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -0
  157. package/dist/lib/server/decisioning/specialisms/signals.d.ts +64 -0
  158. package/dist/lib/server/decisioning/specialisms/signals.d.ts.map +1 -0
  159. package/dist/lib/server/decisioning/specialisms/signals.js +28 -0
  160. package/dist/lib/server/decisioning/specialisms/signals.js.map +1 -0
  161. package/dist/lib/server/decisioning/start-time.d.ts +76 -0
  162. package/dist/lib/server/decisioning/start-time.d.ts.map +1 -0
  163. package/dist/lib/server/decisioning/start-time.js +81 -0
  164. package/dist/lib/server/decisioning/start-time.js.map +1 -0
  165. package/dist/lib/server/decisioning/status-changes.d.ts +165 -0
  166. package/dist/lib/server/decisioning/status-changes.d.ts.map +1 -0
  167. package/dist/lib/server/decisioning/status-changes.js +131 -0
  168. package/dist/lib/server/decisioning/status-changes.js.map +1 -0
  169. package/dist/lib/server/decisioning/status-mappers.d.ts +46 -0
  170. package/dist/lib/server/decisioning/status-mappers.d.ts.map +1 -0
  171. package/dist/lib/server/decisioning/status-mappers.js +46 -0
  172. package/dist/lib/server/decisioning/status-mappers.js.map +1 -0
  173. package/dist/lib/server/decisioning/tenant-registry.d.ts +289 -0
  174. package/dist/lib/server/decisioning/tenant-registry.d.ts.map +1 -0
  175. package/dist/lib/server/decisioning/tenant-registry.js +503 -0
  176. package/dist/lib/server/decisioning/tenant-registry.js.map +1 -0
  177. package/dist/lib/server/express-adapter.d.ts +1 -1
  178. package/dist/lib/server/express-adapter.js +1 -1
  179. package/dist/lib/server/governance.d.ts +1 -1
  180. package/dist/lib/server/governance.js +1 -1
  181. package/dist/lib/server/idempotency/store.d.ts +1 -1
  182. package/dist/lib/server/idempotency/store.js +1 -1
  183. package/dist/lib/server/index.d.ts +9 -2
  184. package/dist/lib/server/index.d.ts.map +1 -1
  185. package/dist/lib/server/index.js +79 -4
  186. package/dist/lib/server/index.js.map +1 -1
  187. package/dist/lib/server/legacy/v5/index.d.ts +38 -0
  188. package/dist/lib/server/legacy/v5/index.d.ts.map +1 -0
  189. package/dist/lib/server/legacy/v5/index.js +60 -0
  190. package/dist/lib/server/legacy/v5/index.js.map +1 -0
  191. package/dist/lib/server/normalize-errors.d.ts +88 -0
  192. package/dist/lib/server/normalize-errors.d.ts.map +1 -0
  193. package/dist/lib/server/normalize-errors.js +146 -0
  194. package/dist/lib/server/normalize-errors.js.map +1 -0
  195. package/dist/lib/server/pick-safe-details.d.ts +90 -0
  196. package/dist/lib/server/pick-safe-details.d.ts.map +1 -0
  197. package/dist/lib/server/pick-safe-details.js +148 -0
  198. package/dist/lib/server/pick-safe-details.js.map +1 -0
  199. package/dist/lib/server/postgres-state-store.d.ts +1 -1
  200. package/dist/lib/server/postgres-state-store.js +1 -1
  201. package/dist/lib/server/responses.d.ts +38 -0
  202. package/dist/lib/server/responses.d.ts.map +1 -1
  203. package/dist/lib/server/responses.js +38 -0
  204. package/dist/lib/server/responses.js.map +1 -1
  205. package/dist/lib/server/state-store.d.ts +1 -1
  206. package/dist/lib/server/state-store.js +1 -1
  207. package/dist/lib/server/test-controller.d.ts +10 -3
  208. package/dist/lib/server/test-controller.d.ts.map +1 -1
  209. package/dist/lib/server/test-controller.js +10 -3
  210. package/dist/lib/server/test-controller.js.map +1 -1
  211. package/dist/lib/testing/comply-controller.d.ts +47 -1
  212. package/dist/lib/testing/comply-controller.d.ts.map +1 -1
  213. package/dist/lib/testing/comply-controller.js +11 -4
  214. package/dist/lib/testing/comply-controller.js.map +1 -1
  215. package/dist/lib/testing/index.d.ts +1 -1
  216. package/dist/lib/testing/index.d.ts.map +1 -1
  217. package/dist/lib/testing/index.js.map +1 -1
  218. package/dist/lib/testing/personas/index.d.ts +143 -0
  219. package/dist/lib/testing/personas/index.d.ts.map +1 -0
  220. package/dist/lib/testing/personas/index.js +190 -0
  221. package/dist/lib/testing/personas/index.js.map +1 -0
  222. package/dist/lib/testing/storyboard/index.d.ts +1 -1
  223. package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
  224. package/dist/lib/testing/storyboard/index.js +3 -2
  225. package/dist/lib/testing/storyboard/index.js.map +1 -1
  226. package/dist/lib/testing/storyboard/runner.d.ts +13 -0
  227. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  228. package/dist/lib/testing/storyboard/runner.js +179 -7
  229. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  230. package/dist/lib/types/adcp.d.ts.map +1 -1
  231. package/dist/lib/types/adcp.js +1 -0
  232. package/dist/lib/types/adcp.js.map +1 -1
  233. package/dist/lib/types/asset-instances.d.ts +1 -0
  234. package/dist/lib/types/asset-instances.d.ts.map +1 -1
  235. package/dist/lib/types/core.generated.d.ts +203 -98
  236. package/dist/lib/types/core.generated.d.ts.map +1 -1
  237. package/dist/lib/types/core.generated.js +1 -1
  238. package/dist/lib/types/index.d.ts +1 -0
  239. package/dist/lib/types/index.d.ts.map +1 -1
  240. package/dist/lib/types/index.js.map +1 -1
  241. package/dist/lib/types/schemas.generated.d.ts +599 -159
  242. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  243. package/dist/lib/types/schemas.generated.js +175 -94
  244. package/dist/lib/types/schemas.generated.js.map +1 -1
  245. package/dist/lib/types/tools.generated.d.ts +315 -46
  246. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  247. package/dist/lib/utils/capabilities.d.ts +1 -1
  248. package/dist/lib/utils/capabilities.d.ts.map +1 -1
  249. package/dist/lib/utils/capabilities.js +6 -0
  250. package/dist/lib/utils/capabilities.js.map +1 -1
  251. package/dist/lib/validation/schema-validator.d.ts +13 -0
  252. package/dist/lib/validation/schema-validator.d.ts.map +1 -1
  253. package/dist/lib/validation/schema-validator.js +240 -3
  254. package/dist/lib/validation/schema-validator.js.map +1 -1
  255. package/dist/lib/version.d.ts +3 -3
  256. package/dist/lib/version.d.ts.map +1 -1
  257. package/dist/lib/version.js +3 -3
  258. package/dist/lib/version.js.map +1 -1
  259. package/docs/guides/BUILD-AN-AGENT.md +30 -5
  260. package/docs/llms.txt +28 -17
  261. package/examples/README.md +3 -1
  262. package/examples/decisioning-platform-broadcast-tv.ts +300 -0
  263. package/examples/decisioning-platform-identity-graph.ts +214 -0
  264. package/examples/decisioning-platform-mock-seller.ts +332 -0
  265. package/examples/decisioning-platform-multi-tenant.ts +128 -0
  266. package/examples/decisioning-platform-programmatic.ts +254 -0
  267. package/examples/signals-agent.ts +1 -1
  268. package/package.json +13 -2
  269. package/skills/build-brand-rights-agent/SKILL.md +10 -3
  270. package/skills/build-creative-agent/SKILL.md +94 -64
  271. package/skills/build-decisioning-creative-template/SKILL.md +554 -0
  272. package/skills/build-decisioning-platform/SKILL.md +304 -0
  273. package/skills/build-decisioning-platform/advanced/BRAND-RIGHTS.md +25 -0
  274. package/skills/build-decisioning-platform/advanced/COMPLIANCE.md +23 -0
  275. package/skills/build-decisioning-platform/advanced/GOVERNANCE.md +24 -0
  276. package/skills/build-decisioning-platform/advanced/HITL.md +34 -0
  277. package/skills/build-decisioning-platform/advanced/IDEMPOTENCY.md +52 -0
  278. package/skills/build-decisioning-platform/advanced/MULTI-TENANT.md +47 -0
  279. package/skills/build-decisioning-platform/advanced/OAUTH.md +22 -0
  280. package/skills/build-decisioning-platform/advanced/REFERENCE.md +991 -0
  281. package/skills/build-decisioning-platform/advanced/SANDBOX.md +24 -0
  282. package/skills/build-decisioning-platform/advanced/STATE-MACHINE.md +52 -0
  283. package/skills/build-decisioning-signal-marketplace/SKILL.md +269 -0
  284. package/skills/build-generative-seller-agent/SKILL.md +89 -53
  285. package/skills/build-governance-agent/SKILL.md +76 -45
  286. package/skills/build-retail-media-agent/SKILL.md +87 -62
  287. package/skills/build-seller-agent/SKILL.md +384 -255
  288. package/skills/build-seller-agent/deployment.md +5 -3
  289. package/skills/build-seller-agent/specialisms/audience-sync.md +0 -2
  290. package/skills/build-seller-agent/specialisms/sales-broadcast-tv.md +0 -2
  291. package/skills/build-seller-agent/specialisms/sales-guaranteed.md +0 -2
  292. package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +0 -2
  293. package/skills/build-seller-agent/specialisms/sales-proposal-mode.md +0 -2
  294. package/skills/build-seller-agent/specialisms/sales-social.md +0 -2
  295. package/skills/build-seller-agent/specialisms/signed-requests.md +0 -2
  296. package/skills/build-si-agent/SKILL.md +40 -32
  297. package/skills/build-signals-agent/SKILL.md +139 -92
  298. package/skills/call-adcp-agent.previous/SKILL.md +5 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creative-ad-server.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative-ad-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,KAAK,QAAQ,GAAG,aAAa,CAAC;AAC9B,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,wBAAwB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1E;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,CACX,GAAG,EAAE,oBAAoB,EACzB,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,EAAE,GAAG,oBAAoB,GAAG,yBAAyB,CAAC,CAAC;IAErG,+EAA+E;IAC/E,eAAe,CAAC,GAAG,EAAE,sBAAsB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAInG;;;;;;OAMG;IACH,aAAa,CAAC,CACZ,SAAS,EAAE,QAAQ,EAAE,EACrB,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,gBAAgB,EAAE,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IAEjE;;;;;OAKG;IACH,aAAa,CAAC,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE7F;;;;;OAKG;IACH,mBAAmB,CAAC,MAAM,EAAE,0BAA0B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACnH"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * CreativeAdServerPlatform — third creative archetype (v6.0).
4
+ *
5
+ * Stateful creative library + per-creative pricing + tag generation. The
6
+ * canonical shape for creative-ad-server adopters: Innovid, Flashtalking,
7
+ * GAM-creative, CMP-style platforms.
8
+ *
9
+ * Distinct from `CreativeTemplatePlatform` (stateless transform) and
10
+ * `CreativeGenerativePlatform` (brief-driven generation):
11
+ *
12
+ * - **Stateful** — adopter persists creatives in a library; `syncCreatives`
13
+ * pushes assets in, `listCreatives` reads them back, `buildCreative`
14
+ * either looks up an existing creative by id OR pushes a new one
15
+ * - **Pricing per creative** — vendor pricing options on each creative;
16
+ * `pricing_option_id` selected at activation, billed via `report_usage`
17
+ * - **Tag generation** — `buildCreative` returns ad-server tags (VAST,
18
+ * placement-specific tracking pixels, macro-substituted creative HTML)
19
+ * when invoked with `media_buy_id` + `package_id` context
20
+ * - **Per-creative delivery reports** — `get_creative_delivery` returns
21
+ * pacing data per creative across the library
22
+ *
23
+ * Status: Preview / 6.0.
24
+ *
25
+ * @public
26
+ */
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ //# sourceMappingURL=creative-ad-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creative-ad-server.js","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative-ad-server.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Creative specialism platform interfaces (v2 dual-method shape).
3
+ *
4
+ * Three creative archetypes:
5
+ * - CreativeTemplatePlatform: stateless transform (AudioStack, Celtra)
6
+ * - CreativeGenerativePlatform: brief-to-creative (DALL-E-style)
7
+ * - CreativeAdServerPlatform: stateful library + tags (Innovid, GAM-creative; v1.1)
8
+ *
9
+ * `buildCreative` and `syncCreatives` each have sync OR task variants;
10
+ * adopter implements exactly one per pair. `validatePlatform()` enforces
11
+ * exactly-one at construction time.
12
+ *
13
+ * Status: Preview / 6.0.
14
+ *
15
+ * @public
16
+ */
17
+ import type { Account } from '../account';
18
+ import type { RequestContext } from '../context';
19
+ import type { TaskHandoff } from '../async-outcome';
20
+ import type { CreativeAsset, CreativeManifest, BuildCreativeRequest, BuildCreativeSuccess, BuildCreativeMultiSuccess, PreviewCreativeRequest, PreviewCreativeResponse } from '../../../types/tools.generated';
21
+ import type { SyncCreativesRow } from './sales';
22
+ /**
23
+ * Adopter return shape for `buildCreative`. Discriminated by the wire
24
+ * spec's Single vs Multi response arms — pick whichever matches the
25
+ * request the framework dispatched:
26
+ *
27
+ * - **Single manifest, no metadata**: return a `CreativeManifest`
28
+ * directly. Framework wraps as `{ creative_manifest: <manifest> }`.
29
+ * Use this for single-format requests (`target_format_id`) when
30
+ * you don't need to set `sandbox` / `expires_at` / `preview`.
31
+ * - **Multi-format manifests, no metadata**: return a
32
+ * `CreativeManifest[]`. Framework wraps as
33
+ * `{ creative_manifests: [...] }`. Use this for multi-format
34
+ * requests (`target_format_ids`) when you don't need rich metadata.
35
+ * - **Fully-shaped envelope**: return a `BuildCreativeSuccess` (single)
36
+ * or `BuildCreativeMultiSuccess` (multi) with `sandbox` /
37
+ * `expires_at` / `preview` populated. Framework passes through
38
+ * unchanged. Detected by the presence of `creative_manifest` (single
39
+ * envelope) or `creative_manifests` (multi envelope) at the top level.
40
+ *
41
+ * Adopters route on `req.target_format_ids` (multi) vs `req.target_format_id`
42
+ * (single) and return the matching arm. Returning a `CreativeManifest[]`
43
+ * for a single-format request, or a single `CreativeManifest` for a
44
+ * multi-format request, is an adopter contract violation that surfaces
45
+ * as schema-validation failure on the wire response.
46
+ */
47
+ export type BuildCreativeReturn = CreativeManifest | CreativeManifest[] | BuildCreativeSuccess | BuildCreativeMultiSuccess;
48
+ type Creative = CreativeAsset;
49
+ type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
50
+ export type { SyncCreativesRow };
51
+ /**
52
+ * Creative-builder agent. Produces creatives from buyer inputs — equally
53
+ * suited to template-driven dynamic creative platforms (Bannerflow,
54
+ * Celtra), brief-to-creative AI agents (Pencil, Omneky, AdCreative.ai),
55
+ * and hybrids that mix both modes. The wire shape doesn't distinguish
56
+ * "transform a template" from "generate from a brief" — both produce a
57
+ * `CreativeManifest` from a `BuildCreativeRequest`. The previous v6
58
+ * preview separated them into `CreativeTemplatePlatform` and
59
+ * `CreativeGenerativePlatform`, but every interface field is the same;
60
+ * the only meaningful difference was whether `refineCreative` was
61
+ * supported, which is now optional on the unified shape.
62
+ *
63
+ * Spec defines a Submitted arm via `async-response-data.json`
64
+ * (`BuildCreativeAsyncSubmitted`) but the per-tool
65
+ * `build-creative-response.json` `oneOf` doesn't include it — a SPEC
66
+ * inconsistency tracked as adcontextprotocol/adcp#3392. Until the spec
67
+ * rolls Submitted into the `oneOf`, slow operations (TTS, audio mixing,
68
+ * long-running generation) await in-request; status changes surface via
69
+ * `publishStatusChange` on `resource_type: 'creative'`.
70
+ *
71
+ * Both `creative-template` and `creative-generative` specialism claims
72
+ * map to this interface in `RequiredPlatformsFor<S>` — the discovery
73
+ * distinction is preserved at the buyer-facing spec level (so buyers
74
+ * filtering for "AI brief-to-creative" still find generative agents)
75
+ * while implementation surface stays unified.
76
+ *
77
+ * Adopters that ALSO want library + tag generation + delivery reporting
78
+ * (i.e., a full ad server on top of the builder) declare
79
+ * `CreativeAdServerPlatform` instead. Multi-archetype omni agents
80
+ * (rare in the wild) front each archetype as a separate tenant via
81
+ * `TenantRegistry`.
82
+ */
83
+ export interface CreativeBuilderPlatform<TCtxMeta = Record<string, unknown>> {
84
+ /**
85
+ * Build the creative. Single method covers template-driven transform
86
+ * (`req.template_id` + asset slots), brief-to-creative generation
87
+ * (`req.brief`), and any hybrid the platform supports — adopters
88
+ * route internally on `req` shape.
89
+ *
90
+ * Return shape is discriminated; see {@link BuildCreativeReturn}:
91
+ * single `CreativeManifest`, `CreativeManifest[]` for multi-format
92
+ * requests, OR a fully-shaped `BuildCreativeSuccess` /
93
+ * `BuildCreativeMultiSuccess` envelope when you need to set
94
+ * `sandbox` / `expires_at` / `preview`.
95
+ */
96
+ buildCreative(req: BuildCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<BuildCreativeReturn>;
97
+ /**
98
+ * Preview-only variant — sandbox URL or inline HTML, expires. Always
99
+ * sync. Optional because generative-only adopters that don't render
100
+ * preview ahead of generation can omit it; the framework returns
101
+ * `UNSUPPORTED_FEATURE` to buyers calling `preview_creative` against
102
+ * a platform that didn't wire this.
103
+ */
104
+ previewCreative?(req: PreviewCreativeRequest, ctx: Ctx<TCtxMeta>): Promise<PreviewCreativeResponse>;
105
+ /**
106
+ * Refine a prior generation. `taskId` references a prior submission.
107
+ * Sync — refinement is a mutation on existing state, not a new task
108
+ * creation. Optional because pure template platforms iterate by
109
+ * re-calling `buildCreative` with different inputs and don't carry
110
+ * generation state across calls.
111
+ */
112
+ refineCreative?(taskId: string, refinement: RefinementMessage, ctx: Ctx<TCtxMeta>): Promise<CreativeManifest>;
113
+ /**
114
+ * Sync review surface. Stateless platforms typically auto-approve;
115
+ * adopters needing mandatory pre-persist review return
116
+ * `ctx.handoffToTask(fn)` to defer to a background task. Unified
117
+ * hybrid shape — return rows OR `ctx.handoffToTask(fn)`.
118
+ */
119
+ syncCreatives?(creatives: Creative[], ctx: Ctx<TCtxMeta>): Promise<SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>>;
120
+ }
121
+ /**
122
+ * @deprecated Use `CreativeBuilderPlatform` — the unified interface
123
+ * covering both template-driven and brief-to-creative agents. The
124
+ * v6 preview's separation of `CreativeTemplatePlatform` and
125
+ * `CreativeGenerativePlatform` had no meaningful interface
126
+ * distinction; this alias preserves source compatibility for one
127
+ * release while adopters migrate. Will be removed in a future
128
+ * release.
129
+ */
130
+ export type CreativeTemplatePlatform<TCtxMeta = Record<string, unknown>> = CreativeBuilderPlatform<TCtxMeta>;
131
+ /**
132
+ * @deprecated Use `CreativeBuilderPlatform` — the unified interface
133
+ * covering both template-driven and brief-to-creative agents. See
134
+ * `CreativeTemplatePlatform` deprecation note. Will be removed in a
135
+ * future release.
136
+ */
137
+ export type CreativeGenerativePlatform<TCtxMeta = Record<string, unknown>> = CreativeBuilderPlatform<TCtxMeta>;
138
+ export interface RefinementMessage {
139
+ /** Free-text instruction from the buyer. */
140
+ message: string;
141
+ /** Optional structured changes (e.g., "make headline say X"). */
142
+ changes?: Record<string, unknown>;
143
+ }
144
+ //# sourceMappingURL=creative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creative.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialis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GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE9G;;;;;OAKG;IACH,aAAa,CAAC,CACZ,SAAS,EAAE,QAAQ,EAAE,EACrB,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,gBAAgB,EAAE,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;CAClE;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,wBAAwB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAE7G;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAM/G,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * Creative specialism platform interfaces (v2 dual-method shape).
4
+ *
5
+ * Three creative archetypes:
6
+ * - CreativeTemplatePlatform: stateless transform (AudioStack, Celtra)
7
+ * - CreativeGenerativePlatform: brief-to-creative (DALL-E-style)
8
+ * - CreativeAdServerPlatform: stateful library + tags (Innovid, GAM-creative; v1.1)
9
+ *
10
+ * `buildCreative` and `syncCreatives` each have sync OR task variants;
11
+ * adopter implements exactly one per pair. `validatePlatform()` enforces
12
+ * exactly-one at construction time.
13
+ *
14
+ * Status: Preview / 6.0.
15
+ *
16
+ * @public
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ //# sourceMappingURL=creative.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creative.js","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/creative.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * PropertyListsPlatform + CollectionListsPlatform — list-publishing
3
+ * specialisms (v6.0).
4
+ *
5
+ * Two distinct specialisms with parallel CRUD shapes:
6
+ *
7
+ * - **`property-lists`** — agent publishes/maintains authorized property
8
+ * lists (which sellers can sell what for which advertisers; buyer-side
9
+ * authorization graphs). Sellers FETCH and validate against these.
10
+ * - **`collection-lists`** — agent publishes/maintains authorized
11
+ * collection lists (program/show-level brand safety via IMDb /
12
+ * Gracenote / EIDR ids). Sellers FETCH and apply for inventory
13
+ * filtering.
14
+ *
15
+ * Both have CRUD on the same shape — create, update, get, list, delete —
16
+ * just on different list types. Could fold into one interface if your
17
+ * adopter implements both; today they're separated to match the spec
18
+ * specialism-per-list-type shape.
19
+ *
20
+ * Shape: standard CRUD + token-issuance semantics. `create_*` returns a
21
+ * one-time fetch token sellers store in their secret manager; `delete_*`
22
+ * revokes the token. Tokens are scoped per-seller for revocation.
23
+ *
24
+ * Status: Preview / 6.0.
25
+ *
26
+ * @public
27
+ */
28
+ import type { Account } from '../account';
29
+ import type { RequestContext } from '../context';
30
+ import type { CreatePropertyListRequest, CreatePropertyListResponse, UpdatePropertyListRequest, UpdatePropertyListResponse, GetPropertyListRequest, GetPropertyListResponse, ListPropertyListsRequest, ListPropertyListsResponse, DeletePropertyListRequest, DeletePropertyListResponse, CreateCollectionListRequest, CreateCollectionListResponse, UpdateCollectionListRequest, UpdateCollectionListResponse, GetCollectionListRequest, GetCollectionListResponse, ListCollectionListsRequest, ListCollectionListsResponse, DeleteCollectionListRequest, DeleteCollectionListResponse } from '../../../types/tools.generated';
31
+ type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
32
+ export interface PropertyListsPlatform<TCtxMeta = Record<string, unknown>> {
33
+ /**
34
+ * Create a property list. Returns a `fetch_token` the buyer stores in
35
+ * their secret manager. Token is scoped to this list_id; MUST NOT be
36
+ * reused across lists.
37
+ */
38
+ createPropertyList(req: CreatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<CreatePropertyListResponse>;
39
+ /** Patch an existing property list. */
40
+ updatePropertyList(req: UpdatePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<UpdatePropertyListResponse>;
41
+ /** Read a property list by id. Sellers call this with the fetch_token. */
42
+ getPropertyList(req: GetPropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<GetPropertyListResponse>;
43
+ /** Discover property lists the caller is authorized to read. */
44
+ listPropertyLists(req: ListPropertyListsRequest, ctx: Ctx<TCtxMeta>): Promise<ListPropertyListsResponse>;
45
+ /**
46
+ * Delete a property list. MUST revoke the fetch_token immediately and
47
+ * signal cache invalidation to sellers (reduced cache_valid_until or
48
+ * a list-changed webhook). Compromise-driven revocation MUST also
49
+ * trigger this path.
50
+ */
51
+ deletePropertyList(req: DeletePropertyListRequest, ctx: Ctx<TCtxMeta>): Promise<DeletePropertyListResponse>;
52
+ }
53
+ export interface CollectionListsPlatform<TCtxMeta = Record<string, unknown>> {
54
+ createCollectionList(req: CreateCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<CreateCollectionListResponse>;
55
+ updateCollectionList(req: UpdateCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateCollectionListResponse>;
56
+ getCollectionList(req: GetCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<GetCollectionListResponse>;
57
+ listCollectionLists(req: ListCollectionListsRequest, ctx: Ctx<TCtxMeta>): Promise<ListCollectionListsResponse>;
58
+ deleteCollectionList(req: DeleteCollectionListRequest, ctx: Ctx<TCtxMeta>): Promise<DeleteCollectionListResponse>;
59
+ }
60
+ export {};
61
+ //# sourceMappingURL=lists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/lists.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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B,CAAC,GAAG,EAAE,yBAAyB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC7G;AAED,MAAM,WAAW,uBAAuB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzE,oBAAoB,CAAC,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAClH,oBAAoB,CAAC,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAClH,iBAAiB,CAAC,GAAG,EAAE,wBAAwB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACzG,mBAAmB,CAAC,GAAG,EAAE,0BAA0B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC/G,oBAAoB,CAAC,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACnH"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * PropertyListsPlatform + CollectionListsPlatform — list-publishing
4
+ * specialisms (v6.0).
5
+ *
6
+ * Two distinct specialisms with parallel CRUD shapes:
7
+ *
8
+ * - **`property-lists`** — agent publishes/maintains authorized property
9
+ * lists (which sellers can sell what for which advertisers; buyer-side
10
+ * authorization graphs). Sellers FETCH and validate against these.
11
+ * - **`collection-lists`** — agent publishes/maintains authorized
12
+ * collection lists (program/show-level brand safety via IMDb /
13
+ * Gracenote / EIDR ids). Sellers FETCH and apply for inventory
14
+ * filtering.
15
+ *
16
+ * Both have CRUD on the same shape — create, update, get, list, delete —
17
+ * just on different list types. Could fold into one interface if your
18
+ * adopter implements both; today they're separated to match the spec
19
+ * specialism-per-list-type shape.
20
+ *
21
+ * Shape: standard CRUD + token-issuance semantics. `create_*` returns a
22
+ * one-time fetch token sellers store in their secret manager; `delete_*`
23
+ * revokes the token. Tokens are scoped per-seller for revocation.
24
+ *
25
+ * Status: Preview / 6.0.
26
+ *
27
+ * @public
28
+ */
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ //# sourceMappingURL=lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists.js","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/lists.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * SalesPlatform — sales specialism platform interface.
3
+ *
4
+ * **Unified hybrid shape.** `create_media_buy` and `sync_creatives` use a
5
+ * single method each. The method returns the wire success arm (sync fast
6
+ * path) OR `ctx.handoffToTask(fn)` to promote the call to a background
7
+ * task (HITL slow path). Branch per-call — the same method handles
8
+ * programmatic remnant, guaranteed inventory, and hybrid sellers. Every
9
+ * other tool is sync-only:
10
+ *
11
+ * - `get_products` — sync. Brief in, products out.
12
+ * - `create_media_buy` — sync OR `ctx.handoffToTask(...)`.
13
+ * - `update_media_buy` — sync only. Re-approval flows that need HITL run
14
+ * out-of-band; `publishStatusChange` carries the result.
15
+ * - `sync_creatives` — sync OR `ctx.handoffToTask(...)`.
16
+ * - `get_media_buy_delivery` — sync only.
17
+ *
18
+ * Sync-only tools that need long-running semantics use `publishStatusChange`
19
+ * (see `status-changes.ts`) — that's the spec-aligned channel for tools
20
+ * whose wire response unions don't define a Submitted arm.
21
+ *
22
+ * Each method either returns the value or throws `AdcpError` for structured
23
+ * rejection. Generic thrown errors map to `SERVICE_UNAVAILABLE`.
24
+ *
25
+ * **Method groups** — implement the group(s) matching your specialism:
26
+ *
27
+ * | Group | Methods | Claim when |
28
+ * |---|---|---|
29
+ * | Core sales (required) | `getProducts`, `updateMediaBuy`, `getMediaBuyDelivery` | Any `sales-*` specialism |
30
+ * | Core sales (unified hybrid) | `createMediaBuy` | Any `sales-*` specialism |
31
+ * | Core sales (unified hybrid) | `syncCreatives` | Any `sales-*` specialism |
32
+ * | Read / feedback | `getMediaBuys`, `providePerformanceFeedback`, `listCreativeFormats`, `listCreatives` | Most sellers; optional |
33
+ * | Retail-media extensions | `syncCatalogs`, `logEvent`, `syncEventSources` | `sales-catalog-driven`, `sales-retail-media` |
34
+ *
35
+ * New adopters implementing a non-retail seller (GAM, FreeWheel, a social
36
+ * platform) only need the three core-required methods plus `createMediaBuy`
37
+ * and `syncCreatives`. The retail-media extension methods (`syncCatalogs`,
38
+ * `logEvent`, `syncEventSources`) are unnecessary unless you claim
39
+ * `sales-catalog-driven` or `sales-retail-media`.
40
+ *
41
+ * **No-account tools (`providePerformanceFeedback`, `listCreativeFormats`):**
42
+ * the wire requests for these two tools don't carry an `account` field, so
43
+ * `ctx.account` may be `undefined` when `accounts.resolution === 'explicit'`.
44
+ * Three safe patterns:
45
+ *
46
+ * 1. **`'derived'` resolution** — `accounts.resolve(undefined)` returns a
47
+ * singleton; `ctx.account` is always set. Best for single-tenant
48
+ * deployers.
49
+ * 2. **Don't implement the method** — the framework returns
50
+ * `UNSUPPORTED_FEATURE`; buyers using the merge-seam custom handler or
51
+ * external creative agents still receive a response.
52
+ * 3. **Explicit-mode with defensive read** — cast `ctx.account as Account |
53
+ * undefined` and derive the account from the request body (e.g., via a
54
+ * `media_buy_id` lookup), or throw `AdcpError('ACCOUNT_NOT_FOUND')`.
55
+ * Full `resolveAccount(undefined, { authInfo, toolName })` support for
56
+ * explicit-mode lands in rc.1.
57
+ *
58
+ * Status: Preview / 6.0.
59
+ *
60
+ * @public
61
+ */
62
+ import type { Account } from '../account';
63
+ import type { RequestContext } from '../context';
64
+ import type { TaskHandoff } from '../async-outcome';
65
+ import type { GetProductsRequest, GetProductsResponse, CreateMediaBuyRequest, CreateMediaBuySuccess, UpdateMediaBuyRequest, UpdateMediaBuySuccess, GetMediaBuysRequest, GetMediaBuysResponse, GetMediaBuyDeliveryRequest, GetMediaBuyDeliveryResponse, ProvidePerformanceFeedbackRequest, ProvidePerformanceFeedbackSuccess, ListCreativeFormatsRequest, ListCreativeFormatsResponse, ListCreativesRequest, ListCreativesResponse, SyncCatalogsRequest, SyncCatalogsSuccess, LogEventRequest, LogEventSuccess, SyncEventSourcesRequest, SyncEventSourcesSuccess, SyncCreativesSuccess, CreativeAsset } from '../../../types/tools.generated';
66
+ type Creative = CreativeAsset;
67
+ type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
68
+ /**
69
+ * Wire success-row shape for `sync_creatives`. Returning the array of these
70
+ * rows from `syncCreatives` is what adopters write — the framework wraps
71
+ * with `{ creatives: [...] }` to form `SyncCreativesSuccess`.
72
+ */
73
+ export type SyncCreativesRow = SyncCreativesSuccess['creatives'][number];
74
+ export interface SalesPlatform<TCtxMeta = Record<string, unknown>> {
75
+ /** Sync catalog lookup: filters in, products out. NOT for proposal generation. */
76
+ getProducts(req: GetProductsRequest, ctx: Ctx<TCtxMeta>): Promise<GetProductsResponse>;
77
+ /**
78
+ * Create a media buy. Return the wire success-arm shape (sync fast path)
79
+ * OR `ctx.handoffToTask(fn)` to promote the call to a background task
80
+ * (HITL slow path). Adopters can branch per-call: hybrid sellers route
81
+ * programmatic remnant sync, guaranteed inventory through HITL, all
82
+ * from the same method.
83
+ *
84
+ * Buyers pattern-match on the wire response shape (`media_buy_id` on
85
+ * the immediate response → sync; `task_id` + `status: 'submitted'` →
86
+ * poll `tasks_get` or receive webhook). Predictable per request,
87
+ * dynamic per call.
88
+ *
89
+ * Status changes flow via `publishStatusChange(...)` regardless of
90
+ * which path was taken.
91
+ *
92
+ * The handoff function's return value is persisted as JSONB in the
93
+ * task registry. Postgres-backed registries cap row size at 4MB —
94
+ * offload large payloads to blob storage and return references.
95
+ *
96
+ * @example Sync-only adopter (no HITL inventory)
97
+ * ```ts
98
+ * createMediaBuy: async (req, ctx) => {
99
+ * return await this.commitSync(req);
100
+ * }
101
+ * ```
102
+ *
103
+ * @example HITL-only adopter (every call goes through trafficker review)
104
+ * ```ts
105
+ * createMediaBuy: async (req, ctx) => {
106
+ * return ctx.handoffToTask(async (taskCtx) => {
107
+ * await taskCtx.update({ message: 'Awaiting trafficker' });
108
+ * return await this.runHITL(req);
109
+ * });
110
+ * }
111
+ * ```
112
+ *
113
+ * @example Hybrid adopter (programmatic + guaranteed in same tenant)
114
+ * ```ts
115
+ * createMediaBuy: async (req, ctx) => {
116
+ * if (this.requiresHITL(req)) {
117
+ * return ctx.handoffToTask(async (taskCtx) => await this.runHITL(req));
118
+ * }
119
+ * return await this.commitSync(req);
120
+ * }
121
+ * ```
122
+ */
123
+ createMediaBuy(req: CreateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<CreateMediaBuySuccess | TaskHandoff<CreateMediaBuySuccess>>;
124
+ /** Sync update. Returns the patched buy. */
125
+ updateMediaBuy(buyId: string, patch: UpdateMediaBuyRequest, ctx: Ctx<TCtxMeta>): Promise<UpdateMediaBuySuccess>;
126
+ /**
127
+ * Push creatives. Return the array of wire success rows (sync fast
128
+ * path) OR `ctx.handoffToTask(fn)` to defer to a background task
129
+ * (HITL slow path — manual review, brand-suitability gates, etc.).
130
+ * Hybrid: branch per-batch — auto-approve simple creatives sync,
131
+ * route everything else to HITL.
132
+ *
133
+ * Each row carries `action` (CRUD outcome) and optional `status`
134
+ * (review state). Buyers see mixed `approved` / `pending_review`
135
+ * rows on the sync path; subsequent review changes flow via
136
+ * `publishStatusChange(...)`.
137
+ *
138
+ * @example Hybrid adopter
139
+ * ```ts
140
+ * syncCreatives: async (creatives, ctx) => {
141
+ * if (creatives.some(c => this.needsReview(c))) {
142
+ * return ctx.handoffToTask(async (taskCtx) => {
143
+ * return await this.reviewAndPersist(creatives);
144
+ * });
145
+ * }
146
+ * return creatives.map(c => ({ creative_id: c.creative_id, action: 'created', status: 'approved' }));
147
+ * }
148
+ * ```
149
+ */
150
+ syncCreatives?(creatives: Creative[], ctx: Ctx<TCtxMeta>): Promise<SyncCreativesRow[] | TaskHandoff<SyncCreativesRow[]>>;
151
+ getMediaBuyDelivery(filter: GetMediaBuyDeliveryRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuyDeliveryResponse>;
152
+ /** List media buys this account owns. Filter + pagination per the wire shape. */
153
+ getMediaBuys(req: GetMediaBuysRequest, ctx: Ctx<TCtxMeta>): Promise<GetMediaBuysResponse>;
154
+ /** Accept buyer-side performance signals on a media buy / creative. */
155
+ providePerformanceFeedback?(req: ProvidePerformanceFeedbackRequest, ctx: Ctx<TCtxMeta>): Promise<ProvidePerformanceFeedbackSuccess>;
156
+ listCreativeFormats?(req: ListCreativeFormatsRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativeFormatsResponse>;
157
+ listCreatives?(req: ListCreativesRequest, ctx: Ctx<TCtxMeta>): Promise<ListCreativesResponse>;
158
+ syncCatalogs?(req: SyncCatalogsRequest, ctx: Ctx<TCtxMeta>): Promise<SyncCatalogsSuccess>;
159
+ logEvent?(req: LogEventRequest, ctx: Ctx<TCtxMeta>): Promise<LogEventSuccess>;
160
+ syncEventSources?(req: SyncEventSourcesRequest, ctx: Ctx<TCtxMeta>): Promise<SyncEventSourcesSuccess>;
161
+ }
162
+ export {};
163
+ //# sourceMappingURL=sales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/sales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,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uBAAuB,CAAC,CAAC;CACvG"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ * SalesPlatform — sales specialism platform interface.
4
+ *
5
+ * **Unified hybrid shape.** `create_media_buy` and `sync_creatives` use a
6
+ * single method each. The method returns the wire success arm (sync fast
7
+ * path) OR `ctx.handoffToTask(fn)` to promote the call to a background
8
+ * task (HITL slow path). Branch per-call — the same method handles
9
+ * programmatic remnant, guaranteed inventory, and hybrid sellers. Every
10
+ * other tool is sync-only:
11
+ *
12
+ * - `get_products` — sync. Brief in, products out.
13
+ * - `create_media_buy` — sync OR `ctx.handoffToTask(...)`.
14
+ * - `update_media_buy` — sync only. Re-approval flows that need HITL run
15
+ * out-of-band; `publishStatusChange` carries the result.
16
+ * - `sync_creatives` — sync OR `ctx.handoffToTask(...)`.
17
+ * - `get_media_buy_delivery` — sync only.
18
+ *
19
+ * Sync-only tools that need long-running semantics use `publishStatusChange`
20
+ * (see `status-changes.ts`) — that's the spec-aligned channel for tools
21
+ * whose wire response unions don't define a Submitted arm.
22
+ *
23
+ * Each method either returns the value or throws `AdcpError` for structured
24
+ * rejection. Generic thrown errors map to `SERVICE_UNAVAILABLE`.
25
+ *
26
+ * **Method groups** — implement the group(s) matching your specialism:
27
+ *
28
+ * | Group | Methods | Claim when |
29
+ * |---|---|---|
30
+ * | Core sales (required) | `getProducts`, `updateMediaBuy`, `getMediaBuyDelivery` | Any `sales-*` specialism |
31
+ * | Core sales (unified hybrid) | `createMediaBuy` | Any `sales-*` specialism |
32
+ * | Core sales (unified hybrid) | `syncCreatives` | Any `sales-*` specialism |
33
+ * | Read / feedback | `getMediaBuys`, `providePerformanceFeedback`, `listCreativeFormats`, `listCreatives` | Most sellers; optional |
34
+ * | Retail-media extensions | `syncCatalogs`, `logEvent`, `syncEventSources` | `sales-catalog-driven`, `sales-retail-media` |
35
+ *
36
+ * New adopters implementing a non-retail seller (GAM, FreeWheel, a social
37
+ * platform) only need the three core-required methods plus `createMediaBuy`
38
+ * and `syncCreatives`. The retail-media extension methods (`syncCatalogs`,
39
+ * `logEvent`, `syncEventSources`) are unnecessary unless you claim
40
+ * `sales-catalog-driven` or `sales-retail-media`.
41
+ *
42
+ * **No-account tools (`providePerformanceFeedback`, `listCreativeFormats`):**
43
+ * the wire requests for these two tools don't carry an `account` field, so
44
+ * `ctx.account` may be `undefined` when `accounts.resolution === 'explicit'`.
45
+ * Three safe patterns:
46
+ *
47
+ * 1. **`'derived'` resolution** — `accounts.resolve(undefined)` returns a
48
+ * singleton; `ctx.account` is always set. Best for single-tenant
49
+ * deployers.
50
+ * 2. **Don't implement the method** — the framework returns
51
+ * `UNSUPPORTED_FEATURE`; buyers using the merge-seam custom handler or
52
+ * external creative agents still receive a response.
53
+ * 3. **Explicit-mode with defensive read** — cast `ctx.account as Account |
54
+ * undefined` and derive the account from the request body (e.g., via a
55
+ * `media_buy_id` lookup), or throw `AdcpError('ACCOUNT_NOT_FOUND')`.
56
+ * Full `resolveAccount(undefined, { authInfo, toolName })` support for
57
+ * explicit-mode lands in rc.1.
58
+ *
59
+ * Status: Preview / 6.0.
60
+ *
61
+ * @public
62
+ */
63
+ Object.defineProperty(exports, "__esModule", { value: true });
64
+ //# sourceMappingURL=sales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales.js","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/sales.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * SignalsPlatform — signal-marketplace + signal-owned specialism interface
3
+ * (v6.0).
4
+ *
5
+ * Two specialisms share the same platform interface:
6
+ *
7
+ * - **`signal-marketplace`** — third-party data brokers serving curated
8
+ * audience signals (LiveRamp, Oracle Data Cloud, third-party DMPs)
9
+ * - **`signal-owned`** — first-party data providers serving their own
10
+ * signals (publisher first-party data, retailer customer-graph)
11
+ *
12
+ * Both expose the same surface: `getSignals` for catalog discovery and
13
+ * `activateSignal` for provisioning a signal onto a destination platform.
14
+ *
15
+ * Async story: `activate_signal` is sync at the wire level — its response
16
+ * union has no `Submitted` arm. Long-running activation pipelines (identity-
17
+ * graph match: 5-30 min, destination provisioning: hours) return the wire
18
+ * `ActivateSignalSuccess` immediately with deployments in `pending` state,
19
+ * then emit `publishStatusChange({ resource_type: 'signal', ... })` events
20
+ * as each deployment reaches `activating` / `deployed` / `failed`.
21
+ *
22
+ * Status: Preview / 6.0.
23
+ *
24
+ * @public
25
+ */
26
+ import type { Account } from '../account';
27
+ import type { RequestContext } from '../context';
28
+ import type { GetSignalsRequest, GetSignalsResponse, ActivateSignalRequest, ActivateSignalSuccess } from '../../../types/tools.generated';
29
+ type Ctx<TCtxMeta> = RequestContext<Account<TCtxMeta>>;
30
+ export interface SignalsPlatform<TCtxMeta = Record<string, unknown>> {
31
+ /**
32
+ * Catalog discovery. Sync — query your signal index, return signals
33
+ * matching the buyer's filters (industry, intent type, audience size,
34
+ * etc.). The wire `GetSignalsResponse` has no async envelope, so
35
+ * platforms with slow catalog stores need internal caches.
36
+ *
37
+ * Throw `AdcpError` for buyer-fixable rejection (e.g.,
38
+ * `'POLICY_VIOLATION'` if the buyer doesn't have rights to the data
39
+ * category they're requesting).
40
+ */
41
+ getSignals(req: GetSignalsRequest, ctx: Ctx<TCtxMeta>): Promise<GetSignalsResponse>;
42
+ /**
43
+ * Provision a signal onto one or more destination platforms (Snap,
44
+ * Meta, TikTok, etc.). Returns the success-arm shape immediately with
45
+ * `deployments` rows in their current state — `'pending'` is a valid
46
+ * sync return for slow activation pipelines.
47
+ *
48
+ * Subsequent state changes (per-deployment `activating` / `deployed` /
49
+ * `failed`) flow via `publishStatusChange({ resource_type: 'signal',
50
+ * resource_id: signal_agent_segment_id, payload: ... })` as each
51
+ * destination's identity-graph match completes.
52
+ *
53
+ * Use `req.action: 'deactivate'` for GDPR/CCPA-compliant teardown when
54
+ * campaigns end.
55
+ *
56
+ * Throw `AdcpError` for buyer-fixable rejection:
57
+ * - `'SIGNAL_NOT_FOUND'` — unknown `signal_agent_segment_id`
58
+ * - `'POLICY_VIOLATION'` — buyer lacks rights to activate this data
59
+ * - `'INVALID_REQUEST'` — missing or unrecognized destination
60
+ */
61
+ activateSignal(req: ActivateSignalRequest, ctx: Ctx<TCtxMeta>): Promise<ActivateSignalSuccess>;
62
+ }
63
+ export {};
64
+ //# sourceMappingURL=signals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/specialisms/signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAExC,KAAK,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,eAAe,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACjE;;;;;;;;;OASG;IACH,UAAU,CAAC,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAEpF;;;;;;;;;;;;;;;;;;OAkBG;IACH,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAChG"}