@adcp/sdk 16.0.0-beta.2 → 16.0.0-beta.4
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/README.md +54 -0
- package/dist/lib/auth/oauth/diagnose.js +3 -11
- package/dist/lib/auth/oauth/diagnose.mjs +4 -12
- package/dist/lib/auth/oauth/diagnostics.d.mts +2 -1
- package/dist/lib/auth/oauth/diagnostics.d.ts +2 -1
- package/dist/lib/auth/oauth/diagnostics.js +8 -10
- package/dist/lib/auth/oauth/diagnostics.mjs +7 -10
- package/dist/lib/core/ConversationTypes.d.mts +8 -3
- package/dist/lib/core/ConversationTypes.d.ts +8 -3
- package/dist/lib/core/SingleAgentClient.d.mts +5 -3
- package/dist/lib/core/SingleAgentClient.d.ts +5 -3
- package/dist/lib/core/TaskExecutor.js +5 -1
- package/dist/lib/core/TaskExecutor.mjs +5 -1
- package/dist/lib/errors/index.d.mts +9 -4
- package/dist/lib/errors/index.d.ts +9 -4
- package/dist/lib/index.d.mts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +8 -0
- package/dist/lib/index.mjs +14 -2
- package/dist/lib/negotiation/types.d.mts +20 -39
- package/dist/lib/negotiation/types.d.ts +20 -39
- package/dist/lib/protocols/index.d.mts +60 -24
- package/dist/lib/protocols/index.d.ts +60 -24
- package/dist/lib/protocols/index.js +9 -4
- package/dist/lib/protocols/index.mjs +3 -0
- package/dist/lib/protocols/mcp-modern.js +1 -0
- package/dist/lib/protocols/mcp-modern.mjs +2 -1
- package/dist/lib/protocols/mcp.js +1 -0
- package/dist/lib/protocols/mcp.mjs +2 -1
- package/dist/lib/protocols/responseSizeLimit.d.mts +91 -5
- package/dist/lib/protocols/responseSizeLimit.d.ts +91 -5
- package/dist/lib/protocols/responseSizeLimit.js +195 -31
- package/dist/lib/protocols/responseSizeLimit.mjs +192 -31
- package/dist/lib/reporting/consumer-runtime.js +2 -1
- package/dist/lib/reporting/consumer-runtime.mjs +2 -1
- package/dist/lib/reporting/ledger/handler.js +50 -11
- package/dist/lib/reporting/ledger/handler.mjs +50 -12
- package/dist/lib/reporting/ledger/index.d.mts +17 -14
- package/dist/lib/reporting/ledger/index.d.ts +17 -14
- package/dist/lib/reporting/ledger/index.js +32 -20
- package/dist/lib/reporting/ledger/index.mjs +21 -10
- package/dist/lib/reporting/ledger/offering-validation.d.mts +9 -0
- package/dist/lib/reporting/ledger/offering-validation.d.ts +9 -0
- package/dist/lib/reporting/{gcs/bucket-policy.js → ledger/offering-validation.js} +9 -8
- package/dist/lib/reporting/ledger/offering-validation.mjs +8 -0
- package/dist/lib/reporting/ledger/receipts.d.mts +48 -0
- package/dist/lib/reporting/ledger/receipts.d.ts +48 -0
- package/dist/lib/reporting/ledger/receipts.js +186 -0
- package/dist/lib/reporting/ledger/receipts.mjs +161 -0
- package/dist/lib/reporting/ledger/status-ingest.js +3 -3
- package/dist/lib/reporting/ledger/status-ingest.mjs +4 -5
- package/dist/lib/reporting/ledger/types.d.mts +43 -0
- package/dist/lib/reporting/ledger/types.d.ts +43 -0
- package/dist/lib/reporting/ledger/types.js +31 -2
- package/dist/lib/reporting/ledger/types.mjs +26 -1
- package/dist/lib/reporting/pagination.d.mts +6 -0
- package/dist/lib/reporting/pagination.d.ts +6 -0
- package/dist/lib/reporting/{gcs/errors.js → pagination.js} +12 -17
- package/dist/lib/reporting/pagination.mjs +12 -0
- package/dist/lib/reporting/reconciliation.d.mts +1 -0
- package/dist/lib/reporting/reconciliation.d.ts +1 -0
- package/dist/lib/reporting/reconciliation.js +3 -2
- package/dist/lib/reporting/reconciliation.mjs +3 -2
- package/dist/lib/reporting/service/index.d.mts +79 -153
- package/dist/lib/reporting/service/index.d.ts +79 -153
- package/dist/lib/reporting/service/index.js +34 -491
- package/dist/lib/reporting/service/index.mjs +36 -510
- package/dist/lib/reporting/service/scheduler-support.d.mts +43 -0
- package/dist/lib/reporting/service/scheduler-support.d.ts +43 -0
- package/dist/lib/reporting/service/scheduler-support.js +125 -0
- package/dist/lib/reporting/service/scheduler-support.mjs +96 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/signing/canonicalize.d.mts +4 -0
- package/dist/lib/signing/canonicalize.d.ts +4 -0
- package/dist/lib/signing/canonicalize.js +14 -8
- package/dist/lib/signing/canonicalize.mjs +14 -8
- package/dist/lib/signing/content-digest.d.mts +8 -0
- package/dist/lib/signing/content-digest.d.ts +8 -0
- package/dist/lib/signing/content-digest.js +11 -5
- package/dist/lib/signing/content-digest.mjs +10 -5
- package/dist/lib/signing/crypto.d.mts +15 -0
- package/dist/lib/signing/crypto.d.ts +15 -0
- package/dist/lib/signing/crypto.js +75 -3
- package/dist/lib/signing/crypto.mjs +78 -3
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.js +2 -0
- package/dist/lib/signing/server.mjs +2 -1
- package/dist/lib/signing/signer.js +11 -14
- package/dist/lib/signing/signer.mjs +13 -16
- package/dist/lib/signing/testing.js +2 -6
- package/dist/lib/signing/testing.mjs +3 -7
- package/dist/lib/signing/verifier.js +2 -2
- package/dist/lib/signing/verifier.mjs +3 -3
- package/dist/lib/signing/web-bot-auth.js +122 -43
- package/dist/lib/signing/web-bot-auth.mjs +128 -44
- package/dist/lib/signing/webhook-verifier.js +2 -2
- package/dist/lib/signing/webhook-verifier.mjs +3 -3
- package/dist/lib/substitution/compile.js +2 -1
- package/dist/lib/substitution/compile.mjs +2 -1
- package/dist/lib/substitution/consent-macros.d.mts +4 -0
- package/dist/lib/substitution/consent-macros.d.ts +4 -0
- package/dist/lib/substitution/consent-macros.js +45 -0
- package/dist/lib/substitution/consent-macros.mjs +20 -0
- package/dist/lib/substitution/index.d.mts +1 -1
- package/dist/lib/substitution/index.d.ts +1 -1
- package/dist/lib/substitution/index.js +2 -0
- package/dist/lib/substitution/index.mjs +2 -1
- package/dist/lib/substitution/translate.d.mts +15 -2
- package/dist/lib/substitution/translate.d.ts +15 -2
- package/dist/lib/substitution/translate.js +148 -26
- package/dist/lib/substitution/translate.mjs +147 -26
- package/dist/lib/testing/client.js +2 -1
- package/dist/lib/testing/client.mjs +2 -1
- package/dist/lib/testing/scenarios/capabilities.js +1 -1
- package/dist/lib/testing/scenarios/capabilities.mjs +1 -1
- package/dist/lib/testing/storyboard/junit.js +16 -3
- package/dist/lib/testing/storyboard/junit.mjs +16 -3
- package/dist/lib/testing/storyboard/request-signing/builder.js +12 -14
- package/dist/lib/testing/storyboard/request-signing/builder.mjs +13 -15
- package/dist/lib/testing/storyboard/runner.js +94 -25
- package/dist/lib/testing/storyboard/runner.mjs +94 -25
- package/dist/lib/testing/storyboard/signer-grader/grader.js +2 -7
- package/dist/lib/testing/storyboard/signer-grader/grader.mjs +2 -7
- package/dist/lib/testing/storyboard/types.d.mts +6 -0
- package/dist/lib/testing/storyboard/types.d.ts +6 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/enums.generated.d.mts +3 -0
- package/dist/lib/types/enums.generated.d.ts +3 -0
- package/dist/lib/types/enums.generated.js +9 -0
- package/dist/lib/types/enums.generated.mjs +6 -0
- package/dist/lib/validation/schema-loader.js +25 -0
- package/dist/lib/validation/schema-loader.mjs +24 -0
- 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 +28 -5
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +3 -2
- package/docs/guides/REPORTING-GCS-FENCE.md +3 -3
- package/docs/guides/REPORTING-GCS-MANAGED.md +4 -4
- package/docs/guides/REPORTING-LEDGER-CUTOVER.md +7 -7
- package/docs/guides/REPORTING-LEDGER.md +107 -51
- package/docs/guides/REPORTING-OPERATIONS.md +66 -5
- package/docs/guides/REPORTING-STABILITY.md +36 -32
- package/docs/guides/UNIVERSAL-MACRO-COMPILATION.md +38 -0
- package/docs/guides/VALIDATE-YOUR-AGENT.md +12 -0
- package/docs/llms.txt +4 -3
- package/docs/migration-14.x-rc-worksheet.md +4 -7
- package/docs/migration-reporting-storage-package.md +186 -0
- package/examples/README.md +1 -1
- package/package.json +14 -78
- package/dist/lib/reporting/azure/index.d.mts +0 -31
- package/dist/lib/reporting/azure/index.d.ts +0 -31
- package/dist/lib/reporting/azure/index.js +0 -266
- package/dist/lib/reporting/azure/index.mjs +0 -249
- package/dist/lib/reporting/bigquery/index.d.mts +0 -246
- package/dist/lib/reporting/bigquery/index.d.ts +0 -246
- package/dist/lib/reporting/bigquery/index.js +0 -633
- package/dist/lib/reporting/bigquery/index.mjs +0 -594
- package/dist/lib/reporting/gcs/adapter.d.mts +0 -38
- package/dist/lib/reporting/gcs/adapter.d.ts +0 -38
- package/dist/lib/reporting/gcs/adapter.js +0 -342
- package/dist/lib/reporting/gcs/adapter.mjs +0 -325
- package/dist/lib/reporting/gcs/bucket-policy.d.mts +0 -3
- package/dist/lib/reporting/gcs/bucket-policy.d.ts +0 -3
- package/dist/lib/reporting/gcs/bucket-policy.mjs +0 -7
- package/dist/lib/reporting/gcs/errors.d.mts +0 -11
- package/dist/lib/reporting/gcs/errors.d.ts +0 -11
- package/dist/lib/reporting/gcs/errors.mjs +0 -16
- package/dist/lib/reporting/gcs/fence.d.mts +0 -41
- package/dist/lib/reporting/gcs/fence.d.ts +0 -41
- package/dist/lib/reporting/gcs/fence.js +0 -250
- package/dist/lib/reporting/gcs/fence.mjs +0 -230
- package/dist/lib/reporting/gcs/index.d.mts +0 -18
- package/dist/lib/reporting/gcs/index.d.ts +0 -18
- package/dist/lib/reporting/gcs/index.js +0 -44
- package/dist/lib/reporting/gcs/index.mjs +0 -14
- package/dist/lib/reporting/gcs/io.d.mts +0 -7
- package/dist/lib/reporting/gcs/io.d.ts +0 -7
- package/dist/lib/reporting/gcs/io.js +0 -95
- package/dist/lib/reporting/gcs/io.mjs +0 -69
- package/dist/lib/reporting/gcs/reader.d.mts +0 -67
- package/dist/lib/reporting/gcs/reader.d.ts +0 -67
- package/dist/lib/reporting/gcs/reader.js +0 -193
- package/dist/lib/reporting/gcs/reader.mjs +0 -169
- package/dist/lib/reporting/gcs/row-provider.d.mts +0 -39
- package/dist/lib/reporting/gcs/row-provider.d.ts +0 -39
- package/dist/lib/reporting/gcs/row-provider.js +0 -225
- package/dist/lib/reporting/gcs/row-provider.mjs +0 -208
- package/dist/lib/reporting/gcs/validation.d.mts +0 -5
- package/dist/lib/reporting/gcs/validation.d.ts +0 -5
- package/dist/lib/reporting/gcs/validation.js +0 -49
- package/dist/lib/reporting/gcs/validation.mjs +0 -25
- package/dist/lib/reporting/ledger/change-feed.d.mts +0 -69
- package/dist/lib/reporting/ledger/change-feed.d.ts +0 -69
- package/dist/lib/reporting/ledger/change-feed.js +0 -107
- package/dist/lib/reporting/ledger/change-feed.mjs +0 -80
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +0 -293
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +0 -293
- package/dist/lib/reporting/ledger/managed-postgres.js +0 -2346
- package/dist/lib/reporting/ledger/managed-postgres.mjs +0 -2332
- package/dist/lib/reporting/ledger/managed-router.d.mts +0 -148
- package/dist/lib/reporting/ledger/managed-router.d.ts +0 -148
- package/dist/lib/reporting/ledger/managed-router.js +0 -280
- package/dist/lib/reporting/ledger/managed-router.mjs +0 -258
- package/dist/lib/reporting/ledger/managed.d.mts +0 -535
- package/dist/lib/reporting/ledger/managed.d.ts +0 -535
- package/dist/lib/reporting/ledger/managed.js +0 -761
- package/dist/lib/reporting/ledger/managed.mjs +0 -729
- package/dist/lib/reporting/ledger/notification-activity.d.mts +0 -332
- package/dist/lib/reporting/ledger/notification-activity.d.ts +0 -332
- package/dist/lib/reporting/ledger/notification-activity.js +0 -1366
- package/dist/lib/reporting/ledger/notification-activity.mjs +0 -1337
- package/dist/lib/reporting/ledger/object-writes.d.mts +0 -128
- package/dist/lib/reporting/ledger/object-writes.d.ts +0 -128
- package/dist/lib/reporting/ledger/object-writes.js +0 -147
- package/dist/lib/reporting/ledger/object-writes.mjs +0 -114
- package/dist/lib/reporting/ledger/postgres.d.mts +0 -689
- package/dist/lib/reporting/ledger/postgres.d.ts +0 -689
- package/dist/lib/reporting/ledger/postgres.js +0 -4462
- package/dist/lib/reporting/ledger/postgres.mjs +0 -4462
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +0 -59
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +0 -59
- package/dist/lib/reporting/ledger/row-storage-migration.js +0 -365
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +0 -339
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +0 -203
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +0 -203
- package/dist/lib/reporting/ledger/row-storage-object.js +0 -379
- package/dist/lib/reporting/ledger/row-storage-object.mjs +0 -335
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +0 -44
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +0 -44
- package/dist/lib/reporting/ledger/row-storage-provider-io.js +0 -142
- package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +0 -111
- package/dist/lib/reporting/ledger/row-storage.d.mts +0 -316
- package/dist/lib/reporting/ledger/row-storage.d.ts +0 -316
- package/dist/lib/reporting/ledger/row-storage.js +0 -812
- package/dist/lib/reporting/ledger/row-storage.mjs +0 -802
- package/dist/lib/reporting/s3/index.d.mts +0 -34
- package/dist/lib/reporting/s3/index.d.ts +0 -34
- package/dist/lib/reporting/s3/index.js +0 -347
- package/dist/lib/reporting/s3/index.mjs +0 -340
- package/dist/lib/reporting/service/maintenance.d.mts +0 -148
- package/dist/lib/reporting/service/maintenance.d.ts +0 -148
- package/dist/lib/reporting/service/maintenance.js +0 -185
- package/dist/lib/reporting/service/maintenance.mjs +0 -159
- package/examples/reliable-reporting-service/README.md +0 -169
|
@@ -98,6 +98,8 @@ export declare const FrequencyCapDurationUnitValues: readonly ["seconds", "minut
|
|
|
98
98
|
export declare const FrequencyCapMutableFieldValues: readonly ["max_impressions", "per", "window", "suppress"];
|
|
99
99
|
export declare const FrequencyCapScopeValues: readonly ["package"];
|
|
100
100
|
export declare const GenreTaxonomyValues: readonly ["iab_content_3.0", "iab_content_2.2", "gracenote", "eidr", "apple_genres", "google_genres", "roku", "amazon_genres", "custom"];
|
|
101
|
+
export declare const GeographicPlaceIdentifierSystemValues: readonly ["geonames", "google_ads", "microsoft_ads"];
|
|
102
|
+
export declare const GeographicPlaceTypeValues: readonly ["airport", "borough", "city", "city_region", "commune", "county", "district", "municipality", "neighborhood", "post_town", "prefecture", "province", "quarter", "state", "territory", "ward"];
|
|
101
103
|
export declare const GeographicTargetingLevelValues: readonly ["country", "region", "metro", "postal_area"];
|
|
102
104
|
export declare const GOPTypeValues: readonly ["closed", "open"];
|
|
103
105
|
export declare const GovernanceDecisionValues: readonly ["approved", "denied", "conditions"];
|
|
@@ -200,6 +202,7 @@ export declare const SortMetricValues: readonly ["impressions", "spend", "clicks
|
|
|
200
202
|
export declare const SpecialCategoryValues: readonly ["awards", "championship", "concert", "conference", "election", "festival", "gala", "holiday", "premiere", "product_launch", "reunion", "tribute"];
|
|
201
203
|
export declare const SponsoredPlacementTypeValues: readonly ["sponsored_search", "sponsored_display", "sponsored_native"];
|
|
202
204
|
export declare const StandardScopeValues: readonly ["attestation_verifier"];
|
|
205
|
+
export declare const StartTimingValues: readonly ["asap"];
|
|
203
206
|
export declare const StoryboardStatusValues: readonly ["passing", "failing", "partial", "untested", "skipped", "not_selected", "unknown"];
|
|
204
207
|
export declare const TalentRoleValues: readonly ["host", "guest", "creator", "cast", "narrator", "producer", "correspondent", "commentator", "analyst"];
|
|
205
208
|
export declare const TaskStatusValues: readonly ["submitted", "working", "input-required", "completed", "canceled", "failed", "rejected", "auth-required", "unknown"];
|
|
@@ -121,6 +121,8 @@ __export(enums_generated_exports, {
|
|
|
121
121
|
FrequencyCapScopeValues: () => FrequencyCapScopeValues,
|
|
122
122
|
GOPTypeValues: () => GOPTypeValues,
|
|
123
123
|
GenreTaxonomyValues: () => GenreTaxonomyValues,
|
|
124
|
+
GeographicPlaceIdentifierSystemValues: () => GeographicPlaceIdentifierSystemValues,
|
|
125
|
+
GeographicPlaceTypeValues: () => GeographicPlaceTypeValues,
|
|
124
126
|
GeographicTargetingLevelValues: () => GeographicTargetingLevelValues,
|
|
125
127
|
GovernanceDecisionValues: () => GovernanceDecisionValues,
|
|
126
128
|
GovernanceDomainValues: () => GovernanceDomainValues,
|
|
@@ -223,6 +225,7 @@ __export(enums_generated_exports, {
|
|
|
223
225
|
SpecialCategoryValues: () => SpecialCategoryValues,
|
|
224
226
|
SponsoredPlacementTypeValues: () => SponsoredPlacementTypeValues,
|
|
225
227
|
StandardScopeValues: () => StandardScopeValues,
|
|
228
|
+
StartTimingValues: () => StartTimingValues,
|
|
226
229
|
StoryboardStatusValues: () => StoryboardStatusValues,
|
|
227
230
|
TMPResponseTypeValues: () => TMPResponseTypeValues,
|
|
228
231
|
TalentRoleValues: () => TalentRoleValues,
|
|
@@ -354,6 +357,8 @@ const FrequencyCapDurationUnitValues = ["seconds", "minutes", "hours", "days", "
|
|
|
354
357
|
const FrequencyCapMutableFieldValues = ["max_impressions", "per", "window", "suppress"];
|
|
355
358
|
const FrequencyCapScopeValues = ["package"];
|
|
356
359
|
const GenreTaxonomyValues = ["iab_content_3.0", "iab_content_2.2", "gracenote", "eidr", "apple_genres", "google_genres", "roku", "amazon_genres", "custom"];
|
|
360
|
+
const GeographicPlaceIdentifierSystemValues = ["geonames", "google_ads", "microsoft_ads"];
|
|
361
|
+
const GeographicPlaceTypeValues = ["airport", "borough", "city", "city_region", "commune", "county", "district", "municipality", "neighborhood", "post_town", "prefecture", "province", "quarter", "state", "territory", "ward"];
|
|
357
362
|
const GeographicTargetingLevelValues = ["country", "region", "metro", "postal_area"];
|
|
358
363
|
const GOPTypeValues = ["closed", "open"];
|
|
359
364
|
const GovernanceDecisionValues = ["approved", "denied", "conditions"];
|
|
@@ -455,6 +460,7 @@ const SortMetricValues = ["impressions", "spend", "clicks", "ctr", "views", "com
|
|
|
455
460
|
const SpecialCategoryValues = ["awards", "championship", "concert", "conference", "election", "festival", "gala", "holiday", "premiere", "product_launch", "reunion", "tribute"];
|
|
456
461
|
const SponsoredPlacementTypeValues = ["sponsored_search", "sponsored_display", "sponsored_native"];
|
|
457
462
|
const StandardScopeValues = ["attestation_verifier"];
|
|
463
|
+
const StartTimingValues = ["asap"];
|
|
458
464
|
const StoryboardStatusValues = ["passing", "failing", "partial", "untested", "skipped", "not_selected", "unknown"];
|
|
459
465
|
const TalentRoleValues = ["host", "guest", "creator", "cast", "narrator", "producer", "correspondent", "commentator", "analyst"];
|
|
460
466
|
const TaskStatusValues = ["submitted", "working", "input-required", "completed", "canceled", "failed", "rejected", "auth-required", "unknown"];
|
|
@@ -712,6 +718,8 @@ const RequestSigningErrorCodeMetadata = Object.freeze(requestSigningErrorCodeMet
|
|
|
712
718
|
FrequencyCapScopeValues,
|
|
713
719
|
GOPTypeValues,
|
|
714
720
|
GenreTaxonomyValues,
|
|
721
|
+
GeographicPlaceIdentifierSystemValues,
|
|
722
|
+
GeographicPlaceTypeValues,
|
|
715
723
|
GeographicTargetingLevelValues,
|
|
716
724
|
GovernanceDecisionValues,
|
|
717
725
|
GovernanceDomainValues,
|
|
@@ -814,6 +822,7 @@ const RequestSigningErrorCodeMetadata = Object.freeze(requestSigningErrorCodeMet
|
|
|
814
822
|
SpecialCategoryValues,
|
|
815
823
|
SponsoredPlacementTypeValues,
|
|
816
824
|
StandardScopeValues,
|
|
825
|
+
StartTimingValues,
|
|
817
826
|
StoryboardStatusValues,
|
|
818
827
|
TMPResponseTypeValues,
|
|
819
828
|
TalentRoleValues,
|
|
@@ -98,6 +98,8 @@ const FrequencyCapDurationUnitValues = ["seconds", "minutes", "hours", "days", "
|
|
|
98
98
|
const FrequencyCapMutableFieldValues = ["max_impressions", "per", "window", "suppress"];
|
|
99
99
|
const FrequencyCapScopeValues = ["package"];
|
|
100
100
|
const GenreTaxonomyValues = ["iab_content_3.0", "iab_content_2.2", "gracenote", "eidr", "apple_genres", "google_genres", "roku", "amazon_genres", "custom"];
|
|
101
|
+
const GeographicPlaceIdentifierSystemValues = ["geonames", "google_ads", "microsoft_ads"];
|
|
102
|
+
const GeographicPlaceTypeValues = ["airport", "borough", "city", "city_region", "commune", "county", "district", "municipality", "neighborhood", "post_town", "prefecture", "province", "quarter", "state", "territory", "ward"];
|
|
101
103
|
const GeographicTargetingLevelValues = ["country", "region", "metro", "postal_area"];
|
|
102
104
|
const GOPTypeValues = ["closed", "open"];
|
|
103
105
|
const GovernanceDecisionValues = ["approved", "denied", "conditions"];
|
|
@@ -199,6 +201,7 @@ const SortMetricValues = ["impressions", "spend", "clicks", "ctr", "views", "com
|
|
|
199
201
|
const SpecialCategoryValues = ["awards", "championship", "concert", "conference", "election", "festival", "gala", "holiday", "premiere", "product_launch", "reunion", "tribute"];
|
|
200
202
|
const SponsoredPlacementTypeValues = ["sponsored_search", "sponsored_display", "sponsored_native"];
|
|
201
203
|
const StandardScopeValues = ["attestation_verifier"];
|
|
204
|
+
const StartTimingValues = ["asap"];
|
|
202
205
|
const StoryboardStatusValues = ["passing", "failing", "partial", "untested", "skipped", "not_selected", "unknown"];
|
|
203
206
|
const TalentRoleValues = ["host", "guest", "creator", "cast", "narrator", "producer", "correspondent", "commentator", "analyst"];
|
|
204
207
|
const TaskStatusValues = ["submitted", "working", "input-required", "completed", "canceled", "failed", "rejected", "auth-required", "unknown"];
|
|
@@ -455,6 +458,8 @@ export {
|
|
|
455
458
|
FrequencyCapScopeValues,
|
|
456
459
|
GOPTypeValues,
|
|
457
460
|
GenreTaxonomyValues,
|
|
461
|
+
GeographicPlaceIdentifierSystemValues,
|
|
462
|
+
GeographicPlaceTypeValues,
|
|
458
463
|
GeographicTargetingLevelValues,
|
|
459
464
|
GovernanceDecisionValues,
|
|
460
465
|
GovernanceDomainValues,
|
|
@@ -557,6 +562,7 @@ export {
|
|
|
557
562
|
SpecialCategoryValues,
|
|
558
563
|
SponsoredPlacementTypeValues,
|
|
559
564
|
StandardScopeValues,
|
|
565
|
+
StartTimingValues,
|
|
560
566
|
StoryboardStatusValues,
|
|
561
567
|
TMPResponseTypeValues,
|
|
562
568
|
TalentRoleValues,
|
|
@@ -48,6 +48,7 @@ __export(schema_loader_exports, {
|
|
|
48
48
|
listValidatorKeys: () => listValidatorKeys,
|
|
49
49
|
registerExternalSchemaRoot: () => registerExternalSchemaRoot,
|
|
50
50
|
resolveBundleKey: () => resolveBundleKey,
|
|
51
|
+
resolveServedValidationVersion: () => resolveServedValidationVersion,
|
|
51
52
|
schemaAllowsTopLevelField: () => schemaAllowsTopLevelField,
|
|
52
53
|
toReleasePrecisionWire: () => toReleasePrecisionWire,
|
|
53
54
|
unregisterExternalSchemaRoot: () => unregisterExternalSchemaRoot,
|
|
@@ -754,6 +755,29 @@ function hasSchemaBundle(version) {
|
|
|
754
755
|
return false;
|
|
755
756
|
}
|
|
756
757
|
}
|
|
758
|
+
const SERVED_RELEASE_MAJOR = /^(\d+)\.\d+(?:-[a-zA-Z0-9.-]+)?$/;
|
|
759
|
+
const NUMERIC_PIN_MAJOR = /^(\d+)\.\d+/;
|
|
760
|
+
function resolveServedValidationVersion(response, pinnedVersion) {
|
|
761
|
+
const pinMajor = NUMERIC_PIN_MAJOR.exec(pinnedVersion)?.[1];
|
|
762
|
+
if (pinMajor === void 0) return pinnedVersion;
|
|
763
|
+
try {
|
|
764
|
+
if (isExternalSchemaRootActive(pinnedVersion)) return pinnedVersion;
|
|
765
|
+
} catch {
|
|
766
|
+
return pinnedVersion;
|
|
767
|
+
}
|
|
768
|
+
const echoed = response !== null && typeof response === "object" ? response.adcp_version : void 0;
|
|
769
|
+
if (typeof echoed !== "string") return pinnedVersion;
|
|
770
|
+
const echoMajor = SERVED_RELEASE_MAJOR.exec(echoed)?.[1];
|
|
771
|
+
if (echoMajor === void 0 || echoMajor !== pinMajor) return pinnedVersion;
|
|
772
|
+
let pinnedRelease;
|
|
773
|
+
try {
|
|
774
|
+
pinnedRelease = toReleasePrecisionWire(pinnedVersion);
|
|
775
|
+
} catch {
|
|
776
|
+
return pinnedVersion;
|
|
777
|
+
}
|
|
778
|
+
if (echoed === pinnedRelease) return pinnedVersion;
|
|
779
|
+
return hasSchemaBundle(echoed) ? echoed : pinnedVersion;
|
|
780
|
+
}
|
|
757
781
|
const mcpToolSchemaCache = /* @__PURE__ */ new Map();
|
|
758
782
|
const mcpToolSummaryCache = /* @__PURE__ */ new Map();
|
|
759
783
|
function boundedMcpToolSummary(value) {
|
|
@@ -1019,6 +1043,7 @@ function cloneJsonValue(value) {
|
|
|
1019
1043
|
listValidatorKeys,
|
|
1020
1044
|
registerExternalSchemaRoot,
|
|
1021
1045
|
resolveBundleKey,
|
|
1046
|
+
resolveServedValidationVersion,
|
|
1022
1047
|
schemaAllowsTopLevelField,
|
|
1023
1048
|
toReleasePrecisionWire,
|
|
1024
1049
|
unregisterExternalSchemaRoot,
|
|
@@ -701,6 +701,29 @@ function hasSchemaBundle(version) {
|
|
|
701
701
|
return false;
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
+
const SERVED_RELEASE_MAJOR = /^(\d+)\.\d+(?:-[a-zA-Z0-9.-]+)?$/;
|
|
705
|
+
const NUMERIC_PIN_MAJOR = /^(\d+)\.\d+/;
|
|
706
|
+
function resolveServedValidationVersion(response, pinnedVersion) {
|
|
707
|
+
const pinMajor = NUMERIC_PIN_MAJOR.exec(pinnedVersion)?.[1];
|
|
708
|
+
if (pinMajor === void 0) return pinnedVersion;
|
|
709
|
+
try {
|
|
710
|
+
if (isExternalSchemaRootActive(pinnedVersion)) return pinnedVersion;
|
|
711
|
+
} catch {
|
|
712
|
+
return pinnedVersion;
|
|
713
|
+
}
|
|
714
|
+
const echoed = response !== null && typeof response === "object" ? response.adcp_version : void 0;
|
|
715
|
+
if (typeof echoed !== "string") return pinnedVersion;
|
|
716
|
+
const echoMajor = SERVED_RELEASE_MAJOR.exec(echoed)?.[1];
|
|
717
|
+
if (echoMajor === void 0 || echoMajor !== pinMajor) return pinnedVersion;
|
|
718
|
+
let pinnedRelease;
|
|
719
|
+
try {
|
|
720
|
+
pinnedRelease = toReleasePrecisionWire(pinnedVersion);
|
|
721
|
+
} catch {
|
|
722
|
+
return pinnedVersion;
|
|
723
|
+
}
|
|
724
|
+
if (echoed === pinnedRelease) return pinnedVersion;
|
|
725
|
+
return hasSchemaBundle(echoed) ? echoed : pinnedVersion;
|
|
726
|
+
}
|
|
704
727
|
const mcpToolSchemaCache = /* @__PURE__ */ new Map();
|
|
705
728
|
const mcpToolSummaryCache = /* @__PURE__ */ new Map();
|
|
706
729
|
function boundedMcpToolSummary(value) {
|
|
@@ -965,6 +988,7 @@ export {
|
|
|
965
988
|
listValidatorKeys,
|
|
966
989
|
registerExternalSchemaRoot,
|
|
967
990
|
resolveBundleKey,
|
|
991
|
+
resolveServedValidationVersion,
|
|
968
992
|
schemaAllowsTopLevelField,
|
|
969
993
|
toReleasePrecisionWire,
|
|
970
994
|
unregisterExternalSchemaRoot,
|
package/dist/lib/version.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "16.0.0-beta.
|
|
4
|
+
export declare const LIBRARY_VERSION = "16.0.0-beta.4";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "16.0.0-beta.
|
|
36
|
+
readonly library: "16.0.0-beta.4";
|
|
37
37
|
readonly adcp: "3.2.4";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-16T14:15:27.258Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "16.0.0-beta.
|
|
4
|
+
export declare const LIBRARY_VERSION = "16.0.0-beta.4";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "16.0.0-beta.
|
|
36
|
+
readonly library: "16.0.0-beta.4";
|
|
37
37
|
readonly adcp: "3.2.4";
|
|
38
38
|
readonly compatibleVersions: readonly ["v2.5", "v2.6", "v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-16T14:15:27.258Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(version_exports, {
|
|
|
31
31
|
toReleasePrecisionVersion: () => toReleasePrecisionVersion
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(version_exports);
|
|
34
|
-
const LIBRARY_VERSION = "16.0.0-beta.
|
|
34
|
+
const LIBRARY_VERSION = "16.0.0-beta.4";
|
|
35
35
|
const ADCP_VERSION = "3.2.4";
|
|
36
36
|
const ADCP_MAJOR_VERSION = 3;
|
|
37
37
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -98,10 +98,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
98
98
|
"3.2.4"
|
|
99
99
|
];
|
|
100
100
|
const VERSION_INFO = {
|
|
101
|
-
library: "16.0.0-beta.
|
|
101
|
+
library: "16.0.0-beta.4",
|
|
102
102
|
adcp: "3.2.4",
|
|
103
103
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
104
|
-
generatedAt: "2026-10-
|
|
104
|
+
generatedAt: "2026-10-16T14:15:27.258Z"
|
|
105
105
|
};
|
|
106
106
|
function getAdcpVersion() {
|
|
107
107
|
return ADCP_VERSION;
|
package/dist/lib/version.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const LIBRARY_VERSION = "16.0.0-beta.
|
|
1
|
+
const LIBRARY_VERSION = "16.0.0-beta.4";
|
|
2
2
|
const ADCP_VERSION = "3.2.4";
|
|
3
3
|
const ADCP_MAJOR_VERSION = 3;
|
|
4
4
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -65,10 +65,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
65
65
|
"3.2.4"
|
|
66
66
|
];
|
|
67
67
|
const VERSION_INFO = {
|
|
68
|
-
library: "16.0.0-beta.
|
|
68
|
+
library: "16.0.0-beta.4",
|
|
69
69
|
adcp: "3.2.4",
|
|
70
70
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
71
|
-
generatedAt: "2026-10-
|
|
71
|
+
generatedAt: "2026-10-16T14:15:27.258Z"
|
|
72
72
|
};
|
|
73
73
|
function getAdcpVersion() {
|
|
74
74
|
return ADCP_VERSION;
|
package/docs/TYPE-SUMMARY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AdCP Type Summary
|
|
2
2
|
|
|
3
|
-
> Generated at: 2026-10-
|
|
4
|
-
> @adcp/sdk v16.0.0-beta.
|
|
3
|
+
> Generated at: 2026-10-16
|
|
4
|
+
> @adcp/sdk v16.0.0-beta.4
|
|
5
5
|
|
|
6
6
|
Curated reference of the types that matter for using the AdCP client. For full generated types see `src/lib/types/tools.generated.ts` and `src/lib/types/core.generated.ts`.
|
|
7
7
|
|
|
@@ -49,6 +49,11 @@ interface A2ALegacyCompatOptions {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
interface TransportOptions {
|
|
52
|
+
// Defaults to 4 MiB (DEFAULT_MAX_RESPONSE_BYTES); only 0 opts out
|
|
53
|
+
// (Infinity / negatives fall back to the default).
|
|
54
|
+
// SSE is bounded per event plus `maxResponseBytes * 2` cumulative per call.
|
|
55
|
+
// Over-cap responses throw ResponseTooLargeError; nothing is truncated.
|
|
56
|
+
// A per-call `transport` replaces this object; it does not merge.
|
|
52
57
|
maxResponseBytes?: number;
|
|
53
58
|
trustedFetchFn?: typeof fetch;
|
|
54
59
|
allowPrivateIp?: boolean;
|
|
@@ -2895,9 +2900,23 @@ interface InlineReportingAvailabilityEvidenceV1 {
|
|
|
2895
2900
|
|
|
2896
2901
|
## Seller Reporting Ledger
|
|
2897
2902
|
|
|
2898
|
-
|
|
2903
|
+
The ledger interface, handlers and producer import from `@adcp/sdk/reporting/ledger`. The PostgreSQL store, its migrations, row storage and maintenance import from `@adcp/reporting-storage`, managed delivery from `@adcp/reporting-storage/managed` and notification activity from `@adcp/reporting-storage/notifications` (install `@adcp/reporting-storage` next to `@adcp/sdk`; it is pre-1.0 and every export is experimental). `createPostgresPersistentNotificationRuntime` is a server symbol and imports from `@adcp/sdk/server`.
|
|
2899
2904
|
|
|
2900
2905
|
```typescript
|
|
2906
|
+
import { Pool } from 'pg';
|
|
2907
|
+
import { createPostgresPersistentNotificationRuntime } from '@adcp/sdk/server';
|
|
2908
|
+
import {
|
|
2909
|
+
createReportingDeliveryHandler,
|
|
2910
|
+
createReportingProducer,
|
|
2911
|
+
createReportingStatusHandler,
|
|
2912
|
+
createSyncReportingStatusHandler,
|
|
2913
|
+
} from '@adcp/sdk/reporting/ledger';
|
|
2914
|
+
import { PostgresReportingLedgerStore, REPORTING_LEDGER_MIGRATION } from '@adcp/reporting-storage';
|
|
2915
|
+
import {
|
|
2916
|
+
createPostgresReportingNotificationActivityRuntime,
|
|
2917
|
+
createPostgresReportingNotificationAttemptCheckpoint,
|
|
2918
|
+
} from '@adcp/reporting-storage/notifications';
|
|
2919
|
+
|
|
2901
2920
|
// Build the notification path first: the store must be constructed with the
|
|
2902
2921
|
// activity port, or lifecycle transitions record no activity and notify nobody.
|
|
2903
2922
|
const attemptCheckpoint = createPostgresReportingNotificationAttemptCheckpoint({
|
|
@@ -2960,6 +2979,9 @@ The store freezes configuration lineage and period-end denominators, retains imm
|
|
|
2960
2979
|
Import from `@adcp/sdk/reporting/service`. This is the adapter-first lifecycle owner over the source and ledger primitives; it does not introduce another store or transport.
|
|
2961
2980
|
|
|
2962
2981
|
```typescript
|
|
2982
|
+
import { createReliableReportingService } from '@adcp/sdk/reporting/service';
|
|
2983
|
+
import { PostgresReportingLedgerStore, reportingLedgerMaintenance } from '@adcp/reporting-storage';
|
|
2984
|
+
|
|
2963
2985
|
interface ReliableReportingAdapterV1 {
|
|
2964
2986
|
readonly sourceOffering: ReportingSourceOfferingV1;
|
|
2965
2987
|
readonly deliveryOffering: ReportingDeliveryOffering;
|
|
@@ -2982,9 +3004,10 @@ const reporting = createReliableReportingService({
|
|
|
2982
3004
|
resolveCurrency: account => currency,
|
|
2983
3005
|
resolveCoverage: account => ({ constituents }), // authorized media-buy/package denominator
|
|
2984
3006
|
resolveConsumerId, // optional; controls consumer-status handler/capability
|
|
3007
|
+
maintenance: reportingLedgerMaintenance({ retention: { enabled: true } }), // optional factory from @adcp/reporting-storage
|
|
2985
3008
|
});
|
|
2986
3009
|
|
|
2987
|
-
|
|
3010
|
+
for (const sql of reporting.setup.migrations) await pool.query(sql);
|
|
2988
3011
|
const installedPlatform = reporting.install(platform);
|
|
2989
3012
|
await reporting.installConfiguration(configuration, { account: ctx.account });
|
|
2990
3013
|
await reporting.runCycle({ accountId }); // tenant-partitioned
|
|
@@ -2994,7 +3017,7 @@ await reporting.stop();
|
|
|
2994
3017
|
|
|
2995
3018
|
Account identity comes only from the framework-resolved context. Trusted host callbacks derive adapter routing, credential-free `sourceScope`, source timezone, currency, and the authorized constituent denominator. A declaration cannot supply `account`, `sourceScope`, `sourceTimezone`, `contract`, `currency`, `constituents`, or `mediaBuyIds`; `mediaBuyIds` is derived from `resolveCoverage`, so a buyer cannot name another buyer's media buys on a shared upstream network. Currency is frozen into configuration and obligation lineage. Capabilities are Core-only and derived from installed adapters and handlers; managed delivery, reconciled billing, receipts, webhook activity, and notifications are not advertised. Installation requires `platform.accounts.upsert`, which owns the advertised `sync_accounts` configuration path.
|
|
2996
3019
|
|
|
2997
|
-
For complete seller production assembly, use async `createPostgresReliableReportingProductionService` from `@adcp/
|
|
3020
|
+
For complete seller production assembly, use async `createPostgresReliableReportingProductionService` from `@adcp/reporting-storage/service`. It owns the PostgreSQL Core/Managed stores, receipts, all three reporting notifications, webhook activity, migrations, probes, recovery, and capability publication. Supply `activity.tenantScopeForAccount`; Reconciled Billing offerings also require a trusted `obligatedConsumers` roster. Its scheduler and `recoverOnce` require explicit `deploymentWide: true` because recovery scans the whole namespace. See `docs/guides/REPORTING-LEDGER.md` and `docs/guides/REPORTING-OPERATIONS.md`.
|
|
2998
3021
|
|
|
2999
3022
|
Buyer production processes use `createPostgresReportingConsumerRuntimeV1` with `createReliableReportingConsumerV1` from the package root. Verify webhook signatures before passing authenticated hints, preserve seller/principal scope, and configure `evaluateAdjustment` to authorize integrity-valid post-official corrections; the default defers them. See `docs/guides/REPORTING-RECONCILIATION.md`.
|
|
3000
3023
|
|
|
@@ -55,7 +55,7 @@ The key is a SHA-256 over:
|
|
|
55
55
|
| configured `adcpVersion` / `wireAdcpVersion` | negotiated version |
|
|
56
56
|
| every non-correlation, non-credential header | unknown `x-*` tenant / routing / policy headers can select a different upstream view, so they fail closed into the key. This includes `baggage`, **ambient OpenTelemetry baggage included** |
|
|
57
57
|
| request-signing identity and policy | `kind`, `kid`, `alg`, agent URL and signing policy; never the private key |
|
|
58
|
-
|
|
|
58
|
+
| configured `allowPrivateIp`, `maxResponseBytes` | the transport policy the evidence was gathered under (per-call `transport` overrides included). These are the values the caller *configured*, not the effective ones: an unset `maxResponseBytes` keys as "unset" rather than as the 4 MiB default, so entries written before the default landed stay reusable. The MCP connection cache keys the *resolved* cap instead — see [Reusable MCP connections](#reusable-mcp-connections) |
|
|
59
59
|
|
|
60
60
|
Not part of the key: correlation headers (`x-request-id`, `x-correlation-id`, `traceparent`, ...), and credential header values (`Authorization`, `x-adcp-auth`) — OAuth and `auth_token` credentials are also owned by `authIdentity`; a token rotation for the same authorization scope keeps the entry. **Choose `authIdentity` at least as narrow as the credential's authorization scope.** Change the identity or invalidate the cache when permissions change or access is revoked; use a distinct identity for anonymous access. Two principals must never share an identity. Keys are hashes and never contain the identity, token or header values.
|
|
61
61
|
|
|
@@ -101,7 +101,7 @@ Unlike [`primeCapabilities`](../TYPE-SUMMARY.md) — which stays client-bound an
|
|
|
101
101
|
|
|
102
102
|
This behavior applies by default, including calls that pass a signal or timeout outside a connection scope. The process-wide legacy/OAuth session cache retains at most 20 connections per cache with LRU eviction and has no idle expiry. For request workflows with many distinct credentials, use a scope to bound session lifetime. At process shutdown, `closeConnections()` from `@adcp/sdk/advanced` closes the process-wide connections.
|
|
103
103
|
|
|
104
|
-
A reusable session is keyed only by what changes the _connection_: endpoint, credential, tenant / routing headers, signing identity, `allowPrivateIp`, a caller-injected fetch, and the workflow scope. These no longer choose or split a session:
|
|
104
|
+
A reusable session is keyed only by what changes the _connection_: endpoint, credential, tenant / routing headers, signing identity, `allowPrivateIp`, `maxResponseBytes`, a caller-injected fetch, and the workflow scope. These no longer choose or split a session:
|
|
105
105
|
|
|
106
106
|
- **Correlation headers**: `traceparent`, `tracestate`, `x-request-id`, `x-correlation-id`, `x-trace-id`, `x-span-id`, `x-debug-id`, `x-client-request-id`, `x-b3-*`, `x-amzn-trace-id`, `x-cloud-trace-context`, `x-datadog-*`, `sentry-trace`, and vendor-prefixed `x-<vendor>-request-id` / `-correlation-id` / `-trace-id` / `-span-id` / `-debug-id`. Names suggesting credentials or tenant/routing identity (including `auth`, `token`, `tenant`, `account`, `workspace`, `seat`, `advertiser`, `publisher`, `buyer` and `seller`) are never treated as correlation. **`baggage` stays in the key**: it can carry tenant or routing members. Any header outside the list above also stays in the key (fail closed).
|
|
107
107
|
- **`AbortSignal`** and **`requestTimeoutMs`**: they bound a call.
|
|
@@ -114,6 +114,7 @@ Isolation properties:
|
|
|
114
114
|
- A caller that joins another caller's in-flight connect waits under its own signal and timeout. If the creator cancels the connect, the joiner retries for itself, with at most two retries after foreign aborts.
|
|
115
115
|
- A caller-injected `fetchFn` (a per-call network trust boundary) keeps its own one-shot session outside a connection scope; inside a scope its identity is part of the key.
|
|
116
116
|
- Connections are never shared across credentials, tenant headers, signing identities or `allowPrivateIp` settings.
|
|
117
|
+
- Connections are never shared across different `maxResponseBytes` values either. The response cap is decided once per request, and a session's standalone `GET` event-stream listener issues exactly one request — at connect time — so it carries whatever policy opened the connection for the life of that connection. Sharing across policies would let one `maxResponseBytes: 0` call hand an uncapped listener to every later caller. The key uses the *resolved* cap, so an explicit `4 * 1024 * 1024` and an unset value are the same policy and share a session; `0` and any other number each get their own. Varying the cap per call therefore costs a session per distinct value against the same agent, against a 20-entry LRU — prefer a single client-level value where you can, or pin the session with `withMCPConnectionScope` where continuity matters.
|
|
117
118
|
|
|
118
119
|
### Public connection scope
|
|
119
120
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Durable GCS reporting write fence
|
|
2
2
|
|
|
3
|
-
`@adcp/
|
|
3
|
+
`@adcp/reporting-storage/gcs` provides a provider write-fence primitive backed by the existing PostgreSQL destination authority. It is a building block for a managed delivery adapter; it does not advertise Managed Delivery or Reconciled Billing capabilities or implement `ReportingManagedDeliveryAdapterV1`.
|
|
4
4
|
|
|
5
|
-
Install the optional official Google client with `npm install @google-cloud/storage@^7.22.0` for Node 20 or Node 22+. Google client `^8.2.0` is also supported on Node 22+. This peer is required when compiling or using the GCS subpath, including its public types; other
|
|
5
|
+
Install the optional official Google client with `npm install @google-cloud/storage@^7.22.0` for Node 20 or Node 22+. Google client `^8.2.0` is also supported on Node 22+. This peer is required when compiling or using the GCS subpath, including its public types; other subpaths remain independent. Apply `REPORTING_LEDGER_MIGRATION`, `REPORTING_MANAGED_DELIVERY_MIGRATION`, then the additive `REPORTING_OBJECT_WRITE_MIGRATION` from `@adcp/reporting-storage` (and `@adcp/reporting-storage/managed` for the managed-delivery one) in the same isolated tenant schema. Apply the final migration to a fresh object-write schema if experimenting with earlier, unpublished versions of these tables: `CREATE TABLE IF NOT EXISTS` does not upgrade incompatible prerelease tables.
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { Storage } from '@google-cloud/storage';
|
|
9
|
-
import { createGcsReportingObjectFenceV1 } from '@adcp/
|
|
9
|
+
import { createGcsReportingObjectFenceV1 } from '@adcp/reporting-storage/gcs';
|
|
10
10
|
|
|
11
11
|
const fence = createGcsReportingObjectFenceV1({
|
|
12
12
|
storage: new Storage({ retryOptions: { totalTimeout: 60, maxRetries: 3 } }), // Host-owned ADC; retry timeout is in seconds.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Managed reporting delivery on GCS
|
|
2
2
|
|
|
3
|
-
`@adcp/
|
|
3
|
+
`@adcp/reporting-storage/gcs` supplies a complete `ReportingManagedDeliveryAdapterV1` for private GCS file transfer. It supports `manifest_checksums` and `canonical_digest` by uploading deterministic JSONL and manifest bytes, then inspecting actual provider bytes and digest-pinned private contracts. The managed runtime owns materialization settlement, cleanup leases, retries and capability publication. Verification is attributed to the producer; independent buyer qualification is a separate gate.
|
|
4
4
|
|
|
5
5
|
Install the optional official `@google-cloud/storage` peer. Use 7.22.x on Node 20.19 or later; Storage 8.2.x requires Node 22 or later. The default SDK import does not load Google Storage. Supply a host-owned official Storage client using ADC, workload identity or short-lived impersonation. Never persist credentials in reporting descriptors, contract URIs, `ctx_metadata`, inventory or error envelopes.
|
|
6
6
|
|
|
7
|
-
Apply `REPORTING_LEDGER_MIGRATION`, the applicable Core writer-fence migration, `REPORTING_MANAGED_DELIVERY_MIGRATION`, `REPORTING_OBJECT_WRITE_MIGRATION`, then `REPORTING_OBJECT_WRITE_AUTHORITY_MIGRATION` from `@adcp/
|
|
7
|
+
Apply `REPORTING_LEDGER_MIGRATION`, the applicable Core writer-fence migration, `REPORTING_MANAGED_DELIVERY_MIGRATION`, `REPORTING_OBJECT_WRITE_MIGRATION`, then `REPORTING_OBJECT_WRITE_AUTHORITY_MIGRATION` from `@adcp/reporting-storage` (`REPORTING_MANAGED_DELIVERY_MIGRATION` is on `@adcp/reporting-storage/managed`). The last migration requires PostgreSQL 13 or later and creates one persistent installation UUID per isolated schema. Reapplying it preserves the UUID. Keep that row in backups and restores. **Never run delivery or cleanup from an independently writable clone of live authorization, inventory or materialization tables.** Such a clone would still address the original objects. Start a fresh isolated schema with a distinct deployment namespace and installation UUID, provision new destination grants, and import only the needed immutable Core facts. A restored replica of the same authority keeps its identity. Do not replace an identity while old write plans still exist. The adapter combines the UUID with your stable deployment namespace to avoid collisions between isolated schemas sharing a bucket.
|
|
8
8
|
|
|
9
9
|
Core and managed stores must share the exact same PostgreSQL pool, and Core must enable `managedDelivery: true`. The factory probes both stores and the provider policy before returning an adapter. Hosts supply pool acquisition/connect timeouts; transactions started with a signal additionally limit lock and statement waits. Readiness is bounded by the operation deadline, at most 60 seconds.
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import { Storage } from '@google-cloud/storage';
|
|
13
|
-
import { createGcsReportingManagedDeliveryAdapterV1 } from '@adcp/
|
|
14
|
-
import { createReportingManagedDeliveryRuntime } from '@adcp/
|
|
13
|
+
import { createGcsReportingManagedDeliveryAdapterV1 } from '@adcp/reporting-storage/gcs';
|
|
14
|
+
import { createReportingManagedDeliveryRuntime } from '@adcp/reporting-storage/managed';
|
|
15
15
|
|
|
16
16
|
const adapter = await createGcsReportingManagedDeliveryAdapterV1({
|
|
17
17
|
storage: new Storage(), // ADC/workload identity; no keys in reporting state
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This guide is for a seller that already runs its own Reliable Reporting ledger
|
|
4
4
|
(tables for configuration generations, obligations and revisions, row files in
|
|
5
5
|
object storage and a warehouse, status issues and transitions) and wants
|
|
6
|
-
`@adcp/sdk` to own the ledger from now on. Read the
|
|
6
|
+
`@adcp/sdk` and `@adcp/reporting-storage` to own the ledger from now on. Read the
|
|
7
7
|
[ledger guide](REPORTING-LEDGER.md) first for the SDK side, and the
|
|
8
8
|
[operations runbook](REPORTING-OPERATIONS.md) for production practice.
|
|
9
9
|
|
|
@@ -28,7 +28,7 @@ You have two ways to run the SDK's service on top of what you have.
|
|
|
28
28
|
| Change feed | `changeFeed: true`: `changesAfter`, current-revision reads, consumer cursors | You implement it, or go without host reads and the warehouse sink |
|
|
29
29
|
| Retention | `maintenance.retention`: period-aligned retirement honouring the change-feed hold | You implement `retireExpiredPeriods` and tombstones, or never retire |
|
|
30
30
|
| Maintenance | `maintenance`: snapshot sweep, abandoned-upload sweep, feed pruning | You write all of it |
|
|
31
|
-
| Warehouse | `@adcp/
|
|
31
|
+
| Warehouse | `@adcp/reporting-storage/bigquery` sink | Not available: it reads the SDK store |
|
|
32
32
|
| Correctness | Lease fencing, gap-free status checkpoints, immutable generations and the revision binding are enforced in one tested place | Every one of those guarantees is yours to prove |
|
|
33
33
|
| Existing data | Starts empty; old tables stay behind a read-only hook | Old data served natively |
|
|
34
34
|
|
|
@@ -52,8 +52,8 @@ advertise Managed Delivery or Reconciled Billing today, read
|
|
|
52
52
|
```ts
|
|
53
53
|
import { Pool } from 'pg';
|
|
54
54
|
import { Storage } from '@google-cloud/storage';
|
|
55
|
-
import { PostgresReportingLedgerStore } from '@adcp/
|
|
56
|
-
import { createGcsReportingRowObjectProviderV1 } from '@adcp/
|
|
55
|
+
import { PostgresReportingLedgerStore, reportingLedgerMaintenance } from '@adcp/reporting-storage';
|
|
56
|
+
import { createGcsReportingRowObjectProviderV1 } from '@adcp/reporting-storage/gcs';
|
|
57
57
|
import { createReliableReportingService } from '@adcp/sdk/reporting/service';
|
|
58
58
|
|
|
59
59
|
// Apply once, in order, with your migration owner (PostgreSQL 13+):
|
|
@@ -86,10 +86,10 @@ const reporting = createReliableReportingService({
|
|
|
86
86
|
statusRetentionDays: 90, // the commitment advertised to buyers; retention uses it
|
|
87
87
|
// ...adapters, contact, resolveSource, resolveCurrency, resolveCoverage
|
|
88
88
|
legacyRevisionReader, // see "The legacy fallback hook"
|
|
89
|
-
maintenance: {
|
|
89
|
+
maintenance: reportingLedgerMaintenance({
|
|
90
90
|
retention: { enabled: true, recordRetentionDays: 120, limit: 100 },
|
|
91
91
|
changeFeed: { changeRetentionDays: 30, maxFeedHoldDays: 7 },
|
|
92
|
-
},
|
|
92
|
+
}),
|
|
93
93
|
});
|
|
94
94
|
```
|
|
95
95
|
|
|
@@ -118,7 +118,7 @@ state. The bytes live in your bucket.
|
|
|
118
118
|
|
|
119
119
|
### Keeping your BigQuery tables fed
|
|
120
120
|
|
|
121
|
-
`@adcp/
|
|
121
|
+
`@adcp/reporting-storage/bigquery` follows the change feed and loads every
|
|
122
122
|
committed revision's verified rows into BigQuery tables you name
|
|
123
123
|
([sink details](REPORTING-LEDGER.md#bigquery-warehouse-sink)). The warehouse
|
|
124
124
|
copy is derived and never served.
|