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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/lib/adapters/keyed-account-store.js +1 -1
  2. package/dist/lib/adapters/keyed-account-store.mjs +1 -1
  3. package/dist/lib/adapters/version/3.0/brand-fields.d.mts +7 -1
  4. package/dist/lib/adapters/version/3.0/brand-fields.d.ts +7 -1
  5. package/dist/lib/adapters/version/3.0/brand-fields.js +139 -3
  6. package/dist/lib/adapters/version/3.0/brand-fields.mjs +136 -2
  7. package/dist/lib/adapters/version/3.0/index.js +6 -0
  8. package/dist/lib/adapters/version/3.0/index.mjs +7 -1
  9. package/dist/lib/adapters/version/types.d.mts +5 -0
  10. package/dist/lib/adapters/version/types.d.ts +5 -0
  11. package/dist/lib/canonical-references/index.js +2 -0
  12. package/dist/lib/canonical-references/index.mjs +2 -0
  13. package/dist/lib/client/account-changes.d.mts +3 -1
  14. package/dist/lib/client/account-changes.d.ts +3 -1
  15. package/dist/lib/client/account-changes.js +22 -2
  16. package/dist/lib/client/account-changes.mjs +22 -2
  17. package/dist/lib/conformance/oracle.js +3 -2
  18. package/dist/lib/conformance/oracle.mjs +3 -2
  19. package/dist/lib/core/AgentClient.d.mts +165 -1
  20. package/dist/lib/core/AgentClient.d.ts +165 -1
  21. package/dist/lib/core/AgentClient.js +446 -8
  22. package/dist/lib/core/AgentClient.mjs +446 -8
  23. package/dist/lib/core/ConversationTypes.d.mts +8 -0
  24. package/dist/lib/core/ConversationTypes.d.ts +8 -0
  25. package/dist/lib/core/ProtocolResponseParser.d.mts +1 -1
  26. package/dist/lib/core/ProtocolResponseParser.d.ts +1 -1
  27. package/dist/lib/core/ProtocolResponseParser.js +28 -18
  28. package/dist/lib/core/ProtocolResponseParser.mjs +11 -1
  29. package/dist/lib/core/SingleAgentClient.d.mts +115 -2
  30. package/dist/lib/core/SingleAgentClient.d.ts +115 -2
  31. package/dist/lib/core/SingleAgentClient.js +547 -67
  32. package/dist/lib/core/SingleAgentClient.mjs +534 -54
  33. package/dist/lib/core/TaskExecutor.d.mts +7 -0
  34. package/dist/lib/core/TaskExecutor.d.ts +7 -0
  35. package/dist/lib/core/TaskExecutor.js +18 -5
  36. package/dist/lib/core/TaskExecutor.mjs +18 -5
  37. package/dist/lib/core/task-status.d.mts +2 -0
  38. package/dist/lib/core/task-status.d.ts +2 -0
  39. package/dist/lib/core/task-status.js +11 -2
  40. package/dist/lib/core/task-status.mjs +9 -1
  41. package/dist/lib/identity-3.3/trust.d.mts +1 -4
  42. package/dist/lib/identity-3.3/trust.d.ts +1 -4
  43. package/dist/lib/identity-3.3/trust.js +34 -21
  44. package/dist/lib/identity-3.3/trust.mjs +34 -21
  45. package/dist/lib/identity-3.3/validation.js +5 -3
  46. package/dist/lib/identity-3.3/validation.mjs +6 -4
  47. package/dist/lib/index.d.mts +6 -52
  48. package/dist/lib/index.d.ts +6 -52
  49. package/dist/lib/index.js +11 -0
  50. package/dist/lib/index.mjs +7 -0
  51. package/dist/lib/media-buy/compatibility.js +6 -1
  52. package/dist/lib/media-buy/compatibility.mjs +6 -1
  53. package/dist/lib/protocols/mcp-scope.d.mts +3 -0
  54. package/dist/lib/protocols/mcp-scope.d.ts +3 -0
  55. package/dist/lib/protocols/mcp-scope.js +8 -3
  56. package/dist/lib/protocols/mcp-scope.mjs +8 -3
  57. package/dist/lib/reporting/inspection.js +1 -0
  58. package/dist/lib/reporting/inspection.mjs +1 -0
  59. package/dist/lib/reporting/ledger/coverage.d.mts +5 -0
  60. package/dist/lib/reporting/ledger/coverage.d.ts +5 -0
  61. package/dist/lib/reporting/ledger/coverage.js +37 -3
  62. package/dist/lib/reporting/ledger/coverage.mjs +36 -3
  63. package/dist/lib/reporting/ledger/handler.js +7 -4
  64. package/dist/lib/reporting/ledger/handler.mjs +7 -4
  65. package/dist/lib/reporting/ledger/producer.js +215 -69
  66. package/dist/lib/reporting/ledger/producer.mjs +217 -70
  67. package/dist/lib/reporting/ledger/schedule.d.mts +2 -2
  68. package/dist/lib/reporting/ledger/schedule.d.ts +2 -2
  69. package/dist/lib/reporting/ledger/schedule.js +8 -5
  70. package/dist/lib/reporting/ledger/schedule.mjs +8 -5
  71. package/dist/lib/reporting/ledger/status-ingest.d.mts +1 -1
  72. package/dist/lib/reporting/ledger/status-ingest.d.ts +1 -1
  73. package/dist/lib/reporting/ledger/status-ingest.js +4 -3
  74. package/dist/lib/reporting/ledger/status-ingest.mjs +4 -3
  75. package/dist/lib/reporting/ledger/types.d.mts +36 -1
  76. package/dist/lib/reporting/ledger/types.d.ts +36 -1
  77. package/dist/lib/reporting/service/index.d.mts +14 -1
  78. package/dist/lib/reporting/service/index.d.ts +14 -1
  79. package/dist/lib/reporting/service/index.js +24 -12
  80. package/dist/lib/reporting/service/index.mjs +24 -12
  81. package/dist/lib/schemas/browser.d.mts +2 -0
  82. package/dist/lib/schemas/browser.d.ts +2 -0
  83. package/dist/lib/schemas/browser.js +3 -0
  84. package/dist/lib/schemas/browser.mjs +2 -0
  85. package/dist/lib/schemas/index.d.mts +5 -3
  86. package/dist/lib/schemas/index.d.ts +5 -3
  87. package/dist/lib/schemas/index.js +5 -0
  88. package/dist/lib/schemas/index.mjs +4 -0
  89. package/dist/lib/server/account-response-identity.d.mts +17 -0
  90. package/dist/lib/server/account-response-identity.d.ts +17 -0
  91. package/dist/lib/server/account-response-identity.js +52 -0
  92. package/dist/lib/server/account-response-identity.mjs +28 -0
  93. package/dist/lib/server/account-sync-contract.js +2 -2
  94. package/dist/lib/server/account-sync-contract.mjs +2 -2
  95. package/dist/lib/server/create-adcp-server.js +33 -20
  96. package/dist/lib/server/create-adcp-server.mjs +36 -12
  97. package/dist/lib/server/decisioning/account.d.mts +36 -10
  98. package/dist/lib/server/decisioning/account.d.ts +36 -10
  99. package/dist/lib/server/decisioning/account.js +33 -14
  100. package/dist/lib/server/decisioning/account.mjs +33 -14
  101. package/dist/lib/server/decisioning/runtime/from-platform.d.mts +5 -5
  102. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +5 -5
  103. package/dist/lib/server/decisioning/runtime/from-platform.js +4 -4
  104. package/dist/lib/server/decisioning/runtime/from-platform.mjs +4 -4
  105. package/dist/lib/server/media-buy-store.d.mts +26 -12
  106. package/dist/lib/server/media-buy-store.d.ts +26 -12
  107. package/dist/lib/server/media-buy-store.js +69 -21
  108. package/dist/lib/server/media-buy-store.mjs +69 -21
  109. package/dist/lib/server/notification-subscriptions/runtime.d.mts +1 -1
  110. package/dist/lib/server/notification-subscriptions/runtime.d.ts +1 -1
  111. package/dist/lib/server/notification-subscriptions/runtime.js +4 -0
  112. package/dist/lib/server/notification-subscriptions/runtime.mjs +4 -0
  113. package/dist/lib/server/responses.js +9 -1
  114. package/dist/lib/server/responses.mjs +9 -1
  115. package/dist/lib/signing/agent-fetch.d.mts +1 -1
  116. package/dist/lib/signing/agent-fetch.d.ts +1 -1
  117. package/dist/lib/signing/agent-fetch.js +3 -3
  118. package/dist/lib/signing/agent-fetch.mjs +3 -3
  119. package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +60 -14
  120. package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +60 -14
  121. package/dist/lib/testing/storyboard/compliance.d.mts +2 -5
  122. package/dist/lib/testing/storyboard/compliance.d.ts +2 -5
  123. package/dist/lib/testing/storyboard/compliance.js +62 -13
  124. package/dist/lib/testing/storyboard/compliance.mjs +63 -14
  125. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +2 -0
  126. package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +2 -0
  127. package/dist/lib/testing/storyboard/request-signing/vector-loader.js +11 -0
  128. package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +10 -0
  129. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  130. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  131. package/dist/lib/types/accept-proposal.d.ts +20 -28
  132. package/dist/lib/types/asset-instances.d.mts +1 -1
  133. package/dist/lib/types/asset-instances.d.ts +1 -1
  134. package/dist/lib/types/buy-products.d.ts +20 -28
  135. package/dist/lib/types/check-governance.d.ts +20 -28
  136. package/dist/lib/types/comply-test-controller.d.ts +20 -28
  137. package/dist/lib/types/control-media-buy.d.ts +20 -28
  138. package/dist/lib/types/core.generated.d.mts +273 -184
  139. package/dist/lib/types/core.generated.d.ts +273 -184
  140. package/dist/lib/types/create-media-buy.d.ts +20 -28
  141. package/dist/lib/types/get-media-buys.d.ts +20 -28
  142. package/dist/lib/types/get-products.d.ts +20 -28
  143. package/dist/lib/types/index.d.mts +6 -1
  144. package/dist/lib/types/index.d.ts +6 -1
  145. package/dist/lib/types/index.js +6 -1
  146. package/dist/lib/types/index.mjs +4 -1
  147. package/dist/lib/types/inline-enums.generated.d.mts +30 -4
  148. package/dist/lib/types/inline-enums.generated.d.ts +30 -4
  149. package/dist/lib/types/inline-enums.generated.js +41 -2
  150. package/dist/lib/types/inline-enums.generated.mjs +28 -2
  151. package/dist/lib/types/list-products.d.ts +20 -28
  152. package/dist/lib/types/list-proposals.d.ts +20 -28
  153. package/dist/lib/types/media-buy-delivery-report.d.mts +6 -0
  154. package/dist/lib/types/media-buy-delivery-report.d.ts +6 -0
  155. package/dist/lib/types/media-buy-delivery-report.js +16 -0
  156. package/dist/lib/types/media-buy-delivery-report.mjs +0 -0
  157. package/dist/lib/types/refine-proposals.d.ts +20 -28
  158. package/dist/lib/types/request-proposals.d.ts +20 -28
  159. package/dist/lib/types/schemas.generated.d.ts +63113 -127273
  160. package/dist/lib/types/schemas.generated.js +759 -770
  161. package/dist/lib/types/schemas.generated.mjs +759 -770
  162. package/dist/lib/types/targeting-keys.generated.d.mts +4 -0
  163. package/dist/lib/types/targeting-keys.generated.d.ts +4 -0
  164. package/dist/lib/types/targeting-keys.generated.js +109 -0
  165. package/dist/lib/types/targeting-keys.generated.mjs +84 -0
  166. package/dist/lib/types/tools.generated.d.mts +2 -68
  167. package/dist/lib/types/tools.generated.d.ts +2 -68
  168. package/dist/lib/types/update-media-buy.d.ts +20 -28
  169. package/dist/lib/utils/adcp-version-config.js +5 -2
  170. package/dist/lib/utils/adcp-version-config.mjs +5 -2
  171. package/dist/lib/utils/response-unwrapper.js +6 -1
  172. package/dist/lib/utils/response-unwrapper.mjs +6 -1
  173. package/dist/lib/v2/format-schema/resolver.js +1 -1
  174. package/dist/lib/v2/format-schema/resolver.mjs +1 -1
  175. package/dist/lib/v2/projection/creative-delivery.js +104 -29
  176. package/dist/lib/v2/projection/creative-delivery.mjs +108 -29
  177. package/dist/lib/v2/projection/index.d.mts +1 -0
  178. package/dist/lib/v2/projection/index.d.ts +1 -0
  179. package/dist/lib/v2/projection/index.js +3 -0
  180. package/dist/lib/v2/projection/index.mjs +2 -0
  181. package/dist/lib/v2/projection/legacy-metadata.d.mts +19 -0
  182. package/dist/lib/v2/projection/legacy-metadata.d.ts +19 -0
  183. package/dist/lib/v2/projection/legacy-metadata.js +91 -0
  184. package/dist/lib/v2/projection/legacy-metadata.mjs +86 -0
  185. package/dist/lib/v2/projection/v1-to-v2.d.mts +1 -1
  186. package/dist/lib/v2/projection/v1-to-v2.d.ts +1 -1
  187. package/dist/lib/v2/projection/v1-to-v2.js +12 -9
  188. package/dist/lib/v2/projection/v1-to-v2.mjs +12 -9
  189. package/dist/lib/validation/budget-allocation.d.mts +3 -3
  190. package/dist/lib/validation/budget-allocation.d.ts +3 -3
  191. package/dist/lib/validation/compact-schema.d.mts +27 -0
  192. package/dist/lib/validation/compact-schema.d.ts +27 -0
  193. package/dist/lib/validation/compact-schema.js +276 -0
  194. package/dist/lib/validation/compact-schema.mjs +250 -0
  195. package/dist/lib/validation/media-buy-delivery-report.d.mts +8 -0
  196. package/dist/lib/validation/media-buy-delivery-report.d.ts +8 -0
  197. package/dist/lib/validation/media-buy-delivery-report.js +31 -0
  198. package/dist/lib/validation/media-buy-delivery-report.mjs +7 -0
  199. package/dist/lib/validation/nonempty-array.d.mts +15 -0
  200. package/dist/lib/validation/nonempty-array.d.ts +15 -0
  201. package/dist/lib/validation/nonempty-array.js +41 -0
  202. package/dist/lib/validation/nonempty-array.mjs +7 -0
  203. package/dist/lib/validation/schema-diagnostic-origins.d.mts +21 -0
  204. package/dist/lib/validation/schema-diagnostic-origins.d.ts +21 -0
  205. package/dist/lib/validation/schema-diagnostic-origins.js +193 -0
  206. package/dist/lib/validation/schema-diagnostic-origins.mjs +169 -0
  207. package/dist/lib/validation/schema-loader.js +86 -16
  208. package/dist/lib/validation/schema-loader.mjs +82 -16
  209. package/dist/lib/validation/schema-validator.d.mts +10 -19
  210. package/dist/lib/validation/schema-validator.d.ts +10 -19
  211. package/dist/lib/validation/schema-validator.js +135 -42
  212. package/dist/lib/validation/schema-validator.mjs +139 -43
  213. package/dist/lib/validation/sync-creatives.d.mts +22 -22
  214. package/dist/lib/validation/sync-creatives.d.ts +22 -22
  215. package/dist/lib/version.d.mts +3 -3
  216. package/dist/lib/version.d.ts +3 -3
  217. package/dist/lib/version.js +3 -3
  218. package/dist/lib/version.mjs +3 -3
  219. package/dist/lib/webhooks/index.d.mts +3 -0
  220. package/dist/lib/webhooks/index.d.ts +3 -0
  221. package/dist/lib/webhooks/index.js +3 -0
  222. package/dist/lib/webhooks/index.mjs +2 -0
  223. package/dist/lib/webhooks/media-buy-delivery.d.mts +43 -0
  224. package/dist/lib/webhooks/media-buy-delivery.d.ts +43 -0
  225. package/dist/lib/webhooks/media-buy-delivery.js +119 -0
  226. package/dist/lib/webhooks/media-buy-delivery.mjs +94 -0
  227. package/docs/TYPE-SUMMARY.md +2 -2
  228. package/docs/guides/DELIVERY-WEBHOOK-PARSING.md +142 -0
  229. package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +15 -0
  230. package/docs/guides/REPORTING-LEDGER.md +93 -0
  231. package/docs/guides/REPORTING-STABILITY.md +1 -1
  232. package/docs/guides/TYPED-CLIENT-TOOLS.md +49 -0
  233. package/docs/llms.txt +2 -2
  234. package/docs/migration-14.x-rc-worksheet.md +4 -4
  235. package/docs/migration-16-to-17.md +191 -14
  236. package/docs/migration-6.6-to-6.7.md +14 -0
  237. package/docs/migration-account-change-feed.md +15 -0
  238. package/docs/recipes/verifying-inbound-webhooks.md +18 -2
  239. package/package.json +2 -2
@@ -5,23 +5,135 @@ development and staging; production remains on SDK 16 and AdCP 3.2.
5
5
 
6
6
  ## Companion packages
7
7
 
8
- `@adcp/reporting-storage` declares `@adcp/sdk` as a peer, so it ships a release
9
- for each SDK line. Its stable releases accept only SDK 16: `0.1.x` takes
10
- `^16.0.0` and `0.2.0` takes `^16.5.0`. Installing SDK 17 beta beside either one
11
- makes npm report an invalid tree (`npm ls` prints
12
- `invalid: "^16.0.0" from node_modules/@adcp/reporting-storage` for `0.1.x`) or
13
- refuse with `ERESOLVE`. Install the
14
- storage release from the same `beta` train:
8
+ The next release pairs **`@adcp/sdk@17.0.0-beta.2`** with
9
+ **`@adcp/reporting-storage@0.3.0-beta.1`**. The storage package requires SDK
10
+ `^17.0.0-beta.2`; install and lock both packages together after publication:
15
11
 
16
12
  ```bash
17
- npm install --save-exact @adcp/sdk@17.0.0-beta.0 @adcp/reporting-storage@0.2.1-beta.0
13
+ npm install --save-exact @adcp/sdk@17.0.0-beta.2 @adcp/reporting-storage@0.3.0-beta.1
14
+ npm ls @adcp/sdk @adcp/reporting-storage
18
15
  ```
19
16
 
20
- `0.2.1-beta.0` has the same storage code and SQL migrations as `0.2.0`; only its
21
- `@adcp/sdk` peer range changes (`^17.0.0-beta.0`). A `~0.2.0` range does not match
22
- the prerelease, so pin the exact version. If you are upgrading from SDK 16.4 or
23
- earlier, read the [`0.2.0` notes](https://github.com/adcontextprotocol/adcp-client/blob/main/packages/reporting-storage/CHANGELOG.md#020)
24
- for BigQuery sinks that omit `location`. No other storage change is required.
17
+ The `beta` tags select that release train once published. Stable storage
18
+ `0.2.0` accepts SDK `^16.5.0`, including SDK 16.6; it does not accept SDK 17.
19
+ The earlier SDK 17 beta.0/beta.1 pair used storage `0.2.1-beta.0`, whose code
20
+ and SQL migrations matched `0.2.0` and whose peer range was `^17.0.0-beta.0`.
21
+ A stable range such as `~0.2.0` does not select either storage prerelease.
22
+
23
+ Storage `0.3.0-beta.1` also includes reporting configuration history. Reapply
24
+ `REPORTING_LEDGER_MIGRATION` before starting the new workers: it adds the
25
+ nullable `adcp_reporting_configurations.history_start` audit column and
26
+ live-priority indexes idempotently. Upgrade all workers before granting or
27
+ extending historical ownership. Existing configurations retain their original
28
+ history boundary until the trusted host explicitly changes it. See the
29
+ [reporting ledger guide](./guides/REPORTING-LEDGER.md) for history, source
30
+ retention, pacing, and custom-store requirements.
31
+
32
+ If upgrading from SDK 16.4 or earlier, also read the
33
+ [storage 0.2.0 notes](https://github.com/adcontextprotocol/adcp-client/blob/main/packages/reporting-storage/CHANGELOG.md#020)
34
+ for BigQuery sinks that omit `location`.
35
+
36
+ ## Added union and enum members
37
+
38
+ These additions are relative to the bundled AdCP 3.2.7 contract. Update exhaustive
39
+ switches and runtime accept-lists deliberately; the unversioned `*Values` arrays
40
+ always describe the SDK's current pin, not the negotiated seller release.
41
+
42
+ | Surface | Added members or requirement | Migration action |
43
+ | --- | --- | --- |
44
+ | Account notification types | `collection_card.updated`, `collection_card.removed`, `collection_catalog.bulk_change`, `proposal.created` | Add handlers or explicitly exclude them from subscriptions. `ACCOUNT_NOTIFICATION_TYPES` includes all four. |
45
+ | `OutcomeTarget.goal.kind` | `vendor_metric` | Narrow all three goal kinds before accessing `metric`; see below. |
46
+ | `UniversalMacroValues` | `ADDTL_CONSENT` | Review macro accept-lists. Parameterized `GDPR_CONSENT_<gvl_id>` names also remain valid; the finite runtime array does not enumerate them. |
47
+ | Delivery `metric_id` / `AvailableMetric` | `print_metrics`, `publication` | Handle print-specific delivery aggregates. |
48
+ | `DemographicSystem` | `nmo`, `videoamp` | Review audience and demographic system filters. |
49
+ | Price adjustment `kind` | `operator_fee` | Include operator fees in supported price adjustment handling. |
50
+ | Seller-originated account changes | Nonempty `changed_paths` for `origin.kind: 'adcp'` or `'seller_operator'` | Populate paths on 3.3 pages. This is not required on 3.2 pages. |
51
+ | Creative asset content types / format slots | `video_brief` | Accept generation briefs separately from finished video assets. |
52
+ | Canonical format option kinds | `seller_rendered_stateful_display`, `coordinated_placements` | Update format-kind switches. |
53
+ | `PrincipalChangedWebhook.reason` | `relationship_changed`, `relationship_expiring` | Refresh relationship state when these invalidations arrive. |
54
+ | Product card asset `role` | `sample_content` | Update card-reference rendering switches. |
55
+ | Wholesale feed `entity_type` | `collection` | Handle collection invalidations; the feed event and webhook type unions include the three collection events above. |
56
+ | `ErrorCode` | `CREATIVE_MERGE_REJECTED`, `REFERENCE_DEFINITION_CHANGED`, `RIGHTS_CHANNEL_VIOLATION` | Handle the advertised recovery behavior; do not assume every new code is transient. |
57
+ | `IndicatorType` | `flight_extension_opportunity`, `scale_budget_opportunity` | Update indicator filters and displays. |
58
+ | `PixelTrackingEvent` | `start`, `first_quartile`, `midpoint`, `third_quartile`, `complete` | Review tracking event accept-lists. |
59
+ | `ProposalRefinementReason` / refinement action | `definition_changed` / `extend_hold` | Handle changed definitions and explicit hold extension. |
60
+ | `Specialism` | `sales-fixed-rate` | Include fixed-rate sellers in capability classification. |
61
+ | Canonical hosted-video codecs / containers | `mpeg2`, `avc_intra`, `xavc` / `mxf` | Update media validation and ingest routing. |
62
+ | Brand identity requested / available fields | `collections` | Handle collection identity fields if requested. |
63
+ | Creative listing fields | `provenance` | Include provenance only when requested and authorized. |
64
+ | Signal listing fields | `age_determination_bases`, `signal_status`, `source_audience_id` | Update field-selection lists. |
65
+ | Account change repair task / lifecycle tools | `list_proposals` | Refresh proposal state for relevant invalidations. |
66
+ | Event-source sync row action | `archived` | Handle archived source readback. |
67
+ | Entity hydration types | `creative_seller_revision`, `governance_budget_period` | Update entity type routing if used. |
68
+ | Agent permission denial reason | `grant_absent` | Handle missing grants in permission diagnostics. |
69
+ | Compliance controller operation | `mutate_definition` | Available to test-controller scenarios. |
70
+
71
+ `OutcomeTarget.goal` is now `metric | event | vendor_metric`. After excluding
72
+ `event`, a value can still be `vendor_metric`, which has `vendor` and `metric_id`
73
+ instead of `metric`. On proposal requests and refinements, sellers declaring
74
+ outcome-target planning but supporting only delivery metrics should reject
75
+ unsupported goals with `INVALID_REQUEST` naming `criteria.outcome_target.goal`.
76
+ A vendor goal requires the product's declared vendor/metric pair and a cumulative
77
+ total. Sellers that do not declare outcome-target planning reject the field
78
+ with `UNSUPPORTED_FEATURE`. On `list_products` the field is inert: perform schema
79
+ validation but do not reject it merely because the goal is unsupported.
80
+
81
+ ## Public asset and targeting types
82
+
83
+ Import the shared `AssetVariant` union from `@adcp/sdk`, `@adcp/sdk/types`, or
84
+ `@adcp/sdk/schemas`. Per-tool type slices stay self-contained and expose the
85
+ same structural contract. `AssetVariantSchema` has an explicit `z.ZodType`
86
+ annotation to keep `z.output<typeof AssetVariantSchema>` shallow and assignable
87
+ to that union, including nonempty video-brief segments and macro declarations.
88
+
89
+ `DaypartTarget` is a union of complete whole-hour and minute-resolution forms.
90
+ Check `start_hour !== undefined` before using hour arithmetic; minute windows
91
+ use `start_time` and `end_time` and can cross midnight. Mixing the forms or
92
+ omitting either endpoint is a type error.
93
+
94
+ `TargetingOverlayKeys` and `TargetingOverlaySupportKeys` are frozen runtime key
95
+ arrays exported from `@adcp/sdk` and `@adcp/sdk/types`. They include
96
+ `collection_lists`, `collection_lists_exclude`, and extension fields. Use them
97
+ for exhaustive dimension handling instead of maintaining local copies.
98
+
99
+ `streamAccountChanges` validates each page using trusted negotiated/wire
100
+ metadata before any seller echo. Without authoritative release metadata, the
101
+ drain falls back to the seller echo and then the client's configured version. Custom
102
+ readers can pass `adcpVersion: '3.2.7'` in the drain options. This selects
103
+ validation only; the reader remains responsible for sending the matching
104
+ request release. Existing cursor, account identity, and acknowledgement checks
105
+ still apply.
106
+
107
+ A `3.3.0` or `3.3` configuration pin does not select a beta. Use the exact
108
+ `3.3.0-beta.0` bundle (wire alias `3.3-beta.0`); unavailable pins now produce a
109
+ short list of bundled release lines instead of every compatible patch.
110
+
111
+ ## pnpm peer resolution
112
+
113
+ The official A2A SDK `1.0.1` already marks its Express peer optional, and the
114
+ AdCP SDK marks OpenTelemetry optional. AdCP cannot change a transitive package's
115
+ peer metadata by adding an Express entry to its own manifest. pnpm can still
116
+ create multiple SDK instances when workspace importers supply different peer
117
+ versions or different optional-peer sets. Install one compatible peer set at
118
+ the workspace root and align it across importers.
119
+
120
+ For workspaces that need explicit convergence, declare the three packages as
121
+ direct root dependencies, then use their declared specs in `pnpm-workspace.yaml`:
122
+
123
+ ```yaml
124
+ dedupePeerDependents: true
125
+ resolvePeersFromWorkspaceRoot: true
126
+ overrides:
127
+ '@a2a-js/sdk': '$@a2a-js/sdk'
128
+ '@modelcontextprotocol/sdk': '$@modelcontextprotocol/sdk'
129
+ '@opentelemetry/api': '$@opentelemetry/api'
130
+ ```
131
+
132
+ Choose versions satisfying all consumers before applying overrides; they do not
133
+ make incompatible peer contracts compatible. Run `pnpm install`, `pnpm dedupe`,
134
+ and `pnpm why -r @adcp/sdk` to inspect the resulting graph. See
135
+ [pnpm's dependency-resolution settings](https://github.com/pnpm/pnpm/blob/main/pnpm/docs/settings/dependency-resolution.md)
136
+ and [peer-dependency settings](https://pnpm.io/settings#dedupepeerdependents).
25
137
 
26
138
  ## Protocol and discovery
27
139
 
@@ -118,7 +230,11 @@ conversion before dispatch; deliver creatives with declared macros through the
118
230
  canonical `display_tag` contract. Legacy HTML also has no `markup_type` field;
119
231
  when converted for a canonical request, its markup type defaults to `standard`. Existing legacy
120
232
  request assets remain unchanged on the legacy wire. Explicit seller declarations
121
- retain their format kind and delivery types.
233
+ retain their format kind and delivery types. In dual-emitted products, an old
234
+ `html5` option paired with a `display_*_html` ID does not erase valid pairings
235
+ for sibling image/video options. The incompatible HTML option is left unpaired;
236
+ fix that seller declaration to `display_tag` with inline-markup delivery before
237
+ using it. The SDK does not reinterpret a seller's declared zip contract.
122
238
 
123
239
  These changes follow [adcp#8339](https://github.com/adcontextprotocol/adcp/issues/8339)
124
240
  and [adcp#8357](https://github.com/adcontextprotocol/adcp/pull/8357). They use the
@@ -133,3 +249,64 @@ Account verification applies to the selected request release. Unversioned caller
133
249
  The direct governance helpers and governance middleware retain their configured client protocol pin. For a stable governance agent, use a client configured with `adcpVersion: '3.2.7'`; `syncPlans` and `getPlanAuditLogs` also accept an explicit `wireAdcpVersion` in their task options. Per-agent negotiation for these direct governance paths remains follow-up work.
134
250
 
135
251
  AdCP 3.3 definition pins require revalidation against the current third-party published definitions at commitment time. This beta's synchronous standalone commercial-terms verifier cannot perform that source verification: it fails closed on definition pins, publisher format references, and any placement/collection/signal targeting. Use the seller-served stable 3.2.7 contract for existing snapshot-verification flows until pin verification is supported. It continues to compare ordinary 3.3 commercial snapshots and enforces collection-list uniqueness by reference identity.
252
+
253
+ For AdCP 3.0 buyers, `create_media_buy` and `update_media_buy` responses move
254
+ `media_buy_status` back into lifecycle `status` before schema projection. A buy
255
+ waiting on creatives therefore returns `status: 'pending_creatives'`; 3.1+
256
+ responses keep task `status` separate from `media_buy_status`.
257
+
258
+ ## Receivers with their own delivery webhook verification
259
+
260
+ `parseMediaBuyDeliveryWebhook` from `@adcp/sdk/webhooks` validates an already
261
+ authenticated body at a trusted `adcpVersion`, with readable envelope/result
262
+ errors and an explicit, marked `acceptBareDeliveryReport` compatibility option.
263
+ The registered reporting-delivery branch of `verifyAndParseWebhook` delegates
264
+ to it and accepts a per-call `adcpVersion` for stored buy contracts.
265
+
266
+ Use `MediaBuyDeliveryReportSchema` and `MediaBuyDeliveryReport` for one polled
267
+ and pushed ingestion shape without fabricating task status. Full poll response
268
+ schemas keep the status required by their referenced protocol envelope;
269
+ `MediaBuyDeliveryWebhookResultSchema` now enforces required `by_package` rows.
270
+ See [Parsing media-buy delivery webhooks](./guides/DELIVERY-WEBHOOK-PARSING.md).
271
+
272
+ Registered reporting receivers now distinguish `webhook_result_invalid` from
273
+ `webhook_envelope_invalid`, and use `webhook_unsupported_payload` for another
274
+ task type or a bare report. Update exhaustive code switches accordingly.
275
+ Invalid reporting schema configuration returns `webhook_verification_unavailable`
276
+ before consuming a nonce. Routing metadata uses the trusted registration's
277
+ operation ID; the seller's original ID stays in the validated envelope.
278
+
279
+ Zod schemas now enforce protocol-authored `minItems` bounds throughout, including
280
+ nonempty creative segments and render-guidance positions. Correct previously
281
+ accepted empty arrays where the protocol requires at least one item; nonempty
282
+ array output types are now `[T, ...T[]]`.
283
+
284
+ ## Account identity in sync results
285
+
286
+ `accounts.upsert` results now preserve `account`, `operator_unit`, `revision`,
287
+ `identity_change`, `identity_change_preview`, `currency`, and `timezone` (#3466).
288
+ `SyncAccountsResultRow` declares these fields. For 3.2+ settings updates, return
289
+ `account` as the identity anchor and omit flat `brand`/`operator`; provisioning
290
+ results use the natural key. Older releases still require the flat pair. Failed
291
+ 3.2+ rows may omit `status` when the account state could not be determined.
292
+
293
+ The entire `destination_billing_entity` is request-only and is stripped from
294
+ responses, including its legal name and tax details. This differs from the
295
+ current `billing_entity`, whose non-bank metadata is returned while `bank` is
296
+ stripped. The rule applies both to framework `accounts.upsert` projection and
297
+ the raw account response builders before replay caching.
298
+
299
+ Consumers reading `SyncAccountsResultRow` should narrow the identity anchor and
300
+ check failed rows before assuming `brand`, `operator`, or `status` are present.
301
+ The type now rejects missing or mixed identity anchors and successful rows
302
+ without a lifecycle status.
303
+
304
+ Nested account and operator identity objects must conform to their closed
305
+ protocol schemas. Internal fields accidentally retained from a request or DB
306
+ record are rejected before response emission, even when whole-response
307
+ validation is off.
308
+
309
+ `SyncAccountsResultRow` is now a union type. Replace interface extension with
310
+ an intersection alias such as `type MyRow = SyncAccountsResultRow & { upstreamId?: string }`.
311
+ Identity objects are emitted as detached validated snapshots. Raw account
312
+ response builders also strip top-level `authInfo` and `ctx_metadata`.
@@ -1061,6 +1061,20 @@ paths produce a value. The store fills the gap for adopters who
1061
1061
  hadn't wired echo yet (the canonical silent-storyboard-failure for
1062
1062
  `media_buy_seller/inventory_list_targeting/get_after_create`).
1063
1063
 
1064
+ The current store also persists buy-level and package-level `context` from
1065
+ `create_media_buy`, including empty objects and null-valued keys. It fills
1066
+ missing resource context on `get_media_buys`; seller-provided echoes and the
1067
+ read request's top-level context take precedence. Targeting updates retain
1068
+ creation context. Context for packages added by `update_media_buy` remains
1069
+ adapter-owned.
1070
+
1071
+ Package context follows unambiguous echoed identities (`product_id`,
1072
+ `package_id`, or legacy `buyer_ref`). Positional matching requires equal
1073
+ package counts and no contradictory identities. If pairing is ambiguous,
1074
+ only context echoed on the create response is retained for that package.
1075
+ Existing targeting-only records need no migration; creation context cannot
1076
+ be recovered retroactively from those records.
1077
+
1064
1078
  ### 16. **breaking** — drop `customTools["update_rights"]`; wire `BrandRightsPlatform.updateRights`
1065
1079
 
1066
1080
  `update_rights` is now a framework-registered first-class tool (PR
@@ -262,3 +262,18 @@ status-change record and webhook, so the subsequent authoritative
262
262
  creative library needed by the scenario's applicability check. Those training
263
263
  seller changes belong upstream; they do not introduce buyer durable storage or
264
264
  a persistent subscription runtime into the SDK.
265
+
266
+ ### Validating older feed releases
267
+
268
+ `streamAccountChanges` uses negotiated response metadata, the served-version echo,
269
+ or the client's configured AdCP version to select the page schema. For a custom
270
+ reader without SDK metadata, pass `adcpVersion: '3.2.7'` in the stream options and
271
+ send the same release in your reader's requests. AdCP 3.3 requires nonempty
272
+ `changed_paths` on seller-originated changes; AdCP 3.2 does not.
273
+
274
+ When available, `metadata.wireAdcpVersion` records the trusted SDK-selected wire
275
+ release, independently of the seller echo. Drains prefer negotiated/wire
276
+ metadata, then a custom reader's explicit `adcpVersion`, then the echo and
277
+ configured client pin. An older echo cannot weaken a known wire contract.
278
+ Sellers without authoritative release metadata keep the echo/client fallback;
279
+ use an explicit validation pin for a custom reader when its release is known.
@@ -63,8 +63,10 @@ Inner delivery result only:
63
63
  ```
64
64
 
65
65
  That inner object is valid delivery report content, but it is not valid as the
66
- top-level webhook POST body. Receivers should reject it before dispatch because
67
- it is missing the async transport fields.
66
+ top-level webhook POST body. Receivers reject it by default because
67
+ it is missing the async transport fields. Receivers migrating older senders may
68
+ explicitly opt into the marked bare-report compatibility path in
69
+ [Parsing media-buy delivery webhooks](../guides/DELIVERY-WEBHOOK-PARSING.md).
68
70
 
69
71
  Status fields have different scopes: top-level `status` is the async task or
70
72
  webhook event status; nested `media_buy_deliveries[].status` is the media buy's
@@ -72,6 +74,20 @@ delivery status. `idempotency_key` is unique per webhook event and stable across
72
74
  retries of that event. Signatures cover the exact raw JSON bytes being sent, so
73
75
  verify before parsing or re-serializing.
74
76
 
77
+ ## Parse a delivery after your own signature checks
78
+
79
+ Multi-seller receivers with their own callback registry can call
80
+ `parseMediaBuyDeliveryWebhook(rawBody, { adcpVersion: savedBuy.adcpVersion })` from
81
+ `@adcp/sdk/webhooks` after verifying the original body bytes. It validates the
82
+ selected release's envelope and report, returns readable error paths, and does
83
+ not authenticate the sender itself. See the
84
+ [delivery parser guide](../guides/DELIVERY-WEBHOOK-PARSING.md) for the 3.0–3.3
85
+ contracts, shared poll/push body schema, and explicit bare-report migration.
86
+
87
+ Envelope status follows the release's task-status enum. A valid delayed report
88
+ may arrive with `status: 'working'`; `notification_type` does not select the
89
+ envelope status, and `completed` does not mean the media buy is finished.
90
+
75
91
  ## Recommended RFC 9421 Setup
76
92
 
77
93
  Create one verifier per expected sending agent. The resolver is bound to that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adcp/sdk",
3
- "version": "17.0.0-beta.1",
3
+ "version": "17.0.0-beta.2",
4
4
  "description": "AdCP SDK — client, server, and compliance harnesses for the AdContext Protocol (MCP + A2A)",
5
5
  "workspaces": [
6
6
  ".",
@@ -646,7 +646,7 @@
646
646
  "sync-registry-schemas": "tsx scripts/generate-registry-types.ts --sync",
647
647
  "schemas:ensure": "tsx scripts/schemas-ensure.ts",
648
648
  "schema-diff": "tsx scripts/schema-diff.ts",
649
- "generate-types": "tsx scripts/generate-types.ts && tsx scripts/generate-enum-arrays.ts && tsx scripts/generate-inline-enum-arrays.ts && tsx scripts/generate-manifest-derived.ts && tsx scripts/generate-entity-hydration.ts && tsx scripts/generate-media-buy-update-fields.ts && tsx scripts/generate-media-buy-action-metadata.ts",
649
+ "generate-types": "tsx scripts/generate-types.ts && tsx scripts/generate-enum-arrays.ts && tsx scripts/generate-targeting-keys.ts && tsx scripts/generate-inline-enum-arrays.ts && tsx scripts/generate-manifest-derived.ts && tsx scripts/generate-entity-hydration.ts && tsx scripts/generate-media-buy-update-fields.ts && tsx scripts/generate-media-buy-action-metadata.ts",
650
650
  "generate-manifest-derived": "tsx scripts/generate-manifest-derived.ts",
651
651
  "generate-entity-hydration": "tsx scripts/generate-entity-hydration.ts",
652
652
  "generate-types:all": "npm run generate-types",