@adcp/sdk 15.9.1 → 16.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +25 -2
- package/dist/lib/core/SingleAgentClient.d.ts +25 -2
- package/dist/lib/core/SingleAgentClient.js +280 -62
- package/dist/lib/core/SingleAgentClient.mjs +282 -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/generated-compat.d.mts +34 -0
- package/dist/lib/identity-3.3/generated-compat.d.ts +34 -0
- package/dist/lib/identity-3.3/generated-compat.js +16 -0
- package/dist/lib/identity-3.3/generated-compat.mjs +0 -0
- 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 +79 -0
- package/dist/lib/identity-3.3/index.mjs +50 -0
- package/dist/lib/identity-3.3/lifecycle.d.mts +125 -0
- package/dist/lib/identity-3.3/lifecycle.d.ts +125 -0
- package/dist/lib/identity-3.3/lifecycle.js +294 -0
- package/dist/lib/identity-3.3/lifecycle.mjs +272 -0
- package/dist/lib/identity-3.3/revocation.d.mts +86 -0
- package/dist/lib/identity-3.3/revocation.d.ts +86 -0
- package/dist/lib/identity-3.3/revocation.js +308 -0
- package/dist/lib/identity-3.3/revocation.mjs +286 -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 +46 -0
- package/dist/lib/identity-3.3/server.d.ts +46 -0
- package/dist/lib/identity-3.3/server.js +279 -0
- package/dist/lib/identity-3.3/server.mjs +260 -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 +155 -0
- package/dist/lib/identity-3.3/trust.d.ts +155 -0
- package/dist/lib/identity-3.3/trust.js +383 -0
- package/dist/lib/identity-3.3/trust.mjs +342 -0
- package/dist/lib/identity-3.3/types.d.mts +155 -0
- package/dist/lib/identity-3.3/types.d.ts +155 -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/index.js +2 -0
- package/dist/lib/index.mjs +2 -0
- package/dist/lib/protocols/index.d.mts +1 -1
- package/dist/lib/protocols/index.d.ts +1 -1
- package/dist/lib/protocols/index.js +2 -2
- package/dist/lib/protocols/index.mjs +2 -2
- 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 +39 -5
- package/dist/lib/reporting/bigquery/index.d.ts +39 -5
- package/dist/lib/reporting/bigquery/index.js +26 -20
- package/dist/lib/reporting/bigquery/index.mjs +26 -20
- 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 +15 -0
- package/dist/lib/server/auth-signature.d.ts +15 -0
- package/dist/lib/server/auth-signature.js +72 -2
- package/dist/lib/server/auth-signature.mjs +81 -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 +259 -19
- package/dist/lib/server/create-adcp-server.mjs +266 -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/crypto.js +8 -0
- package/dist/lib/signing/crypto.mjs +9 -1
- package/dist/lib/signing/fetch-async.js +1 -1
- package/dist/lib/signing/fetch-async.mjs +1 -1
- package/dist/lib/signing/fetch.js +1 -1
- package/dist/lib/signing/fetch.mjs +1 -1
- 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/middleware.js +9 -0
- package/dist/lib/signing/middleware.mjs +14 -0
- package/dist/lib/signing/parser.d.mts +9 -6
- package/dist/lib/signing/parser.d.ts +9 -6
- package/dist/lib/signing/parser.js +82 -64
- package/dist/lib/signing/parser.mjs +83 -65
- package/dist/lib/signing/revocation.d.mts +4 -1
- package/dist/lib/signing/revocation.d.ts +4 -1
- package/dist/lib/signing/revocation.js +36 -3
- package/dist/lib/signing/revocation.mjs +34 -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/verifier.js +1 -1
- package/dist/lib/signing/verifier.mjs +1 -1
- package/dist/lib/signing/web-bot-auth.d.mts +191 -0
- package/dist/lib/signing/web-bot-auth.d.ts +191 -0
- package/dist/lib/signing/web-bot-auth.js +837 -0
- package/dist/lib/signing/web-bot-auth.mjs +796 -0
- package/dist/lib/signing/webhook-verifier.js +1 -1
- package/dist/lib/signing/webhook-verifier.mjs +1 -1
- 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/catalog-snapshot.js +3 -1
- package/dist/lib/v2/projection/catalog-snapshot.mjs +3 -1
- package/dist/lib/v2/projection/creative-delivery.d.mts +34 -10
- package/dist/lib/v2/projection/creative-delivery.d.ts +34 -10
- 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/index.js +2 -0
- package/dist/lib/v2/projection/index.mjs +2 -0
- package/dist/lib/v2/projection/legacy-routes.d.mts +34 -2
- package/dist/lib/v2/projection/legacy-routes.d.ts +34 -2
- package/dist/lib/v2/projection/legacy-routes.js +35 -2
- package/dist/lib/v2/projection/legacy-routes.mjs +32 -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 +99 -29
- package/docs/guides/REPORTING-OPERATIONS.md +29 -13
- 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 +15 -0
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +494 -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 +17 -1
|
@@ -9,7 +9,11 @@ import { type ReportingRowObjectProviderV1 } from './row-storage-object';
|
|
|
9
9
|
*/
|
|
10
10
|
export { ReportingRowStoreError, isReportingRowStoreError } from './row-storage-errors';
|
|
11
11
|
export type { ReportingRowStoreErrorCode } from './row-storage-errors';
|
|
12
|
-
/**
|
|
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
|
+
*/
|
|
13
17
|
export interface ReportingPostgresRowBindingV1 {
|
|
14
18
|
kind: 'postgres';
|
|
15
19
|
}
|
|
@@ -18,6 +22,8 @@ export interface ReportingPostgresRowBindingV1 {
|
|
|
18
22
|
* definition lives in host code, which makes it the allowlist: a row set
|
|
19
23
|
* whose recorded binding identity differs from the configured definition is
|
|
20
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
|
|
21
27
|
*/
|
|
22
28
|
export interface ReportingObjectRowBindingV1 {
|
|
23
29
|
kind: 'object';
|
|
@@ -27,22 +33,41 @@ export interface ReportingObjectRowBindingV1 {
|
|
|
27
33
|
location: Readonly<Record<string, string>>;
|
|
28
34
|
/** Owned key prefix. Sweeps and deletes never touch keys outside it. */
|
|
29
35
|
prefix: string;
|
|
30
|
-
/**
|
|
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
|
+
*/
|
|
31
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;
|
|
32
48
|
/** Stored encoding; digests always cover uncompressed bytes. Default `gzip`. */
|
|
33
49
|
compression?: 'none' | 'gzip';
|
|
34
50
|
/** Host-mapped client reference passed to the provider; never a secret. */
|
|
35
51
|
credentialRef?: string;
|
|
36
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
|
+
*/
|
|
37
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
|
+
*/
|
|
38
60
|
export interface ReportingRowBindingSelectionInputV1 {
|
|
39
61
|
account_id: string;
|
|
40
62
|
reporting_obligation_id: string;
|
|
41
63
|
row_set_kind: 'revision' | 'adjustment';
|
|
42
64
|
finality?: 'snapshot' | 'official';
|
|
43
65
|
row_count: number;
|
|
44
|
-
|
|
66
|
+
content_size_bytes: number;
|
|
45
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
|
+
*/
|
|
46
71
|
export interface ReportingRowStorageOptionsV1 {
|
|
47
72
|
/**
|
|
48
73
|
* Logical binding ID → immutable definition. Defaults to a single
|
|
@@ -64,6 +89,9 @@ export interface ReportingRowStorageOptionsV1 {
|
|
|
64
89
|
/** Deadline for one object read. Default 30 seconds. */
|
|
65
90
|
readDeadlineMilliseconds?: number;
|
|
66
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
|
+
*/
|
|
67
95
|
export interface ReportingRowSetPrepareInputV1 {
|
|
68
96
|
rowSetId: string;
|
|
69
97
|
rowSetKind: 'revision' | 'adjustment';
|
|
@@ -71,8 +99,10 @@ export interface ReportingRowSetPrepareInputV1 {
|
|
|
71
99
|
obligationId: string;
|
|
72
100
|
rows: readonly Record<string, unknown>[];
|
|
73
101
|
finality?: 'snapshot' | 'official';
|
|
74
|
-
/** Reporting period start, used for `{period_date}` in object keys. */
|
|
102
|
+
/** Reporting period start, used with `sourceTimezone` for `{period_date}` in object keys. */
|
|
75
103
|
periodStart?: string;
|
|
104
|
+
/** The period's `source_timezone` (required with `periodStart`): `{period_date}` is the local calendar date. */
|
|
105
|
+
sourceTimezone?: string;
|
|
76
106
|
/** Committed protocol binding the chunks must reproduce. */
|
|
77
107
|
binding: {
|
|
78
108
|
sha256: string;
|
|
@@ -85,11 +115,14 @@ export interface ReportingRowSetPrepareInputV1 {
|
|
|
85
115
|
bindingId?: string;
|
|
86
116
|
}
|
|
87
117
|
interface PreparedObjectV1 {
|
|
88
|
-
readonly
|
|
118
|
+
readonly objectRef: string;
|
|
89
119
|
readonly physicalBytes: Buffer;
|
|
90
120
|
readonly physicalSha256: string;
|
|
91
121
|
readonly compression: 'none' | 'gzip';
|
|
92
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
|
+
*/
|
|
93
126
|
export interface ReportingPreparedRowSetV1 {
|
|
94
127
|
readonly input: ReportingRowSetPrepareInputV1;
|
|
95
128
|
readonly encoded: ReportingEncodedRowsV1;
|
|
@@ -99,13 +132,21 @@ export interface ReportingPreparedRowSetV1 {
|
|
|
99
132
|
/** Object kind only: one planned object per chunk. */
|
|
100
133
|
readonly objects?: readonly PreparedObjectV1[];
|
|
101
134
|
}
|
|
102
|
-
/**
|
|
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
|
+
*/
|
|
103
140
|
export interface ReportingRowChunkLocatorV1 {
|
|
104
|
-
|
|
105
|
-
|
|
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;
|
|
106
145
|
compression: 'none' | 'gzip';
|
|
146
|
+
/** SHA-256 of the stored (possibly compressed) object bytes. */
|
|
107
147
|
physicalSha256: string;
|
|
108
|
-
|
|
148
|
+
/** AdCP `size_bytes`: the stored object's size, after any compression. */
|
|
149
|
+
sizeBytes: number;
|
|
109
150
|
/** Whether this upload created the object (as opposed to adopting identical bytes). */
|
|
110
151
|
created: boolean;
|
|
111
152
|
}
|
|
@@ -115,7 +156,11 @@ interface QueryableV1 {
|
|
|
115
156
|
rowCount?: number | null;
|
|
116
157
|
}>;
|
|
117
158
|
}
|
|
118
|
-
/**
|
|
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
|
+
*/
|
|
119
164
|
export interface ReportingRowSetHandleV1 {
|
|
120
165
|
readonly rowSetId: string;
|
|
121
166
|
readonly rowSetKind: 'revision' | 'adjustment';
|
|
@@ -123,7 +168,11 @@ export interface ReportingRowSetHandleV1 {
|
|
|
123
168
|
readonly obligationId: string;
|
|
124
169
|
readonly digestProfile: 'revision_envelope_v1' | 'rows_v1';
|
|
125
170
|
readonly contentSha256: string;
|
|
126
|
-
|
|
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;
|
|
127
176
|
readonly rowCount: number;
|
|
128
177
|
readonly rowManifestSha256: string;
|
|
129
178
|
readonly bindingId: string;
|
|
@@ -138,6 +187,8 @@ export interface ReportingRowSetHandleV1 {
|
|
|
138
187
|
* available once the row-storage migration is applied; object-kind reads need
|
|
139
188
|
* the binding and its provider configured. Writes require an explicit opt-in
|
|
140
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
|
|
141
192
|
*/
|
|
142
193
|
export declare class ReportingRowStorageV1 {
|
|
143
194
|
private readonly pool;
|
|
@@ -152,12 +203,17 @@ export declare class ReportingRowStorageV1 {
|
|
|
152
203
|
constructor(pool: QueryableV1, options?: ReportingRowStorageOptionsV1);
|
|
153
204
|
/** Deadline budget a writer must still hold on its lease before uploading. */
|
|
154
205
|
get writeDeadlineMilliseconds(): number;
|
|
206
|
+
/** Every writable object binding's key template must include `{revision_key}`; throws `INVALID_INPUT`. */
|
|
207
|
+
private assertBindingKeyTemplates;
|
|
155
208
|
/**
|
|
156
209
|
* Refuse a configuration in which compaction could delete an object a concurrent commit is
|
|
157
210
|
* adopting. An object binding whose key template omits `{revision_key}` can map two revisions
|
|
158
211
|
* with identical chunk content to one object key, and a create-only write adopts an existing
|
|
159
212
|
* object with identical bytes. Compaction deleting that object at the same moment would leave
|
|
160
|
-
* the newer revision without its rows.
|
|
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.
|
|
161
217
|
*
|
|
162
218
|
* Since the reference-checked, per-object-locked delete this is no longer the only guard: every
|
|
163
219
|
* delete path now skips an object another row set still references. It is kept as defense in
|
|
@@ -178,8 +234,8 @@ export declare class ReportingRowStorageV1 {
|
|
|
178
234
|
* write intent.
|
|
179
235
|
*/
|
|
180
236
|
upload(prepared: ReportingPreparedRowSetV1, intentId: string, onCreated: (object: {
|
|
181
|
-
|
|
182
|
-
|
|
237
|
+
objectRef: string;
|
|
238
|
+
nativeVersionRef: string;
|
|
183
239
|
}) => Promise<void>, signal?: AbortSignal): Promise<ReportingRowChunkLocatorV1[]>;
|
|
184
240
|
/**
|
|
185
241
|
* Persist a prepared row set inside the caller's ledger transaction:
|
|
@@ -210,19 +266,26 @@ export declare class ReportingRowStorageV1 {
|
|
|
210
266
|
* `absent` counts as success. Only object-kind bindings are accepted.
|
|
211
267
|
*/
|
|
212
268
|
deleteObjects(bindingId: string, objects: readonly {
|
|
213
|
-
|
|
214
|
-
|
|
269
|
+
objectRef: string;
|
|
270
|
+
nativeVersionRef: string;
|
|
215
271
|
}[], signal?: AbortSignal): Promise<void>;
|
|
216
272
|
/**
|
|
217
|
-
* Prove each object is still present at its recorded version with the recorded
|
|
273
|
+
* Prove each object is still present at its recorded version with the recorded size.
|
|
218
274
|
* A commit that adopted an object another row set created calls this under the object's
|
|
219
275
|
* lock, so a concurrent delete either finished first (this throws, the commit fails and
|
|
220
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.
|
|
221
283
|
*/
|
|
222
284
|
assertObjectsPresent(bindingId: string, objects: readonly {
|
|
223
|
-
|
|
224
|
-
|
|
285
|
+
objectRef: string;
|
|
286
|
+
nativeVersionRef: string;
|
|
225
287
|
physicalSha256: string;
|
|
288
|
+
sizeBytes: number;
|
|
226
289
|
}[], signal?: AbortSignal): Promise<void>;
|
|
227
290
|
/**
|
|
228
291
|
* A live row set in the same obligation and binding whose rows are
|
|
@@ -245,5 +308,9 @@ export declare class ReportingRowStorageV1 {
|
|
|
245
308
|
private provider;
|
|
246
309
|
private register;
|
|
247
310
|
}
|
|
248
|
-
/**
|
|
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
|
+
*/
|
|
249
316
|
export declare function reportingRowWriteIntentIdV1(): string;
|