@adcp/sdk 6.5.0 → 6.7.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/ADCP_VERSION +1 -1
- package/AGENTS.md +4 -0
- package/README.md +29 -16
- package/bin/adcp-resolve.js +166 -0
- package/bin/adcp.js +547 -9
- package/compliance/cache/{3.0.1 → 3.0.5}/index.json +2 -2
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/audience-sync/index.yaml +1 -1
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/index.yaml +3 -3
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-social/index.yaml +7 -0
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/runner-output-contract.yaml +23 -4
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/storyboard-schema.yaml +106 -1
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/v3-envelope-integrity.yaml +4 -2
- package/dist/lib/adapters/implicit-account-store.d.ts +170 -0
- package/dist/lib/adapters/implicit-account-store.d.ts.map +1 -0
- package/dist/lib/adapters/implicit-account-store.js +313 -0
- package/dist/lib/adapters/implicit-account-store.js.map +1 -0
- package/dist/lib/adapters/index.d.ts +4 -0
- package/dist/lib/adapters/index.d.ts.map +1 -1
- package/dist/lib/adapters/index.js +19 -1
- package/dist/lib/adapters/index.js.map +1 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts +191 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts.map +1 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.js +178 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.js.map +1 -0
- package/dist/lib/adapters/roster-account-store.d.ts +221 -0
- package/dist/lib/adapters/roster-account-store.d.ts.map +1 -0
- package/dist/lib/adapters/roster-account-store.js +194 -0
- package/dist/lib/adapters/roster-account-store.js.map +1 -0
- package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js +5 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
- package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
- package/dist/lib/auth/oauth/discovery.js +6 -1
- package/dist/lib/auth/oauth/discovery.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +22 -0
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +117 -23
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +22 -7
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/mock-server/creative-template/seed-data.d.ts +45 -0
- package/dist/lib/mock-server/creative-template/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/creative-template/seed-data.js +149 -0
- package/dist/lib/mock-server/creative-template/seed-data.js.map +1 -0
- package/dist/lib/mock-server/creative-template/server.d.ts +13 -0
- package/dist/lib/mock-server/creative-template/server.d.ts.map +1 -0
- package/dist/lib/mock-server/creative-template/server.js +325 -0
- package/dist/lib/mock-server/creative-template/server.js.map +1 -0
- package/dist/lib/mock-server/index.d.ts +64 -0
- package/dist/lib/mock-server/index.d.ts.map +1 -0
- package/dist/lib/mock-server/index.js +225 -0
- package/dist/lib/mock-server/index.js.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts +46 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.js +167 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/server.d.ts +14 -0
- package/dist/lib/mock-server/sales-guaranteed/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/server.js +893 -0
- package/dist/lib/mock-server/sales-guaranteed/server.js.map +1 -0
- package/dist/lib/mock-server/sales-social/seed-data.d.ts +34 -0
- package/dist/lib/mock-server/sales-social/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-social/seed-data.js +42 -0
- package/dist/lib/mock-server/sales-social/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sales-social/server.d.ts +17 -0
- package/dist/lib/mock-server/sales-social/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-social/server.js +1219 -0
- package/dist/lib/mock-server/sales-social/server.js.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.d.ts +77 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.js +194 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.js.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/server.d.ts +15 -0
- package/dist/lib/mock-server/signal-marketplace/server.d.ts.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/server.js +382 -0
- package/dist/lib/mock-server/signal-marketplace/server.js.map +1 -0
- package/dist/lib/protocols/mcp.d.ts +4 -4
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +19 -13
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/bound-value.json +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/component.json +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/si-catalog.json +25 -25
- package/dist/lib/schemas-data/3.0/a2ui/surface.json +2 -2
- package/dist/lib/schemas-data/3.0/a2ui/user-action.json +1 -1
- package/dist/lib/schemas-data/3.0/account/get-account-financials-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/get-account-financials-response.json +10 -10
- package/dist/lib/schemas-data/3.0/account/list-accounts-request.json +4 -4
- package/dist/lib/schemas-data/3.0/account/list-accounts-response.json +6 -6
- package/dist/lib/schemas-data/3.0/account/report-usage-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/report-usage-response.json +4 -4
- package/dist/lib/schemas-data/3.0/account/sync-accounts-request.json +9 -9
- package/dist/lib/schemas-data/3.0/account/sync-accounts-response.json +12 -12
- package/dist/lib/schemas-data/3.0/account/sync-governance-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/sync-governance-response.json +8 -8
- package/dist/lib/schemas-data/3.0/adagents.json +32 -32
- package/dist/lib/schemas-data/3.0/brand/acquire-rights-request.json +8 -8
- package/dist/lib/schemas-data/3.0/brand/acquire-rights-response.json +14 -14
- package/dist/lib/schemas-data/3.0/brand/creative-approval-request.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/creative-approval-response.json +10 -10
- package/dist/lib/schemas-data/3.0/brand/get-brand-identity-request.json +3 -3
- package/dist/lib/schemas-data/3.0/brand/get-brand-identity-response.json +8 -8
- package/dist/lib/schemas-data/3.0/brand/get-rights-request.json +7 -7
- package/dist/lib/schemas-data/3.0/brand/get-rights-response.json +9 -9
- package/dist/lib/schemas-data/3.0/brand/revocation-notification.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/rights-pricing-option.json +5 -5
- package/dist/lib/schemas-data/3.0/brand/rights-terms.json +3 -3
- package/dist/lib/schemas-data/3.0/brand/update-rights-request.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/update-rights-response.json +9 -9
- package/dist/lib/schemas-data/3.0/brand.json +14 -14
- package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-response.json +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-response.json +38 -7
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-response.json +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-request.json +11 -5
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-response.json +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-response.json +101 -8
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-response.json +110 -11
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-response.json +38 -7
- package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/package-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-request.json +11 -5
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-response.json +36 -5
- package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-response.json +35 -4
- package/dist/lib/schemas-data/3.0/collection/base-collection-source.json +3 -3
- package/dist/lib/schemas-data/3.0/collection/collection-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.0/collection/collection-list-filters.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/collection-list.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/create-collection-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/create-collection-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/delete-collection-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/delete-collection-list-response.json +3 -3
- package/dist/lib/schemas-data/3.0/collection/get-collection-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/get-collection-list-response.json +10 -10
- package/dist/lib/schemas-data/3.0/collection/list-collection-lists-request.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/list-collection-lists-response.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/update-collection-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/update-collection-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/artifact-webhook-payload.json +3 -3
- package/dist/lib/schemas-data/3.0/content-standards/artifact.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/content-standards.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-response.json +6 -6
- package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-request.json +3 -3
- package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-response.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-request.json +5 -5
- package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-response.json +6 -6
- package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-response.json +8 -8
- package/dist/lib/schemas-data/3.0/core/account-ref.json +2 -2
- package/dist/lib/schemas-data/3.0/core/account.json +9 -9
- package/dist/lib/schemas-data/3.0/core/activation-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/ad-inventory-config.json +1 -1
- package/dist/lib/schemas-data/3.0/core/agent-encryption-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/agent-signing-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/app-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/asset-union.json +53 -0
- package/dist/lib/schemas-data/3.0/core/assets/audio-asset.json +3 -3
- package/dist/lib/schemas-data/3.0/core/assets/brief-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/catalog-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/css-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/daast-asset.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/html-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/image-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/javascript-asset.json +3 -3
- package/dist/lib/schemas-data/3.0/core/assets/markdown-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/text-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/url-asset.json +6 -5
- package/dist/lib/schemas-data/3.0/core/assets/vast-asset.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/video-asset.json +7 -7
- package/dist/lib/schemas-data/3.0/core/assets/webhook-asset.json +7 -7
- package/dist/lib/schemas-data/3.0/core/async-response-data.json +25 -25
- package/dist/lib/schemas-data/3.0/core/attribution-window.json +4 -4
- package/dist/lib/schemas-data/3.0/core/audience-member.json +3 -3
- package/dist/lib/schemas-data/3.0/core/audience-selector.json +4 -4
- package/dist/lib/schemas-data/3.0/core/brand-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/brand-ref.json +2 -2
- package/dist/lib/schemas-data/3.0/core/business-entity.json +2 -2
- package/dist/lib/schemas-data/3.0/core/cancellation-policy.json +2 -2
- package/dist/lib/schemas-data/3.0/core/catalog-field-mapping.json +2 -2
- package/dist/lib/schemas-data/3.0/core/catalog.json +7 -7
- package/dist/lib/schemas-data/3.0/core/catchment.json +5 -5
- package/dist/lib/schemas-data/3.0/core/collection-distribution.json +2 -2
- package/dist/lib/schemas-data/3.0/core/collection-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/collection-selector.json +1 -1
- package/dist/lib/schemas-data/3.0/core/collection.json +13 -13
- package/dist/lib/schemas-data/3.0/core/content-rating.json +2 -2
- package/dist/lib/schemas-data/3.0/core/context.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-asset.json +6 -52
- package/dist/lib/schemas-data/3.0/core/creative-assignment.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-brief.json +4 -4
- package/dist/lib/schemas-data/3.0/core/creative-consumption.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-filters.json +4 -4
- package/dist/lib/schemas-data/3.0/core/creative-item.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-manifest.json +7 -53
- package/dist/lib/schemas-data/3.0/core/creative-policy.json +3 -3
- package/dist/lib/schemas-data/3.0/core/creative-variable.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-variant.json +5 -5
- package/dist/lib/schemas-data/3.0/core/data-provider-signal-selector.json +1 -1
- package/dist/lib/schemas-data/3.0/core/date-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/datetime-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/daypart-target.json +2 -2
- package/dist/lib/schemas-data/3.0/core/deadline-policy.json +1 -1
- package/dist/lib/schemas-data/3.0/core/delivery-forecast.json +7 -7
- package/dist/lib/schemas-data/3.0/core/delivery-metrics.json +5 -5
- package/dist/lib/schemas-data/3.0/core/deployment.json +3 -3
- package/dist/lib/schemas-data/3.0/core/destination-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/destination.json +1 -1
- package/dist/lib/schemas-data/3.0/core/diagnostic-issue.json +1 -1
- package/dist/lib/schemas-data/3.0/core/duration.json +1 -1
- package/dist/lib/schemas-data/3.0/core/education-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/error.json +34 -3
- package/dist/lib/schemas-data/3.0/core/event-custom-data.json +2 -2
- package/dist/lib/schemas-data/3.0/core/event-source-health.json +3 -3
- package/dist/lib/schemas-data/3.0/core/event.json +6 -6
- package/dist/lib/schemas-data/3.0/core/ext.json +1 -1
- package/dist/lib/schemas-data/3.0/core/feature-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/core/flight-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/forecast-point.json +18 -18
- package/dist/lib/schemas-data/3.0/core/forecast-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/format-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/format.json +42 -42
- package/dist/lib/schemas-data/3.0/core/frequency-cap.json +4 -4
- package/dist/lib/schemas-data/3.0/core/generation-credential.json +3 -3
- package/dist/lib/schemas-data/3.0/core/geo-breakdown-support.json +3 -3
- package/dist/lib/schemas-data/3.0/core/hotel-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/identifier.json +2 -2
- package/dist/lib/schemas-data/3.0/core/industry-identifier.json +2 -2
- package/dist/lib/schemas-data/3.0/core/insertion-order.json +1 -1
- package/dist/lib/schemas-data/3.0/core/installment-deadlines.json +2 -2
- package/dist/lib/schemas-data/3.0/core/installment.json +9 -9
- package/dist/lib/schemas-data/3.0/core/job-item.json +3 -3
- package/dist/lib/schemas-data/3.0/core/limited-series.json +1 -1
- package/dist/lib/schemas-data/3.0/core/material-deadline.json +1 -1
- package/dist/lib/schemas-data/3.0/core/mcp-webhook-payload.json +5 -5
- package/dist/lib/schemas-data/3.0/core/measurement-readiness.json +5 -5
- package/dist/lib/schemas-data/3.0/core/measurement-terms.json +3 -3
- package/dist/lib/schemas-data/3.0/core/measurement-window.json +1 -1
- package/dist/lib/schemas-data/3.0/core/media-buy-features.json +1 -1
- package/dist/lib/schemas-data/3.0/core/media-buy.json +7 -7
- package/dist/lib/schemas-data/3.0/core/offering-asset-group.json +16 -16
- package/dist/lib/schemas-data/3.0/core/offering.json +5 -5
- package/dist/lib/schemas-data/3.0/core/optimization-goal.json +6 -6
- package/dist/lib/schemas-data/3.0/core/outcome-measurement.json +2 -2
- package/dist/lib/schemas-data/3.0/core/overlay.json +1 -1
- package/dist/lib/schemas-data/3.0/core/package.json +14 -14
- package/dist/lib/schemas-data/3.0/core/pagination-request.json +1 -1
- package/dist/lib/schemas-data/3.0/core/pagination-response.json +1 -1
- package/dist/lib/schemas-data/3.0/core/performance-feedback.json +3 -3
- package/dist/lib/schemas-data/3.0/core/performance-standard.json +4 -4
- package/dist/lib/schemas-data/3.0/core/placement-definition.json +5 -5
- package/dist/lib/schemas-data/3.0/core/placement.json +2 -2
- package/dist/lib/schemas-data/3.0/core/planned-delivery.json +5 -5
- package/dist/lib/schemas-data/3.0/core/price.json +1 -1
- package/dist/lib/schemas-data/3.0/core/pricing-option.json +10 -10
- package/dist/lib/schemas-data/3.0/core/product-allocation.json +4 -4
- package/dist/lib/schemas-data/3.0/core/product-filters.json +16 -16
- package/dist/lib/schemas-data/3.0/core/product.json +28 -28
- package/dist/lib/schemas-data/3.0/core/property-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property-tag.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property.json +6 -6
- package/dist/lib/schemas-data/3.0/core/proposal.json +6 -6
- package/dist/lib/schemas-data/3.0/core/protocol-envelope.json +3 -3
- package/dist/lib/schemas-data/3.0/core/provenance.json +6 -6
- package/dist/lib/schemas-data/3.0/core/publisher-property-selector.json +3 -3
- package/dist/lib/schemas-data/3.0/core/push-notification-config.json +2 -2
- package/dist/lib/schemas-data/3.0/core/real-estate-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/reference-asset.json +1 -1
- package/dist/lib/schemas-data/3.0/core/reporting-capabilities.json +5 -5
- package/dist/lib/schemas-data/3.0/core/reporting-webhook.json +3 -3
- package/dist/lib/schemas-data/3.0/core/requirements/asset-requirements.json +13 -13
- package/dist/lib/schemas-data/3.0/core/requirements/audio-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/catalog-field-binding.json +4 -4
- package/dist/lib/schemas-data/3.0/core/requirements/catalog-requirements.json +5 -5
- package/dist/lib/schemas-data/3.0/core/requirements/css-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/daast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/html-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/image-asset-requirements.json +2 -2
- package/dist/lib/schemas-data/3.0/core/requirements/javascript-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/markdown-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/offering-asset-constraint.json +4 -4
- package/dist/lib/schemas-data/3.0/core/requirements/text-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/url-asset-requirements.json +2 -2
- package/dist/lib/schemas-data/3.0/core/requirements/vast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/video-asset-requirements.json +6 -6
- package/dist/lib/schemas-data/3.0/core/requirements/webhook-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/response.json +1 -1
- package/dist/lib/schemas-data/3.0/core/rights-constraint.json +4 -4
- package/dist/lib/schemas-data/3.0/core/seller-agent-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/signal-definition.json +3 -3
- package/dist/lib/schemas-data/3.0/core/signal-filters.json +2 -2
- package/dist/lib/schemas-data/3.0/core/signal-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/signal-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.0/core/signal-pricing.json +6 -6
- package/dist/lib/schemas-data/3.0/core/signal-targeting.json +4 -4
- package/dist/lib/schemas-data/3.0/core/special.json +2 -2
- package/dist/lib/schemas-data/3.0/core/start-timing.json +1 -1
- package/dist/lib/schemas-data/3.0/core/store-item.json +3 -3
- package/dist/lib/schemas-data/3.0/core/talent.json +2 -2
- package/dist/lib/schemas-data/3.0/core/targeting.json +20 -20
- package/dist/lib/schemas-data/3.0/core/tasks-get-request.json +3 -3
- package/dist/lib/schemas-data/3.0/core/tasks-get-response.json +7 -7
- package/dist/lib/schemas-data/3.0/core/tasks-list-request.json +11 -11
- package/dist/lib/schemas-data/3.0/core/tasks-list-response.json +6 -6
- package/dist/lib/schemas-data/3.0/core/user-match.json +3 -3
- package/dist/lib/schemas-data/3.0/core/vehicle-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/vendor-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.0/core/x-entity-types.json +1 -1
- package/dist/lib/schemas-data/3.0/creative/asset-types/index.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/creative-feature-result.json +2 -2
- package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-response.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/get-creative-features-request.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/get-creative-features-response.json +8 -8
- package/dist/lib/schemas-data/3.0/creative/list-creative-formats-request.json +11 -11
- package/dist/lib/schemas-data/3.0/creative/list-creative-formats-response.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/list-creatives-request.json +8 -8
- package/dist/lib/schemas-data/3.0/creative/list-creatives-response.json +14 -60
- package/dist/lib/schemas-data/3.0/creative/preview-creative-request.json +11 -11
- package/dist/lib/schemas-data/3.0/creative/preview-creative-response.json +12 -12
- package/dist/lib/schemas-data/3.0/creative/preview-render.json +1 -1
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-request.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-response.json +13 -13
- package/dist/lib/schemas-data/3.0/enums/account-scope.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/account-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/action-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/adcp-protocol.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/adjustment-kind.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/advertiser-industry.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/age-verification-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/assessment-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/asset-content-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/attribution-model.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audience-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audience-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audio-channel-layout.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/auth-scheme.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/available-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/billing-party.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/binary-verdict.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/brand-agent-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/canceled-by.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-item-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/channels.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/cloud-storage-protocol.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/co-branding-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-cadence.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-kind.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-relationship.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/consent-basis.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/content-id-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/content-rating-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-agent-capability.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-approval-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-quality.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-sort-field.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/daast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/daast-version.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/day-of-week.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/delegation-authority.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/delivery-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/demographic-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/derivative-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/device-platform.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/device-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/digital-source-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/dimension-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/disclosure-persistence.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/disclosure-position.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/distance-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/distribution-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/error-code.json +185 -2
- package/dist/lib/schemas-data/3.0/enums/escalation-severity.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/event-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/exclusivity.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feature-check-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feed-format.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feedback-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecast-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecast-range-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecastable-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/format-id-parameter.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/frame-rate-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/frequency-cap-scope.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/genre-taxonomy.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/geo-level.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/gop-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-decision.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-domain.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-phase.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/history-entry-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/http-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/installment-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/javascript-module-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/landing-page-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/makegood-remedy.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/markdown-flavor.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/match-id-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/match-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/media-buy-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/media-buy-valid-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/metric-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/metro-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/moov-atom-position.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/notification-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/outcome-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/pacing.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/payment-terms.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/performance-standard-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/policy-category.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/policy-enforcement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/postal-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/preview-output-format.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/pricing-model.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/production-quality.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/property-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/proposal-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/publisher-identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/purchase-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/reach-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/reporting-frequency.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/response-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/restricted-attribute.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/right-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/right-use.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/rights-billing-period.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/scan-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/si-session-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-value-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/snapshot-unavailable-reason.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/sort-direction.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/sort-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/special-category.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/specialism.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/talent-role.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/task-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/task-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/transport-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/travel-time-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/uid-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/universal-macro.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/update-frequency.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/url-asset-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/validation-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/vast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/vast-version.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/viewability-standard.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/wcag-level.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/webhook-response-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/webhook-security-method.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/account-setup-required.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/audience-too-small.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/budget-too-low.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/conflict.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/creative-rejected.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/policy-violation.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/rate-limited.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/vendor-error-codes.json +1 -1
- package/dist/lib/schemas-data/3.0/extensions/extension-meta.json +1 -1
- package/dist/lib/schemas-data/3.0/extensions/index.json +2 -2
- package/dist/lib/schemas-data/3.0/governance/attribute-definition.json +1 -1
- package/dist/lib/schemas-data/3.0/governance/audience-constraints.json +3 -3
- package/dist/lib/schemas-data/3.0/governance/check-governance-request.json +7 -7
- package/dist/lib/schemas-data/3.0/governance/check-governance-response.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-request.json +4 -4
- package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-response.json +9 -9
- package/dist/lib/schemas-data/3.0/governance/policy-category-definition.json +2 -2
- package/dist/lib/schemas-data/3.0/governance/policy-entry.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/policy-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-request.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-response.json +4 -4
- package/dist/lib/schemas-data/3.0/governance/sync-plans-request.json +13 -13
- package/dist/lib/schemas-data/3.0/governance/sync-plans-response.json +4 -4
- package/dist/lib/schemas-data/3.0/index.json +364 -364
- package/dist/lib/schemas-data/3.0/manifest.json +1190 -0
- package/dist/lib/schemas-data/3.0/manifest.schema.json +202 -0
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-response.json +17 -17
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-request.json +12 -12
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-response.json +15 -15
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-request.json +17 -17
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-response.json +24 -24
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-response.json +19 -19
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/get-products-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/get-products-response.json +8 -8
- package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-response.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/log-event-request.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/log-event-response.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/package-request.json +12 -12
- package/dist/lib/schemas-data/3.0/media-buy/package-update.json +13 -13
- package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-request.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-response.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-response.json +9 -9
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-response.json +9 -9
- package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-request.json +5 -5
- package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-response.json +10 -10
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-request.json +10 -10
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-response.json +10 -10
- package/dist/lib/schemas-data/3.0/pricing-options/cpa-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpc-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpcv-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpm-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpp-option.json +5 -5
- package/dist/lib/schemas-data/3.0/pricing-options/cpv-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/flat-rate-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/price-breakdown.json +2 -2
- package/dist/lib/schemas-data/3.0/pricing-options/price-guidance.json +1 -1
- package/dist/lib/schemas-data/3.0/pricing-options/time-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/vcpm-option.json +4 -4
- package/dist/lib/schemas-data/3.0/property/authorization-result.json +1 -1
- package/dist/lib/schemas-data/3.0/property/base-property-source.json +4 -4
- package/dist/lib/schemas-data/3.0/property/create-property-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/property/create-property-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/delete-property-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/property/delete-property-list-response.json +3 -3
- package/dist/lib/schemas-data/3.0/property/delivery-record.json +3 -3
- package/dist/lib/schemas-data/3.0/property/get-property-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/property/get-property-list-response.json +7 -7
- package/dist/lib/schemas-data/3.0/property/list-property-lists-request.json +5 -5
- package/dist/lib/schemas-data/3.0/property/list-property-lists-response.json +5 -5
- package/dist/lib/schemas-data/3.0/property/property-error.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature-definition.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature-result.json +4 -4
- package/dist/lib/schemas-data/3.0/property/property-feature-value.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature.json +1 -1
- package/dist/lib/schemas-data/3.0/property/property-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-list-filters.json +5 -5
- package/dist/lib/schemas-data/3.0/property/property-list.json +6 -6
- package/dist/lib/schemas-data/3.0/property/update-property-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/property/update-property-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/validate-property-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.0/property/validate-property-delivery-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/validation-result.json +5 -5
- package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-request.json +3 -3
- package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-response.json +26 -26
- package/dist/lib/schemas-data/3.0/signals/activate-signal-request.json +5 -5
- package/dist/lib/schemas-data/3.0/signals/activate-signal-response.json +7 -7
- package/dist/lib/schemas-data/3.0/signals/get-signals-request.json +8 -8
- package/dist/lib/schemas-data/3.0/signals/get-signals-response.json +10 -10
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-capabilities.json +1 -1
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-response.json +4 -4
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-identity.json +1 -1
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-request.json +5 -5
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-response.json +7 -7
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-response.json +7 -7
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-response.json +5 -5
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-ui-element.json +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/adcp-server.d.ts +21 -0
- package/dist/lib/server/adcp-server.d.ts.map +1 -1
- package/dist/lib/server/adcp-server.js +22 -1
- package/dist/lib/server/adcp-server.js.map +1 -1
- package/dist/lib/server/auth-signature.d.ts.map +1 -1
- package/dist/lib/server/auth-signature.js +21 -0
- package/dist/lib/server/auth-signature.js.map +1 -1
- package/dist/lib/server/auth.d.ts +24 -0
- package/dist/lib/server/auth.d.ts.map +1 -1
- package/dist/lib/server/auth.js +71 -3
- package/dist/lib/server/auth.js.map +1 -1
- package/dist/lib/server/create-adcp-server.d.ts +203 -21
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +322 -13
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/decisioning/account.d.ts +340 -21
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js +150 -4
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/admin-router.d.ts.map +1 -1
- package/dist/lib/server/decisioning/admin-router.js +5 -1
- package/dist/lib/server/decisioning/admin-router.js.map +1 -1
- package/dist/lib/server/decisioning/buyer-agent.d.ts +465 -0
- package/dist/lib/server/decisioning/buyer-agent.d.ts.map +1 -0
- package/dist/lib/server/decisioning/buyer-agent.js +372 -0
- package/dist/lib/server/decisioning/buyer-agent.js.map +1 -0
- package/dist/lib/server/decisioning/capabilities.d.ts +39 -7
- package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
- package/dist/lib/server/decisioning/compose.d.ts +93 -0
- package/dist/lib/server/decisioning/compose.d.ts.map +1 -0
- package/dist/lib/server/decisioning/compose.js +81 -0
- package/dist/lib/server/decisioning/compose.js.map +1 -0
- package/dist/lib/server/decisioning/context.d.ts +11 -0
- package/dist/lib/server/decisioning/context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.d.ts +12 -3
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js +45 -2
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/platform-helpers.d.ts +269 -0
- package/dist/lib/server/decisioning/platform-helpers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/platform-helpers.js +316 -0
- package/dist/lib/server/decisioning/platform-helpers.js.map +1 -0
- package/dist/lib/server/decisioning/platform.d.ts +127 -4
- package/dist/lib/server/decisioning/platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/platform.js.map +1 -1
- package/dist/lib/server/decisioning/resolve-presets.d.ts +129 -0
- package/dist/lib/server/decisioning/resolve-presets.d.ts.map +1 -0
- package/dist/lib/server/decisioning/resolve-presets.js +142 -0
- package/dist/lib/server/decisioning/resolve-presets.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts +8 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js +101 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +91 -8
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +764 -130
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.js +1 -0
- package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.js +31 -3
- package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +83 -6
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.js +12 -5
- package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +41 -4
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.d.ts +47 -3
- package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +115 -9
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
- package/dist/lib/server/decisioning/tenant-registry.d.ts.map +1 -1
- package/dist/lib/server/decisioning/tenant-registry.js +8 -3
- package/dist/lib/server/decisioning/tenant-registry.js.map +1 -1
- package/dist/lib/server/decisioning/tenant-store.d.ts +200 -0
- package/dist/lib/server/decisioning/tenant-store.d.ts.map +1 -0
- package/dist/lib/server/decisioning/tenant-store.js +182 -0
- package/dist/lib/server/decisioning/tenant-store.js.map +1 -0
- package/dist/lib/server/decisioning/validate-specialisms.d.ts +66 -0
- package/dist/lib/server/decisioning/validate-specialisms.d.ts.map +1 -0
- package/dist/lib/server/decisioning/validate-specialisms.js +119 -0
- package/dist/lib/server/decisioning/validate-specialisms.js.map +1 -0
- package/dist/lib/server/index.d.ts +11 -2
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +35 -3
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/media-buy-store.d.ts +126 -0
- package/dist/lib/server/media-buy-store.d.ts.map +1 -0
- package/dist/lib/server/media-buy-store.js +171 -0
- package/dist/lib/server/media-buy-store.js.map +1 -0
- package/dist/lib/server/redact.d.ts +52 -0
- package/dist/lib/server/redact.d.ts.map +1 -0
- package/dist/lib/server/redact.js +86 -0
- package/dist/lib/server/redact.js.map +1 -0
- package/dist/lib/server/responses.d.ts +60 -1
- package/dist/lib/server/responses.d.ts.map +1 -1
- package/dist/lib/server/responses.js +110 -1
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/server/serve.d.ts.map +1 -1
- package/dist/lib/server/serve.js +35 -1
- package/dist/lib/server/serve.js.map +1 -1
- package/dist/lib/server/state-machine.d.ts +80 -0
- package/dist/lib/server/state-machine.d.ts.map +1 -0
- package/dist/lib/server/state-machine.js +125 -0
- package/dist/lib/server/state-machine.js.map +1 -0
- package/dist/lib/server/test-controller.d.ts +48 -0
- package/dist/lib/server/test-controller.d.ts.map +1 -1
- package/dist/lib/server/test-controller.js +89 -10
- package/dist/lib/server/test-controller.js.map +1 -1
- package/dist/lib/server/upstream-helpers.d.ts +182 -0
- package/dist/lib/server/upstream-helpers.d.ts.map +1 -0
- package/dist/lib/server/upstream-helpers.js +140 -0
- package/dist/lib/server/upstream-helpers.js.map +1 -0
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts +44 -0
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/canonicalize.js +85 -0
- package/dist/lib/signing/agent-resolver/canonicalize.js.map +1 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.d.ts +54 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.js +49 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.js.map +1 -0
- package/dist/lib/signing/agent-resolver/consistency.d.ts +84 -0
- package/dist/lib/signing/agent-resolver/consistency.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/consistency.js +121 -0
- package/dist/lib/signing/agent-resolver/consistency.js.map +1 -0
- package/dist/lib/signing/agent-resolver/errors.d.ts +68 -0
- package/dist/lib/signing/agent-resolver/errors.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/errors.js +45 -0
- package/dist/lib/signing/agent-resolver/errors.js.map +1 -0
- package/dist/lib/signing/agent-resolver/etld.d.ts +25 -0
- package/dist/lib/signing/agent-resolver/etld.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/etld.js +75 -0
- package/dist/lib/signing/agent-resolver/etld.js.map +1 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +41 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.js +85 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.js.map +1 -0
- package/dist/lib/signing/agent-resolver/index.d.ts +26 -0
- package/dist/lib/signing/agent-resolver/index.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/index.js +33 -0
- package/dist/lib/signing/agent-resolver/index.js.map +1 -0
- package/dist/lib/signing/agent-resolver/jwks-set.d.ts +76 -0
- package/dist/lib/signing/agent-resolver/jwks-set.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/jwks-set.js +124 -0
- package/dist/lib/signing/agent-resolver/jwks-set.js.map +1 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +123 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.js +398 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.js.map +1 -0
- package/dist/lib/signing/agent-resolver/select-agent.d.ts +54 -0
- package/dist/lib/signing/agent-resolver/select-agent.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/select-agent.js +94 -0
- package/dist/lib/signing/agent-resolver/select-agent.js.map +1 -0
- package/dist/lib/signing/agent-resolver/strict-json.d.ts +44 -0
- package/dist/lib/signing/agent-resolver/strict-json.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/strict-json.js +219 -0
- package/dist/lib/signing/agent-resolver/strict-json.js.map +1 -0
- package/dist/lib/signing/capability-priming.d.ts.map +1 -1
- package/dist/lib/signing/capability-priming.js +2 -55
- package/dist/lib/signing/capability-priming.js.map +1 -1
- package/dist/lib/signing/protocol-response.d.ts +18 -0
- package/dist/lib/signing/protocol-response.d.ts.map +1 -0
- package/dist/lib/signing/protocol-response.js +69 -0
- package/dist/lib/signing/protocol-response.js.map +1 -0
- package/dist/lib/signing/server.d.ts +1 -0
- package/dist/lib/signing/server.d.ts.map +1 -1
- package/dist/lib/signing/server.js +10 -1
- package/dist/lib/signing/server.js.map +1 -1
- package/dist/lib/signing/testing.d.ts +64 -0
- package/dist/lib/signing/testing.d.ts.map +1 -1
- package/dist/lib/signing/testing.js +100 -5
- package/dist/lib/signing/testing.js.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +2 -0
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/types.d.ts +8 -0
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/agent-routing.d.ts +92 -0
- package/dist/lib/testing/storyboard/agent-routing.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/agent-routing.js +291 -0
- package/dist/lib/testing/storyboard/agent-routing.js.map +1 -0
- package/dist/lib/testing/storyboard/context.d.ts +22 -0
- package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/context.js +35 -8
- package/dist/lib/testing/storyboard/context.js.map +1 -1
- package/dist/lib/testing/storyboard/default-invariants.js +6 -35
- package/dist/lib/testing/storyboard/default-invariants.js.map +1 -1
- package/dist/lib/testing/storyboard/index.d.ts +1 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/loader.js +84 -12
- package/dist/lib/testing/storyboard/loader.js.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.js +14 -1
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts +17 -0
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +867 -144
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/types.d.ts +254 -12
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +65 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +529 -2
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/test-controller.d.ts +59 -1
- package/dist/lib/testing/test-controller.d.ts.map +1 -1
- package/dist/lib/testing/test-controller.js +30 -0
- package/dist/lib/testing/test-controller.js.map +1 -1
- package/dist/lib/testing/types.d.ts +14 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +299 -141
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +2 -2
- package/dist/lib/types/error-codes.d.ts +168 -108
- package/dist/lib/types/error-codes.d.ts.map +1 -1
- package/dist/lib/types/error-codes.js +23 -190
- package/dist/lib/types/error-codes.js.map +1 -1
- package/dist/lib/types/error-details.aliases.d.ts +48 -0
- package/dist/lib/types/error-details.aliases.d.ts.map +1 -0
- package/dist/lib/types/error-details.aliases.js +41 -0
- package/dist/lib/types/error-details.aliases.js.map +1 -0
- package/dist/lib/types/index.d.ts +14 -1
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js +4 -0
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/inline-enums.generated.d.ts +2 -4
- package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
- package/dist/lib/types/inline-enums.generated.js +10 -7
- package/dist/lib/types/inline-enums.generated.js.map +1 -1
- package/dist/lib/types/manifest.generated.d.ts +280 -0
- package/dist/lib/types/manifest.generated.d.ts.map +1 -0
- package/dist/lib/types/manifest.generated.js +339 -0
- package/dist/lib/types/manifest.generated.js.map +1 -0
- package/dist/lib/types/schemas.generated.d.ts +27229 -25160
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +584 -533
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +146 -21
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/types/v2-5/tools.generated.d.ts +48 -1
- package/dist/lib/types/v2-5/tools.generated.d.ts.map +1 -1
- package/dist/lib/upstream-recorder/index.d.ts +57 -0
- package/dist/lib/upstream-recorder/index.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/index.js +62 -0
- package/dist/lib/upstream-recorder/index.js.map +1 -0
- package/dist/lib/upstream-recorder/recorder.d.ts +35 -0
- package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/recorder.js +507 -0
- package/dist/lib/upstream-recorder/recorder.js.map +1 -0
- package/dist/lib/upstream-recorder/types.d.ts +365 -0
- package/dist/lib/upstream-recorder/types.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/types.js +30 -0
- package/dist/lib/upstream-recorder/types.js.map +1 -0
- package/dist/lib/utils/capabilities.d.ts +66 -3
- package/dist/lib/utils/capabilities.d.ts.map +1 -1
- package/dist/lib/utils/capabilities.js +111 -3
- package/dist/lib/utils/capabilities.js.map +1 -1
- package/dist/lib/utils/error-extraction.d.ts +24 -0
- package/dist/lib/utils/error-extraction.d.ts.map +1 -1
- package/dist/lib/utils/error-extraction.js +0 -2
- package/dist/lib/utils/error-extraction.js.map +1 -1
- package/dist/lib/utils/format-render-builders.d.ts +2 -1
- package/dist/lib/utils/format-render-builders.d.ts.map +1 -1
- package/dist/lib/utils/format-render-builders.js +0 -23
- package/dist/lib/utils/format-render-builders.js.map +1 -1
- package/dist/lib/utils/glob.d.ts +28 -0
- package/dist/lib/utils/glob.d.ts.map +1 -0
- package/dist/lib/utils/glob.js +37 -0
- package/dist/lib/utils/glob.js.map +1 -0
- package/dist/lib/utils/redact-secrets.d.ts +37 -0
- package/dist/lib/utils/redact-secrets.d.ts.map +1 -0
- package/dist/lib/utils/redact-secrets.js +65 -0
- package/dist/lib/utils/redact-secrets.js.map +1 -0
- package/dist/lib/utils/tool-request-schemas.d.ts.map +1 -1
- package/dist/lib/utils/tool-request-schemas.js +1 -0
- package/dist/lib/utils/tool-request-schemas.js.map +1 -1
- package/dist/lib/validation/hints.d.ts +50 -0
- package/dist/lib/validation/hints.d.ts.map +1 -0
- package/dist/lib/validation/hints.js +194 -0
- package/dist/lib/validation/hints.js.map +1 -0
- package/dist/lib/validation/schema-errors.d.ts +2 -1
- package/dist/lib/validation/schema-errors.d.ts.map +1 -1
- package/dist/lib/validation/schema-errors.js +39 -4
- package/dist/lib/validation/schema-errors.js.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts +13 -0
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +20 -0
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/validation/schema-validator.d.ts +107 -2
- package/dist/lib/validation/schema-validator.d.ts.map +1 -1
- package/dist/lib/validation/schema-validator.js +205 -12
- package/dist/lib/validation/schema-validator.js.map +1 -1
- package/dist/lib/validation/sync-creatives.d.ts +30 -0
- package/dist/lib/validation/sync-creatives.d.ts.map +1 -1
- package/dist/lib/version.d.ts +7 -7
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +9 -5
- package/dist/lib/version.js.map +1 -1
- package/docs/guides/BUILD-AN-AGENT.md +267 -137
- package/docs/llms.txt +110 -55
- package/examples/CONTRIBUTING.md +173 -0
- package/examples/README.md +32 -0
- package/examples/comply-controller-seller.ts +9 -17
- package/examples/decisioning-platform-broadcast-tv.ts +3 -2
- package/examples/decisioning-platform-implicit-accounts.ts +168 -0
- package/examples/decisioning-platform-mock-seller.ts +3 -2
- package/examples/decisioning-platform-multi-tenant-db.ts +317 -0
- package/examples/decisioning-platform-programmatic.ts +3 -2
- package/examples/hello-cluster.ts +421 -0
- package/examples/hello_creative_adapter_template.ts +528 -0
- package/examples/hello_seller_adapter_guaranteed.ts +1080 -0
- package/examples/hello_seller_adapter_multi_tenant.ts +1046 -0
- package/examples/hello_seller_adapter_social.ts +829 -0
- package/examples/hello_signals_adapter_marketplace.ts +532 -0
- package/examples/seller-test-controller.ts +22 -28
- package/package.json +30 -3
- package/skills/SHAPE-GOTCHAS.md +233 -0
- package/skills/build-brand-rights-agent/SKILL.md +121 -16
- package/skills/build-creative-agent/SKILL.md +25 -1
- package/skills/build-decisioning-platform/advanced/MULTI-TENANT.md +104 -28
- package/skills/build-holdco-agent/SKILL.md +250 -0
- package/skills/build-seller-agent/SKILL.md +313 -49
- package/skills/build-seller-agent/specialisms/sales-broadcast-tv.md +2 -0
- package/skills/build-seller-agent/specialisms/sales-guaranteed.md +18 -0
- package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +2 -0
- package/skills/build-seller-agent/specialisms/sales-social.md +63 -2
- package/skills/build-signals-agent/SKILL.md +2 -0
- package/skills/call-adcp-agent.previous/SKILL.md +8 -86
- package/skills/run-by-experts/SKILL.md +116 -0
- package/skills/triage-storyboard-failure/SKILL.md +96 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/collection-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/content-standards/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-ad-server/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/generative-seller.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-template/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-aware-seller/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-delivery-monitor/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/property-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-broadcast-tv/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-catalog-driven/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-non-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-proposal-mode/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-owned/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/acme-outdoor.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/bistro-oranje.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/nova-motors.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/osei-natural.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/signed-requests-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/substitution-observer-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/summit-foods.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/webhook-receiver-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/002-full-plan.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/README.md +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/canonicalization.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/README.md +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/capability-discovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/collection-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/content-standards-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/deterministic-testing.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/error-compliance.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/fictional-entities.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-media-buys-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-signals-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/idempotency.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-creative-formats.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-list-accounts.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/property-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/schema-validation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/security.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/signed-requests.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/webhook-emission.yaml +0 -0
|
@@ -38,9 +38,10 @@
|
|
|
38
38
|
* `tasks/get` wire handler, per-server + module-level `publishStatusChange`.
|
|
39
39
|
*
|
|
40
40
|
* **Still deferred (rc.1+):** MCP Resources subscription projection for
|
|
41
|
-
* `publishStatusChange
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
* `publishStatusChange`. The no-account tool surface (`preview_creative`,
|
|
42
|
+
* `list_creative_formats`, `provide_performance_feedback`) is now typed
|
|
43
|
+
* via `NoAccountCtx<TCtxMeta>` — handlers receive `ctx.account: Account |
|
|
44
|
+
* undefined` and must narrow before reading `ctx_metadata`.
|
|
44
45
|
*
|
|
45
46
|
* Status: Preview / 6.0. Not yet exported from the public `./server`
|
|
46
47
|
* subpath; reach in via `@adcp/sdk/server/decisioning/runtime` for
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
* @public
|
|
50
51
|
*/
|
|
51
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.INTENTIONALLY_UNHYDRATED_ENTITIES = exports.ENTITY_TO_RESOURCE_KIND = void 0;
|
|
52
54
|
exports.createAdcpServerFromPlatform = createAdcpServerFromPlatform;
|
|
53
55
|
exports._resetMergeSeamDedupe = _resetMergeSeamDedupe;
|
|
54
56
|
exports.getAllAdcpMigrations = getAllAdcpMigrations;
|
|
@@ -58,12 +60,14 @@ const account_1 = require("../account");
|
|
|
58
60
|
const async_outcome_1 = require("../async-outcome");
|
|
59
61
|
const errors_1 = require("../../errors");
|
|
60
62
|
const validate_platform_1 = require("./validate-platform");
|
|
63
|
+
const validate_specialisms_1 = require("../validate-specialisms");
|
|
61
64
|
const to_context_1 = require("./to-context");
|
|
62
65
|
const ctx_metadata_1 = require("../../ctx-metadata");
|
|
63
66
|
const idempotency_1 = require("../../idempotency");
|
|
64
67
|
const pg_1 = require("../../idempotency/backends/pg");
|
|
65
68
|
const postgres_task_registry_1 = require("./postgres-task-registry");
|
|
66
69
|
const async_outcome_2 = require("../async-outcome");
|
|
70
|
+
const entity_hydration_generated_1 = require("./entity-hydration.generated");
|
|
67
71
|
const zod_1 = require("zod");
|
|
68
72
|
const task_registry_1 = require("./task-registry");
|
|
69
73
|
const protocol_for_tool_1 = require("./protocol-for-tool");
|
|
@@ -84,6 +88,7 @@ const DEFAULT_FRAMEWORK_LOGGER = {
|
|
|
84
88
|
};
|
|
85
89
|
const status_changes_1 = require("../status-changes");
|
|
86
90
|
const comply_controller_1 = require("../../../testing/comply-controller");
|
|
91
|
+
const seed_merge_1 = require("../../../testing/seed-merge");
|
|
87
92
|
const normalize_errors_1 = require("../../normalize-errors");
|
|
88
93
|
/**
|
|
89
94
|
* Apply `normalizeErrors` to a sync_creatives row's optional `errors`
|
|
@@ -99,6 +104,61 @@ function normalizeRowErrors(row) {
|
|
|
99
104
|
return row;
|
|
100
105
|
return { ...row, errors: (0, normalize_errors_1.normalizeErrors)(row.errors) };
|
|
101
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Enforce the documented `'implicit'`-resolution refusal. When a platform
|
|
109
|
+
* declares `accounts.resolution: 'implicit'`, the framework refuses inline
|
|
110
|
+
* `account_id` references on the wire — the buyer is expected to call
|
|
111
|
+
* `sync_accounts` first, then the framework resolves the account from the
|
|
112
|
+
* authenticated principal on subsequent calls. Documented at
|
|
113
|
+
* `AccountStore.resolution` in `account.ts`.
|
|
114
|
+
*
|
|
115
|
+
* Throws `AdcpError('INVALID_REQUEST')` before reaching the adopter's
|
|
116
|
+
* `accounts.resolve`, so each adopter doesn't reimplement the same
|
|
117
|
+
* `if (ref?.account_id) return null` branch and the wire response is
|
|
118
|
+
* consistent across implicit-mode platforms. The brand+operator union arm
|
|
119
|
+
* is permitted — the strict-reading docstring claim only refuses
|
|
120
|
+
* `account_id`-shaped references.
|
|
121
|
+
*/
|
|
122
|
+
function refuseImplicitAccountId(resolution, ref) {
|
|
123
|
+
if (resolution !== 'implicit')
|
|
124
|
+
return;
|
|
125
|
+
if ((0, account_1.refAccountId)(ref) === undefined)
|
|
126
|
+
return;
|
|
127
|
+
throw new async_outcome_1.AdcpError('INVALID_REQUEST', {
|
|
128
|
+
message: 'This platform resolves accounts from the authenticated principal — call sync_accounts first; do not pass account.account_id inline.',
|
|
129
|
+
field: 'account.account_id',
|
|
130
|
+
suggestion: 'Call sync_accounts to associate accounts with your principal, then omit account_id on subsequent calls.',
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Dev-mode warning when a multi-id read tool returns fewer rows than
|
|
135
|
+
* the buyer requested — the canonical signal that the platform is
|
|
136
|
+
* silently truncating to `media_buy_ids[0]` (closes #1342, follow-up
|
|
137
|
+
* #1399). Catches the bug class where adopters write the recommended
|
|
138
|
+
* pattern wrong on first pass; quiet in production where legitimate
|
|
139
|
+
* misses (deleted, archived, cross-account) are routine and warning
|
|
140
|
+
* on every miss would be noise.
|
|
141
|
+
*
|
|
142
|
+
* Suppressible via `ADCP_SUPPRESS_MULTI_ID_WARN=1` for adopters whose
|
|
143
|
+
* legitimate-miss rate is high (deleted-account-rich datasets, etc.).
|
|
144
|
+
*/
|
|
145
|
+
function warnIfTruncatedMultiIdResponse(toolName, requestedIds, responseArray, logger) {
|
|
146
|
+
if (process.env.NODE_ENV === 'production')
|
|
147
|
+
return;
|
|
148
|
+
if (process.env.ADCP_SUPPRESS_MULTI_ID_WARN === '1')
|
|
149
|
+
return;
|
|
150
|
+
if (!requestedIds || requestedIds.length === 0)
|
|
151
|
+
return;
|
|
152
|
+
const returned = Array.isArray(responseArray) ? responseArray.length : 0;
|
|
153
|
+
if (returned >= requestedIds.length)
|
|
154
|
+
return;
|
|
155
|
+
// Empty `media_buy_ids` is filtered above as paginated-mode (no truncation
|
|
156
|
+
// possible without a request to compare against).
|
|
157
|
+
logger.warn(`[adcp/sdk] ${toolName}: platform returned ${returned} row${returned === 1 ? '' : 's'} for ${requestedIds.length} requested media_buy_ids — ` +
|
|
158
|
+
`the platform may be silently truncating to media_buy_ids[0]. ` +
|
|
159
|
+
`See https://github.com/adcontextprotocol/adcp-client/issues/1342 for the multi-id pass-through contract. ` +
|
|
160
|
+
`Suppress with ADCP_SUPPRESS_MULTI_ID_WARN=1 if legitimate misses (deleted / cross-account) are routine.`);
|
|
161
|
+
}
|
|
102
162
|
// Use `DecisioningPlatform<any, any>` for the generic constraint. The default
|
|
103
163
|
// `TCtxMeta = Record<string, unknown>` doesn't accept adopter metadata interfaces
|
|
104
164
|
// without an index signature (e.g., `interface MyMeta { brand_id: string }`),
|
|
@@ -106,6 +166,37 @@ function normalizeRowErrors(row) {
|
|
|
106
166
|
// framework, so we don't need to constrain it here.
|
|
107
167
|
function createAdcpServerFromPlatform(platform, opts) {
|
|
108
168
|
(0, validate_platform_1.validatePlatform)(platform);
|
|
169
|
+
// Specialism→required-tools coverage check (adcp-client#1299).
|
|
170
|
+
//
|
|
171
|
+
// For each specialism declared in `capabilities.specialisms[]`, verify the
|
|
172
|
+
// platform exposes a method matching every tool the manifest's
|
|
173
|
+
// `SPECIALISM_REQUIRED_TOOLS` lists for that specialism. Catches the
|
|
174
|
+
// common adopter mistake of declaring `'sales-non-guaranteed'` while
|
|
175
|
+
// forgetting to implement `getProducts` / `createMediaBuy` / etc. —
|
|
176
|
+
// would otherwise surface as a runtime error when a buyer actually
|
|
177
|
+
// calls the missing tool.
|
|
178
|
+
//
|
|
179
|
+
// Default behavior is console.warn — strictSpecialismValidation: true
|
|
180
|
+
// escalates to a thrown `PlatformConfigError`. The check is method-
|
|
181
|
+
// presence-anywhere on the platform (not method-on-specific-field) so
|
|
182
|
+
// adopters with non-standard layouts (e.g., a single mega-platform vs.
|
|
183
|
+
// the conventional sales/creative/accounts split) aren't false-positively
|
|
184
|
+
// flagged.
|
|
185
|
+
{
|
|
186
|
+
const specialisms = platform.capabilities.specialisms;
|
|
187
|
+
const issues = (0, validate_specialisms_1.validateSpecialismRequiredTools)(platform, specialisms);
|
|
188
|
+
if (issues.length > 0) {
|
|
189
|
+
const messages = issues.map(validate_specialisms_1.formatSpecialismIssue);
|
|
190
|
+
if (opts.strictSpecialismValidation === true) {
|
|
191
|
+
throw new validate_platform_1.PlatformConfigError(`Platform missing methods for ${issues.length} specialism-required tool(s). ` +
|
|
192
|
+
`Strict mode (\`strictSpecialismValidation: true\`) treats this as fatal.\n` +
|
|
193
|
+
messages.map(m => ` - ${m}`).join('\n'));
|
|
194
|
+
}
|
|
195
|
+
// eslint-disable-next-line no-console
|
|
196
|
+
for (const message of messages)
|
|
197
|
+
console.warn(message);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
109
200
|
// Compliance-testing capability/adapter consistency.
|
|
110
201
|
//
|
|
111
202
|
// Two failure modes the framework refuses to ship:
|
|
@@ -270,9 +361,21 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
270
361
|
const requireOperatorAuth = platform.capabilities.requireOperatorAuth ?? platform.accounts.resolution === 'explicit';
|
|
271
362
|
const supportedBillings = platform.capabilities.supportedBillings;
|
|
272
363
|
const hasAccountProjection = requireOperatorAuth === true || (supportedBillings?.length ?? 0) > 0;
|
|
364
|
+
// Schema requires `supported_billing` (minItems: 1) whenever the account
|
|
365
|
+
// block is emitted. Default to ['agent'] when adopters don't declare —
|
|
366
|
+
// matches the documented platform interface default at
|
|
367
|
+
// `capabilities.ts:130` ("Defaults to ['agent'] when omitted"). v6 was
|
|
368
|
+
// dropping the field on undefined which failed schema validation; v5's
|
|
369
|
+
// `?? []` would also fail (minItems: 1). 'agent' (agent consolidates
|
|
370
|
+
// billing) is the least-surprising default for non-media-buy specialisms.
|
|
371
|
+
// An adopter passing supportedBillings: [] also lands in the default
|
|
372
|
+
// branch — the closed enum has no semantic meaning for empty, and
|
|
373
|
+
// emitting an empty array would fail schema regardless.
|
|
273
374
|
const accountOverrides = {
|
|
274
375
|
...(requireOperatorAuth === true && { require_operator_auth: true }),
|
|
275
|
-
...(
|
|
376
|
+
...(hasAccountProjection && {
|
|
377
|
+
supported_billing: supportedBillings?.length ? [...supportedBillings] : ['agent'],
|
|
378
|
+
}),
|
|
276
379
|
};
|
|
277
380
|
// Compliance-testing scenarios projection. Adopters who claim the
|
|
278
381
|
// `compliance_testing` capability AND wire `complyTest` adapters
|
|
@@ -336,9 +439,62 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
336
439
|
`Set ADCP_DECISIONING_ALLOW_ACCOUNT_ID_PRINCIPAL=1 to silence this warning.`);
|
|
337
440
|
}
|
|
338
441
|
}
|
|
442
|
+
// Auto-seed: when the platform has a `getProducts` catalog and the adopter
|
|
443
|
+
// wired `complyTest` without ANY explicit seed adapters and without a
|
|
444
|
+
// `testController` bridge, the framework provides default in-memory seed
|
|
445
|
+
// adapters so storyboards can call `seed_product` / `seed_pricing_option`
|
|
446
|
+
// without the adopter writing any adapter code. The bridge makes seeded
|
|
447
|
+
// products visible in `get_products` responses on sandbox requests.
|
|
448
|
+
//
|
|
449
|
+
// **Multi-tenant isolation.** The store is keyed by `account_id` so two
|
|
450
|
+
// sandbox accounts on the same server (e.g. multiple tenants under one
|
|
451
|
+
// TenantRegistry-fronted server, or distinct sandbox accounts on a
|
|
452
|
+
// single-tenant server) never see each other's seeded products in
|
|
453
|
+
// `get_products`. Adopters who need tighter scoping (per-session,
|
|
454
|
+
// per-brand, per-storyboard-run) wire `bridgeFromSessionStore` explicitly
|
|
455
|
+
// — auto-seed is the floor, not the ceiling.
|
|
456
|
+
//
|
|
457
|
+
// **Caveat.** The comply-controller's process-wide `SeedFixtureCache`
|
|
458
|
+
// (`test-controller.ts createSeedFixtureCache`) keys by
|
|
459
|
+
// `seed_product:${product_id}` and rejects divergent fixtures replayed
|
|
460
|
+
// under the same id with `INVALID_PARAMS`. So two sandbox accounts can
|
|
461
|
+
// freely seed *different* product_ids without leakage, but cannot seed
|
|
462
|
+
// the same product_id with different fixtures on one server. That's a
|
|
463
|
+
// pre-existing SDK limitation independent of auto-seed; lifting it
|
|
464
|
+
// requires per-account seedCache scoping — tracked as a follow-up.
|
|
465
|
+
//
|
|
466
|
+
// The entire auto-seed path is skipped when EITHER `seed.product` OR
|
|
467
|
+
// `seed.pricing_option` is explicitly wired — mixing explicit and auto-seed
|
|
468
|
+
// adapters against the same bridge would yield inconsistent `get_products`
|
|
469
|
+
// responses. In that case the adopter owns the full seed + bridge wiring.
|
|
470
|
+
const autoSeedStore = opts.complyTest != null &&
|
|
471
|
+
platform.sales?.getProducts != null &&
|
|
472
|
+
!opts.testController &&
|
|
473
|
+
!opts.complyTest.seed?.product &&
|
|
474
|
+
!opts.complyTest.seed?.pricing_option
|
|
475
|
+
? new Map()
|
|
476
|
+
: undefined;
|
|
339
477
|
const config = {
|
|
340
478
|
...opts,
|
|
479
|
+
...(autoSeedStore != null && { testController: makeAutoSeedBridge(autoSeedStore) }),
|
|
341
480
|
...(projectedCapabilitiesConfig != null && { capabilities: projectedCapabilitiesConfig }),
|
|
481
|
+
// Buyer-agent registry (Phase 1 of #1269). Threaded through from the
|
|
482
|
+
// platform so the v5 dispatcher can call `agentRegistry.resolve()` on
|
|
483
|
+
// every request and populate `ctx.agent`. When the platform omits the
|
|
484
|
+
// field, the v5 surface stays unchanged.
|
|
485
|
+
//
|
|
486
|
+
// Precedence: this spread runs AFTER `...opts`, so `platform.agentRegistry`
|
|
487
|
+
// wins over any `opts.agentRegistry` an adopter passes via the v5 escape
|
|
488
|
+
// hatch. Same convention as the `idempotency` spread below — the platform
|
|
489
|
+
// is the authoritative v6 surface; opts is a low-level escape hatch.
|
|
490
|
+
...(platform.agentRegistry !== undefined && { agentRegistry: platform.agentRegistry }),
|
|
491
|
+
// Server-level `instructions` (closes #1312). Same precedence pattern as
|
|
492
|
+
// `agentRegistry` above — platform-declared instructions win over the
|
|
493
|
+
// v5 `opts.instructions` escape hatch when both are present, so v6
|
|
494
|
+
// adopters can colocate platform facts / decision policy with the rest
|
|
495
|
+
// of their platform declaration.
|
|
496
|
+
...(platform.instructions !== undefined && { instructions: platform.instructions }),
|
|
497
|
+
...(platform.onInstructionsError !== undefined && { onInstructionsError: platform.onInstructionsError }),
|
|
342
498
|
// Pool-derived stores override the spread above when adopters supplied
|
|
343
499
|
// `pool` but no explicit per-store opt. Explicit values still win.
|
|
344
500
|
...(effectiveIdempotency !== undefined && { idempotency: effectiveIdempotency }),
|
|
@@ -359,10 +515,15 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
359
515
|
let resolved = false;
|
|
360
516
|
let resolvedAccountId;
|
|
361
517
|
try {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
518
|
+
// Enforce the JSDoc contract documented at
|
|
519
|
+
// `AccountStore.resolution`: implicit-mode platforms refuse inline
|
|
520
|
+
// `account_id` references — buyers call sync_accounts first, then
|
|
521
|
+
// the framework resolves accounts from the auth principal on
|
|
522
|
+
// subsequent calls. The brand+operator union arm is permitted
|
|
523
|
+
// (used during the initial sync_accounts onboarding flow); only
|
|
524
|
+
// the `{ account_id }` arm is refused. Closes adcp-client#1364.
|
|
525
|
+
refuseImplicitAccountId(platform.accounts.resolution, ref);
|
|
526
|
+
const account = await platform.accounts.resolve(ref, toResolveCtx(ctx, ctx.toolName));
|
|
366
527
|
resolved = account != null;
|
|
367
528
|
resolvedAccountId = account?.id;
|
|
368
529
|
return account;
|
|
@@ -404,10 +565,7 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
404
565
|
let resolved = false;
|
|
405
566
|
let resolvedAccountId;
|
|
406
567
|
try {
|
|
407
|
-
const account = await platform.accounts.resolve(undefined,
|
|
408
|
-
...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
|
|
409
|
-
toolName: ctx.toolName,
|
|
410
|
-
});
|
|
568
|
+
const account = await platform.accounts.resolve(undefined, toResolveCtx(ctx, ctx.toolName));
|
|
411
569
|
resolved = account != null;
|
|
412
570
|
resolvedAccountId = account?.id;
|
|
413
571
|
return account;
|
|
@@ -429,13 +587,13 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
429
587
|
},
|
|
430
588
|
// Merge: platform-derived handlers WIN per-key over adopter-supplied
|
|
431
589
|
// custom handlers. Adopter handlers fill gaps for tools the v6 platform
|
|
432
|
-
// doesn't yet model (
|
|
433
|
-
//
|
|
434
|
-
//
|
|
590
|
+
// doesn't yet model (content-standards CRUD, sync_event_sources, etc.).
|
|
591
|
+
// See `CreateAdcpServerFromPlatformOptions` JSDoc for the migration-seam
|
|
592
|
+
// contract.
|
|
435
593
|
mediaBuy: mergeHandlers(opts.mediaBuy, buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observability, fwLogger, {
|
|
436
594
|
allowPrivateWebhookUrls: opts.allowPrivateWebhookUrls === true,
|
|
437
595
|
autoEmitCompletionWebhooks: opts.autoEmitCompletionWebhooks !== false,
|
|
438
|
-
}, ctxFor, effectiveCtxMetadata), 'mediaBuy', mergeOpts),
|
|
596
|
+
}, ctxFor, effectiveCtxMetadata, opts.mediaBuyStore), 'mediaBuy', mergeOpts),
|
|
439
597
|
creative: mergeHandlers(opts.creative, buildCreativeHandlers(platform, taskRegistry, taskWebhookEmit, observability, fwLogger, {
|
|
440
598
|
allowPrivateWebhookUrls: opts.allowPrivateWebhookUrls === true,
|
|
441
599
|
autoEmitCompletionWebhooks: opts.autoEmitCompletionWebhooks !== false,
|
|
@@ -447,7 +605,7 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
447
605
|
brandRights: mergeHandlers(opts.brandRights, buildBrandRightsHandlers(platform, ctxFor, effectiveCtxMetadata, fwLogger), 'brandRights', mergeOpts),
|
|
448
606
|
customTools: {
|
|
449
607
|
...opts.customTools,
|
|
450
|
-
tasks_get: buildTasksGetTool(platform, taskRegistry),
|
|
608
|
+
tasks_get: buildTasksGetTool(platform, taskRegistry, platform.agentRegistry, fwLogger),
|
|
451
609
|
},
|
|
452
610
|
};
|
|
453
611
|
const server = (0, create_adcp_server_1.createAdcpServer)(config);
|
|
@@ -458,7 +616,72 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
458
616
|
// or environment-level by guarding the createAdcpServerFromPlatform
|
|
459
617
|
// call site itself).
|
|
460
618
|
if (opts.complyTest != null) {
|
|
461
|
-
|
|
619
|
+
let complyConfig = opts.complyTest;
|
|
620
|
+
if (autoSeedStore != null) {
|
|
621
|
+
// Inject auto-seed adapters for `seed_product` and `seed_pricing_option`
|
|
622
|
+
// when the adopter didn't wire explicit ones. Explicit adapters win — the
|
|
623
|
+
// spread only fills the undefined slots.
|
|
624
|
+
//
|
|
625
|
+
// **Namespace key: raw `account.account_id`.** The adapter does NOT call
|
|
626
|
+
// `platform.accounts.resolve` even though that would seem symmetric with
|
|
627
|
+
// the bridge's `ctx.account?.id` read — calling resolve here without
|
|
628
|
+
// `authInfo` (which `ComplyControllerContext` doesn't expose) lets a
|
|
629
|
+
// caller spoof `account.account_id: 'victim'` and have a non-validating
|
|
630
|
+
// resolver write seeds into the victim's resolved namespace. Raw id is
|
|
631
|
+
// the safe choice: a caller can only write to their own claimed id, and
|
|
632
|
+
// the sandboxGate already filters non-sandbox traffic.
|
|
633
|
+
//
|
|
634
|
+
// **Trade-off.** Adopters whose resolver maps `account_id` to a distinct
|
|
635
|
+
// internal id (e.g., `acc_1` → `tenant_a:acc_1`) will see seeded fixtures
|
|
636
|
+
// disappear — the adapter writes to `acc_1`, the bridge reads
|
|
637
|
+
// `tenant_a:acc_1`, no match. That's a documented limitation, not a
|
|
638
|
+
// security issue: silent test loss, not cross-tenant pollution. The
|
|
639
|
+
// architectural fix (widen `ComplyControllerContext` to expose the
|
|
640
|
+
// framework-resolved account so writes match reads even under mapping
|
|
641
|
+
// resolvers) is tracked at #1216. Mapping-resolver adopters wire
|
|
642
|
+
// explicit seed adapters today.
|
|
643
|
+
const explicitSeed = opts.complyTest.seed ?? {};
|
|
644
|
+
const autoSeed = { ...explicitSeed };
|
|
645
|
+
if (!explicitSeed.product) {
|
|
646
|
+
autoSeed.product = async (params, ctx) => {
|
|
647
|
+
const accountId = readAutoSeedAccountId(ctx.input);
|
|
648
|
+
if (accountId == null) {
|
|
649
|
+
fwLogger.warn('[adcp/auto-seed] seed_product fired without `account.account_id`; dropping write. ' +
|
|
650
|
+
'Verify the request envelope carries an account ref and the sandboxGate is configured correctly.', { product_id: params.product_id });
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
autoSeedStoreFor(autoSeedStore, accountId).set(params.product_id, {
|
|
654
|
+
...params.fixture,
|
|
655
|
+
product_id: params.product_id,
|
|
656
|
+
});
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
if (!explicitSeed.pricing_option) {
|
|
660
|
+
autoSeed.pricing_option = async (params, ctx) => {
|
|
661
|
+
const accountId = readAutoSeedAccountId(ctx.input);
|
|
662
|
+
if (accountId == null) {
|
|
663
|
+
fwLogger.warn('[adcp/auto-seed] seed_pricing_option fired without `account.account_id`; dropping write. ' +
|
|
664
|
+
'Verify the request envelope carries an account ref and the sandboxGate is configured correctly.', { product_id: params.product_id, pricing_option_id: params.pricing_option_id });
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
const accountStore = autoSeedStoreFor(autoSeedStore, accountId);
|
|
668
|
+
const existing = accountStore.get(params.product_id);
|
|
669
|
+
const pricingOption = { ...params.fixture, pricing_option_id: params.pricing_option_id };
|
|
670
|
+
const existingOptions = Array.isArray(existing?.pricing_options)
|
|
671
|
+
? existing.pricing_options
|
|
672
|
+
: [];
|
|
673
|
+
const filtered = existingOptions.filter((p) => p != null &&
|
|
674
|
+
typeof p === 'object' &&
|
|
675
|
+
p.pricing_option_id !== params.pricing_option_id);
|
|
676
|
+
accountStore.set(params.product_id, {
|
|
677
|
+
...(existing ?? { product_id: params.product_id }),
|
|
678
|
+
pricing_options: [...filtered, pricingOption],
|
|
679
|
+
});
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
complyConfig = { ...opts.complyTest, seed: autoSeed };
|
|
683
|
+
}
|
|
684
|
+
const controller = (0, comply_controller_1.createComplyController)(complyConfig);
|
|
462
685
|
controller.register(server);
|
|
463
686
|
}
|
|
464
687
|
return Object.assign(server, {
|
|
@@ -501,7 +724,7 @@ function createAdcpServerFromPlatform(platform, opts) {
|
|
|
501
724
|
* (`resolution: 'derived'`) get scoping for free via the auth-derived
|
|
502
725
|
* resolver.
|
|
503
726
|
*/
|
|
504
|
-
function buildTasksGetTool(platform, taskRegistry) {
|
|
727
|
+
function buildTasksGetTool(platform, taskRegistry, agentRegistry, logger) {
|
|
505
728
|
const inputShape = {
|
|
506
729
|
// Cap task_id length: framework-issued task ids are
|
|
507
730
|
// `task_<UUIDv4>` = 41 chars. Cap at 128 so a malicious buyer can't
|
|
@@ -542,12 +765,64 @@ function buildTasksGetTool(platform, taskRegistry) {
|
|
|
542
765
|
// `resolveAccount` dispatch flow in `create-adcp-server.ts:2380-2398`.
|
|
543
766
|
handler: async (args, extra) => {
|
|
544
767
|
const ref = args.account;
|
|
768
|
+
// Resolve the buyer agent (when an `agentRegistry` is configured) so
|
|
769
|
+
// adopters' `accounts.resolve` impl sees `ctx.agent` — same contract as
|
|
770
|
+
// every other AccountStore method. Bypasses the dispatcher's
|
|
771
|
+
// resolution-and-status-enforcement seam at
|
|
772
|
+
// `create-adcp-server.ts:2748-2832` deliberately:
|
|
773
|
+
//
|
|
774
|
+
// - **Status enforcement is intentionally skipped on tasks_get
|
|
775
|
+
// polls.** A buyer agent suspended AFTER kicking off an HITL task
|
|
776
|
+
// must still be able to learn the task's terminal state — refusing
|
|
777
|
+
// the poll would strand work with no visibility. Hard-cutoff
|
|
778
|
+
// sellers implement that policy inside their `accounts.resolve`
|
|
779
|
+
// or downstream by reading `ctx.agent.status` themselves.
|
|
780
|
+
// - **Registry failures don't break the poll.** A transient registry
|
|
781
|
+
// error during a read poll falls through to `agent: undefined`;
|
|
782
|
+
// adopters who require a resolved agent for tenant scoping can
|
|
783
|
+
// return null from their `accounts.resolve` and the existing
|
|
784
|
+
// ACCOUNT_NOT_FOUND surface fires.
|
|
785
|
+
let agent;
|
|
786
|
+
if (agentRegistry !== undefined) {
|
|
787
|
+
try {
|
|
788
|
+
const resolved = await agentRegistry.resolve({
|
|
789
|
+
...(extra?.authInfo?.credential !== undefined && { credential: extra.authInfo.credential }),
|
|
790
|
+
...(extra?.authInfo?.extra !== undefined && { extra: extra.authInfo.extra }),
|
|
791
|
+
});
|
|
792
|
+
if (resolved != null) {
|
|
793
|
+
// Mirror the dispatcher's freeze contract: lock the resolved
|
|
794
|
+
// record (and `billing_capabilities` Set if present) so adopter
|
|
795
|
+
// code cannot mutate shared registry state across requests.
|
|
796
|
+
// See `create-adcp-server.ts:2762-2779` for the full rationale.
|
|
797
|
+
if (!Object.isFrozen(resolved)) {
|
|
798
|
+
if (resolved.billing_capabilities instanceof Set) {
|
|
799
|
+
Object.freeze(resolved.billing_capabilities);
|
|
800
|
+
}
|
|
801
|
+
Object.freeze(resolved);
|
|
802
|
+
}
|
|
803
|
+
agent = resolved;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
catch (err) {
|
|
807
|
+
// Swallow to keep the poll alive (see policy comment above), but
|
|
808
|
+
// log so upstream-IDP outages are visible to operators. Without
|
|
809
|
+
// this log, buyers seeing REFERENCE_NOT_FOUND for valid tasks
|
|
810
|
+
// (because adopters' resolvers return null without `ctx.agent`)
|
|
811
|
+
// would be invisible in adopter logs. Per security-reviewer
|
|
812
|
+
// defense-in-depth note on PR #1323.
|
|
813
|
+
logger.warn?.('Buyer-agent registry resolution failed during tasks_get poll', {
|
|
814
|
+
error: err instanceof Error ? err.message : String(err),
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
}
|
|
545
818
|
const resolveCtx = {
|
|
546
819
|
...(extra?.authInfo !== undefined && { authInfo: extra.authInfo }),
|
|
547
820
|
toolName: 'tasks_get',
|
|
821
|
+
...(agent !== undefined && { agent }),
|
|
548
822
|
};
|
|
549
823
|
let resolvedAccountId;
|
|
550
824
|
if (ref) {
|
|
825
|
+
refuseImplicitAccountId(platform.accounts.resolution, ref);
|
|
551
826
|
try {
|
|
552
827
|
const resolved = await platform.accounts.resolve(ref, resolveCtx);
|
|
553
828
|
if (resolved)
|
|
@@ -883,9 +1158,16 @@ async function runWithTokenRefresh(fn, refresh) {
|
|
|
883
1158
|
recovery: 'correctable',
|
|
884
1159
|
});
|
|
885
1160
|
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
1161
|
+
// `authInfo` became optional in #1286. Token refresh only fires after an
|
|
1162
|
+
// AUTH_REQUIRED throw — meaning an upstream call attempted to use a
|
|
1163
|
+
// token, which means `authInfo` was populated before the throw.
|
|
1164
|
+
// Defensive guard: if for some reason it isn't, the refreshed token
|
|
1165
|
+
// still flows on the next request rather than crashing here.
|
|
1166
|
+
if (refresh.account.authInfo) {
|
|
1167
|
+
refresh.account.authInfo.token = refreshed.token;
|
|
1168
|
+
if (refreshed.expiresAt !== undefined) {
|
|
1169
|
+
refresh.account.authInfo.expiresAt = refreshed.expiresAt;
|
|
1170
|
+
}
|
|
889
1171
|
}
|
|
890
1172
|
return fn();
|
|
891
1173
|
}
|
|
@@ -962,11 +1244,11 @@ async function routeIfHandoff(taskRegistry, opts, result, project) {
|
|
|
962
1244
|
// but didn't go through ctx.handoffToTask. Treat as a sync
|
|
963
1245
|
// success arm with an empty body (caller-supplied projection
|
|
964
1246
|
// shapes the result; this branch is defensive).
|
|
965
|
-
return project(result);
|
|
1247
|
+
return await project(result);
|
|
966
1248
|
}
|
|
967
1249
|
return dispatchHitl(taskRegistry, opts, async (taskId) => {
|
|
968
1250
|
const inner = await taskFn((0, to_context_1.buildHandoffContext)(taskRegistry, taskId));
|
|
969
|
-
return project(inner);
|
|
1251
|
+
return await project(inner);
|
|
970
1252
|
});
|
|
971
1253
|
}
|
|
972
1254
|
// Catch the most common LLM-scaffolded mistake: hand-rolling a
|
|
@@ -988,7 +1270,7 @@ async function routeIfHandoff(taskRegistry, opts, result, project) {
|
|
|
988
1270
|
`task registry and the buyer ends up polling a task_id the framework ` +
|
|
989
1271
|
`never registered.`);
|
|
990
1272
|
}
|
|
991
|
-
const projected = project(result);
|
|
1273
|
+
const projected = await project(result);
|
|
992
1274
|
if (opts.autoEmitCompletion === true && opts.pushNotificationUrl) {
|
|
993
1275
|
// Auto-emit completion webhook on sync-success arm — fire-and-forget.
|
|
994
1276
|
// Awaiting inline would let an attacker-controlled
|
|
@@ -1292,6 +1574,31 @@ function bucketWebhookError(msg) {
|
|
|
1292
1574
|
function makeCtxFor(ctxMetadataStore) {
|
|
1293
1575
|
return handlerCtx => (0, to_context_1.buildRequestContext)(handlerCtx, ctxMetadataStore);
|
|
1294
1576
|
}
|
|
1577
|
+
/**
|
|
1578
|
+
* Project a framework `HandlerContext` / `RequestContext` to the public
|
|
1579
|
+
* `ResolveContext` shape passed to every `AccountStore` method
|
|
1580
|
+
* (`resolve`, `upsert`, `list`, `reportUsage`, `getAccountFinancials`).
|
|
1581
|
+
*
|
|
1582
|
+
* Single source of truth for the threading shape: when `ResolveContext`
|
|
1583
|
+
* gains a new field, update this function and every account-method call
|
|
1584
|
+
* site picks it up. The alternative (inline literals at each call site)
|
|
1585
|
+
* is what produced the original asymmetric `agent` gap on `reportUsage`
|
|
1586
|
+
* and `getAccountFinancials` — fixed by routing all six framework call
|
|
1587
|
+
* sites through here.
|
|
1588
|
+
*
|
|
1589
|
+
* `toolName` is supplied per call site (handlers hardcode their tool
|
|
1590
|
+
* name; the dispatcher's `resolveAccount` / `resolveAccountFromAuth`
|
|
1591
|
+
* paths read it off `RequestContext.toolName`). Spread guards keep
|
|
1592
|
+
* `authInfo` / `agent` keys absent rather than `undefined` — adopters
|
|
1593
|
+
* can use `'authInfo' in ctx` as a presence check.
|
|
1594
|
+
*/
|
|
1595
|
+
function toResolveCtx(ctx, toolName) {
|
|
1596
|
+
return {
|
|
1597
|
+
...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
|
|
1598
|
+
toolName,
|
|
1599
|
+
...(ctx.agent != null && { agent: ctx.agent }),
|
|
1600
|
+
};
|
|
1601
|
+
}
|
|
1295
1602
|
/**
|
|
1296
1603
|
* Auto-store helper. After a publisher returns resources from a discovery
|
|
1297
1604
|
* tool (`getProducts`, `getMediaBuys`, etc.), persist each resource's wire
|
|
@@ -1343,6 +1650,69 @@ async function autoStoreResources(store, accountId, kind, resources, idField, lo
|
|
|
1343
1650
|
`to reference these resources on a subsequent mutating call.`);
|
|
1344
1651
|
}
|
|
1345
1652
|
}
|
|
1653
|
+
/**
|
|
1654
|
+
* Persist `packages[].targeting_overlay` from a successful
|
|
1655
|
+
* `create_media_buy`. Called from the createMediaBuy projection so the
|
|
1656
|
+
* persistence applies to both the sync arm and the HITL completion arm
|
|
1657
|
+
* (the projection runs after the handoff fn resolves).
|
|
1658
|
+
*
|
|
1659
|
+
* Failures are logged + swallowed: a successful seller response must
|
|
1660
|
+
* never be turned into an error by the auto-echo plumbing.
|
|
1661
|
+
*/
|
|
1662
|
+
async function persistTargetingOverlayFromCreate(store, accountId, request, result, logger) {
|
|
1663
|
+
if (!store || !accountId)
|
|
1664
|
+
return;
|
|
1665
|
+
if (result == null || typeof result !== 'object')
|
|
1666
|
+
return;
|
|
1667
|
+
try {
|
|
1668
|
+
await store.persistFromCreate(accountId, request, result);
|
|
1669
|
+
}
|
|
1670
|
+
catch (err) {
|
|
1671
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1672
|
+
logger.warn(`[adcp/decisioning] mediaBuyStore.persistFromCreate failed: ${msg}`);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
/**
|
|
1676
|
+
* Apply an `update_media_buy` patch to the persisted media-buy store.
|
|
1677
|
+
* Per-field merge inside `targeting_overlay`: omitted keeps prior,
|
|
1678
|
+
* present-non-null replaces, present-null clears.
|
|
1679
|
+
*
|
|
1680
|
+
* Failures are logged + swallowed for the same reason as the create
|
|
1681
|
+
* path — the seller's update succeeded; auto-merge is best-effort.
|
|
1682
|
+
*/
|
|
1683
|
+
async function persistTargetingOverlayFromUpdate(store, accountId, mediaBuyId, patch, logger) {
|
|
1684
|
+
if (!store || !accountId)
|
|
1685
|
+
return;
|
|
1686
|
+
try {
|
|
1687
|
+
await store.mergeFromUpdate(accountId, mediaBuyId, patch);
|
|
1688
|
+
}
|
|
1689
|
+
catch (err) {
|
|
1690
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1691
|
+
logger.warn(`[adcp/decisioning] mediaBuyStore.mergeFromUpdate failed: ${msg}`);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
/**
|
|
1695
|
+
* Backfill missing `packages[].targeting_overlay` on a `get_media_buys`
|
|
1696
|
+
* response from the persisted store. Mutates the response. Packages the
|
|
1697
|
+
* seller already echoed are left alone.
|
|
1698
|
+
*
|
|
1699
|
+
* Failures are logged + swallowed: a partial-echo response is strictly
|
|
1700
|
+
* better than a hard error wiping out the seller's correctly-returned
|
|
1701
|
+
* media-buy data.
|
|
1702
|
+
*/
|
|
1703
|
+
async function backfillTargetingOverlay(store, accountId, result, logger) {
|
|
1704
|
+
if (!store || !accountId)
|
|
1705
|
+
return;
|
|
1706
|
+
if (result == null || typeof result !== 'object')
|
|
1707
|
+
return;
|
|
1708
|
+
try {
|
|
1709
|
+
await store.backfill(accountId, result);
|
|
1710
|
+
}
|
|
1711
|
+
catch (err) {
|
|
1712
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1713
|
+
logger.warn(`[adcp/decisioning] mediaBuyStore.backfill failed: ${msg}`);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1346
1716
|
/**
|
|
1347
1717
|
* Auto-hydrate helper. Before invoking a publisher's mutating handler,
|
|
1348
1718
|
* walk the request's resource references and attach the full wire
|
|
@@ -1503,6 +1873,132 @@ async function hydrateSingleResource(store, accountId, kind, id, attachField, ta
|
|
|
1503
1873
|
configurable: true,
|
|
1504
1874
|
});
|
|
1505
1875
|
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Spec `x-entity` annotation → SDK `ResourceKind`. The SDK only hydrates
|
|
1878
|
+
* resource kinds it has a backing store for; unmapped entities (e.g.
|
|
1879
|
+
* `vendor_pricing_option`, `governance_plan`) are gracefully skipped.
|
|
1880
|
+
*
|
|
1881
|
+
* The annotation acts as a renaming-firewall: if the spec renames
|
|
1882
|
+
* `media_buy_id` → `mediabuy_id`, the `x-entity: "media_buy"` tag travels
|
|
1883
|
+
* with the field and the codegen step in `scripts/generate-entity-hydration.ts`
|
|
1884
|
+
* picks up the new field name automatically — no SDK code change required.
|
|
1885
|
+
*
|
|
1886
|
+
* Adding a new `ResourceKind` for hydration is a coordinated change: add
|
|
1887
|
+
* it to `ResourceKind` (in `ctx-metadata/store.ts`) and to this map.
|
|
1888
|
+
*/
|
|
1889
|
+
/** @internal Exported for the coverage test in `test/lib/x-entity-hydration.test.js`. */
|
|
1890
|
+
exports.ENTITY_TO_RESOURCE_KIND = {
|
|
1891
|
+
media_buy: 'media_buy',
|
|
1892
|
+
package: 'package',
|
|
1893
|
+
creative: 'creative',
|
|
1894
|
+
audience: 'audience',
|
|
1895
|
+
// Spec quirk: `signal_activation_id` is a SEPARATE entity from `signal`
|
|
1896
|
+
// (per AdCP `core/x-entity-types.json` — the activation handle is
|
|
1897
|
+
// scoped to the issuing signals agent, not interchangeable with the
|
|
1898
|
+
// catalog's `signal_id`). The SDK collapses them onto the existing
|
|
1899
|
+
// `signal` ResourceKind for backward-compat: adopters already seed
|
|
1900
|
+
// the cache keyed by `signal_agent_segment_id` under `kind: 'signal'`.
|
|
1901
|
+
// Splitting `signal_activation` to its own ResourceKind would orphan
|
|
1902
|
+
// those entries. Tracked upstream — file an `adcp` issue if/when this
|
|
1903
|
+
// collapse causes confusion.
|
|
1904
|
+
signal_activation_id: 'signal',
|
|
1905
|
+
rights_grant: 'rights_grant',
|
|
1906
|
+
property_list: 'property_list',
|
|
1907
|
+
collection_list: 'collection_list',
|
|
1908
|
+
account: 'account',
|
|
1909
|
+
product: 'product',
|
|
1910
|
+
};
|
|
1911
|
+
/**
|
|
1912
|
+
* `x-entity` values the SDK does NOT hydrate today — graceful skip rather
|
|
1913
|
+
* than failure. Entries here are documented intentional skips so a future
|
|
1914
|
+
* code reader can distinguish "we forgot to map this" from "the SDK
|
|
1915
|
+
* doesn't model this kind."
|
|
1916
|
+
*
|
|
1917
|
+
* The codegen-derived `TOOL_ENTITY_FIELDS` map carries every `x-entity`
|
|
1918
|
+
* the spec emits on dispatchable tools (webhook-only payloads like
|
|
1919
|
+
* `creative_approval` are filtered out at codegen time); this allowlist
|
|
1920
|
+
* + `ENTITY_TO_RESOURCE_KIND` together must cover the full set,
|
|
1921
|
+
* enforced by a test (`test/lib/x-entity-hydration.test.js`) that
|
|
1922
|
+
* imports both.
|
|
1923
|
+
*
|
|
1924
|
+
* @internal Exported for the coverage test; not part of the public API.
|
|
1925
|
+
*/
|
|
1926
|
+
exports.INTENTIONALLY_UNHYDRATED_ENTITIES = new Set([
|
|
1927
|
+
'vendor_pricing_option', // Scoped to issuing vendor agent; adopters seed pricing context themselves.
|
|
1928
|
+
'governance_plan', // No SDK ResourceKind yet; campaign-governance follow-up.
|
|
1929
|
+
'governance_check', // Transient request envelope; not stored.
|
|
1930
|
+
'event_source', // No SDK ResourceKind yet.
|
|
1931
|
+
'si_session', // Session lifecycle owned by `SponsoredIntelligencePlatform`.
|
|
1932
|
+
'offering', // SI offering catalog; not stored as ctx-metadata.
|
|
1933
|
+
'rights_holder_brand', // Read-through `get_brand_identity`; not separately stored.
|
|
1934
|
+
'advertiser_brand', // Same as above.
|
|
1935
|
+
]);
|
|
1936
|
+
/**
|
|
1937
|
+
* Per-tool, per-field destination property name for hydrated resources.
|
|
1938
|
+
*
|
|
1939
|
+
* The hydrator's default is to derive the destination from the field name
|
|
1940
|
+
* by stripping the `_id` suffix (e.g. `media_buy_id` → attach as
|
|
1941
|
+
* `params.media_buy`). Three cases need explicit overrides because their
|
|
1942
|
+
* historical attach-fields don't match that convention — adopters already
|
|
1943
|
+
* read these in handler code and a rename would be wire-visible behavior:
|
|
1944
|
+
*
|
|
1945
|
+
* - `acquire_rights.rights_id` → `params.rights` (NOT `rights_grant`).
|
|
1946
|
+
* Predates the entity-driven hydrator. Kept for backward-compat.
|
|
1947
|
+
* - `activate_signal.signal_agent_segment_id` → `params.signal`
|
|
1948
|
+
* (NOT `signal_agent_segment` — `_id` suffix isn't on the boundary
|
|
1949
|
+
* the convention strips).
|
|
1950
|
+
* - `update_rights.rights_id` → `params.rights_grant` (NOT `rights`).
|
|
1951
|
+
* Diverges from `acquire_rights`'s historical `params.rights` because
|
|
1952
|
+
* the wire payloads model different things — acquire takes an
|
|
1953
|
+
* offering selection, update modifies an existing grant.
|
|
1954
|
+
*
|
|
1955
|
+
* Other tools either follow the convention (`update_media_buy`,
|
|
1956
|
+
* `provide_performance_feedback`) or don't currently have hydration
|
|
1957
|
+
* registered (the unmapped `x-entity` skips above).
|
|
1958
|
+
*/
|
|
1959
|
+
const HYDRATION_ATTACH_FIELD_OVERRIDES = {
|
|
1960
|
+
acquire_rights: { rights_id: 'rights' },
|
|
1961
|
+
activate_signal: { signal_agent_segment_id: 'signal' },
|
|
1962
|
+
update_rights: { rights_id: 'rights_grant' },
|
|
1963
|
+
};
|
|
1964
|
+
function deriveAttachField(toolName, field) {
|
|
1965
|
+
const override = HYDRATION_ATTACH_FIELD_OVERRIDES[toolName]?.[field];
|
|
1966
|
+
if (override)
|
|
1967
|
+
return override;
|
|
1968
|
+
// Default: strip the `_id` suffix so `media_buy_id` → `media_buy`,
|
|
1969
|
+
// `creative_id` → `creative`, etc. This is the convention every existing
|
|
1970
|
+
// hydration call site followed before the schema-driven refactor.
|
|
1971
|
+
return field.endsWith('_id') ? field.slice(0, -3) : field;
|
|
1972
|
+
}
|
|
1973
|
+
/**
|
|
1974
|
+
* Schema-driven auto-hydration for a tool's request payload.
|
|
1975
|
+
*
|
|
1976
|
+
* Walks the codegen-derived `TOOL_ENTITY_FIELDS` table for the named tool,
|
|
1977
|
+
* looks up each spec-tagged identifier on `params`, maps the `x-entity`
|
|
1978
|
+
* annotation to a `ResourceKind`, and attaches the resolved record at the
|
|
1979
|
+
* conventional destination field. Replaces the four hand-rolled
|
|
1980
|
+
* `hydrateSingleResource` call sites that hardcoded `(field_name, kind)`
|
|
1981
|
+
* pairs and were vulnerable to a silent break under a future spec rename
|
|
1982
|
+
* (protocol-expert review of #1086 → tracked as #1109).
|
|
1983
|
+
*/
|
|
1984
|
+
async function hydrateForTool(store, accountId, toolName, params, logger) {
|
|
1985
|
+
if (!store || !accountId || params == null || typeof params !== 'object')
|
|
1986
|
+
return;
|
|
1987
|
+
const fields = entity_hydration_generated_1.TOOL_ENTITY_FIELDS[toolName];
|
|
1988
|
+
if (!fields || fields.length === 0)
|
|
1989
|
+
return;
|
|
1990
|
+
const paramsRecord = params;
|
|
1991
|
+
for (const { field, xEntity } of fields) {
|
|
1992
|
+
const id = paramsRecord[field];
|
|
1993
|
+
if (typeof id !== 'string' || id.length === 0)
|
|
1994
|
+
continue;
|
|
1995
|
+
const kind = exports.ENTITY_TO_RESOURCE_KIND[xEntity];
|
|
1996
|
+
if (!kind)
|
|
1997
|
+
continue; // Unknown entity — graceful skip; don't break unknown verbs.
|
|
1998
|
+
const attachField = deriveAttachField(toolName, field);
|
|
1999
|
+
await hydrateSingleResource(store, accountId, kind, id, attachField, params, logger);
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
1506
2002
|
/**
|
|
1507
2003
|
* Extract the buyer's push-notification webhook config from a request body
|
|
1508
2004
|
* and validate the URL + token against SSRF / replay primitives.
|
|
@@ -1715,92 +2211,121 @@ function validatePushNotificationToken(token) {
|
|
|
1715
2211
|
}
|
|
1716
2212
|
return { ok: true };
|
|
1717
2213
|
}
|
|
1718
|
-
function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observability, logger, pushOpts, ctxFor, ctxMetadataStore) {
|
|
2214
|
+
function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observability, logger, pushOpts, ctxFor, ctxMetadataStore, mediaBuyStore) {
|
|
1719
2215
|
const sales = platform.sales;
|
|
1720
2216
|
if (!sales)
|
|
1721
2217
|
return undefined;
|
|
2218
|
+
// Core lifecycle methods are optional on the SalesPlatform interface
|
|
2219
|
+
// (#1341) — the per-specialism mapping in `RequiredPlatformsFor<S>`
|
|
2220
|
+
// enforces "you claimed `sales-non-guaranteed`, therefore you must
|
|
2221
|
+
// implement getProducts" at the type level, while specialisms whose
|
|
2222
|
+
// upstream owns bidding (`sales-social`) skip them entirely. The
|
|
2223
|
+
// dispatcher mirrors that with conditional spreads — we don't register
|
|
2224
|
+
// a wire handler when the platform method is absent, so the merge seam
|
|
2225
|
+
// (`opts.mediaBuy.X`) can supply it OR the framework returns
|
|
2226
|
+
// `METHOD_NOT_FOUND` from `tools/list` for the unsupported tool.
|
|
1722
2227
|
return {
|
|
1723
|
-
getProducts
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
return
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
observability,
|
|
1753
|
-
logger,
|
|
1754
|
-
}, result, r => r // identity projection for createMediaBuy
|
|
1755
|
-
);
|
|
1756
|
-
}, r => r);
|
|
1757
|
-
},
|
|
1758
|
-
updateMediaBuy: async (params, ctx) => {
|
|
1759
|
-
const reqCtx = ctxFor(ctx);
|
|
1760
|
-
// `media_buy_id` is required on the wire schema, but `validation: 'off'`
|
|
1761
|
-
// mode skips the schema parse — guard at the seam so platform code can
|
|
1762
|
-
// trust the value rather than re-checking. Also catches buyers calling
|
|
1763
|
-
// with the param missing under an off-spec server config.
|
|
1764
|
-
const { media_buy_id } = params;
|
|
1765
|
-
if (!media_buy_id) {
|
|
1766
|
-
return (0, errors_1.adcpError)('INVALID_REQUEST', {
|
|
1767
|
-
message: 'update_media_buy requires media_buy_id',
|
|
1768
|
-
field: 'media_buy_id',
|
|
1769
|
-
});
|
|
1770
|
-
}
|
|
1771
|
-
// Auto-hydrate: attach the full MediaBuy (wire shape + ctx_metadata)
|
|
1772
|
-
// at `req.media_buy`. Publisher reads `req.media_buy.ctx_metadata?.gam`
|
|
1773
|
-
// directly — no separate lookup. Misses are silent; publisher falls
|
|
1774
|
-
// back to its own DB.
|
|
1775
|
-
await hydrateSingleResource(ctxMetadataStore, reqCtx.account?.id, 'media_buy', media_buy_id, 'media_buy', params, logger);
|
|
1776
|
-
return projectSync(async () => {
|
|
1777
|
-
const push = extractPushConfig(params, logger, {
|
|
1778
|
-
allowPrivateWebhookUrls: pushOpts.allowPrivateWebhookUrls,
|
|
1779
|
-
});
|
|
1780
|
-
const result = await sales.updateMediaBuy(media_buy_id, params, reqCtx);
|
|
1781
|
-
// F12 sync auto-emit. updateMediaBuy is sync-only on the
|
|
1782
|
-
// platform interface (no TaskHandoff arm — spec response
|
|
1783
|
-
// doesn't include Submitted), so we don't route through
|
|
1784
|
-
// routeIfHandoff. Fire-and-forget to keep slowloris webhook
|
|
1785
|
-
// receivers from blocking the sync response.
|
|
1786
|
-
if (pushOpts.autoEmitCompletionWebhooks && push.url) {
|
|
1787
|
-
const emitOpts = {
|
|
1788
|
-
tool: 'update_media_buy',
|
|
2228
|
+
...(sales.getProducts && {
|
|
2229
|
+
getProducts: async (params, ctx) => {
|
|
2230
|
+
const reqCtx = ctxFor(ctx);
|
|
2231
|
+
return projectSync(async () => {
|
|
2232
|
+
const result = await sales.getProducts(params, reqCtx);
|
|
2233
|
+
// Auto-store products: persist each Product's wire shape +
|
|
2234
|
+
// ctx_metadata so subsequent createMediaBuy / updateMediaBuy
|
|
2235
|
+
// calls referencing product_id can hydrate the full Product
|
|
2236
|
+
// automatically (publisher sees `req.packages[i].product`).
|
|
2237
|
+
await autoStoreResources(ctxMetadataStore, reqCtx.account?.id, 'product', result?.products, 'product_id', logger);
|
|
2238
|
+
return result;
|
|
2239
|
+
}, r => r);
|
|
2240
|
+
},
|
|
2241
|
+
}),
|
|
2242
|
+
...(sales.createMediaBuy && {
|
|
2243
|
+
createMediaBuy: async (params, ctx) => {
|
|
2244
|
+
const reqCtx = ctxFor(ctx);
|
|
2245
|
+
// Auto-hydrate: walk `params.packages`, attach the full Product object
|
|
2246
|
+
// (including `ctx_metadata`) at `pkg.product`. Publisher reads
|
|
2247
|
+
// `pkg.product.format_ids`, `pkg.product.ctx_metadata?.gam?.ad_unit_ids`
|
|
2248
|
+
// directly — no separate lookup, no boilerplate.
|
|
2249
|
+
await hydratePackagesWithProducts(ctxMetadataStore, reqCtx.account?.id, params?.packages, logger);
|
|
2250
|
+
return projectSync(async () => {
|
|
2251
|
+
const push = extractPushConfig(params, logger, {
|
|
2252
|
+
allowPrivateWebhookUrls: pushOpts.allowPrivateWebhookUrls,
|
|
2253
|
+
});
|
|
2254
|
+
const result = await sales.createMediaBuy(params, reqCtx);
|
|
2255
|
+
return routeIfHandoff(taskRegistry, {
|
|
2256
|
+
tool: 'create_media_buy',
|
|
1789
2257
|
accountId: reqCtx.account.id,
|
|
1790
2258
|
pushNotificationUrl: push.url,
|
|
1791
|
-
|
|
2259
|
+
pushNotificationToken: push.token,
|
|
1792
2260
|
emitWebhook: taskWebhookEmit ?? ctx.emitWebhook,
|
|
1793
|
-
|
|
2261
|
+
autoEmitCompletion: pushOpts.autoEmitCompletionWebhooks,
|
|
2262
|
+
observability,
|
|
1794
2263
|
logger,
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
2264
|
+
}, result, async (r) => {
|
|
2265
|
+
await persistTargetingOverlayFromCreate(mediaBuyStore, reqCtx.account?.id, params, r, logger);
|
|
2266
|
+
return r;
|
|
2267
|
+
});
|
|
2268
|
+
}, r => r);
|
|
2269
|
+
},
|
|
2270
|
+
}),
|
|
2271
|
+
...(sales.updateMediaBuy && {
|
|
2272
|
+
updateMediaBuy: async (params, ctx) => {
|
|
2273
|
+
const reqCtx = ctxFor(ctx);
|
|
2274
|
+
// `media_buy_id` is required on the wire schema, but `validation: 'off'`
|
|
2275
|
+
// mode skips the schema parse — guard at the seam so platform code can
|
|
2276
|
+
// trust the value rather than re-checking. Also catches buyers calling
|
|
2277
|
+
// with the param missing under an off-spec server config.
|
|
2278
|
+
const { media_buy_id } = params;
|
|
2279
|
+
if (!media_buy_id) {
|
|
2280
|
+
return (0, errors_1.adcpError)('INVALID_REQUEST', {
|
|
2281
|
+
message: 'update_media_buy requires media_buy_id',
|
|
2282
|
+
field: 'media_buy_id',
|
|
1799
2283
|
});
|
|
1800
2284
|
}
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
2285
|
+
// Auto-hydrate: attach the full MediaBuy (wire shape + ctx_metadata)
|
|
2286
|
+
// at `req.media_buy`. Publisher reads `req.media_buy.ctx_metadata?.gam`
|
|
2287
|
+
// directly — no separate lookup. Misses are silent; publisher falls
|
|
2288
|
+
// back to its own DB. Schema-driven via `x-entity` (#1109).
|
|
2289
|
+
await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'update_media_buy', params, logger);
|
|
2290
|
+
return projectSync(async () => {
|
|
2291
|
+
const push = extractPushConfig(params, logger, {
|
|
2292
|
+
allowPrivateWebhookUrls: pushOpts.allowPrivateWebhookUrls,
|
|
2293
|
+
});
|
|
2294
|
+
const result = await sales.updateMediaBuy(media_buy_id, params, reqCtx);
|
|
2295
|
+
// Persist optimistically: the platform method returned without
|
|
2296
|
+
// throwing, so the patch was accepted at the seam. If the
|
|
2297
|
+
// publisher returned an error envelope on the success path
|
|
2298
|
+
// (rare but possible — `update_media_buy` can return a Failed
|
|
2299
|
+
// status arm in the wire schema), the persisted overlay
|
|
2300
|
+
// diverges from the seller's view of the buy. Adopters who
|
|
2301
|
+
// need stricter coupling should not return error-shaped
|
|
2302
|
+
// success arms; the spec's preferred shape is to throw an
|
|
2303
|
+
// `AdcpError` for genuine failures.
|
|
2304
|
+
await persistTargetingOverlayFromUpdate(mediaBuyStore, reqCtx.account?.id, media_buy_id, params, logger);
|
|
2305
|
+
// F12 sync auto-emit. updateMediaBuy is sync-only on the
|
|
2306
|
+
// platform interface (no TaskHandoff arm — spec response
|
|
2307
|
+
// doesn't include Submitted), so we don't route through
|
|
2308
|
+
// routeIfHandoff. Fire-and-forget to keep slowloris webhook
|
|
2309
|
+
// receivers from blocking the sync response.
|
|
2310
|
+
if (pushOpts.autoEmitCompletionWebhooks && push.url) {
|
|
2311
|
+
const emitOpts = {
|
|
2312
|
+
tool: 'update_media_buy',
|
|
2313
|
+
accountId: reqCtx.account.id,
|
|
2314
|
+
pushNotificationUrl: push.url,
|
|
2315
|
+
...(push.token !== undefined && { pushNotificationToken: push.token }),
|
|
2316
|
+
emitWebhook: taskWebhookEmit ?? ctx.emitWebhook,
|
|
2317
|
+
...(observability && { observability }),
|
|
2318
|
+
logger,
|
|
2319
|
+
};
|
|
2320
|
+
void emitSyncCompletionWebhook(emitOpts, result).catch((err) => {
|
|
2321
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
2322
|
+
logger.warn(`[adcp/decisioning] sync completion webhook background-error: ${msg}`);
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2325
|
+
return result;
|
|
2326
|
+
}, r => r);
|
|
2327
|
+
},
|
|
2328
|
+
}),
|
|
1804
2329
|
syncCreatives: async (params, ctx) => {
|
|
1805
2330
|
const reqCtx = ctxFor(ctx);
|
|
1806
2331
|
const creatives = params.creatives ?? [];
|
|
@@ -1824,10 +2349,16 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
|
|
|
1824
2349
|
}, result, rows => ({ creatives: rows.map(normalizeRowErrors) }));
|
|
1825
2350
|
}, r => r);
|
|
1826
2351
|
},
|
|
1827
|
-
getMediaBuyDelivery
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
2352
|
+
...(sales.getMediaBuyDelivery && {
|
|
2353
|
+
getMediaBuyDelivery: async (params, ctx) => {
|
|
2354
|
+
const reqCtx = ctxFor(ctx);
|
|
2355
|
+
return projectSync(async () => {
|
|
2356
|
+
const result = await sales.getMediaBuyDelivery(params, reqCtx);
|
|
2357
|
+
warnIfTruncatedMultiIdResponse('getMediaBuyDelivery', params.media_buy_ids, result?.media_buy_deliveries, logger);
|
|
2358
|
+
return result;
|
|
2359
|
+
}, actuals => actuals);
|
|
2360
|
+
},
|
|
2361
|
+
}),
|
|
1831
2362
|
// Optional methods — return UNSUPPORTED_FEATURE when the platform omits
|
|
1832
2363
|
// them. Adopters that haven't migrated to the v6 platform interface for
|
|
1833
2364
|
// these specific tools can still pass raw handlers via opts.mediaBuy
|
|
@@ -1846,7 +2377,9 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
|
|
|
1846
2377
|
const reqCtx = ctxFor(ctx);
|
|
1847
2378
|
return projectSync(async () => {
|
|
1848
2379
|
const result = await sales.getMediaBuys(params, reqCtx);
|
|
2380
|
+
warnIfTruncatedMultiIdResponse('getMediaBuys', params.media_buy_ids, result?.media_buys, logger);
|
|
1849
2381
|
await autoStoreResources(ctxMetadataStore, reqCtx.account?.id, 'media_buy', result?.media_buys, 'media_buy_id', logger);
|
|
2382
|
+
await backfillTargetingOverlay(mediaBuyStore, reqCtx.account?.id, result, logger);
|
|
1850
2383
|
return result;
|
|
1851
2384
|
}, r => r);
|
|
1852
2385
|
},
|
|
@@ -1856,15 +2389,13 @@ function buildMediaBuyHandlers(platform, taskRegistry, taskWebhookEmit, observab
|
|
|
1856
2389
|
const reqCtx = ctxFor(ctx);
|
|
1857
2390
|
// Auto-hydrate `req.media_buy` from the prior createMediaBuy /
|
|
1858
2391
|
// getMediaBuys store entry, plus `req.creative` when the buyer
|
|
1859
|
-
// scoped feedback to a specific creative
|
|
1860
|
-
//
|
|
1861
|
-
//
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
await hydrateSingleResource(ctxMetadataStore, accountId, 'creative', creativeId, 'creative', params, logger);
|
|
1867
|
-
}
|
|
2392
|
+
// scoped feedback to a specific creative, plus `req.package`
|
|
2393
|
+
// when scoped to a package. All three are optional hydration
|
|
2394
|
+
// targets — adopters who only care about the feedback payload
|
|
2395
|
+
// itself can ignore them. Schema-driven via `x-entity` (#1109);
|
|
2396
|
+
// package hydration is additive vs the prior hardcoded version
|
|
2397
|
+
// (silent no-op when packages aren't seeded).
|
|
2398
|
+
await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'provide_performance_feedback', params, logger);
|
|
1868
2399
|
return projectSync(() => sales.providePerformanceFeedback(params, reqCtx), r => r);
|
|
1869
2400
|
},
|
|
1870
2401
|
}),
|
|
@@ -1922,14 +2453,31 @@ function buildCreativeHandlers(platform, taskRegistry, taskWebhookEmit, observab
|
|
|
1922
2453
|
return projectSync(() => creative.buildCreative(params, reqCtx), ret => projectBuildCreativeReturn(ret));
|
|
1923
2454
|
},
|
|
1924
2455
|
previewCreative: async (params, ctx) => {
|
|
1925
|
-
if (!('previewCreative' in creative)) {
|
|
2456
|
+
if (!('previewCreative' in creative) || creative.previewCreative == null) {
|
|
1926
2457
|
return (0, errors_1.adcpError)('UNSUPPORTED_FEATURE', {
|
|
1927
|
-
message: 'preview_creative not
|
|
2458
|
+
message: 'preview_creative: this creative platform did not implement previewCreative. ' +
|
|
2459
|
+
'Add `previewCreative(req, ctx)` to your CreativeBuilderPlatform / CreativeAdServerPlatform literal.',
|
|
1928
2460
|
});
|
|
1929
2461
|
}
|
|
1930
2462
|
const reqCtx = ctxFor(ctx);
|
|
1931
2463
|
return projectSync(() => creative.previewCreative(params, reqCtx), preview => preview);
|
|
1932
2464
|
},
|
|
2465
|
+
// No-account tool — `list_creative_formats` request schema doesn't carry
|
|
2466
|
+
// `account`. The framework's `resolveAccountFromAuth` runs and accepts a
|
|
2467
|
+
// null return; the platform method receives `ctx.account` possibly
|
|
2468
|
+
// undefined per `NoAccountCtx`. Wired identically on both
|
|
2469
|
+
// `CreativeBuilderPlatform` and `CreativeAdServerPlatform`.
|
|
2470
|
+
listCreativeFormats: async (params, ctx) => {
|
|
2471
|
+
if (!('listCreativeFormats' in creative) || creative.listCreativeFormats == null) {
|
|
2472
|
+
return (0, errors_1.adcpError)('UNSUPPORTED_FEATURE', {
|
|
2473
|
+
message: 'list_creative_formats: this creative platform did not implement listCreativeFormats. ' +
|
|
2474
|
+
'Add `listCreativeFormats(req, ctx)` to your CreativeBuilderPlatform / CreativeAdServerPlatform literal, ' +
|
|
2475
|
+
'or delegate via `capabilities.creative_agents`.',
|
|
2476
|
+
});
|
|
2477
|
+
}
|
|
2478
|
+
const reqCtx = ctxFor(ctx);
|
|
2479
|
+
return projectSync(() => creative.listCreativeFormats(params, reqCtx), r => r);
|
|
2480
|
+
},
|
|
1933
2481
|
syncCreatives: async (params, ctx) => {
|
|
1934
2482
|
const reqCtx = ctxFor(ctx);
|
|
1935
2483
|
const creatives = params.creatives ?? [];
|
|
@@ -2034,7 +2582,10 @@ function buildSignalsHandlers(platform, ctxFor, ctxMetadataStore, logger) {
|
|
|
2034
2582
|
// Auto-hydrate `req.signal` from the prior getSignals store entry —
|
|
2035
2583
|
// publisher reads pricing options, agent segment id, ctx_metadata
|
|
2036
2584
|
// directly without the buyer round-tripping the full signal object.
|
|
2037
|
-
|
|
2585
|
+
// Schema-driven via `x-entity` (#1109): `signal_agent_segment_id`
|
|
2586
|
+
// carries `x-entity: "signal_activation_id"`, mapped to ResourceKind
|
|
2587
|
+
// `signal`; attached at `params.signal` per the override table.
|
|
2588
|
+
await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'activate_signal', params, logger);
|
|
2038
2589
|
return projectSync(() => signals.activateSignal(params, reqCtx), r => r);
|
|
2039
2590
|
},
|
|
2040
2591
|
};
|
|
@@ -2068,9 +2619,29 @@ function buildBrandRightsHandlers(platform, ctxFor, ctxMetadataStore, logger) {
|
|
|
2068
2619
|
const reqCtx = ctxFor(ctx);
|
|
2069
2620
|
// Auto-hydrate `req.rights` from the prior getRights catalog entry.
|
|
2070
2621
|
// Publisher reads selected pricing option + ctx_metadata directly.
|
|
2071
|
-
|
|
2622
|
+
// Schema-driven via `x-entity` (#1109); destination field stays at
|
|
2623
|
+
// `params.rights` per the override table — historical, predates
|
|
2624
|
+
// the entity-driven hydrator and `updateRights`'s convention of
|
|
2625
|
+
// `params.rights_grant`. Adopters already read this field, so a
|
|
2626
|
+
// rename would be wire-visible behavior.
|
|
2627
|
+
await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'acquire_rights', params, logger);
|
|
2072
2628
|
return projectSync(() => br.acquireRights(params, reqCtx), r => r);
|
|
2073
2629
|
},
|
|
2630
|
+
// `update_rights` modifies an existing grant. The framework hydrates
|
|
2631
|
+
// the grant record from `req.rights_id` so the implementation reads
|
|
2632
|
+
// the resolved state from `ctx.store` (or as `params.rights_grant`
|
|
2633
|
+
// — see field-name divergence note on `acquireRights` above; this
|
|
2634
|
+
// tool attaches under `rights_grant` because the wire payload has
|
|
2635
|
+
// no `rights` field). Schema-driven via `x-entity` (#1109). Async
|
|
2636
|
+
// delivery — when the change requires rights-holder counter-
|
|
2637
|
+
// signature — rides the buyer's `push_notification_config` webhook;
|
|
2638
|
+
// the immediate response carries `implementation_date: null` to
|
|
2639
|
+
// signal pending state.
|
|
2640
|
+
updateRights: async (params, ctx) => {
|
|
2641
|
+
const reqCtx = ctxFor(ctx);
|
|
2642
|
+
await hydrateForTool(ctxMetadataStore, reqCtx.account?.id, 'update_rights', params, logger);
|
|
2643
|
+
return projectSync(() => br.updateRights(params, reqCtx), r => r);
|
|
2644
|
+
},
|
|
2074
2645
|
};
|
|
2075
2646
|
}
|
|
2076
2647
|
function buildGovernanceHandlers(platform, ctxFor) {
|
|
@@ -2197,18 +2768,27 @@ function buildAccountHandlers(platform, ctxFor) {
|
|
|
2197
2768
|
// closer to the truth than a fabricated UNSUPPORTED_FEATURE envelope.
|
|
2198
2769
|
const handlers = {};
|
|
2199
2770
|
if (accounts.upsert) {
|
|
2200
|
-
handlers.syncAccounts = async (params,
|
|
2771
|
+
handlers.syncAccounts = async (params, ctx) => {
|
|
2201
2772
|
const refs = (params.accounts ?? []);
|
|
2202
|
-
|
|
2773
|
+
const resolveCtx = toResolveCtx(ctx, 'sync_accounts');
|
|
2774
|
+
return projectSync(() => accounts.upsert(refs, resolveCtx), rows => ({ accounts: rows.map(account_1.toWireSyncAccountRow) }));
|
|
2775
|
+
};
|
|
2776
|
+
}
|
|
2777
|
+
if (accounts.syncGovernance) {
|
|
2778
|
+
handlers.syncGovernance = async (params, ctx) => {
|
|
2779
|
+
const entries = params.accounts;
|
|
2780
|
+
const resolveCtx = toResolveCtx(ctx, 'sync_governance');
|
|
2781
|
+
return projectSync(() => accounts.syncGovernance(entries, resolveCtx), rows => ({ accounts: rows.map(account_1.toWireSyncGovernanceRow) }));
|
|
2203
2782
|
};
|
|
2204
2783
|
}
|
|
2205
2784
|
if (accounts.list) {
|
|
2206
|
-
handlers.listAccounts = async (params,
|
|
2785
|
+
handlers.listAccounts = async (params, ctx) => {
|
|
2207
2786
|
const filter = params;
|
|
2787
|
+
const resolveCtx = toResolveCtx(ctx, 'list_accounts');
|
|
2208
2788
|
// Wrap in projectSync so adopter `throw new AdcpError('PERMISSION_DENIED', ...)`
|
|
2209
2789
|
// from the list impl projects to the structured wire envelope rather
|
|
2210
2790
|
// than falling through to the framework's `SERVICE_UNAVAILABLE` mapping.
|
|
2211
|
-
return projectSync(() => accounts.list(filter), page => ({
|
|
2791
|
+
return projectSync(() => accounts.list(filter, resolveCtx), page => ({
|
|
2212
2792
|
accounts: page.items.map(account_1.toWireAccount),
|
|
2213
2793
|
...(page.nextCursor != null && { next_cursor: page.nextCursor }),
|
|
2214
2794
|
}));
|
|
@@ -2216,10 +2796,7 @@ function buildAccountHandlers(platform, ctxFor) {
|
|
|
2216
2796
|
}
|
|
2217
2797
|
if (accounts.reportUsage) {
|
|
2218
2798
|
handlers.reportUsage = async (params, ctx) => {
|
|
2219
|
-
const resolveCtx =
|
|
2220
|
-
...(ctx.authInfo !== undefined && { authInfo: ctx.authInfo }),
|
|
2221
|
-
toolName: 'report_usage',
|
|
2222
|
-
};
|
|
2799
|
+
const resolveCtx = toResolveCtx(ctx, 'report_usage');
|
|
2223
2800
|
return projectSync(() => accounts.reportUsage(params, resolveCtx), r => r);
|
|
2224
2801
|
};
|
|
2225
2802
|
}
|
|
@@ -2229,10 +2806,8 @@ function buildAccountHandlers(platform, ctxFor) {
|
|
|
2229
2806
|
// platform method runs. Adopters fronting an upstream platform read
|
|
2230
2807
|
// tokens / upstream IDs off `ctx.account.ctx_metadata` without
|
|
2231
2808
|
// having to re-resolve from `params.account`.
|
|
2232
|
-
const resolveCtx =
|
|
2233
|
-
|
|
2234
|
-
toolName: 'get_account_financials',
|
|
2235
|
-
};
|
|
2809
|
+
const resolveCtx = toResolveCtx(ctx, 'get_account_financials');
|
|
2810
|
+
refuseImplicitAccountId(accounts.resolution, params.account);
|
|
2236
2811
|
const resolved = await accounts.resolve(params.account, resolveCtx);
|
|
2237
2812
|
if (!resolved) {
|
|
2238
2813
|
throw new async_outcome_1.AdcpError('ACCOUNT_NOT_FOUND', {
|
|
@@ -2246,4 +2821,63 @@ function buildAccountHandlers(platform, ctxFor) {
|
|
|
2246
2821
|
}
|
|
2247
2822
|
return handlers;
|
|
2248
2823
|
}
|
|
2824
|
+
// ────────────────────────────────────────────────────────────
|
|
2825
|
+
// Auto-seed helpers (catalog-backed comply sandbox; issue #1091)
|
|
2826
|
+
// ────────────────────────────────────────────────────────────
|
|
2827
|
+
// Auto-seed namespace key extractor. Used by both the write side (the
|
|
2828
|
+
// `seed.product` / `seed.pricing_option` adapter closures injected
|
|
2829
|
+
// inline in the auto-seed wiring) and the read side (`makeAutoSeedBridge`
|
|
2830
|
+
// when `ctx.account?.id` is absent — i.e., the framework didn't
|
|
2831
|
+
// pre-resolve the account on a custom dispatcher path).
|
|
2832
|
+
//
|
|
2833
|
+
// Write-side rationale: the adapter cannot reach the framework-resolved
|
|
2834
|
+
// `ctx.account.id` (the comply-controller's `ComplyControllerContext`
|
|
2835
|
+
// only exposes `{ input }`), and calling `platform.accounts.resolve`
|
|
2836
|
+
// here without `authInfo` would let a caller spoof `account.account_id`
|
|
2837
|
+
// and write into another tenant's resolved namespace. The architectural
|
|
2838
|
+
// fix (widen `ComplyControllerContext` to surface the resolved account)
|
|
2839
|
+
// is tracked at #1216 — until then, raw id is the secure choice.
|
|
2840
|
+
function readAutoSeedAccountId(input) {
|
|
2841
|
+
const account = input.account;
|
|
2842
|
+
if (account == null || typeof account !== 'object')
|
|
2843
|
+
return undefined;
|
|
2844
|
+
const id = account.account_id;
|
|
2845
|
+
return typeof id === 'string' && id.length > 0 ? id : undefined;
|
|
2846
|
+
}
|
|
2847
|
+
function autoSeedStoreFor(store, accountId) {
|
|
2848
|
+
let inner = store.get(accountId);
|
|
2849
|
+
if (inner == null) {
|
|
2850
|
+
inner = new Map();
|
|
2851
|
+
store.set(accountId, inner);
|
|
2852
|
+
}
|
|
2853
|
+
return inner;
|
|
2854
|
+
}
|
|
2855
|
+
// Build a `TestControllerBridge` over the per-account auto-seed store. The
|
|
2856
|
+
// bridge filters seeded products by the resolved account so multi-tenant
|
|
2857
|
+
// servers (TenantRegistry-fronted, or single-tenant with multiple sandbox
|
|
2858
|
+
// accounts) never leak fixtures across tenants. Reads
|
|
2859
|
+
// `ctx.account?.id` first (set by `resolveAccount` at request time) and
|
|
2860
|
+
// falls back to `ctx.input.account.account_id` when no resolver is wired.
|
|
2861
|
+
function makeAutoSeedBridge(store) {
|
|
2862
|
+
return {
|
|
2863
|
+
getSeededProducts: ctx => {
|
|
2864
|
+
const resolved = ctx.account?.id;
|
|
2865
|
+
const accountId = typeof resolved === 'string' && resolved.length > 0 ? resolved : readAutoSeedAccountId(ctx.input);
|
|
2866
|
+
if (accountId == null)
|
|
2867
|
+
return [];
|
|
2868
|
+
const inner = store.get(accountId);
|
|
2869
|
+
if (inner == null || inner.size === 0)
|
|
2870
|
+
return [];
|
|
2871
|
+
const products = [];
|
|
2872
|
+
for (const [productId, fixture] of inner.entries()) {
|
|
2873
|
+
const merged = (0, seed_merge_1.mergeSeedProduct)({}, {
|
|
2874
|
+
...(fixture && typeof fixture === 'object' ? fixture : {}),
|
|
2875
|
+
product_id: productId,
|
|
2876
|
+
});
|
|
2877
|
+
products.push(merged);
|
|
2878
|
+
}
|
|
2879
|
+
return products;
|
|
2880
|
+
},
|
|
2881
|
+
};
|
|
2882
|
+
}
|
|
2249
2883
|
//# sourceMappingURL=from-platform.js.map
|