@adcp/sdk 15.9.0 → 16.0.0-beta.1
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.
- package/bin/adcp-identity.js +74 -0
- package/bin/adcp.js +2 -0
- package/dist/lib/adapters/keyed-account-backend.d.mts +37 -0
- package/dist/lib/adapters/keyed-account-backend.d.ts +37 -0
- package/dist/lib/adapters/keyed-account-backend.js +121 -0
- package/dist/lib/adapters/keyed-account-backend.mjs +94 -0
- package/dist/lib/adapters/keyed-account-store.d.mts +28 -0
- package/dist/lib/adapters/keyed-account-store.d.ts +28 -0
- package/dist/lib/adapters/keyed-account-store.js +227 -0
- package/dist/lib/adapters/keyed-account-store.mjs +203 -0
- package/dist/lib/core/SingleAgentClient.d.mts +16 -2
- package/dist/lib/core/SingleAgentClient.d.ts +16 -2
- package/dist/lib/core/SingleAgentClient.js +259 -62
- package/dist/lib/core/SingleAgentClient.mjs +261 -57
- package/dist/lib/core/TaskExecutor.d.mts +6 -0
- package/dist/lib/core/TaskExecutor.d.ts +6 -0
- package/dist/lib/core/TaskExecutor.js +66 -5
- package/dist/lib/core/TaskExecutor.mjs +71 -5
- package/dist/lib/core/postgres-webhook-registration-store.js +32 -5
- package/dist/lib/core/postgres-webhook-registration-store.mjs +32 -5
- package/dist/lib/core/redis-webhook-registration-store.js +23 -1
- package/dist/lib/core/redis-webhook-registration-store.mjs +23 -1
- package/dist/lib/core/webhook-registration.d.mts +7 -1
- package/dist/lib/core/webhook-registration.d.ts +7 -1
- package/dist/lib/core/webhook-registration.js +24 -2
- package/dist/lib/core/webhook-registration.mjs +23 -2
- package/dist/lib/identity-3.3/index.d.mts +10 -0
- package/dist/lib/identity-3.3/index.d.ts +10 -0
- package/dist/lib/identity-3.3/index.js +75 -0
- package/dist/lib/identity-3.3/index.mjs +46 -0
- package/dist/lib/identity-3.3/lifecycle.d.mts +113 -0
- package/dist/lib/identity-3.3/lifecycle.d.ts +113 -0
- package/dist/lib/identity-3.3/lifecycle.js +267 -0
- package/dist/lib/identity-3.3/lifecycle.mjs +240 -0
- package/dist/lib/identity-3.3/revocation.d.mts +50 -0
- package/dist/lib/identity-3.3/revocation.d.ts +50 -0
- package/dist/lib/identity-3.3/revocation.js +238 -0
- package/dist/lib/identity-3.3/revocation.mjs +216 -0
- package/dist/lib/identity-3.3/schemas.draft.d.mts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.d.ts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.js +1448 -0
- package/dist/lib/identity-3.3/schemas.draft.mjs +1428 -0
- package/dist/lib/identity-3.3/server.d.mts +34 -0
- package/dist/lib/identity-3.3/server.d.ts +34 -0
- package/dist/lib/identity-3.3/server.js +219 -0
- package/dist/lib/identity-3.3/server.mjs +194 -0
- package/dist/lib/identity-3.3/store.d.mts +24 -0
- package/dist/lib/identity-3.3/store.d.ts +24 -0
- package/dist/lib/identity-3.3/store.js +191 -0
- package/dist/lib/identity-3.3/store.mjs +169 -0
- package/dist/lib/identity-3.3/trust.d.mts +94 -0
- package/dist/lib/identity-3.3/trust.d.ts +94 -0
- package/dist/lib/identity-3.3/trust.js +278 -0
- package/dist/lib/identity-3.3/trust.mjs +239 -0
- package/dist/lib/identity-3.3/types.d.mts +127 -0
- package/dist/lib/identity-3.3/types.d.ts +127 -0
- package/dist/lib/identity-3.3/types.js +16 -0
- package/dist/lib/identity-3.3/types.mjs +0 -0
- package/dist/lib/identity-3.3/validation.d.mts +2 -0
- package/dist/lib/identity-3.3/validation.d.ts +2 -0
- package/dist/lib/identity-3.3/validation.js +125 -0
- package/dist/lib/identity-3.3/validation.mjs +91 -0
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/reporting/azure/index.d.mts +5 -0
- package/dist/lib/reporting/azure/index.d.ts +5 -0
- package/dist/lib/reporting/azure/index.js +26 -7
- package/dist/lib/reporting/azure/index.mjs +26 -7
- package/dist/lib/reporting/bigquery/index.d.mts +80 -25
- package/dist/lib/reporting/bigquery/index.d.ts +80 -25
- package/dist/lib/reporting/bigquery/index.js +184 -81
- package/dist/lib/reporting/bigquery/index.mjs +182 -80
- package/dist/lib/reporting/gcs/adapter.d.mts +8 -1
- package/dist/lib/reporting/gcs/adapter.d.ts +8 -1
- package/dist/lib/reporting/gcs/errors.d.mts +6 -0
- package/dist/lib/reporting/gcs/errors.d.ts +6 -0
- package/dist/lib/reporting/gcs/fence.d.mts +5 -0
- package/dist/lib/reporting/gcs/fence.d.ts +5 -0
- package/dist/lib/reporting/gcs/index.d.mts +9 -0
- package/dist/lib/reporting/gcs/index.d.ts +9 -0
- package/dist/lib/reporting/gcs/reader.d.mts +27 -3
- package/dist/lib/reporting/gcs/reader.d.ts +27 -3
- package/dist/lib/reporting/gcs/row-provider.d.mts +7 -0
- package/dist/lib/reporting/gcs/row-provider.d.ts +7 -0
- package/dist/lib/reporting/gcs/row-provider.js +34 -14
- package/dist/lib/reporting/gcs/row-provider.mjs +34 -14
- package/dist/lib/reporting/ledger/change-feed.d.mts +22 -1
- package/dist/lib/reporting/ledger/change-feed.d.ts +22 -1
- package/dist/lib/reporting/ledger/index.d.mts +11 -0
- package/dist/lib/reporting/ledger/index.d.ts +11 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +8 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +8 -0
- package/dist/lib/reporting/ledger/managed-router.d.mts +27 -2
- package/dist/lib/reporting/ledger/managed-router.d.ts +27 -2
- package/dist/lib/reporting/ledger/managed.d.mts +86 -6
- package/dist/lib/reporting/ledger/managed.d.ts +86 -6
- package/dist/lib/reporting/ledger/notification-activity.d.mts +65 -3
- package/dist/lib/reporting/ledger/notification-activity.d.ts +65 -3
- package/dist/lib/reporting/ledger/object-writes.d.mts +64 -5
- package/dist/lib/reporting/ledger/object-writes.d.ts +64 -5
- package/dist/lib/reporting/ledger/postgres.d.mts +43 -9
- package/dist/lib/reporting/ledger/postgres.d.ts +43 -9
- package/dist/lib/reporting/ledger/postgres.js +43 -27
- package/dist/lib/reporting/ledger/postgres.mjs +43 -27
- package/dist/lib/reporting/ledger/row-encoding.d.mts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.d.ts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.js +8 -4
- package/dist/lib/reporting/ledger/row-encoding.mjs +6 -3
- package/dist/lib/reporting/ledger/row-storage-errors.d.mts +11 -1
- package/dist/lib/reporting/ledger/row-storage-errors.d.ts +11 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.js +133 -18
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +133 -18
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.js +106 -31
- package/dist/lib/reporting/ledger/row-storage-object.mjs +104 -31
- package/dist/lib/reporting/ledger/row-storage.d.mts +87 -20
- package/dist/lib/reporting/ledger/row-storage.d.ts +87 -20
- package/dist/lib/reporting/ledger/row-storage.js +126 -66
- package/dist/lib/reporting/ledger/row-storage.mjs +129 -67
- package/dist/lib/reporting/ledger/schedule.d.mts +13 -0
- package/dist/lib/reporting/ledger/schedule.d.ts +13 -0
- package/dist/lib/reporting/ledger/schedule.js +24 -0
- package/dist/lib/reporting/ledger/schedule.mjs +23 -0
- package/dist/lib/reporting/ledger/types.d.mts +23 -1
- package/dist/lib/reporting/ledger/types.d.ts +23 -1
- package/dist/lib/reporting/s3/index.d.mts +5 -0
- package/dist/lib/reporting/s3/index.d.ts +5 -0
- package/dist/lib/reporting/s3/index.js +37 -14
- package/dist/lib/reporting/s3/index.mjs +37 -14
- package/dist/lib/reporting/service/index.d.mts +10 -0
- package/dist/lib/reporting/service/index.d.ts +10 -0
- package/dist/lib/reporting/service/maintenance.d.mts +28 -2
- package/dist/lib/reporting/service/maintenance.d.ts +28 -2
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-sync-contract.d.mts +14 -0
- package/dist/lib/server/account-sync-contract.d.ts +14 -0
- package/dist/lib/server/account-sync-contract.js +225 -0
- package/dist/lib/server/account-sync-contract.mjs +197 -0
- package/dist/lib/server/adcp-server.js +5 -0
- package/dist/lib/server/adcp-server.mjs +10 -0
- package/dist/lib/server/auth-signature.d.mts +10 -0
- package/dist/lib/server/auth-signature.d.ts +10 -0
- package/dist/lib/server/auth-signature.js +61 -2
- package/dist/lib/server/auth-signature.mjs +65 -2
- package/dist/lib/server/auth.d.mts +6 -0
- package/dist/lib/server/auth.d.ts +6 -0
- package/dist/lib/server/auth.js +6 -0
- package/dist/lib/server/auth.mjs +6 -0
- package/dist/lib/server/create-adcp-server.d.mts +19 -5
- package/dist/lib/server/create-adcp-server.d.ts +19 -5
- package/dist/lib/server/create-adcp-server.js +238 -19
- package/dist/lib/server/create-adcp-server.mjs +240 -10
- package/dist/lib/server/decisioning/account.d.mts +24 -1
- package/dist/lib/server/decisioning/account.d.ts +24 -1
- package/dist/lib/server/decisioning/index.d.mts +1 -1
- package/dist/lib/server/decisioning/index.d.ts +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.js +61 -11
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +65 -12
- package/dist/lib/server/index.d.mts +2 -0
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.js +12 -0
- package/dist/lib/server/index.mjs +12 -0
- package/dist/lib/server/notification-subscriptions/runtime.js +9 -1
- package/dist/lib/server/notification-subscriptions/runtime.mjs +9 -1
- package/dist/lib/server/notification-subscriptions/types.d.mts +5 -0
- package/dist/lib/server/notification-subscriptions/types.d.ts +5 -0
- package/dist/lib/server/principal/types.d.mts +1 -1
- package/dist/lib/server/principal/types.d.ts +1 -1
- package/dist/lib/server/serve.js +5 -0
- package/dist/lib/server/serve.mjs +5 -0
- package/dist/lib/server/webhook-delivery/recovery.d.mts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.d.ts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.js +4 -0
- package/dist/lib/server/webhook-delivery/recovery.mjs +4 -0
- package/dist/lib/server/webhook-emitter.d.mts +10 -0
- package/dist/lib/server/webhook-emitter.d.ts +10 -0
- package/dist/lib/server/webhook-emitter.js +22 -0
- package/dist/lib/server/webhook-emitter.mjs +22 -0
- package/dist/lib/signing/agent-context.d.mts +0 -5
- package/dist/lib/signing/agent-context.d.ts +0 -5
- package/dist/lib/signing/agent-context.js +9 -1
- package/dist/lib/signing/agent-context.mjs +9 -1
- package/dist/lib/signing/agent-fetch.js +27 -2
- package/dist/lib/signing/agent-fetch.mjs +32 -2
- package/dist/lib/signing/agent-resolver/canonicalize.d.mts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.js +17 -5
- package/dist/lib/signing/agent-resolver/canonicalize.mjs +16 -5
- package/dist/lib/signing/agent-resolver/index.d.mts +1 -0
- package/dist/lib/signing/agent-resolver/index.d.ts +1 -0
- package/dist/lib/signing/agent-resolver/index.js +5 -0
- package/dist/lib/signing/agent-resolver/index.mjs +3 -0
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +30 -3
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +30 -3
- package/dist/lib/signing/agent-resolver/strict-json.d.mts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.d.ts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.js +5 -3
- package/dist/lib/signing/agent-resolver/strict-json.mjs +5 -3
- package/dist/lib/signing/brand-jwks.d.mts +2 -2
- package/dist/lib/signing/brand-jwks.d.ts +2 -2
- package/dist/lib/signing/brand-jwks.js +4 -4
- package/dist/lib/signing/brand-jwks.mjs +4 -4
- package/dist/lib/signing/client.d.mts +1 -0
- package/dist/lib/signing/client.d.ts +1 -0
- package/dist/lib/signing/client.js +5 -0
- package/dist/lib/signing/client.mjs +3 -0
- package/dist/lib/signing/jwks-https.d.mts +1 -1
- package/dist/lib/signing/jwks-https.d.ts +1 -1
- package/dist/lib/signing/jwks-https.js +1 -1
- package/dist/lib/signing/jwks-https.mjs +1 -1
- package/dist/lib/signing/jwks.d.mts +11 -3
- package/dist/lib/signing/jwks.d.ts +11 -3
- package/dist/lib/signing/jwks.js +1 -1
- package/dist/lib/signing/jwks.mjs +1 -1
- package/dist/lib/signing/parser.d.mts +1 -1
- package/dist/lib/signing/parser.d.ts +1 -1
- package/dist/lib/signing/parser.js +5 -3
- package/dist/lib/signing/parser.mjs +6 -4
- package/dist/lib/signing/revocation.d.mts +4 -1
- package/dist/lib/signing/revocation.d.ts +4 -1
- package/dist/lib/signing/revocation.js +33 -3
- package/dist/lib/signing/revocation.mjs +31 -2
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.js +4 -0
- package/dist/lib/signing/server.mjs +4 -0
- package/dist/lib/signing/types.d.mts +3 -0
- package/dist/lib/signing/types.d.ts +3 -0
- package/dist/lib/signing/web-bot-auth.d.mts +117 -0
- package/dist/lib/signing/web-bot-auth.d.ts +117 -0
- package/dist/lib/signing/web-bot-auth.js +660 -0
- package/dist/lib/signing/web-bot-auth.mjs +624 -0
- package/dist/lib/testing/client.d.mts +1 -4
- package/dist/lib/testing/client.d.ts +1 -4
- package/dist/lib/testing/client.js +141 -20
- package/dist/lib/testing/client.mjs +137 -19
- package/dist/lib/testing/compliance/comply.js +29 -10
- package/dist/lib/testing/compliance/comply.mjs +37 -11
- package/dist/lib/testing/storyboard/account-sync-contract.d.mts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.d.ts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.js +79 -0
- package/dist/lib/testing/storyboard/account-sync-contract.mjs +55 -0
- package/dist/lib/testing/storyboard/default-invariants.js +2 -0
- package/dist/lib/testing/storyboard/default-invariants.mjs +2 -0
- package/dist/lib/testing/storyboard/runner.js +23 -8
- package/dist/lib/testing/storyboard/runner.mjs +24 -8
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/adcp.d.mts +4 -0
- package/dist/lib/types/adcp.d.ts +4 -0
- package/dist/lib/types/schemas.generated.d.ts +6 -6
- package/dist/lib/utils/capabilities.d.mts +1 -0
- package/dist/lib/utils/capabilities.d.ts +1 -0
- package/dist/lib/utils/capabilities.js +5 -0
- package/dist/lib/utils/capabilities.mjs +5 -0
- package/dist/lib/v2/projection/creative-delivery.d.mts +3 -1
- package/dist/lib/v2/projection/creative-delivery.d.ts +3 -1
- package/dist/lib/v2/projection/creative-delivery.js +26 -10
- package/dist/lib/v2/projection/creative-delivery.mjs +26 -10
- package/dist/lib/v2/projection/index.d.mts +1 -1
- package/dist/lib/v2/projection/index.d.ts +1 -1
- package/dist/lib/v2/projection/legacy-routes.d.mts +24 -2
- package/dist/lib/v2/projection/legacy-routes.d.ts +24 -2
- package/dist/lib/v2/projection/legacy-routes.js +28 -2
- package/dist/lib/v2/projection/legacy-routes.mjs +26 -2
- package/dist/lib/validation/schema-loader.d.mts +2 -0
- package/dist/lib/validation/schema-loader.d.ts +2 -0
- package/dist/lib/validation/schema-loader.js +43 -4
- package/dist/lib/validation/schema-loader.mjs +39 -3
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +4 -0
- package/docs/guides/REPORTING-LEDGER-CUTOVER.md +1 -1
- package/docs/guides/REPORTING-LEDGER.md +132 -46
- package/docs/guides/REPORTING-OPERATIONS.md +25 -4
- package/docs/guides/REPORTING-STABILITY.md +76 -0
- package/docs/guides/account-resolution.md +101 -0
- package/docs/llms.txt +3 -2
- package/docs/migration-12-to-13.md +7 -0
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +355 -0
- package/docs/migration-agent-resolution-3.3.md +5 -0
- package/docs/migration-reporting-row-storage-alignment.md +137 -0
- package/examples/storyboards/account-sync-contract.yaml +57 -0
- package/package.json +15 -1
|
@@ -17,17 +17,59 @@
|
|
|
17
17
|
* A row larger than the chunk byte limit forms its own segment and chunk.
|
|
18
18
|
* Digests always cover uncompressed canonical bytes.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Stored row format and canonicalization algorithm, as AdCP names them
|
|
22
|
+
* (`reporting-file-manifest.json` `format`, `reporting-canonicalization-contract.json`
|
|
23
|
+
* `algorithm`). Neither value is an input to any digest: segment, chunk and
|
|
24
|
+
* manifest digests cover chunk bytes and manifest fields, and the protocol
|
|
25
|
+
* `revision_content_sha256` covers the envelope and rows. They label the
|
|
26
|
+
* encoding and are pinned by the row-set `CHECK` constraints.
|
|
27
|
+
*
|
|
28
|
+
* `adcp_jcs_rows_v1` names the per-row RFC 8785 canonicalization. The stored
|
|
29
|
+
* chunk layout is one canonical row per line (`jsonl`); the protocol content
|
|
30
|
+
* digest is still computed by the streaming hashers below.
|
|
31
|
+
*
|
|
32
|
+
* @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
|
|
33
|
+
*/
|
|
34
|
+
export declare const REPORTING_ROW_FORMAT_V1: "jsonl";
|
|
35
|
+
/**
|
|
36
|
+
* @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
|
|
37
|
+
*/
|
|
38
|
+
export declare const REPORTING_ROW_ALGORITHM_V1: "adcp_jcs_rows_v1";
|
|
39
|
+
/**
|
|
40
|
+
* @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
|
|
41
|
+
*/
|
|
21
42
|
export declare const REPORTING_ROW_SEGMENT_MAX_ROWS = 500;
|
|
43
|
+
/**
|
|
44
|
+
* @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
|
|
45
|
+
*/
|
|
22
46
|
export declare const REPORTING_ROW_CHUNK_MAX_SEGMENTS = 20;
|
|
47
|
+
/**
|
|
48
|
+
* @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
|
|
49
|
+
*/
|
|
23
50
|
export declare const REPORTING_ROW_CHUNK_MAX_ROWS: number;
|
|
51
|
+
/**
|
|
52
|
+
* @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
|
|
53
|
+
*/
|
|
24
54
|
export declare const REPORTING_ROW_CHUNK_MAX_BYTES: number;
|
|
55
|
+
/**
|
|
56
|
+
* @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
|
|
57
|
+
*/
|
|
25
58
|
export type ReportingRowEncodingErrorCode = 'INVALID_ROW' | 'MANIFEST_MISMATCH' | 'CHUNK_INTEGRITY_FAILED' | 'ENVELOPE_INTEGRITY_FAILED';
|
|
59
|
+
/**
|
|
60
|
+
* @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
|
|
61
|
+
*/
|
|
26
62
|
export declare class ReportingRowEncodingError extends Error {
|
|
27
63
|
readonly code: ReportingRowEncodingErrorCode;
|
|
28
64
|
constructor(code: ReportingRowEncodingErrorCode, detail: string);
|
|
29
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* @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
|
|
68
|
+
*/
|
|
30
69
|
export declare function isReportingRowEncodingError(error: unknown): error is ReportingRowEncodingError;
|
|
70
|
+
/**
|
|
71
|
+
* @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
|
|
72
|
+
*/
|
|
31
73
|
export interface ReportingRowSegmentManifestV1 {
|
|
32
74
|
first_ordinal: number;
|
|
33
75
|
row_count: number;
|
|
@@ -36,6 +78,9 @@ export interface ReportingRowSegmentManifestV1 {
|
|
|
36
78
|
byte_count: number;
|
|
37
79
|
sha256: string;
|
|
38
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* @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
|
|
83
|
+
*/
|
|
39
84
|
export interface ReportingRowChunkManifestV1 {
|
|
40
85
|
chunk_index: number;
|
|
41
86
|
first_ordinal: number;
|
|
@@ -44,13 +89,20 @@ export interface ReportingRowChunkManifestV1 {
|
|
|
44
89
|
sha256: string;
|
|
45
90
|
segments: ReportingRowSegmentManifestV1[];
|
|
46
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
|
+
*/
|
|
47
95
|
export interface ReportingRowChunkV1 {
|
|
48
96
|
manifest: ReportingRowChunkManifestV1;
|
|
49
97
|
/** Uncompressed canonical JSONL bytes. */
|
|
50
98
|
bytes: Buffer;
|
|
51
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* @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
|
|
102
|
+
*/
|
|
52
103
|
export interface ReportingEncodedRowsV1 {
|
|
53
|
-
|
|
104
|
+
format: typeof REPORTING_ROW_FORMAT_V1;
|
|
105
|
+
algorithm: typeof REPORTING_ROW_ALGORITHM_V1;
|
|
54
106
|
rowCount: number;
|
|
55
107
|
/** Total canonical JSONL bytes across all chunks. */
|
|
56
108
|
byteCount: number;
|
|
@@ -59,11 +111,17 @@ export interface ReportingEncodedRowsV1 {
|
|
|
59
111
|
/** `sha256(JCS(manifests))`; bound immutably on the revision header. */
|
|
60
112
|
rowManifestSha256: string;
|
|
61
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* @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
|
|
116
|
+
*/
|
|
62
117
|
export interface ReportingRevisionEnvelopeInputV1 {
|
|
63
118
|
reporting_revision_id: string;
|
|
64
119
|
row_count: number;
|
|
65
120
|
control_totals: readonly unknown[];
|
|
66
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* @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
|
|
124
|
+
*/
|
|
67
125
|
export interface ReportingRevisionEnvelopeDigestV1 {
|
|
68
126
|
sha256: string;
|
|
69
127
|
/** Byte length of the canonical envelope; equals `binding.byteCount`. */
|
|
@@ -73,17 +131,29 @@ export interface ReportingRevisionEnvelopeDigestV1 {
|
|
|
73
131
|
* Canonicalize one row for storage. Refuses values whose canonical bytes are
|
|
74
132
|
* not portable across conforming JCS implementations: non-plain objects,
|
|
75
133
|
* non-finite numbers, integers outside ±(2^53 − 1), and lone surrogates.
|
|
134
|
+
*
|
|
135
|
+
* @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
|
|
76
136
|
*/
|
|
77
137
|
export declare function canonicalReportingRowV1(row: unknown, ordinal?: number): string;
|
|
78
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* Encode rows into contract-fixed canonical JSONL chunks and manifests.
|
|
140
|
+
*
|
|
141
|
+
* @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
|
|
142
|
+
*/
|
|
79
143
|
export declare function encodeReportingRowsV1(rows: readonly unknown[]): ReportingEncodedRowsV1;
|
|
80
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* `sha256(JCS(manifests))` over the ordered chunk manifests, locators excluded.
|
|
146
|
+
*
|
|
147
|
+
* @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
|
|
148
|
+
*/
|
|
81
149
|
export declare function reportingRowManifestSha256V1(manifests: readonly ReportingRowChunkManifestV1[]): string;
|
|
82
150
|
/**
|
|
83
151
|
* Verify that a manifest set is internally consistent and matches the
|
|
84
152
|
* header's committed `row_manifest_sha256` and `row_count`. Ordinals must be
|
|
85
153
|
* contiguous from zero, chunk and segment boundaries must follow the contract
|
|
86
154
|
* limits, and segment byte ranges must tile their chunk exactly.
|
|
155
|
+
*
|
|
156
|
+
* @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
|
|
87
157
|
*/
|
|
88
158
|
export declare function verifyReportingRowManifestsV1(manifests: readonly ReportingRowChunkManifestV1[], expected: {
|
|
89
159
|
rowCount: number;
|
|
@@ -92,6 +162,8 @@ export declare function verifyReportingRowManifestsV1(manifests: readonly Report
|
|
|
92
162
|
/**
|
|
93
163
|
* Verify a whole chunk's canonical bytes against its manifest: total digest,
|
|
94
164
|
* byte count, and every segment's digest and line count.
|
|
165
|
+
*
|
|
166
|
+
* @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
|
|
95
167
|
*/
|
|
96
168
|
export declare function verifyReportingRowChunkV1(manifest: ReportingRowChunkManifestV1, bytes: Uint8Array): void;
|
|
97
169
|
/**
|
|
@@ -99,20 +171,32 @@ export declare function verifyReportingRowChunkV1(manifest: ReportingRowChunkMan
|
|
|
99
171
|
* (inclusive). `bytes` must hold exactly those segments' canonical bytes,
|
|
100
172
|
* starting at the first segment's `byte_offset` — the shape returned by a
|
|
101
173
|
* ranged object read. Rows are released only after every segment verifies.
|
|
174
|
+
*
|
|
175
|
+
* @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
|
|
102
176
|
*/
|
|
103
177
|
export declare function decodeVerifiedReportingRowSegmentsV1(manifest: ReportingRowChunkManifestV1, segmentRange: readonly [fromSegment: number, toSegment: number], bytes: Uint8Array): Record<string, unknown>[];
|
|
104
178
|
/**
|
|
105
179
|
* Streaming hasher for the protocol revision binding
|
|
106
180
|
* `sha256(JCS({reporting_revision_id, row_count, control_totals, reporting_rows}))`.
|
|
107
181
|
* Feed verified chunk bytes in order; rows are never parsed.
|
|
182
|
+
*
|
|
183
|
+
* @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
|
|
108
184
|
*/
|
|
109
185
|
export declare function createReportingRevisionEnvelopeHasherV1(envelope: ReportingRevisionEnvelopeInputV1): {
|
|
110
186
|
update(chunkBytes: Uint8Array): void;
|
|
111
187
|
digest(): ReportingRevisionEnvelopeDigestV1;
|
|
112
188
|
};
|
|
113
|
-
/**
|
|
189
|
+
/**
|
|
190
|
+
* Envelope digest over already-encoded chunk bytes.
|
|
191
|
+
*
|
|
192
|
+
* @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
|
|
193
|
+
*/
|
|
114
194
|
export declare function reportingRevisionEnvelopeDigestV1(envelope: ReportingRevisionEnvelopeInputV1, chunks: Iterable<Uint8Array>): ReportingRevisionEnvelopeDigestV1;
|
|
115
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* Streaming hasher for digest profile `rows_v1`: `sha256(JCS(rows))`.
|
|
197
|
+
*
|
|
198
|
+
* @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
|
|
199
|
+
*/
|
|
116
200
|
export declare function createReportingRowsOnlyHasherV1(rowCount: number): {
|
|
117
201
|
update(chunkBytes: Uint8Array): void;
|
|
118
202
|
digest(): ReportingRevisionEnvelopeDigestV1;
|
|
@@ -121,6 +205,8 @@ export declare function createReportingRowsOnlyHasherV1(rowCount: number): {
|
|
|
121
205
|
* Throw unless the canonical chunks reproduce the header's committed revision
|
|
122
206
|
* binding. Used at write time (proof that chunks and envelope agree) and for
|
|
123
207
|
* full-revision reads.
|
|
208
|
+
*
|
|
209
|
+
* @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
|
|
124
210
|
*/
|
|
125
211
|
export declare function assertReportingRevisionEnvelopeV1(envelope: ReportingRevisionEnvelopeInputV1, chunks: Iterable<Uint8Array>, expected: {
|
|
126
212
|
sha256: string;
|
|
@@ -17,17 +17,59 @@
|
|
|
17
17
|
* A row larger than the chunk byte limit forms its own segment and chunk.
|
|
18
18
|
* Digests always cover uncompressed canonical bytes.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Stored row format and canonicalization algorithm, as AdCP names them
|
|
22
|
+
* (`reporting-file-manifest.json` `format`, `reporting-canonicalization-contract.json`
|
|
23
|
+
* `algorithm`). Neither value is an input to any digest: segment, chunk and
|
|
24
|
+
* manifest digests cover chunk bytes and manifest fields, and the protocol
|
|
25
|
+
* `revision_content_sha256` covers the envelope and rows. They label the
|
|
26
|
+
* encoding and are pinned by the row-set `CHECK` constraints.
|
|
27
|
+
*
|
|
28
|
+
* `adcp_jcs_rows_v1` names the per-row RFC 8785 canonicalization. The stored
|
|
29
|
+
* chunk layout is one canonical row per line (`jsonl`); the protocol content
|
|
30
|
+
* digest is still computed by the streaming hashers below.
|
|
31
|
+
*
|
|
32
|
+
* @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
|
|
33
|
+
*/
|
|
34
|
+
export declare const REPORTING_ROW_FORMAT_V1: "jsonl";
|
|
35
|
+
/**
|
|
36
|
+
* @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
|
|
37
|
+
*/
|
|
38
|
+
export declare const REPORTING_ROW_ALGORITHM_V1: "adcp_jcs_rows_v1";
|
|
39
|
+
/**
|
|
40
|
+
* @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
|
|
41
|
+
*/
|
|
21
42
|
export declare const REPORTING_ROW_SEGMENT_MAX_ROWS = 500;
|
|
43
|
+
/**
|
|
44
|
+
* @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
|
|
45
|
+
*/
|
|
22
46
|
export declare const REPORTING_ROW_CHUNK_MAX_SEGMENTS = 20;
|
|
47
|
+
/**
|
|
48
|
+
* @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
|
|
49
|
+
*/
|
|
23
50
|
export declare const REPORTING_ROW_CHUNK_MAX_ROWS: number;
|
|
51
|
+
/**
|
|
52
|
+
* @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
|
|
53
|
+
*/
|
|
24
54
|
export declare const REPORTING_ROW_CHUNK_MAX_BYTES: number;
|
|
55
|
+
/**
|
|
56
|
+
* @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
|
|
57
|
+
*/
|
|
25
58
|
export type ReportingRowEncodingErrorCode = 'INVALID_ROW' | 'MANIFEST_MISMATCH' | 'CHUNK_INTEGRITY_FAILED' | 'ENVELOPE_INTEGRITY_FAILED';
|
|
59
|
+
/**
|
|
60
|
+
* @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
|
|
61
|
+
*/
|
|
26
62
|
export declare class ReportingRowEncodingError extends Error {
|
|
27
63
|
readonly code: ReportingRowEncodingErrorCode;
|
|
28
64
|
constructor(code: ReportingRowEncodingErrorCode, detail: string);
|
|
29
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* @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
|
|
68
|
+
*/
|
|
30
69
|
export declare function isReportingRowEncodingError(error: unknown): error is ReportingRowEncodingError;
|
|
70
|
+
/**
|
|
71
|
+
* @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
|
|
72
|
+
*/
|
|
31
73
|
export interface ReportingRowSegmentManifestV1 {
|
|
32
74
|
first_ordinal: number;
|
|
33
75
|
row_count: number;
|
|
@@ -36,6 +78,9 @@ export interface ReportingRowSegmentManifestV1 {
|
|
|
36
78
|
byte_count: number;
|
|
37
79
|
sha256: string;
|
|
38
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* @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
|
|
83
|
+
*/
|
|
39
84
|
export interface ReportingRowChunkManifestV1 {
|
|
40
85
|
chunk_index: number;
|
|
41
86
|
first_ordinal: number;
|
|
@@ -44,13 +89,20 @@ export interface ReportingRowChunkManifestV1 {
|
|
|
44
89
|
sha256: string;
|
|
45
90
|
segments: ReportingRowSegmentManifestV1[];
|
|
46
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
|
+
*/
|
|
47
95
|
export interface ReportingRowChunkV1 {
|
|
48
96
|
manifest: ReportingRowChunkManifestV1;
|
|
49
97
|
/** Uncompressed canonical JSONL bytes. */
|
|
50
98
|
bytes: Buffer;
|
|
51
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* @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
|
|
102
|
+
*/
|
|
52
103
|
export interface ReportingEncodedRowsV1 {
|
|
53
|
-
|
|
104
|
+
format: typeof REPORTING_ROW_FORMAT_V1;
|
|
105
|
+
algorithm: typeof REPORTING_ROW_ALGORITHM_V1;
|
|
54
106
|
rowCount: number;
|
|
55
107
|
/** Total canonical JSONL bytes across all chunks. */
|
|
56
108
|
byteCount: number;
|
|
@@ -59,11 +111,17 @@ export interface ReportingEncodedRowsV1 {
|
|
|
59
111
|
/** `sha256(JCS(manifests))`; bound immutably on the revision header. */
|
|
60
112
|
rowManifestSha256: string;
|
|
61
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* @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
|
|
116
|
+
*/
|
|
62
117
|
export interface ReportingRevisionEnvelopeInputV1 {
|
|
63
118
|
reporting_revision_id: string;
|
|
64
119
|
row_count: number;
|
|
65
120
|
control_totals: readonly unknown[];
|
|
66
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* @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
|
|
124
|
+
*/
|
|
67
125
|
export interface ReportingRevisionEnvelopeDigestV1 {
|
|
68
126
|
sha256: string;
|
|
69
127
|
/** Byte length of the canonical envelope; equals `binding.byteCount`. */
|
|
@@ -73,17 +131,29 @@ export interface ReportingRevisionEnvelopeDigestV1 {
|
|
|
73
131
|
* Canonicalize one row for storage. Refuses values whose canonical bytes are
|
|
74
132
|
* not portable across conforming JCS implementations: non-plain objects,
|
|
75
133
|
* non-finite numbers, integers outside ±(2^53 − 1), and lone surrogates.
|
|
134
|
+
*
|
|
135
|
+
* @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
|
|
76
136
|
*/
|
|
77
137
|
export declare function canonicalReportingRowV1(row: unknown, ordinal?: number): string;
|
|
78
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* Encode rows into contract-fixed canonical JSONL chunks and manifests.
|
|
140
|
+
*
|
|
141
|
+
* @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
|
|
142
|
+
*/
|
|
79
143
|
export declare function encodeReportingRowsV1(rows: readonly unknown[]): ReportingEncodedRowsV1;
|
|
80
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* `sha256(JCS(manifests))` over the ordered chunk manifests, locators excluded.
|
|
146
|
+
*
|
|
147
|
+
* @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
|
|
148
|
+
*/
|
|
81
149
|
export declare function reportingRowManifestSha256V1(manifests: readonly ReportingRowChunkManifestV1[]): string;
|
|
82
150
|
/**
|
|
83
151
|
* Verify that a manifest set is internally consistent and matches the
|
|
84
152
|
* header's committed `row_manifest_sha256` and `row_count`. Ordinals must be
|
|
85
153
|
* contiguous from zero, chunk and segment boundaries must follow the contract
|
|
86
154
|
* limits, and segment byte ranges must tile their chunk exactly.
|
|
155
|
+
*
|
|
156
|
+
* @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
|
|
87
157
|
*/
|
|
88
158
|
export declare function verifyReportingRowManifestsV1(manifests: readonly ReportingRowChunkManifestV1[], expected: {
|
|
89
159
|
rowCount: number;
|
|
@@ -92,6 +162,8 @@ export declare function verifyReportingRowManifestsV1(manifests: readonly Report
|
|
|
92
162
|
/**
|
|
93
163
|
* Verify a whole chunk's canonical bytes against its manifest: total digest,
|
|
94
164
|
* byte count, and every segment's digest and line count.
|
|
165
|
+
*
|
|
166
|
+
* @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
|
|
95
167
|
*/
|
|
96
168
|
export declare function verifyReportingRowChunkV1(manifest: ReportingRowChunkManifestV1, bytes: Uint8Array): void;
|
|
97
169
|
/**
|
|
@@ -99,20 +171,32 @@ export declare function verifyReportingRowChunkV1(manifest: ReportingRowChunkMan
|
|
|
99
171
|
* (inclusive). `bytes` must hold exactly those segments' canonical bytes,
|
|
100
172
|
* starting at the first segment's `byte_offset` — the shape returned by a
|
|
101
173
|
* ranged object read. Rows are released only after every segment verifies.
|
|
174
|
+
*
|
|
175
|
+
* @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
|
|
102
176
|
*/
|
|
103
177
|
export declare function decodeVerifiedReportingRowSegmentsV1(manifest: ReportingRowChunkManifestV1, segmentRange: readonly [fromSegment: number, toSegment: number], bytes: Uint8Array): Record<string, unknown>[];
|
|
104
178
|
/**
|
|
105
179
|
* Streaming hasher for the protocol revision binding
|
|
106
180
|
* `sha256(JCS({reporting_revision_id, row_count, control_totals, reporting_rows}))`.
|
|
107
181
|
* Feed verified chunk bytes in order; rows are never parsed.
|
|
182
|
+
*
|
|
183
|
+
* @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
|
|
108
184
|
*/
|
|
109
185
|
export declare function createReportingRevisionEnvelopeHasherV1(envelope: ReportingRevisionEnvelopeInputV1): {
|
|
110
186
|
update(chunkBytes: Uint8Array): void;
|
|
111
187
|
digest(): ReportingRevisionEnvelopeDigestV1;
|
|
112
188
|
};
|
|
113
|
-
/**
|
|
189
|
+
/**
|
|
190
|
+
* Envelope digest over already-encoded chunk bytes.
|
|
191
|
+
*
|
|
192
|
+
* @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
|
|
193
|
+
*/
|
|
114
194
|
export declare function reportingRevisionEnvelopeDigestV1(envelope: ReportingRevisionEnvelopeInputV1, chunks: Iterable<Uint8Array>): ReportingRevisionEnvelopeDigestV1;
|
|
115
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* Streaming hasher for digest profile `rows_v1`: `sha256(JCS(rows))`.
|
|
197
|
+
*
|
|
198
|
+
* @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
|
|
199
|
+
*/
|
|
116
200
|
export declare function createReportingRowsOnlyHasherV1(rowCount: number): {
|
|
117
201
|
update(chunkBytes: Uint8Array): void;
|
|
118
202
|
digest(): ReportingRevisionEnvelopeDigestV1;
|
|
@@ -121,6 +205,8 @@ export declare function createReportingRowsOnlyHasherV1(rowCount: number): {
|
|
|
121
205
|
* Throw unless the canonical chunks reproduce the header's committed revision
|
|
122
206
|
* binding. Used at write time (proof that chunks and envelope agree) and for
|
|
123
207
|
* full-revision reads.
|
|
208
|
+
*
|
|
209
|
+
* @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
|
|
124
210
|
*/
|
|
125
211
|
export declare function assertReportingRevisionEnvelopeV1(envelope: ReportingRevisionEnvelopeInputV1, chunks: Iterable<Uint8Array>, expected: {
|
|
126
212
|
sha256: string;
|
|
@@ -18,10 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var row_encoding_exports = {};
|
|
20
20
|
__export(row_encoding_exports, {
|
|
21
|
+
REPORTING_ROW_ALGORITHM_V1: () => REPORTING_ROW_ALGORITHM_V1,
|
|
21
22
|
REPORTING_ROW_CHUNK_MAX_BYTES: () => REPORTING_ROW_CHUNK_MAX_BYTES,
|
|
22
23
|
REPORTING_ROW_CHUNK_MAX_ROWS: () => REPORTING_ROW_CHUNK_MAX_ROWS,
|
|
23
24
|
REPORTING_ROW_CHUNK_MAX_SEGMENTS: () => REPORTING_ROW_CHUNK_MAX_SEGMENTS,
|
|
24
|
-
|
|
25
|
+
REPORTING_ROW_FORMAT_V1: () => REPORTING_ROW_FORMAT_V1,
|
|
25
26
|
REPORTING_ROW_SEGMENT_MAX_ROWS: () => REPORTING_ROW_SEGMENT_MAX_ROWS,
|
|
26
27
|
ReportingRowEncodingError: () => ReportingRowEncodingError,
|
|
27
28
|
assertReportingRevisionEnvelopeV1: () => assertReportingRevisionEnvelopeV1,
|
|
@@ -39,7 +40,8 @@ __export(row_encoding_exports, {
|
|
|
39
40
|
module.exports = __toCommonJS(row_encoding_exports);
|
|
40
41
|
var import_crypto = require("crypto");
|
|
41
42
|
var import_jcs = require('../../utils/jcs.js');
|
|
42
|
-
const
|
|
43
|
+
const REPORTING_ROW_FORMAT_V1 = "jsonl";
|
|
44
|
+
const REPORTING_ROW_ALGORITHM_V1 = "adcp_jcs_rows_v1";
|
|
43
45
|
const REPORTING_ROW_SEGMENT_MAX_ROWS = 500;
|
|
44
46
|
const REPORTING_ROW_CHUNK_MAX_SEGMENTS = 20;
|
|
45
47
|
const REPORTING_ROW_CHUNK_MAX_ROWS = REPORTING_ROW_SEGMENT_MAX_ROWS * REPORTING_ROW_CHUNK_MAX_SEGMENTS;
|
|
@@ -101,7 +103,8 @@ function encodeReportingRowsV1(rows) {
|
|
|
101
103
|
closeChunk();
|
|
102
104
|
const manifests = chunks.map((chunk) => chunk.manifest);
|
|
103
105
|
return {
|
|
104
|
-
|
|
106
|
+
format: REPORTING_ROW_FORMAT_V1,
|
|
107
|
+
algorithm: REPORTING_ROW_ALGORITHM_V1,
|
|
105
108
|
rowCount: rows.length,
|
|
106
109
|
byteCount: chunks.reduce((total, chunk) => total + chunk.manifest.byte_count, 0),
|
|
107
110
|
chunks,
|
|
@@ -335,10 +338,11 @@ function sha256Hex(value) {
|
|
|
335
338
|
}
|
|
336
339
|
// Annotate the CommonJS export names for ESM import in node:
|
|
337
340
|
0 && (module.exports = {
|
|
341
|
+
REPORTING_ROW_ALGORITHM_V1,
|
|
338
342
|
REPORTING_ROW_CHUNK_MAX_BYTES,
|
|
339
343
|
REPORTING_ROW_CHUNK_MAX_ROWS,
|
|
340
344
|
REPORTING_ROW_CHUNK_MAX_SEGMENTS,
|
|
341
|
-
|
|
345
|
+
REPORTING_ROW_FORMAT_V1,
|
|
342
346
|
REPORTING_ROW_SEGMENT_MAX_ROWS,
|
|
343
347
|
ReportingRowEncodingError,
|
|
344
348
|
assertReportingRevisionEnvelopeV1,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createHash } from "crypto";
|
|
2
2
|
import { canonicalize } from "../../utils/jcs.mjs";
|
|
3
|
-
const
|
|
3
|
+
const REPORTING_ROW_FORMAT_V1 = "jsonl";
|
|
4
|
+
const REPORTING_ROW_ALGORITHM_V1 = "adcp_jcs_rows_v1";
|
|
4
5
|
const REPORTING_ROW_SEGMENT_MAX_ROWS = 500;
|
|
5
6
|
const REPORTING_ROW_CHUNK_MAX_SEGMENTS = 20;
|
|
6
7
|
const REPORTING_ROW_CHUNK_MAX_ROWS = REPORTING_ROW_SEGMENT_MAX_ROWS * REPORTING_ROW_CHUNK_MAX_SEGMENTS;
|
|
@@ -62,7 +63,8 @@ function encodeReportingRowsV1(rows) {
|
|
|
62
63
|
closeChunk();
|
|
63
64
|
const manifests = chunks.map((chunk) => chunk.manifest);
|
|
64
65
|
return {
|
|
65
|
-
|
|
66
|
+
format: REPORTING_ROW_FORMAT_V1,
|
|
67
|
+
algorithm: REPORTING_ROW_ALGORITHM_V1,
|
|
66
68
|
rowCount: rows.length,
|
|
67
69
|
byteCount: chunks.reduce((total, chunk) => total + chunk.manifest.byte_count, 0),
|
|
68
70
|
chunks,
|
|
@@ -295,10 +297,11 @@ function sha256Hex(value) {
|
|
|
295
297
|
return createHash("sha256").update(value).digest("hex");
|
|
296
298
|
}
|
|
297
299
|
export {
|
|
300
|
+
REPORTING_ROW_ALGORITHM_V1,
|
|
298
301
|
REPORTING_ROW_CHUNK_MAX_BYTES,
|
|
299
302
|
REPORTING_ROW_CHUNK_MAX_ROWS,
|
|
300
303
|
REPORTING_ROW_CHUNK_MAX_SEGMENTS,
|
|
301
|
-
|
|
304
|
+
REPORTING_ROW_FORMAT_V1,
|
|
302
305
|
REPORTING_ROW_SEGMENT_MAX_ROWS,
|
|
303
306
|
ReportingRowEncodingError,
|
|
304
307
|
assertReportingRevisionEnvelopeV1,
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @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
|
|
3
|
+
*/
|
|
1
4
|
export type ReportingRowStoreErrorCode = 'INVALID_INPUT' | 'CONTENT_CONFLICT' | 'ROWS_INTEGRITY_FAILED' | 'ROWS_UNAVAILABLE' | 'ROWS_EXPIRED' | 'PROVIDER_UNAVAILABLE' | 'DEADLINE_EXCEEDED' | 'ABORTED' | 'UNSAFE_BINDING' | 'STATE_UNAVAILABLE';
|
|
2
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Stable, secret-free row-storage failure. Switch on `code`.
|
|
7
|
+
*
|
|
8
|
+
* @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
|
|
9
|
+
*/
|
|
3
10
|
export declare class ReportingRowStoreError extends Error {
|
|
4
11
|
readonly code: ReportingRowStoreErrorCode;
|
|
5
12
|
constructor(code: ReportingRowStoreErrorCode, detail?: string);
|
|
6
13
|
}
|
|
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
|
+
*/
|
|
7
17
|
export declare function isReportingRowStoreError(error: unknown): error is ReportingRowStoreError;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @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
|
|
3
|
+
*/
|
|
1
4
|
export type ReportingRowStoreErrorCode = 'INVALID_INPUT' | 'CONTENT_CONFLICT' | 'ROWS_INTEGRITY_FAILED' | 'ROWS_UNAVAILABLE' | 'ROWS_EXPIRED' | 'PROVIDER_UNAVAILABLE' | 'DEADLINE_EXCEEDED' | 'ABORTED' | 'UNSAFE_BINDING' | 'STATE_UNAVAILABLE';
|
|
2
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Stable, secret-free row-storage failure. Switch on `code`.
|
|
7
|
+
*
|
|
8
|
+
* @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
|
|
9
|
+
*/
|
|
3
10
|
export declare class ReportingRowStoreError extends Error {
|
|
4
11
|
readonly code: ReportingRowStoreErrorCode;
|
|
5
12
|
constructor(code: ReportingRowStoreErrorCode, detail?: string);
|
|
6
13
|
}
|
|
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
|
+
*/
|
|
7
17
|
export declare function isReportingRowStoreError(error: unknown): error is ReportingRowStoreError;
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
* (`gen_random_uuid()`, `sha256()`). Idempotent; reapplying preserves the
|
|
7
7
|
* installation identity and every recorded location.
|
|
8
8
|
*
|
|
9
|
+
* Stored values use AdCP's names and bounds (`reporting-file-manifest.json`,
|
|
10
|
+
* `reporting-file-entry.json`): `object_ref` and `native_version_ref` are 1 to
|
|
11
|
+
* 1024 characters, `size_bytes` is the stored object's size, and the row-set
|
|
12
|
+
* `format` / `algorithm` are `jsonl` / `adcp_jcs_rows_v1`. A database created by
|
|
13
|
+
* an earlier 15.x release (`object_key`, `native_version`, `byte_count`,
|
|
14
|
+
* `physical_byte_count`, `canonical_byte_count`, `encoding`) is renamed in place
|
|
15
|
+
* by the first block below; the migration also rewrites any open write
|
|
16
|
+
* intent's `created_objects`. Recorded object keys are not rewritten. Adopters
|
|
17
|
+
* who have not activated row storage should re-sync instead.
|
|
18
|
+
*
|
|
9
19
|
* - `adcp_persistence_installation` holds one installation UUID per isolated
|
|
10
20
|
* schema. A restore of the same authority keeps it; an independently
|
|
11
21
|
* writable clone must mint a new one before it writes or sweeps.
|
|
@@ -22,9 +32,15 @@
|
|
|
22
32
|
* predecessor's rows share bodies.
|
|
23
33
|
* - `adcp_reporting_row_write_intents` fences external uploads so a sweep
|
|
24
34
|
* never deletes bytes a committing writer still needs.
|
|
35
|
+
*
|
|
36
|
+
* @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
|
|
25
37
|
*/
|
|
26
38
|
export declare const REPORTING_ROW_STORAGE_MIGRATION: string;
|
|
27
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Tables {@link REPORTING_ROW_STORAGE_MIGRATION} creates, in dependency order.
|
|
41
|
+
*
|
|
42
|
+
* @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
|
|
43
|
+
*/
|
|
28
44
|
export declare const REPORTING_ROW_STORAGE_TABLES: readonly ["adcp_persistence_installation", "adcp_reporting_row_bindings", "adcp_reporting_row_sets", "adcp_reporting_row_chunks", "adcp_reporting_chunk_bodies", "adcp_reporting_row_write_intents"];
|
|
29
45
|
interface QueryablePoolV1 {
|
|
30
46
|
query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
|
|
@@ -34,6 +50,8 @@ interface QueryablePoolV1 {
|
|
|
34
50
|
/**
|
|
35
51
|
* Fail closed unless every row-storage table exists in the current schema.
|
|
36
52
|
* Returns the installation identity.
|
|
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
|
|
37
55
|
*/
|
|
38
56
|
export declare function probeReportingRowStorageSchemaV1(pool: QueryablePoolV1): Promise<{
|
|
39
57
|
installationId: string;
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
* (`gen_random_uuid()`, `sha256()`). Idempotent; reapplying preserves the
|
|
7
7
|
* installation identity and every recorded location.
|
|
8
8
|
*
|
|
9
|
+
* Stored values use AdCP's names and bounds (`reporting-file-manifest.json`,
|
|
10
|
+
* `reporting-file-entry.json`): `object_ref` and `native_version_ref` are 1 to
|
|
11
|
+
* 1024 characters, `size_bytes` is the stored object's size, and the row-set
|
|
12
|
+
* `format` / `algorithm` are `jsonl` / `adcp_jcs_rows_v1`. A database created by
|
|
13
|
+
* an earlier 15.x release (`object_key`, `native_version`, `byte_count`,
|
|
14
|
+
* `physical_byte_count`, `canonical_byte_count`, `encoding`) is renamed in place
|
|
15
|
+
* by the first block below; the migration also rewrites any open write
|
|
16
|
+
* intent's `created_objects`. Recorded object keys are not rewritten. Adopters
|
|
17
|
+
* who have not activated row storage should re-sync instead.
|
|
18
|
+
*
|
|
9
19
|
* - `adcp_persistence_installation` holds one installation UUID per isolated
|
|
10
20
|
* schema. A restore of the same authority keeps it; an independently
|
|
11
21
|
* writable clone must mint a new one before it writes or sweeps.
|
|
@@ -22,9 +32,15 @@
|
|
|
22
32
|
* predecessor's rows share bodies.
|
|
23
33
|
* - `adcp_reporting_row_write_intents` fences external uploads so a sweep
|
|
24
34
|
* never deletes bytes a committing writer still needs.
|
|
35
|
+
*
|
|
36
|
+
* @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
|
|
25
37
|
*/
|
|
26
38
|
export declare const REPORTING_ROW_STORAGE_MIGRATION: string;
|
|
27
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Tables {@link REPORTING_ROW_STORAGE_MIGRATION} creates, in dependency order.
|
|
41
|
+
*
|
|
42
|
+
* @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
|
|
43
|
+
*/
|
|
28
44
|
export declare const REPORTING_ROW_STORAGE_TABLES: readonly ["adcp_persistence_installation", "adcp_reporting_row_bindings", "adcp_reporting_row_sets", "adcp_reporting_row_chunks", "adcp_reporting_chunk_bodies", "adcp_reporting_row_write_intents"];
|
|
29
45
|
interface QueryablePoolV1 {
|
|
30
46
|
query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
|
|
@@ -34,6 +50,8 @@ interface QueryablePoolV1 {
|
|
|
34
50
|
/**
|
|
35
51
|
* Fail closed unless every row-storage table exists in the current schema.
|
|
36
52
|
* Returns the installation identity.
|
|
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
|
|
37
55
|
*/
|
|
38
56
|
export declare function probeReportingRowStorageSchemaV1(pool: QueryablePoolV1): Promise<{
|
|
39
57
|
installationId: string;
|