@adcp/sdk 6.5.0 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADCP_VERSION +1 -1
- package/AGENTS.md +4 -0
- package/README.md +29 -16
- package/bin/adcp-resolve.js +166 -0
- package/bin/adcp.js +547 -9
- package/compliance/cache/{3.0.1 → 3.0.5}/index.json +2 -2
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/audience-sync/index.yaml +1 -1
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/index.yaml +3 -3
- package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-social/index.yaml +7 -0
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/runner-output-contract.yaml +23 -4
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/storyboard-schema.yaml +106 -1
- package/compliance/cache/{3.0.1 → 3.0.5}/universal/v3-envelope-integrity.yaml +4 -2
- package/dist/lib/adapters/implicit-account-store.d.ts +170 -0
- package/dist/lib/adapters/implicit-account-store.d.ts.map +1 -0
- package/dist/lib/adapters/implicit-account-store.js +313 -0
- package/dist/lib/adapters/implicit-account-store.js.map +1 -0
- package/dist/lib/adapters/index.d.ts +4 -0
- package/dist/lib/adapters/index.d.ts.map +1 -1
- package/dist/lib/adapters/index.js +19 -1
- package/dist/lib/adapters/index.js.map +1 -1
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts +191 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.d.ts.map +1 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.js +178 -0
- package/dist/lib/adapters/oauth-passthrough-resolver.js.map +1 -0
- package/dist/lib/adapters/roster-account-store.d.ts +221 -0
- package/dist/lib/adapters/roster-account-store.d.ts.map +1 -0
- package/dist/lib/adapters/roster-account-store.js +194 -0
- package/dist/lib/adapters/roster-account-store.js.map +1 -0
- package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js +5 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
- package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
- package/dist/lib/auth/oauth/discovery.js +6 -1
- package/dist/lib/auth/oauth/discovery.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +22 -0
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +117 -23
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +22 -7
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/mock-server/creative-template/seed-data.d.ts +45 -0
- package/dist/lib/mock-server/creative-template/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/creative-template/seed-data.js +149 -0
- package/dist/lib/mock-server/creative-template/seed-data.js.map +1 -0
- package/dist/lib/mock-server/creative-template/server.d.ts +13 -0
- package/dist/lib/mock-server/creative-template/server.d.ts.map +1 -0
- package/dist/lib/mock-server/creative-template/server.js +325 -0
- package/dist/lib/mock-server/creative-template/server.js.map +1 -0
- package/dist/lib/mock-server/index.d.ts +64 -0
- package/dist/lib/mock-server/index.d.ts.map +1 -0
- package/dist/lib/mock-server/index.js +225 -0
- package/dist/lib/mock-server/index.js.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts +46 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.js +167 -0
- package/dist/lib/mock-server/sales-guaranteed/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/server.d.ts +14 -0
- package/dist/lib/mock-server/sales-guaranteed/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-guaranteed/server.js +893 -0
- package/dist/lib/mock-server/sales-guaranteed/server.js.map +1 -0
- package/dist/lib/mock-server/sales-social/seed-data.d.ts +34 -0
- package/dist/lib/mock-server/sales-social/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-social/seed-data.js +42 -0
- package/dist/lib/mock-server/sales-social/seed-data.js.map +1 -0
- package/dist/lib/mock-server/sales-social/server.d.ts +17 -0
- package/dist/lib/mock-server/sales-social/server.d.ts.map +1 -0
- package/dist/lib/mock-server/sales-social/server.js +1219 -0
- package/dist/lib/mock-server/sales-social/server.js.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.d.ts +77 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.d.ts.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.js +194 -0
- package/dist/lib/mock-server/signal-marketplace/seed-data.js.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/server.d.ts +15 -0
- package/dist/lib/mock-server/signal-marketplace/server.d.ts.map +1 -0
- package/dist/lib/mock-server/signal-marketplace/server.js +382 -0
- package/dist/lib/mock-server/signal-marketplace/server.js.map +1 -0
- package/dist/lib/protocols/mcp.d.ts +4 -4
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +19 -13
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/bound-value.json +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/component.json +1 -1
- package/dist/lib/schemas-data/3.0/a2ui/si-catalog.json +25 -25
- package/dist/lib/schemas-data/3.0/a2ui/surface.json +2 -2
- package/dist/lib/schemas-data/3.0/a2ui/user-action.json +1 -1
- package/dist/lib/schemas-data/3.0/account/get-account-financials-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/get-account-financials-response.json +10 -10
- package/dist/lib/schemas-data/3.0/account/list-accounts-request.json +4 -4
- package/dist/lib/schemas-data/3.0/account/list-accounts-response.json +6 -6
- package/dist/lib/schemas-data/3.0/account/report-usage-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/report-usage-response.json +4 -4
- package/dist/lib/schemas-data/3.0/account/sync-accounts-request.json +9 -9
- package/dist/lib/schemas-data/3.0/account/sync-accounts-response.json +12 -12
- package/dist/lib/schemas-data/3.0/account/sync-governance-request.json +5 -5
- package/dist/lib/schemas-data/3.0/account/sync-governance-response.json +8 -8
- package/dist/lib/schemas-data/3.0/adagents.json +32 -32
- package/dist/lib/schemas-data/3.0/brand/acquire-rights-request.json +8 -8
- package/dist/lib/schemas-data/3.0/brand/acquire-rights-response.json +14 -14
- package/dist/lib/schemas-data/3.0/brand/creative-approval-request.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/creative-approval-response.json +10 -10
- package/dist/lib/schemas-data/3.0/brand/get-brand-identity-request.json +3 -3
- package/dist/lib/schemas-data/3.0/brand/get-brand-identity-response.json +8 -8
- package/dist/lib/schemas-data/3.0/brand/get-rights-request.json +7 -7
- package/dist/lib/schemas-data/3.0/brand/get-rights-response.json +9 -9
- package/dist/lib/schemas-data/3.0/brand/revocation-notification.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/rights-pricing-option.json +5 -5
- package/dist/lib/schemas-data/3.0/brand/rights-terms.json +3 -3
- package/dist/lib/schemas-data/3.0/brand/update-rights-request.json +4 -4
- package/dist/lib/schemas-data/3.0/brand/update-rights-response.json +9 -9
- package/dist/lib/schemas-data/3.0/brand.json +14 -14
- package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/calibrate-content-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/create-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/get-media-buy-artifacts-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/list-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/update-content-standards-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/content-standards/validate-content-delivery-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-get-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/core/tasks-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-delivery-response.json +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/get-creative-features-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creative-formats-response.json +38 -7
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/creative/list-creatives-response.json +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-request.json +11 -5
- package/dist/lib/schemas-data/3.0/bundled/creative/preview-creative-response.json +40 -6
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/creative/sync-creatives-response.json +101 -8
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/build-creative-response.json +110 -11
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/create-media-buy-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buy-delivery-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-media-buys-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/get-products-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/list-creative-formats-response.json +38 -7
- package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/log-event-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/package-request.json +7 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/provide-performance-feedback-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-audiences-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-catalogs-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/media-buy/sync-event-sources-response.json +68 -6
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-request.json +11 -5
- package/dist/lib/schemas-data/3.0/bundled/media-buy/update-media-buy-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/create-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/delete-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/get-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/list-property-lists-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/update-property-list-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/property/validate-property-delivery-response.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/protocol/get-adcp-capabilities-response.json +36 -5
- package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/activate-signal-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/signals/get-signals-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-get-offering-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-initiate-session-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-send-message-response.json +35 -4
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-request.json +2 -2
- package/dist/lib/schemas-data/3.0/bundled/sponsored-intelligence/si-terminate-session-response.json +35 -4
- package/dist/lib/schemas-data/3.0/collection/base-collection-source.json +3 -3
- package/dist/lib/schemas-data/3.0/collection/collection-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.0/collection/collection-list-filters.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/collection-list.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/create-collection-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/create-collection-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/delete-collection-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/delete-collection-list-response.json +3 -3
- package/dist/lib/schemas-data/3.0/collection/get-collection-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/collection/get-collection-list-response.json +10 -10
- package/dist/lib/schemas-data/3.0/collection/list-collection-lists-request.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/list-collection-lists-response.json +5 -5
- package/dist/lib/schemas-data/3.0/collection/update-collection-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/collection/update-collection-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/artifact-webhook-payload.json +3 -3
- package/dist/lib/schemas-data/3.0/content-standards/artifact.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/calibrate-content-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/content-standards.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/create-content-standards-response.json +6 -6
- package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-request.json +3 -3
- package/dist/lib/schemas-data/3.0/content-standards/get-content-standards-response.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/get-media-buy-artifacts-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-request.json +5 -5
- package/dist/lib/schemas-data/3.0/content-standards/list-content-standards-response.json +8 -8
- package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.0/content-standards/update-content-standards-response.json +6 -6
- package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-request.json +4 -4
- package/dist/lib/schemas-data/3.0/content-standards/validate-content-delivery-response.json +8 -8
- package/dist/lib/schemas-data/3.0/core/account-ref.json +2 -2
- package/dist/lib/schemas-data/3.0/core/account.json +9 -9
- package/dist/lib/schemas-data/3.0/core/activation-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/ad-inventory-config.json +1 -1
- package/dist/lib/schemas-data/3.0/core/agent-encryption-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/agent-signing-key.json +1 -1
- package/dist/lib/schemas-data/3.0/core/app-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/asset-union.json +53 -0
- package/dist/lib/schemas-data/3.0/core/assets/audio-asset.json +3 -3
- package/dist/lib/schemas-data/3.0/core/assets/brief-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/catalog-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/css-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/daast-asset.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/html-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/image-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/javascript-asset.json +3 -3
- package/dist/lib/schemas-data/3.0/core/assets/markdown-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/text-asset.json +2 -2
- package/dist/lib/schemas-data/3.0/core/assets/url-asset.json +6 -5
- package/dist/lib/schemas-data/3.0/core/assets/vast-asset.json +4 -4
- package/dist/lib/schemas-data/3.0/core/assets/video-asset.json +7 -7
- package/dist/lib/schemas-data/3.0/core/assets/webhook-asset.json +7 -7
- package/dist/lib/schemas-data/3.0/core/async-response-data.json +25 -25
- package/dist/lib/schemas-data/3.0/core/attribution-window.json +4 -4
- package/dist/lib/schemas-data/3.0/core/audience-member.json +3 -3
- package/dist/lib/schemas-data/3.0/core/audience-selector.json +4 -4
- package/dist/lib/schemas-data/3.0/core/brand-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/brand-ref.json +2 -2
- package/dist/lib/schemas-data/3.0/core/business-entity.json +2 -2
- package/dist/lib/schemas-data/3.0/core/cancellation-policy.json +2 -2
- package/dist/lib/schemas-data/3.0/core/catalog-field-mapping.json +2 -2
- package/dist/lib/schemas-data/3.0/core/catalog.json +7 -7
- package/dist/lib/schemas-data/3.0/core/catchment.json +5 -5
- package/dist/lib/schemas-data/3.0/core/collection-distribution.json +2 -2
- package/dist/lib/schemas-data/3.0/core/collection-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/collection-selector.json +1 -1
- package/dist/lib/schemas-data/3.0/core/collection.json +13 -13
- package/dist/lib/schemas-data/3.0/core/content-rating.json +2 -2
- package/dist/lib/schemas-data/3.0/core/context.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-asset.json +6 -52
- package/dist/lib/schemas-data/3.0/core/creative-assignment.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-brief.json +4 -4
- package/dist/lib/schemas-data/3.0/core/creative-consumption.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-filters.json +4 -4
- package/dist/lib/schemas-data/3.0/core/creative-item.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-manifest.json +7 -53
- package/dist/lib/schemas-data/3.0/core/creative-policy.json +3 -3
- package/dist/lib/schemas-data/3.0/core/creative-variable.json +1 -1
- package/dist/lib/schemas-data/3.0/core/creative-variant.json +5 -5
- package/dist/lib/schemas-data/3.0/core/data-provider-signal-selector.json +1 -1
- package/dist/lib/schemas-data/3.0/core/date-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/datetime-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/daypart-target.json +2 -2
- package/dist/lib/schemas-data/3.0/core/deadline-policy.json +1 -1
- package/dist/lib/schemas-data/3.0/core/delivery-forecast.json +7 -7
- package/dist/lib/schemas-data/3.0/core/delivery-metrics.json +5 -5
- package/dist/lib/schemas-data/3.0/core/deployment.json +3 -3
- package/dist/lib/schemas-data/3.0/core/destination-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/destination.json +1 -1
- package/dist/lib/schemas-data/3.0/core/diagnostic-issue.json +1 -1
- package/dist/lib/schemas-data/3.0/core/duration.json +1 -1
- package/dist/lib/schemas-data/3.0/core/education-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/error.json +34 -3
- package/dist/lib/schemas-data/3.0/core/event-custom-data.json +2 -2
- package/dist/lib/schemas-data/3.0/core/event-source-health.json +3 -3
- package/dist/lib/schemas-data/3.0/core/event.json +6 -6
- package/dist/lib/schemas-data/3.0/core/ext.json +1 -1
- package/dist/lib/schemas-data/3.0/core/feature-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/core/flight-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/forecast-point.json +18 -18
- package/dist/lib/schemas-data/3.0/core/forecast-range.json +1 -1
- package/dist/lib/schemas-data/3.0/core/format-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/format.json +42 -42
- package/dist/lib/schemas-data/3.0/core/frequency-cap.json +4 -4
- package/dist/lib/schemas-data/3.0/core/generation-credential.json +3 -3
- package/dist/lib/schemas-data/3.0/core/geo-breakdown-support.json +3 -3
- package/dist/lib/schemas-data/3.0/core/hotel-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/identifier.json +2 -2
- package/dist/lib/schemas-data/3.0/core/industry-identifier.json +2 -2
- package/dist/lib/schemas-data/3.0/core/insertion-order.json +1 -1
- package/dist/lib/schemas-data/3.0/core/installment-deadlines.json +2 -2
- package/dist/lib/schemas-data/3.0/core/installment.json +9 -9
- package/dist/lib/schemas-data/3.0/core/job-item.json +3 -3
- package/dist/lib/schemas-data/3.0/core/limited-series.json +1 -1
- package/dist/lib/schemas-data/3.0/core/material-deadline.json +1 -1
- package/dist/lib/schemas-data/3.0/core/mcp-webhook-payload.json +5 -5
- package/dist/lib/schemas-data/3.0/core/measurement-readiness.json +5 -5
- package/dist/lib/schemas-data/3.0/core/measurement-terms.json +3 -3
- package/dist/lib/schemas-data/3.0/core/measurement-window.json +1 -1
- package/dist/lib/schemas-data/3.0/core/media-buy-features.json +1 -1
- package/dist/lib/schemas-data/3.0/core/media-buy.json +7 -7
- package/dist/lib/schemas-data/3.0/core/offering-asset-group.json +16 -16
- package/dist/lib/schemas-data/3.0/core/offering.json +5 -5
- package/dist/lib/schemas-data/3.0/core/optimization-goal.json +6 -6
- package/dist/lib/schemas-data/3.0/core/outcome-measurement.json +2 -2
- package/dist/lib/schemas-data/3.0/core/overlay.json +1 -1
- package/dist/lib/schemas-data/3.0/core/package.json +14 -14
- package/dist/lib/schemas-data/3.0/core/pagination-request.json +1 -1
- package/dist/lib/schemas-data/3.0/core/pagination-response.json +1 -1
- package/dist/lib/schemas-data/3.0/core/performance-feedback.json +3 -3
- package/dist/lib/schemas-data/3.0/core/performance-standard.json +4 -4
- package/dist/lib/schemas-data/3.0/core/placement-definition.json +5 -5
- package/dist/lib/schemas-data/3.0/core/placement.json +2 -2
- package/dist/lib/schemas-data/3.0/core/planned-delivery.json +5 -5
- package/dist/lib/schemas-data/3.0/core/price.json +1 -1
- package/dist/lib/schemas-data/3.0/core/pricing-option.json +10 -10
- package/dist/lib/schemas-data/3.0/core/product-allocation.json +4 -4
- package/dist/lib/schemas-data/3.0/core/product-filters.json +16 -16
- package/dist/lib/schemas-data/3.0/core/product.json +28 -28
- package/dist/lib/schemas-data/3.0/core/property-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property-tag.json +1 -1
- package/dist/lib/schemas-data/3.0/core/property.json +6 -6
- package/dist/lib/schemas-data/3.0/core/proposal.json +6 -6
- package/dist/lib/schemas-data/3.0/core/protocol-envelope.json +3 -3
- package/dist/lib/schemas-data/3.0/core/provenance.json +6 -6
- package/dist/lib/schemas-data/3.0/core/publisher-property-selector.json +3 -3
- package/dist/lib/schemas-data/3.0/core/push-notification-config.json +2 -2
- package/dist/lib/schemas-data/3.0/core/real-estate-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/reference-asset.json +1 -1
- package/dist/lib/schemas-data/3.0/core/reporting-capabilities.json +5 -5
- package/dist/lib/schemas-data/3.0/core/reporting-webhook.json +3 -3
- package/dist/lib/schemas-data/3.0/core/requirements/asset-requirements.json +13 -13
- package/dist/lib/schemas-data/3.0/core/requirements/audio-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/catalog-field-binding.json +4 -4
- package/dist/lib/schemas-data/3.0/core/requirements/catalog-requirements.json +5 -5
- package/dist/lib/schemas-data/3.0/core/requirements/css-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/daast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/html-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/image-asset-requirements.json +2 -2
- package/dist/lib/schemas-data/3.0/core/requirements/javascript-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/markdown-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/offering-asset-constraint.json +4 -4
- package/dist/lib/schemas-data/3.0/core/requirements/text-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/url-asset-requirements.json +2 -2
- package/dist/lib/schemas-data/3.0/core/requirements/vast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/requirements/video-asset-requirements.json +6 -6
- package/dist/lib/schemas-data/3.0/core/requirements/webhook-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.0/core/response.json +1 -1
- package/dist/lib/schemas-data/3.0/core/rights-constraint.json +4 -4
- package/dist/lib/schemas-data/3.0/core/seller-agent-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/core/signal-definition.json +3 -3
- package/dist/lib/schemas-data/3.0/core/signal-filters.json +2 -2
- package/dist/lib/schemas-data/3.0/core/signal-id.json +1 -1
- package/dist/lib/schemas-data/3.0/core/signal-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.0/core/signal-pricing.json +6 -6
- package/dist/lib/schemas-data/3.0/core/signal-targeting.json +4 -4
- package/dist/lib/schemas-data/3.0/core/special.json +2 -2
- package/dist/lib/schemas-data/3.0/core/start-timing.json +1 -1
- package/dist/lib/schemas-data/3.0/core/store-item.json +3 -3
- package/dist/lib/schemas-data/3.0/core/talent.json +2 -2
- package/dist/lib/schemas-data/3.0/core/targeting.json +20 -20
- package/dist/lib/schemas-data/3.0/core/tasks-get-request.json +3 -3
- package/dist/lib/schemas-data/3.0/core/tasks-get-response.json +7 -7
- package/dist/lib/schemas-data/3.0/core/tasks-list-request.json +11 -11
- package/dist/lib/schemas-data/3.0/core/tasks-list-response.json +6 -6
- package/dist/lib/schemas-data/3.0/core/user-match.json +3 -3
- package/dist/lib/schemas-data/3.0/core/vehicle-item.json +4 -4
- package/dist/lib/schemas-data/3.0/core/vendor-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.0/core/x-entity-types.json +1 -1
- package/dist/lib/schemas-data/3.0/creative/asset-types/index.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/creative-feature-result.json +2 -2
- package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/get-creative-delivery-response.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/get-creative-features-request.json +5 -5
- package/dist/lib/schemas-data/3.0/creative/get-creative-features-response.json +8 -8
- package/dist/lib/schemas-data/3.0/creative/list-creative-formats-request.json +11 -11
- package/dist/lib/schemas-data/3.0/creative/list-creative-formats-response.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/list-creatives-request.json +8 -8
- package/dist/lib/schemas-data/3.0/creative/list-creatives-response.json +14 -60
- package/dist/lib/schemas-data/3.0/creative/preview-creative-request.json +11 -11
- package/dist/lib/schemas-data/3.0/creative/preview-creative-response.json +12 -12
- package/dist/lib/schemas-data/3.0/creative/preview-render.json +1 -1
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-request.json +7 -7
- package/dist/lib/schemas-data/3.0/creative/sync-creatives-response.json +13 -13
- package/dist/lib/schemas-data/3.0/enums/account-scope.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/account-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/action-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/adcp-protocol.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/adjustment-kind.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/advertiser-industry.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/age-verification-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/assessment-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/asset-content-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/attribution-model.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audience-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audience-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/audio-channel-layout.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/auth-scheme.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/available-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/billing-party.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/binary-verdict.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/brand-agent-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/canceled-by.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-item-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/channels.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/cloud-storage-protocol.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/co-branding-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-cadence.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-kind.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-relationship.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/collection-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/consent-basis.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/content-id-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/content-rating-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-agent-capability.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-approval-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-quality.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-sort-field.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/creative-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/daast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/daast-version.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/day-of-week.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/delegation-authority.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/delivery-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/demographic-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/derivative-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/device-platform.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/device-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/digital-source-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/dimension-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/disclosure-persistence.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/disclosure-position.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/distance-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/distribution-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/error-code.json +185 -2
- package/dist/lib/schemas-data/3.0/enums/escalation-severity.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/event-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/exclusivity.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feature-check-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feed-format.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/feedback-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecast-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecast-range-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/forecastable-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/format-id-parameter.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/frame-rate-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/frequency-cap-scope.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/genre-taxonomy.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/geo-level.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/gop-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-decision.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-domain.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/governance-phase.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/history-entry-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/http-method.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/installment-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/javascript-module-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/landing-page-requirement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/makegood-remedy.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/markdown-flavor.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/match-id-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/match-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/media-buy-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/media-buy-valid-action.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/metric-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/metro-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/moov-atom-position.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/notification-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/outcome-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/pacing.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/payment-terms.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/performance-standard-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/policy-category.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/policy-enforcement.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/postal-system.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/preview-output-format.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/pricing-model.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/production-quality.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/property-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/proposal-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/publisher-identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/purchase-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/reach-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/reporting-frequency.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/response-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/restricted-attribute.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/right-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/right-use.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/rights-billing-period.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/scan-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/si-session-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-source.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/signal-value-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/snapshot-unavailable-reason.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/sort-direction.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/sort-metric.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/special-category.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/specialism.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/talent-role.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/task-status.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/task-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/transport-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/travel-time-unit.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/uid-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/universal-macro.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/update-frequency.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/url-asset-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/validation-mode.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/vast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/vast-version.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/viewability-standard.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/wcag-level.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/webhook-response-type.json +1 -1
- package/dist/lib/schemas-data/3.0/enums/webhook-security-method.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/account-setup-required.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/audience-too-small.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/budget-too-low.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/conflict.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/creative-rejected.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/policy-violation.json +2 -2
- package/dist/lib/schemas-data/3.0/error-details/rate-limited.json +1 -1
- package/dist/lib/schemas-data/3.0/error-details/vendor-error-codes.json +1 -1
- package/dist/lib/schemas-data/3.0/extensions/extension-meta.json +1 -1
- package/dist/lib/schemas-data/3.0/extensions/index.json +2 -2
- package/dist/lib/schemas-data/3.0/governance/attribute-definition.json +1 -1
- package/dist/lib/schemas-data/3.0/governance/audience-constraints.json +3 -3
- package/dist/lib/schemas-data/3.0/governance/check-governance-request.json +7 -7
- package/dist/lib/schemas-data/3.0/governance/check-governance-response.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-request.json +4 -4
- package/dist/lib/schemas-data/3.0/governance/get-plan-audit-logs-response.json +9 -9
- package/dist/lib/schemas-data/3.0/governance/policy-category-definition.json +2 -2
- package/dist/lib/schemas-data/3.0/governance/policy-entry.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/policy-ref.json +1 -1
- package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-request.json +6 -6
- package/dist/lib/schemas-data/3.0/governance/report-plan-outcome-response.json +4 -4
- package/dist/lib/schemas-data/3.0/governance/sync-plans-request.json +13 -13
- package/dist/lib/schemas-data/3.0/governance/sync-plans-response.json +4 -4
- package/dist/lib/schemas-data/3.0/index.json +364 -364
- package/dist/lib/schemas-data/3.0/manifest.json +1190 -0
- package/dist/lib/schemas-data/3.0/manifest.schema.json +202 -0
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/build-creative-response.json +17 -17
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-request.json +12 -12
- package/dist/lib/schemas-data/3.0/media-buy/create-media-buy-response.json +15 -15
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-request.json +17 -17
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buy-delivery-response.json +24 -24
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/get-media-buys-response.json +19 -19
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/get-products-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/get-products-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/get-products-response.json +8 -8
- package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-request.json +11 -11
- package/dist/lib/schemas-data/3.0/media-buy/list-creative-formats-response.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/log-event-request.json +4 -4
- package/dist/lib/schemas-data/3.0/media-buy/log-event-response.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/package-request.json +12 -12
- package/dist/lib/schemas-data/3.0/media-buy/package-update.json +13 -13
- package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-request.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/provide-performance-feedback-response.json +6 -6
- package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/sync-audiences-response.json +9 -9
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-request.json +7 -7
- package/dist/lib/schemas-data/3.0/media-buy/sync-catalogs-response.json +9 -9
- package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-request.json +5 -5
- package/dist/lib/schemas-data/3.0/media-buy/sync-event-sources-response.json +10 -10
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-submitted.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-request.json +10 -10
- package/dist/lib/schemas-data/3.0/media-buy/update-media-buy-response.json +10 -10
- package/dist/lib/schemas-data/3.0/pricing-options/cpa-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpc-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpcv-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpm-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/cpp-option.json +5 -5
- package/dist/lib/schemas-data/3.0/pricing-options/cpv-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/flat-rate-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/price-breakdown.json +2 -2
- package/dist/lib/schemas-data/3.0/pricing-options/price-guidance.json +1 -1
- package/dist/lib/schemas-data/3.0/pricing-options/time-option.json +4 -4
- package/dist/lib/schemas-data/3.0/pricing-options/vcpm-option.json +4 -4
- package/dist/lib/schemas-data/3.0/property/authorization-result.json +1 -1
- package/dist/lib/schemas-data/3.0/property/base-property-source.json +4 -4
- package/dist/lib/schemas-data/3.0/property/create-property-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/property/create-property-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/delete-property-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/property/delete-property-list-response.json +3 -3
- package/dist/lib/schemas-data/3.0/property/delivery-record.json +3 -3
- package/dist/lib/schemas-data/3.0/property/get-property-list-request.json +4 -4
- package/dist/lib/schemas-data/3.0/property/get-property-list-response.json +7 -7
- package/dist/lib/schemas-data/3.0/property/list-property-lists-request.json +5 -5
- package/dist/lib/schemas-data/3.0/property/list-property-lists-response.json +5 -5
- package/dist/lib/schemas-data/3.0/property/property-error.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature-definition.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature-result.json +4 -4
- package/dist/lib/schemas-data/3.0/property/property-feature-value.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-feature.json +1 -1
- package/dist/lib/schemas-data/3.0/property/property-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.0/property/property-list-filters.json +5 -5
- package/dist/lib/schemas-data/3.0/property/property-list.json +6 -6
- package/dist/lib/schemas-data/3.0/property/update-property-list-request.json +7 -7
- package/dist/lib/schemas-data/3.0/property/update-property-list-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/validate-property-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.0/property/validate-property-delivery-response.json +4 -4
- package/dist/lib/schemas-data/3.0/property/validation-result.json +5 -5
- package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-request.json +3 -3
- package/dist/lib/schemas-data/3.0/protocol/get-adcp-capabilities-response.json +26 -26
- package/dist/lib/schemas-data/3.0/signals/activate-signal-request.json +5 -5
- package/dist/lib/schemas-data/3.0/signals/activate-signal-response.json +7 -7
- package/dist/lib/schemas-data/3.0/signals/get-signals-request.json +8 -8
- package/dist/lib/schemas-data/3.0/signals/get-signals-response.json +10 -10
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-capabilities.json +1 -1
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-get-offering-response.json +4 -4
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-identity.json +1 -1
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-request.json +5 -5
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-initiate-session-response.json +7 -7
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-send-message-response.json +7 -7
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-request.json +3 -3
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-terminate-session-response.json +5 -5
- package/dist/lib/schemas-data/3.0/sponsored-intelligence/si-ui-element.json +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/adcp-server.d.ts +21 -0
- package/dist/lib/server/adcp-server.d.ts.map +1 -1
- package/dist/lib/server/adcp-server.js +22 -1
- package/dist/lib/server/adcp-server.js.map +1 -1
- package/dist/lib/server/auth-signature.d.ts.map +1 -1
- package/dist/lib/server/auth-signature.js +21 -0
- package/dist/lib/server/auth-signature.js.map +1 -1
- package/dist/lib/server/auth.d.ts +24 -0
- package/dist/lib/server/auth.d.ts.map +1 -1
- package/dist/lib/server/auth.js +71 -3
- package/dist/lib/server/auth.js.map +1 -1
- package/dist/lib/server/create-adcp-server.d.ts +203 -21
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +322 -13
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/decisioning/account.d.ts +340 -21
- package/dist/lib/server/decisioning/account.d.ts.map +1 -1
- package/dist/lib/server/decisioning/account.js +150 -4
- package/dist/lib/server/decisioning/account.js.map +1 -1
- package/dist/lib/server/decisioning/admin-router.d.ts.map +1 -1
- package/dist/lib/server/decisioning/admin-router.js +5 -1
- package/dist/lib/server/decisioning/admin-router.js.map +1 -1
- package/dist/lib/server/decisioning/buyer-agent.d.ts +465 -0
- package/dist/lib/server/decisioning/buyer-agent.d.ts.map +1 -0
- package/dist/lib/server/decisioning/buyer-agent.js +372 -0
- package/dist/lib/server/decisioning/buyer-agent.js.map +1 -0
- package/dist/lib/server/decisioning/capabilities.d.ts +39 -7
- package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -1
- package/dist/lib/server/decisioning/compose.d.ts +93 -0
- package/dist/lib/server/decisioning/compose.d.ts.map +1 -0
- package/dist/lib/server/decisioning/compose.js +81 -0
- package/dist/lib/server/decisioning/compose.js.map +1 -0
- package/dist/lib/server/decisioning/context.d.ts +11 -0
- package/dist/lib/server/decisioning/context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.d.ts +12 -3
- package/dist/lib/server/decisioning/index.d.ts.map +1 -1
- package/dist/lib/server/decisioning/index.js +45 -2
- package/dist/lib/server/decisioning/index.js.map +1 -1
- package/dist/lib/server/decisioning/platform-helpers.d.ts +269 -0
- package/dist/lib/server/decisioning/platform-helpers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/platform-helpers.js +316 -0
- package/dist/lib/server/decisioning/platform-helpers.js.map +1 -0
- package/dist/lib/server/decisioning/platform.d.ts +127 -4
- package/dist/lib/server/decisioning/platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/platform.js.map +1 -1
- package/dist/lib/server/decisioning/resolve-presets.d.ts +129 -0
- package/dist/lib/server/decisioning/resolve-presets.d.ts.map +1 -0
- package/dist/lib/server/decisioning/resolve-presets.js +142 -0
- package/dist/lib/server/decisioning/resolve-presets.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts +8 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js +101 -0
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +91 -8
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +764 -130
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/to-context.js +1 -0
- package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.d.ts.map +1 -1
- package/dist/lib/server/decisioning/runtime/validate-platform.js +31 -3
- package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +83 -6
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/brand-rights.js +12 -5
- package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +41 -4
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/creative.d.ts +47 -3
- package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -1
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +115 -9
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
- package/dist/lib/server/decisioning/tenant-registry.d.ts.map +1 -1
- package/dist/lib/server/decisioning/tenant-registry.js +8 -3
- package/dist/lib/server/decisioning/tenant-registry.js.map +1 -1
- package/dist/lib/server/decisioning/tenant-store.d.ts +200 -0
- package/dist/lib/server/decisioning/tenant-store.d.ts.map +1 -0
- package/dist/lib/server/decisioning/tenant-store.js +182 -0
- package/dist/lib/server/decisioning/tenant-store.js.map +1 -0
- package/dist/lib/server/decisioning/validate-specialisms.d.ts +66 -0
- package/dist/lib/server/decisioning/validate-specialisms.d.ts.map +1 -0
- package/dist/lib/server/decisioning/validate-specialisms.js +119 -0
- package/dist/lib/server/decisioning/validate-specialisms.js.map +1 -0
- package/dist/lib/server/index.d.ts +11 -2
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +35 -3
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/media-buy-store.d.ts +126 -0
- package/dist/lib/server/media-buy-store.d.ts.map +1 -0
- package/dist/lib/server/media-buy-store.js +171 -0
- package/dist/lib/server/media-buy-store.js.map +1 -0
- package/dist/lib/server/redact.d.ts +52 -0
- package/dist/lib/server/redact.d.ts.map +1 -0
- package/dist/lib/server/redact.js +86 -0
- package/dist/lib/server/redact.js.map +1 -0
- package/dist/lib/server/responses.d.ts +60 -1
- package/dist/lib/server/responses.d.ts.map +1 -1
- package/dist/lib/server/responses.js +110 -1
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/server/serve.d.ts.map +1 -1
- package/dist/lib/server/serve.js +35 -1
- package/dist/lib/server/serve.js.map +1 -1
- package/dist/lib/server/state-machine.d.ts +80 -0
- package/dist/lib/server/state-machine.d.ts.map +1 -0
- package/dist/lib/server/state-machine.js +125 -0
- package/dist/lib/server/state-machine.js.map +1 -0
- package/dist/lib/server/test-controller.d.ts +48 -0
- package/dist/lib/server/test-controller.d.ts.map +1 -1
- package/dist/lib/server/test-controller.js +89 -10
- package/dist/lib/server/test-controller.js.map +1 -1
- package/dist/lib/server/upstream-helpers.d.ts +182 -0
- package/dist/lib/server/upstream-helpers.d.ts.map +1 -0
- package/dist/lib/server/upstream-helpers.js +140 -0
- package/dist/lib/server/upstream-helpers.js.map +1 -0
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts +44 -0
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/canonicalize.js +85 -0
- package/dist/lib/signing/agent-resolver/canonicalize.js.map +1 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.d.ts +54 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.js +49 -0
- package/dist/lib/signing/agent-resolver/capabilities-types.js.map +1 -0
- package/dist/lib/signing/agent-resolver/consistency.d.ts +84 -0
- package/dist/lib/signing/agent-resolver/consistency.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/consistency.js +121 -0
- package/dist/lib/signing/agent-resolver/consistency.js.map +1 -0
- package/dist/lib/signing/agent-resolver/errors.d.ts +68 -0
- package/dist/lib/signing/agent-resolver/errors.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/errors.js +45 -0
- package/dist/lib/signing/agent-resolver/errors.js.map +1 -0
- package/dist/lib/signing/agent-resolver/etld.d.ts +25 -0
- package/dist/lib/signing/agent-resolver/etld.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/etld.js +75 -0
- package/dist/lib/signing/agent-resolver/etld.js.map +1 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +41 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.js +85 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.js.map +1 -0
- package/dist/lib/signing/agent-resolver/index.d.ts +26 -0
- package/dist/lib/signing/agent-resolver/index.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/index.js +33 -0
- package/dist/lib/signing/agent-resolver/index.js.map +1 -0
- package/dist/lib/signing/agent-resolver/jwks-set.d.ts +76 -0
- package/dist/lib/signing/agent-resolver/jwks-set.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/jwks-set.js +124 -0
- package/dist/lib/signing/agent-resolver/jwks-set.js.map +1 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +123 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.js +398 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.js.map +1 -0
- package/dist/lib/signing/agent-resolver/select-agent.d.ts +54 -0
- package/dist/lib/signing/agent-resolver/select-agent.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/select-agent.js +94 -0
- package/dist/lib/signing/agent-resolver/select-agent.js.map +1 -0
- package/dist/lib/signing/agent-resolver/strict-json.d.ts +44 -0
- package/dist/lib/signing/agent-resolver/strict-json.d.ts.map +1 -0
- package/dist/lib/signing/agent-resolver/strict-json.js +219 -0
- package/dist/lib/signing/agent-resolver/strict-json.js.map +1 -0
- package/dist/lib/signing/capability-priming.d.ts.map +1 -1
- package/dist/lib/signing/capability-priming.js +2 -55
- package/dist/lib/signing/capability-priming.js.map +1 -1
- package/dist/lib/signing/protocol-response.d.ts +18 -0
- package/dist/lib/signing/protocol-response.d.ts.map +1 -0
- package/dist/lib/signing/protocol-response.js +69 -0
- package/dist/lib/signing/protocol-response.js.map +1 -0
- package/dist/lib/signing/server.d.ts +1 -0
- package/dist/lib/signing/server.d.ts.map +1 -1
- package/dist/lib/signing/server.js +10 -1
- package/dist/lib/signing/server.js.map +1 -1
- package/dist/lib/signing/testing.d.ts +64 -0
- package/dist/lib/signing/testing.d.ts.map +1 -1
- package/dist/lib/signing/testing.js +100 -5
- package/dist/lib/signing/testing.js.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +2 -0
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/types.d.ts +8 -0
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/agent-routing.d.ts +92 -0
- package/dist/lib/testing/storyboard/agent-routing.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/agent-routing.js +291 -0
- package/dist/lib/testing/storyboard/agent-routing.js.map +1 -0
- package/dist/lib/testing/storyboard/context.d.ts +22 -0
- package/dist/lib/testing/storyboard/context.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/context.js +35 -8
- package/dist/lib/testing/storyboard/context.js.map +1 -1
- package/dist/lib/testing/storyboard/default-invariants.js +6 -35
- package/dist/lib/testing/storyboard/default-invariants.js.map +1 -1
- package/dist/lib/testing/storyboard/index.d.ts +1 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/loader.js +84 -12
- package/dist/lib/testing/storyboard/loader.js.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/request-builder.js +14 -1
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts +17 -0
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +867 -144
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/types.d.ts +254 -12
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +65 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/validations.js +529 -2
- package/dist/lib/testing/storyboard/validations.js.map +1 -1
- package/dist/lib/testing/test-controller.d.ts +59 -1
- package/dist/lib/testing/test-controller.d.ts.map +1 -1
- package/dist/lib/testing/test-controller.js +30 -0
- package/dist/lib/testing/test-controller.js.map +1 -1
- package/dist/lib/testing/types.d.ts +14 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +299 -141
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +2 -2
- package/dist/lib/types/error-codes.d.ts +168 -108
- package/dist/lib/types/error-codes.d.ts.map +1 -1
- package/dist/lib/types/error-codes.js +23 -190
- package/dist/lib/types/error-codes.js.map +1 -1
- package/dist/lib/types/error-details.aliases.d.ts +48 -0
- package/dist/lib/types/error-details.aliases.d.ts.map +1 -0
- package/dist/lib/types/error-details.aliases.js +41 -0
- package/dist/lib/types/error-details.aliases.js.map +1 -0
- package/dist/lib/types/index.d.ts +14 -1
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js +4 -0
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/inline-enums.generated.d.ts +2 -4
- package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
- package/dist/lib/types/inline-enums.generated.js +10 -7
- package/dist/lib/types/inline-enums.generated.js.map +1 -1
- package/dist/lib/types/manifest.generated.d.ts +280 -0
- package/dist/lib/types/manifest.generated.d.ts.map +1 -0
- package/dist/lib/types/manifest.generated.js +339 -0
- package/dist/lib/types/manifest.generated.js.map +1 -0
- package/dist/lib/types/schemas.generated.d.ts +27229 -25160
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +584 -533
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +146 -21
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/types/v2-5/tools.generated.d.ts +48 -1
- package/dist/lib/types/v2-5/tools.generated.d.ts.map +1 -1
- package/dist/lib/upstream-recorder/index.d.ts +57 -0
- package/dist/lib/upstream-recorder/index.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/index.js +62 -0
- package/dist/lib/upstream-recorder/index.js.map +1 -0
- package/dist/lib/upstream-recorder/recorder.d.ts +35 -0
- package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/recorder.js +507 -0
- package/dist/lib/upstream-recorder/recorder.js.map +1 -0
- package/dist/lib/upstream-recorder/types.d.ts +365 -0
- package/dist/lib/upstream-recorder/types.d.ts.map +1 -0
- package/dist/lib/upstream-recorder/types.js +30 -0
- package/dist/lib/upstream-recorder/types.js.map +1 -0
- package/dist/lib/utils/capabilities.d.ts +66 -3
- package/dist/lib/utils/capabilities.d.ts.map +1 -1
- package/dist/lib/utils/capabilities.js +111 -3
- package/dist/lib/utils/capabilities.js.map +1 -1
- package/dist/lib/utils/error-extraction.d.ts +24 -0
- package/dist/lib/utils/error-extraction.d.ts.map +1 -1
- package/dist/lib/utils/error-extraction.js +0 -2
- package/dist/lib/utils/error-extraction.js.map +1 -1
- package/dist/lib/utils/format-render-builders.d.ts +2 -1
- package/dist/lib/utils/format-render-builders.d.ts.map +1 -1
- package/dist/lib/utils/format-render-builders.js +0 -23
- package/dist/lib/utils/format-render-builders.js.map +1 -1
- package/dist/lib/utils/glob.d.ts +28 -0
- package/dist/lib/utils/glob.d.ts.map +1 -0
- package/dist/lib/utils/glob.js +37 -0
- package/dist/lib/utils/glob.js.map +1 -0
- package/dist/lib/utils/redact-secrets.d.ts +37 -0
- package/dist/lib/utils/redact-secrets.d.ts.map +1 -0
- package/dist/lib/utils/redact-secrets.js +65 -0
- package/dist/lib/utils/redact-secrets.js.map +1 -0
- package/dist/lib/utils/tool-request-schemas.d.ts.map +1 -1
- package/dist/lib/utils/tool-request-schemas.js +1 -0
- package/dist/lib/utils/tool-request-schemas.js.map +1 -1
- package/dist/lib/validation/hints.d.ts +50 -0
- package/dist/lib/validation/hints.d.ts.map +1 -0
- package/dist/lib/validation/hints.js +194 -0
- package/dist/lib/validation/hints.js.map +1 -0
- package/dist/lib/validation/schema-errors.d.ts +2 -1
- package/dist/lib/validation/schema-errors.d.ts.map +1 -1
- package/dist/lib/validation/schema-errors.js +39 -4
- package/dist/lib/validation/schema-errors.js.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts +13 -0
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +20 -0
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/validation/schema-validator.d.ts +107 -2
- package/dist/lib/validation/schema-validator.d.ts.map +1 -1
- package/dist/lib/validation/schema-validator.js +205 -12
- package/dist/lib/validation/schema-validator.js.map +1 -1
- package/dist/lib/validation/sync-creatives.d.ts +30 -0
- package/dist/lib/validation/sync-creatives.d.ts.map +1 -1
- package/dist/lib/version.d.ts +7 -7
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +9 -5
- package/dist/lib/version.js.map +1 -1
- package/docs/guides/BUILD-AN-AGENT.md +267 -137
- package/docs/llms.txt +110 -55
- package/examples/CONTRIBUTING.md +173 -0
- package/examples/README.md +32 -0
- package/examples/comply-controller-seller.ts +9 -17
- package/examples/decisioning-platform-broadcast-tv.ts +3 -2
- package/examples/decisioning-platform-implicit-accounts.ts +168 -0
- package/examples/decisioning-platform-mock-seller.ts +3 -2
- package/examples/decisioning-platform-multi-tenant-db.ts +317 -0
- package/examples/decisioning-platform-programmatic.ts +3 -2
- package/examples/hello-cluster.ts +421 -0
- package/examples/hello_creative_adapter_template.ts +528 -0
- package/examples/hello_seller_adapter_guaranteed.ts +1080 -0
- package/examples/hello_seller_adapter_multi_tenant.ts +1046 -0
- package/examples/hello_seller_adapter_social.ts +829 -0
- package/examples/hello_signals_adapter_marketplace.ts +532 -0
- package/examples/seller-test-controller.ts +22 -28
- package/package.json +30 -3
- package/skills/SHAPE-GOTCHAS.md +233 -0
- package/skills/build-brand-rights-agent/SKILL.md +121 -16
- package/skills/build-creative-agent/SKILL.md +25 -1
- package/skills/build-decisioning-platform/advanced/MULTI-TENANT.md +104 -28
- package/skills/build-holdco-agent/SKILL.md +250 -0
- package/skills/build-seller-agent/SKILL.md +313 -49
- package/skills/build-seller-agent/specialisms/sales-broadcast-tv.md +2 -0
- package/skills/build-seller-agent/specialisms/sales-guaranteed.md +18 -0
- package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +2 -0
- package/skills/build-seller-agent/specialisms/sales-social.md +63 -2
- package/skills/build-signals-agent/SKILL.md +2 -0
- package/skills/call-adcp-agent.previous/SKILL.md +8 -86
- package/skills/run-by-experts/SKILL.md +116 -0
- package/skills/triage-storyboard-failure/SKILL.md +96 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/domains/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/brand/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/creative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/governance/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/creative-reception.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/signals/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/protocols/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/collection-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/content-standards/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-ad-server/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/generative-seller.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-generative/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/creative-template/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-aware-seller/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-delivery-monitor/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/governance-spend-authority/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/property-lists/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-broadcast-tv/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-catalog-driven/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-non-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/sales-proposal-mode/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/specialisms/signal-owned/index.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/acme-outdoor.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/bistro-oranje.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/nova-motors.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/osei-natural.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/signed-requests-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/substitution-observer-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/summit-foods.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-kits/webhook-receiver-runner.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/002-full-plan.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/README.md +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/canonicalization.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/README.md +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/keys.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/capability-discovery.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/collection-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/content-standards-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/deterministic-testing.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/error-compliance.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/fictional-entities.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-media-buys-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/get-signals-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/idempotency.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-creative-formats.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity-list-accounts.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/property-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/schema-validation.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/security.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/signed-requests.yaml +0 -0
- /package/compliance/cache/{3.0.1 → 3.0.5}/universal/webhook-emission.yaml +0 -0
|
@@ -17,6 +17,7 @@ exports.listStrictOnlyFailures = listStrictOnlyFailures;
|
|
|
17
17
|
exports.summarizeStrictValidation = summarizeStrictValidation;
|
|
18
18
|
exports.runStoryboardStep = runStoryboardStep;
|
|
19
19
|
exports.applyBrandInvariant = applyBrandInvariant;
|
|
20
|
+
exports.applyDisableSandboxHint = applyDisableSandboxHint;
|
|
20
21
|
exports.applyIdempotencyInvariant = applyIdempotencyInvariant;
|
|
21
22
|
exports.getFirstStepPreview = getFirstStepPreview;
|
|
22
23
|
const client_1 = require("../client");
|
|
@@ -28,6 +29,9 @@ const rejection_hints_1 = require("./rejection-hints");
|
|
|
28
29
|
const shape_drift_hints_1 = require("./shape-drift-hints");
|
|
29
30
|
const strict_validation_hints_1 = require("./strict-validation-hints");
|
|
30
31
|
const validations_1 = require("./validations");
|
|
32
|
+
const path_1 = require("./path");
|
|
33
|
+
const redact_secrets_1 = require("../../utils/redact-secrets");
|
|
34
|
+
const test_controller_1 = require("../test-controller");
|
|
31
35
|
const request_builder_1 = require("./request-builder");
|
|
32
36
|
const client_2 = require("../client");
|
|
33
37
|
const idempotency_1 = require("../../utils/idempotency");
|
|
@@ -39,6 +43,7 @@ const probe_dispatch_1 = require("./request-signing/probe-dispatch");
|
|
|
39
43
|
const webhook_receiver_1 = require("./webhook-receiver");
|
|
40
44
|
const webhook_assertions_1 = require("./webhook-assertions");
|
|
41
45
|
const seeding_1 = require("./seeding");
|
|
46
|
+
const agent_routing_1 = require("./agent-routing");
|
|
42
47
|
const types_1 = require("./types");
|
|
43
48
|
const assertions_1 = require("./assertions");
|
|
44
49
|
// ────────────────────────────────────────────────────────────
|
|
@@ -52,6 +57,7 @@ const SKIP_DETAILS = {
|
|
|
52
57
|
missing_test_controller: 'Skipped: deterministic_testing phase requires comply_test_controller, which the agent did not advertise.',
|
|
53
58
|
unsatisfied_contract: 'Skipped: test-kit contract is out of scope for this grading run.',
|
|
54
59
|
peer_branch_taken: 'Skipped: a peer branch in the same any_of branch set already contributed the aggregation flag.',
|
|
60
|
+
peer_substituted: 'Skipped: a same-phase peer step established equivalent state via `provides_state_for`.',
|
|
55
61
|
};
|
|
56
62
|
const CONTROLLER_SEEDING_FAILED_DETAIL = 'Skipped: pre-flight comply_test_controller seeding failed; the agent was not populated with the storyboard fixtures the remaining phases depend on.';
|
|
57
63
|
const OAUTH_NOT_ADVERTISED_DETAIL = 'Skipped: agent does not advertise OAuth — /.well-known/oauth-protected-resource returned 404 (RFC 9728 §3). API-key path must carry auth_mechanism_verified for this storyboard to pass.';
|
|
@@ -230,6 +236,170 @@ function applyBranchSetGrading(phases, phaseResults, branchSetByPhaseId, contrib
|
|
|
230
236
|
}
|
|
231
237
|
return { skippedDelta };
|
|
232
238
|
}
|
|
239
|
+
// ────────────────────────────────────────────────────────────
|
|
240
|
+
// task_completion. context_outputs path resolution
|
|
241
|
+
// ────────────────────────────────────────────────────────────
|
|
242
|
+
/** Marker prefix on `context_outputs.path` that opts a capture into the
|
|
243
|
+
* poll-tasks-get-for-the-completion-artifact resolution flow. The remainder
|
|
244
|
+
* of the path is resolved against the artifact's `data`, not the immediate
|
|
245
|
+
* submitted envelope. */
|
|
246
|
+
const TASK_COMPLETION_PATH_PREFIX = 'task_completion.';
|
|
247
|
+
/** Hard cap on how long the runner blocks one step waiting for a task to
|
|
248
|
+
* reach terminal state. Long enough to cover most HITL approval flows that
|
|
249
|
+
* are expected to complete inline; short enough that a stuck task surfaces
|
|
250
|
+
* the failure on the step that authored the dependency rather than the
|
|
251
|
+
* storyboard wall-clock budget. Override with `STORYBOARD_TASK_POLL_TIMEOUT_MS`. */
|
|
252
|
+
const TASK_COMPLETION_DEFAULT_TIMEOUT_MS = 30_000;
|
|
253
|
+
/** Per-poll cadence inside `pollTaskCompletion`. Scaled tight enough that
|
|
254
|
+
* short HITL flows complete in a couple of polls; the bound is still the
|
|
255
|
+
* outer timeout race. Override with `STORYBOARD_TASK_POLL_INTERVAL_MS`. */
|
|
256
|
+
const TASK_COMPLETION_DEFAULT_POLL_INTERVAL_MS = 1_500;
|
|
257
|
+
/** Defensive task_id pattern. AdCP doesn't constrain `task_id` shape on the
|
|
258
|
+
* wire, but unbounded strings are an SSRF / log-injection lever — we cap
|
|
259
|
+
* the length and reject control characters before the value reaches the
|
|
260
|
+
* SDK's tasks/get JSON-RPC param. */
|
|
261
|
+
const TASK_ID_MAX_LEN = 256;
|
|
262
|
+
// eslint-disable-next-line no-control-regex -- intentional: reject control chars in task_id
|
|
263
|
+
const TASK_ID_CONTROL_CHAR_RE = /[\x00-\x1F\x7F]/;
|
|
264
|
+
/** Non-terminal task statuses that carry a `task_id` and warrant polling
|
|
265
|
+
* the artifact for `task_completion.<inner>` captures. Per the AdCP
|
|
266
|
+
* `tasks-get-response.json` enum, all three are explicitly non-terminal:
|
|
267
|
+
* `submitted` (HITL or async-signed-IO), `working` ("expect completion
|
|
268
|
+
* within 120 seconds"), and `input-required` (waiting on the buyer to
|
|
269
|
+
* supply additional info — relevant when the storyboard test harness
|
|
270
|
+
* satisfies the input requirement). The 30s default poll timeout still
|
|
271
|
+
* bounds the worst case for storyboards that test these arms directly. */
|
|
272
|
+
const POLL_ELIGIBLE_STATUSES = new Set(['submitted', 'working', 'input-required']);
|
|
273
|
+
function isPollEligibleEnvelope(data) {
|
|
274
|
+
if (data == null || typeof data !== 'object')
|
|
275
|
+
return false;
|
|
276
|
+
const obj = data;
|
|
277
|
+
return (typeof obj.status === 'string' &&
|
|
278
|
+
POLL_ELIGIBLE_STATUSES.has(obj.status) &&
|
|
279
|
+
typeof obj.task_id === 'string' &&
|
|
280
|
+
obj.task_id.length > 0);
|
|
281
|
+
}
|
|
282
|
+
function isValidTaskId(taskId) {
|
|
283
|
+
if (taskId.length === 0 || taskId.length > TASK_ID_MAX_LEN)
|
|
284
|
+
return false;
|
|
285
|
+
if (TASK_ID_CONTROL_CHAR_RE.test(taskId))
|
|
286
|
+
return false;
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
289
|
+
function remapTaskCompletionOutputs(outputs) {
|
|
290
|
+
return outputs.map(o => {
|
|
291
|
+
if (typeof o.path === 'string' && o.path.startsWith(TASK_COMPLETION_PATH_PREFIX)) {
|
|
292
|
+
return { ...o, path: o.path.slice(TASK_COMPLETION_PATH_PREFIX.length) };
|
|
293
|
+
}
|
|
294
|
+
return o;
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
async function resolveTaskCompletionOutputs(taskResult, outputs, client, webhookReceiver) {
|
|
298
|
+
const hasTaskCompletionPath = outputs.some(o => typeof o.path === 'string' && o.path.startsWith(TASK_COMPLETION_PATH_PREFIX));
|
|
299
|
+
if (!hasTaskCompletionPath)
|
|
300
|
+
return { attempted: false };
|
|
301
|
+
if (!taskResult || !isPollEligibleEnvelope(taskResult.data))
|
|
302
|
+
return { attempted: false };
|
|
303
|
+
const taskId = taskResult.data.task_id;
|
|
304
|
+
if (!isValidTaskId(taskId))
|
|
305
|
+
return { attempted: false };
|
|
306
|
+
const timeoutMs = readEnvIntOrDefault(process.env['STORYBOARD_TASK_POLL_TIMEOUT_MS'], TASK_COMPLETION_DEFAULT_TIMEOUT_MS);
|
|
307
|
+
const pollIntervalMs = readEnvIntOrDefault(process.env['STORYBOARD_TASK_POLL_INTERVAL_MS'], TASK_COMPLETION_DEFAULT_POLL_INTERVAL_MS);
|
|
308
|
+
// The SDK's `pollTaskCompletion` lives on the executor — accessed via the
|
|
309
|
+
// SingleAgentClient instance the storyboard runner created in
|
|
310
|
+
// `getOrCreateClient`. The runner historically uses `client: any` for
|
|
311
|
+
// dynamic dispatch (see task-map.ts:80) so this cast doesn't widen
|
|
312
|
+
// existing surface.
|
|
313
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- dynamic SDK access
|
|
314
|
+
const dynamicClient = client;
|
|
315
|
+
const executor = dynamicClient?.executor;
|
|
316
|
+
const agent = dynamicClient?.agent;
|
|
317
|
+
const canPoll = !!(executor?.pollTaskCompletion && agent);
|
|
318
|
+
const canWebhook = !!webhookReceiver;
|
|
319
|
+
if (!canPoll && !canWebhook)
|
|
320
|
+
return { attempted: false };
|
|
321
|
+
const racers = [];
|
|
322
|
+
// Poll path. Note: when the outer race resolves first, the SDK's
|
|
323
|
+
// `pollTaskCompletion` keeps polling internally until it observes a
|
|
324
|
+
// terminal state. The runner's outer timeout is enough to bound the
|
|
325
|
+
// *step* duration; the inner loop continuation is a known limitation
|
|
326
|
+
// pending an AbortSignal addition to the SDK.
|
|
327
|
+
if (canPoll) {
|
|
328
|
+
racers.push(executor.pollTaskCompletion(agent, taskId, pollIntervalMs).then((result) => ({
|
|
329
|
+
kind: 'poll',
|
|
330
|
+
result,
|
|
331
|
+
})));
|
|
332
|
+
}
|
|
333
|
+
// Webhook path. Per `tasks-get-response.json`, sellers MAY use webhook-
|
|
334
|
+
// only HITL completion (no polling). When a `--webhook-receiver` is
|
|
335
|
+
// active, race the receiver's `wait` (filtered by `task_id`) against
|
|
336
|
+
// the poll. The webhook payload's `result` field is the artifact's
|
|
337
|
+
// `data` (per the framework's task webhook payload shape, mirroring
|
|
338
|
+
// the HITL completion shape from `from-platform.ts`).
|
|
339
|
+
//
|
|
340
|
+
// Note: `webhook.wait` keeps an internal `setTimeout(timeout_ms)` that
|
|
341
|
+
// we can't cancel from here. When the poll wins or the outer timeout
|
|
342
|
+
// fires first, that internal timer continues until `timeout_ms`
|
|
343
|
+
// elapses. Acceptable because the receiver is process-scoped (closed
|
|
344
|
+
// on storyboard exit) and runner-owned receivers aren't injected.
|
|
345
|
+
if (webhookReceiver) {
|
|
346
|
+
racers.push(webhookReceiver
|
|
347
|
+
.wait({ body: { task_id: taskId } }, timeoutMs)
|
|
348
|
+
.then((result) => ({ kind: 'webhook', result })));
|
|
349
|
+
}
|
|
350
|
+
let timer;
|
|
351
|
+
const timeoutRacer = new Promise(resolve => {
|
|
352
|
+
timer = setTimeout(() => resolve({ kind: 'timeout' }), timeoutMs);
|
|
353
|
+
// Don't keep the event loop alive on this handle — the runner's
|
|
354
|
+
// wall-clock budget is already enforced by the storyboard runner
|
|
355
|
+
// shell, and a hung task shouldn't delay process exit by `timeoutMs`.
|
|
356
|
+
timer.unref?.();
|
|
357
|
+
});
|
|
358
|
+
racers.push(timeoutRacer);
|
|
359
|
+
try {
|
|
360
|
+
const winner = await Promise.race(racers);
|
|
361
|
+
if (winner.kind === 'timeout') {
|
|
362
|
+
return { attempted: true, timedOut: true, pollTimeoutMs: timeoutMs };
|
|
363
|
+
}
|
|
364
|
+
if (winner.kind === 'poll') {
|
|
365
|
+
const polled = winner.result;
|
|
366
|
+
if (polled.success === false)
|
|
367
|
+
return { attempted: true, taskFailed: true };
|
|
368
|
+
return { attempted: true, data: polled.data };
|
|
369
|
+
}
|
|
370
|
+
// Webhook win.
|
|
371
|
+
const waitResult = winner.result;
|
|
372
|
+
if (waitResult.timed_out) {
|
|
373
|
+
return { attempted: true, timedOut: true, pollTimeoutMs: timeoutMs };
|
|
374
|
+
}
|
|
375
|
+
const webhookBody = waitResult.webhook.body;
|
|
376
|
+
// Fail-closed on the success path: require `status === 'completed'`.
|
|
377
|
+
// The framework's `buildTaskWebhookPayload` always emits `status`, so a
|
|
378
|
+
// missing or non-completed value means either a malformed webhook or a
|
|
379
|
+
// genuine terminal-failed/canceled/rejected outcome — both should
|
|
380
|
+
// attribute to `capture_task_failed`, not silently fall through to a
|
|
381
|
+
// capture against an undefined `result`.
|
|
382
|
+
if (webhookBody?.status === 'completed') {
|
|
383
|
+
return { attempted: true, data: webhookBody.result };
|
|
384
|
+
}
|
|
385
|
+
return { attempted: true, taskFailed: true };
|
|
386
|
+
}
|
|
387
|
+
catch {
|
|
388
|
+
return { attempted: true, taskFailed: true };
|
|
389
|
+
}
|
|
390
|
+
finally {
|
|
391
|
+
if (timer)
|
|
392
|
+
clearTimeout(timer);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function readEnvIntOrDefault(value, fallback) {
|
|
396
|
+
if (!value)
|
|
397
|
+
return fallback;
|
|
398
|
+
const parsed = Number.parseInt(value, 10);
|
|
399
|
+
if (!Number.isFinite(parsed) || parsed <= 0)
|
|
400
|
+
return fallback;
|
|
401
|
+
return parsed;
|
|
402
|
+
}
|
|
233
403
|
function extractionFromTaskResult(taskResult) {
|
|
234
404
|
if (!taskResult)
|
|
235
405
|
return { path: 'none' };
|
|
@@ -242,16 +412,8 @@ function extractionFromTaskResult(taskResult) {
|
|
|
242
412
|
return { path: 'error' };
|
|
243
413
|
return taskResult.data !== undefined && taskResult.data !== null ? { path: 'structured_content' } : { path: 'none' };
|
|
244
414
|
}
|
|
245
|
-
/**
|
|
246
|
-
* Keys whose values must never appear verbatim in a compliance report.
|
|
247
|
-
* Matching is case-insensitive and structural: any property whose final
|
|
248
|
-
* path segment matches is replaced with `'[redacted]'` before the payload
|
|
249
|
-
* is persisted on a step result. The contract spec calls for exactly this:
|
|
250
|
-
* "Secrets SHOULD be redacted with the literal string '[redacted]'".
|
|
251
|
-
*/
|
|
252
|
-
const SECRET_KEY_PATTERN = /^(authorization|credentials?|token|api[_-]?key|password|secret|client[_-]secret|refresh[_-]token|access[_-]token|bearer|session[_-]token|session[_-]id|offering[_-]token|cookie|set[_-]cookie)$/i;
|
|
253
415
|
function __redactSecretsForTest(value) {
|
|
254
|
-
return redactSecrets(value);
|
|
416
|
+
return (0, redact_secrets_1.redactSecrets)(value);
|
|
255
417
|
}
|
|
256
418
|
function __filterResponseHeadersForTest(headers) {
|
|
257
419
|
return filterResponseHeaders(headers);
|
|
@@ -259,23 +421,6 @@ function __filterResponseHeadersForTest(headers) {
|
|
|
259
421
|
function __defaultAuthHeadersForRawProbeForTest(options) {
|
|
260
422
|
return defaultAuthHeadersForRawProbe(options);
|
|
261
423
|
}
|
|
262
|
-
function redactSecrets(value, depth = 0) {
|
|
263
|
-
if (depth > 32)
|
|
264
|
-
return value; // cheap cycle guard
|
|
265
|
-
if (Array.isArray(value))
|
|
266
|
-
return value.map(v => redactSecrets(v, depth + 1));
|
|
267
|
-
if (value && typeof value === 'object') {
|
|
268
|
-
const out = {};
|
|
269
|
-
for (const [k, v] of Object.entries(value)) {
|
|
270
|
-
out[k] =
|
|
271
|
-
SECRET_KEY_PATTERN.test(k) && (typeof v === 'string' || typeof v === 'number')
|
|
272
|
-
? '[redacted]'
|
|
273
|
-
: redactSecrets(v, depth + 1);
|
|
274
|
-
}
|
|
275
|
-
return out;
|
|
276
|
-
}
|
|
277
|
-
return value;
|
|
278
|
-
}
|
|
279
424
|
/**
|
|
280
425
|
* Response headers to echo on a RunnerResponseRecord. Everything else is
|
|
281
426
|
* dropped — agents can (and do) include `set-cookie`, echoed `authorization`,
|
|
@@ -326,8 +471,15 @@ async function runStoryboard(agentUrlOrUrls, storyboard, options = {}) {
|
|
|
326
471
|
// fired, and the runtime's grading depends on the invariants holding.
|
|
327
472
|
// `validateStoryboardShape` is idempotent so the double-pass is safe.
|
|
328
473
|
(0, loader_1.validateStoryboardShape)(storyboard);
|
|
474
|
+
// Per-specialism routing (#1066). Mutually exclusive with replica-array
|
|
475
|
+
// dispatch and `_client`. Validate the shape of `options.agents` here so
|
|
476
|
+
// misconfigured callers fail fast with a clear error rather than getting
|
|
477
|
+
// silently routed to the first URL or a stale single-agent client.
|
|
478
|
+
if (options.agents !== undefined) {
|
|
479
|
+
validateAgentsMap(agentUrlOrUrls, storyboard, options);
|
|
480
|
+
}
|
|
329
481
|
const agentUrls = Array.isArray(agentUrlOrUrls) ? agentUrlOrUrls : [agentUrlOrUrls];
|
|
330
|
-
if (agentUrls.length === 0) {
|
|
482
|
+
if (!options.agents && agentUrls.length === 0) {
|
|
331
483
|
throw new Error('runStoryboard: at least one agent URL required');
|
|
332
484
|
}
|
|
333
485
|
const isMultiInstance = agentUrls.length > 1;
|
|
@@ -350,8 +502,94 @@ async function runStoryboard(agentUrlOrUrls, storyboard, options = {}) {
|
|
|
350
502
|
}
|
|
351
503
|
return runMultiPass(agentUrls, storyboard, options);
|
|
352
504
|
}
|
|
505
|
+
if (options.agents) {
|
|
506
|
+
// Project the agents map's URLs into the legacy `agentUrls` array so
|
|
507
|
+
// downstream signatures (per-step `agent_url:` records, etc.) keep
|
|
508
|
+
// working unchanged. The routing dispatcher inside
|
|
509
|
+
// `executeStoryboardPass` reads `options.agents` directly for the
|
|
510
|
+
// actual per-tool routing.
|
|
511
|
+
const projected = Object.values(options.agents).map(e => e.url);
|
|
512
|
+
return executeStoryboardPass(projected, storyboard, options, 0);
|
|
513
|
+
}
|
|
353
514
|
return executeStoryboardPass(agentUrls, storyboard, options, 0);
|
|
354
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* Validate the shape and consistency of `StoryboardRunOptions.agents` (#1066).
|
|
518
|
+
*
|
|
519
|
+
* Catches the failure modes that would otherwise surface as confusing
|
|
520
|
+
* runtime errors deep inside discovery or dispatch:
|
|
521
|
+
*
|
|
522
|
+
* - empty map
|
|
523
|
+
* - `default_agent` referencing an unknown key
|
|
524
|
+
* - `step.agent` referencing an unknown key
|
|
525
|
+
* - co-existence with `multi_instance_strategy` (replicas, different concept)
|
|
526
|
+
* - co-existence with `_client` (single client cannot serve multiple agents)
|
|
527
|
+
* - first positional arg passed alongside the map (ambiguous routing intent)
|
|
528
|
+
*/
|
|
529
|
+
function validateAgentsMap(agentUrlOrUrls, storyboard, options) {
|
|
530
|
+
const agents = options.agents;
|
|
531
|
+
const keys = Object.keys(agents);
|
|
532
|
+
if (keys.length === 0) {
|
|
533
|
+
throw new Error('runStoryboard: `agents` is set but contains no entries. ' + 'Either remove the key or supply at least one agent.');
|
|
534
|
+
}
|
|
535
|
+
for (const key of keys) {
|
|
536
|
+
const entry = agents[key];
|
|
537
|
+
if (!entry || typeof entry.url !== 'string' || entry.url === '') {
|
|
538
|
+
throw new Error(`runStoryboard: agents['${key}'] missing a non-empty \`url\`. ` + 'Each entry must declare its endpoint URL.');
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (options.default_agent !== undefined && !(options.default_agent in agents)) {
|
|
542
|
+
throw new Error(`runStoryboard: \`default_agent\` "${options.default_agent}" is not a key in \`agents\`. ` +
|
|
543
|
+
`Available keys: ${keys.join(', ')}.`);
|
|
544
|
+
}
|
|
545
|
+
// Per-step `agent:` overrides must reference an agent that's actually in
|
|
546
|
+
// the map. Walk the storyboard once at entry so authoring errors surface
|
|
547
|
+
// before the first network call.
|
|
548
|
+
for (const phase of storyboard.phases ?? []) {
|
|
549
|
+
for (const step of phase.steps ?? []) {
|
|
550
|
+
if (step.agent !== undefined && !(step.agent in agents)) {
|
|
551
|
+
throw new Error(`runStoryboard: step "${step.id}" declares \`agent: "${step.agent}"\` but ` +
|
|
552
|
+
`that key is not in the agents map. Available keys: ${keys.join(', ')}.`);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
if (options.multi_instance_strategy !== undefined) {
|
|
557
|
+
throw new Error('runStoryboard: `agents` (per-specialism routing) is incompatible with ' +
|
|
558
|
+
'`multi_instance_strategy` (replica round-robin). They are different concepts — ' +
|
|
559
|
+
'replicas test horizontal scaling of one agent, the agents map routes per tool ' +
|
|
560
|
+
'across different agents. Use one or the other.');
|
|
561
|
+
}
|
|
562
|
+
if (options._client) {
|
|
563
|
+
throw new Error('runStoryboard: `agents` is incompatible with `_client` override. ' +
|
|
564
|
+
'A single client cannot serve multiple agents; per-agent clients are ' +
|
|
565
|
+
'constructed from the map.');
|
|
566
|
+
}
|
|
567
|
+
// Controller seeding (`prerequisites.controller_seeding: true`) currently
|
|
568
|
+
// dispatches against the FIRST per-agent client only, which works for
|
|
569
|
+
// single-tenant runs but is the wrong shape under routed mode: a
|
|
570
|
+
// cross-specialism storyboard's `fixtures:` block typically declares
|
|
571
|
+
// seeds owned by different tenants (e.g., `seed_product` for sales,
|
|
572
|
+
// `seed_signal_provider` for signals). Per-tenant seed dispatch is a
|
|
573
|
+
// larger change tracked separately. Until that lands, fail-fast and
|
|
574
|
+
// tell the operator to seed each tenant out-of-band and pass
|
|
575
|
+
// `skip_controller_seeding: true`.
|
|
576
|
+
if (storyboard.prerequisites?.controller_seeding === true && options.skip_controller_seeding !== true) {
|
|
577
|
+
throw new Error('runStoryboard: `agents` + `prerequisites.controller_seeding: true` is not yet supported. ' +
|
|
578
|
+
'Controller seeding currently targets a single tenant; cross-tenant seed routing is a ' +
|
|
579
|
+
'follow-up. Pre-seed each tenant out-of-band and pass `skip_controller_seeding: true` to ' +
|
|
580
|
+
'opt out of the runner-side seeding loop.');
|
|
581
|
+
}
|
|
582
|
+
// First positional arg must be empty when `agents` is set. Allowing a
|
|
583
|
+
// non-empty value is ambiguous: is the map authoritative, or is the
|
|
584
|
+
// positional arg a hidden default? Reject and require the caller to
|
|
585
|
+
// express intent through `agents` + `default_agent`.
|
|
586
|
+
const firstArgEmpty = agentUrlOrUrls === '' || (Array.isArray(agentUrlOrUrls) && agentUrlOrUrls.length === 0);
|
|
587
|
+
if (!firstArgEmpty) {
|
|
588
|
+
throw new Error('runStoryboard: pass `""` (or `[]`) as the first argument when using ' +
|
|
589
|
+
'`options.agents`. The agents map is authoritative for routing; mixing ' +
|
|
590
|
+
'a positional URL with the map is ambiguous.');
|
|
591
|
+
}
|
|
592
|
+
}
|
|
355
593
|
/**
|
|
356
594
|
* Build a minimal StoryboardResult for a storyboard skipped by a
|
|
357
595
|
* `requires_capability` predicate. The single synthetic step carries
|
|
@@ -529,40 +767,87 @@ function buildRequiredToolsMissingResult(agentUrls, storyboard, detail) {
|
|
|
529
767
|
async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOffset, preSeeded) {
|
|
530
768
|
const start = Date.now();
|
|
531
769
|
const isMultiInstance = agentUrls.length > 1;
|
|
532
|
-
|
|
533
|
-
//
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
// is sufficient. For multi-instance runs, skipping N-1 redundant
|
|
538
|
-
// get_agent_info calls also keeps CI output clean.
|
|
770
|
+
const useRouting = options.agents !== undefined;
|
|
771
|
+
// Per-specialism routing builds its own clients + per-agent discovery; the
|
|
772
|
+
// legacy single/multi-instance path discovers against the first replica.
|
|
773
|
+
let clients;
|
|
774
|
+
let routingContext;
|
|
539
775
|
let profile;
|
|
540
|
-
if (
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
776
|
+
if (useRouting) {
|
|
777
|
+
try {
|
|
778
|
+
routingContext = await (0, agent_routing_1.buildRoutingContext)(storyboard, options);
|
|
779
|
+
}
|
|
780
|
+
catch (err) {
|
|
781
|
+
const detail = err?.message ?? String(err);
|
|
782
|
+
const failedStep = {
|
|
783
|
+
step: err instanceof agent_routing_1.DiscoveryFailure
|
|
784
|
+
? `Discover agent capabilities (${err.agentKey})`
|
|
785
|
+
: 'Build agent routing index',
|
|
786
|
+
passed: false,
|
|
787
|
+
duration_ms: 0,
|
|
788
|
+
error: detail,
|
|
789
|
+
};
|
|
549
790
|
if (!options._client)
|
|
550
791
|
await (0, protocols_1.closeConnections)(options.protocol);
|
|
551
|
-
return buildDiscoveryFailedResult(agentUrls, storyboard,
|
|
792
|
+
return buildDiscoveryFailedResult(agentUrls, storyboard, failedStep);
|
|
552
793
|
}
|
|
553
|
-
|
|
554
|
-
//
|
|
555
|
-
//
|
|
556
|
-
//
|
|
557
|
-
|
|
558
|
-
|
|
794
|
+
clients = [...routingContext.clients.values()];
|
|
795
|
+
// Pick the first agent's profile as the "primary" for downstream code
|
|
796
|
+
// that reads single-profile fields (library_version on per-step result
|
|
797
|
+
// records, raw_capabilities for `requires_capability`). Per-step
|
|
798
|
+
// accuracy across N agents is a follow-up; today's storyboards that
|
|
799
|
+
// use `requires_capability` are single-tenant authored.
|
|
800
|
+
profile = [...routingContext.profiles.values()][0];
|
|
801
|
+
// For `required_tools` gating, union every agent's advertised tools so
|
|
802
|
+
// a storyboard that needs ≥1 of [sync_governance, activate_signal]
|
|
803
|
+
// passes the gate when any tenant in the map serves either one.
|
|
804
|
+
const unionedTools = new Set();
|
|
805
|
+
for (const p of routingContext.profiles.values()) {
|
|
806
|
+
for (const t of p.tools ?? [])
|
|
807
|
+
unionedTools.add(t);
|
|
808
|
+
}
|
|
809
|
+
if (!options.agentTools) {
|
|
810
|
+
options = { ...options, agentTools: [...unionedTools], _profile: profile };
|
|
559
811
|
}
|
|
560
812
|
else if (profile && !options._profile) {
|
|
561
813
|
options = { ...options, _profile: profile };
|
|
562
814
|
}
|
|
563
815
|
}
|
|
564
816
|
else {
|
|
565
|
-
|
|
817
|
+
// Build one client per URL. In single-URL mode `_client` (from comply()) is
|
|
818
|
+
// honored so the shared MCP transport is reused across storyboards.
|
|
819
|
+
clients = agentUrls.map(url => (0, client_1.getOrCreateClient)(url, options));
|
|
820
|
+
// Discover agent profile against the first instance; all instances are
|
|
821
|
+
// expected to run the same code behind a shared state store, so one probe
|
|
822
|
+
// is sufficient. For multi-instance runs, skipping N-1 redundant
|
|
823
|
+
// get_agent_info calls also keeps CI output clean.
|
|
824
|
+
if (!options._client) {
|
|
825
|
+
const discovered = await (0, client_1.getOrDiscoverProfile)(clients[0], options);
|
|
826
|
+
// Discovery failure must surface as a HARD STORYBOARD FAILURE, not a
|
|
827
|
+
// silent empty `agentTools: []` that lets every step skip with
|
|
828
|
+
// `missing_tool`. The latter mode produces "X/X clean" summaries with
|
|
829
|
+
// 100% skipped — invisible CI failure when transport setup is broken
|
|
830
|
+
// (auth misconfig, MCP transport-fallback bugs, network policy, etc.).
|
|
831
|
+
// See: https://github.com/adcontextprotocol/adcp-client/issues/...
|
|
832
|
+
if (discovered.step.passed === false) {
|
|
833
|
+
if (!options._client)
|
|
834
|
+
await (0, protocols_1.closeConnections)(options.protocol);
|
|
835
|
+
return buildDiscoveryFailedResult(agentUrls, storyboard, discovered.step);
|
|
836
|
+
}
|
|
837
|
+
profile = discovered.profile;
|
|
838
|
+
// Populate agentTools and _profile from discovered profile if not already set.
|
|
839
|
+
// _profile is threaded into executeStep so capability-based skip gates
|
|
840
|
+
// (e.g. account-mode branching) can read raw_capabilities at step time.
|
|
841
|
+
if (!options.agentTools && profile?.tools) {
|
|
842
|
+
options = { ...options, agentTools: profile.tools, _profile: profile };
|
|
843
|
+
}
|
|
844
|
+
else if (profile && !options._profile) {
|
|
845
|
+
options = { ...options, _profile: profile };
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
else {
|
|
849
|
+
profile = options._profile;
|
|
850
|
+
}
|
|
566
851
|
}
|
|
567
852
|
// Evaluate requires_capability predicate before any phase setup.
|
|
568
853
|
// When the agent explicitly declared it doesn't support what this storyboard
|
|
@@ -624,23 +909,31 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
624
909
|
const priorProbes = new Map();
|
|
625
910
|
const contextProvenance = new Map();
|
|
626
911
|
const priorA2aEnvelopes = new Map();
|
|
912
|
+
const stepRequestStarts = new Map();
|
|
627
913
|
const phaseResults = [];
|
|
628
914
|
let passedCount = 0;
|
|
629
915
|
let failedCount = 0;
|
|
630
916
|
let skippedCount = 0;
|
|
631
|
-
|
|
632
|
-
//
|
|
633
|
-
//
|
|
634
|
-
//
|
|
635
|
-
|
|
636
|
-
//
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
917
|
+
const phaseStatefulCascades = new Map();
|
|
918
|
+
// Phase IDs in declaration order, accumulated as we iterate so the
|
|
919
|
+
// default `depends_on` resolution ("all prior phases") doesn't re-scan
|
|
920
|
+
// the storyboard. Phases push their own id at end-of-phase.
|
|
921
|
+
const priorPhaseIds = [];
|
|
922
|
+
// Helpers for per-phase cascade state.
|
|
923
|
+
const effectiveDependsOn = (phase, prior) => phase.depends_on ?? prior;
|
|
924
|
+
const cascadeForPhase = (phase, prior) => {
|
|
925
|
+
// Within-phase cascade always counts — stateful steps later in this
|
|
926
|
+
// phase depend on state from stateful steps earlier in this phase.
|
|
927
|
+
if (phaseStatefulCascades.has(phase.id)) {
|
|
928
|
+
return { tripped: true, trigger: phaseStatefulCascades.get(phase.id) ?? null };
|
|
929
|
+
}
|
|
930
|
+
for (const depId of effectiveDependsOn(phase, prior)) {
|
|
931
|
+
if (phaseStatefulCascades.has(depId)) {
|
|
932
|
+
return { tripped: true, trigger: phaseStatefulCascades.get(depId) ?? null };
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
return { tripped: false };
|
|
936
|
+
};
|
|
644
937
|
// Step results whose failures the main loop added to failedCount. The
|
|
645
938
|
// branch-set post-pass decrements only for entries that were actually
|
|
646
939
|
// counted, so an optional phase that hit `presenceDetected` (a PRM 2xx
|
|
@@ -671,8 +964,13 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
671
964
|
const allSteps = flattenSteps(storyboard);
|
|
672
965
|
// Inner passes always dispatch round-robin; only the outer runMultiPass
|
|
673
966
|
// caller knows about the multi-pass strategy. This keeps createDispatcher's
|
|
674
|
-
// strategy parameter narrow.
|
|
675
|
-
|
|
967
|
+
// strategy parameter narrow. Per-specialism routing (#1066) takes the
|
|
968
|
+
// routing dispatcher path, which reads `options.agents` directly and
|
|
969
|
+
// ignores `agentUrls` ordering for selection (still uses URL list for
|
|
970
|
+
// result-record `agent_url:` echo).
|
|
971
|
+
const dispatch = routingContext && options.agents
|
|
972
|
+
? createRoutingDispatcher(routingContext, options, options.agents)
|
|
973
|
+
: createDispatcher(agentUrls, clients, 'round-robin', dispatchOffset);
|
|
676
974
|
// Resolve cross-step assertions declared on `storyboard.invariants`.
|
|
677
975
|
// `resolveAssertions` throws on unknown ids — fail fast here rather than
|
|
678
976
|
// silently skip, since a missing assertion means unknown conformance gaps.
|
|
@@ -816,10 +1114,12 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
816
1114
|
// Path (2): index of declared substitutions for this phase. Map keys
|
|
817
1115
|
// are target step IDs (the steps being substituted FOR); values are the
|
|
818
1116
|
// step IDs that declared the substitution. Built once per phase from
|
|
819
|
-
// each step's `
|
|
1117
|
+
// each step's `provides_state_for` field (or the deprecated
|
|
1118
|
+
// `peer_substitutes_for` synonym; the loader normalizes both onto
|
|
1119
|
+
// `provides_state_for` at parse time, so reading either works).
|
|
820
1120
|
const phaseSubstitutes = new Map();
|
|
821
1121
|
for (const declaringStep of phase.steps) {
|
|
822
|
-
const decl = declaringStep.peer_substitutes_for;
|
|
1122
|
+
const decl = declaringStep.provides_state_for ?? declaringStep.peer_substitutes_for;
|
|
823
1123
|
if (decl === undefined)
|
|
824
1124
|
continue;
|
|
825
1125
|
const targets = Array.isArray(decl) ? decl : [decl];
|
|
@@ -836,9 +1136,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
836
1136
|
// references the leftmost step.
|
|
837
1137
|
let phasePendingMissingTool = null;
|
|
838
1138
|
// Targets actually rescued by a passing declared substitute. Populated
|
|
839
|
-
// when a step with `
|
|
840
|
-
// declaration list
|
|
1139
|
+
// when a step with `provides_state_for: X` (or the deprecated synonym
|
|
1140
|
+
// `peer_substitutes_for: X`) passes — every X in its declaration list
|
|
1141
|
+
// lands here.
|
|
841
1142
|
const phaseRescuedTargets = new Set();
|
|
1143
|
+
// Map from rescued target id → the substitute step id that rescued it.
|
|
1144
|
+
// Populated when the substitute passes; consumed at phase end to format
|
|
1145
|
+
// the spec-mandated `peer_substituted` detail string. First substitute
|
|
1146
|
+
// wins if multiple peers cover the same target.
|
|
1147
|
+
const phaseRescueSource = new Map();
|
|
842
1148
|
// Stateful step IDs in the phase. Used at phase end to decide whether
|
|
843
1149
|
// a deferred not_applicable trigger should cascade: if the sole stateful
|
|
844
1150
|
// step in the phase returned not_applicable AND there were no peers that
|
|
@@ -940,12 +1246,18 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
940
1246
|
// reason is `missing_tool` (a benign, passed: true skip) —
|
|
941
1247
|
// not `prerequisite_failed` (a failed skip). This distinguishes
|
|
942
1248
|
// "this agent has a real setup bug" from "this agent doesn't
|
|
943
|
-
// claim this surface, by design" (adcp-client#1169).
|
|
1249
|
+
// claim this surface, by design" (adcp-client#1169 / #1171).
|
|
944
1250
|
//
|
|
945
1251
|
// Uses resolveTaskName so that $test_kit.* steps are checked
|
|
946
1252
|
// against the resolved concrete task name, not the template
|
|
947
1253
|
// string (which would never be in agentTools).
|
|
948
|
-
|
|
1254
|
+
//
|
|
1255
|
+
// Per-phase cascade scoping (#1161): consults `phase.depends_on`
|
|
1256
|
+
// (default: all prior phases) plus the current phase's own
|
|
1257
|
+
// within-phase cascade state. Replaces the storyboard-scope
|
|
1258
|
+
// `statefulFailed` boolean.
|
|
1259
|
+
const cascade = step.stateful ? cascadeForPhase(phase, priorPhaseIds) : { tripped: false };
|
|
1260
|
+
if (cascade.tripped && step.stateful) {
|
|
949
1261
|
const resolvedTask = resolveTaskName(step, options);
|
|
950
1262
|
if (options.agentTools && resolvedTask && !options.agentTools.includes(resolvedTask)) {
|
|
951
1263
|
const toolDetail = `Agent did not advertise tool "${resolvedTask}"; agent tools: [${options.agentTools.join(', ')}].`;
|
|
@@ -969,10 +1281,11 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
969
1281
|
skippedCount++;
|
|
970
1282
|
continue;
|
|
971
1283
|
}
|
|
972
|
-
const
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1284
|
+
const trigger = cascade.trigger;
|
|
1285
|
+
const detail = trigger
|
|
1286
|
+
? trigger.substitution_chain
|
|
1287
|
+
? `Skipped: prior stateful step "${trigger.stepId}" skipped (${trigger.reason}); ${trigger.substitution_chain}; state never materialized.`
|
|
1288
|
+
: `Skipped: prior stateful step "${trigger.stepId}" skipped (${trigger.reason}); state never materialized.`
|
|
976
1289
|
: 'Skipped: prior stateful step failed.';
|
|
977
1290
|
stepResults.push({
|
|
978
1291
|
storyboard_id: storyboard.id,
|
|
@@ -994,7 +1307,38 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
994
1307
|
phasePassed = false;
|
|
995
1308
|
continue;
|
|
996
1309
|
}
|
|
997
|
-
|
|
1310
|
+
let assignment;
|
|
1311
|
+
try {
|
|
1312
|
+
assignment = dispatch.nextFor(step);
|
|
1313
|
+
}
|
|
1314
|
+
catch (err) {
|
|
1315
|
+
// Routing failures land here when no agent in the map serves a
|
|
1316
|
+
// step's tool's protocol. Build-time conflict detection already
|
|
1317
|
+
// catches the multi-claim case, so this branch covers genuine
|
|
1318
|
+
// coverage gaps (storyboard authored a tool the topology can't
|
|
1319
|
+
// serve) and unmapped tools without a `default_agent`. Render as
|
|
1320
|
+
// a failed step with the routing error verbatim so the report
|
|
1321
|
+
// tells the operator exactly what's missing.
|
|
1322
|
+
const detail = err instanceof agent_routing_1.RoutingError ? err.message : (err?.message ?? String(err));
|
|
1323
|
+
const failed = {
|
|
1324
|
+
storyboard_id: storyboard.id,
|
|
1325
|
+
step_id: step.id,
|
|
1326
|
+
phase_id: phase.id,
|
|
1327
|
+
title: step.title,
|
|
1328
|
+
task: step.task,
|
|
1329
|
+
passed: false,
|
|
1330
|
+
duration_ms: 0,
|
|
1331
|
+
validations: [],
|
|
1332
|
+
context,
|
|
1333
|
+
error: detail,
|
|
1334
|
+
extraction: { path: 'none' },
|
|
1335
|
+
};
|
|
1336
|
+
stepResults.push(failed);
|
|
1337
|
+
priorStepResults.set(step.id, failed);
|
|
1338
|
+
failedCount++;
|
|
1339
|
+
phasePassed = false;
|
|
1340
|
+
continue;
|
|
1341
|
+
}
|
|
998
1342
|
const rawResult = await executeStep(assignment.client, step, phase.id, context, allSteps, options, {
|
|
999
1343
|
contributions,
|
|
1000
1344
|
priorStepResults,
|
|
@@ -1004,10 +1348,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1004
1348
|
runnerVars,
|
|
1005
1349
|
contextProvenance,
|
|
1006
1350
|
priorA2aEnvelopes,
|
|
1351
|
+
stepRequestStarts,
|
|
1007
1352
|
agentLibraryVersion: profile?.library_version,
|
|
1008
1353
|
});
|
|
1009
1354
|
const result = { ...rawResult, storyboard_id: storyboard.id };
|
|
1010
|
-
if (isMultiInstance) {
|
|
1355
|
+
if (isMultiInstance || useRouting) {
|
|
1356
|
+
// Echo per-step routing on the result so JUnit/CI consumers and
|
|
1357
|
+
// bug reports show which agent served which tool. In routed mode
|
|
1358
|
+
// every step gets the field; in replica round-robin only when
|
|
1359
|
+
// there are 2+ URLs.
|
|
1011
1360
|
result.agent_url = assignment.agentUrl;
|
|
1012
1361
|
result.agent_index = assignment.instanceIndex + 1;
|
|
1013
1362
|
}
|
|
@@ -1118,13 +1467,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1118
1467
|
}
|
|
1119
1468
|
}
|
|
1120
1469
|
else {
|
|
1121
|
-
|
|
1122
|
-
//
|
|
1123
|
-
//
|
|
1124
|
-
// text references the originating diagnostic (the leftmost
|
|
1470
|
+
// Trip this phase's cascade. First trip wins — subsequent
|
|
1471
|
+
// triggers don't overwrite, since the cascade text
|
|
1472
|
+
// references the originating diagnostic (the leftmost
|
|
1125
1473
|
// missing-state stateful step in the phase).
|
|
1126
|
-
if (
|
|
1127
|
-
|
|
1474
|
+
if (!phaseStatefulCascades.has(phase.id)) {
|
|
1475
|
+
phaseStatefulCascades.set(phase.id, {
|
|
1476
|
+
stepId: step.id,
|
|
1477
|
+
reason: result.skip_reason ?? 'missing_tool',
|
|
1478
|
+
});
|
|
1128
1479
|
}
|
|
1129
1480
|
}
|
|
1130
1481
|
}
|
|
@@ -1163,14 +1514,20 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1163
1514
|
if (step.stateful) {
|
|
1164
1515
|
phaseEstablishedStatefulState = true;
|
|
1165
1516
|
// Path (2) rescue tracking: a passing step that declared
|
|
1166
|
-
// `
|
|
1517
|
+
// `provides_state_for: X` (or the deprecated synonym
|
|
1518
|
+
// `peer_substitutes_for`) rescues X. Recorded against every
|
|
1167
1519
|
// declared target so phase-end resolution sees the target as
|
|
1168
1520
|
// covered even if its skip arrives later in the loop.
|
|
1169
|
-
const decl = step.peer_substitutes_for;
|
|
1521
|
+
const decl = step.provides_state_for ?? step.peer_substitutes_for;
|
|
1170
1522
|
if (decl !== undefined) {
|
|
1171
1523
|
const targets = Array.isArray(decl) ? decl : [decl];
|
|
1172
1524
|
for (const target of targets) {
|
|
1173
1525
|
phaseRescuedTargets.add(target);
|
|
1526
|
+
// Track the rescuing substitute's id so phase-end can format
|
|
1527
|
+
// the contract-mandated `peer_substituted` detail string.
|
|
1528
|
+
if (!phaseRescueSource.has(target)) {
|
|
1529
|
+
phaseRescueSource.set(target, step.id);
|
|
1530
|
+
}
|
|
1174
1531
|
}
|
|
1175
1532
|
}
|
|
1176
1533
|
}
|
|
@@ -1188,13 +1545,13 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1188
1545
|
countedAsFailed.add(result);
|
|
1189
1546
|
}
|
|
1190
1547
|
if (step.stateful) {
|
|
1191
|
-
statefulFailed = true;
|
|
1192
1548
|
// Real failure takes precedence over a prior skip-trigger in
|
|
1193
1549
|
// the cascade detail message — failures are the worse
|
|
1194
1550
|
// diagnostic, so downstream cascade-skipped steps should
|
|
1195
1551
|
// reference the failure rather than the earlier benign-ish
|
|
1196
|
-
// missing-state skip.
|
|
1197
|
-
|
|
1552
|
+
// missing-state skip. `null` trigger encodes "real failure,
|
|
1553
|
+
// detail says 'prior stateful step failed'."
|
|
1554
|
+
phaseStatefulCascades.set(phase.id, null);
|
|
1198
1555
|
}
|
|
1199
1556
|
// In multi-instance mode, annotate the failure with the cross-instance
|
|
1200
1557
|
// attribution block so CI readers pattern-match it as a deployment bug.
|
|
@@ -1210,46 +1567,70 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1210
1567
|
//
|
|
1211
1568
|
// Cascade fires ONLY when there was at least one other stateful step in
|
|
1212
1569
|
// the phase that could have served as a substitute — i.e. the phase had
|
|
1213
|
-
// peer steps, but none of them established state. A peer that
|
|
1214
|
-
// (e.g. `list_accounts` substituting for an explicit-mode
|
|
1215
|
-
// cancels the trigger entirely. A peer that *failed*
|
|
1216
|
-
//
|
|
1217
|
-
// failure message; we defer to that and don't
|
|
1570
|
+
// peer steps, but none of them established state (#1146). A peer that
|
|
1571
|
+
// passed (e.g. `list_accounts` substituting for an explicit-mode
|
|
1572
|
+
// `sync_accounts`) cancels the trigger entirely. A peer that *failed*
|
|
1573
|
+
// already tripped this phase's cascade at the failure site with the
|
|
1574
|
+
// worse-diagnostic real-failure message; we defer to that and don't
|
|
1575
|
+
// overwrite.
|
|
1218
1576
|
//
|
|
1219
1577
|
// When the not_applicable step was the SOLE stateful step in the phase
|
|
1220
1578
|
// (no peers existed at all), the cascade does NOT fire. That platform
|
|
1221
1579
|
// simply doesn't use this sync pathway — which is valid. Cascading on a
|
|
1222
|
-
// sole not_applicable would incorrectly penalise adapters
|
|
1223
|
-
//
|
|
1224
|
-
|
|
1225
|
-
if (phasePendingNotApplicable && !phaseEstablishedStatefulState && !statefulFailed) {
|
|
1580
|
+
// sole not_applicable would incorrectly penalise adapters that manage
|
|
1581
|
+
// state implicitly and have no list_accounts peer (adcp-client#1146).
|
|
1582
|
+
if (phasePendingNotApplicable && !phaseEstablishedStatefulState && !phaseStatefulCascades.has(phase.id)) {
|
|
1226
1583
|
const hadStatefulPeers = phaseStatefulStepIds.some(id => id !== phasePendingNotApplicable.stepId);
|
|
1227
1584
|
if (hadStatefulPeers) {
|
|
1228
|
-
|
|
1229
|
-
if (statefulSkipTrigger === null) {
|
|
1230
|
-
statefulSkipTrigger = phasePendingNotApplicable;
|
|
1231
|
-
}
|
|
1585
|
+
phaseStatefulCascades.set(phase.id, phasePendingNotApplicable);
|
|
1232
1586
|
}
|
|
1233
1587
|
}
|
|
1234
1588
|
// Phase-end cascade resolution for deferred `missing_tool` triggers
|
|
1235
1589
|
// (#1144). A stateful step that skipped with a hard-missing reason
|
|
1236
|
-
// and had at least one declared substitute (`
|
|
1237
|
-
// was deferred above. If none of
|
|
1238
|
-
// the
|
|
1239
|
-
// hard cascade with a detail message
|
|
1240
|
-
// tried so adopters reading the report
|
|
1241
|
-
// rather than a bare `missing_tool`
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1590
|
+
// and had at least one declared substitute (`provides_state_for`,
|
|
1591
|
+
// formerly `peer_substitutes_for`) was deferred above. If none of
|
|
1592
|
+
// the declared substitutes passed, the substitution path failed to
|
|
1593
|
+
// establish state — promote to a hard cascade with a detail message
|
|
1594
|
+
// that names the substitute(s) tried so adopters reading the report
|
|
1595
|
+
// see the substitution chain rather than a bare `missing_tool`
|
|
1596
|
+
// cascade origin.
|
|
1597
|
+
if (phasePendingMissingTool &&
|
|
1598
|
+
!phaseRescuedTargets.has(phasePendingMissingTool.stepId) &&
|
|
1599
|
+
!phaseStatefulCascades.has(phase.id)) {
|
|
1600
|
+
const subs = phasePendingMissingTool.substitutes;
|
|
1601
|
+
const subsList = subs.length === 1 ? `"${subs[0]}"` : subs.map(s => `"${s}"`).join(', ');
|
|
1602
|
+
phaseStatefulCascades.set(phase.id, {
|
|
1603
|
+
stepId: phasePendingMissingTool.stepId,
|
|
1604
|
+
reason: phasePendingMissingTool.reason,
|
|
1605
|
+
substitution_chain: `declared substitute ${subsList} did not pass`,
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1608
|
+
// Phase-end re-grading for rescued targets (adcp#3734, AdCP 3.0.3+).
|
|
1609
|
+
// When a deferred `missing_tool` / `missing_test_controller` skip was
|
|
1610
|
+
// rescued by a passing same-phase substitute, the spec mandates the
|
|
1611
|
+
// target be re-graded with `skip_reason: 'peer_substituted'` and the
|
|
1612
|
+
// detail string `"<target_step_id> state provided by <phase_id>.<substitute_step_id>"`
|
|
1613
|
+
// — see `runner-output-contract.yaml` > `skip_result.reasons.peer_substituted`.
|
|
1614
|
+
// Without this re-grading the target keeps its original `missing_tool`
|
|
1615
|
+
// grade, which is misleading: state DID materialize, just via a
|
|
1616
|
+
// declared substitute path. Tracked: adcp-client#1267.
|
|
1617
|
+
for (const target of phaseRescuedTargets) {
|
|
1618
|
+
const sourceId = phaseRescueSource.get(target);
|
|
1619
|
+
if (!sourceId)
|
|
1620
|
+
continue;
|
|
1621
|
+
const targetResult = stepResults.find(r => r.step_id === target);
|
|
1622
|
+
if (!targetResult || !targetResult.skipped)
|
|
1623
|
+
continue;
|
|
1624
|
+
// Only re-grade hard-missing-state skips. Other skip reasons (e.g.
|
|
1625
|
+
// `prerequisite_failed`, `peer_branch_taken`) on the target are
|
|
1626
|
+
// outside the substitute-rescue contract. Uses the same helper as
|
|
1627
|
+
// the deferral path (line ~1269 above) so the two sides stay in
|
|
1628
|
+
// lockstep when a future RunnerSkipReason joins the family.
|
|
1629
|
+
if (!isHardMissingStateSkipReason(targetResult.skip_reason))
|
|
1630
|
+
continue;
|
|
1631
|
+
const detail = `${target} state provided by ${phase.id}.${sourceId}`;
|
|
1632
|
+
targetResult.skip_reason = 'peer_substituted';
|
|
1633
|
+
targetResult.skip = { reason: 'peer_substituted', detail };
|
|
1253
1634
|
}
|
|
1254
1635
|
phaseResults.push({
|
|
1255
1636
|
phase_id: phase.id,
|
|
@@ -1258,6 +1639,9 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1258
1639
|
steps: stepResults,
|
|
1259
1640
|
duration_ms: Date.now() - phaseStart,
|
|
1260
1641
|
});
|
|
1642
|
+
// Accumulate phase id for default `depends_on` resolution in the next
|
|
1643
|
+
// iteration — phases declared later see this one as a prior phase.
|
|
1644
|
+
priorPhaseIds.push(phase.id);
|
|
1261
1645
|
}
|
|
1262
1646
|
// Branch-set post-pass: phases in a branch set (explicit `branch_set:`
|
|
1263
1647
|
// declaration or implicit detection via shared `contributes_to` + a later
|
|
@@ -1313,6 +1697,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1313
1697
|
phaseResults.unshift(seedingPhaseResult);
|
|
1314
1698
|
const schemasUsed = collectSchemasUsed(phaseResults);
|
|
1315
1699
|
const strictSummary = summarizeStrictValidation(phaseResults);
|
|
1700
|
+
const validationsNotApplicable = countValidationsNotApplicable(phaseResults);
|
|
1316
1701
|
const result = {
|
|
1317
1702
|
storyboard_id: storyboard.id,
|
|
1318
1703
|
storyboard_title: storyboard.title,
|
|
@@ -1322,6 +1707,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1322
1707
|
// individually); the aggregating wrapper relabels the top-level result
|
|
1323
1708
|
// `multi-pass`.
|
|
1324
1709
|
...(isMultiInstance && { multi_instance_strategy: 'round-robin' }),
|
|
1710
|
+
...(routingContext && { agent_map: { ...routingContext.agentMap } }),
|
|
1325
1711
|
overall_passed: failedCount === 0 && requiredPhasesPassed && !assertionsFailed,
|
|
1326
1712
|
phases: phaseResults,
|
|
1327
1713
|
context,
|
|
@@ -1329,6 +1715,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1329
1715
|
passed_count: passedCount,
|
|
1330
1716
|
failed_count: failedCount,
|
|
1331
1717
|
skipped_count: skippedCount,
|
|
1718
|
+
...(validationsNotApplicable > 0 ? { validations_not_applicable: validationsNotApplicable } : {}),
|
|
1332
1719
|
tested_at: new Date().toISOString(),
|
|
1333
1720
|
...(schemasUsed.length > 0 ? { schemas_used: schemasUsed } : {}),
|
|
1334
1721
|
...(assertionResults.length > 0 ? { assertions: assertionResults } : {}),
|
|
@@ -1392,6 +1779,7 @@ async function runMultiPass(agentUrls, storyboard, options) {
|
|
|
1392
1779
|
passed_count: result.passed_count,
|
|
1393
1780
|
failed_count: result.failed_count,
|
|
1394
1781
|
skipped_count: result.skipped_count,
|
|
1782
|
+
...(result.validations_not_applicable ? { validations_not_applicable: result.validations_not_applicable } : {}),
|
|
1395
1783
|
duration_ms: result.total_duration_ms,
|
|
1396
1784
|
});
|
|
1397
1785
|
}
|
|
@@ -1400,6 +1788,7 @@ async function runMultiPass(agentUrls, storyboard, options) {
|
|
|
1400
1788
|
const passed = passes.reduce((sum, p) => sum + p.passed_count, 0);
|
|
1401
1789
|
const failed = passes.reduce((sum, p) => sum + p.failed_count, 0);
|
|
1402
1790
|
const skipped = passes.reduce((sum, p) => sum + p.skipped_count, 0);
|
|
1791
|
+
const notApplicable = passes.reduce((sum, p) => sum + (p.validations_not_applicable ?? 0), 0);
|
|
1403
1792
|
const schemasUsed = passResults.flatMap(r => r.schemas_used ?? []);
|
|
1404
1793
|
const schemasDedup = [...new Map(schemasUsed.map(s => [s.schema_id, s])).values()];
|
|
1405
1794
|
// Assertions are scoped per-pass — each pass's runner resolved them
|
|
@@ -1421,6 +1810,7 @@ async function runMultiPass(agentUrls, storyboard, options) {
|
|
|
1421
1810
|
passed_count: passed,
|
|
1422
1811
|
failed_count: failed,
|
|
1423
1812
|
skipped_count: skipped,
|
|
1813
|
+
...(notApplicable > 0 ? { validations_not_applicable: notApplicable } : {}),
|
|
1424
1814
|
tested_at: new Date().toISOString(),
|
|
1425
1815
|
...(schemasDedup.length > 0 ? { schemas_used: schemasDedup } : {}),
|
|
1426
1816
|
...(assertionsAgg.length > 0 ? { assertions: assertionsAgg } : {}),
|
|
@@ -1431,6 +1821,27 @@ async function runMultiPass(agentUrls, storyboard, options) {
|
|
|
1431
1821
|
* from every validation result with a schema_id; dropping empties keeps
|
|
1432
1822
|
* the list proportional to what actually ran.
|
|
1433
1823
|
*/
|
|
1824
|
+
/**
|
|
1825
|
+
* Count validation results graded `not_applicable` across every step. Per
|
|
1826
|
+
* runner-output-contract.yaml v2.0.0 these come from the forward-compat
|
|
1827
|
+
* default in the validation dispatcher: when a storyboard declares an
|
|
1828
|
+
* authored `check` value the runner does not implement, the dispatcher
|
|
1829
|
+
* grades it `passed: true, not_applicable: true` rather than failing the
|
|
1830
|
+
* step. Surfacing the count separately lets consumers distinguish
|
|
1831
|
+
* "runner is older than the storyboard" from clean passes.
|
|
1832
|
+
*/
|
|
1833
|
+
function countValidationsNotApplicable(phases) {
|
|
1834
|
+
let n = 0;
|
|
1835
|
+
for (const phase of phases) {
|
|
1836
|
+
for (const step of phase.steps) {
|
|
1837
|
+
for (const v of step.validations) {
|
|
1838
|
+
if (v.not_applicable)
|
|
1839
|
+
n++;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
return n;
|
|
1844
|
+
}
|
|
1434
1845
|
function collectSchemasUsed(phases) {
|
|
1435
1846
|
const seen = new Set();
|
|
1436
1847
|
const out = [];
|
|
@@ -1566,14 +1977,21 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
|
|
|
1566
1977
|
const context = { ...options.context };
|
|
1567
1978
|
if (options.context)
|
|
1568
1979
|
(0, context_1.forwardAliasCache)(options.context, context);
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1980
|
+
// `_webhookReceiver` is a test-only injection point; production callers
|
|
1981
|
+
// pass `webhook_receiver` and the runner constructs the listener.
|
|
1982
|
+
const injectedReceiver = options._webhookReceiver;
|
|
1983
|
+
const webhookReceiver = injectedReceiver ??
|
|
1984
|
+
(options.webhook_receiver
|
|
1985
|
+
? await (0, webhook_receiver_1.createWebhookReceiver)({
|
|
1986
|
+
...(options.webhook_receiver.mode && { mode: options.webhook_receiver.mode }),
|
|
1987
|
+
...(options.webhook_receiver.host !== undefined && { host: options.webhook_receiver.host }),
|
|
1988
|
+
...(options.webhook_receiver.port !== undefined && { port: options.webhook_receiver.port }),
|
|
1989
|
+
...(options.webhook_receiver.public_url !== undefined && {
|
|
1990
|
+
public_url: options.webhook_receiver.public_url,
|
|
1991
|
+
}),
|
|
1992
|
+
})
|
|
1993
|
+
: undefined);
|
|
1994
|
+
const ownsWebhookReceiver = !injectedReceiver && !!webhookReceiver;
|
|
1577
1995
|
const runnerVars = (0, context_1.createRunnerVariables)({
|
|
1578
1996
|
...(webhookReceiver && { webhookBase: webhookReceiver.base_url }),
|
|
1579
1997
|
});
|
|
@@ -1583,7 +2001,7 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
|
|
|
1583
2001
|
const allSteps = flattenSteps(storyboard);
|
|
1584
2002
|
const found = allSteps.find(s => s.step.id === stepId);
|
|
1585
2003
|
if (!found) {
|
|
1586
|
-
if (webhookReceiver)
|
|
2004
|
+
if (ownsWebhookReceiver && webhookReceiver)
|
|
1587
2005
|
await webhookReceiver.close();
|
|
1588
2006
|
throw new Error(`Step "${stepId}" not found in storyboard "${storyboard.id}". ` +
|
|
1589
2007
|
`Available steps: ${allSteps.map(s => s.step.id).join(', ')}`);
|
|
@@ -1601,12 +2019,13 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
|
|
|
1601
2019
|
runnerVars,
|
|
1602
2020
|
contextProvenance,
|
|
1603
2021
|
priorA2aEnvelopes: new Map(),
|
|
2022
|
+
stepRequestStarts: new Map(),
|
|
1604
2023
|
agentLibraryVersion: profile?.library_version,
|
|
1605
2024
|
});
|
|
1606
2025
|
if (!options._client) {
|
|
1607
2026
|
await (0, protocols_1.closeConnections)(options.protocol);
|
|
1608
2027
|
}
|
|
1609
|
-
if (webhookReceiver)
|
|
2028
|
+
if (ownsWebhookReceiver && webhookReceiver)
|
|
1610
2029
|
await webhookReceiver.close();
|
|
1611
2030
|
return result;
|
|
1612
2031
|
}
|
|
@@ -1620,6 +2039,7 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1620
2039
|
priorProbes: new Map(),
|
|
1621
2040
|
agentUrl: '',
|
|
1622
2041
|
contextProvenance: new Map(),
|
|
2042
|
+
stepRequestStarts: new Map(),
|
|
1623
2043
|
};
|
|
1624
2044
|
// HTTP probe tasks bypass the MCP client entirely.
|
|
1625
2045
|
if (probes_1.PROBE_TASKS.has(step.task)) {
|
|
@@ -1761,6 +2181,19 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1761
2181
|
// prevents session-key divergence across create/get/update/delete steps
|
|
1762
2182
|
// when individual builders or sample_request YAML omit brand.
|
|
1763
2183
|
request = applyBrandInvariant(request, options, effectiveStep.task);
|
|
2184
|
+
// Per-run sandbox-bypass hint (#841). When the operator passes
|
|
2185
|
+
// `--no-sandbox` (or sets `disable_sandbox: true` programmatically), the
|
|
2186
|
+
// runner stamps `ext.adcp.disable_sandbox: true` on every outgoing
|
|
2187
|
+
// request. Adopters that read this field bypass their internal sandbox
|
|
2188
|
+
// routing — env-var fallbacks, brand-domain heuristics, fixture
|
|
2189
|
+
// substitutes — and exercise their real adapter path. Agents that
|
|
2190
|
+
// don't recognize the field ignore it (per spec, `ext` is accepted
|
|
2191
|
+
// without error and not echoed). Gated on the schema check that
|
|
2192
|
+
// `applyBrandInvariant` uses for `account` and `brand` so tools whose
|
|
2193
|
+
// `additionalProperties: false` schema would reject `ext` aren't broken.
|
|
2194
|
+
if (options.disable_sandbox === true) {
|
|
2195
|
+
request = applyDisableSandboxHint(request, effectiveStep.task);
|
|
2196
|
+
}
|
|
1764
2197
|
// Mutating AdCP requests require idempotency_key per spec. Storyboard
|
|
1765
2198
|
// yamls generally omit it so authors don't have to remember it on every
|
|
1766
2199
|
// mutating step — mint one here on the runner's behalf, matching how a
|
|
@@ -1773,7 +2206,32 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1773
2206
|
const unresolvedVars = findUnresolvedContextVars(request);
|
|
1774
2207
|
if (unresolvedVars.length > 0 && !step.expect_error) {
|
|
1775
2208
|
const next = getNextStepPreview(step.id, allSteps, context, runState.runnerVars);
|
|
1776
|
-
const detail = `Skipped: unresolved context variables from prior steps: ${unresolvedVars.join(', ')}.`;
|
|
2209
|
+
const detail = `Skipped: unresolved context variables from prior steps: ${unresolvedVars.map(v => v.key).join(', ')}.`;
|
|
2210
|
+
// Per runner-output-contract.yaml v2.0.0, a skipped consumer step MUST
|
|
2211
|
+
// carry an `unresolved_substitution` validation result for each missing
|
|
2212
|
+
// token — `expected` is the token string, `actual` / `json_pointer` /
|
|
2213
|
+
// `request` / `response` are null (pre-wire failure; no response payload
|
|
2214
|
+
// exists). Surfacing this as a validation rather than only a skip detail
|
|
2215
|
+
// keeps the runner-output contract's "failed/skipped steps include at
|
|
2216
|
+
// least one validation result" invariant intact and lets dashboards
|
|
2217
|
+
// attribute the cascade origin without parsing the skip message.
|
|
2218
|
+
const seenTokens = new Set();
|
|
2219
|
+
const synthesized = [];
|
|
2220
|
+
for (const v of unresolvedVars) {
|
|
2221
|
+
if (seenTokens.has(v.token))
|
|
2222
|
+
continue;
|
|
2223
|
+
seenTokens.add(v.token);
|
|
2224
|
+
synthesized.push({
|
|
2225
|
+
check: 'unresolved_substitution',
|
|
2226
|
+
passed: false,
|
|
2227
|
+
description: `request token "${v.token}" did not resolve — prior step did not populate context.${v.key}`,
|
|
2228
|
+
json_pointer: null,
|
|
2229
|
+
expected: v.token,
|
|
2230
|
+
actual: null,
|
|
2231
|
+
schema_id: null,
|
|
2232
|
+
schema_url: null,
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
1777
2235
|
return {
|
|
1778
2236
|
step_id: step.id,
|
|
1779
2237
|
phase_id: phaseId,
|
|
@@ -1784,7 +2242,7 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1784
2242
|
skip_reason: 'prerequisite_failed',
|
|
1785
2243
|
skip: buildSkip('prerequisite_failed', detail),
|
|
1786
2244
|
duration_ms: 0,
|
|
1787
|
-
validations:
|
|
2245
|
+
validations: synthesized,
|
|
1788
2246
|
context,
|
|
1789
2247
|
error: detail,
|
|
1790
2248
|
next,
|
|
@@ -1821,6 +2279,14 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1821
2279
|
let httpResult;
|
|
1822
2280
|
let responseRecord;
|
|
1823
2281
|
let a2aEnvelope;
|
|
2282
|
+
// Capture the ISO timestamp immediately before the step's AdCP request
|
|
2283
|
+
// dispatch. `upstream_traffic` validations use this as the default
|
|
2284
|
+
// `since_timestamp` window bound when querying the controller. Recorded
|
|
2285
|
+
// on `runState.stepRequestStarts` so a later step's `since: prior_step_id`
|
|
2286
|
+
// reference can resolve back to it.
|
|
2287
|
+
const requestStartIso = new Date().toISOString();
|
|
2288
|
+
if (runState.stepRequestStarts)
|
|
2289
|
+
runState.stepRequestStarts.set(step.id, requestStartIso);
|
|
1824
2290
|
if (useRawProbe) {
|
|
1825
2291
|
const started = Date.now();
|
|
1826
2292
|
try {
|
|
@@ -1842,7 +2308,7 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1842
2308
|
const filteredHeaders = filterResponseHeaders(httpResult.headers);
|
|
1843
2309
|
responseRecord = {
|
|
1844
2310
|
transport: 'mcp',
|
|
1845
|
-
payload: redactSecrets(httpResult.body),
|
|
2311
|
+
payload: (0, redact_secrets_1.redactSecrets)(httpResult.body),
|
|
1846
2312
|
...(typeof httpResult.status === 'number' ? { status: httpResult.status } : {}),
|
|
1847
2313
|
...(filteredHeaders && { headers: filteredHeaders }),
|
|
1848
2314
|
duration_ms: durationMs,
|
|
@@ -1902,7 +2368,7 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1902
2368
|
if (taskResult) {
|
|
1903
2369
|
responseRecord = {
|
|
1904
2370
|
transport: options.protocol === 'a2a' ? 'a2a' : 'mcp',
|
|
1905
|
-
payload: redactSecrets(taskResult.data ?? taskResult.error ?? null),
|
|
2371
|
+
payload: (0, redact_secrets_1.redactSecrets)(taskResult.data ?? taskResult.error ?? null),
|
|
1906
2372
|
duration_ms: stepResult.duration_ms,
|
|
1907
2373
|
};
|
|
1908
2374
|
}
|
|
@@ -1910,7 +2376,7 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1910
2376
|
const requestRecord = {
|
|
1911
2377
|
transport: useRawProbe ? 'mcp' : options.protocol === 'a2a' ? 'a2a' : 'mcp',
|
|
1912
2378
|
operation: effectiveStep.task,
|
|
1913
|
-
payload: redactSecrets(request),
|
|
2379
|
+
payload: (0, redact_secrets_1.redactSecrets)(request),
|
|
1914
2380
|
...(runState.agentUrl ? { url: runState.agentUrl } : {}),
|
|
1915
2381
|
};
|
|
1916
2382
|
// Feature-unsupported or unknown-tool errors → treat as skip
|
|
@@ -1968,6 +2434,14 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1968
2434
|
}
|
|
1969
2435
|
return resolved;
|
|
1970
2436
|
});
|
|
2437
|
+
// Pre-fetch upstream_traffic data: any `check: upstream_traffic`
|
|
2438
|
+
// validation needs the controller's `query_upstream_traffic` response,
|
|
2439
|
+
// but the validation dispatcher is synchronous. Async-fetch here once
|
|
2440
|
+
// per unique `since_timestamp` window so the validator can grade
|
|
2441
|
+
// synchronously. Adopters who don't advertise the scenario short-
|
|
2442
|
+
// circuit to a single `advertised: false` marker and every
|
|
2443
|
+
// upstream_traffic check on the step grades not_applicable.
|
|
2444
|
+
const upstreamTraffic = await prefetchUpstreamTraffic(step.id, resolvedValidations, client, options, runState, requestStartIso);
|
|
1971
2445
|
const vctx = {
|
|
1972
2446
|
taskName: effectiveStep.task,
|
|
1973
2447
|
...(taskResult && { taskResult }),
|
|
@@ -1979,6 +2453,8 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1979
2453
|
...(responseRecord && { response: responseRecord }),
|
|
1980
2454
|
storyboardContext: context,
|
|
1981
2455
|
...(a2aEnvelope && { a2aEnvelope }),
|
|
2456
|
+
...(upstreamTraffic && { upstreamTraffic }),
|
|
2457
|
+
...(step.sample_request && { storyboardStep: { sample_request: step.sample_request } }),
|
|
1982
2458
|
...(() => {
|
|
1983
2459
|
// Walk back through the run's captured A2A envelopes and use
|
|
1984
2460
|
// the most recent prior step's envelope as the comparison
|
|
@@ -2001,7 +2477,6 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
2001
2477
|
};
|
|
2002
2478
|
validations = (0, validations_1.runValidations)(resolvedValidations, vctx);
|
|
2003
2479
|
}
|
|
2004
|
-
const allValidationsPassed = validations.every(v => v.passed);
|
|
2005
2480
|
// Persist the captured A2A envelope keyed by step id so cross-step
|
|
2006
2481
|
// validators (`a2a_context_continuity`) on subsequent steps can
|
|
2007
2482
|
// compare against it. Only fires when this step actually captured
|
|
@@ -2038,14 +2513,83 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
2038
2513
|
// ensures the minted value from any same-step $generate:…#<key> inline
|
|
2039
2514
|
// substitution is visible here.
|
|
2040
2515
|
if (step.context_outputs?.length) {
|
|
2041
|
-
|
|
2516
|
+
// Resolve `task_completion.<path>` outputs against the eventual task
|
|
2517
|
+
// artifact rather than the immediate response. When the immediate
|
|
2518
|
+
// response is a submitted-arm envelope (HITL / async-signed-IO flows),
|
|
2519
|
+
// the seller-assigned IDs only exist on the completion artifact — the
|
|
2520
|
+
// sync-shape path resolves to nothing and the storyboard fails on
|
|
2521
|
+
// `capture_path_not_resolvable` for a value the seller correctly
|
|
2522
|
+
// produces, just on a later message. The `task_completion.` prefix is
|
|
2523
|
+
// an explicit author-side opt-in: "poll tasks/get for terminal status,
|
|
2524
|
+
// then resolve the rest of the path against the artifact data."
|
|
2525
|
+
//
|
|
2526
|
+
// Polling failures (timeout, terminal failed/canceled/rejected) emit
|
|
2527
|
+
// `capture_poll_timeout` instead of recycling
|
|
2528
|
+
// `capture_path_not_resolvable` so the failure-class is distinct from
|
|
2529
|
+
// the original "field absent in immediate response" diagnostic.
|
|
2530
|
+
const taskCompletionResolution = await resolveTaskCompletionOutputs(taskResult, step.context_outputs, client, runState.webhookReceiver);
|
|
2531
|
+
// `'data' in resolution` distinguishes "polled, artifact had no data"
|
|
2532
|
+
// (use undefined → outputs fail with capture_path_not_resolvable) from
|
|
2533
|
+
// "did not poll" (fall back to the immediate response data).
|
|
2534
|
+
const extractionData = 'data' in taskCompletionResolution
|
|
2535
|
+
? taskCompletionResolution.data
|
|
2536
|
+
: hasData && taskResult
|
|
2537
|
+
? taskResult.data
|
|
2538
|
+
: undefined;
|
|
2539
|
+
const remappedOutputs = remapTaskCompletionOutputs(step.context_outputs);
|
|
2540
|
+
const explicit = (0, context_1.applyContextOutputsWithProvenance)(extractionData, remappedOutputs, step.id, effectiveStep.task, updatedContext);
|
|
2042
2541
|
Object.assign(updatedContext, explicit.values);
|
|
2043
2542
|
if (runState.contextProvenance) {
|
|
2044
2543
|
for (const [key, entry] of Object.entries(explicit.provenance)) {
|
|
2045
2544
|
runState.contextProvenance.set(key, entry);
|
|
2046
2545
|
}
|
|
2047
2546
|
}
|
|
2547
|
+
// Per runner-output-contract.yaml v2.0.0, a `context_outputs.path` that
|
|
2548
|
+
// resolves to absent / null / "" is a producer-side conformance failure
|
|
2549
|
+
// on THIS step (capture_path_not_resolvable), not on a downstream
|
|
2550
|
+
// consumer. Synthesize a failed validation_result so the failure is
|
|
2551
|
+
// attributed where it actually originated. Emitted regardless of whether
|
|
2552
|
+
// the step's authored validations passed — a clean response_schema with
|
|
2553
|
+
// a failed capture is the exact case adcp#3796 set out to fix.
|
|
2554
|
+
if (explicit.failures && explicit.failures.length > 0) {
|
|
2555
|
+
for (const failure of explicit.failures) {
|
|
2556
|
+
const wasTaskCompletion = step.context_outputs.some(o => o.key === failure.key && typeof o.path === 'string' && o.path.startsWith(TASK_COMPLETION_PATH_PREFIX));
|
|
2557
|
+
const pollTimedOut = wasTaskCompletion && taskCompletionResolution.timedOut === true;
|
|
2558
|
+
const taskFailed = wasTaskCompletion && taskCompletionResolution.taskFailed === true;
|
|
2559
|
+
const originalPath = wasTaskCompletion ? `${TASK_COMPLETION_PATH_PREFIX}${failure.path}` : failure.path;
|
|
2560
|
+
let check;
|
|
2561
|
+
let description;
|
|
2562
|
+
if (pollTimedOut) {
|
|
2563
|
+
check = 'capture_poll_timeout';
|
|
2564
|
+
description = `context_outputs path "${originalPath}" (key "${failure.key}") did not resolve before tasks/get poll timed out (${taskCompletionResolution.pollTimeoutMs}ms)`;
|
|
2565
|
+
}
|
|
2566
|
+
else if (taskFailed) {
|
|
2567
|
+
check = 'capture_task_failed';
|
|
2568
|
+
description = `context_outputs path "${originalPath}" (key "${failure.key}") did not resolve because the task reached a terminal failed/canceled/rejected state`;
|
|
2569
|
+
}
|
|
2570
|
+
else {
|
|
2571
|
+
check = 'capture_path_not_resolvable';
|
|
2572
|
+
description = `context_outputs path "${originalPath}" (key "${failure.key}") did not resolve to a usable value`;
|
|
2573
|
+
}
|
|
2574
|
+
const synthetic = {
|
|
2575
|
+
check,
|
|
2576
|
+
passed: false,
|
|
2577
|
+
description,
|
|
2578
|
+
json_pointer: (0, path_1.toJsonPointer)(failure.path),
|
|
2579
|
+
expected: originalPath,
|
|
2580
|
+
actual: failure.resolved,
|
|
2581
|
+
schema_id: null,
|
|
2582
|
+
schema_url: null,
|
|
2583
|
+
...(requestRecord && { request: requestRecord }),
|
|
2584
|
+
...(responseRecord && { response: responseRecord }),
|
|
2585
|
+
};
|
|
2586
|
+
validations.push(synthetic);
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2048
2589
|
}
|
|
2590
|
+
// Re-evaluate after any synthesized capture-failure validations are
|
|
2591
|
+
// appended — the step's overall pass/fail must reflect them.
|
|
2592
|
+
const allValidationsPassedFinal = validations.every(v => v.passed);
|
|
2049
2593
|
// Emit context-value-rejected hints when the seller's error lists the
|
|
2050
2594
|
// values it would have accepted and the rejected request value traces
|
|
2051
2595
|
// back to a prior-step $context.* write. Non-fatal: doesn't flip
|
|
@@ -2070,7 +2614,7 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
2070
2614
|
// Hints trace to context that existed BEFORE this step's own writes,
|
|
2071
2615
|
// since the rejected value can't have come from this step's own
|
|
2072
2616
|
// extraction.
|
|
2073
|
-
const stepFailed = !(passed &&
|
|
2617
|
+
const stepFailed = !(passed && allValidationsPassedFinal);
|
|
2074
2618
|
const contextRejectionHints = stepFailed && runState.contextProvenance
|
|
2075
2619
|
? (0, rejection_hints_1.detectContextRejectionHints)(taskResult, request, context, runState.contextProvenance, effectiveStep.task)
|
|
2076
2620
|
: [];
|
|
@@ -2112,13 +2656,13 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
2112
2656
|
phase_id: phaseId,
|
|
2113
2657
|
title: step.title,
|
|
2114
2658
|
task: step.task,
|
|
2115
|
-
passed: passed &&
|
|
2659
|
+
passed: passed && allValidationsPassedFinal,
|
|
2116
2660
|
expect_error: step.expect_error,
|
|
2117
2661
|
duration_ms: stepResult.duration_ms,
|
|
2118
2662
|
// Legacy `response` field (new code reads `response_record`).
|
|
2119
2663
|
// Redact in case a downstream consumer still keys off it; the
|
|
2120
2664
|
// modern `response_record.payload` path is already redacted.
|
|
2121
|
-
response: redactSecrets(taskResult?.data),
|
|
2665
|
+
response: (0, redact_secrets_1.redactSecrets)(taskResult?.data),
|
|
2122
2666
|
validations,
|
|
2123
2667
|
context: updatedContext,
|
|
2124
2668
|
...(runState.contextProvenance &&
|
|
@@ -2179,7 +2723,7 @@ async function executeProbeStep(step, phaseId, context, allSteps, options, runSt
|
|
|
2179
2723
|
const responseRecord = httpResult
|
|
2180
2724
|
? {
|
|
2181
2725
|
transport: 'http',
|
|
2182
|
-
payload: redactSecrets(httpResult.body),
|
|
2726
|
+
payload: (0, redact_secrets_1.redactSecrets)(httpResult.body),
|
|
2183
2727
|
status: httpResult.status,
|
|
2184
2728
|
...(filteredProbeHeaders && { headers: filteredProbeHeaders }),
|
|
2185
2729
|
duration_ms: duration,
|
|
@@ -2323,14 +2867,14 @@ function parseLastA2aMessageSendCapture(captures) {
|
|
|
2323
2867
|
// `envelope.result` keeps presence-of-key fidelity for validators
|
|
2324
2868
|
// that need to distinguish "result was null" from "result was
|
|
2325
2869
|
// omitted". Both paths run through `redactSecrets`.
|
|
2326
|
-
const redactedResult = envelope.result !== undefined ? redactSecrets(envelope.result) : null;
|
|
2870
|
+
const redactedResult = envelope.result !== undefined ? (0, redact_secrets_1.redactSecrets)(envelope.result) : null;
|
|
2327
2871
|
return {
|
|
2328
2872
|
result: redactedResult,
|
|
2329
2873
|
envelope: {
|
|
2330
2874
|
...(envelope.jsonrpc !== undefined && { jsonrpc: envelope.jsonrpc }),
|
|
2331
2875
|
...(envelope.id !== undefined && { id: envelope.id }),
|
|
2332
2876
|
...(envelope.result !== undefined && { result: redactedResult }),
|
|
2333
|
-
...(envelope.error !== undefined && { error: redactSecrets(envelope.error) }),
|
|
2877
|
+
...(envelope.error !== undefined && { error: (0, redact_secrets_1.redactSecrets)(envelope.error) }),
|
|
2334
2878
|
},
|
|
2335
2879
|
http_status: cap.status,
|
|
2336
2880
|
};
|
|
@@ -2572,7 +3116,17 @@ function applyBrandInvariant(request, options, taskName) {
|
|
|
2572
3116
|
const acct = existingAccount;
|
|
2573
3117
|
const isNaturalKeyVariant = 'brand' in acct || 'operator' in acct;
|
|
2574
3118
|
if (isNaturalKeyVariant) {
|
|
2575
|
-
|
|
3119
|
+
const merged = { ...acct, brand };
|
|
3120
|
+
// The natural-key arm of AccountReference requires `operator` (per
|
|
3121
|
+
// schemas/cache/{version}/core/account-ref.json). A fixture or earlier
|
|
3122
|
+
// context-extraction step that produced `{brand, sandbox}` without
|
|
3123
|
+
// operator would otherwise be passed through and rejected by a
|
|
3124
|
+
// strict-validating seller. Default operator to brand.domain — same
|
|
3125
|
+
// convention `resolveAccount` uses for synthetic refs.
|
|
3126
|
+
if (typeof merged.operator !== 'string' && typeof brand.domain === 'string') {
|
|
3127
|
+
merged.operator = brand.domain;
|
|
3128
|
+
}
|
|
3129
|
+
result.account = merged;
|
|
2576
3130
|
}
|
|
2577
3131
|
}
|
|
2578
3132
|
}
|
|
@@ -2584,6 +3138,44 @@ function applyBrandInvariant(request, options, taskName) {
|
|
|
2584
3138
|
}
|
|
2585
3139
|
return result;
|
|
2586
3140
|
}
|
|
3141
|
+
/**
|
|
3142
|
+
* Inject `ext.adcp.disable_sandbox: true` into the outgoing request when the
|
|
3143
|
+
* operator passed `--no-sandbox` (or `disable_sandbox: true` programmatically).
|
|
3144
|
+
* Issue #841.
|
|
3145
|
+
*
|
|
3146
|
+
* `ext` is the spec-blessed channel for read-by-agent extensions and is
|
|
3147
|
+
* accepted-without-error on every tool, so the schema check is conservative
|
|
3148
|
+
* — only inject when the tool's request schema permits a top-level `ext`
|
|
3149
|
+
* field. Tools with `additionalProperties: false` that don't list `ext`
|
|
3150
|
+
* would fail strict AJV validation otherwise.
|
|
3151
|
+
*
|
|
3152
|
+
* Merging strategy: preserve any existing `ext.adcp` block the storyboard
|
|
3153
|
+
* fixture or builder authored (e.g. vendor extensions a future scenario
|
|
3154
|
+
* might exercise). The injected `disable_sandbox` flag rides alongside
|
|
3155
|
+
* those rather than overwriting them.
|
|
3156
|
+
*/
|
|
3157
|
+
function applyDisableSandboxHint(request, taskName) {
|
|
3158
|
+
if (taskName && !(0, schema_loader_1.schemaAllowsTopLevelField)(taskName, 'ext'))
|
|
3159
|
+
return request;
|
|
3160
|
+
const existingExt = request.ext;
|
|
3161
|
+
const existingExtObj = existingExt != null && typeof existingExt === 'object' && !Array.isArray(existingExt)
|
|
3162
|
+
? existingExt
|
|
3163
|
+
: {};
|
|
3164
|
+
const existingAdcpExt = existingExtObj.adcp;
|
|
3165
|
+
const existingAdcpExtObj = existingAdcpExt != null && typeof existingAdcpExt === 'object' && !Array.isArray(existingAdcpExt)
|
|
3166
|
+
? existingAdcpExt
|
|
3167
|
+
: {};
|
|
3168
|
+
return {
|
|
3169
|
+
...request,
|
|
3170
|
+
ext: {
|
|
3171
|
+
...existingExtObj,
|
|
3172
|
+
adcp: {
|
|
3173
|
+
...existingAdcpExtObj,
|
|
3174
|
+
disable_sandbox: true,
|
|
3175
|
+
},
|
|
3176
|
+
},
|
|
3177
|
+
};
|
|
3178
|
+
}
|
|
2587
3179
|
/**
|
|
2588
3180
|
* Mint an `idempotency_key` for mutating storyboard requests when one wasn't
|
|
2589
3181
|
* supplied. Storyboard `sample_request` blocks generally omit it; the runner
|
|
@@ -2617,8 +3209,109 @@ function truncateError(error) {
|
|
|
2617
3209
|
return undefined;
|
|
2618
3210
|
return error.length > MAX_ERROR_LENGTH ? error.slice(0, MAX_ERROR_LENGTH) + '...[truncated]' : error;
|
|
2619
3211
|
}
|
|
3212
|
+
/**
|
|
3213
|
+
* Pre-fetch `query_upstream_traffic` responses for every unique
|
|
3214
|
+
* `since_timestamp` window declared by `upstream_traffic` validations on
|
|
3215
|
+
* THIS step. The dispatcher is synchronous; the controller call is async
|
|
3216
|
+
* — running it once here keeps the validator simple and avoids redundant
|
|
3217
|
+
* controller traffic when a step has multiple upstream_traffic checks
|
|
3218
|
+
* sharing a window.
|
|
3219
|
+
*
|
|
3220
|
+
* Returns `undefined` when the step declares no upstream_traffic checks
|
|
3221
|
+
* (no work to do), or a context with `advertised: false` when the
|
|
3222
|
+
* controller does not advertise `query_upstream_traffic` (every check
|
|
3223
|
+
* grades not_applicable per the spec's adopter-opt-in rule).
|
|
3224
|
+
*/
|
|
3225
|
+
async function prefetchUpstreamTraffic(stepId, resolvedValidations, client, options, runState, requestStartIso) {
|
|
3226
|
+
const upstreamChecks = resolvedValidations.filter(v => v.check === 'upstream_traffic');
|
|
3227
|
+
if (upstreamChecks.length === 0)
|
|
3228
|
+
return undefined;
|
|
3229
|
+
const advertised = options._controllerCapabilities?.detected === true &&
|
|
3230
|
+
options._controllerCapabilities.scenarios.includes('query_upstream_traffic');
|
|
3231
|
+
if (!advertised) {
|
|
3232
|
+
return {
|
|
3233
|
+
advertised: false,
|
|
3234
|
+
queries: new Map(),
|
|
3235
|
+
thisStepSince: requestStartIso,
|
|
3236
|
+
};
|
|
3237
|
+
}
|
|
3238
|
+
// Resolve `since: prior_step_id` references against runState's
|
|
3239
|
+
// recorded request timestamps. Validations that name an unknown step
|
|
3240
|
+
// fall back to this step's own start (matching default behavior).
|
|
3241
|
+
const priorStepSinceMap = new Map();
|
|
3242
|
+
const unresolvedSinceRefs = new Set();
|
|
3243
|
+
const sinceTimestamps = new Set([requestStartIso]);
|
|
3244
|
+
for (const v of upstreamChecks) {
|
|
3245
|
+
if (!v.since)
|
|
3246
|
+
continue;
|
|
3247
|
+
const priorStart = runState.stepRequestStarts?.get(v.since);
|
|
3248
|
+
if (priorStart) {
|
|
3249
|
+
priorStepSinceMap.set(v.since, priorStart);
|
|
3250
|
+
sinceTimestamps.add(priorStart);
|
|
3251
|
+
}
|
|
3252
|
+
else {
|
|
3253
|
+
// Spec PR adcp#3816: a `since: prior_step_id` that doesn't resolve
|
|
3254
|
+
// is a storyboard authoring bug — silently masking it as "use this
|
|
3255
|
+
// step's start" lets misspelled refs pass vacuously. Track and
|
|
3256
|
+
// surface as a typed failure on the validation result.
|
|
3257
|
+
priorStepSinceMap.set(v.since, requestStartIso);
|
|
3258
|
+
unresolvedSinceRefs.add(v.since);
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
const queries = new Map();
|
|
3262
|
+
for (const sinceTs of sinceTimestamps) {
|
|
3263
|
+
// Per spec PR adcp#3816: runners SHOULD subtract a clock-skew tolerance
|
|
3264
|
+
// (50ms minimum, 250ms recommended) before sending the bound to the
|
|
3265
|
+
// controller, so a recorded call timestamped microseconds before the
|
|
3266
|
+
// runner's clock measurement isn't silently excluded. We use 250ms (the
|
|
3267
|
+
// spec's recommended value).
|
|
3268
|
+
const adjustedSince = new Date(new Date(sinceTs).getTime() - 250).toISOString();
|
|
3269
|
+
const params = { since_timestamp: adjustedSince, limit: 100 };
|
|
3270
|
+
const requestRecord = {
|
|
3271
|
+
transport: options.protocol === 'a2a' ? 'a2a' : 'mcp',
|
|
3272
|
+
operation: 'comply_test_controller',
|
|
3273
|
+
payload: (0, redact_secrets_1.redactSecrets)({ scenario: 'query_upstream_traffic', params }),
|
|
3274
|
+
...(runState.agentUrl ? { url: runState.agentUrl } : {}),
|
|
3275
|
+
};
|
|
3276
|
+
const startMs = Date.now();
|
|
3277
|
+
let payload;
|
|
3278
|
+
try {
|
|
3279
|
+
const result = await (0, test_controller_1.queryUpstreamTraffic)(client, params, options);
|
|
3280
|
+
if ('success' in result && result.success === true) {
|
|
3281
|
+
payload = result;
|
|
3282
|
+
}
|
|
3283
|
+
else {
|
|
3284
|
+
const errResult = result;
|
|
3285
|
+
const message = errResult.error_detail
|
|
3286
|
+
? `${errResult.error ?? 'controller_error'}: ${errResult.error_detail}`
|
|
3287
|
+
: (errResult.error ?? 'controller returned a non-success response');
|
|
3288
|
+
payload = { error: message };
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3291
|
+
catch (err) {
|
|
3292
|
+
payload = { error: err instanceof Error ? err.message : String(err) };
|
|
3293
|
+
}
|
|
3294
|
+
const responseRecord = {
|
|
3295
|
+
transport: options.protocol === 'a2a' ? 'a2a' : 'mcp',
|
|
3296
|
+
payload: (0, redact_secrets_1.redactSecrets)(payload),
|
|
3297
|
+
duration_ms: Date.now() - startMs,
|
|
3298
|
+
};
|
|
3299
|
+
queries.set(sinceTs, { request: requestRecord, response: responseRecord, payload });
|
|
3300
|
+
}
|
|
3301
|
+
return {
|
|
3302
|
+
advertised: true,
|
|
3303
|
+
queries,
|
|
3304
|
+
thisStepSince: requestStartIso,
|
|
3305
|
+
...(priorStepSinceMap.size > 0 ? { priorStepSinceMap } : {}),
|
|
3306
|
+
...(unresolvedSinceRefs.size > 0 ? { unresolvedSinceRefs } : {}),
|
|
3307
|
+
};
|
|
3308
|
+
}
|
|
2620
3309
|
/**
|
|
2621
3310
|
* Find any "$context.xxx" strings that weren't resolved during injection.
|
|
3311
|
+
* Returns one entry per occurrence with both the bare key (for legacy
|
|
3312
|
+
* detail-string formatting) and the full token (for the
|
|
3313
|
+
* `unresolved_substitution` validation result's `expected` field, per
|
|
3314
|
+
* runner-output-contract.yaml v2.0.0).
|
|
2622
3315
|
*/
|
|
2623
3316
|
function findUnresolvedContextVars(obj) {
|
|
2624
3317
|
const vars = [];
|
|
@@ -2626,7 +3319,7 @@ function findUnresolvedContextVars(obj) {
|
|
|
2626
3319
|
if (typeof val === 'string') {
|
|
2627
3320
|
const match = val.match(/^\$context\.(\w+)$/);
|
|
2628
3321
|
if (match?.[1])
|
|
2629
|
-
vars.push(match[1]);
|
|
3322
|
+
vars.push({ key: match[1], token: val });
|
|
2630
3323
|
}
|
|
2631
3324
|
else if (Array.isArray(val)) {
|
|
2632
3325
|
val.forEach(walk);
|
|
@@ -2696,6 +3389,36 @@ function createDispatcher(agentUrls, clients, _strategy, startOffset = 0) {
|
|
|
2696
3389
|
},
|
|
2697
3390
|
};
|
|
2698
3391
|
}
|
|
3392
|
+
/**
|
|
3393
|
+
* Per-specialism routing dispatcher (#1066). Picks the agent that claims
|
|
3394
|
+
* each step's tool's protocol via the routing context. Throws
|
|
3395
|
+
* `RoutingError` mid-step when no route can be determined; the runner's
|
|
3396
|
+
* step loop catches and converts to a synthetic `unroutable_task` skip.
|
|
3397
|
+
*
|
|
3398
|
+
* `instanceIndex` reflects the agent key's insertion order in the map —
|
|
3399
|
+
* deterministic and matches the index used for downstream `agent_urls`
|
|
3400
|
+
* exposure on the storyboard result.
|
|
3401
|
+
*/
|
|
3402
|
+
function createRoutingDispatcher(ctx, options, agents) {
|
|
3403
|
+
const keyOrder = Object.keys(agents);
|
|
3404
|
+
const keyToIndex = new Map(keyOrder.map((k, i) => [k, i]));
|
|
3405
|
+
return {
|
|
3406
|
+
nextFor(step) {
|
|
3407
|
+
const key = (0, agent_routing_1.resolveAgentForStep)(step, options, ctx);
|
|
3408
|
+
const client = ctx.clients.get(key);
|
|
3409
|
+
const url = agents[key]?.url;
|
|
3410
|
+
if (!client || !url) {
|
|
3411
|
+
throw new agent_routing_1.RoutingError(`Internal: resolved agent key "${key}" has no client/url. ` +
|
|
3412
|
+
`This indicates a bug in routing-context construction.`, step.task, `key ${key} unbound`);
|
|
3413
|
+
}
|
|
3414
|
+
return {
|
|
3415
|
+
client,
|
|
3416
|
+
agentUrl: url,
|
|
3417
|
+
instanceIndex: keyToIndex.get(key) ?? 0,
|
|
3418
|
+
};
|
|
3419
|
+
},
|
|
3420
|
+
};
|
|
3421
|
+
}
|
|
2699
3422
|
const HORIZONTAL_SCALING_DOCS_URL = 'https://adcontextprotocol.org/docs/building/validate-your-agent#verifying-cross-instance-state';
|
|
2700
3423
|
const NOT_FOUND_PATTERN = /not[_ ]found|not-found|\b404\b/i;
|
|
2701
3424
|
// Agent-controlled text (error messages, response payloads) lands in terminal
|