@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
|
@@ -11,17 +11,30 @@ import type { PostgresReportingLedgerStore, ReportingLedgerRevisionMetadataV1, R
|
|
|
11
11
|
* are the adopter's.
|
|
12
12
|
*
|
|
13
13
|
* Exactly-once loading: a batch (change-feed range, revision list, job IDs) is
|
|
14
|
-
* planned durably in PostgreSQL before any load.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* planned durably in PostgreSQL before any load. Before every submission the
|
|
15
|
+
* sink looks the deterministic job ID up in the destination project and
|
|
16
|
+
* location: a job that finished cleanly counts as loaded, a job still running
|
|
17
|
+
* is waited for (never uploaded again), and only a missing job is uploaded.
|
|
18
|
+
* A crash or timeout between the load and the cursor commit therefore replays
|
|
19
|
+
* the same batch under the same job IDs without a second upload. A failed load
|
|
20
|
+
* job is retried under a new attempt suffix only after BigQuery reports that
|
|
21
|
+
* job finished with an error, and each table keeps its own attempt count, so
|
|
22
|
+
* no batch lands twice. A load that outlasts the deadline never changes the job
|
|
23
|
+
* ID: the sink grows that table's deadline instead (persisted with the plan).
|
|
19
24
|
* Concurrent runs claim one durable plan with compare-and-swap. Replays of
|
|
20
25
|
* that plan share job IDs; stale runs cannot change its attempts or cursor.
|
|
21
26
|
*/
|
|
22
|
-
/**
|
|
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
|
+
*/
|
|
23
32
|
export declare const REPORTING_WAREHOUSE_SINK_MIGRATION: string;
|
|
24
|
-
/**
|
|
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
|
+
*/
|
|
25
38
|
export interface ReportingBigQueryClientV1 {
|
|
26
39
|
dataset(datasetId: string, options?: {
|
|
27
40
|
projectId?: string;
|
|
@@ -36,7 +49,7 @@ export interface ReportingBigQueryClientV1 {
|
|
|
36
49
|
location?: string;
|
|
37
50
|
}): {
|
|
38
51
|
getMetadata(): Promise<unknown>;
|
|
39
|
-
/**
|
|
52
|
+
/** @deprecated Unused: BigQuery does not stop a running load, so the sink never cancels. Kept so wrappers that declare it still type-check. */
|
|
40
53
|
cancel?(): Promise<unknown>;
|
|
41
54
|
};
|
|
42
55
|
query(options: {
|
|
@@ -44,10 +57,16 @@ export interface ReportingBigQueryClientV1 {
|
|
|
44
57
|
location?: string;
|
|
45
58
|
}): Promise<unknown>;
|
|
46
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
|
+
*/
|
|
47
63
|
export interface ReportingWarehouseRowContextV1 {
|
|
48
64
|
revision: ReportingLedgerRevisionMetadataV1;
|
|
49
65
|
ordinal: number;
|
|
50
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
|
+
*/
|
|
51
70
|
export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
52
71
|
/** Ledger store with `changeFeed: true`. */
|
|
53
72
|
store: Pick<PostgresReportingLedgerStore, 'changesAfter' | 'getRevisionMetadata' | 'readRevisionRows'> & {
|
|
@@ -74,14 +93,20 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
74
93
|
datasetId: string;
|
|
75
94
|
rowsTableId: string;
|
|
76
95
|
revisionsTableId: string;
|
|
77
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Dataset location, so jobs run in the dataset's region. Set it for any dataset outside the US and EU
|
|
98
|
+
* multi-regions: BigQuery answers a job lookup without the right location with 404, and the sink then
|
|
99
|
+
* cannot find the jobs it created.
|
|
100
|
+
*/
|
|
78
101
|
location?: string;
|
|
79
102
|
/** Restrict the sink to one account; omit for the deployment-wide feed. */
|
|
80
103
|
account_id?: string;
|
|
81
104
|
/**
|
|
82
105
|
* Map one verified report row to the adopter's columns. The sink always adds
|
|
83
106
|
* `reporting_revision_id`, `reporting_obligation_id`, `account_id`,
|
|
84
|
-
* `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
|
|
85
110
|
* row as a `row` JSON column.
|
|
86
111
|
*/
|
|
87
112
|
mapRow?(row: Record<string, unknown>, context: ReportingWarehouseRowContextV1): Record<string, unknown>;
|
|
@@ -98,21 +123,30 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
98
123
|
*/
|
|
99
124
|
labels?: Readonly<Record<string, string>>;
|
|
100
125
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
126
|
+
* Base deadline for one run's work on one load. Default 10 minutes. It bounds
|
|
127
|
+
* how long a run uploads a file or waits for a running job; it does not bound
|
|
128
|
+
* the job. BigQuery does not stop a load when the client gives up (a cancel
|
|
129
|
+
* is accepted and the job finishes anyway), so the sink never cancels.
|
|
130
|
+
* Before every submission it looks the deterministic job ID up in `projectId`
|
|
131
|
+
* and `location`: a job that finished cleanly is accepted, a job that is
|
|
132
|
+
* pending or running is waited for (polled within the deadline) instead of
|
|
133
|
+
* being uploaded again, and only a missing job is uploaded. When the
|
|
134
|
+
* deadline passes, the run rejects with the plan retained and nothing
|
|
135
|
+
* advanced, and the next run checks the job again. Each such timeout doubles
|
|
136
|
+
* that table's deadline for later runs (up to 6 hours, persisted with the
|
|
137
|
+
* plan, and never changing the job ID), so an upload slower than the
|
|
138
|
+
* deadline eventually gets enough time. Set it above your slowest expected
|
|
139
|
+
* load to avoid the extra runs. Only a job that finished with an error
|
|
140
|
+
* advances the attempt. A status check that times out is bounded by this base
|
|
141
|
+
* deadline and does not grow it. This is a client-side deadline: BigQuery's
|
|
142
|
+
* server-side `jobTimeoutMs` cannot be set on a local-file load through the
|
|
143
|
+
* official client.
|
|
113
144
|
*/
|
|
114
145
|
loadTimeoutMilliseconds?: number;
|
|
115
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
|
+
*/
|
|
116
150
|
export interface BigQueryReportingWarehouseSinkV1 {
|
|
117
151
|
/**
|
|
118
152
|
* Load at most one batch. Resolves with what was loaded; `idle` when no
|
|
@@ -153,7 +187,8 @@ export interface BigQueryReportingWarehouseSinkV1 {
|
|
|
153
187
|
* the destination tables first, or use a new sink name against new tables.
|
|
154
188
|
* Each reset starts a new job ID generation, so reloaded batches submit
|
|
155
189
|
* fresh BigQuery jobs instead of matching the finished jobs of the earlier
|
|
156
|
-
* history.
|
|
190
|
+
* history. The sink never cancels a load, so stop every worker and let its
|
|
191
|
+
* in-flight uploads and jobs finish before emptying the destination tables. Nothing holds change retention between `reset()` and the first
|
|
157
192
|
* committed batch. If `reset()` rejects after clearing the sink's state
|
|
158
193
|
* (the consumer could not be unregistered), call it again before restarting
|
|
159
194
|
* workers; it is idempotent. Needs a store with `removeFeedConsumer`.
|
|
@@ -169,8 +204,22 @@ export interface BigQueryReportingWarehouseSinkV1 {
|
|
|
169
204
|
/** DDL for the reference `current_rows` view. */
|
|
170
205
|
readonly currentRowsViewSql: string;
|
|
171
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
|
+
*/
|
|
172
210
|
export declare function createBigQueryReportingWarehouseSinkV1(options: CreateBigQueryReportingWarehouseSinkOptionsV1): BigQueryReportingWarehouseSinkV1;
|
|
173
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* How long one run may upload a file or wait for a running job: the configured
|
|
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
|
|
216
|
+
*/
|
|
217
|
+
export declare function reportingWarehouseLoadDeadlineV1(baseMilliseconds: number, timeouts: number): number;
|
|
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
|
+
*/
|
|
174
223
|
export declare function reportingWarehouseJobIdV1(name: string, from: string | null, to: string, generation?: number): string;
|
|
175
224
|
interface WarehouseTablesV1 {
|
|
176
225
|
projectId?: string;
|
|
@@ -178,12 +227,18 @@ interface WarehouseTablesV1 {
|
|
|
178
227
|
rowsTableId: string;
|
|
179
228
|
revisionsTableId: string;
|
|
180
229
|
}
|
|
181
|
-
/**
|
|
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
|
+
*/
|
|
182
235
|
export declare function reportingWarehouseDefaultTablesSqlV1(tables: WarehouseTablesV1): string;
|
|
183
236
|
/**
|
|
184
237
|
* DDL for the reference `current_rows` view: only each obligation's current
|
|
185
238
|
* revision (its official revision, otherwise its latest snapshot). Summing
|
|
186
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
|
|
187
242
|
*/
|
|
188
243
|
export declare function reportingWarehouseCurrentRowsViewSqlV1(tables: WarehouseTablesV1 & {
|
|
189
244
|
viewId?: string;
|
|
@@ -11,17 +11,30 @@ import type { PostgresReportingLedgerStore, ReportingLedgerRevisionMetadataV1, R
|
|
|
11
11
|
* are the adopter's.
|
|
12
12
|
*
|
|
13
13
|
* Exactly-once loading: a batch (change-feed range, revision list, job IDs) is
|
|
14
|
-
* planned durably in PostgreSQL before any load.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* planned durably in PostgreSQL before any load. Before every submission the
|
|
15
|
+
* sink looks the deterministic job ID up in the destination project and
|
|
16
|
+
* location: a job that finished cleanly counts as loaded, a job still running
|
|
17
|
+
* is waited for (never uploaded again), and only a missing job is uploaded.
|
|
18
|
+
* A crash or timeout between the load and the cursor commit therefore replays
|
|
19
|
+
* the same batch under the same job IDs without a second upload. A failed load
|
|
20
|
+
* job is retried under a new attempt suffix only after BigQuery reports that
|
|
21
|
+
* job finished with an error, and each table keeps its own attempt count, so
|
|
22
|
+
* no batch lands twice. A load that outlasts the deadline never changes the job
|
|
23
|
+
* ID: the sink grows that table's deadline instead (persisted with the plan).
|
|
19
24
|
* Concurrent runs claim one durable plan with compare-and-swap. Replays of
|
|
20
25
|
* that plan share job IDs; stale runs cannot change its attempts or cursor.
|
|
21
26
|
*/
|
|
22
|
-
/**
|
|
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
|
+
*/
|
|
23
32
|
export declare const REPORTING_WAREHOUSE_SINK_MIGRATION: string;
|
|
24
|
-
/**
|
|
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
|
+
*/
|
|
25
38
|
export interface ReportingBigQueryClientV1 {
|
|
26
39
|
dataset(datasetId: string, options?: {
|
|
27
40
|
projectId?: string;
|
|
@@ -36,7 +49,7 @@ export interface ReportingBigQueryClientV1 {
|
|
|
36
49
|
location?: string;
|
|
37
50
|
}): {
|
|
38
51
|
getMetadata(): Promise<unknown>;
|
|
39
|
-
/**
|
|
52
|
+
/** @deprecated Unused: BigQuery does not stop a running load, so the sink never cancels. Kept so wrappers that declare it still type-check. */
|
|
40
53
|
cancel?(): Promise<unknown>;
|
|
41
54
|
};
|
|
42
55
|
query(options: {
|
|
@@ -44,10 +57,16 @@ export interface ReportingBigQueryClientV1 {
|
|
|
44
57
|
location?: string;
|
|
45
58
|
}): Promise<unknown>;
|
|
46
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
|
+
*/
|
|
47
63
|
export interface ReportingWarehouseRowContextV1 {
|
|
48
64
|
revision: ReportingLedgerRevisionMetadataV1;
|
|
49
65
|
ordinal: number;
|
|
50
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
|
+
*/
|
|
51
70
|
export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
52
71
|
/** Ledger store with `changeFeed: true`. */
|
|
53
72
|
store: Pick<PostgresReportingLedgerStore, 'changesAfter' | 'getRevisionMetadata' | 'readRevisionRows'> & {
|
|
@@ -74,14 +93,20 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
74
93
|
datasetId: string;
|
|
75
94
|
rowsTableId: string;
|
|
76
95
|
revisionsTableId: string;
|
|
77
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Dataset location, so jobs run in the dataset's region. Set it for any dataset outside the US and EU
|
|
98
|
+
* multi-regions: BigQuery answers a job lookup without the right location with 404, and the sink then
|
|
99
|
+
* cannot find the jobs it created.
|
|
100
|
+
*/
|
|
78
101
|
location?: string;
|
|
79
102
|
/** Restrict the sink to one account; omit for the deployment-wide feed. */
|
|
80
103
|
account_id?: string;
|
|
81
104
|
/**
|
|
82
105
|
* Map one verified report row to the adopter's columns. The sink always adds
|
|
83
106
|
* `reporting_revision_id`, `reporting_obligation_id`, `account_id`,
|
|
84
|
-
* `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
|
|
85
110
|
* row as a `row` JSON column.
|
|
86
111
|
*/
|
|
87
112
|
mapRow?(row: Record<string, unknown>, context: ReportingWarehouseRowContextV1): Record<string, unknown>;
|
|
@@ -98,21 +123,30 @@ export interface CreateBigQueryReportingWarehouseSinkOptionsV1 {
|
|
|
98
123
|
*/
|
|
99
124
|
labels?: Readonly<Record<string, string>>;
|
|
100
125
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
126
|
+
* Base deadline for one run's work on one load. Default 10 minutes. It bounds
|
|
127
|
+
* how long a run uploads a file or waits for a running job; it does not bound
|
|
128
|
+
* the job. BigQuery does not stop a load when the client gives up (a cancel
|
|
129
|
+
* is accepted and the job finishes anyway), so the sink never cancels.
|
|
130
|
+
* Before every submission it looks the deterministic job ID up in `projectId`
|
|
131
|
+
* and `location`: a job that finished cleanly is accepted, a job that is
|
|
132
|
+
* pending or running is waited for (polled within the deadline) instead of
|
|
133
|
+
* being uploaded again, and only a missing job is uploaded. When the
|
|
134
|
+
* deadline passes, the run rejects with the plan retained and nothing
|
|
135
|
+
* advanced, and the next run checks the job again. Each such timeout doubles
|
|
136
|
+
* that table's deadline for later runs (up to 6 hours, persisted with the
|
|
137
|
+
* plan, and never changing the job ID), so an upload slower than the
|
|
138
|
+
* deadline eventually gets enough time. Set it above your slowest expected
|
|
139
|
+
* load to avoid the extra runs. Only a job that finished with an error
|
|
140
|
+
* advances the attempt. A status check that times out is bounded by this base
|
|
141
|
+
* deadline and does not grow it. This is a client-side deadline: BigQuery's
|
|
142
|
+
* server-side `jobTimeoutMs` cannot be set on a local-file load through the
|
|
143
|
+
* official client.
|
|
113
144
|
*/
|
|
114
145
|
loadTimeoutMilliseconds?: number;
|
|
115
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
|
+
*/
|
|
116
150
|
export interface BigQueryReportingWarehouseSinkV1 {
|
|
117
151
|
/**
|
|
118
152
|
* Load at most one batch. Resolves with what was loaded; `idle` when no
|
|
@@ -153,7 +187,8 @@ export interface BigQueryReportingWarehouseSinkV1 {
|
|
|
153
187
|
* the destination tables first, or use a new sink name against new tables.
|
|
154
188
|
* Each reset starts a new job ID generation, so reloaded batches submit
|
|
155
189
|
* fresh BigQuery jobs instead of matching the finished jobs of the earlier
|
|
156
|
-
* history.
|
|
190
|
+
* history. The sink never cancels a load, so stop every worker and let its
|
|
191
|
+
* in-flight uploads and jobs finish before emptying the destination tables. Nothing holds change retention between `reset()` and the first
|
|
157
192
|
* committed batch. If `reset()` rejects after clearing the sink's state
|
|
158
193
|
* (the consumer could not be unregistered), call it again before restarting
|
|
159
194
|
* workers; it is idempotent. Needs a store with `removeFeedConsumer`.
|
|
@@ -169,8 +204,22 @@ export interface BigQueryReportingWarehouseSinkV1 {
|
|
|
169
204
|
/** DDL for the reference `current_rows` view. */
|
|
170
205
|
readonly currentRowsViewSql: string;
|
|
171
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
|
+
*/
|
|
172
210
|
export declare function createBigQueryReportingWarehouseSinkV1(options: CreateBigQueryReportingWarehouseSinkOptionsV1): BigQueryReportingWarehouseSinkV1;
|
|
173
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* How long one run may upload a file or wait for a running job: the configured
|
|
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
|
|
216
|
+
*/
|
|
217
|
+
export declare function reportingWarehouseLoadDeadlineV1(baseMilliseconds: number, timeouts: number): number;
|
|
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
|
+
*/
|
|
174
223
|
export declare function reportingWarehouseJobIdV1(name: string, from: string | null, to: string, generation?: number): string;
|
|
175
224
|
interface WarehouseTablesV1 {
|
|
176
225
|
projectId?: string;
|
|
@@ -178,12 +227,18 @@ interface WarehouseTablesV1 {
|
|
|
178
227
|
rowsTableId: string;
|
|
179
228
|
revisionsTableId: string;
|
|
180
229
|
}
|
|
181
|
-
/**
|
|
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
|
+
*/
|
|
182
235
|
export declare function reportingWarehouseDefaultTablesSqlV1(tables: WarehouseTablesV1): string;
|
|
183
236
|
/**
|
|
184
237
|
* DDL for the reference `current_rows` view: only each obligation's current
|
|
185
238
|
* revision (its official revision, otherwise its latest snapshot). Summing
|
|
186
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
|
|
187
242
|
*/
|
|
188
243
|
export declare function reportingWarehouseCurrentRowsViewSqlV1(tables: WarehouseTablesV1 & {
|
|
189
244
|
viewId?: string;
|