@adcp/sdk 6.0.0 → 6.2.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/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts +4 -0
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.js +10 -0
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.d.ts +9 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.js +15 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/index.d.ts +35 -0
- package/dist/lib/adapters/legacy/v2-5/index.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/index.js +56 -0
- package/dist/lib/adapters/legacy/v2-5/index.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts +9 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js +15 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts +4 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.js +10 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +11 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js +16 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/types.d.ts +40 -0
- package/dist/lib/adapters/legacy/v2-5/types.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/types.js +25 -0
- package/dist/lib/adapters/legacy/v2-5/types.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts +4 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.js +12 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.js.map +1 -0
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/ConversationTypes.d.ts +7 -0
- package/dist/lib/core/ConversationTypes.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +9 -14
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +103 -35
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/TaskExecutor.d.ts +19 -0
- package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
- package/dist/lib/core/TaskExecutor.js +28 -1
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/errors/index.d.ts +30 -0
- package/dist/lib/errors/index.d.ts.map +1 -1
- package/dist/lib/errors/index.js +36 -1
- package/dist/lib/errors/index.js.map +1 -1
- package/dist/lib/index.d.ts +4 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +12 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/protocols/a2a.d.ts.map +1 -1
- package/dist/lib/protocols/a2a.js +5 -1
- package/dist/lib/protocols/a2a.js.map +1 -1
- package/dist/lib/protocols/index.d.ts +53 -3
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +19 -8
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +13 -5
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/protocols/responseSizeLimit.d.ts +25 -0
- package/dist/lib/protocols/responseSizeLimit.d.ts.map +1 -0
- package/dist/lib/protocols/responseSizeLimit.js +141 -0
- package/dist/lib/protocols/responseSizeLimit.js.map +1 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +8 -0
- package/dist/lib/schemas-data/v2.5/adagents.json +494 -0
- package/dist/lib/schemas-data/v2.5/core/activation-key.json +50 -0
- package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +32 -0
- package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +87 -0
- package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +38 -0
- package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +31 -0
- package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +26 -0
- package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +87 -0
- package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +44 -0
- package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +71 -0
- package/dist/lib/schemas-data/v2.5/core/async-response-data.json +88 -0
- package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +33 -0
- package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +409 -0
- package/dist/lib/schemas-data/v2.5/core/context.json +8 -0
- package/dist/lib/schemas-data/v2.5/core/creative-asset.json +125 -0
- package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +31 -0
- package/dist/lib/schemas-data/v2.5/core/creative-filters.json +111 -0
- package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +72 -0
- package/dist/lib/schemas-data/v2.5/core/creative-policy.json +27 -0
- package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +171 -0
- package/dist/lib/schemas-data/v2.5/core/deployment.json +93 -0
- package/dist/lib/schemas-data/v2.5/core/destination.json +53 -0
- package/dist/lib/schemas-data/v2.5/core/error.json +40 -0
- package/dist/lib/schemas-data/v2.5/core/ext.json +8 -0
- package/dist/lib/schemas-data/v2.5/core/format-id.json +47 -0
- package/dist/lib/schemas-data/v2.5/core/format.json +324 -0
- package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +18 -0
- package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +152 -0
- package/dist/lib/schemas-data/v2.5/core/measurement.json +48 -0
- package/dist/lib/schemas-data/v2.5/core/media-buy.json +62 -0
- package/dist/lib/schemas-data/v2.5/core/package.json +72 -0
- package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +90 -0
- package/dist/lib/schemas-data/v2.5/core/placement.json +34 -0
- package/dist/lib/schemas-data/v2.5/core/pricing-option.json +35 -0
- package/dist/lib/schemas-data/v2.5/core/product-filters.json +102 -0
- package/dist/lib/schemas-data/v2.5/core/product.json +153 -0
- package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +115 -0
- package/dist/lib/schemas-data/v2.5/core/promoted-products.json +67 -0
- package/dist/lib/schemas-data/v2.5/core/property-id.json +14 -0
- package/dist/lib/schemas-data/v2.5/core/property-tag.json +16 -0
- package/dist/lib/schemas-data/v2.5/core/property.json +62 -0
- package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +146 -0
- package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +92 -0
- package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +48 -0
- package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +71 -0
- package/dist/lib/schemas-data/v2.5/core/response.json +24 -0
- package/dist/lib/schemas-data/v2.5/core/signal-filters.json +35 -0
- package/dist/lib/schemas-data/v2.5/core/start-timing.json +18 -0
- package/dist/lib/schemas-data/v2.5/core/sub-asset.json +79 -0
- package/dist/lib/schemas-data/v2.5/core/targeting.json +50 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +43 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +166 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +192 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +183 -0
- package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +101 -0
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +73 -0
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +61 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +164 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +245 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-render.json +225 -0
- package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +22 -0
- package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/available-metric.json +18 -0
- package/dist/lib/schemas-data/v2.5/enums/channels.json +18 -0
- package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-action.json +14 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +15 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-status.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +20 -0
- package/dist/lib/schemas-data/v2.5/enums/daast-version.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +15 -0
- package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/feed-format.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/format-category.json +16 -0
- package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/http-method.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +34 -0
- package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/metric-type.json +17 -0
- package/dist/lib/schemas-data/v2.5/enums/notification-type.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/pacing.json +17 -0
- package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +25 -0
- package/dist/lib/schemas-data/v2.5/enums/property-type.json +16 -0
- package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +103 -0
- package/dist/lib/schemas-data/v2.5/enums/task-status.json +29 -0
- package/dist/lib/schemas-data/v2.5/enums/task-type.json +27 -0
- package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +25 -0
- package/dist/lib/schemas-data/v2.5/enums/vast-version.json +14 -0
- package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +12 -0
- package/dist/lib/schemas-data/v2.5/index.json +604 -0
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +31 -0
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +65 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +31 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +36 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +126 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +97 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +54 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +285 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +38 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +21 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +34 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +28 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +33 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +26 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +70 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +58 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +61 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +137 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +437 -0
- package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +80 -0
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +88 -0
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +66 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +25 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +46 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +178 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +149 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +24 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +36 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +129 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +99 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +81 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +73 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +88 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +93 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +81 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +33 -0
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +32 -0
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +68 -0
- package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +59 -0
- package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +100 -0
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +40 -25
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/decisioning/async-outcome.d.ts +16 -10
- package/dist/lib/server/decisioning/async-outcome.d.ts.map +1 -1
- package/dist/lib/server/decisioning/async-outcome.js +15 -56
- package/dist/lib/server/decisioning/async-outcome.js.map +1 -1
- package/dist/lib/server/decisioning/errors-typed.d.ts +10 -4
- package/dist/lib/server/decisioning/errors-typed.d.ts.map +1 -1
- package/dist/lib/server/decisioning/errors-typed.js +13 -29
- package/dist/lib/server/decisioning/errors-typed.js.map +1 -1
- package/dist/lib/server/decisioning/helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/helpers.js +0 -2
- package/dist/lib/server/decisioning/helpers.js.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.js +0 -2
- package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +0 -9
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/start-time.d.ts.map +1 -1
- package/dist/lib/server/decisioning/start-time.js +0 -2
- package/dist/lib/server/decisioning/start-time.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +107 -26
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/types/error-codes.d.ts +196 -9
- package/dist/lib/types/error-codes.d.ts.map +1 -1
- package/dist/lib/types/error-codes.js +104 -26
- package/dist/lib/types/error-codes.js.map +1 -1
- package/dist/lib/types/v2-5/index.d.ts +2 -0
- package/dist/lib/types/v2-5/index.d.ts.map +1 -0
- package/dist/lib/types/v2-5/index.js +30 -0
- package/dist/lib/types/v2-5/index.js.map +1 -0
- package/dist/lib/types/v2-5/tools.generated.d.ts +3507 -0
- package/dist/lib/types/v2-5/tools.generated.d.ts.map +1 -0
- package/dist/lib/types/v2-5/tools.generated.js +6 -0
- package/dist/lib/types/v2-5/tools.generated.js.map +1 -0
- package/dist/lib/utils/buyer-retry-policy.d.ts +136 -0
- package/dist/lib/utils/buyer-retry-policy.d.ts.map +1 -0
- package/dist/lib/utils/buyer-retry-policy.js +247 -0
- package/dist/lib/utils/buyer-retry-policy.js.map +1 -0
- package/dist/lib/utils/creative-adapter.d.ts +32 -2
- package/dist/lib/utils/creative-adapter.d.ts.map +1 -1
- package/dist/lib/utils/creative-adapter.js +42 -6
- package/dist/lib/utils/creative-adapter.js.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.d.ts +18 -8
- package/dist/lib/utils/sync-creatives-adapter.d.ts.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.js +70 -17
- package/dist/lib/utils/sync-creatives-adapter.js.map +1 -1
- package/dist/lib/validation/client-hooks.d.ts +13 -8
- package/dist/lib/validation/client-hooks.d.ts.map +1 -1
- package/dist/lib/validation/client-hooks.js +12 -12
- package/dist/lib/validation/client-hooks.js.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +20 -2
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/docs/guides/BUILD-AN-AGENT.md +2 -0
- package/docs/llms.txt +39 -22
- package/package.json +17 -5
- package/skills/build-seller-agent/SKILL.md +38 -5
- package/skills/build-seller-agent/specialisms/sales-guaranteed.md +4 -3
- package/skills/call-adcp-agent.previous/SKILL.md +83 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adcp/sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "AdCP SDK — client, server, and compliance harnesses for the AdContext Protocol (MCP + A2A)",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"require": "./dist/lib/types/index.js",
|
|
36
36
|
"types": "./dist/lib/types/index.d.ts"
|
|
37
37
|
},
|
|
38
|
+
"./types/v2-5": {
|
|
39
|
+
"import": "./dist/lib/types/v2-5/index.js",
|
|
40
|
+
"require": "./dist/lib/types/v2-5/index.js",
|
|
41
|
+
"types": "./dist/lib/types/v2-5/index.d.ts"
|
|
42
|
+
},
|
|
38
43
|
"./testing": {
|
|
39
44
|
"import": "./dist/lib/testing/index.js",
|
|
40
45
|
"require": "./dist/lib/testing/index.js",
|
|
@@ -121,6 +126,9 @@
|
|
|
121
126
|
"types": [
|
|
122
127
|
"dist/lib/types/index.d.ts"
|
|
123
128
|
],
|
|
129
|
+
"types/v2-5": [
|
|
130
|
+
"dist/lib/types/v2-5/index.d.ts"
|
|
131
|
+
],
|
|
124
132
|
"testing": [
|
|
125
133
|
"dist/lib/testing/index.d.ts"
|
|
126
134
|
],
|
|
@@ -178,12 +186,12 @@
|
|
|
178
186
|
],
|
|
179
187
|
"scripts": {
|
|
180
188
|
"prepare": "node scripts/install-hooks.js 2>/dev/null || true",
|
|
181
|
-
"prepublishOnly": "npm run clean && npm run sync-schemas && (test -f src/lib/types/tools.generated.ts || npm run generate-types) && npm run build:lib && node --test-timeout=60000 --test-force-exit --test test/lib/adcp-client.test.js test/lib/validation.test.js test/lib/zod-schemas.test.js",
|
|
189
|
+
"prepublishOnly": "npm run clean && npm run sync-schemas:all && (test -f src/lib/types/tools.generated.ts || npm run generate-types) && npm run build:lib && node --test-timeout=60000 --test-force-exit --test test/lib/adcp-client.test.js test/lib/validation.test.js test/lib/zod-schemas.test.js",
|
|
182
190
|
"build": "npm run build:lib",
|
|
183
191
|
"build:lib": "npm run sync-version && tsc --project tsconfig.lib.json && tsx scripts/copy-schemas-to-dist.ts",
|
|
184
192
|
"build:test-agents": "npm run build:lib && tsc -p test-agents/tsconfig.json --rootDir test-agents",
|
|
185
|
-
"test": "node --test-timeout=60000 --test-force-exit --test test/*.test.js test/lib/*.test.js",
|
|
186
|
-
"test:lib": "node --test-timeout=60000 --test-force-exit --test test/lib/*.test.js",
|
|
193
|
+
"test": "NODE_ENV=test node --test-timeout=60000 --test-force-exit --test test/*.test.js test/lib/*.test.js",
|
|
194
|
+
"test:lib": "NODE_ENV=test node --test-timeout=60000 --test-force-exit --test test/lib/*.test.js",
|
|
187
195
|
"test:e2e": "node test/e2e/adcp-e2e.test.js",
|
|
188
196
|
"test:protocols": "node test/run-protocol-tests.js",
|
|
189
197
|
"changeset": "changeset",
|
|
@@ -196,8 +204,12 @@
|
|
|
196
204
|
"test:protocol-comparison": "node test/utils/comprehensive-protocol-comparison.js",
|
|
197
205
|
"test:status-report": "node test/utils/final-status-report.js",
|
|
198
206
|
"sync-schemas": "tsx scripts/sync-schemas.ts",
|
|
207
|
+
"sync-schemas:v2.5": "tsx scripts/sync-v2-5-schemas.ts",
|
|
208
|
+
"sync-schemas:all": "npm run sync-schemas && npm run sync-schemas:v2.5",
|
|
199
209
|
"schema-diff": "tsx scripts/schema-diff.ts",
|
|
200
210
|
"generate-types": "tsx scripts/generate-types.ts && tsx scripts/generate-enum-arrays.ts",
|
|
211
|
+
"generate-types:v2.5": "tsx scripts/generate-v2-5-types.ts",
|
|
212
|
+
"generate-types:all": "npm run generate-types && npm run generate-types:v2.5",
|
|
201
213
|
"generate-registry-types": "tsx scripts/generate-registry-types.ts",
|
|
202
214
|
"generate-enum-arrays": "tsx scripts/generate-enum-arrays.ts",
|
|
203
215
|
"generate-inline-enum-arrays": "tsx scripts/generate-inline-enum-arrays.ts",
|
|
@@ -272,7 +284,7 @@
|
|
|
272
284
|
"@modelcontextprotocol/sdk": "^1.17.5",
|
|
273
285
|
"@opentelemetry/api": "^1.0.0",
|
|
274
286
|
"pg": "^8.0.0",
|
|
275
|
-
"zod": "^4.1.
|
|
287
|
+
"zod": "^4.1.5"
|
|
276
288
|
},
|
|
277
289
|
"peerDependenciesMeta": {
|
|
278
290
|
"@opentelemetry/api": {
|
|
@@ -41,6 +41,11 @@ Every sales-_ specialism (including `sales-social`, `sales-broadcast-tv`, `sales
|
|
|
41
41
|
| `list_creatives` | Read the creative library back with pagination | `sales.listCreatives` |
|
|
42
42
|
| `get_media_buy_delivery` | Delivery + spend reporting with `reporting_period`, per-package billing rows | `sales.getMediaBuyDelivery` |
|
|
43
43
|
|
|
44
|
+
> **`sales-guaranteed` minimum tool surface** — register ALL of these or storyboard scenarios will cascade-skip with `skip_reason: missing_tool`:
|
|
45
|
+
> `get_adcp_capabilities`, `sync_accounts`, `list_accounts`, `get_products`, `list_creative_formats`, `create_media_buy`, `update_media_buy`, `get_media_buys`, `sync_creatives`, `get_media_buy_delivery`
|
|
46
|
+
>
|
|
47
|
+
> (`list_creatives` is optional — only required if the seller hosts its own creative library; creative-agent delegates omit it)
|
|
48
|
+
|
|
44
49
|
**Minimum platform skeleton** — every sales-\* seller starts here, then adds specialism-specific behavior on top:
|
|
45
50
|
|
|
46
51
|
```ts
|
|
@@ -522,7 +527,17 @@ productsResponse({
|
|
|
522
527
|
|
|
523
528
|
**`create_media_buy`** — `CreateMediaBuyRequestSchema.shape`
|
|
524
529
|
|
|
525
|
-
|
|
530
|
+
Return `adcpError(...)` for all business validation failures. Error-code matrix — all spec-defined rejections on `create_media_buy` / `update_media_buy`:
|
|
531
|
+
|
|
532
|
+
| Tool | Condition | Code |
|
|
533
|
+
| --- | --- | --- |
|
|
534
|
+
| `create_media_buy` | `performance_standards` or `measurement_terms` on a package are unacceptable | `adcpError('TERMS_REJECTED', { message: '...' })` |
|
|
535
|
+
| `create_media_buy` | `product_id` on a package not in catalog | `adcpError('PRODUCT_NOT_FOUND', { field: 'packages[N].product_id' })` |
|
|
536
|
+
| `create_media_buy` | product exists but inventory sold out / unavailable for the requested flight | `adcpError('PRODUCT_UNAVAILABLE', { field: 'packages[N].product_id' })` |
|
|
537
|
+
| `create_media_buy` | budget below the product's floor price | `adcpError('BUDGET_TOO_LOW', { message: '...' })` |
|
|
538
|
+
| `create_media_buy` | reversed dates, schema violation | `adcpError('INVALID_REQUEST', { message: '...' })` |
|
|
539
|
+
| `update_media_buy` | `media_buy_id` not found | `adcpError('MEDIA_BUY_NOT_FOUND', { field: 'media_buy_id' })` |
|
|
540
|
+
| `update_media_buy` | `package_id` within a valid buy not found | `adcpError('PACKAGE_NOT_FOUND', { field: 'package_id' })` |
|
|
526
541
|
|
|
527
542
|
```
|
|
528
543
|
// Success — revision, confirmed_at, and valid_actions are auto-set:
|
|
@@ -900,7 +915,7 @@ import {
|
|
|
900
915
|
type SalesPlatform,
|
|
901
916
|
type AccountStore,
|
|
902
917
|
} from '@adcp/sdk/server';
|
|
903
|
-
import type { ServeContext } from '@adcp/sdk';
|
|
918
|
+
import type { ServeContext, MediaBuyStatus } from '@adcp/sdk';
|
|
904
919
|
|
|
905
920
|
// Publisher-typed metadata blob round-tripped via Account.ctx_metadata.
|
|
906
921
|
// Whatever shape your adapter wants — the SDK doesn't inspect it.
|
|
@@ -1032,11 +1047,28 @@ class MySeller implements DecisioningPlatform<{}, MySellerMeta> {
|
|
|
1032
1047
|
// wholesale. The patch carries envelope fields (idempotency_key,
|
|
1033
1048
|
// context) that have no business in your domain state. Spreading
|
|
1034
1049
|
// them pollutes `get_media_buys` responses and breaks dedup.
|
|
1035
|
-
|
|
1050
|
+
|
|
1051
|
+
// State machine: creative_assignments arriving advances pending_creatives.
|
|
1052
|
+
// pending_creatives → pending_start (start_time in future) or active (start_time now/past).
|
|
1053
|
+
let status = existing.status as MediaBuyStatus;
|
|
1054
|
+
if (patch.paused === true) {
|
|
1055
|
+
status = 'paused';
|
|
1056
|
+
} else if (
|
|
1057
|
+
status === 'pending_creatives' &&
|
|
1058
|
+
(patch.packages ?? []).some((p: { creative_assignments?: unknown[] }) =>
|
|
1059
|
+
(p.creative_assignments ?? []).length > 0)
|
|
1060
|
+
) {
|
|
1061
|
+
const startTime = existing.start_time ? new Date(existing.start_time as string) : null;
|
|
1062
|
+
status = startTime && startTime > new Date() ? 'pending_start' : 'active';
|
|
1063
|
+
} else if (patch.paused === false && status === 'paused') {
|
|
1064
|
+
status = 'active';
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
const updated = { ...existing, status };
|
|
1036
1068
|
await ctx.store.put('media_buys', mediaBuyId, updated);
|
|
1037
1069
|
return {
|
|
1038
1070
|
media_buy_id: mediaBuyId,
|
|
1039
|
-
status: updated.status as
|
|
1071
|
+
status: updated.status as MediaBuyStatus,
|
|
1040
1072
|
// `affected_packages` is `Package[]` (per `/schemas/latest/core/package.json`)
|
|
1041
1073
|
// — objects with at minimum `package_id`. Don't return bare strings;
|
|
1042
1074
|
// the update-media-buy-response oneOf discriminates against them and
|
|
@@ -1103,8 +1135,9 @@ Key points:
|
|
|
1103
1135
|
3. Response builders are auto-applied — just return the data
|
|
1104
1136
|
4. Use `ctx.store` for state — persists across stateless HTTP requests
|
|
1105
1137
|
5. Set `sandbox: true` on all mock/demo responses
|
|
1106
|
-
6. Use `adcpError()` for business validation failures
|
|
1138
|
+
6. Use `adcpError()` for business validation failures — see the error-code matrix in § create_media_buy above
|
|
1107
1139
|
7. Use `as const` on string literal arrays and union-typed fields in product definitions — TypeScript infers `string[]` from `['display', 'olv']` but the SDK requires specific union types like `MediaChannel[]`. Apply `as const` to `channels`, `delivery_type`, `selection_type`, and `pricing_model` values.
|
|
1140
|
+
8. `pending_creatives` is a transient state — `update_media_buy` MUST advance it to `pending_start` or `active` when `creative_assignments` arrive (see state-machine logic in § update_media_buy above)
|
|
1108
1141
|
|
|
1109
1142
|
## Governance
|
|
1110
1143
|
|
|
@@ -30,8 +30,7 @@ createMediaBuy: async (params, ctx) => {
|
|
|
30
30
|
product_id: pkg.product_id,
|
|
31
31
|
pricing_option_id: pkg.pricing_option_id,
|
|
32
32
|
budget: pkg.budget,
|
|
33
|
-
|
|
34
|
-
collection_list: pkg.collection_list,
|
|
33
|
+
targeting_overlay: pkg.targeting_overlay, // persists property_list / collection_list verbatim
|
|
35
34
|
creative_assignments: pkg.creative_assignments ?? [],
|
|
36
35
|
}));
|
|
37
36
|
const buy = {
|
|
@@ -45,7 +44,9 @@ createMediaBuy: async (params, ctx) => {
|
|
|
45
44
|
},
|
|
46
45
|
```
|
|
47
46
|
|
|
48
|
-
**`get_media_buys` must echo `packages[].property_list` /
|
|
47
|
+
**`get_media_buys` must echo `packages[].targeting_overlay.property_list` / `.collection_list`.** Per the AdCP types, `property_list` and `collection_list` live inside `TargetingOverlay`, not directly on `Package` (see `/schemas/latest/core/package.json` and `/schemas/latest/core/targeting.json`). The `inventory_list_targeting` baseline scenarios send list refs at `packages[].targeting_overlay.{property_list,collection_list}`; `get_media_buys` must echo them back at the same nested path. Persist the full `targeting_overlay` verbatim; echo verbatim. `update_media_buy` should merge new targeting overlays without dropping prior refs.
|
|
48
|
+
|
|
49
|
+
**State transition: `pending_creatives → pending_start / active`.** When `update_media_buy` attaches `creative_assignments` to a buy in `pending_creatives` status, the buy MUST advance: `pending_start` if `start_time` is in the future, `active` if `start_time` is now or past. See the `updateMediaBuy` state-machine logic in `../SKILL.md` § update_media_buy.
|
|
49
50
|
|
|
50
51
|
**Task envelope — when IO signing is required.** Use `registerAdcpTaskTool` from `@adcp/sdk/server` so `tasks/get` returns the completion artifact:
|
|
51
52
|
|
|
@@ -233,14 +233,93 @@ Quick lookup before reading the full envelope. Match what you see in `adcp_error
|
|
|
233
233
|
| `keyword: 'enum'` at `/destinations/*/type` | Made-up destination type | Use `'platform'` (with `platform`) or `'agent'` (with `agent_url`). |
|
|
234
234
|
| Response carries `status: 'submitted'` and `task_id` | Async — work is queued, NOT done | Poll via `tasks/get` (A2A) or the MCP async task extension using `task_id`. |
|
|
235
235
|
| `recovery: 'transient'` (rate limit, 5xx, timeout) | Server-side, retry-safe | Retry with the **same** `idempotency_key`. |
|
|
236
|
-
<<<<<<< Updated upstream
|
|
237
236
|
| `406 Not Acceptable` before any AdCP framing | Hand-rolled HTTP without `Accept: text/event-stream` (MCP transport) | Use `@modelcontextprotocol/sdk` client; it sets the right Accept header. |
|
|
238
|
-
|
|
239
|
-
>>>>>>> Stashed changes
|
|
240
|
-
| `recovery: 'correctable'` | Buyer-side fix | Read `issues[]`, patch the pointers, resend. Most cases close in one attempt. |
|
|
237
|
+
| `recovery: 'correctable'` | Buyer-side fix | Read `issues[]`, patch the pointers, resend. Most cases close in one attempt. (See exceptions below — four codes are technically `correctable` but operator-semantically human-escalate.) |
|
|
241
238
|
| `recovery: 'terminal'` (account suspended, payment required, …) | Requires human action | Don't retry. Surface to the user. |
|
|
242
239
|
| HTTP 401 with `WWW-Authenticate` header | Missing or expired credential | Add `Authorization` per the agent's auth spec; re-auth if applicable. |
|
|
243
240
|
|
|
241
|
+
> **⚠️ Four codes are technically `correctable` but operator-semantically human-escalate. Don't auto-tweak.**
|
|
242
|
+
>
|
|
243
|
+
> - **`POLICY_VIOLATION`** — buyer's content/targeting violates seller policy. Auto-mutating creative or targeting and resubmitting **looks like evasion** to the seller's governance reviewer. Surface to a human.
|
|
244
|
+
> - **`COMPLIANCE_UNSATISFIED`** — required disclosure can't be satisfied by the chosen format. Auto-relaxing the compliance section IS the compliance failure. Surface to a human.
|
|
245
|
+
> - **`GOVERNANCE_DENIED`** — registered governance agent rejected the spend. Auto-shrinking budget and retrying looks like governance evasion. Surface to the plan operator.
|
|
246
|
+
> - **`AUTH_REQUIRED`** — conflates missing creds (genuinely correctable) with revoked / expired creds (operator must rotate). Until [adcontextprotocol/adcp#3730](https://github.com/adcontextprotocol/adcp/issues/3730) splits this into `auth_missing` + `auth_invalid`, treat as escalate-after-one-attempt.
|
|
247
|
+
>
|
|
248
|
+
> Spec recovery on these is `correctable`; operator behavior is human-in-loop. The pattern: read `error.message` + `error.suggestion`, surface to the user, **don't loop**.
|
|
249
|
+
|
|
250
|
+
### Operationalize the recovery rules — `decideRetry`
|
|
251
|
+
|
|
252
|
+
`@adcp/sdk` exports `decideRetry(error, ctx?)` which encodes the operator-grade defaults from the table above plus this section. It returns a discriminated `RetryDecision` so the type system enforces the same-vs-fresh `idempotency_key` rule:
|
|
253
|
+
|
|
254
|
+
```typescript
|
|
255
|
+
import { decideRetry } from '@adcp/sdk';
|
|
256
|
+
import { randomUUID } from 'node:crypto';
|
|
257
|
+
|
|
258
|
+
async function callWithRetry(toolName: string, params: Record<string, unknown>): Promise<unknown> {
|
|
259
|
+
let attempt = 1;
|
|
260
|
+
let idempotencyKey = randomUUID();
|
|
261
|
+
|
|
262
|
+
while (true) {
|
|
263
|
+
try {
|
|
264
|
+
return await agent.call(toolName, { ...params, idempotency_key: idempotencyKey });
|
|
265
|
+
} catch (e) {
|
|
266
|
+
const error = extractAdcpError(e); // your SDK's error extractor
|
|
267
|
+
if (!error) throw e; // not an AdCP-shaped failure — let it bubble
|
|
268
|
+
|
|
269
|
+
const decision = decideRetry(error, { attempt });
|
|
270
|
+
|
|
271
|
+
if (decision.action === 'retry') {
|
|
272
|
+
// Server-side transient (RATE_LIMITED, SERVICE_UNAVAILABLE, CONFLICT).
|
|
273
|
+
// Replay with the SAME idempotency_key after the suggested delay.
|
|
274
|
+
await sleep(decision.delayMs);
|
|
275
|
+
attempt++;
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (decision.action === 'mutate-and-retry') {
|
|
280
|
+
// Buyer-fixable. Apply the seller's correction (decision.field /
|
|
281
|
+
// decision.suggestion) and mint a FRESH idempotency_key — payload
|
|
282
|
+
// changed, so the seller's replay-window must NOT dedupe.
|
|
283
|
+
params = applyCorrection(params, error, decision); // your domain logic
|
|
284
|
+
idempotencyKey = randomUUID();
|
|
285
|
+
await sleep(decision.delayMs); // small jitter (~125-250ms by default)
|
|
286
|
+
attempt++;
|
|
287
|
+
continue;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// 'escalate' — stop the loop and surface to a human. Includes
|
|
291
|
+
// commercial-relationship signals (POLICY_VIOLATION etc.), auth
|
|
292
|
+
// failures, IDEMPOTENCY_EXPIRED (do a natural-key check first!),
|
|
293
|
+
// attempt-cap exhaustion, and unknown vendor codes.
|
|
294
|
+
throw new EscalationRequired(decision.reason, decision.message);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
The discriminated union means TypeScript narrows correctly in each branch — `decision.delayMs` is only available on retry/mutate-and-retry, `decision.field` only on mutate-and-retry, `decision.message` only on escalate.
|
|
301
|
+
|
|
302
|
+
For per-vertical overrides (e.g., a creative-template platform that legitimately auto-fixes `CREATIVE_REJECTED` format mismatches), instantiate `BuyerRetryPolicy` directly:
|
|
303
|
+
|
|
304
|
+
```typescript
|
|
305
|
+
import { BuyerRetryPolicy } from '@adcp/sdk';
|
|
306
|
+
|
|
307
|
+
const policy = new BuyerRetryPolicy({
|
|
308
|
+
overrides: {
|
|
309
|
+
CREATIVE_REJECTED: (error) => {
|
|
310
|
+
if (error.field === 'creative.format' && /unsupported_format/.test(error.message)) {
|
|
311
|
+
return { action: 'mutate-and-retry', delayMs: 0, attemptCap: 2, sameIdempotencyKey: false, reason: 'capability' };
|
|
312
|
+
}
|
|
313
|
+
return null; // fall through to default (escalate as commercial)
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
const decision = policy.decide(error, { attempt });
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Default policy is intentionally conservative — see the source comments in `src/lib/utils/buyer-retry-policy.ts` for per-code reasoning.
|
|
322
|
+
|
|
244
323
|
If your symptom isn't here, fall through to the next section.
|
|
245
324
|
|
|
246
325
|
## If you get stuck
|