@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
|
@@ -227,20 +227,6 @@ export declare class TaskExecutor {
|
|
|
227
227
|
* Throws in strict, logs to `debugLogs` in warn, no-ops in off.
|
|
228
228
|
*/
|
|
229
229
|
validateRequest(taskName: string, params: unknown, debugLogs?: any[]): void;
|
|
230
|
-
/**
|
|
231
|
-
* After `adaptRequestForServerVersion` has rewritten a v3 request into v2
|
|
232
|
-
* wire format, validate the adapted shape against the cached v2.5 schema
|
|
233
|
-
* bundle. Always warn-only — adapter bugs shouldn't break user requests,
|
|
234
|
-
* and the v3 pre-send pass already vouched for the user-facing input.
|
|
235
|
-
* This pass exists to surface drift between what the adapter emits and
|
|
236
|
-
* what a v2.5 server expects on the wire (primarily as CI signal via the
|
|
237
|
-
* adapter-conformance test suite).
|
|
238
|
-
*
|
|
239
|
-
* Skips silently for tasks without a v2.5 schema or when the v2.5 bundle
|
|
240
|
-
* isn't cached. Caller is responsible for gating on `serverVersion === 'v2'`
|
|
241
|
-
* so v3-targeted traffic doesn't pay the validation cost.
|
|
242
|
-
*/
|
|
243
|
-
validateAdaptedRequestAgainstV2(taskName: string, adaptedParams: unknown, debugLogs?: any[]): void;
|
|
244
230
|
/**
|
|
245
231
|
* Generate webhook URL for protocol-level webhook support
|
|
246
232
|
*/
|
|
@@ -430,8 +416,7 @@ export declare class TaskExecutor {
|
|
|
430
416
|
/**
|
|
431
417
|
* Normalize response data for schema validation
|
|
432
418
|
*
|
|
433
|
-
*
|
|
434
|
-
* This ensures validation passes for both v2 and v3 server responses.
|
|
419
|
+
* Normalizes established AdCP 3 product fields before validation.
|
|
435
420
|
*/
|
|
436
421
|
private normalizeResponseForValidation;
|
|
437
422
|
/**
|
|
@@ -227,20 +227,6 @@ export declare class TaskExecutor {
|
|
|
227
227
|
* Throws in strict, logs to `debugLogs` in warn, no-ops in off.
|
|
228
228
|
*/
|
|
229
229
|
validateRequest(taskName: string, params: unknown, debugLogs?: any[]): void;
|
|
230
|
-
/**
|
|
231
|
-
* After `adaptRequestForServerVersion` has rewritten a v3 request into v2
|
|
232
|
-
* wire format, validate the adapted shape against the cached v2.5 schema
|
|
233
|
-
* bundle. Always warn-only — adapter bugs shouldn't break user requests,
|
|
234
|
-
* and the v3 pre-send pass already vouched for the user-facing input.
|
|
235
|
-
* This pass exists to surface drift between what the adapter emits and
|
|
236
|
-
* what a v2.5 server expects on the wire (primarily as CI signal via the
|
|
237
|
-
* adapter-conformance test suite).
|
|
238
|
-
*
|
|
239
|
-
* Skips silently for tasks without a v2.5 schema or when the v2.5 bundle
|
|
240
|
-
* isn't cached. Caller is responsible for gating on `serverVersion === 'v2'`
|
|
241
|
-
* so v3-targeted traffic doesn't pay the validation cost.
|
|
242
|
-
*/
|
|
243
|
-
validateAdaptedRequestAgainstV2(taskName: string, adaptedParams: unknown, debugLogs?: any[]): void;
|
|
244
230
|
/**
|
|
245
231
|
* Generate webhook URL for protocol-level webhook support
|
|
246
232
|
*/
|
|
@@ -430,8 +416,7 @@ export declare class TaskExecutor {
|
|
|
430
416
|
/**
|
|
431
417
|
* Normalize response data for schema validation
|
|
432
418
|
*
|
|
433
|
-
*
|
|
434
|
-
* This ensures validation passes for both v2 and v3 server responses.
|
|
419
|
+
* Normalizes established AdCP 3 product fields before validation.
|
|
435
420
|
*/
|
|
436
421
|
private normalizeResponseForValidation;
|
|
437
422
|
/**
|
|
@@ -27,7 +27,7 @@ __export(TaskExecutor_exports, {
|
|
|
27
27
|
InputRequiredError: () => InputRequiredError,
|
|
28
28
|
MaxClarificationError: () => MaxClarificationError,
|
|
29
29
|
TaskExecutor: () => TaskExecutor,
|
|
30
|
-
TaskTimeoutError: () =>
|
|
30
|
+
TaskTimeoutError: () => import_errors3.TaskTimeoutError,
|
|
31
31
|
acknowledgeDeferredSettlement: () => acknowledgeDeferredSettlement,
|
|
32
32
|
checkpointDeferredPendingSettlement: () => checkpointDeferredPendingSettlement,
|
|
33
33
|
hasCompletionHandlerAlreadyPublished: () => hasCompletionHandlerAlreadyPublished,
|
|
@@ -38,6 +38,7 @@ __export(TaskExecutor_exports, {
|
|
|
38
38
|
transferDeferredSettlementAcknowledgement: () => transferDeferredSettlementAcknowledgement
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(TaskExecutor_exports);
|
|
41
|
+
var import_errors = require('../errors/index.js');
|
|
41
42
|
var import_webhook_registration = require('./webhook-registration.js');
|
|
42
43
|
var import_adcp_version_config = require('../utils/adcp-version-config.js');
|
|
43
44
|
var import_schema_errors = require('../validation/schema-errors.js');
|
|
@@ -47,7 +48,7 @@ var import_mcp_tasks = require('../protocols/mcp-tasks.js');
|
|
|
47
48
|
var import_prepared_call_context = require('../protocols/prepared-call-context.js');
|
|
48
49
|
var import_auth = require('../auth/index.js');
|
|
49
50
|
var import_signedRequestRejection = require('../protocols/signedRequestRejection.js');
|
|
50
|
-
var
|
|
51
|
+
var import_errors2 = require('../errors/index.js');
|
|
51
52
|
var import_client_hooks = require('../validation/client-hooks.js');
|
|
52
53
|
var import_schema_validator = require('../validation/schema-validator.js');
|
|
53
54
|
var import_schema_loader = require('../validation/schema-loader.js');
|
|
@@ -70,7 +71,7 @@ var import_governance = require('../governance/index.js');
|
|
|
70
71
|
var import_match = require('./match.js');
|
|
71
72
|
var import_webhook_url = require('./webhook-url.js');
|
|
72
73
|
var import_task_deadline = require('./task-deadline.js');
|
|
73
|
-
var
|
|
74
|
+
var import_errors3 = require('../errors/index.js');
|
|
74
75
|
function validateIdentity33Payload(...args) {
|
|
75
76
|
return require('../identity-3.3/validation.js').validateIdentity33Payload(...args);
|
|
76
77
|
}
|
|
@@ -196,12 +197,12 @@ function webhookRegistrationFromPreparedCall(_agent, preparedCall) {
|
|
|
196
197
|
const candidate = preparedCall.args.push_notification_config && typeof preparedCall.args.push_notification_config === "object" && !Array.isArray(preparedCall.args.push_notification_config) ? preparedCall.args.push_notification_config : _agent.protocol === "a2a" ? preparedCall.pushNotificationConfig : void 0;
|
|
197
198
|
if (!candidate) return void 0;
|
|
198
199
|
if (typeof candidate.url !== "string") {
|
|
199
|
-
throw new
|
|
200
|
+
throw new import_errors2.ConfigurationError("push_notification_config.url must be a string.", "push_notification_config.url");
|
|
200
201
|
}
|
|
201
202
|
const profile = candidate.signing_profile;
|
|
202
203
|
if (!Object.prototype.hasOwnProperty.call(candidate, "authentication")) {
|
|
203
204
|
if (profile !== void 0 && !["adcp/webhook-signing/v1", "web-bot-auth"].includes(profile))
|
|
204
|
-
throw new
|
|
205
|
+
throw new import_errors2.ConfigurationError("Unsupported webhook signing profile", "signing_profile");
|
|
205
206
|
return {
|
|
206
207
|
callbackUrl: candidate.url,
|
|
207
208
|
mode: "rfc9421",
|
|
@@ -210,7 +211,7 @@ function webhookRegistrationFromPreparedCall(_agent, preparedCall) {
|
|
|
210
211
|
}
|
|
211
212
|
const authentication = candidate.authentication;
|
|
212
213
|
if (!authentication || typeof authentication !== "object" || Array.isArray(authentication)) {
|
|
213
|
-
throw new
|
|
214
|
+
throw new import_errors2.ConfigurationError(
|
|
214
215
|
"push_notification_config.authentication selects legacy verification and must be a supported object.",
|
|
215
216
|
"push_notification_config.authentication"
|
|
216
217
|
);
|
|
@@ -218,7 +219,7 @@ function webhookRegistrationFromPreparedCall(_agent, preparedCall) {
|
|
|
218
219
|
const schemes = authentication.schemes;
|
|
219
220
|
const credentials = authentication.credentials;
|
|
220
221
|
if (!Array.isArray(schemes) || schemes.length !== 1 || schemes[0] !== "HMAC-SHA256" || typeof credentials !== "string" || credentials.length === 0) {
|
|
221
|
-
throw new
|
|
222
|
+
throw new import_errors2.ConfigurationError(
|
|
222
223
|
"This receiver supports legacy HMAC-SHA256 or RFC 9421 push notifications; Bearer and mixed schemes are not supported.",
|
|
223
224
|
"push_notification_config.authentication.schemes"
|
|
224
225
|
);
|
|
@@ -271,13 +272,13 @@ function assertGovernedPayloadHasNoCallbackCredentials(taskName, payload, option
|
|
|
271
272
|
if (!scanResult) return;
|
|
272
273
|
if (scanResult.kind === "limit") {
|
|
273
274
|
const limitDescription = scanResult.limit === "nodes" ? `${GOVERNED_CREDENTIAL_SCAN_MAX_NODES.toLocaleString("en-US")} nested objects` : `${GOVERNED_CREDENTIAL_SCAN_MAX_DEPTH} object levels`;
|
|
274
|
-
throw new
|
|
275
|
+
throw new import_errors2.ConfigurationError(
|
|
275
276
|
`The SDK could not safely inspect the governed ${taskName} payload for callback credentials because it exceeds the ${limitDescription} safety limit. Simplify the payload or move deeply nested extension data out of the governed request before retrying.`,
|
|
276
277
|
"governance.payload"
|
|
277
278
|
);
|
|
278
279
|
}
|
|
279
280
|
const remedy = scanResult.callbackField === "push_notification_config" ? options.sdkInjectedPushConfig ? "Retry with task options `{ disableWebhook: true }` and poll for completion, or use A2A task-status notifications." : "Remove the credential-bearing push notification config and poll for completion, or use A2A task-status notifications." : `Remove the credential-bearing ${scanResult.callbackField} from this governed request and use a non-webhook delivery path.`;
|
|
280
|
-
throw new
|
|
281
|
+
throw new import_errors2.ConfigurationError(
|
|
281
282
|
`Governed ${taskName} cannot forward ${scanResult.path} to the governance agent. The SDK will not disclose receiver authentication credentials, and redacting modern AdCP 3.2 payloads would invalidate seller authorization. ${remedy}`,
|
|
282
283
|
scanResult.path
|
|
283
284
|
);
|
|
@@ -354,9 +355,6 @@ function parseTimestamp(value) {
|
|
|
354
355
|
function resolveIdempotencyKey(taskName, params, serverVersion) {
|
|
355
356
|
const callerSupplied = params && typeof params === "object" && typeof params.idempotency_key === "string" ? params.idempotency_key : void 0;
|
|
356
357
|
if (callerSupplied) return callerSupplied;
|
|
357
|
-
if (serverVersion === "v2") {
|
|
358
|
-
return params && typeof params === "object" && typeof params.buyer_ref === "string" ? params.buyer_ref : void 0;
|
|
359
|
-
}
|
|
360
358
|
if ((0, import_idempotency.requestUsesIdempotency)(taskName, params)) return (0, import_idempotency.generateIdempotencyKey)();
|
|
361
359
|
return void 0;
|
|
362
360
|
}
|
|
@@ -424,7 +422,7 @@ function directContinuationRecoveryKeyMatches(expectedDigest, recoveryKey) {
|
|
|
424
422
|
}
|
|
425
423
|
function assertDirectContinuationOwnerScope(ownerScope) {
|
|
426
424
|
if (typeof ownerScope !== "string" || ownerScope.trim().length === 0 || /[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u.test(ownerScope) || Buffer.byteLength(ownerScope, "utf8") > MAX_DIRECT_CONTINUATION_OWNER_SCOPE_BYTES) {
|
|
427
|
-
throw new
|
|
425
|
+
throw new import_errors2.ConfigurationError(
|
|
428
426
|
"durableContinuationRecovery.ownerScope must be a non-empty authenticated owner/account scope of at most 1024 UTF-8 bytes."
|
|
429
427
|
);
|
|
430
428
|
}
|
|
@@ -558,23 +556,23 @@ class TaskExecutor {
|
|
|
558
556
|
constructor(config = {}) {
|
|
559
557
|
this.config = config;
|
|
560
558
|
if (config.externalTaskSettlementRetentionMs !== void 0 && (!Number.isSafeInteger(config.externalTaskSettlementRetentionMs) || config.externalTaskSettlementRetentionMs < 1)) {
|
|
561
|
-
throw new
|
|
559
|
+
throw new import_errors2.ConfigurationError("externalTaskSettlementRetentionMs must be a positive safe integer.");
|
|
562
560
|
}
|
|
563
561
|
if (config.deferredTaskTtlSeconds !== void 0 && (!Number.isSafeInteger(config.deferredTaskTtlSeconds) || config.deferredTaskTtlSeconds < 1)) {
|
|
564
|
-
throw new
|
|
562
|
+
throw new import_errors2.ConfigurationError("deferredTaskTtlSeconds must be a positive safe integer.");
|
|
565
563
|
}
|
|
566
564
|
if (config.deferredStorage && typeof config.deferredStorage.putIfAbsent !== "function") {
|
|
567
|
-
throw new
|
|
565
|
+
throw new import_errors2.ConfigurationError(
|
|
568
566
|
"Deferred storage must implement atomic putIfAbsent() creation so replicas cannot overwrite a continuation. Use MemoryStorage for single-process tests or implement the DeferredTaskStorage atomic contract."
|
|
569
567
|
);
|
|
570
568
|
}
|
|
571
569
|
if (config.deferredStorage && typeof config.deferredStorage.replaceIfVersion !== "function") {
|
|
572
|
-
throw new
|
|
570
|
+
throw new import_errors2.ConfigurationError(
|
|
573
571
|
"Deferred storage must implement atomic replaceIfVersion() fencing so only one replica can dispatch a resume. Use MemoryStorage for single-process tests or implement the DeferredTaskStorage atomic contract."
|
|
574
572
|
);
|
|
575
573
|
}
|
|
576
574
|
if (config.deferredStorage && typeof config.deferredStorage.takeIfVersion !== "function") {
|
|
577
|
-
throw new
|
|
575
|
+
throw new import_errors2.ConfigurationError(
|
|
578
576
|
"Deferred storage must implement atomic takeIfVersion() cleanup so stale owners cannot delete newer state. Use MemoryStorage for single-process tests or implement the DeferredTaskStorage atomic contract."
|
|
579
577
|
);
|
|
580
578
|
}
|
|
@@ -695,22 +693,6 @@ class TaskExecutor {
|
|
|
695
693
|
}
|
|
696
694
|
(0, import_client_hooks.validateOutgoingRequest)(taskName, params, this.requestValidationMode, debugLogs, this.config.adcpVersion);
|
|
697
695
|
}
|
|
698
|
-
/**
|
|
699
|
-
* After `adaptRequestForServerVersion` has rewritten a v3 request into v2
|
|
700
|
-
* wire format, validate the adapted shape against the cached v2.5 schema
|
|
701
|
-
* bundle. Always warn-only — adapter bugs shouldn't break user requests,
|
|
702
|
-
* and the v3 pre-send pass already vouched for the user-facing input.
|
|
703
|
-
* This pass exists to surface drift between what the adapter emits and
|
|
704
|
-
* what a v2.5 server expects on the wire (primarily as CI signal via the
|
|
705
|
-
* adapter-conformance test suite).
|
|
706
|
-
*
|
|
707
|
-
* Skips silently for tasks without a v2.5 schema or when the v2.5 bundle
|
|
708
|
-
* isn't cached. Caller is responsible for gating on `serverVersion === 'v2'`
|
|
709
|
-
* so v3-targeted traffic doesn't pay the validation cost.
|
|
710
|
-
*/
|
|
711
|
-
validateAdaptedRequestAgainstV2(taskName, adaptedParams, debugLogs) {
|
|
712
|
-
(0, import_client_hooks.validateOutgoingRequest)(taskName, adaptedParams, "warn", debugLogs, "v2.5");
|
|
713
|
-
}
|
|
714
696
|
/**
|
|
715
697
|
* Generate webhook URL for protocol-level webhook support
|
|
716
698
|
*/
|
|
@@ -762,7 +744,7 @@ class TaskExecutor {
|
|
|
762
744
|
buildErrorInstance(taskId, adcpError) {
|
|
763
745
|
if (!adcpError) return void 0;
|
|
764
746
|
const key = this.activeTasks.get(taskId)?.idempotencyKey;
|
|
765
|
-
return (0,
|
|
747
|
+
return (0, import_errors2.adcpErrorToTypedError)(adcpError, key);
|
|
766
748
|
}
|
|
767
749
|
generateWebhookUrl(taskName, operationId, options) {
|
|
768
750
|
return (0, import_webhook_url.resolveWebhookUrl)(this.config.webhookUrlTemplate, this.config.agentId, taskName, operationId, options);
|
|
@@ -792,19 +774,20 @@ class TaskExecutor {
|
|
|
792
774
|
);
|
|
793
775
|
}
|
|
794
776
|
async executeTaskWithinDeadline(agent, taskName, params, inputHandler, options = {}, serverVersion, targetCapabilities, beforeProtocolDispatch, deferredClientContext) {
|
|
777
|
+
if (serverVersion === "v2") throw new import_errors.VersionUnsupportedError(taskName, "version", "v2", agent.agent_uri);
|
|
795
778
|
const effectiveServerVersion = serverVersion ?? "v3";
|
|
796
779
|
this.lastKnownServerVersion = effectiveServerVersion;
|
|
797
780
|
params = structuredClone(params);
|
|
798
781
|
if (options.durableContinuationRecovery !== void 0) {
|
|
799
782
|
assertDirectContinuationOwnerScope(options.durableContinuationRecovery.ownerScope);
|
|
800
783
|
if (agent.protocol !== "a2a") {
|
|
801
|
-
throw new
|
|
784
|
+
throw new import_errors2.ConfigurationError("durableContinuationRecovery is supported only for resumable A2A mutations.");
|
|
802
785
|
}
|
|
803
786
|
if (!(0, import_idempotency.requestUsesIdempotency)(taskName, params)) {
|
|
804
|
-
throw new
|
|
787
|
+
throw new import_errors2.ConfigurationError("durableContinuationRecovery is supported only for mutating AdCP requests.");
|
|
805
788
|
}
|
|
806
789
|
if (!this.config.deferredStorage) {
|
|
807
|
-
throw new
|
|
790
|
+
throw new import_errors2.ConfigurationError("durableContinuationRecovery requires deferredStorage.");
|
|
808
791
|
}
|
|
809
792
|
this.requireDeferredSettlementOperationRouting(this.config.deferredStorage, true);
|
|
810
793
|
}
|
|
@@ -815,7 +798,7 @@ class TaskExecutor {
|
|
|
815
798
|
const versionEnvelope = options.versionEnvelope ?? this.config.versionEnvelope;
|
|
816
799
|
const idempotencyKey = options.skipIdempotencyAutoInject || options.preserveGovernedPayload ? void 0 : resolveIdempotencyKey(taskName, params, serverVersion);
|
|
817
800
|
if (idempotencyKey) (0, import_task_deadline.attachTaskDeadlineIdempotencyKey)(options, idempotencyKey);
|
|
818
|
-
if (
|
|
801
|
+
if (idempotencyKey && params && typeof params === "object" && !params.idempotency_key) {
|
|
819
802
|
params = { ...params, idempotency_key: idempotencyKey };
|
|
820
803
|
}
|
|
821
804
|
const taskState = {
|
|
@@ -2270,7 +2253,7 @@ class TaskExecutor {
|
|
|
2270
2253
|
}
|
|
2271
2254
|
});
|
|
2272
2255
|
} catch (err) {
|
|
2273
|
-
if ((0,
|
|
2256
|
+
if ((0, import_errors2.is401Error)(err)) throw err;
|
|
2274
2257
|
}
|
|
2275
2258
|
}
|
|
2276
2259
|
const response = await import_protocols.ProtocolClient.callTool(
|
|
@@ -2581,7 +2564,7 @@ class TaskExecutor {
|
|
|
2581
2564
|
}
|
|
2582
2565
|
requireDeferredSettlementOperationRouting(storage, direct = false) {
|
|
2583
2566
|
if (typeof storage.putForSettlementOperationIfAbsent !== "function" || typeof storage.getBySettlementOperationId !== "function" || typeof storage.replaceForSettlementOperationIfVersion !== "function") {
|
|
2584
|
-
throw new
|
|
2567
|
+
throw new import_errors2.ConfigurationError(
|
|
2585
2568
|
direct ? "durableContinuationRecovery requires atomic DeferredTaskStorage operation routing. Use MemoryStorage or implement putForSettlementOperationIfAbsent(), getBySettlementOperationId(), and replaceForSettlementOperationIfVersion()." : "Committed deferred settlement requires atomic operation routing so paused mutations remain discoverable across crashes. Use MemoryStorage or implement the DeferredTaskStorage operation-route contract."
|
|
2586
2569
|
);
|
|
2587
2570
|
}
|
|
@@ -2643,7 +2626,7 @@ class TaskExecutor {
|
|
|
2643
2626
|
/** Recover an opt-in direct continuation through its secret operation capability. */
|
|
2644
2627
|
async recoverDirectPauseContinuation(request, publishTerminalTaskStatus = true) {
|
|
2645
2628
|
const storage = this.config.deferredStorage;
|
|
2646
|
-
if (!storage) throw new
|
|
2629
|
+
if (!storage) throw new import_errors2.ConfigurationError("Direct continuation recovery requires deferredStorage.");
|
|
2647
2630
|
this.requireDeferredSettlementOperationRouting(storage, true);
|
|
2648
2631
|
const operationId = typeof request?.operationId === "string" ? request.operationId : "";
|
|
2649
2632
|
const recoveryKey = typeof request?.recoveryKey === "string" ? request.recoveryKey : "";
|
|
@@ -2873,6 +2856,9 @@ class TaskExecutor {
|
|
|
2873
2856
|
if (!state) {
|
|
2874
2857
|
throw new Error("Deferred task not found.");
|
|
2875
2858
|
}
|
|
2859
|
+
if (state.serverVersion === "v2") {
|
|
2860
|
+
throw new import_errors.VersionUnsupportedError(state.taskName, "version", "v2");
|
|
2861
|
+
}
|
|
2876
2862
|
if (state.expiresAt <= Date.now()) {
|
|
2877
2863
|
throw new Error("Deferred task expired.");
|
|
2878
2864
|
}
|
|
@@ -4428,10 +4414,9 @@ class TaskExecutor {
|
|
|
4428
4414
|
/**
|
|
4429
4415
|
* Normalize response data for schema validation
|
|
4430
4416
|
*
|
|
4431
|
-
*
|
|
4432
|
-
* This ensures validation passes for both v2 and v3 server responses.
|
|
4417
|
+
* Normalizes established AdCP 3 product fields before validation.
|
|
4433
4418
|
*/
|
|
4434
|
-
normalizeResponseForValidation(response, taskName
|
|
4419
|
+
normalizeResponseForValidation(response, taskName) {
|
|
4435
4420
|
if (!response) return response;
|
|
4436
4421
|
const stripped = {};
|
|
4437
4422
|
if (typeof response === "object" && !Array.isArray(response)) {
|
|
@@ -4439,9 +4424,8 @@ class TaskExecutor {
|
|
|
4439
4424
|
if (!k.startsWith("_")) stripped[k] = v;
|
|
4440
4425
|
}
|
|
4441
4426
|
} else {
|
|
4442
|
-
return taskName === "get_products"
|
|
4427
|
+
return taskName === "get_products" ? (0, import_pricing_adapter.normalizeGetProductsResponse)(response) : response;
|
|
4443
4428
|
}
|
|
4444
|
-
if (legacyWire) return stripped;
|
|
4445
4429
|
switch (taskName) {
|
|
4446
4430
|
case "get_products":
|
|
4447
4431
|
return (0, import_pricing_adapter.normalizeGetProductsResponse)(stripped);
|
|
@@ -4459,8 +4443,8 @@ class TaskExecutor {
|
|
|
4459
4443
|
const mode = this.responseValidationMode;
|
|
4460
4444
|
const logViolations = this.config.logSchemaViolations !== false;
|
|
4461
4445
|
try {
|
|
4462
|
-
const pinnedValidationVersion =
|
|
4463
|
-
if (taskName === "get_adcp_capabilities"
|
|
4446
|
+
const pinnedValidationVersion = this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? import_version.ADCP_VERSION;
|
|
4447
|
+
if (taskName === "get_adcp_capabilities") {
|
|
4464
4448
|
return (0, import_schema_loader.withServedValidationVersion)(
|
|
4465
4449
|
response,
|
|
4466
4450
|
pinnedValidationVersion,
|
|
@@ -4485,7 +4469,7 @@ class TaskExecutor {
|
|
|
4485
4469
|
}
|
|
4486
4470
|
}
|
|
4487
4471
|
validateResponseSchemaAgainst(response, taskName, debugLogs, mode, logViolations, validationVersion) {
|
|
4488
|
-
const normalizedResponse = this.normalizeResponseForValidation(response, taskName
|
|
4472
|
+
const normalizedResponse = this.normalizeResponseForValidation(response, taskName);
|
|
4489
4473
|
const outcome = (this.config.experimentalIdentity33?.() || this.config.identity33SchemaExperiment && normalizedResponse && typeof normalizedResponse === "object" && (0, import_adcp_version_config.isAdcpVersionAtLeast)(normalizedResponse.adcp_version, "3.3")) && mode !== "off" ? validateIdentity33Payload(taskName, "response", normalizedResponse, validationVersion) : (0, import_client_hooks.validateIncomingResponse)(taskName, normalizedResponse, mode, void 0, validationVersion);
|
|
4490
4474
|
if (outcome.valid) return { valid: true, errors: [] };
|
|
4491
4475
|
const errorStrings = outcome.issues.map((i) => `${i.pointer}: ${i.message}`);
|
|
@@ -4522,7 +4506,6 @@ class TaskExecutor {
|
|
|
4522
4506
|
return void 0;
|
|
4523
4507
|
}
|
|
4524
4508
|
effectiveResponseAdcpVersion(serverVersion) {
|
|
4525
|
-
if ((serverVersion ?? this.lastKnownServerVersion) === "v2") return "v2.5";
|
|
4526
4509
|
return this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? import_version.ADCP_VERSION;
|
|
4527
4510
|
}
|
|
4528
4511
|
/**
|
|
@@ -3,6 +3,7 @@ import { dirname as __adcpDirname } from "node:path";
|
|
|
3
3
|
import { createRequire as __adcpCreateRequire } from "node:module";
|
|
4
4
|
const __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));
|
|
5
5
|
const require2 = __adcpCreateRequire(import.meta.url);
|
|
6
|
+
import { VersionUnsupportedError } from "../errors/index.mjs";
|
|
6
7
|
import { deliveryWebhookRegistrationId } from "./webhook-registration.mjs";
|
|
7
8
|
import { isAdcpVersionAtLeast } from "../utils/adcp-version-config.mjs";
|
|
8
9
|
function validateIdentity33Payload(...args) {
|
|
@@ -332,9 +333,6 @@ function parseTimestamp(value) {
|
|
|
332
333
|
function resolveIdempotencyKey(taskName, params, serverVersion) {
|
|
333
334
|
const callerSupplied = params && typeof params === "object" && typeof params.idempotency_key === "string" ? params.idempotency_key : void 0;
|
|
334
335
|
if (callerSupplied) return callerSupplied;
|
|
335
|
-
if (serverVersion === "v2") {
|
|
336
|
-
return params && typeof params === "object" && typeof params.buyer_ref === "string" ? params.buyer_ref : void 0;
|
|
337
|
-
}
|
|
338
336
|
if (requestUsesIdempotency(taskName, params)) return generateIdempotencyKey();
|
|
339
337
|
return void 0;
|
|
340
338
|
}
|
|
@@ -673,22 +671,6 @@ class TaskExecutor {
|
|
|
673
671
|
}
|
|
674
672
|
validateOutgoingRequest(taskName, params, this.requestValidationMode, debugLogs, this.config.adcpVersion);
|
|
675
673
|
}
|
|
676
|
-
/**
|
|
677
|
-
* After `adaptRequestForServerVersion` has rewritten a v3 request into v2
|
|
678
|
-
* wire format, validate the adapted shape against the cached v2.5 schema
|
|
679
|
-
* bundle. Always warn-only — adapter bugs shouldn't break user requests,
|
|
680
|
-
* and the v3 pre-send pass already vouched for the user-facing input.
|
|
681
|
-
* This pass exists to surface drift between what the adapter emits and
|
|
682
|
-
* what a v2.5 server expects on the wire (primarily as CI signal via the
|
|
683
|
-
* adapter-conformance test suite).
|
|
684
|
-
*
|
|
685
|
-
* Skips silently for tasks without a v2.5 schema or when the v2.5 bundle
|
|
686
|
-
* isn't cached. Caller is responsible for gating on `serverVersion === 'v2'`
|
|
687
|
-
* so v3-targeted traffic doesn't pay the validation cost.
|
|
688
|
-
*/
|
|
689
|
-
validateAdaptedRequestAgainstV2(taskName, adaptedParams, debugLogs) {
|
|
690
|
-
validateOutgoingRequest(taskName, adaptedParams, "warn", debugLogs, "v2.5");
|
|
691
|
-
}
|
|
692
674
|
/**
|
|
693
675
|
* Generate webhook URL for protocol-level webhook support
|
|
694
676
|
*/
|
|
@@ -770,6 +752,7 @@ class TaskExecutor {
|
|
|
770
752
|
);
|
|
771
753
|
}
|
|
772
754
|
async executeTaskWithinDeadline(agent, taskName, params, inputHandler, options = {}, serverVersion, targetCapabilities, beforeProtocolDispatch, deferredClientContext) {
|
|
755
|
+
if (serverVersion === "v2") throw new VersionUnsupportedError(taskName, "version", "v2", agent.agent_uri);
|
|
773
756
|
const effectiveServerVersion = serverVersion ?? "v3";
|
|
774
757
|
this.lastKnownServerVersion = effectiveServerVersion;
|
|
775
758
|
params = structuredClone(params);
|
|
@@ -793,7 +776,7 @@ class TaskExecutor {
|
|
|
793
776
|
const versionEnvelope = options.versionEnvelope ?? this.config.versionEnvelope;
|
|
794
777
|
const idempotencyKey = options.skipIdempotencyAutoInject || options.preserveGovernedPayload ? void 0 : resolveIdempotencyKey(taskName, params, serverVersion);
|
|
795
778
|
if (idempotencyKey) attachTaskDeadlineIdempotencyKey(options, idempotencyKey);
|
|
796
|
-
if (
|
|
779
|
+
if (idempotencyKey && params && typeof params === "object" && !params.idempotency_key) {
|
|
797
780
|
params = { ...params, idempotency_key: idempotencyKey };
|
|
798
781
|
}
|
|
799
782
|
const taskState = {
|
|
@@ -2851,6 +2834,9 @@ class TaskExecutor {
|
|
|
2851
2834
|
if (!state) {
|
|
2852
2835
|
throw new Error("Deferred task not found.");
|
|
2853
2836
|
}
|
|
2837
|
+
if (state.serverVersion === "v2") {
|
|
2838
|
+
throw new VersionUnsupportedError(state.taskName, "version", "v2");
|
|
2839
|
+
}
|
|
2854
2840
|
if (state.expiresAt <= Date.now()) {
|
|
2855
2841
|
throw new Error("Deferred task expired.");
|
|
2856
2842
|
}
|
|
@@ -4406,10 +4392,9 @@ class TaskExecutor {
|
|
|
4406
4392
|
/**
|
|
4407
4393
|
* Normalize response data for schema validation
|
|
4408
4394
|
*
|
|
4409
|
-
*
|
|
4410
|
-
* This ensures validation passes for both v2 and v3 server responses.
|
|
4395
|
+
* Normalizes established AdCP 3 product fields before validation.
|
|
4411
4396
|
*/
|
|
4412
|
-
normalizeResponseForValidation(response, taskName
|
|
4397
|
+
normalizeResponseForValidation(response, taskName) {
|
|
4413
4398
|
if (!response) return response;
|
|
4414
4399
|
const stripped = {};
|
|
4415
4400
|
if (typeof response === "object" && !Array.isArray(response)) {
|
|
@@ -4417,9 +4402,8 @@ class TaskExecutor {
|
|
|
4417
4402
|
if (!k.startsWith("_")) stripped[k] = v;
|
|
4418
4403
|
}
|
|
4419
4404
|
} else {
|
|
4420
|
-
return taskName === "get_products"
|
|
4405
|
+
return taskName === "get_products" ? normalizeGetProductsResponse(response) : response;
|
|
4421
4406
|
}
|
|
4422
|
-
if (legacyWire) return stripped;
|
|
4423
4407
|
switch (taskName) {
|
|
4424
4408
|
case "get_products":
|
|
4425
4409
|
return normalizeGetProductsResponse(stripped);
|
|
@@ -4437,8 +4421,8 @@ class TaskExecutor {
|
|
|
4437
4421
|
const mode = this.responseValidationMode;
|
|
4438
4422
|
const logViolations = this.config.logSchemaViolations !== false;
|
|
4439
4423
|
try {
|
|
4440
|
-
const pinnedValidationVersion =
|
|
4441
|
-
if (taskName === "get_adcp_capabilities"
|
|
4424
|
+
const pinnedValidationVersion = this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? ADCP_VERSION;
|
|
4425
|
+
if (taskName === "get_adcp_capabilities") {
|
|
4442
4426
|
return withServedValidationVersion(
|
|
4443
4427
|
response,
|
|
4444
4428
|
pinnedValidationVersion,
|
|
@@ -4463,7 +4447,7 @@ class TaskExecutor {
|
|
|
4463
4447
|
}
|
|
4464
4448
|
}
|
|
4465
4449
|
validateResponseSchemaAgainst(response, taskName, debugLogs, mode, logViolations, validationVersion) {
|
|
4466
|
-
const normalizedResponse = this.normalizeResponseForValidation(response, taskName
|
|
4450
|
+
const normalizedResponse = this.normalizeResponseForValidation(response, taskName);
|
|
4467
4451
|
const outcome = (this.config.experimentalIdentity33?.() || this.config.identity33SchemaExperiment && normalizedResponse && typeof normalizedResponse === "object" && isAdcpVersionAtLeast(normalizedResponse.adcp_version, "3.3")) && mode !== "off" ? validateIdentity33Payload(taskName, "response", normalizedResponse, validationVersion) : validateIncomingResponse(taskName, normalizedResponse, mode, void 0, validationVersion);
|
|
4468
4452
|
if (outcome.valid) return { valid: true, errors: [] };
|
|
4469
4453
|
const errorStrings = outcome.issues.map((i) => `${i.pointer}: ${i.message}`);
|
|
@@ -4500,7 +4484,6 @@ class TaskExecutor {
|
|
|
4500
4484
|
return void 0;
|
|
4501
4485
|
}
|
|
4502
4486
|
effectiveResponseAdcpVersion(serverVersion) {
|
|
4503
|
-
if ((serverVersion ?? this.lastKnownServerVersion) === "v2") return "v2.5";
|
|
4504
4487
|
return this.responseAdcpVersionForValidation() ?? this.config.adcpVersion ?? ADCP_VERSION;
|
|
4505
4488
|
}
|
|
4506
4489
|
/**
|
|
@@ -12,7 +12,9 @@ export declare class ProductCache {
|
|
|
12
12
|
private key;
|
|
13
13
|
read<T>(scope: string, params: Record<string, unknown>, allowExpired?: boolean): TaskResult<T> | undefined;
|
|
14
14
|
conditionalParams(scope: string, params: Record<string, unknown>): Record<string, unknown>;
|
|
15
|
-
write<T>(scope: string, params: Record<string, unknown>, result: TaskResult<T>, conditionalSnapshot?: TaskResult<T
|
|
15
|
+
write<T>(scope: string, params: Record<string, unknown>, result: TaskResult<T>, conditionalSnapshot?: TaskResult<T>,
|
|
16
|
+
/** @internal Refresh private discovery evidence before a confirmed snapshot is cloned into storage. */
|
|
17
|
+
onRevalidated?: (materialized: TaskResult<T>) => void): TaskResult<T>;
|
|
16
18
|
clear(): void;
|
|
17
19
|
}
|
|
18
20
|
export declare function createProductCache(options?: ProductCacheOptions): ProductCache;
|
|
@@ -12,7 +12,9 @@ export declare class ProductCache {
|
|
|
12
12
|
private key;
|
|
13
13
|
read<T>(scope: string, params: Record<string, unknown>, allowExpired?: boolean): TaskResult<T> | undefined;
|
|
14
14
|
conditionalParams(scope: string, params: Record<string, unknown>): Record<string, unknown>;
|
|
15
|
-
write<T>(scope: string, params: Record<string, unknown>, result: TaskResult<T>, conditionalSnapshot?: TaskResult<T
|
|
15
|
+
write<T>(scope: string, params: Record<string, unknown>, result: TaskResult<T>, conditionalSnapshot?: TaskResult<T>,
|
|
16
|
+
/** @internal Refresh private discovery evidence before a confirmed snapshot is cloned into storage. */
|
|
17
|
+
onRevalidated?: (materialized: TaskResult<T>) => void): TaskResult<T>;
|
|
16
18
|
clear(): void;
|
|
17
19
|
}
|
|
18
20
|
export declare function createProductCache(options?: ProductCacheOptions): ProductCache;
|
|
@@ -86,7 +86,7 @@ class ProductCache {
|
|
|
86
86
|
...typeof data.pricing_version === "string" && { if_pricing_version: data.pricing_version }
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
write(scope, params, result, conditionalSnapshot) {
|
|
89
|
+
write(scope, params, result, conditionalSnapshot, onRevalidated) {
|
|
90
90
|
const key = this.key(scope, params);
|
|
91
91
|
if (!key) return result;
|
|
92
92
|
if (!result.success || result.status !== "completed" || !result.data || typeof result.data !== "object")
|
|
@@ -109,6 +109,7 @@ class ProductCache {
|
|
|
109
109
|
return result;
|
|
110
110
|
if (params.if_wholesale_feed_version !== void 0 || params.if_pricing_version !== void 0) return result;
|
|
111
111
|
completed = { ...result, data: (0, import_legacy_metadata.structuredCloneWithLegacyCreativeMetadata)(oldData) };
|
|
112
|
+
onRevalidated?.(completed);
|
|
112
113
|
} else if (!Array.isArray(data.products)) return result;
|
|
113
114
|
if (!this.entries.has(key) && this.entries.size >= (this.options.maxEntries ?? 1e3))
|
|
114
115
|
this.entries.delete(this.entries.keys().next().value);
|
|
@@ -62,7 +62,7 @@ class ProductCache {
|
|
|
62
62
|
...typeof data.pricing_version === "string" && { if_pricing_version: data.pricing_version }
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
write(scope, params, result, conditionalSnapshot) {
|
|
65
|
+
write(scope, params, result, conditionalSnapshot, onRevalidated) {
|
|
66
66
|
const key = this.key(scope, params);
|
|
67
67
|
if (!key) return result;
|
|
68
68
|
if (!result.success || result.status !== "completed" || !result.data || typeof result.data !== "object")
|
|
@@ -85,6 +85,7 @@ class ProductCache {
|
|
|
85
85
|
return result;
|
|
86
86
|
if (params.if_wholesale_feed_version !== void 0 || params.if_pricing_version !== void 0) return result;
|
|
87
87
|
completed = { ...result, data: structuredCloneWithLegacyCreativeMetadata(oldData) };
|
|
88
|
+
onRevalidated?.(completed);
|
|
88
89
|
} else if (!Array.isArray(data.products)) return result;
|
|
89
90
|
if (!this.entries.has(key) && this.entries.size >= (this.options.maxEntries ?? 1e3))
|
|
90
91
|
this.entries.delete(this.entries.keys().next().value);
|
|
@@ -471,15 +471,9 @@ export type ActionNotAllowedRecovery = {
|
|
|
471
471
|
* - `version`: seller's `major_versions` does not include 3
|
|
472
472
|
* - `idempotency`: seller reports v3 but omits the required
|
|
473
473
|
* `adcp.idempotency.replay_ttl_seconds` declaration
|
|
474
|
-
* - `synthetic`:
|
|
475
|
-
* consumers that pattern-match on the union literal, but the SDK no
|
|
476
|
-
* longer emits it. Sellers whose capabilities are synthesized from
|
|
477
|
-
* `tools/list` are routed through the v2 adapter with a one-time
|
|
478
|
-
* warning; gate retry behavior on `SingleAgentClient.isSyntheticV2()`.
|
|
474
|
+
* - `synthetic`: agent lacks the required AdCP 3 discovery tool.
|
|
479
475
|
*/
|
|
480
|
-
export type VersionUnsupportedReason = 'version' | 'idempotency'
|
|
481
|
-
/** @deprecated SDK no longer emits this reason. See union JSDoc. */
|
|
482
|
-
| 'synthetic';
|
|
476
|
+
export type VersionUnsupportedReason = 'version' | 'idempotency' | 'synthetic';
|
|
483
477
|
/**
|
|
484
478
|
* Error thrown when a mutating call would dispatch to a seller whose
|
|
485
479
|
* capabilities cannot be corroborated as v3. Provides an explicit
|
|
@@ -471,15 +471,9 @@ export type ActionNotAllowedRecovery = {
|
|
|
471
471
|
* - `version`: seller's `major_versions` does not include 3
|
|
472
472
|
* - `idempotency`: seller reports v3 but omits the required
|
|
473
473
|
* `adcp.idempotency.replay_ttl_seconds` declaration
|
|
474
|
-
* - `synthetic`:
|
|
475
|
-
* consumers that pattern-match on the union literal, but the SDK no
|
|
476
|
-
* longer emits it. Sellers whose capabilities are synthesized from
|
|
477
|
-
* `tools/list` are routed through the v2 adapter with a one-time
|
|
478
|
-
* warning; gate retry behavior on `SingleAgentClient.isSyntheticV2()`.
|
|
474
|
+
* - `synthetic`: agent lacks the required AdCP 3 discovery tool.
|
|
479
475
|
*/
|
|
480
|
-
export type VersionUnsupportedReason = 'version' | 'idempotency'
|
|
481
|
-
/** @deprecated SDK no longer emits this reason. See union JSDoc. */
|
|
482
|
-
| 'synthetic';
|
|
476
|
+
export type VersionUnsupportedReason = 'version' | 'idempotency' | 'synthetic';
|
|
483
477
|
/**
|
|
484
478
|
* Error thrown when a mutating call would dispatch to a seller whose
|
|
485
479
|
* capabilities cannot be corroborated as v3. Provides an explicit
|
package/dist/lib/errors/index.js
CHANGED
|
@@ -535,7 +535,7 @@ function buildModeMismatchRecovery(details) {
|
|
|
535
535
|
class VersionUnsupportedError extends ADCPError {
|
|
536
536
|
constructor(taskType, reason, actualVersion, agentUrl) {
|
|
537
537
|
super(
|
|
538
|
-
`Refusing to dispatch
|
|
538
|
+
(taskType === "get_adcp_capabilities" ? "Cannot discover supported AdCP capabilities: " : `Refusing to dispatch task '${taskType}': `) + VersionUnsupportedError.explain(reason, actualVersion)
|
|
539
539
|
);
|
|
540
540
|
this.taskType = taskType;
|
|
541
541
|
this.reason = reason;
|
|
@@ -550,11 +550,11 @@ class VersionUnsupportedError extends ADCPError {
|
|
|
550
550
|
static explain(reason, actualVersion) {
|
|
551
551
|
switch (reason) {
|
|
552
552
|
case "version":
|
|
553
|
-
return `seller
|
|
553
|
+
return actualVersion === "v2" ? "AdCP 2 reached end of life on 2026-08-01. Upgrade the agent to AdCP 3. Migration and older SDK pins: https://github.com/adcontextprotocol/adcp-client/blob/main/docs/migration-drop-adcp-2.md" : `seller does not support the configured AdCP 3 release.`;
|
|
554
554
|
case "idempotency":
|
|
555
|
-
return
|
|
555
|
+
return "seller reports v3 but omits adcp.idempotency.replay_ttl_seconds (required by spec). Upgrade the agent to publish its replay guarantee. If your application does not require this guarantee, configure requireV3ForMutations: false.";
|
|
556
556
|
case "synthetic":
|
|
557
|
-
return
|
|
557
|
+
return "The agent does not advertise get_adcp_capabilities. AdCP 3 capability discovery is required; AdCP 2 compatibility has been removed.";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
}
|
|
@@ -475,7 +475,7 @@ function buildModeMismatchRecovery(details) {
|
|
|
475
475
|
class VersionUnsupportedError extends ADCPError {
|
|
476
476
|
constructor(taskType, reason, actualVersion, agentUrl) {
|
|
477
477
|
super(
|
|
478
|
-
`Refusing to dispatch
|
|
478
|
+
(taskType === "get_adcp_capabilities" ? "Cannot discover supported AdCP capabilities: " : `Refusing to dispatch task '${taskType}': `) + VersionUnsupportedError.explain(reason, actualVersion)
|
|
479
479
|
);
|
|
480
480
|
this.taskType = taskType;
|
|
481
481
|
this.reason = reason;
|
|
@@ -490,11 +490,11 @@ class VersionUnsupportedError extends ADCPError {
|
|
|
490
490
|
static explain(reason, actualVersion) {
|
|
491
491
|
switch (reason) {
|
|
492
492
|
case "version":
|
|
493
|
-
return `seller
|
|
493
|
+
return actualVersion === "v2" ? "AdCP 2 reached end of life on 2026-08-01. Upgrade the agent to AdCP 3. Migration and older SDK pins: https://github.com/adcontextprotocol/adcp-client/blob/main/docs/migration-drop-adcp-2.md" : `seller does not support the configured AdCP 3 release.`;
|
|
494
494
|
case "idempotency":
|
|
495
|
-
return
|
|
495
|
+
return "seller reports v3 but omits adcp.idempotency.replay_ttl_seconds (required by spec). Upgrade the agent to publish its replay guarantee. If your application does not require this guarantee, configure requireV3ForMutations: false.";
|
|
496
496
|
case "synthetic":
|
|
497
|
-
return
|
|
497
|
+
return "The agent does not advertise get_adcp_capabilities. AdCP 3 capability discovery is required; AdCP 2 compatibility has been removed.";
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
}
|