@adcp/sdk 17.0.0-beta.21 → 17.0.0-beta.23

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 (223) hide show
  1. package/README.md +26 -2
  2. package/dist/lib/adapters/version/index.d.mts +1 -1
  3. package/dist/lib/adapters/version/index.d.ts +1 -1
  4. package/dist/lib/adapters/version/index.js +2 -0
  5. package/dist/lib/adapters/version/index.mjs +2 -0
  6. package/dist/lib/adapters/version/negotiate.d.mts +13 -0
  7. package/dist/lib/adapters/version/negotiate.d.ts +13 -0
  8. package/dist/lib/adapters/version/negotiate.js +6 -0
  9. package/dist/lib/adapters/version/negotiate.mjs +5 -0
  10. package/dist/lib/client/core.d.mts +4 -0
  11. package/dist/lib/client/core.d.ts +4 -0
  12. package/dist/lib/client/core.js +13 -0
  13. package/dist/lib/client/core.mjs +12 -0
  14. package/dist/lib/conformance/property-lists.d.mts +1 -1
  15. package/dist/lib/conformance/property-lists.d.ts +1 -1
  16. package/dist/lib/conformance/property-lists.js +1 -1
  17. package/dist/lib/conformance/property-lists.mjs +1 -1
  18. package/dist/lib/core/SingleAgentClient.d.mts +23 -1
  19. package/dist/lib/core/SingleAgentClient.d.ts +23 -1
  20. package/dist/lib/core/SingleAgentClient.js +102 -18
  21. package/dist/lib/core/SingleAgentClient.mjs +108 -18
  22. package/dist/lib/core/targeting-helpers.d.mts +123 -0
  23. package/dist/lib/core/targeting-helpers.d.ts +123 -0
  24. package/dist/lib/core/targeting-helpers.js +412 -0
  25. package/dist/lib/core/targeting-helpers.mjs +370 -0
  26. package/dist/lib/entrypoints/client-account-changes.d.mts +5 -0
  27. package/dist/lib/entrypoints/client-account-changes.d.ts +5 -0
  28. package/dist/lib/entrypoints/client-account-changes.js +28 -0
  29. package/dist/lib/entrypoints/client-account-changes.mjs +4 -0
  30. package/dist/lib/entrypoints/client-webhook-stores.d.mts +2 -0
  31. package/dist/lib/entrypoints/client-webhook-stores.d.ts +2 -0
  32. package/dist/lib/entrypoints/client-webhook-stores.js +37 -0
  33. package/dist/lib/entrypoints/client-webhook-stores.mjs +16 -0
  34. package/dist/lib/entrypoints/discovery.d.mts +9 -0
  35. package/dist/lib/entrypoints/discovery.d.ts +9 -0
  36. package/dist/lib/entrypoints/discovery.js +72 -0
  37. package/dist/lib/entrypoints/discovery.mjs +56 -0
  38. package/dist/lib/entrypoints/errors.d.mts +11 -0
  39. package/dist/lib/entrypoints/errors.d.ts +11 -0
  40. package/dist/lib/entrypoints/errors.js +159 -0
  41. package/dist/lib/entrypoints/errors.mjs +132 -0
  42. package/dist/lib/entrypoints/media-buy.d.mts +5 -0
  43. package/dist/lib/entrypoints/media-buy.d.ts +5 -0
  44. package/dist/lib/entrypoints/media-buy.js +119 -0
  45. package/dist/lib/entrypoints/media-buy.mjs +100 -0
  46. package/dist/lib/entrypoints/registry.d.mts +5 -0
  47. package/dist/lib/entrypoints/registry.d.ts +5 -0
  48. package/dist/lib/entrypoints/registry.js +61 -0
  49. package/dist/lib/entrypoints/registry.mjs +40 -0
  50. package/dist/lib/entrypoints/utils.d.mts +7 -0
  51. package/dist/lib/entrypoints/utils.d.ts +7 -0
  52. package/dist/lib/entrypoints/utils.js +100 -0
  53. package/dist/lib/entrypoints/utils.mjs +72 -0
  54. package/dist/lib/entrypoints/version.d.mts +3 -0
  55. package/dist/lib/entrypoints/version.d.ts +3 -0
  56. package/dist/lib/entrypoints/version.js +57 -0
  57. package/dist/lib/entrypoints/version.mjs +36 -0
  58. package/dist/lib/index.d.mts +1 -1
  59. package/dist/lib/index.d.ts +1 -1
  60. package/dist/lib/media-buy/action-contracts.js +3 -3
  61. package/dist/lib/media-buy/action-contracts.mjs +1 -1
  62. package/dist/lib/media-buy/creative-start-policy.d.mts +19 -0
  63. package/dist/lib/media-buy/creative-start-policy.d.ts +19 -0
  64. package/dist/lib/media-buy/creative-start-policy.js +59 -0
  65. package/dist/lib/media-buy/creative-start-policy.mjs +31 -0
  66. package/dist/lib/media-buy/valid-actions.d.mts +47 -0
  67. package/dist/lib/media-buy/valid-actions.d.ts +47 -0
  68. package/dist/lib/media-buy/valid-actions.js +42 -0
  69. package/dist/lib/media-buy/valid-actions.mjs +18 -0
  70. package/dist/lib/net/pin-and-bind-fetch.d.mts +121 -0
  71. package/dist/lib/net/pin-and-bind-fetch.d.ts +121 -0
  72. package/dist/lib/net/pin-and-bind-fetch.js +209 -0
  73. package/dist/lib/net/pin-and-bind-fetch.mjs +183 -0
  74. package/dist/lib/protocols/mcp-modern.js +20 -4
  75. package/dist/lib/protocols/mcp-modern.mjs +20 -4
  76. package/dist/lib/registry/types.generated.d.ts +224 -3
  77. package/dist/lib/reporting/ledger/index.d.mts +1 -0
  78. package/dist/lib/reporting/ledger/index.d.ts +1 -0
  79. package/dist/lib/reporting/ledger/index.js +3 -1
  80. package/dist/lib/reporting/ledger/index.mjs +1 -0
  81. package/dist/lib/reporting/ledger/instant.d.mts +5 -0
  82. package/dist/lib/reporting/ledger/instant.d.ts +5 -0
  83. package/dist/lib/reporting/ledger/instant.js +10 -0
  84. package/dist/lib/reporting/ledger/instant.mjs +9 -0
  85. package/dist/lib/reporting/ledger/issue-events.d.mts +333 -0
  86. package/dist/lib/reporting/ledger/issue-events.d.ts +333 -0
  87. package/dist/lib/reporting/ledger/issue-events.js +310 -0
  88. package/dist/lib/reporting/ledger/issue-events.mjs +282 -0
  89. package/dist/lib/reporting/service/index.d.mts +36 -1
  90. package/dist/lib/reporting/service/index.d.ts +36 -1
  91. package/dist/lib/reporting/service/index.js +51 -1
  92. package/dist/lib/reporting/service/index.mjs +52 -2
  93. package/dist/lib/reporting/service/scheduler-support.d.mts +1 -1
  94. package/dist/lib/reporting/service/scheduler-support.d.ts +1 -1
  95. package/dist/lib/reporting/service/scheduler-support.js +1 -1
  96. package/dist/lib/reporting/service/scheduler-support.mjs +1 -1
  97. package/dist/lib/server/capabilities-release-projection.d.mts +43 -0
  98. package/dist/lib/server/capabilities-release-projection.d.ts +43 -0
  99. package/dist/lib/server/capabilities-release-projection.js +128 -0
  100. package/dist/lib/server/capabilities-release-projection.mjs +112 -0
  101. package/dist/lib/server/create-adcp-server.d.mts +29 -5
  102. package/dist/lib/server/create-adcp-server.d.ts +29 -5
  103. package/dist/lib/server/create-adcp-server.js +97 -24
  104. package/dist/lib/server/create-adcp-server.mjs +108 -23
  105. package/dist/lib/server/decisioning/capabilities.d.mts +27 -0
  106. package/dist/lib/server/decisioning/capabilities.d.ts +27 -0
  107. package/dist/lib/server/decisioning/runtime/from-platform.js +99 -27
  108. package/dist/lib/server/decisioning/runtime/from-platform.mjs +103 -27
  109. package/dist/lib/server/declared-input-schema.d.mts +108 -0
  110. package/dist/lib/server/declared-input-schema.d.ts +108 -0
  111. package/dist/lib/server/declared-input-schema.js +167 -0
  112. package/dist/lib/server/declared-input-schema.mjs +137 -0
  113. package/dist/lib/server/envelope-allowlist.d.mts +1 -105
  114. package/dist/lib/server/envelope-allowlist.d.ts +1 -105
  115. package/dist/lib/server/envelope-allowlist.js +3 -79
  116. package/dist/lib/server/envelope-allowlist.mjs +1 -71
  117. package/dist/lib/server/errors.d.mts +1 -186
  118. package/dist/lib/server/errors.d.ts +1 -186
  119. package/dist/lib/server/errors.js +3 -98
  120. package/dist/lib/server/errors.mjs +1 -94
  121. package/dist/lib/server/index.d.mts +1 -1
  122. package/dist/lib/server/index.d.ts +1 -1
  123. package/dist/lib/server/mcp-modern-server.js +21 -4
  124. package/dist/lib/server/mcp-modern-server.mjs +21 -4
  125. package/dist/lib/server/media-buy-action-resolver.d.mts +7 -0
  126. package/dist/lib/server/media-buy-action-resolver.d.ts +7 -0
  127. package/dist/lib/server/media-buy-action-resolver.js +10 -1
  128. package/dist/lib/server/media-buy-action-resolver.mjs +10 -1
  129. package/dist/lib/server/media-buy-helpers.d.mts +1 -47
  130. package/dist/lib/server/media-buy-helpers.d.ts +1 -47
  131. package/dist/lib/server/media-buy-helpers.js +3 -23
  132. package/dist/lib/server/media-buy-helpers.mjs +1 -18
  133. package/dist/lib/server/pick-safe-details.d.mts +1 -89
  134. package/dist/lib/server/pick-safe-details.d.ts +1 -89
  135. package/dist/lib/server/pick-safe-details.js +3 -61
  136. package/dist/lib/server/pick-safe-details.mjs +1 -56
  137. package/dist/lib/server/pin-and-bind-fetch.d.mts +1 -121
  138. package/dist/lib/server/pin-and-bind-fetch.d.ts +1 -121
  139. package/dist/lib/server/pin-and-bind-fetch.js +3 -190
  140. package/dist/lib/server/pin-and-bind-fetch.mjs +1 -183
  141. package/dist/lib/server/targeting-helpers.d.mts +1 -123
  142. package/dist/lib/server/targeting-helpers.d.ts +1 -123
  143. package/dist/lib/server/targeting-helpers.js +3 -393
  144. package/dist/lib/server/targeting-helpers.mjs +1 -370
  145. package/dist/lib/server/test-controller.js +7 -3
  146. package/dist/lib/server/test-controller.mjs +7 -3
  147. package/dist/lib/storage/memory-ledger.js +219 -1
  148. package/dist/lib/storage/memory-ledger.mjs +223 -1
  149. package/dist/lib/testing/client.js +26 -5
  150. package/dist/lib/testing/client.mjs +24 -5
  151. package/dist/lib/testing/compliance/storyboard-tracks.js +0 -4
  152. package/dist/lib/testing/compliance/storyboard-tracks.mjs +0 -4
  153. package/dist/lib/testing/comply-controller.js +7 -2
  154. package/dist/lib/testing/comply-controller.mjs +7 -2
  155. package/dist/lib/testing/storyboard/request-signing/grader.d.mts +21 -0
  156. package/dist/lib/testing/storyboard/request-signing/grader.d.ts +21 -0
  157. package/dist/lib/testing/storyboard/request-signing/grader.js +31 -0
  158. package/dist/lib/testing/storyboard/request-signing/grader.mjs +30 -0
  159. package/dist/lib/testing/storyboard/request-signing/probe-dispatch.js +1 -1
  160. package/dist/lib/testing/storyboard/request-signing/probe-dispatch.mjs +2 -1
  161. package/dist/lib/testing/storyboard/request-signing/types.d.mts +12 -0
  162. package/dist/lib/testing/storyboard/request-signing/types.d.ts +12 -0
  163. package/dist/lib/testing/storyboard/request-signing/vector-loader.js +7 -2
  164. package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +7 -2
  165. package/dist/lib/testing/storyboard/runner.js +4 -4
  166. package/dist/lib/testing/storyboard/runner.mjs +4 -4
  167. package/dist/lib/testing/storyboard/task-map.js +4 -1
  168. package/dist/lib/testing/storyboard/task-map.mjs +4 -1
  169. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  170. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  171. package/dist/lib/utils/adcp-error-response.d.mts +196 -0
  172. package/dist/lib/utils/adcp-error-response.d.ts +196 -0
  173. package/dist/lib/utils/adcp-error-response.js +118 -0
  174. package/dist/lib/utils/adcp-error-response.mjs +95 -0
  175. package/dist/lib/utils/buyer-retry-policy.js +2 -2
  176. package/dist/lib/utils/buyer-retry-policy.mjs +1 -1
  177. package/dist/lib/utils/capabilities.d.mts +6 -0
  178. package/dist/lib/utils/capabilities.d.ts +6 -0
  179. package/dist/lib/utils/capabilities.js +6 -2
  180. package/dist/lib/utils/capabilities.mjs +6 -2
  181. package/dist/lib/utils/envelope-allowlist.d.mts +105 -0
  182. package/dist/lib/utils/envelope-allowlist.d.ts +105 -0
  183. package/dist/lib/utils/envelope-allowlist.js +98 -0
  184. package/dist/lib/utils/envelope-allowlist.mjs +71 -0
  185. package/dist/lib/utils/pick-safe-details.d.mts +89 -0
  186. package/dist/lib/utils/pick-safe-details.d.ts +89 -0
  187. package/dist/lib/utils/pick-safe-details.js +80 -0
  188. package/dist/lib/utils/pick-safe-details.mjs +56 -0
  189. package/dist/lib/v2/projection/augment-response.d.mts +4 -0
  190. package/dist/lib/v2/projection/augment-response.d.ts +4 -0
  191. package/dist/lib/v2/projection/creative-delivery.d.mts +20 -3
  192. package/dist/lib/v2/projection/creative-delivery.d.ts +20 -3
  193. package/dist/lib/v2/projection/creative-delivery.js +20 -4
  194. package/dist/lib/v2/projection/creative-delivery.mjs +19 -4
  195. package/dist/lib/v2/projection/index.d.mts +2 -2
  196. package/dist/lib/v2/projection/index.d.ts +2 -2
  197. package/dist/lib/v2/projection/index.js +4 -0
  198. package/dist/lib/v2/projection/index.mjs +5 -1
  199. package/dist/lib/v2/projection/legacy-metadata.d.mts +7 -0
  200. package/dist/lib/v2/projection/legacy-metadata.d.ts +7 -0
  201. package/dist/lib/v2/projection/legacy-metadata.js +14 -0
  202. package/dist/lib/v2/projection/legacy-metadata.mjs +12 -0
  203. package/dist/lib/v2/projection/legacy-routes.d.mts +11 -0
  204. package/dist/lib/v2/projection/legacy-routes.d.ts +11 -0
  205. package/dist/lib/v2/projection/legacy-routes.js +2 -1
  206. package/dist/lib/v2/projection/legacy-routes.mjs +7 -2
  207. package/dist/lib/v2/projection/v1-to-v2.d.mts +21 -1
  208. package/dist/lib/v2/projection/v1-to-v2.d.ts +21 -1
  209. package/dist/lib/v2/projection/v1-to-v2.js +18 -11
  210. package/dist/lib/v2/projection/v1-to-v2.mjs +19 -11
  211. package/dist/lib/version.d.mts +3 -3
  212. package/dist/lib/version.d.ts +3 -3
  213. package/dist/lib/version.js +3 -3
  214. package/dist/lib/version.mjs +3 -3
  215. package/docs/TYPE-SUMMARY.md +2 -2
  216. package/docs/guides/CREATIVE-DELIVERY.md +12 -0
  217. package/docs/guides/REPORTING-LEDGER.md +121 -0
  218. package/docs/guides/VALIDATE-YOUR-AGENT.md +1 -0
  219. package/docs/llms.txt +2 -2
  220. package/docs/migration-14.x-rc-worksheet.md +4 -4
  221. package/docs/migration-16-to-17.md +149 -0
  222. package/docs/migration-reporting-storage-package.md +10 -0
  223. package/package.json +106 -1
@@ -152,6 +152,155 @@ server handlers are `mediaBuy.listCollections` and `mediaBuy.listProposals`,
152
152
  or optional methods on `MediaBuyLifecyclePlatform`. Their synchronous results
153
153
  use `outcome` and do not acquire a synthetic task `status` field.
154
154
 
155
+ ## Creative start policy on `control_media_buy`
156
+
157
+ AdCP 3.3 lets a buyer hold a package's first enablement for serving until every
158
+ assigned creative is approved: `packages[].start_requires_all_creatives_approved`
159
+ on `control_media_buy`. A seller that does not declare
160
+ `media_buy.features.creative_start_policy: true` must reject `true` with
161
+ `UNSUPPORTED_FEATURE` before mutation, and buyers must not send it.
162
+
163
+ **This breaks sellers that honored `true` without declaring the feature.** When
164
+ the server's `adcpVersion` is 3.3 or later, the dispatcher now refuses such a
165
+ request itself, before the idempotency lookup, and the handler never sees it:
166
+
167
+ ```json
168
+ {
169
+ "code": "UNSUPPORTED_FEATURE",
170
+ "message": "start_requires_all_creatives_approved: true requires media_buy.features.creative_start_policy, which this seller does not declare",
171
+ "recovery": "correctable",
172
+ "field": "packages[0].start_requires_all_creatives_approved",
173
+ "suggestion": "Omit start_requires_all_creatives_approved or send false; check media_buy.features.creative_start_policy in get_adcp_capabilities before opting in",
174
+ "details": {
175
+ "feature": "media_buy.features.creative_start_policy",
176
+ "fields": ["packages[0].start_requires_all_creatives_approved"]
177
+ },
178
+ "mutation_outcome": "not_applied"
179
+ }
180
+ ```
181
+
182
+ `field` names the first opted-in package and `details.fields` lists every one.
183
+ `false` and omission always reach the handler. To accept `true`, hold the
184
+ package's first enablement until every current assignment is approved, echo the
185
+ policy on `get_media_buys`, and declare the feature:
186
+
187
+ ```ts
188
+ createAdcpServer({
189
+ capabilities: { features: { creativeStartPolicy: true } },
190
+ // ...
191
+ });
192
+ ```
193
+
194
+ `createAdcpServerFromPlatform` takes the same `capabilities.features.creativeStartPolicy`.
195
+ `capabilities.overrides.media_buy.features.creative_start_policy` also counts.
196
+ Under `createTenantRegistry` each tenant's own capabilities decide.
197
+ `create_media_buy` and `update_media_buy` are not checked. Withdrawing the field
198
+ from their packages is pending adcontextprotocol/adcp#8767. The pinned
199
+ `3.3.0-beta.5` `package-request` and `package-update` schemas still declare it
200
+ with the same must-refuse rule, so until that lands a create or update that
201
+ sets `true` reaches your handler unenforced. Refuse it yourself if you don't
202
+ honor it. The Python SDK has the same known gap.
203
+
204
+ `mediaBuyActionResolver.resolve()` follows the same rule: it offers
205
+ `update_creative_start_policy` only when you pass `creativeStartPolicy: true`
206
+ with `metadata.update_creative_start_policy`. Without it the action is reported
207
+ unavailable (`not_supported_on_buy`), because the dispatcher would refuse the
208
+ opt-in it advertises. A seller that already offers the action adds the option:
209
+
210
+ ```ts
211
+ mediaBuyActionResolver.resolve({
212
+ buy,
213
+ decide,
214
+ creativeStartPolicy: true,
215
+ metadata: { update_creative_start_policy: decision },
216
+ });
217
+ ```
218
+
219
+ On the buyer side, `control_media_buy` throws `ProtocolFeatureUnsupportedError`
220
+ before sending when the call targets 3.3 or later and the seller's discovered
221
+ capabilities lack the feature. The error has `code: 'UNSUPPORTED_FEATURE'`, the
222
+ same `field`, `details.feature` and `details.fields` as the seller's refusal, and
223
+ `dispatched: false`; `getClientPreflightAdcpError(error)` returns the AdCP error.
224
+ With synthetic or missing capabilities the client sends and the seller decides.
225
+ Check `client.supports('creative_start_policy')`, or
226
+ `capabilities.features.creativeStartPolicy`, before opting in.
227
+
228
+ ## Custom tool input validation
229
+
230
+ Tools registered with a zod `inputSchema` now validate it in the AdCP layer
231
+ instead of the MCP SDK (#3666). This covers:
232
+
233
+ - `customTools` on `createAdcpServer`, and so `tasks_get` on `createAdcpServerFromPlatform`
234
+ - `comply_test_controller` from `registerTestController`, `createComplyController().register()` and `createAdcpServerFromPlatform({ complyTest })`
235
+
236
+ MCP `tools/list` still advertises the declared schema.
237
+
238
+ **Buyers: the error shape changed.** A call that fails the schema used to get
239
+ the MCP SDK's bare `-32602` text result, with no `structuredContent` and no
240
+ `context`. It now gets an AdCP error that echoes `context`, like framework tools:
241
+
242
+ ```jsonc
243
+ {
244
+ "adcp_error": {
245
+ "code": "INVALID_REQUEST",
246
+ "message": "search_brands request failed schema validation at /query: must have required property 'query'",
247
+ "recovery": "correctable",
248
+ "field": "query",
249
+ "issues": [{ "pointer": "/query", "message": "must have required property 'query'", "keyword": "required" }],
250
+ "details": { "tool": "search_brands", "side": "request", "issues": [/* the same issues */] }
251
+ },
252
+ "context": { "trace": "tr-1" },
253
+ "status": "failed",
254
+ "adcp_version": "3.3-beta.5"
255
+ }
256
+ ```
257
+
258
+ Read `adcp_error` instead of matching the `-32602` text or its `Input
259
+ validation error:` prefix. Framework tools still use `VALIDATION_ERROR` for
260
+ request-schema failures. #3674 tracks moving them to `INVALID_REQUEST`, the
261
+ spec's code for schema violations.
262
+
263
+ **Sellers: handlers receive the parsed value on every path.** On MCP, nothing
264
+ changes for a valid call: the handler gets the value the schema parsed, with
265
+ coercion, defaults and transforms applied and undeclared keys stripped.
266
+ `AdcpServer.invoke()`, `dispatchTestRequest()` and A2A used to skip the schema
267
+ and pass the caller's raw arguments to the handler. **They now validate too, and
268
+ pass the same parsed, stripped value.** A handler on those paths no longer sees
269
+ keys its schema does not declare, and an invalid call no longer reaches it.
270
+
271
+ If a handler reads keys its schema does not declare, declare them. To keep every
272
+ key, use a loose object:
273
+
274
+ ```ts
275
+ customTools: {
276
+ vendor_lookup: {
277
+ // Keeps undeclared keys instead of stripping them.
278
+ inputSchema: z.looseObject({ query: z.string() }), // zod 3: z.object({...}).passthrough()
279
+ handler: async args => {
280
+ /* … */
281
+ },
282
+ },
283
+ },
284
+ ```
285
+
286
+ The arguments are parsed once, and everything that reads them uses the parsed
287
+ value: `identity33` authorization, release selection and the handler. On
288
+ `invoke()`, `dispatchTestRequest()` and A2A, authorization and release selection
289
+ used to read the raw arguments. They now see the parsed value.
290
+
291
+ **Behavior change on A2A, `invoke()` and `dispatchTestRequest()`:** a custom tool
292
+ whose schema does not declare `adcp_version` used to let the caller's raw
293
+ `adcp_version` select the release on those paths. Now the schema strips that
294
+ field, so the server's default release applies, as it always has on MCP. A2A
295
+ has no AdCP version negotiation at the envelope level: `A2A-Version` selects
296
+ only the A2A wire. Framework tools are unchanged. To let a buyer pick the
297
+ release, declare `adcp_version` (and `adcp_major_version`) in the schema. A
298
+ declared default or coercion then selects the release.
299
+
300
+ Rejections on these tools echo the caller's `context` even when the schema
301
+ strips it: validation, version, authorization, and errors your handler returns
302
+ or throws.
303
+
155
304
  ## AdCP 3.3.0-beta.5
156
305
 
157
306
  SDK 17 now pins AdCP `3.3.0-beta.5` and no longer packages or advertises
@@ -188,6 +188,16 @@ See [Orphaned object collection](guides/REPORTING-OPERATIONS.md#adopting-row-sto
188
188
  2. The `adcp_reporting_row_sets` and `adcp_reporting_row_write_intents` columns reference the ID by foreign key and carry no bound of their own, so nothing else changes.
189
189
  3. The bound is exported as `REPORTING_ROW_BINDING_ID_MAX_LENGTH` and `REPORTING_ROW_CREDENTIAL_REF_MAX_LENGTH`. A provider's `clients` map accepts the same 255-character references.
190
190
 
191
+ ### Issue-lifecycle events (storage `0.3`, migration `0012`)
192
+
193
+ `createReliableReportingService({ issueObserver })` (adcp-client#3648) reads an outbox of `CONSUMER_STATUS_MISMATCH` transitions that `PostgresReportingLedgerStore` records beside its writes. Every deployment upgrading the storage package must apply the migration, because `postgresStorage().checkSchema()` requires every shipped version.
194
+
195
+ 1. Run `npx adcp-reporting-storage migrate` (version `0012`, `reporting_issue_events`, additive; the SQL is exported as `REPORTING_ISSUE_EVENTS_MIGRATION`). It creates `adcp_reporting_issue_events` and its indexes and changes no existing table, key, function or trigger, so it is safe while workers of the previous release still run. Those workers neither read nor write the table and record no events for the transitions they make.
196
+ 2. Until it is applied, `sync_reporting_status` writes and revision commits record nothing and `store.issueEventsReady()` is `false`; nothing else changes. `checkSchema()` names `0012` as pending.
197
+ 3. Without an `issueObserver`, nothing reads the table. Rows accumulate only for consumer-mismatch transitions. The dispatcher prunes a closed occurrence (resolved, with its statement superseded or its obligation gone) seven days after its last event was delivered, and never prunes an open one, because the table also records which occurrences are open.
198
+
199
+ The Python SDK ships the same outbox as its migration `0008` (adcp-client-python#1874). The version numbers differ because the two packages' migration lists already differ, and neither moves a storage contract: the Python storage contract stays `2`, and this package has no contract version.
200
+
191
201
  ### `service.setup.migrations` comes from the store
192
202
 
193
203
  `createReliableReportingService` no longer names the PostgreSQL migration. `service.setup.migrations` is the store's own `migrations` list (`ReportingLedgerStore.migrations`, optional). `PostgresReportingLedgerStore` lists `[REPORTING_LEDGER_MIGRATION]`. A store with nothing to install (an in-memory test double), or a decorator over the PostgreSQL store that does not forward `migrations`, gives an empty list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adcp/sdk",
3
- "version": "17.0.0-beta.21",
3
+ "version": "17.0.0-beta.23",
4
4
  "description": "AdCP SDK — client, server, and compliance harnesses for the AdContext Protocol (MCP + A2A)",
5
5
  "workspaces": [
6
6
  ".",
@@ -41,6 +41,86 @@
41
41
  "default": "./dist/lib/client/core.js"
42
42
  }
43
43
  },
44
+ "./client/account-changes": {
45
+ "import": {
46
+ "types": "./dist/lib/entrypoints/client-account-changes.d.mts",
47
+ "default": "./dist/lib/entrypoints/client-account-changes.mjs"
48
+ },
49
+ "require": {
50
+ "types": "./dist/lib/entrypoints/client-account-changes.d.ts",
51
+ "default": "./dist/lib/entrypoints/client-account-changes.js"
52
+ }
53
+ },
54
+ "./client/webhook-stores": {
55
+ "import": {
56
+ "types": "./dist/lib/entrypoints/client-webhook-stores.d.mts",
57
+ "default": "./dist/lib/entrypoints/client-webhook-stores.mjs"
58
+ },
59
+ "require": {
60
+ "types": "./dist/lib/entrypoints/client-webhook-stores.d.ts",
61
+ "default": "./dist/lib/entrypoints/client-webhook-stores.js"
62
+ }
63
+ },
64
+ "./errors": {
65
+ "import": {
66
+ "types": "./dist/lib/entrypoints/errors.d.mts",
67
+ "default": "./dist/lib/entrypoints/errors.mjs"
68
+ },
69
+ "require": {
70
+ "types": "./dist/lib/entrypoints/errors.d.ts",
71
+ "default": "./dist/lib/entrypoints/errors.js"
72
+ }
73
+ },
74
+ "./version": {
75
+ "import": {
76
+ "types": "./dist/lib/entrypoints/version.d.mts",
77
+ "default": "./dist/lib/entrypoints/version.mjs"
78
+ },
79
+ "require": {
80
+ "types": "./dist/lib/entrypoints/version.d.ts",
81
+ "default": "./dist/lib/entrypoints/version.js"
82
+ }
83
+ },
84
+ "./registry": {
85
+ "import": {
86
+ "types": "./dist/lib/entrypoints/registry.d.mts",
87
+ "default": "./dist/lib/entrypoints/registry.mjs"
88
+ },
89
+ "require": {
90
+ "types": "./dist/lib/entrypoints/registry.d.ts",
91
+ "default": "./dist/lib/entrypoints/registry.js"
92
+ }
93
+ },
94
+ "./utils": {
95
+ "import": {
96
+ "types": "./dist/lib/entrypoints/utils.d.mts",
97
+ "default": "./dist/lib/entrypoints/utils.mjs"
98
+ },
99
+ "require": {
100
+ "types": "./dist/lib/entrypoints/utils.d.ts",
101
+ "default": "./dist/lib/entrypoints/utils.js"
102
+ }
103
+ },
104
+ "./discovery": {
105
+ "import": {
106
+ "types": "./dist/lib/entrypoints/discovery.d.mts",
107
+ "default": "./dist/lib/entrypoints/discovery.mjs"
108
+ },
109
+ "require": {
110
+ "types": "./dist/lib/entrypoints/discovery.d.ts",
111
+ "default": "./dist/lib/entrypoints/discovery.js"
112
+ }
113
+ },
114
+ "./media-buy": {
115
+ "import": {
116
+ "types": "./dist/lib/entrypoints/media-buy.d.mts",
117
+ "default": "./dist/lib/entrypoints/media-buy.mjs"
118
+ },
119
+ "require": {
120
+ "types": "./dist/lib/entrypoints/media-buy.d.ts",
121
+ "default": "./dist/lib/entrypoints/media-buy.js"
122
+ }
123
+ },
44
124
  "./compliance": {
45
125
  "import": {
46
126
  "types": "./dist/lib/compliance/index.d.mts",
@@ -469,6 +549,30 @@
469
549
  "client/core": [
470
550
  "dist/lib/client/core.d.ts"
471
551
  ],
552
+ "client/account-changes": [
553
+ "dist/lib/entrypoints/client-account-changes.d.ts"
554
+ ],
555
+ "client/webhook-stores": [
556
+ "dist/lib/entrypoints/client-webhook-stores.d.ts"
557
+ ],
558
+ "errors": [
559
+ "dist/lib/entrypoints/errors.d.ts"
560
+ ],
561
+ "version": [
562
+ "dist/lib/entrypoints/version.d.ts"
563
+ ],
564
+ "registry": [
565
+ "dist/lib/entrypoints/registry.d.ts"
566
+ ],
567
+ "utils": [
568
+ "dist/lib/entrypoints/utils.d.ts"
569
+ ],
570
+ "discovery": [
571
+ "dist/lib/entrypoints/discovery.d.ts"
572
+ ],
573
+ "media-buy": [
574
+ "dist/lib/entrypoints/media-buy.d.ts"
575
+ ],
472
576
  "compliance": [
473
577
  "dist/lib/compliance/index.d.ts"
474
578
  ],
@@ -722,6 +826,7 @@
722
826
  "check:runtime-compat": "node scripts/check-runtime-compat.mjs",
723
827
  "check:package-size": "node scripts/check-package-size.mjs",
724
828
  "check:publish-protocol-artifacts": "node scripts/check-publish-protocol-artifacts.mjs",
829
+ "check:client-entry-graph": "node scripts/check-client-entry-graph.mjs",
725
830
  "verify:package": "node scripts/verify-package.mjs",
726
831
  "validate:reporting-gcp": "node packages/reporting-storage/scripts/validate-reporting-gcp.mjs",
727
832
  "check:adopter-types": "tsx scripts/check-adopter-types.ts",