@adcp/sdk 16.0.0-beta.2 → 16.0.0-beta.4

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 (248) hide show
  1. package/README.md +54 -0
  2. package/dist/lib/auth/oauth/diagnose.js +3 -11
  3. package/dist/lib/auth/oauth/diagnose.mjs +4 -12
  4. package/dist/lib/auth/oauth/diagnostics.d.mts +2 -1
  5. package/dist/lib/auth/oauth/diagnostics.d.ts +2 -1
  6. package/dist/lib/auth/oauth/diagnostics.js +8 -10
  7. package/dist/lib/auth/oauth/diagnostics.mjs +7 -10
  8. package/dist/lib/core/ConversationTypes.d.mts +8 -3
  9. package/dist/lib/core/ConversationTypes.d.ts +8 -3
  10. package/dist/lib/core/SingleAgentClient.d.mts +5 -3
  11. package/dist/lib/core/SingleAgentClient.d.ts +5 -3
  12. package/dist/lib/core/TaskExecutor.js +5 -1
  13. package/dist/lib/core/TaskExecutor.mjs +5 -1
  14. package/dist/lib/errors/index.d.mts +9 -4
  15. package/dist/lib/errors/index.d.ts +9 -4
  16. package/dist/lib/index.d.mts +3 -3
  17. package/dist/lib/index.d.ts +3 -3
  18. package/dist/lib/index.js +8 -0
  19. package/dist/lib/index.mjs +14 -2
  20. package/dist/lib/negotiation/types.d.mts +20 -39
  21. package/dist/lib/negotiation/types.d.ts +20 -39
  22. package/dist/lib/protocols/index.d.mts +60 -24
  23. package/dist/lib/protocols/index.d.ts +60 -24
  24. package/dist/lib/protocols/index.js +9 -4
  25. package/dist/lib/protocols/index.mjs +3 -0
  26. package/dist/lib/protocols/mcp-modern.js +1 -0
  27. package/dist/lib/protocols/mcp-modern.mjs +2 -1
  28. package/dist/lib/protocols/mcp.js +1 -0
  29. package/dist/lib/protocols/mcp.mjs +2 -1
  30. package/dist/lib/protocols/responseSizeLimit.d.mts +91 -5
  31. package/dist/lib/protocols/responseSizeLimit.d.ts +91 -5
  32. package/dist/lib/protocols/responseSizeLimit.js +195 -31
  33. package/dist/lib/protocols/responseSizeLimit.mjs +192 -31
  34. package/dist/lib/reporting/consumer-runtime.js +2 -1
  35. package/dist/lib/reporting/consumer-runtime.mjs +2 -1
  36. package/dist/lib/reporting/ledger/handler.js +50 -11
  37. package/dist/lib/reporting/ledger/handler.mjs +50 -12
  38. package/dist/lib/reporting/ledger/index.d.mts +17 -14
  39. package/dist/lib/reporting/ledger/index.d.ts +17 -14
  40. package/dist/lib/reporting/ledger/index.js +32 -20
  41. package/dist/lib/reporting/ledger/index.mjs +21 -10
  42. package/dist/lib/reporting/ledger/offering-validation.d.mts +9 -0
  43. package/dist/lib/reporting/ledger/offering-validation.d.ts +9 -0
  44. package/dist/lib/reporting/{gcs/bucket-policy.js → ledger/offering-validation.js} +9 -8
  45. package/dist/lib/reporting/ledger/offering-validation.mjs +8 -0
  46. package/dist/lib/reporting/ledger/receipts.d.mts +48 -0
  47. package/dist/lib/reporting/ledger/receipts.d.ts +48 -0
  48. package/dist/lib/reporting/ledger/receipts.js +186 -0
  49. package/dist/lib/reporting/ledger/receipts.mjs +161 -0
  50. package/dist/lib/reporting/ledger/status-ingest.js +3 -3
  51. package/dist/lib/reporting/ledger/status-ingest.mjs +4 -5
  52. package/dist/lib/reporting/ledger/types.d.mts +43 -0
  53. package/dist/lib/reporting/ledger/types.d.ts +43 -0
  54. package/dist/lib/reporting/ledger/types.js +31 -2
  55. package/dist/lib/reporting/ledger/types.mjs +26 -1
  56. package/dist/lib/reporting/pagination.d.mts +6 -0
  57. package/dist/lib/reporting/pagination.d.ts +6 -0
  58. package/dist/lib/reporting/{gcs/errors.js → pagination.js} +12 -17
  59. package/dist/lib/reporting/pagination.mjs +12 -0
  60. package/dist/lib/reporting/reconciliation.d.mts +1 -0
  61. package/dist/lib/reporting/reconciliation.d.ts +1 -0
  62. package/dist/lib/reporting/reconciliation.js +3 -2
  63. package/dist/lib/reporting/reconciliation.mjs +3 -2
  64. package/dist/lib/reporting/service/index.d.mts +79 -153
  65. package/dist/lib/reporting/service/index.d.ts +79 -153
  66. package/dist/lib/reporting/service/index.js +34 -491
  67. package/dist/lib/reporting/service/index.mjs +36 -510
  68. package/dist/lib/reporting/service/scheduler-support.d.mts +43 -0
  69. package/dist/lib/reporting/service/scheduler-support.d.ts +43 -0
  70. package/dist/lib/reporting/service/scheduler-support.js +125 -0
  71. package/dist/lib/reporting/service/scheduler-support.mjs +96 -0
  72. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  73. package/dist/lib/signing/canonicalize.d.mts +4 -0
  74. package/dist/lib/signing/canonicalize.d.ts +4 -0
  75. package/dist/lib/signing/canonicalize.js +14 -8
  76. package/dist/lib/signing/canonicalize.mjs +14 -8
  77. package/dist/lib/signing/content-digest.d.mts +8 -0
  78. package/dist/lib/signing/content-digest.d.ts +8 -0
  79. package/dist/lib/signing/content-digest.js +11 -5
  80. package/dist/lib/signing/content-digest.mjs +10 -5
  81. package/dist/lib/signing/crypto.d.mts +15 -0
  82. package/dist/lib/signing/crypto.d.ts +15 -0
  83. package/dist/lib/signing/crypto.js +75 -3
  84. package/dist/lib/signing/crypto.mjs +78 -3
  85. package/dist/lib/signing/server.d.mts +1 -1
  86. package/dist/lib/signing/server.d.ts +1 -1
  87. package/dist/lib/signing/server.js +2 -0
  88. package/dist/lib/signing/server.mjs +2 -1
  89. package/dist/lib/signing/signer.js +11 -14
  90. package/dist/lib/signing/signer.mjs +13 -16
  91. package/dist/lib/signing/testing.js +2 -6
  92. package/dist/lib/signing/testing.mjs +3 -7
  93. package/dist/lib/signing/verifier.js +2 -2
  94. package/dist/lib/signing/verifier.mjs +3 -3
  95. package/dist/lib/signing/web-bot-auth.js +122 -43
  96. package/dist/lib/signing/web-bot-auth.mjs +128 -44
  97. package/dist/lib/signing/webhook-verifier.js +2 -2
  98. package/dist/lib/signing/webhook-verifier.mjs +3 -3
  99. package/dist/lib/substitution/compile.js +2 -1
  100. package/dist/lib/substitution/compile.mjs +2 -1
  101. package/dist/lib/substitution/consent-macros.d.mts +4 -0
  102. package/dist/lib/substitution/consent-macros.d.ts +4 -0
  103. package/dist/lib/substitution/consent-macros.js +45 -0
  104. package/dist/lib/substitution/consent-macros.mjs +20 -0
  105. package/dist/lib/substitution/index.d.mts +1 -1
  106. package/dist/lib/substitution/index.d.ts +1 -1
  107. package/dist/lib/substitution/index.js +2 -0
  108. package/dist/lib/substitution/index.mjs +2 -1
  109. package/dist/lib/substitution/translate.d.mts +15 -2
  110. package/dist/lib/substitution/translate.d.ts +15 -2
  111. package/dist/lib/substitution/translate.js +148 -26
  112. package/dist/lib/substitution/translate.mjs +147 -26
  113. package/dist/lib/testing/client.js +2 -1
  114. package/dist/lib/testing/client.mjs +2 -1
  115. package/dist/lib/testing/scenarios/capabilities.js +1 -1
  116. package/dist/lib/testing/scenarios/capabilities.mjs +1 -1
  117. package/dist/lib/testing/storyboard/junit.js +16 -3
  118. package/dist/lib/testing/storyboard/junit.mjs +16 -3
  119. package/dist/lib/testing/storyboard/request-signing/builder.js +12 -14
  120. package/dist/lib/testing/storyboard/request-signing/builder.mjs +13 -15
  121. package/dist/lib/testing/storyboard/runner.js +94 -25
  122. package/dist/lib/testing/storyboard/runner.mjs +94 -25
  123. package/dist/lib/testing/storyboard/signer-grader/grader.js +2 -7
  124. package/dist/lib/testing/storyboard/signer-grader/grader.mjs +2 -7
  125. package/dist/lib/testing/storyboard/types.d.mts +6 -0
  126. package/dist/lib/testing/storyboard/types.d.ts +6 -0
  127. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  128. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  129. package/dist/lib/types/enums.generated.d.mts +3 -0
  130. package/dist/lib/types/enums.generated.d.ts +3 -0
  131. package/dist/lib/types/enums.generated.js +9 -0
  132. package/dist/lib/types/enums.generated.mjs +6 -0
  133. package/dist/lib/validation/schema-loader.js +25 -0
  134. package/dist/lib/validation/schema-loader.mjs +24 -0
  135. package/dist/lib/version.d.mts +3 -3
  136. package/dist/lib/version.d.ts +3 -3
  137. package/dist/lib/version.js +3 -3
  138. package/dist/lib/version.mjs +3 -3
  139. package/docs/TYPE-SUMMARY.md +28 -5
  140. package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +3 -2
  141. package/docs/guides/REPORTING-GCS-FENCE.md +3 -3
  142. package/docs/guides/REPORTING-GCS-MANAGED.md +4 -4
  143. package/docs/guides/REPORTING-LEDGER-CUTOVER.md +7 -7
  144. package/docs/guides/REPORTING-LEDGER.md +107 -51
  145. package/docs/guides/REPORTING-OPERATIONS.md +66 -5
  146. package/docs/guides/REPORTING-STABILITY.md +36 -32
  147. package/docs/guides/UNIVERSAL-MACRO-COMPILATION.md +38 -0
  148. package/docs/guides/VALIDATE-YOUR-AGENT.md +12 -0
  149. package/docs/llms.txt +4 -3
  150. package/docs/migration-14.x-rc-worksheet.md +4 -7
  151. package/docs/migration-reporting-storage-package.md +186 -0
  152. package/examples/README.md +1 -1
  153. package/package.json +14 -78
  154. package/dist/lib/reporting/azure/index.d.mts +0 -31
  155. package/dist/lib/reporting/azure/index.d.ts +0 -31
  156. package/dist/lib/reporting/azure/index.js +0 -266
  157. package/dist/lib/reporting/azure/index.mjs +0 -249
  158. package/dist/lib/reporting/bigquery/index.d.mts +0 -246
  159. package/dist/lib/reporting/bigquery/index.d.ts +0 -246
  160. package/dist/lib/reporting/bigquery/index.js +0 -633
  161. package/dist/lib/reporting/bigquery/index.mjs +0 -594
  162. package/dist/lib/reporting/gcs/adapter.d.mts +0 -38
  163. package/dist/lib/reporting/gcs/adapter.d.ts +0 -38
  164. package/dist/lib/reporting/gcs/adapter.js +0 -342
  165. package/dist/lib/reporting/gcs/adapter.mjs +0 -325
  166. package/dist/lib/reporting/gcs/bucket-policy.d.mts +0 -3
  167. package/dist/lib/reporting/gcs/bucket-policy.d.ts +0 -3
  168. package/dist/lib/reporting/gcs/bucket-policy.mjs +0 -7
  169. package/dist/lib/reporting/gcs/errors.d.mts +0 -11
  170. package/dist/lib/reporting/gcs/errors.d.ts +0 -11
  171. package/dist/lib/reporting/gcs/errors.mjs +0 -16
  172. package/dist/lib/reporting/gcs/fence.d.mts +0 -41
  173. package/dist/lib/reporting/gcs/fence.d.ts +0 -41
  174. package/dist/lib/reporting/gcs/fence.js +0 -250
  175. package/dist/lib/reporting/gcs/fence.mjs +0 -230
  176. package/dist/lib/reporting/gcs/index.d.mts +0 -18
  177. package/dist/lib/reporting/gcs/index.d.ts +0 -18
  178. package/dist/lib/reporting/gcs/index.js +0 -44
  179. package/dist/lib/reporting/gcs/index.mjs +0 -14
  180. package/dist/lib/reporting/gcs/io.d.mts +0 -7
  181. package/dist/lib/reporting/gcs/io.d.ts +0 -7
  182. package/dist/lib/reporting/gcs/io.js +0 -95
  183. package/dist/lib/reporting/gcs/io.mjs +0 -69
  184. package/dist/lib/reporting/gcs/reader.d.mts +0 -67
  185. package/dist/lib/reporting/gcs/reader.d.ts +0 -67
  186. package/dist/lib/reporting/gcs/reader.js +0 -193
  187. package/dist/lib/reporting/gcs/reader.mjs +0 -169
  188. package/dist/lib/reporting/gcs/row-provider.d.mts +0 -39
  189. package/dist/lib/reporting/gcs/row-provider.d.ts +0 -39
  190. package/dist/lib/reporting/gcs/row-provider.js +0 -225
  191. package/dist/lib/reporting/gcs/row-provider.mjs +0 -208
  192. package/dist/lib/reporting/gcs/validation.d.mts +0 -5
  193. package/dist/lib/reporting/gcs/validation.d.ts +0 -5
  194. package/dist/lib/reporting/gcs/validation.js +0 -49
  195. package/dist/lib/reporting/gcs/validation.mjs +0 -25
  196. package/dist/lib/reporting/ledger/change-feed.d.mts +0 -69
  197. package/dist/lib/reporting/ledger/change-feed.d.ts +0 -69
  198. package/dist/lib/reporting/ledger/change-feed.js +0 -107
  199. package/dist/lib/reporting/ledger/change-feed.mjs +0 -80
  200. package/dist/lib/reporting/ledger/managed-postgres.d.mts +0 -293
  201. package/dist/lib/reporting/ledger/managed-postgres.d.ts +0 -293
  202. package/dist/lib/reporting/ledger/managed-postgres.js +0 -2346
  203. package/dist/lib/reporting/ledger/managed-postgres.mjs +0 -2332
  204. package/dist/lib/reporting/ledger/managed-router.d.mts +0 -148
  205. package/dist/lib/reporting/ledger/managed-router.d.ts +0 -148
  206. package/dist/lib/reporting/ledger/managed-router.js +0 -280
  207. package/dist/lib/reporting/ledger/managed-router.mjs +0 -258
  208. package/dist/lib/reporting/ledger/managed.d.mts +0 -535
  209. package/dist/lib/reporting/ledger/managed.d.ts +0 -535
  210. package/dist/lib/reporting/ledger/managed.js +0 -761
  211. package/dist/lib/reporting/ledger/managed.mjs +0 -729
  212. package/dist/lib/reporting/ledger/notification-activity.d.mts +0 -332
  213. package/dist/lib/reporting/ledger/notification-activity.d.ts +0 -332
  214. package/dist/lib/reporting/ledger/notification-activity.js +0 -1366
  215. package/dist/lib/reporting/ledger/notification-activity.mjs +0 -1337
  216. package/dist/lib/reporting/ledger/object-writes.d.mts +0 -128
  217. package/dist/lib/reporting/ledger/object-writes.d.ts +0 -128
  218. package/dist/lib/reporting/ledger/object-writes.js +0 -147
  219. package/dist/lib/reporting/ledger/object-writes.mjs +0 -114
  220. package/dist/lib/reporting/ledger/postgres.d.mts +0 -689
  221. package/dist/lib/reporting/ledger/postgres.d.ts +0 -689
  222. package/dist/lib/reporting/ledger/postgres.js +0 -4462
  223. package/dist/lib/reporting/ledger/postgres.mjs +0 -4462
  224. package/dist/lib/reporting/ledger/row-storage-migration.d.mts +0 -59
  225. package/dist/lib/reporting/ledger/row-storage-migration.d.ts +0 -59
  226. package/dist/lib/reporting/ledger/row-storage-migration.js +0 -365
  227. package/dist/lib/reporting/ledger/row-storage-migration.mjs +0 -339
  228. package/dist/lib/reporting/ledger/row-storage-object.d.mts +0 -203
  229. package/dist/lib/reporting/ledger/row-storage-object.d.ts +0 -203
  230. package/dist/lib/reporting/ledger/row-storage-object.js +0 -379
  231. package/dist/lib/reporting/ledger/row-storage-object.mjs +0 -335
  232. package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +0 -44
  233. package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +0 -44
  234. package/dist/lib/reporting/ledger/row-storage-provider-io.js +0 -142
  235. package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +0 -111
  236. package/dist/lib/reporting/ledger/row-storage.d.mts +0 -316
  237. package/dist/lib/reporting/ledger/row-storage.d.ts +0 -316
  238. package/dist/lib/reporting/ledger/row-storage.js +0 -812
  239. package/dist/lib/reporting/ledger/row-storage.mjs +0 -802
  240. package/dist/lib/reporting/s3/index.d.mts +0 -34
  241. package/dist/lib/reporting/s3/index.d.ts +0 -34
  242. package/dist/lib/reporting/s3/index.js +0 -347
  243. package/dist/lib/reporting/s3/index.mjs +0 -340
  244. package/dist/lib/reporting/service/maintenance.d.mts +0 -148
  245. package/dist/lib/reporting/service/maintenance.d.ts +0 -148
  246. package/dist/lib/reporting/service/maintenance.js +0 -185
  247. package/dist/lib/reporting/service/maintenance.mjs +0 -159
  248. package/examples/reliable-reporting-service/README.md +0 -169
@@ -1,316 +0,0 @@
1
- import { type ReportingEncodedRowsV1, type ReportingRowChunkManifestV1 } from './row-encoding.mjs';
2
- import { type ReportingRowObjectProviderV1 } from './row-storage-object.mjs';
3
- /**
4
- * Revision row storage (shared SDK persistence spec,
5
- * adcontextprotocol/adcp#7996 §3). Revision headers stay in the ledger
6
- * document; rows live as canonical JSONL chunks in a storage binding, and
7
- * every read is verified against digests committed in PostgreSQL before rows
8
- * are released.
9
- */
10
- export { ReportingRowStoreError, isReportingRowStoreError } from './row-storage-errors.mjs';
11
- export type { ReportingRowStoreErrorCode } from './row-storage-errors.mjs';
12
- /**
13
- * Rows stored as chunk bodies in the ledger's own PostgreSQL schema.
14
- *
15
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
16
- */
17
- export interface ReportingPostgresRowBindingV1 {
18
- kind: 'postgres';
19
- }
20
- /**
21
- * Rows stored as one object per chunk through a registered provider. The
22
- * definition lives in host code, which makes it the allowlist: a row set
23
- * whose recorded binding identity differs from the configured definition is
24
- * never read from or written to.
25
- *
26
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
27
- */
28
- export interface ReportingObjectRowBindingV1 {
29
- kind: 'object';
30
- /** Name of a provider registered in `ReportingRowStorageOptionsV1.providers`. */
31
- provider: string;
32
- /** Non-secret provider coordinates, validated by the provider's closed schema. */
33
- location: Readonly<Record<string, string>>;
34
- /** Owned key prefix. Sweeps and deletes never touch keys outside it. */
35
- prefix: string;
36
- /**
37
- * Object key template; see `REPORTING_ROW_DEFAULT_KEY_TEMPLATE`. It must include `{revision_key}`, so every
38
- * row set writes its own object keys (a read-only binding is exempt).
39
- */
40
- keyTemplate?: string;
41
- /**
42
- * Keep this binding configured only to read (and retire) row sets already written through it, for
43
- * example under an older template without `{revision_key}`. A read-only binding is never selected for
44
- * new writes and is exempt from the `{revision_key}` requirement; reads use each chunk's recorded
45
- * `object_ref`, never a re-rendered key. Not part of the binding's identity.
46
- */
47
- readOnly?: boolean;
48
- /** Stored encoding; digests always cover uncompressed bytes. Default `gzip`. */
49
- compression?: 'none' | 'gzip';
50
- /** Host-mapped client reference passed to the provider; never a secret. */
51
- credentialRef?: string;
52
- }
53
- /**
54
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
55
- */
56
- export type ReportingRowBindingDefinitionV1 = ReportingPostgresRowBindingV1 | ReportingObjectRowBindingV1;
57
- /**
58
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
59
- */
60
- export interface ReportingRowBindingSelectionInputV1 {
61
- account_id: string;
62
- reporting_obligation_id: string;
63
- row_set_kind: 'revision' | 'adjustment';
64
- finality?: 'snapshot' | 'official';
65
- row_count: number;
66
- content_size_bytes: number;
67
- }
68
- /**
69
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
70
- */
71
- export interface ReportingRowStorageOptionsV1 {
72
- /**
73
- * Logical binding ID → immutable definition. Defaults to a single
74
- * `postgres` binding. Changing a definition requires a new ID; keep retired
75
- * definitions configured while revisions still reference them.
76
- */
77
- bindings?: Readonly<Record<string, ReportingRowBindingDefinitionV1>>;
78
- /** Object-storage providers by name. */
79
- providers?: Readonly<Record<string, ReportingRowObjectProviderV1>>;
80
- /** Picks the binding for each new row set. Defaults to the only binding, or `postgres`. */
81
- selectRowBinding?(input: ReportingRowBindingSelectionInputV1): string | Promise<string>;
82
- /**
83
- * Stable deployment namespace, combined with the schema's installation
84
- * identity into each binding's `namespace_key`. Defaults to `default`.
85
- */
86
- deploymentNamespace?: string;
87
- /** Deadline for one row set's uploads. Default 60 seconds. */
88
- writeDeadlineMilliseconds?: number;
89
- /** Deadline for one object read. Default 30 seconds. */
90
- readDeadlineMilliseconds?: number;
91
- }
92
- /**
93
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
94
- */
95
- export interface ReportingRowSetPrepareInputV1 {
96
- rowSetId: string;
97
- rowSetKind: 'revision' | 'adjustment';
98
- accountId: string;
99
- obligationId: string;
100
- rows: readonly Record<string, unknown>[];
101
- finality?: 'snapshot' | 'official';
102
- /** Reporting period start, used with `sourceTimezone` for `{period_date}` in object keys. */
103
- periodStart?: string;
104
- /** The period's `source_timezone` (required with `periodStart`): `{period_date}` is the local calendar date. */
105
- sourceTimezone?: string;
106
- /** Committed protocol binding the chunks must reproduce. */
107
- binding: {
108
- sha256: string;
109
- byteCount: number;
110
- rowCount: number;
111
- };
112
- /** Required for revisions (`revision_envelope_v1`); omitted for adjustments (`rows_v1`). */
113
- controlTotals?: readonly unknown[];
114
- /** Overrides `selectRowBinding` (for example, to migrate inline rows into a PostgreSQL binding). */
115
- bindingId?: string;
116
- }
117
- interface PreparedObjectV1 {
118
- readonly objectRef: string;
119
- readonly physicalBytes: Buffer;
120
- readonly physicalSha256: string;
121
- readonly compression: 'none' | 'gzip';
122
- }
123
- /**
124
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
125
- */
126
- export interface ReportingPreparedRowSetV1 {
127
- readonly input: ReportingRowSetPrepareInputV1;
128
- readonly encoded: ReportingEncodedRowsV1;
129
- readonly bindingId: string;
130
- readonly binding: ReportingRowBindingDefinitionV1;
131
- readonly digestProfile: 'revision_envelope_v1' | 'rows_v1';
132
- /** Object kind only: one planned object per chunk. */
133
- readonly objects?: readonly PreparedObjectV1[];
134
- }
135
- /**
136
- * Where one chunk was stored; recorded in the chunk manifest.
137
- *
138
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
139
- */
140
- export interface ReportingRowChunkLocatorV1 {
141
- /** AdCP `object_ref`: decoded, destination-relative, 1 to 1024 characters. */
142
- objectRef: string;
143
- /** AdCP `native_version_ref`: decoded provider-native immutable version, 1 to 1024 characters. */
144
- nativeVersionRef: string;
145
- compression: 'none' | 'gzip';
146
- /** SHA-256 of the stored (possibly compressed) object bytes. */
147
- physicalSha256: string;
148
- /** AdCP `size_bytes`: the stored object's size, after any compression. */
149
- sizeBytes: number;
150
- /** Whether this upload created the object (as opposed to adopting identical bytes). */
151
- created: boolean;
152
- }
153
- interface QueryableV1 {
154
- query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
155
- rows: Row[];
156
- rowCount?: number | null;
157
- }>;
158
- }
159
- /**
160
- * A row set whose chunk manifest has been verified against its committed digest.
161
- *
162
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
163
- */
164
- export interface ReportingRowSetHandleV1 {
165
- readonly rowSetId: string;
166
- readonly rowSetKind: 'revision' | 'adjustment';
167
- readonly accountId: string;
168
- readonly obligationId: string;
169
- readonly digestProfile: 'revision_envelope_v1' | 'rows_v1';
170
- readonly contentSha256: string;
171
- /**
172
- * Byte count of the content `contentSha256` covers (the committed binding's `byteCount`): for a revision it includes
173
- * the envelope, so it is not the sum of the chunks' `canonical_size_bytes`.
174
- */
175
- readonly contentSizeBytes: number;
176
- readonly rowCount: number;
177
- readonly rowManifestSha256: string;
178
- readonly bindingId: string;
179
- readonly bindingIdentitySha256: string;
180
- readonly kind: 'postgres' | 'object';
181
- readonly manifests: readonly ReportingRowChunkManifestV1[];
182
- /** Object kind only, by chunk index. */
183
- readonly locators: readonly (Omit<ReportingRowChunkLocatorV1, 'created'> | undefined)[];
184
- }
185
- /**
186
- * Reads and writes revision row sets. PostgreSQL-kind reads are always
187
- * available once the row-storage migration is applied; object-kind reads need
188
- * the binding and its provider configured. Writes require an explicit opt-in
189
- * on the owning store.
190
- *
191
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
192
- */
193
- export declare class ReportingRowStorageV1 {
194
- private readonly pool;
195
- private readonly options;
196
- private readonly bindings;
197
- private readonly providers;
198
- private readonly deploymentNamespace;
199
- private readonly writeDeadline;
200
- private readonly readDeadline;
201
- private readied?;
202
- private installation?;
203
- constructor(pool: QueryableV1, options?: ReportingRowStorageOptionsV1);
204
- /** Deadline budget a writer must still hold on its lease before uploading. */
205
- get writeDeadlineMilliseconds(): number;
206
- /** Every writable object binding's key template must include `{revision_key}`; throws `INVALID_INPUT`. */
207
- private assertBindingKeyTemplates;
208
- /**
209
- * Refuse a configuration in which compaction could delete an object a concurrent commit is
210
- * adopting. An object binding whose key template omits `{revision_key}` can map two revisions
211
- * with identical chunk content to one object key, and a create-only write adopts an existing
212
- * object with identical bytes. Compaction deleting that object at the same moment would leave
213
- * the newer revision without its rows. Every writable binding is already required to include
214
- * `{revision_key}`, so this cannot fail for a validated configuration. A `readOnly` binding is
215
- * skipped: it never takes commits, so nothing can adopt through it, and every delete is
216
- * reference-checked.
217
- *
218
- * Since the reference-checked, per-object-locked delete this is no longer the only guard: every
219
- * delete path now skips an object another row set still references. It is kept as defense in
220
- * depth for compaction, the one path that deletes content while the obligation stays live.
221
- */
222
- assertCompactionSafeKeyTemplates(): void;
223
- /** IDs of the object bindings this host configures, the only ones it can delete objects through. */
224
- objectBindingIds(): string[];
225
- /** Probe the schema and every provider, and register (or verify) every configured binding. Idempotent. */
226
- ready(): Promise<void>;
227
- /** Encode rows, prove the chunks reproduce the committed binding, select a binding and plan objects. */
228
- prepare(input: ReportingRowSetPrepareInputV1): Promise<ReportingPreparedRowSetV1>;
229
- /**
230
- * Upload a prepared object-kind row set, create-only. An object already at a
231
- * planned key is adopted only when its bytes decode to the exact chunk;
232
- * otherwise `CONTENT_CONFLICT`. `onCreated` is awaited for every object this
233
- * call created, before the next upload, so the caller can record it in its
234
- * write intent.
235
- */
236
- upload(prepared: ReportingPreparedRowSetV1, intentId: string, onCreated: (object: {
237
- objectRef: string;
238
- nativeVersionRef: string;
239
- }) => Promise<void>, signal?: AbortSignal): Promise<ReportingRowChunkLocatorV1[]>;
240
- /**
241
- * Persist a prepared row set inside the caller's ledger transaction:
242
- * bodies for the `postgres` kind, or the uploaded locators for the object
243
- * kind. Replays of an identical row set are no-ops; a conflicting row set
244
- * under the same ID is refused.
245
- */
246
- writeInTransaction(transaction: QueryableV1, prepared: ReportingPreparedRowSetV1, locators?: readonly ReportingRowChunkLocatorV1[], sharedFromRowSetId?: string): Promise<void>;
247
- /**
248
- * Load a row set and verify its chunk manifest against the committed digest.
249
- * Returns `null` when no row set exists (legacy inline rows) or it belongs
250
- * to another account. Throws `ROWS_EXPIRED` / `ROWS_UNAVAILABLE` when the
251
- * rows were pruned or lost.
252
- */
253
- find(rowSetId: string, accountId: string, queryable?: QueryableV1): Promise<ReportingRowSetHandleV1 | null>;
254
- /** Verified rows `[offset, offset + limit)` in ordinal order. */
255
- readPage(handle: ReportingRowSetHandleV1, offset: number, limit: number, signal?: AbortSignal): Promise<Record<string, unknown>[]>;
256
- /**
257
- * Every row, verified chunk by chunk and against the committed binding.
258
- * `controlTotals` are required for revision row sets.
259
- */
260
- readAll(handle: ReportingRowSetHandleV1, controlTotals?: readonly unknown[], options?: {
261
- maxBytes?: number;
262
- signal?: AbortSignal;
263
- }): Promise<Record<string, unknown>[]>;
264
- /**
265
- * Delete exact object versions through the configured binding's provider.
266
- * `absent` counts as success. Only object-kind bindings are accepted.
267
- */
268
- deleteObjects(bindingId: string, objects: readonly {
269
- objectRef: string;
270
- nativeVersionRef: string;
271
- }[], signal?: AbortSignal): Promise<void>;
272
- /**
273
- * Prove each object is still present at its recorded version with the recorded size.
274
- * A commit that adopted an object another row set created calls this under the object's
275
- * lock, so a concurrent delete either finished first (this throws, the commit fails and
276
- * the writer re-uploads) or sees the commit's chunk reference and skips the delete.
277
- *
278
- * Native versions are write-unique (S3 VersionId, Azure versionId, GCS generation, filesystem
279
- * `ino:birthtime:mtime:size`), so a version-pinned metadata check, "this exact version exists at the
280
- * recorded size", proves the object unchanged without downloading it while the commit holds its
281
- * locks. Bytes were verified when the object was uploaded or adopted. A custom provider without
282
- * `stat` falls back to reading the whole object and comparing its physical digest.
283
- */
284
- assertObjectsPresent(bindingId: string, objects: readonly {
285
- objectRef: string;
286
- nativeVersionRef: string;
287
- physicalSha256: string;
288
- sizeBytes: number;
289
- }[], signal?: AbortSignal): Promise<void>;
290
- /**
291
- * A live row set in the same obligation and binding whose rows are
292
- * byte-identical (same manifest digest), with its chunk locations. Sharing
293
- * never crosses obligations, so it never crosses consumers.
294
- */
295
- findShareable(queryable: QueryableV1, prepared: ReportingPreparedRowSetV1): Promise<{
296
- rowSetId: string;
297
- locators: ReportingRowChunkLocatorV1[];
298
- } | undefined>;
299
- /** Installation identity and namespace key; available after `ready()`. */
300
- get installationIdentity(): {
301
- installationId: string;
302
- namespaceKey: string;
303
- };
304
- private readChunkRange;
305
- private inflate;
306
- private decode;
307
- /** Collapse provider failures to stable, secret-free codes. */
308
- private provider;
309
- private register;
310
- }
311
- /**
312
- * Fresh opaque intent identifier for one upload attempt.
313
- *
314
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
315
- */
316
- export declare function reportingRowWriteIntentIdV1(): string;
@@ -1,316 +0,0 @@
1
- import { type ReportingEncodedRowsV1, type ReportingRowChunkManifestV1 } from './row-encoding';
2
- import { type ReportingRowObjectProviderV1 } from './row-storage-object';
3
- /**
4
- * Revision row storage (shared SDK persistence spec,
5
- * adcontextprotocol/adcp#7996 §3). Revision headers stay in the ledger
6
- * document; rows live as canonical JSONL chunks in a storage binding, and
7
- * every read is verified against digests committed in PostgreSQL before rows
8
- * are released.
9
- */
10
- export { ReportingRowStoreError, isReportingRowStoreError } from './row-storage-errors';
11
- export type { ReportingRowStoreErrorCode } from './row-storage-errors';
12
- /**
13
- * Rows stored as chunk bodies in the ledger's own PostgreSQL schema.
14
- *
15
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
16
- */
17
- export interface ReportingPostgresRowBindingV1 {
18
- kind: 'postgres';
19
- }
20
- /**
21
- * Rows stored as one object per chunk through a registered provider. The
22
- * definition lives in host code, which makes it the allowlist: a row set
23
- * whose recorded binding identity differs from the configured definition is
24
- * never read from or written to.
25
- *
26
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
27
- */
28
- export interface ReportingObjectRowBindingV1 {
29
- kind: 'object';
30
- /** Name of a provider registered in `ReportingRowStorageOptionsV1.providers`. */
31
- provider: string;
32
- /** Non-secret provider coordinates, validated by the provider's closed schema. */
33
- location: Readonly<Record<string, string>>;
34
- /** Owned key prefix. Sweeps and deletes never touch keys outside it. */
35
- prefix: string;
36
- /**
37
- * Object key template; see `REPORTING_ROW_DEFAULT_KEY_TEMPLATE`. It must include `{revision_key}`, so every
38
- * row set writes its own object keys (a read-only binding is exempt).
39
- */
40
- keyTemplate?: string;
41
- /**
42
- * Keep this binding configured only to read (and retire) row sets already written through it, for
43
- * example under an older template without `{revision_key}`. A read-only binding is never selected for
44
- * new writes and is exempt from the `{revision_key}` requirement; reads use each chunk's recorded
45
- * `object_ref`, never a re-rendered key. Not part of the binding's identity.
46
- */
47
- readOnly?: boolean;
48
- /** Stored encoding; digests always cover uncompressed bytes. Default `gzip`. */
49
- compression?: 'none' | 'gzip';
50
- /** Host-mapped client reference passed to the provider; never a secret. */
51
- credentialRef?: string;
52
- }
53
- /**
54
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
55
- */
56
- export type ReportingRowBindingDefinitionV1 = ReportingPostgresRowBindingV1 | ReportingObjectRowBindingV1;
57
- /**
58
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
59
- */
60
- export interface ReportingRowBindingSelectionInputV1 {
61
- account_id: string;
62
- reporting_obligation_id: string;
63
- row_set_kind: 'revision' | 'adjustment';
64
- finality?: 'snapshot' | 'official';
65
- row_count: number;
66
- content_size_bytes: number;
67
- }
68
- /**
69
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
70
- */
71
- export interface ReportingRowStorageOptionsV1 {
72
- /**
73
- * Logical binding ID → immutable definition. Defaults to a single
74
- * `postgres` binding. Changing a definition requires a new ID; keep retired
75
- * definitions configured while revisions still reference them.
76
- */
77
- bindings?: Readonly<Record<string, ReportingRowBindingDefinitionV1>>;
78
- /** Object-storage providers by name. */
79
- providers?: Readonly<Record<string, ReportingRowObjectProviderV1>>;
80
- /** Picks the binding for each new row set. Defaults to the only binding, or `postgres`. */
81
- selectRowBinding?(input: ReportingRowBindingSelectionInputV1): string | Promise<string>;
82
- /**
83
- * Stable deployment namespace, combined with the schema's installation
84
- * identity into each binding's `namespace_key`. Defaults to `default`.
85
- */
86
- deploymentNamespace?: string;
87
- /** Deadline for one row set's uploads. Default 60 seconds. */
88
- writeDeadlineMilliseconds?: number;
89
- /** Deadline for one object read. Default 30 seconds. */
90
- readDeadlineMilliseconds?: number;
91
- }
92
- /**
93
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
94
- */
95
- export interface ReportingRowSetPrepareInputV1 {
96
- rowSetId: string;
97
- rowSetKind: 'revision' | 'adjustment';
98
- accountId: string;
99
- obligationId: string;
100
- rows: readonly Record<string, unknown>[];
101
- finality?: 'snapshot' | 'official';
102
- /** Reporting period start, used with `sourceTimezone` for `{period_date}` in object keys. */
103
- periodStart?: string;
104
- /** The period's `source_timezone` (required with `periodStart`): `{period_date}` is the local calendar date. */
105
- sourceTimezone?: string;
106
- /** Committed protocol binding the chunks must reproduce. */
107
- binding: {
108
- sha256: string;
109
- byteCount: number;
110
- rowCount: number;
111
- };
112
- /** Required for revisions (`revision_envelope_v1`); omitted for adjustments (`rows_v1`). */
113
- controlTotals?: readonly unknown[];
114
- /** Overrides `selectRowBinding` (for example, to migrate inline rows into a PostgreSQL binding). */
115
- bindingId?: string;
116
- }
117
- interface PreparedObjectV1 {
118
- readonly objectRef: string;
119
- readonly physicalBytes: Buffer;
120
- readonly physicalSha256: string;
121
- readonly compression: 'none' | 'gzip';
122
- }
123
- /**
124
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
125
- */
126
- export interface ReportingPreparedRowSetV1 {
127
- readonly input: ReportingRowSetPrepareInputV1;
128
- readonly encoded: ReportingEncodedRowsV1;
129
- readonly bindingId: string;
130
- readonly binding: ReportingRowBindingDefinitionV1;
131
- readonly digestProfile: 'revision_envelope_v1' | 'rows_v1';
132
- /** Object kind only: one planned object per chunk. */
133
- readonly objects?: readonly PreparedObjectV1[];
134
- }
135
- /**
136
- * Where one chunk was stored; recorded in the chunk manifest.
137
- *
138
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
139
- */
140
- export interface ReportingRowChunkLocatorV1 {
141
- /** AdCP `object_ref`: decoded, destination-relative, 1 to 1024 characters. */
142
- objectRef: string;
143
- /** AdCP `native_version_ref`: decoded provider-native immutable version, 1 to 1024 characters. */
144
- nativeVersionRef: string;
145
- compression: 'none' | 'gzip';
146
- /** SHA-256 of the stored (possibly compressed) object bytes. */
147
- physicalSha256: string;
148
- /** AdCP `size_bytes`: the stored object's size, after any compression. */
149
- sizeBytes: number;
150
- /** Whether this upload created the object (as opposed to adopting identical bytes). */
151
- created: boolean;
152
- }
153
- interface QueryableV1 {
154
- query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
155
- rows: Row[];
156
- rowCount?: number | null;
157
- }>;
158
- }
159
- /**
160
- * A row set whose chunk manifest has been verified against its committed digest.
161
- *
162
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
163
- */
164
- export interface ReportingRowSetHandleV1 {
165
- readonly rowSetId: string;
166
- readonly rowSetKind: 'revision' | 'adjustment';
167
- readonly accountId: string;
168
- readonly obligationId: string;
169
- readonly digestProfile: 'revision_envelope_v1' | 'rows_v1';
170
- readonly contentSha256: string;
171
- /**
172
- * Byte count of the content `contentSha256` covers (the committed binding's `byteCount`): for a revision it includes
173
- * the envelope, so it is not the sum of the chunks' `canonical_size_bytes`.
174
- */
175
- readonly contentSizeBytes: number;
176
- readonly rowCount: number;
177
- readonly rowManifestSha256: string;
178
- readonly bindingId: string;
179
- readonly bindingIdentitySha256: string;
180
- readonly kind: 'postgres' | 'object';
181
- readonly manifests: readonly ReportingRowChunkManifestV1[];
182
- /** Object kind only, by chunk index. */
183
- readonly locators: readonly (Omit<ReportingRowChunkLocatorV1, 'created'> | undefined)[];
184
- }
185
- /**
186
- * Reads and writes revision row sets. PostgreSQL-kind reads are always
187
- * available once the row-storage migration is applied; object-kind reads need
188
- * the binding and its provider configured. Writes require an explicit opt-in
189
- * on the owning store.
190
- *
191
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
192
- */
193
- export declare class ReportingRowStorageV1 {
194
- private readonly pool;
195
- private readonly options;
196
- private readonly bindings;
197
- private readonly providers;
198
- private readonly deploymentNamespace;
199
- private readonly writeDeadline;
200
- private readonly readDeadline;
201
- private readied?;
202
- private installation?;
203
- constructor(pool: QueryableV1, options?: ReportingRowStorageOptionsV1);
204
- /** Deadline budget a writer must still hold on its lease before uploading. */
205
- get writeDeadlineMilliseconds(): number;
206
- /** Every writable object binding's key template must include `{revision_key}`; throws `INVALID_INPUT`. */
207
- private assertBindingKeyTemplates;
208
- /**
209
- * Refuse a configuration in which compaction could delete an object a concurrent commit is
210
- * adopting. An object binding whose key template omits `{revision_key}` can map two revisions
211
- * with identical chunk content to one object key, and a create-only write adopts an existing
212
- * object with identical bytes. Compaction deleting that object at the same moment would leave
213
- * the newer revision without its rows. Every writable binding is already required to include
214
- * `{revision_key}`, so this cannot fail for a validated configuration. A `readOnly` binding is
215
- * skipped: it never takes commits, so nothing can adopt through it, and every delete is
216
- * reference-checked.
217
- *
218
- * Since the reference-checked, per-object-locked delete this is no longer the only guard: every
219
- * delete path now skips an object another row set still references. It is kept as defense in
220
- * depth for compaction, the one path that deletes content while the obligation stays live.
221
- */
222
- assertCompactionSafeKeyTemplates(): void;
223
- /** IDs of the object bindings this host configures, the only ones it can delete objects through. */
224
- objectBindingIds(): string[];
225
- /** Probe the schema and every provider, and register (or verify) every configured binding. Idempotent. */
226
- ready(): Promise<void>;
227
- /** Encode rows, prove the chunks reproduce the committed binding, select a binding and plan objects. */
228
- prepare(input: ReportingRowSetPrepareInputV1): Promise<ReportingPreparedRowSetV1>;
229
- /**
230
- * Upload a prepared object-kind row set, create-only. An object already at a
231
- * planned key is adopted only when its bytes decode to the exact chunk;
232
- * otherwise `CONTENT_CONFLICT`. `onCreated` is awaited for every object this
233
- * call created, before the next upload, so the caller can record it in its
234
- * write intent.
235
- */
236
- upload(prepared: ReportingPreparedRowSetV1, intentId: string, onCreated: (object: {
237
- objectRef: string;
238
- nativeVersionRef: string;
239
- }) => Promise<void>, signal?: AbortSignal): Promise<ReportingRowChunkLocatorV1[]>;
240
- /**
241
- * Persist a prepared row set inside the caller's ledger transaction:
242
- * bodies for the `postgres` kind, or the uploaded locators for the object
243
- * kind. Replays of an identical row set are no-ops; a conflicting row set
244
- * under the same ID is refused.
245
- */
246
- writeInTransaction(transaction: QueryableV1, prepared: ReportingPreparedRowSetV1, locators?: readonly ReportingRowChunkLocatorV1[], sharedFromRowSetId?: string): Promise<void>;
247
- /**
248
- * Load a row set and verify its chunk manifest against the committed digest.
249
- * Returns `null` when no row set exists (legacy inline rows) or it belongs
250
- * to another account. Throws `ROWS_EXPIRED` / `ROWS_UNAVAILABLE` when the
251
- * rows were pruned or lost.
252
- */
253
- find(rowSetId: string, accountId: string, queryable?: QueryableV1): Promise<ReportingRowSetHandleV1 | null>;
254
- /** Verified rows `[offset, offset + limit)` in ordinal order. */
255
- readPage(handle: ReportingRowSetHandleV1, offset: number, limit: number, signal?: AbortSignal): Promise<Record<string, unknown>[]>;
256
- /**
257
- * Every row, verified chunk by chunk and against the committed binding.
258
- * `controlTotals` are required for revision row sets.
259
- */
260
- readAll(handle: ReportingRowSetHandleV1, controlTotals?: readonly unknown[], options?: {
261
- maxBytes?: number;
262
- signal?: AbortSignal;
263
- }): Promise<Record<string, unknown>[]>;
264
- /**
265
- * Delete exact object versions through the configured binding's provider.
266
- * `absent` counts as success. Only object-kind bindings are accepted.
267
- */
268
- deleteObjects(bindingId: string, objects: readonly {
269
- objectRef: string;
270
- nativeVersionRef: string;
271
- }[], signal?: AbortSignal): Promise<void>;
272
- /**
273
- * Prove each object is still present at its recorded version with the recorded size.
274
- * A commit that adopted an object another row set created calls this under the object's
275
- * lock, so a concurrent delete either finished first (this throws, the commit fails and
276
- * the writer re-uploads) or sees the commit's chunk reference and skips the delete.
277
- *
278
- * Native versions are write-unique (S3 VersionId, Azure versionId, GCS generation, filesystem
279
- * `ino:birthtime:mtime:size`), so a version-pinned metadata check, "this exact version exists at the
280
- * recorded size", proves the object unchanged without downloading it while the commit holds its
281
- * locks. Bytes were verified when the object was uploaded or adopted. A custom provider without
282
- * `stat` falls back to reading the whole object and comparing its physical digest.
283
- */
284
- assertObjectsPresent(bindingId: string, objects: readonly {
285
- objectRef: string;
286
- nativeVersionRef: string;
287
- physicalSha256: string;
288
- sizeBytes: number;
289
- }[], signal?: AbortSignal): Promise<void>;
290
- /**
291
- * A live row set in the same obligation and binding whose rows are
292
- * byte-identical (same manifest digest), with its chunk locations. Sharing
293
- * never crosses obligations, so it never crosses consumers.
294
- */
295
- findShareable(queryable: QueryableV1, prepared: ReportingPreparedRowSetV1): Promise<{
296
- rowSetId: string;
297
- locators: ReportingRowChunkLocatorV1[];
298
- } | undefined>;
299
- /** Installation identity and namespace key; available after `ready()`. */
300
- get installationIdentity(): {
301
- installationId: string;
302
- namespaceKey: string;
303
- };
304
- private readChunkRange;
305
- private inflate;
306
- private decode;
307
- /** Collapse provider failures to stable, secret-free codes. */
308
- private provider;
309
- private register;
310
- }
311
- /**
312
- * Fresh opaque intent identifier for one upload attempt.
313
- *
314
- * @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
315
- */
316
- export declare function reportingRowWriteIntentIdV1(): string;