@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
|
@@ -0,0 +1,1046 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hello_seller_adapter_multi_tenant — one server, multiple specialisms
|
|
3
|
+
* (governance + property-lists + brand-rights), multiple tenants with
|
|
4
|
+
* isolated data. Models an agency / holdco hub.
|
|
5
|
+
*
|
|
6
|
+
* ⚠️ DO NOT DEPLOY AS-IS. This file seeds harness/demo bearer tokens in
|
|
7
|
+
* plaintext (`sk_harness_do_not_use_in_prod`, `sk_pinnacle_addie_demo`,
|
|
8
|
+
* `sk_meridian_buyer_demo`) for local exploration. Production adopters:
|
|
9
|
+
* load credentials from a secrets manager and replace the in-memory
|
|
10
|
+
* `TENANTS` map with a transactional store.
|
|
11
|
+
*
|
|
12
|
+
* Demonstrates the **account-routed** multi-tenant model: a single AdCP
|
|
13
|
+
* endpoint hosts multiple specialism agents AND multiple tenants whose
|
|
14
|
+
* data never crosses. Distinct from `decisioning-platform-multi-tenant.ts`
|
|
15
|
+
* which uses **host-routed** tenancy via `TenantRegistry` (different
|
|
16
|
+
* agentUrls per tenant). Both are valid; this one is what a holding
|
|
17
|
+
* company / agency hub looks like.
|
|
18
|
+
*
|
|
19
|
+
* What it shows:
|
|
20
|
+
*
|
|
21
|
+
* - One `DecisioningPlatform` class implementing three specialism
|
|
22
|
+
* interfaces: `campaignGovernance`, `propertyLists`, `brandRights`.
|
|
23
|
+
* - Per-tenant data partitioning. Plans / lists / rights catalogs /
|
|
24
|
+
* grants / brand identity records all keyed by `tenant_id`. A
|
|
25
|
+
* plan synced under tenant A is invisible to tenant B's
|
|
26
|
+
* `get_plan_audit_logs`.
|
|
27
|
+
* - Two tenant resolution paths:
|
|
28
|
+
* 1. Tools that carry `account` (governance, property-lists) →
|
|
29
|
+
* `accounts.resolve(ref)` reads `ref.operator` and maps to
|
|
30
|
+
* a tenant. Same buyer credential can hit different tenants
|
|
31
|
+
* by varying `account.operator`.
|
|
32
|
+
* 2. Tools that DON'T carry `account` (`get_brand_identity`,
|
|
33
|
+
* `get_rights`) → `accounts.resolve(undefined, ctx)` reads
|
|
34
|
+
* the resolved `ctx.agent` (BuyerAgent) and routes to that
|
|
35
|
+
* agent's home tenant. Different credentials → different
|
|
36
|
+
* views of the catalog without any account field on the wire.
|
|
37
|
+
* - Two distinct tenants seeded with overlapping AND distinct data so
|
|
38
|
+
* `curl`-driven exploration shows real isolation.
|
|
39
|
+
*
|
|
40
|
+
* Demo:
|
|
41
|
+
* NODE_ENV=development npx tsx examples/hello_seller_adapter_multi_tenant.ts
|
|
42
|
+
*
|
|
43
|
+
* # As Pinnacle (default storyboard runner credential):
|
|
44
|
+
* adcp storyboard run http://127.0.0.1:3003/mcp governance-spend-authority \
|
|
45
|
+
* --auth sk_harness_do_not_use_in_prod --allow-http
|
|
46
|
+
* adcp storyboard run http://127.0.0.1:3003/mcp brand-rights \
|
|
47
|
+
* --auth sk_harness_do_not_use_in_prod --allow-http
|
|
48
|
+
*
|
|
49
|
+
* # As Meridian — different tenant, different rights catalog:
|
|
50
|
+
* curl -sH "Authorization: Bearer sk_meridian_buyer_demo" \
|
|
51
|
+
* -H "Accept: application/json, text/event-stream" \
|
|
52
|
+
* -H "Content-Type: application/json" \
|
|
53
|
+
* --data '{"jsonrpc":"2.0","id":1,"method":"tools/call",
|
|
54
|
+
* "params":{"name":"get_rights",
|
|
55
|
+
* "arguments":{"query":"music sync","uses":["sync"]}}}' \
|
|
56
|
+
* http://127.0.0.1:3003/mcp
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
import {
|
|
60
|
+
createAdcpServerFromPlatform,
|
|
61
|
+
serve,
|
|
62
|
+
verifyApiKey,
|
|
63
|
+
createIdempotencyStore,
|
|
64
|
+
memoryBackend,
|
|
65
|
+
AdcpError,
|
|
66
|
+
BuyerAgentRegistry,
|
|
67
|
+
createTenantStore,
|
|
68
|
+
narrowAccountRef,
|
|
69
|
+
defineCampaignGovernancePlatform,
|
|
70
|
+
definePropertyListsPlatform,
|
|
71
|
+
defineBrandRightsPlatform,
|
|
72
|
+
type DecisioningPlatform,
|
|
73
|
+
type CampaignGovernancePlatform,
|
|
74
|
+
type PropertyListsPlatform,
|
|
75
|
+
type BrandRightsPlatform,
|
|
76
|
+
type AccountStore,
|
|
77
|
+
type Account,
|
|
78
|
+
type BuyerAgent,
|
|
79
|
+
type CachedBuyerAgentRegistry,
|
|
80
|
+
type RequestContext,
|
|
81
|
+
} from '@adcp/sdk/server';
|
|
82
|
+
import type {
|
|
83
|
+
CheckGovernanceRequest,
|
|
84
|
+
CheckGovernanceResponse,
|
|
85
|
+
SyncPlansRequest,
|
|
86
|
+
SyncPlansResponse,
|
|
87
|
+
ReportPlanOutcomeRequest,
|
|
88
|
+
ReportPlanOutcomeResponse,
|
|
89
|
+
GetPlanAuditLogsRequest,
|
|
90
|
+
GetPlanAuditLogsResponse,
|
|
91
|
+
CreatePropertyListRequest,
|
|
92
|
+
CreatePropertyListResponse,
|
|
93
|
+
UpdatePropertyListRequest,
|
|
94
|
+
UpdatePropertyListResponse,
|
|
95
|
+
GetPropertyListRequest,
|
|
96
|
+
GetPropertyListResponse,
|
|
97
|
+
ListPropertyListsRequest,
|
|
98
|
+
ListPropertyListsResponse,
|
|
99
|
+
DeletePropertyListRequest,
|
|
100
|
+
DeletePropertyListResponse,
|
|
101
|
+
PropertyList,
|
|
102
|
+
} from '@adcp/sdk/types';
|
|
103
|
+
import type {
|
|
104
|
+
GetBrandIdentityRequest,
|
|
105
|
+
GetBrandIdentitySuccess,
|
|
106
|
+
GetRightsRequest,
|
|
107
|
+
GetRightsSuccess,
|
|
108
|
+
AcquireRightsRequest,
|
|
109
|
+
AcquireRightsAcquired,
|
|
110
|
+
AcquireRightsRejected,
|
|
111
|
+
RightUse,
|
|
112
|
+
RightType,
|
|
113
|
+
} from '@adcp/sdk/types/core.generated';
|
|
114
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
115
|
+
|
|
116
|
+
const PORT = Number(process.env['PORT'] ?? 3003);
|
|
117
|
+
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
119
|
+
// Per-tenant data — SWAP for your durable store. Each tenant gets its own
|
|
120
|
+
// brand catalog, rights catalog, plan ledger, property-list store, and
|
|
121
|
+
// account/binding tables. Real adopters key these tables by `tenant_id` in
|
|
122
|
+
// Postgres (or scope by tenant in their ORM); the in-memory shape below is
|
|
123
|
+
// the per-tenant slice the framework hands to handlers via
|
|
124
|
+
// `ctx.account.ctx_metadata.tenant_id`.
|
|
125
|
+
//
|
|
126
|
+
// In-memory module-state has no eviction and no transactional semantics.
|
|
127
|
+
// Production: replace `TENANTS` with row-level reads/writes against a real
|
|
128
|
+
// store, set per-tenant quotas (plans, lists, rights catalogs grow without
|
|
129
|
+
// bound here), and use proper isolation levels for concurrent writers.
|
|
130
|
+
// ---------------------------------------------------------------------------
|
|
131
|
+
|
|
132
|
+
interface BrandRecord {
|
|
133
|
+
brand_id: string;
|
|
134
|
+
house: { domain: string; name: string };
|
|
135
|
+
names: Array<{ [k: string]: string }>;
|
|
136
|
+
description?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface RightsRecord {
|
|
140
|
+
rights_id: string;
|
|
141
|
+
brand_id: string;
|
|
142
|
+
name: string;
|
|
143
|
+
description: string;
|
|
144
|
+
available_uses: RightUse[];
|
|
145
|
+
pricing_option_id: string;
|
|
146
|
+
price: number;
|
|
147
|
+
currency: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
interface StoredPlan {
|
|
151
|
+
plan_id: string;
|
|
152
|
+
version: number;
|
|
153
|
+
budget_total: number;
|
|
154
|
+
currency: string;
|
|
155
|
+
custom_policies: Array<{ policy_id: string; enforcement: 'must' | 'should' | 'may'; policy: string }>;
|
|
156
|
+
audit: AuditEntry[];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
interface AuditEntry {
|
|
160
|
+
timestamp: string;
|
|
161
|
+
kind: 'check' | 'outcome';
|
|
162
|
+
check_id?: string;
|
|
163
|
+
detail: Record<string, unknown>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
interface StoredPropertyList {
|
|
167
|
+
list: PropertyList;
|
|
168
|
+
auth_token: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Per-account governance binding. Buyer registers their governance agent
|
|
173
|
+
* with us (the brand agent) via `sync_governance`. We record the URL +
|
|
174
|
+
* credentials + the active plan_id we should consult on rights acquisition.
|
|
175
|
+
* Real adopters store this as an `account_governance_bindings` row keyed by
|
|
176
|
+
* `(tenant_id, account_key)`.
|
|
177
|
+
*/
|
|
178
|
+
interface GovernanceBinding {
|
|
179
|
+
governance_agent_url: string;
|
|
180
|
+
/** Plan id to evaluate against. The wire `sync_governance` payload
|
|
181
|
+
* doesn't carry plan_id directly — adopters either pre-register a default
|
|
182
|
+
* plan via `sync_plans` then bind via `sync_governance`, or surface a
|
|
183
|
+
* 1:1 plan-per-account convention. We pick the latter for the demo:
|
|
184
|
+
* the most recently synced plan for this tenant becomes the active one. */
|
|
185
|
+
active_plan_id?: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
interface TenantState {
|
|
189
|
+
id: string;
|
|
190
|
+
display_name: string;
|
|
191
|
+
brands: Map<string, BrandRecord>;
|
|
192
|
+
rights: Map<string, RightsRecord>;
|
|
193
|
+
plans: Map<string, StoredPlan>;
|
|
194
|
+
propertyLists: Map<string, StoredPropertyList>;
|
|
195
|
+
/** Accounts the buyer registered via `sync_accounts`. Keyed by
|
|
196
|
+
* `${operator}::${brand.domain}`. Tenant-scoped so an account
|
|
197
|
+
* registered under Pinnacle is invisible to Meridian. */
|
|
198
|
+
accounts: Map<string, { operator: string; brand_domain: string; status: 'active' }>;
|
|
199
|
+
/** Governance bindings keyed by `brand.domain`. `acquire_rights` doesn't
|
|
200
|
+
* carry an operator on the wire — only `buyer.domain` (a brand ref) — so
|
|
201
|
+
* binding lookup on rights acquisition has to key on brand_domain alone.
|
|
202
|
+
* Tenant scoping is enforced one level up: `getTenant(ctx)` already
|
|
203
|
+
* narrowed to the right tenant before we ever read this map. */
|
|
204
|
+
governanceBindings: Map<string, GovernanceBinding>;
|
|
205
|
+
/** Most recently synced plan per tenant — used as the default when the
|
|
206
|
+
* brand agent consults governance on `acquire_rights`. Real adopters
|
|
207
|
+
* bind plan_id to account explicitly. */
|
|
208
|
+
active_plan_id?: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function makeTenant(id: string, displayName: string): TenantState {
|
|
212
|
+
return {
|
|
213
|
+
id,
|
|
214
|
+
display_name: displayName,
|
|
215
|
+
brands: new Map(),
|
|
216
|
+
rights: new Map(),
|
|
217
|
+
plans: new Map(),
|
|
218
|
+
propertyLists: new Map(),
|
|
219
|
+
accounts: new Map(),
|
|
220
|
+
governanceBindings: new Map(),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function accountKey(operator: string, brandDomain: string): string {
|
|
225
|
+
return `${operator}::${brandDomain}`;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const TENANTS = new Map<string, TenantState>([
|
|
229
|
+
['tenant_pinnacle', makeTenant('tenant_pinnacle', 'Pinnacle Agency (rights + governance)')],
|
|
230
|
+
['tenant_meridian', makeTenant('tenant_meridian', 'Meridian Media (rights + governance)')],
|
|
231
|
+
]);
|
|
232
|
+
|
|
233
|
+
// Tenant 1 (Pinnacle) — talent likeness + AI generation rights for the
|
|
234
|
+
// brand-rights compliance storyboard's `acmeoutdoor.example` buyer.
|
|
235
|
+
const pinnacle = TENANTS.get('tenant_pinnacle')!;
|
|
236
|
+
pinnacle.brands.set('acme_outdoor', {
|
|
237
|
+
brand_id: 'acme_outdoor',
|
|
238
|
+
house: { domain: 'acmeinc.example', name: 'Acme Inc.' },
|
|
239
|
+
names: [{ en_US: 'Acme Outdoor' }],
|
|
240
|
+
description: 'Acme Outdoor — outdoor gear for everyday explorers.',
|
|
241
|
+
});
|
|
242
|
+
pinnacle.brands.set('test.example', {
|
|
243
|
+
brand_id: 'test.example',
|
|
244
|
+
house: { domain: 'test.example', name: 'Test Brand' },
|
|
245
|
+
names: [{ en_US: 'Test Brand' }],
|
|
246
|
+
description: 'Storyboard placeholder brand.',
|
|
247
|
+
});
|
|
248
|
+
pinnacle.rights.set('rights_acme_likeness_q2', {
|
|
249
|
+
rights_id: 'rights_acme_likeness_q2',
|
|
250
|
+
brand_id: 'acme_outdoor',
|
|
251
|
+
name: 'Acme Outdoor — likeness + name (Q2)',
|
|
252
|
+
description: 'Single-quarter license covering likeness and name use in commercial creative.',
|
|
253
|
+
available_uses: ['likeness', 'name', 'commercial'],
|
|
254
|
+
pricing_option_id: 'cpm_standard',
|
|
255
|
+
price: 12.5,
|
|
256
|
+
currency: 'USD',
|
|
257
|
+
});
|
|
258
|
+
pinnacle.rights.set('rights_ai_generation_universal', {
|
|
259
|
+
rights_id: 'rights_ai_generation_universal',
|
|
260
|
+
brand_id: 'test.example',
|
|
261
|
+
name: 'AI generation license (universal)',
|
|
262
|
+
description: 'Synthetic-content license covering AI image generation for advertising creative.',
|
|
263
|
+
available_uses: ['ai_generated_image', 'commercial', 'editorial'],
|
|
264
|
+
pricing_option_id: 'cpm_ai_generation',
|
|
265
|
+
price: 8.0,
|
|
266
|
+
currency: 'USD',
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// Tenant 2 (Meridian) — distinct catalog (music sync rights) so cross-tenant
|
|
270
|
+
// reads return DIFFERENT data, not just the same data with a different tenant
|
|
271
|
+
// header. This is what an isolation regression would look like if the
|
|
272
|
+
// per-tenant scoping was wrong.
|
|
273
|
+
const meridian = TENANTS.get('tenant_meridian')!;
|
|
274
|
+
meridian.brands.set('zenith_athletics', {
|
|
275
|
+
brand_id: 'zenith_athletics',
|
|
276
|
+
house: { domain: 'zenithcorp.example', name: 'Zenith Corp.' },
|
|
277
|
+
names: [{ en_US: 'Zenith Athletics' }],
|
|
278
|
+
description: 'Zenith Athletics — performance apparel.',
|
|
279
|
+
});
|
|
280
|
+
meridian.rights.set('rights_zenith_anthem_sync', {
|
|
281
|
+
rights_id: 'rights_zenith_anthem_sync',
|
|
282
|
+
brand_id: 'zenith_athletics',
|
|
283
|
+
name: 'Zenith — anthem track sync rights',
|
|
284
|
+
description: 'Music sync license for Zenith brand anthem in TV/CTV creative.',
|
|
285
|
+
available_uses: ['sync', 'background_music', 'commercial'],
|
|
286
|
+
pricing_option_id: 'flat_quarterly',
|
|
287
|
+
price: 25000,
|
|
288
|
+
currency: 'USD',
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
// ---------------------------------------------------------------------------
|
|
292
|
+
// Operator → tenant routing.
|
|
293
|
+
// `accounts.resolve(ref)` reads `ref.operator` and returns the matching
|
|
294
|
+
// tenant. Same buyer credential can hit different tenants by varying
|
|
295
|
+
// `account.operator` on each request.
|
|
296
|
+
// SWAP: in production this is a directory-service lookup or DB row, not
|
|
297
|
+
// a static map. The buyer-tenant authority gate in `accounts.upsert` and
|
|
298
|
+
// `syncGovernanceHandler` depends on this mapping being trustworthy.
|
|
299
|
+
// ---------------------------------------------------------------------------
|
|
300
|
+
|
|
301
|
+
const OPERATOR_TO_TENANT = new Map<string, string>([
|
|
302
|
+
['pinnacle-agency.example', 'tenant_pinnacle'],
|
|
303
|
+
['meridian-media.example', 'tenant_meridian'],
|
|
304
|
+
]);
|
|
305
|
+
|
|
306
|
+
// ---------------------------------------------------------------------------
|
|
307
|
+
// Buyer-agent registry. Three credentials seeded — three is the lesson:
|
|
308
|
+
//
|
|
309
|
+
// - `sk_harness_do_not_use_in_prod` — the storyboard runner. Bound to
|
|
310
|
+
// Pinnacle so `adcp storyboard run … --auth …` exercises tenant 1.
|
|
311
|
+
// This is a known, well-published token — anyone can grep AdCP repos
|
|
312
|
+
// for it. Banner at the top of this file says do-not-deploy; this is
|
|
313
|
+
// where the warning bites.
|
|
314
|
+
// - `sk_pinnacle_addie_demo` — Pinnacle's own demo buyer. Same tenant as
|
|
315
|
+
// the harness, distinct principal, separate audit identity.
|
|
316
|
+
// - `sk_meridian_buyer_demo` — Meridian's demo buyer. Different tenant.
|
|
317
|
+
// Used in the curl examples in the file header to prove cross-tenant
|
|
318
|
+
// isolation: same `brand_id` query, different responses.
|
|
319
|
+
//
|
|
320
|
+
// `BUYER_HOME_TENANT` is the side-map used by `accounts.resolve(undefined,
|
|
321
|
+
// ctx)` for no-account tools (`get_brand_identity`, `get_rights`) — the
|
|
322
|
+
// resolver reads `ctx.agent.agent_url`, looks up the buyer's home tenant,
|
|
323
|
+
// and returns the tenant-scoped account. Without this seam, no-account
|
|
324
|
+
// tools would fall through to a global view and leak data across tenants.
|
|
325
|
+
// ---------------------------------------------------------------------------
|
|
326
|
+
|
|
327
|
+
const PINNACLE_HARNESS_TOKEN = 'sk_harness_do_not_use_in_prod';
|
|
328
|
+
const PINNACLE_DEMO_TOKEN = 'sk_pinnacle_addie_demo';
|
|
329
|
+
const MERIDIAN_DEMO_TOKEN = 'sk_meridian_buyer_demo';
|
|
330
|
+
|
|
331
|
+
function hashApiKey(token: string): string {
|
|
332
|
+
return createHash('sha256').update(token).digest('hex').slice(0, 32);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
const ADDIE_PINNACLE_URL = 'https://addie.pinnacle.example.com';
|
|
336
|
+
const ADDIE_MERIDIAN_URL = 'https://addie.meridian.example.com';
|
|
337
|
+
|
|
338
|
+
const ONBOARDING_LEDGER = new Map<string, BuyerAgent>([
|
|
339
|
+
[
|
|
340
|
+
hashApiKey(PINNACLE_HARNESS_TOKEN),
|
|
341
|
+
{
|
|
342
|
+
agent_url: ADDIE_PINNACLE_URL,
|
|
343
|
+
display_name: 'Addie (storyboard runner @ Pinnacle)',
|
|
344
|
+
status: 'active',
|
|
345
|
+
billing_capabilities: new Set(['operator']),
|
|
346
|
+
sandbox_only: true,
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
[
|
|
350
|
+
hashApiKey(PINNACLE_DEMO_TOKEN),
|
|
351
|
+
{
|
|
352
|
+
agent_url: ADDIE_PINNACLE_URL,
|
|
353
|
+
display_name: 'Pinnacle demo buyer',
|
|
354
|
+
status: 'active',
|
|
355
|
+
billing_capabilities: new Set(['operator']),
|
|
356
|
+
sandbox_only: true,
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
[
|
|
360
|
+
hashApiKey(MERIDIAN_DEMO_TOKEN),
|
|
361
|
+
{
|
|
362
|
+
agent_url: ADDIE_MERIDIAN_URL,
|
|
363
|
+
display_name: 'Meridian demo buyer',
|
|
364
|
+
status: 'active',
|
|
365
|
+
billing_capabilities: new Set(['operator']),
|
|
366
|
+
sandbox_only: true,
|
|
367
|
+
},
|
|
368
|
+
],
|
|
369
|
+
]);
|
|
370
|
+
|
|
371
|
+
// SWAP: in production this is a row-level join in your buyer-onboarding
|
|
372
|
+
// store, not a static map. The trust seam: `BUYER_HOME_TENANT` is only
|
|
373
|
+
// as trustworthy as the registry's `agent_url` stamp. The bearer-keyed
|
|
374
|
+
// registry below stamps `agent_url` from the seeded ledger row keyed by
|
|
375
|
+
// the SHA-256 hash of the bearer — not buyer-spoofable. If you swap in
|
|
376
|
+
// a registry that takes `agent_url` from a buyer-controlled JWT claim,
|
|
377
|
+
// verify the claim before trusting it for tenant routing.
|
|
378
|
+
const BUYER_HOME_TENANT = new Map<string, string>([
|
|
379
|
+
[ADDIE_PINNACLE_URL, 'tenant_pinnacle'],
|
|
380
|
+
[ADDIE_MERIDIAN_URL, 'tenant_meridian'],
|
|
381
|
+
]);
|
|
382
|
+
|
|
383
|
+
const agentRegistry: CachedBuyerAgentRegistry = BuyerAgentRegistry.cached(
|
|
384
|
+
BuyerAgentRegistry.bearerOnly({
|
|
385
|
+
resolveByCredential: async credential => {
|
|
386
|
+
if (credential.kind !== 'api_key') return null;
|
|
387
|
+
return ONBOARDING_LEDGER.get(credential.key_id) ?? null;
|
|
388
|
+
},
|
|
389
|
+
}),
|
|
390
|
+
{ ttlSeconds: 60 }
|
|
391
|
+
);
|
|
392
|
+
|
|
393
|
+
// ---------------------------------------------------------------------------
|
|
394
|
+
// Tenant lookup helper. Throws ACCOUNT_NOT_FOUND if the resolved tenant
|
|
395
|
+
// can't be located — defensive guard against a handler running outside
|
|
396
|
+
// the multi-tenant rails.
|
|
397
|
+
// ---------------------------------------------------------------------------
|
|
398
|
+
|
|
399
|
+
interface TenantMeta {
|
|
400
|
+
tenant_id: string;
|
|
401
|
+
display_name: string;
|
|
402
|
+
[key: string]: unknown;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
function getTenant(ctx: { account: Account<TenantMeta> }): TenantState {
|
|
406
|
+
const tenantId = ctx.account.ctx_metadata.tenant_id;
|
|
407
|
+
const tenant = TENANTS.get(tenantId);
|
|
408
|
+
if (!tenant) {
|
|
409
|
+
throw new AdcpError('ACCOUNT_NOT_FOUND', {
|
|
410
|
+
message: `Tenant '${tenantId}' is not provisioned.`,
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
return tenant;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// ---------------------------------------------------------------------------
|
|
417
|
+
// AdCP-side adapter — typed against three specialism interfaces.
|
|
418
|
+
// ---------------------------------------------------------------------------
|
|
419
|
+
|
|
420
|
+
class MultiTenantAdapter implements DecisioningPlatform<Record<string, never>, TenantMeta> {
|
|
421
|
+
capabilities = {
|
|
422
|
+
specialisms: ['governance-spend-authority', 'property-lists', 'brand-rights'] as const,
|
|
423
|
+
config: {},
|
|
424
|
+
// brand-rights claim REQUIRES the brand capability block per
|
|
425
|
+
// RequiredCapabilitiesFor<'brand-rights'>; framework auto-derives
|
|
426
|
+
// `rights: true` from the platform impl.
|
|
427
|
+
brand: {
|
|
428
|
+
right_types: ['talent', 'brand_ip', 'music'] as RightType[],
|
|
429
|
+
available_uses: [
|
|
430
|
+
'likeness',
|
|
431
|
+
'name',
|
|
432
|
+
'commercial',
|
|
433
|
+
'editorial',
|
|
434
|
+
'ai_generated_image',
|
|
435
|
+
'sync',
|
|
436
|
+
'background_music',
|
|
437
|
+
] as RightUse[],
|
|
438
|
+
generation_providers: [],
|
|
439
|
+
description: 'Multi-tenant hello agent — governance + brand-rights for two demo tenants.',
|
|
440
|
+
},
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
agentRegistry = agentRegistry;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Multi-tenant `AccountStore`, built via `createTenantStore`. The helper
|
|
447
|
+
* canonicalizes the two-path resolution (operator-routed for tools that
|
|
448
|
+
* carry `account` on the wire; auth-derived for no-account tools) AND
|
|
449
|
+
* bakes in the per-entry tenant-isolation gate on `sync_accounts` /
|
|
450
|
+
* `sync_governance` — adopter callbacks (`upsertRow`, `syncGovernanceRow`)
|
|
451
|
+
* never see a cross-tenant entry.
|
|
452
|
+
*
|
|
453
|
+
* Fail-closed: when the auth principal can't be mapped to a tenant
|
|
454
|
+
* (`resolveFromAuth` returns null), every per-entry call fails
|
|
455
|
+
* `PERMISSION_DENIED`. Don't fork this around — the prior fail-OPEN
|
|
456
|
+
* shape (`if (homeTenantId && entryTenant !== homeTenantId)`) silently
|
|
457
|
+
* disabled isolation for credentials lacking a home tenant.
|
|
458
|
+
*/
|
|
459
|
+
accounts: AccountStore<TenantMeta> = createTenantStore<TenantState, TenantMeta>({
|
|
460
|
+
resolveByRef: ref => {
|
|
461
|
+
const r = narrowAccountRef(ref);
|
|
462
|
+
if (!r.operator) return null;
|
|
463
|
+
const tenantId = OPERATOR_TO_TENANT.get(r.operator);
|
|
464
|
+
return tenantId ? (TENANTS.get(tenantId) ?? null) : null;
|
|
465
|
+
},
|
|
466
|
+
resolveFromAuth: ctx => {
|
|
467
|
+
const tenantId = ctx?.agent ? BUYER_HOME_TENANT.get(ctx.agent.agent_url) : undefined;
|
|
468
|
+
return tenantId ? (TENANTS.get(tenantId) ?? null) : null;
|
|
469
|
+
},
|
|
470
|
+
tenantId: tenant => tenant.id,
|
|
471
|
+
tenantToAccount: (tenant, ref, ctx) => {
|
|
472
|
+
const r = narrowAccountRef(ref);
|
|
473
|
+
// No-account-tool path: synthesize an operator string from the resolved
|
|
474
|
+
// buyer agent's URL so account.id stays stable per-buyer-per-tenant.
|
|
475
|
+
const operator = r?.operator ?? ctx?.agent?.agent_url ?? 'derived';
|
|
476
|
+
return {
|
|
477
|
+
id: tenant.id,
|
|
478
|
+
name: r?.operator
|
|
479
|
+
? `${tenant.display_name} (${operator})`
|
|
480
|
+
: `${tenant.display_name} (auth-derived for ${ctx?.agent?.display_name ?? 'unknown'})`,
|
|
481
|
+
status: 'active',
|
|
482
|
+
operator,
|
|
483
|
+
...(r?.brand?.domain && { brand: { domain: r.brand.domain } }),
|
|
484
|
+
ctx_metadata: { tenant_id: tenant.id, display_name: tenant.display_name },
|
|
485
|
+
// SWAP: read sandbox flag from your backing store. Defaults to false
|
|
486
|
+
// — production adopters route reads/writes to a sandbox backend on
|
|
487
|
+
// this flag, so an unset wire field MUST NOT silently land in
|
|
488
|
+
// sandbox. Buyers who want sandbox set `account.sandbox = true`
|
|
489
|
+
// explicitly.
|
|
490
|
+
sandbox: r?.sandbox ?? false,
|
|
491
|
+
};
|
|
492
|
+
},
|
|
493
|
+
upsertRow: (tenant, ref, _ctx) => {
|
|
494
|
+
// Cross-tenant entries never reach this callback — the helper's
|
|
495
|
+
// gate already filtered them. Adopter responsibility: the upsert
|
|
496
|
+
// itself.
|
|
497
|
+
const r = narrowAccountRef(ref);
|
|
498
|
+
const operator = r.operator!;
|
|
499
|
+
const brandDomain = r.brand!.domain!;
|
|
500
|
+
const key = accountKey(operator, brandDomain);
|
|
501
|
+
// SWAP: row-level write under tenant transaction.
|
|
502
|
+
const action = tenant.accounts.has(key) ? ('updated' as const) : ('created' as const);
|
|
503
|
+
tenant.accounts.set(key, { operator, brand_domain: brandDomain, status: 'active' });
|
|
504
|
+
return {
|
|
505
|
+
account_id: tenant.id,
|
|
506
|
+
brand: { domain: brandDomain },
|
|
507
|
+
operator,
|
|
508
|
+
action,
|
|
509
|
+
status: 'active' as const,
|
|
510
|
+
};
|
|
511
|
+
},
|
|
512
|
+
syncGovernanceRow: (tenant, entry, _ctx) => {
|
|
513
|
+
// Cross-tenant entries never reach this callback. Hello-adapter
|
|
514
|
+
// shortcut: bind on the brand_domain key, record the first agent's
|
|
515
|
+
// URL + the most-recently-synced plan as the active binding.
|
|
516
|
+
// Production adopters MUST persist
|
|
517
|
+
// `entry.governance_agents[i].authentication.credentials` (the
|
|
518
|
+
// framework strips them from the response — see
|
|
519
|
+
// `toWireSyncGovernanceRow` — so the buyer never sees them echoed).
|
|
520
|
+
const r = narrowAccountRef(entry.account);
|
|
521
|
+
const brandDomain = r.brand?.domain;
|
|
522
|
+
const govUrl = entry.governance_agents[0]?.url;
|
|
523
|
+
if (brandDomain) {
|
|
524
|
+
if (govUrl) {
|
|
525
|
+
// ⚠️ Brand-keyed binding: two operators in the same tenant
|
|
526
|
+
// hitting the same brand SHARE this binding. `acquire_rights`
|
|
527
|
+
// doesn't carry an operator on the wire (only `buyer.domain` —
|
|
528
|
+
// tracked in adcp#3918), so brand is all we have to key on
|
|
529
|
+
// inside one tenant. Surface a warn when an existing binding
|
|
530
|
+
// gets overwritten so adopters notice the symptom early —
|
|
531
|
+
// production adopters either move to per-(operator, brand)
|
|
532
|
+
// bindings or accept tenant-scoped brand uniqueness as policy.
|
|
533
|
+
const prior = tenant.governanceBindings.get(brandDomain);
|
|
534
|
+
if (prior && prior.governance_agent_url !== govUrl) {
|
|
535
|
+
console.warn(
|
|
536
|
+
`[multi-tenant] tenant=${tenant.id} brand=${brandDomain} governance binding overwritten ` +
|
|
537
|
+
`(${prior.governance_agent_url} → ${govUrl}). Two operators sharing one brand within a tenant ` +
|
|
538
|
+
`share one binding — see adcontextprotocol/adcp#3918.`
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
// SWAP: row-level write under tenant transaction.
|
|
542
|
+
tenant.governanceBindings.set(brandDomain, {
|
|
543
|
+
governance_agent_url: govUrl,
|
|
544
|
+
active_plan_id: tenant.active_plan_id,
|
|
545
|
+
});
|
|
546
|
+
} else {
|
|
547
|
+
tenant.governanceBindings.delete(brandDomain);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
const echoedAgents = entry.governance_agents.map(a => ({
|
|
551
|
+
url: a.url,
|
|
552
|
+
...(a.categories && { categories: a.categories }),
|
|
553
|
+
}));
|
|
554
|
+
return {
|
|
555
|
+
account: entry.account,
|
|
556
|
+
status: 'synced' as const,
|
|
557
|
+
...(echoedAgents.length > 0 && { governance_agents: echoedAgents }),
|
|
558
|
+
};
|
|
559
|
+
},
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
campaignGovernance: CampaignGovernancePlatform<TenantMeta> = defineCampaignGovernancePlatform<TenantMeta>({
|
|
563
|
+
syncPlans: async (req: SyncPlansRequest, ctx): Promise<SyncPlansResponse> => {
|
|
564
|
+
const tenant = getTenant(ctx);
|
|
565
|
+
const plans = (req.plans ?? []).map(p => {
|
|
566
|
+
const existing = tenant.plans.get(p.plan_id);
|
|
567
|
+
const version = existing ? existing.version + 1 : 1;
|
|
568
|
+
const budget = (p.budget ?? {}) as { total?: number; currency?: string };
|
|
569
|
+
const stored: StoredPlan = {
|
|
570
|
+
plan_id: p.plan_id,
|
|
571
|
+
version,
|
|
572
|
+
budget_total: budget.total ?? 0,
|
|
573
|
+
currency: budget.currency ?? 'USD',
|
|
574
|
+
custom_policies: (p.custom_policies ?? []).map(cp => ({
|
|
575
|
+
policy_id: cp.policy_id,
|
|
576
|
+
enforcement: cp.enforcement,
|
|
577
|
+
policy: cp.policy,
|
|
578
|
+
})),
|
|
579
|
+
audit: existing?.audit ?? [],
|
|
580
|
+
};
|
|
581
|
+
tenant.plans.set(p.plan_id, stored);
|
|
582
|
+
return { plan_id: p.plan_id, status: 'active' as const, version };
|
|
583
|
+
});
|
|
584
|
+
// First-plan-wins convention for the auto-bind on `sync_governance`.
|
|
585
|
+
// Set once, deterministically, AFTER the loop — last-wins inside the
|
|
586
|
+
// map is order-dependent garbage when buyers sync multiple plans.
|
|
587
|
+
// Real adopters bind plan_id to account explicitly via the buyer's
|
|
588
|
+
// compliance configuration; this fallback only fires when
|
|
589
|
+
// `sync_governance` is called WITHOUT an explicit binding for a
|
|
590
|
+
// pre-existing plan.
|
|
591
|
+
const firstNew = (req.plans ?? [])[0]?.plan_id;
|
|
592
|
+
if (firstNew && !tenant.active_plan_id) tenant.active_plan_id = firstNew;
|
|
593
|
+
return { plans };
|
|
594
|
+
},
|
|
595
|
+
|
|
596
|
+
checkGovernance: async (req: CheckGovernanceRequest, ctx): Promise<CheckGovernanceResponse> => {
|
|
597
|
+
const tenant = getTenant(ctx);
|
|
598
|
+
const plan = tenant.plans.get(req.plan_id);
|
|
599
|
+
if (!plan) {
|
|
600
|
+
throw new AdcpError('PLAN_NOT_FOUND', {
|
|
601
|
+
message: `Unknown plan: ${req.plan_id}`,
|
|
602
|
+
field: 'plan_id',
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
const checkId = randomUUID();
|
|
606
|
+
const proposed =
|
|
607
|
+
(req.payload as { total_budget?: number; packages?: Array<{ budget?: number }> } | undefined) ?? {};
|
|
608
|
+
const proposedBudget =
|
|
609
|
+
typeof proposed.total_budget === 'number'
|
|
610
|
+
? proposed.total_budget
|
|
611
|
+
: (proposed.packages ?? []).reduce((s, p) => s + (p.budget ?? 0), 0);
|
|
612
|
+
|
|
613
|
+
const overBudget = proposedBudget > plan.budget_total;
|
|
614
|
+
const status = overBudget ? 'denied' : plan.custom_policies.length > 0 ? 'conditions' : 'approved';
|
|
615
|
+
|
|
616
|
+
const response: CheckGovernanceResponse = {
|
|
617
|
+
check_id: checkId,
|
|
618
|
+
status,
|
|
619
|
+
plan_id: plan.plan_id,
|
|
620
|
+
explanation: overBudget
|
|
621
|
+
? `Proposed spend ${proposedBudget} ${plan.currency} exceeds plan budget ${plan.budget_total} ${plan.currency}.`
|
|
622
|
+
: status === 'conditions'
|
|
623
|
+
? 'Approved with custom policy conditions.'
|
|
624
|
+
: 'Approved.',
|
|
625
|
+
...(status === 'denied' && {
|
|
626
|
+
findings: [
|
|
627
|
+
{
|
|
628
|
+
category_id: 'budget_compliance',
|
|
629
|
+
severity: 'critical' as const,
|
|
630
|
+
explanation: `Proposed spend ${proposedBudget} exceeds plan budget ${plan.budget_total}.`,
|
|
631
|
+
},
|
|
632
|
+
],
|
|
633
|
+
}),
|
|
634
|
+
...(status === 'conditions' && {
|
|
635
|
+
conditions: plan.custom_policies.map(p => ({
|
|
636
|
+
field: `payload.${p.policy_id}`,
|
|
637
|
+
reason: p.policy,
|
|
638
|
+
})),
|
|
639
|
+
}),
|
|
640
|
+
...(status !== 'denied' && {
|
|
641
|
+
governance_context: `gov_ctx_${plan.plan_id}_${checkId}`,
|
|
642
|
+
expires_at: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
|
|
643
|
+
}),
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
plan.audit.push({
|
|
647
|
+
timestamp: new Date().toISOString(),
|
|
648
|
+
kind: 'check',
|
|
649
|
+
check_id: checkId,
|
|
650
|
+
detail: { status, proposed_budget: proposedBudget },
|
|
651
|
+
});
|
|
652
|
+
return response;
|
|
653
|
+
},
|
|
654
|
+
|
|
655
|
+
reportPlanOutcome: async (req: ReportPlanOutcomeRequest, ctx): Promise<ReportPlanOutcomeResponse> => {
|
|
656
|
+
const tenant = getTenant(ctx);
|
|
657
|
+
const plan = tenant.plans.get(req.plan_id);
|
|
658
|
+
if (!plan) {
|
|
659
|
+
throw new AdcpError('PLAN_NOT_FOUND', {
|
|
660
|
+
message: `Unknown plan: ${req.plan_id}`,
|
|
661
|
+
field: 'plan_id',
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
const committed = req.seller_response?.committed_budget ?? 0;
|
|
665
|
+
plan.audit.push({
|
|
666
|
+
timestamp: new Date().toISOString(),
|
|
667
|
+
kind: 'outcome',
|
|
668
|
+
check_id: req.check_id,
|
|
669
|
+
detail: { outcome: req.outcome, purchase_type: req.purchase_type, committed_budget: committed },
|
|
670
|
+
});
|
|
671
|
+
return {
|
|
672
|
+
outcome_id: randomUUID(),
|
|
673
|
+
status: 'accepted',
|
|
674
|
+
committed_budget: committed,
|
|
675
|
+
plan_summary: {
|
|
676
|
+
total_committed: committed,
|
|
677
|
+
budget_remaining: Math.max(0, plan.budget_total - committed),
|
|
678
|
+
},
|
|
679
|
+
};
|
|
680
|
+
},
|
|
681
|
+
|
|
682
|
+
getPlanAuditLogs: async (req: GetPlanAuditLogsRequest, ctx): Promise<GetPlanAuditLogsResponse> => {
|
|
683
|
+
const tenant = getTenant(ctx);
|
|
684
|
+
const ids = req.plan_ids ?? [];
|
|
685
|
+
const plans = ids.map(id => {
|
|
686
|
+
const plan = tenant.plans.get(id);
|
|
687
|
+
if (!plan) {
|
|
688
|
+
throw new AdcpError('PLAN_NOT_FOUND', { message: `Unknown plan: ${id}`, field: 'plan_ids' });
|
|
689
|
+
}
|
|
690
|
+
const checks = plan.audit.filter(a => a.kind === 'check').length;
|
|
691
|
+
const outcomes = plan.audit.filter(a => a.kind === 'outcome').length;
|
|
692
|
+
return {
|
|
693
|
+
plan_id: plan.plan_id,
|
|
694
|
+
plan_version: plan.version,
|
|
695
|
+
status: 'active' as const,
|
|
696
|
+
budget: { authorized: plan.budget_total },
|
|
697
|
+
summary: { checks_performed: checks, outcomes_reported: outcomes },
|
|
698
|
+
governed_actions: [],
|
|
699
|
+
};
|
|
700
|
+
});
|
|
701
|
+
return { plans };
|
|
702
|
+
},
|
|
703
|
+
});
|
|
704
|
+
|
|
705
|
+
propertyLists: PropertyListsPlatform<TenantMeta> = definePropertyListsPlatform<TenantMeta>({
|
|
706
|
+
createPropertyList: async (req: CreatePropertyListRequest, ctx): Promise<CreatePropertyListResponse> => {
|
|
707
|
+
const tenant = getTenant(ctx);
|
|
708
|
+
const listId = `pl_${randomUUID().slice(0, 8)}`;
|
|
709
|
+
const now = new Date().toISOString();
|
|
710
|
+
const list: PropertyList = {
|
|
711
|
+
list_id: listId,
|
|
712
|
+
name: req.name,
|
|
713
|
+
...(req.description && { description: req.description }),
|
|
714
|
+
...(req.account && { account: req.account }),
|
|
715
|
+
...(req.base_properties && { base_properties: req.base_properties }),
|
|
716
|
+
...(req.filters && { filters: req.filters }),
|
|
717
|
+
...(req.brand && { brand: req.brand }),
|
|
718
|
+
cache_duration_hours: 24,
|
|
719
|
+
created_at: now,
|
|
720
|
+
updated_at: now,
|
|
721
|
+
property_count: 0,
|
|
722
|
+
};
|
|
723
|
+
const auth_token = `pltok_${randomUUID().replace(/-/g, '')}`;
|
|
724
|
+
tenant.propertyLists.set(listId, { list, auth_token });
|
|
725
|
+
return { list, auth_token };
|
|
726
|
+
},
|
|
727
|
+
|
|
728
|
+
updatePropertyList: async (req: UpdatePropertyListRequest, ctx): Promise<UpdatePropertyListResponse> => {
|
|
729
|
+
const tenant = getTenant(ctx);
|
|
730
|
+
const stored = tenant.propertyLists.get(req.list_id);
|
|
731
|
+
if (!stored) {
|
|
732
|
+
throw new AdcpError('REFERENCE_NOT_FOUND', {
|
|
733
|
+
message: `Unknown property list: ${req.list_id}`,
|
|
734
|
+
field: 'list_id',
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
const updated: PropertyList = {
|
|
738
|
+
...stored.list,
|
|
739
|
+
...(req.name !== undefined && { name: req.name }),
|
|
740
|
+
...(req.description !== undefined && { description: req.description }),
|
|
741
|
+
...(req.base_properties !== undefined && { base_properties: req.base_properties }),
|
|
742
|
+
...(req.filters !== undefined && { filters: req.filters }),
|
|
743
|
+
...(req.brand !== undefined && { brand: req.brand }),
|
|
744
|
+
updated_at: new Date().toISOString(),
|
|
745
|
+
};
|
|
746
|
+
stored.list = updated;
|
|
747
|
+
return { list: updated };
|
|
748
|
+
},
|
|
749
|
+
|
|
750
|
+
getPropertyList: async (req: GetPropertyListRequest, ctx): Promise<GetPropertyListResponse> => {
|
|
751
|
+
const tenant = getTenant(ctx);
|
|
752
|
+
const stored = tenant.propertyLists.get(req.list_id);
|
|
753
|
+
if (!stored) {
|
|
754
|
+
throw new AdcpError('REFERENCE_NOT_FOUND', {
|
|
755
|
+
message: `Unknown property list: ${req.list_id}`,
|
|
756
|
+
field: 'list_id',
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
return {
|
|
760
|
+
list: stored.list,
|
|
761
|
+
identifiers: [],
|
|
762
|
+
resolved_at: new Date().toISOString(),
|
|
763
|
+
cache_valid_until: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
|
|
764
|
+
};
|
|
765
|
+
},
|
|
766
|
+
|
|
767
|
+
listPropertyLists: async (req: ListPropertyListsRequest, ctx): Promise<ListPropertyListsResponse> => {
|
|
768
|
+
const tenant = getTenant(ctx);
|
|
769
|
+
const all = Array.from(tenant.propertyLists.values()).map(s => s.list);
|
|
770
|
+
const filtered = req.name_contains
|
|
771
|
+
? all.filter(l => l.name.toLowerCase().includes(req.name_contains!.toLowerCase()))
|
|
772
|
+
: all;
|
|
773
|
+
return { lists: filtered };
|
|
774
|
+
},
|
|
775
|
+
|
|
776
|
+
deletePropertyList: async (req: DeletePropertyListRequest, ctx): Promise<DeletePropertyListResponse> => {
|
|
777
|
+
const tenant = getTenant(ctx);
|
|
778
|
+
const existed = tenant.propertyLists.delete(req.list_id);
|
|
779
|
+
return { deleted: existed, list_id: req.list_id };
|
|
780
|
+
},
|
|
781
|
+
});
|
|
782
|
+
|
|
783
|
+
brandRights: BrandRightsPlatform<TenantMeta> = defineBrandRightsPlatform<TenantMeta>({
|
|
784
|
+
getBrandIdentity: async (req: GetBrandIdentityRequest, ctx): Promise<GetBrandIdentitySuccess> => {
|
|
785
|
+
const tenant = getTenant(ctx);
|
|
786
|
+
const brand = tenant.brands.get(req.brand_id);
|
|
787
|
+
if (!brand) {
|
|
788
|
+
throw new AdcpError('REFERENCE_NOT_FOUND', {
|
|
789
|
+
message: `Unknown brand: ${req.brand_id}`,
|
|
790
|
+
field: 'brand_id',
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
return {
|
|
794
|
+
brand_id: brand.brand_id,
|
|
795
|
+
house: brand.house,
|
|
796
|
+
names: brand.names,
|
|
797
|
+
...(brand.description && { description: brand.description }),
|
|
798
|
+
};
|
|
799
|
+
},
|
|
800
|
+
|
|
801
|
+
getRights: async (req: GetRightsRequest, ctx): Promise<GetRightsSuccess> => {
|
|
802
|
+
const tenant = getTenant(ctx);
|
|
803
|
+
const requestedUses = new Set(req.uses);
|
|
804
|
+
const matches = Array.from(tenant.rights.values()).filter(r => {
|
|
805
|
+
if (req.brand_id && r.brand_id !== req.brand_id) return false;
|
|
806
|
+
return r.available_uses.some(u => requestedUses.has(u));
|
|
807
|
+
});
|
|
808
|
+
return {
|
|
809
|
+
rights: matches.map(r => ({
|
|
810
|
+
rights_id: r.rights_id,
|
|
811
|
+
brand_id: r.brand_id,
|
|
812
|
+
name: r.name,
|
|
813
|
+
description: r.description,
|
|
814
|
+
available_uses: r.available_uses,
|
|
815
|
+
pricing_options: [
|
|
816
|
+
{
|
|
817
|
+
pricing_option_id: r.pricing_option_id,
|
|
818
|
+
model: 'cpm',
|
|
819
|
+
price: r.price,
|
|
820
|
+
currency: r.currency,
|
|
821
|
+
uses: r.available_uses,
|
|
822
|
+
},
|
|
823
|
+
],
|
|
824
|
+
})),
|
|
825
|
+
};
|
|
826
|
+
},
|
|
827
|
+
|
|
828
|
+
acquireRights: async (req: AcquireRightsRequest, ctx): Promise<AcquireRightsAcquired | AcquireRightsRejected> => {
|
|
829
|
+
const tenant = getTenant(ctx);
|
|
830
|
+
const offering = tenant.rights.get(req.rights_id);
|
|
831
|
+
if (!offering) {
|
|
832
|
+
throw new AdcpError('REFERENCE_NOT_FOUND', {
|
|
833
|
+
message: `Unknown rights offering: ${req.rights_id}`,
|
|
834
|
+
field: 'rights_id',
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
if (req.pricing_option_id !== offering.pricing_option_id) {
|
|
838
|
+
throw new AdcpError('INVALID_REQUEST', {
|
|
839
|
+
message: `Unknown pricing_option_id: ${req.pricing_option_id}`,
|
|
840
|
+
field: 'pricing_option_id',
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
// Spec: brand agents MUST reject with INVALID_REQUEST (field:
|
|
844
|
+
// campaign.end_date) when end_date is in the past — acquiring
|
|
845
|
+
// rights for an elapsed window produces a zero-duration grant.
|
|
846
|
+
// See acquire-rights-request.json campaign.end_date description.
|
|
847
|
+
if (req.campaign.end_date && Date.parse(req.campaign.end_date) < Date.now()) {
|
|
848
|
+
throw new AdcpError('INVALID_REQUEST', {
|
|
849
|
+
message: `campaign.end_date '${req.campaign.end_date}' is in the past — rights cannot be acquired for an elapsed window.`,
|
|
850
|
+
field: 'campaign.end_date',
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
// Validation seam: when an explicit governance binding exists for
|
|
854
|
+
// this brand, projecting CPM spend will need `estimated_impressions`.
|
|
855
|
+
// Hoisted from `enforceGovernance` so the request-validation MUSTs
|
|
856
|
+
// sit at the boundary rather than nested under enforcement logic.
|
|
857
|
+
// Spec wording (acquire-rights-request.json:64) MUSTs this only
|
|
858
|
+
// under intent-phase `governance_context` + CPM; the broader gate
|
|
859
|
+
// here is conservative — when this adapter holds a registered
|
|
860
|
+
// binding, projecting spend without impressions silently grants
|
|
861
|
+
// under-priced rights. Tighten if your offerings are mixed-pricing
|
|
862
|
+
// or your governance flow uses `governance_context` tokens.
|
|
863
|
+
const hasBinding = tenant.governanceBindings.has(req.buyer.domain);
|
|
864
|
+
if (hasBinding && (req.campaign.estimated_impressions == null || req.campaign.estimated_impressions <= 0)) {
|
|
865
|
+
throw new AdcpError('INVALID_REQUEST', {
|
|
866
|
+
message:
|
|
867
|
+
'campaign.estimated_impressions is required when acquiring CPM-priced rights under a registered governance plan.',
|
|
868
|
+
field: 'campaign.estimated_impressions',
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
const denial = await this.enforceGovernance(tenant, ctx, offering, req);
|
|
872
|
+
if (denial) return denial;
|
|
873
|
+
const offered = new Set(offering.available_uses);
|
|
874
|
+
const unsupported = req.campaign.uses.filter(u => !offered.has(u));
|
|
875
|
+
if (unsupported.length > 0) {
|
|
876
|
+
return {
|
|
877
|
+
rights_id: offering.rights_id,
|
|
878
|
+
status: 'rejected',
|
|
879
|
+
brand_id: offering.brand_id,
|
|
880
|
+
reason: `Requested uses [${unsupported.join(', ')}] are not covered by offering ${offering.rights_id}.`,
|
|
881
|
+
suggestions: [`This offering covers: ${offering.available_uses.join(', ')}.`],
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
// Real adopters persist the grant here — payment record, rights
|
|
885
|
+
// ledger entry, audit row. The hello adapter doesn't expose a
|
|
886
|
+
// read tool over the grant ledger so we skip the write. Add
|
|
887
|
+
// tenant-scoped persistence when wiring a real backend.
|
|
888
|
+
return {
|
|
889
|
+
rights_id: offering.rights_id,
|
|
890
|
+
status: 'acquired',
|
|
891
|
+
brand_id: offering.brand_id,
|
|
892
|
+
terms: {
|
|
893
|
+
pricing_option_id: offering.pricing_option_id,
|
|
894
|
+
amount: offering.price,
|
|
895
|
+
currency: offering.currency,
|
|
896
|
+
uses: req.campaign.uses,
|
|
897
|
+
...(req.campaign.start_date && { start_date: req.campaign.start_date }),
|
|
898
|
+
...(req.campaign.end_date && { end_date: req.campaign.end_date }),
|
|
899
|
+
},
|
|
900
|
+
generation_credentials: [],
|
|
901
|
+
rights_constraint: {
|
|
902
|
+
rights_id: offering.rights_id,
|
|
903
|
+
rights_agent: { url: `http://127.0.0.1:${PORT}/mcp`, id: 'hello-multi-tenant-adapter' },
|
|
904
|
+
uses: req.campaign.uses,
|
|
905
|
+
...(req.campaign.start_date && { valid_from: toDateTime(req.campaign.start_date, 'start') }),
|
|
906
|
+
...(req.campaign.end_date && { valid_until: toDateTime(req.campaign.end_date, 'end') }),
|
|
907
|
+
},
|
|
908
|
+
};
|
|
909
|
+
},
|
|
910
|
+
});
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Cross-specialism governance check. Called from `acquireRights` after
|
|
914
|
+
* the validation seam has already enforced `estimated_impressions` for
|
|
915
|
+
* binding-aware paths. Returns `AcquireRightsRejected` on denial,
|
|
916
|
+
* `null` otherwise (no binding, approved, or conditions — rights flow
|
|
917
|
+
* proceeds either way).
|
|
918
|
+
*
|
|
919
|
+
* **Same-tenant invariant**: this method dispatches `checkGovernance`
|
|
920
|
+
* via `this.campaignGovernance` and forwards the same `ctx`. Both
|
|
921
|
+
* specialisms share `getTenant(ctx)` here by construction (single
|
|
922
|
+
* adapter instance, single tenant resolved per request). If a future
|
|
923
|
+
* deployment splits brand-rights and governance into different tenants
|
|
924
|
+
* — or registers a remote governance agent and dials out via the
|
|
925
|
+
* @adcp/sdk client — this in-process short-circuit no longer applies
|
|
926
|
+
* and the assumption needs revisiting.
|
|
927
|
+
*
|
|
928
|
+
* **⚠️ DO NOT copy this into a single-specialism brand-rights agent.**
|
|
929
|
+
* Without a co-resident `campaignGovernance` handler, the in-process
|
|
930
|
+
* call has nothing to dispatch to. Single-specialism adopters must
|
|
931
|
+
* dial out to the registered governance agent's URL via the
|
|
932
|
+
* @adcp/sdk client instead, supplying the credentials persisted
|
|
933
|
+
* during `sync_governance` (this adapter drops them — see
|
|
934
|
+
* `syncGovernanceHandler`).
|
|
935
|
+
*
|
|
936
|
+
* Uses `ctx.account` (framework-resolved tenant account) — never
|
|
937
|
+
* re-parses operator/brand from the request body, since that would
|
|
938
|
+
* skip the framework's auth-derived tenant resolution.
|
|
939
|
+
*/
|
|
940
|
+
private async enforceGovernance(
|
|
941
|
+
tenant: TenantState,
|
|
942
|
+
ctx: RequestContext<Account<TenantMeta>>,
|
|
943
|
+
offering: RightsRecord,
|
|
944
|
+
req: AcquireRightsRequest
|
|
945
|
+
): Promise<AcquireRightsRejected | null> {
|
|
946
|
+
// `acquire_rights` carries `buyer: BrandReference` (not an `account`
|
|
947
|
+
// field — see AcquireRightsRequest schema). Bindings are keyed by
|
|
948
|
+
// brand_domain inside the tenant so we look up against
|
|
949
|
+
// `req.buyer.domain`. Tenant scoping is upstream: `getTenant(ctx)`
|
|
950
|
+
// narrowed by auth-derived account before we got here.
|
|
951
|
+
//
|
|
952
|
+
// Limitation: keying solely on brand_domain means two buyers from
|
|
953
|
+
// different operators within the same tenant targeting the same
|
|
954
|
+
// brand will share a binding. Filed as adcontextprotocol/adcp#3918
|
|
955
|
+
// (add `account: AccountReference` to AcquireRightsRequest); until
|
|
956
|
+
// that lands, this is a hello-adapter scoping shortcut, not a
|
|
957
|
+
// production-grade resolution.
|
|
958
|
+
const brandDomain = req.buyer?.domain;
|
|
959
|
+
if (!brandDomain) return null;
|
|
960
|
+
const binding = tenant.governanceBindings.get(brandDomain);
|
|
961
|
+
if (!binding?.active_plan_id) return null;
|
|
962
|
+
const planId = binding.active_plan_id;
|
|
963
|
+
if (!tenant.plans.has(planId)) return null;
|
|
964
|
+
|
|
965
|
+
// `estimated_impressions` is enforced at the validation seam in
|
|
966
|
+
// `acquireRights` before we get here — this is just the projection.
|
|
967
|
+
const estimatedSpend = (offering.price * req.campaign.estimated_impressions!) / 1000;
|
|
968
|
+
|
|
969
|
+
const govResp = await this.campaignGovernance.checkGovernance(
|
|
970
|
+
{
|
|
971
|
+
plan_id: planId,
|
|
972
|
+
caller: `http://127.0.0.1:${PORT}/mcp`,
|
|
973
|
+
tool: 'acquire_rights',
|
|
974
|
+
purchase_type: 'rights_license',
|
|
975
|
+
payload: { total_budget: estimatedSpend },
|
|
976
|
+
},
|
|
977
|
+
ctx
|
|
978
|
+
);
|
|
979
|
+
if (govResp.status !== 'denied') return null;
|
|
980
|
+
|
|
981
|
+
// Spec-correct denial shape: `AcquireRightsRejected` with `reason`
|
|
982
|
+
// (and optional `suggestions`). Don't echo the buyer-controlled
|
|
983
|
+
// `governance_agent_url` from the binding — adopters who copied
|
|
984
|
+
// that into the response shipped a small prompt-injection vector
|
|
985
|
+
// (URL planted by one buyer surfaced to another). Forensic detail
|
|
986
|
+
// belongs in server-side logs, not the buyer envelope.
|
|
987
|
+
return {
|
|
988
|
+
rights_id: offering.rights_id,
|
|
989
|
+
status: 'rejected',
|
|
990
|
+
brand_id: offering.brand_id,
|
|
991
|
+
reason: `Denied by governance plan ${planId}: ${govResp.explanation}`,
|
|
992
|
+
...(govResp.findings &&
|
|
993
|
+
govResp.findings.length > 0 && {
|
|
994
|
+
suggestions: govResp.findings.map(f => `[${f.severity}] ${f.category_id}: ${f.explanation}`),
|
|
995
|
+
}),
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
// ---------------------------------------------------------------------------
|
|
1001
|
+
// Helpers
|
|
1002
|
+
// ---------------------------------------------------------------------------
|
|
1003
|
+
|
|
1004
|
+
function toDateTime(value: string, edge: 'start' | 'end'): string {
|
|
1005
|
+
if (/T/.test(value)) return value;
|
|
1006
|
+
return `${value}T${edge === 'start' ? '00:00:00.000Z' : '23:59:59.999Z'}`;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
// ---------------------------------------------------------------------------
|
|
1010
|
+
// Boot
|
|
1011
|
+
// ---------------------------------------------------------------------------
|
|
1012
|
+
|
|
1013
|
+
const platform = new MultiTenantAdapter();
|
|
1014
|
+
const idempotencyStore = createIdempotencyStore({ backend: memoryBackend(), ttlSeconds: 86_400 });
|
|
1015
|
+
|
|
1016
|
+
serve(
|
|
1017
|
+
({ taskStore }) =>
|
|
1018
|
+
createAdcpServerFromPlatform(platform, {
|
|
1019
|
+
name: 'hello-seller-adapter-multi-tenant',
|
|
1020
|
+
version: '1.0.0',
|
|
1021
|
+
taskStore,
|
|
1022
|
+
idempotency: idempotencyStore,
|
|
1023
|
+
resolveSessionKey: ctx => {
|
|
1024
|
+
const acct = ctx.account as Account<TenantMeta> | undefined;
|
|
1025
|
+
return acct?.id ?? 'anonymous';
|
|
1026
|
+
},
|
|
1027
|
+
}),
|
|
1028
|
+
{
|
|
1029
|
+
port: PORT,
|
|
1030
|
+
authenticate: verifyApiKey({
|
|
1031
|
+
keys: {
|
|
1032
|
+
[PINNACLE_HARNESS_TOKEN]: { principal: 'compliance-runner@pinnacle' },
|
|
1033
|
+
[PINNACLE_DEMO_TOKEN]: { principal: 'demo-buyer@pinnacle' },
|
|
1034
|
+
[MERIDIAN_DEMO_TOKEN]: { principal: 'demo-buyer@meridian' },
|
|
1035
|
+
},
|
|
1036
|
+
}),
|
|
1037
|
+
}
|
|
1038
|
+
);
|
|
1039
|
+
|
|
1040
|
+
console.log(`multi-tenant adapter on http://127.0.0.1:${PORT}/mcp`);
|
|
1041
|
+
console.log(` tenants: ${Array.from(TENANTS.keys()).join(', ')}`);
|
|
1042
|
+
console.log(` operators: ${Array.from(OPERATOR_TO_TENANT.keys()).join(', ')}`);
|
|
1043
|
+
console.log(` credentials (3 = 1 harness pinned for storyboards + 2 demo buyers, one per tenant):`);
|
|
1044
|
+
console.log(` ${PINNACLE_HARNESS_TOKEN} → tenant_pinnacle (storyboard runner)`);
|
|
1045
|
+
console.log(` ${PINNACLE_DEMO_TOKEN} → tenant_pinnacle`);
|
|
1046
|
+
console.log(` ${MERIDIAN_DEMO_TOKEN} → tenant_meridian`);
|