@adcp/sdk 15.9.1 → 16.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 (321) hide show
  1. package/bin/adcp-identity.js +74 -0
  2. package/bin/adcp.js +2 -0
  3. package/dist/lib/adapters/keyed-account-backend.d.mts +37 -0
  4. package/dist/lib/adapters/keyed-account-backend.d.ts +37 -0
  5. package/dist/lib/adapters/keyed-account-backend.js +121 -0
  6. package/dist/lib/adapters/keyed-account-backend.mjs +94 -0
  7. package/dist/lib/adapters/keyed-account-store.d.mts +28 -0
  8. package/dist/lib/adapters/keyed-account-store.d.ts +28 -0
  9. package/dist/lib/adapters/keyed-account-store.js +227 -0
  10. package/dist/lib/adapters/keyed-account-store.mjs +203 -0
  11. package/dist/lib/core/SingleAgentClient.d.mts +25 -2
  12. package/dist/lib/core/SingleAgentClient.d.ts +25 -2
  13. package/dist/lib/core/SingleAgentClient.js +280 -62
  14. package/dist/lib/core/SingleAgentClient.mjs +282 -57
  15. package/dist/lib/core/TaskExecutor.d.mts +6 -0
  16. package/dist/lib/core/TaskExecutor.d.ts +6 -0
  17. package/dist/lib/core/TaskExecutor.js +66 -5
  18. package/dist/lib/core/TaskExecutor.mjs +71 -5
  19. package/dist/lib/core/postgres-webhook-registration-store.js +32 -5
  20. package/dist/lib/core/postgres-webhook-registration-store.mjs +32 -5
  21. package/dist/lib/core/redis-webhook-registration-store.js +23 -1
  22. package/dist/lib/core/redis-webhook-registration-store.mjs +23 -1
  23. package/dist/lib/core/webhook-registration.d.mts +7 -1
  24. package/dist/lib/core/webhook-registration.d.ts +7 -1
  25. package/dist/lib/core/webhook-registration.js +24 -2
  26. package/dist/lib/core/webhook-registration.mjs +23 -2
  27. package/dist/lib/identity-3.3/generated-compat.d.mts +34 -0
  28. package/dist/lib/identity-3.3/generated-compat.d.ts +34 -0
  29. package/dist/lib/identity-3.3/generated-compat.js +16 -0
  30. package/dist/lib/identity-3.3/generated-compat.mjs +0 -0
  31. package/dist/lib/identity-3.3/index.d.mts +10 -0
  32. package/dist/lib/identity-3.3/index.d.ts +10 -0
  33. package/dist/lib/identity-3.3/index.js +79 -0
  34. package/dist/lib/identity-3.3/index.mjs +50 -0
  35. package/dist/lib/identity-3.3/lifecycle.d.mts +125 -0
  36. package/dist/lib/identity-3.3/lifecycle.d.ts +125 -0
  37. package/dist/lib/identity-3.3/lifecycle.js +294 -0
  38. package/dist/lib/identity-3.3/lifecycle.mjs +272 -0
  39. package/dist/lib/identity-3.3/revocation.d.mts +86 -0
  40. package/dist/lib/identity-3.3/revocation.d.ts +86 -0
  41. package/dist/lib/identity-3.3/revocation.js +308 -0
  42. package/dist/lib/identity-3.3/revocation.mjs +286 -0
  43. package/dist/lib/identity-3.3/schemas.draft.d.mts +2472 -0
  44. package/dist/lib/identity-3.3/schemas.draft.d.ts +2472 -0
  45. package/dist/lib/identity-3.3/schemas.draft.js +1448 -0
  46. package/dist/lib/identity-3.3/schemas.draft.mjs +1428 -0
  47. package/dist/lib/identity-3.3/server.d.mts +46 -0
  48. package/dist/lib/identity-3.3/server.d.ts +46 -0
  49. package/dist/lib/identity-3.3/server.js +279 -0
  50. package/dist/lib/identity-3.3/server.mjs +260 -0
  51. package/dist/lib/identity-3.3/store.d.mts +24 -0
  52. package/dist/lib/identity-3.3/store.d.ts +24 -0
  53. package/dist/lib/identity-3.3/store.js +191 -0
  54. package/dist/lib/identity-3.3/store.mjs +169 -0
  55. package/dist/lib/identity-3.3/trust.d.mts +155 -0
  56. package/dist/lib/identity-3.3/trust.d.ts +155 -0
  57. package/dist/lib/identity-3.3/trust.js +383 -0
  58. package/dist/lib/identity-3.3/trust.mjs +342 -0
  59. package/dist/lib/identity-3.3/types.d.mts +155 -0
  60. package/dist/lib/identity-3.3/types.d.ts +155 -0
  61. package/dist/lib/identity-3.3/types.js +16 -0
  62. package/dist/lib/identity-3.3/types.mjs +0 -0
  63. package/dist/lib/identity-3.3/validation.d.mts +2 -0
  64. package/dist/lib/identity-3.3/validation.d.ts +2 -0
  65. package/dist/lib/identity-3.3/validation.js +125 -0
  66. package/dist/lib/identity-3.3/validation.mjs +91 -0
  67. package/dist/lib/index.d.mts +1 -1
  68. package/dist/lib/index.d.ts +1 -1
  69. package/dist/lib/index.js +2 -0
  70. package/dist/lib/index.mjs +2 -0
  71. package/dist/lib/protocols/index.d.mts +1 -1
  72. package/dist/lib/protocols/index.d.ts +1 -1
  73. package/dist/lib/protocols/index.js +2 -2
  74. package/dist/lib/protocols/index.mjs +2 -2
  75. package/dist/lib/reporting/azure/index.d.mts +5 -0
  76. package/dist/lib/reporting/azure/index.d.ts +5 -0
  77. package/dist/lib/reporting/azure/index.js +26 -7
  78. package/dist/lib/reporting/azure/index.mjs +26 -7
  79. package/dist/lib/reporting/bigquery/index.d.mts +39 -5
  80. package/dist/lib/reporting/bigquery/index.d.ts +39 -5
  81. package/dist/lib/reporting/bigquery/index.js +26 -20
  82. package/dist/lib/reporting/bigquery/index.mjs +26 -20
  83. package/dist/lib/reporting/gcs/adapter.d.mts +8 -1
  84. package/dist/lib/reporting/gcs/adapter.d.ts +8 -1
  85. package/dist/lib/reporting/gcs/errors.d.mts +6 -0
  86. package/dist/lib/reporting/gcs/errors.d.ts +6 -0
  87. package/dist/lib/reporting/gcs/fence.d.mts +5 -0
  88. package/dist/lib/reporting/gcs/fence.d.ts +5 -0
  89. package/dist/lib/reporting/gcs/index.d.mts +9 -0
  90. package/dist/lib/reporting/gcs/index.d.ts +9 -0
  91. package/dist/lib/reporting/gcs/reader.d.mts +27 -3
  92. package/dist/lib/reporting/gcs/reader.d.ts +27 -3
  93. package/dist/lib/reporting/gcs/row-provider.d.mts +7 -0
  94. package/dist/lib/reporting/gcs/row-provider.d.ts +7 -0
  95. package/dist/lib/reporting/gcs/row-provider.js +34 -14
  96. package/dist/lib/reporting/gcs/row-provider.mjs +34 -14
  97. package/dist/lib/reporting/ledger/change-feed.d.mts +22 -1
  98. package/dist/lib/reporting/ledger/change-feed.d.ts +22 -1
  99. package/dist/lib/reporting/ledger/index.d.mts +11 -0
  100. package/dist/lib/reporting/ledger/index.d.ts +11 -0
  101. package/dist/lib/reporting/ledger/managed-postgres.d.mts +8 -0
  102. package/dist/lib/reporting/ledger/managed-postgres.d.ts +8 -0
  103. package/dist/lib/reporting/ledger/managed-router.d.mts +27 -2
  104. package/dist/lib/reporting/ledger/managed-router.d.ts +27 -2
  105. package/dist/lib/reporting/ledger/managed.d.mts +86 -6
  106. package/dist/lib/reporting/ledger/managed.d.ts +86 -6
  107. package/dist/lib/reporting/ledger/notification-activity.d.mts +65 -3
  108. package/dist/lib/reporting/ledger/notification-activity.d.ts +65 -3
  109. package/dist/lib/reporting/ledger/object-writes.d.mts +64 -5
  110. package/dist/lib/reporting/ledger/object-writes.d.ts +64 -5
  111. package/dist/lib/reporting/ledger/postgres.d.mts +43 -9
  112. package/dist/lib/reporting/ledger/postgres.d.ts +43 -9
  113. package/dist/lib/reporting/ledger/postgres.js +43 -27
  114. package/dist/lib/reporting/ledger/postgres.mjs +43 -27
  115. package/dist/lib/reporting/ledger/row-encoding.d.mts +92 -6
  116. package/dist/lib/reporting/ledger/row-encoding.d.ts +92 -6
  117. package/dist/lib/reporting/ledger/row-encoding.js +8 -4
  118. package/dist/lib/reporting/ledger/row-encoding.mjs +6 -3
  119. package/dist/lib/reporting/ledger/row-storage-errors.d.mts +11 -1
  120. package/dist/lib/reporting/ledger/row-storage-errors.d.ts +11 -1
  121. package/dist/lib/reporting/ledger/row-storage-migration.d.mts +19 -1
  122. package/dist/lib/reporting/ledger/row-storage-migration.d.ts +19 -1
  123. package/dist/lib/reporting/ledger/row-storage-migration.js +133 -18
  124. package/dist/lib/reporting/ledger/row-storage-migration.mjs +133 -18
  125. package/dist/lib/reporting/ledger/row-storage-object.d.mts +103 -12
  126. package/dist/lib/reporting/ledger/row-storage-object.d.ts +103 -12
  127. package/dist/lib/reporting/ledger/row-storage-object.js +106 -31
  128. package/dist/lib/reporting/ledger/row-storage-object.mjs +104 -31
  129. package/dist/lib/reporting/ledger/row-storage.d.mts +87 -20
  130. package/dist/lib/reporting/ledger/row-storage.d.ts +87 -20
  131. package/dist/lib/reporting/ledger/row-storage.js +126 -66
  132. package/dist/lib/reporting/ledger/row-storage.mjs +129 -67
  133. package/dist/lib/reporting/ledger/schedule.d.mts +13 -0
  134. package/dist/lib/reporting/ledger/schedule.d.ts +13 -0
  135. package/dist/lib/reporting/ledger/schedule.js +24 -0
  136. package/dist/lib/reporting/ledger/schedule.mjs +23 -0
  137. package/dist/lib/reporting/ledger/types.d.mts +23 -1
  138. package/dist/lib/reporting/ledger/types.d.ts +23 -1
  139. package/dist/lib/reporting/s3/index.d.mts +5 -0
  140. package/dist/lib/reporting/s3/index.d.ts +5 -0
  141. package/dist/lib/reporting/s3/index.js +37 -14
  142. package/dist/lib/reporting/s3/index.mjs +37 -14
  143. package/dist/lib/reporting/service/index.d.mts +10 -0
  144. package/dist/lib/reporting/service/index.d.ts +10 -0
  145. package/dist/lib/reporting/service/maintenance.d.mts +28 -2
  146. package/dist/lib/reporting/service/maintenance.d.ts +28 -2
  147. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  148. package/dist/lib/server/account-sync-contract.d.mts +14 -0
  149. package/dist/lib/server/account-sync-contract.d.ts +14 -0
  150. package/dist/lib/server/account-sync-contract.js +225 -0
  151. package/dist/lib/server/account-sync-contract.mjs +197 -0
  152. package/dist/lib/server/adcp-server.js +5 -0
  153. package/dist/lib/server/adcp-server.mjs +10 -0
  154. package/dist/lib/server/auth-signature.d.mts +15 -0
  155. package/dist/lib/server/auth-signature.d.ts +15 -0
  156. package/dist/lib/server/auth-signature.js +72 -2
  157. package/dist/lib/server/auth-signature.mjs +81 -2
  158. package/dist/lib/server/auth.d.mts +6 -0
  159. package/dist/lib/server/auth.d.ts +6 -0
  160. package/dist/lib/server/auth.js +6 -0
  161. package/dist/lib/server/auth.mjs +6 -0
  162. package/dist/lib/server/create-adcp-server.d.mts +19 -5
  163. package/dist/lib/server/create-adcp-server.d.ts +19 -5
  164. package/dist/lib/server/create-adcp-server.js +259 -19
  165. package/dist/lib/server/create-adcp-server.mjs +266 -10
  166. package/dist/lib/server/decisioning/account.d.mts +24 -1
  167. package/dist/lib/server/decisioning/account.d.ts +24 -1
  168. package/dist/lib/server/decisioning/index.d.mts +1 -1
  169. package/dist/lib/server/decisioning/index.d.ts +1 -1
  170. package/dist/lib/server/decisioning/runtime/from-platform.d.mts +0 -50
  171. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +0 -50
  172. package/dist/lib/server/decisioning/runtime/from-platform.js +61 -11
  173. package/dist/lib/server/decisioning/runtime/from-platform.mjs +65 -12
  174. package/dist/lib/server/index.d.mts +2 -0
  175. package/dist/lib/server/index.d.ts +2 -0
  176. package/dist/lib/server/index.js +12 -0
  177. package/dist/lib/server/index.mjs +12 -0
  178. package/dist/lib/server/notification-subscriptions/runtime.js +9 -1
  179. package/dist/lib/server/notification-subscriptions/runtime.mjs +9 -1
  180. package/dist/lib/server/notification-subscriptions/types.d.mts +5 -0
  181. package/dist/lib/server/notification-subscriptions/types.d.ts +5 -0
  182. package/dist/lib/server/principal/types.d.mts +1 -1
  183. package/dist/lib/server/principal/types.d.ts +1 -1
  184. package/dist/lib/server/serve.js +5 -0
  185. package/dist/lib/server/serve.mjs +5 -0
  186. package/dist/lib/server/webhook-delivery/recovery.d.mts +1 -0
  187. package/dist/lib/server/webhook-delivery/recovery.d.ts +1 -0
  188. package/dist/lib/server/webhook-delivery/recovery.js +4 -0
  189. package/dist/lib/server/webhook-delivery/recovery.mjs +4 -0
  190. package/dist/lib/server/webhook-emitter.d.mts +10 -0
  191. package/dist/lib/server/webhook-emitter.d.ts +10 -0
  192. package/dist/lib/server/webhook-emitter.js +22 -0
  193. package/dist/lib/server/webhook-emitter.mjs +22 -0
  194. package/dist/lib/signing/agent-context.d.mts +0 -5
  195. package/dist/lib/signing/agent-context.d.ts +0 -5
  196. package/dist/lib/signing/agent-context.js +9 -1
  197. package/dist/lib/signing/agent-context.mjs +9 -1
  198. package/dist/lib/signing/agent-fetch.js +27 -2
  199. package/dist/lib/signing/agent-fetch.mjs +32 -2
  200. package/dist/lib/signing/agent-resolver/canonicalize.d.mts +10 -15
  201. package/dist/lib/signing/agent-resolver/canonicalize.d.ts +10 -15
  202. package/dist/lib/signing/agent-resolver/canonicalize.js +17 -5
  203. package/dist/lib/signing/agent-resolver/canonicalize.mjs +16 -5
  204. package/dist/lib/signing/agent-resolver/index.d.mts +1 -0
  205. package/dist/lib/signing/agent-resolver/index.d.ts +1 -0
  206. package/dist/lib/signing/agent-resolver/index.js +5 -0
  207. package/dist/lib/signing/agent-resolver/index.mjs +3 -0
  208. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +3 -2
  209. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +3 -2
  210. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +30 -3
  211. package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +30 -3
  212. package/dist/lib/signing/agent-resolver/strict-json.d.mts +2 -2
  213. package/dist/lib/signing/agent-resolver/strict-json.d.ts +2 -2
  214. package/dist/lib/signing/agent-resolver/strict-json.js +5 -3
  215. package/dist/lib/signing/agent-resolver/strict-json.mjs +5 -3
  216. package/dist/lib/signing/brand-jwks.d.mts +2 -2
  217. package/dist/lib/signing/brand-jwks.d.ts +2 -2
  218. package/dist/lib/signing/brand-jwks.js +4 -4
  219. package/dist/lib/signing/brand-jwks.mjs +4 -4
  220. package/dist/lib/signing/client.d.mts +1 -0
  221. package/dist/lib/signing/client.d.ts +1 -0
  222. package/dist/lib/signing/client.js +5 -0
  223. package/dist/lib/signing/client.mjs +3 -0
  224. package/dist/lib/signing/crypto.js +8 -0
  225. package/dist/lib/signing/crypto.mjs +9 -1
  226. package/dist/lib/signing/fetch-async.js +1 -1
  227. package/dist/lib/signing/fetch-async.mjs +1 -1
  228. package/dist/lib/signing/fetch.js +1 -1
  229. package/dist/lib/signing/fetch.mjs +1 -1
  230. package/dist/lib/signing/jwks-https.d.mts +1 -1
  231. package/dist/lib/signing/jwks-https.d.ts +1 -1
  232. package/dist/lib/signing/jwks-https.js +1 -1
  233. package/dist/lib/signing/jwks-https.mjs +1 -1
  234. package/dist/lib/signing/jwks.d.mts +11 -3
  235. package/dist/lib/signing/jwks.d.ts +11 -3
  236. package/dist/lib/signing/jwks.js +1 -1
  237. package/dist/lib/signing/jwks.mjs +1 -1
  238. package/dist/lib/signing/middleware.js +9 -0
  239. package/dist/lib/signing/middleware.mjs +14 -0
  240. package/dist/lib/signing/parser.d.mts +9 -6
  241. package/dist/lib/signing/parser.d.ts +9 -6
  242. package/dist/lib/signing/parser.js +82 -64
  243. package/dist/lib/signing/parser.mjs +83 -65
  244. package/dist/lib/signing/revocation.d.mts +4 -1
  245. package/dist/lib/signing/revocation.d.ts +4 -1
  246. package/dist/lib/signing/revocation.js +36 -3
  247. package/dist/lib/signing/revocation.mjs +34 -2
  248. package/dist/lib/signing/server.d.mts +1 -1
  249. package/dist/lib/signing/server.d.ts +1 -1
  250. package/dist/lib/signing/server.js +4 -0
  251. package/dist/lib/signing/server.mjs +4 -0
  252. package/dist/lib/signing/types.d.mts +3 -0
  253. package/dist/lib/signing/types.d.ts +3 -0
  254. package/dist/lib/signing/verifier.js +1 -1
  255. package/dist/lib/signing/verifier.mjs +1 -1
  256. package/dist/lib/signing/web-bot-auth.d.mts +191 -0
  257. package/dist/lib/signing/web-bot-auth.d.ts +191 -0
  258. package/dist/lib/signing/web-bot-auth.js +837 -0
  259. package/dist/lib/signing/web-bot-auth.mjs +796 -0
  260. package/dist/lib/signing/webhook-verifier.js +1 -1
  261. package/dist/lib/signing/webhook-verifier.mjs +1 -1
  262. package/dist/lib/testing/client.d.mts +1 -4
  263. package/dist/lib/testing/client.d.ts +1 -4
  264. package/dist/lib/testing/client.js +141 -20
  265. package/dist/lib/testing/client.mjs +137 -19
  266. package/dist/lib/testing/compliance/comply.js +29 -10
  267. package/dist/lib/testing/compliance/comply.mjs +37 -11
  268. package/dist/lib/testing/storyboard/account-sync-contract.d.mts +3 -0
  269. package/dist/lib/testing/storyboard/account-sync-contract.d.ts +3 -0
  270. package/dist/lib/testing/storyboard/account-sync-contract.js +79 -0
  271. package/dist/lib/testing/storyboard/account-sync-contract.mjs +55 -0
  272. package/dist/lib/testing/storyboard/default-invariants.js +2 -0
  273. package/dist/lib/testing/storyboard/default-invariants.mjs +2 -0
  274. package/dist/lib/testing/storyboard/runner.js +23 -8
  275. package/dist/lib/testing/storyboard/runner.mjs +24 -8
  276. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  277. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  278. package/dist/lib/types/adcp.d.mts +4 -0
  279. package/dist/lib/types/adcp.d.ts +4 -0
  280. package/dist/lib/types/schemas.generated.d.ts +6 -6
  281. package/dist/lib/utils/capabilities.d.mts +1 -0
  282. package/dist/lib/utils/capabilities.d.ts +1 -0
  283. package/dist/lib/utils/capabilities.js +5 -0
  284. package/dist/lib/utils/capabilities.mjs +5 -0
  285. package/dist/lib/v2/projection/catalog-snapshot.js +3 -1
  286. package/dist/lib/v2/projection/catalog-snapshot.mjs +3 -1
  287. package/dist/lib/v2/projection/creative-delivery.d.mts +34 -10
  288. package/dist/lib/v2/projection/creative-delivery.d.ts +34 -10
  289. package/dist/lib/v2/projection/creative-delivery.js +26 -10
  290. package/dist/lib/v2/projection/creative-delivery.mjs +26 -10
  291. package/dist/lib/v2/projection/index.d.mts +1 -1
  292. package/dist/lib/v2/projection/index.d.ts +1 -1
  293. package/dist/lib/v2/projection/index.js +2 -0
  294. package/dist/lib/v2/projection/index.mjs +2 -0
  295. package/dist/lib/v2/projection/legacy-routes.d.mts +34 -2
  296. package/dist/lib/v2/projection/legacy-routes.d.ts +34 -2
  297. package/dist/lib/v2/projection/legacy-routes.js +35 -2
  298. package/dist/lib/v2/projection/legacy-routes.mjs +32 -2
  299. package/dist/lib/validation/schema-loader.d.mts +2 -0
  300. package/dist/lib/validation/schema-loader.d.ts +2 -0
  301. package/dist/lib/validation/schema-loader.js +43 -4
  302. package/dist/lib/validation/schema-loader.mjs +39 -3
  303. package/dist/lib/version.d.mts +3 -3
  304. package/dist/lib/version.d.ts +3 -3
  305. package/dist/lib/version.js +3 -3
  306. package/dist/lib/version.mjs +3 -3
  307. package/docs/TYPE-SUMMARY.md +2 -2
  308. package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +4 -0
  309. package/docs/guides/REPORTING-LEDGER-CUTOVER.md +1 -1
  310. package/docs/guides/REPORTING-LEDGER.md +99 -29
  311. package/docs/guides/REPORTING-OPERATIONS.md +29 -13
  312. package/docs/guides/REPORTING-STABILITY.md +76 -0
  313. package/docs/guides/account-resolution.md +101 -0
  314. package/docs/llms.txt +3 -2
  315. package/docs/migration-12-to-13.md +15 -0
  316. package/docs/migration-14.x-rc-worksheet.md +4 -4
  317. package/docs/migration-agent-identity-3.3.md +494 -0
  318. package/docs/migration-agent-resolution-3.3.md +5 -0
  319. package/docs/migration-reporting-row-storage-alignment.md +137 -0
  320. package/examples/storyboards/account-sync-contract.yaml +57 -0
  321. package/package.json +17 -1
@@ -68,6 +68,8 @@ export declare function resolveBundleKey(version: string): string;
68
68
  */
69
69
  export declare function validateAdcpVersionWire(value: unknown): asserts value is string;
70
70
  export declare function toReleasePrecisionWire(bundleKeyOrVersion: string): string;
71
+ export declare function withIdentity33SchemaScope<T>(fn: () => T, enabled?: boolean): T;
72
+ export declare function bindIdentity33SchemaScope<T extends object>(instance: T): T;
71
73
  /**
72
74
  * Register a schema bundle supplied outside the installed SDK package.
73
75
  *
@@ -68,6 +68,8 @@ export declare function resolveBundleKey(version: string): string;
68
68
  */
69
69
  export declare function validateAdcpVersionWire(value: unknown): asserts value is string;
70
70
  export declare function toReleasePrecisionWire(bundleKeyOrVersion: string): string;
71
+ export declare function withIdentity33SchemaScope<T>(fn: () => T, enabled?: boolean): T;
72
+ export declare function bindIdentity33SchemaScope<T extends object>(instance: T): T;
71
73
  /**
72
74
  * Register a schema bundle supplied outside the installed SDK package.
73
75
  *
@@ -30,6 +30,7 @@ var schema_loader_exports = {};
30
30
  __export(schema_loader_exports, {
31
31
  SCHEMA_FILENAME_SUFFIX: () => SCHEMA_FILENAME_SUFFIX,
32
32
  _resetValidationLoader: () => _resetValidationLoader,
33
+ bindIdentity33SchemaScope: () => bindIdentity33SchemaScope,
33
34
  getCanonicalToolValidatorForVersion: () => getCanonicalToolValidatorForVersion,
34
35
  getMcpProfileInputSchema: () => getMcpProfileInputSchema,
35
36
  getMcpToolSchema: () => getMcpToolSchema,
@@ -43,6 +44,7 @@ __export(schema_loader_exports, {
43
44
  getValidator: () => getValidator,
44
45
  hasSchemaBundle: () => hasSchemaBundle,
45
46
  isExternalSchemaRootActive: () => isExternalSchemaRootActive,
47
+ isIdentity33SchemaScope: () => isIdentity33SchemaScope,
46
48
  listValidatorKeys: () => listValidatorKeys,
47
49
  registerExternalSchemaRoot: () => registerExternalSchemaRoot,
48
50
  resolveBundleKey: () => resolveBundleKey,
@@ -50,7 +52,8 @@ __export(schema_loader_exports, {
50
52
  toReleasePrecisionWire: () => toReleasePrecisionWire,
51
53
  unregisterExternalSchemaRoot: () => unregisterExternalSchemaRoot,
52
54
  validateAdcpVersionWire: () => validateAdcpVersionWire,
53
- withExternalSchemaRoot: () => withExternalSchemaRoot
55
+ withExternalSchemaRoot: () => withExternalSchemaRoot,
56
+ withIdentity33SchemaScope: () => withIdentity33SchemaScope
54
57
  });
55
58
  module.exports = __toCommonJS(schema_loader_exports);
56
59
  var import_ajv = __toESM(require("ajv"));
@@ -123,12 +126,30 @@ function toReleasePrecisionWire(bundleKeyOrVersion) {
123
126
  "adcpVersion"
124
127
  );
125
128
  }
129
+ const identity33Scope = new import_async_hooks.AsyncLocalStorage();
130
+ function isIdentity33SchemaScope() {
131
+ return identity33Scope.getStore() === true;
132
+ }
133
+ function withIdentity33SchemaScope(fn, enabled = true) {
134
+ return identity33Scope.run(enabled, fn);
135
+ }
136
+ function bindIdentity33SchemaScope(instance) {
137
+ return new Proxy(instance, {
138
+ get(target, property, receiver) {
139
+ const value = withIdentity33SchemaScope(() => Reflect.get(target, property, receiver));
140
+ const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
141
+ if (descriptor && !descriptor.configurable && "value" in descriptor && !descriptor.writable) return value;
142
+ return typeof value === "function" ? (...args) => withIdentity33SchemaScope(() => value.apply(target, args)) : value;
143
+ }
144
+ });
145
+ }
126
146
  function resolveSchemaRoot(version) {
127
147
  const key = resolveBundleKey(version);
128
148
  const scopedRoot = scopedExternalSchemaRoots.getStore()?.get(key);
129
149
  if (scopedRoot && (0, import_fs.existsSync)(scopedRoot)) return scopedRoot;
130
150
  const externalRoot = externalSchemaRoots.get(key);
131
151
  if (externalRoot && (0, import_fs.existsSync)(externalRoot)) return externalRoot;
152
+ if (isIdentity33SchemaScope() && key === "3.3") return resolveSchemaRoot(import_version.ADCP_VERSION);
132
153
  const distCandidate = import_path.default.join(__dirname, "..", "schemas-data", key);
133
154
  if ((0, import_fs.existsSync)(distCandidate)) return distCandidate;
134
155
  const releasePrecisionMatch = /^\d+\.\d+-/.test(key);
@@ -334,6 +355,7 @@ function withExternalSchemaRoot(version, root, fn) {
334
355
  }
335
356
  function isExternalSchemaRootActive(version) {
336
357
  const key = resolveBundleKey(version);
358
+ if (isIdentity33SchemaScope() && key === "3.3") return true;
337
359
  const scopedRoot = scopedExternalSchemaRoots.getStore()?.get(key);
338
360
  if (scopedRoot && (0, import_fs.existsSync)(scopedRoot)) return true;
339
361
  const registeredRoot = externalSchemaRoots.get(key);
@@ -601,7 +623,7 @@ function getSchemaValidatorByRef(schemaRef, version = import_version.ADCP_VERSIO
601
623
  });
602
624
  (0, import_ajv_formats.default)(ajv);
603
625
  for (const keyword of keywords ?? []) ajv.addKeyword(keyword);
604
- const rawSchema = loadJson(file);
626
+ const rawSchema = identity33ReferenceSchema(loadJson(file), version);
605
627
  const dependencySchemas = [];
606
628
  const registeredIds = /* @__PURE__ */ new Map();
607
629
  for (const schemaFile of walkJsonFiles(root)) {
@@ -610,7 +632,7 @@ function getSchemaValidatorByRef(schemaRef, version = import_version.ADCP_VERSIO
610
632
  continue;
611
633
  }
612
634
  if (schemaFile === file) continue;
613
- const schema = loadJson(schemaFile);
635
+ const schema = identity33ReferenceSchema(loadJson(schemaFile), version);
614
636
  if ((keywords || allErrors) && typeof schema.$id === "string") {
615
637
  const previous = schema.$id === rawSchema.$id ? rawSchema : registeredIds.get(schema.$id);
616
638
  if (previous && !(0, import_node_util.isDeepStrictEqual)(previous, schema)) {
@@ -710,6 +732,20 @@ function getRegisteredSchemaIds(version = import_version.ADCP_VERSION) {
710
732
  const bundledRegistry = s.bundledAjv.schemas;
711
733
  return [.../* @__PURE__ */ new Set([...Object.keys(registry ?? {}), ...Object.keys(bundledRegistry ?? {})])];
712
734
  }
735
+ function identity33ReferenceSchema(schema, version) {
736
+ if (!isIdentity33SchemaScope() || resolveBundleKey(version) !== "3.3") return schema;
737
+ const clone = structuredClone(schema);
738
+ const pending = [clone];
739
+ while (pending.length) {
740
+ const node = pending.pop();
741
+ if (!node || typeof node !== "object") continue;
742
+ const object = node;
743
+ if (Array.isArray(object.enum) && object.enum.includes("destination_state_changed"))
744
+ object.enum = [...object.enum, "relationship_changed", "relationship_expiring"];
745
+ for (const value of Object.values(object)) if (typeof value === "object") pending.push(value);
746
+ }
747
+ return clone;
748
+ }
713
749
  function hasSchemaBundle(version) {
714
750
  try {
715
751
  resolveSchemaRoot(version);
@@ -965,6 +1001,7 @@ function cloneJsonValue(value) {
965
1001
  0 && (module.exports = {
966
1002
  SCHEMA_FILENAME_SUFFIX,
967
1003
  _resetValidationLoader,
1004
+ bindIdentity33SchemaScope,
968
1005
  getCanonicalToolValidatorForVersion,
969
1006
  getMcpProfileInputSchema,
970
1007
  getMcpToolSchema,
@@ -978,6 +1015,7 @@ function cloneJsonValue(value) {
978
1015
  getValidator,
979
1016
  hasSchemaBundle,
980
1017
  isExternalSchemaRootActive,
1018
+ isIdentity33SchemaScope,
981
1019
  listValidatorKeys,
982
1020
  registerExternalSchemaRoot,
983
1021
  resolveBundleKey,
@@ -985,5 +1023,6 @@ function cloneJsonValue(value) {
985
1023
  toReleasePrecisionWire,
986
1024
  unregisterExternalSchemaRoot,
987
1025
  validateAdcpVersionWire,
988
- withExternalSchemaRoot
1026
+ withExternalSchemaRoot,
1027
+ withIdentity33SchemaScope
989
1028
  });
@@ -73,12 +73,30 @@ function toReleasePrecisionWire(bundleKeyOrVersion) {
73
73
  "adcpVersion"
74
74
  );
75
75
  }
76
+ const identity33Scope = new AsyncLocalStorage();
77
+ function isIdentity33SchemaScope() {
78
+ return identity33Scope.getStore() === true;
79
+ }
80
+ function withIdentity33SchemaScope(fn, enabled = true) {
81
+ return identity33Scope.run(enabled, fn);
82
+ }
83
+ function bindIdentity33SchemaScope(instance) {
84
+ return new Proxy(instance, {
85
+ get(target, property, receiver) {
86
+ const value = withIdentity33SchemaScope(() => Reflect.get(target, property, receiver));
87
+ const descriptor = Reflect.getOwnPropertyDescriptor(target, property);
88
+ if (descriptor && !descriptor.configurable && "value" in descriptor && !descriptor.writable) return value;
89
+ return typeof value === "function" ? (...args) => withIdentity33SchemaScope(() => value.apply(target, args)) : value;
90
+ }
91
+ });
92
+ }
76
93
  function resolveSchemaRoot(version) {
77
94
  const key = resolveBundleKey(version);
78
95
  const scopedRoot = scopedExternalSchemaRoots.getStore()?.get(key);
79
96
  if (scopedRoot && existsSync(scopedRoot)) return scopedRoot;
80
97
  const externalRoot = externalSchemaRoots.get(key);
81
98
  if (externalRoot && existsSync(externalRoot)) return externalRoot;
99
+ if (isIdentity33SchemaScope() && key === "3.3") return resolveSchemaRoot(ADCP_VERSION);
82
100
  const distCandidate = path.join(__dirname, "..", "schemas-data", key);
83
101
  if (existsSync(distCandidate)) return distCandidate;
84
102
  const releasePrecisionMatch = /^\d+\.\d+-/.test(key);
@@ -284,6 +302,7 @@ function withExternalSchemaRoot(version, root, fn) {
284
302
  }
285
303
  function isExternalSchemaRootActive(version) {
286
304
  const key = resolveBundleKey(version);
305
+ if (isIdentity33SchemaScope() && key === "3.3") return true;
287
306
  const scopedRoot = scopedExternalSchemaRoots.getStore()?.get(key);
288
307
  if (scopedRoot && existsSync(scopedRoot)) return true;
289
308
  const registeredRoot = externalSchemaRoots.get(key);
@@ -551,7 +570,7 @@ function getSchemaValidatorByRef(schemaRef, version = ADCP_VERSION, keywords, op
551
570
  });
552
571
  addFormats(ajv);
553
572
  for (const keyword of keywords ?? []) ajv.addKeyword(keyword);
554
- const rawSchema = loadJson(file);
573
+ const rawSchema = identity33ReferenceSchema(loadJson(file), version);
555
574
  const dependencySchemas = [];
556
575
  const registeredIds = /* @__PURE__ */ new Map();
557
576
  for (const schemaFile of walkJsonFiles(root)) {
@@ -560,7 +579,7 @@ function getSchemaValidatorByRef(schemaRef, version = ADCP_VERSION, keywords, op
560
579
  continue;
561
580
  }
562
581
  if (schemaFile === file) continue;
563
- const schema = loadJson(schemaFile);
582
+ const schema = identity33ReferenceSchema(loadJson(schemaFile), version);
564
583
  if ((keywords || allErrors) && typeof schema.$id === "string") {
565
584
  const previous = schema.$id === rawSchema.$id ? rawSchema : registeredIds.get(schema.$id);
566
585
  if (previous && !isDeepStrictEqual(previous, schema)) {
@@ -660,6 +679,20 @@ function getRegisteredSchemaIds(version = ADCP_VERSION) {
660
679
  const bundledRegistry = s.bundledAjv.schemas;
661
680
  return [.../* @__PURE__ */ new Set([...Object.keys(registry ?? {}), ...Object.keys(bundledRegistry ?? {})])];
662
681
  }
682
+ function identity33ReferenceSchema(schema, version) {
683
+ if (!isIdentity33SchemaScope() || resolveBundleKey(version) !== "3.3") return schema;
684
+ const clone = structuredClone(schema);
685
+ const pending = [clone];
686
+ while (pending.length) {
687
+ const node = pending.pop();
688
+ if (!node || typeof node !== "object") continue;
689
+ const object = node;
690
+ if (Array.isArray(object.enum) && object.enum.includes("destination_state_changed"))
691
+ object.enum = [...object.enum, "relationship_changed", "relationship_expiring"];
692
+ for (const value of Object.values(object)) if (typeof value === "object") pending.push(value);
693
+ }
694
+ return clone;
695
+ }
663
696
  function hasSchemaBundle(version) {
664
697
  try {
665
698
  resolveSchemaRoot(version);
@@ -914,6 +947,7 @@ function cloneJsonValue(value) {
914
947
  export {
915
948
  SCHEMA_FILENAME_SUFFIX,
916
949
  _resetValidationLoader,
950
+ bindIdentity33SchemaScope,
917
951
  getCanonicalToolValidatorForVersion,
918
952
  getMcpProfileInputSchema,
919
953
  getMcpToolSchema,
@@ -927,6 +961,7 @@ export {
927
961
  getValidator,
928
962
  hasSchemaBundle,
929
963
  isExternalSchemaRootActive,
964
+ isIdentity33SchemaScope,
930
965
  listValidatorKeys,
931
966
  registerExternalSchemaRoot,
932
967
  resolveBundleKey,
@@ -934,5 +969,6 @@ export {
934
969
  toReleasePrecisionWire,
935
970
  unregisterExternalSchemaRoot,
936
971
  validateAdcpVersionWire,
937
- withExternalSchemaRoot
972
+ withExternalSchemaRoot,
973
+ withIdentity33SchemaScope
938
974
  };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AdCP SDK library version
3
3
  */
4
- export declare const LIBRARY_VERSION = "15.9.1";
4
+ export declare const LIBRARY_VERSION = "16.0.0-beta.2";
5
5
  /**
6
6
  * AdCP specification version this library is built for
7
7
  */
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
33
33
  * Full version information
34
34
  */
35
35
  export declare const VERSION_INFO: {
36
- readonly library: "15.9.1";
36
+ readonly library: "16.0.0-beta.2";
37
37
  readonly adcp: "3.2.4";
38
38
  readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4"];
39
- readonly generatedAt: "2026-10-14T11:09:46.080Z";
39
+ readonly generatedAt: "2026-10-15T15:37:12.181Z";
40
40
  };
41
41
  /**
42
42
  * Get the AdCP specification version this library is built for
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AdCP SDK library version
3
3
  */
4
- export declare const LIBRARY_VERSION = "15.9.1";
4
+ export declare const LIBRARY_VERSION = "16.0.0-beta.2";
5
5
  /**
6
6
  * AdCP specification version this library is built for
7
7
  */
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
33
33
  * Full version information
34
34
  */
35
35
  export declare const VERSION_INFO: {
36
- readonly library: "15.9.1";
36
+ readonly library: "16.0.0-beta.2";
37
37
  readonly adcp: "3.2.4";
38
38
  readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4"];
39
- readonly generatedAt: "2026-10-14T11:09:46.080Z";
39
+ readonly generatedAt: "2026-10-15T15:37:12.181Z";
40
40
  };
41
41
  /**
42
42
  * Get the AdCP specification version this library is built for
@@ -31,7 +31,7 @@ __export(version_exports, {
31
31
  toReleasePrecisionVersion: () => toReleasePrecisionVersion
32
32
  });
33
33
  module.exports = __toCommonJS(version_exports);
34
- const LIBRARY_VERSION = "15.9.1";
34
+ const LIBRARY_VERSION = "16.0.0-beta.2";
35
35
  const ADCP_VERSION = "3.2.4";
36
36
  const ADCP_MAJOR_VERSION = 3;
37
37
  const COMPATIBLE_ADCP_VERSIONS = [
@@ -98,10 +98,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
98
98
  "3.2.4"
99
99
  ];
100
100
  const VERSION_INFO = {
101
- library: "15.9.1",
101
+ library: "16.0.0-beta.2",
102
102
  adcp: "3.2.4",
103
103
  compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
104
- generatedAt: "2026-10-14T11:09:46.080Z"
104
+ generatedAt: "2026-10-15T15:37:12.181Z"
105
105
  };
106
106
  function getAdcpVersion() {
107
107
  return ADCP_VERSION;
@@ -1,4 +1,4 @@
1
- const LIBRARY_VERSION = "15.9.1";
1
+ const LIBRARY_VERSION = "16.0.0-beta.2";
2
2
  const ADCP_VERSION = "3.2.4";
3
3
  const ADCP_MAJOR_VERSION = 3;
4
4
  const COMPATIBLE_ADCP_VERSIONS = [
@@ -65,10 +65,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
65
65
  "3.2.4"
66
66
  ];
67
67
  const VERSION_INFO = {
68
- library: "15.9.1",
68
+ library: "16.0.0-beta.2",
69
69
  adcp: "3.2.4",
70
70
  compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
71
- generatedAt: "2026-10-14T11:09:46.080Z"
71
+ generatedAt: "2026-10-15T15:37:12.181Z"
72
72
  };
73
73
  function getAdcpVersion() {
74
74
  return ADCP_VERSION;
@@ -1,7 +1,7 @@
1
1
  # AdCP Type Summary
2
2
 
3
- > Generated at: 2026-10-14
4
- > @adcp/sdk v15.9.1
3
+ > Generated at: 2026-10-15
4
+ > @adcp/sdk v16.0.0-beta.2
5
5
 
6
6
  Curated reference of the types that matter for using the AdCP client. For full generated types see `src/lib/types/tools.generated.ts` and `src/lib/types/core.generated.ts`.
7
7
 
@@ -9,6 +9,10 @@ Two independent mechanisms remove that cost:
9
9
 
10
10
  ## Shared discovery cache
11
11
 
12
+ `comply()` automatically owns discovery and connections for one run. Storyboards reuse clients, tool schemas and capability observations for the same URL, credentials, headers, AdCP version and transport settings, including a configured `trustedFetchFn`. Routed agents and changed credentials or versions get separate discovery. Explicit invalidation refreshes discovery, and failed discovery remains retryable by later storyboards. Every new `comply()` invocation starts with fresh discovery; ordinary SDK calls with a scoped fetch still follow the isolation rules below.
13
+
14
+ Failed discovery is attempted once per storyboard, so the runner's applicability and execution checks do not repeat a failing probe. Auth-diagnostic storyboards retain an empty profile after an authentication rejection, including when they load test-kit credentials; this placeholder contains no tool or capability evidence. MCP sessions remain open across storyboards until the run completes.
15
+
12
16
  ```ts
13
17
  import { AgentClient, createInMemoryAgentDiscoveryCache } from '@adcp/sdk';
14
18
 
@@ -139,7 +139,7 @@ const sink = createBigQueryReportingWarehouseSinkV1({
139
139
 
140
140
  Give the sink its **own new tables** rather than your legacy ones. It adds its
141
141
  own fixed columns (`reporting_revision_id`, `reporting_obligation_id`,
142
- `account_id`, `revision_number`, `finality`, `period_date`, `ordinal`), and
142
+ `account_id`, `revision_number`, `finality`, `period_date` (the period start's date in its source timezone), `ordinal`), and
143
143
  loading into a table another writer owns invites double counting. Give analysts
144
144
  one view that `UNION ALL`s the legacy table, bounded to periods before the
145
145
  cutover boundary, with the sink's `current_rows` view, bounded to periods from
@@ -2,6 +2,8 @@
2
2
 
3
3
  `@adcp/sdk/reporting/ledger` turns a conforming reporting source into durable seller-side Reliable Reporting Core. It is separate from the buyer-side `reconcileReporting` API.
4
4
 
5
+ > **Stability:** the storage, row, change-feed, managed-delivery and warehouse-sink exports (`@adcp/sdk/reporting/gcs`, `s3`, `azure`, `bigquery`, and the `@experimental` exports of `ledger`) are experimental and may change in minor releases. Pin with `~`. See the [Reliable Reporting stability policy](REPORTING-STABILITY.md).
6
+
5
7
  ## Recommended: install the lifecycle service
6
8
 
7
9
  `createReliableReportingService` is the adapter-first Core path. A
@@ -338,6 +340,19 @@ do {
338
340
  Removing rows from ledger documents frees space only after `VACUUM FULL` or an
339
341
  online repack of `adcp_reporting_revisions` and `adcp_reporting_adjustments`.
340
342
 
343
+ ### Stored field names
344
+
345
+ Stored values use AdCP's names and bounds: a chunk's `object_ref` and
346
+ `native_version_ref` (1 to 1024 characters each, enforced by `CHECK`
347
+ constraints), `size_bytes` (the stored object's size after compression, as in
348
+ the AdCP file manifest), and `canonical_size_bytes` (the uncompressed canonical
349
+ bytes that the chunk digests cover; a row set's `content_size_bytes` is the
350
+ byte count of the content its `content_sha256` covers). A row set records `format` (`jsonl`) and
351
+ `algorithm` (`adcp_jcs_rows_v1`). Neither token feeds a digest. Installed
352
+ databases upgrade in place when you re-apply `REPORTING_ROW_STORAGE_MIGRATION`;
353
+ see [Breaking: reporting row storage field alignment](../migration-reporting-row-storage-alignment.md)
354
+ for the old names, the API renames and the re-sync option.
355
+
341
356
  ### Object storage bindings
342
357
 
343
358
  Rows can live in object storage instead of PostgreSQL. A binding is defined in
@@ -368,7 +383,7 @@ const store = new PostgresReportingLedgerStore(pool, {
368
383
  providers: {
369
384
  filesystem: createFilesystemReportingRowObjectProviderV1({ roots: { reports: '/var/lib/adcp/rows' } }),
370
385
  },
371
- selectRowBinding: ({ canonical_byte_count }) => (canonical_byte_count < 256 * 1024 ? 'inline' : 'reports'),
386
+ selectRowBinding: ({ content_size_bytes }) => (content_size_bytes < 256 * 1024 ? 'inline' : 'reports'),
372
387
  },
373
388
  });
374
389
  await store.readyRowStorage();
@@ -380,19 +395,41 @@ await store.readyRowStorage();
380
395
  - Keys always start with `{prefix}/{namespace_key}/` and use a hashed account
381
396
  segment, never a raw account ID. Override `keyTemplate` with the placeholders
382
397
  in `REPORTING_ROW_KEY_PLACEHOLDERS`; templates must include
383
- `{content_sha256}` and `{chunk_index}`.
384
- Enabling snapshot compaction additionally requires `{revision_key}` (see
385
- [Compacting superseded snapshots](#compacting-superseded-snapshots-opt-in)).
386
- - A custom `keyTemplate` without `{account_key}` and `{revision_key}` can map
387
- row sets from different obligations or accounts with identical chunk content
388
- (an adjustment's digest covers its rows alone) to one object, which the
389
- second writer adopts. Every delete path (period retirement, compaction and
390
- the intent sweep) therefore skips an object while a live row set outside the
398
+ `{content_sha256}`, `{chunk_index}` and `{revision_key}`. `{revision_key}` is
399
+ required on every writable binding, so each row set writes its own object
400
+ keys (it hashes the row-set ID, so two uploads never name the same key). The store refuses a
401
+ template without it when it is configured and again in `readyRowStorage`,
402
+ with `INVALID_INPUT`.
403
+ `{period_date}` renders AdCP's `YYYY-MM-DD`: the calendar date of the period
404
+ start in the period's `source_timezone`, never UTC (a period starting
405
+ `2026-10-02T07:00:00Z` in `America/Los_Angeles` is `2026-10-02`; one starting
406
+ `2026-10-01T15:00:00Z` in `Asia/Tokyo` is also `2026-10-02`). It is one path
407
+ segment, so the default layout is
408
+ `{prefix}/{namespace_key}/{account_key}/2026-10-02/{finality}/...`, not
409
+ `2026/10/02/`. A missing, unknown or non-IANA timezone fails the write with
410
+ `INVALID_INPUT` rather than guessing a date. The rendered key must stay within
411
+ AdCP's 1024-character `object_ref` bound.
412
+ - Rows written under an older template without `{revision_key}` stay readable:
413
+ every read uses the chunk's recorded `object_ref`, never a re-rendered key.
414
+ Changing a template needs a new binding ID, and the old definition must stay
415
+ configured while revisions reference it. Mark that old definition
416
+ `readOnly: true` to keep it configured without `{revision_key}`: it is
417
+ exempt from the requirement, never selected for new writes, and still used
418
+ for reads and retirement. A read-only binding is still registered and
419
+ probed by `readyRowStorage`, so keep its location reachable (and keep
420
+ enforcing `readOnly` in every process that shares the database: it is not
421
+ stored).
422
+ - Header-only revisions share their predecessor's chunks within an obligation,
423
+ and chunk rows written under an older template can name one object from
424
+ several row sets. Every delete path (period retirement, compaction and the
425
+ intent sweep) therefore skips an object while a live row set outside the
391
426
  operation still references the same binding, key and native version, or an
392
- open write intent created it. The reference check and the delete run in one
427
+ open write intent created it. (With unique keys, a create-only write only
428
+ finds an existing object when a writer retries the same row set.) The check
429
+ and delete run under the per-object lock described below. The reference check and the delete run in one
393
430
  transaction under a per-object advisory lock, and a commit that adopts an
394
- existing object takes the same lock, re-reads the object and holds the lock
395
- until its chunk rows commit. A delete that wins the lock makes the adopting
431
+ existing object takes the same lock, proves the object is still there and
432
+ holds the lock until its chunk rows commit. A delete that wins the lock makes the adopting
396
433
  commit fail with `STATE_UNAVAILABLE` (the writer re-uploads once its intent
397
434
  lapses); a commit that wins is seen by the delete, which skips. A skipped
398
435
  object is deleted by the retirement, compaction or sweep of the last row set
@@ -415,7 +452,16 @@ await store.readyRowStorage();
415
452
  filesystem is wrong, not the code.
416
453
  - Custom providers implement `ReportingRowObjectProviderV1`. Run
417
454
  `runReportingRowObjectProviderConformanceV1(provider, { location, prefix })`
418
- against a dedicated test prefix before using one.
455
+ against a dedicated test prefix before using one. Provider calls take and
456
+ return AdCP's names: `objectRef` (the decoded, destination-relative object
457
+ key) and `nativeVersionRef` (the decoded provider-native version), each 1 to
458
+ 1024 characters. Implement the optional `stat({ objectRef, nativeVersionRef })`,
459
+ which returns `{ sizeBytes }` for that exact version or `null` when it is
460
+ absent, without reading the body. The commit transaction uses it to prove an
461
+ adopted object is unchanged (native versions are write-unique, so the same
462
+ version at the recorded size is the same bytes) instead of downloading it
463
+ while holding the account and object locks. A provider without `stat` falls
464
+ back to reading the whole object there. All bundled providers implement it.
419
465
 
420
466
  #### Cloud providers
421
467
 
@@ -690,15 +736,16 @@ revision referencing them is compacted.
690
736
  Compaction records no change-feed row: the revision's metadata did not change,
691
737
  and a sink still catching up holds the revision back (above).
692
738
 
693
- Compaction requires every object row binding's `keyTemplate` to include
694
- `{revision_key}` (the default template does). Deletes now skip objects another
695
- row set still references (see [Object storage](#object-storage-bindings)),
696
- so this is defense in depth rather than the only guard: with `{revision_key}`
697
- no two revisions ever name the same object, so compaction never depends on the
698
- reference check. The SDK fails closed: `createReliableReportingService` and
699
- `createPostgresReliableReportingProductionService` throw at construction when
700
- compaction is enabled and a binding's template omits `{revision_key}`, and
701
- `compactSupersededSnapshots` throws the same error before deleting anything.
739
+ Every writable object row binding's `keyTemplate` must include
740
+ `{revision_key}` (the default template does), so two uploads never name the
741
+ same object. Deletes skip objects another row set still references (see
742
+ [Object storage](#object-storage-bindings)), which still matters for header-only
743
+ revisions that share chunks within an obligation and for rows written under an
744
+ older template, so compaction does not depend on key uniqueness alone. A
745
+ `readOnly` binding for older rows is exempt: it never takes commits, so nothing
746
+ can adopt through it. The SDK fails closed when the store is configured, and
747
+ `createReliableReportingService`, `createPostgresReliableReportingProductionService`
748
+ and `compactSupersededSnapshots` re-check before compacting.
702
749
 
703
750
  ### Core-only setup with row storage, change feed and retention
704
751
 
@@ -908,8 +955,21 @@ setInterval(() => {
908
955
  store's verified reader. It loads rows first and revision metadata second,
909
956
  in one load job per table per tick. The sink always adds
910
957
  `reporting_revision_id`, `reporting_obligation_id`, `account_id`,
911
- `revision_number`, `finality`, `period_date` (the period's date in its source
912
- timezone) and `ordinal` to your mapped columns.
958
+ `revision_number`, `finality`, `period_date` and `ordinal` to your mapped
959
+ columns. `period_date` is a `DATE`: the calendar date of the period start in
960
+ the period's `source_timezone`, as `YYYY-MM-DD` (an SDK column derived from
961
+ AdCP's `period`), not the UTC date unless that is the source timezone. A
962
+ period starting `2026-10-02T07:00:00Z` in `America/Los_Angeles` is
963
+ `2026-10-02`; one starting `2026-10-01T15:00:00Z` in `Asia/Tokyo` is also
964
+ `2026-10-02`. It is the start's date only, not a coverage range: a period
965
+ that crosses local midnight or spans several days is one `period_date`, so
966
+ `PARTITION BY period_date` holds source-local days and a UTC "yesterday"
967
+ filter can straddle partitions. The sink computes it with the same helper
968
+ that renders `{period_date}` in object keys. It fails the batch rather than
969
+ load a guessed date when a revision's period or timezone is missing or
970
+ invalid. The batch stays retained, so the sink stops until that revision's
971
+ period is repaired (or the runtime's timezone data is upgraded); reset with
972
+ `discardRetainedPlan` restarts from the beginning, so empty the tables first.
913
973
  - Batches are planned durably before loading, and job IDs derive from the
914
974
  change-feed range. Before every submission the sink looks that job ID up in
915
975
  the destination project and location: a job that finished cleanly counts as
@@ -957,9 +1017,9 @@ setInterval(() => {
957
1017
  BigQuery's server-side `jobTimeoutMs` is not used: for a local-file load the
958
1018
  official client builds `configuration.load` from the load options and cannot
959
1019
  set job-level fields, and BigQuery silently drops `labels` and `jobTimeoutMs`
960
- found inside `configuration.load`. (Staging the file in GCS and submitting the load with
961
- `bigquery.createJob` can set both; the sink does not stage files.) For the
962
- same reason the `labels` option has no effect (it warns once per process and
1020
+ found inside `configuration.load`. (Staging the file in GCS and submitting
1021
+ the load with `bigquery.createJob` can set both; the sink does not stage
1022
+ files.) For the same reason the `labels` option has no effect (it warns once per process and
963
1023
  is deprecated). To attribute load cost, query
964
1024
  `` `region-<location>`.INFORMATION_SCHEMA.JOBS_BY_PROJECT `` (needs
965
1025
  `bigquery.jobs.listAll`; about 180 days of history), filtering on
@@ -1007,6 +1067,16 @@ setInterval(() => {
1007
1067
  rejects after clearing the sink (it could not unregister the consumer), call
1008
1068
  it again before restarting workers. Re-run `REPORTING_WAREHOUSE_SINK_MIGRATION`
1009
1069
  after upgrading: it adds the `reset_generation` column.
1070
+ - Upgrading from 15.9.0: stop every 15.9.0 sink worker before starting newer
1071
+ ones, then re-apply `REPORTING_WAREHOUSE_SINK_MIGRATION`. A 15.9.0 worker
1072
+ cancels a load at its deadline, so one running beside a newer worker on the
1073
+ same sink can cancel a job the newer worker is waiting on. The job then ends
1074
+ `DONE` with an error and the attempt advances. Rows do not duplicate, but
1075
+ convergence slows. Also set `location` to the dataset's location: without it
1076
+ a replay lookup of a load job returns 404 for datasets outside the US and EU
1077
+ multi-regions, and the sink uploads again, gets a 409, and fails with a
1078
+ "check projectId and location" error. The sink warns once per process when
1079
+ `location` is unset.
1010
1080
  - Stop old sink workers before relying on these overlap guarantees. If an
1011
1081
  earlier overlapping run left a plan whose starting cursor differs from the
1012
1082
  committed cursor, the sink rejects it before loading. Reconcile the retained
@@ -1170,7 +1240,7 @@ Managed-only changes are lifecycle candidates in their own right. A settlement,
1170
1240
 
1171
1241
  `MAX_MATERIALIZATIONS_PER_ACCOUNT` and `MAX_RECEIPTS_PER_CONSUMER` are lifetime counts by default. Because managed evidence is immutable, a long-lived account eventually reaches them and then stops planning materializations and refuses every receipt with no way back. Construct the store with `new PostgresReportingManagedDeliveryStore(pool, { evidenceRetentionDays })` to make the caps active-scope: only evidence recorded inside that window counts against them, and `pruneExpiredEvidence({ account_id, limit })` deletes what has fallen outside it — never anything still inside the window, never a `pending` or leased materialization, and never a receipt batch inside its own replay retention. Retention has a floor: at least the 30-day receipt replay retention, and at least the strongest durable status or resource-retention horizon registered for the database. Adoption and binding installation exclusively lock the migration-created policy sentinel before account/binding locks; settlement, revocation claim, and pruning hold shared locks on it through their writes. A stronger promise therefore cannot land between a weaker check and its write, while unrelated hot-path readers remain concurrent. Pruning genuinely does its selection before taking the account lock, and asks which receipts a live replay row still names by expanding those rows once rather than posing a containment question per candidate — a shape no index could serve, which held the lock long enough to fail concurrent Core writes with 55P03. Because that selection is unlocked it is a proposal rather than a verdict: every victim is revalidated under the account lock against current live replay rows, surviving receipts and unexpired resources before it is deleted, so a replay that commits in the gap keeps the receipt it promised to reproduce. The revalidation is narrowed to the candidates' own consumers and keys, so the lock still holds no per-candidate scan. The registry lock is held to commit inside the transaction that acts on it, and a precondition such as the installed-window check runs inside that same transaction so a refusal rolls the write back rather than leaving a durable promise nobody validated, so an install cannot read an empty registry while a narrower promise is being registered, and a prune cannot approve a horizon another replica is about to widen. Pruning deletes and tombstones in one statement against one frozen cutoff, so a moving boundary can never leave a deleted row without its permanent identity. Successive prunes demote the tombstones they supersede, so a subject has exactly one tombstone still claiming to be its leaf and a chain pruned twice resolves the same way every time. Re-presenting a pruned receipt byte-identically answers `unchanged` with the instant the tombstone kept, resolves that receipt's own tombstone before any rule about its subject — so an exact re-presentation is not refused as new content for a settled subject — replays the same answer under the same idempotency key by rehydrating from the tombstone when the body is gone, counts as already-resolved for the batch's duplicate-subject rule, and never recreates the row: recreating it restarted the retention clock, undid the storage the prune reclaimed, and moved the published `received_at` to a moment the consumer never filed anything at. A pruned receipt ID can never bind different content, a subject whose accepted leaf expired can never reopen — the read projection consults tombstones, not just live rows — and materialization attempt history survives as a compact terminal record, so a revision that exhausted its attempts or already succeeded does not restart at attempt 1 once its rows age out. Both conclusions — the acceptance and the fact a delivery succeeded — are folded into the live, filtered and lifecycle projections alike. Counters describe exactly the records the response emits, never more and never less, so a buyer recomputing the association cannot see `ASSOCIATED_HISTORY_INCOMPLETE`; retention therefore refuses to prune an acceptance while the resource it accepts is still readable, which is what keeps a `complete` period from having nothing to show for itself. An acceptance carries the consumer that gave it, so one consumer's pruned acceptance never settles the obligation on another's behalf — including the anonymous fail-safe consumer, which owns no acceptances at all. Pruning also removes the expired replay row before the receipts it names, keeps any receipt a surviving replay row still references — a later batch can name an earlier receipt — and keeps any materialization whose resource is still readable or that a retained receipt names as its evidence. An adjustment receipt names no materialization — it names the revision it corrects — so the readable-resource hold matches on that revision as well, or a period whose revision resource was still readable lost the adjustment acceptance behind its own `complete`. Run it from the same scheduler that runs the worker. Lifecycle receipt reads are driven from the obligation's own subjects into a `(subject_id, receipt_kind, recorded_at)` index rather than asking the global receipt table which of its rows belong to an obligation — a question that supplies neither account nor consumer, so every due obligation re-scanned the whole receipt history. The managed state digest, the obligated-consumer roster read and the permanent delivery tombstones do the same — consumer statuses carry an `obligation_id` index and materialization tombstones an `(obligation_id, reached_success, reached_success_at)` one — because that digest is read inside the apply transaction while it holds the account lock: a scan there is a scan with the lock held, which pushed concurrent Core writes past their lock timeout and failed them with 55P03.
1172
1242
 
1173
- The managed tables are additive and do not alter the Core tables. This is the schema boundary coordinated with #2943: that work owns transactional reporting notification/activity intent and the existing webhook delivery/credential plane. Managed Delivery does not create a second webhook sender, outbox, credential store, or subscriber model. Apply both feature migrations after the Core migration in either order; each owns separate tables and both reuse the Core authority.
1243
+ The managed tables are additive and do not alter the Core tables. This is the schema boundary coordinated with the reporting notification work: that work owns transactional reporting notification/activity intent and the existing webhook delivery/credential plane. Managed Delivery does not create a second webhook sender, outbox, credential store, or subscriber model. Apply both feature migrations after the Core migration in either order; each owns separate tables and both reuse the Core authority.
1174
1244
 
1175
1245
  ## Transactional reporting notifications and account activity
1176
1246
 
@@ -1689,7 +1759,7 @@ reconciliation and fails closed if both are supplied, preventing double fire;
1689
1759
  the port's pending rows, rather than `listPendingTransitions()`, own retry.
1690
1760
 
1691
1761
  The activity table is deliberately separate from Core revision and obligation
1692
- rows. Managed Delivery/Reconciled Billing work in #2944 can add immutable
1762
+ rows. Managed Delivery/Reconciled Billing work can add immutable
1693
1763
  materialization and receipt tables without changing this transition identity,
1694
1764
  queue schema, or migration ordering.
1695
1765