@probelabs/visor 0.1.106 → 0.1.107
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 +65 -2
- package/action.yml +1 -1
- package/defaults/code-refiner.yaml +114 -0
- package/defaults/{.visor.yaml → code-review.yaml} +35 -226
- package/defaults/override.yaml +52 -0
- package/defaults/task-refinement.yaml +620 -0
- package/defaults/visor.tests.yaml +674 -0
- package/defaults/visor.yaml +482 -0
- package/dist/663.index.js +2 -3
- package/dist/80.index.js +2 -3
- package/dist/action-cli-bridge.d.ts +11 -82
- package/dist/action-cli-bridge.d.ts.map +1 -1
- package/dist/ai-review-service.d.ts +15 -0
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/check-execution-engine.d.ts +19 -331
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/cron-scheduler.d.ts +3 -3
- package/dist/cron-scheduler.d.ts.map +1 -1
- package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
- package/dist/defaults/code-refiner.yaml +114 -0
- package/dist/defaults/{.visor.yaml → code-review.yaml} +35 -226
- package/dist/defaults/override.yaml +52 -0
- package/dist/defaults/task-refinement.yaml +620 -0
- package/dist/defaults/visor.tests.yaml +674 -0
- package/dist/defaults/visor.yaml +482 -0
- package/dist/docs/DEPLOYMENT.md +118 -0
- package/dist/docs/GITHUB_CHECKS.md +280 -0
- package/dist/docs/NPM_USAGE.md +208 -0
- package/dist/docs/action-reference.md +19 -0
- package/dist/docs/advanced-ai.md +178 -0
- package/dist/docs/ai-configuration.md +468 -0
- package/dist/docs/author-permissions.md +610 -0
- package/dist/docs/ci-cli-mode.md +34 -0
- package/dist/docs/claude-code.md +74 -0
- package/dist/docs/command-provider.md +559 -0
- package/dist/docs/commands.md +8 -0
- package/dist/docs/configuration.md +303 -0
- package/dist/docs/custom-tools.md +424 -0
- package/dist/docs/dashboards/README.md +23 -0
- package/dist/docs/dashboards/grafana-visor-diagrams.json +20 -0
- package/dist/docs/dashboards/grafana-visor-overview.json +33 -0
- package/dist/docs/debug-visualizer-progress.md +572 -0
- package/dist/docs/debug-visualizer-rfc.md +691 -0
- package/dist/docs/debug-visualizer.md +114 -0
- package/dist/docs/debugging.md +636 -0
- package/dist/docs/default-output-schema.md +28 -0
- package/dist/docs/dependencies.md +369 -0
- package/dist/docs/dev-playbook.md +9 -0
- package/dist/docs/engine-state-machine-plan.md +333 -0
- package/dist/docs/event-driven-github-integration-rfc.md +743 -0
- package/dist/docs/event-triggers.md +292 -0
- package/dist/docs/execution-statistics-rfc.md +290 -0
- package/dist/docs/fact-validator-gap-analysis.md +178 -0
- package/dist/docs/fact-validator-implementation-plan.md +1235 -0
- package/dist/docs/fail-if.md +95 -0
- package/dist/docs/failure-conditions-implementation.md +271 -0
- package/dist/docs/failure-conditions-schema.md +173 -0
- package/dist/docs/failure-routing-rfc.md +193 -0
- package/dist/docs/failure-routing.md +507 -0
- package/dist/docs/foreach-dependency-propagation.md +473 -0
- package/dist/docs/github-ops.md +89 -0
- package/dist/docs/goto-forward-run-plan.md +113 -0
- package/dist/docs/guides/criticality-modes.md +332 -0
- package/dist/docs/guides/fault-management-and-contracts.md +738 -0
- package/dist/docs/guides/workflow-style-guide.md +224 -0
- package/dist/docs/http.md +299 -0
- package/dist/docs/human-input-provider.md +372 -0
- package/dist/docs/limits.md +64 -0
- package/dist/docs/liquid-templates.md +347 -0
- package/dist/docs/loop-routing-refactor.md +89 -0
- package/dist/docs/mcp-provider.md +557 -0
- package/dist/docs/mcp.md +124 -0
- package/dist/docs/memory.md +903 -0
- package/dist/docs/observability.md +12 -0
- package/dist/docs/output-formats.md +20 -0
- package/dist/docs/output-formatting.md +29 -0
- package/dist/docs/output-history.md +383 -0
- package/dist/docs/performance.md +6 -0
- package/dist/docs/pluggable.md +124 -0
- package/dist/docs/proposals/snapshot-scope-execution.md +236 -0
- package/dist/docs/recipes.md +21 -0
- package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
- package/dist/docs/schema-next-pr.md +10 -0
- package/dist/docs/schema-templates.md +68 -0
- package/dist/docs/script.md +34 -0
- package/dist/docs/sdk.md +222 -0
- package/dist/docs/security.md +7 -0
- package/dist/docs/suppressions.md +89 -0
- package/dist/docs/tag-filtering.md +258 -0
- package/dist/docs/telemetry-setup.md +119 -0
- package/dist/docs/telemetry-tracing-rfc.md +275 -0
- package/dist/docs/test-framework-rfc.md +680 -0
- package/dist/docs/testing/assertions.md +85 -0
- package/dist/docs/testing/ci.md +44 -0
- package/dist/docs/testing/cli.md +41 -0
- package/dist/docs/testing/cookbook.md +172 -0
- package/dist/docs/testing/dsl-reference.md +199 -0
- package/dist/docs/testing/fixtures-and-mocks.md +91 -0
- package/dist/docs/testing/flows.md +92 -0
- package/dist/docs/testing/getting-started.md +93 -0
- package/dist/docs/testing/troubleshooting.md +55 -0
- package/dist/docs/timeouts.md +50 -0
- package/dist/docs/troubleshooting.md +7 -0
- package/dist/docs/visor-sdk-rfc.md +186 -0
- package/dist/docs/workflows.md +569 -0
- package/dist/engine/on-finish/orchestrator.d.ts +19 -0
- package/dist/engine/on-finish/orchestrator.d.ts.map +1 -0
- package/dist/engine/on-finish/utils.d.ts +44 -0
- package/dist/engine/on-finish/utils.d.ts.map +1 -0
- package/dist/event-bus/event-bus.d.ts +13 -0
- package/dist/event-bus/event-bus.d.ts.map +1 -0
- package/dist/event-bus/types.d.ts +57 -0
- package/dist/event-bus/types.d.ts.map +1 -0
- package/dist/examples/.claude/agents/code-reviewer.md +69 -0
- package/dist/examples/.mcp.json +34 -0
- package/dist/examples/CALCULATOR-SDK.md +364 -0
- package/dist/examples/README.md +384 -0
- package/dist/examples/ai-retry-fallback-config.yaml +180 -0
- package/dist/examples/ai-with-bash.yaml +126 -0
- package/dist/examples/ai-with-mcp.yaml +82 -0
- package/dist/examples/basic-human-input.yaml +15 -0
- package/dist/examples/bedrock-config.yaml +77 -0
- package/dist/examples/calculator-config.yaml +133 -0
- package/dist/examples/calculator-json-output-guide.md +311 -0
- package/dist/examples/calculator-sdk-automated.ts +340 -0
- package/dist/examples/calculator-sdk-example.ts +275 -0
- package/dist/examples/calculator-sdk-json.ts +331 -0
- package/dist/examples/calculator-sdk-real.ts +374 -0
- package/dist/examples/calculator-sdk-test.ts +148 -0
- package/dist/examples/claude-code-config.yaml +191 -0
- package/dist/examples/cron-webhook-config.yaml +215 -0
- package/dist/examples/custom-template.liquid +57 -0
- package/dist/examples/custom-tools-example.yaml +281 -0
- package/dist/examples/enhanced-config.yaml +165 -0
- package/dist/examples/environments/visor.base.yaml +92 -0
- package/dist/examples/environments/visor.dev.yaml +33 -0
- package/dist/examples/environments/visor.prod.yaml +95 -0
- package/dist/examples/environments/visor.staging.yaml +46 -0
- package/dist/examples/fact-validator.yaml +361 -0
- package/dist/examples/fail-if-simple.yaml +90 -0
- package/dist/examples/failure-conditions-advanced.yaml +136 -0
- package/dist/examples/failure-conditions-basic.yaml +48 -0
- package/dist/examples/failure-conditions-github-style.yaml +119 -0
- package/dist/examples/failure-conditions-migration.yaml +74 -0
- package/dist/examples/for-loop-example.yaml +176 -0
- package/dist/examples/forEach-example.yaml +120 -0
- package/dist/examples/github-workflow-with-tags.yml +163 -0
- package/dist/examples/http-integration-config.yaml +240 -0
- package/dist/examples/https-server-config.yaml +209 -0
- package/dist/examples/human-input-example.yaml +63 -0
- package/dist/examples/if-conditions.yaml +173 -0
- package/dist/examples/jira-simple-example.yaml +56 -0
- package/dist/examples/jira-single-issue-workflow.yaml +166 -0
- package/dist/examples/jira-workflow-mcp.yaml +182 -0
- package/dist/examples/mcp/analyzer.py +119 -0
- package/dist/examples/mcp-provider-example.yaml +301 -0
- package/dist/examples/memory-counter.yaml +99 -0
- package/dist/examples/memory-error-collection.yaml +104 -0
- package/dist/examples/memory-exec-js.yaml +247 -0
- package/dist/examples/memory-namespace-isolation.yaml +184 -0
- package/dist/examples/memory-retry-counter.yaml +65 -0
- package/dist/examples/memory-state-machine.yaml +170 -0
- package/dist/examples/outputs-raw-basic.yaml +26 -0
- package/dist/examples/project-with-tools.yaml +174 -0
- package/dist/examples/prompts/architecture-analysis.liquid +116 -0
- package/dist/examples/prompts/security-comprehensive.liquid +107 -0
- package/dist/examples/quick-start-tags.yaml +53 -0
- package/dist/examples/routing-basic.yaml +35 -0
- package/dist/examples/routing-dynamic-js.yaml +46 -0
- package/dist/examples/routing-foreach.yaml +34 -0
- package/dist/examples/routing-goto-event.yaml +34 -0
- package/dist/examples/routing-on-success.yaml +25 -0
- package/dist/examples/run-calculator-demo.sh +71 -0
- package/dist/examples/sdk-basic.mjs +10 -0
- package/dist/examples/sdk-cjs.cjs +10 -0
- package/dist/examples/sdk-comprehensive.mjs +175 -0
- package/dist/examples/sdk-manual-config.mjs +65 -0
- package/dist/examples/sdk-typescript.js +81 -0
- package/dist/examples/sdk-typescript.ts +92 -0
- package/dist/examples/session-reuse-config.yaml +151 -0
- package/dist/examples/templates/security-report.liquid +137 -0
- package/dist/examples/tools-library.yaml +281 -0
- package/dist/examples/transform-example.yaml +199 -0
- package/dist/examples/visor-with-tags.yaml +198 -0
- package/dist/examples/webhook-pipeline-config.yaml +218 -0
- package/dist/examples/workflows/calculator-workflow.yaml +163 -0
- package/dist/examples/workflows/code-quality.yaml +222 -0
- package/dist/examples/workflows/quick-pr-check.yaml +90 -0
- package/dist/examples/workflows/workflow-composition-example.yaml +130 -0
- package/dist/failure-condition-evaluator.d.ts +1 -0
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/frontends/github-frontend.d.ts +38 -0
- package/dist/frontends/github-frontend.d.ts.map +1 -0
- package/dist/frontends/host.d.ts +43 -0
- package/dist/frontends/host.d.ts.map +1 -0
- package/dist/frontends/ndjson-sink.d.ts +12 -0
- package/dist/frontends/ndjson-sink.d.ts.map +1 -0
- package/dist/generated/config-schema.d.ts +564 -22
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +612 -24
- package/dist/github-check-service.d.ts +4 -6
- package/dist/github-check-service.d.ts.map +1 -1
- package/dist/github-comments.d.ts +0 -4
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +70335 -62514
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/memory-store.d.ts +6 -0
- package/dist/memory-store.d.ts.map +1 -1
- package/dist/output/assistant-json/template.liquid +0 -0
- package/dist/output/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
- package/dist/output/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
- package/dist/output-formatters.d.ts +1 -1
- package/dist/output-formatters.d.ts.map +1 -1
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/check-provider-registry.d.ts +6 -0
- package/dist/providers/check-provider-registry.d.ts.map +1 -1
- package/dist/providers/check-provider.interface.d.ts +34 -1
- package/dist/providers/check-provider.interface.d.ts.map +1 -1
- package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/custom-tool-executor.d.ts +61 -0
- package/dist/providers/custom-tool-executor.d.ts.map +1 -0
- package/dist/providers/github-ops-provider.d.ts.map +1 -1
- package/dist/providers/http-client-provider.d.ts +1 -4
- package/dist/providers/http-client-provider.d.ts.map +1 -1
- package/dist/providers/human-input-check-provider.d.ts +3 -0
- package/dist/providers/human-input-check-provider.d.ts.map +1 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/log-check-provider.d.ts +2 -5
- package/dist/providers/log-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-check-provider.d.ts +9 -3
- package/dist/providers/mcp-check-provider.d.ts.map +1 -1
- package/dist/providers/memory-check-provider.d.ts +2 -8
- package/dist/providers/memory-check-provider.d.ts.map +1 -1
- package/dist/providers/script-check-provider.d.ts +25 -0
- package/dist/providers/script-check-provider.d.ts.map +1 -0
- package/dist/providers/workflow-check-provider.d.ts +56 -0
- package/dist/providers/workflow-check-provider.d.ts.map +1 -0
- package/dist/reviewer.d.ts +2 -1
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/sdk/chunk-37ZSCMFC.mjs +482 -0
- package/dist/sdk/chunk-37ZSCMFC.mjs.map +1 -0
- package/dist/sdk/chunk-6Y4YTKCF.mjs +197 -0
- package/dist/sdk/chunk-6Y4YTKCF.mjs.map +1 -0
- package/dist/sdk/chunk-CNX7V5JK.mjs +89 -0
- package/dist/sdk/chunk-CNX7V5JK.mjs.map +1 -0
- package/dist/sdk/chunk-IEO6CFLG.mjs +1215 -0
- package/dist/sdk/chunk-IEO6CFLG.mjs.map +1 -0
- package/dist/sdk/chunk-JEHPDJIF.mjs +223 -0
- package/dist/sdk/chunk-JEHPDJIF.mjs.map +1 -0
- package/dist/sdk/chunk-O5EZDNYL.mjs +274 -0
- package/dist/sdk/chunk-O5EZDNYL.mjs.map +1 -0
- package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-OOZITMRU.mjs} +1 -1
- package/dist/sdk/chunk-OOZITMRU.mjs.map +1 -0
- package/dist/sdk/chunk-OWUVOILT.mjs +557 -0
- package/dist/sdk/chunk-OWUVOILT.mjs.map +1 -0
- package/dist/sdk/chunk-OZJ263FM.mjs +986 -0
- package/dist/sdk/chunk-OZJ263FM.mjs.map +1 -0
- package/dist/sdk/chunk-PTL3K3PN.mjs +3128 -0
- package/dist/sdk/chunk-PTL3K3PN.mjs.map +1 -0
- package/dist/sdk/chunk-S2RUE2RG.mjs +145 -0
- package/dist/sdk/chunk-S2RUE2RG.mjs.map +1 -0
- package/dist/sdk/chunk-VMPLF6FT.mjs +127 -0
- package/dist/sdk/chunk-VMPLF6FT.mjs.map +1 -0
- package/dist/sdk/chunk-YSN4G6CI.mjs +146 -0
- package/dist/sdk/chunk-YSN4G6CI.mjs.map +1 -0
- package/dist/sdk/chunk-ZYAUYXSW.mjs +206 -0
- package/dist/sdk/chunk-ZYAUYXSW.mjs.map +1 -0
- package/dist/sdk/config-M4ZNO6NU.mjs +14 -0
- package/dist/sdk/config-merger-PX3WIT57.mjs +10 -0
- package/dist/sdk/event-bus-5BEVPQ6T.mjs +35 -0
- package/dist/sdk/event-bus-5BEVPQ6T.mjs.map +1 -0
- package/dist/sdk/failure-condition-evaluator-NBO5YRXW.mjs +16 -0
- package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +458 -0
- package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +1 -0
- package/dist/sdk/github-frontend-4AWRJT7D.mjs +1242 -0
- package/dist/sdk/github-frontend-4AWRJT7D.mjs.map +1 -0
- package/dist/sdk/host-7GBC3S7L.mjs +49 -0
- package/dist/sdk/host-7GBC3S7L.mjs.map +1 -0
- package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-C7EG3YKH.mjs} +7 -2
- package/dist/sdk/memory-store-GJACZC2A.mjs +11 -0
- package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
- package/dist/sdk/renderer-schema-6RF26VUS.mjs +50 -0
- package/dist/sdk/renderer-schema-6RF26VUS.mjs.map +1 -0
- package/dist/sdk/routing-RP56JTV2.mjs +23 -0
- package/dist/sdk/routing-RP56JTV2.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +326 -21
- package/dist/sdk/sdk.d.ts +326 -21
- package/dist/sdk/sdk.js +21403 -16366
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +13510 -2096
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/session-registry-N5FFYFTM.mjs +10 -0
- package/dist/sdk/session-registry-N5FFYFTM.mjs.map +1 -0
- package/dist/sdk/trace-helpers-VP6QYVBX.mjs +23 -0
- package/dist/sdk/trace-helpers-VP6QYVBX.mjs.map +1 -0
- package/dist/sdk/{tracer-init-WC75N5NW.mjs → tracer-init-WP4X46IF.mjs} +2 -2
- package/dist/sdk/tracer-init-WP4X46IF.mjs.map +1 -0
- package/dist/sdk/workflow-registry-2YIIXQCK.mjs +11 -0
- package/dist/sdk/workflow-registry-2YIIXQCK.mjs.map +1 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/snapshot-store.d.ts +59 -0
- package/dist/snapshot-store.d.ts.map +1 -0
- package/dist/state-machine/context/build-engine-context.d.ts +9 -0
- package/dist/state-machine/context/build-engine-context.d.ts.map +1 -0
- package/dist/state-machine/dispatch/dependency-gating.d.ts +12 -0
- package/dist/state-machine/dispatch/dependency-gating.d.ts.map +1 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts +14 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -0
- package/dist/state-machine/dispatch/foreach-processor.d.ts +8 -0
- package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -0
- package/dist/state-machine/dispatch/history-snapshot.d.ts +8 -0
- package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -0
- package/dist/state-machine/dispatch/renderer-schema.d.ts +8 -0
- package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -0
- package/dist/state-machine/dispatch/stats-manager.d.ts +15 -0
- package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -0
- package/dist/state-machine/dispatch/template-renderer.d.ts +7 -0
- package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -0
- package/dist/state-machine/execution/summary.d.ts +8 -0
- package/dist/state-machine/execution/summary.d.ts.map +1 -0
- package/dist/state-machine/runner.d.ts +73 -0
- package/dist/state-machine/runner.d.ts.map +1 -0
- package/dist/state-machine/states/check-running.d.ts +14 -0
- package/dist/state-machine/states/check-running.d.ts.map +1 -0
- package/dist/state-machine/states/completed.d.ts +12 -0
- package/dist/state-machine/states/completed.d.ts.map +1 -0
- package/dist/state-machine/states/error.d.ts +11 -0
- package/dist/state-machine/states/error.d.ts.map +1 -0
- package/dist/state-machine/states/init.d.ts +11 -0
- package/dist/state-machine/states/init.d.ts.map +1 -0
- package/dist/state-machine/states/level-dispatch.d.ts +17 -0
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -0
- package/dist/state-machine/states/plan-ready.d.ts +12 -0
- package/dist/state-machine/states/plan-ready.d.ts.map +1 -0
- package/dist/state-machine/states/routing.d.ts +52 -0
- package/dist/state-machine/states/routing.d.ts.map +1 -0
- package/dist/state-machine/states/wave-planning.d.ts +14 -0
- package/dist/state-machine/states/wave-planning.d.ts.map +1 -0
- package/dist/state-machine/workflow-projection.d.ts +47 -0
- package/dist/state-machine/workflow-projection.d.ts.map +1 -0
- package/dist/state-machine-execution-engine.d.ts +147 -0
- package/dist/state-machine-execution-engine.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -1
- package/dist/test-runner/assertions.d.ts +59 -0
- package/dist/test-runner/assertions.d.ts.map +1 -0
- package/dist/test-runner/core/environment.d.ts +8 -0
- package/dist/test-runner/core/environment.d.ts.map +1 -0
- package/dist/test-runner/core/fixture.d.ts +3 -0
- package/dist/test-runner/core/fixture.d.ts.map +1 -0
- package/dist/test-runner/core/flow-stage.d.ts +32 -0
- package/dist/test-runner/core/flow-stage.d.ts.map +1 -0
- package/dist/test-runner/core/mocks.d.ts +8 -0
- package/dist/test-runner/core/mocks.d.ts.map +1 -0
- package/dist/test-runner/core/test-execution-wrapper.d.ts +18 -0
- package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -0
- package/dist/test-runner/evaluators.d.ts +12 -0
- package/dist/test-runner/evaluators.d.ts.map +1 -0
- package/dist/test-runner/fixture-loader.d.ts +30 -0
- package/dist/test-runner/fixture-loader.d.ts.map +1 -0
- package/dist/test-runner/index.d.ts +120 -0
- package/dist/test-runner/index.d.ts.map +1 -0
- package/dist/test-runner/recorders/github-recorder.d.ts +23 -0
- package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -0
- package/dist/test-runner/recorders/global-recorder.d.ts +4 -0
- package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -0
- package/dist/test-runner/utils/selectors.d.ts +2 -0
- package/dist/test-runner/utils/selectors.d.ts.map +1 -0
- package/dist/test-runner/validator.d.ts +8 -0
- package/dist/test-runner/validator.d.ts.map +1 -0
- package/dist/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
- package/dist/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
- package/dist/types/cli.d.ts +4 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +278 -5
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts +172 -0
- package/dist/types/engine.d.ts.map +1 -0
- package/dist/types/execution.d.ts +73 -0
- package/dist/types/execution.d.ts.map +1 -0
- package/dist/types/github.d.ts +51 -0
- package/dist/types/github.d.ts.map +1 -0
- package/dist/types/workflow.d.ts +237 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/utils/command-executor.d.ts +43 -0
- package/dist/utils/command-executor.d.ts.map +1 -0
- package/dist/utils/comment-metadata.d.ts +21 -0
- package/dist/utils/comment-metadata.d.ts.map +1 -0
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-merger.d.ts.map +1 -1
- package/dist/utils/env-exposure.d.ts +3 -0
- package/dist/utils/env-exposure.d.ts.map +1 -0
- package/dist/utils/file-exclusion.d.ts.map +1 -1
- package/dist/utils/interactive-prompt.d.ts +1 -1
- package/dist/utils/interactive-prompt.d.ts.map +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/script-memory-ops.d.ts +21 -0
- package/dist/utils/script-memory-ops.d.ts.map +1 -0
- package/dist/utils/template-context.d.ts +7 -0
- package/dist/utils/template-context.d.ts.map +1 -0
- package/dist/webhook-server.d.ts +3 -3
- package/dist/webhook-server.d.ts.map +1 -1
- package/dist/workflow-executor.d.ts +81 -0
- package/dist/workflow-executor.d.ts.map +1 -0
- package/dist/workflow-registry.d.ts +79 -0
- package/dist/workflow-registry.d.ts.map +1 -0
- package/package.json +10 -5
- package/dist/output/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
- package/dist/sdk/check-execution-engine-2YYKUUSH.mjs +0 -11
- package/dist/sdk/check-execution-engine-6QJXYYON.mjs +0 -11
- package/dist/sdk/check-execution-engine-PJZ4ZOKG.mjs +0 -11
- package/dist/sdk/chunk-33QVZ2D4.mjs +0 -316
- package/dist/sdk/chunk-33QVZ2D4.mjs.map +0 -1
- package/dist/sdk/chunk-B5QBV2QJ.mjs +0 -752
- package/dist/sdk/chunk-B5QBV2QJ.mjs.map +0 -1
- package/dist/sdk/chunk-BVFNRCHT.mjs +0 -14129
- package/dist/sdk/chunk-BVFNRCHT.mjs.map +0 -1
- package/dist/sdk/chunk-KWZW23FG.mjs +0 -14129
- package/dist/sdk/chunk-KWZW23FG.mjs.map +0 -1
- package/dist/sdk/chunk-O4RP4BRH.mjs +0 -14092
- package/dist/sdk/chunk-O4RP4BRH.mjs.map +0 -1
- package/dist/sdk/chunk-TUTOLSFV.mjs.map +0 -1
- package/dist/sdk/chunk-U5D2LY66.mjs +0 -245
- package/dist/sdk/chunk-U5D2LY66.mjs.map +0 -1
- package/dist/sdk/chunk-U7X54EMV.mjs +0 -331
- package/dist/sdk/chunk-U7X54EMV.mjs.map +0 -1
- package/dist/sdk/config-merger-TWUBWFC2.mjs +0 -8
- package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs +0 -61
- package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs.map +0 -1
- package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs +0 -61
- package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs.map +0 -1
- package/dist/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
- /package/dist/sdk/{check-execution-engine-2YYKUUSH.mjs.map → config-M4ZNO6NU.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → failure-condition-evaluator-NBO5YRXW.mjs.map} +0 -0
- /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → liquid-extensions-C7EG3YKH.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → memory-store-GJACZC2A.mjs.map} +0 -0
- /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → metrics-7PP3EJUH.mjs.map} +0 -0
package/dist/sdk/sdk.d.mts
CHANGED
|
@@ -120,7 +120,7 @@ interface FailureConditionResult {
|
|
|
120
120
|
/**
|
|
121
121
|
* Valid check types in configuration
|
|
122
122
|
*/
|
|
123
|
-
type ConfigCheckType = 'ai' | 'command' | 'http' | 'http_input' | 'http_client' | 'noop' | 'log' | 'memory' | 'github' | 'claude-code' | 'mcp' | 'human-input';
|
|
123
|
+
type ConfigCheckType = 'ai' | 'command' | 'script' | 'http' | 'http_input' | 'http_client' | 'noop' | 'log' | 'memory' | 'github' | 'claude-code' | 'mcp' | 'human-input' | 'workflow';
|
|
124
124
|
/**
|
|
125
125
|
* Valid event triggers for checks
|
|
126
126
|
*/
|
|
@@ -148,6 +148,71 @@ type GroupByOption = 'check' | 'file' | 'severity' | 'group';
|
|
|
148
148
|
interface EnvConfig {
|
|
149
149
|
[key: string]: string | number | boolean;
|
|
150
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Retry configuration for AI provider calls
|
|
153
|
+
*/
|
|
154
|
+
interface AIRetryConfig {
|
|
155
|
+
/** Maximum retry attempts (0-50) */
|
|
156
|
+
maxRetries?: number;
|
|
157
|
+
/** Initial delay in milliseconds (0-60000) */
|
|
158
|
+
initialDelay?: number;
|
|
159
|
+
/** Maximum delay cap in milliseconds (0-300000) */
|
|
160
|
+
maxDelay?: number;
|
|
161
|
+
/** Exponential backoff multiplier (1-10) */
|
|
162
|
+
backoffFactor?: number;
|
|
163
|
+
/** Custom error patterns to retry on */
|
|
164
|
+
retryableErrors?: string[];
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Fallback provider configuration
|
|
168
|
+
*/
|
|
169
|
+
interface AIFallbackProviderConfig {
|
|
170
|
+
/** AI provider to use */
|
|
171
|
+
provider: 'google' | 'anthropic' | 'openai' | 'bedrock';
|
|
172
|
+
/** Model name to use */
|
|
173
|
+
model: string;
|
|
174
|
+
/** API key for this provider */
|
|
175
|
+
apiKey?: string;
|
|
176
|
+
/** Per-provider retry override */
|
|
177
|
+
maxRetries?: number;
|
|
178
|
+
/** AWS region (for Bedrock) */
|
|
179
|
+
region?: string;
|
|
180
|
+
/** AWS access key ID (for Bedrock) */
|
|
181
|
+
accessKeyId?: string;
|
|
182
|
+
/** AWS secret access key (for Bedrock) */
|
|
183
|
+
secretAccessKey?: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Fallback configuration for AI providers
|
|
187
|
+
*/
|
|
188
|
+
interface AIFallbackConfig {
|
|
189
|
+
/** Fallback strategy: 'same-model', 'same-provider', 'any', or 'custom' */
|
|
190
|
+
strategy?: 'same-model' | 'same-provider' | 'any' | 'custom';
|
|
191
|
+
/** Array of fallback provider configurations */
|
|
192
|
+
providers?: AIFallbackProviderConfig[];
|
|
193
|
+
/** Maximum total attempts across all providers */
|
|
194
|
+
maxTotalAttempts?: number;
|
|
195
|
+
/** Enable automatic fallback using available environment variables */
|
|
196
|
+
auto?: boolean;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Bash command execution configuration for ProbeAgent
|
|
200
|
+
* Note: Use 'allowBash: true' in AIProviderConfig to enable bash execution
|
|
201
|
+
*/
|
|
202
|
+
interface BashConfig {
|
|
203
|
+
/** Array of permitted command patterns (e.g., ['ls', 'git status']) */
|
|
204
|
+
allow?: string[];
|
|
205
|
+
/** Array of blocked command patterns (e.g., ['rm -rf', 'sudo']) */
|
|
206
|
+
deny?: string[];
|
|
207
|
+
/** Disable default safe command list (use with caution) */
|
|
208
|
+
noDefaultAllow?: boolean;
|
|
209
|
+
/** Disable default dangerous command blocklist (use with extreme caution) */
|
|
210
|
+
noDefaultDeny?: boolean;
|
|
211
|
+
/** Execution timeout in milliseconds */
|
|
212
|
+
timeout?: number;
|
|
213
|
+
/** Default working directory for command execution */
|
|
214
|
+
workingDirectory?: string;
|
|
215
|
+
}
|
|
151
216
|
/**
|
|
152
217
|
* AI provider configuration
|
|
153
218
|
*/
|
|
@@ -162,8 +227,32 @@ interface AIProviderConfig {
|
|
|
162
227
|
timeout?: number;
|
|
163
228
|
/** Enable debug mode */
|
|
164
229
|
debug?: boolean;
|
|
230
|
+
/** Probe promptType to use (e.g., engineer, code-review, architect) */
|
|
231
|
+
prompt_type?: string;
|
|
232
|
+
/** System prompt (baseline preamble). Replaces legacy custom_prompt. */
|
|
233
|
+
system_prompt?: string;
|
|
234
|
+
/** Probe customPrompt (baseline/system prompt) — deprecated, use system_prompt */
|
|
235
|
+
custom_prompt?: string;
|
|
236
|
+
/** Skip adding code context (diffs, files, PR info) to the prompt */
|
|
237
|
+
skip_code_context?: boolean;
|
|
165
238
|
/** MCP servers configuration */
|
|
166
239
|
mcpServers?: Record<string, McpServerConfig>;
|
|
240
|
+
/** Enable the delegate tool for task distribution to subagents */
|
|
241
|
+
enableDelegate?: boolean;
|
|
242
|
+
/** Retry configuration for this provider */
|
|
243
|
+
retry?: AIRetryConfig;
|
|
244
|
+
/** Fallback configuration for provider failures */
|
|
245
|
+
fallback?: AIFallbackConfig;
|
|
246
|
+
/** Enable Edit and Create tools for file modification (disabled by default for security) */
|
|
247
|
+
allowEdit?: boolean;
|
|
248
|
+
/** Filter allowed tools - supports whitelist, exclusion (!prefix), or raw AI mode (empty array) */
|
|
249
|
+
allowedTools?: string[];
|
|
250
|
+
/** Disable all tools for raw AI mode (alternative to allowedTools: []) */
|
|
251
|
+
disableTools?: boolean;
|
|
252
|
+
/** Enable bash command execution (shorthand for bashConfig.enabled) */
|
|
253
|
+
allowBash?: boolean;
|
|
254
|
+
/** Advanced bash command execution configuration */
|
|
255
|
+
bashConfig?: BashConfig;
|
|
167
256
|
}
|
|
168
257
|
/**
|
|
169
258
|
* MCP Server configuration
|
|
@@ -190,6 +279,8 @@ interface ClaudeCodeConfig {
|
|
|
190
279
|
mcpServers?: Record<string, McpServerConfig>;
|
|
191
280
|
/** Path to subagent script */
|
|
192
281
|
subagent?: string;
|
|
282
|
+
/** Enable the delegate tool for task distribution to subagents */
|
|
283
|
+
enableDelegate?: boolean;
|
|
193
284
|
/** Event hooks for lifecycle management */
|
|
194
285
|
hooks?: {
|
|
195
286
|
/** Called when check starts */
|
|
@@ -228,6 +319,8 @@ interface CheckConfig {
|
|
|
228
319
|
transform?: string;
|
|
229
320
|
/** Transform using JavaScript expressions (evaluated in secure sandbox) - optional */
|
|
230
321
|
transform_js?: string;
|
|
322
|
+
/** Script content to execute for script checks */
|
|
323
|
+
content?: string;
|
|
231
324
|
/** Cron schedule expression (e.g., "0 2 * * *") - optional for any check type */
|
|
232
325
|
schedule?: string;
|
|
233
326
|
/** Focus area for the check (security/performance/style/architecture/all) - optional */
|
|
@@ -244,6 +337,14 @@ interface CheckConfig {
|
|
|
244
337
|
ai_model?: string;
|
|
245
338
|
/** AI provider to use for this check - overrides global setting */
|
|
246
339
|
ai_provider?: 'google' | 'anthropic' | 'openai' | 'bedrock' | 'mock' | string;
|
|
340
|
+
/** Optional persona hint, prepended to the prompt as 'Persona: <value>' */
|
|
341
|
+
ai_persona?: string;
|
|
342
|
+
/** Probe promptType for this check (underscore style) */
|
|
343
|
+
ai_prompt_type?: string;
|
|
344
|
+
/** System prompt for this check (underscore style) */
|
|
345
|
+
ai_system_prompt?: string;
|
|
346
|
+
/** Legacy customPrompt (underscore style) — deprecated, use ai_system_prompt */
|
|
347
|
+
ai_custom_prompt?: string;
|
|
247
348
|
/** MCP servers for this AI check - overrides global setting */
|
|
248
349
|
ai_mcp_servers?: Record<string, McpServerConfig>;
|
|
249
350
|
/** Claude Code configuration (for claude-code type checks) */
|
|
@@ -258,6 +359,13 @@ interface CheckConfig {
|
|
|
258
359
|
group?: string;
|
|
259
360
|
/** Schema type for template rendering (e.g., "code-review", "markdown") or inline JSON schema object - optional */
|
|
260
361
|
schema?: string | Record<string, unknown>;
|
|
362
|
+
/**
|
|
363
|
+
* Optional JSON Schema to validate the produced output. If omitted and
|
|
364
|
+
* `schema` is an object, the engine will treat that object as the
|
|
365
|
+
* output_schema for validation purposes while still using string schemas
|
|
366
|
+
* (e.g., 'code-review') for template selection.
|
|
367
|
+
*/
|
|
368
|
+
output_schema?: Record<string, unknown>;
|
|
261
369
|
/** Custom template configuration - optional */
|
|
262
370
|
template?: CustomTemplateConfig;
|
|
263
371
|
/** Condition to determine if check should run - runs if expression evaluates to true */
|
|
@@ -272,12 +380,57 @@ interface CheckConfig {
|
|
|
272
380
|
failure_conditions?: FailureConditions;
|
|
273
381
|
/** Tags for categorizing and filtering checks (e.g., ["local", "fast", "security"]) */
|
|
274
382
|
tags?: string[];
|
|
383
|
+
/**
|
|
384
|
+
* Operational criticality of this step. Drives default safety policies
|
|
385
|
+
* (contracts, retries, loop budgets) at load time. Behavior can still be
|
|
386
|
+
* overridden explicitly per step via on_*, fail_if, assume/guarantee, etc.
|
|
387
|
+
*
|
|
388
|
+
* - 'external': interacts with external systems (side effects). Highest safety.
|
|
389
|
+
* - 'internal': modifies CI/config/state but not prod. High safety.
|
|
390
|
+
* - 'policy': organizational checks (linting, style, doc). Moderate safety.
|
|
391
|
+
* - 'info': informational checks. Lowest safety.
|
|
392
|
+
*/
|
|
393
|
+
criticality?: 'external' | 'internal' | 'policy' | 'info';
|
|
394
|
+
/**
|
|
395
|
+
* Allow dependents to run even if this step fails.
|
|
396
|
+
* Defaults to false (dependents are gated when this step fails).
|
|
397
|
+
* Similar to GitHub Actions' continue-on-error.
|
|
398
|
+
*/
|
|
399
|
+
continue_on_failure?: boolean;
|
|
275
400
|
/** Process output as array and run dependent checks for each item */
|
|
276
401
|
forEach?: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* Control scheduling behavior when this check is triggered via routing (run/goto)
|
|
404
|
+
* from a forEach scope.
|
|
405
|
+
* - 'map': schedule once per item (fan-out) using item scopes.
|
|
406
|
+
* - 'reduce': schedule a single run at the parent scope (aggregation).
|
|
407
|
+
* If unset, the current default is a single run (reduce) for backward compatibility.
|
|
408
|
+
*/
|
|
409
|
+
fanout?: 'map' | 'reduce';
|
|
410
|
+
/** Alias for fanout: 'reduce' */
|
|
411
|
+
reduce?: boolean;
|
|
277
412
|
/** Failure routing configuration for this check (retry/goto/run) */
|
|
278
413
|
on_fail?: OnFailConfig;
|
|
279
414
|
/** Success routing configuration for this check (post-actions and optional goto) */
|
|
280
415
|
on_success?: OnSuccessConfig;
|
|
416
|
+
/** Finish routing configuration for forEach checks (runs after ALL iterations complete) */
|
|
417
|
+
on_finish?: OnFinishConfig;
|
|
418
|
+
/**
|
|
419
|
+
* Preconditions that must hold before executing the check. If any expression
|
|
420
|
+
* evaluates to false, the check is skipped (skipReason='assume').
|
|
421
|
+
*/
|
|
422
|
+
assume?: string | string[];
|
|
423
|
+
/**
|
|
424
|
+
* Postconditions that should hold after executing the check. Expressions are
|
|
425
|
+
* evaluated against the produced result/output; violations are recorded as
|
|
426
|
+
* error issues with ruleId "contract/guarantee_failed".
|
|
427
|
+
*/
|
|
428
|
+
guarantee?: string | string[];
|
|
429
|
+
/**
|
|
430
|
+
* Hard cap on how many times this check may execute within a single engine run.
|
|
431
|
+
* Overrides global limits.max_runs_per_check. Set to 0 or negative to disable for this step.
|
|
432
|
+
*/
|
|
433
|
+
max_runs?: number;
|
|
281
434
|
/**
|
|
282
435
|
* Log provider specific options (optional, only used when type === 'log').
|
|
283
436
|
* Declared here to ensure JSON Schema allows these keys and Ajv does not warn.
|
|
@@ -292,19 +445,25 @@ interface CheckConfig {
|
|
|
292
445
|
include_dependencies?: boolean;
|
|
293
446
|
/** Include execution metadata in log output */
|
|
294
447
|
include_metadata?: boolean;
|
|
448
|
+
/**
|
|
449
|
+
* Output parsing hint for command provider (optional)
|
|
450
|
+
* When set to 'json', command stdout is expected to be JSON. When 'text', treat as plain text.
|
|
451
|
+
* Note: command provider attempts JSON parsing heuristically; this flag mainly suppresses schema warnings
|
|
452
|
+
* and may be used by providers to alter parsing behavior in the future.
|
|
453
|
+
*/
|
|
454
|
+
output_format?: 'json' | 'text';
|
|
295
455
|
/**
|
|
296
456
|
* Memory provider specific options (optional, only used when type === 'memory').
|
|
297
457
|
*/
|
|
298
458
|
/** Memory operation to perform */
|
|
299
|
-
|
|
459
|
+
/** Memory operation to perform. Use `type: 'script'` for custom JavaScript. */
|
|
460
|
+
operation?: 'get' | 'set' | 'append' | 'increment' | 'delete' | 'clear' | 'list';
|
|
300
461
|
/** Key for memory operation */
|
|
301
462
|
key?: string;
|
|
302
463
|
/** Value for set/append operations */
|
|
303
464
|
value?: unknown;
|
|
304
465
|
/** JavaScript expression to compute value dynamically */
|
|
305
466
|
value_js?: string;
|
|
306
|
-
/** JavaScript code for exec_js operation with full memory access */
|
|
307
|
-
memory_js?: string;
|
|
308
467
|
/** Override namespace for this check */
|
|
309
468
|
namespace?: string;
|
|
310
469
|
/**
|
|
@@ -326,7 +485,7 @@ interface CheckConfig {
|
|
|
326
485
|
/** Session ID for HTTP transport (optional, server may generate one) */
|
|
327
486
|
sessionId?: string;
|
|
328
487
|
/** Command arguments (for stdio transport in MCP checks) */
|
|
329
|
-
|
|
488
|
+
command_args?: string[];
|
|
330
489
|
/** Working directory (for stdio transport in MCP checks) */
|
|
331
490
|
workingDirectory?: string;
|
|
332
491
|
/**
|
|
@@ -340,6 +499,17 @@ interface CheckConfig {
|
|
|
340
499
|
multiline?: boolean;
|
|
341
500
|
/** Default value if timeout occurs or empty input when allow_empty is true */
|
|
342
501
|
default?: string;
|
|
502
|
+
/**
|
|
503
|
+
* Workflow provider specific options (optional, only used when type === 'workflow').
|
|
504
|
+
*/
|
|
505
|
+
/** Workflow ID or path to workflow file */
|
|
506
|
+
workflow?: string;
|
|
507
|
+
/** Arguments/inputs for the workflow */
|
|
508
|
+
args?: Record<string, unknown>;
|
|
509
|
+
/** Override specific step configurations in the workflow */
|
|
510
|
+
overrides?: Record<string, Partial<CheckConfig>>;
|
|
511
|
+
/** Map workflow outputs to check outputs */
|
|
512
|
+
output_mapping?: Record<string, string>;
|
|
343
513
|
}
|
|
344
514
|
/**
|
|
345
515
|
* Backoff policy for retries
|
|
@@ -375,6 +545,12 @@ interface OnFailConfig {
|
|
|
375
545
|
goto_js?: string;
|
|
376
546
|
/** Dynamic remediation list: JS expression returning string[] */
|
|
377
547
|
run_js?: string;
|
|
548
|
+
/**
|
|
549
|
+
* Declarative transitions. Evaluated in order; first matching rule wins.
|
|
550
|
+
* If a rule's `to` is null, no goto occurs. When omitted or none match,
|
|
551
|
+
* the engine falls back to goto_js/goto for backward compatibility.
|
|
552
|
+
*/
|
|
553
|
+
transitions?: TransitionRule[];
|
|
378
554
|
}
|
|
379
555
|
/**
|
|
380
556
|
* Success routing configuration per check
|
|
@@ -390,6 +566,37 @@ interface OnSuccessConfig {
|
|
|
390
566
|
goto_js?: string;
|
|
391
567
|
/** Dynamic post-success steps: JS expression returning string[] */
|
|
392
568
|
run_js?: string;
|
|
569
|
+
/** Declarative transitions (see OnFailConfig.transitions). */
|
|
570
|
+
transitions?: TransitionRule[];
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Finish routing configuration for forEach checks
|
|
574
|
+
* Runs once after ALL iterations of forEach and ALL dependent checks complete
|
|
575
|
+
*/
|
|
576
|
+
interface OnFinishConfig {
|
|
577
|
+
/** Post-finish steps to run */
|
|
578
|
+
run?: string[];
|
|
579
|
+
/** Optional jump back to ancestor step (by id) */
|
|
580
|
+
goto?: string;
|
|
581
|
+
/** Simulate a different event when performing goto (e.g., 'pr_updated') */
|
|
582
|
+
goto_event?: EventTrigger;
|
|
583
|
+
/** Dynamic goto: JS expression returning step id or null */
|
|
584
|
+
goto_js?: string;
|
|
585
|
+
/** Dynamic post-finish steps: JS expression returning string[] */
|
|
586
|
+
run_js?: string;
|
|
587
|
+
/** Declarative transitions (see OnFailConfig.transitions). */
|
|
588
|
+
transitions?: TransitionRule[];
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Declarative transition rule for on_* blocks.
|
|
592
|
+
*/
|
|
593
|
+
interface TransitionRule {
|
|
594
|
+
/** JavaScript expression evaluated in the same sandbox as goto_js; truthy enables the rule. */
|
|
595
|
+
when: string;
|
|
596
|
+
/** Target step ID, or null to explicitly prevent goto. */
|
|
597
|
+
to?: string | null;
|
|
598
|
+
/** Optional event override when performing goto. */
|
|
599
|
+
goto_event?: EventTrigger;
|
|
393
600
|
}
|
|
394
601
|
/**
|
|
395
602
|
* Global routing defaults
|
|
@@ -402,6 +609,23 @@ interface RoutingDefaults {
|
|
|
402
609
|
on_fail?: OnFailConfig;
|
|
403
610
|
};
|
|
404
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* Global engine limits
|
|
614
|
+
*/
|
|
615
|
+
interface LimitsConfig {
|
|
616
|
+
/**
|
|
617
|
+
* Maximum number of executions per check within a single engine run.
|
|
618
|
+
* Applies to each distinct scope independently for forEach item executions.
|
|
619
|
+
* Set to 0 or negative to disable. Default: 50.
|
|
620
|
+
*/
|
|
621
|
+
max_runs_per_check?: number;
|
|
622
|
+
/**
|
|
623
|
+
* Maximum nesting depth for workflows executed by the state machine engine.
|
|
624
|
+
* Nested workflows are invoked by the workflow provider; this limit prevents
|
|
625
|
+
* accidental infinite recursion. Default: 3.
|
|
626
|
+
*/
|
|
627
|
+
max_workflow_depth?: number;
|
|
628
|
+
}
|
|
405
629
|
/**
|
|
406
630
|
* Custom template configuration
|
|
407
631
|
*/
|
|
@@ -571,6 +795,40 @@ interface VisorHooks {
|
|
|
571
795
|
/** Called when human input is required */
|
|
572
796
|
onHumanInput?: (request: HumanInputRequest) => Promise<string>;
|
|
573
797
|
}
|
|
798
|
+
/**
|
|
799
|
+
* Custom tool definition for use in MCP blocks
|
|
800
|
+
*/
|
|
801
|
+
interface CustomToolDefinition {
|
|
802
|
+
/** Tool name - used to reference the tool in MCP blocks */
|
|
803
|
+
name: string;
|
|
804
|
+
/** Description of what the tool does */
|
|
805
|
+
description?: string;
|
|
806
|
+
/** Input schema for the tool (JSON Schema format) */
|
|
807
|
+
inputSchema?: {
|
|
808
|
+
type: 'object';
|
|
809
|
+
properties?: Record<string, unknown>;
|
|
810
|
+
required?: string[];
|
|
811
|
+
additionalProperties?: boolean;
|
|
812
|
+
};
|
|
813
|
+
/** Command to execute - supports Liquid template */
|
|
814
|
+
exec: string;
|
|
815
|
+
/** Optional stdin input - supports Liquid template */
|
|
816
|
+
stdin?: string;
|
|
817
|
+
/** Transform the raw output - supports Liquid template */
|
|
818
|
+
transform?: string;
|
|
819
|
+
/** Transform the output using JavaScript - alternative to transform */
|
|
820
|
+
transform_js?: string;
|
|
821
|
+
/** Working directory for command execution */
|
|
822
|
+
cwd?: string;
|
|
823
|
+
/** Environment variables for the command */
|
|
824
|
+
env?: Record<string, string>;
|
|
825
|
+
/** Timeout in milliseconds */
|
|
826
|
+
timeout?: number;
|
|
827
|
+
/** Whether to parse output as JSON automatically */
|
|
828
|
+
parseJson?: boolean;
|
|
829
|
+
/** Expected output schema for validation */
|
|
830
|
+
outputSchema?: Record<string, unknown>;
|
|
831
|
+
}
|
|
574
832
|
/**
|
|
575
833
|
* Main Visor configuration
|
|
576
834
|
*/
|
|
@@ -579,6 +837,12 @@ interface VisorConfig {
|
|
|
579
837
|
version: string;
|
|
580
838
|
/** Extends from other configurations - can be file path, HTTP(S) URL, or "default" */
|
|
581
839
|
extends?: string | string[];
|
|
840
|
+
/** Alias for extends - include from other configurations (backward compatibility) */
|
|
841
|
+
include?: string | string[];
|
|
842
|
+
/** Custom tool definitions that can be used in MCP blocks */
|
|
843
|
+
tools?: Record<string, CustomToolDefinition>;
|
|
844
|
+
/** Import workflow definitions from external files or URLs */
|
|
845
|
+
imports?: string[];
|
|
582
846
|
/** Step configurations (recommended) */
|
|
583
847
|
steps?: Record<string, CheckConfig>;
|
|
584
848
|
/** Check configurations (legacy, use 'steps' instead) - always populated after normalization */
|
|
@@ -611,21 +875,15 @@ interface VisorConfig {
|
|
|
611
875
|
tag_filter?: TagFilter;
|
|
612
876
|
/** Optional routing defaults for retry/goto/run policies */
|
|
613
877
|
routing?: RoutingDefaults;
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
|
|
618
|
-
*/
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
/** CLI message value (from --message argument) */
|
|
624
|
-
cliMessage?: string;
|
|
625
|
-
/** SDK hooks for human input */
|
|
626
|
-
hooks?: {
|
|
627
|
-
onHumanInput?: (request: HumanInputRequest) => Promise<string>;
|
|
628
|
-
};
|
|
878
|
+
/** Global execution limits */
|
|
879
|
+
limits?: LimitsConfig;
|
|
880
|
+
/** Optional integrations: event-driven frontends (e.g., ndjson-sink, github) */
|
|
881
|
+
frontends?: Array<{
|
|
882
|
+
/** Frontend name, e.g., 'ndjson-sink', 'github' */
|
|
883
|
+
name: string;
|
|
884
|
+
/** Frontend-specific configuration */
|
|
885
|
+
config?: unknown;
|
|
886
|
+
}>;
|
|
629
887
|
}
|
|
630
888
|
|
|
631
889
|
/**
|
|
@@ -636,10 +894,12 @@ interface CheckExecutionStats {
|
|
|
636
894
|
totalRuns: number;
|
|
637
895
|
successfulRuns: number;
|
|
638
896
|
failedRuns: number;
|
|
897
|
+
skippedRuns: number;
|
|
639
898
|
skipped: boolean;
|
|
640
|
-
skipReason?: 'if_condition' | 'fail_fast' | 'dependency_failed';
|
|
899
|
+
skipReason?: 'if_condition' | 'fail_fast' | 'dependency_failed' | 'forEach_empty' | 'assume';
|
|
641
900
|
skipCondition?: string;
|
|
642
901
|
totalDuration: number;
|
|
902
|
+
providerDurationMs?: number;
|
|
643
903
|
perIterationDuration?: number[];
|
|
644
904
|
issuesFound: number;
|
|
645
905
|
issuesBySeverity: {
|
|
@@ -715,6 +975,51 @@ interface DebugInfo {
|
|
|
715
975
|
}>;
|
|
716
976
|
}
|
|
717
977
|
|
|
978
|
+
/**
|
|
979
|
+
* Execution context passed to check providers
|
|
980
|
+
*/
|
|
981
|
+
interface ExecutionContext {
|
|
982
|
+
/** Session information for AI session reuse */
|
|
983
|
+
parentSessionId?: string;
|
|
984
|
+
reuseSession?: boolean;
|
|
985
|
+
/** CLI message value (from --message argument) */
|
|
986
|
+
cliMessage?: string;
|
|
987
|
+
/**
|
|
988
|
+
* Stage-local baseline of output history lengths per check name.
|
|
989
|
+
* When present, providers should expose an `outputs_history_stage` object in
|
|
990
|
+
* Liquid/JS contexts that slices the global history from this baseline.
|
|
991
|
+
* This enables stage-scoped assertions in the YAML test runner without
|
|
992
|
+
* relying on global execution history.
|
|
993
|
+
*/
|
|
994
|
+
stageHistoryBase?: Record<string, number>;
|
|
995
|
+
/** Workflow inputs - available when executing within a workflow */
|
|
996
|
+
workflowInputs?: Record<string, unknown>;
|
|
997
|
+
/** SDK hooks for human input */
|
|
998
|
+
hooks?: {
|
|
999
|
+
onHumanInput?: (request: HumanInputRequest) => Promise<string>;
|
|
1000
|
+
onPromptCaptured?: (info: {
|
|
1001
|
+
step: string;
|
|
1002
|
+
provider: string;
|
|
1003
|
+
prompt: string;
|
|
1004
|
+
}) => void;
|
|
1005
|
+
mockForStep?: (step: string) => unknown | undefined;
|
|
1006
|
+
};
|
|
1007
|
+
/**
|
|
1008
|
+
* Optional execution mode hints. The core engine does not read environment
|
|
1009
|
+
* variables directly; callers (CLI, test runner) can set these flags to
|
|
1010
|
+
* request certain behaviors without polluting core logic with test-specific
|
|
1011
|
+
* branches.
|
|
1012
|
+
*/
|
|
1013
|
+
mode?: {
|
|
1014
|
+
/** true when running under the YAML test runner */
|
|
1015
|
+
test?: boolean;
|
|
1016
|
+
/** post review comments from grouped execution paths (used by tests) */
|
|
1017
|
+
postGroupedComments?: boolean;
|
|
1018
|
+
/** reset per-run guard state before grouped execution */
|
|
1019
|
+
resetPerRunState?: boolean;
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
|
|
718
1023
|
interface VisorOptions {
|
|
719
1024
|
cwd?: string;
|
|
720
1025
|
debug?: boolean;
|