@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
|
@@ -24,9 +24,17 @@ import type { PostgresReportingLedgerStore, ReportingLedgerRevisionMetadataV1, R
|
|
|
24
24
|
* Concurrent runs claim one durable plan with compare-and-swap. Replays of
|
|
25
25
|
* that plan share job IDs; stale runs cannot change its attempts or cursor.
|
|
26
26
|
*/
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Apply after `REPORTING_LEDGER_CHANGES_MIGRATION`. Holds one row per sink.
|
|
29
|
+
*
|
|
30
|
+
* @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
|
|
31
|
+
*/
|
|
28
32
|
export declare const REPORTING_WAREHOUSE_SINK_MIGRATION: string;
|
|
29
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Structural subset of the official `@google-cloud/bigquery` client the sink uses.
|
|
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
|
+
*/
|
|
30
38
|
export interface ReportingBigQueryClientV1 {
|
|
31
39
|
dataset(datasetId: string, options?: {
|
|
32
40
|
projectId?: string;
|
|
@@ -49,10 +57,16 @@ export interface ReportingBigQueryClientV1 {
|
|
|
49
57
|
location?: string;
|
|
50
58
|
}): Promise<unknown>;
|
|
51
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @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
|
|
62
|
+
*/
|
|
52
63
|
export interface ReportingWarehouseRowContextV1 {
|
|
53
64
|
revision: ReportingLedgerRevisionMetadataV1;
|
|
54
65
|
ordinal: number;
|
|
55
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* @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
|
|
69
|
+
*/
|
|
56
70
|
export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
57
71
|
/** Ledger store with `changeFeed: true`. */
|
|
58
72
|
store: Pick<PostgresReportingLedgerStore, 'changesAfter' | 'getRevisionMetadata' | 'readRevisionRows'> & {
|
|
@@ -90,7 +104,9 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
90
104
|
/**
|
|
91
105
|
* Map one verified report row to the adopter's columns. The sink always adds
|
|
92
106
|
* `reporting_revision_id`, `reporting_obligation_id`, `account_id`,
|
|
93
|
-
* `revision_number`, `finality`, `period_date`
|
|
107
|
+
* `revision_number`, `finality`, `period_date` (the period start's calendar date in its
|
|
108
|
+
* `source_timezone`, AdCP's `YYYY-MM-DD`; the batch fails if it cannot be computed) and
|
|
109
|
+
* `ordinal`. Default: the
|
|
94
110
|
* row as a `row` JSON column.
|
|
95
111
|
*/
|
|
96
112
|
mapRow?(row: Record<string, unknown>, context: ReportingWarehouseRowContextV1): Record<string, unknown>;
|
|
@@ -128,6 +144,9 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
128
144
|
*/
|
|
129
145
|
loadTimeoutMilliseconds?: number;
|
|
130
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* @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
|
|
149
|
+
*/
|
|
131
150
|
export interface BigQueryReportingWarehouseSinkV1 {
|
|
132
151
|
/**
|
|
133
152
|
* Load at most one batch. Resolves with what was loaded; `idle` when no
|
|
@@ -185,13 +204,22 @@ export interface BigQueryReportingWarehouseSinkV1 {
|
|
|
185
204
|
/** DDL for the reference `current_rows` view. */
|
|
186
205
|
readonly currentRowsViewSql: string;
|
|
187
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* @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
|
|
209
|
+
*/
|
|
188
210
|
export declare function createBigQueryReportingWarehouseSinkV1(options: CreateBigQueryReportingWarehouseSinkOptionsV1): BigQueryReportingWarehouseSinkV1;
|
|
189
211
|
/**
|
|
190
212
|
* How long one run may upload a file or wait for a running job: the configured
|
|
191
213
|
* base doubled once per earlier timeout of that table's load, capped at 6 hours.
|
|
214
|
+
*
|
|
215
|
+
* @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
216
|
*/
|
|
193
217
|
export declare function reportingWarehouseLoadDeadlineV1(baseMilliseconds: number, timeouts: number): number;
|
|
194
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* Deterministic load job ID for one planned change-feed range.
|
|
220
|
+
*
|
|
221
|
+
* @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
|
|
222
|
+
*/
|
|
195
223
|
export declare function reportingWarehouseJobIdV1(name: string, from: string | null, to: string, generation?: number): string;
|
|
196
224
|
interface WarehouseTablesV1 {
|
|
197
225
|
projectId?: string;
|
|
@@ -199,12 +227,18 @@ interface WarehouseTablesV1 {
|
|
|
199
227
|
rowsTableId: string;
|
|
200
228
|
revisionsTableId: string;
|
|
201
229
|
}
|
|
202
|
-
/**
|
|
230
|
+
/**
|
|
231
|
+
* DDL for the default warehouse tables: partitioned by period date, clustered by account and revision.
|
|
232
|
+
*
|
|
233
|
+
* @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
|
|
234
|
+
*/
|
|
203
235
|
export declare function reportingWarehouseDefaultTablesSqlV1(tables: WarehouseTablesV1): string;
|
|
204
236
|
/**
|
|
205
237
|
* DDL for the reference `current_rows` view: only each obligation's current
|
|
206
238
|
* revision (its official revision, otherwise its latest snapshot). Summing
|
|
207
239
|
* cumulative snapshots across revisions double-counts; query this view.
|
|
240
|
+
*
|
|
241
|
+
* @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
|
|
208
242
|
*/
|
|
209
243
|
export declare function reportingWarehouseCurrentRowsViewSqlV1(tables: WarehouseTablesV1 & {
|
|
210
244
|
viewId?: string;
|
|
@@ -41,6 +41,7 @@ var import_fs = require("fs");
|
|
|
41
41
|
var import_os = require("os");
|
|
42
42
|
var path = __toESM(require("path"));
|
|
43
43
|
var import_change_feed = require('../ledger/change-feed.js');
|
|
44
|
+
var import_schedule = require('../ledger/schedule.js');
|
|
44
45
|
const REPORTING_WAREHOUSE_SINK_MIGRATION = `
|
|
45
46
|
CREATE TABLE IF NOT EXISTS adcp_reporting_warehouse_sinks (
|
|
46
47
|
sink_name TEXT PRIMARY KEY CHECK (sink_name ~ '^[A-Za-z0-9_.:-]{1,128}$'),
|
|
@@ -66,6 +67,7 @@ ALTER TABLE adcp_reporting_warehouse_sinks
|
|
|
66
67
|
const MAX_LOAD_TIMEOUT = 6 * 36e5;
|
|
67
68
|
const MAX_TIMEOUT_DOUBLINGS = 16;
|
|
68
69
|
let warnedLabelsIgnored = false;
|
|
70
|
+
let warnedLocationUnset = false;
|
|
69
71
|
const PROJECT = /^[a-z][a-z0-9-]{4,61}[a-z0-9]$/;
|
|
70
72
|
const DATASET_OR_TABLE = /^[A-Za-z_][A-Za-z0-9_]{0,1023}$/;
|
|
71
73
|
const NAME = /^[A-Za-z0-9_.:-]{1,128}$/;
|
|
@@ -96,6 +98,13 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
96
98
|
{ code: "ADCP_BIGQUERY_SINK_LABELS_IGNORED", type: "DeprecationWarning" }
|
|
97
99
|
);
|
|
98
100
|
}
|
|
101
|
+
if (!options.location && !warnedLocationUnset) {
|
|
102
|
+
warnedLocationUnset = true;
|
|
103
|
+
process.emitWarning(
|
|
104
|
+
'BigQuery warehouse sink option `location` is not set. Replay lookups of load jobs need it for datasets outside the US and EU multi-regions: without it BigQuery answers 404, the sink uploads again, gets a 409, and then fails with a "check projectId and location" error.',
|
|
105
|
+
{ code: "ADCP_BIGQUERY_SINK_LOCATION_UNSET" }
|
|
106
|
+
);
|
|
107
|
+
}
|
|
99
108
|
const tables = {
|
|
100
109
|
projectId: options.projectId,
|
|
101
110
|
datasetId: options.datasetId,
|
|
@@ -362,6 +371,7 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
362
371
|
const rowLines = [];
|
|
363
372
|
const revisionLines = [];
|
|
364
373
|
const missing = [];
|
|
374
|
+
const resolved = [];
|
|
365
375
|
for (const planned of plan.revisions) {
|
|
366
376
|
signal?.throwIfAborted();
|
|
367
377
|
const revision = await options.store.getRevisionMetadata(planned.id, planned.account_id);
|
|
@@ -369,10 +379,10 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
369
379
|
missing.push(planned.id);
|
|
370
380
|
continue;
|
|
371
381
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
);
|
|
382
|
+
resolved.push({ planned, revision, periodDate: periodDateOf(revision) });
|
|
383
|
+
}
|
|
384
|
+
for (const { planned, revision, periodDate } of resolved) {
|
|
385
|
+
signal?.throwIfAborted();
|
|
376
386
|
const base = {
|
|
377
387
|
reporting_revision_id: revision.reporting_revision_id,
|
|
378
388
|
reporting_obligation_id: revision.reporting_obligation_id,
|
|
@@ -401,9 +411,9 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
401
411
|
JSON.stringify({
|
|
402
412
|
...base,
|
|
403
413
|
supersedes_reporting_revision_id: revision.supersedes_reporting_revision_id ?? null,
|
|
404
|
-
period_start: revision.wireRevision.period
|
|
405
|
-
period_end: revision.wireRevision.period
|
|
406
|
-
source_timezone: revision.wireRevision.period
|
|
414
|
+
period_start: revision.wireRevision.period.start,
|
|
415
|
+
period_end: revision.wireRevision.period.end,
|
|
416
|
+
source_timezone: revision.wireRevision.period.source_timezone,
|
|
407
417
|
observed_at: revision.observedAt,
|
|
408
418
|
data_through: revision.dataThrough,
|
|
409
419
|
revision_content_sha256: revision.binding.sha256,
|
|
@@ -547,20 +557,16 @@ SELECT row_data.*
|
|
|
547
557
|
) AS current_revision
|
|
548
558
|
USING (reporting_obligation_id, reporting_revision_id);`.trim();
|
|
549
559
|
}
|
|
550
|
-
function
|
|
551
|
-
|
|
552
|
-
const instant = new Date(start);
|
|
553
|
-
if (Number.isNaN(instant.getTime())) return null;
|
|
560
|
+
function periodDateOf(revision) {
|
|
561
|
+
const period = revision.wireRevision.period;
|
|
554
562
|
try {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
} catch {
|
|
563
|
-
return instant.toISOString().slice(0, 10);
|
|
563
|
+
if (!period) throw new TypeError("the revision carries no period");
|
|
564
|
+
return (0, import_schedule.reportingPeriodDate)(period.start, period.source_timezone);
|
|
565
|
+
} catch (error) {
|
|
566
|
+
throw new Error(
|
|
567
|
+
`Cannot compute period_date for revision ${revision.reporting_revision_id}: ${error instanceof Error ? error.message : String(error)}. The batch stays retained and every run fails until the revision's period is repaired (or, if this runtime's timezone data is older than the writer's, until it is upgraded); reset({ discardRetainedPlan: true }) restarts from the beginning, so empty the destination tables first.`,
|
|
568
|
+
{ cause: error }
|
|
569
|
+
);
|
|
564
570
|
}
|
|
565
571
|
}
|
|
566
572
|
async function withinDeadline(operation, milliseconds, signal, context) {
|
|
@@ -3,6 +3,7 @@ import { promises as fs } from "fs";
|
|
|
3
3
|
import { tmpdir } from "os";
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
import { decodeReportingChangeCursorV1 } from "../ledger/change-feed.mjs";
|
|
6
|
+
import { reportingPeriodDate } from "../ledger/schedule.mjs";
|
|
6
7
|
const REPORTING_WAREHOUSE_SINK_MIGRATION = `
|
|
7
8
|
CREATE TABLE IF NOT EXISTS adcp_reporting_warehouse_sinks (
|
|
8
9
|
sink_name TEXT PRIMARY KEY CHECK (sink_name ~ '^[A-Za-z0-9_.:-]{1,128}$'),
|
|
@@ -28,6 +29,7 @@ ALTER TABLE adcp_reporting_warehouse_sinks
|
|
|
28
29
|
const MAX_LOAD_TIMEOUT = 6 * 36e5;
|
|
29
30
|
const MAX_TIMEOUT_DOUBLINGS = 16;
|
|
30
31
|
let warnedLabelsIgnored = false;
|
|
32
|
+
let warnedLocationUnset = false;
|
|
31
33
|
const PROJECT = /^[a-z][a-z0-9-]{4,61}[a-z0-9]$/;
|
|
32
34
|
const DATASET_OR_TABLE = /^[A-Za-z_][A-Za-z0-9_]{0,1023}$/;
|
|
33
35
|
const NAME = /^[A-Za-z0-9_.:-]{1,128}$/;
|
|
@@ -58,6 +60,13 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
58
60
|
{ code: "ADCP_BIGQUERY_SINK_LABELS_IGNORED", type: "DeprecationWarning" }
|
|
59
61
|
);
|
|
60
62
|
}
|
|
63
|
+
if (!options.location && !warnedLocationUnset) {
|
|
64
|
+
warnedLocationUnset = true;
|
|
65
|
+
process.emitWarning(
|
|
66
|
+
'BigQuery warehouse sink option `location` is not set. Replay lookups of load jobs need it for datasets outside the US and EU multi-regions: without it BigQuery answers 404, the sink uploads again, gets a 409, and then fails with a "check projectId and location" error.',
|
|
67
|
+
{ code: "ADCP_BIGQUERY_SINK_LOCATION_UNSET" }
|
|
68
|
+
);
|
|
69
|
+
}
|
|
61
70
|
const tables = {
|
|
62
71
|
projectId: options.projectId,
|
|
63
72
|
datasetId: options.datasetId,
|
|
@@ -324,6 +333,7 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
324
333
|
const rowLines = [];
|
|
325
334
|
const revisionLines = [];
|
|
326
335
|
const missing = [];
|
|
336
|
+
const resolved = [];
|
|
327
337
|
for (const planned of plan.revisions) {
|
|
328
338
|
signal?.throwIfAborted();
|
|
329
339
|
const revision = await options.store.getRevisionMetadata(planned.id, planned.account_id);
|
|
@@ -331,10 +341,10 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
331
341
|
missing.push(planned.id);
|
|
332
342
|
continue;
|
|
333
343
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
);
|
|
344
|
+
resolved.push({ planned, revision, periodDate: periodDateOf(revision) });
|
|
345
|
+
}
|
|
346
|
+
for (const { planned, revision, periodDate } of resolved) {
|
|
347
|
+
signal?.throwIfAborted();
|
|
338
348
|
const base = {
|
|
339
349
|
reporting_revision_id: revision.reporting_revision_id,
|
|
340
350
|
reporting_obligation_id: revision.reporting_obligation_id,
|
|
@@ -363,9 +373,9 @@ function createBigQueryReportingWarehouseSinkV1(options) {
|
|
|
363
373
|
JSON.stringify({
|
|
364
374
|
...base,
|
|
365
375
|
supersedes_reporting_revision_id: revision.supersedes_reporting_revision_id ?? null,
|
|
366
|
-
period_start: revision.wireRevision.period
|
|
367
|
-
period_end: revision.wireRevision.period
|
|
368
|
-
source_timezone: revision.wireRevision.period
|
|
376
|
+
period_start: revision.wireRevision.period.start,
|
|
377
|
+
period_end: revision.wireRevision.period.end,
|
|
378
|
+
source_timezone: revision.wireRevision.period.source_timezone,
|
|
369
379
|
observed_at: revision.observedAt,
|
|
370
380
|
data_through: revision.dataThrough,
|
|
371
381
|
revision_content_sha256: revision.binding.sha256,
|
|
@@ -509,20 +519,16 @@ SELECT row_data.*
|
|
|
509
519
|
) AS current_revision
|
|
510
520
|
USING (reporting_obligation_id, reporting_revision_id);`.trim();
|
|
511
521
|
}
|
|
512
|
-
function
|
|
513
|
-
|
|
514
|
-
const instant = new Date(start);
|
|
515
|
-
if (Number.isNaN(instant.getTime())) return null;
|
|
522
|
+
function periodDateOf(revision) {
|
|
523
|
+
const period = revision.wireRevision.period;
|
|
516
524
|
try {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
} catch {
|
|
525
|
-
return instant.toISOString().slice(0, 10);
|
|
525
|
+
if (!period) throw new TypeError("the revision carries no period");
|
|
526
|
+
return reportingPeriodDate(period.start, period.source_timezone);
|
|
527
|
+
} catch (error) {
|
|
528
|
+
throw new Error(
|
|
529
|
+
`Cannot compute period_date for revision ${revision.reporting_revision_id}: ${error instanceof Error ? error.message : String(error)}. The batch stays retained and every run fails until the revision's period is repaired (or, if this runtime's timezone data is older than the writer's, until it is upgraded); reset({ discardRetainedPlan: true }) restarts from the beginning, so empty the destination tables first.`,
|
|
530
|
+
{ cause: error }
|
|
531
|
+
);
|
|
526
532
|
}
|
|
527
533
|
}
|
|
528
534
|
async function withinDeadline(operation, milliseconds, signal, context) {
|
|
@@ -5,6 +5,9 @@ import type { ReportingLedgerStore } from '../ledger/types.mjs';
|
|
|
5
5
|
import { type ReportingObjectWriteAuthorityStoreV1 } from '../ledger/object-writes.mjs';
|
|
6
6
|
import { type GcsReportingReaderOptionsV1 } from './reader.mjs';
|
|
7
7
|
type DeliveryInput = Parameters<ReportingManagedDeliveryAdapterV1['deliver']>[0];
|
|
8
|
+
/**
|
|
9
|
+
* @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
|
|
10
|
+
*/
|
|
8
11
|
export interface CreateGcsReportingManagedDeliveryAdapterOptionsV1 {
|
|
9
12
|
storage: Storage;
|
|
10
13
|
coreStore: ReportingLedgerStore;
|
|
@@ -24,7 +27,11 @@ export interface CreateGcsReportingManagedDeliveryAdapterOptionsV1 {
|
|
|
24
27
|
operationDeadlineMilliseconds?: number;
|
|
25
28
|
minimumResourceRetentionDays?: number;
|
|
26
29
|
}
|
|
27
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Complete file-transfer adapter. Availability and cleanup lease commits remain with the managed runtime.
|
|
32
|
+
*
|
|
33
|
+
* @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
|
|
34
|
+
*/
|
|
28
35
|
export declare function createGcsReportingManagedDeliveryAdapterV1(options: CreateGcsReportingManagedDeliveryAdapterOptionsV1, context?: {
|
|
29
36
|
signal?: AbortSignal;
|
|
30
37
|
}): Promise<ReportingManagedDeliveryAdapterV1>;
|
|
@@ -5,6 +5,9 @@ import type { ReportingLedgerStore } from '../ledger/types';
|
|
|
5
5
|
import { type ReportingObjectWriteAuthorityStoreV1 } from '../ledger/object-writes';
|
|
6
6
|
import { type GcsReportingReaderOptionsV1 } from './reader';
|
|
7
7
|
type DeliveryInput = Parameters<ReportingManagedDeliveryAdapterV1['deliver']>[0];
|
|
8
|
+
/**
|
|
9
|
+
* @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
|
|
10
|
+
*/
|
|
8
11
|
export interface CreateGcsReportingManagedDeliveryAdapterOptionsV1 {
|
|
9
12
|
storage: Storage;
|
|
10
13
|
coreStore: ReportingLedgerStore;
|
|
@@ -24,7 +27,11 @@ export interface CreateGcsReportingManagedDeliveryAdapterOptionsV1 {
|
|
|
24
27
|
operationDeadlineMilliseconds?: number;
|
|
25
28
|
minimumResourceRetentionDays?: number;
|
|
26
29
|
}
|
|
27
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Complete file-transfer adapter. Availability and cleanup lease commits remain with the managed runtime.
|
|
32
|
+
*
|
|
33
|
+
* @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
|
|
34
|
+
*/
|
|
28
35
|
export declare function createGcsReportingManagedDeliveryAdapterV1(options: CreateGcsReportingManagedDeliveryAdapterOptionsV1, context?: {
|
|
29
36
|
signal?: AbortSignal;
|
|
30
37
|
}): Promise<ReportingManagedDeliveryAdapterV1>;
|
|
@@ -1,5 +1,11 @@
|
|
|
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 declare class ReportingGcsFenceError extends Error {
|
|
2
5
|
readonly code: 'INVALID_INPUT' | 'UNSAFE_BUCKET' | 'REVOKED' | 'NOT_REVOKED' | 'CONTENT_CONFLICT' | 'ABORTED' | 'PROVIDER_UNAVAILABLE' | 'DEADLINE_EXCEEDED' | 'HOST_CALLBACK_FAILED' | 'STATE_UNAVAILABLE';
|
|
3
6
|
constructor(code: 'INVALID_INPUT' | 'UNSAFE_BUCKET' | 'REVOKED' | 'NOT_REVOKED' | 'CONTENT_CONFLICT' | 'ABORTED' | 'PROVIDER_UNAVAILABLE' | 'DEADLINE_EXCEEDED' | 'HOST_CALLBACK_FAILED' | 'STATE_UNAVAILABLE');
|
|
4
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @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
|
|
10
|
+
*/
|
|
5
11
|
export declare function isReportingGcsFenceError(error: unknown): error is ReportingGcsFenceError;
|
|
@@ -1,5 +1,11 @@
|
|
|
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 declare class ReportingGcsFenceError extends Error {
|
|
2
5
|
readonly code: 'INVALID_INPUT' | 'UNSAFE_BUCKET' | 'REVOKED' | 'NOT_REVOKED' | 'CONTENT_CONFLICT' | 'ABORTED' | 'PROVIDER_UNAVAILABLE' | 'DEADLINE_EXCEEDED' | 'HOST_CALLBACK_FAILED' | 'STATE_UNAVAILABLE';
|
|
3
6
|
constructor(code: 'INVALID_INPUT' | 'UNSAFE_BUCKET' | 'REVOKED' | 'NOT_REVOKED' | 'CONTENT_CONFLICT' | 'ABORTED' | 'PROVIDER_UNAVAILABLE' | 'DEADLINE_EXCEEDED' | 'HOST_CALLBACK_FAILED' | 'STATE_UNAVAILABLE');
|
|
4
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @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
|
|
10
|
+
*/
|
|
5
11
|
export declare function isReportingGcsFenceError(error: unknown): error is ReportingGcsFenceError;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Storage } from '@google-cloud/storage';
|
|
2
2
|
import { type ReportingObjectWriteScopeV1, type ReportingObjectWritePlanV1, type ReportingObjectWriteStoreV1 } from '../ledger/object-writes.mjs';
|
|
3
3
|
export { ReportingGcsFenceError } from './errors.mjs';
|
|
4
|
+
/**
|
|
5
|
+
* @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
|
|
6
|
+
*/
|
|
4
7
|
export interface GcsReportingObjectFenceV1 {
|
|
5
8
|
probe(context?: {
|
|
6
9
|
signal?: AbortSignal;
|
|
@@ -25,6 +28,8 @@ export interface GcsReportingObjectFenceV1 {
|
|
|
25
28
|
* Bucket configuration must remain managed exclusively by the trusted host.
|
|
26
29
|
* Tombstones and inventory MUST NOT be deleted while stale requests can execute.
|
|
27
30
|
* Inject the official Storage client with host-owned, keyless credentials.
|
|
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
|
|
28
33
|
*/
|
|
29
34
|
export declare function createGcsReportingObjectFenceV1(options: {
|
|
30
35
|
storage: Storage;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Storage } from '@google-cloud/storage';
|
|
2
2
|
import { type ReportingObjectWriteScopeV1, type ReportingObjectWritePlanV1, type ReportingObjectWriteStoreV1 } from '../ledger/object-writes';
|
|
3
3
|
export { ReportingGcsFenceError } from './errors';
|
|
4
|
+
/**
|
|
5
|
+
* @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
|
|
6
|
+
*/
|
|
4
7
|
export interface GcsReportingObjectFenceV1 {
|
|
5
8
|
probe(context?: {
|
|
6
9
|
signal?: AbortSignal;
|
|
@@ -25,6 +28,8 @@ export interface GcsReportingObjectFenceV1 {
|
|
|
25
28
|
* Bucket configuration must remain managed exclusively by the trusted host.
|
|
26
29
|
* Tombstones and inventory MUST NOT be deleted while stale requests can execute.
|
|
27
30
|
* Inject the official Storage client with host-owned, keyless credentials.
|
|
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
|
|
28
33
|
*/
|
|
29
34
|
export declare function createGcsReportingObjectFenceV1(options: {
|
|
30
35
|
storage: Storage;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Cloud Storage fence, reader, managed-delivery adapter and row-object provider for Reliable Reporting.
|
|
3
|
+
*
|
|
4
|
+
* Every export of this subpath is `@experimental` and may change in minor releases.
|
|
5
|
+
*
|
|
6
|
+
* Stability policy: https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
1
10
|
export { createGcsReportingObjectFenceV1 } from './fence.mjs';
|
|
2
11
|
export type { GcsReportingObjectFenceV1 } from './fence.mjs';
|
|
3
12
|
export { ReportingGcsFenceError, isReportingGcsFenceError } from './errors.mjs';
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Cloud Storage fence, reader, managed-delivery adapter and row-object provider for Reliable Reporting.
|
|
3
|
+
*
|
|
4
|
+
* Every export of this subpath is `@experimental` and may change in minor releases.
|
|
5
|
+
*
|
|
6
|
+
* Stability policy: https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
1
10
|
export { createGcsReportingObjectFenceV1 } from './fence';
|
|
2
11
|
export type { GcsReportingObjectFenceV1 } from './fence';
|
|
3
12
|
export { ReportingGcsFenceError, isReportingGcsFenceError } from './errors';
|
|
@@ -2,16 +2,25 @@ import type { Storage } from '@google-cloud/storage';
|
|
|
2
2
|
import { type CanonicalReferenceResolver } from '../../canonical-references/index.mjs';
|
|
3
3
|
import type { ReportingResourceReader } from '../inspection.mjs';
|
|
4
4
|
import { type ReportingObjectWriteScopeV1 } from '../ledger/object-writes.mjs';
|
|
5
|
+
/**
|
|
6
|
+
* @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
|
|
7
|
+
*/
|
|
5
8
|
export interface GcsReportingReadScopeV1 extends ReportingObjectWriteScopeV1 {
|
|
6
9
|
/** Non-secret identity from the host's authenticated principal registry. Never a bearer. */
|
|
7
10
|
principal_id: string;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @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
|
|
14
|
+
*/
|
|
9
15
|
export interface GcsReportingReadAuthorizationV1 {
|
|
10
16
|
scope: Readonly<GcsReportingReadScopeV1>;
|
|
11
17
|
bucket: string;
|
|
12
18
|
objectPrefix: string;
|
|
13
19
|
objectName: string;
|
|
14
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @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
|
|
23
|
+
*/
|
|
15
24
|
export interface GcsReportingReaderOptionsV1 {
|
|
16
25
|
scope: GcsReportingReadScopeV1;
|
|
17
26
|
bucket: string;
|
|
@@ -30,14 +39,29 @@ export interface GcsReportingReaderOptionsV1 {
|
|
|
30
39
|
operationDeadlineMilliseconds?: number;
|
|
31
40
|
maxBytes?: number;
|
|
32
41
|
}
|
|
33
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Restrictive provider-native URL grammar: no credentials, queries, encoding or traversal.
|
|
44
|
+
*
|
|
45
|
+
* @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
|
|
46
|
+
*/
|
|
34
47
|
export declare function gcsReportingObjectFromUriV1(uri: string, bucket: string, prefix: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* @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
|
|
50
|
+
*/
|
|
35
51
|
export declare function createGcsScopedObjectReadV1(options: GcsReportingReaderOptionsV1): (uri: string, maxBytes: number, signal?: AbortSignal, nativeVersion?: string) => Promise<{
|
|
36
52
|
body: Buffer<ArrayBufferLike>;
|
|
37
53
|
contentType: string | undefined;
|
|
38
54
|
generation: string;
|
|
39
55
|
}>;
|
|
40
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Destination-bound manifest/object reader. The caller never supplies bucket or credential scope.
|
|
58
|
+
*
|
|
59
|
+
* @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
|
|
60
|
+
*/
|
|
41
61
|
export declare function createGcsReportingResourceReaderV1(options: GcsReportingReaderOptionsV1): ReportingResourceReader;
|
|
42
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Digest-pinned private contract resolver; all resolutions re-authorize and bypass caches.
|
|
64
|
+
*
|
|
65
|
+
* @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
|
|
66
|
+
*/
|
|
43
67
|
export declare function createGcsReportingReferenceResolverV1(options: GcsReportingReaderOptionsV1): CanonicalReferenceResolver;
|
|
@@ -2,16 +2,25 @@ import type { Storage } from '@google-cloud/storage';
|
|
|
2
2
|
import { type CanonicalReferenceResolver } from '../../canonical-references';
|
|
3
3
|
import type { ReportingResourceReader } from '../inspection';
|
|
4
4
|
import { type ReportingObjectWriteScopeV1 } from '../ledger/object-writes';
|
|
5
|
+
/**
|
|
6
|
+
* @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
|
|
7
|
+
*/
|
|
5
8
|
export interface GcsReportingReadScopeV1 extends ReportingObjectWriteScopeV1 {
|
|
6
9
|
/** Non-secret identity from the host's authenticated principal registry. Never a bearer. */
|
|
7
10
|
principal_id: string;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @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
|
|
14
|
+
*/
|
|
9
15
|
export interface GcsReportingReadAuthorizationV1 {
|
|
10
16
|
scope: Readonly<GcsReportingReadScopeV1>;
|
|
11
17
|
bucket: string;
|
|
12
18
|
objectPrefix: string;
|
|
13
19
|
objectName: string;
|
|
14
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @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
|
|
23
|
+
*/
|
|
15
24
|
export interface GcsReportingReaderOptionsV1 {
|
|
16
25
|
scope: GcsReportingReadScopeV1;
|
|
17
26
|
bucket: string;
|
|
@@ -30,14 +39,29 @@ export interface GcsReportingReaderOptionsV1 {
|
|
|
30
39
|
operationDeadlineMilliseconds?: number;
|
|
31
40
|
maxBytes?: number;
|
|
32
41
|
}
|
|
33
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Restrictive provider-native URL grammar: no credentials, queries, encoding or traversal.
|
|
44
|
+
*
|
|
45
|
+
* @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
|
|
46
|
+
*/
|
|
34
47
|
export declare function gcsReportingObjectFromUriV1(uri: string, bucket: string, prefix: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* @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
|
|
50
|
+
*/
|
|
35
51
|
export declare function createGcsScopedObjectReadV1(options: GcsReportingReaderOptionsV1): (uri: string, maxBytes: number, signal?: AbortSignal, nativeVersion?: string) => Promise<{
|
|
36
52
|
body: Buffer<ArrayBufferLike>;
|
|
37
53
|
contentType: string | undefined;
|
|
38
54
|
generation: string;
|
|
39
55
|
}>;
|
|
40
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Destination-bound manifest/object reader. The caller never supplies bucket or credential scope.
|
|
58
|
+
*
|
|
59
|
+
* @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
|
|
60
|
+
*/
|
|
41
61
|
export declare function createGcsReportingResourceReaderV1(options: GcsReportingReaderOptionsV1): ReportingResourceReader;
|
|
42
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Digest-pinned private contract resolver; all resolutions re-authorize and bypass caches.
|
|
64
|
+
*
|
|
65
|
+
* @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
|
|
66
|
+
*/
|
|
43
67
|
export declare function createGcsReportingReferenceResolverV1(options: GcsReportingReaderOptionsV1): CanonicalReferenceResolver;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { BucketMetadata, Storage } from '@google-cloud/storage';
|
|
2
2
|
import type { ReportingRowObjectProviderV1 } from '../ledger/row-storage-object.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* @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
|
|
5
|
+
*/
|
|
3
6
|
export interface CreateGcsReportingRowObjectProviderOptionsV1 {
|
|
4
7
|
/** Official client used by bindings without a `credentialRef`. */
|
|
5
8
|
storage?: Storage;
|
|
@@ -16,6 +19,8 @@ export interface CreateGcsReportingRowObjectProviderOptionsV1 {
|
|
|
16
19
|
* public access prevention, and any lifecycle `Delete` rule that can match a
|
|
17
20
|
* live object under the binding prefix (no prefix filter, or a prefix that
|
|
18
21
|
* overlaps it). Rules limited to noncurrent versions are allowed.
|
|
22
|
+
*
|
|
23
|
+
* @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
|
|
19
24
|
*/
|
|
20
25
|
export declare function assertGcsReportingRowBucketPolicyV1(metadata: BucketMetadata, prefix: string): void;
|
|
21
26
|
/**
|
|
@@ -28,5 +33,7 @@ export declare function assertGcsReportingRowBucketPolicyV1(metadata: BucketMeta
|
|
|
28
33
|
* object generation, and reads and deletes pin it. Objects are stored without
|
|
29
34
|
* `Content-Encoding`, and reads request raw stored bytes, so GCS never
|
|
30
35
|
* transcodes them.
|
|
36
|
+
*
|
|
37
|
+
* @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
|
|
31
38
|
*/
|
|
32
39
|
export declare function createGcsReportingRowObjectProviderV1(options: CreateGcsReportingRowObjectProviderOptionsV1): ReportingRowObjectProviderV1;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { BucketMetadata, Storage } from '@google-cloud/storage';
|
|
2
2
|
import type { ReportingRowObjectProviderV1 } from '../ledger/row-storage-object';
|
|
3
|
+
/**
|
|
4
|
+
* @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
|
|
5
|
+
*/
|
|
3
6
|
export interface CreateGcsReportingRowObjectProviderOptionsV1 {
|
|
4
7
|
/** Official client used by bindings without a `credentialRef`. */
|
|
5
8
|
storage?: Storage;
|
|
@@ -16,6 +19,8 @@ export interface CreateGcsReportingRowObjectProviderOptionsV1 {
|
|
|
16
19
|
* public access prevention, and any lifecycle `Delete` rule that can match a
|
|
17
20
|
* live object under the binding prefix (no prefix filter, or a prefix that
|
|
18
21
|
* overlaps it). Rules limited to noncurrent versions are allowed.
|
|
22
|
+
*
|
|
23
|
+
* @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
|
|
19
24
|
*/
|
|
20
25
|
export declare function assertGcsReportingRowBucketPolicyV1(metadata: BucketMetadata, prefix: string): void;
|
|
21
26
|
/**
|
|
@@ -28,5 +33,7 @@ export declare function assertGcsReportingRowBucketPolicyV1(metadata: BucketMeta
|
|
|
28
33
|
* object generation, and reads and deletes pin it. Objects are stored without
|
|
29
34
|
* `Content-Encoding`, and reads request raw stored bytes, so GCS never
|
|
30
35
|
* transcodes them.
|
|
36
|
+
*
|
|
37
|
+
* @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
|
|
31
38
|
*/
|
|
32
39
|
export declare function createGcsReportingRowObjectProviderV1(options: CreateGcsReportingRowObjectProviderOptionsV1): ReportingRowObjectProviderV1;
|