@adcp/sdk 16.0.0-beta.8 → 16.0.0
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/AGENTS.md +3 -3
- package/README.md +5 -2
- package/bin/adcp.js +10 -13
- package/dist/lib/core/AgentClient.d.mts +8 -5
- package/dist/lib/core/AgentClient.d.ts +8 -5
- package/dist/lib/core/AgentClient.js +9 -4
- package/dist/lib/core/AgentClient.mjs +9 -4
- package/dist/lib/core/SingleAgentClient.d.mts +19 -112
- package/dist/lib/core/SingleAgentClient.d.ts +19 -112
- package/dist/lib/core/SingleAgentClient.js +270 -252
- package/dist/lib/core/SingleAgentClient.mjs +275 -253
- package/dist/lib/core/TaskExecutor.d.mts +1 -16
- package/dist/lib/core/TaskExecutor.d.ts +1 -16
- package/dist/lib/core/TaskExecutor.js +34 -51
- package/dist/lib/core/TaskExecutor.mjs +12 -29
- package/dist/lib/core/product-cache.d.mts +3 -1
- package/dist/lib/core/product-cache.d.ts +3 -1
- package/dist/lib/core/product-cache.js +2 -1
- package/dist/lib/core/product-cache.mjs +2 -1
- package/dist/lib/errors/index.d.mts +2 -8
- package/dist/lib/errors/index.d.ts +2 -8
- package/dist/lib/errors/index.js +4 -4
- package/dist/lib/errors/index.mjs +4 -4
- package/dist/lib/identity-3.3/revocation.js +6 -7
- package/dist/lib/identity-3.3/revocation.mjs +6 -7
- package/dist/lib/index.d.mts +4 -4
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +0 -14
- package/dist/lib/index.mjs +0 -14
- package/dist/lib/media-buy/compatibility.d.mts +1 -1
- package/dist/lib/media-buy/compatibility.d.ts +1 -1
- package/dist/lib/media-buy/compatibility.js +26 -45
- package/dist/lib/media-buy/compatibility.mjs +26 -45
- package/dist/lib/media-buy/legacy-purchase-continuation.d.mts +2 -2
- package/dist/lib/media-buy/legacy-purchase-continuation.d.ts +2 -2
- package/dist/lib/protocols/index.js +14 -22
- package/dist/lib/protocols/index.mjs +5 -13
- package/dist/lib/registry/types.d.mts +3 -2
- package/dist/lib/registry/types.d.ts +3 -2
- package/dist/lib/registry/types.generated.d.mts +51 -11
- package/dist/lib/registry/types.generated.d.ts +51 -11
- package/dist/lib/reporting/source/conformance.d.mts +8 -8
- package/dist/lib/reporting/source/conformance.d.ts +8 -8
- package/dist/lib/reporting/source/manifest.d.mts +27 -27
- package/dist/lib/reporting/source/manifest.d.ts +27 -27
- package/dist/lib/server/create-adcp-server.js +7 -1
- package/dist/lib/server/create-adcp-server.mjs +7 -1
- package/dist/lib/signing/crypto.d.mts +1 -1
- package/dist/lib/signing/crypto.d.ts +1 -1
- package/dist/lib/signing/crypto.js +2 -45
- package/dist/lib/signing/crypto.mjs +2 -46
- package/dist/lib/signing/web-bot-auth.d.mts +18 -10
- package/dist/lib/signing/web-bot-auth.d.ts +18 -10
- package/dist/lib/signing/web-bot-auth.js +29 -24
- package/dist/lib/signing/web-bot-auth.mjs +29 -24
- package/dist/lib/testing/compliance/comply.js +0 -8
- package/dist/lib/testing/compliance/comply.mjs +0 -8
- package/dist/lib/testing/compliance/storyboard-tracks.js +11 -0
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +11 -0
- package/dist/lib/testing/index.d.mts +2 -0
- package/dist/lib/testing/index.d.ts +2 -0
- package/dist/lib/testing/index.js +5 -0
- package/dist/lib/testing/index.mjs +3 -0
- package/dist/lib/testing/scenarios/capabilities.d.mts +2 -2
- package/dist/lib/testing/scenarios/capabilities.d.ts +2 -2
- package/dist/lib/testing/scenarios/capabilities.js +8 -41
- package/dist/lib/testing/scenarios/capabilities.mjs +9 -42
- package/dist/lib/testing/storyboard/creative-build-probe.d.mts +34 -0
- package/dist/lib/testing/storyboard/creative-build-probe.d.ts +34 -0
- package/dist/lib/testing/storyboard/creative-build-probe.js +395 -0
- package/dist/lib/testing/storyboard/creative-build-probe.mjs +373 -0
- package/dist/lib/testing/storyboard/index.d.mts +2 -0
- package/dist/lib/testing/storyboard/index.d.ts +2 -0
- package/dist/lib/testing/storyboard/index.js +5 -0
- package/dist/lib/testing/storyboard/index.mjs +3 -0
- package/dist/lib/testing/storyboard/loader.js +12 -0
- package/dist/lib/testing/storyboard/loader.mjs +12 -0
- package/dist/lib/testing/storyboard/property-list-reference.d.mts +15 -0
- package/dist/lib/testing/storyboard/property-list-reference.d.ts +15 -0
- package/dist/lib/testing/storyboard/property-list-reference.js +514 -0
- package/dist/lib/testing/storyboard/property-list-reference.mjs +487 -0
- package/dist/lib/testing/storyboard/runner.js +318 -58
- package/dist/lib/testing/storyboard/runner.mjs +322 -58
- package/dist/lib/testing/storyboard/types.d.mts +38 -16
- package/dist/lib/testing/storyboard/types.d.ts +38 -16
- package/dist/lib/testing/storyboard/types.js +1 -0
- package/dist/lib/testing/storyboard/types.mjs +1 -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 +64 -0
- package/dist/lib/testing/storyboard/validations.mjs +67 -1
- package/dist/lib/testing/types.d.mts +15 -1
- package/dist/lib/testing/types.d.ts +15 -1
- package/dist/lib/types/schemas.generated.d.ts +65 -65
- package/dist/lib/types/wellknown-schemas.generated.d.mts +21 -21
- package/dist/lib/types/wellknown-schemas.generated.d.ts +21 -21
- package/dist/lib/utils/adcp-version-config.js +6 -0
- package/dist/lib/utils/adcp-version-config.mjs +6 -0
- package/dist/lib/utils/capabilities.d.mts +7 -9
- package/dist/lib/utils/capabilities.d.ts +7 -9
- package/dist/lib/utils/capabilities.js +14 -28
- package/dist/lib/utils/capabilities.mjs +14 -27
- package/dist/lib/utils/creative-adapter.d.mts +15 -113
- package/dist/lib/utils/creative-adapter.d.ts +15 -113
- package/dist/lib/utils/creative-adapter.js +7 -106
- package/dist/lib/utils/creative-adapter.mjs +7 -102
- package/dist/lib/utils/format-renders.d.mts +20 -80
- package/dist/lib/utils/format-renders.d.ts +20 -80
- package/dist/lib/utils/format-renders.js +7 -67
- package/dist/lib/utils/format-renders.mjs +7 -66
- package/dist/lib/utils/index.d.mts +1 -2
- package/dist/lib/utils/index.d.ts +1 -2
- package/dist/lib/utils/index.js +0 -7
- package/dist/lib/utils/index.mjs +0 -6
- package/dist/lib/utils/preview-normalizer.d.mts +31 -80
- package/dist/lib/utils/preview-normalizer.d.ts +31 -80
- package/dist/lib/utils/preview-normalizer.js +5 -50
- package/dist/lib/utils/preview-normalizer.mjs +5 -49
- package/dist/lib/utils/pricing-adapter.d.mts +2 -36
- package/dist/lib/utils/pricing-adapter.d.ts +2 -36
- package/dist/lib/utils/pricing-adapter.js +0 -105
- package/dist/lib/utils/pricing-adapter.mjs +0 -100
- package/dist/lib/utils/request-normalizer.d.mts +1 -2
- package/dist/lib/utils/request-normalizer.d.ts +1 -2
- package/dist/lib/v2/projection/catalog.d.mts +4 -0
- package/dist/lib/v2/projection/catalog.d.ts +4 -0
- package/dist/lib/v2/projection/creative-delivery.d.mts +17 -9
- package/dist/lib/v2/projection/creative-delivery.d.ts +17 -9
- package/dist/lib/v2/projection/creative-delivery.js +78 -10
- package/dist/lib/v2/projection/creative-delivery.mjs +77 -10
- package/dist/lib/v2/projection/legacy-metadata.d.mts +12 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts +12 -0
- package/dist/lib/v2/projection/legacy-metadata.js +41 -1
- package/dist/lib/v2/projection/legacy-metadata.mjs +37 -1
- package/dist/lib/v2/projection/legacy-normalization.d.mts +1 -1
- package/dist/lib/v2/projection/legacy-normalization.d.ts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +13 -0
- package/dist/lib/v2/projection/v1-to-v2.mjs +14 -0
- package/dist/lib/validation/client-hooks.d.mts +1 -4
- package/dist/lib/validation/client-hooks.d.ts +1 -4
- package/dist/lib/validation/get-products-request.d.mts +1 -1
- package/dist/lib/validation/get-products-request.d.ts +1 -1
- package/dist/lib/validation/schema-loader.js +6 -0
- package/dist/lib/validation/schema-loader.mjs +6 -0
- package/dist/lib/validation/schema-validator.js +1 -26
- package/dist/lib/validation/schema-validator.mjs +1 -26
- package/dist/lib/version.d.mts +5 -5
- package/dist/lib/version.d.ts +5 -5
- package/dist/lib/version.js +3 -5
- package/dist/lib/version.mjs +3 -5
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/development/PROTOCOL_DIFFERENCES.md +1 -1
- package/docs/guides/CONFORMANCE.md +25 -0
- package/docs/guides/CREATIVE-BUILD-PROBE.md +156 -0
- package/docs/guides/CREATIVE-DELIVERY.md +63 -7
- package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +15 -18
- package/docs/guides/REPORTING-STABILITY.md +7 -7
- package/docs/guides/VALIDATE-YOUR-AGENT.md +5 -0
- package/docs/llms.txt +3 -3
- package/docs/migration-13-to-14.md +20 -16
- package/docs/migration-14.x-rc-worksheet.md +5 -5
- package/docs/migration-4.x-to-5.x.md +12 -7
- package/docs/migration-agent-identity-3.3.md +44 -19
- package/docs/migration-drop-adcp-2.md +25 -0
- package/docs/migration-reporting-storage-package.md +3 -3
- package/docs/releases/16.0.0.md +20 -0
- package/package.json +3 -18
- package/skills/call-adcp-agent/SKILL.md +23 -25
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/get_products.d.mts +0 -8
- package/dist/lib/adapters/legacy/v2-5/get_products.d.ts +0 -8
- package/dist/lib/adapters/legacy/v2-5/get_products.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/get_products.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/index.d.mts +0 -34
- package/dist/lib/adapters/legacy/v2-5/index.d.ts +0 -34
- package/dist/lib/adapters/legacy/v2-5/index.js +0 -50
- package/dist/lib/adapters/legacy/v2-5/index.mjs +0 -25
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.mts +0 -8
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts +0 -8
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/preview_creative.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/preview_creative.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.mts +0 -11
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +0 -11
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js +0 -32
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs +0 -8
- package/dist/lib/adapters/legacy/v2-5/types.d.mts +0 -39
- package/dist/lib/adapters/legacy/v2-5/types.d.ts +0 -39
- package/dist/lib/adapters/legacy/v2-5/types.js +0 -16
- package/dist/lib/adapters/legacy/v2-5/types.mjs +0 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.js +0 -35
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.mjs +0 -11
- package/dist/lib/schemas-data/v2.5/_provenance.json +0 -8
- package/dist/lib/schemas-data/v2.5/adagents.json +0 -494
- package/dist/lib/schemas-data/v2.5/core/activation-key.json +0 -50
- package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +0 -32
- package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +0 -87
- package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +0 -38
- package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +0 -31
- package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +0 -26
- package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +0 -87
- package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +0 -44
- package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +0 -71
- package/dist/lib/schemas-data/v2.5/core/async-response-data.json +0 -88
- package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +0 -33
- package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +0 -409
- package/dist/lib/schemas-data/v2.5/core/context.json +0 -8
- package/dist/lib/schemas-data/v2.5/core/creative-asset.json +0 -125
- package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +0 -31
- package/dist/lib/schemas-data/v2.5/core/creative-filters.json +0 -111
- package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +0 -72
- package/dist/lib/schemas-data/v2.5/core/creative-policy.json +0 -27
- package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +0 -171
- package/dist/lib/schemas-data/v2.5/core/deployment.json +0 -93
- package/dist/lib/schemas-data/v2.5/core/destination.json +0 -53
- package/dist/lib/schemas-data/v2.5/core/error.json +0 -40
- package/dist/lib/schemas-data/v2.5/core/ext.json +0 -8
- package/dist/lib/schemas-data/v2.5/core/format-id.json +0 -47
- package/dist/lib/schemas-data/v2.5/core/format.json +0 -324
- package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +0 -18
- package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +0 -152
- package/dist/lib/schemas-data/v2.5/core/measurement.json +0 -48
- package/dist/lib/schemas-data/v2.5/core/media-buy.json +0 -62
- package/dist/lib/schemas-data/v2.5/core/package.json +0 -72
- package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +0 -90
- package/dist/lib/schemas-data/v2.5/core/placement.json +0 -34
- package/dist/lib/schemas-data/v2.5/core/pricing-option.json +0 -35
- package/dist/lib/schemas-data/v2.5/core/product-filters.json +0 -102
- package/dist/lib/schemas-data/v2.5/core/product.json +0 -153
- package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +0 -115
- package/dist/lib/schemas-data/v2.5/core/promoted-products.json +0 -67
- package/dist/lib/schemas-data/v2.5/core/property-id.json +0 -14
- package/dist/lib/schemas-data/v2.5/core/property-tag.json +0 -16
- package/dist/lib/schemas-data/v2.5/core/property.json +0 -62
- package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +0 -146
- package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +0 -92
- package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +0 -48
- package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +0 -71
- package/dist/lib/schemas-data/v2.5/core/response.json +0 -24
- package/dist/lib/schemas-data/v2.5/core/signal-filters.json +0 -35
- package/dist/lib/schemas-data/v2.5/core/start-timing.json +0 -18
- package/dist/lib/schemas-data/v2.5/core/sub-asset.json +0 -79
- package/dist/lib/schemas-data/v2.5/core/targeting.json +0 -50
- package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +0 -43
- package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +0 -166
- package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +0 -192
- package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +0 -183
- package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +0 -101
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +0 -73
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +0 -61
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +0 -164
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +0 -245
- package/dist/lib/schemas-data/v2.5/creative/preview-render.json +0 -225
- package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +0 -22
- package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/available-metric.json +0 -18
- package/dist/lib/schemas-data/v2.5/enums/channels.json +0 -18
- package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/creative-action.json +0 -14
- package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +0 -15
- package/dist/lib/schemas-data/v2.5/enums/creative-status.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +0 -20
- package/dist/lib/schemas-data/v2.5/enums/daast-version.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +0 -15
- package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/feed-format.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/format-category.json +0 -16
- package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/http-method.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +0 -34
- package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/metric-type.json +0 -17
- package/dist/lib/schemas-data/v2.5/enums/notification-type.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/pacing.json +0 -17
- package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +0 -25
- package/dist/lib/schemas-data/v2.5/enums/property-type.json +0 -16
- package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +0 -103
- package/dist/lib/schemas-data/v2.5/enums/task-status.json +0 -29
- package/dist/lib/schemas-data/v2.5/enums/task-type.json +0 -27
- package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +0 -25
- package/dist/lib/schemas-data/v2.5/enums/vast-version.json +0 -14
- package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +0 -12
- package/dist/lib/schemas-data/v2.5/index.json +0 -604
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +0 -31
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +0 -65
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +0 -31
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +0 -36
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +0 -126
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +0 -97
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +0 -54
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +0 -285
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +0 -38
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +0 -21
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +0 -34
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +0 -28
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +0 -33
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +0 -26
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +0 -70
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +0 -58
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +0 -61
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +0 -137
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +0 -437
- package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +0 -80
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +0 -88
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +0 -66
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +0 -25
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +0 -46
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +0 -178
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +0 -149
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +0 -24
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +0 -36
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +0 -129
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +0 -99
- package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +0 -81
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +0 -73
- package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +0 -88
- package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +0 -93
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +0 -81
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +0 -33
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +0 -32
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +0 -68
- package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +0 -59
- package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +0 -100
- package/dist/lib/types/v2-5/index.d.mts +0 -1
- package/dist/lib/types/v2-5/index.d.ts +0 -1
- package/dist/lib/types/v2-5/index.js +0 -22
- package/dist/lib/types/v2-5/index.mjs +0 -1
- package/dist/lib/types/v2-5/tools.generated.d.mts +0 -3568
- package/dist/lib/types/v2-5/tools.generated.d.ts +0 -3568
- package/dist/lib/types/v2-5/tools.generated.js +0 -16
- package/dist/lib/types/v2-5/tools.generated.mjs +0 -0
- package/dist/lib/utils/sync-creatives-adapter.d.mts +0 -33
- package/dist/lib/utils/sync-creatives-adapter.d.ts +0 -33
- package/dist/lib/utils/sync-creatives-adapter.js +0 -83
- package/dist/lib/utils/sync-creatives-adapter.mjs +0 -59
|
@@ -70,8 +70,9 @@ const WEB_BOT_AUTH_PROFILE = "web-bot-auth";
|
|
|
70
70
|
const WEB_BOT_AUTH_DRAFT_REVISION = "draft-ietf-webbotauth-httpsig-protocol-00";
|
|
71
71
|
const SIGNATURE_DIRECTORY_PATH = "/.well-known/http-message-signatures-directory";
|
|
72
72
|
const SIGNATURE_DIRECTORY_MEDIA_TYPE = "application/http-message-signatures-directory+json";
|
|
73
|
-
const WEB_BOT_AUTH_ALGORITHMS = Object.freeze(["ed25519"
|
|
73
|
+
const WEB_BOT_AUTH_ALGORITHMS = Object.freeze(["ed25519"]);
|
|
74
74
|
const DIRECTORY_TAG = "http-message-signatures-directory";
|
|
75
|
+
const PRIVATE_JWK_MEMBERS = /* @__PURE__ */ new Set(["d", "p", "q", "dp", "dq", "qi", "oth", "k"]);
|
|
75
76
|
const CLOCK_SKEW_SECONDS = 60;
|
|
76
77
|
const MAX_LIFETIME_SECONDS = 300;
|
|
77
78
|
const REQUIRED_PARAMETERS = ["created", "expires", "nonce", "keyid", "alg", "tag"];
|
|
@@ -182,26 +183,29 @@ function jwkThumbprint(jwk) {
|
|
|
182
183
|
else return denied("unsupported_key");
|
|
183
184
|
return (0, import_crypto.createHash)("sha256").update(JSON.stringify(fields)).digest("base64url");
|
|
184
185
|
}
|
|
186
|
+
function keyAlgorithm(jwk) {
|
|
187
|
+
return jwk.kty === "OKP" && jwk.crv === "Ed25519" ? "ed25519" : void 0;
|
|
188
|
+
}
|
|
185
189
|
function algorithm(jwk) {
|
|
186
|
-
|
|
187
|
-
if (jwk.kty === "RSA" && typeof jwk.n === "string" && jwk.e === "AQAB") {
|
|
188
|
-
const bytes = Buffer.from(jwk.n, "base64url").length;
|
|
189
|
-
if (bytes >= 256 && bytes <= 512) return "rsa-pss-sha512";
|
|
190
|
-
}
|
|
191
|
-
return denied("unsupported_key");
|
|
190
|
+
return keyAlgorithm(jwk) ?? denied("unsupported_key");
|
|
192
191
|
}
|
|
193
192
|
function signingAlgorithm(jwk) {
|
|
194
193
|
try {
|
|
195
194
|
return algorithm(jwk);
|
|
196
195
|
} catch {
|
|
197
|
-
throw new TypeError(
|
|
198
|
-
"Web Bot Auth signs with Ed25519 or RSA-PSS-SHA512 (2048-4096 bit, e=65537) keys only; ES256 remains on the AdCP RFC 9421 profile"
|
|
199
|
-
);
|
|
196
|
+
throw new TypeError("Web Bot Auth signs with Ed25519 keys only; ES256 remains on the AdCP RFC 9421 profile");
|
|
200
197
|
}
|
|
201
198
|
}
|
|
202
199
|
function assertWebBotAuthSigningKey(key) {
|
|
203
200
|
signingAlgorithm("privateKey" in key ? key.privateKey : key.publicKey);
|
|
204
201
|
}
|
|
202
|
+
function signingOrigin(value) {
|
|
203
|
+
try {
|
|
204
|
+
return receivedAgentOrigin((0, import_canonicalize.canonicalAgentOrigin)(value));
|
|
205
|
+
} catch {
|
|
206
|
+
throw new TypeError("Web Bot Auth signs as an https origin only (WBA section 5.2.1)");
|
|
207
|
+
}
|
|
208
|
+
}
|
|
205
209
|
function inputs(headers, limit) {
|
|
206
210
|
const members = dictionary((0, import_canonicalize2.getHeaderValue)(headers, "signature-input"), "Signature-Input");
|
|
207
211
|
if (members.size > limit) bad("signature_input");
|
|
@@ -214,6 +218,7 @@ function inputs(headers, limit) {
|
|
|
214
218
|
});
|
|
215
219
|
}
|
|
216
220
|
function receivedAgentOrigin(value) {
|
|
221
|
+
if (!value.startsWith("https://")) return denied("agent_origin");
|
|
217
222
|
try {
|
|
218
223
|
(0, import_select_agent.canonicalAgentUrl)(value);
|
|
219
224
|
const origin = (0, import_canonicalize.canonicalAgentOrigin)(value);
|
|
@@ -436,8 +441,10 @@ async function verifyWebBotAuth(request, options) {
|
|
|
436
441
|
if (!(member2[0] instanceof ArrayBuffer) || member2[1].size !== 0) bad("signature");
|
|
437
442
|
for (const member2 of agents?.values() ?? []) if (typeof member2[0] !== "string") bad("signature_agent");
|
|
438
443
|
if (!inputMembers || !signatureMembers) return denied("headers_missing");
|
|
439
|
-
|
|
440
|
-
|
|
444
|
+
const tagged = [...inputMembers].filter(([, member2]) => member2[1].get("tag") === WEB_BOT_AUTH_PROFILE);
|
|
445
|
+
if (tagged.length === 0) denied("profile");
|
|
446
|
+
if (tagged.length > 1) denied("signature_count");
|
|
447
|
+
label = tagged[0][0];
|
|
441
448
|
if (!signatureMembers.has(label)) denied("signature_label");
|
|
442
449
|
try {
|
|
443
450
|
(0, import_parser.parseSignature)(signatureHeader, label, "rfc8941-base64");
|
|
@@ -450,7 +457,6 @@ async function verifyWebBotAuth(request, options) {
|
|
|
450
457
|
} catch {
|
|
451
458
|
return denied("parameters");
|
|
452
459
|
}
|
|
453
|
-
if (input.params.tag !== WEB_BOT_AUTH_PROFILE) denied("profile");
|
|
454
460
|
if (!agents || agents.size !== 1) denied(agents ? "agent_count" : "agent_missing");
|
|
455
461
|
const agentMember = `signature-agent;key="${label}"`;
|
|
456
462
|
const agentComponents = input.components.filter((c) => c.startsWith("signature-agent;"));
|
|
@@ -458,7 +464,7 @@ async function verifyWebBotAuth(request, options) {
|
|
|
458
464
|
const member = agents.get(label);
|
|
459
465
|
if (!member) denied("agent_not_covered");
|
|
460
466
|
const type = member[1].get("type");
|
|
461
|
-
if (type !== void 0 && type !== "directory") denied("agent_type");
|
|
467
|
+
if (type !== void 0 && String(type) !== "directory") denied("agent_type");
|
|
462
468
|
const origin = receivedAgentOrigin(member[0]);
|
|
463
469
|
const { created, expires, nonce, keyid, alg } = input.params;
|
|
464
470
|
if ([created, expires, nonce, keyid, alg].some((value) => value === void 0)) denied("parameters_missing");
|
|
@@ -582,11 +588,13 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
|
|
|
582
588
|
let expires = Infinity;
|
|
583
589
|
for (const raw of document.keys) {
|
|
584
590
|
if (!raw || typeof raw !== "object") denied("directory_key");
|
|
591
|
+
if (Object.keys(raw).some((k) => PRIVATE_JWK_MEMBERS.has(k.toLowerCase()) || k.startsWith("_private")))
|
|
592
|
+
denied("directory_key");
|
|
593
|
+
if (!keyAlgorithm(raw)) continue;
|
|
585
594
|
const thumbprint = jwkThumbprint(raw);
|
|
586
595
|
const key = { ...raw, kid: raw.kid ?? thumbprint };
|
|
587
|
-
if (key.kid !== thumbprint || kids.has(key.kid) || key.
|
|
596
|
+
if (key.kid !== thumbprint || kids.has(key.kid) || key.adcp_use !== void 0 || !testKeysAllowed(options.allowTestKeys) && TEST_KIDS.has(key.kid))
|
|
588
597
|
denied("directory_key");
|
|
589
|
-
algorithm(key);
|
|
590
598
|
kids.add(key.kid);
|
|
591
599
|
keys.push(key);
|
|
592
600
|
const proof = signatures.find((input) => input.params.keyid === key.kid && input.params.tag === DIRECTORY_TAG);
|
|
@@ -629,6 +637,7 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
|
|
|
629
637
|
);
|
|
630
638
|
expires = Math.min(expires, proof.params.expires);
|
|
631
639
|
}
|
|
640
|
+
if (!keys.length) denied("directory_keys");
|
|
632
641
|
return { keys, expires, signed: true, proof: response };
|
|
633
642
|
} catch (error) {
|
|
634
643
|
if (error instanceof WebBotAuthError) {
|
|
@@ -758,7 +767,7 @@ async function signWebBotAuth(request, key, options) {
|
|
|
758
767
|
throw new TypeError(
|
|
759
768
|
"Web Bot Auth relays were removed from the profile (adcp#7894): an intermediary signs as itself with one signature"
|
|
760
769
|
);
|
|
761
|
-
const origin = (
|
|
770
|
+
const origin = signingOrigin(options.origin);
|
|
762
771
|
const label = options.label ?? "sig1";
|
|
763
772
|
if (!/^[a-z][a-z0-9_.*-]*$/.test(label)) throw new TypeError("Invalid signature label");
|
|
764
773
|
const jwk = "privateKey" in key ? key.privateKey : key.publicKey;
|
|
@@ -813,7 +822,7 @@ async function signWebBotAuth(request, key, options) {
|
|
|
813
822
|
return headers;
|
|
814
823
|
}
|
|
815
824
|
async function createSignedSignatureDirectory(originUrl, signingKeys, options = {}) {
|
|
816
|
-
const origin = (
|
|
825
|
+
const origin = signingOrigin(originUrl);
|
|
817
826
|
const now = Math.floor((options.now ?? (() => Date.now() / 1e3))());
|
|
818
827
|
const lifetime = options.lifetimeSeconds ?? 86400;
|
|
819
828
|
if (!Number.isFinite(now) || !Number.isSafeInteger(lifetime) || lifetime < 1 || !Number.isSafeInteger(now + lifetime))
|
|
@@ -822,12 +831,7 @@ async function createSignedSignatureDirectory(originUrl, signingKeys, options =
|
|
|
822
831
|
const keys = signingKeys.map((key) => {
|
|
823
832
|
const jwk = "privateKey" in key ? key.privateKey : key.publicKey;
|
|
824
833
|
signingAlgorithm(jwk);
|
|
825
|
-
return {
|
|
826
|
-
kty: jwk.kty,
|
|
827
|
-
...jwk.kty === "RSA" ? { n: jwk.n, e: jwk.e } : { crv: jwk.crv, x: jwk.x },
|
|
828
|
-
kid: jwkThumbprint(jwk),
|
|
829
|
-
use: "sig"
|
|
830
|
-
};
|
|
834
|
+
return { kty: jwk.kty, crv: jwk.crv, x: jwk.x, kid: jwkThumbprint(jwk), use: "sig" };
|
|
831
835
|
});
|
|
832
836
|
if (new Set(keys.map((k) => k.kid)).size !== keys.length) throw new TypeError("Duplicate directory key");
|
|
833
837
|
const body = JSON.stringify({ keys });
|
|
@@ -873,6 +877,7 @@ async function createSignedSignatureDirectory(originUrl, signingKeys, options =
|
|
|
873
877
|
}
|
|
874
878
|
function createWebBotAuthFetch(upstream, key, options) {
|
|
875
879
|
assertWebBotAuthSigningKey(key);
|
|
880
|
+
signingOrigin(options.origin);
|
|
876
881
|
return async (input, init) => {
|
|
877
882
|
const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
|
|
878
883
|
if (options.shouldSign && !options.shouldSign(url, init)) return upstream(input, init);
|
|
@@ -26,8 +26,9 @@ const WEB_BOT_AUTH_PROFILE = "web-bot-auth";
|
|
|
26
26
|
const WEB_BOT_AUTH_DRAFT_REVISION = "draft-ietf-webbotauth-httpsig-protocol-00";
|
|
27
27
|
const SIGNATURE_DIRECTORY_PATH = "/.well-known/http-message-signatures-directory";
|
|
28
28
|
const SIGNATURE_DIRECTORY_MEDIA_TYPE = "application/http-message-signatures-directory+json";
|
|
29
|
-
const WEB_BOT_AUTH_ALGORITHMS = Object.freeze(["ed25519"
|
|
29
|
+
const WEB_BOT_AUTH_ALGORITHMS = Object.freeze(["ed25519"]);
|
|
30
30
|
const DIRECTORY_TAG = "http-message-signatures-directory";
|
|
31
|
+
const PRIVATE_JWK_MEMBERS = /* @__PURE__ */ new Set(["d", "p", "q", "dp", "dq", "qi", "oth", "k"]);
|
|
31
32
|
const CLOCK_SKEW_SECONDS = 60;
|
|
32
33
|
const MAX_LIFETIME_SECONDS = 300;
|
|
33
34
|
const REQUIRED_PARAMETERS = ["created", "expires", "nonce", "keyid", "alg", "tag"];
|
|
@@ -138,26 +139,29 @@ function jwkThumbprint(jwk) {
|
|
|
138
139
|
else return denied("unsupported_key");
|
|
139
140
|
return createHash("sha256").update(JSON.stringify(fields)).digest("base64url");
|
|
140
141
|
}
|
|
142
|
+
function keyAlgorithm(jwk) {
|
|
143
|
+
return jwk.kty === "OKP" && jwk.crv === "Ed25519" ? "ed25519" : void 0;
|
|
144
|
+
}
|
|
141
145
|
function algorithm(jwk) {
|
|
142
|
-
|
|
143
|
-
if (jwk.kty === "RSA" && typeof jwk.n === "string" && jwk.e === "AQAB") {
|
|
144
|
-
const bytes = Buffer.from(jwk.n, "base64url").length;
|
|
145
|
-
if (bytes >= 256 && bytes <= 512) return "rsa-pss-sha512";
|
|
146
|
-
}
|
|
147
|
-
return denied("unsupported_key");
|
|
146
|
+
return keyAlgorithm(jwk) ?? denied("unsupported_key");
|
|
148
147
|
}
|
|
149
148
|
function signingAlgorithm(jwk) {
|
|
150
149
|
try {
|
|
151
150
|
return algorithm(jwk);
|
|
152
151
|
} catch {
|
|
153
|
-
throw new TypeError(
|
|
154
|
-
"Web Bot Auth signs with Ed25519 or RSA-PSS-SHA512 (2048-4096 bit, e=65537) keys only; ES256 remains on the AdCP RFC 9421 profile"
|
|
155
|
-
);
|
|
152
|
+
throw new TypeError("Web Bot Auth signs with Ed25519 keys only; ES256 remains on the AdCP RFC 9421 profile");
|
|
156
153
|
}
|
|
157
154
|
}
|
|
158
155
|
function assertWebBotAuthSigningKey(key) {
|
|
159
156
|
signingAlgorithm("privateKey" in key ? key.privateKey : key.publicKey);
|
|
160
157
|
}
|
|
158
|
+
function signingOrigin(value) {
|
|
159
|
+
try {
|
|
160
|
+
return receivedAgentOrigin(canonicalAgentOrigin(value));
|
|
161
|
+
} catch {
|
|
162
|
+
throw new TypeError("Web Bot Auth signs as an https origin only (WBA section 5.2.1)");
|
|
163
|
+
}
|
|
164
|
+
}
|
|
161
165
|
function inputs(headers, limit) {
|
|
162
166
|
const members = dictionary(getHeaderValue(headers, "signature-input"), "Signature-Input");
|
|
163
167
|
if (members.size > limit) bad("signature_input");
|
|
@@ -170,6 +174,7 @@ function inputs(headers, limit) {
|
|
|
170
174
|
});
|
|
171
175
|
}
|
|
172
176
|
function receivedAgentOrigin(value) {
|
|
177
|
+
if (!value.startsWith("https://")) return denied("agent_origin");
|
|
173
178
|
try {
|
|
174
179
|
canonicalAgentUrl(value);
|
|
175
180
|
const origin = canonicalAgentOrigin(value);
|
|
@@ -392,8 +397,10 @@ async function verifyWebBotAuth(request, options) {
|
|
|
392
397
|
if (!(member2[0] instanceof ArrayBuffer) || member2[1].size !== 0) bad("signature");
|
|
393
398
|
for (const member2 of agents?.values() ?? []) if (typeof member2[0] !== "string") bad("signature_agent");
|
|
394
399
|
if (!inputMembers || !signatureMembers) return denied("headers_missing");
|
|
395
|
-
|
|
396
|
-
|
|
400
|
+
const tagged = [...inputMembers].filter(([, member2]) => member2[1].get("tag") === WEB_BOT_AUTH_PROFILE);
|
|
401
|
+
if (tagged.length === 0) denied("profile");
|
|
402
|
+
if (tagged.length > 1) denied("signature_count");
|
|
403
|
+
label = tagged[0][0];
|
|
397
404
|
if (!signatureMembers.has(label)) denied("signature_label");
|
|
398
405
|
try {
|
|
399
406
|
parseSignature(signatureHeader, label, "rfc8941-base64");
|
|
@@ -406,7 +413,6 @@ async function verifyWebBotAuth(request, options) {
|
|
|
406
413
|
} catch {
|
|
407
414
|
return denied("parameters");
|
|
408
415
|
}
|
|
409
|
-
if (input.params.tag !== WEB_BOT_AUTH_PROFILE) denied("profile");
|
|
410
416
|
if (!agents || agents.size !== 1) denied(agents ? "agent_count" : "agent_missing");
|
|
411
417
|
const agentMember = `signature-agent;key="${label}"`;
|
|
412
418
|
const agentComponents = input.components.filter((c) => c.startsWith("signature-agent;"));
|
|
@@ -414,7 +420,7 @@ async function verifyWebBotAuth(request, options) {
|
|
|
414
420
|
const member = agents.get(label);
|
|
415
421
|
if (!member) denied("agent_not_covered");
|
|
416
422
|
const type = member[1].get("type");
|
|
417
|
-
if (type !== void 0 && type !== "directory") denied("agent_type");
|
|
423
|
+
if (type !== void 0 && String(type) !== "directory") denied("agent_type");
|
|
418
424
|
const origin = receivedAgentOrigin(member[0]);
|
|
419
425
|
const { created, expires, nonce, keyid, alg } = input.params;
|
|
420
426
|
if ([created, expires, nonce, keyid, alg].some((value) => value === void 0)) denied("parameters_missing");
|
|
@@ -538,11 +544,13 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
|
|
|
538
544
|
let expires = Infinity;
|
|
539
545
|
for (const raw of document.keys) {
|
|
540
546
|
if (!raw || typeof raw !== "object") denied("directory_key");
|
|
547
|
+
if (Object.keys(raw).some((k) => PRIVATE_JWK_MEMBERS.has(k.toLowerCase()) || k.startsWith("_private")))
|
|
548
|
+
denied("directory_key");
|
|
549
|
+
if (!keyAlgorithm(raw)) continue;
|
|
541
550
|
const thumbprint = jwkThumbprint(raw);
|
|
542
551
|
const key = { ...raw, kid: raw.kid ?? thumbprint };
|
|
543
|
-
if (key.kid !== thumbprint || kids.has(key.kid) || key.
|
|
552
|
+
if (key.kid !== thumbprint || kids.has(key.kid) || key.adcp_use !== void 0 || !testKeysAllowed(options.allowTestKeys) && TEST_KIDS.has(key.kid))
|
|
544
553
|
denied("directory_key");
|
|
545
|
-
algorithm(key);
|
|
546
554
|
kids.add(key.kid);
|
|
547
555
|
keys.push(key);
|
|
548
556
|
const proof = signatures.find((input) => input.params.keyid === key.kid && input.params.tag === DIRECTORY_TAG);
|
|
@@ -585,6 +593,7 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
|
|
|
585
593
|
);
|
|
586
594
|
expires = Math.min(expires, proof.params.expires);
|
|
587
595
|
}
|
|
596
|
+
if (!keys.length) denied("directory_keys");
|
|
588
597
|
return { keys, expires, signed: true, proof: response };
|
|
589
598
|
} catch (error) {
|
|
590
599
|
if (error instanceof WebBotAuthError) {
|
|
@@ -714,7 +723,7 @@ async function signWebBotAuth(request, key, options) {
|
|
|
714
723
|
throw new TypeError(
|
|
715
724
|
"Web Bot Auth relays were removed from the profile (adcp#7894): an intermediary signs as itself with one signature"
|
|
716
725
|
);
|
|
717
|
-
const origin =
|
|
726
|
+
const origin = signingOrigin(options.origin);
|
|
718
727
|
const label = options.label ?? "sig1";
|
|
719
728
|
if (!/^[a-z][a-z0-9_.*-]*$/.test(label)) throw new TypeError("Invalid signature label");
|
|
720
729
|
const jwk = "privateKey" in key ? key.privateKey : key.publicKey;
|
|
@@ -769,7 +778,7 @@ async function signWebBotAuth(request, key, options) {
|
|
|
769
778
|
return headers;
|
|
770
779
|
}
|
|
771
780
|
async function createSignedSignatureDirectory(originUrl, signingKeys, options = {}) {
|
|
772
|
-
const origin =
|
|
781
|
+
const origin = signingOrigin(originUrl);
|
|
773
782
|
const now = Math.floor((options.now ?? (() => Date.now() / 1e3))());
|
|
774
783
|
const lifetime = options.lifetimeSeconds ?? 86400;
|
|
775
784
|
if (!Number.isFinite(now) || !Number.isSafeInteger(lifetime) || lifetime < 1 || !Number.isSafeInteger(now + lifetime))
|
|
@@ -778,12 +787,7 @@ async function createSignedSignatureDirectory(originUrl, signingKeys, options =
|
|
|
778
787
|
const keys = signingKeys.map((key) => {
|
|
779
788
|
const jwk = "privateKey" in key ? key.privateKey : key.publicKey;
|
|
780
789
|
signingAlgorithm(jwk);
|
|
781
|
-
return {
|
|
782
|
-
kty: jwk.kty,
|
|
783
|
-
...jwk.kty === "RSA" ? { n: jwk.n, e: jwk.e } : { crv: jwk.crv, x: jwk.x },
|
|
784
|
-
kid: jwkThumbprint(jwk),
|
|
785
|
-
use: "sig"
|
|
786
|
-
};
|
|
790
|
+
return { kty: jwk.kty, crv: jwk.crv, x: jwk.x, kid: jwkThumbprint(jwk), use: "sig" };
|
|
787
791
|
});
|
|
788
792
|
if (new Set(keys.map((k) => k.kid)).size !== keys.length) throw new TypeError("Duplicate directory key");
|
|
789
793
|
const body = JSON.stringify({ keys });
|
|
@@ -829,6 +833,7 @@ async function createSignedSignatureDirectory(originUrl, signingKeys, options =
|
|
|
829
833
|
}
|
|
830
834
|
function createWebBotAuthFetch(upstream, key, options) {
|
|
831
835
|
assertWebBotAuthSigningKey(key);
|
|
836
|
+
signingOrigin(options.origin);
|
|
832
837
|
return async (input, init) => {
|
|
833
838
|
const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
|
|
834
839
|
if (options.shouldSign && !options.shouldSign(url, init)) return upstream(input, init);
|
|
@@ -758,11 +758,9 @@ function inferDiscoveredServerAdcpVersion(profile, complianceVersion) {
|
|
|
758
758
|
}
|
|
759
759
|
if (profile.adcp_build_version) return profile.adcp_build_version;
|
|
760
760
|
if (isLegacyPre31TypescriptSdkProfile(profile)) return "3.0";
|
|
761
|
-
if (isLegacyV2Profile(profile)) return "v2.5";
|
|
762
761
|
return void 0;
|
|
763
762
|
}
|
|
764
763
|
function negotiateVersionEnvelope(profile, complianceVersion) {
|
|
765
|
-
if (isLegacyV2Profile(profile)) return "none";
|
|
766
764
|
const supported = profile.adcp_supported_versions;
|
|
767
765
|
if (supported?.length && supported.every(import_adcp_version_config.isPre31AdcpVersion)) return "major-only";
|
|
768
766
|
if (profile.adcp_build_version && (0, import_adcp_version_config.isPre31AdcpVersion)(profile.adcp_build_version)) return "major-only";
|
|
@@ -770,12 +768,6 @@ function negotiateVersionEnvelope(profile, complianceVersion) {
|
|
|
770
768
|
if ((0, import_adcp_version_config.isPre31AdcpVersion)(complianceVersion) && isLegacyV3Profile(profile)) return "major-only";
|
|
771
769
|
return void 0;
|
|
772
770
|
}
|
|
773
|
-
function isLegacyV2Profile(profile) {
|
|
774
|
-
if (profile.adcp_version === "v2") return true;
|
|
775
|
-
const majors = profile.adcp_major_versions ?? [];
|
|
776
|
-
if (majors.length > 0) return majors.includes(2) && !majors.includes(3);
|
|
777
|
-
return !profile.tools.includes("get_adcp_capabilities");
|
|
778
|
-
}
|
|
779
771
|
function isLegacyV3Profile(profile) {
|
|
780
772
|
if (profile.adcp_version === "v3") return true;
|
|
781
773
|
if (profile.adcp_major_versions?.includes(3)) return true;
|
|
@@ -748,11 +748,9 @@ function inferDiscoveredServerAdcpVersion(profile, complianceVersion) {
|
|
|
748
748
|
}
|
|
749
749
|
if (profile.adcp_build_version) return profile.adcp_build_version;
|
|
750
750
|
if (isLegacyPre31TypescriptSdkProfile(profile)) return "3.0";
|
|
751
|
-
if (isLegacyV2Profile(profile)) return "v2.5";
|
|
752
751
|
return void 0;
|
|
753
752
|
}
|
|
754
753
|
function negotiateVersionEnvelope(profile, complianceVersion) {
|
|
755
|
-
if (isLegacyV2Profile(profile)) return "none";
|
|
756
754
|
const supported = profile.adcp_supported_versions;
|
|
757
755
|
if (supported?.length && supported.every(isPre31AdcpVersion)) return "major-only";
|
|
758
756
|
if (profile.adcp_build_version && isPre31AdcpVersion(profile.adcp_build_version)) return "major-only";
|
|
@@ -760,12 +758,6 @@ function negotiateVersionEnvelope(profile, complianceVersion) {
|
|
|
760
758
|
if (isPre31AdcpVersion(complianceVersion) && isLegacyV3Profile(profile)) return "major-only";
|
|
761
759
|
return void 0;
|
|
762
760
|
}
|
|
763
|
-
function isLegacyV2Profile(profile) {
|
|
764
|
-
if (profile.adcp_version === "v2") return true;
|
|
765
|
-
const majors = profile.adcp_major_versions ?? [];
|
|
766
|
-
if (majors.length > 0) return majors.includes(2) && !majors.includes(3);
|
|
767
|
-
return !profile.tools.includes("get_adcp_capabilities");
|
|
768
|
-
}
|
|
769
761
|
function isLegacyV3Profile(profile) {
|
|
770
762
|
if (profile.adcp_version === "v3") return true;
|
|
771
763
|
if (profile.adcp_major_versions?.includes(3)) return true;
|
|
@@ -151,11 +151,22 @@ function mapStepToTestStep(stepResult) {
|
|
|
151
151
|
}).join("; ");
|
|
152
152
|
return {
|
|
153
153
|
step: stepResult.title,
|
|
154
|
+
step_id: stepResult.step_id,
|
|
154
155
|
task: stepResult.task,
|
|
155
156
|
passed: stepResult.passed,
|
|
156
157
|
duration_ms: stepResult.duration_ms,
|
|
157
158
|
error: stepResult.error,
|
|
158
159
|
details: validationDetails || void 0,
|
|
160
|
+
validations: stepResult.validations.map((v) => ({
|
|
161
|
+
...v.id !== void 0 && { id: v.id },
|
|
162
|
+
check: v.check,
|
|
163
|
+
passed: v.passed,
|
|
164
|
+
...v.severity !== void 0 && { severity: v.severity },
|
|
165
|
+
...v.not_applicable !== void 0 && { not_applicable: v.not_applicable },
|
|
166
|
+
...v.severity_promoted_from_advisory !== void 0 && {
|
|
167
|
+
severity_promoted_from_advisory: v.severity_promoted_from_advisory
|
|
168
|
+
}
|
|
169
|
+
})),
|
|
159
170
|
observation_data: stepResult.response,
|
|
160
171
|
warnings: stepResult.skipped ? [stepResult.skip?.detail ?? skipReasonLabel(stepResult.skip_reason) ?? "Step skipped"] : void 0,
|
|
161
172
|
...stepResult.skipped && { skipped: true },
|
|
@@ -126,11 +126,22 @@ function mapStepToTestStep(stepResult) {
|
|
|
126
126
|
}).join("; ");
|
|
127
127
|
return {
|
|
128
128
|
step: stepResult.title,
|
|
129
|
+
step_id: stepResult.step_id,
|
|
129
130
|
task: stepResult.task,
|
|
130
131
|
passed: stepResult.passed,
|
|
131
132
|
duration_ms: stepResult.duration_ms,
|
|
132
133
|
error: stepResult.error,
|
|
133
134
|
details: validationDetails || void 0,
|
|
135
|
+
validations: stepResult.validations.map((v) => ({
|
|
136
|
+
...v.id !== void 0 && { id: v.id },
|
|
137
|
+
check: v.check,
|
|
138
|
+
passed: v.passed,
|
|
139
|
+
...v.severity !== void 0 && { severity: v.severity },
|
|
140
|
+
...v.not_applicable !== void 0 && { not_applicable: v.not_applicable },
|
|
141
|
+
...v.severity_promoted_from_advisory !== void 0 && {
|
|
142
|
+
severity_promoted_from_advisory: v.severity_promoted_from_advisory
|
|
143
|
+
}
|
|
144
|
+
})),
|
|
134
145
|
observation_data: stepResult.response,
|
|
135
146
|
warnings: stepResult.skipped ? [stepResult.skip?.detail ?? skipReasonLabel(stepResult.skip_reason) ?? "Step skipped"] : void 0,
|
|
136
147
|
...stepResult.skipped && { skipped: true },
|
|
@@ -18,3 +18,5 @@ export { runAgainstLocalAgent } from './local-agent-runner.mjs';
|
|
|
18
18
|
export type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner.mjs';
|
|
19
19
|
export { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot, withServedReleaseSchemaRoots, } from '../validation/index.mjs';
|
|
20
20
|
export { runStoryboard, runStoryboardStep, applyAdcpVersionRunOptions, applyStoryboardVersionOptions, getFirstStepPreview, parseStoryboard, loadStoryboardFile, normalizeValidationOnlyTasks, VALIDATION_ONLY_TASK, applyFixtureBindingsToRequest, buildFixtureResolutionSpecs, FixtureBindingRegistry, matchesFixtureRequirements, normalizeFixtureMatchExpression, validateFixtureResolutionDeclarations, getComplianceCacheDir, loadComplianceIndex, listBundles, loadBundleStoryboards, listAllComplianceStoryboards, getComplianceStoryboardById, findBundleById, resolveBundleOrStoryboard, resolveStoryboardsForCapabilities, isComplianceVersionSupported, CapabilityResolutionError, TASK_TO_METHOD, executeStoryboardTask, expandCreativeAssetDirectives, findUnresolvedCreativeAssetDirectives, extractContext, injectContext, runValidations, resolvePath, RateLimitTripObserver, RATE_LIMIT_TRIP_CONTRACT, RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN, validateRateLimitTripSpec, getSandboxEntities, getSandboxBrands, getSandboxBrand, isSandboxDomain, clearSandboxCache, registerAssertion, getAssertion, listAssertions, listDefaultAssertions, clearAssertionRegistry, resolveAssertions, type AssertionSpec, type AssertionContext, type AssertionResult, type RegisterAssertionOptions, type Storyboard, type StoryboardFixtureResolution, type FixtureResolutionStrategy, type FixtureMatchOperator, type FixtureMatchClause, type FixtureResolutionDeclaration, type ProductFixtureResolutionDeclaration, type PricingOptionFixtureResolutionDeclaration, type FixtureResolutionStatus, type FixtureResolutionRecord, type FixtureResolutionAttempt, type FixtureResolutionEvidence, type FixtureResolutionCoverageGap, type StoryboardInvariants, type StoryboardInvariantsObject, type StepInvariantsObject, type StoryboardPhase, type StoryboardStep, type RateLimitTripSpec, type StoryboardValidation, type RateLimitTripClient, type RateLimitTripFailureCode, type RateLimitTripObservation, type RateLimitTripObserverOptions, type RateLimitTripResponseSnapshot, type RateLimitTripStructuredResult, type RateLimitTripTaskOptions, type StoryboardContext, type StoryboardRunOptions, type TrustedMatchContextProviderEndpoint, type TrustedMatchContextRegistrationContext, type TrustedMatchContextRouterRunnerOptions, type TrustedMatchPublisherAuthOperation, type TrustedMatchPublisherCredentialState, type TrustedMatchPublisherAuthTls, type TrustedMatchPublisherAuthProbeConfiguration, type TrustedMatchPublisherAuthRunner, type ValidationResult, type StoryboardStepPreview, type StoryboardStepResult, type StoryboardStepHint, type StoryboardStepHintBase, type ContextValueRejectedHint, type ShapeDriftHint, type MissingRequiredFieldHint, type FormatMismatchHint, type MonotonicViolationHint, type ContextProvenanceEntry, type StoryboardPhaseResult, type StoryboardResult, type RunnerNotice, type NoticeCode, type NoticeSeverity, type AgentCapabilities, type BundleKind, type BundleRef, type CapabilityResolutionCode, type ComplianceIndex, type ComplianceIndexProtocol, type ComplianceIndexSpecialism, type ResolveOptions, type ResolvedBundle, type ResolvedStoryboards, type SandboxBrand, type SandboxAgent, type SandboxEntities, type BrandJson, type AdagentsJson, gradeOAuthMetadataGraph, gradeOAuthMetadataGraphVector, loadOAuthMetadataGraphVectors, normalizeOAuthResourceForComparison, redactOAuthUrlForOutput, type GradeOAuthMetadataGraphOptions, type OAuthMetadataGraphErrorCode, type OAuthMetadataGraphFinding, type OAuthMetadataGraphGrade, type OAuthMetadataGraphObservation, type OAuthMetadataGraphVector, type OAuthMetadataGraphVectorCorpus, BrandJsonSchema, AdagentsJsonSchema, MCP_SESSION_PROBE_TASK, } from './storyboard/index.mjs';
|
|
21
|
+
export { resolveCreativeBuildProbe, validateCreativeBuildProbeSpec } from './storyboard/index.mjs';
|
|
22
|
+
export type { CreativeBuildProbeSpec, CreativeBuildProbeInputFixture, CreativeBuildProbeResolution, } from './storyboard/index.mjs';
|
|
@@ -18,3 +18,5 @@ export { runAgainstLocalAgent } from './local-agent-runner';
|
|
|
18
18
|
export type { LocalAgentRunResult, PerStoryboardOverride, RunAgainstLocalAgentOptions } from './local-agent-runner';
|
|
19
19
|
export { registerExternalSchemaRoot, unregisterExternalSchemaRoot, withExternalSchemaRoot, withServedReleaseSchemaRoots, } from '../validation';
|
|
20
20
|
export { runStoryboard, runStoryboardStep, applyAdcpVersionRunOptions, applyStoryboardVersionOptions, getFirstStepPreview, parseStoryboard, loadStoryboardFile, normalizeValidationOnlyTasks, VALIDATION_ONLY_TASK, applyFixtureBindingsToRequest, buildFixtureResolutionSpecs, FixtureBindingRegistry, matchesFixtureRequirements, normalizeFixtureMatchExpression, validateFixtureResolutionDeclarations, getComplianceCacheDir, loadComplianceIndex, listBundles, loadBundleStoryboards, listAllComplianceStoryboards, getComplianceStoryboardById, findBundleById, resolveBundleOrStoryboard, resolveStoryboardsForCapabilities, isComplianceVersionSupported, CapabilityResolutionError, TASK_TO_METHOD, executeStoryboardTask, expandCreativeAssetDirectives, findUnresolvedCreativeAssetDirectives, extractContext, injectContext, runValidations, resolvePath, RateLimitTripObserver, RATE_LIMIT_TRIP_CONTRACT, RATE_LIMIT_TRIP_DEFAULT_REPLAY_MAX_WAIT_SECONDS, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MAX, RATE_LIMIT_TRIP_MAX_ATTEMPTS_MIN, validateRateLimitTripSpec, getSandboxEntities, getSandboxBrands, getSandboxBrand, isSandboxDomain, clearSandboxCache, registerAssertion, getAssertion, listAssertions, listDefaultAssertions, clearAssertionRegistry, resolveAssertions, type AssertionSpec, type AssertionContext, type AssertionResult, type RegisterAssertionOptions, type Storyboard, type StoryboardFixtureResolution, type FixtureResolutionStrategy, type FixtureMatchOperator, type FixtureMatchClause, type FixtureResolutionDeclaration, type ProductFixtureResolutionDeclaration, type PricingOptionFixtureResolutionDeclaration, type FixtureResolutionStatus, type FixtureResolutionRecord, type FixtureResolutionAttempt, type FixtureResolutionEvidence, type FixtureResolutionCoverageGap, type StoryboardInvariants, type StoryboardInvariantsObject, type StepInvariantsObject, type StoryboardPhase, type StoryboardStep, type RateLimitTripSpec, type StoryboardValidation, type RateLimitTripClient, type RateLimitTripFailureCode, type RateLimitTripObservation, type RateLimitTripObserverOptions, type RateLimitTripResponseSnapshot, type RateLimitTripStructuredResult, type RateLimitTripTaskOptions, type StoryboardContext, type StoryboardRunOptions, type TrustedMatchContextProviderEndpoint, type TrustedMatchContextRegistrationContext, type TrustedMatchContextRouterRunnerOptions, type TrustedMatchPublisherAuthOperation, type TrustedMatchPublisherCredentialState, type TrustedMatchPublisherAuthTls, type TrustedMatchPublisherAuthProbeConfiguration, type TrustedMatchPublisherAuthRunner, type ValidationResult, type StoryboardStepPreview, type StoryboardStepResult, type StoryboardStepHint, type StoryboardStepHintBase, type ContextValueRejectedHint, type ShapeDriftHint, type MissingRequiredFieldHint, type FormatMismatchHint, type MonotonicViolationHint, type ContextProvenanceEntry, type StoryboardPhaseResult, type StoryboardResult, type RunnerNotice, type NoticeCode, type NoticeSeverity, type AgentCapabilities, type BundleKind, type BundleRef, type CapabilityResolutionCode, type ComplianceIndex, type ComplianceIndexProtocol, type ComplianceIndexSpecialism, type ResolveOptions, type ResolvedBundle, type ResolvedStoryboards, type SandboxBrand, type SandboxAgent, type SandboxEntities, type BrandJson, type AdagentsJson, gradeOAuthMetadataGraph, gradeOAuthMetadataGraphVector, loadOAuthMetadataGraphVectors, normalizeOAuthResourceForComparison, redactOAuthUrlForOutput, type GradeOAuthMetadataGraphOptions, type OAuthMetadataGraphErrorCode, type OAuthMetadataGraphFinding, type OAuthMetadataGraphGrade, type OAuthMetadataGraphObservation, type OAuthMetadataGraphVector, type OAuthMetadataGraphVectorCorpus, BrandJsonSchema, AdagentsJsonSchema, MCP_SESSION_PROBE_TASK, } from './storyboard';
|
|
21
|
+
export { resolveCreativeBuildProbe, validateCreativeBuildProbeSpec } from './storyboard';
|
|
22
|
+
export type { CreativeBuildProbeSpec, CreativeBuildProbeInputFixture, CreativeBuildProbeResolution, } from './storyboard';
|
|
@@ -139,6 +139,7 @@ __export(testing_exports, {
|
|
|
139
139
|
resolveAccountForMediaBuy: () => import_agent_tester.resolveAccountForMediaBuy,
|
|
140
140
|
resolveAssertions: () => import_storyboard.resolveAssertions,
|
|
141
141
|
resolveBundleOrStoryboard: () => import_storyboard.resolveBundleOrStoryboard,
|
|
142
|
+
resolveCreativeBuildProbe: () => import_storyboard2.resolveCreativeBuildProbe,
|
|
142
143
|
resolvePath: () => import_storyboard.resolvePath,
|
|
143
144
|
resolveStoryboardsForCapabilities: () => import_storyboard.resolveStoryboardsForCapabilities,
|
|
144
145
|
runAgainstLocalAgent: () => import_local_agent_runner.runAgainstLocalAgent,
|
|
@@ -190,6 +191,7 @@ __export(testing_exports, {
|
|
|
190
191
|
testTerminalStateEnforcement: () => import_agent_tester.testTerminalStateEnforcement,
|
|
191
192
|
testValidation: () => import_agent_tester.testValidation,
|
|
192
193
|
unregisterExternalSchemaRoot: () => import_validation.unregisterExternalSchemaRoot,
|
|
194
|
+
validateCreativeBuildProbeSpec: () => import_storyboard2.validateCreativeBuildProbeSpec,
|
|
193
195
|
validateFixtureResolutionDeclarations: () => import_storyboard.validateFixtureResolutionDeclarations,
|
|
194
196
|
validateRateLimitTripSpec: () => import_storyboard.validateRateLimitTripSpec,
|
|
195
197
|
withExternalSchemaRoot: () => import_validation.withExternalSchemaRoot,
|
|
@@ -209,6 +211,7 @@ var import_test_controller_bridge = require('../server/test-controller-bridge.js
|
|
|
209
211
|
var import_local_agent_runner = require('./local-agent-runner.js');
|
|
210
212
|
var import_validation = require('../validation/index.js');
|
|
211
213
|
var import_storyboard = require('./storyboard/index.js');
|
|
214
|
+
var import_storyboard2 = require('./storyboard/index.js');
|
|
212
215
|
// Annotate the CommonJS export names for ESM import in node:
|
|
213
216
|
0 && (module.exports = {
|
|
214
217
|
AdagentsJsonSchema,
|
|
@@ -332,6 +335,7 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
332
335
|
resolveAccountForMediaBuy,
|
|
333
336
|
resolveAssertions,
|
|
334
337
|
resolveBundleOrStoryboard,
|
|
338
|
+
resolveCreativeBuildProbe,
|
|
335
339
|
resolvePath,
|
|
336
340
|
resolveStoryboardsForCapabilities,
|
|
337
341
|
runAgainstLocalAgent,
|
|
@@ -383,6 +387,7 @@ var import_storyboard = require('./storyboard/index.js');
|
|
|
383
387
|
testTerminalStateEnforcement,
|
|
384
388
|
testValidation,
|
|
385
389
|
unregisterExternalSchemaRoot,
|
|
390
|
+
validateCreativeBuildProbeSpec,
|
|
386
391
|
validateFixtureResolutionDeclarations,
|
|
387
392
|
validateRateLimitTripSpec,
|
|
388
393
|
withExternalSchemaRoot,
|
|
@@ -189,6 +189,7 @@ import {
|
|
|
189
189
|
AdagentsJsonSchema,
|
|
190
190
|
MCP_SESSION_PROBE_TASK
|
|
191
191
|
} from "./storyboard/index.mjs";
|
|
192
|
+
import { resolveCreativeBuildProbe, validateCreativeBuildProbeSpec } from "./storyboard/index.mjs";
|
|
192
193
|
export {
|
|
193
194
|
AdagentsJsonSchema,
|
|
194
195
|
BrandJsonSchema,
|
|
@@ -311,6 +312,7 @@ export {
|
|
|
311
312
|
resolveAccountForMediaBuy,
|
|
312
313
|
resolveAssertions,
|
|
313
314
|
resolveBundleOrStoryboard,
|
|
315
|
+
resolveCreativeBuildProbe,
|
|
314
316
|
resolvePath,
|
|
315
317
|
resolveStoryboardsForCapabilities,
|
|
316
318
|
runAgainstLocalAgent,
|
|
@@ -362,6 +364,7 @@ export {
|
|
|
362
364
|
testTerminalStateEnforcement,
|
|
363
365
|
testValidation,
|
|
364
366
|
unregisterExternalSchemaRoot,
|
|
367
|
+
validateCreativeBuildProbeSpec,
|
|
365
368
|
validateFixtureResolutionDeclarations,
|
|
366
369
|
validateRateLimitTripSpec,
|
|
367
370
|
withExternalSchemaRoot,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Tests agent capability discovery including:
|
|
5
5
|
* - get_adcp_capabilities (v3 agents)
|
|
6
|
-
* -
|
|
6
|
+
* - Rejection of agents missing AdCP 3 capability discovery
|
|
7
7
|
* - Protocol/tool cross-validation
|
|
8
8
|
*/
|
|
9
9
|
import type { TestOptions, TestStepResult, AgentProfile } from '../types.mjs';
|
|
@@ -14,7 +14,7 @@ import type { TestOptions, TestStepResult, AgentProfile } from '../types.mjs';
|
|
|
14
14
|
* 1. Discover agent profile (tools list)
|
|
15
15
|
* 2. If get_adcp_capabilities exists, call it and validate response
|
|
16
16
|
* 3. Cross-check reported protocols against available tools
|
|
17
|
-
* 4.
|
|
17
|
+
* 4. Reject agents without AdCP 3 discovery
|
|
18
18
|
*/
|
|
19
19
|
export declare function testCapabilityDiscovery(agentUrl: string, options: TestOptions): Promise<{
|
|
20
20
|
steps: TestStepResult[];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Tests agent capability discovery including:
|
|
5
5
|
* - get_adcp_capabilities (v3 agents)
|
|
6
|
-
* -
|
|
6
|
+
* - Rejection of agents missing AdCP 3 capability discovery
|
|
7
7
|
* - Protocol/tool cross-validation
|
|
8
8
|
*/
|
|
9
9
|
import type { TestOptions, TestStepResult, AgentProfile } from '../types';
|
|
@@ -14,7 +14,7 @@ import type { TestOptions, TestStepResult, AgentProfile } from '../types';
|
|
|
14
14
|
* 1. Discover agent profile (tools list)
|
|
15
15
|
* 2. If get_adcp_capabilities exists, call it and validate response
|
|
16
16
|
* 3. Cross-check reported protocols against available tools
|
|
17
|
-
* 4.
|
|
17
|
+
* 4. Reject agents without AdCP 3 discovery
|
|
18
18
|
*/
|
|
19
19
|
export declare function testCapabilityDiscovery(agentUrl: string, options: TestOptions): Promise<{
|
|
20
20
|
steps: TestStepResult[];
|
|
@@ -72,8 +72,8 @@ async function testCapabilityDiscovery(agentUrl, options) {
|
|
|
72
72
|
step.error = result.error || "get_adcp_capabilities failed";
|
|
73
73
|
steps.push(step);
|
|
74
74
|
const toolInfos = profile.tools.map((name) => ({ name }));
|
|
75
|
-
capabilities = (0, import_capabilities.
|
|
76
|
-
profile.adcp_version = "
|
|
75
|
+
capabilities = (0, import_capabilities.buildSyntheticV3Capabilities)(toolInfos);
|
|
76
|
+
profile.adcp_version = "v3";
|
|
77
77
|
profile.supported_protocols = capabilities.protocols;
|
|
78
78
|
steps.push({
|
|
79
79
|
step: "Fallback to synthetic capabilities",
|
|
@@ -83,54 +83,21 @@ async function testCapabilityDiscovery(agentUrl, options) {
|
|
|
83
83
|
});
|
|
84
84
|
} else {
|
|
85
85
|
const toolInfos = profile.tools.map((name) => ({ name }));
|
|
86
|
-
capabilities = (0, import_capabilities.
|
|
87
|
-
profile.adcp_version = "
|
|
86
|
+
capabilities = (0, import_capabilities.buildSyntheticV3Capabilities)(toolInfos);
|
|
87
|
+
profile.adcp_version = "v3";
|
|
88
88
|
profile.supported_protocols = capabilities.protocols;
|
|
89
89
|
step.passed = false;
|
|
90
90
|
step.error = "get_adcp_capabilities returned no data";
|
|
91
91
|
steps.push(step);
|
|
92
92
|
}
|
|
93
93
|
} else {
|
|
94
|
-
const toolInfos = profile.tools.map((name) => ({ name }));
|
|
95
|
-
capabilities = (0, import_capabilities.buildSyntheticCapabilities)(toolInfos);
|
|
96
|
-
profile.adcp_version = "v2";
|
|
97
|
-
profile.supported_protocols = capabilities.protocols;
|
|
98
|
-
profile.supports_governance = capabilities.protocols.includes("governance");
|
|
99
|
-
profile.supports_si = capabilities.protocols.includes("sponsored_intelligence");
|
|
100
94
|
steps.push({
|
|
101
|
-
step: "
|
|
102
|
-
|
|
103
|
-
passed: true,
|
|
95
|
+
step: "Require AdCP 3 capability discovery",
|
|
96
|
+
passed: false,
|
|
104
97
|
duration_ms: 0,
|
|
105
|
-
|
|
106
|
-
response_preview: JSON.stringify(
|
|
107
|
-
{
|
|
108
|
-
version: capabilities.version,
|
|
109
|
-
protocols: capabilities.protocols,
|
|
110
|
-
features: capabilities.features,
|
|
111
|
-
_synthetic: true
|
|
112
|
-
},
|
|
113
|
-
null,
|
|
114
|
-
2
|
|
115
|
-
)
|
|
98
|
+
error: "Agent does not advertise get_adcp_capabilities. AdCP 2 reached end of life on 2026-08-01; upgrade the agent to AdCP 3."
|
|
116
99
|
});
|
|
117
|
-
|
|
118
|
-
...import_capabilities.GOVERNANCE_TOOLS,
|
|
119
|
-
...import_capabilities.SPONSORED_INTELLIGENCE_TOOLS,
|
|
120
|
-
...import_capabilities.TRUSTED_MATCH_TOOLS,
|
|
121
|
-
...import_capabilities.COMPLIANCE_TOOLS
|
|
122
|
-
].filter((t) => profile.tools.includes(t));
|
|
123
|
-
if (v3ToolsPresent.length > 0) {
|
|
124
|
-
steps.push({
|
|
125
|
-
step: "v3 upgrade potential detected",
|
|
126
|
-
passed: true,
|
|
127
|
-
duration_ms: 0,
|
|
128
|
-
details: `Agent has ${v3ToolsPresent.length} v3 tool(s) but missing get_adcp_capabilities`,
|
|
129
|
-
warnings: [
|
|
130
|
-
`Consider implementing get_adcp_capabilities for better protocol discovery. v3 tools detected: ${v3ToolsPresent.join(", ")}`
|
|
131
|
-
]
|
|
132
|
-
});
|
|
133
|
-
}
|
|
100
|
+
return { steps, profile };
|
|
134
101
|
}
|
|
135
102
|
const { steps: crossValidationSteps } = crossValidateProtocolsAndTools(capabilities, profile.tools);
|
|
136
103
|
steps.push(...crossValidationSteps);
|