@adcp/sdk 14.0.0-rc.38 → 14.0.0-rc.39
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-storyboard-summary.js +286 -0
- package/bin/adcp.js +221 -10
- package/dist/lib/conformance/schemaLoader.d.mts +1 -1
- package/dist/lib/conformance/schemaLoader.d.ts +1 -1
- package/dist/lib/core/AgentClient.d.mts +6 -1
- package/dist/lib/core/AgentClient.d.ts +6 -1
- package/dist/lib/core/AgentClient.js +9 -0
- package/dist/lib/core/AgentClient.mjs +9 -0
- package/dist/lib/core/ConversationTypes.d.mts +29 -0
- package/dist/lib/core/ConversationTypes.d.ts +29 -0
- package/dist/lib/core/SingleAgentClient.d.mts +3 -1
- package/dist/lib/core/SingleAgentClient.d.ts +3 -1
- package/dist/lib/core/SingleAgentClient.js +9 -1
- package/dist/lib/core/SingleAgentClient.mjs +9 -1
- package/dist/lib/core/TaskExecutor.d.mts +13 -1
- package/dist/lib/core/TaskExecutor.d.ts +13 -1
- package/dist/lib/core/TaskExecutor.js +216 -18
- package/dist/lib/core/TaskExecutor.mjs +216 -19
- package/dist/lib/index.d.mts +5 -2
- package/dist/lib/index.d.ts +5 -2
- package/dist/lib/index.js +10 -1
- package/dist/lib/index.mjs +10 -1
- package/dist/lib/media-buy/action-assessment.d.mts +77 -0
- package/dist/lib/media-buy/action-assessment.d.ts +77 -0
- package/dist/lib/media-buy/action-assessment.js +300 -0
- package/dist/lib/media-buy/action-assessment.mjs +284 -0
- package/dist/lib/media-buy/action-constraints.d.mts +9 -0
- package/dist/lib/media-buy/action-constraints.d.ts +9 -0
- package/dist/lib/media-buy/action-constraints.js +170 -0
- package/dist/lib/media-buy/action-constraints.mjs +146 -0
- package/dist/lib/media-buy/action-contracts.d.mts +40 -0
- package/dist/lib/media-buy/action-contracts.d.ts +40 -0
- package/dist/lib/media-buy/action-contracts.js +304 -0
- package/dist/lib/media-buy/action-contracts.mjs +267 -0
- package/dist/lib/media-buy/action-metadata.generated.d.mts +37 -0
- package/dist/lib/media-buy/action-metadata.generated.d.ts +37 -0
- package/dist/lib/media-buy/action-metadata.generated.js +128 -0
- package/dist/lib/media-buy/action-metadata.generated.mjs +101 -0
- package/dist/lib/media-buy/action-types.d.mts +106 -0
- package/dist/lib/media-buy/action-types.d.ts +106 -0
- package/dist/lib/{types/v3-1-beta/tools.generated.js → media-buy/action-types.js} +2 -2
- package/dist/lib/media-buy/actions.d.mts +6 -0
- package/dist/lib/media-buy/actions.d.ts +6 -0
- package/dist/lib/media-buy/actions.js +38 -0
- package/dist/lib/media-buy/actions.mjs +9 -0
- package/dist/lib/media-buy/available-actions.d.mts +2 -1
- package/dist/lib/media-buy/available-actions.d.ts +2 -1
- package/dist/lib/media-buy/available-actions.js +4 -3
- package/dist/lib/media-buy/available-actions.mjs +4 -3
- package/dist/lib/media-buy/compatibility.js +3 -0
- package/dist/lib/media-buy/compatibility.mjs +3 -0
- package/dist/lib/media-buy/index.d.mts +4 -0
- package/dist/lib/media-buy/index.d.ts +4 -0
- package/dist/lib/media-buy/index.js +3 -1
- package/dist/lib/media-buy/index.mjs +1 -0
- package/dist/lib/media-buy/legacy-action-ids.d.mts +1 -0
- package/dist/lib/media-buy/legacy-action-ids.d.ts +1 -0
- package/dist/lib/media-buy/legacy-action-ids.js +50 -0
- package/dist/lib/media-buy/legacy-action-ids.mjs +26 -0
- package/dist/lib/media-buy/mutations.d.mts +70 -0
- package/dist/lib/media-buy/mutations.d.ts +70 -0
- package/dist/lib/media-buy/mutations.js +525 -0
- package/dist/lib/media-buy/mutations.mjs +498 -0
- package/dist/lib/media-buy/preflight.d.mts +20 -69
- package/dist/lib/media-buy/preflight.d.ts +20 -69
- package/dist/lib/media-buy/preflight.js +100 -336
- package/dist/lib/media-buy/preflight.mjs +111 -333
- package/dist/lib/media-buy/targeting-input.d.mts +7 -4
- package/dist/lib/media-buy/targeting-input.d.ts +7 -4
- package/dist/lib/media-buy/types.d.mts +55 -7
- package/dist/lib/media-buy/types.d.ts +55 -7
- package/dist/lib/protocols/rawResponseCapture.d.mts +12 -0
- package/dist/lib/protocols/rawResponseCapture.d.ts +12 -0
- package/dist/lib/protocols/rawResponseCapture.js +33 -3
- package/dist/lib/protocols/rawResponseCapture.mjs +32 -3
- package/dist/lib/registry/types.generated.d.mts +377 -9
- package/dist/lib/registry/types.generated.d.ts +377 -9
- package/dist/lib/reporting/evidence.d.mts +1 -0
- package/dist/lib/reporting/evidence.d.ts +1 -0
- package/dist/lib/reporting/evidence.js +32 -3
- package/dist/lib/reporting/evidence.mjs +31 -3
- package/dist/lib/reporting/ledger/handler.d.mts +51 -1
- package/dist/lib/reporting/ledger/handler.d.ts +51 -1
- package/dist/lib/reporting/ledger/handler.js +306 -38
- package/dist/lib/reporting/ledger/handler.mjs +304 -37
- package/dist/lib/reporting/ledger/health.d.mts +12 -0
- package/dist/lib/reporting/ledger/health.d.ts +12 -0
- package/dist/lib/reporting/ledger/health.js +15 -2
- package/dist/lib/reporting/ledger/health.mjs +13 -1
- package/dist/lib/reporting/ledger/index.d.mts +3 -0
- package/dist/lib/reporting/ledger/index.d.ts +3 -0
- package/dist/lib/reporting/ledger/index.js +7 -1
- package/dist/lib/reporting/ledger/index.mjs +3 -0
- package/dist/lib/reporting/ledger/lifecycle.d.mts +31 -4
- package/dist/lib/reporting/ledger/lifecycle.d.ts +31 -4
- package/dist/lib/reporting/ledger/lifecycle.js +244 -37
- package/dist/lib/reporting/ledger/lifecycle.mjs +244 -37
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +231 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +231 -0
- package/dist/lib/reporting/ledger/managed-postgres.js +1797 -0
- package/dist/lib/reporting/ledger/managed-postgres.mjs +1776 -0
- package/dist/lib/reporting/ledger/managed.d.mts +355 -0
- package/dist/lib/reporting/ledger/managed.d.ts +355 -0
- package/dist/lib/reporting/ledger/managed.js +661 -0
- package/dist/lib/reporting/ledger/managed.mjs +633 -0
- package/dist/lib/reporting/ledger/notification-activity.d.mts +222 -0
- package/dist/lib/reporting/ledger/notification-activity.d.ts +222 -0
- package/dist/lib/reporting/ledger/notification-activity.js +1139 -0
- package/dist/lib/reporting/ledger/notification-activity.mjs +1110 -0
- package/dist/lib/reporting/ledger/postgres.d.mts +161 -1
- package/dist/lib/reporting/ledger/postgres.d.ts +161 -1
- package/dist/lib/reporting/ledger/postgres.js +1153 -21
- package/dist/lib/reporting/ledger/postgres.mjs +1152 -21
- package/dist/lib/reporting/ledger/producer.d.mts +8 -0
- package/dist/lib/reporting/ledger/producer.d.ts +8 -0
- package/dist/lib/reporting/ledger/producer.js +146 -52
- package/dist/lib/reporting/ledger/producer.mjs +146 -51
- package/dist/lib/reporting/ledger/types.d.mts +358 -1
- package/dist/lib/reporting/ledger/types.d.ts +358 -1
- package/dist/lib/reporting/ledger/types.js +3 -0
- package/dist/lib/reporting/ledger/types.mjs +2 -0
- package/dist/lib/reporting/service/conformance.d.mts +35 -0
- package/dist/lib/reporting/service/conformance.d.ts +35 -0
- package/dist/lib/reporting/service/conformance.js +89 -0
- package/dist/lib/reporting/service/conformance.mjs +68 -0
- package/dist/lib/reporting/service/index.d.mts +182 -0
- package/dist/lib/reporting/service/index.d.ts +182 -0
- package/dist/lib/reporting/service/index.js +793 -0
- package/dist/lib/reporting/service/index.mjs +787 -0
- package/dist/lib/reporting/source/index.d.mts +2 -1
- package/dist/lib/reporting/source/index.d.ts +2 -1
- package/dist/lib/reporting/source/index.js +16 -3
- package/dist/lib/reporting/source/index.mjs +12 -1
- package/dist/lib/reporting/source/inline.d.mts +88 -1
- package/dist/lib/reporting/source/inline.d.ts +88 -1
- package/dist/lib/reporting/source/inline.js +1161 -163
- package/dist/lib/reporting/source/inline.mjs +1166 -163
- package/dist/lib/reporting/source/manifest.js +12 -7
- package/dist/lib/reporting/source/manifest.mjs +12 -7
- package/dist/lib/reporting/source/source.d.mts +26 -0
- package/dist/lib/reporting/source/source.d.ts +26 -0
- package/dist/lib/reporting/source/source.js +71 -2
- package/dist/lib/reporting/source/source.mjs +65 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/create-adcp-server.d.mts +18 -0
- package/dist/lib/server/create-adcp-server.d.ts +18 -0
- package/dist/lib/server/create-adcp-server.js +52 -2
- package/dist/lib/server/create-adcp-server.mjs +52 -2
- package/dist/lib/server/decisioning/account.d.mts +1 -1
- package/dist/lib/server/decisioning/account.d.ts +1 -1
- package/dist/lib/server/decisioning/index.d.mts +1 -0
- package/dist/lib/server/decisioning/index.d.ts +1 -0
- package/dist/lib/server/decisioning/platform.d.mts +3 -0
- package/dist/lib/server/decisioning/platform.d.ts +3 -0
- package/dist/lib/server/decisioning/runtime/from-platform.js +88 -10
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +88 -10
- package/dist/lib/server/decisioning/specialisms/reporting.d.mts +38 -0
- package/dist/lib/server/decisioning/specialisms/reporting.d.ts +38 -0
- package/dist/lib/{types/v3-1-beta/index.js → server/decisioning/specialisms/reporting.js} +2 -8
- package/dist/lib/server/decisioning/specialisms/reporting.mjs +0 -0
- package/dist/lib/server/index.d.mts +4 -2
- package/dist/lib/server/index.d.ts +4 -2
- package/dist/lib/server/index.js +5 -0
- package/dist/lib/server/index.mjs +4 -0
- package/dist/lib/server/media-buy-action-resolver.d.mts +63 -0
- package/dist/lib/server/media-buy-action-resolver.d.ts +63 -0
- package/dist/lib/server/media-buy-action-resolver.js +297 -0
- package/dist/lib/server/media-buy-action-resolver.mjs +285 -0
- package/dist/lib/server/media-buy-actions.d.mts +7 -8
- package/dist/lib/server/media-buy-actions.d.ts +7 -8
- package/dist/lib/server/media-buy-actions.js +57 -14
- package/dist/lib/server/media-buy-actions.mjs +63 -14
- package/dist/lib/server/notification-subscriptions/index.d.mts +2 -2
- package/dist/lib/server/notification-subscriptions/index.d.ts +2 -2
- package/dist/lib/server/notification-subscriptions/index.js +2 -0
- package/dist/lib/server/notification-subscriptions/index.mjs +2 -0
- package/dist/lib/server/notification-subscriptions/postgres-runtime.d.mts +3 -1
- package/dist/lib/server/notification-subscriptions/postgres-runtime.d.ts +3 -1
- package/dist/lib/server/notification-subscriptions/postgres-runtime.js +1 -0
- package/dist/lib/server/notification-subscriptions/postgres-runtime.mjs +1 -0
- package/dist/lib/server/notification-subscriptions/runtime.d.mts +12 -1
- package/dist/lib/server/notification-subscriptions/runtime.d.ts +12 -1
- package/dist/lib/server/notification-subscriptions/runtime.js +102 -16
- package/dist/lib/server/notification-subscriptions/runtime.mjs +101 -16
- package/dist/lib/server/notification-subscriptions/types.d.mts +104 -1
- package/dist/lib/server/notification-subscriptions/types.d.ts +104 -1
- package/dist/lib/server/webhook-emitter.d.mts +40 -5
- package/dist/lib/server/webhook-emitter.d.ts +40 -5
- package/dist/lib/server/webhook-emitter.js +23 -12
- package/dist/lib/server/webhook-emitter.mjs +23 -12
- package/dist/lib/storage/interfaces.d.mts +14 -2
- package/dist/lib/storage/interfaces.d.ts +14 -2
- package/dist/lib/testing/compliance/comply.d.mts +9 -3
- package/dist/lib/testing/compliance/comply.d.ts +9 -3
- package/dist/lib/testing/compliance/comply.js +158 -3
- package/dist/lib/testing/compliance/comply.mjs +159 -4
- package/dist/lib/testing/compliance/storyboard-tracks.js +7 -5
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +7 -5
- package/dist/lib/testing/compliance/summary.js +10 -1
- package/dist/lib/testing/compliance/summary.mjs +10 -1
- package/dist/lib/testing/index.d.mts +1 -1
- package/dist/lib/testing/index.d.ts +1 -1
- package/dist/lib/testing/index.js +2 -0
- package/dist/lib/testing/index.mjs +3 -1
- package/dist/lib/testing/storyboard/agent-routing.d.mts +12 -43
- package/dist/lib/testing/storyboard/agent-routing.d.ts +12 -43
- package/dist/lib/testing/storyboard/agent-routing.js +75 -13
- package/dist/lib/testing/storyboard/agent-routing.mjs +70 -12
- package/dist/lib/testing/storyboard/index.d.mts +1 -0
- package/dist/lib/testing/storyboard/index.d.ts +1 -0
- package/dist/lib/testing/storyboard/index.js +3 -0
- package/dist/lib/testing/storyboard/index.mjs +2 -0
- package/dist/lib/testing/storyboard/junit.d.mts +1 -1
- package/dist/lib/testing/storyboard/junit.d.ts +1 -1
- package/dist/lib/testing/storyboard/junit.js +21 -2
- package/dist/lib/testing/storyboard/junit.mjs +21 -2
- package/dist/lib/testing/storyboard/probes.d.mts +130 -0
- package/dist/lib/testing/storyboard/probes.d.ts +130 -0
- package/dist/lib/testing/storyboard/probes.js +682 -10
- package/dist/lib/testing/storyboard/probes.mjs +683 -3
- package/dist/lib/testing/storyboard/request-signing/builder.d.mts +16 -5
- package/dist/lib/testing/storyboard/request-signing/builder.d.ts +16 -5
- package/dist/lib/testing/storyboard/request-signing/grader.d.mts +44 -1
- package/dist/lib/testing/storyboard/request-signing/grader.d.ts +44 -1
- package/dist/lib/testing/storyboard/request-signing/grader.js +46 -22
- package/dist/lib/testing/storyboard/request-signing/grader.mjs +43 -21
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.d.mts +86 -11
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.d.ts +86 -11
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.js +119 -25
- package/dist/lib/testing/storyboard/request-signing/probe-dispatch.mjs +117 -26
- package/dist/lib/testing/storyboard/request-signing/synthesize.js +22 -2
- package/dist/lib/testing/storyboard/request-signing/synthesize.mjs +22 -2
- package/dist/lib/testing/storyboard/runner.d.mts +103 -0
- package/dist/lib/testing/storyboard/runner.d.ts +103 -0
- package/dist/lib/testing/storyboard/runner.js +1090 -268
- package/dist/lib/testing/storyboard/runner.mjs +1096 -261
- package/dist/lib/testing/storyboard/seeding.d.mts +4 -1
- package/dist/lib/testing/storyboard/seeding.d.ts +4 -1
- package/dist/lib/testing/storyboard/seeding.js +55 -24
- package/dist/lib/testing/storyboard/seeding.mjs +55 -24
- package/dist/lib/testing/storyboard/test-kit.d.mts +37 -3
- package/dist/lib/testing/storyboard/test-kit.d.ts +37 -3
- package/dist/lib/testing/storyboard/test-kit.js +8 -2
- package/dist/lib/testing/storyboard/test-kit.mjs +7 -2
- package/dist/lib/testing/storyboard/types.d.mts +132 -10
- package/dist/lib/testing/storyboard/types.d.ts +132 -10
- package/dist/lib/testing/storyboard/types.js +17 -0
- package/dist/lib/testing/storyboard/types.mjs +16 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/storyboard/validations.js +16 -0
- package/dist/lib/testing/storyboard/validations.mjs +16 -0
- package/dist/lib/testing/test-controller.d.mts +1 -1
- package/dist/lib/testing/test-controller.d.ts +1 -1
- package/dist/lib/types/buy-products.d.ts +71 -6
- package/dist/lib/types/control-media-buy.d.ts +25 -11
- package/dist/lib/types/core.generated.d.mts +69 -10
- package/dist/lib/types/core.generated.d.ts +69 -10
- package/dist/lib/types/create-media-buy.d.ts +71 -6
- package/dist/lib/types/forward-compat-error-codes.d.mts +7 -6
- package/dist/lib/types/forward-compat-error-codes.d.ts +7 -6
- package/dist/lib/types/index.d.mts +2 -2
- package/dist/lib/types/index.d.ts +2 -2
- package/dist/lib/types/schemas.generated.d.ts +8040 -8116
- package/dist/lib/types/schemas.generated.js +1074 -309
- package/dist/lib/types/schemas.generated.mjs +1068 -309
- package/dist/lib/types/tools.generated.d.mts +65 -6
- package/dist/lib/types/tools.generated.d.ts +65 -6
- package/dist/lib/types/update-media-buy.d.ts +71 -6
- package/dist/lib/utils/redact-secrets.d.mts +1 -1
- package/dist/lib/utils/redact-secrets.d.ts +1 -1
- package/dist/lib/utils/redact-secrets.js +1 -1
- package/dist/lib/utils/redact-secrets.mjs +1 -1
- package/dist/lib/v2/projection/cache-versions.d.mts +0 -1
- package/dist/lib/v2/projection/cache-versions.d.ts +0 -1
- package/dist/lib/v2/projection/cache-versions.js +1 -15
- package/dist/lib/v2/projection/cache-versions.mjs +1 -14
- package/dist/lib/v2/projection/canonical-properties.js +2 -2
- package/dist/lib/v2/projection/canonical-properties.mjs +3 -3
- package/dist/lib/v2/projection/registry.d.mts +1 -1
- package/dist/lib/v2/projection/registry.d.ts +1 -1
- package/dist/lib/v2/projection/registry.js +2 -2
- package/dist/lib/v2/projection/registry.mjs +3 -3
- package/dist/lib/version.d.mts +5 -5
- package/dist/lib/version.d.ts +5 -5
- package/dist/lib/version.js +3 -8
- package/dist/lib/version.mjs +3 -8
- package/dist/lib/wholesale-feed-sync/index.d.mts +1 -0
- package/dist/lib/wholesale-feed-sync/index.d.ts +1 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.d.mts +42 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.d.ts +42 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.js +16 -0
- package/dist/lib/wholesale-feed-sync/protocol-types.mjs +0 -0
- package/dist/lib/wholesale-feed-sync/sync.d.mts +6 -6
- package/dist/lib/wholesale-feed-sync/sync.d.ts +6 -6
- package/dist/lib/wholesale-feed-sync/sync.js +3 -1
- package/dist/lib/wholesale-feed-sync/sync.mjs +3 -1
- package/dist/lib/wholesale-feed-sync/types.d.mts +15 -14
- package/dist/lib/wholesale-feed-sync/types.d.ts +15 -14
- package/dist/lib/wholesale-feed-sync/webhook-notification.d.mts +7 -5
- package/dist/lib/wholesale-feed-sync/webhook-notification.d.ts +7 -5
- package/dist/lib/wholesale-feed-sync/webhook-notification.js +45 -0
- package/dist/lib/wholesale-feed-sync/webhook-notification.mjs +44 -0
- package/docs/CLI.md +1 -1
- package/docs/TYPE-SUMMARY.md +118 -4
- package/docs/guides/ASYNC-API-REFERENCE.md +62 -1
- package/docs/guides/ASYNC-DEVELOPER-GUIDE.md +25 -0
- package/docs/guides/ASYNC-DOCUMENTATION-INDEX.md +3 -0
- package/docs/guides/BUYER-QUICKSTART-3.2.md +5 -0
- package/docs/guides/DURABLE-BUYER-WRITES.md +337 -0
- package/docs/guides/EXISTING-PLATFORM.md +35 -0
- package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +7 -3
- package/docs/guides/MEDIA-BUY-ACTION-ASSESSMENT.md +300 -0
- package/docs/guides/REPORTING-LEDGER.md +654 -3
- package/docs/guides/REPORTING-SOURCE-EXECUTOR.md +63 -1
- package/docs/guides/SELLER-QUICKSTART-3.2.md +2 -0
- package/docs/guides/VALIDATE-YOUR-AGENT.md +35 -0
- package/docs/guides/idempotency-crash-recovery.md +4 -0
- package/docs/llms.txt +4 -2
- package/docs/migration-14.x-rc-worksheet.md +5 -5
- package/docs/migration-7.9-to-7.10.md +7 -5
- package/examples/README.md +17 -0
- package/examples/durable-buyer-writes/caller.ts +745 -0
- package/examples/durable-buyer-writes/worker.ts +240 -0
- package/examples/reliable-reporting-service/README.md +100 -0
- package/examples/seller-3.2-starter.ts +7 -8
- package/examples/targeting-input-existing-platform.ts +153 -0
- package/package.json +41 -29
- package/skills/build-seller-agent/specialisms/signed-requests.md +11 -1
- package/skills/cross-cutting.md +28 -11
- package/compliance/cache/3.1.0-beta.7/domains/brand/index.yaml +0 -160
- package/compliance/cache/3.1.0-beta.7/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -415
- package/compliance/cache/3.1.0-beta.7/domains/brand/scenarios/single_side_trust_extension.yaml +0 -454
- package/compliance/cache/3.1.0-beta.7/domains/creative/index.yaml +0 -339
- package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/billing_out_of_band.yaml +0 -153
- package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -389
- package/compliance/cache/3.1.0-beta.7/domains/creative/scenarios/native_in_feed.yaml +0 -543
- package/compliance/cache/3.1.0-beta.7/domains/governance/index.yaml +0 -682
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/index.yaml +0 -781
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -380
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/available_actions.yaml +0 -565
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -354
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/canonical_formats.yaml +0 -711
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -344
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -234
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -419
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/creative_reception.yaml +0 -247
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/delivery_reporting.yaml +0 -357
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/dependency_impairment.yaml +0 -633
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -800
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -309
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_approved.yaml +0 -214
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_conditions.yaml +0 -199
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_denied.yaml +0 -204
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -252
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/invalid_transitions.yaml +0 -289
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -276
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/measurement_accountability.yaml +0 -244
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -203
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -274
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -500
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -428
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -470
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -373
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_finalize.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -257
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -333
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -517
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -294
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -823
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -360
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/refine_products.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -293
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -576
- package/compliance/cache/3.1.0-beta.7/domains/media-buy/state-machine.yaml +0 -442
- package/compliance/cache/3.1.0-beta.7/domains/signals/index.yaml +0 -266
- package/compliance/cache/3.1.0-beta.7/domains/sponsored-intelligence/index.yaml +0 -256
- package/compliance/cache/3.1.0-beta.7/index.json +0 -356
- package/compliance/cache/3.1.0-beta.7/protocols/brand/index.yaml +0 -160
- package/compliance/cache/3.1.0-beta.7/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -415
- package/compliance/cache/3.1.0-beta.7/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -454
- package/compliance/cache/3.1.0-beta.7/protocols/creative/index.yaml +0 -339
- package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/billing_out_of_band.yaml +0 -153
- package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -389
- package/compliance/cache/3.1.0-beta.7/protocols/creative/scenarios/native_in_feed.yaml +0 -543
- package/compliance/cache/3.1.0-beta.7/protocols/governance/index.yaml +0 -682
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/index.yaml +0 -781
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -380
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/available_actions.yaml +0 -565
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -354
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/canonical_formats.yaml +0 -711
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -344
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -234
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -419
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/creative_reception.yaml +0 -247
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -357
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -633
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -800
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -309
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_approved.yaml +0 -214
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_conditions.yaml +0 -199
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_denied.yaml +0 -204
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -252
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -289
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -276
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -244
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -203
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -274
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -500
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -428
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -470
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -373
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -399
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -264
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -257
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -333
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -517
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -294
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -823
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -360
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/refine_products.yaml +0 -148
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -293
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -576
- package/compliance/cache/3.1.0-beta.7/protocols/media-buy/state-machine.yaml +0 -442
- package/compliance/cache/3.1.0-beta.7/protocols/signals/index.yaml +0 -266
- package/compliance/cache/3.1.0-beta.7/protocols/sponsored-intelligence/index.yaml +0 -256
- package/compliance/cache/3.1.0-beta.7/specialisms/audience-sync/index.yaml +0 -313
- package/compliance/cache/3.1.0-beta.7/specialisms/brand-rights/index.yaml +0 -350
- package/compliance/cache/3.1.0-beta.7/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -226
- package/compliance/cache/3.1.0-beta.7/specialisms/collection-lists/index.yaml +0 -359
- package/compliance/cache/3.1.0-beta.7/specialisms/content-standards/index.yaml +0 -572
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-ad-server/index.yaml +0 -409
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-generative/generative-seller.yaml +0 -807
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-generative/index.yaml +0 -758
- package/compliance/cache/3.1.0-beta.7/specialisms/creative-template/index.yaml +0 -510
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-aware-seller/index.yaml +0 -143
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -117
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-delivery-monitor/index.yaml +0 -441
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-spend-authority/denied.yaml +0 -221
- package/compliance/cache/3.1.0-beta.7/specialisms/governance-spend-authority/index.yaml +0 -330
- package/compliance/cache/3.1.0-beta.7/specialisms/property-lists/index.yaml +0 -482
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-broadcast-tv/index.yaml +0 -738
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-catalog-driven/index.yaml +0 -840
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-guaranteed/index.yaml +0 -601
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-non-guaranteed/index.yaml +0 -546
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-proposal-mode/index.yaml +0 -586
- package/compliance/cache/3.1.0-beta.7/specialisms/sales-social/index.yaml +0 -919
- package/compliance/cache/3.1.0-beta.7/specialisms/signal-marketplace/index.yaml +0 -424
- package/compliance/cache/3.1.0-beta.7/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -211
- package/compliance/cache/3.1.0-beta.7/specialisms/signal-owned/index.yaml +0 -317
- package/compliance/cache/3.1.0-beta.7/specialisms/sponsored-intelligence/index.yaml +0 -59
- package/compliance/cache/3.1.0-beta.7/test-kits/acme-outdoor-live.yaml +0 -78
- package/compliance/cache/3.1.0-beta.7/test-kits/acme-outdoor.yaml +0 -223
- package/compliance/cache/3.1.0-beta.7/test-kits/billing-gate-runner.yaml +0 -115
- package/compliance/cache/3.1.0-beta.7/test-kits/bistro-oranje.yaml +0 -126
- package/compliance/cache/3.1.0-beta.7/test-kits/distributed-brand-runner.yaml +0 -281
- package/compliance/cache/3.1.0-beta.7/test-kits/nova-motors.yaml +0 -262
- package/compliance/cache/3.1.0-beta.7/test-kits/osei-natural.yaml +0 -126
- package/compliance/cache/3.1.0-beta.7/test-kits/parallel-dispatch-runner.yaml +0 -196
- package/compliance/cache/3.1.0-beta.7/test-kits/rate-limit-trip-runner.yaml +0 -172
- package/compliance/cache/3.1.0-beta.7/test-kits/signed-requests-runner.yaml +0 -155
- package/compliance/cache/3.1.0-beta.7/test-kits/single-side-trust-runner.yaml +0 -294
- package/compliance/cache/3.1.0-beta.7/test-kits/substitution-observer-runner.yaml +0 -688
- package/compliance/cache/3.1.0-beta.7/test-kits/summit-foods.yaml +0 -125
- package/compliance/cache/3.1.0-beta.7/test-kits/webhook-receiver-runner.yaml +0 -265
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/001-minimal-plan.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/002-full-plan.json +0 -217
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -60
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/004a-human-review-omitted.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -49
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -53
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -57
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -49
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -53
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/007-unicode-objectives.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -65
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/README.md +0 -220
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/canonicalization.json +0 -241
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/keys.json +0 -60
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/001-no-signature-header.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/002-wrong-tag.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/003-expired-signature.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/004-window-too-long.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -33
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/011-malformed-header.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/013-expires-le-created.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -27
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/015-signature-invalid.json +0 -28
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -35
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/017-key-revoked.json +0 -38
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -28
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/020-rate-abuse.json +0 -34
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -32
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -43
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -25
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/001-basic-post.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -31
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/003-es256-post.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -30
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/README.md +0 -211
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/keys.json +0 -61
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -25
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -25
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -37
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -32
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -33
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -32
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -41
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -26
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/001-basic-post.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/002-es256-post.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -24
- package/compliance/cache/3.1.0-beta.7/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -25
- package/compliance/cache/3.1.0-beta.7/universal/billing-gate-dispatch.yaml +0 -450
- package/compliance/cache/3.1.0-beta.7/universal/canonical-format-validate-input.yaml +0 -640
- package/compliance/cache/3.1.0-beta.7/universal/capability-discovery.yaml +0 -125
- package/compliance/cache/3.1.0-beta.7/universal/collection-lists-pagination-integrity.yaml +0 -306
- package/compliance/cache/3.1.0-beta.7/universal/comply-controller-mode-gate.yaml +0 -141
- package/compliance/cache/3.1.0-beta.7/universal/content-standards-pagination-integrity.yaml +0 -326
- package/compliance/cache/3.1.0-beta.7/universal/deterministic-testing.yaml +0 -1430
- package/compliance/cache/3.1.0-beta.7/universal/error-compliance-signals.yaml +0 -377
- package/compliance/cache/3.1.0-beta.7/universal/error-compliance.yaml +0 -528
- package/compliance/cache/3.1.0-beta.7/universal/fictional-entities.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/universal/get-media-buys-pagination-integrity.yaml +0 -160
- package/compliance/cache/3.1.0-beta.7/universal/get-signals-pagination-integrity.yaml +0 -211
- package/compliance/cache/3.1.0-beta.7/universal/idempotency.yaml +0 -861
- package/compliance/cache/3.1.0-beta.7/universal/notification-config-event-scope.yaml +0 -119
- package/compliance/cache/3.1.0-beta.7/universal/notification-config-lifecycle.yaml +0 -337
- package/compliance/cache/3.1.0-beta.7/universal/notification-config-rejections.yaml +0 -107
- package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity-creative-formats.yaml +0 -265
- package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity-list-accounts.yaml +0 -245
- package/compliance/cache/3.1.0-beta.7/universal/pagination-integrity.yaml +0 -263
- package/compliance/cache/3.1.0-beta.7/universal/property-lists-pagination-integrity.yaml +0 -307
- package/compliance/cache/3.1.0-beta.7/universal/read-tool-idempotency.yaml +0 -405
- package/compliance/cache/3.1.0-beta.7/universal/runner-output-contract.yaml +0 -1266
- package/compliance/cache/3.1.0-beta.7/universal/schema-validation-signals.yaml +0 -181
- package/compliance/cache/3.1.0-beta.7/universal/schema-validation.yaml +0 -548
- package/compliance/cache/3.1.0-beta.7/universal/security.yaml +0 -539
- package/compliance/cache/3.1.0-beta.7/universal/signed-requests.yaml +0 -217
- package/compliance/cache/3.1.0-beta.7/universal/stale-response-advisory.yaml +0 -295
- package/compliance/cache/3.1.0-beta.7/universal/storyboard-schema.yaml +0 -2136
- package/compliance/cache/3.1.0-beta.7/universal/v3-envelope-integrity.yaml +0 -117
- package/compliance/cache/3.1.0-beta.7/universal/version-negotiation.yaml +0 -130
- package/compliance/cache/3.1.0-beta.7/universal/webhook-emission.yaml +0 -411
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-bulk-webhooks.yaml +0 -82
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-product-webhooks.yaml +0 -83
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-products.yaml +0 -151
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-signal-webhooks.yaml +0 -83
- package/compliance/cache/3.1.0-beta.7/universal/wholesale-feed-signals.yaml +0 -149
- package/dist/lib/types/v3-1-beta/index.d.mts +0 -1
- package/dist/lib/types/v3-1-beta/index.d.ts +0 -1
- package/dist/lib/types/v3-1-beta/index.mjs +0 -1
- package/dist/lib/types/v3-1-beta/tools.generated.d.mts +0 -26788
- package/dist/lib/types/v3-1-beta/tools.generated.d.ts +0 -26788
- /package/dist/lib/{types/v3-1-beta/tools.generated.mjs → media-buy/action-types.mjs} +0 -0
|
@@ -19,7 +19,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var probes_exports = {};
|
|
20
20
|
__export(probes_exports, {
|
|
21
21
|
PROBE_TASKS: () => PROBE_TASKS,
|
|
22
|
-
SsrfRefusedError: () =>
|
|
22
|
+
SsrfRefusedError: () => import_net2.SsrfRefusedError,
|
|
23
|
+
__probeFetchWithBudgetForTest: () => __probeFetchWithBudgetForTest,
|
|
23
24
|
fetchProbe: () => fetchProbe,
|
|
24
25
|
generateRandomInvalidApiKey: () => generateRandomInvalidApiKey,
|
|
25
26
|
generateRandomInvalidJwt: () => generateRandomInvalidJwt,
|
|
@@ -28,12 +29,20 @@ __export(probes_exports, {
|
|
|
28
29
|
probeOauthAuthServerMetadata: () => probeOauthAuthServerMetadata,
|
|
29
30
|
probeProtectedResourceMetadata: () => probeProtectedResourceMetadata,
|
|
30
31
|
rawA2aProbe: () => rawA2aProbe,
|
|
31
|
-
rawMcpProbe: () => rawMcpProbe
|
|
32
|
+
rawMcpProbe: () => rawMcpProbe,
|
|
33
|
+
rawMcpSessionProbe: () => rawMcpSessionProbe
|
|
32
34
|
});
|
|
33
35
|
module.exports = __toCommonJS(probes_exports);
|
|
34
36
|
var import_crypto = require("crypto");
|
|
37
|
+
var import_client = require("@modelcontextprotocol/sdk/client/index.js");
|
|
38
|
+
var import_streamableHttp = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
35
39
|
var import_types = require("@modelcontextprotocol/sdk/types.js");
|
|
36
40
|
var import_net = require('../../net/index.js');
|
|
41
|
+
var import_rawResponseCapture = require('../../protocols/rawResponseCapture.js');
|
|
42
|
+
var import_session_termination = require('../../protocols/session-termination.js');
|
|
43
|
+
var import_net2 = require('../../net/index.js');
|
|
44
|
+
var import_types2 = require('./types.js');
|
|
45
|
+
var import_test_kit = require('./test-kit.js');
|
|
37
46
|
const PROBE_TASKS = /* @__PURE__ */ new Set([
|
|
38
47
|
"protected_resource_metadata",
|
|
39
48
|
"oauth_auth_server_metadata",
|
|
@@ -46,7 +55,10 @@ const PROBE_TASKS = /* @__PURE__ */ new Set([
|
|
|
46
55
|
"trusted_match_missing_auth_context_probe",
|
|
47
56
|
"trusted_match_invalid_auth_context_probe",
|
|
48
57
|
"trusted_match_missing_auth_identity_probe",
|
|
49
|
-
"trusted_match_invalid_auth_identity_probe"
|
|
58
|
+
"trusted_match_invalid_auth_identity_probe",
|
|
59
|
+
// Runner-selected fallback when the agent advertises no allowlisted probe
|
|
60
|
+
// tool. Dispatched as a complete MCP session lifecycle, never as a tool call.
|
|
61
|
+
import_types2.MCP_SESSION_PROBE_TASK
|
|
50
62
|
]);
|
|
51
63
|
async function probeProtectedResourceMetadata(agentUrl, options = {}) {
|
|
52
64
|
const u = new URL(agentUrl);
|
|
@@ -86,7 +98,7 @@ async function probeOauthAuthServerMetadata(priorProbe, options = {}) {
|
|
|
86
98
|
}
|
|
87
99
|
async function fetchProbe(url, options = {}) {
|
|
88
100
|
try {
|
|
89
|
-
const res = await (0,
|
|
101
|
+
const res = await (0, import_net2.ssrfSafeFetch)(url, {
|
|
90
102
|
method: "GET",
|
|
91
103
|
headers: { accept: "application/json" },
|
|
92
104
|
allowPrivateIp: options.allowPrivateIp ?? false,
|
|
@@ -97,7 +109,7 @@ async function fetchProbe(url, options = {}) {
|
|
|
97
109
|
url,
|
|
98
110
|
status: res.status,
|
|
99
111
|
headers: res.headers,
|
|
100
|
-
body: (0,
|
|
112
|
+
body: (0, import_net2.decodeBodyAsJsonOrText)(res.body, res.headers["content-type"])
|
|
101
113
|
};
|
|
102
114
|
} catch (err) {
|
|
103
115
|
return {
|
|
@@ -140,7 +152,7 @@ async function postRawMcpJsonRpc(options) {
|
|
|
140
152
|
} = options;
|
|
141
153
|
const httpResult = { url: agentUrl, status: 0, headers: {}, body: null };
|
|
142
154
|
try {
|
|
143
|
-
const res = await (0,
|
|
155
|
+
const res = await (0, import_net2.ssrfSafeFetch)(agentUrl, {
|
|
144
156
|
method: "POST",
|
|
145
157
|
headers: {
|
|
146
158
|
"content-type": "application/json",
|
|
@@ -336,6 +348,664 @@ async function rawMcpProbe(options) {
|
|
|
336
348
|
}
|
|
337
349
|
return { httpResult, taskResult: taskResultFromRpc(httpResult, parsed) };
|
|
338
350
|
}
|
|
351
|
+
const SESSION_PROBE_CLIENT_INFO = { name: "AdCP Storyboard MCP Session Probe", version: "1.0.0" };
|
|
352
|
+
function httpProbeResultFromCapture(capture) {
|
|
353
|
+
const headers = Object.fromEntries(
|
|
354
|
+
Object.entries(capture.headers).map(([name, value]) => [name.toLowerCase(), value])
|
|
355
|
+
);
|
|
356
|
+
return {
|
|
357
|
+
url: capture.url,
|
|
358
|
+
status: capture.status,
|
|
359
|
+
headers,
|
|
360
|
+
body: decodeCapturedBody(capture.body, headers["content-type"])
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
function decodeCapturedBody(body, contentType) {
|
|
364
|
+
if (body.length === 0) return null;
|
|
365
|
+
if (contentType?.toLowerCase().includes("text/event-stream")) {
|
|
366
|
+
const dataLines = body.split(/\r?\n/).filter((line) => line.startsWith("data:")).map((line) => line.slice("data:".length).trim()).filter((payload) => payload.length > 0);
|
|
367
|
+
for (const payload of dataLines.reverse()) {
|
|
368
|
+
try {
|
|
369
|
+
return JSON.parse(payload);
|
|
370
|
+
} catch {
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return body;
|
|
374
|
+
}
|
|
375
|
+
if (contentType?.toLowerCase().includes("json")) {
|
|
376
|
+
try {
|
|
377
|
+
return JSON.parse(body);
|
|
378
|
+
} catch {
|
|
379
|
+
return body;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return body;
|
|
383
|
+
}
|
|
384
|
+
function negotiatedVersionFromCaptures(captures) {
|
|
385
|
+
for (const capture of captures) {
|
|
386
|
+
if (capture.requestJsonRpcMethod !== "initialize") continue;
|
|
387
|
+
const body = decodeCapturedBody(capture.body, findHeader(capture.headers, "content-type"));
|
|
388
|
+
const version = body?.result?.protocolVersion;
|
|
389
|
+
if (typeof version === "string" && import_types.SUPPORTED_PROTOCOL_VERSIONS.includes(version)) return version;
|
|
390
|
+
}
|
|
391
|
+
return void 0;
|
|
392
|
+
}
|
|
393
|
+
function findHeader(headers, name) {
|
|
394
|
+
return Object.entries(headers).find(([key]) => key.toLowerCase() === name)?.[1];
|
|
395
|
+
}
|
|
396
|
+
function sessionIdFromCaptures(captures) {
|
|
397
|
+
for (const capture of captures) {
|
|
398
|
+
if (capture.requestJsonRpcMethod !== "initialize") continue;
|
|
399
|
+
const value = findHeader(capture.headers, "mcp-session-id");
|
|
400
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
401
|
+
}
|
|
402
|
+
return void 0;
|
|
403
|
+
}
|
|
404
|
+
function gradedCapture(captures) {
|
|
405
|
+
const graded = captures.filter(
|
|
406
|
+
(capture) => capture.method !== "DELETE" && capture.method !== "GET" && capture.requestJsonRpcMethod !== "tools/list"
|
|
407
|
+
);
|
|
408
|
+
const toolCalls = graded.filter((capture) => capture.requestJsonRpcMethod === "tools/call");
|
|
409
|
+
if (toolCalls.length > 0) return toolCalls[toolCalls.length - 1];
|
|
410
|
+
return graded.length > 0 ? graded[graded.length - 1] : void 0;
|
|
411
|
+
}
|
|
412
|
+
const ADCP_AUTH_REJECTION_CODES = [
|
|
413
|
+
"AUTH_MISSING",
|
|
414
|
+
"AUTH_INVALID",
|
|
415
|
+
// Deprecated in AdCP 3.x but retained by the error-code enum as a
|
|
416
|
+
// backward-compatible alias for the two above, so an agent still emitting it
|
|
417
|
+
// is making an authentication statement.
|
|
418
|
+
"AUTH_REQUIRED"
|
|
419
|
+
];
|
|
420
|
+
const ADCP_SCHEMA_REJECTION_CODES = ["INVALID_REQUEST"];
|
|
421
|
+
const ADCP_ERROR_CODE_FIELDS = /* @__PURE__ */ new Set(["code", "error_code", "errorCode"]);
|
|
422
|
+
function adcpErrorCodesIn(toolResult) {
|
|
423
|
+
const result = toolResult;
|
|
424
|
+
const roots = [result?.structuredContent, result].filter(
|
|
425
|
+
(root) => root !== null && typeof root === "object"
|
|
426
|
+
);
|
|
427
|
+
const envelopes = [];
|
|
428
|
+
for (const root of roots) {
|
|
429
|
+
if (root.error !== void 0) envelopes.push(root.error);
|
|
430
|
+
if (Array.isArray(root.errors)) envelopes.push(...root.errors);
|
|
431
|
+
}
|
|
432
|
+
const found = [];
|
|
433
|
+
for (const envelope of envelopes) {
|
|
434
|
+
if (envelope === null || typeof envelope !== "object") continue;
|
|
435
|
+
for (const [key, entry] of Object.entries(envelope)) {
|
|
436
|
+
if (!ADCP_ERROR_CODE_FIELDS.has(key) || typeof entry !== "string") continue;
|
|
437
|
+
const code = entry.trim().toUpperCase();
|
|
438
|
+
if (ADCP_AUTH_REJECTION_CODES.includes(code) || ADCP_SCHEMA_REJECTION_CODES.includes(code)) found.push(code);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return found;
|
|
442
|
+
}
|
|
443
|
+
function isUnsupportedProtocolVersion(error) {
|
|
444
|
+
return error instanceof Error && error.message.startsWith("Server's protocol version is not supported");
|
|
445
|
+
}
|
|
446
|
+
const AUTH_REJECTION_STATUSES = /* @__PURE__ */ new Set([401, 403]);
|
|
447
|
+
function fourHundredIsAuthRejection(evidence, codes) {
|
|
448
|
+
if (findHeader(evidence.headers, "www-authenticate") !== void 0) return true;
|
|
449
|
+
return codes.some((code) => ADCP_AUTH_REJECTION_CODES.includes(code));
|
|
450
|
+
}
|
|
451
|
+
function sdkRejectionDetail(error) {
|
|
452
|
+
if (error instanceof ProbeResponseTooLargeError) return "response exceeded the probe body cap";
|
|
453
|
+
if (error instanceof ProbeAmplificationError) return `exceeded the probe ${error.kind} budget`;
|
|
454
|
+
const cause = error?.cause;
|
|
455
|
+
if (cause instanceof ProbeResponseTooLargeError) return "response exceeded the probe body cap";
|
|
456
|
+
if (cause instanceof ProbeAmplificationError) return `exceeded the probe ${cause.kind} budget`;
|
|
457
|
+
if (error instanceof import_streamableHttp.StreamableHTTPError && typeof error.code === "number") {
|
|
458
|
+
return `HTTP ${error.code}`;
|
|
459
|
+
}
|
|
460
|
+
if (error instanceof import_types.McpError) {
|
|
461
|
+
return error.code === import_types.ErrorCode.RequestTimeout ? "request timed out" : `JSON-RPC error code ${error.code}`;
|
|
462
|
+
}
|
|
463
|
+
if (error instanceof Error && (error.name === "AbortError" || error.name === "TimeoutError")) {
|
|
464
|
+
return "request aborted";
|
|
465
|
+
}
|
|
466
|
+
return "protocol error";
|
|
467
|
+
}
|
|
468
|
+
function transportErrorEvidence(agentUrl, detail) {
|
|
469
|
+
return { url: agentUrl, status: 0, headers: {}, body: null, error: detail };
|
|
470
|
+
}
|
|
471
|
+
function wrapProbeFetch(upstream, options) {
|
|
472
|
+
const { maxResponseBytes, budget, timeoutMs, signal } = options;
|
|
473
|
+
const wrapped = async (input, init) => {
|
|
474
|
+
if (budget.requestsRemaining <= 0) {
|
|
475
|
+
throw new ProbeAmplificationError("request", MCP_SESSION_PROBE_MAX_REQUESTS);
|
|
476
|
+
}
|
|
477
|
+
budget.requestsRemaining -= 1;
|
|
478
|
+
if (budget.bytesRemaining <= 0) throw new ProbeAmplificationError("byte", MCP_SESSION_PROBE_MAX_TOTAL_BYTES);
|
|
479
|
+
const msLeft = budget.deadlineAt - Date.now();
|
|
480
|
+
if (msLeft <= 0) throw new ProbeAmplificationError("deadline", MCP_SESSION_PROBE_WALK_TIMEOUT_MS);
|
|
481
|
+
const capAbort = new AbortController();
|
|
482
|
+
const signals = [capAbort.signal];
|
|
483
|
+
if (signal) signals.push(signal);
|
|
484
|
+
if (init?.signal) signals.push(init.signal);
|
|
485
|
+
if (timeoutMs !== void 0) signals.push(AbortSignal.timeout(timeoutMs));
|
|
486
|
+
signals.push(AbortSignal.timeout(msLeft));
|
|
487
|
+
const composed = AbortSignal.any(signals);
|
|
488
|
+
const headers = new Headers(init?.headers);
|
|
489
|
+
if (!headers.has("accept-encoding")) headers.set("accept-encoding", "identity");
|
|
490
|
+
const response = await upstream(input, {
|
|
491
|
+
...init ?? {},
|
|
492
|
+
headers,
|
|
493
|
+
redirect: "manual",
|
|
494
|
+
signal: composed
|
|
495
|
+
});
|
|
496
|
+
return capResponseBody(response, maxResponseBytes, capAbort, options.onCapExceeded, (read) => {
|
|
497
|
+
budget.bytesRemaining -= read;
|
|
498
|
+
if (budget.bytesRemaining <= 0) {
|
|
499
|
+
capAbort.abort(new ProbeAmplificationError("byte", MCP_SESSION_PROBE_MAX_TOTAL_BYTES));
|
|
500
|
+
options.onCapExceeded?.();
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
return true;
|
|
504
|
+
});
|
|
505
|
+
};
|
|
506
|
+
return wrapped;
|
|
507
|
+
}
|
|
508
|
+
function capResponseBody(response, maxBytes, capAbort, onCapExceeded, countBytes) {
|
|
509
|
+
const declared = response.headers.get("content-length");
|
|
510
|
+
if (declared !== null && /^\d+$/.test(declared.trim()) && Number(declared.trim()) > maxBytes) {
|
|
511
|
+
response.body?.cancel().catch(() => {
|
|
512
|
+
});
|
|
513
|
+
onCapExceeded?.();
|
|
514
|
+
throw new ProbeResponseTooLargeError(maxBytes);
|
|
515
|
+
}
|
|
516
|
+
if (!response.body) return response;
|
|
517
|
+
let seen = 0;
|
|
518
|
+
const counter = new TransformStream({
|
|
519
|
+
transform(chunk, controller) {
|
|
520
|
+
seen += chunk.byteLength;
|
|
521
|
+
if (countBytes?.(chunk.byteLength) === false) {
|
|
522
|
+
controller.error(new ProbeAmplificationError("byte", maxBytes));
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
if (seen > maxBytes) {
|
|
526
|
+
const tooLarge = new ProbeResponseTooLargeError(maxBytes);
|
|
527
|
+
controller.error(tooLarge);
|
|
528
|
+
capAbort.abort(tooLarge);
|
|
529
|
+
onCapExceeded?.();
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
controller.enqueue(chunk);
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
return new Response(response.body.pipeThrough(counter), {
|
|
536
|
+
status: response.status,
|
|
537
|
+
statusText: response.statusText,
|
|
538
|
+
headers: response.headers
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
const PROBE_TASK_ALLOWLIST_HINT = import_test_kit.PROBE_TASK_ALLOWLIST_SUMMARY;
|
|
542
|
+
function fenceAgentText(value, maxLength = 96) {
|
|
543
|
+
const clipped = value.length > maxLength ? `${value.slice(0, maxLength)}\u2026` : value;
|
|
544
|
+
return clipped.replace(
|
|
545
|
+
/[\u0000-\u001f\u007f-\u009f]/g,
|
|
546
|
+
(char) => `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
class ProbeResponseTooLargeError extends Error {
|
|
550
|
+
constructor(maxBytes) {
|
|
551
|
+
super(`MCP session probe response exceeded ${maxBytes} bytes`);
|
|
552
|
+
this.name = "ProbeResponseTooLargeError";
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
function __probeFetchWithBudgetForTest(upstream, budget) {
|
|
556
|
+
return wrapProbeFetch(upstream, { maxResponseBytes: MCP_SESSION_PROBE_MAX_RESPONSE_BYTES, budget });
|
|
557
|
+
}
|
|
558
|
+
class ProbeAmplificationError extends Error {
|
|
559
|
+
constructor(kind, limit) {
|
|
560
|
+
super(`MCP session probe exceeded its ${kind} budget (${limit})`);
|
|
561
|
+
this.kind = kind;
|
|
562
|
+
this.name = "ProbeAmplificationError";
|
|
563
|
+
}
|
|
564
|
+
kind;
|
|
565
|
+
}
|
|
566
|
+
const MCP_SESSION_PROBE_MAX_REQUESTS = 28;
|
|
567
|
+
const MCP_SESSION_PROBE_MAX_CANDIDATES = 3;
|
|
568
|
+
const MCP_SESSION_PROBE_WALK_TIMEOUT_MS = 25e3;
|
|
569
|
+
const NO_RECONNECTION = {
|
|
570
|
+
maxReconnectionDelay: 0,
|
|
571
|
+
initialReconnectionDelay: 0,
|
|
572
|
+
reconnectionDelayGrowFactor: 1,
|
|
573
|
+
maxRetries: 0
|
|
574
|
+
};
|
|
575
|
+
const SESSION_TERMINATION_TIMEOUT_MS = 2e3;
|
|
576
|
+
const MCP_SESSION_PROBE_MAX_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
577
|
+
function createSessionProbeBudget() {
|
|
578
|
+
return {
|
|
579
|
+
requestsRemaining: MCP_SESSION_PROBE_MAX_REQUESTS,
|
|
580
|
+
bytesRemaining: MCP_SESSION_PROBE_MAX_TOTAL_BYTES,
|
|
581
|
+
deadlineAt: Date.now() + MCP_SESSION_PROBE_WALK_TIMEOUT_MS
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
function budgetExhausted(budget) {
|
|
585
|
+
return budget.requestsRemaining <= 0 || budget.bytesRemaining <= 0 || Date.now() >= budget.deadlineAt;
|
|
586
|
+
}
|
|
587
|
+
const MCP_SESSION_PROBE_MAX_RESPONSE_BYTES = 4 * 1024 * 1024;
|
|
588
|
+
const CAPTURE_CEILINGS = {
|
|
589
|
+
maxCaptures: MCP_SESSION_PROBE_MAX_REQUESTS,
|
|
590
|
+
maxTotalBodyBytes: MCP_SESSION_PROBE_MAX_TOTAL_BYTES,
|
|
591
|
+
// Matched to this probe's own response cap. The recorder's 1 MiB default
|
|
592
|
+
// truncates mid-body and flags `bodyTruncated`, which for a 1-4 MiB reply
|
|
593
|
+
// the probe deliberately allows would hand the grader a body that is no
|
|
594
|
+
// longer parseable JSON — a legitimate large `list_creatives` page would
|
|
595
|
+
// read as a malformed response instead of an acceptance.
|
|
596
|
+
maxBodyBytes: MCP_SESSION_PROBE_MAX_RESPONSE_BYTES
|
|
597
|
+
};
|
|
598
|
+
async function runMcpSessionLifecycle(options) {
|
|
599
|
+
const { agentUrl, headers, toolName, allowPrivateIp, budget, fetchFn, signal, timeoutMs } = options;
|
|
600
|
+
let closeOnCapExceeded = () => {
|
|
601
|
+
};
|
|
602
|
+
const transportFetch = (0, import_rawResponseCapture.wrapFetchWithCapture)(
|
|
603
|
+
wrapProbeFetch(
|
|
604
|
+
(0, import_net.createAgentTransportFetch)(agentUrl, {
|
|
605
|
+
allowPrivateIp,
|
|
606
|
+
...fetchFn ? { trustedFetchFn: fetchFn } : {}
|
|
607
|
+
}),
|
|
608
|
+
{
|
|
609
|
+
maxResponseBytes: MCP_SESSION_PROBE_MAX_RESPONSE_BYTES,
|
|
610
|
+
budget,
|
|
611
|
+
...timeoutMs !== void 0 ? { timeoutMs } : {},
|
|
612
|
+
...signal ? { signal } : {},
|
|
613
|
+
onCapExceeded: () => closeOnCapExceeded()
|
|
614
|
+
}
|
|
615
|
+
)
|
|
616
|
+
);
|
|
617
|
+
const client = new import_client.Client(SESSION_PROBE_CLIENT_INFO, { capabilities: {} });
|
|
618
|
+
const transport = new import_streamableHttp.StreamableHTTPClientTransport(new URL(agentUrl), {
|
|
619
|
+
requestInit: {
|
|
620
|
+
headers,
|
|
621
|
+
redirect: "manual",
|
|
622
|
+
// Run cancellation reaches the socket, not just the SDK's request timer.
|
|
623
|
+
...signal ? { signal } : {}
|
|
624
|
+
},
|
|
625
|
+
fetch: transportFetch,
|
|
626
|
+
// A conformance probe never wants a resumed stream: an agent answering
|
|
627
|
+
// `retry: 0` would otherwise have the SDK reconnect in a tight loop.
|
|
628
|
+
reconnectionOptions: NO_RECONNECTION
|
|
629
|
+
});
|
|
630
|
+
closeOnCapExceeded = () => void transport.close().catch(() => {
|
|
631
|
+
});
|
|
632
|
+
const requestOptions = {
|
|
633
|
+
...signal ? { signal } : {},
|
|
634
|
+
...timeoutMs !== void 0 ? { timeout: timeoutMs } : {}
|
|
635
|
+
};
|
|
636
|
+
let captures = [];
|
|
637
|
+
let capturesOverflowed;
|
|
638
|
+
let thrown;
|
|
639
|
+
let toolResult;
|
|
640
|
+
try {
|
|
641
|
+
const run = await (0, import_rawResponseCapture.withRawResponseCapture)(async () => {
|
|
642
|
+
try {
|
|
643
|
+
await client.connect(transport, requestOptions);
|
|
644
|
+
return await client.callTool({ name: toolName, arguments: {} }, void 0, requestOptions);
|
|
645
|
+
} finally {
|
|
646
|
+
await client.close().catch(() => {
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
}, CAPTURE_CEILINGS);
|
|
650
|
+
captures = run.captures;
|
|
651
|
+
capturesOverflowed = run.overflowed;
|
|
652
|
+
toolResult = run.result;
|
|
653
|
+
} catch (err) {
|
|
654
|
+
thrown = err;
|
|
655
|
+
captures = (0, import_rawResponseCapture.getCapturesFromError)(err) ?? [];
|
|
656
|
+
capturesOverflowed = (0, import_rawResponseCapture.getCaptureOverflowFromError)(err);
|
|
657
|
+
}
|
|
658
|
+
const issuedSessionId = transport.sessionId ?? sessionIdFromCaptures(captures);
|
|
659
|
+
if (issuedSessionId !== void 0) {
|
|
660
|
+
const terminator = new import_streamableHttp.StreamableHTTPClientTransport(new URL(agentUrl), {
|
|
661
|
+
requestInit: { headers, redirect: "manual" },
|
|
662
|
+
fetch: wrapProbeFetch(
|
|
663
|
+
(0, import_net.createAgentTransportFetch)(agentUrl, {
|
|
664
|
+
allowPrivateIp,
|
|
665
|
+
...fetchFn ? { trustedFetchFn: fetchFn } : {}
|
|
666
|
+
}),
|
|
667
|
+
{
|
|
668
|
+
maxResponseBytes: MCP_SESSION_PROBE_MAX_RESPONSE_BYTES,
|
|
669
|
+
// Teardown gets its own small budget, not the probe's: an exhausted
|
|
670
|
+
// walk must still be able to close the session it opened.
|
|
671
|
+
budget: {
|
|
672
|
+
requestsRemaining: 2,
|
|
673
|
+
bytesRemaining: MCP_SESSION_PROBE_MAX_TOTAL_BYTES,
|
|
674
|
+
deadlineAt: Date.now() + SESSION_TERMINATION_TIMEOUT_MS
|
|
675
|
+
},
|
|
676
|
+
timeoutMs: SESSION_TERMINATION_TIMEOUT_MS
|
|
677
|
+
}
|
|
678
|
+
),
|
|
679
|
+
sessionId: issuedSessionId,
|
|
680
|
+
reconnectionOptions: NO_RECONNECTION
|
|
681
|
+
});
|
|
682
|
+
const negotiated = transport.protocolVersion ?? negotiatedVersionFromCaptures(captures);
|
|
683
|
+
if (negotiated !== void 0) terminator.setProtocolVersion(negotiated);
|
|
684
|
+
await (0, import_session_termination.terminateSessionBestEffort)(terminator);
|
|
685
|
+
}
|
|
686
|
+
if (capturesOverflowed !== void 0) {
|
|
687
|
+
const detail2 = `capture ${capturesOverflowed} ceiling exceeded`;
|
|
688
|
+
return {
|
|
689
|
+
verdict: "unusable",
|
|
690
|
+
accepted: false,
|
|
691
|
+
stage: "initialize",
|
|
692
|
+
detail: detail2,
|
|
693
|
+
evidence: transportErrorEvidence(agentUrl, detail2)
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
const graded = gradedCapture(captures);
|
|
697
|
+
if (graded === void 0) {
|
|
698
|
+
const detail2 = thrown === void 0 ? "no HTTP exchange observed" : sdkRejectionDetail(thrown);
|
|
699
|
+
return {
|
|
700
|
+
verdict: "unusable",
|
|
701
|
+
accepted: false,
|
|
702
|
+
stage: "initialize",
|
|
703
|
+
detail: detail2,
|
|
704
|
+
evidence: transportErrorEvidence(agentUrl, detail2)
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
const stage = graded.requestJsonRpcMethod === "tools/call" ? "tools/call" : "initialize";
|
|
708
|
+
const evidence = httpProbeResultFromCapture(graded);
|
|
709
|
+
if (thrown === void 0) {
|
|
710
|
+
if (toolResult?.isError === true) {
|
|
711
|
+
const codes = adcpErrorCodesIn(toolResult);
|
|
712
|
+
const authCode = codes.find((code) => ADCP_AUTH_REJECTION_CODES.includes(code));
|
|
713
|
+
if (authCode !== void 0) {
|
|
714
|
+
return { verdict: "auth_rejected", accepted: false, stage, detail: `operation-level ${authCode}`, evidence };
|
|
715
|
+
}
|
|
716
|
+
if (codes.some((code) => ADCP_SCHEMA_REJECTION_CODES.includes(code))) {
|
|
717
|
+
return {
|
|
718
|
+
verdict: "schema_or_param",
|
|
719
|
+
accepted: false,
|
|
720
|
+
stage,
|
|
721
|
+
detail: "operation-level INVALID_REQUEST",
|
|
722
|
+
evidence
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
return {
|
|
726
|
+
verdict: "unusable",
|
|
727
|
+
accepted: false,
|
|
728
|
+
stage,
|
|
729
|
+
detail: "tool reported isError with no AdCP error code",
|
|
730
|
+
evidence
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
return { verdict: "accepted", accepted: true, stage, detail: `HTTP ${graded.status}`, evidence };
|
|
734
|
+
}
|
|
735
|
+
if (isUnsupportedProtocolVersion(thrown)) {
|
|
736
|
+
return {
|
|
737
|
+
verdict: "unusable",
|
|
738
|
+
accepted: false,
|
|
739
|
+
protocolIncompatible: true,
|
|
740
|
+
stage: "initialize",
|
|
741
|
+
detail: `agent negotiated a protocolVersion this SDK does not implement (supports ${import_types.SUPPORTED_PROTOCOL_VERSIONS.length} versions)`,
|
|
742
|
+
evidence
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
const detail = sdkRejectionDetail(thrown);
|
|
746
|
+
const bodyCodes = adcpErrorCodesIn(decodeCapturedBody(graded.body, findHeader(graded.headers, "content-type")));
|
|
747
|
+
const invalidParams = detail === `JSON-RPC error code ${import_types.ErrorCode.InvalidParams}`;
|
|
748
|
+
const schemaCode = bodyCodes.some((code) => ADCP_SCHEMA_REJECTION_CODES.includes(code));
|
|
749
|
+
if (invalidParams || schemaCode) {
|
|
750
|
+
return {
|
|
751
|
+
verdict: "schema_or_param",
|
|
752
|
+
accepted: false,
|
|
753
|
+
stage,
|
|
754
|
+
detail: invalidParams ? "JSON-RPC InvalidParams (-32602)" : "operation-level INVALID_REQUEST",
|
|
755
|
+
evidence
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
if (AUTH_REJECTION_STATUSES.has(graded.status)) {
|
|
759
|
+
return { verdict: "auth_rejected", accepted: false, stage, detail: `HTTP ${graded.status}`, evidence };
|
|
760
|
+
}
|
|
761
|
+
if (graded.status === 400) {
|
|
762
|
+
if (fourHundredIsAuthRejection(evidence, bodyCodes)) {
|
|
763
|
+
return { verdict: "auth_rejected", accepted: false, stage, detail: "HTTP 400 with an auth challenge", evidence };
|
|
764
|
+
}
|
|
765
|
+
return {
|
|
766
|
+
verdict: "schema_or_param",
|
|
767
|
+
accepted: false,
|
|
768
|
+
stage,
|
|
769
|
+
detail: "HTTP 400 with no authentication evidence",
|
|
770
|
+
evidence
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
if (graded.status >= 400) {
|
|
774
|
+
return { verdict: "unusable", accepted: false, stage, detail: `HTTP ${graded.status}`, evidence };
|
|
775
|
+
}
|
|
776
|
+
return { verdict: "unusable", accepted: false, stage, detail, evidence };
|
|
777
|
+
}
|
|
778
|
+
const CREDENTIAL_HEADER_NAMES = /* @__PURE__ */ new Set(["authorization", "x-adcp-auth", "x-api-key"]);
|
|
779
|
+
function sentCredentialValues(...headerSets) {
|
|
780
|
+
const values = /* @__PURE__ */ new Set();
|
|
781
|
+
const add = (value) => {
|
|
782
|
+
if (typeof value === "string" && value.length > 0) values.add(value);
|
|
783
|
+
};
|
|
784
|
+
for (const headers of headerSets) {
|
|
785
|
+
for (const [name, raw] of Object.entries(headers ?? {})) {
|
|
786
|
+
if (!CREDENTIAL_HEADER_NAMES.has(name.toLowerCase())) continue;
|
|
787
|
+
if (typeof raw !== "string" || raw.length === 0) continue;
|
|
788
|
+
add(raw);
|
|
789
|
+
const spaceAt = raw.indexOf(" ");
|
|
790
|
+
if (spaceAt <= 0) continue;
|
|
791
|
+
const scheme = raw.slice(0, spaceAt).toLowerCase();
|
|
792
|
+
const credential = raw.slice(spaceAt + 1);
|
|
793
|
+
add(credential);
|
|
794
|
+
if (scheme !== "basic") continue;
|
|
795
|
+
const decoded = decodeBase64Utf8(credential);
|
|
796
|
+
if (decoded === void 0) continue;
|
|
797
|
+
add(decoded);
|
|
798
|
+
const colonAt = decoded.indexOf(":");
|
|
799
|
+
if (colonAt >= 0) add(decoded.slice(colonAt + 1));
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
return [...values].filter((value) => value.trim().length > 0);
|
|
803
|
+
}
|
|
804
|
+
function decodeBase64Utf8(value) {
|
|
805
|
+
if (!/^[A-Za-z0-9+/]*={0,2}$/.test(value) || value.length === 0) return void 0;
|
|
806
|
+
try {
|
|
807
|
+
const decoded = Buffer.from(value, "base64").toString("utf8");
|
|
808
|
+
return decoded.includes("\uFFFD") ? void 0 : decoded;
|
|
809
|
+
} catch {
|
|
810
|
+
return void 0;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
function redactCredentialValuesInText(text, secrets) {
|
|
814
|
+
let out = text;
|
|
815
|
+
for (const secret of secrets) {
|
|
816
|
+
if (!secret) continue;
|
|
817
|
+
out = out.split(secret).join("[REDACTED_CREDENTIAL]");
|
|
818
|
+
}
|
|
819
|
+
return out;
|
|
820
|
+
}
|
|
821
|
+
function redactCredentialValuesDeep(value, secrets, depth = 0) {
|
|
822
|
+
if (secrets.length === 0) return value;
|
|
823
|
+
if (depth > MAX_REDACTION_DEPTH) return REDACTION_DEPTH_PLACEHOLDER;
|
|
824
|
+
if (typeof value === "string") return redactCredentialValuesInText(value, secrets);
|
|
825
|
+
if (Array.isArray(value)) {
|
|
826
|
+
const kept = value.slice(0, MAX_REDACTION_ENTRIES).map((entry) => redactCredentialValuesDeep(entry, secrets, depth + 1));
|
|
827
|
+
return value.length > MAX_REDACTION_ENTRIES ? [...kept, REDACTION_SIZE_PLACEHOLDER] : kept;
|
|
828
|
+
}
|
|
829
|
+
if (value !== null && typeof value === "object") {
|
|
830
|
+
const out = {};
|
|
831
|
+
const entries = Object.entries(value);
|
|
832
|
+
for (const [key, entry] of entries.slice(0, MAX_REDACTION_ENTRIES)) {
|
|
833
|
+
Object.defineProperty(out, redactCredentialValuesInText(key, secrets), {
|
|
834
|
+
value: redactCredentialValuesDeep(entry, secrets, depth + 1),
|
|
835
|
+
enumerable: true,
|
|
836
|
+
configurable: true,
|
|
837
|
+
writable: true
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
if (entries.length > MAX_REDACTION_ENTRIES) {
|
|
841
|
+
Object.defineProperty(out, "__redacted__", {
|
|
842
|
+
value: REDACTION_SIZE_PLACEHOLDER,
|
|
843
|
+
enumerable: true,
|
|
844
|
+
configurable: true,
|
|
845
|
+
writable: true
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
return out;
|
|
849
|
+
}
|
|
850
|
+
return value;
|
|
851
|
+
}
|
|
852
|
+
const MAX_REDACTION_DEPTH = 24;
|
|
853
|
+
const MAX_REDACTION_ENTRIES = 512;
|
|
854
|
+
const REDACTION_DEPTH_PLACEHOLDER = "[REDACTED_UNSCANNABLE_DEPTH]";
|
|
855
|
+
const REDACTION_SIZE_PLACEHOLDER = "[REDACTED_UNSCANNABLE_SIZE]";
|
|
856
|
+
function redactCredentialsFromEvidence(httpResult, secrets) {
|
|
857
|
+
if (secrets.length === 0) return httpResult;
|
|
858
|
+
const headers = {};
|
|
859
|
+
for (const [name, value] of Object.entries(httpResult.headers)) {
|
|
860
|
+
headers[name] = redactCredentialValuesInText(value, secrets);
|
|
861
|
+
}
|
|
862
|
+
return {
|
|
863
|
+
...httpResult,
|
|
864
|
+
headers,
|
|
865
|
+
body: redactCredentialValuesDeep(httpResult.body, secrets),
|
|
866
|
+
...httpResult.error !== void 0 ? { error: redactCredentialValuesInText(httpResult.error, secrets) } : {}
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
async function rawMcpSessionProbe(options) {
|
|
870
|
+
const { agentUrl, headers = {}, control, allowPrivateIp = false, fetchFn, signal, timeoutMs } = options;
|
|
871
|
+
const requested = typeof options.toolName === "string" ? [options.toolName] : [...options.toolName];
|
|
872
|
+
if (requested.length === 0) return noTargetProbe(agentUrl);
|
|
873
|
+
const candidates = requested.slice(0, MCP_SESSION_PROBE_MAX_CANDIDATES);
|
|
874
|
+
const budget = createSessionProbeBudget();
|
|
875
|
+
const base = { agentUrl, allowPrivateIp, budget, fetchFn, signal, timeoutMs };
|
|
876
|
+
let graded;
|
|
877
|
+
let toolName = candidates[0];
|
|
878
|
+
for (const candidate of candidates) {
|
|
879
|
+
toolName = candidate;
|
|
880
|
+
graded = await runMcpSessionLifecycle({ ...base, toolName: candidate, headers });
|
|
881
|
+
if (graded.verdict !== "schema_or_param") break;
|
|
882
|
+
if (budgetExhausted(budget)) break;
|
|
883
|
+
}
|
|
884
|
+
const lifecycle = { ...base, toolName };
|
|
885
|
+
const secrets = [
|
|
886
|
+
...sentCredentialValues(headers, control.kind === "credential" ? control.headers : void 0),
|
|
887
|
+
...(options.redactValues ?? []).filter((value) => value.trim().length > 0)
|
|
888
|
+
];
|
|
889
|
+
graded = { ...graded, evidence: redactCredentialsFromEvidence(graded.evidence, secrets) };
|
|
890
|
+
const conclusive = {
|
|
891
|
+
httpResult: graded.evidence,
|
|
892
|
+
taskResult: taskResultFromEvidence(graded),
|
|
893
|
+
stage: graded.stage,
|
|
894
|
+
detail: graded.detail,
|
|
895
|
+
gradedTool: toolName
|
|
896
|
+
};
|
|
897
|
+
if (control.kind === "probe_is_valid_credential") {
|
|
898
|
+
if (graded.verdict === "accepted") return conclusive;
|
|
899
|
+
if (graded.protocolIncompatible) return protocolIncompatibleProbe(graded, toolName);
|
|
900
|
+
if (graded.verdict === "schema_or_param") return schemaOrParamProbe(graded, toolName);
|
|
901
|
+
if (graded.verdict === "unusable") return malformedResponseProbe(graded, toolName);
|
|
902
|
+
return refusedSessionProbe(
|
|
903
|
+
graded,
|
|
904
|
+
`the run's valid credential was refused on the selected protected tool "${fenceAgentText(toolName)}" (rejected at ${graded.stage}: ${graded.detail}), so there is no successful protected call to certify`,
|
|
905
|
+
"Confirm the credential is current and that the agent accepts it on that tool.",
|
|
906
|
+
toolName
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
if (graded.verdict === "accepted") {
|
|
910
|
+
return refusedSessionProbe(
|
|
911
|
+
graded,
|
|
912
|
+
`the credential state under test received a successful payload from the protected tool "${fenceAgentText(toolName)}" (accepted at ${graded.stage}: ${graded.detail}), so the agent served tenant-scoped data to credentials it was expected to refuse`,
|
|
913
|
+
"Enforce credential validation on that tool before treating this path as conformant.",
|
|
914
|
+
toolName
|
|
915
|
+
);
|
|
916
|
+
}
|
|
917
|
+
if (graded.protocolIncompatible) return protocolIncompatibleProbe(graded, toolName);
|
|
918
|
+
if (graded.verdict === "schema_or_param") return schemaOrParamProbe(graded, toolName);
|
|
919
|
+
if (graded.verdict === "unusable") return malformedResponseProbe(graded, toolName);
|
|
920
|
+
if (control.kind === "unavailable") {
|
|
921
|
+
return inconclusiveSessionProbe(graded, control.reason, control.remedy, toolName);
|
|
922
|
+
}
|
|
923
|
+
const acceptance = await runMcpSessionLifecycle({ ...lifecycle, headers: control.headers });
|
|
924
|
+
if (acceptance.verdict === "accepted" || acceptance.verdict === "schema_or_param") return conclusive;
|
|
925
|
+
if (acceptance.protocolIncompatible) return protocolIncompatibleProbe(graded, toolName, acceptance);
|
|
926
|
+
if (acceptance.verdict === "auth_rejected") {
|
|
927
|
+
return inconclusiveSessionProbe(
|
|
928
|
+
graded,
|
|
929
|
+
`the run's valid credential was also refused on "${fenceAgentText(toolName)}" (rejected at ${acceptance.stage}: ${acceptance.detail})`,
|
|
930
|
+
"Check that the credential is current and that it is accepted on that tool.",
|
|
931
|
+
toolName
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
return inconclusiveSessionProbe(
|
|
935
|
+
graded,
|
|
936
|
+
`the control call on "${fenceAgentText(toolName)}" did not produce a usable answer (${acceptance.stage}: ${acceptance.detail})`,
|
|
937
|
+
"Check that the agent URL is reachable and that the tool answers a credentialed call.",
|
|
938
|
+
toolName
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
|
+
function noTargetProbe(agentUrl) {
|
|
942
|
+
const message = `MCP session probe could not run: no protected tool was supplied to grade, so nothing was learned about this agent's credentials. Pass at least one canonical AdCP read task as \`toolName\`.`;
|
|
943
|
+
const evidence = transportErrorEvidence(agentUrl, "no candidate target supplied");
|
|
944
|
+
return {
|
|
945
|
+
httpResult: { ...evidence, error: message },
|
|
946
|
+
taskResult: failedTaskResult(message),
|
|
947
|
+
stage: "initialize",
|
|
948
|
+
detail: "no candidate target supplied",
|
|
949
|
+
gradedTool: ""
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
function taskResultFromEvidence(graded) {
|
|
953
|
+
if (graded.accepted) {
|
|
954
|
+
return { success: true, data: graded.evidence.body, _extraction_path: "structured_content" };
|
|
955
|
+
}
|
|
956
|
+
return { success: false, data: void 0, error: graded.detail, _extraction_path: "error" };
|
|
957
|
+
}
|
|
958
|
+
function protocolIncompatibleProbe(graded, gradedTool, attempt = graded) {
|
|
959
|
+
return sessionProbeError(
|
|
960
|
+
graded,
|
|
961
|
+
`MCP session probe could not run: ${attempt.detail} at ${attempt.stage}. This is a protocol compatibility problem, not an authentication result \u2014 nothing was learned about this agent's credentials. Upgrade the SDK to one that implements the agent's MCP wire version, then re-run.`,
|
|
962
|
+
gradedTool
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
function schemaOrParamProbe(graded, toolName) {
|
|
966
|
+
return sessionProbeError(
|
|
967
|
+
graded,
|
|
968
|
+
`MCP session auth probe is inconclusive: the agent refused the shape of the call to "${fenceAgentText(toolName)}" (${graded.detail}) rather than answering it, so nothing was learned about this agent's credentials. Advertise one auth-required, read-only tool that accepts an empty request body (${PROBE_TASK_ALLOWLIST_HINT}) so the probe has a parameter-free protected target.`,
|
|
969
|
+
toolName
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
function malformedResponseProbe(graded, gradedTool) {
|
|
973
|
+
if (graded.detail === "request timed out" || graded.detail === "request aborted") {
|
|
974
|
+
return sessionProbeError(
|
|
975
|
+
graded,
|
|
976
|
+
`MCP session probe could not run: the agent answered ${graded.stage} with HTTP ${graded.evidence.status} but never delivered a usable response to that request (${graded.detail}). This is not an authentication result \u2014 nothing was learned about this agent's credentials.`,
|
|
977
|
+
gradedTool
|
|
978
|
+
);
|
|
979
|
+
}
|
|
980
|
+
return sessionProbeError(
|
|
981
|
+
graded,
|
|
982
|
+
`MCP session probe could not run: the agent answered ${graded.stage} with HTTP ${graded.evidence.status} but a body the official MCP client rejected (${graded.detail}). This is a response-shape problem, not an authentication result \u2014 nothing was learned about this agent's credentials. Return a conformant result for that operation, then re-run.`,
|
|
983
|
+
gradedTool
|
|
984
|
+
);
|
|
985
|
+
}
|
|
986
|
+
function inconclusiveSessionProbe(graded, reason, remedy, gradedTool) {
|
|
987
|
+
return sessionProbeError(
|
|
988
|
+
graded,
|
|
989
|
+
`MCP session auth probe is inconclusive: ${reason}, so this step's response is not evidence that the agent validates credentials. ${remedy}`,
|
|
990
|
+
gradedTool
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
function refusedSessionProbe(graded, reason, remedy, gradedTool) {
|
|
994
|
+
return sessionProbeError(
|
|
995
|
+
graded,
|
|
996
|
+
`MCP session auth probe refuses this as auth evidence: ${reason}. ${remedy}`,
|
|
997
|
+
gradedTool
|
|
998
|
+
);
|
|
999
|
+
}
|
|
1000
|
+
function sessionProbeError(graded, message, gradedTool) {
|
|
1001
|
+
return {
|
|
1002
|
+
httpResult: { ...graded.evidence, error: message },
|
|
1003
|
+
taskResult: failedTaskResult(message),
|
|
1004
|
+
stage: graded.stage,
|
|
1005
|
+
detail: graded.detail,
|
|
1006
|
+
gradedTool
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
339
1009
|
async function rawA2aProbe(options) {
|
|
340
1010
|
const { agentUrl, method, params, headers = {}, allowPrivateIp = false } = options;
|
|
341
1011
|
const body = JSON.stringify({
|
|
@@ -346,7 +1016,7 @@ async function rawA2aProbe(options) {
|
|
|
346
1016
|
});
|
|
347
1017
|
const httpResult = { url: agentUrl, status: 0, headers: {}, body: null };
|
|
348
1018
|
try {
|
|
349
|
-
const res = await (0,
|
|
1019
|
+
const res = await (0, import_net2.ssrfSafeFetch)(agentUrl, {
|
|
350
1020
|
method: "POST",
|
|
351
1021
|
headers: {
|
|
352
1022
|
"content-type": "application/json",
|
|
@@ -407,12 +1077,13 @@ async function rawA2aProbe(options) {
|
|
|
407
1077
|
return { httpResult };
|
|
408
1078
|
}
|
|
409
1079
|
}
|
|
410
|
-
const isAlwaysBlocked =
|
|
411
|
-
const isPrivateIp =
|
|
1080
|
+
const isAlwaysBlocked = import_net2.isAlwaysBlocked;
|
|
1081
|
+
const isPrivateIp = import_net2.isPrivateIp;
|
|
412
1082
|
// Annotate the CommonJS export names for ESM import in node:
|
|
413
1083
|
0 && (module.exports = {
|
|
414
1084
|
PROBE_TASKS,
|
|
415
1085
|
SsrfRefusedError,
|
|
1086
|
+
__probeFetchWithBudgetForTest,
|
|
416
1087
|
fetchProbe,
|
|
417
1088
|
generateRandomInvalidApiKey,
|
|
418
1089
|
generateRandomInvalidJwt,
|
|
@@ -421,5 +1092,6 @@ const isPrivateIp = import_net.isPrivateIp;
|
|
|
421
1092
|
probeOauthAuthServerMetadata,
|
|
422
1093
|
probeProtectedResourceMetadata,
|
|
423
1094
|
rawA2aProbe,
|
|
424
|
-
rawMcpProbe
|
|
1095
|
+
rawMcpProbe,
|
|
1096
|
+
rawMcpSessionProbe
|
|
425
1097
|
});
|