@adcp/sdk 14.0.0-beta.10 → 14.0.0-beta.12

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 (208) hide show
  1. package/bin/adcp-storyboard-sandbox.js +16 -0
  2. package/bin/adcp.js +28 -30
  3. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  4. package/dist/lib/core/SingleAgentClient.d.mts +2 -1
  5. package/dist/lib/core/SingleAgentClient.d.ts +2 -1
  6. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  7. package/dist/lib/core/SingleAgentClient.js +113 -64
  8. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  9. package/dist/lib/core/SingleAgentClient.mjs +113 -64
  10. package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
  11. package/dist/lib/index.d.mts +1 -1
  12. package/dist/lib/index.d.ts +1 -1
  13. package/dist/lib/index.d.ts.map +1 -1
  14. package/dist/lib/index.js.map +1 -1
  15. package/dist/lib/index.mjs.map +1 -1
  16. package/dist/lib/protocols/a2a.d.mts +10 -3
  17. package/dist/lib/protocols/a2a.d.ts +10 -3
  18. package/dist/lib/protocols/a2a.d.ts.map +1 -1
  19. package/dist/lib/protocols/a2a.js +162 -34
  20. package/dist/lib/protocols/a2a.js.map +1 -1
  21. package/dist/lib/protocols/a2a.mjs +166 -34
  22. package/dist/lib/protocols/a2a.mjs.map +1 -1
  23. package/dist/lib/schemas/index.d.mts +385 -1
  24. package/dist/lib/schemas/index.d.ts +385 -1
  25. package/dist/lib/schemas/index.d.ts.map +1 -1
  26. package/dist/lib/schemas/index.js +13 -0
  27. package/dist/lib/schemas/index.js.map +1 -1
  28. package/dist/lib/schemas/index.mjs +11 -0
  29. package/dist/lib/schemas/index.mjs.map +1 -1
  30. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  31. package/dist/lib/server/a2a-adapter.d.mts +59 -33
  32. package/dist/lib/server/a2a-adapter.d.ts +59 -33
  33. package/dist/lib/server/a2a-adapter.d.ts.map +1 -1
  34. package/dist/lib/server/a2a-adapter.js +278 -67
  35. package/dist/lib/server/a2a-adapter.js.map +1 -1
  36. package/dist/lib/server/a2a-adapter.mjs +280 -68
  37. package/dist/lib/server/a2a-adapter.mjs.map +1 -1
  38. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  39. package/dist/lib/server/create-adcp-server.js +35 -108
  40. package/dist/lib/server/create-adcp-server.js.map +1 -1
  41. package/dist/lib/server/create-adcp-server.mjs +37 -109
  42. package/dist/lib/server/create-adcp-server.mjs.map +1 -1
  43. package/dist/lib/server/decisioning/index.d.mts +2 -0
  44. package/dist/lib/server/decisioning/index.d.ts +2 -0
  45. package/dist/lib/server/decisioning/index.d.ts.map +1 -1
  46. package/dist/lib/server/decisioning/index.js +5 -2
  47. package/dist/lib/server/decisioning/index.js.map +1 -1
  48. package/dist/lib/server/decisioning/index.mjs +3 -1
  49. package/dist/lib/server/decisioning/index.mjs.map +1 -1
  50. package/dist/lib/server/decisioning/response-summary.d.mts +33 -0
  51. package/dist/lib/server/decisioning/response-summary.d.ts +34 -0
  52. package/dist/lib/server/decisioning/response-summary.d.ts.map +1 -0
  53. package/dist/lib/server/decisioning/response-summary.js +62 -0
  54. package/dist/lib/server/decisioning/response-summary.js.map +1 -0
  55. package/dist/lib/server/decisioning/response-summary.mjs +37 -0
  56. package/dist/lib/server/decisioning/response-summary.mjs.map +1 -0
  57. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
  58. package/dist/lib/server/decisioning/runtime/from-platform.js +27 -5
  59. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
  60. package/dist/lib/server/decisioning/runtime/from-platform.mjs +27 -5
  61. package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
  62. package/dist/lib/server/decisioning/specialisms/sales.d.mts +7 -1
  63. package/dist/lib/server/decisioning/specialisms/sales.d.ts +7 -1
  64. package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
  65. package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -1
  66. package/dist/lib/server/index.d.mts +1 -1
  67. package/dist/lib/server/index.d.ts +1 -1
  68. package/dist/lib/server/index.d.ts.map +1 -1
  69. package/dist/lib/server/index.js.map +1 -1
  70. package/dist/lib/server/index.mjs.map +1 -1
  71. package/dist/lib/server/responses.d.ts.map +1 -1
  72. package/dist/lib/server/responses.js +9 -1
  73. package/dist/lib/server/responses.js.map +1 -1
  74. package/dist/lib/server/responses.mjs +8 -1
  75. package/dist/lib/server/responses.mjs.map +1 -1
  76. package/dist/lib/signing/agent-context.d.mts +1 -0
  77. package/dist/lib/signing/agent-context.d.ts +1 -0
  78. package/dist/lib/signing/agent-context.d.ts.map +1 -1
  79. package/dist/lib/signing/agent-context.js +37 -2
  80. package/dist/lib/signing/agent-context.js.map +1 -1
  81. package/dist/lib/signing/agent-context.mjs +38 -3
  82. package/dist/lib/signing/agent-context.mjs.map +1 -1
  83. package/dist/lib/signing/agent-fetch.d.mts +1 -2
  84. package/dist/lib/signing/agent-fetch.d.ts +1 -2
  85. package/dist/lib/signing/agent-fetch.d.ts.map +1 -1
  86. package/dist/lib/signing/agent-fetch.js +2 -0
  87. package/dist/lib/signing/agent-fetch.js.map +1 -1
  88. package/dist/lib/signing/agent-fetch.mjs +2 -0
  89. package/dist/lib/signing/agent-fetch.mjs.map +1 -1
  90. package/dist/lib/signing/agent-resolver/etld.js.map +1 -1
  91. package/dist/lib/signing/agent-resolver/etld.mjs.map +1 -1
  92. package/dist/lib/testing/client.d.mts +6 -0
  93. package/dist/lib/testing/client.d.ts +6 -0
  94. package/dist/lib/testing/client.d.ts.map +1 -1
  95. package/dist/lib/testing/client.js +76 -4
  96. package/dist/lib/testing/client.js.map +1 -1
  97. package/dist/lib/testing/client.mjs +75 -4
  98. package/dist/lib/testing/client.mjs.map +1 -1
  99. package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
  100. package/dist/lib/testing/compliance/comply.js +6 -0
  101. package/dist/lib/testing/compliance/comply.js.map +1 -1
  102. package/dist/lib/testing/compliance/comply.mjs +7 -1
  103. package/dist/lib/testing/compliance/comply.mjs.map +1 -1
  104. package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
  105. package/dist/lib/testing/storyboard/context.js +9 -4
  106. package/dist/lib/testing/storyboard/context.js.map +1 -1
  107. package/dist/lib/testing/storyboard/context.mjs +9 -4
  108. package/dist/lib/testing/storyboard/context.mjs.map +1 -1
  109. package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
  110. package/dist/lib/testing/storyboard/request-builder.js +28 -4
  111. package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
  112. package/dist/lib/testing/storyboard/request-builder.mjs +28 -4
  113. package/dist/lib/testing/storyboard/request-builder.mjs.map +1 -1
  114. package/dist/lib/testing/storyboard/request-signing/functional-dispatch.d.mts +15 -0
  115. package/dist/lib/testing/storyboard/request-signing/functional-dispatch.d.ts +16 -0
  116. package/dist/lib/testing/storyboard/request-signing/functional-dispatch.d.ts.map +1 -0
  117. package/dist/lib/testing/storyboard/request-signing/functional-dispatch.js +106 -0
  118. package/dist/lib/testing/storyboard/request-signing/functional-dispatch.js.map +1 -0
  119. package/dist/lib/testing/storyboard/request-signing/functional-dispatch.mjs +82 -0
  120. package/dist/lib/testing/storyboard/request-signing/functional-dispatch.mjs.map +1 -0
  121. package/dist/lib/testing/storyboard/request-signing/test-kit.d.mts +15 -0
  122. package/dist/lib/testing/storyboard/request-signing/test-kit.d.ts +15 -0
  123. package/dist/lib/testing/storyboard/request-signing/test-kit.d.ts.map +1 -1
  124. package/dist/lib/testing/storyboard/request-signing/test-kit.js +58 -0
  125. package/dist/lib/testing/storyboard/request-signing/test-kit.js.map +1 -1
  126. package/dist/lib/testing/storyboard/request-signing/test-kit.mjs +58 -0
  127. package/dist/lib/testing/storyboard/request-signing/test-kit.mjs.map +1 -1
  128. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +2 -0
  129. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +2 -0
  130. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts.map +1 -1
  131. package/dist/lib/testing/storyboard/request-signing/vector-loader.js +7 -1
  132. package/dist/lib/testing/storyboard/request-signing/vector-loader.js.map +1 -1
  133. package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +6 -1
  134. package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs.map +1 -1
  135. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  136. package/dist/lib/testing/storyboard/runner.js +31 -7
  137. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  138. package/dist/lib/testing/storyboard/runner.mjs +31 -7
  139. package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
  140. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  141. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  142. package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
  143. package/dist/lib/testing/storyboard/validations.js +18 -7
  144. package/dist/lib/testing/storyboard/validations.js.map +1 -1
  145. package/dist/lib/testing/storyboard/validations.mjs +18 -7
  146. package/dist/lib/testing/storyboard/validations.mjs.map +1 -1
  147. package/dist/lib/testing/storyboard/webhook-receiver.d.ts.map +1 -1
  148. package/dist/lib/testing/storyboard/webhook-receiver.js +32 -20
  149. package/dist/lib/testing/storyboard/webhook-receiver.js.map +1 -1
  150. package/dist/lib/testing/storyboard/webhook-receiver.mjs +32 -20
  151. package/dist/lib/testing/storyboard/webhook-receiver.mjs.map +1 -1
  152. package/dist/lib/testing/types.d.mts +10 -0
  153. package/dist/lib/testing/types.d.ts +10 -0
  154. package/dist/lib/testing/types.d.ts.map +1 -1
  155. package/dist/lib/testing/types.js.map +1 -1
  156. package/dist/lib/types/comply-test-controller.d.ts +1 -14
  157. package/dist/lib/types/core.generated.d.mts +1 -1
  158. package/dist/lib/types/core.generated.d.ts +1 -1
  159. package/dist/lib/types/core.generated.d.ts.map +1 -1
  160. package/dist/lib/types/core.generated.js.map +1 -1
  161. package/dist/lib/types/get-products.d.ts +1 -14
  162. package/dist/lib/types/schemas.generated.d.ts +519 -571
  163. package/dist/lib/types/schemas.generated.d.ts.map +1 -1
  164. package/dist/lib/types/schemas.generated.js +2 -2
  165. package/dist/lib/types/schemas.generated.js.map +1 -1
  166. package/dist/lib/types/schemas.generated.mjs +2 -2
  167. package/dist/lib/types/schemas.generated.mjs.map +1 -1
  168. package/dist/lib/types/tools.generated.d.mts +1 -1
  169. package/dist/lib/types/tools.generated.d.ts +1 -1
  170. package/dist/lib/types/tools.generated.d.ts.map +1 -1
  171. package/dist/lib/types/tools.generated.js.map +1 -1
  172. package/dist/lib/utils/a2a-artifacts.d.ts.map +1 -1
  173. package/dist/lib/utils/a2a-artifacts.js +2 -2
  174. package/dist/lib/utils/a2a-artifacts.js.map +1 -1
  175. package/dist/lib/utils/a2a-artifacts.mjs +2 -2
  176. package/dist/lib/utils/a2a-artifacts.mjs.map +1 -1
  177. package/dist/lib/utils/a2a-discovery.d.mts +3 -3
  178. package/dist/lib/utils/a2a-discovery.d.ts +3 -3
  179. package/dist/lib/utils/a2a-discovery.js +1 -1
  180. package/dist/lib/utils/a2a-discovery.js.map +1 -1
  181. package/dist/lib/utils/a2a-discovery.mjs +1 -1
  182. package/dist/lib/utils/a2a-discovery.mjs.map +1 -1
  183. package/dist/lib/utils/tool-request-schemas.d.mts +31 -31
  184. package/dist/lib/utils/tool-request-schemas.d.ts +31 -31
  185. package/dist/lib/v2/projection/index.d.mts +2 -0
  186. package/dist/lib/v2/projection/index.d.ts +2 -0
  187. package/dist/lib/v2/projection/index.d.ts.map +1 -1
  188. package/dist/lib/v2/projection/index.js +3 -0
  189. package/dist/lib/v2/projection/index.js.map +1 -1
  190. package/dist/lib/v2/projection/index.mjs +2 -0
  191. package/dist/lib/v2/projection/index.mjs.map +1 -1
  192. package/dist/lib/v2/projection/legacy-normalization.d.mts +24 -0
  193. package/dist/lib/v2/projection/legacy-normalization.d.ts +25 -0
  194. package/dist/lib/v2/projection/legacy-normalization.d.ts.map +1 -0
  195. package/dist/lib/v2/projection/legacy-normalization.js +32 -0
  196. package/dist/lib/v2/projection/legacy-normalization.js.map +1 -0
  197. package/dist/lib/v2/projection/legacy-normalization.mjs +8 -0
  198. package/dist/lib/v2/projection/legacy-normalization.mjs.map +1 -0
  199. package/dist/lib/version.d.mts +3 -3
  200. package/dist/lib/version.d.ts +3 -3
  201. package/dist/lib/version.js +3 -3
  202. package/dist/lib/version.js.map +1 -1
  203. package/dist/lib/version.mjs +3 -3
  204. package/dist/lib/version.mjs.map +1 -1
  205. package/docs/guides/BUILD-AN-AGENT.md +42 -6
  206. package/docs/llms.txt +2 -2
  207. package/docs/migration-13-to-14.md +17 -0
  208. package/package.json +44 -41
@@ -11,6 +11,8 @@
11
11
  */
12
12
  export { type AdcpStructuredError, type ErrorCode, AdcpError } from './async-outcome.mjs';
13
13
  export type { TaskHandoffOptions } from './async-outcome.mjs';
14
+ export { withResponseSummary } from './response-summary.mjs';
15
+ export type { ResponseWithSummary } from './response-summary.mjs';
14
16
  export type { ServerPayload } from '../../types/server-payload.mjs';
15
17
  export { PackageNotFoundError, MediaBuyNotFoundError, ProductNotFoundError, CreativeNotFoundError, ProductUnavailableError, CreativeRejectedError, BudgetTooLowError, BudgetExhaustedError, IdempotencyConflictError, InvalidRequestError, InvalidStateError, BackwardsTimeRangeError, AuthMissingError, AuthInvalidError, AuthRequiredError, PermissionDeniedError, RateLimitedError, ServiceUnavailableError, UnsupportedFeatureError, ComplianceUnsatisfiedError, GovernanceDeniedError, PolicyViolationError, } from './errors-typed.mjs';
16
18
  export type { CursorPage, CursorRequest } from './pagination.mjs';
@@ -11,6 +11,8 @@
11
11
  */
12
12
  export { type AdcpStructuredError, type ErrorCode, AdcpError } from './async-outcome';
13
13
  export type { TaskHandoffOptions } from './async-outcome';
14
+ export { withResponseSummary } from './response-summary';
15
+ export type { ResponseWithSummary } from './response-summary';
14
16
  export type { ServerPayload } from '../../types/server-payload';
15
17
  export { PackageNotFoundError, MediaBuyNotFoundError, ProductNotFoundError, CreativeNotFoundError, ProductUnavailableError, CreativeRejectedError, BudgetTooLowError, BudgetExhaustedError, IdempotencyConflictError, InvalidRequestError, InvalidStateError, BackwardsTimeRangeError, AuthMissingError, AuthInvalidError, AuthRequiredError, PermissionDeniedError, RateLimitedError, ServiceUnavailableError, UnsupportedFeatureError, ComplianceUnsatisfiedError, GovernanceDeniedError, PolicyViolationError, } from './errors-typed';
16
18
  export type { CursorPage, CursorRequest } from './pagination';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/decisioning/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtF,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAMhE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAO9D,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,6BAA6B,EAC7B,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,GA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BAAuB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKxH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxG,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/decisioning/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtF,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAMhE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAO9D,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,6BAA6B,EAC7B,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAA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AAiB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKxH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxG,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
@@ -113,10 +113,12 @@ __export(decisioning_exports, {
113
113
  validateOverlapSubsetOfWire: () => import_proposal.validateOverlapSubsetOfWire,
114
114
  validatePlatform: () => import_validate_platform.validatePlatform,
115
115
  validateProposalCapabilities: () => import_proposal.validateProposalCapabilities,
116
- validationError: () => import_helpers.validationError
116
+ validationError: () => import_helpers.validationError,
117
+ withResponseSummary: () => import_response_summary.withResponseSummary
117
118
  });
118
119
  module.exports = __toCommonJS(decisioning_exports);
119
120
  var import_async_outcome = require('./async-outcome.js');
121
+ var import_response_summary = require('./response-summary.js');
120
122
  var import_errors_typed = require('./errors-typed.js');
121
123
  var import_status_changes = require('./status-changes.js');
122
124
  var import_capabilities = require('./capabilities.js');
@@ -236,6 +238,7 @@ var import_assembly_helpers = require('./assembly-helpers.js');
236
238
  validateOverlapSubsetOfWire,
237
239
  validatePlatform,
238
240
  validateProposalCapabilities,
239
- validationError
241
+ validationError,
242
+ withResponseSummary
240
243
  });
241
244
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/server/decisioning/index.ts"],"sourcesContent":["/**\n * DecisioningPlatform v1.0 — preview surface for the v6.0 architecture.\n *\n * Status: PREVIEW. Types only; not yet wired into the framework. Subject\n * to change before 6.0 ships. Don't build production adapters against this\n * yet — the framework still routes through the v5.x handler-style API.\n *\n * Design proposal: `.context/proposals/specialism-platform-interfaces-v3.md`\n *\n * @packageDocumentation\n */\n\n// Adopter-facing structured-error primitive.\n//\n// `AdcpError` is the canonical throwable for structured rejection. Specialism\n// methods return plain `T` for success or `throw new AdcpError(...)` to project\n// to the wire `adcp_error` envelope.\n//\n// HITL is expressed in the type system via the dual-method shape on each\n// spec-HITL tool (`xxx` for sync, `xxxTask` for HITL). No adopter-facing\n// task primitives — the framework owns task lifecycle and dispatches the\n// `*Task` method in the background.\nexport { type AdcpStructuredError, type ErrorCode, AdcpError } from './async-outcome';\nexport type { TaskHandoffOptions } from './async-outcome';\nexport type { ServerPayload } from '../../types/server-payload';\n\n// Typed `AdcpError` subclasses — adopter convenience for the highest-traffic\n// error codes. Each class encodes the canonical code/recovery/field shape.\n// LLM-generated platforms get autocomplete on the import; humans skim the\n// list to find the right class. See `errors-typed.ts`.\nexport {\n PackageNotFoundError,\n MediaBuyNotFoundError,\n ProductNotFoundError,\n CreativeNotFoundError,\n ProductUnavailableError,\n CreativeRejectedError,\n BudgetTooLowError,\n BudgetExhaustedError,\n IdempotencyConflictError,\n InvalidRequestError,\n InvalidStateError,\n BackwardsTimeRangeError,\n AuthMissingError,\n AuthInvalidError,\n AuthRequiredError,\n PermissionDeniedError,\n RateLimitedError,\n ServiceUnavailableError,\n UnsupportedFeatureError,\n ComplianceUnsatisfiedError,\n GovernanceDeniedError,\n PolicyViolationError,\n} from './errors-typed';\n\n// Cursor pagination\nexport type { CursorPage, CursorRequest } from './pagination';\n\n// Status-change event bus — adopter-facing primitive for spec-native\n// lifecycle channels (media_buy / creative / audience / signal / proposal /\n// plan / rights_grant / delivery_report). Module-level so adopters can\n// publish from webhook handlers, crons, in-process workers without holding\n// a server reference.\nexport {\n publishStatusChange,\n setStatusChangeBus,\n getStatusChangeBus,\n createInMemoryStatusChangeBus,\n type StatusChange,\n type StatusChangeBus,\n type StatusChangeResourceType,\n type StatusChangeListener,\n type PublishStatusChangeOpts,\n} from './status-changes';\n\n// Capabilities (single source of truth for get_adcp_capabilities)\nexport type {\n DecisioningCapabilities,\n ComplianceTestingCapabilities,\n CreativeAgentRef,\n TargetingCapabilities,\n TargetingPostalAreaSupport,\n ReportingCapabilities,\n} from './capabilities';\nexport { normalizePostalAreaSupport, normalizeTargetingCapabilities } from './capabilities';\n\n// Account model\nexport type {\n Account,\n AuthPrincipal,\n AccountStore,\n AccountFilter,\n ListAccountsPayload,\n SyncAccountsPayload,\n SyncAccountsSuccessPayload,\n SyncAccountsRow,\n SyncAccountsResultRow,\n SyncGovernancePayload,\n SyncGovernanceSuccessPayload,\n SyncGovernanceRow,\n ReportUsagePayload,\n GetAccountFinancialsPayload,\n GetAccountFinancialsSuccessPayload,\n ListAccountsHandlerResult,\n SyncAccountsHandlerResult,\n SyncGovernanceHandlerResult,\n ReportUsageHandlerResult,\n GetAccountFinancialsHandlerResult,\n AdcpAccountStatus,\n ResolveContext,\n AccountToolContext,\n ResolvedAuthInfo,\n} from './account';\n\nexport { AccountNotFoundError, refAccountId } from './account';\n\n// Multi-tenant AccountStore builder. Bakes in the two-path resolution\n// (operator-routed + auth-derived) and the per-entry tenant-isolation gate\n// that adopters historically had to hand-write — and silently fail to\n// hand-write — on `accounts.upsert` / `accounts.syncGovernance`.\nexport { createTenantStore, narrowAccountRef } from './tenant-store';\nexport type { TenantStoreConfig } from './tenant-store';\n\n// Buyer-agent identity surface — Phase 1 of #1269. Durable commercial\n// relationship records keyed off the request credential. Factory-pattern\n// registry (signing-only / bearer-only / mixed) encodes the implementer\n// posture at construction; framework calls `BuyerAgentRegistry.resolve`\n// once per request before `accounts.resolve`. Phase 1 ships the shape and\n// resolution; framework-level billing-capability enforcement and the\n// AdCP-3.1 error-code emission land in Phase 2 (#1292).\nexport type {\n BuyerAgent,\n BuyerAgentBillingMode,\n BuyerAgentStatus,\n BuyerAgentRegistry as BuyerAgentRegistryProtocol,\n BuyerAgentResolveInput,\n BuyerAgentCacheOptions,\n CachedBuyerAgentRegistry,\n AdcpCredential,\n ResolveBuyerAgentByAgentUrl,\n ResolveBuyerAgentByCredential,\n} from './buyer-agent';\nexport { BuyerAgentRegistry } from './buyer-agent';\n\n// Native status mapping\nexport type { StatusMappers, AdcpMediaBuyStatus, AdcpCreativeStatus, AdcpPlanStatus } from './status-mappers';\nexport { identityStatusMappers } from './status-mappers';\n\n// Request context (state + resolve)\nexport type {\n RequestContext,\n WorkflowStateReader,\n ResourceResolver,\n WorkflowObjectType,\n WorkflowStep,\n Proposal,\n GovernanceContextJWS,\n} from './context';\n\n// Top-level platform + compile-time capability enforcement\nexport type { DecisioningPlatform, RequiredPlatformsFor, RequiredCapabilitiesFor } from './platform';\n\n// Method-level composition (closes #1314) — wrap individual platform methods\n// with `before` / `after` hooks for short-circuit + enrichment patterns.\nexport { composeMethod } from './compose';\nexport type { ComposeHooks, ComposeShortCircuit } from './compose';\n\n// `accounts.resolve` security presets (closes #1339) — canonical post-resolve\n// guards that standardize the multi-tenant authorization pattern instead of\n// every adopter rolling their own.\nexport { requireAccountMatch, requireAdvertiserMatch, requireOrgScope } from './resolve-presets';\nexport type { ResolveAccountHooks, ResolveGuardOptions } from './resolve-presets';\n\n// Specialism interfaces (v1.0)\nexport type {\n CreativeBuilderPlatform,\n LegacyBuildCreativeReturn,\n LegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload,\n PreviewCreativePayload,\n LegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload,\n // Deprecated aliases — kept for one-release source compat. Both\n // resolve to CreativeBuilderPlatform; see specialisms/creative.ts.\n CreativeTemplatePlatform,\n CreativeGenerativePlatform,\n RefinementMessage,\n SyncCreativesRow,\n} from './specialisms/creative';\n\nexport type {\n CreativeAdServerPlatform,\n LegacyBuildCreativeReturn as CreativeAdServerLegacyBuildCreativeReturn,\n LegacyBuildCreativePayload as CreativeAdServerLegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload as CreativeAdServerLegacyBuildCreativeMultiPayload,\n PreviewCreativePayload as CreativeAdServerPreviewCreativePayload,\n LegacyPreviewCreativePayload as CreativeAdServerLegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload as CreativeAdServerLegacyListCreativeFormatsPayload,\n ListCreativesPayload as CreativeAdServerListCreativesPayload,\n GetCreativeDeliveryPayload,\n GetCreativeDeliveryPayload as CreativeAdServerGetCreativeDeliveryPayload,\n LegacyGetCreativeDeliveryPayload as CreativeAdServerLegacyGetCreativeDeliveryPayload,\n} from './specialisms/creative-ad-server';\n\nexport type {\n CampaignGovernancePlatform,\n CheckGovernancePayload,\n SyncPlansPayload,\n ReportPlanOutcomePayload,\n GetPlanAuditLogsPayload,\n} from './specialisms/campaign-governance';\n\nexport type {\n ContentStandardsPlatform,\n LegacyListContentStandardsPayload,\n LegacyGetContentStandardsPayload,\n LegacyCreateContentStandardsPayload,\n LegacyUpdateContentStandardsPayload,\n LegacyCalibrateContentPayload,\n LegacyValidateContentDeliveryPayload,\n LegacyGetMediaBuyArtifactsPayload,\n LegacyGetCreativeFeaturesPayload,\n} from './specialisms/content-standards';\n\nexport type {\n PropertyListsPlatform,\n CollectionListsPlatform,\n CreatePropertyListPayload,\n UpdatePropertyListPayload,\n GetPropertyListPayload,\n ListPropertyListsPayload,\n DeletePropertyListPayload,\n CreateCollectionListPayload,\n UpdateCollectionListPayload,\n GetCollectionListPayload,\n ListCollectionListsPayload,\n DeleteCollectionListPayload,\n} from './specialisms/lists';\n\nexport type {\n SalesPlatform,\n SalesCorePlatform,\n SalesIngestionPlatform,\n MediaBuyLifecyclePlatform,\n MediaBuyLifecycleCorePlatform,\n MediaBuyLifecycleProposalPlatform,\n GetProductsPayload,\n GetProductsProjectionInput,\n LegacyGetProductsPayload,\n GetProductsHandlerResult,\n CreateMediaBuyPayload,\n LegacyCreateMediaBuyPayload,\n CreateMediaBuyHandlerResult,\n UpdateMediaBuyPayload,\n LegacyUpdateMediaBuyPayload,\n UpdateMediaBuyHandlerResult,\n GetMediaBuyDeliveryPayload,\n LegacyGetMediaBuyDeliveryPayload,\n GetMediaBuysPayload,\n LegacyGetMediaBuysPayload,\n ProvidePerformanceFeedbackPayload,\n LegacyListCreativeFormatsPayload as SalesLegacyListCreativeFormatsPayload,\n ListCreativesPayload,\n LegacyListCreativesPayload,\n SyncCreativesPayload,\n SyncCreativesHandlerResult,\n SyncCatalogsPayload,\n LogEventPayload,\n SyncEventSourcesPayload,\n ListProductsPayload,\n RequestProposalsPayload,\n RefineProposalsPayload,\n DeclineProposalsPayload,\n BuyProductsPayload,\n AcceptProposalPayload,\n ControlMediaBuyPayload,\n} from './specialisms/sales';\n\nexport type {\n AudiencePlatform,\n Audience,\n SyncAudiencesPayload,\n SyncAudiencesRow,\n SyncAudiencesHandlerResult,\n AudienceStatus,\n} from './specialisms/audiences';\n\nexport type {\n SignalsPlatform,\n GetSignalsPayload,\n GetSignalsHandlerResult,\n ActivateSignalPayload,\n} from './specialisms/signals';\n\nexport type {\n SponsoredIntelligencePlatform,\n SIGetOfferingPayload,\n SIInitiateSessionPayload,\n SISendMessagePayload,\n SITerminateSessionPayload,\n} from './specialisms/sponsored-intelligence';\n\nexport type {\n BrandRightsPlatform,\n GetBrandIdentityPayload,\n LegacyGetRightsPayload,\n LegacyAcquireRightsAcquiredPayload,\n LegacyAcquireRightsPendingApprovalPayload,\n LegacyAcquireRightsRejectedPayload,\n LegacyAcquireRightsPayload,\n LegacyUpdateRightsPayload,\n CreativeApprovedPayload,\n CreativeRejectedPayload,\n CreativePendingReviewPayload,\n CreativeApprovalPayload,\n} from './specialisms/brand-rights';\n\n// Brand-rights wire types — re-exported from `@adcp/sdk/server/decisioning`\n// because brand-rights is the only specialism whose wire types live in\n// `core.generated` (not `tools.generated`), and the public `@adcp/sdk/types`\n// barrel doesn't surface them. Adopters typing their own helper functions\n// import these from here, NOT from the deep `core.generated` path.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentitySuccess,\n GetRightsRequest as LegacyGetRightsRequest,\n GetRightsSuccess as LegacyGetRightsSuccess,\n AcquireRightsRequest as LegacyAcquireRightsRequest,\n AcquireRightsAcquired as LegacyAcquireRightsAcquired,\n AcquireRightsPendingApproval as LegacyAcquireRightsPendingApproval,\n AcquireRightsRejected as LegacyAcquireRightsRejected,\n AcquireRightsError as LegacyAcquireRightsError,\n RightUse,\n RightType,\n RightsConstraint,\n RightsTerms,\n RightsPricingOption,\n GenerationCredential,\n} from '../../types/core.generated';\n\n// Runtime (v6.0 alpha) — preview surface for adopters spiking against the\n// new shape. Subject to change before 6.0 GA.\nexport {\n createAdcpServerFromPlatform,\n getHydratedLegacyFormatIds,\n getAllAdcpMigrations,\n type CreateAdcpServerFromPlatformOptions,\n type LegacyDecisioningHandlerGroups,\n type RequiredOptsFor,\n type DecisioningAdcpServer,\n type DecisioningObservabilityHooks,\n} from './runtime/from-platform';\nexport { PlatformConfigError, validatePlatform } from './runtime/validate-platform';\nexport {\n createInMemoryTaskRegistry,\n type TaskRegistry,\n type TaskRecord,\n type TaskStatus,\n} from './runtime/task-registry';\nexport {\n createPostgresTaskRegistry,\n getDecisioningTaskRegistryMigration,\n type CreatePostgresTaskRegistryOptions,\n type PgQueryable,\n} from './runtime/postgres-task-registry';\n\n// Multi-tenant deployment helper — wraps createAdcpServerFromPlatform with\n// per-tenant config, health states (healthy/unverified/disabled), and JWKS\n// validation. Composes with the existing serve() host-routing surface.\nexport {\n createTenantRegistry,\n createDefaultJwksValidator,\n createSelfSignedTenantKey,\n createNoopJwksValidator,\n type TenantRegistry,\n type TenantConfig,\n type TenantSigningKey,\n type TenantStatus,\n type TenantHealth,\n type TenantRegistryOptions,\n type JwksValidator,\n type JwksValidationResult,\n} from './tenant-registry';\n\n// Manifest helpers — typed accessors for creative_manifest.assets values.\n// Save adopters from writing the same null-check + discriminator-check\n// boilerplate per call.\nexport { getAsset, getAssetSlot, requireAsset } from './manifest-helpers';\nexport type { CreativeAssetsContainer } from './manifest-helpers';\n\n// List helpers — wrap row arrays + pagination into the heavier wire shapes\n// (today: list_creatives, which carries query_summary alongside the rows).\nexport {\n buildListCreativesResponse,\n buildListCreativesResponseLegacy,\n type BuildListCreativesResponseOpts,\n type BuildListCreativesResponseLegacyOpts,\n} from './list-helpers';\n\n// Start-time helper — normalize the wire `start_time` union into a Date,\n// with platform-aware ASAP lead-time injection.\nexport { resolveStartTime, type ResolveStartTimeOptions } from './start-time';\n\n// Admin Express router for ops visibility into the TenantRegistry.\n// Mount on a separate port/path with operator auth.\nexport {\n createTenantAdminRouter,\n createTenantAdminHandlers,\n mountTenantAdmin,\n type TenantAdminHandlers,\n type RouterLike,\n} from './admin-router';\n\n// Adopter helpers — batchPoll, validationError, upstreamError, RequestShape.\n// All opt-in convenience; nothing in the framework calls these internally.\nexport { batchPoll, validationError, upstreamError } from './helpers';\nexport type { RequestShape } from './helpers';\n\n// Platform identity helpers — fix TypeScript's contextual-typing gap when\n// building a DecisioningPlatform (or sub-interface) as an object literal.\n// Without these, `createAdcpServerFromPlatform({ sales: { syncEventSources:\n// async (req, ctx) => {...} } })` gives `req: unknown` because the generic\n// `P extends DecisioningPlatform<any,any>` is inferred, not declared.\n// Wrapping the sub-object with e.g. `defineSalesPlatform<MyMeta>({...})`\n// forces the concrete type annotation TypeScript needs. The helpers are\n// pure identity functions — zero runtime cost.\nexport {\n definePlatform,\n defineSalesPlatform,\n defineSalesCorePlatform,\n defineSalesIngestionPlatform,\n defineAudiencePlatform,\n defineSignalsPlatform,\n defineSponsoredIntelligencePlatform,\n defineCreativeBuilderPlatform,\n defineCreativeAdServerPlatform,\n defineCampaignGovernancePlatform,\n defineContentStandardsPlatform,\n definePropertyListsPlatform,\n defineCollectionListsPlatform,\n defineBrandRightsPlatform,\n definePlatformWithCompliance,\n} from './platform-helpers';\n\n// ProposalManager — primitives for the two-platform composition (port of\n// adcp-client-python PRs #504 + #550). Splits proposal assembly from\n// media-buy execution; either side can be mock-backed independently.\n// Framework dispatch wiring lands in a follow-up release.\nexport type {\n ProposalManager,\n ProposalGetProductsPayload,\n LegacyProposalGetProductsPayload,\n ProposalCapabilities,\n ProposalSalesSpecialism,\n Recipe,\n CapabilityOverlap,\n FinalizeProposalRequest,\n FinalizeProposalSuccess,\n ProposalState,\n ProposalRecord,\n ProposalStore,\n InMemoryProposalStoreOptions,\n MockProposalManagerOptions,\n} from './proposal';\nexport {\n validateProposalCapabilities,\n InMemoryProposalStore,\n MockProposalManager,\n enforceProposalExpiry,\n validateCapabilityOverlap,\n validateOverlapSubsetOfWire,\n detectFinalizeAction,\n setProposalLifecycleLogger,\n maybeInterceptFinalize,\n maybePersistDraftAfterGetProducts,\n maybeReserveProposalForCreateMediaBuy,\n finalizeProposalConsumption,\n releaseProposalReservation,\n maybeHydrateRecipesForMediaBuyId,\n} from './proposal';\nexport type { FinalizeActionRef, ProposalLifecycleLogger, FinalizeInterceptResult, ReservedProposal } from './proposal';\n\n// Canonical assembly helpers — emit Product / PricingOption / package shapes\n// from intent-shaped input. Raw named-format product assembly is available\n// only through the explicit buildProductLegacy compatibility helper.\nexport { buildProduct, buildProductLegacy, buildPricingOption, buildPackage } from './assembly-helpers';\nexport type {\n BuildProductInput,\n BuildProductLegacyInput,\n BuildPricingOptionInput,\n BuildPackageInput,\n} from './assembly-helpers';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA,2BAAoE;AAQpE,0BAuBO;AAUP,4BAUO;AAWP,0BAA2E;AA8B3E,qBAAmD;AAMnD,0BAAoD;AAsBpD,yBAAmC;AAInC,4BAAsC;AAkBtC,qBAA8B;AAM9B,6BAA6E;AA4K7E,2BASO;AACP,+BAAsD;AACtD,2BAKO;AACP,oCAKO;AAKP,6BAaO;AAKP,8BAAqD;AAKrD,0BAKO;AAIP,wBAA+D;AAI/D,0BAMO;AAIP,qBAA0D;AAW1D,8BAgBO;AAsBP,sBAeO;AAMP,8BAAmF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/lib/server/decisioning/index.ts"],"sourcesContent":["/**\n * DecisioningPlatform v1.0 — preview surface for the v6.0 architecture.\n *\n * Status: PREVIEW. Types only; not yet wired into the framework. Subject\n * to change before 6.0 ships. Don't build production adapters against this\n * yet — the framework still routes through the v5.x handler-style API.\n *\n * Design proposal: `.context/proposals/specialism-platform-interfaces-v3.md`\n *\n * @packageDocumentation\n */\n\n// Adopter-facing structured-error primitive.\n//\n// `AdcpError` is the canonical throwable for structured rejection. Specialism\n// methods return plain `T` for success or `throw new AdcpError(...)` to project\n// to the wire `adcp_error` envelope.\n//\n// HITL is expressed in the type system via the dual-method shape on each\n// spec-HITL tool (`xxx` for sync, `xxxTask` for HITL). No adopter-facing\n// task primitives — the framework owns task lifecycle and dispatches the\n// `*Task` method in the background.\nexport { type AdcpStructuredError, type ErrorCode, AdcpError } from './async-outcome';\nexport type { TaskHandoffOptions } from './async-outcome';\nexport { withResponseSummary } from './response-summary';\nexport type { ResponseWithSummary } from './response-summary';\nexport type { ServerPayload } from '../../types/server-payload';\n\n// Typed `AdcpError` subclasses — adopter convenience for the highest-traffic\n// error codes. Each class encodes the canonical code/recovery/field shape.\n// LLM-generated platforms get autocomplete on the import; humans skim the\n// list to find the right class. See `errors-typed.ts`.\nexport {\n PackageNotFoundError,\n MediaBuyNotFoundError,\n ProductNotFoundError,\n CreativeNotFoundError,\n ProductUnavailableError,\n CreativeRejectedError,\n BudgetTooLowError,\n BudgetExhaustedError,\n IdempotencyConflictError,\n InvalidRequestError,\n InvalidStateError,\n BackwardsTimeRangeError,\n AuthMissingError,\n AuthInvalidError,\n AuthRequiredError,\n PermissionDeniedError,\n RateLimitedError,\n ServiceUnavailableError,\n UnsupportedFeatureError,\n ComplianceUnsatisfiedError,\n GovernanceDeniedError,\n PolicyViolationError,\n} from './errors-typed';\n\n// Cursor pagination\nexport type { CursorPage, CursorRequest } from './pagination';\n\n// Status-change event bus — adopter-facing primitive for spec-native\n// lifecycle channels (media_buy / creative / audience / signal / proposal /\n// plan / rights_grant / delivery_report). Module-level so adopters can\n// publish from webhook handlers, crons, in-process workers without holding\n// a server reference.\nexport {\n publishStatusChange,\n setStatusChangeBus,\n getStatusChangeBus,\n createInMemoryStatusChangeBus,\n type StatusChange,\n type StatusChangeBus,\n type StatusChangeResourceType,\n type StatusChangeListener,\n type PublishStatusChangeOpts,\n} from './status-changes';\n\n// Capabilities (single source of truth for get_adcp_capabilities)\nexport type {\n DecisioningCapabilities,\n ComplianceTestingCapabilities,\n CreativeAgentRef,\n TargetingCapabilities,\n TargetingPostalAreaSupport,\n ReportingCapabilities,\n} from './capabilities';\nexport { normalizePostalAreaSupport, normalizeTargetingCapabilities } from './capabilities';\n\n// Account model\nexport type {\n Account,\n AuthPrincipal,\n AccountStore,\n AccountFilter,\n ListAccountsPayload,\n SyncAccountsPayload,\n SyncAccountsSuccessPayload,\n SyncAccountsRow,\n SyncAccountsResultRow,\n SyncGovernancePayload,\n SyncGovernanceSuccessPayload,\n SyncGovernanceRow,\n ReportUsagePayload,\n GetAccountFinancialsPayload,\n GetAccountFinancialsSuccessPayload,\n ListAccountsHandlerResult,\n SyncAccountsHandlerResult,\n SyncGovernanceHandlerResult,\n ReportUsageHandlerResult,\n GetAccountFinancialsHandlerResult,\n AdcpAccountStatus,\n ResolveContext,\n AccountToolContext,\n ResolvedAuthInfo,\n} from './account';\n\nexport { AccountNotFoundError, refAccountId } from './account';\n\n// Multi-tenant AccountStore builder. Bakes in the two-path resolution\n// (operator-routed + auth-derived) and the per-entry tenant-isolation gate\n// that adopters historically had to hand-write — and silently fail to\n// hand-write — on `accounts.upsert` / `accounts.syncGovernance`.\nexport { createTenantStore, narrowAccountRef } from './tenant-store';\nexport type { TenantStoreConfig } from './tenant-store';\n\n// Buyer-agent identity surface — Phase 1 of #1269. Durable commercial\n// relationship records keyed off the request credential. Factory-pattern\n// registry (signing-only / bearer-only / mixed) encodes the implementer\n// posture at construction; framework calls `BuyerAgentRegistry.resolve`\n// once per request before `accounts.resolve`. Phase 1 ships the shape and\n// resolution; framework-level billing-capability enforcement and the\n// AdCP-3.1 error-code emission land in Phase 2 (#1292).\nexport type {\n BuyerAgent,\n BuyerAgentBillingMode,\n BuyerAgentStatus,\n BuyerAgentRegistry as BuyerAgentRegistryProtocol,\n BuyerAgentResolveInput,\n BuyerAgentCacheOptions,\n CachedBuyerAgentRegistry,\n AdcpCredential,\n ResolveBuyerAgentByAgentUrl,\n ResolveBuyerAgentByCredential,\n} from './buyer-agent';\nexport { BuyerAgentRegistry } from './buyer-agent';\n\n// Native status mapping\nexport type { StatusMappers, AdcpMediaBuyStatus, AdcpCreativeStatus, AdcpPlanStatus } from './status-mappers';\nexport { identityStatusMappers } from './status-mappers';\n\n// Request context (state + resolve)\nexport type {\n RequestContext,\n WorkflowStateReader,\n ResourceResolver,\n WorkflowObjectType,\n WorkflowStep,\n Proposal,\n GovernanceContextJWS,\n} from './context';\n\n// Top-level platform + compile-time capability enforcement\nexport type { DecisioningPlatform, RequiredPlatformsFor, RequiredCapabilitiesFor } from './platform';\n\n// Method-level composition (closes #1314) — wrap individual platform methods\n// with `before` / `after` hooks for short-circuit + enrichment patterns.\nexport { composeMethod } from './compose';\nexport type { ComposeHooks, ComposeShortCircuit } from './compose';\n\n// `accounts.resolve` security presets (closes #1339) — canonical post-resolve\n// guards that standardize the multi-tenant authorization pattern instead of\n// every adopter rolling their own.\nexport { requireAccountMatch, requireAdvertiserMatch, requireOrgScope } from './resolve-presets';\nexport type { ResolveAccountHooks, ResolveGuardOptions } from './resolve-presets';\n\n// Specialism interfaces (v1.0)\nexport type {\n CreativeBuilderPlatform,\n LegacyBuildCreativeReturn,\n LegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload,\n PreviewCreativePayload,\n LegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload,\n // Deprecated aliases — kept for one-release source compat. Both\n // resolve to CreativeBuilderPlatform; see specialisms/creative.ts.\n CreativeTemplatePlatform,\n CreativeGenerativePlatform,\n RefinementMessage,\n SyncCreativesRow,\n} from './specialisms/creative';\n\nexport type {\n CreativeAdServerPlatform,\n LegacyBuildCreativeReturn as CreativeAdServerLegacyBuildCreativeReturn,\n LegacyBuildCreativePayload as CreativeAdServerLegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload as CreativeAdServerLegacyBuildCreativeMultiPayload,\n PreviewCreativePayload as CreativeAdServerPreviewCreativePayload,\n LegacyPreviewCreativePayload as CreativeAdServerLegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload as CreativeAdServerLegacyListCreativeFormatsPayload,\n ListCreativesPayload as CreativeAdServerListCreativesPayload,\n GetCreativeDeliveryPayload,\n GetCreativeDeliveryPayload as CreativeAdServerGetCreativeDeliveryPayload,\n LegacyGetCreativeDeliveryPayload as CreativeAdServerLegacyGetCreativeDeliveryPayload,\n} from './specialisms/creative-ad-server';\n\nexport type {\n CampaignGovernancePlatform,\n CheckGovernancePayload,\n SyncPlansPayload,\n ReportPlanOutcomePayload,\n GetPlanAuditLogsPayload,\n} from './specialisms/campaign-governance';\n\nexport type {\n ContentStandardsPlatform,\n LegacyListContentStandardsPayload,\n LegacyGetContentStandardsPayload,\n LegacyCreateContentStandardsPayload,\n LegacyUpdateContentStandardsPayload,\n LegacyCalibrateContentPayload,\n LegacyValidateContentDeliveryPayload,\n LegacyGetMediaBuyArtifactsPayload,\n LegacyGetCreativeFeaturesPayload,\n} from './specialisms/content-standards';\n\nexport type {\n PropertyListsPlatform,\n CollectionListsPlatform,\n CreatePropertyListPayload,\n UpdatePropertyListPayload,\n GetPropertyListPayload,\n ListPropertyListsPayload,\n DeletePropertyListPayload,\n CreateCollectionListPayload,\n UpdateCollectionListPayload,\n GetCollectionListPayload,\n ListCollectionListsPayload,\n DeleteCollectionListPayload,\n} from './specialisms/lists';\n\nexport type {\n SalesPlatform,\n SalesCorePlatform,\n SalesIngestionPlatform,\n MediaBuyLifecyclePlatform,\n MediaBuyLifecycleCorePlatform,\n MediaBuyLifecycleProposalPlatform,\n GetProductsPayload,\n GetProductsProjectionInput,\n LegacyGetProductsPayload,\n GetProductsHandlerResult,\n CreateMediaBuyPayload,\n LegacyCreateMediaBuyPayload,\n CreateMediaBuyHandlerResult,\n UpdateMediaBuyPayload,\n LegacyUpdateMediaBuyPayload,\n UpdateMediaBuyHandlerResult,\n GetMediaBuyDeliveryPayload,\n LegacyGetMediaBuyDeliveryPayload,\n GetMediaBuysPayload,\n LegacyGetMediaBuysPayload,\n ProvidePerformanceFeedbackPayload,\n LegacyListCreativeFormatsPayload as SalesLegacyListCreativeFormatsPayload,\n ListCreativesPayload,\n LegacyListCreativesPayload,\n SyncCreativesPayload,\n SyncCreativesHandlerResult,\n SyncCatalogsPayload,\n LogEventPayload,\n SyncEventSourcesPayload,\n ListProductsPayload,\n RequestProposalsPayload,\n RefineProposalsPayload,\n DeclineProposalsPayload,\n BuyProductsPayload,\n AcceptProposalPayload,\n ControlMediaBuyPayload,\n} from './specialisms/sales';\n\nexport type {\n AudiencePlatform,\n Audience,\n SyncAudiencesPayload,\n SyncAudiencesRow,\n SyncAudiencesHandlerResult,\n AudienceStatus,\n} from './specialisms/audiences';\n\nexport type {\n SignalsPlatform,\n GetSignalsPayload,\n GetSignalsHandlerResult,\n ActivateSignalPayload,\n} from './specialisms/signals';\n\nexport type {\n SponsoredIntelligencePlatform,\n SIGetOfferingPayload,\n SIInitiateSessionPayload,\n SISendMessagePayload,\n SITerminateSessionPayload,\n} from './specialisms/sponsored-intelligence';\n\nexport type {\n BrandRightsPlatform,\n GetBrandIdentityPayload,\n LegacyGetRightsPayload,\n LegacyAcquireRightsAcquiredPayload,\n LegacyAcquireRightsPendingApprovalPayload,\n LegacyAcquireRightsRejectedPayload,\n LegacyAcquireRightsPayload,\n LegacyUpdateRightsPayload,\n CreativeApprovedPayload,\n CreativeRejectedPayload,\n CreativePendingReviewPayload,\n CreativeApprovalPayload,\n} from './specialisms/brand-rights';\n\n// Brand-rights wire types — re-exported from `@adcp/sdk/server/decisioning`\n// because brand-rights is the only specialism whose wire types live in\n// `core.generated` (not `tools.generated`), and the public `@adcp/sdk/types`\n// barrel doesn't surface them. Adopters typing their own helper functions\n// import these from here, NOT from the deep `core.generated` path.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentitySuccess,\n GetRightsRequest as LegacyGetRightsRequest,\n GetRightsSuccess as LegacyGetRightsSuccess,\n AcquireRightsRequest as LegacyAcquireRightsRequest,\n AcquireRightsAcquired as LegacyAcquireRightsAcquired,\n AcquireRightsPendingApproval as LegacyAcquireRightsPendingApproval,\n AcquireRightsRejected as LegacyAcquireRightsRejected,\n AcquireRightsError as LegacyAcquireRightsError,\n RightUse,\n RightType,\n RightsConstraint,\n RightsTerms,\n RightsPricingOption,\n GenerationCredential,\n} from '../../types/core.generated';\n\n// Runtime (v6.0 alpha) — preview surface for adopters spiking against the\n// new shape. Subject to change before 6.0 GA.\nexport {\n createAdcpServerFromPlatform,\n getHydratedLegacyFormatIds,\n getAllAdcpMigrations,\n type CreateAdcpServerFromPlatformOptions,\n type LegacyDecisioningHandlerGroups,\n type RequiredOptsFor,\n type DecisioningAdcpServer,\n type DecisioningObservabilityHooks,\n} from './runtime/from-platform';\nexport { PlatformConfigError, validatePlatform } from './runtime/validate-platform';\nexport {\n createInMemoryTaskRegistry,\n type TaskRegistry,\n type TaskRecord,\n type TaskStatus,\n} from './runtime/task-registry';\nexport {\n createPostgresTaskRegistry,\n getDecisioningTaskRegistryMigration,\n type CreatePostgresTaskRegistryOptions,\n type PgQueryable,\n} from './runtime/postgres-task-registry';\n\n// Multi-tenant deployment helper — wraps createAdcpServerFromPlatform with\n// per-tenant config, health states (healthy/unverified/disabled), and JWKS\n// validation. Composes with the existing serve() host-routing surface.\nexport {\n createTenantRegistry,\n createDefaultJwksValidator,\n createSelfSignedTenantKey,\n createNoopJwksValidator,\n type TenantRegistry,\n type TenantConfig,\n type TenantSigningKey,\n type TenantStatus,\n type TenantHealth,\n type TenantRegistryOptions,\n type JwksValidator,\n type JwksValidationResult,\n} from './tenant-registry';\n\n// Manifest helpers — typed accessors for creative_manifest.assets values.\n// Save adopters from writing the same null-check + discriminator-check\n// boilerplate per call.\nexport { getAsset, getAssetSlot, requireAsset } from './manifest-helpers';\nexport type { CreativeAssetsContainer } from './manifest-helpers';\n\n// List helpers — wrap row arrays + pagination into the heavier wire shapes\n// (today: list_creatives, which carries query_summary alongside the rows).\nexport {\n buildListCreativesResponse,\n buildListCreativesResponseLegacy,\n type BuildListCreativesResponseOpts,\n type BuildListCreativesResponseLegacyOpts,\n} from './list-helpers';\n\n// Start-time helper — normalize the wire `start_time` union into a Date,\n// with platform-aware ASAP lead-time injection.\nexport { resolveStartTime, type ResolveStartTimeOptions } from './start-time';\n\n// Admin Express router for ops visibility into the TenantRegistry.\n// Mount on a separate port/path with operator auth.\nexport {\n createTenantAdminRouter,\n createTenantAdminHandlers,\n mountTenantAdmin,\n type TenantAdminHandlers,\n type RouterLike,\n} from './admin-router';\n\n// Adopter helpers — batchPoll, validationError, upstreamError, RequestShape.\n// All opt-in convenience; nothing in the framework calls these internally.\nexport { batchPoll, validationError, upstreamError } from './helpers';\nexport type { RequestShape } from './helpers';\n\n// Platform identity helpers — fix TypeScript's contextual-typing gap when\n// building a DecisioningPlatform (or sub-interface) as an object literal.\n// Without these, `createAdcpServerFromPlatform({ sales: { syncEventSources:\n// async (req, ctx) => {...} } })` gives `req: unknown` because the generic\n// `P extends DecisioningPlatform<any,any>` is inferred, not declared.\n// Wrapping the sub-object with e.g. `defineSalesPlatform<MyMeta>({...})`\n// forces the concrete type annotation TypeScript needs. The helpers are\n// pure identity functions — zero runtime cost.\nexport {\n definePlatform,\n defineSalesPlatform,\n defineSalesCorePlatform,\n defineSalesIngestionPlatform,\n defineAudiencePlatform,\n defineSignalsPlatform,\n defineSponsoredIntelligencePlatform,\n defineCreativeBuilderPlatform,\n defineCreativeAdServerPlatform,\n defineCampaignGovernancePlatform,\n defineContentStandardsPlatform,\n definePropertyListsPlatform,\n defineCollectionListsPlatform,\n defineBrandRightsPlatform,\n definePlatformWithCompliance,\n} from './platform-helpers';\n\n// ProposalManager — primitives for the two-platform composition (port of\n// adcp-client-python PRs #504 + #550). Splits proposal assembly from\n// media-buy execution; either side can be mock-backed independently.\n// Framework dispatch wiring lands in a follow-up release.\nexport type {\n ProposalManager,\n ProposalGetProductsPayload,\n LegacyProposalGetProductsPayload,\n ProposalCapabilities,\n ProposalSalesSpecialism,\n Recipe,\n CapabilityOverlap,\n FinalizeProposalRequest,\n FinalizeProposalSuccess,\n ProposalState,\n ProposalRecord,\n ProposalStore,\n InMemoryProposalStoreOptions,\n MockProposalManagerOptions,\n} from './proposal';\nexport {\n validateProposalCapabilities,\n InMemoryProposalStore,\n MockProposalManager,\n enforceProposalExpiry,\n validateCapabilityOverlap,\n validateOverlapSubsetOfWire,\n detectFinalizeAction,\n setProposalLifecycleLogger,\n maybeInterceptFinalize,\n maybePersistDraftAfterGetProducts,\n maybeReserveProposalForCreateMediaBuy,\n finalizeProposalConsumption,\n releaseProposalReservation,\n maybeHydrateRecipesForMediaBuyId,\n} from './proposal';\nexport type { FinalizeActionRef, ProposalLifecycleLogger, FinalizeInterceptResult, ReservedProposal } from './proposal';\n\n// Canonical assembly helpers — emit Product / PricingOption / package shapes\n// from intent-shaped input. Raw named-format product assembly is available\n// only through the explicit buildProductLegacy compatibility helper.\nexport { buildProduct, buildProductLegacy, buildPricingOption, buildPackage } from './assembly-helpers';\nexport type {\n BuildProductInput,\n BuildProductLegacyInput,\n BuildPricingOptionInput,\n BuildPackageInput,\n} from './assembly-helpers';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA,2BAAoE;AAEpE,8BAAoC;AAQpC,0BAuBO;AAUP,4BAUO;AAWP,0BAA2E;AA8B3E,qBAAmD;AAMnD,0BAAoD;AAsBpD,yBAAmC;AAInC,4BAAsC;AAkBtC,qBAA8B;AAM9B,6BAA6E;AA4K7E,2BASO;AACP,+BAAsD;AACtD,2BAKO;AACP,oCAKO;AAKP,6BAaO;AAKP,8BAAqD;AAKrD,0BAKO;AAIP,wBAA+D;AAI/D,0BAMO;AAIP,qBAA0D;AAW1D,8BAgBO;AAsBP,sBAeO;AAMP,8BAAmF;","names":[]}
@@ -1,4 +1,5 @@
1
1
  import { AdcpError } from "./async-outcome.mjs";
2
+ import { withResponseSummary } from "./response-summary.mjs";
2
3
  import {
3
4
  PackageNotFoundError,
4
5
  MediaBuyNotFoundError,
@@ -197,6 +198,7 @@ export {
197
198
  validateOverlapSubsetOfWire,
198
199
  validatePlatform,
199
200
  validateProposalCapabilities,
200
- validationError
201
+ validationError,
202
+ withResponseSummary
201
203
  };
202
204
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/server/decisioning/index.ts"],"sourcesContent":["/**\n * DecisioningPlatform v1.0 — preview surface for the v6.0 architecture.\n *\n * Status: PREVIEW. Types only; not yet wired into the framework. Subject\n * to change before 6.0 ships. Don't build production adapters against this\n * yet — the framework still routes through the v5.x handler-style API.\n *\n * Design proposal: `.context/proposals/specialism-platform-interfaces-v3.md`\n *\n * @packageDocumentation\n */\n\n// Adopter-facing structured-error primitive.\n//\n// `AdcpError` is the canonical throwable for structured rejection. Specialism\n// methods return plain `T` for success or `throw new AdcpError(...)` to project\n// to the wire `adcp_error` envelope.\n//\n// HITL is expressed in the type system via the dual-method shape on each\n// spec-HITL tool (`xxx` for sync, `xxxTask` for HITL). No adopter-facing\n// task primitives — the framework owns task lifecycle and dispatches the\n// `*Task` method in the background.\nexport { type AdcpStructuredError, type ErrorCode, AdcpError } from './async-outcome';\nexport type { TaskHandoffOptions } from './async-outcome';\nexport type { ServerPayload } from '../../types/server-payload';\n\n// Typed `AdcpError` subclasses — adopter convenience for the highest-traffic\n// error codes. Each class encodes the canonical code/recovery/field shape.\n// LLM-generated platforms get autocomplete on the import; humans skim the\n// list to find the right class. See `errors-typed.ts`.\nexport {\n PackageNotFoundError,\n MediaBuyNotFoundError,\n ProductNotFoundError,\n CreativeNotFoundError,\n ProductUnavailableError,\n CreativeRejectedError,\n BudgetTooLowError,\n BudgetExhaustedError,\n IdempotencyConflictError,\n InvalidRequestError,\n InvalidStateError,\n BackwardsTimeRangeError,\n AuthMissingError,\n AuthInvalidError,\n AuthRequiredError,\n PermissionDeniedError,\n RateLimitedError,\n ServiceUnavailableError,\n UnsupportedFeatureError,\n ComplianceUnsatisfiedError,\n GovernanceDeniedError,\n PolicyViolationError,\n} from './errors-typed';\n\n// Cursor pagination\nexport type { CursorPage, CursorRequest } from './pagination';\n\n// Status-change event bus — adopter-facing primitive for spec-native\n// lifecycle channels (media_buy / creative / audience / signal / proposal /\n// plan / rights_grant / delivery_report). Module-level so adopters can\n// publish from webhook handlers, crons, in-process workers without holding\n// a server reference.\nexport {\n publishStatusChange,\n setStatusChangeBus,\n getStatusChangeBus,\n createInMemoryStatusChangeBus,\n type StatusChange,\n type StatusChangeBus,\n type StatusChangeResourceType,\n type StatusChangeListener,\n type PublishStatusChangeOpts,\n} from './status-changes';\n\n// Capabilities (single source of truth for get_adcp_capabilities)\nexport type {\n DecisioningCapabilities,\n ComplianceTestingCapabilities,\n CreativeAgentRef,\n TargetingCapabilities,\n TargetingPostalAreaSupport,\n ReportingCapabilities,\n} from './capabilities';\nexport { normalizePostalAreaSupport, normalizeTargetingCapabilities } from './capabilities';\n\n// Account model\nexport type {\n Account,\n AuthPrincipal,\n AccountStore,\n AccountFilter,\n ListAccountsPayload,\n SyncAccountsPayload,\n SyncAccountsSuccessPayload,\n SyncAccountsRow,\n SyncAccountsResultRow,\n SyncGovernancePayload,\n SyncGovernanceSuccessPayload,\n SyncGovernanceRow,\n ReportUsagePayload,\n GetAccountFinancialsPayload,\n GetAccountFinancialsSuccessPayload,\n ListAccountsHandlerResult,\n SyncAccountsHandlerResult,\n SyncGovernanceHandlerResult,\n ReportUsageHandlerResult,\n GetAccountFinancialsHandlerResult,\n AdcpAccountStatus,\n ResolveContext,\n AccountToolContext,\n ResolvedAuthInfo,\n} from './account';\n\nexport { AccountNotFoundError, refAccountId } from './account';\n\n// Multi-tenant AccountStore builder. Bakes in the two-path resolution\n// (operator-routed + auth-derived) and the per-entry tenant-isolation gate\n// that adopters historically had to hand-write — and silently fail to\n// hand-write — on `accounts.upsert` / `accounts.syncGovernance`.\nexport { createTenantStore, narrowAccountRef } from './tenant-store';\nexport type { TenantStoreConfig } from './tenant-store';\n\n// Buyer-agent identity surface — Phase 1 of #1269. Durable commercial\n// relationship records keyed off the request credential. Factory-pattern\n// registry (signing-only / bearer-only / mixed) encodes the implementer\n// posture at construction; framework calls `BuyerAgentRegistry.resolve`\n// once per request before `accounts.resolve`. Phase 1 ships the shape and\n// resolution; framework-level billing-capability enforcement and the\n// AdCP-3.1 error-code emission land in Phase 2 (#1292).\nexport type {\n BuyerAgent,\n BuyerAgentBillingMode,\n BuyerAgentStatus,\n BuyerAgentRegistry as BuyerAgentRegistryProtocol,\n BuyerAgentResolveInput,\n BuyerAgentCacheOptions,\n CachedBuyerAgentRegistry,\n AdcpCredential,\n ResolveBuyerAgentByAgentUrl,\n ResolveBuyerAgentByCredential,\n} from './buyer-agent';\nexport { BuyerAgentRegistry } from './buyer-agent';\n\n// Native status mapping\nexport type { StatusMappers, AdcpMediaBuyStatus, AdcpCreativeStatus, AdcpPlanStatus } from './status-mappers';\nexport { identityStatusMappers } from './status-mappers';\n\n// Request context (state + resolve)\nexport type {\n RequestContext,\n WorkflowStateReader,\n ResourceResolver,\n WorkflowObjectType,\n WorkflowStep,\n Proposal,\n GovernanceContextJWS,\n} from './context';\n\n// Top-level platform + compile-time capability enforcement\nexport type { DecisioningPlatform, RequiredPlatformsFor, RequiredCapabilitiesFor } from './platform';\n\n// Method-level composition (closes #1314) — wrap individual platform methods\n// with `before` / `after` hooks for short-circuit + enrichment patterns.\nexport { composeMethod } from './compose';\nexport type { ComposeHooks, ComposeShortCircuit } from './compose';\n\n// `accounts.resolve` security presets (closes #1339) — canonical post-resolve\n// guards that standardize the multi-tenant authorization pattern instead of\n// every adopter rolling their own.\nexport { requireAccountMatch, requireAdvertiserMatch, requireOrgScope } from './resolve-presets';\nexport type { ResolveAccountHooks, ResolveGuardOptions } from './resolve-presets';\n\n// Specialism interfaces (v1.0)\nexport type {\n CreativeBuilderPlatform,\n LegacyBuildCreativeReturn,\n LegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload,\n PreviewCreativePayload,\n LegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload,\n // Deprecated aliases — kept for one-release source compat. Both\n // resolve to CreativeBuilderPlatform; see specialisms/creative.ts.\n CreativeTemplatePlatform,\n CreativeGenerativePlatform,\n RefinementMessage,\n SyncCreativesRow,\n} from './specialisms/creative';\n\nexport type {\n CreativeAdServerPlatform,\n LegacyBuildCreativeReturn as CreativeAdServerLegacyBuildCreativeReturn,\n LegacyBuildCreativePayload as CreativeAdServerLegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload as CreativeAdServerLegacyBuildCreativeMultiPayload,\n PreviewCreativePayload as CreativeAdServerPreviewCreativePayload,\n LegacyPreviewCreativePayload as CreativeAdServerLegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload as CreativeAdServerLegacyListCreativeFormatsPayload,\n ListCreativesPayload as CreativeAdServerListCreativesPayload,\n GetCreativeDeliveryPayload,\n GetCreativeDeliveryPayload as CreativeAdServerGetCreativeDeliveryPayload,\n LegacyGetCreativeDeliveryPayload as CreativeAdServerLegacyGetCreativeDeliveryPayload,\n} from './specialisms/creative-ad-server';\n\nexport type {\n CampaignGovernancePlatform,\n CheckGovernancePayload,\n SyncPlansPayload,\n ReportPlanOutcomePayload,\n GetPlanAuditLogsPayload,\n} from './specialisms/campaign-governance';\n\nexport type {\n ContentStandardsPlatform,\n LegacyListContentStandardsPayload,\n LegacyGetContentStandardsPayload,\n LegacyCreateContentStandardsPayload,\n LegacyUpdateContentStandardsPayload,\n LegacyCalibrateContentPayload,\n LegacyValidateContentDeliveryPayload,\n LegacyGetMediaBuyArtifactsPayload,\n LegacyGetCreativeFeaturesPayload,\n} from './specialisms/content-standards';\n\nexport type {\n PropertyListsPlatform,\n CollectionListsPlatform,\n CreatePropertyListPayload,\n UpdatePropertyListPayload,\n GetPropertyListPayload,\n ListPropertyListsPayload,\n DeletePropertyListPayload,\n CreateCollectionListPayload,\n UpdateCollectionListPayload,\n GetCollectionListPayload,\n ListCollectionListsPayload,\n DeleteCollectionListPayload,\n} from './specialisms/lists';\n\nexport type {\n SalesPlatform,\n SalesCorePlatform,\n SalesIngestionPlatform,\n MediaBuyLifecyclePlatform,\n MediaBuyLifecycleCorePlatform,\n MediaBuyLifecycleProposalPlatform,\n GetProductsPayload,\n GetProductsProjectionInput,\n LegacyGetProductsPayload,\n GetProductsHandlerResult,\n CreateMediaBuyPayload,\n LegacyCreateMediaBuyPayload,\n CreateMediaBuyHandlerResult,\n UpdateMediaBuyPayload,\n LegacyUpdateMediaBuyPayload,\n UpdateMediaBuyHandlerResult,\n GetMediaBuyDeliveryPayload,\n LegacyGetMediaBuyDeliveryPayload,\n GetMediaBuysPayload,\n LegacyGetMediaBuysPayload,\n ProvidePerformanceFeedbackPayload,\n LegacyListCreativeFormatsPayload as SalesLegacyListCreativeFormatsPayload,\n ListCreativesPayload,\n LegacyListCreativesPayload,\n SyncCreativesPayload,\n SyncCreativesHandlerResult,\n SyncCatalogsPayload,\n LogEventPayload,\n SyncEventSourcesPayload,\n ListProductsPayload,\n RequestProposalsPayload,\n RefineProposalsPayload,\n DeclineProposalsPayload,\n BuyProductsPayload,\n AcceptProposalPayload,\n ControlMediaBuyPayload,\n} from './specialisms/sales';\n\nexport type {\n AudiencePlatform,\n Audience,\n SyncAudiencesPayload,\n SyncAudiencesRow,\n SyncAudiencesHandlerResult,\n AudienceStatus,\n} from './specialisms/audiences';\n\nexport type {\n SignalsPlatform,\n GetSignalsPayload,\n GetSignalsHandlerResult,\n ActivateSignalPayload,\n} from './specialisms/signals';\n\nexport type {\n SponsoredIntelligencePlatform,\n SIGetOfferingPayload,\n SIInitiateSessionPayload,\n SISendMessagePayload,\n SITerminateSessionPayload,\n} from './specialisms/sponsored-intelligence';\n\nexport type {\n BrandRightsPlatform,\n GetBrandIdentityPayload,\n LegacyGetRightsPayload,\n LegacyAcquireRightsAcquiredPayload,\n LegacyAcquireRightsPendingApprovalPayload,\n LegacyAcquireRightsRejectedPayload,\n LegacyAcquireRightsPayload,\n LegacyUpdateRightsPayload,\n CreativeApprovedPayload,\n CreativeRejectedPayload,\n CreativePendingReviewPayload,\n CreativeApprovalPayload,\n} from './specialisms/brand-rights';\n\n// Brand-rights wire types — re-exported from `@adcp/sdk/server/decisioning`\n// because brand-rights is the only specialism whose wire types live in\n// `core.generated` (not `tools.generated`), and the public `@adcp/sdk/types`\n// barrel doesn't surface them. Adopters typing their own helper functions\n// import these from here, NOT from the deep `core.generated` path.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentitySuccess,\n GetRightsRequest as LegacyGetRightsRequest,\n GetRightsSuccess as LegacyGetRightsSuccess,\n AcquireRightsRequest as LegacyAcquireRightsRequest,\n AcquireRightsAcquired as LegacyAcquireRightsAcquired,\n AcquireRightsPendingApproval as LegacyAcquireRightsPendingApproval,\n AcquireRightsRejected as LegacyAcquireRightsRejected,\n AcquireRightsError as LegacyAcquireRightsError,\n RightUse,\n RightType,\n RightsConstraint,\n RightsTerms,\n RightsPricingOption,\n GenerationCredential,\n} from '../../types/core.generated';\n\n// Runtime (v6.0 alpha) — preview surface for adopters spiking against the\n// new shape. Subject to change before 6.0 GA.\nexport {\n createAdcpServerFromPlatform,\n getHydratedLegacyFormatIds,\n getAllAdcpMigrations,\n type CreateAdcpServerFromPlatformOptions,\n type LegacyDecisioningHandlerGroups,\n type RequiredOptsFor,\n type DecisioningAdcpServer,\n type DecisioningObservabilityHooks,\n} from './runtime/from-platform';\nexport { PlatformConfigError, validatePlatform } from './runtime/validate-platform';\nexport {\n createInMemoryTaskRegistry,\n type TaskRegistry,\n type TaskRecord,\n type TaskStatus,\n} from './runtime/task-registry';\nexport {\n createPostgresTaskRegistry,\n getDecisioningTaskRegistryMigration,\n type CreatePostgresTaskRegistryOptions,\n type PgQueryable,\n} from './runtime/postgres-task-registry';\n\n// Multi-tenant deployment helper — wraps createAdcpServerFromPlatform with\n// per-tenant config, health states (healthy/unverified/disabled), and JWKS\n// validation. Composes with the existing serve() host-routing surface.\nexport {\n createTenantRegistry,\n createDefaultJwksValidator,\n createSelfSignedTenantKey,\n createNoopJwksValidator,\n type TenantRegistry,\n type TenantConfig,\n type TenantSigningKey,\n type TenantStatus,\n type TenantHealth,\n type TenantRegistryOptions,\n type JwksValidator,\n type JwksValidationResult,\n} from './tenant-registry';\n\n// Manifest helpers — typed accessors for creative_manifest.assets values.\n// Save adopters from writing the same null-check + discriminator-check\n// boilerplate per call.\nexport { getAsset, getAssetSlot, requireAsset } from './manifest-helpers';\nexport type { CreativeAssetsContainer } from './manifest-helpers';\n\n// List helpers — wrap row arrays + pagination into the heavier wire shapes\n// (today: list_creatives, which carries query_summary alongside the rows).\nexport {\n buildListCreativesResponse,\n buildListCreativesResponseLegacy,\n type BuildListCreativesResponseOpts,\n type BuildListCreativesResponseLegacyOpts,\n} from './list-helpers';\n\n// Start-time helper — normalize the wire `start_time` union into a Date,\n// with platform-aware ASAP lead-time injection.\nexport { resolveStartTime, type ResolveStartTimeOptions } from './start-time';\n\n// Admin Express router for ops visibility into the TenantRegistry.\n// Mount on a separate port/path with operator auth.\nexport {\n createTenantAdminRouter,\n createTenantAdminHandlers,\n mountTenantAdmin,\n type TenantAdminHandlers,\n type RouterLike,\n} from './admin-router';\n\n// Adopter helpers — batchPoll, validationError, upstreamError, RequestShape.\n// All opt-in convenience; nothing in the framework calls these internally.\nexport { batchPoll, validationError, upstreamError } from './helpers';\nexport type { RequestShape } from './helpers';\n\n// Platform identity helpers — fix TypeScript's contextual-typing gap when\n// building a DecisioningPlatform (or sub-interface) as an object literal.\n// Without these, `createAdcpServerFromPlatform({ sales: { syncEventSources:\n// async (req, ctx) => {...} } })` gives `req: unknown` because the generic\n// `P extends DecisioningPlatform<any,any>` is inferred, not declared.\n// Wrapping the sub-object with e.g. `defineSalesPlatform<MyMeta>({...})`\n// forces the concrete type annotation TypeScript needs. The helpers are\n// pure identity functions — zero runtime cost.\nexport {\n definePlatform,\n defineSalesPlatform,\n defineSalesCorePlatform,\n defineSalesIngestionPlatform,\n defineAudiencePlatform,\n defineSignalsPlatform,\n defineSponsoredIntelligencePlatform,\n defineCreativeBuilderPlatform,\n defineCreativeAdServerPlatform,\n defineCampaignGovernancePlatform,\n defineContentStandardsPlatform,\n definePropertyListsPlatform,\n defineCollectionListsPlatform,\n defineBrandRightsPlatform,\n definePlatformWithCompliance,\n} from './platform-helpers';\n\n// ProposalManager — primitives for the two-platform composition (port of\n// adcp-client-python PRs #504 + #550). Splits proposal assembly from\n// media-buy execution; either side can be mock-backed independently.\n// Framework dispatch wiring lands in a follow-up release.\nexport type {\n ProposalManager,\n ProposalGetProductsPayload,\n LegacyProposalGetProductsPayload,\n ProposalCapabilities,\n ProposalSalesSpecialism,\n Recipe,\n CapabilityOverlap,\n FinalizeProposalRequest,\n FinalizeProposalSuccess,\n ProposalState,\n ProposalRecord,\n ProposalStore,\n InMemoryProposalStoreOptions,\n MockProposalManagerOptions,\n} from './proposal';\nexport {\n validateProposalCapabilities,\n InMemoryProposalStore,\n MockProposalManager,\n enforceProposalExpiry,\n validateCapabilityOverlap,\n validateOverlapSubsetOfWire,\n detectFinalizeAction,\n setProposalLifecycleLogger,\n maybeInterceptFinalize,\n maybePersistDraftAfterGetProducts,\n maybeReserveProposalForCreateMediaBuy,\n finalizeProposalConsumption,\n releaseProposalReservation,\n maybeHydrateRecipesForMediaBuyId,\n} from './proposal';\nexport type { FinalizeActionRef, ProposalLifecycleLogger, FinalizeInterceptResult, ReservedProposal } from './proposal';\n\n// Canonical assembly helpers — emit Product / PricingOption / package shapes\n// from intent-shaped input. Raw named-format product assembly is available\n// only through the explicit buildProductLegacy compatibility helper.\nexport { buildProduct, buildProductLegacy, buildPricingOption, buildPackage } from './assembly-helpers';\nexport type {\n BuildProductInput,\n BuildProductLegacyInput,\n BuildPricingOptionInput,\n BuildPackageInput,\n} from './assembly-helpers';\n"],"mappings":"AAsBA,SAAmD,iBAAiB;AAQpE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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":["../../../../src/lib/server/decisioning/index.ts"],"sourcesContent":["/**\n * DecisioningPlatform v1.0 — preview surface for the v6.0 architecture.\n *\n * Status: PREVIEW. Types only; not yet wired into the framework. Subject\n * to change before 6.0 ships. Don't build production adapters against this\n * yet — the framework still routes through the v5.x handler-style API.\n *\n * Design proposal: `.context/proposals/specialism-platform-interfaces-v3.md`\n *\n * @packageDocumentation\n */\n\n// Adopter-facing structured-error primitive.\n//\n// `AdcpError` is the canonical throwable for structured rejection. Specialism\n// methods return plain `T` for success or `throw new AdcpError(...)` to project\n// to the wire `adcp_error` envelope.\n//\n// HITL is expressed in the type system via the dual-method shape on each\n// spec-HITL tool (`xxx` for sync, `xxxTask` for HITL). No adopter-facing\n// task primitives — the framework owns task lifecycle and dispatches the\n// `*Task` method in the background.\nexport { type AdcpStructuredError, type ErrorCode, AdcpError } from './async-outcome';\nexport type { TaskHandoffOptions } from './async-outcome';\nexport { withResponseSummary } from './response-summary';\nexport type { ResponseWithSummary } from './response-summary';\nexport type { ServerPayload } from '../../types/server-payload';\n\n// Typed `AdcpError` subclasses — adopter convenience for the highest-traffic\n// error codes. Each class encodes the canonical code/recovery/field shape.\n// LLM-generated platforms get autocomplete on the import; humans skim the\n// list to find the right class. See `errors-typed.ts`.\nexport {\n PackageNotFoundError,\n MediaBuyNotFoundError,\n ProductNotFoundError,\n CreativeNotFoundError,\n ProductUnavailableError,\n CreativeRejectedError,\n BudgetTooLowError,\n BudgetExhaustedError,\n IdempotencyConflictError,\n InvalidRequestError,\n InvalidStateError,\n BackwardsTimeRangeError,\n AuthMissingError,\n AuthInvalidError,\n AuthRequiredError,\n PermissionDeniedError,\n RateLimitedError,\n ServiceUnavailableError,\n UnsupportedFeatureError,\n ComplianceUnsatisfiedError,\n GovernanceDeniedError,\n PolicyViolationError,\n} from './errors-typed';\n\n// Cursor pagination\nexport type { CursorPage, CursorRequest } from './pagination';\n\n// Status-change event bus — adopter-facing primitive for spec-native\n// lifecycle channels (media_buy / creative / audience / signal / proposal /\n// plan / rights_grant / delivery_report). Module-level so adopters can\n// publish from webhook handlers, crons, in-process workers without holding\n// a server reference.\nexport {\n publishStatusChange,\n setStatusChangeBus,\n getStatusChangeBus,\n createInMemoryStatusChangeBus,\n type StatusChange,\n type StatusChangeBus,\n type StatusChangeResourceType,\n type StatusChangeListener,\n type PublishStatusChangeOpts,\n} from './status-changes';\n\n// Capabilities (single source of truth for get_adcp_capabilities)\nexport type {\n DecisioningCapabilities,\n ComplianceTestingCapabilities,\n CreativeAgentRef,\n TargetingCapabilities,\n TargetingPostalAreaSupport,\n ReportingCapabilities,\n} from './capabilities';\nexport { normalizePostalAreaSupport, normalizeTargetingCapabilities } from './capabilities';\n\n// Account model\nexport type {\n Account,\n AuthPrincipal,\n AccountStore,\n AccountFilter,\n ListAccountsPayload,\n SyncAccountsPayload,\n SyncAccountsSuccessPayload,\n SyncAccountsRow,\n SyncAccountsResultRow,\n SyncGovernancePayload,\n SyncGovernanceSuccessPayload,\n SyncGovernanceRow,\n ReportUsagePayload,\n GetAccountFinancialsPayload,\n GetAccountFinancialsSuccessPayload,\n ListAccountsHandlerResult,\n SyncAccountsHandlerResult,\n SyncGovernanceHandlerResult,\n ReportUsageHandlerResult,\n GetAccountFinancialsHandlerResult,\n AdcpAccountStatus,\n ResolveContext,\n AccountToolContext,\n ResolvedAuthInfo,\n} from './account';\n\nexport { AccountNotFoundError, refAccountId } from './account';\n\n// Multi-tenant AccountStore builder. Bakes in the two-path resolution\n// (operator-routed + auth-derived) and the per-entry tenant-isolation gate\n// that adopters historically had to hand-write — and silently fail to\n// hand-write — on `accounts.upsert` / `accounts.syncGovernance`.\nexport { createTenantStore, narrowAccountRef } from './tenant-store';\nexport type { TenantStoreConfig } from './tenant-store';\n\n// Buyer-agent identity surface — Phase 1 of #1269. Durable commercial\n// relationship records keyed off the request credential. Factory-pattern\n// registry (signing-only / bearer-only / mixed) encodes the implementer\n// posture at construction; framework calls `BuyerAgentRegistry.resolve`\n// once per request before `accounts.resolve`. Phase 1 ships the shape and\n// resolution; framework-level billing-capability enforcement and the\n// AdCP-3.1 error-code emission land in Phase 2 (#1292).\nexport type {\n BuyerAgent,\n BuyerAgentBillingMode,\n BuyerAgentStatus,\n BuyerAgentRegistry as BuyerAgentRegistryProtocol,\n BuyerAgentResolveInput,\n BuyerAgentCacheOptions,\n CachedBuyerAgentRegistry,\n AdcpCredential,\n ResolveBuyerAgentByAgentUrl,\n ResolveBuyerAgentByCredential,\n} from './buyer-agent';\nexport { BuyerAgentRegistry } from './buyer-agent';\n\n// Native status mapping\nexport type { StatusMappers, AdcpMediaBuyStatus, AdcpCreativeStatus, AdcpPlanStatus } from './status-mappers';\nexport { identityStatusMappers } from './status-mappers';\n\n// Request context (state + resolve)\nexport type {\n RequestContext,\n WorkflowStateReader,\n ResourceResolver,\n WorkflowObjectType,\n WorkflowStep,\n Proposal,\n GovernanceContextJWS,\n} from './context';\n\n// Top-level platform + compile-time capability enforcement\nexport type { DecisioningPlatform, RequiredPlatformsFor, RequiredCapabilitiesFor } from './platform';\n\n// Method-level composition (closes #1314) — wrap individual platform methods\n// with `before` / `after` hooks for short-circuit + enrichment patterns.\nexport { composeMethod } from './compose';\nexport type { ComposeHooks, ComposeShortCircuit } from './compose';\n\n// `accounts.resolve` security presets (closes #1339) — canonical post-resolve\n// guards that standardize the multi-tenant authorization pattern instead of\n// every adopter rolling their own.\nexport { requireAccountMatch, requireAdvertiserMatch, requireOrgScope } from './resolve-presets';\nexport type { ResolveAccountHooks, ResolveGuardOptions } from './resolve-presets';\n\n// Specialism interfaces (v1.0)\nexport type {\n CreativeBuilderPlatform,\n LegacyBuildCreativeReturn,\n LegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload,\n PreviewCreativePayload,\n LegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload,\n // Deprecated aliases — kept for one-release source compat. Both\n // resolve to CreativeBuilderPlatform; see specialisms/creative.ts.\n CreativeTemplatePlatform,\n CreativeGenerativePlatform,\n RefinementMessage,\n SyncCreativesRow,\n} from './specialisms/creative';\n\nexport type {\n CreativeAdServerPlatform,\n LegacyBuildCreativeReturn as CreativeAdServerLegacyBuildCreativeReturn,\n LegacyBuildCreativePayload as CreativeAdServerLegacyBuildCreativePayload,\n LegacyBuildCreativeMultiPayload as CreativeAdServerLegacyBuildCreativeMultiPayload,\n PreviewCreativePayload as CreativeAdServerPreviewCreativePayload,\n LegacyPreviewCreativePayload as CreativeAdServerLegacyPreviewCreativePayload,\n LegacyListCreativeFormatsPayload as CreativeAdServerLegacyListCreativeFormatsPayload,\n ListCreativesPayload as CreativeAdServerListCreativesPayload,\n GetCreativeDeliveryPayload,\n GetCreativeDeliveryPayload as CreativeAdServerGetCreativeDeliveryPayload,\n LegacyGetCreativeDeliveryPayload as CreativeAdServerLegacyGetCreativeDeliveryPayload,\n} from './specialisms/creative-ad-server';\n\nexport type {\n CampaignGovernancePlatform,\n CheckGovernancePayload,\n SyncPlansPayload,\n ReportPlanOutcomePayload,\n GetPlanAuditLogsPayload,\n} from './specialisms/campaign-governance';\n\nexport type {\n ContentStandardsPlatform,\n LegacyListContentStandardsPayload,\n LegacyGetContentStandardsPayload,\n LegacyCreateContentStandardsPayload,\n LegacyUpdateContentStandardsPayload,\n LegacyCalibrateContentPayload,\n LegacyValidateContentDeliveryPayload,\n LegacyGetMediaBuyArtifactsPayload,\n LegacyGetCreativeFeaturesPayload,\n} from './specialisms/content-standards';\n\nexport type {\n PropertyListsPlatform,\n CollectionListsPlatform,\n CreatePropertyListPayload,\n UpdatePropertyListPayload,\n GetPropertyListPayload,\n ListPropertyListsPayload,\n DeletePropertyListPayload,\n CreateCollectionListPayload,\n UpdateCollectionListPayload,\n GetCollectionListPayload,\n ListCollectionListsPayload,\n DeleteCollectionListPayload,\n} from './specialisms/lists';\n\nexport type {\n SalesPlatform,\n SalesCorePlatform,\n SalesIngestionPlatform,\n MediaBuyLifecyclePlatform,\n MediaBuyLifecycleCorePlatform,\n MediaBuyLifecycleProposalPlatform,\n GetProductsPayload,\n GetProductsProjectionInput,\n LegacyGetProductsPayload,\n GetProductsHandlerResult,\n CreateMediaBuyPayload,\n LegacyCreateMediaBuyPayload,\n CreateMediaBuyHandlerResult,\n UpdateMediaBuyPayload,\n LegacyUpdateMediaBuyPayload,\n UpdateMediaBuyHandlerResult,\n GetMediaBuyDeliveryPayload,\n LegacyGetMediaBuyDeliveryPayload,\n GetMediaBuysPayload,\n LegacyGetMediaBuysPayload,\n ProvidePerformanceFeedbackPayload,\n LegacyListCreativeFormatsPayload as SalesLegacyListCreativeFormatsPayload,\n ListCreativesPayload,\n LegacyListCreativesPayload,\n SyncCreativesPayload,\n SyncCreativesHandlerResult,\n SyncCatalogsPayload,\n LogEventPayload,\n SyncEventSourcesPayload,\n ListProductsPayload,\n RequestProposalsPayload,\n RefineProposalsPayload,\n DeclineProposalsPayload,\n BuyProductsPayload,\n AcceptProposalPayload,\n ControlMediaBuyPayload,\n} from './specialisms/sales';\n\nexport type {\n AudiencePlatform,\n Audience,\n SyncAudiencesPayload,\n SyncAudiencesRow,\n SyncAudiencesHandlerResult,\n AudienceStatus,\n} from './specialisms/audiences';\n\nexport type {\n SignalsPlatform,\n GetSignalsPayload,\n GetSignalsHandlerResult,\n ActivateSignalPayload,\n} from './specialisms/signals';\n\nexport type {\n SponsoredIntelligencePlatform,\n SIGetOfferingPayload,\n SIInitiateSessionPayload,\n SISendMessagePayload,\n SITerminateSessionPayload,\n} from './specialisms/sponsored-intelligence';\n\nexport type {\n BrandRightsPlatform,\n GetBrandIdentityPayload,\n LegacyGetRightsPayload,\n LegacyAcquireRightsAcquiredPayload,\n LegacyAcquireRightsPendingApprovalPayload,\n LegacyAcquireRightsRejectedPayload,\n LegacyAcquireRightsPayload,\n LegacyUpdateRightsPayload,\n CreativeApprovedPayload,\n CreativeRejectedPayload,\n CreativePendingReviewPayload,\n CreativeApprovalPayload,\n} from './specialisms/brand-rights';\n\n// Brand-rights wire types — re-exported from `@adcp/sdk/server/decisioning`\n// because brand-rights is the only specialism whose wire types live in\n// `core.generated` (not `tools.generated`), and the public `@adcp/sdk/types`\n// barrel doesn't surface them. Adopters typing their own helper functions\n// import these from here, NOT from the deep `core.generated` path.\nexport type {\n GetBrandIdentityRequest,\n GetBrandIdentitySuccess,\n GetRightsRequest as LegacyGetRightsRequest,\n GetRightsSuccess as LegacyGetRightsSuccess,\n AcquireRightsRequest as LegacyAcquireRightsRequest,\n AcquireRightsAcquired as LegacyAcquireRightsAcquired,\n AcquireRightsPendingApproval as LegacyAcquireRightsPendingApproval,\n AcquireRightsRejected as LegacyAcquireRightsRejected,\n AcquireRightsError as LegacyAcquireRightsError,\n RightUse,\n RightType,\n RightsConstraint,\n RightsTerms,\n RightsPricingOption,\n GenerationCredential,\n} from '../../types/core.generated';\n\n// Runtime (v6.0 alpha) — preview surface for adopters spiking against the\n// new shape. Subject to change before 6.0 GA.\nexport {\n createAdcpServerFromPlatform,\n getHydratedLegacyFormatIds,\n getAllAdcpMigrations,\n type CreateAdcpServerFromPlatformOptions,\n type LegacyDecisioningHandlerGroups,\n type RequiredOptsFor,\n type DecisioningAdcpServer,\n type DecisioningObservabilityHooks,\n} from './runtime/from-platform';\nexport { PlatformConfigError, validatePlatform } from './runtime/validate-platform';\nexport {\n createInMemoryTaskRegistry,\n type TaskRegistry,\n type TaskRecord,\n type TaskStatus,\n} from './runtime/task-registry';\nexport {\n createPostgresTaskRegistry,\n getDecisioningTaskRegistryMigration,\n type CreatePostgresTaskRegistryOptions,\n type PgQueryable,\n} from './runtime/postgres-task-registry';\n\n// Multi-tenant deployment helper — wraps createAdcpServerFromPlatform with\n// per-tenant config, health states (healthy/unverified/disabled), and JWKS\n// validation. Composes with the existing serve() host-routing surface.\nexport {\n createTenantRegistry,\n createDefaultJwksValidator,\n createSelfSignedTenantKey,\n createNoopJwksValidator,\n type TenantRegistry,\n type TenantConfig,\n type TenantSigningKey,\n type TenantStatus,\n type TenantHealth,\n type TenantRegistryOptions,\n type JwksValidator,\n type JwksValidationResult,\n} from './tenant-registry';\n\n// Manifest helpers — typed accessors for creative_manifest.assets values.\n// Save adopters from writing the same null-check + discriminator-check\n// boilerplate per call.\nexport { getAsset, getAssetSlot, requireAsset } from './manifest-helpers';\nexport type { CreativeAssetsContainer } from './manifest-helpers';\n\n// List helpers — wrap row arrays + pagination into the heavier wire shapes\n// (today: list_creatives, which carries query_summary alongside the rows).\nexport {\n buildListCreativesResponse,\n buildListCreativesResponseLegacy,\n type BuildListCreativesResponseOpts,\n type BuildListCreativesResponseLegacyOpts,\n} from './list-helpers';\n\n// Start-time helper — normalize the wire `start_time` union into a Date,\n// with platform-aware ASAP lead-time injection.\nexport { resolveStartTime, type ResolveStartTimeOptions } from './start-time';\n\n// Admin Express router for ops visibility into the TenantRegistry.\n// Mount on a separate port/path with operator auth.\nexport {\n createTenantAdminRouter,\n createTenantAdminHandlers,\n mountTenantAdmin,\n type TenantAdminHandlers,\n type RouterLike,\n} from './admin-router';\n\n// Adopter helpers — batchPoll, validationError, upstreamError, RequestShape.\n// All opt-in convenience; nothing in the framework calls these internally.\nexport { batchPoll, validationError, upstreamError } from './helpers';\nexport type { RequestShape } from './helpers';\n\n// Platform identity helpers — fix TypeScript's contextual-typing gap when\n// building a DecisioningPlatform (or sub-interface) as an object literal.\n// Without these, `createAdcpServerFromPlatform({ sales: { syncEventSources:\n// async (req, ctx) => {...} } })` gives `req: unknown` because the generic\n// `P extends DecisioningPlatform<any,any>` is inferred, not declared.\n// Wrapping the sub-object with e.g. `defineSalesPlatform<MyMeta>({...})`\n// forces the concrete type annotation TypeScript needs. The helpers are\n// pure identity functions — zero runtime cost.\nexport {\n definePlatform,\n defineSalesPlatform,\n defineSalesCorePlatform,\n defineSalesIngestionPlatform,\n defineAudiencePlatform,\n defineSignalsPlatform,\n defineSponsoredIntelligencePlatform,\n defineCreativeBuilderPlatform,\n defineCreativeAdServerPlatform,\n defineCampaignGovernancePlatform,\n defineContentStandardsPlatform,\n definePropertyListsPlatform,\n defineCollectionListsPlatform,\n defineBrandRightsPlatform,\n definePlatformWithCompliance,\n} from './platform-helpers';\n\n// ProposalManager — primitives for the two-platform composition (port of\n// adcp-client-python PRs #504 + #550). Splits proposal assembly from\n// media-buy execution; either side can be mock-backed independently.\n// Framework dispatch wiring lands in a follow-up release.\nexport type {\n ProposalManager,\n ProposalGetProductsPayload,\n LegacyProposalGetProductsPayload,\n ProposalCapabilities,\n ProposalSalesSpecialism,\n Recipe,\n CapabilityOverlap,\n FinalizeProposalRequest,\n FinalizeProposalSuccess,\n ProposalState,\n ProposalRecord,\n ProposalStore,\n InMemoryProposalStoreOptions,\n MockProposalManagerOptions,\n} from './proposal';\nexport {\n validateProposalCapabilities,\n InMemoryProposalStore,\n MockProposalManager,\n enforceProposalExpiry,\n validateCapabilityOverlap,\n validateOverlapSubsetOfWire,\n detectFinalizeAction,\n setProposalLifecycleLogger,\n maybeInterceptFinalize,\n maybePersistDraftAfterGetProducts,\n maybeReserveProposalForCreateMediaBuy,\n finalizeProposalConsumption,\n releaseProposalReservation,\n maybeHydrateRecipesForMediaBuyId,\n} from './proposal';\nexport type { FinalizeActionRef, ProposalLifecycleLogger, FinalizeInterceptResult, ReservedProposal } from './proposal';\n\n// Canonical assembly helpers — emit Product / PricingOption / package shapes\n// from intent-shaped input. Raw named-format product assembly is available\n// only through the explicit buildProductLegacy compatibility helper.\nexport { buildProduct, buildProductLegacy, buildPricingOption, buildPackage } from './assembly-helpers';\nexport type {\n BuildProductInput,\n BuildProductLegacyInput,\n BuildPricingOptionInput,\n BuildPackageInput,\n} from './assembly-helpers';\n"],"mappings":"AAsBA,SAAmD,iBAAiB;AAEpE,SAAS,2BAA2B;AAQpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAWP,SAAS,4BAA4B,sCAAsC;AA8B3E,SAAS,sBAAsB,oBAAoB;AAMnD,SAAS,mBAAmB,wBAAwB;AAsBpD,SAAS,0BAA0B;AAInC,SAAS,6BAA6B;AAkBtC,SAAS,qBAAqB;AAM9B,SAAS,qBAAqB,wBAAwB,uBAAuB;AA4K7E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,qBAAqB,wBAAwB;AACtD;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAKP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASK;AAKP,SAAS,UAAU,cAAc,oBAAoB;AAKrD;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAIP,SAAS,wBAAsD;AAI/D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAIP,SAAS,WAAW,iBAAiB,qBAAqB;AAW1D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAsBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP,SAAS,cAAc,oBAAoB,oBAAoB,oBAAoB;","names":[]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Framework-only metadata for an adopter-authored MCP text summary.
3
+ *
4
+ * The payload and summary live in a module-private WeakMap rather than on the
5
+ * marker object. This guarantees the wrapper cannot accidentally become part
6
+ * of `structuredContent`; the platform adapter must explicitly extract it,
7
+ * project the payload, and hand the text to the SDK-owned response builder.
8
+ */
9
+ declare const RESPONSE_SUMMARY_BRAND: unique symbol;
10
+ declare const RESPONSE_SUMMARY_PAYLOAD: unique symbol;
11
+ /**
12
+ * Opaque non-wire result returned by {@link withResponseSummary}.
13
+ *
14
+ * @public
15
+ */
16
+ export interface ResponseWithSummary<TPayload extends object> {
17
+ readonly [RESPONSE_SUMMARY_BRAND]: true;
18
+ /** Type-only phantom retaining payload invariance in published declarations. */
19
+ readonly [RESPONSE_SUMMARY_PAYLOAD]?: TPayload;
20
+ }
21
+ /**
22
+ * Attach adopter-authored human-readable text to a native platform result.
23
+ *
24
+ * The SDK retains ownership of protocol projection, validation, and the MCP
25
+ * envelope. Only `content[].text` is customized; `payload` remains the sole
26
+ * source of structured protocol data. Supply only trusted, static disclosure
27
+ * text: summaries may be cached and must never contain credentials, buyer
28
+ * input, upstream responses, or other secrets.
29
+ *
30
+ * @public
31
+ */
32
+ export declare function withResponseSummary<TPayload extends object>(payload: TPayload, summary: string): ResponseWithSummary<TPayload>;
33
+ export {};
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Framework-only metadata for an adopter-authored MCP text summary.
3
+ *
4
+ * The payload and summary live in a module-private WeakMap rather than on the
5
+ * marker object. This guarantees the wrapper cannot accidentally become part
6
+ * of `structuredContent`; the platform adapter must explicitly extract it,
7
+ * project the payload, and hand the text to the SDK-owned response builder.
8
+ */
9
+ declare const RESPONSE_SUMMARY_BRAND: unique symbol;
10
+ declare const RESPONSE_SUMMARY_PAYLOAD: unique symbol;
11
+ /**
12
+ * Opaque non-wire result returned by {@link withResponseSummary}.
13
+ *
14
+ * @public
15
+ */
16
+ export interface ResponseWithSummary<TPayload extends object> {
17
+ readonly [RESPONSE_SUMMARY_BRAND]: true;
18
+ /** Type-only phantom retaining payload invariance in published declarations. */
19
+ readonly [RESPONSE_SUMMARY_PAYLOAD]?: TPayload;
20
+ }
21
+ /**
22
+ * Attach adopter-authored human-readable text to a native platform result.
23
+ *
24
+ * The SDK retains ownership of protocol projection, validation, and the MCP
25
+ * envelope. Only `content[].text` is customized; `payload` remains the sole
26
+ * source of structured protocol data. Supply only trusted, static disclosure
27
+ * text: summaries may be cached and must never contain credentials, buyer
28
+ * input, upstream responses, or other secrets.
29
+ *
30
+ * @public
31
+ */
32
+ export declare function withResponseSummary<TPayload extends object>(payload: TPayload, summary: string): ResponseWithSummary<TPayload>;
33
+ export {};
34
+ //# sourceMappingURL=response-summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-summary.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/decisioning/response-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,QAAA,MAAM,sBAAsB,EAAE,OAAO,MAAyD,CAAC;AAC/F,OAAO,CAAC,MAAM,wBAAwB,EAAE,OAAO,MAAM,CAAC;AAYtD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB,CAAC,QAAQ,SAAS,MAAM;IAC1D,QAAQ,CAAC,CAAC,sBAAsB,CAAC,EAAE,IAAI,CAAC;IACxC,gFAAgF;IAChF,QAAQ,CAAC,CAAC,wBAAwB,CAAC,CAAC,EAAE,QAAQ,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,EACzD,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,MAAM,GACd,mBAAmB,CAAC,QAAQ,CAAC,CAwB/B"}
@@ -0,0 +1,62 @@
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 response_summary_exports = {};
20
+ __export(response_summary_exports, {
21
+ _extractResponseSummaryEntry: () => _extractResponseSummaryEntry,
22
+ withResponseSummary: () => withResponseSummary
23
+ });
24
+ module.exports = __toCommonJS(response_summary_exports);
25
+ const RESPONSE_SUMMARY_BRAND = /* @__PURE__ */ Symbol.for("@adcp/decisioning/response-summary");
26
+ const MAX_RESPONSE_SUMMARY_BYTES = 4096;
27
+ const UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/u;
28
+ const responseSummaryEntries = /* @__PURE__ */ new WeakMap();
29
+ function withResponseSummary(payload, summary) {
30
+ if (payload === null || typeof payload !== "object") {
31
+ throw new TypeError("withResponseSummary payload must be an object");
32
+ }
33
+ if (typeof summary !== "string") {
34
+ throw new TypeError("withResponseSummary summary must be a string");
35
+ }
36
+ if (new TextEncoder().encode(summary).byteLength > MAX_RESPONSE_SUMMARY_BYTES) {
37
+ throw new RangeError(`withResponseSummary summary exceeds ${MAX_RESPONSE_SUMMARY_BYTES} UTF-8 bytes`);
38
+ }
39
+ if (UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE.test(summary)) {
40
+ throw new TypeError("withResponseSummary summary contains unsafe control characters");
41
+ }
42
+ const marker = /* @__PURE__ */ Object.create(null);
43
+ Object.defineProperty(marker, RESPONSE_SUMMARY_BRAND, {
44
+ value: true,
45
+ enumerable: false,
46
+ configurable: false,
47
+ writable: false
48
+ });
49
+ Object.freeze(marker);
50
+ responseSummaryEntries.set(marker, { payload, summary });
51
+ return marker;
52
+ }
53
+ function _extractResponseSummaryEntry(value) {
54
+ if (value === null || typeof value !== "object") return void 0;
55
+ return responseSummaryEntries.get(value);
56
+ }
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ _extractResponseSummaryEntry,
60
+ withResponseSummary
61
+ });
62
+ //# sourceMappingURL=response-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/server/decisioning/response-summary.ts"],"sourcesContent":["/**\n * Framework-only metadata for an adopter-authored MCP text summary.\n *\n * The payload and summary live in a module-private WeakMap rather than on the\n * marker object. This guarantees the wrapper cannot accidentally become part\n * of `structuredContent`; the platform adapter must explicitly extract it,\n * project the payload, and hand the text to the SDK-owned response builder.\n */\n\nconst RESPONSE_SUMMARY_BRAND: unique symbol = Symbol.for('@adcp/decisioning/response-summary');\ndeclare const RESPONSE_SUMMARY_PAYLOAD: unique symbol;\n\nconst MAX_RESPONSE_SUMMARY_BYTES = 4096;\nconst UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE = /[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f\\u007f]/u;\n\ntype ResponseSummaryEntry<TPayload extends object> = Readonly<{\n payload: TPayload;\n summary: string;\n}>;\n\nconst responseSummaryEntries = new WeakMap<object, ResponseSummaryEntry<object>>();\n\n/**\n * Opaque non-wire result returned by {@link withResponseSummary}.\n *\n * @public\n */\nexport interface ResponseWithSummary<TPayload extends object> {\n readonly [RESPONSE_SUMMARY_BRAND]: true;\n /** Type-only phantom retaining payload invariance in published declarations. */\n readonly [RESPONSE_SUMMARY_PAYLOAD]?: TPayload;\n}\n\n/**\n * Attach adopter-authored human-readable text to a native platform result.\n *\n * The SDK retains ownership of protocol projection, validation, and the MCP\n * envelope. Only `content[].text` is customized; `payload` remains the sole\n * source of structured protocol data. Supply only trusted, static disclosure\n * text: summaries may be cached and must never contain credentials, buyer\n * input, upstream responses, or other secrets.\n *\n * @public\n */\nexport function withResponseSummary<TPayload extends object>(\n payload: TPayload,\n summary: string\n): ResponseWithSummary<TPayload> {\n if (payload === null || typeof payload !== 'object') {\n throw new TypeError('withResponseSummary payload must be an object');\n }\n if (typeof summary !== 'string') {\n throw new TypeError('withResponseSummary summary must be a string');\n }\n if (new TextEncoder().encode(summary).byteLength > MAX_RESPONSE_SUMMARY_BYTES) {\n throw new RangeError(`withResponseSummary summary exceeds ${MAX_RESPONSE_SUMMARY_BYTES} UTF-8 bytes`);\n }\n if (UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE.test(summary)) {\n throw new TypeError('withResponseSummary summary contains unsafe control characters');\n }\n\n const marker = Object.create(null) as Record<PropertyKey, unknown>;\n Object.defineProperty(marker, RESPONSE_SUMMARY_BRAND, {\n value: true,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n Object.freeze(marker);\n responseSummaryEntries.set(marker, { payload, summary });\n return marker as unknown as ResponseWithSummary<TPayload>;\n}\n\n/** @internal Platform-adapter extraction seam. */\nexport function _extractResponseSummaryEntry<TPayload extends object>(\n value: unknown\n): ResponseSummaryEntry<TPayload> | undefined {\n if (value === null || typeof value !== 'object') return undefined;\n return responseSummaryEntries.get(value) as ResponseSummaryEntry<TPayload> | undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAM,yBAAwC,uBAAO,IAAI,oCAAoC;AAG7F,MAAM,6BAA6B;AACnC,MAAM,0CAA0C;AAOhD,MAAM,yBAAyB,oBAAI,QAA8C;AAwB1E,SAAS,oBACd,SACA,SAC+B;AAC/B,MAAI,YAAY,QAAQ,OAAO,YAAY,UAAU;AACnD,UAAM,IAAI,UAAU,+CAA+C;AAAA,EACrE;AACA,MAAI,OAAO,YAAY,UAAU;AAC/B,UAAM,IAAI,UAAU,8CAA8C;AAAA,EACpE;AACA,MAAI,IAAI,YAAY,EAAE,OAAO,OAAO,EAAE,aAAa,4BAA4B;AAC7E,UAAM,IAAI,WAAW,uCAAuC,0BAA0B,cAAc;AAAA,EACtG;AACA,MAAI,wCAAwC,KAAK,OAAO,GAAG;AACzD,UAAM,IAAI,UAAU,gEAAgE;AAAA,EACtF;AAEA,QAAM,SAAS,uBAAO,OAAO,IAAI;AACjC,SAAO,eAAe,QAAQ,wBAAwB;AAAA,IACpD,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,UAAU;AAAA,EACZ,CAAC;AACD,SAAO,OAAO,MAAM;AACpB,yBAAuB,IAAI,QAAQ,EAAE,SAAS,QAAQ,CAAC;AACvD,SAAO;AACT;AAGO,SAAS,6BACd,OAC4C;AAC5C,MAAI,UAAU,QAAQ,OAAO,UAAU,SAAU,QAAO;AACxD,SAAO,uBAAuB,IAAI,KAAK;AACzC;","names":[]}
@@ -0,0 +1,37 @@
1
+ const RESPONSE_SUMMARY_BRAND = /* @__PURE__ */ Symbol.for("@adcp/decisioning/response-summary");
2
+ const MAX_RESPONSE_SUMMARY_BYTES = 4096;
3
+ const UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/u;
4
+ const responseSummaryEntries = /* @__PURE__ */ new WeakMap();
5
+ function withResponseSummary(payload, summary) {
6
+ if (payload === null || typeof payload !== "object") {
7
+ throw new TypeError("withResponseSummary payload must be an object");
8
+ }
9
+ if (typeof summary !== "string") {
10
+ throw new TypeError("withResponseSummary summary must be a string");
11
+ }
12
+ if (new TextEncoder().encode(summary).byteLength > MAX_RESPONSE_SUMMARY_BYTES) {
13
+ throw new RangeError(`withResponseSummary summary exceeds ${MAX_RESPONSE_SUMMARY_BYTES} UTF-8 bytes`);
14
+ }
15
+ if (UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE.test(summary)) {
16
+ throw new TypeError("withResponseSummary summary contains unsafe control characters");
17
+ }
18
+ const marker = /* @__PURE__ */ Object.create(null);
19
+ Object.defineProperty(marker, RESPONSE_SUMMARY_BRAND, {
20
+ value: true,
21
+ enumerable: false,
22
+ configurable: false,
23
+ writable: false
24
+ });
25
+ Object.freeze(marker);
26
+ responseSummaryEntries.set(marker, { payload, summary });
27
+ return marker;
28
+ }
29
+ function _extractResponseSummaryEntry(value) {
30
+ if (value === null || typeof value !== "object") return void 0;
31
+ return responseSummaryEntries.get(value);
32
+ }
33
+ export {
34
+ _extractResponseSummaryEntry,
35
+ withResponseSummary
36
+ };
37
+ //# sourceMappingURL=response-summary.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/server/decisioning/response-summary.ts"],"sourcesContent":["/**\n * Framework-only metadata for an adopter-authored MCP text summary.\n *\n * The payload and summary live in a module-private WeakMap rather than on the\n * marker object. This guarantees the wrapper cannot accidentally become part\n * of `structuredContent`; the platform adapter must explicitly extract it,\n * project the payload, and hand the text to the SDK-owned response builder.\n */\n\nconst RESPONSE_SUMMARY_BRAND: unique symbol = Symbol.for('@adcp/decisioning/response-summary');\ndeclare const RESPONSE_SUMMARY_PAYLOAD: unique symbol;\n\nconst MAX_RESPONSE_SUMMARY_BYTES = 4096;\nconst UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE = /[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f\\u007f]/u;\n\ntype ResponseSummaryEntry<TPayload extends object> = Readonly<{\n payload: TPayload;\n summary: string;\n}>;\n\nconst responseSummaryEntries = new WeakMap<object, ResponseSummaryEntry<object>>();\n\n/**\n * Opaque non-wire result returned by {@link withResponseSummary}.\n *\n * @public\n */\nexport interface ResponseWithSummary<TPayload extends object> {\n readonly [RESPONSE_SUMMARY_BRAND]: true;\n /** Type-only phantom retaining payload invariance in published declarations. */\n readonly [RESPONSE_SUMMARY_PAYLOAD]?: TPayload;\n}\n\n/**\n * Attach adopter-authored human-readable text to a native platform result.\n *\n * The SDK retains ownership of protocol projection, validation, and the MCP\n * envelope. Only `content[].text` is customized; `payload` remains the sole\n * source of structured protocol data. Supply only trusted, static disclosure\n * text: summaries may be cached and must never contain credentials, buyer\n * input, upstream responses, or other secrets.\n *\n * @public\n */\nexport function withResponseSummary<TPayload extends object>(\n payload: TPayload,\n summary: string\n): ResponseWithSummary<TPayload> {\n if (payload === null || typeof payload !== 'object') {\n throw new TypeError('withResponseSummary payload must be an object');\n }\n if (typeof summary !== 'string') {\n throw new TypeError('withResponseSummary summary must be a string');\n }\n if (new TextEncoder().encode(summary).byteLength > MAX_RESPONSE_SUMMARY_BYTES) {\n throw new RangeError(`withResponseSummary summary exceeds ${MAX_RESPONSE_SUMMARY_BYTES} UTF-8 bytes`);\n }\n if (UNSAFE_RESPONSE_SUMMARY_CONTROL_CHAR_RE.test(summary)) {\n throw new TypeError('withResponseSummary summary contains unsafe control characters');\n }\n\n const marker = Object.create(null) as Record<PropertyKey, unknown>;\n Object.defineProperty(marker, RESPONSE_SUMMARY_BRAND, {\n value: true,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n Object.freeze(marker);\n responseSummaryEntries.set(marker, { payload, summary });\n return marker as unknown as ResponseWithSummary<TPayload>;\n}\n\n/** @internal Platform-adapter extraction seam. */\nexport function _extractResponseSummaryEntry<TPayload extends object>(\n value: unknown\n): ResponseSummaryEntry<TPayload> | undefined {\n if (value === null || typeof value !== 'object') return undefined;\n return responseSummaryEntries.get(value) as ResponseSummaryEntry<TPayload> | undefined;\n}\n"],"mappings":"AASA,MAAM,yBAAwC,uBAAO,IAAI,oCAAoC;AAG7F,MAAM,6BAA6B;AACnC,MAAM,0CAA0C;AAOhD,MAAM,yBAAyB,oBAAI,QAA8C;AAwB1E,SAAS,oBACd,SACA,SAC+B;AAC/B,MAAI,YAAY,QAAQ,OAAO,YAAY,UAAU;AACnD,UAAM,IAAI,UAAU,+CAA+C;AAAA,EACrE;AACA,MAAI,OAAO,YAAY,UAAU;AAC/B,UAAM,IAAI,UAAU,8CAA8C;AAAA,EACpE;AACA,MAAI,IAAI,YAAY,EAAE,OAAO,OAAO,EAAE,aAAa,4BAA4B;AAC7E,UAAM,IAAI,WAAW,uCAAuC,0BAA0B,cAAc;AAAA,EACtG;AACA,MAAI,wCAAwC,KAAK,OAAO,GAAG;AACzD,UAAM,IAAI,UAAU,gEAAgE;AAAA,EACtF;AAEA,QAAM,SAAS,uBAAO,OAAO,IAAI;AACjC,SAAO,eAAe,QAAQ,wBAAwB;AAAA,IACpD,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,UAAU;AAAA,EACZ,CAAC;AACD,SAAO,OAAO,MAAM;AACpB,yBAAuB,IAAI,QAAQ,EAAE,SAAS,QAAQ,CAAC;AACvD,SAAO;AACT;AAGO,SAAS,6BACd,OAC4C;AAC5C,MAAI,UAAU,QAAQ,OAAO,UAAU,SAAU,QAAO;AACxD,SAAO,uBAAuB,IAAI,KAAK;AACzC;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"from-platform.d.ts","sourceRoot":"","sources":["../../../../../src/lib/server/decisioning/runtime/from-platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAGL,KAAK,gBAAgB,EAUrB,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAGrE,OAAO,KAAK,EAAE,OAAO,EAAoC,MAAM,YAAY,CAAC;AA8C5E,OAAO,EACL,KAAK,gBAAgB,EAOtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAI7D,OAAO,EAA8B,KAAK,YAAY,EAAE,KAAK,U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,MAAM,CAAC,CAAC,GAC9D,uBAAuB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,EACnE,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,GACvB,qBAAqB,CA8rCvB;AAuXD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,KAAK,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAwM/D;;;;;;;;;;;GAWG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
@@ -46,6 +46,8 @@ var import_idempotency = require('../../idempotency/index.js');
46
46
  var import_pg = require('../../idempotency/backends/pg.js');
47
47
  var import_postgres_task_registry = require('./postgres-task-registry.js');
48
48
  var import_async_outcome2 = require('../async-outcome.js');
49
+ var import_response_summary = require('../response-summary.js');
50
+ var import_responses = require('../../responses.js');
49
51
  var import_entity_hydration = require('./entity-hydration.generated.js');
50
52
  var import_zod = require("zod");
51
53
  var import_task_registry = require('./task-registry.js');
@@ -2417,6 +2419,9 @@ async function runWithTokenRefresh(fn, refresh) {
2417
2419
  async function projectSync(fn, mapResult, refresh) {
2418
2420
  try {
2419
2421
  const result = await runWithTokenRefresh(fn, refresh);
2422
+ if ((0, import_response_summary._extractResponseSummaryEntry)(result)) {
2423
+ throw new TypeError("withResponseSummary is supported only for synchronous getProducts results");
2424
+ }
2420
2425
  const wire = mapResult(result);
2421
2426
  if (wire != null && typeof wire === "object") {
2422
2427
  (0, import_ctx_metadata.stripCtxMetadata)(wire);
@@ -2484,9 +2489,15 @@ function isReturnedErrorArm(value) {
2484
2489
  return Object.keys(record).every((key) => RETURNED_ERROR_ARM_KEYS.has(key));
2485
2490
  }
2486
2491
  async function routeIfHandoff(taskRegistry, opts, result, project) {
2492
+ const rejectResponseSummary = (value) => {
2493
+ if ((0, import_response_summary._extractResponseSummaryEntry)(value)) {
2494
+ throw new TypeError("withResponseSummary is supported only for synchronous getProducts results");
2495
+ }
2496
+ };
2487
2497
  if ((0, import_async_outcome2.isTaskHandoff)(result)) {
2488
2498
  const entry = (0, import_async_outcome2._extractHandoffEntry)(result);
2489
2499
  if (!entry) {
2500
+ rejectResponseSummary(result);
2490
2501
  return await project(result);
2491
2502
  }
2492
2503
  const { fn: taskFn, options } = entry;
@@ -2495,12 +2506,14 @@ async function routeIfHandoff(taskRegistry, opts, result, project) {
2495
2506
  opts,
2496
2507
  async (taskId) => {
2497
2508
  const inner = await taskFn((0, import_to_context.buildHandoffContext)(taskRegistry, taskId));
2509
+ rejectResponseSummary(inner);
2498
2510
  return await project(inner);
2499
2511
  },
2500
2512
  options?.task_id
2501
2513
  );
2502
2514
  }
2503
2515
  rejectHandRolledSubmitted(result);
2516
+ rejectResponseSummary(result);
2504
2517
  return await project(result);
2505
2518
  }
2506
2519
  async function dispatchHitl(taskRegistry, opts, taskFn, overrideTaskId) {
@@ -3314,6 +3327,11 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
3314
3327
  } else {
3315
3328
  result = await sales.getProducts(canonicalParams, reqCtx);
3316
3329
  }
3330
+ const summarized = (0, import_response_summary._extractResponseSummaryEntry)(result);
3331
+ if (summarized && ((0, import_async_outcome2.isTaskHandoff)(summarized.payload) || (0, import_response_summary._extractResponseSummaryEntry)(summarized.payload) !== void 0)) {
3332
+ throw new TypeError("withResponseSummary may wrap only a synchronous getProducts payload");
3333
+ }
3334
+ const resultForRouting = summarized?.payload ?? result;
3317
3335
  const projectProducts = async (terminalResult) => {
3318
3336
  const preparedProjection = preparePerProductProjectionCatalogs(terminalResult, legacyFormatConverter);
3319
3337
  const requestLegacyFormatConverter = await resolveLegacyProductFormats(
@@ -3346,14 +3364,18 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
3346
3364
  ctx: reqCtx
3347
3365
  });
3348
3366
  }
3349
- return asProductResponseForWire(
3367
+ const wireResponse = asProductResponseForWire(
3350
3368
  canonicalResult,
3351
3369
  responseWireMode,
3352
3370
  canonicalFormatLegacyResolver,
3353
3371
  shouldEmitTransitionalDualCreativeWire(ctx.servedAdcpVersion, params)
3354
3372
  );
3373
+ return summarized ? (0, import_responses.productsResponse)(
3374
+ wireResponse,
3375
+ summarized.summary
3376
+ ) : wireResponse;
3355
3377
  };
3356
- const isHandoff = (0, import_async_outcome2.isTaskHandoff)(result);
3378
+ const isHandoff = (0, import_async_outcome2.isTaskHandoff)(resultForRouting);
3357
3379
  if (buyingMode === "wholesale" && isHandoff) {
3358
3380
  throw new import_async_outcome.AdcpError("INVALID_REQUEST", {
3359
3381
  message: "get_products buying_mode=wholesale must return synchronously; use incomplete[] for partial feed results.",
@@ -3362,8 +3384,8 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
3362
3384
  });
3363
3385
  }
3364
3386
  if (!isHandoff && push.url === void 0) {
3365
- rejectHandRolledSubmitted(result);
3366
- return projectProducts(result);
3387
+ rejectHandRolledSubmitted(resultForRouting);
3388
+ return projectProducts(resultForRouting);
3367
3389
  }
3368
3390
  const accountId = reqCtx.account?.id;
3369
3391
  if (accountId === void 0) {
@@ -3388,7 +3410,7 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
3388
3410
  observability,
3389
3411
  logger
3390
3412
  },
3391
- result,
3413
+ resultForRouting,
3392
3414
  projectProducts
3393
3415
  );
3394
3416
  },