@adcp/sdk 15.9.1 → 16.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/adcp-identity.js +74 -0
- package/bin/adcp.js +2 -0
- package/dist/lib/adapters/keyed-account-backend.d.mts +37 -0
- package/dist/lib/adapters/keyed-account-backend.d.ts +37 -0
- package/dist/lib/adapters/keyed-account-backend.js +121 -0
- package/dist/lib/adapters/keyed-account-backend.mjs +94 -0
- package/dist/lib/adapters/keyed-account-store.d.mts +28 -0
- package/dist/lib/adapters/keyed-account-store.d.ts +28 -0
- package/dist/lib/adapters/keyed-account-store.js +227 -0
- package/dist/lib/adapters/keyed-account-store.mjs +203 -0
- package/dist/lib/core/SingleAgentClient.d.mts +25 -2
- package/dist/lib/core/SingleAgentClient.d.ts +25 -2
- package/dist/lib/core/SingleAgentClient.js +280 -62
- package/dist/lib/core/SingleAgentClient.mjs +282 -57
- package/dist/lib/core/TaskExecutor.d.mts +6 -0
- package/dist/lib/core/TaskExecutor.d.ts +6 -0
- package/dist/lib/core/TaskExecutor.js +66 -5
- package/dist/lib/core/TaskExecutor.mjs +71 -5
- package/dist/lib/core/postgres-webhook-registration-store.js +32 -5
- package/dist/lib/core/postgres-webhook-registration-store.mjs +32 -5
- package/dist/lib/core/redis-webhook-registration-store.js +23 -1
- package/dist/lib/core/redis-webhook-registration-store.mjs +23 -1
- package/dist/lib/core/webhook-registration.d.mts +7 -1
- package/dist/lib/core/webhook-registration.d.ts +7 -1
- package/dist/lib/core/webhook-registration.js +24 -2
- package/dist/lib/core/webhook-registration.mjs +23 -2
- package/dist/lib/identity-3.3/generated-compat.d.mts +34 -0
- package/dist/lib/identity-3.3/generated-compat.d.ts +34 -0
- package/dist/lib/identity-3.3/generated-compat.js +16 -0
- package/dist/lib/identity-3.3/generated-compat.mjs +0 -0
- package/dist/lib/identity-3.3/index.d.mts +10 -0
- package/dist/lib/identity-3.3/index.d.ts +10 -0
- package/dist/lib/identity-3.3/index.js +79 -0
- package/dist/lib/identity-3.3/index.mjs +50 -0
- package/dist/lib/identity-3.3/lifecycle.d.mts +125 -0
- package/dist/lib/identity-3.3/lifecycle.d.ts +125 -0
- package/dist/lib/identity-3.3/lifecycle.js +294 -0
- package/dist/lib/identity-3.3/lifecycle.mjs +272 -0
- package/dist/lib/identity-3.3/revocation.d.mts +86 -0
- package/dist/lib/identity-3.3/revocation.d.ts +86 -0
- package/dist/lib/identity-3.3/revocation.js +308 -0
- package/dist/lib/identity-3.3/revocation.mjs +286 -0
- package/dist/lib/identity-3.3/schemas.draft.d.mts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.d.ts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.js +1448 -0
- package/dist/lib/identity-3.3/schemas.draft.mjs +1428 -0
- package/dist/lib/identity-3.3/server.d.mts +46 -0
- package/dist/lib/identity-3.3/server.d.ts +46 -0
- package/dist/lib/identity-3.3/server.js +279 -0
- package/dist/lib/identity-3.3/server.mjs +260 -0
- package/dist/lib/identity-3.3/store.d.mts +24 -0
- package/dist/lib/identity-3.3/store.d.ts +24 -0
- package/dist/lib/identity-3.3/store.js +191 -0
- package/dist/lib/identity-3.3/store.mjs +169 -0
- package/dist/lib/identity-3.3/trust.d.mts +155 -0
- package/dist/lib/identity-3.3/trust.d.ts +155 -0
- package/dist/lib/identity-3.3/trust.js +383 -0
- package/dist/lib/identity-3.3/trust.mjs +342 -0
- package/dist/lib/identity-3.3/types.d.mts +155 -0
- package/dist/lib/identity-3.3/types.d.ts +155 -0
- package/dist/lib/identity-3.3/types.js +16 -0
- package/dist/lib/identity-3.3/types.mjs +0 -0
- package/dist/lib/identity-3.3/validation.d.mts +2 -0
- package/dist/lib/identity-3.3/validation.d.ts +2 -0
- package/dist/lib/identity-3.3/validation.js +125 -0
- package/dist/lib/identity-3.3/validation.mjs +91 -0
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +2 -0
- package/dist/lib/protocols/index.d.mts +1 -1
- package/dist/lib/protocols/index.d.ts +1 -1
- package/dist/lib/protocols/index.js +2 -2
- package/dist/lib/protocols/index.mjs +2 -2
- package/dist/lib/reporting/azure/index.d.mts +5 -0
- package/dist/lib/reporting/azure/index.d.ts +5 -0
- package/dist/lib/reporting/azure/index.js +26 -7
- package/dist/lib/reporting/azure/index.mjs +26 -7
- package/dist/lib/reporting/bigquery/index.d.mts +39 -5
- package/dist/lib/reporting/bigquery/index.d.ts +39 -5
- package/dist/lib/reporting/bigquery/index.js +26 -20
- package/dist/lib/reporting/bigquery/index.mjs +26 -20
- package/dist/lib/reporting/gcs/adapter.d.mts +8 -1
- package/dist/lib/reporting/gcs/adapter.d.ts +8 -1
- package/dist/lib/reporting/gcs/errors.d.mts +6 -0
- package/dist/lib/reporting/gcs/errors.d.ts +6 -0
- package/dist/lib/reporting/gcs/fence.d.mts +5 -0
- package/dist/lib/reporting/gcs/fence.d.ts +5 -0
- package/dist/lib/reporting/gcs/index.d.mts +9 -0
- package/dist/lib/reporting/gcs/index.d.ts +9 -0
- package/dist/lib/reporting/gcs/reader.d.mts +27 -3
- package/dist/lib/reporting/gcs/reader.d.ts +27 -3
- package/dist/lib/reporting/gcs/row-provider.d.mts +7 -0
- package/dist/lib/reporting/gcs/row-provider.d.ts +7 -0
- package/dist/lib/reporting/gcs/row-provider.js +34 -14
- package/dist/lib/reporting/gcs/row-provider.mjs +34 -14
- package/dist/lib/reporting/ledger/change-feed.d.mts +22 -1
- package/dist/lib/reporting/ledger/change-feed.d.ts +22 -1
- package/dist/lib/reporting/ledger/index.d.mts +11 -0
- package/dist/lib/reporting/ledger/index.d.ts +11 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +8 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +8 -0
- package/dist/lib/reporting/ledger/managed-router.d.mts +27 -2
- package/dist/lib/reporting/ledger/managed-router.d.ts +27 -2
- package/dist/lib/reporting/ledger/managed.d.mts +86 -6
- package/dist/lib/reporting/ledger/managed.d.ts +86 -6
- package/dist/lib/reporting/ledger/notification-activity.d.mts +65 -3
- package/dist/lib/reporting/ledger/notification-activity.d.ts +65 -3
- package/dist/lib/reporting/ledger/object-writes.d.mts +64 -5
- package/dist/lib/reporting/ledger/object-writes.d.ts +64 -5
- package/dist/lib/reporting/ledger/postgres.d.mts +43 -9
- package/dist/lib/reporting/ledger/postgres.d.ts +43 -9
- package/dist/lib/reporting/ledger/postgres.js +43 -27
- package/dist/lib/reporting/ledger/postgres.mjs +43 -27
- package/dist/lib/reporting/ledger/row-encoding.d.mts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.d.ts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.js +8 -4
- package/dist/lib/reporting/ledger/row-encoding.mjs +6 -3
- package/dist/lib/reporting/ledger/row-storage-errors.d.mts +11 -1
- package/dist/lib/reporting/ledger/row-storage-errors.d.ts +11 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.js +133 -18
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +133 -18
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.js +106 -31
- package/dist/lib/reporting/ledger/row-storage-object.mjs +104 -31
- package/dist/lib/reporting/ledger/row-storage.d.mts +87 -20
- package/dist/lib/reporting/ledger/row-storage.d.ts +87 -20
- package/dist/lib/reporting/ledger/row-storage.js +126 -66
- package/dist/lib/reporting/ledger/row-storage.mjs +129 -67
- package/dist/lib/reporting/ledger/schedule.d.mts +13 -0
- package/dist/lib/reporting/ledger/schedule.d.ts +13 -0
- package/dist/lib/reporting/ledger/schedule.js +24 -0
- package/dist/lib/reporting/ledger/schedule.mjs +23 -0
- package/dist/lib/reporting/ledger/types.d.mts +23 -1
- package/dist/lib/reporting/ledger/types.d.ts +23 -1
- package/dist/lib/reporting/s3/index.d.mts +5 -0
- package/dist/lib/reporting/s3/index.d.ts +5 -0
- package/dist/lib/reporting/s3/index.js +37 -14
- package/dist/lib/reporting/s3/index.mjs +37 -14
- package/dist/lib/reporting/service/index.d.mts +10 -0
- package/dist/lib/reporting/service/index.d.ts +10 -0
- package/dist/lib/reporting/service/maintenance.d.mts +28 -2
- package/dist/lib/reporting/service/maintenance.d.ts +28 -2
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-sync-contract.d.mts +14 -0
- package/dist/lib/server/account-sync-contract.d.ts +14 -0
- package/dist/lib/server/account-sync-contract.js +225 -0
- package/dist/lib/server/account-sync-contract.mjs +197 -0
- package/dist/lib/server/adcp-server.js +5 -0
- package/dist/lib/server/adcp-server.mjs +10 -0
- package/dist/lib/server/auth-signature.d.mts +15 -0
- package/dist/lib/server/auth-signature.d.ts +15 -0
- package/dist/lib/server/auth-signature.js +72 -2
- package/dist/lib/server/auth-signature.mjs +81 -2
- package/dist/lib/server/auth.d.mts +6 -0
- package/dist/lib/server/auth.d.ts +6 -0
- package/dist/lib/server/auth.js +6 -0
- package/dist/lib/server/auth.mjs +6 -0
- package/dist/lib/server/create-adcp-server.d.mts +19 -5
- package/dist/lib/server/create-adcp-server.d.ts +19 -5
- package/dist/lib/server/create-adcp-server.js +259 -19
- package/dist/lib/server/create-adcp-server.mjs +266 -10
- package/dist/lib/server/decisioning/account.d.mts +24 -1
- package/dist/lib/server/decisioning/account.d.ts +24 -1
- package/dist/lib/server/decisioning/index.d.mts +1 -1
- package/dist/lib/server/decisioning/index.d.ts +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.js +61 -11
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +65 -12
- package/dist/lib/server/index.d.mts +2 -0
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.js +12 -0
- package/dist/lib/server/index.mjs +12 -0
- package/dist/lib/server/notification-subscriptions/runtime.js +9 -1
- package/dist/lib/server/notification-subscriptions/runtime.mjs +9 -1
- package/dist/lib/server/notification-subscriptions/types.d.mts +5 -0
- package/dist/lib/server/notification-subscriptions/types.d.ts +5 -0
- package/dist/lib/server/principal/types.d.mts +1 -1
- package/dist/lib/server/principal/types.d.ts +1 -1
- package/dist/lib/server/serve.js +5 -0
- package/dist/lib/server/serve.mjs +5 -0
- package/dist/lib/server/webhook-delivery/recovery.d.mts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.d.ts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.js +4 -0
- package/dist/lib/server/webhook-delivery/recovery.mjs +4 -0
- package/dist/lib/server/webhook-emitter.d.mts +10 -0
- package/dist/lib/server/webhook-emitter.d.ts +10 -0
- package/dist/lib/server/webhook-emitter.js +22 -0
- package/dist/lib/server/webhook-emitter.mjs +22 -0
- package/dist/lib/signing/agent-context.d.mts +0 -5
- package/dist/lib/signing/agent-context.d.ts +0 -5
- package/dist/lib/signing/agent-context.js +9 -1
- package/dist/lib/signing/agent-context.mjs +9 -1
- package/dist/lib/signing/agent-fetch.js +27 -2
- package/dist/lib/signing/agent-fetch.mjs +32 -2
- package/dist/lib/signing/agent-resolver/canonicalize.d.mts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.js +17 -5
- package/dist/lib/signing/agent-resolver/canonicalize.mjs +16 -5
- package/dist/lib/signing/agent-resolver/index.d.mts +1 -0
- package/dist/lib/signing/agent-resolver/index.d.ts +1 -0
- package/dist/lib/signing/agent-resolver/index.js +5 -0
- package/dist/lib/signing/agent-resolver/index.mjs +3 -0
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +30 -3
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +30 -3
- package/dist/lib/signing/agent-resolver/strict-json.d.mts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.d.ts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.js +5 -3
- package/dist/lib/signing/agent-resolver/strict-json.mjs +5 -3
- package/dist/lib/signing/brand-jwks.d.mts +2 -2
- package/dist/lib/signing/brand-jwks.d.ts +2 -2
- package/dist/lib/signing/brand-jwks.js +4 -4
- package/dist/lib/signing/brand-jwks.mjs +4 -4
- package/dist/lib/signing/client.d.mts +1 -0
- package/dist/lib/signing/client.d.ts +1 -0
- package/dist/lib/signing/client.js +5 -0
- package/dist/lib/signing/client.mjs +3 -0
- package/dist/lib/signing/crypto.js +8 -0
- package/dist/lib/signing/crypto.mjs +9 -1
- package/dist/lib/signing/fetch-async.js +1 -1
- package/dist/lib/signing/fetch-async.mjs +1 -1
- package/dist/lib/signing/fetch.js +1 -1
- package/dist/lib/signing/fetch.mjs +1 -1
- package/dist/lib/signing/jwks-https.d.mts +1 -1
- package/dist/lib/signing/jwks-https.d.ts +1 -1
- package/dist/lib/signing/jwks-https.js +1 -1
- package/dist/lib/signing/jwks-https.mjs +1 -1
- package/dist/lib/signing/jwks.d.mts +11 -3
- package/dist/lib/signing/jwks.d.ts +11 -3
- package/dist/lib/signing/jwks.js +1 -1
- package/dist/lib/signing/jwks.mjs +1 -1
- package/dist/lib/signing/middleware.js +9 -0
- package/dist/lib/signing/middleware.mjs +14 -0
- package/dist/lib/signing/parser.d.mts +9 -6
- package/dist/lib/signing/parser.d.ts +9 -6
- package/dist/lib/signing/parser.js +82 -64
- package/dist/lib/signing/parser.mjs +83 -65
- package/dist/lib/signing/revocation.d.mts +4 -1
- package/dist/lib/signing/revocation.d.ts +4 -1
- package/dist/lib/signing/revocation.js +36 -3
- package/dist/lib/signing/revocation.mjs +34 -2
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.js +4 -0
- package/dist/lib/signing/server.mjs +4 -0
- package/dist/lib/signing/types.d.mts +3 -0
- package/dist/lib/signing/types.d.ts +3 -0
- package/dist/lib/signing/verifier.js +1 -1
- package/dist/lib/signing/verifier.mjs +1 -1
- package/dist/lib/signing/web-bot-auth.d.mts +191 -0
- package/dist/lib/signing/web-bot-auth.d.ts +191 -0
- package/dist/lib/signing/web-bot-auth.js +837 -0
- package/dist/lib/signing/web-bot-auth.mjs +796 -0
- package/dist/lib/signing/webhook-verifier.js +1 -1
- package/dist/lib/signing/webhook-verifier.mjs +1 -1
- package/dist/lib/testing/client.d.mts +1 -4
- package/dist/lib/testing/client.d.ts +1 -4
- package/dist/lib/testing/client.js +141 -20
- package/dist/lib/testing/client.mjs +137 -19
- package/dist/lib/testing/compliance/comply.js +29 -10
- package/dist/lib/testing/compliance/comply.mjs +37 -11
- package/dist/lib/testing/storyboard/account-sync-contract.d.mts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.d.ts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.js +79 -0
- package/dist/lib/testing/storyboard/account-sync-contract.mjs +55 -0
- package/dist/lib/testing/storyboard/default-invariants.js +2 -0
- package/dist/lib/testing/storyboard/default-invariants.mjs +2 -0
- package/dist/lib/testing/storyboard/runner.js +23 -8
- package/dist/lib/testing/storyboard/runner.mjs +24 -8
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/adcp.d.mts +4 -0
- package/dist/lib/types/adcp.d.ts +4 -0
- package/dist/lib/types/schemas.generated.d.ts +6 -6
- package/dist/lib/utils/capabilities.d.mts +1 -0
- package/dist/lib/utils/capabilities.d.ts +1 -0
- package/dist/lib/utils/capabilities.js +5 -0
- package/dist/lib/utils/capabilities.mjs +5 -0
- package/dist/lib/v2/projection/catalog-snapshot.js +3 -1
- package/dist/lib/v2/projection/catalog-snapshot.mjs +3 -1
- package/dist/lib/v2/projection/creative-delivery.d.mts +34 -10
- package/dist/lib/v2/projection/creative-delivery.d.ts +34 -10
- package/dist/lib/v2/projection/creative-delivery.js +26 -10
- package/dist/lib/v2/projection/creative-delivery.mjs +26 -10
- package/dist/lib/v2/projection/index.d.mts +1 -1
- package/dist/lib/v2/projection/index.d.ts +1 -1
- package/dist/lib/v2/projection/index.js +2 -0
- package/dist/lib/v2/projection/index.mjs +2 -0
- package/dist/lib/v2/projection/legacy-routes.d.mts +34 -2
- package/dist/lib/v2/projection/legacy-routes.d.ts +34 -2
- package/dist/lib/v2/projection/legacy-routes.js +35 -2
- package/dist/lib/v2/projection/legacy-routes.mjs +32 -2
- package/dist/lib/validation/schema-loader.d.mts +2 -0
- package/dist/lib/validation/schema-loader.d.ts +2 -0
- package/dist/lib/validation/schema-loader.js +43 -4
- package/dist/lib/validation/schema-loader.mjs +39 -3
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +4 -0
- package/docs/guides/REPORTING-LEDGER-CUTOVER.md +1 -1
- package/docs/guides/REPORTING-LEDGER.md +99 -29
- package/docs/guides/REPORTING-OPERATIONS.md +29 -13
- package/docs/guides/REPORTING-STABILITY.md +76 -0
- package/docs/guides/account-resolution.md +101 -0
- package/docs/llms.txt +3 -2
- package/docs/migration-12-to-13.md +15 -0
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +494 -0
- package/docs/migration-agent-resolution-3.3.md +5 -0
- package/docs/migration-reporting-row-storage-alignment.md +137 -0
- package/examples/storyboards/account-sync-contract.yaml +57 -0
- package/package.json +17 -1
|
@@ -9,6 +9,9 @@ interface ReportingAccountActivityBaseV1 {
|
|
|
9
9
|
reporting_obligation_id: string;
|
|
10
10
|
occurredAt: string;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
14
|
+
*/
|
|
12
15
|
export interface ReportingLifecycleActivityV1 extends ReportingAccountActivityBaseV1 {
|
|
13
16
|
activityType: 'reporting.lifecycle_changed';
|
|
14
17
|
notificationType?: 'reporting.status_changed';
|
|
@@ -28,6 +31,9 @@ export interface ReportingLifecycleActivityV1 extends ReportingAccountActivityBa
|
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
33
|
}
|
|
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
|
+
*/
|
|
31
37
|
export interface ReportingLedgerChangedActivityV1 extends ReportingAccountActivityBaseV1 {
|
|
32
38
|
activityType: 'reporting.ledger_changed';
|
|
33
39
|
notificationType: 'reporting.ledger_changed';
|
|
@@ -38,6 +44,9 @@ export interface ReportingLedgerChangedActivityV1 extends ReportingAccountActivi
|
|
|
38
44
|
reporting_adjustment_id?: string;
|
|
39
45
|
adjusts_reporting_revision_id?: string;
|
|
40
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
49
|
+
*/
|
|
41
50
|
export interface ReportingDeliveryReadyActivityV1 extends ReportingAccountActivityBaseV1 {
|
|
42
51
|
activityType: 'reporting.delivery_ready';
|
|
43
52
|
notificationType: 'reporting.delivery_ready';
|
|
@@ -50,31 +59,53 @@ export interface ReportingDeliveryReadyActivityV1 extends ReportingAccountActivi
|
|
|
50
59
|
finality: ReportingLedgerRevisionV1['finality'];
|
|
51
60
|
data_through: string | null;
|
|
52
61
|
}
|
|
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
|
|
64
|
+
*/
|
|
53
65
|
export type ReportingNotificationActivityV1 = ReportingLifecycleActivityV1 | ReportingLedgerChangedActivityV1 | ReportingDeliveryReadyActivityV1;
|
|
54
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Backwards-compatible lifecycle activity surface returned by listActivity().
|
|
68
|
+
*
|
|
69
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
70
|
+
*/
|
|
55
71
|
export interface ReportingAccountActivityV1 extends ReportingLifecycleActivityV1 {
|
|
56
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* @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
|
|
75
|
+
*/
|
|
57
76
|
export interface ReportingAccountActivityRecordV1 extends ReportingAccountActivityV1 {
|
|
58
77
|
recordedAt: string;
|
|
59
78
|
notificationProjectedAt?: string;
|
|
60
79
|
/** Set when the claim was bounded out of the pending set without delivering. */
|
|
61
80
|
notificationAbandonedAt?: string;
|
|
62
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* @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
|
|
84
|
+
*/
|
|
63
85
|
export type ReportingNotificationActivityRecordV1 = ReportingNotificationActivityV1 & {
|
|
64
86
|
recordedAt: string;
|
|
65
87
|
notificationProjectedAt?: string;
|
|
66
88
|
notificationAbandonedAt?: string;
|
|
67
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* @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
|
|
92
|
+
*/
|
|
68
93
|
export interface ReportingAccountActivityPageV1 {
|
|
69
94
|
activities: ReportingAccountActivityRecordV1[];
|
|
70
95
|
hasMore: boolean;
|
|
71
96
|
nextCursor?: string;
|
|
72
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* @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
|
|
100
|
+
*/
|
|
73
101
|
export interface ReportingNotificationActivityPageV1 {
|
|
74
102
|
activities: ReportingNotificationActivityRecordV1[];
|
|
75
103
|
hasMore: boolean;
|
|
76
104
|
nextCursor?: string;
|
|
77
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
108
|
+
*/
|
|
78
109
|
export interface ReportingNotificationRecoveryMetricsV1 {
|
|
79
110
|
claimed: number;
|
|
80
111
|
matched: number;
|
|
@@ -88,18 +119,26 @@ export interface ReportingNotificationRecoveryMetricsV1 {
|
|
|
88
119
|
* Raised when live delivery authority failed closed for an operational reason
|
|
89
120
|
* rather than a deliberate one. The claim is released and retried; the activity
|
|
90
121
|
* is never projected as delivered.
|
|
122
|
+
*
|
|
123
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
91
124
|
*/
|
|
92
125
|
export declare class ReportingNotificationRetryableSuppressionError extends Error {
|
|
93
126
|
readonly reason: WebhookAttemptSuppressionReason;
|
|
94
127
|
readonly name = "ReportingNotificationRetryableSuppressionError";
|
|
95
128
|
constructor(reason: WebhookAttemptSuppressionReason);
|
|
96
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* @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
|
|
132
|
+
*/
|
|
97
133
|
export interface ReportingNotificationProjectionErrorV1 {
|
|
98
134
|
transitionId: string;
|
|
99
135
|
tenantId: string;
|
|
100
136
|
accountId: string;
|
|
101
137
|
attemptCount: number;
|
|
102
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
141
|
+
*/
|
|
103
142
|
export interface PostgresReportingNotificationActivityOptions {
|
|
104
143
|
db: ReportingLedgerTransactionV1;
|
|
105
144
|
/**
|
|
@@ -181,6 +220,9 @@ export interface PostgresReportingNotificationActivityOptions {
|
|
|
181
220
|
*/
|
|
182
221
|
maxAttempts?: number;
|
|
183
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* @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
|
|
225
|
+
*/
|
|
184
226
|
export interface PostgresReportingNotificationActivityRuntime {
|
|
185
227
|
readonly port: ReportingLedgerNotificationActivityPortV1<ReportingLedgerTransactionV1>;
|
|
186
228
|
readonly migrations: {
|
|
@@ -216,11 +258,21 @@ export interface PostgresReportingNotificationActivityRuntime {
|
|
|
216
258
|
limit?: number;
|
|
217
259
|
}): Promise<number>;
|
|
218
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* @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
|
|
263
|
+
*/
|
|
219
264
|
export declare function getReportingNotificationActivityMigration(options?: {
|
|
220
265
|
tableName?: string;
|
|
221
266
|
}): string;
|
|
222
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* Child table holding one row per frozen recipient.
|
|
269
|
+
*
|
|
270
|
+
* @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
|
|
271
|
+
*/
|
|
223
272
|
export declare function recipientTableName(tableName?: string): string;
|
|
273
|
+
/**
|
|
274
|
+
* @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
|
|
275
|
+
*/
|
|
224
276
|
export declare const REPORTING_NOTIFICATION_ACTIVITY_MIGRATION: string;
|
|
225
277
|
/**
|
|
226
278
|
* Builds the durable pre-POST attempt checkpoint for the reporting activity
|
|
@@ -237,7 +289,11 @@ export declare const REPORTING_NOTIFICATION_ACTIVITY_MIGRATION: string;
|
|
|
237
289
|
* lease: a checkpoint only ever makes a recipient less revisable, which is the
|
|
238
290
|
* safe direction, and an outbox worker legitimately holds no activity lease.
|
|
239
291
|
*/
|
|
240
|
-
/**
|
|
292
|
+
/**
|
|
293
|
+
* Durable store a checkpoint is bound to, so a mismatched pairing cannot be silent.
|
|
294
|
+
*
|
|
295
|
+
* @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
|
|
296
|
+
*/
|
|
241
297
|
export interface ReportingNotificationAttemptCheckpointV1 {
|
|
242
298
|
(input: Readonly<NotificationDeliveryAttemptCheckpointInput>): Promise<void | number>;
|
|
243
299
|
/**
|
|
@@ -252,6 +308,9 @@ export interface ReportingNotificationAttemptCheckpointV1 {
|
|
|
252
308
|
tableName: string;
|
|
253
309
|
}>;
|
|
254
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* @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
|
|
313
|
+
*/
|
|
255
314
|
export declare function createPostgresReportingNotificationAttemptCheckpoint(options: {
|
|
256
315
|
db: ReportingLedgerTransactionV1;
|
|
257
316
|
namespace?: string;
|
|
@@ -266,5 +325,8 @@ export declare function createPostgresReportingNotificationAttemptCheckpoint(opt
|
|
|
266
325
|
*/
|
|
267
326
|
eventTypes?: readonly string[];
|
|
268
327
|
}): ReportingNotificationAttemptCheckpointV1;
|
|
328
|
+
/**
|
|
329
|
+
* @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
|
|
330
|
+
*/
|
|
269
331
|
export declare function createPostgresReportingNotificationActivityRuntime(options: PostgresReportingNotificationActivityOptions): PostgresReportingNotificationActivityRuntime;
|
|
270
332
|
export {};
|
|
@@ -1,44 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
3
|
+
*/
|
|
1
4
|
export declare class ReportingObjectWriteConflictError extends Error {
|
|
2
5
|
constructor();
|
|
3
6
|
}
|
|
4
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Symbol branding preserves errors when CJS stores are paired with ESM fences.
|
|
9
|
+
*
|
|
10
|
+
* @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
|
|
11
|
+
*/
|
|
5
12
|
export declare function isReportingObjectWriteConflictError(error: unknown): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @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
|
|
15
|
+
*/
|
|
6
16
|
export declare class ReportingObjectWriteNotRevokedError extends Error {
|
|
7
17
|
constructor();
|
|
8
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
21
|
+
*/
|
|
9
22
|
export declare function isReportingObjectWriteNotRevokedError(error: unknown): boolean;
|
|
10
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Non-secret destination identity, scoped to the store's isolated tenant database.
|
|
25
|
+
*
|
|
26
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
27
|
+
*/
|
|
11
28
|
export interface ReportingObjectWriteScopeV1 {
|
|
12
29
|
account_id: string;
|
|
13
30
|
destination_ref: string;
|
|
14
31
|
generation: number;
|
|
15
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @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
|
|
35
|
+
*/
|
|
16
36
|
export interface ReportingObjectWriteV1 {
|
|
17
37
|
bucket: string;
|
|
18
38
|
object_name: string;
|
|
19
39
|
sha256: string;
|
|
20
40
|
size_bytes: number;
|
|
21
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @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
|
|
44
|
+
*/
|
|
22
45
|
export interface ReportingObjectWriteBindingV1 {
|
|
23
46
|
bucket: string;
|
|
24
47
|
/** SHA-256 of a host-owned deployment namespace; immutable per authorization generation. */
|
|
25
48
|
namespace_key: string;
|
|
26
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @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
|
|
52
|
+
*/
|
|
27
53
|
export interface ReportingObjectWriteContextV1 {
|
|
28
54
|
signal?: AbortSignal;
|
|
29
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @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
|
|
58
|
+
*/
|
|
30
59
|
export declare function reportingObjectWriteScopeKey(scope: ReportingObjectWriteScopeV1): string;
|
|
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
|
+
*/
|
|
31
63
|
export declare function reportingObjectWriteName(scope: ReportingObjectWriteScopeV1, binding: ReportingObjectWriteBindingV1, planId: string, index: number): string;
|
|
64
|
+
/**
|
|
65
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
66
|
+
*/
|
|
32
67
|
export interface ReportingObjectWritePlanV1 extends ReportingObjectWriteScopeV1 {
|
|
33
68
|
provider: ReportingObjectWriteBindingV1;
|
|
34
69
|
/** Stable opaque identity for the same logical delivery across retries. */
|
|
35
70
|
plan_id: string;
|
|
36
71
|
objects: readonly ReportingObjectWriteV1[];
|
|
37
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* @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
|
|
75
|
+
*/
|
|
38
76
|
export interface ReportingObjectWriteCursorV1 {
|
|
39
77
|
plan_id: string;
|
|
40
78
|
object_index: number;
|
|
41
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* @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
|
|
82
|
+
*/
|
|
42
83
|
export interface ReportingObjectWriteStoreV1 {
|
|
43
84
|
/** Registration and destination revocation MUST share one authority/lock boundary. */
|
|
44
85
|
registerObjectWritePlan(plan: ReportingObjectWritePlanV1, context?: ReportingObjectWriteContextV1): Promise<'registered' | 'unchanged' | 'revoked'>;
|
|
@@ -54,16 +95,34 @@ export interface ReportingObjectWriteStoreV1 {
|
|
|
54
95
|
tombstone_generation: string;
|
|
55
96
|
}, context?: ReportingObjectWriteContextV1): Promise<void>;
|
|
56
97
|
}
|
|
57
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Apply after REPORTING_MANAGED_DELIVERY_MIGRATION. Additive and independently opt-in.
|
|
100
|
+
*
|
|
101
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
102
|
+
*/
|
|
58
103
|
export declare const REPORTING_OBJECT_WRITE_MIGRATION = "\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_write_bindings (\n account_id TEXT NOT NULL,\n destination_ref TEXT NOT NULL,\n generation BIGINT NOT NULL,\n bucket TEXT NOT NULL,\n namespace_key TEXT NOT NULL CHECK (namespace_key ~ '^[a-f0-9]{64}$'),\n PRIMARY KEY (account_id, destination_ref, generation),\n FOREIGN KEY (account_id, destination_ref, generation)\n REFERENCES adcp_reporting_destination_authorizations(account_id, destination_ref, generation)\n);\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_write_plans (\n account_id TEXT NOT NULL,\n destination_ref TEXT NOT NULL,\n generation BIGINT NOT NULL,\n plan_id TEXT NOT NULL CHECK (plan_id ~ '^[a-f0-9]{64}$'),\n fingerprint TEXT NOT NULL,\n PRIMARY KEY (account_id, destination_ref, generation, plan_id),\n FOREIGN KEY (account_id, destination_ref, generation)\n REFERENCES adcp_reporting_destination_authorizations(account_id, destination_ref, generation)\n);\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_writes (\n account_id TEXT NOT NULL,\n destination_ref TEXT NOT NULL,\n generation BIGINT NOT NULL,\n plan_id TEXT NOT NULL,\n object_index INTEGER NOT NULL CHECK (object_index >= 0 AND object_index < 128),\n bucket TEXT NOT NULL,\n object_name TEXT NOT NULL,\n sha256 TEXT NOT NULL CHECK (sha256 ~ '^[a-f0-9]{64}$'),\n size_bytes BIGINT NOT NULL CHECK (size_bytes >= 0 AND size_bytes <= 67108864),\n fenced_at TIMESTAMPTZ,\n tombstone_generation TEXT,\n PRIMARY KEY (account_id, destination_ref, generation, plan_id, object_index),\n UNIQUE (bucket, object_name),\n FOREIGN KEY (account_id, destination_ref, generation, plan_id)\n REFERENCES adcp_reporting_object_write_plans(account_id, destination_ref, generation, plan_id)\n);\n";
|
|
104
|
+
/**
|
|
105
|
+
* @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
|
|
106
|
+
*/
|
|
59
107
|
export declare function assertReportingObjectWriteScope(scope: ReportingObjectWriteScopeV1): void;
|
|
108
|
+
/**
|
|
109
|
+
* @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
|
|
110
|
+
*/
|
|
60
111
|
export declare function reportingObjectWritePlanFingerprint(plan: ReportingObjectWritePlanV1): string;
|
|
61
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Opt-in authority for complete provider adapters; the original primitive store port is unchanged.
|
|
114
|
+
*
|
|
115
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
116
|
+
*/
|
|
62
117
|
export interface ReportingObjectWriteAuthorityStoreV1 extends ReportingObjectWriteStoreV1 {
|
|
63
118
|
probeObjectWriteAuthority(context?: ReportingObjectWriteContextV1): Promise<boolean>;
|
|
64
119
|
getObjectWriteAuthorityId(context?: ReportingObjectWriteContextV1): Promise<string>;
|
|
65
120
|
getAuthorizedObjectWriteBinding(scope: ReportingObjectWriteScopeV1, context?: ReportingObjectWriteContextV1): Promise<ReportingObjectWriteBindingV1 | null>;
|
|
66
121
|
getObjectWritePlan(scope: ReportingObjectWriteScopeV1, planId: string, context?: ReportingObjectWriteContextV1): Promise<ReportingObjectWritePlanV1 | null>;
|
|
67
122
|
}
|
|
68
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* PostgreSQL 13+; apply after REPORTING_OBJECT_WRITE_MIGRATION. Identity survives replica/worker restart.
|
|
125
|
+
*
|
|
126
|
+
* @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
|
|
127
|
+
*/
|
|
69
128
|
export declare const REPORTING_OBJECT_WRITE_AUTHORITY_MIGRATION = "\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_write_authority (\n singleton BOOLEAN PRIMARY KEY DEFAULT TRUE CHECK (singleton),\n installation_id UUID NOT NULL DEFAULT gen_random_uuid(),\n schema_version INTEGER NOT NULL DEFAULT 1 CHECK (schema_version = 1)\n);\nINSERT INTO adcp_reporting_object_write_authority (singleton) VALUES (TRUE) ON CONFLICT DO NOTHING;\n";
|
|
@@ -1,44 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
3
|
+
*/
|
|
1
4
|
export declare class ReportingObjectWriteConflictError extends Error {
|
|
2
5
|
constructor();
|
|
3
6
|
}
|
|
4
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Symbol branding preserves errors when CJS stores are paired with ESM fences.
|
|
9
|
+
*
|
|
10
|
+
* @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
|
|
11
|
+
*/
|
|
5
12
|
export declare function isReportingObjectWriteConflictError(error: unknown): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @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
|
|
15
|
+
*/
|
|
6
16
|
export declare class ReportingObjectWriteNotRevokedError extends Error {
|
|
7
17
|
constructor();
|
|
8
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
21
|
+
*/
|
|
9
22
|
export declare function isReportingObjectWriteNotRevokedError(error: unknown): boolean;
|
|
10
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Non-secret destination identity, scoped to the store's isolated tenant database.
|
|
25
|
+
*
|
|
26
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
27
|
+
*/
|
|
11
28
|
export interface ReportingObjectWriteScopeV1 {
|
|
12
29
|
account_id: string;
|
|
13
30
|
destination_ref: string;
|
|
14
31
|
generation: number;
|
|
15
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @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
|
|
35
|
+
*/
|
|
16
36
|
export interface ReportingObjectWriteV1 {
|
|
17
37
|
bucket: string;
|
|
18
38
|
object_name: string;
|
|
19
39
|
sha256: string;
|
|
20
40
|
size_bytes: number;
|
|
21
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @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
|
|
44
|
+
*/
|
|
22
45
|
export interface ReportingObjectWriteBindingV1 {
|
|
23
46
|
bucket: string;
|
|
24
47
|
/** SHA-256 of a host-owned deployment namespace; immutable per authorization generation. */
|
|
25
48
|
namespace_key: string;
|
|
26
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @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
|
|
52
|
+
*/
|
|
27
53
|
export interface ReportingObjectWriteContextV1 {
|
|
28
54
|
signal?: AbortSignal;
|
|
29
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @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
|
|
58
|
+
*/
|
|
30
59
|
export declare function reportingObjectWriteScopeKey(scope: ReportingObjectWriteScopeV1): string;
|
|
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
|
+
*/
|
|
31
63
|
export declare function reportingObjectWriteName(scope: ReportingObjectWriteScopeV1, binding: ReportingObjectWriteBindingV1, planId: string, index: number): string;
|
|
64
|
+
/**
|
|
65
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
66
|
+
*/
|
|
32
67
|
export interface ReportingObjectWritePlanV1 extends ReportingObjectWriteScopeV1 {
|
|
33
68
|
provider: ReportingObjectWriteBindingV1;
|
|
34
69
|
/** Stable opaque identity for the same logical delivery across retries. */
|
|
35
70
|
plan_id: string;
|
|
36
71
|
objects: readonly ReportingObjectWriteV1[];
|
|
37
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* @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
|
|
75
|
+
*/
|
|
38
76
|
export interface ReportingObjectWriteCursorV1 {
|
|
39
77
|
plan_id: string;
|
|
40
78
|
object_index: number;
|
|
41
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* @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
|
|
82
|
+
*/
|
|
42
83
|
export interface ReportingObjectWriteStoreV1 {
|
|
43
84
|
/** Registration and destination revocation MUST share one authority/lock boundary. */
|
|
44
85
|
registerObjectWritePlan(plan: ReportingObjectWritePlanV1, context?: ReportingObjectWriteContextV1): Promise<'registered' | 'unchanged' | 'revoked'>;
|
|
@@ -54,16 +95,34 @@ export interface ReportingObjectWriteStoreV1 {
|
|
|
54
95
|
tombstone_generation: string;
|
|
55
96
|
}, context?: ReportingObjectWriteContextV1): Promise<void>;
|
|
56
97
|
}
|
|
57
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Apply after REPORTING_MANAGED_DELIVERY_MIGRATION. Additive and independently opt-in.
|
|
100
|
+
*
|
|
101
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
102
|
+
*/
|
|
58
103
|
export declare const REPORTING_OBJECT_WRITE_MIGRATION = "\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_write_bindings (\n account_id TEXT NOT NULL,\n destination_ref TEXT NOT NULL,\n generation BIGINT NOT NULL,\n bucket TEXT NOT NULL,\n namespace_key TEXT NOT NULL CHECK (namespace_key ~ '^[a-f0-9]{64}$'),\n PRIMARY KEY (account_id, destination_ref, generation),\n FOREIGN KEY (account_id, destination_ref, generation)\n REFERENCES adcp_reporting_destination_authorizations(account_id, destination_ref, generation)\n);\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_write_plans (\n account_id TEXT NOT NULL,\n destination_ref TEXT NOT NULL,\n generation BIGINT NOT NULL,\n plan_id TEXT NOT NULL CHECK (plan_id ~ '^[a-f0-9]{64}$'),\n fingerprint TEXT NOT NULL,\n PRIMARY KEY (account_id, destination_ref, generation, plan_id),\n FOREIGN KEY (account_id, destination_ref, generation)\n REFERENCES adcp_reporting_destination_authorizations(account_id, destination_ref, generation)\n);\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_writes (\n account_id TEXT NOT NULL,\n destination_ref TEXT NOT NULL,\n generation BIGINT NOT NULL,\n plan_id TEXT NOT NULL,\n object_index INTEGER NOT NULL CHECK (object_index >= 0 AND object_index < 128),\n bucket TEXT NOT NULL,\n object_name TEXT NOT NULL,\n sha256 TEXT NOT NULL CHECK (sha256 ~ '^[a-f0-9]{64}$'),\n size_bytes BIGINT NOT NULL CHECK (size_bytes >= 0 AND size_bytes <= 67108864),\n fenced_at TIMESTAMPTZ,\n tombstone_generation TEXT,\n PRIMARY KEY (account_id, destination_ref, generation, plan_id, object_index),\n UNIQUE (bucket, object_name),\n FOREIGN KEY (account_id, destination_ref, generation, plan_id)\n REFERENCES adcp_reporting_object_write_plans(account_id, destination_ref, generation, plan_id)\n);\n";
|
|
104
|
+
/**
|
|
105
|
+
* @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
|
|
106
|
+
*/
|
|
59
107
|
export declare function assertReportingObjectWriteScope(scope: ReportingObjectWriteScopeV1): void;
|
|
108
|
+
/**
|
|
109
|
+
* @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
|
|
110
|
+
*/
|
|
60
111
|
export declare function reportingObjectWritePlanFingerprint(plan: ReportingObjectWritePlanV1): string;
|
|
61
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Opt-in authority for complete provider adapters; the original primitive store port is unchanged.
|
|
114
|
+
*
|
|
115
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
116
|
+
*/
|
|
62
117
|
export interface ReportingObjectWriteAuthorityStoreV1 extends ReportingObjectWriteStoreV1 {
|
|
63
118
|
probeObjectWriteAuthority(context?: ReportingObjectWriteContextV1): Promise<boolean>;
|
|
64
119
|
getObjectWriteAuthorityId(context?: ReportingObjectWriteContextV1): Promise<string>;
|
|
65
120
|
getAuthorizedObjectWriteBinding(scope: ReportingObjectWriteScopeV1, context?: ReportingObjectWriteContextV1): Promise<ReportingObjectWriteBindingV1 | null>;
|
|
66
121
|
getObjectWritePlan(scope: ReportingObjectWriteScopeV1, planId: string, context?: ReportingObjectWriteContextV1): Promise<ReportingObjectWritePlanV1 | null>;
|
|
67
122
|
}
|
|
68
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* PostgreSQL 13+; apply after REPORTING_OBJECT_WRITE_MIGRATION. Identity survives replica/worker restart.
|
|
125
|
+
*
|
|
126
|
+
* @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
|
|
127
|
+
*/
|
|
69
128
|
export declare const REPORTING_OBJECT_WRITE_AUTHORITY_MIGRATION = "\nCREATE TABLE IF NOT EXISTS adcp_reporting_object_write_authority (\n singleton BOOLEAN PRIMARY KEY DEFAULT TRUE CHECK (singleton),\n installation_id UUID NOT NULL DEFAULT gen_random_uuid(),\n schema_version INTEGER NOT NULL DEFAULT 1 CHECK (schema_version = 1)\n);\nINSERT INTO adcp_reporting_object_write_authority (singleton) VALUES (TRUE) ON CONFLICT DO NOTHING;\n";
|
|
@@ -12,12 +12,22 @@ interface ReportingPgClient {
|
|
|
12
12
|
query<Row extends QueryResultRow = QueryResultRow>(text: string, values?: unknown[]): Promise<ReportingPgResult<Row>>;
|
|
13
13
|
release(error?: Error): void;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @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
|
|
17
|
+
*/
|
|
15
18
|
export interface ReportingPgPool {
|
|
16
19
|
query<Row extends QueryResultRow = QueryResultRow>(text: string, values?: unknown[]): Promise<ReportingPgResult<Row>>;
|
|
17
20
|
connect(): Promise<ReportingPgClient>;
|
|
18
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* @experimental Reliable Reporting storage surface: breaking changes may ship in minor releases. See https://github.com/adcontextprotocol/adcp-client/blob/main/docs/guides/REPORTING-STABILITY.md
|
|
24
|
+
*/
|
|
19
25
|
export declare const REPORTING_LEDGER_MIGRATION: string;
|
|
20
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Constraint installed by {@link REPORTING_LEDGER_FINALITY_WRITER_FENCE_MIGRATION}.
|
|
28
|
+
*
|
|
29
|
+
* @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
|
|
30
|
+
*/
|
|
21
31
|
export declare const REPORTING_LEDGER_FINALITY_FENCE_CONSTRAINT = "adcp_reporting_transitions_finality_recorded";
|
|
22
32
|
/**
|
|
23
33
|
* Cutover migration that fences pre-SDK-14 writers out of the transition log.
|
|
@@ -39,8 +49,13 @@ export declare const REPORTING_LEDGER_FINALITY_FENCE_CONSTRAINT = "adcp_reportin
|
|
|
39
49
|
* multiply finality-only events, which is the intended trade: loud rejection
|
|
40
50
|
* beats a quietly broken invariant. Idempotent and re-runnable; it takes no lock
|
|
41
51
|
* once installed.
|
|
52
|
+
*
|
|
53
|
+
* @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
|
|
42
54
|
*/
|
|
43
55
|
export declare const REPORTING_LEDGER_FINALITY_WRITER_FENCE_MIGRATION: string;
|
|
56
|
+
/**
|
|
57
|
+
* @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
|
|
58
|
+
*/
|
|
44
59
|
export interface PostgresReportingLedgerStoreOptions {
|
|
45
60
|
/** Assert that the supplied PostgreSQL database/schema is isolated to this deployment. */
|
|
46
61
|
acknowledgeIsolatedDatabase?: boolean;
|
|
@@ -103,21 +118,38 @@ export interface PostgresReportingLedgerStoreOptions {
|
|
|
103
118
|
*/
|
|
104
119
|
changeFeed?: boolean;
|
|
105
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* @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
|
|
123
|
+
*/
|
|
106
124
|
export declare class ReportingLedgerLeaseLostError extends Error {
|
|
107
125
|
constructor(message?: string);
|
|
108
126
|
}
|
|
109
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* A planner or writer named a period whose ledger records were retired by retention.
|
|
129
|
+
*
|
|
130
|
+
* @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
|
|
131
|
+
*/
|
|
110
132
|
export declare class ReportingLedgerPeriodRetiredError extends Error {
|
|
111
133
|
constructor(message?: string);
|
|
112
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* @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
|
|
137
|
+
*/
|
|
113
138
|
export declare class ReportingLedgerContinuityError extends Error {
|
|
114
139
|
constructor(message?: string);
|
|
115
140
|
}
|
|
116
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Bounded global cleanup for expired cursor snapshots and changes checkpoints.
|
|
143
|
+
*
|
|
144
|
+
* @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
|
|
145
|
+
*/
|
|
117
146
|
export declare function sweepExpiredReportingLedgerState(pool: Pick<ReportingPgPool, 'query'>, limit?: number): Promise<{
|
|
118
147
|
snapshotsDeleted: number;
|
|
119
148
|
checkpointsDeleted: number;
|
|
120
149
|
}>;
|
|
150
|
+
/**
|
|
151
|
+
* @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
|
|
152
|
+
*/
|
|
121
153
|
export declare class PostgresReportingLedgerStore implements ReportingLedgerStore {
|
|
122
154
|
private readonly pool;
|
|
123
155
|
/**
|
|
@@ -151,9 +183,11 @@ export declare class PostgresReportingLedgerStore implements ReportingLedgerStor
|
|
|
151
183
|
/** Append one host change-feed row inside the caller's account-locked transaction. */
|
|
152
184
|
private appendChange;
|
|
153
185
|
/**
|
|
154
|
-
*
|
|
155
|
-
* `{revision_key}
|
|
156
|
-
*
|
|
186
|
+
* Defense in depth for snapshot compaction (see `compactSupersededSnapshots`): throws `INVALID_INPUT`
|
|
187
|
+
* if a writable object row binding's key template omits `{revision_key}`. Every such binding is
|
|
188
|
+
* already refused when the store is configured, so this only guards a configuration changed after
|
|
189
|
+
* construction; `readOnly` bindings are skipped. Called by `compactSupersededSnapshots` and by
|
|
190
|
+
* service construction when compaction is enabled.
|
|
157
191
|
*/
|
|
158
192
|
assertCompactionSafeRowBindings(): void;
|
|
159
193
|
/** Probe and register row storage when enabled. Safe to call repeatedly. */
|
|
@@ -475,9 +509,9 @@ export declare class PostgresReportingLedgerStore implements ReportingLedgerStor
|
|
|
475
509
|
/**
|
|
476
510
|
* Delete external row objects, skipping any object another row set still references.
|
|
477
511
|
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
512
|
+
* Object keys are unique per row set (every writable template includes `{revision_key}`), but header-only
|
|
513
|
+
* revisions share chunks within an obligation and rows written under an older template can name one
|
|
514
|
+
* object from several row sets. An object is therefore deleted only when no
|
|
481
515
|
* chunk of a live (or unavailable) row set outside this operation references the same binding,
|
|
482
516
|
* key and native version, and no other open write intent created it. Row sets already `pruning`
|
|
483
517
|
* or `pruned` do not count: their own operation deletes the object, and counting them would let
|