@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
|
@@ -199,6 +199,9 @@ export interface ReportingLedgerAdjustmentV1 {
|
|
|
199
199
|
export type ReportingLedgerRevisionSnapshotV1 = Omit<ReportingLedgerRevisionV1, 'rows'>;
|
|
200
200
|
export type ReportingLedgerRevisionMetadataV1 = Omit<ReportingLedgerRevisionV1, 'rows'>;
|
|
201
201
|
export type ReportingLedgerAdjustmentMetadataV1 = Omit<ReportingLedgerAdjustmentV1, 'rows'>;
|
|
202
|
+
/**
|
|
203
|
+
* @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
|
|
204
|
+
*/
|
|
202
205
|
export interface ReportingRevisionRowsReadV1 {
|
|
203
206
|
reporting_revision_id: string;
|
|
204
207
|
account_id: string;
|
|
@@ -208,6 +211,9 @@ export interface ReportingRevisionRowsReadV1 {
|
|
|
208
211
|
limit: number;
|
|
209
212
|
signal?: AbortSignal;
|
|
210
213
|
}
|
|
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
|
+
*/
|
|
211
217
|
export interface ReportingRevisionRowsPageV1 {
|
|
212
218
|
rows: Record<string, unknown>[];
|
|
213
219
|
/** Total rows in the revision. */
|
|
@@ -434,7 +440,11 @@ export interface ReportingLedgerStatusTransitionV1 {
|
|
|
434
440
|
occurredAt: string;
|
|
435
441
|
notifiedAt?: string;
|
|
436
442
|
}
|
|
437
|
-
/**
|
|
443
|
+
/**
|
|
444
|
+
* Minimum transaction surface used by the bundled PostgreSQL ledger.
|
|
445
|
+
*
|
|
446
|
+
* @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
|
|
447
|
+
*/
|
|
438
448
|
export interface ReportingLedgerTransactionV1 {
|
|
439
449
|
query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
|
|
440
450
|
rows: Row[];
|
|
@@ -559,6 +569,8 @@ export interface ReportingLedgerPageV1 {
|
|
|
559
569
|
* Immutable opt-in binding between one Core configuration generation and one
|
|
560
570
|
* caller-owned destination authorization generation. Core configurations do
|
|
561
571
|
* not carry this shape and remain API-delivered.
|
|
572
|
+
*
|
|
573
|
+
* @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
|
|
562
574
|
*/
|
|
563
575
|
export interface ReportingManagedDeliveryBindingV1 {
|
|
564
576
|
configurationId: string;
|
|
@@ -701,6 +713,9 @@ export interface ReportingManagedLifecycleProjectionV1 {
|
|
|
701
713
|
*/
|
|
702
714
|
obligatedConsumerRosterVersion?: string;
|
|
703
715
|
}
|
|
716
|
+
/**
|
|
717
|
+
* @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
|
|
718
|
+
*/
|
|
704
719
|
export interface ReportingLedgerLeaseV1 {
|
|
705
720
|
obligation: ReportingLedgerObligationV1;
|
|
706
721
|
owner: string;
|
|
@@ -717,6 +732,9 @@ export declare class ReportingConsumerStatusConflictError extends Error {
|
|
|
717
732
|
*/
|
|
718
733
|
constructor(message?: string);
|
|
719
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* @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
|
|
737
|
+
*/
|
|
720
738
|
export interface ReportingLedgerStore {
|
|
721
739
|
/** Optional substrate identity for an add-on store that must prove shared authority. */
|
|
722
740
|
readonly [REPORTING_LEDGER_AUTHORITY]?: ReportingLedgerAuthorityV1;
|
|
@@ -961,6 +979,8 @@ export interface ReportingLedgerStore {
|
|
|
961
979
|
* in duplicate-ID or duplicate-logical-chain groups, then atomically compare
|
|
962
980
|
* the current leaf, append, and retain the original ordered batch result for
|
|
963
981
|
* idempotent replay.
|
|
982
|
+
*
|
|
983
|
+
* @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
|
|
964
984
|
*/
|
|
965
985
|
export interface ReportingConsumerStatusLedgerStore {
|
|
966
986
|
listConfigurations(account_id: string): Promise<ReportingLedgerConfigurationV1[]>;
|
|
@@ -1034,6 +1054,8 @@ export type ReportingDeliveryHandlerV1 = (request: AdcpToolMap['get_media_buy_de
|
|
|
1034
1054
|
* belongs to it, so the reader MUST scope the lookup by that account and return
|
|
1035
1055
|
* `null` for a revision that belongs to another one. Never return a response
|
|
1036
1056
|
* for a revision the resolved account cannot read.
|
|
1057
|
+
*
|
|
1058
|
+
* @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
|
|
1037
1059
|
*/
|
|
1038
1060
|
export type ReportingLegacyRevisionReaderV1 = (request: AdcpToolMap['get_media_buy_delivery']['params'], context: HandlerContext<unknown>) => Promise<AdcpToolMap['get_media_buy_delivery']['result'] | null | undefined>;
|
|
1039
1061
|
export interface CreateReportingDeliveryHandlerOptionsV1 {
|
|
@@ -199,6 +199,9 @@ export interface ReportingLedgerAdjustmentV1 {
|
|
|
199
199
|
export type ReportingLedgerRevisionSnapshotV1 = Omit<ReportingLedgerRevisionV1, 'rows'>;
|
|
200
200
|
export type ReportingLedgerRevisionMetadataV1 = Omit<ReportingLedgerRevisionV1, 'rows'>;
|
|
201
201
|
export type ReportingLedgerAdjustmentMetadataV1 = Omit<ReportingLedgerAdjustmentV1, 'rows'>;
|
|
202
|
+
/**
|
|
203
|
+
* @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
|
|
204
|
+
*/
|
|
202
205
|
export interface ReportingRevisionRowsReadV1 {
|
|
203
206
|
reporting_revision_id: string;
|
|
204
207
|
account_id: string;
|
|
@@ -208,6 +211,9 @@ export interface ReportingRevisionRowsReadV1 {
|
|
|
208
211
|
limit: number;
|
|
209
212
|
signal?: AbortSignal;
|
|
210
213
|
}
|
|
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
|
+
*/
|
|
211
217
|
export interface ReportingRevisionRowsPageV1 {
|
|
212
218
|
rows: Record<string, unknown>[];
|
|
213
219
|
/** Total rows in the revision. */
|
|
@@ -434,7 +440,11 @@ export interface ReportingLedgerStatusTransitionV1 {
|
|
|
434
440
|
occurredAt: string;
|
|
435
441
|
notifiedAt?: string;
|
|
436
442
|
}
|
|
437
|
-
/**
|
|
443
|
+
/**
|
|
444
|
+
* Minimum transaction surface used by the bundled PostgreSQL ledger.
|
|
445
|
+
*
|
|
446
|
+
* @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
|
|
447
|
+
*/
|
|
438
448
|
export interface ReportingLedgerTransactionV1 {
|
|
439
449
|
query<Row extends Record<string, unknown> = Record<string, unknown>>(text: string, values?: unknown[]): Promise<{
|
|
440
450
|
rows: Row[];
|
|
@@ -559,6 +569,8 @@ export interface ReportingLedgerPageV1 {
|
|
|
559
569
|
* Immutable opt-in binding between one Core configuration generation and one
|
|
560
570
|
* caller-owned destination authorization generation. Core configurations do
|
|
561
571
|
* not carry this shape and remain API-delivered.
|
|
572
|
+
*
|
|
573
|
+
* @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
|
|
562
574
|
*/
|
|
563
575
|
export interface ReportingManagedDeliveryBindingV1 {
|
|
564
576
|
configurationId: string;
|
|
@@ -701,6 +713,9 @@ export interface ReportingManagedLifecycleProjectionV1 {
|
|
|
701
713
|
*/
|
|
702
714
|
obligatedConsumerRosterVersion?: string;
|
|
703
715
|
}
|
|
716
|
+
/**
|
|
717
|
+
* @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
|
|
718
|
+
*/
|
|
704
719
|
export interface ReportingLedgerLeaseV1 {
|
|
705
720
|
obligation: ReportingLedgerObligationV1;
|
|
706
721
|
owner: string;
|
|
@@ -717,6 +732,9 @@ export declare class ReportingConsumerStatusConflictError extends Error {
|
|
|
717
732
|
*/
|
|
718
733
|
constructor(message?: string);
|
|
719
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* @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
|
|
737
|
+
*/
|
|
720
738
|
export interface ReportingLedgerStore {
|
|
721
739
|
/** Optional substrate identity for an add-on store that must prove shared authority. */
|
|
722
740
|
readonly [REPORTING_LEDGER_AUTHORITY]?: ReportingLedgerAuthorityV1;
|
|
@@ -961,6 +979,8 @@ export interface ReportingLedgerStore {
|
|
|
961
979
|
* in duplicate-ID or duplicate-logical-chain groups, then atomically compare
|
|
962
980
|
* the current leaf, append, and retain the original ordered batch result for
|
|
963
981
|
* idempotent replay.
|
|
982
|
+
*
|
|
983
|
+
* @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
|
|
964
984
|
*/
|
|
965
985
|
export interface ReportingConsumerStatusLedgerStore {
|
|
966
986
|
listConfigurations(account_id: string): Promise<ReportingLedgerConfigurationV1[]>;
|
|
@@ -1034,6 +1054,8 @@ export type ReportingDeliveryHandlerV1 = (request: AdcpToolMap['get_media_buy_de
|
|
|
1034
1054
|
* belongs to it, so the reader MUST scope the lookup by that account and return
|
|
1035
1055
|
* `null` for a revision that belongs to another one. Never return a response
|
|
1036
1056
|
* for a revision the resolved account cannot read.
|
|
1057
|
+
*
|
|
1058
|
+
* @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
|
|
1037
1059
|
*/
|
|
1038
1060
|
export type ReportingLegacyRevisionReaderV1 = (request: AdcpToolMap['get_media_buy_delivery']['params'], context: HandlerContext<unknown>) => Promise<AdcpToolMap['get_media_buy_delivery']['result'] | null | undefined>;
|
|
1039
1061
|
export interface CreateReportingDeliveryHandlerOptionsV1 {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type S3Client } from '@aws-sdk/client-s3';
|
|
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 CreateS3ReportingRowObjectProviderOptionsV1 {
|
|
4
7
|
/** Official client used by bindings without a `credentialRef`. */
|
|
5
8
|
client?: S3Client;
|
|
@@ -25,5 +28,7 @@ export interface CreateS3ReportingRowObjectProviderOptionsV1 {
|
|
|
25
28
|
* and cannot fence that). The probe refuses unversioned or suspended buckets.
|
|
26
29
|
* Because S3-compatible stores may silently ignore `If-None-Match`, the probe
|
|
27
30
|
* also proves create-only behaviour empirically before any binding is used.
|
|
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 createS3ReportingRowObjectProviderV1(options: CreateS3ReportingRowObjectProviderOptionsV1): ReportingRowObjectProviderV1;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type S3Client } from '@aws-sdk/client-s3';
|
|
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 CreateS3ReportingRowObjectProviderOptionsV1 {
|
|
4
7
|
/** Official client used by bindings without a `credentialRef`. */
|
|
5
8
|
client?: S3Client;
|
|
@@ -25,5 +28,7 @@ export interface CreateS3ReportingRowObjectProviderOptionsV1 {
|
|
|
25
28
|
* and cannot fence that). The probe refuses unversioned or suspended buckets.
|
|
26
29
|
* Because S3-compatible stores may silently ignore `If-None-Match`, the probe
|
|
27
30
|
* also proves create-only behaviour empirically before any binding is used.
|
|
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 createS3ReportingRowObjectProviderV1(options: CreateS3ReportingRowObjectProviderOptionsV1): ReportingRowObjectProviderV1;
|
|
@@ -52,9 +52,9 @@ function versionOf(output) {
|
|
|
52
52
|
}
|
|
53
53
|
return id;
|
|
54
54
|
}
|
|
55
|
-
function selectorOf(
|
|
56
|
-
if (typeof
|
|
57
|
-
return VERSION_ID.test(
|
|
55
|
+
function selectorOf(nativeVersionRef) {
|
|
56
|
+
if (typeof nativeVersionRef !== "string" || nativeVersionRef === "null") return null;
|
|
57
|
+
return VERSION_ID.test(nativeVersionRef) ? { VersionId: nativeVersionRef } : null;
|
|
58
58
|
}
|
|
59
59
|
function servedVersion(output, selector) {
|
|
60
60
|
return output.VersionId === selector.VersionId;
|
|
@@ -217,14 +217,14 @@ function createS3ReportingRowObjectProviderV1(options) {
|
|
|
217
217
|
putIfAbsent(input, context) {
|
|
218
218
|
return (0, import_row_storage_provider_io.runReportingRowProviderOperation)(context.signal, async () => {
|
|
219
219
|
const { client, Bucket } = target(input);
|
|
220
|
-
assertKey(input.
|
|
220
|
+
assertKey(input.objectRef);
|
|
221
221
|
const bytes = Buffer.from(input.bytes);
|
|
222
222
|
try {
|
|
223
223
|
const output = await putCreateOnly(
|
|
224
224
|
client,
|
|
225
225
|
{
|
|
226
226
|
Bucket,
|
|
227
|
-
Key: input.
|
|
227
|
+
Key: input.objectRef,
|
|
228
228
|
Body: bytes,
|
|
229
229
|
ContentLength: bytes.byteLength,
|
|
230
230
|
ContentType: input.contentType,
|
|
@@ -233,24 +233,24 @@ function createS3ReportingRowObjectProviderV1(options) {
|
|
|
233
233
|
},
|
|
234
234
|
context.signal
|
|
235
235
|
);
|
|
236
|
-
return { created: true,
|
|
236
|
+
return { created: true, nativeVersionRef: versionOf(output) };
|
|
237
237
|
} catch (error) {
|
|
238
238
|
if (!isPreconditionFailed(error)) throw error;
|
|
239
239
|
}
|
|
240
|
-
const head = await client.send(new import_client_s3.HeadObjectCommand({ Bucket, Key: input.
|
|
240
|
+
const head = await client.send(new import_client_s3.HeadObjectCommand({ Bucket, Key: input.objectRef }), {
|
|
241
241
|
abortSignal: context.signal
|
|
242
242
|
});
|
|
243
|
-
return { created: false,
|
|
243
|
+
return { created: false, nativeVersionRef: versionOf(head) };
|
|
244
244
|
});
|
|
245
245
|
},
|
|
246
246
|
get(input, context) {
|
|
247
247
|
return (0, import_row_storage_provider_io.runReportingRowProviderOperation)(context.signal, async () => {
|
|
248
248
|
const { client, Bucket } = target(input);
|
|
249
|
-
assertKey(input.
|
|
249
|
+
assertKey(input.objectRef);
|
|
250
250
|
(0, import_row_storage_provider_io.assertReportingRowReadBounds)(input);
|
|
251
|
-
const selector = selectorOf(input.
|
|
251
|
+
const selector = selectorOf(input.nativeVersionRef);
|
|
252
252
|
if (selector === null) return null;
|
|
253
|
-
const Key = input.
|
|
253
|
+
const Key = input.objectRef;
|
|
254
254
|
try {
|
|
255
255
|
if (input.range?.length === 0) {
|
|
256
256
|
const head = await client.send(new import_client_s3.HeadObjectCommand({ Bucket, Key, ...selector }), {
|
|
@@ -294,13 +294,36 @@ function createS3ReportingRowObjectProviderV1(options) {
|
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
},
|
|
297
|
+
stat(input, context) {
|
|
298
|
+
return (0, import_row_storage_provider_io.runReportingRowProviderOperation)(context.signal, async () => {
|
|
299
|
+
const { client, Bucket } = target(input);
|
|
300
|
+
assertKey(input.objectRef);
|
|
301
|
+
const selector = selectorOf(input.nativeVersionRef);
|
|
302
|
+
if (selector === null) return null;
|
|
303
|
+
try {
|
|
304
|
+
const head = await client.send(new import_client_s3.HeadObjectCommand({ Bucket, Key: input.objectRef, ...selector }), {
|
|
305
|
+
abortSignal: context.signal
|
|
306
|
+
});
|
|
307
|
+
if (!servedVersion(head, selector)) return null;
|
|
308
|
+
const size = head.ContentLength;
|
|
309
|
+
if (typeof size !== "number" || !Number.isSafeInteger(size) || size < 0) {
|
|
310
|
+
throw new import_row_storage_errors.ReportingRowStoreError("PROVIDER_UNAVAILABLE", "object metadata is malformed");
|
|
311
|
+
}
|
|
312
|
+
return { nativeVersionRef: selector.VersionId, sizeBytes: size };
|
|
313
|
+
} catch (error) {
|
|
314
|
+
if (isNotFound(error) || isPreconditionFailed(error)) return null;
|
|
315
|
+
if (statusOf(error) === 400 || statusOf(error) === 405) return null;
|
|
316
|
+
throw error;
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
},
|
|
297
320
|
delete(input, context) {
|
|
298
321
|
return (0, import_row_storage_provider_io.runReportingRowProviderOperation)(context.signal, async () => {
|
|
299
322
|
const { client, Bucket } = target(input);
|
|
300
|
-
assertKey(input.
|
|
301
|
-
const selector = selectorOf(input.
|
|
323
|
+
assertKey(input.objectRef);
|
|
324
|
+
const selector = selectorOf(input.nativeVersionRef);
|
|
302
325
|
if (selector === null) return "absent";
|
|
303
|
-
const Key = input.
|
|
326
|
+
const Key = input.objectRef;
|
|
304
327
|
const signal = context.signal;
|
|
305
328
|
try {
|
|
306
329
|
const head = await client.send(new import_client_s3.HeadObjectCommand({ Bucket, Key, ...selector }), { abortSignal: signal });
|
|
@@ -46,9 +46,9 @@ function versionOf(output) {
|
|
|
46
46
|
}
|
|
47
47
|
return id;
|
|
48
48
|
}
|
|
49
|
-
function selectorOf(
|
|
50
|
-
if (typeof
|
|
51
|
-
return VERSION_ID.test(
|
|
49
|
+
function selectorOf(nativeVersionRef) {
|
|
50
|
+
if (typeof nativeVersionRef !== "string" || nativeVersionRef === "null") return null;
|
|
51
|
+
return VERSION_ID.test(nativeVersionRef) ? { VersionId: nativeVersionRef } : null;
|
|
52
52
|
}
|
|
53
53
|
function servedVersion(output, selector) {
|
|
54
54
|
return output.VersionId === selector.VersionId;
|
|
@@ -211,14 +211,14 @@ function createS3ReportingRowObjectProviderV1(options) {
|
|
|
211
211
|
putIfAbsent(input, context) {
|
|
212
212
|
return runReportingRowProviderOperation(context.signal, async () => {
|
|
213
213
|
const { client, Bucket } = target(input);
|
|
214
|
-
assertKey(input.
|
|
214
|
+
assertKey(input.objectRef);
|
|
215
215
|
const bytes = Buffer.from(input.bytes);
|
|
216
216
|
try {
|
|
217
217
|
const output = await putCreateOnly(
|
|
218
218
|
client,
|
|
219
219
|
{
|
|
220
220
|
Bucket,
|
|
221
|
-
Key: input.
|
|
221
|
+
Key: input.objectRef,
|
|
222
222
|
Body: bytes,
|
|
223
223
|
ContentLength: bytes.byteLength,
|
|
224
224
|
ContentType: input.contentType,
|
|
@@ -227,24 +227,24 @@ function createS3ReportingRowObjectProviderV1(options) {
|
|
|
227
227
|
},
|
|
228
228
|
context.signal
|
|
229
229
|
);
|
|
230
|
-
return { created: true,
|
|
230
|
+
return { created: true, nativeVersionRef: versionOf(output) };
|
|
231
231
|
} catch (error) {
|
|
232
232
|
if (!isPreconditionFailed(error)) throw error;
|
|
233
233
|
}
|
|
234
|
-
const head = await client.send(new HeadObjectCommand({ Bucket, Key: input.
|
|
234
|
+
const head = await client.send(new HeadObjectCommand({ Bucket, Key: input.objectRef }), {
|
|
235
235
|
abortSignal: context.signal
|
|
236
236
|
});
|
|
237
|
-
return { created: false,
|
|
237
|
+
return { created: false, nativeVersionRef: versionOf(head) };
|
|
238
238
|
});
|
|
239
239
|
},
|
|
240
240
|
get(input, context) {
|
|
241
241
|
return runReportingRowProviderOperation(context.signal, async () => {
|
|
242
242
|
const { client, Bucket } = target(input);
|
|
243
|
-
assertKey(input.
|
|
243
|
+
assertKey(input.objectRef);
|
|
244
244
|
assertReportingRowReadBounds(input);
|
|
245
|
-
const selector = selectorOf(input.
|
|
245
|
+
const selector = selectorOf(input.nativeVersionRef);
|
|
246
246
|
if (selector === null) return null;
|
|
247
|
-
const Key = input.
|
|
247
|
+
const Key = input.objectRef;
|
|
248
248
|
try {
|
|
249
249
|
if (input.range?.length === 0) {
|
|
250
250
|
const head = await client.send(new HeadObjectCommand({ Bucket, Key, ...selector }), {
|
|
@@ -288,13 +288,36 @@ function createS3ReportingRowObjectProviderV1(options) {
|
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
},
|
|
291
|
+
stat(input, context) {
|
|
292
|
+
return runReportingRowProviderOperation(context.signal, async () => {
|
|
293
|
+
const { client, Bucket } = target(input);
|
|
294
|
+
assertKey(input.objectRef);
|
|
295
|
+
const selector = selectorOf(input.nativeVersionRef);
|
|
296
|
+
if (selector === null) return null;
|
|
297
|
+
try {
|
|
298
|
+
const head = await client.send(new HeadObjectCommand({ Bucket, Key: input.objectRef, ...selector }), {
|
|
299
|
+
abortSignal: context.signal
|
|
300
|
+
});
|
|
301
|
+
if (!servedVersion(head, selector)) return null;
|
|
302
|
+
const size = head.ContentLength;
|
|
303
|
+
if (typeof size !== "number" || !Number.isSafeInteger(size) || size < 0) {
|
|
304
|
+
throw new ReportingRowStoreError("PROVIDER_UNAVAILABLE", "object metadata is malformed");
|
|
305
|
+
}
|
|
306
|
+
return { nativeVersionRef: selector.VersionId, sizeBytes: size };
|
|
307
|
+
} catch (error) {
|
|
308
|
+
if (isNotFound(error) || isPreconditionFailed(error)) return null;
|
|
309
|
+
if (statusOf(error) === 400 || statusOf(error) === 405) return null;
|
|
310
|
+
throw error;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
},
|
|
291
314
|
delete(input, context) {
|
|
292
315
|
return runReportingRowProviderOperation(context.signal, async () => {
|
|
293
316
|
const { client, Bucket } = target(input);
|
|
294
|
-
assertKey(input.
|
|
295
|
-
const selector = selectorOf(input.
|
|
317
|
+
assertKey(input.objectRef);
|
|
318
|
+
const selector = selectorOf(input.nativeVersionRef);
|
|
296
319
|
if (selector === null) return "absent";
|
|
297
|
-
const Key = input.
|
|
320
|
+
const Key = input.objectRef;
|
|
298
321
|
const signal = context.signal;
|
|
299
322
|
try {
|
|
300
323
|
const head = await client.send(new HeadObjectCommand({ Bucket, Key, ...selector }), { abortSignal: signal });
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reliable Reporting service wiring, conformance runner and ledger maintenance.
|
|
3
|
+
*
|
|
4
|
+
* Only the retention, compaction and change-feed maintenance exports (`./maintenance`) are `@experimental`.
|
|
5
|
+
* The service factories and conformance runner follow normal semver.
|
|
6
|
+
*
|
|
7
|
+
* Stability policy: https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
1
11
|
import type { Account, ResolveContext } from '../../server/decisioning/account.mjs';
|
|
2
12
|
import type { RequestContext } from '../../server/decisioning/context.mjs';
|
|
3
13
|
import type { DecisioningPlatform } from '../../server/decisioning/platform.mjs';
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reliable Reporting service wiring, conformance runner and ledger maintenance.
|
|
3
|
+
*
|
|
4
|
+
* Only the retention, compaction and change-feed maintenance exports (`./maintenance`) are `@experimental`.
|
|
5
|
+
* The service factories and conformance runner follow normal semver.
|
|
6
|
+
*
|
|
7
|
+
* Stability policy: https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
1
11
|
import type { Account, ResolveContext } from '../../server/decisioning/account';
|
|
2
12
|
import type { RequestContext } from '../../server/decisioning/context';
|
|
3
13
|
import type { DecisioningPlatform } from '../../server/decisioning/platform';
|
|
@@ -5,6 +5,8 @@ import type { PostgresReportingLedgerStore } from '../ledger/index.mjs';
|
|
|
5
5
|
* period end and its latest publication. `statusRetentionDays` always comes
|
|
6
6
|
* from the service, so retention can never disagree with the commitment the
|
|
7
7
|
* service advertises to buyers.
|
|
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
|
|
8
10
|
*/
|
|
9
11
|
export interface ReportingRetentionOptionsV1 {
|
|
10
12
|
enabled: true;
|
|
@@ -19,18 +21,28 @@ export interface ReportingRetentionOptionsV1 {
|
|
|
19
21
|
*
|
|
20
22
|
* Compaction takes effect in the AdCP release after November 20, 2026; do not
|
|
21
23
|
* enable it in production before then. See `docs/guides/REPORTING-OPERATIONS.md`.
|
|
24
|
+
*
|
|
25
|
+
* @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
|
|
22
26
|
*/
|
|
23
27
|
export interface ReportingCompactionOptionsV1 {
|
|
24
28
|
enabled: true;
|
|
25
29
|
/** Revisions compacted per pass. Defaults to 100. */
|
|
26
30
|
limit?: number;
|
|
27
31
|
}
|
|
28
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Change-feed pruning window and the consumer hold shared with retention.
|
|
34
|
+
*
|
|
35
|
+
* @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
|
|
36
|
+
*/
|
|
29
37
|
export type ReportingChangeFeedMaintenanceOptionsV1 = boolean | {
|
|
30
38
|
changeRetentionDays?: number;
|
|
31
39
|
maxFeedHoldDays?: number;
|
|
32
40
|
};
|
|
33
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* The ledger-store surface a maintenance pass drives.
|
|
43
|
+
*
|
|
44
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
45
|
+
*/
|
|
34
46
|
export type ReportingLedgerMaintenanceStoreV1 = Pick<PostgresReportingLedgerStore, 'sweepRowWriteIntents' | 'pruneChanges' | 'retireExpiredPeriods'> & Partial<Pick<PostgresReportingLedgerStore, 'compactSupersededSnapshots'>>;
|
|
35
47
|
interface ReportingLedgerMaintenanceTaskOutcomesV1 {
|
|
36
48
|
'snapshot sweep': Awaited<ReturnType<PostgresReportingLedgerStore['sweepExpiredState']>>;
|
|
@@ -39,11 +51,16 @@ interface ReportingLedgerMaintenanceTaskOutcomesV1 {
|
|
|
39
51
|
retention: Awaited<ReturnType<PostgresReportingLedgerStore['retireExpiredPeriods']>>;
|
|
40
52
|
'snapshot compaction': Awaited<ReturnType<PostgresReportingLedgerStore['compactSupersededSnapshots']>>;
|
|
41
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @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
|
|
56
|
+
*/
|
|
42
57
|
export type ReportingLedgerMaintenanceTaskNameV1 = keyof ReportingLedgerMaintenanceTaskOutcomesV1;
|
|
43
58
|
/**
|
|
44
59
|
* A scheduled maintenance pass completed but could not process some items
|
|
45
60
|
* (for example, a retention period whose objects could not be deleted). The
|
|
46
61
|
* pass resumes them next time; repeated reports need operator attention.
|
|
62
|
+
*
|
|
63
|
+
* @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
|
|
47
64
|
*/
|
|
48
65
|
export declare class ReportingMaintenancePartialFailureError extends Error {
|
|
49
66
|
readonly task: string;
|
|
@@ -68,6 +85,8 @@ export declare class ReportingMaintenancePartialFailureError extends Error {
|
|
|
68
85
|
* some items (a retention period whose objects would not delete, an upload that
|
|
69
86
|
* would not sweep) is `completed` with `partialFailure` set; the pass resumes
|
|
70
87
|
* those items next time.
|
|
88
|
+
*
|
|
89
|
+
* @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
|
|
71
90
|
*/
|
|
72
91
|
export type ReportingLedgerMaintenanceTaskResultV1 = {
|
|
73
92
|
[Task in ReportingLedgerMaintenanceTaskNameV1]: {
|
|
@@ -81,6 +100,9 @@ export type ReportingLedgerMaintenanceTaskResultV1 = {
|
|
|
81
100
|
readonly error: unknown;
|
|
82
101
|
};
|
|
83
102
|
}[ReportingLedgerMaintenanceTaskNameV1];
|
|
103
|
+
/**
|
|
104
|
+
* @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
|
|
105
|
+
*/
|
|
84
106
|
export interface RunReportingLedgerMaintenanceInputV1 {
|
|
85
107
|
store: ReportingLedgerMaintenanceStoreV1;
|
|
86
108
|
/**
|
|
@@ -108,11 +130,15 @@ export interface RunReportingLedgerMaintenanceInputV1 {
|
|
|
108
130
|
* retention honours, per-task limits and abort handling cannot drift between
|
|
109
131
|
* them. Tasks start together, in a fixed order, and are isolated: one task's
|
|
110
132
|
* failure never prevents another from running.
|
|
133
|
+
*
|
|
134
|
+
* @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
|
|
111
135
|
*/
|
|
112
136
|
export declare function runReportingLedgerMaintenance(input: RunReportingLedgerMaintenanceInputV1): Promise<ReportingLedgerMaintenanceTaskResultV1[]>;
|
|
113
137
|
/**
|
|
114
138
|
* Fail fast on maintenance options the store would otherwise reject on every
|
|
115
139
|
* pass. Mirrors the checks `retireExpiredPeriods` and `pruneChanges` apply.
|
|
140
|
+
*
|
|
141
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
116
142
|
*/
|
|
117
143
|
export declare function assertReportingLedgerMaintenanceOptions(input: {
|
|
118
144
|
retention?: ReportingRetentionOptionsV1 | undefined;
|
|
@@ -5,6 +5,8 @@ import type { PostgresReportingLedgerStore } from '../ledger';
|
|
|
5
5
|
* period end and its latest publication. `statusRetentionDays` always comes
|
|
6
6
|
* from the service, so retention can never disagree with the commitment the
|
|
7
7
|
* service advertises to buyers.
|
|
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
|
|
8
10
|
*/
|
|
9
11
|
export interface ReportingRetentionOptionsV1 {
|
|
10
12
|
enabled: true;
|
|
@@ -19,18 +21,28 @@ export interface ReportingRetentionOptionsV1 {
|
|
|
19
21
|
*
|
|
20
22
|
* Compaction takes effect in the AdCP release after November 20, 2026; do not
|
|
21
23
|
* enable it in production before then. See `docs/guides/REPORTING-OPERATIONS.md`.
|
|
24
|
+
*
|
|
25
|
+
* @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
|
|
22
26
|
*/
|
|
23
27
|
export interface ReportingCompactionOptionsV1 {
|
|
24
28
|
enabled: true;
|
|
25
29
|
/** Revisions compacted per pass. Defaults to 100. */
|
|
26
30
|
limit?: number;
|
|
27
31
|
}
|
|
28
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Change-feed pruning window and the consumer hold shared with retention.
|
|
34
|
+
*
|
|
35
|
+
* @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
|
|
36
|
+
*/
|
|
29
37
|
export type ReportingChangeFeedMaintenanceOptionsV1 = boolean | {
|
|
30
38
|
changeRetentionDays?: number;
|
|
31
39
|
maxFeedHoldDays?: number;
|
|
32
40
|
};
|
|
33
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* The ledger-store surface a maintenance pass drives.
|
|
43
|
+
*
|
|
44
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
45
|
+
*/
|
|
34
46
|
export type ReportingLedgerMaintenanceStoreV1 = Pick<PostgresReportingLedgerStore, 'sweepRowWriteIntents' | 'pruneChanges' | 'retireExpiredPeriods'> & Partial<Pick<PostgresReportingLedgerStore, 'compactSupersededSnapshots'>>;
|
|
35
47
|
interface ReportingLedgerMaintenanceTaskOutcomesV1 {
|
|
36
48
|
'snapshot sweep': Awaited<ReturnType<PostgresReportingLedgerStore['sweepExpiredState']>>;
|
|
@@ -39,11 +51,16 @@ interface ReportingLedgerMaintenanceTaskOutcomesV1 {
|
|
|
39
51
|
retention: Awaited<ReturnType<PostgresReportingLedgerStore['retireExpiredPeriods']>>;
|
|
40
52
|
'snapshot compaction': Awaited<ReturnType<PostgresReportingLedgerStore['compactSupersededSnapshots']>>;
|
|
41
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @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
|
|
56
|
+
*/
|
|
42
57
|
export type ReportingLedgerMaintenanceTaskNameV1 = keyof ReportingLedgerMaintenanceTaskOutcomesV1;
|
|
43
58
|
/**
|
|
44
59
|
* A scheduled maintenance pass completed but could not process some items
|
|
45
60
|
* (for example, a retention period whose objects could not be deleted). The
|
|
46
61
|
* pass resumes them next time; repeated reports need operator attention.
|
|
62
|
+
*
|
|
63
|
+
* @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
|
|
47
64
|
*/
|
|
48
65
|
export declare class ReportingMaintenancePartialFailureError extends Error {
|
|
49
66
|
readonly task: string;
|
|
@@ -68,6 +85,8 @@ export declare class ReportingMaintenancePartialFailureError extends Error {
|
|
|
68
85
|
* some items (a retention period whose objects would not delete, an upload that
|
|
69
86
|
* would not sweep) is `completed` with `partialFailure` set; the pass resumes
|
|
70
87
|
* those items next time.
|
|
88
|
+
*
|
|
89
|
+
* @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
|
|
71
90
|
*/
|
|
72
91
|
export type ReportingLedgerMaintenanceTaskResultV1 = {
|
|
73
92
|
[Task in ReportingLedgerMaintenanceTaskNameV1]: {
|
|
@@ -81,6 +100,9 @@ export type ReportingLedgerMaintenanceTaskResultV1 = {
|
|
|
81
100
|
readonly error: unknown;
|
|
82
101
|
};
|
|
83
102
|
}[ReportingLedgerMaintenanceTaskNameV1];
|
|
103
|
+
/**
|
|
104
|
+
* @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
|
|
105
|
+
*/
|
|
84
106
|
export interface RunReportingLedgerMaintenanceInputV1 {
|
|
85
107
|
store: ReportingLedgerMaintenanceStoreV1;
|
|
86
108
|
/**
|
|
@@ -108,11 +130,15 @@ export interface RunReportingLedgerMaintenanceInputV1 {
|
|
|
108
130
|
* retention honours, per-task limits and abort handling cannot drift between
|
|
109
131
|
* them. Tasks start together, in a fixed order, and are isolated: one task's
|
|
110
132
|
* failure never prevents another from running.
|
|
133
|
+
*
|
|
134
|
+
* @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
|
|
111
135
|
*/
|
|
112
136
|
export declare function runReportingLedgerMaintenance(input: RunReportingLedgerMaintenanceInputV1): Promise<ReportingLedgerMaintenanceTaskResultV1[]>;
|
|
113
137
|
/**
|
|
114
138
|
* Fail fast on maintenance options the store would otherwise reject on every
|
|
115
139
|
* pass. Mirrors the checks `retireExpiredPeriods` and `pruneChanges` apply.
|
|
140
|
+
*
|
|
141
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
116
142
|
*/
|
|
117
143
|
export declare function assertReportingLedgerMaintenanceOptions(input: {
|
|
118
144
|
retention?: ReportingRetentionOptionsV1 | undefined;
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"source_sha": "4e553ad955f83b49c7d221ab5c3ff78237ad02e3",
|
|
5
5
|
"source_tarball_sha256": "580656d6466ef9f0d1119985e6726c2efea718dc671e2ad30957fcb2fd54af0f",
|
|
6
6
|
"upstream_adcp_version": "2.5.3",
|
|
7
|
-
"synced_at": "2026-10-
|
|
7
|
+
"synced_at": "2026-10-14T04:36:25.896Z"
|
|
8
8
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AdcpLogger } from './create-adcp-server.mjs';
|
|
2
|
+
import { toWireAccount } from './decisioning/account.mjs';
|
|
3
|
+
import type { Account, AccountStore, AccountSyncDiagnostic, ResolveContext, SyncAccountsResultRow } from './decisioning/account.mjs';
|
|
4
|
+
type Entry = Record<string, unknown>;
|
|
5
|
+
/** Copy request input only when a callback reads it; keep auth capabilities live. */
|
|
6
|
+
export declare function isolateAccountCallbackInput(ctx: ResolveContext): ResolveContext;
|
|
7
|
+
export declare function existingSyncAccounts(accounts: AccountStore, entries: Entry[], ctx: ResolveContext, logger?: AdcpLogger): Promise<(Account | null)[]>;
|
|
8
|
+
export declare function diagnoseAccountBilling(accounts: AccountStore, logger: AdcpLogger, account: {
|
|
9
|
+
billing?: string;
|
|
10
|
+
payment_terms?: string;
|
|
11
|
+
}, toolName: AccountSyncDiagnostic['toolName'], index: number): void;
|
|
12
|
+
export declare function projectAccountList(accounts: AccountStore, items: Account[], ctx: ResolveContext, logger: AdcpLogger): Promise<ReturnType<typeof toWireAccount>[]>;
|
|
13
|
+
export declare function checkSyncAccountRows(accounts: AccountStore, entries: Entry[], existing: (Account | null)[], rows: SyncAccountsResultRow[], indices: number[], ctx: ResolveContext, logger: AdcpLogger): Promise<SyncAccountsResultRow[]>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AdcpLogger } from './create-adcp-server';
|
|
2
|
+
import { toWireAccount } from './decisioning/account';
|
|
3
|
+
import type { Account, AccountStore, AccountSyncDiagnostic, ResolveContext, SyncAccountsResultRow } from './decisioning/account';
|
|
4
|
+
type Entry = Record<string, unknown>;
|
|
5
|
+
/** Copy request input only when a callback reads it; keep auth capabilities live. */
|
|
6
|
+
export declare function isolateAccountCallbackInput(ctx: ResolveContext): ResolveContext;
|
|
7
|
+
export declare function existingSyncAccounts(accounts: AccountStore, entries: Entry[], ctx: ResolveContext, logger?: AdcpLogger): Promise<(Account | null)[]>;
|
|
8
|
+
export declare function diagnoseAccountBilling(accounts: AccountStore, logger: AdcpLogger, account: {
|
|
9
|
+
billing?: string;
|
|
10
|
+
payment_terms?: string;
|
|
11
|
+
}, toolName: AccountSyncDiagnostic['toolName'], index: number): void;
|
|
12
|
+
export declare function projectAccountList(accounts: AccountStore, items: Account[], ctx: ResolveContext, logger: AdcpLogger): Promise<ReturnType<typeof toWireAccount>[]>;
|
|
13
|
+
export declare function checkSyncAccountRows(accounts: AccountStore, entries: Entry[], existing: (Account | null)[], rows: SyncAccountsResultRow[], indices: number[], ctx: ResolveContext, logger: AdcpLogger): Promise<SyncAccountsResultRow[]>;
|
|
14
|
+
export {};
|