@adcp/sdk 5.25.1 → 6.1.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/README.md +45 -7
- package/dist/lib/compliance-fixtures/index.d.ts +1 -1
- package/dist/lib/compliance-fixtures/index.js +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +27 -0
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/TaskExecutor.d.ts +21 -0
- package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
- package/dist/lib/core/TaskExecutor.js +25 -2
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +7 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/schemas/index.d.ts +1 -1
- package/dist/lib/schemas/index.js +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +8 -0
- package/dist/lib/schemas-data/v2.5/adagents.json +494 -0
- package/dist/lib/schemas-data/v2.5/core/activation-key.json +50 -0
- package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +32 -0
- package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +87 -0
- package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +38 -0
- package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +31 -0
- package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +26 -0
- package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +87 -0
- package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +44 -0
- package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +71 -0
- package/dist/lib/schemas-data/v2.5/core/async-response-data.json +88 -0
- package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +33 -0
- package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +409 -0
- package/dist/lib/schemas-data/v2.5/core/context.json +8 -0
- package/dist/lib/schemas-data/v2.5/core/creative-asset.json +125 -0
- package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +31 -0
- package/dist/lib/schemas-data/v2.5/core/creative-filters.json +111 -0
- package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +72 -0
- package/dist/lib/schemas-data/v2.5/core/creative-policy.json +27 -0
- package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +171 -0
- package/dist/lib/schemas-data/v2.5/core/deployment.json +93 -0
- package/dist/lib/schemas-data/v2.5/core/destination.json +53 -0
- package/dist/lib/schemas-data/v2.5/core/error.json +40 -0
- package/dist/lib/schemas-data/v2.5/core/ext.json +8 -0
- package/dist/lib/schemas-data/v2.5/core/format-id.json +47 -0
- package/dist/lib/schemas-data/v2.5/core/format.json +324 -0
- package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +18 -0
- package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +152 -0
- package/dist/lib/schemas-data/v2.5/core/measurement.json +48 -0
- package/dist/lib/schemas-data/v2.5/core/media-buy.json +62 -0
- package/dist/lib/schemas-data/v2.5/core/package.json +72 -0
- package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +90 -0
- package/dist/lib/schemas-data/v2.5/core/placement.json +34 -0
- package/dist/lib/schemas-data/v2.5/core/pricing-option.json +35 -0
- package/dist/lib/schemas-data/v2.5/core/product-filters.json +102 -0
- package/dist/lib/schemas-data/v2.5/core/product.json +153 -0
- package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +115 -0
- package/dist/lib/schemas-data/v2.5/core/promoted-products.json +67 -0
- package/dist/lib/schemas-data/v2.5/core/property-id.json +14 -0
- package/dist/lib/schemas-data/v2.5/core/property-tag.json +16 -0
- package/dist/lib/schemas-data/v2.5/core/property.json +62 -0
- package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +146 -0
- package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +92 -0
- package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +48 -0
- package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +71 -0
- package/dist/lib/schemas-data/v2.5/core/response.json +24 -0
- package/dist/lib/schemas-data/v2.5/core/signal-filters.json +35 -0
- package/dist/lib/schemas-data/v2.5/core/start-timing.json +18 -0
- package/dist/lib/schemas-data/v2.5/core/sub-asset.json +79 -0
- package/dist/lib/schemas-data/v2.5/core/targeting.json +50 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +43 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +166 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +192 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +183 -0
- package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +101 -0
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +73 -0
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +61 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +164 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +245 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-render.json +225 -0
- package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +22 -0
- package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/available-metric.json +18 -0
- package/dist/lib/schemas-data/v2.5/enums/channels.json +18 -0
- package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-action.json +14 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +15 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-status.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +20 -0
- package/dist/lib/schemas-data/v2.5/enums/daast-version.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +15 -0
- package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/feed-format.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/format-category.json +16 -0
- package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/http-method.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +34 -0
- package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/metric-type.json +17 -0
- package/dist/lib/schemas-data/v2.5/enums/notification-type.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/pacing.json +17 -0
- package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +25 -0
- package/dist/lib/schemas-data/v2.5/enums/property-type.json +16 -0
- package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +103 -0
- package/dist/lib/schemas-data/v2.5/enums/task-status.json +29 -0
- package/dist/lib/schemas-data/v2.5/enums/task-type.json +27 -0
- package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +25 -0
- package/dist/lib/schemas-data/v2.5/enums/vast-version.json +14 -0
- package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +12 -0
- package/dist/lib/schemas-data/v2.5/index.json +604 -0
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +31 -0
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +65 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +31 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +36 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +126 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +97 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +54 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +285 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +38 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +21 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +34 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +28 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +33 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +26 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +70 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +58 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +61 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +137 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +437 -0
- package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +80 -0
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +88 -0
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +66 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +25 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +46 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +178 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +149 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +24 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +36 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +129 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +99 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +81 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +73 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +88 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +93 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +81 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +33 -0
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +32 -0
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +68 -0
- package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +59 -0
- package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +100 -0
- package/dist/lib/server/create-adcp-server.d.ts +129 -11
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +127 -2
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/ctx-metadata/backends/memory.d.ts +27 -0
- package/dist/lib/server/ctx-metadata/backends/memory.d.ts.map +1 -0
- package/dist/lib/server/ctx-metadata/backends/memory.js +72 -0
- package/dist/lib/server/ctx-metadata/backends/memory.js.map +1 -0
- package/dist/lib/server/ctx-metadata/backends/pg.d.ts +62 -0
- package/dist/lib/server/ctx-metadata/backends/pg.d.ts.map +1 -0
- package/dist/lib/server/ctx-metadata/backends/pg.js +145 -0
- package/dist/lib/server/ctx-metadata/backends/pg.js.map +1 -0
- package/dist/lib/server/ctx-metadata/index.d.ts +15 -0
- package/dist/lib/server/ctx-metadata/index.d.ts.map +1 -0
- package/dist/lib/server/ctx-metadata/index.js +28 -0
- package/dist/lib/server/ctx-metadata/index.js.map +1 -0
- package/dist/lib/server/ctx-metadata/store.d.ts +177 -0
- package/dist/lib/server/ctx-metadata/store.d.ts.map +1 -0
- package/dist/lib/server/ctx-metadata/store.js +327 -0
- package/dist/lib/server/ctx-metadata/store.js.map +1 -0
- package/dist/lib/server/ctx-metadata/wire-shape.d.ts +55 -0
- package/dist/lib/server/ctx-metadata/wire-shape.d.ts.map +1 -0
- package/dist/lib/server/ctx-metadata/wire-shape.js +121 -0
- package/dist/lib/server/ctx-metadata/wire-shape.js.map +1 -0
- package/dist/lib/server/decisioning/account.d.ts +309 -0
- package/dist/lib/server/decisioning/account.d.ts.map +1 -0
- package/dist/lib/server/decisioning/account.js +102 -0
- package/dist/lib/server/decisioning/account.js.map +1 -0
- package/dist/lib/server/decisioning/admin-router.d.ts +75 -0
- package/dist/lib/server/decisioning/admin-router.d.ts.map +1 -0
- package/dist/lib/server/decisioning/admin-router.js +120 -0
- package/dist/lib/server/decisioning/admin-router.js.map +1 -0
- package/dist/lib/server/decisioning/assembly-helpers.d.ts +204 -0
- package/dist/lib/server/decisioning/assembly-helpers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/assembly-helpers.js +173 -0
- package/dist/lib/server/decisioning/assembly-helpers.js.map +1 -0
- package/dist/lib/server/decisioning/async-outcome.d.ts +154 -0
- package/dist/lib/server/decisioning/async-outcome.d.ts.map +1 -0
- package/dist/lib/server/decisioning/async-outcome.js +239 -0
- package/dist/lib/server/decisioning/async-outcome.js.map +1 -0
- package/dist/lib/server/decisioning/capabilities.d.ts +251 -0
- package/dist/lib/server/decisioning/capabilities.d.ts.map +1 -0
- package/dist/lib/server/decisioning/capabilities.js +16 -0
- package/dist/lib/server/decisioning/capabilities.js.map +1 -0
- package/dist/lib/server/decisioning/context.d.ts +212 -0
- package/dist/lib/server/decisioning/context.d.ts.map +1 -0
- package/dist/lib/server/decisioning/context.js +26 -0
- package/dist/lib/server/decisioning/context.js.map +1 -0
- package/dist/lib/server/decisioning/errors-typed.d.ts +104 -0
- package/dist/lib/server/decisioning/errors-typed.d.ts.map +1 -0
- package/dist/lib/server/decisioning/errors-typed.js +304 -0
- package/dist/lib/server/decisioning/errors-typed.js.map +1 -0
- package/dist/lib/server/decisioning/helpers.d.ts +131 -0
- package/dist/lib/server/decisioning/helpers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/helpers.js +134 -0
- package/dist/lib/server/decisioning/helpers.js.map +1 -0
- package/dist/lib/server/decisioning/index.d.ts +46 -0
- package/dist/lib/server/decisioning/index.d.ts.map +1 -0
- package/dist/lib/server/decisioning/index.js +120 -0
- package/dist/lib/server/decisioning/index.js.map +1 -0
- package/dist/lib/server/decisioning/list-helpers.d.ts +53 -0
- package/dist/lib/server/decisioning/list-helpers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/list-helpers.js +96 -0
- package/dist/lib/server/decisioning/list-helpers.js.map +1 -0
- package/dist/lib/server/decisioning/manifest-helpers.d.ts +56 -0
- package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/manifest-helpers.js +78 -0
- package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -0
- package/dist/lib/server/decisioning/pagination.d.ts +21 -0
- package/dist/lib/server/decisioning/pagination.d.ts.map +1 -0
- package/dist/lib/server/decisioning/pagination.js +12 -0
- package/dist/lib/server/decisioning/pagination.js.map +1 -0
- package/dist/lib/server/decisioning/platform.d.ts +188 -0
- package/dist/lib/server/decisioning/platform.d.ts.map +1 -0
- package/dist/lib/server/decisioning/platform.js +19 -0
- package/dist/lib/server/decisioning/platform.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +510 -0
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/from-platform.js +2196 -0
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.ts +114 -0
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.js +247 -0
- package/dist/lib/server/decisioning/runtime/postgres-task-registry.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.d.ts +32 -0
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.js +127 -0
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/task-registry.d.ts +105 -0
- package/dist/lib/server/decisioning/runtime/task-registry.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/task-registry.js +96 -0
- package/dist/lib/server/decisioning/runtime/task-registry.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/to-context.d.ts +54 -0
- package/dist/lib/server/decisioning/runtime/to-context.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/to-context.js +166 -0
- package/dist/lib/server/decisioning/runtime/to-context.js.map +1 -0
- package/dist/lib/server/decisioning/runtime/validate-platform.d.ts +20 -0
- package/dist/lib/server/decisioning/runtime/validate-platform.d.ts.map +1 -0
- package/dist/lib/server/decisioning/runtime/validate-platform.js +93 -0
- package/dist/lib/server/decisioning/runtime/validate-platform.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/audiences.d.ts +72 -0
- package/dist/lib/server/decisioning/specialisms/audiences.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/audiences.js +15 -0
- package/dist/lib/server/decisioning/specialisms/audiences.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts +92 -0
- package/dist/lib/server/decisioning/specialisms/brand-rights.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/brand-rights.js +28 -0
- package/dist/lib/server/decisioning/specialisms/brand-rights.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/campaign-governance.d.ts +67 -0
- package/dist/lib/server/decisioning/specialisms/campaign-governance.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/campaign-governance.js +31 -0
- package/dist/lib/server/decisioning/specialisms/campaign-governance.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/content-standards.d.ts +78 -0
- package/dist/lib/server/decisioning/specialisms/content-standards.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/content-standards.js +35 -0
- package/dist/lib/server/decisioning/specialisms/content-standards.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts +81 -0
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.js +28 -0
- package/dist/lib/server/decisioning/specialisms/creative-ad-server.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/creative.d.ts +144 -0
- package/dist/lib/server/decisioning/specialisms/creative.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/creative.js +19 -0
- package/dist/lib/server/decisioning/specialisms/creative.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/lists.d.ts +61 -0
- package/dist/lib/server/decisioning/specialisms/lists.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/lists.js +30 -0
- package/dist/lib/server/decisioning/specialisms/lists.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/sales.d.ts +163 -0
- package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/sales.js +64 -0
- package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -0
- package/dist/lib/server/decisioning/specialisms/signals.d.ts +64 -0
- package/dist/lib/server/decisioning/specialisms/signals.d.ts.map +1 -0
- package/dist/lib/server/decisioning/specialisms/signals.js +28 -0
- package/dist/lib/server/decisioning/specialisms/signals.js.map +1 -0
- package/dist/lib/server/decisioning/start-time.d.ts +76 -0
- package/dist/lib/server/decisioning/start-time.d.ts.map +1 -0
- package/dist/lib/server/decisioning/start-time.js +81 -0
- package/dist/lib/server/decisioning/start-time.js.map +1 -0
- package/dist/lib/server/decisioning/status-changes.d.ts +165 -0
- package/dist/lib/server/decisioning/status-changes.d.ts.map +1 -0
- package/dist/lib/server/decisioning/status-changes.js +131 -0
- package/dist/lib/server/decisioning/status-changes.js.map +1 -0
- package/dist/lib/server/decisioning/status-mappers.d.ts +46 -0
- package/dist/lib/server/decisioning/status-mappers.d.ts.map +1 -0
- package/dist/lib/server/decisioning/status-mappers.js +46 -0
- package/dist/lib/server/decisioning/status-mappers.js.map +1 -0
- package/dist/lib/server/decisioning/tenant-registry.d.ts +289 -0
- package/dist/lib/server/decisioning/tenant-registry.d.ts.map +1 -0
- package/dist/lib/server/decisioning/tenant-registry.js +503 -0
- package/dist/lib/server/decisioning/tenant-registry.js.map +1 -0
- package/dist/lib/server/express-adapter.d.ts +1 -1
- package/dist/lib/server/express-adapter.js +1 -1
- package/dist/lib/server/governance.d.ts +1 -1
- package/dist/lib/server/governance.js +1 -1
- package/dist/lib/server/idempotency/store.d.ts +1 -1
- package/dist/lib/server/idempotency/store.js +1 -1
- package/dist/lib/server/index.d.ts +9 -2
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +79 -4
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/legacy/v5/index.d.ts +38 -0
- package/dist/lib/server/legacy/v5/index.d.ts.map +1 -0
- package/dist/lib/server/legacy/v5/index.js +60 -0
- package/dist/lib/server/legacy/v5/index.js.map +1 -0
- package/dist/lib/server/normalize-errors.d.ts +88 -0
- package/dist/lib/server/normalize-errors.d.ts.map +1 -0
- package/dist/lib/server/normalize-errors.js +146 -0
- package/dist/lib/server/normalize-errors.js.map +1 -0
- package/dist/lib/server/pick-safe-details.d.ts +90 -0
- package/dist/lib/server/pick-safe-details.d.ts.map +1 -0
- package/dist/lib/server/pick-safe-details.js +148 -0
- package/dist/lib/server/pick-safe-details.js.map +1 -0
- package/dist/lib/server/postgres-state-store.d.ts +1 -1
- package/dist/lib/server/postgres-state-store.js +1 -1
- package/dist/lib/server/responses.d.ts +38 -0
- package/dist/lib/server/responses.d.ts.map +1 -1
- package/dist/lib/server/responses.js +38 -0
- package/dist/lib/server/responses.js.map +1 -1
- package/dist/lib/server/state-store.d.ts +1 -1
- package/dist/lib/server/state-store.js +1 -1
- package/dist/lib/server/test-controller.d.ts +10 -3
- package/dist/lib/server/test-controller.d.ts.map +1 -1
- package/dist/lib/server/test-controller.js +10 -3
- package/dist/lib/server/test-controller.js.map +1 -1
- package/dist/lib/testing/comply-controller.d.ts +47 -1
- package/dist/lib/testing/comply-controller.d.ts.map +1 -1
- package/dist/lib/testing/comply-controller.js +11 -4
- package/dist/lib/testing/comply-controller.js.map +1 -1
- package/dist/lib/testing/index.d.ts +1 -1
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/personas/index.d.ts +143 -0
- package/dist/lib/testing/personas/index.d.ts.map +1 -0
- package/dist/lib/testing/personas/index.js +190 -0
- package/dist/lib/testing/personas/index.js.map +1 -0
- 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 +3 -2
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts +13 -0
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +260 -7
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/types/asset-instances.d.ts +1 -0
- package/dist/lib/types/asset-instances.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +203 -98
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/lib/types/index.js.map +1 -1
- package/dist/lib/types/schemas.generated.d.ts +599 -159
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +175 -94
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +315 -46
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/utils/capabilities.d.ts +1 -1
- package/dist/lib/utils/capabilities.d.ts.map +1 -1
- package/dist/lib/utils/capabilities.js +6 -0
- package/dist/lib/utils/capabilities.js.map +1 -1
- package/dist/lib/utils/creative-adapter.d.ts +32 -2
- package/dist/lib/utils/creative-adapter.d.ts.map +1 -1
- package/dist/lib/utils/creative-adapter.js +42 -6
- package/dist/lib/utils/creative-adapter.js.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +20 -2
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/validation/schema-validator.d.ts +13 -0
- package/dist/lib/validation/schema-validator.d.ts.map +1 -1
- package/dist/lib/validation/schema-validator.js +240 -3
- package/dist/lib/validation/schema-validator.js.map +1 -1
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.js.map +1 -1
- package/docs/guides/BUILD-AN-AGENT.md +30 -5
- package/docs/llms.txt +28 -17
- package/examples/README.md +3 -1
- package/examples/decisioning-platform-broadcast-tv.ts +300 -0
- package/examples/decisioning-platform-identity-graph.ts +214 -0
- package/examples/decisioning-platform-mock-seller.ts +332 -0
- package/examples/decisioning-platform-multi-tenant.ts +128 -0
- package/examples/decisioning-platform-programmatic.ts +254 -0
- package/examples/signals-agent.ts +1 -1
- package/package.json +18 -5
- package/skills/build-brand-rights-agent/SKILL.md +10 -3
- package/skills/build-creative-agent/SKILL.md +94 -64
- package/skills/build-decisioning-creative-template/SKILL.md +554 -0
- package/skills/build-decisioning-platform/SKILL.md +304 -0
- package/skills/build-decisioning-platform/advanced/BRAND-RIGHTS.md +25 -0
- package/skills/build-decisioning-platform/advanced/COMPLIANCE.md +23 -0
- package/skills/build-decisioning-platform/advanced/GOVERNANCE.md +24 -0
- package/skills/build-decisioning-platform/advanced/HITL.md +34 -0
- package/skills/build-decisioning-platform/advanced/IDEMPOTENCY.md +52 -0
- package/skills/build-decisioning-platform/advanced/MULTI-TENANT.md +47 -0
- package/skills/build-decisioning-platform/advanced/OAUTH.md +22 -0
- package/skills/build-decisioning-platform/advanced/REFERENCE.md +991 -0
- package/skills/build-decisioning-platform/advanced/SANDBOX.md +24 -0
- package/skills/build-decisioning-platform/advanced/STATE-MACHINE.md +52 -0
- package/skills/build-decisioning-signal-marketplace/SKILL.md +269 -0
- package/skills/build-generative-seller-agent/SKILL.md +89 -53
- package/skills/build-governance-agent/SKILL.md +76 -45
- package/skills/build-retail-media-agent/SKILL.md +87 -62
- package/skills/build-seller-agent/SKILL.md +384 -255
- package/skills/build-seller-agent/deployment.md +5 -3
- package/skills/build-seller-agent/specialisms/audience-sync.md +0 -2
- package/skills/build-seller-agent/specialisms/sales-broadcast-tv.md +0 -2
- package/skills/build-seller-agent/specialisms/sales-guaranteed.md +0 -2
- package/skills/build-seller-agent/specialisms/sales-non-guaranteed.md +0 -2
- package/skills/build-seller-agent/specialisms/sales-proposal-mode.md +0 -2
- package/skills/build-seller-agent/specialisms/sales-social.md +0 -2
- package/skills/build-seller-agent/specialisms/signed-requests.md +0 -2
- package/skills/build-si-agent/SKILL.md +40 -32
- package/skills/build-signals-agent/SKILL.md +139 -92
- package/skills/call-adcp-agent.previous/SKILL.md +5 -0
|
@@ -12,6 +12,7 @@ exports.__redactSecretsForTest = __redactSecretsForTest;
|
|
|
12
12
|
exports.__filterResponseHeadersForTest = __filterResponseHeadersForTest;
|
|
13
13
|
exports.__defaultAuthHeadersForRawProbeForTest = __defaultAuthHeadersForRawProbeForTest;
|
|
14
14
|
exports.runStoryboard = runStoryboard;
|
|
15
|
+
exports.buildDiscoveryFailedResult = buildDiscoveryFailedResult;
|
|
15
16
|
exports.listStrictOnlyFailures = listStrictOnlyFailures;
|
|
16
17
|
exports.summarizeStrictValidation = summarizeStrictValidation;
|
|
17
18
|
exports.runStoryboardStep = runStoryboardStep;
|
|
@@ -88,6 +89,27 @@ function resolveCapabilityPath(raw, dottedPath) {
|
|
|
88
89
|
function buildSkip(reason, detail) {
|
|
89
90
|
return { reason, detail: detail ?? SKIP_DETAILS[reason] };
|
|
90
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* True for skip reasons that imply state genuinely never materialized
|
|
94
|
+
* — no other code path could have established it. The runner trips
|
|
95
|
+
* the cascade immediately on these. `missing_tool` and
|
|
96
|
+
* `missing_test_controller` qualify: the agent doesn't advertise the
|
|
97
|
+
* tool, end of story.
|
|
98
|
+
*
|
|
99
|
+
* `not_applicable` is intentionally NOT in this set even though F6's
|
|
100
|
+
* first cut bundled it in. `not_applicable` means "this path doesn't
|
|
101
|
+
* apply to this agent", which is consistent with "a peer path in the
|
|
102
|
+
* same phase establishes equivalent state" — e.g. an explicit-mode
|
|
103
|
+
* seller skips `sync_accounts` as not_applicable because
|
|
104
|
+
* `list_accounts` is the canonical alternative for that account
|
|
105
|
+
* shape. Tripping the cascade on the first not_applicable would
|
|
106
|
+
* collapse this distinction and skip the substitute. The runner
|
|
107
|
+
* therefore defers `not_applicable`'s cascade decision to phase end —
|
|
108
|
+
* see `phasePendingNotApplicable` handling in the phase loop.
|
|
109
|
+
*/
|
|
110
|
+
function isHardMissingStateSkipReason(reason) {
|
|
111
|
+
return reason === 'missing_tool' || reason === 'missing_test_controller';
|
|
112
|
+
}
|
|
91
113
|
/**
|
|
92
114
|
* Resolve each phase's branch-set membership, combining explicit
|
|
93
115
|
* `branch_set: { id, semantics }` declarations with the implicit detection
|
|
@@ -383,6 +405,63 @@ function buildCapabilityUnsupportedResult(agentUrls, storyboard, detail) {
|
|
|
383
405
|
},
|
|
384
406
|
};
|
|
385
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* Build a hard-failure StoryboardResult for when agent capability
|
|
410
|
+
* discovery (`get_agent_info` / MCP `tools/list`) failed. Surfacing
|
|
411
|
+
* discovery errors as a hard storyboard failure prevents the silent
|
|
412
|
+
* "X/X clean, 100% skipped" failure mode where transport / auth
|
|
413
|
+
* misconfiguration produced an empty `agentTools: []` and every step
|
|
414
|
+
* skipped with `missing_tool`.
|
|
415
|
+
*
|
|
416
|
+
* @public — exported for direct testing of the failure-result shape;
|
|
417
|
+
* called from `runStoryboard` when discovery throws.
|
|
418
|
+
*/
|
|
419
|
+
function buildDiscoveryFailedResult(agentUrls, storyboard, discoveryStep) {
|
|
420
|
+
const detail = discoveryStep.error ?? 'Discovery failed (no agent tools advertised).';
|
|
421
|
+
const syntheticStep = {
|
|
422
|
+
storyboard_id: storyboard.id,
|
|
423
|
+
step_id: 'discovery_failed',
|
|
424
|
+
phase_id: 'discovery_failed',
|
|
425
|
+
title: 'Storyboard failed: agent capability discovery did not succeed',
|
|
426
|
+
task: '',
|
|
427
|
+
passed: false,
|
|
428
|
+
skipped: false,
|
|
429
|
+
duration_ms: discoveryStep.duration_ms,
|
|
430
|
+
validations: [],
|
|
431
|
+
context: {},
|
|
432
|
+
error: `Discovery failure: ${detail}. The runner refuses to proceed with empty agentTools — that mode produces silent "all clean" reports when the underlying transport / auth / network policy is broken. Fix the discovery error before re-running.`,
|
|
433
|
+
extraction: { path: 'none' },
|
|
434
|
+
};
|
|
435
|
+
return {
|
|
436
|
+
storyboard_id: storyboard.id,
|
|
437
|
+
storyboard_title: storyboard.title,
|
|
438
|
+
agent_url: agentUrls[0],
|
|
439
|
+
overall_passed: false,
|
|
440
|
+
phases: [
|
|
441
|
+
{
|
|
442
|
+
phase_id: 'discovery_failed',
|
|
443
|
+
phase_title: 'Discovery failed',
|
|
444
|
+
passed: false,
|
|
445
|
+
steps: [syntheticStep],
|
|
446
|
+
duration_ms: discoveryStep.duration_ms,
|
|
447
|
+
},
|
|
448
|
+
],
|
|
449
|
+
context: {},
|
|
450
|
+
total_duration_ms: discoveryStep.duration_ms,
|
|
451
|
+
passed_count: 0,
|
|
452
|
+
failed_count: 1,
|
|
453
|
+
skipped_count: 0,
|
|
454
|
+
tested_at: new Date().toISOString(),
|
|
455
|
+
strict_validation_summary: {
|
|
456
|
+
observable: false,
|
|
457
|
+
checked: 0,
|
|
458
|
+
passed: 0,
|
|
459
|
+
failed: 0,
|
|
460
|
+
strict_only_failures: 0,
|
|
461
|
+
lenient_also_failed: 0,
|
|
462
|
+
},
|
|
463
|
+
};
|
|
464
|
+
}
|
|
386
465
|
/**
|
|
387
466
|
* Build a minimal StoryboardResult for a storyboard skipped because the agent
|
|
388
467
|
* does not advertise any of the tools listed in `required_tools`. The result
|
|
@@ -460,10 +539,26 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
460
539
|
let profile;
|
|
461
540
|
if (!options._client) {
|
|
462
541
|
const discovered = await (0, client_1.getOrDiscoverProfile)(clients[0], options);
|
|
542
|
+
// Discovery failure must surface as a HARD STORYBOARD FAILURE, not a
|
|
543
|
+
// silent empty `agentTools: []` that lets every step skip with
|
|
544
|
+
// `missing_tool`. The latter mode produces "X/X clean" summaries with
|
|
545
|
+
// 100% skipped — invisible CI failure when transport setup is broken
|
|
546
|
+
// (auth misconfig, MCP transport-fallback bugs, network policy, etc.).
|
|
547
|
+
// See: https://github.com/adcontextprotocol/adcp-client/issues/...
|
|
548
|
+
if (discovered.step.passed === false) {
|
|
549
|
+
if (!options._client)
|
|
550
|
+
await (0, protocols_1.closeConnections)(options.protocol);
|
|
551
|
+
return buildDiscoveryFailedResult(agentUrls, storyboard, discovered.step);
|
|
552
|
+
}
|
|
463
553
|
profile = discovered.profile;
|
|
464
|
-
// Populate agentTools from discovered profile if not already set
|
|
554
|
+
// Populate agentTools and _profile from discovered profile if not already set.
|
|
555
|
+
// _profile is threaded into executeStep so capability-based skip gates
|
|
556
|
+
// (e.g. account-mode branching) can read raw_capabilities at step time.
|
|
465
557
|
if (!options.agentTools && profile?.tools) {
|
|
466
|
-
options = { ...options, agentTools: profile.tools };
|
|
558
|
+
options = { ...options, agentTools: profile.tools, _profile: profile };
|
|
559
|
+
}
|
|
560
|
+
else if (profile && !options._profile) {
|
|
561
|
+
options = { ...options, _profile: profile };
|
|
467
562
|
}
|
|
468
563
|
}
|
|
469
564
|
else {
|
|
@@ -533,6 +628,14 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
533
628
|
let passedCount = 0;
|
|
534
629
|
let failedCount = 0;
|
|
535
630
|
let skippedCount = 0;
|
|
631
|
+
// Stateful-cascade flags live at storyboard scope, NOT phase scope —
|
|
632
|
+
// cross-phase storyboards (e.g. signal_marketplace/governance_denied:
|
|
633
|
+
// setup in phases 1-2, consumption in phase 3) need the cascade to
|
|
634
|
+
// survive phase boundaries. Once a stateful step in any phase failed
|
|
635
|
+
// or skipped to materialize state, every downstream stateful step
|
|
636
|
+
// stays cascade-skipped regardless of which phase it lives in.
|
|
637
|
+
let statefulFailed = false;
|
|
638
|
+
let statefulSkipTrigger = null;
|
|
536
639
|
// Step results whose failures the main loop added to failedCount. The
|
|
537
640
|
// branch-set post-pass decrements only for entries that were actually
|
|
538
641
|
// counted, so an optional phase that hit `presenceDetected` (a PRM 2xx
|
|
@@ -681,7 +784,22 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
681
784
|
const phaseStart = Date.now();
|
|
682
785
|
const stepResults = [];
|
|
683
786
|
let phasePassed = true;
|
|
684
|
-
|
|
787
|
+
// `statefulFailed` and `statefulSkipTrigger` live at storyboard
|
|
788
|
+
// scope (declared above the phase loop) so the cascade survives
|
|
789
|
+
// cross-phase setup → assertion patterns. See declaration site for
|
|
790
|
+
// the rationale (signal_marketplace/governance_denied story).
|
|
791
|
+
//
|
|
792
|
+
// Phase-scoped substitution tracking (adcp-client#1005, round-9).
|
|
793
|
+
// A `not_applicable` skip on a stateful step doesn't mean state
|
|
794
|
+
// never materialized — it means *this* path doesn't apply, and the
|
|
795
|
+
// storyboard may have a peer step (e.g. `list_accounts` paired
|
|
796
|
+
// with `sync_accounts`) that establishes equivalent state. We
|
|
797
|
+
// record the trigger and defer the cascade decision to phase end:
|
|
798
|
+
// if any stateful step in this phase passed, the substitute did
|
|
799
|
+
// its job and we don't trip. If none did, we promote the pending
|
|
800
|
+
// trigger to a hard cascade so downstream phases skip cleanly.
|
|
801
|
+
let phasePendingNotApplicable = null;
|
|
802
|
+
let phaseEstablishedStatefulState = false;
|
|
685
803
|
// PRM presence-probe state (adcp-client#677). `phaseAbsent` flips when
|
|
686
804
|
// /.well-known/oauth-protected-resource returns 404 — subsequent steps
|
|
687
805
|
// in this phase cascade-skip instead of failing their http_status:200
|
|
@@ -767,9 +885,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
767
885
|
skippedCount++;
|
|
768
886
|
continue;
|
|
769
887
|
}
|
|
770
|
-
// Skip remaining steps if a stateful dependency failed
|
|
888
|
+
// Skip remaining steps if a stateful dependency failed (or
|
|
889
|
+
// skipped for a missing-state reason). The detail message
|
|
890
|
+
// distinguishes the two so adopters reading the cascade know
|
|
891
|
+
// whether to look at a real failure or a structural mismatch
|
|
892
|
+
// (storyboard step requires a tool the agent doesn't advertise).
|
|
771
893
|
if (statefulFailed && step.stateful) {
|
|
772
|
-
const detail =
|
|
894
|
+
const detail = statefulSkipTrigger
|
|
895
|
+
? `Skipped: prior stateful step "${statefulSkipTrigger.stepId}" skipped (${statefulSkipTrigger.reason}); state never materialized.`
|
|
896
|
+
: 'Skipped: prior stateful step failed.';
|
|
773
897
|
stepResults.push({
|
|
774
898
|
storyboard_id: storyboard.id,
|
|
775
899
|
step_id: step.id,
|
|
@@ -874,10 +998,73 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
874
998
|
if (result.skipped) {
|
|
875
999
|
skippedCount++;
|
|
876
1000
|
context = result.context;
|
|
1001
|
+
// Cascade-skip extension: a stateful step that SKIPS because the
|
|
1002
|
+
// agent simply lacks the tool (`missing_tool`,
|
|
1003
|
+
// `missing_test_controller`) is equivalent to a failed stateful
|
|
1004
|
+
// step — state genuinely never materialized. Trip immediately so
|
|
1005
|
+
// downstream stateful steps skip with `prerequisite_failed`
|
|
1006
|
+
// instead of running against absent state and surfacing a
|
|
1007
|
+
// misleading assertion failure.
|
|
1008
|
+
//
|
|
1009
|
+
// `not_applicable` is handled separately (adcp-client#1005,
|
|
1010
|
+
// round-9). It signals "this path doesn't apply to this agent",
|
|
1011
|
+
// and the storyboard may have a peer step in the same phase
|
|
1012
|
+
// that establishes equivalent state — e.g. an explicit-mode
|
|
1013
|
+
// seller's `list_accounts` substituting for `sync_accounts`.
|
|
1014
|
+
// We record a pending trigger and let the rest of the phase
|
|
1015
|
+
// run; the cascade decision is finalized at phase end based on
|
|
1016
|
+
// whether any stateful peer passed.
|
|
1017
|
+
//
|
|
1018
|
+
// Skips that imply state DID materialize via another path
|
|
1019
|
+
// (`peer_branch_taken`, `controller_seeding_failed` — handled
|
|
1020
|
+
// by phase-level cascade, `oauth_not_advertised` — phase-absent
|
|
1021
|
+
// path) deliberately don't trip the flag.
|
|
1022
|
+
if (step.stateful) {
|
|
1023
|
+
if (isHardMissingStateSkipReason(result.skip_reason)) {
|
|
1024
|
+
statefulFailed = true;
|
|
1025
|
+
// Record provenance for the cascade detail message. First trip
|
|
1026
|
+
// wins — subsequent triggers don't overwrite, since the cascade
|
|
1027
|
+
// text references the originating diagnostic (the leftmost
|
|
1028
|
+
// missing-state stateful step in the phase).
|
|
1029
|
+
if (statefulSkipTrigger === null) {
|
|
1030
|
+
statefulSkipTrigger = { stepId: step.id, reason: result.skip_reason ?? 'missing_tool' };
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
else if (result.skip_reason === 'not_applicable') {
|
|
1034
|
+
// Defer cascade decision until end of phase. Applies the
|
|
1035
|
+
// same first-wins rule used for `statefulSkipTrigger`: the
|
|
1036
|
+
// eventual cascade-detail message references the leftmost
|
|
1037
|
+
// not_applicable step in the phase.
|
|
1038
|
+
//
|
|
1039
|
+
// Scope note: this branch matches the canonical literal
|
|
1040
|
+
// `'not_applicable'` only. Detailed-form skip reasons that
|
|
1041
|
+
// canonicalize to not_applicable (`probe_skipped`,
|
|
1042
|
+
// `not_in_only_vectors`, `grader_skipped`,
|
|
1043
|
+
// `mcp_mode_flattens_url_edges`) carry the detailed form
|
|
1044
|
+
// on `result.skip_reason` and do NOT enter the deferred
|
|
1045
|
+
// path — they preserve the pre-fix behavior of not
|
|
1046
|
+
// tripping the cascade. `oauth_not_advertised` is handled
|
|
1047
|
+
// by the separate `phaseAbsent` code path before this
|
|
1048
|
+
// branch is reached. If a future detailed reason should
|
|
1049
|
+
// participate in substitute-aware deferral, extend this
|
|
1050
|
+
// condition deliberately rather than assuming canonical
|
|
1051
|
+
// mapping is enough.
|
|
1052
|
+
if (phasePendingNotApplicable === null) {
|
|
1053
|
+
phasePendingNotApplicable = { stepId: step.id, reason: 'not_applicable' };
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
877
1057
|
}
|
|
878
1058
|
else if (result.passed) {
|
|
879
1059
|
context = result.context;
|
|
880
1060
|
passedCount++;
|
|
1061
|
+
// A passing stateful step counts as the phase establishing
|
|
1062
|
+
// state. If a sibling skipped not_applicable earlier (or skips
|
|
1063
|
+
// it later in the loop), this pass is the substitute path —
|
|
1064
|
+
// the deferred cascade should NOT fire at phase end.
|
|
1065
|
+
if (step.stateful) {
|
|
1066
|
+
phaseEstablishedStatefulState = true;
|
|
1067
|
+
}
|
|
881
1068
|
}
|
|
882
1069
|
else {
|
|
883
1070
|
phasePassed = false;
|
|
@@ -891,8 +1078,15 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
891
1078
|
failedCount++;
|
|
892
1079
|
countedAsFailed.add(result);
|
|
893
1080
|
}
|
|
894
|
-
if (step.stateful)
|
|
1081
|
+
if (step.stateful) {
|
|
895
1082
|
statefulFailed = true;
|
|
1083
|
+
// Real failure takes precedence over a prior skip-trigger in
|
|
1084
|
+
// the cascade detail message — failures are the worse
|
|
1085
|
+
// diagnostic, so downstream cascade-skipped steps should
|
|
1086
|
+
// reference the failure rather than the earlier benign-ish
|
|
1087
|
+
// missing-state skip.
|
|
1088
|
+
statefulSkipTrigger = null;
|
|
1089
|
+
}
|
|
896
1090
|
// In multi-instance mode, annotate the failure with the cross-instance
|
|
897
1091
|
// attribution block so CI readers pattern-match it as a deployment bug.
|
|
898
1092
|
if (isMultiInstance) {
|
|
@@ -900,6 +1094,22 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
900
1094
|
}
|
|
901
1095
|
}
|
|
902
1096
|
}
|
|
1097
|
+
// Phase-end cascade resolution for deferred `not_applicable` triggers.
|
|
1098
|
+
// If a stateful step skipped not_applicable earlier in this phase and
|
|
1099
|
+
// no stateful peer subsequently passed, the substitute path failed to
|
|
1100
|
+
// establish state — promote to a hard cascade so downstream phases
|
|
1101
|
+
// skip cleanly instead of running against absent state. A peer that
|
|
1102
|
+
// passed (e.g. `list_accounts` substituting for an explicit-mode
|
|
1103
|
+
// `sync_accounts`) cancels the trigger entirely. A peer that *failed*
|
|
1104
|
+
// already tripped `statefulFailed` at the failure site with the
|
|
1105
|
+
// worse-diagnostic real-failure message; we defer to that and don't
|
|
1106
|
+
// overwrite.
|
|
1107
|
+
if (phasePendingNotApplicable && !phaseEstablishedStatefulState && !statefulFailed) {
|
|
1108
|
+
statefulFailed = true;
|
|
1109
|
+
if (statefulSkipTrigger === null) {
|
|
1110
|
+
statefulSkipTrigger = phasePendingNotApplicable;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
903
1113
|
phaseResults.push({
|
|
904
1114
|
phase_id: phase.id,
|
|
905
1115
|
phase_title: phase.title,
|
|
@@ -1198,11 +1408,16 @@ async function runStoryboardStep(agentUrl, storyboard, stepId, options = {}) {
|
|
|
1198
1408
|
const client = (0, client_1.getOrCreateClient)(agentUrl, options);
|
|
1199
1409
|
// Discover agent profile for standalone step execution. Captured so the
|
|
1200
1410
|
// executeStep call below can thread `library_version` through to
|
|
1201
|
-
// shape-drift hint detection (issue #850).
|
|
1411
|
+
// shape-drift hint detection (issue #850). Also threads _profile into
|
|
1412
|
+
// options so capability-based skip gates in executeStep (e.g. account-mode
|
|
1413
|
+
// branching) can read raw_capabilities, mirroring executeStoryboardPass.
|
|
1202
1414
|
let profile;
|
|
1203
1415
|
if (!options._client) {
|
|
1204
1416
|
const discovered = await (0, client_1.getOrDiscoverProfile)(client, options);
|
|
1205
1417
|
profile = discovered.profile;
|
|
1418
|
+
if (profile && !options._profile) {
|
|
1419
|
+
options = { ...options, _profile: profile };
|
|
1420
|
+
}
|
|
1206
1421
|
}
|
|
1207
1422
|
else {
|
|
1208
1423
|
profile = options._profile;
|
|
@@ -1315,6 +1530,44 @@ client, step, phaseId, context, allSteps, options, state) {
|
|
|
1315
1530
|
extraction: { path: 'none' },
|
|
1316
1531
|
};
|
|
1317
1532
|
}
|
|
1533
|
+
// Account-mode capability gate: sync_accounts is exclusive to implicit mode
|
|
1534
|
+
// (require_operator_auth: false). When the seller declared explicit mode
|
|
1535
|
+
// (require_operator_auth: true), sync_accounts does not apply — grade
|
|
1536
|
+
// not_applicable rather than missing_tool so adopters can distinguish
|
|
1537
|
+
// "your capability declaration says this path isn't yours" from "you forgot
|
|
1538
|
+
// to implement a required tool."
|
|
1539
|
+
//
|
|
1540
|
+
// list_accounts is NOT gated here: it appears in audience_sync and other
|
|
1541
|
+
// storyboard flows regardless of account mode, so it is always applicable.
|
|
1542
|
+
//
|
|
1543
|
+
// Requires _profile threaded from the discovery block in
|
|
1544
|
+
// executeStoryboardPass or runStoryboardStep.
|
|
1545
|
+
if (effectiveStep.task === 'sync_accounts') {
|
|
1546
|
+
const rawCaps = options._profile?.raw_capabilities;
|
|
1547
|
+
if (rawCaps !== undefined) {
|
|
1548
|
+
const requireOperatorAuth = resolveCapabilityPath(rawCaps, 'account.require_operator_auth');
|
|
1549
|
+
if (requireOperatorAuth === true) {
|
|
1550
|
+
const detail = `Agent declared explicit account mode (require_operator_auth: true); ` +
|
|
1551
|
+
`sync_accounts is not applicable — list_accounts is the correct tool for this account shape.`;
|
|
1552
|
+
const next = getNextStepPreview(step.id, allSteps, context, runState.runnerVars);
|
|
1553
|
+
return {
|
|
1554
|
+
step_id: step.id,
|
|
1555
|
+
phase_id: phaseId,
|
|
1556
|
+
title: step.title,
|
|
1557
|
+
task: step.task,
|
|
1558
|
+
passed: true,
|
|
1559
|
+
skipped: true,
|
|
1560
|
+
skip_reason: 'not_applicable',
|
|
1561
|
+
skip: buildSkip('not_applicable', detail),
|
|
1562
|
+
duration_ms: 0,
|
|
1563
|
+
validations: [],
|
|
1564
|
+
context,
|
|
1565
|
+
next,
|
|
1566
|
+
extraction: { path: 'none' },
|
|
1567
|
+
};
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1318
1571
|
// Skip if agent doesn't implement the tool this step calls.
|
|
1319
1572
|
if (options.agentTools && !options.agentTools.includes(effectiveStep.task)) {
|
|
1320
1573
|
const next = getNextStepPreview(step.id, allSteps, context, runState.runnerVars);
|