@adcp/sdk 13.1.2 → 13.1.4
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/README.md +6 -3
- package/compliance/cache/{3.1.24 → 3.1.30}/domains/creative/scenarios/evaluator_auth.yaml +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/billing_finality_delivery.yaml +6 -3
- package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/canonical_formats.yaml +16 -14
- package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +2 -4
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/delivery_reporting.yaml +6 -4
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/dependency_impairment.yaml +2 -4
- package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +2 -4
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/governance_approved.yaml +10 -7
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/governance_conditions.yaml +10 -7
- package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/governance_denied.yaml +10 -7
- package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/governance_denied_recovery.yaml +12 -9
- package/compliance/cache/3.1.30/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +1161 -0
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/invalid_transitions.yaml +2 -4
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/measurement_accountability.yaml +10 -2
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/measurement_terms_rejected.yaml +6 -7
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/provenance_audit_observation.yaml +52 -10
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/provenance_enforcement.yaml +48 -11
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/provenance_truth_of_claim.yaml +55 -19
- package/compliance/cache/{3.1.24/protocols → 3.1.30/domains}/media-buy/scenarios/vendor_metric_accountability.yaml +5 -2
- package/compliance/cache/{3.1.24 → 3.1.30}/index.json +3 -3
- package/compliance/cache/{3.1.24 → 3.1.30}/protocols/creative/scenarios/evaluator_auth.yaml +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/billing_finality_delivery.yaml +6 -3
- package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/canonical_formats.yaml +16 -14
- package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +2 -4
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/delivery_reporting.yaml +6 -4
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/dependency_impairment.yaml +2 -4
- package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +2 -4
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/governance_approved.yaml +10 -7
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/governance_conditions.yaml +10 -7
- package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/governance_denied.yaml +10 -7
- package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +12 -9
- package/compliance/cache/3.1.30/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +1161 -0
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/invalid_transitions.yaml +2 -4
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/measurement_accountability.yaml +10 -2
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/measurement_terms_rejected.yaml +6 -7
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/provenance_audit_observation.yaml +52 -10
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/provenance_enforcement.yaml +48 -11
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/provenance_truth_of_claim.yaml +55 -19
- package/compliance/cache/{3.1.24/domains → 3.1.30/protocols}/media-buy/scenarios/vendor_metric_accountability.yaml +5 -2
- package/compliance/cache/3.1.30/test-kits/hosted-grader.yaml +56 -0
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/001-no-signature-header.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/002-wrong-tag.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/003-expired-signature.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/004-window-too-long.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/005-alg-not-allowed.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/006-missing-covered-component.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/007-missing-content-digest.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/008-unknown-keyid.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/011-malformed-header.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/012-missing-expires-param.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/013-expires-le-created.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/014-missing-nonce-param.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/015-signature-invalid.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/016-replayed-nonce.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/017-key-revoked.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +9 -5
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/020-rate-abuse.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/024-unquoted-string-param.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/026-non-ascii-host.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/001-basic-post.json +1 -1
- package/compliance/cache/3.1.30/test-vectors/request-signing/positive/002-post-with-content-digest.json +31 -0
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/003-es256-post.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/005-default-port-stripped.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/006-dot-segment-path.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/011-ipv6-authority.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +1 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/universal/read-tool-idempotency.yaml +0 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/universal/stale-response-advisory.yaml +75 -67
- package/compliance/cache/{3.1.24 → 3.1.30}/universal/storyboard-schema.yaml +25 -1
- package/compliance/cache/{3.1.24 → 3.1.30}/universal/webhook-emission.yaml +131 -13
- package/dist/lib/schemas-data/3.1/a2ui/bound-value.json +1 -1
- package/dist/lib/schemas-data/3.1/a2ui/component.json +1 -1
- package/dist/lib/schemas-data/3.1/a2ui/si-catalog.json +25 -25
- package/dist/lib/schemas-data/3.1/a2ui/surface.json +2 -2
- package/dist/lib/schemas-data/3.1/a2ui/user-action.json +1 -1
- package/dist/lib/schemas-data/3.1/aao/agent-publishers.json +1 -1
- package/dist/lib/schemas-data/3.1/account/get-account-financials-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/get-account-financials-response.json +12 -12
- package/dist/lib/schemas-data/3.1/account/list-accounts-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/list-accounts-response.json +8 -8
- package/dist/lib/schemas-data/3.1/account/report-usage-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/report-usage-response.json +6 -6
- package/dist/lib/schemas-data/3.1/account/sync-accounts-request.json +12 -12
- package/dist/lib/schemas-data/3.1/account/sync-accounts-response.json +16 -16
- package/dist/lib/schemas-data/3.1/account/sync-governance-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/sync-governance-response.json +10 -10
- package/dist/lib/schemas-data/3.1/adagents.json +29 -29
- package/dist/lib/schemas-data/3.1/brand/acquire-rights-request.json +10 -10
- package/dist/lib/schemas-data/3.1/brand/acquire-rights-response.json +16 -16
- package/dist/lib/schemas-data/3.1/brand/creative-approval-request.json +5 -5
- package/dist/lib/schemas-data/3.1/brand/creative-approval-response.json +12 -12
- package/dist/lib/schemas-data/3.1/brand/get-brand-identity-request.json +4 -4
- package/dist/lib/schemas-data/3.1/brand/get-brand-identity-response.json +10 -10
- package/dist/lib/schemas-data/3.1/brand/get-rights-request.json +8 -8
- package/dist/lib/schemas-data/3.1/brand/get-rights-response.json +11 -11
- package/dist/lib/schemas-data/3.1/brand/revocation-notification.json +4 -4
- package/dist/lib/schemas-data/3.1/brand/rights-pricing-option.json +5 -5
- package/dist/lib/schemas-data/3.1/brand/rights-terms.json +3 -3
- package/dist/lib/schemas-data/3.1/brand/search-brands-request.json +6 -6
- package/dist/lib/schemas-data/3.1/brand/search-brands-response.json +11 -11
- package/dist/lib/schemas-data/3.1/brand/update-rights-request.json +6 -6
- package/dist/lib/schemas-data/3.1/brand/update-rights-response.json +11 -11
- package/dist/lib/schemas-data/3.1/brand/verification-status.json +1 -1
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-request.json +2 -2
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-response.json +13 -13
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-request.json +2 -2
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-response.json +13 -13
- package/dist/lib/schemas-data/3.1/brand.json +21 -21
- package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-response.json +23 -23
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-response.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-response.json +24 -24
- package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-response.json +770 -265
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-request.json +21 -21
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-response.json +11 -11
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-response.json +253 -84
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-request.json +241 -72
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-response.json +13 -13
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-response.json +48 -48
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-response.json +255 -86
- package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-response.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-request.json +437 -100
- package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-response.json +247 -78
- package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-request.json +243 -74
- package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-response.json +27 -27
- package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-request.json +239 -70
- package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-request.json +250 -81
- package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-response.json +643 -138
- package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-request.json +280 -111
- package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-response.json +77 -77
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-request.json +25 -25
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-response.json +40 -40
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-response.json +65 -65
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-request.json +49 -49
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-response.json +99 -99
- package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-response.json +48 -48
- package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/media-buy/package-request.json +276 -107
- package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-request.json +8 -8
- package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-request.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-request.json +19 -19
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-response.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-request.json +472 -135
- package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-response.json +71 -71
- package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-response.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-response.json +27 -27
- package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-response.json +27 -27
- package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-response.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-request.json +19 -19
- package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-response.json +15 -15
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-response.json +37 -37
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-response.json +770 -265
- package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-request.json +21 -21
- package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-response.json +11 -11
- package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-request.json +24 -24
- package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-response.json +53 -53
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-response.json +23 -23
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-response.json +25 -25
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-response.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-response.json +11 -11
- package/dist/lib/schemas-data/3.1/collection/base-collection-source.json +3 -3
- package/dist/lib/schemas-data/3.1/collection/collection-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.1/collection/collection-list-filters.json +7 -7
- package/dist/lib/schemas-data/3.1/collection/collection-list.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/create-collection-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/collection/create-collection-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/collection/delete-collection-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/delete-collection-list-response.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/get-collection-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/get-collection-list-response.json +12 -12
- package/dist/lib/schemas-data/3.1/collection/list-collection-lists-request.json +6 -6
- package/dist/lib/schemas-data/3.1/collection/list-collection-lists-response.json +7 -7
- package/dist/lib/schemas-data/3.1/collection/update-collection-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/collection/update-collection-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/content-standards/artifact-webhook-payload.json +3 -3
- package/dist/lib/schemas-data/3.1/content-standards/artifact.json +7 -7
- package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-request.json +5 -5
- package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-response.json +10 -10
- package/dist/lib/schemas-data/3.1/content-standards/content-standards.json +7 -7
- package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-request.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-response.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-request.json +4 -4
- package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-response.json +9 -9
- package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-request.json +5 -5
- package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-response.json +10 -10
- package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-request.json +6 -6
- package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-response.json +10 -10
- package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-request.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-response.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-response.json +10 -10
- package/dist/lib/schemas-data/3.1/core/account-authorization.json +1 -1
- package/dist/lib/schemas-data/3.1/core/account-ref.json +2 -2
- package/dist/lib/schemas-data/3.1/core/account-with-authorization.json +3 -3
- package/dist/lib/schemas-data/3.1/core/account.json +10 -10
- package/dist/lib/schemas-data/3.1/core/activation-key.json +1 -1
- package/dist/lib/schemas-data/3.1/core/ad-inventory-config.json +1 -1
- package/dist/lib/schemas-data/3.1/core/agent-encryption-key.json +1 -1
- package/dist/lib/schemas-data/3.1/core/agent-signing-key.json +1 -1
- package/dist/lib/schemas-data/3.1/core/app-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/asset-group-vocabulary.json +1 -1
- package/dist/lib/schemas-data/3.1/core/assets/asset-union.json +21 -21
- package/dist/lib/schemas-data/3.1/core/assets/audio-asset.json +3 -3
- package/dist/lib/schemas-data/3.1/core/assets/brief-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/card-asset.json +6 -6
- package/dist/lib/schemas-data/3.1/core/assets/catalog-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/css-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/daast-asset.json +6 -7
- package/dist/lib/schemas-data/3.1/core/assets/daast-tracker-asset.json +4 -5
- package/dist/lib/schemas-data/3.1/core/assets/html-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/image-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/javascript-asset.json +3 -3
- package/dist/lib/schemas-data/3.1/core/assets/markdown-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/pixel-tracker-asset.json +3 -4
- package/dist/lib/schemas-data/3.1/core/assets/published-post-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/text-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/url-asset.json +4 -5
- package/dist/lib/schemas-data/3.1/core/assets/vast-asset.json +6 -7
- package/dist/lib/schemas-data/3.1/core/assets/vast-tracker-asset.json +4 -5
- package/dist/lib/schemas-data/3.1/core/assets/video-asset.json +7 -7
- package/dist/lib/schemas-data/3.1/core/assets/webhook-asset.json +7 -7
- package/dist/lib/schemas-data/3.1/core/assets/zip-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/async-response-data.json +29 -29
- package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/attribution-window.json +4 -4
- package/dist/lib/schemas-data/3.1/core/audience-member.json +3 -3
- package/dist/lib/schemas-data/3.1/core/audience-selector.json +7 -7
- package/dist/lib/schemas-data/3.1/core/authorized-agent-base.json +3 -3
- package/dist/lib/schemas-data/3.1/core/brand-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/brand-ref.json +3 -3
- package/dist/lib/schemas-data/3.1/core/business-entity.json +2 -2
- package/dist/lib/schemas-data/3.1/core/cancellation-policy.json +2 -2
- package/dist/lib/schemas-data/3.1/core/canonical-format-kind.json +1 -1
- package/dist/lib/schemas-data/3.1/core/canonical-projection-ref.json +3 -3
- package/dist/lib/schemas-data/3.1/core/canonical-projection-slot-override.json +1 -1
- package/dist/lib/schemas-data/3.1/core/catalog-field-mapping.json +2 -2
- package/dist/lib/schemas-data/3.1/core/catalog-item-delivery-metrics.json +3 -3
- package/dist/lib/schemas-data/3.1/core/catalog.json +7 -7
- package/dist/lib/schemas-data/3.1/core/catchment.json +5 -5
- package/dist/lib/schemas-data/3.1/core/collection-distribution.json +2 -2
- package/dist/lib/schemas-data/3.1/core/collection-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/collection-selector.json +1 -1
- package/dist/lib/schemas-data/3.1/core/collection.json +13 -13
- package/dist/lib/schemas-data/3.1/core/committed-metric.json +9 -9
- package/dist/lib/schemas-data/3.1/core/content-rating.json +2 -2
- package/dist/lib/schemas-data/3.1/core/context.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-asset.json +10 -10
- package/dist/lib/schemas-data/3.1/core/creative-assignment.json +2 -2
- package/dist/lib/schemas-data/3.1/core/creative-brief.json +4 -4
- package/dist/lib/schemas-data/3.1/core/creative-consumption.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-delivery-metrics.json +2 -2
- package/dist/lib/schemas-data/3.1/core/creative-filters.json +5 -5
- package/dist/lib/schemas-data/3.1/core/creative-item.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-manifest.json +11 -11
- package/dist/lib/schemas-data/3.1/core/creative-policy.json +3 -3
- package/dist/lib/schemas-data/3.1/core/creative-variable.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-variant.json +5 -5
- package/dist/lib/schemas-data/3.1/core/data-provider-signal-selector.json +1 -1
- package/dist/lib/schemas-data/3.1/core/date-range.json +1 -1
- package/dist/lib/schemas-data/3.1/core/datetime-range.json +1 -1
- package/dist/lib/schemas-data/3.1/core/daypart-target.json +2 -2
- package/dist/lib/schemas-data/3.1/core/deadline-policy.json +1 -1
- package/dist/lib/schemas-data/3.1/core/delivery-forecast.json +7 -7
- package/dist/lib/schemas-data/3.1/core/delivery-metric-aggregate.json +9 -9
- package/dist/lib/schemas-data/3.1/core/delivery-metrics.json +8 -8
- package/dist/lib/schemas-data/3.1/core/deployment.json +3 -3
- package/dist/lib/schemas-data/3.1/core/destination-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/destination.json +1 -1
- package/dist/lib/schemas-data/3.1/core/diagnostic-issue.json +1 -1
- package/dist/lib/schemas-data/3.1/core/downstream-connection-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/core/duration.json +1 -1
- package/dist/lib/schemas-data/3.1/core/education-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/error.json +1 -1
- package/dist/lib/schemas-data/3.1/core/evaluator-spec.json +5 -5
- package/dist/lib/schemas-data/3.1/core/event-custom-data.json +2 -2
- package/dist/lib/schemas-data/3.1/core/event-source-health.json +3 -3
- package/dist/lib/schemas-data/3.1/core/event-surface.json +2 -2
- package/dist/lib/schemas-data/3.1/core/event.json +8 -8
- package/dist/lib/schemas-data/3.1/core/ext.json +1 -1
- package/dist/lib/schemas-data/3.1/core/feature-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/core/flight-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-audience.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-platform.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-type.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-geo.json +5 -5
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-placement.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-signal.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-point-dimensions.json +7 -7
- package/dist/lib/schemas-data/3.1/core/forecast-point.json +27 -27
- package/dist/lib/schemas-data/3.1/core/forecast-range.json +1 -1
- package/dist/lib/schemas-data/3.1/core/forecast-vendor-metric-value.json +5 -5
- package/dist/lib/schemas-data/3.1/core/format-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/format-option-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/format-shape-vocabulary.json +1 -1
- package/dist/lib/schemas-data/3.1/core/format.json +45 -45
- package/dist/lib/schemas-data/3.1/core/frequency-cap.json +4 -4
- package/dist/lib/schemas-data/3.1/core/generation-credential.json +3 -3
- package/dist/lib/schemas-data/3.1/core/geo-breakdown-support.json +3 -3
- package/dist/lib/schemas-data/3.1/core/geo-delivery-metrics.json +6 -6
- package/dist/lib/schemas-data/3.1/core/hotel-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/identifier.json +2 -2
- package/dist/lib/schemas-data/3.1/core/impairment.json +3 -3
- package/dist/lib/schemas-data/3.1/core/industry-identifier.json +2 -2
- package/dist/lib/schemas-data/3.1/core/insertion-order.json +1 -1
- package/dist/lib/schemas-data/3.1/core/installment-deadlines.json +2 -2
- package/dist/lib/schemas-data/3.1/core/installment.json +9 -9
- package/dist/lib/schemas-data/3.1/core/job-item.json +3 -3
- package/dist/lib/schemas-data/3.1/core/keyword-delivery-metrics.json +3 -3
- package/dist/lib/schemas-data/3.1/core/limited-series.json +1 -1
- package/dist/lib/schemas-data/3.1/core/macro-bearing-url.json +19 -0
- package/dist/lib/schemas-data/3.1/core/material-deadline.json +1 -1
- package/dist/lib/schemas-data/3.1/core/mcp-webhook-payload.json +5 -5
- package/dist/lib/schemas-data/3.1/core/measurement-readiness.json +5 -5
- package/dist/lib/schemas-data/3.1/core/measurement-terms.json +3 -3
- package/dist/lib/schemas-data/3.1/core/measurement-window.json +1 -1
- package/dist/lib/schemas-data/3.1/core/media-buy-available-action.json +4 -4
- package/dist/lib/schemas-data/3.1/core/media-buy-features.json +1 -1
- package/dist/lib/schemas-data/3.1/core/media-buy.json +10 -10
- package/dist/lib/schemas-data/3.1/core/missing-metric.json +9 -9
- package/dist/lib/schemas-data/3.1/core/notification-config.json +4 -4
- package/dist/lib/schemas-data/3.1/core/offering-asset-group.json +16 -16
- package/dist/lib/schemas-data/3.1/core/offering.json +5 -5
- package/dist/lib/schemas-data/3.1/core/optimization-goal.json +7 -7
- package/dist/lib/schemas-data/3.1/core/outcome-measurement.json +2 -2
- package/dist/lib/schemas-data/3.1/core/overlay.json +1 -1
- package/dist/lib/schemas-data/3.1/core/package-signal-targeting-group.json +2 -2
- package/dist/lib/schemas-data/3.1/core/package-signal-targeting-groups.json +2 -2
- package/dist/lib/schemas-data/3.1/core/package-signal-targeting.json +3 -3
- package/dist/lib/schemas-data/3.1/core/package.json +17 -17
- package/dist/lib/schemas-data/3.1/core/pagination-request.json +1 -1
- package/dist/lib/schemas-data/3.1/core/pagination-response.json +1 -1
- package/dist/lib/schemas-data/3.1/core/performance-feedback.json +12 -12
- package/dist/lib/schemas-data/3.1/core/performance-standard.json +4 -4
- package/dist/lib/schemas-data/3.1/core/placement-definition.json +10 -10
- package/dist/lib/schemas-data/3.1/core/placement-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/placement.json +7 -7
- package/dist/lib/schemas-data/3.1/core/planned-delivery.json +5 -5
- package/dist/lib/schemas-data/3.1/core/platform-extension-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/postal-area-support.json +2 -2
- package/dist/lib/schemas-data/3.1/core/postal-area.json +4 -4
- package/dist/lib/schemas-data/3.1/core/postal-country-system.json +2 -2
- package/dist/lib/schemas-data/3.1/core/price.json +1 -1
- package/dist/lib/schemas-data/3.1/core/pricing-option.json +10 -10
- package/dist/lib/schemas-data/3.1/core/product-allocation.json +4 -4
- package/dist/lib/schemas-data/3.1/core/product-allowed-action.json +5 -5
- package/dist/lib/schemas-data/3.1/core/product-filters.json +27 -27
- package/dist/lib/schemas-data/3.1/core/product-format-declaration.json +16 -16
- package/dist/lib/schemas-data/3.1/core/product-signal-targeting-option.json +3 -3
- package/dist/lib/schemas-data/3.1/core/product.json +40 -40
- package/dist/lib/schemas-data/3.1/core/property-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/property-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/property-tag.json +1 -1
- package/dist/lib/schemas-data/3.1/core/property.json +6 -6
- package/dist/lib/schemas-data/3.1/core/proposal.json +6 -6
- package/dist/lib/schemas-data/3.1/core/protocol-envelope.json +5 -5
- package/dist/lib/schemas-data/3.1/core/provenance.json +9 -9
- package/dist/lib/schemas-data/3.1/core/publisher-property-selector.json +3 -3
- package/dist/lib/schemas-data/3.1/core/push-notification-config.json +2 -2
- package/dist/lib/schemas-data/3.1/core/real-estate-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/reference-asset.json +1 -1
- package/dist/lib/schemas-data/3.1/core/registry-event.json +14 -14
- package/dist/lib/schemas-data/3.1/core/registry-feed-response.json +2 -2
- package/dist/lib/schemas-data/3.1/core/reporting-capabilities.json +8 -8
- package/dist/lib/schemas-data/3.1/core/reporting-webhook.json +3 -3
- package/dist/lib/schemas-data/3.1/core/requirements/asset-requirements.json +13 -13
- package/dist/lib/schemas-data/3.1/core/requirements/audio-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/catalog-field-binding.json +4 -4
- package/dist/lib/schemas-data/3.1/core/requirements/catalog-requirements.json +5 -5
- package/dist/lib/schemas-data/3.1/core/requirements/css-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/daast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/html-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/image-asset-requirements.json +2 -2
- package/dist/lib/schemas-data/3.1/core/requirements/javascript-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/markdown-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/offering-asset-constraint.json +4 -4
- package/dist/lib/schemas-data/3.1/core/requirements/text-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/url-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/vast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/video-asset-requirements.json +6 -6
- package/dist/lib/schemas-data/3.1/core/requirements/webhook-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/response-payload-jws-envelope.json +1 -1
- package/dist/lib/schemas-data/3.1/core/response.json +1 -1
- package/dist/lib/schemas-data/3.1/core/rights-constraint.json +4 -4
- package/dist/lib/schemas-data/3.1/core/seller-agent-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-coverage-forecast.json +5 -5
- package/dist/lib/schemas-data/3.1/core/signal-definition-enrichment.json +4 -4
- package/dist/lib/schemas-data/3.1/core/signal-definition.json +5 -5
- package/dist/lib/schemas-data/3.1/core/signal-filters.json +3 -3
- package/dist/lib/schemas-data/3.1/core/signal-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-listing.json +4 -4
- package/dist/lib/schemas-data/3.1/core/signal-modeling-disclosure.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.1/core/signal-pricing.json +6 -6
- package/dist/lib/schemas-data/3.1/core/signal-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-selection-group-rule.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-targeting-expression.json +4 -4
- package/dist/lib/schemas-data/3.1/core/signal-targeting-rules.json +2 -2
- package/dist/lib/schemas-data/3.1/core/signal-targeting.json +7 -7
- package/dist/lib/schemas-data/3.1/core/sla-window.json +1 -1
- package/dist/lib/schemas-data/3.1/core/special.json +2 -2
- package/dist/lib/schemas-data/3.1/core/start-timing.json +1 -1
- package/dist/lib/schemas-data/3.1/core/store-item.json +3 -3
- package/dist/lib/schemas-data/3.1/core/talent.json +2 -2
- package/dist/lib/schemas-data/3.1/core/targeting.json +22 -22
- package/dist/lib/schemas-data/3.1/core/tasks-get-request.json +5 -5
- package/dist/lib/schemas-data/3.1/core/tasks-get-response.json +10 -10
- package/dist/lib/schemas-data/3.1/core/tasks-list-request.json +13 -13
- package/dist/lib/schemas-data/3.1/core/tasks-list-response.json +8 -8
- package/dist/lib/schemas-data/3.1/core/transformer-param.json +1 -1
- package/dist/lib/schemas-data/3.1/core/transformer.json +5 -5
- package/dist/lib/schemas-data/3.1/core/truncation-sentinel.json +1 -1
- package/dist/lib/schemas-data/3.1/core/user-match.json +3 -3
- package/dist/lib/schemas-data/3.1/core/vehicle-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/vendor-metric-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization-supported-metric.json +3 -3
- package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization.json +2 -2
- package/dist/lib/schemas-data/3.1/core/vendor-metric-value.json +3 -3
- package/dist/lib/schemas-data/3.1/core/vendor-pricing-option.json +3 -3
- package/dist/lib/schemas-data/3.1/core/version-envelope.json +1 -1
- package/dist/lib/schemas-data/3.1/core/webhook-activity-record.json +3 -3
- package/dist/lib/schemas-data/3.1/core/webhook-challenge-response.json +1 -1
- package/dist/lib/schemas-data/3.1/core/webhook-challenge.json +2 -2
- package/dist/lib/schemas-data/3.1/core/wholesale-feed-event.json +17 -17
- package/dist/lib/schemas-data/3.1/core/wholesale-feed-webhook.json +3 -3
- package/dist/lib/schemas-data/3.1/core/x-entity-types.json +1 -1
- package/dist/lib/schemas-data/3.1/creative/asset-types/index.json +6 -6
- package/dist/lib/schemas-data/3.1/creative/audit-observation.json +2 -2
- package/dist/lib/schemas-data/3.1/creative/creative-feature-result.json +2 -2
- package/dist/lib/schemas-data/3.1/creative/creative-purged-webhook.json +3 -3
- package/dist/lib/schemas-data/3.1/creative/creative-status-changed-webhook.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-request.json +6 -6
- package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-response.json +9 -9
- package/dist/lib/schemas-data/3.1/creative/get-creative-features-request.json +6 -6
- package/dist/lib/schemas-data/3.1/creative/get-creative-features-response.json +11 -11
- package/dist/lib/schemas-data/3.1/creative/list-creative-formats-request.json +13 -13
- package/dist/lib/schemas-data/3.1/creative/list-creative-formats-response.json +9 -9
- package/dist/lib/schemas-data/3.1/creative/list-creatives-request.json +9 -9
- package/dist/lib/schemas-data/3.1/creative/list-creatives-response.json +21 -21
- package/dist/lib/schemas-data/3.1/creative/list-transformers-request.json +8 -8
- package/dist/lib/schemas-data/3.1/creative/list-transformers-response.json +8 -8
- package/dist/lib/schemas-data/3.1/creative/preview-creative-request.json +12 -12
- package/dist/lib/schemas-data/3.1/creative/preview-creative-response.json +14 -14
- package/dist/lib/schemas-data/3.1/creative/preview-render.json +1 -1
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-request.json +8 -8
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-response.json +15 -15
- package/dist/lib/schemas-data/3.1/creative/validate-input-request.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/validate-input-response.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/validate-input-result.json +1 -1
- package/dist/lib/schemas-data/3.1/creative/video-brief.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/account-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/account-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/action-not-allowed-reason.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/action-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/adcp-protocol.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/adjustment-kind.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/advertiser-industry.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/age-verification-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/assessment-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/asset-content-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/attestation-claim.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/attribution-methodology.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/attribution-model.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audience-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audience-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audio-channel-layout.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audio-distribution-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/auth-scheme.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/available-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/billing-party.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/binary-verdict.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/brand-agent-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/c2pa-watermark-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/canceled-by.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/catalog-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/catalog-item-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/channels.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/cloud-storage-protocol.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/co-branding-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-cadence.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-kind.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-relationship.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/completion-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/consent-basis.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/content-id-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/content-rating-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-agent-capability.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-approval-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-event-reason-code.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-quality.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-selection-strategy.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-sort-field.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/daast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/daast-version.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/day-of-week.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/delegation-authority.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/delivery-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/demographic-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/derivative-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/device-platform.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/device-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/digital-source-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/dimension-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/disclosure-persistence.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/disclosure-position.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/distance-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/distribution-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/embedded-provenance-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/error-code.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/error-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/escalation-severity.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/event-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/exclusivity.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/feature-check-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/feed-format.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/feedback-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/forecast-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/forecast-range-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/forecastable-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/format-id-parameter.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/frame-rate-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/frequency-cap-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/genre-taxonomy.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/geo-level.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/gop-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-decision.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-domain.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-phase.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/history-entry-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/http-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/impairment-offline-state.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/impairment-reason-code.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/installment-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/javascript-module-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/landing-page-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/legacy-postal-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/lift-dimension.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/logo-slot.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/makegood-remedy.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/markdown-flavor.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/match-id-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/match-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-action-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-health.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-valid-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/metric-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/metric-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/metro-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/moov-atom-position.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/notification-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/offering-availability-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/outcome-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/pacing.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/payment-terms.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/performance-standard-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/policy-category.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/policy-enforcement.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/postal-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/preview-output-format.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/pricing-model.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/production-quality.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/property-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/proposal-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/publisher-identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/purchase-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/reach-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/reporting-frequency.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/response-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/restricted-attribute.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/right-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/right-use.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/rights-billing-period.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/scan-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/si-session-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/signal-catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/signal-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/signal-value-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/snapshot-unavailable-reason.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/social-placement-surface.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/sort-direction.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/sort-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/special-category.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/specialism.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/sponsored-placement-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/talent-role.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/task-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/task-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/transport-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/travel-time-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/uid-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/universal-macro.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/update-frequency.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/url-asset-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/validation-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/vast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/vast-version.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/video-placement-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/viewability-standard.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/watermark-media-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/wcag-level.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/webhook-response-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/webhook-security-method.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/account-setup-required.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/action-not-allowed.json +4 -4
- package/dist/lib/schemas-data/3.1/error-details/agent-permission-denied.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/audience-too-small.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/authorization-required.json +3 -3
- package/dist/lib/schemas-data/3.1/error-details/billing-not-permitted-for-agent.json +3 -3
- package/dist/lib/schemas-data/3.1/error-details/billing-not-supported.json +2 -2
- package/dist/lib/schemas-data/3.1/error-details/budget-too-low.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/conflict.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/creative-rejected.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/policy-violation.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/rate-limited.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/stale-response.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/vendor-error-codes.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/version-unsupported.json +2 -2
- package/dist/lib/schemas-data/3.1/extensions/extension-meta.json +1 -1
- package/dist/lib/schemas-data/3.1/extensions/index.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/_base.json +5 -5
- package/dist/lib/schemas-data/3.1/formats/canonical/agent_placement.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/audio_daast.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/audio_hosted.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/display_tag.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/html5.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/image.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/image_carousel.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/native_in_feed.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/responsive_creative.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/sponsored_placement.json +3 -3
- package/dist/lib/schemas-data/3.1/formats/canonical/video_hosted.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/video_vast.json +2 -2
- package/dist/lib/schemas-data/3.1/governance/attribute-definition.json +1 -1
- package/dist/lib/schemas-data/3.1/governance/audience-constraints.json +3 -3
- package/dist/lib/schemas-data/3.1/governance/check-governance-request.json +8 -8
- package/dist/lib/schemas-data/3.1/governance/check-governance-response.json +7 -7
- package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-request.json +5 -5
- package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-response.json +11 -11
- package/dist/lib/schemas-data/3.1/governance/policy-category-definition.json +2 -2
- package/dist/lib/schemas-data/3.1/governance/policy-entry.json +6 -6
- package/dist/lib/schemas-data/3.1/governance/policy-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-request.json +7 -7
- package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-response.json +5 -5
- package/dist/lib/schemas-data/3.1/governance/sync-plans-request.json +14 -14
- package/dist/lib/schemas-data/3.1/governance/sync-plans-response.json +6 -6
- package/dist/lib/schemas-data/3.1/index.json +443 -443
- package/dist/lib/schemas-data/3.1/manifest.json +3 -3
- package/dist/lib/schemas-data/3.1/manifest.schema.json +1 -1
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-request.json +16 -16
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-response.json +35 -35
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-request.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-response.json +19 -19
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-request.json +23 -23
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-response.json +27 -27
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-response.json +30 -30
- package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/get-products-request.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/get-products-response.json +10 -10
- package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-request.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-response.json +9 -9
- package/dist/lib/schemas-data/3.1/media-buy/log-event-request.json +5 -5
- package/dist/lib/schemas-data/3.1/media-buy/log-event-response.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/media-buy-delivery-webhook-result.json +9 -9
- package/dist/lib/schemas-data/3.1/media-buy/package-request.json +23 -23
- package/dist/lib/schemas-data/3.1/media-buy/package-update.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-request.json +7 -7
- package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-response.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-response.json +14 -14
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-response.json +14 -14
- package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-response.json +14 -14
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-request.json +11 -11
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-response.json +17 -17
- package/dist/lib/schemas-data/3.1/pricing-options/cpa-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpc-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpcv-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpm-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpp-option.json +5 -5
- package/dist/lib/schemas-data/3.1/pricing-options/cpv-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/flat-rate-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/price-breakdown.json +2 -2
- package/dist/lib/schemas-data/3.1/pricing-options/price-guidance.json +1 -1
- package/dist/lib/schemas-data/3.1/pricing-options/time-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/vcpm-option.json +4 -4
- package/dist/lib/schemas-data/3.1/property/authorization-result.json +1 -1
- package/dist/lib/schemas-data/3.1/property/base-property-source.json +4 -4
- package/dist/lib/schemas-data/3.1/property/create-property-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/property/create-property-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/property/delete-property-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/property/delete-property-list-response.json +5 -5
- package/dist/lib/schemas-data/3.1/property/delivery-record.json +3 -3
- package/dist/lib/schemas-data/3.1/property/get-property-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/property/get-property-list-response.json +9 -9
- package/dist/lib/schemas-data/3.1/property/list-property-lists-request.json +6 -6
- package/dist/lib/schemas-data/3.1/property/list-property-lists-response.json +7 -7
- package/dist/lib/schemas-data/3.1/property/property-error.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-feature-definition.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-feature-result.json +4 -4
- package/dist/lib/schemas-data/3.1/property/property-feature-value.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-feature.json +1 -1
- package/dist/lib/schemas-data/3.1/property/property-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-list-filters.json +5 -5
- package/dist/lib/schemas-data/3.1/property/property-list.json +6 -6
- package/dist/lib/schemas-data/3.1/property/update-property-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/property/update-property-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/property/validate-property-delivery-request.json +6 -6
- package/dist/lib/schemas-data/3.1/property/validate-property-delivery-response.json +6 -6
- package/dist/lib/schemas-data/3.1/property/validation-result.json +5 -5
- package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-request.json +4 -4
- package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-response.json +34 -34
- package/dist/lib/schemas-data/3.1/protocol/get-task-status-request.json +5 -5
- package/dist/lib/schemas-data/3.1/protocol/get-task-status-response.json +10 -10
- package/dist/lib/schemas-data/3.1/protocol/list-tasks-request.json +13 -13
- package/dist/lib/schemas-data/3.1/protocol/list-tasks-response.json +8 -8
- package/dist/lib/schemas-data/3.1/registries/v1-canonical-mapping.json +2 -2
- package/dist/lib/schemas-data/3.1/signals/activate-signal-request.json +6 -6
- package/dist/lib/schemas-data/3.1/signals/activate-signal-response.json +9 -9
- package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/signals/get-signals-request.json +11 -11
- package/dist/lib/schemas-data/3.1/signals/get-signals-response.json +17 -17
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-capabilities.json +1 -1
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-context-use.json +1 -1
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-request.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-response.json +9 -9
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-identity.json +1 -1
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-request.json +7 -7
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-response.json +10 -10
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-request.json +5 -5
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-response.json +10 -10
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context-receipt.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-request.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-response.json +7 -7
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-ui-element.json +1 -1
- package/dist/lib/schemas-data/3.1/trusted-match/available-package.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/context-match-request.json +5 -5
- package/dist/lib/schemas-data/3.1/trusted-match/context-match-response.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/error.json +1 -1
- package/dist/lib/schemas-data/3.1/trusted-match/identity-match-request.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/identity-match-response.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/offer-price.json +1 -1
- package/dist/lib/schemas-data/3.1/trusted-match/offer.json +5 -5
- package/dist/lib/schemas-data/3.1/trusted-match/provider-identity-match-response.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/provider-registration.json +2 -2
- package/dist/lib/schemas-data/3.1/trusted-match/publisher-tmpx-config.json +1 -1
- package/dist/lib/schemas-data/3.1/trusted-match/tmpx-chunk.json +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.mjs.map +1 -1
- package/dist/lib/server/serve.d.ts.map +1 -1
- package/dist/lib/server/serve.js +2 -0
- package/dist/lib/server/serve.js.map +1 -1
- package/dist/lib/server/serve.mjs +2 -0
- package/dist/lib/server/serve.mjs.map +1 -1
- package/dist/lib/server/test-controller.d.mts +1 -0
- package/dist/lib/server/test-controller.d.ts +1 -0
- package/dist/lib/server/test-controller.d.ts.map +1 -1
- package/dist/lib/server/test-controller.js +5 -1
- package/dist/lib/server/test-controller.js.map +1 -1
- package/dist/lib/server/test-controller.mjs +5 -1
- package/dist/lib/server/test-controller.mjs.map +1 -1
- package/dist/lib/server/wire-spec-fields.generated.d.mts +29 -29
- package/dist/lib/server/wire-spec-fields.generated.d.ts +29 -29
- package/dist/lib/server/wire-spec-fields.generated.js +29 -29
- package/dist/lib/server/wire-spec-fields.generated.js.map +1 -1
- package/dist/lib/server/wire-spec-fields.generated.mjs +29 -29
- package/dist/lib/server/wire-spec-fields.generated.mjs.map +1 -1
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/loader.js +5 -0
- package/dist/lib/testing/storyboard/loader.js.map +1 -1
- package/dist/lib/testing/storyboard/loader.mjs +5 -0
- package/dist/lib/testing/storyboard/loader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.js +27 -11
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.mjs +27 -11
- package/dist/lib/testing/storyboard/request-builder.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +2 -2
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +2 -2
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/types.d.mts +10 -0
- package/dist/lib/testing/storyboard/types.d.ts +10 -0
- 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/types.mjs.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/build-creative.d.ts +11 -24
- package/dist/lib/types/comply-test-controller.d.ts +11 -24
- package/dist/lib/types/core.generated.d.mts +10 -24
- package/dist/lib/types/core.generated.d.ts +10 -24
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js.map +1 -1
- package/dist/lib/types/create-media-buy.d.ts +11 -24
- package/dist/lib/types/get-creative-delivery.d.ts +11 -24
- package/dist/lib/types/get-creative-features.d.ts +11 -24
- package/dist/lib/types/get-task-status.d.ts +11 -24
- package/dist/lib/types/list-creatives.d.ts +11 -24
- package/dist/lib/types/manifest.generated.d.mts +3 -3
- package/dist/lib/types/manifest.generated.d.ts +3 -3
- package/dist/lib/types/manifest.generated.js.map +1 -1
- package/dist/lib/types/manifest.generated.mjs.map +1 -1
- package/dist/lib/types/per-tool-index.json +1 -1
- package/dist/lib/types/preview-creative.d.ts +11 -24
- package/dist/lib/types/schemas.generated.d.mts +69 -68
- package/dist/lib/types/schemas.generated.d.ts +69 -68
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +16 -13
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/schemas.generated.mjs +15 -13
- package/dist/lib/types/schemas.generated.mjs.map +1 -1
- package/dist/lib/types/tools.generated.d.mts +10 -24
- package/dist/lib/types/tools.generated.d.ts +10 -24
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/types/tools.generated.js.map +1 -1
- package/dist/lib/types/update-media-buy.d.ts +11 -24
- package/dist/lib/types/validate-input.d.ts +11 -24
- package/dist/lib/version.d.mts +7 -7
- package/dist/lib/version.d.ts +7 -7
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +12 -6
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/version.mjs +12 -6
- package/dist/lib/version.mjs.map +1 -1
- package/docs/llms.txt +6 -6
- package/package.json +7 -7
- package/compliance/cache/3.1.24/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -556
- package/compliance/cache/3.1.24/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -556
- package/compliance/cache/3.1.24/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -31
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/brand/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/brand/scenarios/single_side_trust_extension.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/creative/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/creative/scenarios/billing_out_of_band.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/creative/scenarios/canonical_supported_formats.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/creative/scenarios/native_in_feed.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/governance/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/available_actions.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/creative_reception.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/get_products_async.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/signals/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/signals/scenarios/get_signals_async.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/domains/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/brand/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/creative/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/creative/scenarios/billing_out_of_band.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/creative/scenarios/canonical_supported_formats.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/creative/scenarios/native_in_feed.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/governance/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/available_actions.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/creative_reception.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/get_products_async.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/signals/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/signals/scenarios/get_signals_async.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/protocols/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/audience-sync/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/brand-rights/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/collection-lists/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/content-standards/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/creative-ad-server/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/creative-generative/generative-seller.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/creative-generative/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/creative-template/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/creative-transformers/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/governance-aware-seller/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/governance-delivery-monitor/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/governance-spend-authority/denied.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/governance-spend-authority/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/property-lists/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/sales-broadcast-tv/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/sales-catalog-driven/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/sales-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/sales-non-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/sales-proposal-mode/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/sales-social/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/signal-marketplace/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/signal-owned/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/specialisms/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/acme-outdoor-live.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/acme-outdoor.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/billing-gate-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/bistro-oranje.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/distributed-brand-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/nova-motors.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/osei-natural.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/parallel-dispatch-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/rate-limit-trip-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/signed-requests-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/single-side-trust-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/substitution-observer-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/summit-foods.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-kits/webhook-receiver-runner.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/catalog-macro-substitution.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/002-full-plan.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/README.md +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/canonicalization.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/keys.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-receiver-envelope.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/README.md +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/keys.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/test-vectors/webhook-signing/positive/008-request-signing-key-reuse.json +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/billing-gate-dispatch.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/canonical-format-validate-input.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/capability-discovery.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/collection-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/comply-controller-mode-gate.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/content-standards-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/deterministic-testing.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/error-compliance-signals.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/error-compliance.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/fictional-entities.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/get-media-buys-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/get-products-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/get-signals-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/idempotency.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/notification-config-event-scope.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/notification-config-lifecycle.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/notification-config-rejections.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/pagination-integrity-creative-formats.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/pagination-integrity-list-accounts.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/property-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/runner-output-contract.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/schema-validation-signals.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/schema-validation.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/security.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/signed-requests.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/v3-envelope-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/version-negotiation.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/webhook-receiver-envelope.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/wholesale-feed-bulk-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/wholesale-feed-product-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/wholesale-feed-products.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/wholesale-feed-signal-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.24 → 3.1.30}/universal/wholesale-feed-signals.yaml +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/testing/storyboard/loader.ts"],"sourcesContent":["/**\n * Storyboard YAML parser.\n *\n * Storyboards are pulled from the compliance cache populated by\n * `npm run sync-schemas`. See `./compliance.ts` for capability-driven\n * resolution and bundle loading.\n */\n\nimport { readFileSync } from 'fs';\nimport { parse } from 'yaml';\nimport type { Storyboard } from './types';\nimport { MUTATING_TASKS } from '../../utils/idempotency';\nimport { validateFixtureResolutionDeclarations } from './fixture-resolution';\nimport { valid as validSemver } from 'semver';\n\n/**\n * Supported `branch_set.semantics` values. Extend when AdCP adds `all_of`,\n * `at_least_n`, etc. Exported so the runner can enforce the same whitelist\n * on programmatically-constructed storyboards that bypass the YAML parser.\n */\nexport const BRANCH_SET_SEMANTICS = ['any_of'] as const;\n\nconst IDENTIFIER_PATH_SEGMENT = String.raw`[A-Za-z_][A-Za-z0-9_-]*(?:\\[\\*\\])*`;\nconst IDENTIFIER_PATH_PATTERN = new RegExp(`^${IDENTIFIER_PATH_SEGMENT}(?:\\\\.${IDENTIFIER_PATH_SEGMENT})*$`);\n\n/** Parse a YAML string into a Storyboard. Throws if required fields are missing. */\nexport function parseStoryboard(yamlContent: string): Storyboard {\n const parsed = parse(yamlContent) as Storyboard;\n if (!parsed?.id || !parsed?.phases) {\n throw new Error('Invalid storyboard YAML: missing required fields (id, phases)');\n }\n if (Object.prototype.hasOwnProperty.call(parsed, 'compliance_dir')) {\n throw new Error(\n 'Invalid storyboard YAML: compliance_dir is loader-owned runtime provenance; select an external cache with runner options instead.'\n );\n }\n for (const phase of parsed.phases) {\n // Specialism YAMLs may declare a phase with no `steps:` — the steps are\n // synthesized at runtime from fixtures (see request-signing/synthesize.ts).\n // Treat missing steps as an empty list so the parser stays phase-agnostic.\n if (!phase.steps) phase.steps = [];\n // YAML uses `name:` for context outputs but our runtime expects `key:`.\n for (const step of phase.steps) {\n if (!step.context_outputs) continue;\n for (const output of step.context_outputs) {\n const raw = output as unknown as Record<string, unknown>;\n if (raw.name && !raw.key) {\n output.key = raw.name as string;\n }\n }\n }\n }\n validateStoryboardShape(parsed);\n return parsed;\n}\n\n/** Load and parse a single storyboard file. Useful for ad-hoc testing of in-development YAMLs. */\nexport function loadStoryboardFile(filePath: string): Storyboard {\n return parseStoryboard(readFileSync(filePath, 'utf-8'));\n}\n\n/**\n * Enforce authoring-time invariants on a Storyboard. Called by\n * `parseStoryboard`, and should also be called by any runner entry point\n * that accepts a programmatically-built `Storyboard` object so the same\n * loud-fail-on-drift guarantee holds regardless of how the storyboard was\n * constructed. Mutates only legacy shorthand fields (resolves\n * `contributes: true` to `contributes_to`) and is idempotent on\n * already-validated inputs.\n */\nexport function validateStoryboardShape(storyboard: Storyboard): void {\n validateRequires(storyboard);\n validateFixtureResolutionDeclarations(storyboard);\n validateRequiredAnyOfTools(storyboard);\n validatePhaseDependsOn(storyboard);\n for (const phase of storyboard.phases) {\n validateBranchSet(storyboard.id, phase);\n if (!phase.steps) continue;\n for (const step of phase.steps) {\n resolveContributesShorthand(storyboard.id, phase, step);\n validateFixtureForMutatingStep(storyboard.id, phase, step);\n validateOmitFlagCoherence(storyboard.id, phase, step);\n validateContextOutputs(storyboard.id, phase, step);\n validateUpstreamAttestationMode(storyboard.id, phase, step);\n validateUpstreamIdentifierPaths(storyboard.id, phase, step);\n validateAdvisoryDeclarations(storyboard.id, phase, step);\n validatePeerSubstitutesFor(storyboard.id, phase, step);\n }\n }\n}\n\nfunction validateAdvisoryDeclarations(\n storyboardId: string,\n phase: { id?: string },\n step: { id?: string; validations?: any[] }\n): void {\n for (let index = 0; index < (step.validations ?? []).length; index++) {\n const validation = step.validations![index];\n if (\n validation?.severity !== undefined &&\n validation.severity !== 'required' &&\n validation.severity !== 'advisory'\n ) {\n const prefix = `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${index}]`;\n throw new Error(`${prefix}.severity: must be either \"required\" or \"advisory\"`);\n }\n if (validation?.severity !== 'advisory') continue;\n const prefix = `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${index}]`;\n const hasExpiry = validation.expires_after_version !== undefined;\n const hasPermanent = validation.permanent_advisory !== undefined;\n if (hasExpiry === hasPermanent) {\n throw new Error(\n `${prefix}: severity \"advisory\" must declare exactly one of expires_after_version or permanent_advisory`\n );\n }\n if (\n hasExpiry &&\n (typeof validation.expires_after_version !== 'string' || !validSemver(validation.expires_after_version))\n ) {\n throw new Error(`${prefix}.expires_after_version: must be a valid semver string`);\n }\n if (\n hasPermanent &&\n (typeof validation.permanent_advisory !== 'object' ||\n validation.permanent_advisory === null ||\n typeof validation.permanent_advisory.reason !== 'string' ||\n validation.permanent_advisory.reason.trim().length === 0)\n ) {\n throw new Error(`${prefix}.permanent_advisory.reason: must be a non-empty string`);\n }\n }\n}\n\nfunction validateUpstreamAttestationMode(\n storyboardId: string,\n phase: { id?: string },\n step: { id?: string; validations?: any[] }\n): void {\n const validations = step.validations ?? [];\n for (let validationIndex = 0; validationIndex < validations.length; validationIndex++) {\n const validation = validations[validationIndex];\n if (validation?.check !== 'upstream_traffic') continue;\n const mode = validation.preferred_attestation_mode;\n if (mode !== undefined && mode !== 'raw' && mode !== 'digest') {\n throw new Error(\n `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${validationIndex}].preferred_attestation_mode: must be \"raw\" or \"digest\"`\n );\n }\n }\n}\n\nfunction validateUpstreamIdentifierPaths(\n storyboardId: string,\n phase: { id?: string },\n step: { id?: string; validations?: any[] }\n): void {\n const validations = step.validations ?? [];\n for (let validationIndex = 0; validationIndex < validations.length; validationIndex++) {\n const validation = validations[validationIndex];\n if (validation?.check !== 'upstream_traffic' || validation.identifier_paths === undefined) continue;\n if (!Array.isArray(validation.identifier_paths)) {\n throw new Error(\n `[${storyboardId}] ${phase.id ?? '?'}.${\n step.id ?? '?'\n }.validations[${validationIndex}].identifier_paths: must be an array of request-payload paths`\n );\n }\n for (let pathIndex = 0; pathIndex < validation.identifier_paths.length; pathIndex++) {\n const path = validation.identifier_paths[pathIndex];\n if (typeof path !== 'string' || path.length === 0) {\n throw new Error(\n `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${validationIndex}].identifier_paths[${pathIndex}]: must be a non-empty string`\n );\n }\n const pathErrorPrefix = `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${validationIndex}].identifier_paths[${pathIndex}]`;\n let firstSegment: string;\n try {\n const validated = validateIdentifierPathSyntax(path);\n firstSegment = validated.firstSegment;\n } catch {\n throw new Error(\n `${pathErrorPrefix}: \"${path}\" is unsupported; identifier_paths resolve only against the request payload or sample_request using dotted paths with [*] array selectors`\n );\n }\n const root = firstSegment.toLowerCase();\n if (root === 'request' || root === 'response' || root === 'context') {\n throw new Error(\n `${pathErrorPrefix}: \"${path}\" is unsupported; identifier_paths resolve only against the request payload or sample_request`\n );\n }\n }\n }\n}\n\nfunction validateIdentifierPathSyntax(path: string): { normalized: string; firstSegment: string } {\n const trimmed = path.trim();\n const normalized = trimmed.startsWith('$.') ? trimmed.slice(2) : trimmed;\n if (!IDENTIFIER_PATH_PATTERN.test(normalized)) {\n throw new Error('unsupported identifier path syntax');\n }\n return { normalized, firstSegment: normalized.split(/[.[\\]]/, 1)[0] ?? '' };\n}\n\nfunction validateRequiredAnyOfTools(storyboard: Storyboard): void {\n if (storyboard.required_any_of_tools === undefined) return;\n if (!Array.isArray(storyboard.required_any_of_tools)) {\n throw new Error(`[${storyboard.id}] required_any_of_tools: must be an array of tool-family objects`);\n }\n if (storyboard.required_any_of_tools.length === 0) {\n throw new Error(`[${storyboard.id}] required_any_of_tools: [] is not allowed — omit the field to use no gate`);\n }\n for (let i = 0; i < storyboard.required_any_of_tools.length; i++) {\n const family = storyboard.required_any_of_tools[i] as unknown;\n if (family === null || typeof family !== 'object' || Array.isArray(family)) {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}]: must be an object`);\n }\n const { tools, rationale } = family as { tools?: unknown; rationale?: unknown };\n if (!Array.isArray(tools) || tools.length < 2) {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}].tools: must list at least two tool names`);\n }\n for (const tool of tools) {\n if (typeof tool !== 'string' || tool.length === 0) {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}].tools: entries must be non-empty strings`);\n }\n }\n if (rationale !== undefined && typeof rationale !== 'string') {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}].rationale: must be a string`);\n }\n }\n}\n\n/**\n * Authoring-time validation for `phase.depends_on` (#1161). Each entry\n * must reference a phase declared earlier in the storyboard. Forward\n * references and self-references fail loud at parse time so authoring\n * mistakes (typos, reorderings) don't degrade silently into \"phase\n * always runs\" / \"phase always cascades.\"\n *\n * Rules:\n * - Empty list (`depends_on: []`) is legal — it declares an\n * independent phase. No further validation needed.\n * - Each non-empty entry must be a non-empty string.\n * - Each entry must reference a phase that appears EARLIER in the\n * `storyboard.phases[]` array (forward references are rejected).\n * - A phase cannot depend on itself.\n */\nfunction validatePhaseDependsOn(storyboard: Storyboard): void {\n const phaseIdsSeen = new Set<string>();\n for (const phase of storyboard.phases) {\n if (phase.depends_on !== undefined) {\n if (!Array.isArray(phase.depends_on)) {\n throw new Error(`[${storyboard.id}] phase '${phase.id}': depends_on must be an array of phase ids`);\n }\n for (const dep of phase.depends_on) {\n if (typeof dep !== 'string' || dep.length === 0) {\n throw new Error(`[${storyboard.id}] phase '${phase.id}': depends_on entries must be non-empty strings`);\n }\n if (dep === phase.id) {\n throw new Error(`[${storyboard.id}] phase '${phase.id}': depends_on cannot reference itself`);\n }\n if (!phaseIdsSeen.has(dep)) {\n throw new Error(\n `[${storyboard.id}] phase '${phase.id}': depends_on '${dep}' is not a phase declared earlier in this storyboard (forward and unknown references are rejected)`\n );\n }\n }\n }\n phaseIdsSeen.add(phase.id);\n }\n}\n\n/**\n * Authoring-time validation for `Storyboard.requires` (#1626). The field is\n * an array of non-empty requirement names:\n *\n * - `requires: []` is rejected — an empty array reads as \"no\n * requirements,\" which is the same as omitting the field; failing\n * load forces the author to omit it explicitly.\n * - Each entry must be a non-empty string.\n *\n * Unknown string values are allowed for forward compatibility. Runners that\n * don't know how to satisfy a future requirement skip at runtime with\n * `skip_reason: 'requirement_unmet'` and the authored value in\n * `skip.requirement`.\n */\nfunction validateRequires(storyboard: Storyboard): void {\n if (storyboard.requires === undefined) return;\n if (!Array.isArray(storyboard.requires)) {\n throw new Error(\n `[${storyboard.id}] requires: must be an array of requirement names (got ${typeof storyboard.requires})`\n );\n }\n if (storyboard.requires.length === 0) {\n throw new Error(`[${storyboard.id}] requires: [] is not allowed — omit the field to use the default ([real_wire])`);\n }\n for (let i = 0; i < storyboard.requires.length; i++) {\n const name = storyboard.requires[i];\n if (typeof name !== 'string' || name.length === 0) {\n throw new Error(`[${storyboard.id}] requires[${i}]: entries must be non-empty strings`);\n }\n }\n}\n\n/**\n * Issue #820: mutating tasks (per {@link MUTATING_TASKS}) must have a\n * `sample_request` authored. The fixture is authoritative at run time —\n * there's no sane default payload for a write, and silently fabricating\n * one was the bug factory that produced #780 / #792 / #793 / #802 / #805.\n *\n * Error messages point at the task name, the step id, the storyboard, and\n * suggest the concrete author action.\n *\n * Opt-out: steps with `expect_error: true` that deliberately exercise\n * missing-fixture / malformed-payload seller behavior skip this check —\n * the author is signaling the payload is the test condition.\n *\n * Synthesized phases (`request-signing/synthesize.ts`, controller seeding)\n * start with `phase.steps = []` in YAML and the loader doesn't see the\n * runtime-generated steps, so those paths are not affected.\n */\nfunction validateFixtureForMutatingStep(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n if (!MUTATING_TASKS.has(step.task)) return;\n if (step.sample_request !== undefined) return;\n if (step.expect_error === true) return;\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}' (task=${step.task}): ` +\n `mutating tasks require a sample_request fixture — the runner no longer fabricates ` +\n `write payloads. Author sample_request in the step or, for intentionally malformed ` +\n `payloads, set expect_error: true.`\n );\n}\n\n/**\n * `omit_account: true` must be paired with `expect_error: true`.\n *\n * An accountless `create_media_buy` will always be rejected by a spec-compliant\n * seller; a step that sets `omit_account` without `expect_error` will be graded\n * as a failure (not a controlled negative test), producing a misleading\n * compliance result. Fail loud at parse time so the author sees the problem\n * during storyboard load, not at run time.\n */\nfunction validateOmitFlagCoherence(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n if (step.omit_account && step.expect_error !== true) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ` +\n `omit_account: true requires expect_error: true — an accountless ` +\n `create_media_buy will always be rejected by a spec-compliant seller.`\n );\n }\n}\n\n/**\n * Each `context_outputs` entry must declare exactly one source: either\n * `path` (extract from response) or `generate` (mint at run time). An entry\n * with neither is a silent no-op; one with both would silently pick `generate`\n * and ignore `path`. Both are authoring foot-guns that should fail loud.\n */\nfunction validateContextOutputs(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n if (!step.context_outputs?.length) return;\n for (const output of step.context_outputs) {\n const hasPath = output.path !== undefined;\n const hasGenerate = output.generate !== undefined;\n if (!hasPath && !hasGenerate) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': context_outputs entry ` +\n `'${output.key}' must set exactly one of 'path' or 'generate'.`\n );\n }\n if (hasPath && hasGenerate) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': context_outputs entry ` +\n `'${output.key}' sets both 'path' and 'generate' — they are mutually exclusive.`\n );\n }\n // Validate generator name. The runtime resolver also checks but the loader\n // catches typos at storyboard-load time so authors see the failure on\n // build, not on the first run.\n if (hasGenerate && output.generate !== 'uuid_v4' && output.generate !== 'opaque_id') {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': context_outputs entry ` +\n `'${output.key}' has unknown generate value '${output.generate}'. ` +\n `Supported: 'uuid_v4', 'opaque_id'.`\n );\n }\n }\n}\n\n/**\n * Authoring-time validation for `provides_state_for` (the AdCP 3.0.3 spec\n * field — adcp#3734) and the legacy `peer_substitutes_for` synonym. The\n * runner treats the field as same-phase-only and substitution-only-when-\n * stateful; surface those constraints at parse time so storyboard authors\n * see typos and cross-phase references on build, not as a silent no-rescue\n * at run time.\n *\n * Both field names parse to the same canonical normalized form on the step\n * object (the spec name `provides_state_for` is preferred when both are\n * declared). The deprecation alias is documented in `types.ts`.\n *\n * Rules:\n * - Each target must reference a step that exists in the same phase.\n * - A step cannot substitute for itself.\n * - The substitute step itself must be `stateful: true` — non-stateful\n * passes don't establish state per the cascade contract.\n * - The target step must be `stateful: true` — non-stateful targets\n * don't participate in cascade gating, so a substitution declaration\n * would be a no-op.\n * - When both fields are declared on the same step, they must match\n * element-for-element (the deprecation contract is \"synonym for\", not\n * \"additive with\").\n */\nfunction validatePeerSubstitutesFor(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n const newField = step.provides_state_for;\n const legacyField = step.peer_substitutes_for;\n if (newField === undefined && legacyField === undefined) return;\n\n if (newField !== undefined && legacyField !== undefined) {\n // Order-sensitive equality: `[A, B]` vs `[B, A]` would throw despite being\n // semantically equivalent. Authors mid-migration should write the same list\n // in both fields; the deprecation alias is a literal synonym, not a\n // same-set restatement.\n const a = JSON.stringify(Array.isArray(newField) ? newField : [newField]);\n const b = JSON.stringify(Array.isArray(legacyField) ? legacyField : [legacyField]);\n if (a !== b) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': both provides_state_for and ` +\n `peer_substitutes_for declared with different values — pick one (provides_state_for is the ` +\n `spec field; peer_substitutes_for is a deprecated synonym)`\n );\n }\n }\n\n // Normalize onto provides_state_for so the runner can read a single field.\n // peer_substitutes_for stays for back-compat with any consumer code that\n // already reads it.\n if (newField === undefined && legacyField !== undefined) {\n step.provides_state_for = legacyField;\n } else if (newField !== undefined && legacyField === undefined) {\n step.peer_substitutes_for = newField;\n }\n\n const sourceFieldName = newField !== undefined ? 'provides_state_for' : 'peer_substitutes_for';\n const declared = step.provides_state_for!;\n const targets = Array.isArray(declared) ? declared : [declared];\n if (!step.stateful) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} is only legal on stateful steps`\n );\n }\n const phaseStepIds = new Map(phase.steps.map(s => [s.id, s]));\n for (const target of targets) {\n if (typeof target !== 'string' || target.length === 0) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} entries must be non-empty strings`\n );\n }\n if (target === step.id) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} cannot reference itself`\n );\n }\n const targetStep = phaseStepIds.get(target);\n if (!targetStep) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} target '${target}' is not a step in this phase (same-phase only)`\n );\n }\n if (!targetStep.stateful) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} target '${target}' must be stateful`\n );\n }\n }\n}\n\nfunction validateBranchSet(storyboardId: string, phase: Storyboard['phases'][number]): void {\n if (phase.branch_set === undefined) return;\n const bs = phase.branch_set as unknown;\n if (!bs || typeof bs !== 'object') {\n throw new Error(`[${storyboardId}] phase '${phase.id}': branch_set must be an object with { id, semantics }`);\n }\n const { id, semantics } = bs as Record<string, unknown>;\n if (typeof id !== 'string' || id.length === 0) {\n throw new Error(`[${storyboardId}] phase '${phase.id}': branch_set.id must be a non-empty string`);\n }\n if (typeof semantics !== 'string' || semantics.length === 0) {\n throw new Error(`[${storyboardId}] phase '${phase.id}': branch_set.semantics must be a non-empty string`);\n }\n // Only `any_of` is defined in AdCP today (adcp#2646 lint rule 2 —\n // `at_least_n` and `all_of` are reserved but not defined). Reject unknown\n // values at parse rather than silently skipping grading at runtime, so\n // spec-drift typos fail loud instead of degrading to raw `failed` peers.\n if (!(BRANCH_SET_SEMANTICS as readonly string[]).includes(semantics)) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}': branch_set.semantics='${semantics}' is not supported (valid: ${BRANCH_SET_SEMANTICS.join(', ')})`\n );\n }\n // Schema constraint: every phase in a branch set MUST be optional. A\n // non-optional branch-set phase would fail the storyboard on any step\n // failure regardless of peer contribution, defeating the any_of gate.\n if (phase.optional !== true) {\n throw new Error(`[${storyboardId}] phase '${phase.id}': phases declaring branch_set must set 'optional: true'`);\n }\n}\n\n/**\n * Resolve the `contributes: true` boolean shorthand introduced alongside the\n * first-class `branch_set:` phase field (adcp-client#693, adcp#2646).\n *\n * Rules:\n * - `contributes: true` is legal only inside a phase that declares `branch_set:`.\n * - A step MUST NOT set both `contributes` and `contributes_to` (ambiguous).\n * - A string `contributes_to` inside a branch_set phase MUST equal `branch_set.id`\n * (otherwise the aggregation target drifts — same invariant the spec lint enforces).\n *\n * After resolution, `step.contributes_to` carries the flag name and `step.contributes`\n * is cleared, so the runner reads a single field regardless of authoring form.\n */\nfunction resolveContributesShorthand(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n const hasBoolean = step.contributes !== undefined;\n const hasString = step.contributes_to !== undefined;\n\n if (hasBoolean && hasString) {\n throw new Error(`[${storyboardId}] step '${step.id}' declares both 'contributes' and 'contributes_to' — pick one`);\n }\n\n if (hasBoolean) {\n if (step.contributes === true) {\n if (!phase.branch_set) {\n throw new Error(\n `[${storyboardId}] step '${step.id}': 'contributes: true' is only legal inside a phase that declares branch_set`\n );\n }\n step.contributes_to = phase.branch_set.id;\n }\n delete step.contributes;\n return;\n }\n\n if (hasString && phase.branch_set && step.contributes_to !== phase.branch_set.id) {\n throw new Error(\n `[${storyboardId}] step '${step.id}': contributes_to='${step.contributes_to}' must equal enclosing phase's branch_set.id='${phase.branch_set.id}'`\n );\n }\n}\n"],"mappings":"AAQA,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAEtB,SAAS,sBAAsB;AAC/B,SAAS,6CAA6C;AACtD,SAAS,SAAS,mBAAmB;AAO9B,MAAM,uBAAuB,CAAC,QAAQ;AAE7C,MAAM,0BAA0B,OAAO;AACvC,MAAM,0BAA0B,IAAI,OAAO,IAAI,uBAAuB,SAAS,uBAAuB,KAAK;AAGpG,SAAS,gBAAgB,aAAiC;AAC/D,QAAM,SAAS,MAAM,WAAW;AAChC,MAAI,CAAC,QAAQ,MAAM,CAAC,QAAQ,QAAQ;AAClC,UAAM,IAAI,MAAM,+DAA+D;AAAA,EACjF;AACA,MAAI,OAAO,UAAU,eAAe,KAAK,QAAQ,gBAAgB,GAAG;AAClE,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,aAAW,SAAS,OAAO,QAAQ;AAIjC,QAAI,CAAC,MAAM,MAAO,OAAM,QAAQ,CAAC;AAEjC,eAAW,QAAQ,MAAM,OAAO;AAC9B,UAAI,CAAC,KAAK,gBAAiB;AAC3B,iBAAW,UAAU,KAAK,iBAAiB;AACzC,cAAM,MAAM;AACZ,YAAI,IAAI,QAAQ,CAAC,IAAI,KAAK;AACxB,iBAAO,MAAM,IAAI;AAAA,QACnB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,0BAAwB,M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,KAAK,cAAc,iDAAiD,MAAM,WAAW,EAAE;AAAA,IACjJ;AAAA,EACF;AACF;","names":["prefix"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/testing/storyboard/loader.ts"],"sourcesContent":["/**\n * Storyboard YAML parser.\n *\n * Storyboards are pulled from the compliance cache populated by\n * `npm run sync-schemas`. See `./compliance.ts` for capability-driven\n * resolution and bundle loading.\n */\n\nimport { readFileSync } from 'fs';\nimport { parse } from 'yaml';\nimport type { Storyboard } from './types';\nimport { MUTATING_TASKS } from '../../utils/idempotency';\nimport { validateFixtureResolutionDeclarations } from './fixture-resolution';\nimport { valid as validSemver } from 'semver';\n\n/**\n * Supported `branch_set.semantics` values. Extend when AdCP adds `all_of`,\n * `at_least_n`, etc. Exported so the runner can enforce the same whitelist\n * on programmatically-constructed storyboards that bypass the YAML parser.\n */\nexport const BRANCH_SET_SEMANTICS = ['any_of'] as const;\n\nconst IDENTIFIER_PATH_SEGMENT = String.raw`[A-Za-z_][A-Za-z0-9_-]*(?:\\[\\*\\])*`;\nconst IDENTIFIER_PATH_PATTERN = new RegExp(`^${IDENTIFIER_PATH_SEGMENT}(?:\\\\.${IDENTIFIER_PATH_SEGMENT})*$`);\n\n/** Parse a YAML string into a Storyboard. Throws if required fields are missing. */\nexport function parseStoryboard(yamlContent: string): Storyboard {\n const parsed = parse(yamlContent) as Storyboard;\n if (!parsed?.id || !parsed?.phases) {\n throw new Error('Invalid storyboard YAML: missing required fields (id, phases)');\n }\n if (Object.prototype.hasOwnProperty.call(parsed, 'compliance_dir')) {\n throw new Error(\n 'Invalid storyboard YAML: compliance_dir is loader-owned runtime provenance; select an external cache with runner options instead.'\n );\n }\n for (const phase of parsed.phases) {\n // Specialism YAMLs may declare a phase with no `steps:` — the steps are\n // synthesized at runtime from fixtures (see request-signing/synthesize.ts).\n // Treat missing steps as an empty list so the parser stays phase-agnostic.\n if (!phase.steps) phase.steps = [];\n // YAML uses `name:` for context outputs but our runtime expects `key:`.\n for (const step of phase.steps) {\n if (!step.context_outputs) continue;\n for (const output of step.context_outputs) {\n const raw = output as unknown as Record<string, unknown>;\n if (raw.name && !raw.key) {\n output.key = raw.name as string;\n }\n }\n }\n }\n validateStoryboardShape(parsed);\n return parsed;\n}\n\n/** Load and parse a single storyboard file. Useful for ad-hoc testing of in-development YAMLs. */\nexport function loadStoryboardFile(filePath: string): Storyboard {\n return parseStoryboard(readFileSync(filePath, 'utf-8'));\n}\n\n/**\n * Enforce authoring-time invariants on a Storyboard. Called by\n * `parseStoryboard`, and should also be called by any runner entry point\n * that accepts a programmatically-built `Storyboard` object so the same\n * loud-fail-on-drift guarantee holds regardless of how the storyboard was\n * constructed. Mutates only legacy shorthand fields (resolves\n * `contributes: true` to `contributes_to`) and is idempotent on\n * already-validated inputs.\n */\nexport function validateStoryboardShape(storyboard: Storyboard): void {\n validateRequires(storyboard);\n validateFixtureResolutionDeclarations(storyboard);\n validateRequiredAnyOfTools(storyboard);\n validatePhaseDependsOn(storyboard);\n for (const phase of storyboard.phases) {\n validateBranchSet(storyboard.id, phase);\n if (!phase.steps) continue;\n for (const step of phase.steps) {\n if (\n step.enrich_request !== undefined &&\n (step.enrich_request !== true || !step.expect_error || step.negative_path !== 'payload_well_formed')\n ) {\n throw new Error(\n `[${storyboard.id}] ${step.id}: enrich_request requires expect_error: true and negative_path: payload_well_formed`\n );\n }\n resolveContributesShorthand(storyboard.id, phase, step);\n validateFixtureForMutatingStep(storyboard.id, phase, step);\n validateOmitFlagCoherence(storyboard.id, phase, step);\n validateContextOutputs(storyboard.id, phase, step);\n validateUpstreamAttestationMode(storyboard.id, phase, step);\n validateUpstreamIdentifierPaths(storyboard.id, phase, step);\n validateAdvisoryDeclarations(storyboard.id, phase, step);\n validatePeerSubstitutesFor(storyboard.id, phase, step);\n }\n }\n}\n\nfunction validateAdvisoryDeclarations(\n storyboardId: string,\n phase: { id?: string },\n step: { id?: string; validations?: any[] }\n): void {\n for (let index = 0; index < (step.validations ?? []).length; index++) {\n const validation = step.validations![index];\n if (\n validation?.severity !== undefined &&\n validation.severity !== 'required' &&\n validation.severity !== 'advisory'\n ) {\n const prefix = `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${index}]`;\n throw new Error(`${prefix}.severity: must be either \"required\" or \"advisory\"`);\n }\n if (validation?.severity !== 'advisory') continue;\n const prefix = `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${index}]`;\n const hasExpiry = validation.expires_after_version !== undefined;\n const hasPermanent = validation.permanent_advisory !== undefined;\n if (hasExpiry === hasPermanent) {\n throw new Error(\n `${prefix}: severity \"advisory\" must declare exactly one of expires_after_version or permanent_advisory`\n );\n }\n if (\n hasExpiry &&\n (typeof validation.expires_after_version !== 'string' || !validSemver(validation.expires_after_version))\n ) {\n throw new Error(`${prefix}.expires_after_version: must be a valid semver string`);\n }\n if (\n hasPermanent &&\n (typeof validation.permanent_advisory !== 'object' ||\n validation.permanent_advisory === null ||\n typeof validation.permanent_advisory.reason !== 'string' ||\n validation.permanent_advisory.reason.trim().length === 0)\n ) {\n throw new Error(`${prefix}.permanent_advisory.reason: must be a non-empty string`);\n }\n }\n}\n\nfunction validateUpstreamAttestationMode(\n storyboardId: string,\n phase: { id?: string },\n step: { id?: string; validations?: any[] }\n): void {\n const validations = step.validations ?? [];\n for (let validationIndex = 0; validationIndex < validations.length; validationIndex++) {\n const validation = validations[validationIndex];\n if (validation?.check !== 'upstream_traffic') continue;\n const mode = validation.preferred_attestation_mode;\n if (mode !== undefined && mode !== 'raw' && mode !== 'digest') {\n throw new Error(\n `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${validationIndex}].preferred_attestation_mode: must be \"raw\" or \"digest\"`\n );\n }\n }\n}\n\nfunction validateUpstreamIdentifierPaths(\n storyboardId: string,\n phase: { id?: string },\n step: { id?: string; validations?: any[] }\n): void {\n const validations = step.validations ?? [];\n for (let validationIndex = 0; validationIndex < validations.length; validationIndex++) {\n const validation = validations[validationIndex];\n if (validation?.check !== 'upstream_traffic' || validation.identifier_paths === undefined) continue;\n if (!Array.isArray(validation.identifier_paths)) {\n throw new Error(\n `[${storyboardId}] ${phase.id ?? '?'}.${\n step.id ?? '?'\n }.validations[${validationIndex}].identifier_paths: must be an array of request-payload paths`\n );\n }\n for (let pathIndex = 0; pathIndex < validation.identifier_paths.length; pathIndex++) {\n const path = validation.identifier_paths[pathIndex];\n if (typeof path !== 'string' || path.length === 0) {\n throw new Error(\n `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${validationIndex}].identifier_paths[${pathIndex}]: must be a non-empty string`\n );\n }\n const pathErrorPrefix = `[${storyboardId}] ${phase.id ?? '?'}.${step.id ?? '?'}.validations[${validationIndex}].identifier_paths[${pathIndex}]`;\n let firstSegment: string;\n try {\n const validated = validateIdentifierPathSyntax(path);\n firstSegment = validated.firstSegment;\n } catch {\n throw new Error(\n `${pathErrorPrefix}: \"${path}\" is unsupported; identifier_paths resolve only against the request payload or sample_request using dotted paths with [*] array selectors`\n );\n }\n const root = firstSegment.toLowerCase();\n if (root === 'request' || root === 'response' || root === 'context') {\n throw new Error(\n `${pathErrorPrefix}: \"${path}\" is unsupported; identifier_paths resolve only against the request payload or sample_request`\n );\n }\n }\n }\n}\n\nfunction validateIdentifierPathSyntax(path: string): { normalized: string; firstSegment: string } {\n const trimmed = path.trim();\n const normalized = trimmed.startsWith('$.') ? trimmed.slice(2) : trimmed;\n if (!IDENTIFIER_PATH_PATTERN.test(normalized)) {\n throw new Error('unsupported identifier path syntax');\n }\n return { normalized, firstSegment: normalized.split(/[.[\\]]/, 1)[0] ?? '' };\n}\n\nfunction validateRequiredAnyOfTools(storyboard: Storyboard): void {\n if (storyboard.required_any_of_tools === undefined) return;\n if (!Array.isArray(storyboard.required_any_of_tools)) {\n throw new Error(`[${storyboard.id}] required_any_of_tools: must be an array of tool-family objects`);\n }\n if (storyboard.required_any_of_tools.length === 0) {\n throw new Error(`[${storyboard.id}] required_any_of_tools: [] is not allowed — omit the field to use no gate`);\n }\n for (let i = 0; i < storyboard.required_any_of_tools.length; i++) {\n const family = storyboard.required_any_of_tools[i] as unknown;\n if (family === null || typeof family !== 'object' || Array.isArray(family)) {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}]: must be an object`);\n }\n const { tools, rationale } = family as { tools?: unknown; rationale?: unknown };\n if (!Array.isArray(tools) || tools.length < 2) {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}].tools: must list at least two tool names`);\n }\n for (const tool of tools) {\n if (typeof tool !== 'string' || tool.length === 0) {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}].tools: entries must be non-empty strings`);\n }\n }\n if (rationale !== undefined && typeof rationale !== 'string') {\n throw new Error(`[${storyboard.id}] required_any_of_tools[${i}].rationale: must be a string`);\n }\n }\n}\n\n/**\n * Authoring-time validation for `phase.depends_on` (#1161). Each entry\n * must reference a phase declared earlier in the storyboard. Forward\n * references and self-references fail loud at parse time so authoring\n * mistakes (typos, reorderings) don't degrade silently into \"phase\n * always runs\" / \"phase always cascades.\"\n *\n * Rules:\n * - Empty list (`depends_on: []`) is legal — it declares an\n * independent phase. No further validation needed.\n * - Each non-empty entry must be a non-empty string.\n * - Each entry must reference a phase that appears EARLIER in the\n * `storyboard.phases[]` array (forward references are rejected).\n * - A phase cannot depend on itself.\n */\nfunction validatePhaseDependsOn(storyboard: Storyboard): void {\n const phaseIdsSeen = new Set<string>();\n for (const phase of storyboard.phases) {\n if (phase.depends_on !== undefined) {\n if (!Array.isArray(phase.depends_on)) {\n throw new Error(`[${storyboard.id}] phase '${phase.id}': depends_on must be an array of phase ids`);\n }\n for (const dep of phase.depends_on) {\n if (typeof dep !== 'string' || dep.length === 0) {\n throw new Error(`[${storyboard.id}] phase '${phase.id}': depends_on entries must be non-empty strings`);\n }\n if (dep === phase.id) {\n throw new Error(`[${storyboard.id}] phase '${phase.id}': depends_on cannot reference itself`);\n }\n if (!phaseIdsSeen.has(dep)) {\n throw new Error(\n `[${storyboard.id}] phase '${phase.id}': depends_on '${dep}' is not a phase declared earlier in this storyboard (forward and unknown references are rejected)`\n );\n }\n }\n }\n phaseIdsSeen.add(phase.id);\n }\n}\n\n/**\n * Authoring-time validation for `Storyboard.requires` (#1626). The field is\n * an array of non-empty requirement names:\n *\n * - `requires: []` is rejected — an empty array reads as \"no\n * requirements,\" which is the same as omitting the field; failing\n * load forces the author to omit it explicitly.\n * - Each entry must be a non-empty string.\n *\n * Unknown string values are allowed for forward compatibility. Runners that\n * don't know how to satisfy a future requirement skip at runtime with\n * `skip_reason: 'requirement_unmet'` and the authored value in\n * `skip.requirement`.\n */\nfunction validateRequires(storyboard: Storyboard): void {\n if (storyboard.requires === undefined) return;\n if (!Array.isArray(storyboard.requires)) {\n throw new Error(\n `[${storyboard.id}] requires: must be an array of requirement names (got ${typeof storyboard.requires})`\n );\n }\n if (storyboard.requires.length === 0) {\n throw new Error(`[${storyboard.id}] requires: [] is not allowed — omit the field to use the default ([real_wire])`);\n }\n for (let i = 0; i < storyboard.requires.length; i++) {\n const name = storyboard.requires[i];\n if (typeof name !== 'string' || name.length === 0) {\n throw new Error(`[${storyboard.id}] requires[${i}]: entries must be non-empty strings`);\n }\n }\n}\n\n/**\n * Issue #820: mutating tasks (per {@link MUTATING_TASKS}) must have a\n * `sample_request` authored. The fixture is authoritative at run time —\n * there's no sane default payload for a write, and silently fabricating\n * one was the bug factory that produced #780 / #792 / #793 / #802 / #805.\n *\n * Error messages point at the task name, the step id, the storyboard, and\n * suggest the concrete author action.\n *\n * Opt-out: steps with `expect_error: true` that deliberately exercise\n * missing-fixture / malformed-payload seller behavior skip this check —\n * the author is signaling the payload is the test condition.\n *\n * Synthesized phases (`request-signing/synthesize.ts`, controller seeding)\n * start with `phase.steps = []` in YAML and the loader doesn't see the\n * runtime-generated steps, so those paths are not affected.\n */\nfunction validateFixtureForMutatingStep(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n if (!MUTATING_TASKS.has(step.task)) return;\n if (step.sample_request !== undefined) return;\n if (step.expect_error === true) return;\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}' (task=${step.task}): ` +\n `mutating tasks require a sample_request fixture — the runner no longer fabricates ` +\n `write payloads. Author sample_request in the step or, for intentionally malformed ` +\n `payloads, set expect_error: true.`\n );\n}\n\n/**\n * `omit_account: true` must be paired with `expect_error: true`.\n *\n * An accountless `create_media_buy` will always be rejected by a spec-compliant\n * seller; a step that sets `omit_account` without `expect_error` will be graded\n * as a failure (not a controlled negative test), producing a misleading\n * compliance result. Fail loud at parse time so the author sees the problem\n * during storyboard load, not at run time.\n */\nfunction validateOmitFlagCoherence(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n if (step.omit_account && step.expect_error !== true) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ` +\n `omit_account: true requires expect_error: true — an accountless ` +\n `create_media_buy will always be rejected by a spec-compliant seller.`\n );\n }\n}\n\n/**\n * Each `context_outputs` entry must declare exactly one source: either\n * `path` (extract from response) or `generate` (mint at run time). An entry\n * with neither is a silent no-op; one with both would silently pick `generate`\n * and ignore `path`. Both are authoring foot-guns that should fail loud.\n */\nfunction validateContextOutputs(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n if (!step.context_outputs?.length) return;\n for (const output of step.context_outputs) {\n const hasPath = output.path !== undefined;\n const hasGenerate = output.generate !== undefined;\n if (!hasPath && !hasGenerate) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': context_outputs entry ` +\n `'${output.key}' must set exactly one of 'path' or 'generate'.`\n );\n }\n if (hasPath && hasGenerate) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': context_outputs entry ` +\n `'${output.key}' sets both 'path' and 'generate' — they are mutually exclusive.`\n );\n }\n // Validate generator name. The runtime resolver also checks but the loader\n // catches typos at storyboard-load time so authors see the failure on\n // build, not on the first run.\n if (hasGenerate && output.generate !== 'uuid_v4' && output.generate !== 'opaque_id') {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': context_outputs entry ` +\n `'${output.key}' has unknown generate value '${output.generate}'. ` +\n `Supported: 'uuid_v4', 'opaque_id'.`\n );\n }\n }\n}\n\n/**\n * Authoring-time validation for `provides_state_for` (the AdCP 3.0.3 spec\n * field — adcp#3734) and the legacy `peer_substitutes_for` synonym. The\n * runner treats the field as same-phase-only and substitution-only-when-\n * stateful; surface those constraints at parse time so storyboard authors\n * see typos and cross-phase references on build, not as a silent no-rescue\n * at run time.\n *\n * Both field names parse to the same canonical normalized form on the step\n * object (the spec name `provides_state_for` is preferred when both are\n * declared). The deprecation alias is documented in `types.ts`.\n *\n * Rules:\n * - Each target must reference a step that exists in the same phase.\n * - A step cannot substitute for itself.\n * - The substitute step itself must be `stateful: true` — non-stateful\n * passes don't establish state per the cascade contract.\n * - The target step must be `stateful: true` — non-stateful targets\n * don't participate in cascade gating, so a substitution declaration\n * would be a no-op.\n * - When both fields are declared on the same step, they must match\n * element-for-element (the deprecation contract is \"synonym for\", not\n * \"additive with\").\n */\nfunction validatePeerSubstitutesFor(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n const newField = step.provides_state_for;\n const legacyField = step.peer_substitutes_for;\n if (newField === undefined && legacyField === undefined) return;\n\n if (newField !== undefined && legacyField !== undefined) {\n // Order-sensitive equality: `[A, B]` vs `[B, A]` would throw despite being\n // semantically equivalent. Authors mid-migration should write the same list\n // in both fields; the deprecation alias is a literal synonym, not a\n // same-set restatement.\n const a = JSON.stringify(Array.isArray(newField) ? newField : [newField]);\n const b = JSON.stringify(Array.isArray(legacyField) ? legacyField : [legacyField]);\n if (a !== b) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': both provides_state_for and ` +\n `peer_substitutes_for declared with different values — pick one (provides_state_for is the ` +\n `spec field; peer_substitutes_for is a deprecated synonym)`\n );\n }\n }\n\n // Normalize onto provides_state_for so the runner can read a single field.\n // peer_substitutes_for stays for back-compat with any consumer code that\n // already reads it.\n if (newField === undefined && legacyField !== undefined) {\n step.provides_state_for = legacyField;\n } else if (newField !== undefined && legacyField === undefined) {\n step.peer_substitutes_for = newField;\n }\n\n const sourceFieldName = newField !== undefined ? 'provides_state_for' : 'peer_substitutes_for';\n const declared = step.provides_state_for!;\n const targets = Array.isArray(declared) ? declared : [declared];\n if (!step.stateful) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} is only legal on stateful steps`\n );\n }\n const phaseStepIds = new Map(phase.steps.map(s => [s.id, s]));\n for (const target of targets) {\n if (typeof target !== 'string' || target.length === 0) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} entries must be non-empty strings`\n );\n }\n if (target === step.id) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} cannot reference itself`\n );\n }\n const targetStep = phaseStepIds.get(target);\n if (!targetStep) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} target '${target}' is not a step in this phase (same-phase only)`\n );\n }\n if (!targetStep.stateful) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}' step '${step.id}': ${sourceFieldName} target '${target}' must be stateful`\n );\n }\n }\n}\n\nfunction validateBranchSet(storyboardId: string, phase: Storyboard['phases'][number]): void {\n if (phase.branch_set === undefined) return;\n const bs = phase.branch_set as unknown;\n if (!bs || typeof bs !== 'object') {\n throw new Error(`[${storyboardId}] phase '${phase.id}': branch_set must be an object with { id, semantics }`);\n }\n const { id, semantics } = bs as Record<string, unknown>;\n if (typeof id !== 'string' || id.length === 0) {\n throw new Error(`[${storyboardId}] phase '${phase.id}': branch_set.id must be a non-empty string`);\n }\n if (typeof semantics !== 'string' || semantics.length === 0) {\n throw new Error(`[${storyboardId}] phase '${phase.id}': branch_set.semantics must be a non-empty string`);\n }\n // Only `any_of` is defined in AdCP today (adcp#2646 lint rule 2 —\n // `at_least_n` and `all_of` are reserved but not defined). Reject unknown\n // values at parse rather than silently skipping grading at runtime, so\n // spec-drift typos fail loud instead of degrading to raw `failed` peers.\n if (!(BRANCH_SET_SEMANTICS as readonly string[]).includes(semantics)) {\n throw new Error(\n `[${storyboardId}] phase '${phase.id}': branch_set.semantics='${semantics}' is not supported (valid: ${BRANCH_SET_SEMANTICS.join(', ')})`\n );\n }\n // Schema constraint: every phase in a branch set MUST be optional. A\n // non-optional branch-set phase would fail the storyboard on any step\n // failure regardless of peer contribution, defeating the any_of gate.\n if (phase.optional !== true) {\n throw new Error(`[${storyboardId}] phase '${phase.id}': phases declaring branch_set must set 'optional: true'`);\n }\n}\n\n/**\n * Resolve the `contributes: true` boolean shorthand introduced alongside the\n * first-class `branch_set:` phase field (adcp-client#693, adcp#2646).\n *\n * Rules:\n * - `contributes: true` is legal only inside a phase that declares `branch_set:`.\n * - A step MUST NOT set both `contributes` and `contributes_to` (ambiguous).\n * - A string `contributes_to` inside a branch_set phase MUST equal `branch_set.id`\n * (otherwise the aggregation target drifts — same invariant the spec lint enforces).\n *\n * After resolution, `step.contributes_to` carries the flag name and `step.contributes`\n * is cleared, so the runner reads a single field regardless of authoring form.\n */\nfunction resolveContributesShorthand(\n storyboardId: string,\n phase: Storyboard['phases'][number],\n step: Storyboard['phases'][number]['steps'][number]\n): void {\n const hasBoolean = step.contributes !== undefined;\n const hasString = step.contributes_to !== undefined;\n\n if (hasBoolean && hasString) {\n throw new Error(`[${storyboardId}] step '${step.id}' declares both 'contributes' and 'contributes_to' — pick one`);\n }\n\n if (hasBoolean) {\n if (step.contributes === true) {\n if (!phase.branch_set) {\n throw new Error(\n `[${storyboardId}] step '${step.id}': 'contributes: true' is only legal inside a phase that declares branch_set`\n );\n }\n step.contributes_to = phase.branch_set.id;\n }\n delete step.contributes;\n return;\n }\n\n if (hasString && phase.branch_set && step.contributes_to !== phase.branch_set.id) {\n throw new Error(\n `[${storyboardId}] step '${step.id}': contributes_to='${step.contributes_to}' must equal enclosing phase's branch_set.id='${phase.branch_set.id}'`\n );\n }\n}\n"],"mappings":"AAQA,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAEtB,SAAS,sBAAsB;AAC/B,SAAS,6CAA6C;AACtD,SAAS,SAAS,mBAAmB;AAO9B,MAAM,uBAAuB,CAAC,QAAQ;AAE7C,MAAM,0BAA0B,OAAO;AACvC,MAAM,0BAA0B,IAAI,OAAO,IAAI,uBAAuB,SAAS,uBAAuB,KAAK;AAGpG,SAAS,gBAAgB,aAAiC;AAC/D,QAAM,SAAS,MAAM,WAAW;AAChC,MAAI,CAAC,QAAQ,MAAM,CAAC,QAAQ,QAAQ;AAClC,UAAM,IAAI,MAAM,+DAA+D;AAAA,EACjF;AACA,MAAI,OAAO,UAAU,eAAe,KAAK,QAAQ,gBAAgB,GAAG;AAClE,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,aAAW,SAAS,OAAO,QAAQ;AAIjC,QAAI,CAAC,MAAM,MAAO,OAAM,QAAQ,CAAC;AAEjC,eAAW,QAAQ,MAAM,OAAO;AAC9B,UAAI,CAAC,KAAK,gBAAiB;AAC3B,iBAAW,UAAU,KAAK,iBAAiB;AACzC,cAAM,MAAM;AACZ,YAAI,IAAI,QAAQ,CAAC,IAAI,KAAK;AACxB,iBAAO,MAAM,IAAI;AAAA,QACnB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,0BAAwB,MAAM;AAC9B,SAAO;AACT;AAGO,SAAS,mBAAmB,UAA8B;AAC/D,SAAO,gBAAgB,aAAa,UAAU,OAAO,CAAC;AACxD;AAWO,SAAS,wBAAwB,YAA8B;AACpE,mBAAiB,UAAU;AAC3B,wCAAsC,UAAU;AAChD,6BAA2B,UAAU;AACrC,yBAAuB,UAAU;AACjC,aAAW,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AA,IACjJ;AAAA,EACF;AACF;","names":["prefix"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/testing/storyboard/request-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"request-builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/testing/storyboard/request-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAk8BhE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,WAAW,EACpB,UAAU,CAAC,EAAE,eAAe,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4BzB;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE5D;AAQD,6DAA6D;AAC7D,eAAO,MAAM,YAAY,sBAAgB,CAAC;AAE1C,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,2BAAqB,CAAC"}
|
|
@@ -25,6 +25,7 @@ __export(request_builder_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(request_builder_exports);
|
|
27
27
|
var import_node_crypto = require("node:crypto");
|
|
28
|
+
var import_pricing_adapter = require('../../utils/pricing-adapter.js');
|
|
28
29
|
var import_client = require('../client.js');
|
|
29
30
|
var import_context = require('./context.js');
|
|
30
31
|
const UNKNOWN_FORMAT_ID = Object.freeze({ agent_url: "https://unknown.example.com/", id: "unknown" });
|
|
@@ -87,6 +88,11 @@ function omitEnvelopeFields(obj) {
|
|
|
87
88
|
}
|
|
88
89
|
return out;
|
|
89
90
|
}
|
|
91
|
+
function hasAuthoredAccountIdentity(account) {
|
|
92
|
+
if (account === null || typeof account !== "object" || Array.isArray(account)) return false;
|
|
93
|
+
const ref = account;
|
|
94
|
+
return typeof ref.account_id === "string" && ref.account_id.length > 0 || typeof ref.operator === "string" && ref.operator.length > 0;
|
|
95
|
+
}
|
|
90
96
|
const REQUEST_ENRICHERS = {
|
|
91
97
|
// ── Account & Audience ─────────────────────────────────
|
|
92
98
|
sync_accounts(_step, _context, options) {
|
|
@@ -174,11 +180,15 @@ const REQUEST_ENRICHERS = {
|
|
|
174
180
|
budget: (typeof baseSample.budget === "number" ? baseSample.budget : void 0) ?? options.budget ?? Math.max(1e3, pricingOption?.min_spend_per_package ?? 1e3),
|
|
175
181
|
pricing_option_id: fixturePricingOptionId ?? pricingOption?.pricing_option_id ?? context.pricing_option_id ?? "default"
|
|
176
182
|
};
|
|
177
|
-
if (baseSample.bid_price === void 0 && (pricingOption?.pricing_model === "auction" || pricingOption?.pricing_model === "cpm")) {
|
|
178
|
-
const floor = Number(pricingOption?.floor_price) || 5;
|
|
179
|
-
firstPkg.bid_price = Math.round(floor * 1.5 * 100) / 100;
|
|
180
|
-
}
|
|
181
183
|
const additionalPkgs = samplePackages.slice(1).map((p) => (0, import_context.injectContext)({ ...p }, context));
|
|
184
|
+
const packages = [firstPkg, ...additionalPkgs];
|
|
185
|
+
for (const pkg of packages) {
|
|
186
|
+
const sentPricingOption = pkg === firstPkg && fixtureProductId === void 0 && fixturePricingOptionId === void 0 ? pricingOption : findPricingOption(context, pkg.product_id, pkg.pricing_option_id);
|
|
187
|
+
if (pkg.bid_price === void 0 && pkg.bidding === void 0 && step.sample_request?.bidding === void 0 && sentPricingOption?.pricing_model === "cpm" && !(0, import_pricing_adapter.isFixedPricing)(sentPricingOption)) {
|
|
188
|
+
const floor = Number(sentPricingOption.floor_price) || 5;
|
|
189
|
+
pkg.bid_price = Math.round(floor * 1.5 * 100) / 100;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
182
192
|
const fixture = step.sample_request !== void 0 ? (0, import_context.injectContext)({ ...step.sample_request }, context) : {};
|
|
183
193
|
const fixtureBody = omitEnvelopeFields(fixture);
|
|
184
194
|
const fixtureHasPackages = Array.isArray(fixture.packages) && fixture.packages.length > 0;
|
|
@@ -200,7 +210,7 @@ const REQUEST_ENRICHERS = {
|
|
|
200
210
|
brand: (0, import_client.resolveBrand)(options),
|
|
201
211
|
start_time: startTime,
|
|
202
212
|
end_time: endTime,
|
|
203
|
-
packages
|
|
213
|
+
packages
|
|
204
214
|
};
|
|
205
215
|
},
|
|
206
216
|
update_media_buy(step, context, options) {
|
|
@@ -573,8 +583,11 @@ const REQUEST_ENRICHERS = {
|
|
|
573
583
|
},
|
|
574
584
|
// ── Test Controller ────────────────────────────────────
|
|
575
585
|
comply_test_controller(step, context, options) {
|
|
586
|
+
const controllerFields = step.sample_request ? omitEnvelopeFields((0, import_context.injectContext)({ ...step.sample_request }, context)) : void 0;
|
|
587
|
+
const authoredAccount = controllerFields?.account;
|
|
588
|
+
const accountScope = controllerFields?.scenario === "force_upstream_unavailable" && hasAuthoredAccountIdentity(authoredAccount) ? authoredAccount : context.account ?? (0, import_client.resolveAccount)(options);
|
|
576
589
|
const account = {
|
|
577
|
-
...
|
|
590
|
+
...accountScope,
|
|
578
591
|
sandbox: true
|
|
579
592
|
};
|
|
580
593
|
if (typeof account.account_id !== "string" && typeof account.operator !== "string") {
|
|
@@ -583,11 +596,8 @@ const REQUEST_ENRICHERS = {
|
|
|
583
596
|
account.operator = brand.domain;
|
|
584
597
|
}
|
|
585
598
|
}
|
|
586
|
-
if (
|
|
587
|
-
return {
|
|
588
|
-
...omitEnvelopeFields((0, import_context.injectContext)({ ...step.sample_request }, context)),
|
|
589
|
-
account
|
|
590
|
-
};
|
|
599
|
+
if (controllerFields) {
|
|
600
|
+
return { ...controllerFields, account };
|
|
591
601
|
}
|
|
592
602
|
return {
|
|
593
603
|
account,
|
|
@@ -631,6 +641,12 @@ function selectPricingOption(product) {
|
|
|
631
641
|
const fixed = options.filter((o) => o.pricing_model === "cpm" || o.pricing_model === "flat");
|
|
632
642
|
return fixed[0] ?? options[0];
|
|
633
643
|
}
|
|
644
|
+
function findPricingOption(context, productId, pricingOptionId) {
|
|
645
|
+
const products = context.products;
|
|
646
|
+
const product = products?.find((p) => p.product_id === productId);
|
|
647
|
+
const options = product?.pricing_options;
|
|
648
|
+
return options?.find((o) => o.pricing_option_id === pricingOptionId);
|
|
649
|
+
}
|
|
634
650
|
function selectFormat(context) {
|
|
635
651
|
const formats = context.formats;
|
|
636
652
|
if (!formats?.length) return void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/testing/storyboard/request-builder.ts"],"sourcesContent":["/**\n * Request enrichers for storyboard steps.\n *\n * Contract (see issue #820):\n * - `sample_request` (when authored) is the authoritative base payload.\n * The runner injects context placeholders into it and passes it through\n * to the agent under test.\n * - An enricher fills top-level fields the fixture didn't specify —\n * typically discovery-derived identifiers (`product_id`, `format_id`,\n * `account`, `media_buy_id`) or envelope fields that only the harness\n * knows.\n * - For conflicts at the top level, the fixture wins — storyboard authors'\n * intent is not silently overridden.\n *\n * A short list of tasks need to splice discovery-derived fields INTO\n * nested structures in the fixture (e.g. `create_media_buy` injects\n * `product_id` into `packages[0]`) and can't be expressed by a top-level\n * overlay. Those enrichers declare themselves fixture-aware via\n * `FIXTURE_AWARE_ENRICHERS` below and the runner uses their output as-is.\n *\n * `sample_request` from YAML, when a task has no enricher, is used directly\n * after context injection — preserves the \"no handler, fixture is the wire\n * payload\" pattern.\n */\n\nimport { createHash } from 'node:crypto';\nimport { resolveBrand, resolveAccount } from '../client';\nimport type { TestOptions } from '../types';\nimport type { StoryboardContext, StoryboardStep } from './types';\nimport { injectContext, type RunnerVariables } from './context';\n\ntype RequestEnricher = (\n step: StoryboardStep,\n context: StoryboardContext,\n options: TestOptions,\n runnerVars?: RunnerVariables\n) => Record<string, unknown>;\n\n/** Legacy alias kept for external consumers pinned to the old terminology. */\ntype RequestBuilder = RequestEnricher;\n\n/**\n * Placeholder `format_id` used when neither `list_creative_formats` discovery\n * nor accumulated `context.format_id` supplied one. Schema\n * (core/format-id.json) requires `agent_url` in URI form, so a bare\n * `\"unknown\"` string fails validation. `example.com` is reserved for\n * documentation per RFC 2606 — an obvious fixture that strict JSON-schema\n * validators accept and that downstream handlers resolve to a clean\n * format-not-found error rather than an unrelated crash. Frozen so a\n * builder that accidentally spread-mutates the shared constant hits a\n * TypeError instead of silently corrupting sibling calls.\n */\nconst UNKNOWN_FORMAT_ID = Object.freeze({ agent_url: 'https://unknown.example.com/', id: 'unknown' });\n\n/**\n * Placeholder `caller` URL for tasks whose schema names the CALLER-AGENT's\n * URL (not the brand or the seller). `check_governance.caller` is the canonical\n * case: governance agents bind this field to agent identity for rate limiting,\n * audit trails, and (with `signed-requests`) JWS issuer correlation — emitting\n * the brand domain here names the wrong entity and will confuse strict\n * governance agents. Storyboards that care about a specific caller identity\n * author sample_request; this is the fallback when neither fixture nor\n * harness-supplied agent URL is present.\n */\nconst FALLBACK_CALLER_AGENT_URL = 'https://e2e-orchestrator.adcontextprotocol.org/';\n\n/**\n * Tasks whose enricher must see `sample_request` to produce the final\n * payload — typically because it needs to splice discovery-derived fields\n * INTO nested structures the fixture owns (arrays, object trees). For\n * these, the runner uses the enricher's output verbatim and does not\n * layer the fixture on top; the enricher is responsible for fixture\n * precedence internally.\n */\nconst FIXTURE_AWARE_ENRICHERS = new Set<string>([\n 'create_media_buy', // merges discovery-derived product_id / pricing_option_id INTO fixture packages[0]\n 'comply_test_controller', // forces account.sandbox: true regardless of fixture\n 'update_media_buy', // resolves account via resolveAccount(options) so sandbox routing matches create_media_buy\n 'get_media_buys', // resolves account via resolveAccount(options) so sandbox routing matches create_media_buy\n 'get_media_buy_delivery', // resolves account via resolveAccount(options) so sandbox routing matches create_media_buy\n]);\n\n/**\n * Placeholder identifiers that the upstream universal compliance\n * storyboards ship inside `create_media_buy.packages[0]` expecting the\n * runner to substitute the seller's discovered identifiers. The fixtures\n * live in `adcontextprotocol/adcp` and can't be rewritten from the SDK,\n * so the enricher treats these literals as \"defer to discovery\" while\n * real seller ids (e.g. `cpm_guaranteed`) win over discovery per the\n * fixture-authoritative contract. If a future storyboard wants\n * placeholder-then-discovery semantics for another value, author it as\n * a `$context.<key>` substitution rather than a magic literal so the\n * intent is explicit at the fixture level.\n */\nconst PRODUCT_ID_SENTINELS = new Set(['test-product']);\nconst PRICING_OPTION_ID_SENTINELS = new Set(['test-pricing']);\nconst DAY_MS = 24 * 60 * 60 * 1000;\nconst DEFAULT_MEDIA_BUY_WINDOW_MS = 7 * DAY_MS;\n\nfunction asNonSentinel(value: unknown, sentinels: Set<string>): string | undefined {\n if (typeof value !== 'string') return undefined;\n return sentinels.has(value) ? undefined : value;\n}\n\nfunction parseTime(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n const parsed = Date.parse(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction resolveMediaBuyWindow(\n sampleStart: string | undefined,\n sampleEnd: string | undefined,\n nowMs?: number\n): {\n startTime: string;\n endTime: string;\n} {\n const now = nowMs ?? Date.now();\n const defaultStart = new Date(now + DAY_MS).toISOString();\n const defaultEnd = new Date(now + 8 * DAY_MS).toISOString();\n const sampleStartMs = parseTime(sampleStart);\n const sampleEndMs = parseTime(sampleEnd);\n const startIsAsap = sampleStart === 'asap';\n\n const startTime = startIsAsap\n ? 'asap'\n : sampleStart && sampleStartMs !== undefined && sampleStartMs >= now\n ? sampleStart\n : defaultStart;\n let endTime = sampleEnd && sampleEndMs !== undefined && sampleEndMs >= now ? sampleEnd : defaultEnd;\n\n const startTimeMs = startIsAsap ? now : Date.parse(startTime);\n if (Date.parse(endTime) <= startTimeMs) {\n const sampleDurationMs =\n sampleStartMs !== undefined && sampleEndMs !== undefined && sampleEndMs > sampleStartMs\n ? sampleEndMs - sampleStartMs\n : DEFAULT_MEDIA_BUY_WINDOW_MS;\n endTime = new Date(startTimeMs + sampleDurationMs).toISOString();\n }\n\n return { startTime, endTime };\n}\n\nfunction runClockMs(runnerVars: RunnerVariables | undefined): number {\n return runnerVars?.runStartMs ?? Date.now();\n}\n\nfunction generatedIdSuffix(step: StoryboardStep, runnerVars: RunnerVariables | undefined, nowMs?: number): string {\n const timestamp = nowMs ?? runClockMs(runnerVars);\n if (runnerVars?.runStartMs === undefined) return String(timestamp);\n const stepHash = createHash('sha256').update(step.id).digest('hex').slice(0, 12);\n return `${timestamp}-${stepHash}`;\n}\n\n/**\n * Envelope fields that live on every AdCP request and are owned by the\n * storyboard author — `context.correlation_id`, runner-supplied\n * `idempotency_key` aliases, webhook pointers, per-request extensions.\n * Fixture-aware enrichers must NOT spread these from their internal\n * `injectContext(sample_request, context)` call: that internal call\n * doesn't receive `runnerVars`, so mustache tokens (`{{runner.webhook_url:<step_id>}}`)\n * would ship to the wire literally. The outer `enrichRequest` overlays\n * envelope fields from a `runnerVars`-aware fixture re-injection.\n */\nconst ENVELOPE_FIELDS = ['context', 'ext', 'push_notification_config', 'idempotency_key'] as const;\n\nfunction omitEnvelopeFields(obj: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(obj)) {\n if (!(ENVELOPE_FIELDS as readonly string[]).includes(k)) out[k] = v;\n }\n return out;\n}\n\nconst REQUEST_ENRICHERS: Record<string, RequestEnricher> = {\n // ── Account & Audience ─────────────────────────────────\n\n sync_accounts(_step, _context, options) {\n return {\n accounts: [\n {\n brand: resolveBrand(options),\n operator: resolveBrand(options).domain,\n billing: 'operator',\n payment_terms: 'net_30',\n },\n ],\n };\n },\n\n sync_audiences(step, context, options, runnerVars) {\n // Honor hand-authored sample_request so storyboards can register a\n // specific audience_id that downstream steps reference. Without this,\n // add-shaped sample_request blocks (authored with audience_id + add[])\n // fell through to the generated fallback id, and a later delete_audience\n // or context-substitution step would hit AUDIENCE_NOT_FOUND because the\n // sync had registered a different id. Matches the pattern used by\n // sync_event_sources, sync_catalogs, and sync_creatives.\n if (step.sample_request) {\n return injectContext({ ...step.sample_request, account: context.account ?? resolveAccount(options) }, context);\n }\n return {\n account: context.account ?? resolveAccount(options),\n audiences: [\n {\n audience_id: context.audience_id ?? `test-audience-${generatedIdSuffix(step, runnerVars)}`,\n name: 'E2E Test Audience',\n add: [\n {\n external_id: 'user-001',\n hashed_email: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',\n },\n ],\n },\n ],\n };\n },\n\n // ── Brand & Rights ───────────────────────────────────────\n\n get_brand_identity(step, context, options) {\n const brand = resolveBrand(options);\n return {\n brand_id: context.brand_id ?? (step.sample_request?.brand_id as string) ?? brand.brand_id ?? brand.domain,\n };\n },\n\n get_rights(step, context, options) {\n // Honor hand-authored sample_request so storyboards can specify\n // scenario-specific query text, uses, countries, or buyer_brand.\n // Peer builders (sync_plans, check_governance, list_creative_formats,\n // create_content_standards, etc.) follow the same pattern.\n //\n // Without this, any get_rights step hits the wire with the generic\n // fallback and a brand_id derived from the caller's domain — which\n // rights-holder rosters reject as unknown, so rights[0] is undefined,\n // $context.rights_id doesn't resolve, and downstream acquire_rights\n // steps fail with rights_not_found instead of the error the\n // storyboard is actually asserting (e.g., GOVERNANCE_DENIED).\n const brand = resolveBrand(options);\n return {\n query: 'available rights for advertising',\n uses: ['ai_generated_image'],\n brand_id: context.brand_id ?? brand.brand_id ?? brand.domain,\n };\n },\n\n // ── Product Discovery ──────────────────────────────────\n\n get_products(step, context, options) {\n // If the step is a \"refine\" step, build a refine request\n if (step.sample_request?.buying_mode === 'refine' && context.products) {\n return {\n buying_mode: 'refine',\n refine: [\n {\n scope: 'request',\n ask: 'Only guaranteed packages with premium placement.',\n },\n ],\n brand: resolveBrand(options),\n account: context.account ?? resolveAccount(options),\n };\n }\n\n return {\n buying_mode: 'brief',\n brief: options.brief || 'Show me all available advertising products across all channels',\n brand: resolveBrand(options),\n };\n },\n\n // ── Media Buy ──────────────────────────────────────────\n\n create_media_buy(step, context, options, runnerVars) {\n const product = selectProduct(context);\n const pricingOption = selectPricingOption(product);\n\n // Respect sample_request dates when they're future-dated — needed for\n // storyboards that test replay semantics where initial + replay must\n // produce byte-for-byte identical canonical payloads. Two calls\n // generated 5ms apart with `Date.now()` would hash differently,\n // triggering IDEMPOTENCY_CONFLICT on replay. Stale sample dates\n // (authored before the run date) fall back to the run-start-relative\n // default. Resolve the pair together so a stale start and same-day\n // future end cannot produce start_time > end_time.\n const sampleStart =\n typeof step.sample_request?.start_time === 'string' ? step.sample_request.start_time : undefined;\n const sampleEnd = typeof step.sample_request?.end_time === 'string' ? step.sample_request.end_time : undefined;\n const { startTime, endTime } = resolveMediaBuyWindow(sampleStart, sampleEnd, runnerVars?.runStartMs);\n\n // Merge hand-authored package fields from sample_request (targeting_overlay,\n // measurement_terms, creative_assignments, performance_standards, etc.) so\n // scenario-specific behaviors are exercised. The first package's\n // identifiers (product_id, pricing_option_id) follow a two-tier rule:\n //\n // - Real seller ids in the fixture win over discovery — storyboards\n // that name `cpm_guaranteed` (or any seller-specific identifier)\n // are asserting that specific id reaches the wire. Discovery must\n // not override.\n // - Well-known sentinel placeholders (`test-product`, `test-pricing`)\n // from the upstream universal compliance storyboards defer to\n // discovery. Those storyboards ship package fixtures with\n // `product_id: \"test-product\"` expecting the runner to substitute\n // the seller's discovered product — they'd fail against every\n // seller that doesn't literally ship a \"test-product\" catalog\n // entry if the fixture value survived to the wire.\n //\n // The sentinel list is conservative. If a future storyboard wants\n // placeholder-then-discovery semantics for another field, author it\n // as `$context.<key>` substitution instead of a magic literal.\n const samplePackages = (step.sample_request?.packages as Array<Record<string, unknown>> | undefined) ?? [];\n const baseSample = samplePackages[0]\n ? (injectContext({ ...samplePackages[0] }, context) as Record<string, unknown>)\n : {};\n\n const fixtureProductId = asNonSentinel(baseSample.product_id, PRODUCT_ID_SENTINELS);\n const fixturePricingOptionId = asNonSentinel(baseSample.pricing_option_id, PRICING_OPTION_ID_SENTINELS);\n\n const firstPkg: Record<string, unknown> = {\n ...baseSample,\n product_id: fixtureProductId ?? product?.product_id ?? context.product_id ?? 'test-product',\n budget:\n (typeof baseSample.budget === 'number' ? baseSample.budget : undefined) ??\n options.budget ??\n Math.max(1000, (pricingOption?.min_spend_per_package as number) ?? 1000),\n pricing_option_id:\n fixturePricingOptionId ?? pricingOption?.pricing_option_id ?? context.pricing_option_id ?? 'default',\n };\n\n // Synthesize a bid_price for auction/cpm pricing only when the fixture\n // didn't author one. Storyboards that test auction flows (e.g.\n // sales-non-guaranteed) author explicit bid_prices the seller validates\n // against floor_price; discovery-synthesized values would silently\n // override intentional bid-floor-boundary tests.\n if (\n baseSample.bid_price === undefined &&\n (pricingOption?.pricing_model === 'auction' || pricingOption?.pricing_model === 'cpm')\n ) {\n const floor = Number(pricingOption?.floor_price) || 5;\n firstPkg.bid_price = Math.round(floor * 1.5 * 100) / 100;\n }\n\n const additionalPkgs = samplePackages\n .slice(1)\n .map(p => injectContext({ ...p }, context) as Record<string, unknown>);\n\n // Proposal-mode: when context carries a proposal_id (captured from\n // `proposals[0]` in a prior brief/refine/finalize step), forward it\n // and omit `packages`. The schema disallows synthesising packages\n // alongside `proposal_id` — `dependencies.proposal_id` requires\n // `total_budget` and the seller derives packages from the committed\n // allocation.\n //\n // Spread the fixture (after $context injection) so proposal-mode-\n // required fields like `total_budget` flow through. Prefer the\n // fixture's account/brand when supplied — proposal-mode storyboards\n // author a non-default brand (e.g. `acmeoutdoor.example`) that the\n // adapter resolves end-to-end through brief/refine/finalize, and\n // the harness-default `test.example` would fail account resolution\n // at the accept step (adcp-client#1600). Dates and proposal_id\n // are still normalised by the enricher.\n const fixture =\n step.sample_request !== undefined\n ? (injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>)\n : {};\n // Drop envelope fields from the local spread — the outer enrichRequest\n // re-injects them with `runnerVars` so `{{runner.webhook_url:<step_id>}}`\n // tokens inside push_notification_config expand. Spreading them here\n // would carry through unexpanded mustache strings.\n const fixtureBody = omitEnvelopeFields(fixture);\n\n // Proposal-mode applies only when the storyboard's fixture explicitly\n // names a `proposal_id`. `context.proposal_id` is auto-captured from\n // any prior `get_products` response that returned `proposals[0]` (see\n // context.ts), which is essentially every brief flow — using it as a\n // fallback would override a fixture's explicit `packages` direction\n // and force every sales storyboard through proposal-mode validation,\n // including ones that intentionally exercise package-mode (sales-\n // guaranteed, schema_validation, media_buy_seller/*). Fixture is the\n // storyboard author's intent; respect it.\n const fixtureHasPackages = Array.isArray(fixture.packages) && (fixture.packages as unknown[]).length > 0;\n const proposalId: unknown =\n fixture.proposal_id !== undefined ? fixture.proposal_id : fixtureHasPackages ? undefined : context.proposal_id;\n if (typeof proposalId === 'string') {\n const { packages: _droppedPackages, ...fixtureWithoutPackages } = fixtureBody;\n return {\n ...fixtureWithoutPackages,\n account: fixtureWithoutPackages.account ?? context.account ?? resolveAccount(options),\n brand: fixtureWithoutPackages.brand ?? resolveBrand(options),\n start_time: startTime,\n end_time: endTime,\n proposal_id: proposalId,\n };\n }\n\n // Spread the fixture (after $context injection) so any sample_request\n // fields the enricher doesn't explicitly normalise (total_budget,\n // buyer_ref, currency, scenario-specific extensions) reach the wire.\n // The enricher then layers its own substitutions on top: packages is\n // replaced (the enricher merged samplePackages internally with\n // discovery-derived identifiers above), account/brand/start_time/\n // end_time are normalised. Per issue #1604, build-from-scratch dropped\n // every fixture field outside this enumerated set — fixture-aware\n // enrichers must spread sample_request first, then override. Envelope\n // fields are omitted here and re-applied by the outer enrichRequest\n // with `runnerVars` so mustache tokens expand correctly.\n return {\n ...fixtureBody,\n account: context.account ?? resolveAccount(options),\n brand: resolveBrand(options),\n start_time: startTime,\n end_time: endTime,\n packages: [firstPkg, ...additionalPkgs],\n };\n },\n\n update_media_buy(step, context, options) {\n // Fixture-aware: spread the storyboard's sample_request first so hand-authored\n // intent (targeting_overlay swaps, creative assignments, pause/resume/cancel)\n // is preserved verbatim, then force `account` to the harness-resolved value so\n // sandbox routing matches create_media_buy's namespace on every round-trip\n // (otherwise the fixture's account silently routes update writes to a different\n // partition than the create wrote to, and a subsequent get_media_buys reading\n // from the create-time partition surfaces stale data — see adcp-client#1505).\n // Envelope fields are dropped from the local spread; the outer enrichRequest\n // re-injects them with `runnerVars` so mustache substitutions expand.\n const fixtureFields = step.sample_request\n ? omitEnvelopeFields(\n injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>\n )\n : {};\n const request: Record<string, unknown> = { ...fixtureFields };\n request.account = context.account ?? resolveAccount(options);\n if (request.media_buy_id === undefined) {\n request.media_buy_id = context.media_buy_id ?? 'unknown';\n }\n\n // No sample_request: fall back to step-id keyword inference so legacy\n // storyboards without an authored fixture still exercise sensible flows.\n if (!step.sample_request) {\n if (step.id.includes('pause')) {\n request.paused = true;\n } else if (step.id.includes('resume')) {\n request.paused = false;\n } else if (step.id.includes('cancel')) {\n request.canceled = true;\n } else {\n request.packages = [\n {\n package_id: (context.package_id as string | undefined) ?? 'unknown',\n budget: 2000,\n },\n ];\n }\n }\n\n return request;\n },\n\n get_media_buys(step, context, options) {\n // Spread fixture fields so storyboards can author filters, status, pagination, etc.\n // account is always overridden by the harness-resolved value so sandbox routing\n // matches create_media_buy's namespace on every round-trip. Envelope fields are\n // dropped from the local spread so the outer enrichRequest re-injects them with\n // `runnerVars` (mustache substitutions expand against the runner's webhook base).\n const fixtureFields = step.sample_request\n ? omitEnvelopeFields(\n injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>\n )\n : {};\n const result: Record<string, unknown> = { ...fixtureFields };\n result.account = context.account ?? resolveAccount(options);\n if (context.media_buy_id != null && result.media_buy_ids === undefined) {\n result.media_buy_ids = [context.media_buy_id];\n }\n return result;\n },\n\n get_media_buy_delivery(step, context, options) {\n // Same account-resolution rule as get_media_buys — fixture fields preserved,\n // account overridden by harness so sandbox routing matches create_media_buy.\n // Envelope fields dropped from the local spread; outer enrichRequest re-applies\n // them with `runnerVars` so mustache substitutions expand.\n const fixtureFields = step.sample_request\n ? omitEnvelopeFields(\n injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>\n )\n : {};\n const result: Record<string, unknown> = { ...fixtureFields };\n result.account = context.account ?? resolveAccount(options);\n if (context.media_buy_id != null && result.media_buy_ids === undefined) {\n result.media_buy_ids = [context.media_buy_id];\n }\n return result;\n },\n\n // provide_performance_feedback intentionally has no builder — storyboard\n // sample_request is authoritative because the spec's oneOf requires a\n // performance_index variant that only the storyboard author knows the\n // shape of. A synthesized payload here would emit non-spec fields\n // (feedback/satisfaction/notes) and get rejected with INVALID_REQUEST.\n\n // ── Catalogs & Events ─────────────────────────────────\n\n sync_catalogs(step, context, options, runnerVars) {\n // Prefer the fixture's sample_request — it's the authoritative request\n // shape for the storyboard step. The fallback's hardcoded feed_format\n // ('json') is NOT in the spec's 5-literal union and its `type` is\n // missing entirely, so any agent running the generated Zod schema\n // rejects the fallback with -32602 on both fields.\n return {\n account: context.account ?? resolveAccount(options),\n catalogs: [\n {\n catalog_id: `test-catalog-${generatedIdSuffix(step, runnerVars)}`,\n name: 'E2E Test Catalog',\n type: 'product',\n feed_url: 'https://test-assets.adcontextprotocol.org/feeds/test-catalog.json',\n feed_format: 'custom',\n },\n ],\n };\n },\n\n sync_event_sources(step, context, options, runnerVars) {\n return {\n account: context.account ?? resolveAccount(options),\n event_sources: [\n {\n event_source_id: `test-source-${generatedIdSuffix(step, runnerVars)}`,\n name: 'E2E Test Event Source',\n event_types: ['purchase', 'add_to_cart'],\n },\n ],\n };\n },\n\n log_event(step, context, _options, runnerVars) {\n // Storyboards routinely ship spec-conformant event payloads with\n // event_time, content_ids, and custom_data siblings that only the\n // author knows. Honor sample_request when present.\n return {\n event_source_id: context.event_source_id ?? 'test-source',\n events: [\n {\n event_id: `evt-${generatedIdSuffix(step, runnerVars)}`,\n event_type: 'purchase',\n event_time: new Date(runClockMs(runnerVars)).toISOString(),\n custom_data: { value: 49.99, currency: 'USD' },\n },\n ],\n };\n },\n\n report_usage(step, context, options, runnerVars) {\n // Prefer the fixture's sample_request — creative-ad-server and other\n // specialisms carry per-usage-entry fields (vendor_cost, currency,\n // pricing_option_id) that the hardcoded fallback here omits, causing\n // agents running the generated Zod schema to reject every step.\n const now = new Date(runClockMs(runnerVars));\n const monthAgo = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000);\n return {\n account: context.account ?? resolveAccount(options),\n reporting_period: {\n start: monthAgo.toISOString(),\n end: now.toISOString(),\n },\n usage: [\n {\n account: context.account ?? resolveAccount(options),\n creative_id: context.creative_id ?? 'unknown',\n impressions: 10000,\n vendor_cost: 500,\n currency: 'USD',\n },\n ],\n };\n },\n\n // ── Creative ───────────────────────────────────────────\n\n list_creative_formats(step, context) {\n // Mirror the pattern used by peer builders (build_creative, sync_creatives,\n // etc.): honor hand-authored sample_request so storyboards can exercise\n // format_ids filters and other query params. Without this, any step that\n // declares `format_ids: [\"...\"]` in sample_request hits the wire as an\n // empty request and the agent returns unfiltered results — failing\n // round-trip / substitution-observer assertions silently.\n return {};\n },\n\n build_creative(step, context, options) {\n // Hand-authored sample_request can exercise slot-specific briefs, target\n // format overrides, or multi-format requests — honor it when present.\n const format = selectFormat(context);\n const sample = step.sample_request;\n const hasPluralTargets =\n sample !== undefined &&\n typeof sample === 'object' &&\n !Array.isArray(sample) &&\n Array.isArray((sample as Record<string, unknown>).target_format_ids);\n return {\n ...(hasPluralTargets ? {} : { target_format_id: format?.format_id ?? context.format_id ?? UNKNOWN_FORMAT_ID }),\n brand: resolveBrand(options),\n message: 'Create a test advertisement for an e-commerce brand promoting a summer sale.',\n quality: 'draft',\n include_preview: true,\n };\n },\n\n preview_creative(_step, context, _options) {\n const format = selectFormat(context);\n return {\n request_type: 'single',\n creative_manifest: {\n format_id: format?.format_id ?? context.format_id ?? UNKNOWN_FORMAT_ID,\n name: 'E2E Test Creative',\n assets: {},\n },\n };\n },\n\n sync_creatives(step, context, options, runnerVars) {\n // Honor hand-authored sample_request for scenarios that require specific\n // creative shapes (delete/patch flows, format-scoped uploads, etc).\n const formats = (context.formats as Array<Record<string, unknown>> | undefined) ?? [];\n const idSuffix = generatedIdSuffix(step, runnerVars);\n\n // Send one creative per discovered format so downstream steps\n // (e.g., build_video_tag) can find creatives in every format.\n const creatives =\n formats.length > 0\n ? formats.map((fmt, i) => ({\n creative_id: `test-creative-${idSuffix}-${i}`,\n name: `E2E Test Creative ${i + 1}`,\n format_id: fmt.format_id ?? context.format_id ?? UNKNOWN_FORMAT_ID,\n assets: buildAssetsForFormat(fmt),\n }))\n : [\n {\n creative_id: `test-creative-${idSuffix}`,\n name: 'E2E Test Creative',\n format_id: context.format_id ?? UNKNOWN_FORMAT_ID,\n assets: {\n primary: {\n asset_type: 'image',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n width: 1200,\n height: 628,\n format: 'image/jpeg',\n },\n },\n },\n ];\n\n return {\n account: context.account ?? resolveAccount(options),\n creatives,\n };\n },\n\n list_creatives(_step, context, options) {\n return {\n account: context.account ?? resolveAccount(options),\n };\n },\n\n // ── Signals ────────────────────────────────────────────\n\n get_signals(step, context, options) {\n if (options.brief) return { signal_spec: options.brief };\n if (step.sample_request?.signal_ids) {\n return injectContext({ signal_ids: step.sample_request.signal_ids }, context);\n }\n // `anyOf: [{required: [signal_spec]}, {required: [signal_ids]}]` — the\n // schema rejects an empty object. Default to a discovery-style\n // `signal_spec` so storyboards that omit `options.brief` still send a\n // conforming request. A real test should author sample_request or pass\n // options.brief; this is the minimally valid fallback.\n return { signal_spec: 'E2E fallback signal discovery' };\n },\n\n activate_signal(step, context, _options) {\n const signal = selectSignal(context);\n const destinations = step.sample_request?.destinations as Array<Record<string, unknown>> | undefined;\n const request: Record<string, unknown> = {\n signal_agent_segment_id: signal?.signal_agent_segment_id ?? context.signal_id ?? 'test-signal',\n pricing_option_id:\n (signal?.pricing_options as Array<Record<string, unknown>> | undefined)?.[0]?.pricing_option_id ??\n context.pricing_option_id,\n };\n request.destinations = destinations\n ? (injectContext({ destinations }, context) as Record<string, unknown>).destinations\n : [{ type: 'agent', agent_url: 'https://test.example/signals' }];\n return request;\n },\n\n // ── Capabilities ───────────────────────────────────────\n\n get_adcp_capabilities() {\n return {};\n },\n\n // ── Governance ─────────────────────────────────────────\n\n sync_governance(step, context, options) {\n // `governance_agents[]` items are `additionalProperties: false` per\n // AdCP 3.1.0-beta.3 (the single-agent-owns-full-lifecycle clarification\n // dropped per-agent `categories`). Only `url` + `authentication` are\n // permitted on the wire.\n return {\n accounts: [\n {\n account: context.account ?? resolveAccount(options),\n governance_agents: [\n {\n url: 'https://governance.test.example',\n authentication: {\n schemes: ['Bearer'],\n credentials: 'test-governance-token-padded-to-meet-min-length-32',\n },\n },\n ],\n },\n ],\n };\n },\n\n list_content_standards() {\n return {};\n },\n\n get_content_standards(_step, context, _options) {\n // `standards_id` is required by GetContentStandardsRequestSchema (no optional()).\n // Unlike `get_media_buys` / `get_media_buy_delivery` (where the id field is\n // optional), we cannot return {} here — that would fail the schema round-trip\n // test. `'unknown'` triggers a clean NOT_FOUND when context lacks a real id,\n // surfacing the authoring gap (\"wire context_outputs from create_content_standards\").\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n };\n },\n\n calibrate_content(step, context, _options) {\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n artifact: {\n property_rid: 'test-publisher.example',\n artifact_id: context.creative_id ?? 'unknown',\n assets: [],\n },\n };\n },\n\n sync_plans(step, context, options, runnerVars) {\n // Governance storyboards define scenario-specific plans in sample_request\n // (e.g., custom_policies for conditions, reallocation_threshold for denied).\n // Delegate to sample_request when present.\n const now = runClockMs(runnerVars);\n const startDate = new Date(now + 24 * 60 * 60 * 1000).toISOString();\n const endDate = new Date(now + 90 * 24 * 60 * 60 * 1000).toISOString();\n const idSuffix = generatedIdSuffix(step, runnerVars, now);\n return {\n plans: [\n {\n plan_id: `test-plan-${idSuffix}`,\n brand: resolveBrand(options),\n objectives: 'E2E test campaign — maximize reach across digital channels',\n budget: { total: options.budget ?? 10000, currency: 'USD', reallocation_unlimited: true },\n flight: { start: startDate, end: endDate },\n approved_sellers: null,\n },\n ],\n };\n },\n\n check_governance(step, context, options) {\n // `caller` names the CALLER-AGENT's URL, not the brand — governance agents\n // use it for agent identity (rate limits, audit, JWS issuer correlation).\n // The brand belongs inside `payload`, where governance rules about the\n // advertised entity are evaluated. Using the fallback harness-orchestrator\n // URL keeps the semantics honest when no sample_request is authored.\n return {\n plan_id: context.plan_id ?? 'unknown',\n caller: FALLBACK_CALLER_AGENT_URL,\n payload: {\n type: 'media_buy',\n account: context.account ?? resolveAccount(options),\n brand: resolveBrand(options),\n total_budget: options.budget ?? 10000,\n },\n };\n },\n\n get_account_financials(_step, context, options) {\n return {\n account: context.account ?? resolveAccount(options),\n };\n },\n\n create_content_standards(step, context, _options, runnerVars) {\n // `anyOf: [{required: [policies]}, {required: [registry_policy_ids]}]` —\n // one must be present. Emit a minimal inline bespoke policy rather than\n // pinning a registry id the agent may not carry; storyboards that want\n // real governance coverage author sample_request.\n //\n // Contamination safeguards for the rare case a fallback hits a shared\n // sandbox: `enforcement: \"should\"` keeps this from hardening into a deny\n // rule against real content, and the ephemeral `policy_id` (timestamped\n // + \"e2e-fallback-\" prefix) guarantees uniqueness per run so a stale\n // policy can't be matched by accident.\n return {\n scope: {\n languages_any: ['en'],\n description: 'E2E fallback content standards — replace via sample_request for real governance coverage',\n },\n policies: [\n {\n policy_id: `e2e-fallback-${generatedIdSuffix(step, runnerVars)}`,\n enforcement: 'should',\n policy: 'E2E fallback policy — storyboard author did not supply sample_request.',\n },\n ],\n };\n },\n\n update_content_standards(step, context, _options) {\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n };\n },\n\n validate_content_delivery(step, context, _options) {\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n records: [\n {\n record_id: 'delivery_001',\n artifact: {\n property_rid: 'test-publisher.example',\n artifact_id: context.creative_id ?? 'unknown',\n assets: [],\n },\n },\n ],\n };\n },\n\n acquire_rights(step, context, options) {\n return {\n rights_id: context.rights_id ?? 'unknown',\n pricing_option_id: 'standard',\n buyer: { domain: resolveBrand(options).domain },\n campaign: {\n description: 'E2E storyboard test campaign',\n uses: ['commercial'],\n },\n revocation_webhook: {\n url: 'https://test.example/webhooks/revocation',\n authentication: {\n schemes: ['Bearer'],\n credentials: 'test-revocation-webhook-secret-token',\n },\n },\n };\n },\n\n update_rights(step, context, _options) {\n return {\n rights_id: context.rights_id ?? 'unknown',\n };\n },\n\n creative_approval(step, context, _options) {\n return {\n rights_id: context.rights_id ?? 'unknown',\n creative_id: context.creative_id ?? 'unknown',\n creative_url:\n (context.creative_url as string | undefined) ??\n 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n };\n },\n\n // ── Sponsored Intelligence ─────────────────────────────\n\n si_get_offering(step, context, options) {\n return {\n offering_id: options.si_offering_id ?? 'e2e-test-offering',\n intent: options.si_context ?? 'E2E testing - checking SI offering availability',\n };\n },\n\n si_initiate_session(step, context, options, runnerVars) {\n // `intent` is required and represents the user's ask. Default to a\n // semantically plausible one so agents that dispatch on intent still\n // behave sensibly; storyboards override via sample_request when\n // testing intent-specific paths.\n return {\n offering_id: context.offering_id ?? options.si_offering_id ?? 'e2e-test-offering',\n offering_token: context.offering_token,\n identity: {\n consent_granted: false,\n anonymous_session_id: `e2e-anon-${generatedIdSuffix(step, runnerVars)}`,\n },\n intent: options.si_context ?? 'Browse available offerings',\n placement: 'e2e-test',\n supported_capabilities: {\n modalities: { conversational: true, rich_media: true },\n },\n };\n },\n\n si_send_message(step, context, _options) {\n return {\n session_id: context.session_id ?? 'unknown',\n message: 'Tell me more about this product.',\n };\n },\n\n si_terminate_session(step, context, _options) {\n return {\n session_id: context.session_id ?? 'unknown',\n reason: 'user_exit',\n };\n },\n\n // ── Test Controller ────────────────────────────────────\n\n comply_test_controller(step, context, options) {\n // The test controller requires account.sandbox: true to be set.\n const account: Record<string, unknown> = {\n ...(context.account ?? resolveAccount(options)),\n sandbox: true,\n };\n // Natural-key arm of AccountReference requires `operator` per the spec\n // schema. If `context.account` came from a sync_accounts response that\n // omitted `operator` (#1419), fall back to brand.domain so the synthetic\n // ref the controller receives is spec-valid.\n if (typeof account.account_id !== 'string' && typeof account.operator !== 'string') {\n const brand = account.brand as { domain?: unknown } | undefined;\n if (brand && typeof brand.domain === 'string') {\n account.operator = brand.domain;\n }\n }\n if (step.sample_request) {\n // Drop envelope fields; outer enrichRequest re-applies them with\n // `runnerVars` so mustache substitutions expand correctly.\n return {\n ...omitEnvelopeFields(injectContext({ ...step.sample_request }, context) as Record<string, unknown>),\n account,\n };\n }\n return {\n account,\n scenario: context.controller_scenario ?? 'list_scenarios',\n };\n },\n};\n\n/**\n * Enrich a storyboard step's request payload.\n *\n * Contract (issue #820):\n * - `sample_request`, when authored, is the authoritative base. The runner\n * injects context placeholders into it before calling here.\n * - An enricher (if registered for the task) produces fields that should\n * fill gaps the fixture left unset — discovery-derived identifiers,\n * envelope fields the author couldn't know at YAML-authoring time.\n * - Top-level merge: fixture wins on key conflicts. Fixture-aware\n * enrichers (see `FIXTURE_AWARE_ENRICHERS`) skip the generic merge and\n * return the final payload themselves.\n *\n * Returns `{}` when the task has no enricher and no `sample_request` — the\n * runner's load-time validator prevents this for mutating tasks, so the\n * empty return is reachable only for read tasks that have no fixture and\n * no registered enricher (rare).\n */\nexport function enrichRequest(\n step: StoryboardStep,\n context: StoryboardContext,\n options: TestOptions,\n runnerVars?: RunnerVariables\n): Record<string, unknown> {\n const enricher = REQUEST_ENRICHERS[step.task];\n const fixture =\n step.sample_request !== undefined\n ? (injectContext({ ...(step.sample_request as Record<string, unknown>) }, context, runnerVars) as Record<\n string,\n unknown\n >)\n : undefined;\n\n if (!enricher) return fixture ?? {};\n\n const enriched = enricher(step, context, options, runnerVars);\n\n // Fixture-aware enrichers already did the body merge internally and know\n // the array/nested shapes better than a generic top-level overlay can.\n // Envelope fields still flow through from sample_request.\n if (FIXTURE_AWARE_ENRICHERS.has(step.task)) {\n if (!fixture) return enriched;\n const out: Record<string, unknown> = { ...enriched };\n for (const field of ENVELOPE_FIELDS) {\n if (fixture[field] !== undefined && out[field] === undefined) out[field] = fixture[field];\n }\n return out;\n }\n\n // Generic fixture-authoritative merge: fixture keys overlay enricher keys.\n return fixture ? { ...enriched, ...fixture } : enriched;\n}\n\n/** True iff a request enricher is registered for this task. */\nexport function hasRequestEnricher(taskName: string): boolean {\n return taskName in REQUEST_ENRICHERS;\n}\n\n// ────────────────────────────────────────────────────────────\n// Legacy aliases — pre-#820 terminology. Kept for one release so\n// external consumers (repo greps found none, but public exports may\n// have downstream users) migrate at their own pace.\n// ────────────────────────────────────────────────────────────\n\n/** @deprecated Renamed to `enrichRequest`. Same behavior. */\nexport const buildRequest = enrichRequest;\n\n/** @deprecated Renamed to `hasRequestEnricher`. Same behavior. */\nexport const hasRequestBuilder = hasRequestEnricher;\n\n// ────────────────────────────────────────────────────────────\n// Selection helpers: pick the best item from discovered data\n// ────────────────────────────────────────────────────────────\n\nfunction selectProduct(context: StoryboardContext): Record<string, unknown> | undefined {\n const products = context.products as Array<Record<string, unknown>> | undefined;\n if (!products?.length) return undefined;\n\n // Prefer products with guaranteed delivery and pricing options\n const withPricing = products.filter(p => {\n const opts = p.pricing_options as unknown[] | undefined;\n return opts && opts.length > 0;\n });\n\n return withPricing[0] ?? products[0];\n}\n\nfunction selectPricingOption(product: Record<string, unknown> | undefined): Record<string, unknown> | undefined {\n if (!product) return undefined;\n const options = product.pricing_options as Array<Record<string, unknown>> | undefined;\n if (!options?.length) return undefined;\n\n // Prefer fixed pricing (cpm, flat) over auction\n const fixed = options.filter(o => o.pricing_model === 'cpm' || o.pricing_model === 'flat');\n return fixed[0] ?? options[0];\n}\n\nfunction selectFormat(context: StoryboardContext): Record<string, unknown> | undefined {\n const formats = context.formats as Array<Record<string, unknown>> | undefined;\n if (!formats?.length) return undefined;\n return formats[0];\n}\n\nfunction selectSignal(context: StoryboardContext): Record<string, unknown> | undefined {\n const signals = context.signals as Array<Record<string, unknown>> | undefined;\n if (!signals?.length) return undefined;\n return signals[0];\n}\n\n/**\n * Build placeholder assets appropriate for a format's type.\n * Uses the format name to guess whether it's video, native, or display.\n */\nfunction buildAssetsForFormat(format: Record<string, unknown>): Record<string, unknown> {\n const name = String(format.name ?? format.format_id ?? '').toLowerCase();\n const type = String(format.type ?? '').toLowerCase();\n\n if (type === 'video' || name.includes('video') || name.includes('vast')) {\n return {\n video: {\n asset_type: 'video',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/trail-pro-30s.mp4',\n width: 1920,\n height: 1080,\n duration_ms: 30000,\n container_format: 'video/mp4',\n },\n };\n }\n\n if (type === 'native' || name.includes('native')) {\n return {\n image: {\n asset_type: 'image',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n width: 1200,\n height: 628,\n format: 'image/jpeg',\n },\n headline: {\n asset_type: 'text',\n content: 'Trail Pro 3000 — Built for the Summit',\n },\n };\n }\n\n // Default: display image\n return {\n primary: {\n asset_type: 'image',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n width: 1200,\n height: 628,\n format: 'image/jpeg',\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBA,yBAA2B;AAC3B,oBAA6C;AAG7C,qBAAoD;AAuBpD,MAAM,oBAAoB,OAAO,OAAO,EAAE,WAAW,gCAAgC,IAAI,UAAU,CAAC;AAYpG,MAAM,4BAA4B;AAUlC,MAAM,0BAA0B,oBAAI,IAAY;AAAA,EAC9C;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF,CAAC;AAcD,MAAM,uBAAuB,oBAAI,IAAI,CAAC,cAA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O,OAAO,QAAQ,OAAO,aAAa,EAAE,EAAE,YAAY;AACvE,QAAM,OAAO,OAAO,OAAO,QAAQ,EAAE,EAAE,YAAY;AAEnD,MAAI,SAAS,WAAW,KAAK,SAAS,OAAO,KAAK,KAAK,SAAS,MAAM,GAAG;AACvE,WAAO;AAAA,MACL,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,KAAK;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,aAAa;AAAA,QACb,kBAAkB;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AAEA,MAAI,SAAS,YAAY,KAAK,SAAS,QAAQ,GAAG;AAChD,WAAO;AAAA,MACL,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,KAAK;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,MACA,UAAU;AAAA,QACR,YAAY;AAAA,QACZ,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAGA,SAAO;AAAA,IACL,SAAS;AAAA,MACP,YAAY;AAAA,MACZ,KAAK;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/testing/storyboard/request-builder.ts"],"sourcesContent":["/**\n * Request enrichers for storyboard steps.\n *\n * Contract (see issue #820):\n * - `sample_request` (when authored) is the authoritative base payload.\n * The runner injects context placeholders into it and passes it through\n * to the agent under test.\n * - An enricher fills top-level fields the fixture didn't specify —\n * typically discovery-derived identifiers (`product_id`, `format_id`,\n * `account`, `media_buy_id`) or envelope fields that only the harness\n * knows.\n * - For conflicts at the top level, the fixture wins — storyboard authors'\n * intent is not silently overridden.\n *\n * A short list of tasks need to splice discovery-derived fields INTO\n * nested structures in the fixture (e.g. `create_media_buy` injects\n * `product_id` into `packages[0]`) and can't be expressed by a top-level\n * overlay. Those enrichers declare themselves fixture-aware via\n * `FIXTURE_AWARE_ENRICHERS` below and the runner uses their output as-is.\n *\n * `sample_request` from YAML, when a task has no enricher, is used directly\n * after context injection — preserves the \"no handler, fixture is the wire\n * payload\" pattern.\n */\n\nimport { createHash } from 'node:crypto';\nimport { isFixedPricing, type PricingOptionV3 } from '../../utils/pricing-adapter';\nimport { resolveBrand, resolveAccount } from '../client';\nimport type { TestOptions } from '../types';\nimport type { StoryboardContext, StoryboardStep } from './types';\nimport { injectContext, type RunnerVariables } from './context';\n\ntype RequestEnricher = (\n step: StoryboardStep,\n context: StoryboardContext,\n options: TestOptions,\n runnerVars?: RunnerVariables\n) => Record<string, unknown>;\n\n/** Legacy alias kept for external consumers pinned to the old terminology. */\ntype RequestBuilder = RequestEnricher;\n\n/**\n * Placeholder `format_id` used when neither `list_creative_formats` discovery\n * nor accumulated `context.format_id` supplied one. Schema\n * (core/format-id.json) requires `agent_url` in URI form, so a bare\n * `\"unknown\"` string fails validation. `example.com` is reserved for\n * documentation per RFC 2606 — an obvious fixture that strict JSON-schema\n * validators accept and that downstream handlers resolve to a clean\n * format-not-found error rather than an unrelated crash. Frozen so a\n * builder that accidentally spread-mutates the shared constant hits a\n * TypeError instead of silently corrupting sibling calls.\n */\nconst UNKNOWN_FORMAT_ID = Object.freeze({ agent_url: 'https://unknown.example.com/', id: 'unknown' });\n\n/**\n * Placeholder `caller` URL for tasks whose schema names the CALLER-AGENT's\n * URL (not the brand or the seller). `check_governance.caller` is the canonical\n * case: governance agents bind this field to agent identity for rate limiting,\n * audit trails, and (with `signed-requests`) JWS issuer correlation — emitting\n * the brand domain here names the wrong entity and will confuse strict\n * governance agents. Storyboards that care about a specific caller identity\n * author sample_request; this is the fallback when neither fixture nor\n * harness-supplied agent URL is present.\n */\nconst FALLBACK_CALLER_AGENT_URL = 'https://e2e-orchestrator.adcontextprotocol.org/';\n\n/**\n * Tasks whose enricher must see `sample_request` to produce the final\n * payload — typically because it needs to splice discovery-derived fields\n * INTO nested structures the fixture owns (arrays, object trees). For\n * these, the runner uses the enricher's output verbatim and does not\n * layer the fixture on top; the enricher is responsible for fixture\n * precedence internally.\n */\nconst FIXTURE_AWARE_ENRICHERS = new Set<string>([\n 'create_media_buy', // merges discovery-derived product_id / pricing_option_id INTO fixture packages[0]\n 'comply_test_controller', // forces account.sandbox: true regardless of fixture\n 'update_media_buy', // resolves account via resolveAccount(options) so sandbox routing matches create_media_buy\n 'get_media_buys', // resolves account via resolveAccount(options) so sandbox routing matches create_media_buy\n 'get_media_buy_delivery', // resolves account via resolveAccount(options) so sandbox routing matches create_media_buy\n]);\n\n/**\n * Placeholder identifiers that the upstream universal compliance\n * storyboards ship inside `create_media_buy.packages[0]` expecting the\n * runner to substitute the seller's discovered identifiers. The fixtures\n * live in `adcontextprotocol/adcp` and can't be rewritten from the SDK,\n * so the enricher treats these literals as \"defer to discovery\" while\n * real seller ids (e.g. `cpm_guaranteed`) win over discovery per the\n * fixture-authoritative contract. If a future storyboard wants\n * placeholder-then-discovery semantics for another value, author it as\n * a `$context.<key>` substitution rather than a magic literal so the\n * intent is explicit at the fixture level.\n */\nconst PRODUCT_ID_SENTINELS = new Set(['test-product']);\nconst PRICING_OPTION_ID_SENTINELS = new Set(['test-pricing']);\nconst DAY_MS = 24 * 60 * 60 * 1000;\nconst DEFAULT_MEDIA_BUY_WINDOW_MS = 7 * DAY_MS;\n\nfunction asNonSentinel(value: unknown, sentinels: Set<string>): string | undefined {\n if (typeof value !== 'string') return undefined;\n return sentinels.has(value) ? undefined : value;\n}\n\nfunction parseTime(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n const parsed = Date.parse(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction resolveMediaBuyWindow(\n sampleStart: string | undefined,\n sampleEnd: string | undefined,\n nowMs?: number\n): {\n startTime: string;\n endTime: string;\n} {\n const now = nowMs ?? Date.now();\n const defaultStart = new Date(now + DAY_MS).toISOString();\n const defaultEnd = new Date(now + 8 * DAY_MS).toISOString();\n const sampleStartMs = parseTime(sampleStart);\n const sampleEndMs = parseTime(sampleEnd);\n const startIsAsap = sampleStart === 'asap';\n\n const startTime = startIsAsap\n ? 'asap'\n : sampleStart && sampleStartMs !== undefined && sampleStartMs >= now\n ? sampleStart\n : defaultStart;\n let endTime = sampleEnd && sampleEndMs !== undefined && sampleEndMs >= now ? sampleEnd : defaultEnd;\n\n const startTimeMs = startIsAsap ? now : Date.parse(startTime);\n if (Date.parse(endTime) <= startTimeMs) {\n const sampleDurationMs =\n sampleStartMs !== undefined && sampleEndMs !== undefined && sampleEndMs > sampleStartMs\n ? sampleEndMs - sampleStartMs\n : DEFAULT_MEDIA_BUY_WINDOW_MS;\n endTime = new Date(startTimeMs + sampleDurationMs).toISOString();\n }\n\n return { startTime, endTime };\n}\n\nfunction runClockMs(runnerVars: RunnerVariables | undefined): number {\n return runnerVars?.runStartMs ?? Date.now();\n}\n\nfunction generatedIdSuffix(step: StoryboardStep, runnerVars: RunnerVariables | undefined, nowMs?: number): string {\n const timestamp = nowMs ?? runClockMs(runnerVars);\n if (runnerVars?.runStartMs === undefined) return String(timestamp);\n const stepHash = createHash('sha256').update(step.id).digest('hex').slice(0, 12);\n return `${timestamp}-${stepHash}`;\n}\n\n/**\n * Envelope fields that live on every AdCP request and are owned by the\n * storyboard author — `context.correlation_id`, runner-supplied\n * `idempotency_key` aliases, webhook pointers, per-request extensions.\n * Fixture-aware enrichers must NOT spread these from their internal\n * `injectContext(sample_request, context)` call: that internal call\n * doesn't receive `runnerVars`, so mustache tokens (`{{runner.webhook_url:<step_id>}}`)\n * would ship to the wire literally. The outer `enrichRequest` overlays\n * envelope fields from a `runnerVars`-aware fixture re-injection.\n */\nconst ENVELOPE_FIELDS = ['context', 'ext', 'push_notification_config', 'idempotency_key'] as const;\n\nfunction omitEnvelopeFields(obj: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(obj)) {\n if (!(ENVELOPE_FIELDS as readonly string[]).includes(k)) out[k] = v;\n }\n return out;\n}\n\nfunction hasAuthoredAccountIdentity(account: unknown): account is Record<string, unknown> {\n if (account === null || typeof account !== 'object' || Array.isArray(account)) return false;\n const ref = account as Record<string, unknown>;\n return (\n (typeof ref.account_id === 'string' && ref.account_id.length > 0) ||\n (typeof ref.operator === 'string' && ref.operator.length > 0)\n );\n}\n\nconst REQUEST_ENRICHERS: Record<string, RequestEnricher> = {\n // ── Account & Audience ─────────────────────────────────\n\n sync_accounts(_step, _context, options) {\n return {\n accounts: [\n {\n brand: resolveBrand(options),\n operator: resolveBrand(options).domain,\n billing: 'operator',\n payment_terms: 'net_30',\n },\n ],\n };\n },\n\n sync_audiences(step, context, options, runnerVars) {\n // Honor hand-authored sample_request so storyboards can register a\n // specific audience_id that downstream steps reference. Without this,\n // add-shaped sample_request blocks (authored with audience_id + add[])\n // fell through to the generated fallback id, and a later delete_audience\n // or context-substitution step would hit AUDIENCE_NOT_FOUND because the\n // sync had registered a different id. Matches the pattern used by\n // sync_event_sources, sync_catalogs, and sync_creatives.\n if (step.sample_request) {\n return injectContext({ ...step.sample_request, account: context.account ?? resolveAccount(options) }, context);\n }\n return {\n account: context.account ?? resolveAccount(options),\n audiences: [\n {\n audience_id: context.audience_id ?? `test-audience-${generatedIdSuffix(step, runnerVars)}`,\n name: 'E2E Test Audience',\n add: [\n {\n external_id: 'user-001',\n hashed_email: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',\n },\n ],\n },\n ],\n };\n },\n\n // ── Brand & Rights ───────────────────────────────────────\n\n get_brand_identity(step, context, options) {\n const brand = resolveBrand(options);\n return {\n brand_id: context.brand_id ?? (step.sample_request?.brand_id as string) ?? brand.brand_id ?? brand.domain,\n };\n },\n\n get_rights(step, context, options) {\n // Honor hand-authored sample_request so storyboards can specify\n // scenario-specific query text, uses, countries, or buyer_brand.\n // Peer builders (sync_plans, check_governance, list_creative_formats,\n // create_content_standards, etc.) follow the same pattern.\n //\n // Without this, any get_rights step hits the wire with the generic\n // fallback and a brand_id derived from the caller's domain — which\n // rights-holder rosters reject as unknown, so rights[0] is undefined,\n // $context.rights_id doesn't resolve, and downstream acquire_rights\n // steps fail with rights_not_found instead of the error the\n // storyboard is actually asserting (e.g., GOVERNANCE_DENIED).\n const brand = resolveBrand(options);\n return {\n query: 'available rights for advertising',\n uses: ['ai_generated_image'],\n brand_id: context.brand_id ?? brand.brand_id ?? brand.domain,\n };\n },\n\n // ── Product Discovery ──────────────────────────────────\n\n get_products(step, context, options) {\n // If the step is a \"refine\" step, build a refine request\n if (step.sample_request?.buying_mode === 'refine' && context.products) {\n return {\n buying_mode: 'refine',\n refine: [\n {\n scope: 'request',\n ask: 'Only guaranteed packages with premium placement.',\n },\n ],\n brand: resolveBrand(options),\n account: context.account ?? resolveAccount(options),\n };\n }\n\n return {\n buying_mode: 'brief',\n brief: options.brief || 'Show me all available advertising products across all channels',\n brand: resolveBrand(options),\n };\n },\n\n // ── Media Buy ──────────────────────────────────────────\n\n create_media_buy(step, context, options, runnerVars) {\n const product = selectProduct(context);\n const pricingOption = selectPricingOption(product);\n\n // Respect sample_request dates when they're future-dated — needed for\n // storyboards that test replay semantics where initial + replay must\n // produce byte-for-byte identical canonical payloads. Two calls\n // generated 5ms apart with `Date.now()` would hash differently,\n // triggering IDEMPOTENCY_CONFLICT on replay. Stale sample dates\n // (authored before the run date) fall back to the run-start-relative\n // default. Resolve the pair together so a stale start and same-day\n // future end cannot produce start_time > end_time.\n const sampleStart =\n typeof step.sample_request?.start_time === 'string' ? step.sample_request.start_time : undefined;\n const sampleEnd = typeof step.sample_request?.end_time === 'string' ? step.sample_request.end_time : undefined;\n const { startTime, endTime } = resolveMediaBuyWindow(sampleStart, sampleEnd, runnerVars?.runStartMs);\n\n // Merge hand-authored package fields from sample_request (targeting_overlay,\n // measurement_terms, creative_assignments, performance_standards, etc.) so\n // scenario-specific behaviors are exercised. The first package's\n // identifiers (product_id, pricing_option_id) follow a two-tier rule:\n //\n // - Real seller ids in the fixture win over discovery — storyboards\n // that name `cpm_guaranteed` (or any seller-specific identifier)\n // are asserting that specific id reaches the wire. Discovery must\n // not override.\n // - Well-known sentinel placeholders (`test-product`, `test-pricing`)\n // from the upstream universal compliance storyboards defer to\n // discovery. Those storyboards ship package fixtures with\n // `product_id: \"test-product\"` expecting the runner to substitute\n // the seller's discovered product — they'd fail against every\n // seller that doesn't literally ship a \"test-product\" catalog\n // entry if the fixture value survived to the wire.\n //\n // The sentinel list is conservative. If a future storyboard wants\n // placeholder-then-discovery semantics for another field, author it\n // as `$context.<key>` substitution instead of a magic literal.\n const samplePackages = (step.sample_request?.packages as Array<Record<string, unknown>> | undefined) ?? [];\n const baseSample = samplePackages[0]\n ? (injectContext({ ...samplePackages[0] }, context) as Record<string, unknown>)\n : {};\n\n const fixtureProductId = asNonSentinel(baseSample.product_id, PRODUCT_ID_SENTINELS);\n const fixturePricingOptionId = asNonSentinel(baseSample.pricing_option_id, PRICING_OPTION_ID_SENTINELS);\n\n const firstPkg: Record<string, unknown> = {\n ...baseSample,\n product_id: fixtureProductId ?? product?.product_id ?? context.product_id ?? 'test-product',\n budget:\n (typeof baseSample.budget === 'number' ? baseSample.budget : undefined) ??\n options.budget ??\n Math.max(1000, (pricingOption?.min_spend_per_package as number) ?? 1000),\n pricing_option_id:\n fixturePricingOptionId ?? pricingOption?.pricing_option_id ?? context.pricing_option_id ?? 'default',\n };\n\n // Synthesize a bid_price for auction/cpm pricing only when the fixture\n // didn't author one. Storyboards that test auction flows (e.g.\n // sales-non-guaranteed) author explicit bid_prices the seller validates\n // against floor_price; discovery-synthesized values would silently\n // override intentional bid-floor-boundary tests. The check runs against\n // the option the package actually sends. An option carrying fixed_price is\n // fixed pricing whatever its pricing_model, and bid_price applies only to\n // auction options. Media-buy or package `bidding` must not be combined with\n // a legacy bid_price (AMBIGUOUS_BIDDING_POLICY), so its presence also\n // suppresses the bid.\n const additionalPkgs = samplePackages\n .slice(1)\n .map(p => injectContext({ ...p }, context) as Record<string, unknown>);\n const packages = [firstPkg, ...additionalPkgs];\n for (const pkg of packages) {\n const sentPricingOption =\n pkg === firstPkg && fixtureProductId === undefined && fixturePricingOptionId === undefined\n ? pricingOption\n : findPricingOption(context, pkg.product_id, pkg.pricing_option_id);\n if (\n pkg.bid_price === undefined &&\n pkg.bidding === undefined &&\n step.sample_request?.bidding === undefined &&\n sentPricingOption?.pricing_model === 'cpm' &&\n !isFixedPricing(sentPricingOption as PricingOptionV3)\n ) {\n const floor = Number(sentPricingOption.floor_price) || 5;\n pkg.bid_price = Math.round(floor * 1.5 * 100) / 100;\n }\n }\n\n // Proposal-mode: when context carries a proposal_id (captured from\n // `proposals[0]` in a prior brief/refine/finalize step), forward it\n // and omit `packages`. The schema disallows synthesising packages\n // alongside `proposal_id` — `dependencies.proposal_id` requires\n // `total_budget` and the seller derives packages from the committed\n // allocation.\n //\n // Spread the fixture (after $context injection) so proposal-mode-\n // required fields like `total_budget` flow through. Prefer the\n // fixture's account/brand when supplied — proposal-mode storyboards\n // author a non-default brand (e.g. `acmeoutdoor.example`) that the\n // adapter resolves end-to-end through brief/refine/finalize, and\n // the harness-default `test.example` would fail account resolution\n // at the accept step (adcp-client#1600). Dates and proposal_id\n // are still normalised by the enricher.\n const fixture =\n step.sample_request !== undefined\n ? (injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>)\n : {};\n // Drop envelope fields from the local spread — the outer enrichRequest\n // re-injects them with `runnerVars` so `{{runner.webhook_url:<step_id>}}`\n // tokens inside push_notification_config expand. Spreading them here\n // would carry through unexpanded mustache strings.\n const fixtureBody = omitEnvelopeFields(fixture);\n\n // Proposal-mode applies only when the storyboard's fixture explicitly\n // names a `proposal_id`. `context.proposal_id` is auto-captured from\n // any prior `get_products` response that returned `proposals[0]` (see\n // context.ts), which is essentially every brief flow — using it as a\n // fallback would override a fixture's explicit `packages` direction\n // and force every sales storyboard through proposal-mode validation,\n // including ones that intentionally exercise package-mode (sales-\n // guaranteed, schema_validation, media_buy_seller/*). Fixture is the\n // storyboard author's intent; respect it.\n const fixtureHasPackages = Array.isArray(fixture.packages) && (fixture.packages as unknown[]).length > 0;\n const proposalId: unknown =\n fixture.proposal_id !== undefined ? fixture.proposal_id : fixtureHasPackages ? undefined : context.proposal_id;\n if (typeof proposalId === 'string') {\n const { packages: _droppedPackages, ...fixtureWithoutPackages } = fixtureBody;\n return {\n ...fixtureWithoutPackages,\n account: fixtureWithoutPackages.account ?? context.account ?? resolveAccount(options),\n brand: fixtureWithoutPackages.brand ?? resolveBrand(options),\n start_time: startTime,\n end_time: endTime,\n proposal_id: proposalId,\n };\n }\n\n // Spread the fixture (after $context injection) so any sample_request\n // fields the enricher doesn't explicitly normalise (total_budget,\n // buyer_ref, currency, scenario-specific extensions) reach the wire.\n // The enricher then layers its own substitutions on top: packages is\n // replaced (the enricher merged samplePackages internally with\n // discovery-derived identifiers above), account/brand/start_time/\n // end_time are normalised. Per issue #1604, build-from-scratch dropped\n // every fixture field outside this enumerated set — fixture-aware\n // enrichers must spread sample_request first, then override. Envelope\n // fields are omitted here and re-applied by the outer enrichRequest\n // with `runnerVars` so mustache tokens expand correctly.\n return {\n ...fixtureBody,\n account: context.account ?? resolveAccount(options),\n brand: resolveBrand(options),\n start_time: startTime,\n end_time: endTime,\n packages,\n };\n },\n\n update_media_buy(step, context, options) {\n // Fixture-aware: spread the storyboard's sample_request first so hand-authored\n // intent (targeting_overlay swaps, creative assignments, pause/resume/cancel)\n // is preserved verbatim, then force `account` to the harness-resolved value so\n // sandbox routing matches create_media_buy's namespace on every round-trip\n // (otherwise the fixture's account silently routes update writes to a different\n // partition than the create wrote to, and a subsequent get_media_buys reading\n // from the create-time partition surfaces stale data — see adcp-client#1505).\n // Envelope fields are dropped from the local spread; the outer enrichRequest\n // re-injects them with `runnerVars` so mustache substitutions expand.\n const fixtureFields = step.sample_request\n ? omitEnvelopeFields(\n injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>\n )\n : {};\n const request: Record<string, unknown> = { ...fixtureFields };\n request.account = context.account ?? resolveAccount(options);\n if (request.media_buy_id === undefined) {\n request.media_buy_id = context.media_buy_id ?? 'unknown';\n }\n\n // No sample_request: fall back to step-id keyword inference so legacy\n // storyboards without an authored fixture still exercise sensible flows.\n if (!step.sample_request) {\n if (step.id.includes('pause')) {\n request.paused = true;\n } else if (step.id.includes('resume')) {\n request.paused = false;\n } else if (step.id.includes('cancel')) {\n request.canceled = true;\n } else {\n request.packages = [\n {\n package_id: (context.package_id as string | undefined) ?? 'unknown',\n budget: 2000,\n },\n ];\n }\n }\n\n return request;\n },\n\n get_media_buys(step, context, options) {\n // Spread fixture fields so storyboards can author filters, status, pagination, etc.\n // account is always overridden by the harness-resolved value so sandbox routing\n // matches create_media_buy's namespace on every round-trip. Envelope fields are\n // dropped from the local spread so the outer enrichRequest re-injects them with\n // `runnerVars` (mustache substitutions expand against the runner's webhook base).\n const fixtureFields = step.sample_request\n ? omitEnvelopeFields(\n injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>\n )\n : {};\n const result: Record<string, unknown> = { ...fixtureFields };\n result.account = context.account ?? resolveAccount(options);\n if (context.media_buy_id != null && result.media_buy_ids === undefined) {\n result.media_buy_ids = [context.media_buy_id];\n }\n return result;\n },\n\n get_media_buy_delivery(step, context, options) {\n // Same account-resolution rule as get_media_buys — fixture fields preserved,\n // account overridden by harness so sandbox routing matches create_media_buy.\n // Envelope fields dropped from the local spread; outer enrichRequest re-applies\n // them with `runnerVars` so mustache substitutions expand.\n const fixtureFields = step.sample_request\n ? omitEnvelopeFields(\n injectContext({ ...(step.sample_request as Record<string, unknown>) }, context) as Record<string, unknown>\n )\n : {};\n const result: Record<string, unknown> = { ...fixtureFields };\n result.account = context.account ?? resolveAccount(options);\n if (context.media_buy_id != null && result.media_buy_ids === undefined) {\n result.media_buy_ids = [context.media_buy_id];\n }\n return result;\n },\n\n // provide_performance_feedback intentionally has no builder — storyboard\n // sample_request is authoritative because the spec's oneOf requires a\n // performance_index variant that only the storyboard author knows the\n // shape of. A synthesized payload here would emit non-spec fields\n // (feedback/satisfaction/notes) and get rejected with INVALID_REQUEST.\n\n // ── Catalogs & Events ─────────────────────────────────\n\n sync_catalogs(step, context, options, runnerVars) {\n // Prefer the fixture's sample_request — it's the authoritative request\n // shape for the storyboard step. The fallback's hardcoded feed_format\n // ('json') is NOT in the spec's 5-literal union and its `type` is\n // missing entirely, so any agent running the generated Zod schema\n // rejects the fallback with -32602 on both fields.\n return {\n account: context.account ?? resolveAccount(options),\n catalogs: [\n {\n catalog_id: `test-catalog-${generatedIdSuffix(step, runnerVars)}`,\n name: 'E2E Test Catalog',\n type: 'product',\n feed_url: 'https://test-assets.adcontextprotocol.org/feeds/test-catalog.json',\n feed_format: 'custom',\n },\n ],\n };\n },\n\n sync_event_sources(step, context, options, runnerVars) {\n return {\n account: context.account ?? resolveAccount(options),\n event_sources: [\n {\n event_source_id: `test-source-${generatedIdSuffix(step, runnerVars)}`,\n name: 'E2E Test Event Source',\n event_types: ['purchase', 'add_to_cart'],\n },\n ],\n };\n },\n\n log_event(step, context, _options, runnerVars) {\n // Storyboards routinely ship spec-conformant event payloads with\n // event_time, content_ids, and custom_data siblings that only the\n // author knows. Honor sample_request when present.\n return {\n event_source_id: context.event_source_id ?? 'test-source',\n events: [\n {\n event_id: `evt-${generatedIdSuffix(step, runnerVars)}`,\n event_type: 'purchase',\n event_time: new Date(runClockMs(runnerVars)).toISOString(),\n custom_data: { value: 49.99, currency: 'USD' },\n },\n ],\n };\n },\n\n report_usage(step, context, options, runnerVars) {\n // Prefer the fixture's sample_request — creative-ad-server and other\n // specialisms carry per-usage-entry fields (vendor_cost, currency,\n // pricing_option_id) that the hardcoded fallback here omits, causing\n // agents running the generated Zod schema to reject every step.\n const now = new Date(runClockMs(runnerVars));\n const monthAgo = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000);\n return {\n account: context.account ?? resolveAccount(options),\n reporting_period: {\n start: monthAgo.toISOString(),\n end: now.toISOString(),\n },\n usage: [\n {\n account: context.account ?? resolveAccount(options),\n creative_id: context.creative_id ?? 'unknown',\n impressions: 10000,\n vendor_cost: 500,\n currency: 'USD',\n },\n ],\n };\n },\n\n // ── Creative ───────────────────────────────────────────\n\n list_creative_formats(step, context) {\n // Mirror the pattern used by peer builders (build_creative, sync_creatives,\n // etc.): honor hand-authored sample_request so storyboards can exercise\n // format_ids filters and other query params. Without this, any step that\n // declares `format_ids: [\"...\"]` in sample_request hits the wire as an\n // empty request and the agent returns unfiltered results — failing\n // round-trip / substitution-observer assertions silently.\n return {};\n },\n\n build_creative(step, context, options) {\n // Hand-authored sample_request can exercise slot-specific briefs, target\n // format overrides, or multi-format requests — honor it when present.\n const format = selectFormat(context);\n const sample = step.sample_request;\n const hasPluralTargets =\n sample !== undefined &&\n typeof sample === 'object' &&\n !Array.isArray(sample) &&\n Array.isArray((sample as Record<string, unknown>).target_format_ids);\n return {\n ...(hasPluralTargets ? {} : { target_format_id: format?.format_id ?? context.format_id ?? UNKNOWN_FORMAT_ID }),\n brand: resolveBrand(options),\n message: 'Create a test advertisement for an e-commerce brand promoting a summer sale.',\n quality: 'draft',\n include_preview: true,\n };\n },\n\n preview_creative(_step, context, _options) {\n const format = selectFormat(context);\n return {\n request_type: 'single',\n creative_manifest: {\n format_id: format?.format_id ?? context.format_id ?? UNKNOWN_FORMAT_ID,\n name: 'E2E Test Creative',\n assets: {},\n },\n };\n },\n\n sync_creatives(step, context, options, runnerVars) {\n // Honor hand-authored sample_request for scenarios that require specific\n // creative shapes (delete/patch flows, format-scoped uploads, etc).\n const formats = (context.formats as Array<Record<string, unknown>> | undefined) ?? [];\n const idSuffix = generatedIdSuffix(step, runnerVars);\n\n // Send one creative per discovered format so downstream steps\n // (e.g., build_video_tag) can find creatives in every format.\n const creatives =\n formats.length > 0\n ? formats.map((fmt, i) => ({\n creative_id: `test-creative-${idSuffix}-${i}`,\n name: `E2E Test Creative ${i + 1}`,\n format_id: fmt.format_id ?? context.format_id ?? UNKNOWN_FORMAT_ID,\n assets: buildAssetsForFormat(fmt),\n }))\n : [\n {\n creative_id: `test-creative-${idSuffix}`,\n name: 'E2E Test Creative',\n format_id: context.format_id ?? UNKNOWN_FORMAT_ID,\n assets: {\n primary: {\n asset_type: 'image',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n width: 1200,\n height: 628,\n format: 'image/jpeg',\n },\n },\n },\n ];\n\n return {\n account: context.account ?? resolveAccount(options),\n creatives,\n };\n },\n\n list_creatives(_step, context, options) {\n return {\n account: context.account ?? resolveAccount(options),\n };\n },\n\n // ── Signals ────────────────────────────────────────────\n\n get_signals(step, context, options) {\n if (options.brief) return { signal_spec: options.brief };\n if (step.sample_request?.signal_ids) {\n return injectContext({ signal_ids: step.sample_request.signal_ids }, context);\n }\n // `anyOf: [{required: [signal_spec]}, {required: [signal_ids]}]` — the\n // schema rejects an empty object. Default to a discovery-style\n // `signal_spec` so storyboards that omit `options.brief` still send a\n // conforming request. A real test should author sample_request or pass\n // options.brief; this is the minimally valid fallback.\n return { signal_spec: 'E2E fallback signal discovery' };\n },\n\n activate_signal(step, context, _options) {\n const signal = selectSignal(context);\n const destinations = step.sample_request?.destinations as Array<Record<string, unknown>> | undefined;\n const request: Record<string, unknown> = {\n signal_agent_segment_id: signal?.signal_agent_segment_id ?? context.signal_id ?? 'test-signal',\n pricing_option_id:\n (signal?.pricing_options as Array<Record<string, unknown>> | undefined)?.[0]?.pricing_option_id ??\n context.pricing_option_id,\n };\n request.destinations = destinations\n ? (injectContext({ destinations }, context) as Record<string, unknown>).destinations\n : [{ type: 'agent', agent_url: 'https://test.example/signals' }];\n return request;\n },\n\n // ── Capabilities ───────────────────────────────────────\n\n get_adcp_capabilities() {\n return {};\n },\n\n // ── Governance ─────────────────────────────────────────\n\n sync_governance(step, context, options) {\n // `governance_agents[]` items are `additionalProperties: false` per\n // AdCP 3.1.0-beta.3 (the single-agent-owns-full-lifecycle clarification\n // dropped per-agent `categories`). Only `url` + `authentication` are\n // permitted on the wire.\n return {\n accounts: [\n {\n account: context.account ?? resolveAccount(options),\n governance_agents: [\n {\n url: 'https://governance.test.example',\n authentication: {\n schemes: ['Bearer'],\n credentials: 'test-governance-token-padded-to-meet-min-length-32',\n },\n },\n ],\n },\n ],\n };\n },\n\n list_content_standards() {\n return {};\n },\n\n get_content_standards(_step, context, _options) {\n // `standards_id` is required by GetContentStandardsRequestSchema (no optional()).\n // Unlike `get_media_buys` / `get_media_buy_delivery` (where the id field is\n // optional), we cannot return {} here — that would fail the schema round-trip\n // test. `'unknown'` triggers a clean NOT_FOUND when context lacks a real id,\n // surfacing the authoring gap (\"wire context_outputs from create_content_standards\").\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n };\n },\n\n calibrate_content(step, context, _options) {\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n artifact: {\n property_rid: 'test-publisher.example',\n artifact_id: context.creative_id ?? 'unknown',\n assets: [],\n },\n };\n },\n\n sync_plans(step, context, options, runnerVars) {\n // Governance storyboards define scenario-specific plans in sample_request\n // (e.g., custom_policies for conditions, reallocation_threshold for denied).\n // Delegate to sample_request when present.\n const now = runClockMs(runnerVars);\n const startDate = new Date(now + 24 * 60 * 60 * 1000).toISOString();\n const endDate = new Date(now + 90 * 24 * 60 * 60 * 1000).toISOString();\n const idSuffix = generatedIdSuffix(step, runnerVars, now);\n return {\n plans: [\n {\n plan_id: `test-plan-${idSuffix}`,\n brand: resolveBrand(options),\n objectives: 'E2E test campaign — maximize reach across digital channels',\n budget: { total: options.budget ?? 10000, currency: 'USD', reallocation_unlimited: true },\n flight: { start: startDate, end: endDate },\n approved_sellers: null,\n },\n ],\n };\n },\n\n check_governance(step, context, options) {\n // `caller` names the CALLER-AGENT's URL, not the brand — governance agents\n // use it for agent identity (rate limits, audit, JWS issuer correlation).\n // The brand belongs inside `payload`, where governance rules about the\n // advertised entity are evaluated. Using the fallback harness-orchestrator\n // URL keeps the semantics honest when no sample_request is authored.\n return {\n plan_id: context.plan_id ?? 'unknown',\n caller: FALLBACK_CALLER_AGENT_URL,\n payload: {\n type: 'media_buy',\n account: context.account ?? resolveAccount(options),\n brand: resolveBrand(options),\n total_budget: options.budget ?? 10000,\n },\n };\n },\n\n get_account_financials(_step, context, options) {\n return {\n account: context.account ?? resolveAccount(options),\n };\n },\n\n create_content_standards(step, context, _options, runnerVars) {\n // `anyOf: [{required: [policies]}, {required: [registry_policy_ids]}]` —\n // one must be present. Emit a minimal inline bespoke policy rather than\n // pinning a registry id the agent may not carry; storyboards that want\n // real governance coverage author sample_request.\n //\n // Contamination safeguards for the rare case a fallback hits a shared\n // sandbox: `enforcement: \"should\"` keeps this from hardening into a deny\n // rule against real content, and the ephemeral `policy_id` (timestamped\n // + \"e2e-fallback-\" prefix) guarantees uniqueness per run so a stale\n // policy can't be matched by accident.\n return {\n scope: {\n languages_any: ['en'],\n description: 'E2E fallback content standards — replace via sample_request for real governance coverage',\n },\n policies: [\n {\n policy_id: `e2e-fallback-${generatedIdSuffix(step, runnerVars)}`,\n enforcement: 'should',\n policy: 'E2E fallback policy — storyboard author did not supply sample_request.',\n },\n ],\n };\n },\n\n update_content_standards(step, context, _options) {\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n };\n },\n\n validate_content_delivery(step, context, _options) {\n return {\n standards_id: context.content_standards_id ?? 'unknown',\n records: [\n {\n record_id: 'delivery_001',\n artifact: {\n property_rid: 'test-publisher.example',\n artifact_id: context.creative_id ?? 'unknown',\n assets: [],\n },\n },\n ],\n };\n },\n\n acquire_rights(step, context, options) {\n return {\n rights_id: context.rights_id ?? 'unknown',\n pricing_option_id: 'standard',\n buyer: { domain: resolveBrand(options).domain },\n campaign: {\n description: 'E2E storyboard test campaign',\n uses: ['commercial'],\n },\n revocation_webhook: {\n url: 'https://test.example/webhooks/revocation',\n authentication: {\n schemes: ['Bearer'],\n credentials: 'test-revocation-webhook-secret-token',\n },\n },\n };\n },\n\n update_rights(step, context, _options) {\n return {\n rights_id: context.rights_id ?? 'unknown',\n };\n },\n\n creative_approval(step, context, _options) {\n return {\n rights_id: context.rights_id ?? 'unknown',\n creative_id: context.creative_id ?? 'unknown',\n creative_url:\n (context.creative_url as string | undefined) ??\n 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n };\n },\n\n // ── Sponsored Intelligence ─────────────────────────────\n\n si_get_offering(step, context, options) {\n return {\n offering_id: options.si_offering_id ?? 'e2e-test-offering',\n intent: options.si_context ?? 'E2E testing - checking SI offering availability',\n };\n },\n\n si_initiate_session(step, context, options, runnerVars) {\n // `intent` is required and represents the user's ask. Default to a\n // semantically plausible one so agents that dispatch on intent still\n // behave sensibly; storyboards override via sample_request when\n // testing intent-specific paths.\n return {\n offering_id: context.offering_id ?? options.si_offering_id ?? 'e2e-test-offering',\n offering_token: context.offering_token,\n identity: {\n consent_granted: false,\n anonymous_session_id: `e2e-anon-${generatedIdSuffix(step, runnerVars)}`,\n },\n intent: options.si_context ?? 'Browse available offerings',\n placement: 'e2e-test',\n supported_capabilities: {\n modalities: { conversational: true, rich_media: true },\n },\n };\n },\n\n si_send_message(step, context, _options) {\n return {\n session_id: context.session_id ?? 'unknown',\n message: 'Tell me more about this product.',\n };\n },\n\n si_terminate_session(step, context, _options) {\n return {\n session_id: context.session_id ?? 'unknown',\n reason: 'user_exit',\n };\n },\n\n // ── Test Controller ────────────────────────────────────\n\n comply_test_controller(step, context, options) {\n // The stale-cache directive must address the account whose cache was warmed.\n // Backport the authored-account selection from the current SDK line.\n const controllerFields = step.sample_request\n ? omitEnvelopeFields(injectContext({ ...step.sample_request }, context) as Record<string, unknown>)\n : undefined;\n const authoredAccount = controllerFields?.account;\n const accountScope =\n controllerFields?.scenario === 'force_upstream_unavailable' && hasAuthoredAccountIdentity(authoredAccount)\n ? authoredAccount\n : (context.account ?? resolveAccount(options));\n // The test controller requires account.sandbox: true to be set.\n const account: Record<string, unknown> = {\n ...accountScope,\n sandbox: true,\n };\n // Natural-key arm of AccountReference requires `operator` per the spec\n // schema. If `context.account` came from a sync_accounts response that\n // omitted `operator` (#1419), fall back to brand.domain so the synthetic\n // ref the controller receives is spec-valid.\n if (typeof account.account_id !== 'string' && typeof account.operator !== 'string') {\n const brand = account.brand as { domain?: unknown } | undefined;\n if (brand && typeof brand.domain === 'string') {\n account.operator = brand.domain;\n }\n }\n if (controllerFields) {\n // Drop envelope fields; outer enrichRequest re-applies them with\n // `runnerVars` so mustache substitutions expand correctly.\n return { ...controllerFields, account };\n }\n return {\n account,\n scenario: context.controller_scenario ?? 'list_scenarios',\n };\n },\n};\n\n/**\n * Enrich a storyboard step's request payload.\n *\n * Contract (issue #820):\n * - `sample_request`, when authored, is the authoritative base. The runner\n * injects context placeholders into it before calling here.\n * - An enricher (if registered for the task) produces fields that should\n * fill gaps the fixture left unset — discovery-derived identifiers,\n * envelope fields the author couldn't know at YAML-authoring time.\n * - Top-level merge: fixture wins on key conflicts. Fixture-aware\n * enrichers (see `FIXTURE_AWARE_ENRICHERS`) skip the generic merge and\n * return the final payload themselves.\n *\n * Returns `{}` when the task has no enricher and no `sample_request` — the\n * runner's load-time validator prevents this for mutating tasks, so the\n * empty return is reachable only for read tasks that have no fixture and\n * no registered enricher (rare).\n */\nexport function enrichRequest(\n step: StoryboardStep,\n context: StoryboardContext,\n options: TestOptions,\n runnerVars?: RunnerVariables\n): Record<string, unknown> {\n const enricher = REQUEST_ENRICHERS[step.task];\n const fixture =\n step.sample_request !== undefined\n ? (injectContext({ ...(step.sample_request as Record<string, unknown>) }, context, runnerVars) as Record<\n string,\n unknown\n >)\n : undefined;\n\n if (!enricher) return fixture ?? {};\n\n const enriched = enricher(step, context, options, runnerVars);\n\n // Fixture-aware enrichers already did the body merge internally and know\n // the array/nested shapes better than a generic top-level overlay can.\n // Envelope fields still flow through from sample_request.\n if (FIXTURE_AWARE_ENRICHERS.has(step.task)) {\n if (!fixture) return enriched;\n const out: Record<string, unknown> = { ...enriched };\n for (const field of ENVELOPE_FIELDS) {\n if (fixture[field] !== undefined && out[field] === undefined) out[field] = fixture[field];\n }\n return out;\n }\n\n // Generic fixture-authoritative merge: fixture keys overlay enricher keys.\n return fixture ? { ...enriched, ...fixture } : enriched;\n}\n\n/** True iff a request enricher is registered for this task. */\nexport function hasRequestEnricher(taskName: string): boolean {\n return taskName in REQUEST_ENRICHERS;\n}\n\n// ────────────────────────────────────────────────────────────\n// Legacy aliases — pre-#820 terminology. Kept for one release so\n// external consumers (repo greps found none, but public exports may\n// have downstream users) migrate at their own pace.\n// ────────────────────────────────────────────────────────────\n\n/** @deprecated Renamed to `enrichRequest`. Same behavior. */\nexport const buildRequest = enrichRequest;\n\n/** @deprecated Renamed to `hasRequestEnricher`. Same behavior. */\nexport const hasRequestBuilder = hasRequestEnricher;\n\n// ────────────────────────────────────────────────────────────\n// Selection helpers: pick the best item from discovered data\n// ────────────────────────────────────────────────────────────\n\nfunction selectProduct(context: StoryboardContext): Record<string, unknown> | undefined {\n const products = context.products as Array<Record<string, unknown>> | undefined;\n if (!products?.length) return undefined;\n\n // Prefer products with guaranteed delivery and pricing options\n const withPricing = products.filter(p => {\n const opts = p.pricing_options as unknown[] | undefined;\n return opts && opts.length > 0;\n });\n\n return withPricing[0] ?? products[0];\n}\n\nfunction selectPricingOption(product: Record<string, unknown> | undefined): Record<string, unknown> | undefined {\n if (!product) return undefined;\n const options = product.pricing_options as Array<Record<string, unknown>> | undefined;\n if (!options?.length) return undefined;\n\n // Prefer fixed pricing (cpm, flat) over auction\n const fixed = options.filter(o => o.pricing_model === 'cpm' || o.pricing_model === 'flat');\n return fixed[0] ?? options[0];\n}\n\nfunction findPricingOption(\n context: StoryboardContext,\n productId: unknown,\n pricingOptionId: unknown\n): Record<string, unknown> | undefined {\n const products = context.products as Array<Record<string, unknown>> | undefined;\n const product = products?.find(p => p.product_id === productId);\n const options = product?.pricing_options as Array<Record<string, unknown>> | undefined;\n return options?.find(o => o.pricing_option_id === pricingOptionId);\n}\n\nfunction selectFormat(context: StoryboardContext): Record<string, unknown> | undefined {\n const formats = context.formats as Array<Record<string, unknown>> | undefined;\n if (!formats?.length) return undefined;\n return formats[0];\n}\n\nfunction selectSignal(context: StoryboardContext): Record<string, unknown> | undefined {\n const signals = context.signals as Array<Record<string, unknown>> | undefined;\n if (!signals?.length) return undefined;\n return signals[0];\n}\n\n/**\n * Build placeholder assets appropriate for a format's type.\n * Uses the format name to guess whether it's video, native, or display.\n */\nfunction buildAssetsForFormat(format: Record<string, unknown>): Record<string, unknown> {\n const name = String(format.name ?? format.format_id ?? '').toLowerCase();\n const type = String(format.type ?? '').toLowerCase();\n\n if (type === 'video' || name.includes('video') || name.includes('vast')) {\n return {\n video: {\n asset_type: 'video',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/trail-pro-30s.mp4',\n width: 1920,\n height: 1080,\n duration_ms: 30000,\n container_format: 'video/mp4',\n },\n };\n }\n\n if (type === 'native' || name.includes('native')) {\n return {\n image: {\n asset_type: 'image',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n width: 1200,\n height: 628,\n format: 'image/jpeg',\n },\n headline: {\n asset_type: 'text',\n content: 'Trail Pro 3000 — Built for the Summit',\n },\n };\n }\n\n // Default: display image\n return {\n primary: {\n asset_type: 'image',\n url: 'https://test-assets.adcontextprotocol.org/acme-outdoor/hero-master.jpg',\n width: 1200,\n height: 628,\n format: 'image/jpeg',\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBA,yBAA2B;AAC3B,6BAAqD;AACrD,oBAA6C;AAG7C,qBAAoD;AAuBpD,MAAM,oBAAoB,OAAO,OAAO,EAAE,WAAW,gCAAgC,IAAI,UAAU,CAAC;AAYpG,MAAM,4BAA4B;AAUlC,MAAM,0BAA0B,oBAAI,IAAY;AAAA,EAC9C;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF,CAAC;AAcD,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