@probelabs/visor 0.1.106 → 0.1.111
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 +71 -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 +624 -0
- package/defaults/visor.tests.yaml +685 -0
- package/defaults/visor.yaml +483 -0
- 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 +28 -9
- 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 +7 -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 +624 -0
- package/dist/defaults/visor.tests.yaml +685 -0
- package/dist/defaults/visor.yaml +483 -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 +237 -0
- package/dist/docs/ai-configuration.md +535 -0
- package/dist/docs/ai-custom-tools-usage.md +261 -0
- package/dist/docs/ai-custom-tools.md +392 -0
- package/dist/docs/author-permissions.md +610 -0
- package/dist/docs/bot-transports-rfc.md +23 -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 +324 -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-pause-resume-rfc.md +192 -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/lifecycle-hooks.md +253 -0
- package/dist/docs/limits.md +64 -0
- package/dist/docs/liquid-templates.md +490 -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/providers/git-checkout.md +589 -0
- package/dist/docs/recipes.md +474 -0
- package/dist/docs/rfc/git-checkout-step.md +601 -0
- package/dist/docs/rfc/on_init-hook.md +1294 -0
- package/dist/docs/rfc/workspace-isolation.md +216 -0
- package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
- package/dist/docs/router-patterns.md +339 -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 +71 -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-custom-tools-example.yaml +206 -0
- package/dist/examples/ai-custom-tools-simple.yaml +76 -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/git-checkout-basic.yaml +32 -0
- package/dist/examples/git-checkout-compare.yaml +59 -0
- package/dist/examples/git-checkout-cross-repo.yaml +76 -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/on-init-import-demo.yaml +179 -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/reusable-tools.yaml +92 -0
- package/dist/examples/reusable-workflows.yaml +88 -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/session-reuse-self.yaml +81 -0
- package/dist/examples/slack-simple-chat.yaml +775 -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 +3 -0
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/frontends/github-frontend.d.ts +58 -0
- package/dist/frontends/github-frontend.d.ts.map +1 -0
- package/dist/frontends/host.d.ts +47 -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/frontends/slack-frontend.d.ts +58 -0
- package/dist/frontends/slack-frontend.d.ts.map +1 -0
- package/dist/generated/config-schema.d.ts +967 -57
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +1033 -56
- 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 +2 -4
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134327 -99004
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/logger.d.ts +2 -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-2026-01-20T19-22-58-043Z.ndjson +138 -0
- package/dist/output/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -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 +12 -0
- 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 +43 -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/git-checkout-provider.d.ts +25 -0
- package/dist/providers/git-checkout-provider.d.ts.map +1 -0
- package/dist/providers/github-ops-provider.d.ts.map +1 -1
- package/dist/providers/http-client-provider.d.ts +4 -4
- package/dist/providers/http-client-provider.d.ts.map +1 -1
- package/dist/providers/human-input-check-provider.d.ts +5 -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 +10 -4
- package/dist/providers/mcp-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-custom-sse-server.d.ts +66 -0
- package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -0
- 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/check-provider-registry-534KL5HT.mjs +27 -0
- package/dist/sdk/chunk-23L3QRYX.mjs +16872 -0
- package/dist/sdk/chunk-23L3QRYX.mjs.map +1 -0
- package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-3OMWVM6J.mjs} +11 -1
- package/dist/sdk/chunk-3OMWVM6J.mjs.map +1 -0
- package/dist/sdk/chunk-7UK3NIIT.mjs +482 -0
- package/dist/sdk/chunk-7UK3NIIT.mjs.map +1 -0
- package/dist/sdk/chunk-AGIZJ4UZ.mjs +173 -0
- package/dist/sdk/chunk-AGIZJ4UZ.mjs.map +1 -0
- package/dist/sdk/chunk-AIVFBIS4.mjs +1371 -0
- package/dist/sdk/chunk-AIVFBIS4.mjs.map +1 -0
- package/dist/sdk/chunk-AK6BVWIT.mjs +426 -0
- package/dist/sdk/chunk-AK6BVWIT.mjs.map +1 -0
- package/dist/sdk/chunk-AUT26LHW.mjs +139 -0
- package/dist/sdk/chunk-AUT26LHW.mjs.map +1 -0
- package/dist/sdk/chunk-BOVFH3LI.mjs +232 -0
- package/dist/sdk/chunk-BOVFH3LI.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-HTOKWMPO.mjs +157 -0
- package/dist/sdk/chunk-HTOKWMPO.mjs.map +1 -0
- package/dist/sdk/chunk-NAW3DB3I.mjs +197 -0
- package/dist/sdk/chunk-NAW3DB3I.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-QR7MOMJH.mjs +558 -0
- package/dist/sdk/chunk-QR7MOMJH.mjs.map +1 -0
- package/dist/sdk/chunk-QY2XYPEV.mjs +3556 -0
- package/dist/sdk/chunk-QY2XYPEV.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-SIWNBRTK.mjs +800 -0
- package/dist/sdk/chunk-SIWNBRTK.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/command-executor-TYUV6HUS.mjs +14 -0
- package/dist/sdk/config-YNC2EOOT.mjs +16 -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-YGTF2GHG.mjs +17 -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-SIAEOCON.mjs +1420 -0
- package/dist/sdk/github-frontend-SIAEOCON.mjs.map +1 -0
- package/dist/sdk/host-DXUYTNMU.mjs +52 -0
- package/dist/sdk/host-DXUYTNMU.mjs.map +1 -0
- package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-PKWCKK7E.mjs} +8 -2
- package/dist/sdk/memory-store-XGBB7LX7.mjs +12 -0
- package/dist/sdk/memory-store-XGBB7LX7.mjs.map +1 -0
- package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
- package/dist/sdk/metrics-7PP3EJUH.mjs.map +1 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
- package/dist/sdk/prompt-state-YRJY6QAL.mjs +16 -0
- package/dist/sdk/prompt-state-YRJY6QAL.mjs.map +1 -0
- package/dist/sdk/renderer-schema-LPKN5UJS.mjs +51 -0
- package/dist/sdk/renderer-schema-LPKN5UJS.mjs.map +1 -0
- package/dist/sdk/routing-6N45MJ4F.mjs +24 -0
- package/dist/sdk/routing-6N45MJ4F.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +541 -22
- package/dist/sdk/sdk.d.ts +541 -22
- package/dist/sdk/sdk.js +27963 -16505
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +1116 -2169
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/session-registry-4E6YRQ77.mjs +10 -0
- package/dist/sdk/session-registry-4E6YRQ77.mjs.map +1 -0
- package/dist/sdk/slack-frontend-BVKW3GD5.mjs +735 -0
- package/dist/sdk/slack-frontend-BVKW3GD5.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-GSLPPLCD.mjs} +2 -2
- package/dist/sdk/tracer-init-GSLPPLCD.mjs.map +1 -0
- package/dist/sdk/workflow-registry-R6KSACFR.mjs +12 -0
- package/dist/sdk/workflow-registry-R6KSACFR.mjs.map +1 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/slack/adapter.d.ts +36 -0
- package/dist/slack/adapter.d.ts.map +1 -0
- package/dist/slack/cache-prewarmer.d.ts +31 -0
- package/dist/slack/cache-prewarmer.d.ts.map +1 -0
- package/dist/slack/client.d.ts +77 -0
- package/dist/slack/client.d.ts.map +1 -0
- package/dist/slack/markdown.d.ts +45 -0
- package/dist/slack/markdown.d.ts.map +1 -0
- package/dist/slack/prompt-state.d.ts +33 -0
- package/dist/slack/prompt-state.d.ts.map +1 -0
- package/dist/slack/rate-limiter.d.ts +56 -0
- package/dist/slack/rate-limiter.d.ts.map +1 -0
- package/dist/slack/signature.d.ts +2 -0
- package/dist/slack/signature.d.ts.map +1 -0
- package/dist/slack/socket-runner.d.ts +42 -0
- package/dist/slack/socket-runner.d.ts.map +1 -0
- package/dist/slack/thread-cache.d.ts +51 -0
- package/dist/slack/thread-cache.d.ts.map +1 -0
- 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 +17 -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/on-init-handlers.d.ts +43 -0
- package/dist/state-machine/dispatch/on-init-handlers.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 +79 -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 +159 -0
- package/dist/state-machine-execution-engine.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -1
- package/dist/telemetry/state-capture.d.ts +5 -0
- package/dist/telemetry/state-capture.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 +45 -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 +127 -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/recorders/slack-recorder.d.ts +17 -0
- package/dist/test-runner/recorders/slack-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-2026-01-20T19-22-58-043Z.ndjson +138 -0
- package/dist/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -0
- package/dist/types/bot.d.ts +109 -0
- package/dist/types/bot.d.ts.map +1 -0
- package/dist/types/cli.d.ts +8 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +459 -9
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts +177 -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/git-checkout.d.ts +76 -0
- package/dist/types/git-checkout.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/json-text-extractor.d.ts +17 -0
- package/dist/utils/json-text-extractor.d.ts.map +1 -0
- package/dist/utils/sandbox.d.ts +10 -0
- 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 +8 -0
- package/dist/utils/template-context.d.ts.map +1 -0
- package/dist/utils/tracer-init.d.ts.map +1 -1
- package/dist/utils/workspace-manager.d.ts +118 -0
- package/dist/utils/workspace-manager.d.ts.map +1 -0
- package/dist/utils/worktree-cleanup.d.ts +33 -0
- package/dist/utils/worktree-cleanup.d.ts.map +1 -0
- package/dist/utils/worktree-manager.d.ts +153 -0
- package/dist/utils/worktree-manager.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 +12 -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 → check-provider-registry-534KL5HT.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → command-executor-TYUV6HUS.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → config-YNC2EOOT.mjs.map} +0 -0
- /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → failure-condition-evaluator-YGTF2GHG.mjs.map} +0 -0
- /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → liquid-extensions-PKWCKK7E.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' | 'git-checkout';
|
|
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,43 @@ 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;
|
|
238
|
+
/** Skip adding Slack conversation context to the prompt (when running under Slack) */
|
|
239
|
+
skip_slack_context?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Skip adding transport-specific context (e.g., GitHub PR/issue XML, Slack
|
|
242
|
+
* conversation XML) to the prompt. When true, this behaves like setting both
|
|
243
|
+
* skip_code_context and skip_slack_context to true, unless those are
|
|
244
|
+
* explicitly overridden.
|
|
245
|
+
*/
|
|
246
|
+
skip_transport_context?: boolean;
|
|
165
247
|
/** MCP servers configuration */
|
|
166
248
|
mcpServers?: Record<string, McpServerConfig>;
|
|
249
|
+
/** Enable the delegate tool for task distribution to subagents */
|
|
250
|
+
enableDelegate?: boolean;
|
|
251
|
+
/** Retry configuration for this provider */
|
|
252
|
+
retry?: AIRetryConfig;
|
|
253
|
+
/** Fallback configuration for provider failures */
|
|
254
|
+
fallback?: AIFallbackConfig;
|
|
255
|
+
/** Enable Edit and Create tools for file modification (disabled by default for security) */
|
|
256
|
+
allowEdit?: boolean;
|
|
257
|
+
/** Filter allowed tools - supports whitelist, exclusion (!prefix), or raw AI mode (empty array) */
|
|
258
|
+
allowedTools?: string[];
|
|
259
|
+
/** Disable all tools for raw AI mode (alternative to allowedTools: []) */
|
|
260
|
+
disableTools?: boolean;
|
|
261
|
+
/** Enable bash command execution (shorthand for bashConfig.enabled) */
|
|
262
|
+
allowBash?: boolean;
|
|
263
|
+
/** Advanced bash command execution configuration */
|
|
264
|
+
bashConfig?: BashConfig;
|
|
265
|
+
/** Completion prompt for post-completion validation/review (runs after attempt_completion) */
|
|
266
|
+
completion_prompt?: string;
|
|
167
267
|
}
|
|
168
268
|
/**
|
|
169
269
|
* MCP Server configuration
|
|
@@ -190,6 +290,8 @@ interface ClaudeCodeConfig {
|
|
|
190
290
|
mcpServers?: Record<string, McpServerConfig>;
|
|
191
291
|
/** Path to subagent script */
|
|
192
292
|
subagent?: string;
|
|
293
|
+
/** Enable the delegate tool for task distribution to subagents */
|
|
294
|
+
enableDelegate?: boolean;
|
|
193
295
|
/** Event hooks for lifecycle management */
|
|
194
296
|
hooks?: {
|
|
195
297
|
/** Called when check starts */
|
|
@@ -228,6 +330,8 @@ interface CheckConfig {
|
|
|
228
330
|
transform?: string;
|
|
229
331
|
/** Transform using JavaScript expressions (evaluated in secure sandbox) - optional */
|
|
230
332
|
transform_js?: string;
|
|
333
|
+
/** Script content to execute for script checks */
|
|
334
|
+
content?: string;
|
|
231
335
|
/** Cron schedule expression (e.g., "0 2 * * *") - optional for any check type */
|
|
232
336
|
schedule?: string;
|
|
233
337
|
/** Focus area for the check (security/performance/style/architecture/all) - optional */
|
|
@@ -244,20 +348,37 @@ interface CheckConfig {
|
|
|
244
348
|
ai_model?: string;
|
|
245
349
|
/** AI provider to use for this check - overrides global setting */
|
|
246
350
|
ai_provider?: 'google' | 'anthropic' | 'openai' | 'bedrock' | 'mock' | string;
|
|
351
|
+
/** Optional persona hint, prepended to the prompt as 'Persona: <value>' */
|
|
352
|
+
ai_persona?: string;
|
|
353
|
+
/** Probe promptType for this check (underscore style) */
|
|
354
|
+
ai_prompt_type?: string;
|
|
355
|
+
/** System prompt for this check (underscore style) */
|
|
356
|
+
ai_system_prompt?: string;
|
|
357
|
+
/** Legacy customPrompt (underscore style) — deprecated, use ai_system_prompt */
|
|
358
|
+
ai_custom_prompt?: string;
|
|
247
359
|
/** MCP servers for this AI check - overrides global setting */
|
|
248
360
|
ai_mcp_servers?: Record<string, McpServerConfig>;
|
|
361
|
+
/** List of custom tool names to expose to this AI check via ephemeral SSE MCP server */
|
|
362
|
+
ai_custom_tools?: string[];
|
|
249
363
|
/** Claude Code configuration (for claude-code type checks) */
|
|
250
364
|
claude_code?: ClaudeCodeConfig;
|
|
251
365
|
/** Environment variables for this check */
|
|
252
366
|
env?: EnvConfig;
|
|
253
367
|
/** Timeout in seconds for command execution (default: 60) */
|
|
254
368
|
timeout?: number;
|
|
255
|
-
/** Check IDs that this check depends on (optional) */
|
|
256
|
-
depends_on?: string[];
|
|
369
|
+
/** Check IDs that this check depends on (optional). Accepts single string or array. */
|
|
370
|
+
depends_on?: string | string[];
|
|
257
371
|
/** Group name for comment separation (e.g., "code-review", "pr-overview") - optional */
|
|
258
372
|
group?: string;
|
|
259
373
|
/** Schema type for template rendering (e.g., "code-review", "markdown") or inline JSON schema object - optional */
|
|
260
374
|
schema?: string | Record<string, unknown>;
|
|
375
|
+
/**
|
|
376
|
+
* Optional JSON Schema to validate the produced output. If omitted and
|
|
377
|
+
* `schema` is an object, the engine will treat that object as the
|
|
378
|
+
* output_schema for validation purposes while still using string schemas
|
|
379
|
+
* (e.g., 'code-review') for template selection.
|
|
380
|
+
*/
|
|
381
|
+
output_schema?: Record<string, unknown>;
|
|
261
382
|
/** Custom template configuration - optional */
|
|
262
383
|
template?: CustomTemplateConfig;
|
|
263
384
|
/** Condition to determine if check should run - runs if expression evaluates to true */
|
|
@@ -272,12 +393,59 @@ interface CheckConfig {
|
|
|
272
393
|
failure_conditions?: FailureConditions;
|
|
273
394
|
/** Tags for categorizing and filtering checks (e.g., ["local", "fast", "security"]) */
|
|
274
395
|
tags?: string[];
|
|
396
|
+
/**
|
|
397
|
+
* Operational criticality of this step. Drives default safety policies
|
|
398
|
+
* (contracts, retries, loop budgets) at load time. Behavior can still be
|
|
399
|
+
* overridden explicitly per step via on_*, fail_if, assume/guarantee, etc.
|
|
400
|
+
*
|
|
401
|
+
* - 'external': interacts with external systems (side effects). Highest safety.
|
|
402
|
+
* - 'internal': modifies CI/config/state but not prod. High safety.
|
|
403
|
+
* - 'policy': organizational checks (linting, style, doc). Moderate safety.
|
|
404
|
+
* - 'info': informational checks. Lowest safety.
|
|
405
|
+
*/
|
|
406
|
+
criticality?: 'external' | 'internal' | 'policy' | 'info';
|
|
407
|
+
/**
|
|
408
|
+
* Allow dependents to run even if this step fails.
|
|
409
|
+
* Defaults to false (dependents are gated when this step fails).
|
|
410
|
+
* Similar to GitHub Actions' continue-on-error.
|
|
411
|
+
*/
|
|
412
|
+
continue_on_failure?: boolean;
|
|
275
413
|
/** Process output as array and run dependent checks for each item */
|
|
276
414
|
forEach?: boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Control scheduling behavior when this check is triggered via routing (run/goto)
|
|
417
|
+
* from a forEach scope.
|
|
418
|
+
* - 'map': schedule once per item (fan-out) using item scopes.
|
|
419
|
+
* - 'reduce': schedule a single run at the parent scope (aggregation).
|
|
420
|
+
* If unset, the current default is a single run (reduce) for backward compatibility.
|
|
421
|
+
*/
|
|
422
|
+
fanout?: 'map' | 'reduce';
|
|
423
|
+
/** Alias for fanout: 'reduce' */
|
|
424
|
+
reduce?: boolean;
|
|
425
|
+
/** Init routing configuration for this check (runs before execution/preprocessing) */
|
|
426
|
+
on_init?: OnInitConfig;
|
|
277
427
|
/** Failure routing configuration for this check (retry/goto/run) */
|
|
278
428
|
on_fail?: OnFailConfig;
|
|
279
429
|
/** Success routing configuration for this check (post-actions and optional goto) */
|
|
280
430
|
on_success?: OnSuccessConfig;
|
|
431
|
+
/** Finish routing configuration for forEach checks (runs after ALL iterations complete) */
|
|
432
|
+
on_finish?: OnFinishConfig;
|
|
433
|
+
/**
|
|
434
|
+
* Preconditions that must hold before executing the check. If any expression
|
|
435
|
+
* evaluates to false, the check is skipped (skipReason='assume').
|
|
436
|
+
*/
|
|
437
|
+
assume?: string | string[];
|
|
438
|
+
/**
|
|
439
|
+
* Postconditions that should hold after executing the check. Expressions are
|
|
440
|
+
* evaluated against the produced result/output; violations are recorded as
|
|
441
|
+
* error issues with ruleId "contract/guarantee_failed".
|
|
442
|
+
*/
|
|
443
|
+
guarantee?: string | string[];
|
|
444
|
+
/**
|
|
445
|
+
* Hard cap on how many times this check may execute within a single engine run.
|
|
446
|
+
* Overrides global limits.max_runs_per_check. Set to 0 or negative to disable for this step.
|
|
447
|
+
*/
|
|
448
|
+
max_runs?: number;
|
|
281
449
|
/**
|
|
282
450
|
* Log provider specific options (optional, only used when type === 'log').
|
|
283
451
|
* Declared here to ensure JSON Schema allows these keys and Ajv does not warn.
|
|
@@ -292,19 +460,25 @@ interface CheckConfig {
|
|
|
292
460
|
include_dependencies?: boolean;
|
|
293
461
|
/** Include execution metadata in log output */
|
|
294
462
|
include_metadata?: boolean;
|
|
463
|
+
/**
|
|
464
|
+
* Output parsing hint for command provider (optional)
|
|
465
|
+
* When set to 'json', command stdout is expected to be JSON. When 'text', treat as plain text.
|
|
466
|
+
* Note: command provider attempts JSON parsing heuristically; this flag mainly suppresses schema warnings
|
|
467
|
+
* and may be used by providers to alter parsing behavior in the future.
|
|
468
|
+
*/
|
|
469
|
+
output_format?: 'json' | 'text';
|
|
295
470
|
/**
|
|
296
471
|
* Memory provider specific options (optional, only used when type === 'memory').
|
|
297
472
|
*/
|
|
298
473
|
/** Memory operation to perform */
|
|
299
|
-
|
|
474
|
+
/** Memory operation to perform. Use `type: 'script'` for custom JavaScript. */
|
|
475
|
+
operation?: 'get' | 'set' | 'append' | 'increment' | 'delete' | 'clear' | 'list';
|
|
300
476
|
/** Key for memory operation */
|
|
301
477
|
key?: string;
|
|
302
478
|
/** Value for set/append operations */
|
|
303
479
|
value?: unknown;
|
|
304
480
|
/** JavaScript expression to compute value dynamically */
|
|
305
481
|
value_js?: string;
|
|
306
|
-
/** JavaScript code for exec_js operation with full memory access */
|
|
307
|
-
memory_js?: string;
|
|
308
482
|
/** Override namespace for this check */
|
|
309
483
|
namespace?: string;
|
|
310
484
|
/**
|
|
@@ -326,7 +500,7 @@ interface CheckConfig {
|
|
|
326
500
|
/** Session ID for HTTP transport (optional, server may generate one) */
|
|
327
501
|
sessionId?: string;
|
|
328
502
|
/** Command arguments (for stdio transport in MCP checks) */
|
|
329
|
-
|
|
503
|
+
command_args?: string[];
|
|
330
504
|
/** Working directory (for stdio transport in MCP checks) */
|
|
331
505
|
workingDirectory?: string;
|
|
332
506
|
/**
|
|
@@ -340,6 +514,54 @@ interface CheckConfig {
|
|
|
340
514
|
multiline?: boolean;
|
|
341
515
|
/** Default value if timeout occurs or empty input when allow_empty is true */
|
|
342
516
|
default?: string;
|
|
517
|
+
/**
|
|
518
|
+
* Workflow provider specific options (optional, only used when type === 'workflow').
|
|
519
|
+
*/
|
|
520
|
+
/** Workflow ID or path to workflow file */
|
|
521
|
+
workflow?: string;
|
|
522
|
+
/** Arguments/inputs for the workflow */
|
|
523
|
+
args?: Record<string, unknown>;
|
|
524
|
+
/** Override specific step configurations in the workflow */
|
|
525
|
+
overrides?: Record<string, Partial<CheckConfig>>;
|
|
526
|
+
/** Map workflow outputs to check outputs */
|
|
527
|
+
output_mapping?: Record<string, string>;
|
|
528
|
+
/** Alias for args - workflow inputs (backward compatibility) */
|
|
529
|
+
workflow_inputs?: Record<string, unknown>;
|
|
530
|
+
/** Config file path - alternative to workflow ID (loads a Visor config file as workflow) */
|
|
531
|
+
config?: string;
|
|
532
|
+
/** Alias for overrides - workflow step overrides (backward compatibility) */
|
|
533
|
+
workflow_overrides?: Record<string, Partial<CheckConfig>>;
|
|
534
|
+
/**
|
|
535
|
+
* Git-checkout provider specific options (optional, only used when type === 'git-checkout').
|
|
536
|
+
*/
|
|
537
|
+
/** Git reference to checkout (branch, tag, commit SHA) - supports templates */
|
|
538
|
+
ref?: string;
|
|
539
|
+
/** Repository URL or owner/repo format (defaults to current repository) */
|
|
540
|
+
repository?: string;
|
|
541
|
+
/** GitHub token for private repositories (defaults to GITHUB_TOKEN env) */
|
|
542
|
+
token?: string;
|
|
543
|
+
/** Number of commits to fetch (0 for full history, default: 1) */
|
|
544
|
+
fetch_depth?: number;
|
|
545
|
+
/** Whether to fetch tags (default: false) */
|
|
546
|
+
fetch_tags?: boolean;
|
|
547
|
+
/** Checkout submodules: false, true, or 'recursive' */
|
|
548
|
+
submodules?: boolean | 'recursive';
|
|
549
|
+
/** Working directory for the checkout (defaults to temp directory) */
|
|
550
|
+
working_directory?: string;
|
|
551
|
+
/** Use git worktree for efficient parallel checkouts (default: true) */
|
|
552
|
+
use_worktree?: boolean;
|
|
553
|
+
/** Clean the working directory before checkout (default: true) */
|
|
554
|
+
clean?: boolean;
|
|
555
|
+
/** Sparse checkout paths - only checkout specific directories/files */
|
|
556
|
+
sparse_checkout?: string[];
|
|
557
|
+
/** Enable Git LFS (Large File Storage) */
|
|
558
|
+
lfs?: boolean;
|
|
559
|
+
/** Timeout in ms for cloning the bare repository (default: 300000 = 5 min) */
|
|
560
|
+
clone_timeout_ms?: number;
|
|
561
|
+
/** Clean up worktree on failure (default: true) */
|
|
562
|
+
cleanup_on_failure?: boolean;
|
|
563
|
+
/** Keep worktree after workflow completion (default: false) */
|
|
564
|
+
persist_worktree?: boolean;
|
|
343
565
|
}
|
|
344
566
|
/**
|
|
345
567
|
* Backoff policy for retries
|
|
@@ -375,6 +597,12 @@ interface OnFailConfig {
|
|
|
375
597
|
goto_js?: string;
|
|
376
598
|
/** Dynamic remediation list: JS expression returning string[] */
|
|
377
599
|
run_js?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Declarative transitions. Evaluated in order; first matching rule wins.
|
|
602
|
+
* If a rule's `to` is null, no goto occurs. When omitted or none match,
|
|
603
|
+
* the engine falls back to goto_js/goto for backward compatibility.
|
|
604
|
+
*/
|
|
605
|
+
transitions?: TransitionRule[];
|
|
378
606
|
}
|
|
379
607
|
/**
|
|
380
608
|
* Success routing configuration per check
|
|
@@ -390,6 +618,90 @@ interface OnSuccessConfig {
|
|
|
390
618
|
goto_js?: string;
|
|
391
619
|
/** Dynamic post-success steps: JS expression returning string[] */
|
|
392
620
|
run_js?: string;
|
|
621
|
+
/** Declarative transitions (see OnFailConfig.transitions). */
|
|
622
|
+
transitions?: TransitionRule[];
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Finish routing configuration for forEach checks
|
|
626
|
+
* Runs once after ALL iterations of forEach and ALL dependent checks complete
|
|
627
|
+
*/
|
|
628
|
+
interface OnFinishConfig {
|
|
629
|
+
/** Post-finish steps to run */
|
|
630
|
+
run?: string[];
|
|
631
|
+
/** Optional jump back to ancestor step (by id) */
|
|
632
|
+
goto?: string;
|
|
633
|
+
/** Simulate a different event when performing goto (e.g., 'pr_updated') */
|
|
634
|
+
goto_event?: EventTrigger;
|
|
635
|
+
/** Dynamic goto: JS expression returning step id or null */
|
|
636
|
+
goto_js?: string;
|
|
637
|
+
/** Dynamic post-finish steps: JS expression returning string[] */
|
|
638
|
+
run_js?: string;
|
|
639
|
+
/** Declarative transitions (see OnFailConfig.transitions). */
|
|
640
|
+
transitions?: TransitionRule[];
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Init routing configuration per check
|
|
644
|
+
* Runs BEFORE the check executes (preprocessing/setup)
|
|
645
|
+
*/
|
|
646
|
+
interface OnInitConfig {
|
|
647
|
+
/** Items to run before this check executes */
|
|
648
|
+
run?: OnInitRunItem[];
|
|
649
|
+
/** Dynamic init items: JS expression returning OnInitRunItem[] */
|
|
650
|
+
run_js?: string;
|
|
651
|
+
/** Declarative transitions (optional, for advanced use cases) */
|
|
652
|
+
transitions?: TransitionRule[];
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Unified on_init run item - can be tool, step, workflow, or plain string
|
|
656
|
+
*/
|
|
657
|
+
type OnInitRunItem = OnInitToolInvocation | OnInitStepInvocation | OnInitWorkflowInvocation | string;
|
|
658
|
+
/**
|
|
659
|
+
* Invoke a custom tool (from tools: section)
|
|
660
|
+
*/
|
|
661
|
+
interface OnInitToolInvocation {
|
|
662
|
+
/** Tool name (must exist in tools: section) */
|
|
663
|
+
tool: string;
|
|
664
|
+
/** Arguments to pass to the tool (Liquid templates supported) */
|
|
665
|
+
with?: Record<string, unknown>;
|
|
666
|
+
/** Custom output name (defaults to tool name) */
|
|
667
|
+
as?: string;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Invoke a helper step (regular check)
|
|
671
|
+
*/
|
|
672
|
+
interface OnInitStepInvocation {
|
|
673
|
+
/** Step name (must exist in steps: section) */
|
|
674
|
+
step: string;
|
|
675
|
+
/** Arguments to pass to the step (Liquid templates supported) */
|
|
676
|
+
with?: Record<string, unknown>;
|
|
677
|
+
/** Custom output name (defaults to step name) */
|
|
678
|
+
as?: string;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Invoke a reusable workflow
|
|
682
|
+
*/
|
|
683
|
+
interface OnInitWorkflowInvocation {
|
|
684
|
+
/** Workflow ID or path */
|
|
685
|
+
workflow: string;
|
|
686
|
+
/** Workflow inputs (Liquid templates supported) */
|
|
687
|
+
with?: Record<string, unknown>;
|
|
688
|
+
/** Custom output name (defaults to workflow name) */
|
|
689
|
+
as?: string;
|
|
690
|
+
/** Step overrides */
|
|
691
|
+
overrides?: Record<string, Partial<CheckConfig>>;
|
|
692
|
+
/** Output mapping */
|
|
693
|
+
output_mapping?: Record<string, string>;
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Declarative transition rule for on_* blocks.
|
|
697
|
+
*/
|
|
698
|
+
interface TransitionRule {
|
|
699
|
+
/** JavaScript expression evaluated in the same sandbox as goto_js; truthy enables the rule. */
|
|
700
|
+
when: string;
|
|
701
|
+
/** Target step ID, or null to explicitly prevent goto. */
|
|
702
|
+
to?: string | null;
|
|
703
|
+
/** Optional event override when performing goto. */
|
|
704
|
+
goto_event?: EventTrigger;
|
|
393
705
|
}
|
|
394
706
|
/**
|
|
395
707
|
* Global routing defaults
|
|
@@ -402,6 +714,23 @@ interface RoutingDefaults {
|
|
|
402
714
|
on_fail?: OnFailConfig;
|
|
403
715
|
};
|
|
404
716
|
}
|
|
717
|
+
/**
|
|
718
|
+
* Global engine limits
|
|
719
|
+
*/
|
|
720
|
+
interface LimitsConfig {
|
|
721
|
+
/**
|
|
722
|
+
* Maximum number of executions per check within a single engine run.
|
|
723
|
+
* Applies to each distinct scope independently for forEach item executions.
|
|
724
|
+
* Set to 0 or negative to disable. Default: 50.
|
|
725
|
+
*/
|
|
726
|
+
max_runs_per_check?: number;
|
|
727
|
+
/**
|
|
728
|
+
* Maximum nesting depth for workflows executed by the state machine engine.
|
|
729
|
+
* Nested workflows are invoked by the workflow provider; this limit prevents
|
|
730
|
+
* accidental infinite recursion. Default: 3.
|
|
731
|
+
*/
|
|
732
|
+
max_workflow_depth?: number;
|
|
733
|
+
}
|
|
405
734
|
/**
|
|
406
735
|
* Custom template configuration
|
|
407
736
|
*/
|
|
@@ -430,6 +759,8 @@ interface DebugConfig {
|
|
|
430
759
|
* PR comment output configuration
|
|
431
760
|
*/
|
|
432
761
|
interface PrCommentOutput {
|
|
762
|
+
/** Whether PR comments are enabled */
|
|
763
|
+
enabled?: boolean;
|
|
433
764
|
/** Format of the output */
|
|
434
765
|
format: ConfigOutputFormat;
|
|
435
766
|
/** How to group the results */
|
|
@@ -571,6 +902,68 @@ interface VisorHooks {
|
|
|
571
902
|
/** Called when human input is required */
|
|
572
903
|
onHumanInput?: (request: HumanInputRequest) => Promise<string>;
|
|
573
904
|
}
|
|
905
|
+
/**
|
|
906
|
+
* Custom tool definition for use in MCP blocks
|
|
907
|
+
*/
|
|
908
|
+
interface CustomToolDefinition {
|
|
909
|
+
/** Tool name - used to reference the tool in MCP blocks */
|
|
910
|
+
name: string;
|
|
911
|
+
/** Description of what the tool does */
|
|
912
|
+
description?: string;
|
|
913
|
+
/** Input schema for the tool (JSON Schema format) */
|
|
914
|
+
inputSchema?: {
|
|
915
|
+
type: 'object';
|
|
916
|
+
properties?: Record<string, unknown>;
|
|
917
|
+
required?: string[];
|
|
918
|
+
additionalProperties?: boolean;
|
|
919
|
+
};
|
|
920
|
+
/** Command to execute - supports Liquid template */
|
|
921
|
+
exec: string;
|
|
922
|
+
/** Optional stdin input - supports Liquid template */
|
|
923
|
+
stdin?: string;
|
|
924
|
+
/** Transform the raw output - supports Liquid template */
|
|
925
|
+
transform?: string;
|
|
926
|
+
/** Transform the output using JavaScript - alternative to transform */
|
|
927
|
+
transform_js?: string;
|
|
928
|
+
/** Working directory for command execution */
|
|
929
|
+
cwd?: string;
|
|
930
|
+
/** Environment variables for the command */
|
|
931
|
+
env?: Record<string, string>;
|
|
932
|
+
/** Timeout in milliseconds */
|
|
933
|
+
timeout?: number;
|
|
934
|
+
/** Whether to parse output as JSON automatically */
|
|
935
|
+
parseJson?: boolean;
|
|
936
|
+
/** Expected output schema for validation */
|
|
937
|
+
outputSchema?: Record<string, unknown>;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Workflow input definition for standalone reusable workflows
|
|
941
|
+
*/
|
|
942
|
+
interface WorkflowInput {
|
|
943
|
+
/** Input parameter name */
|
|
944
|
+
name: string;
|
|
945
|
+
/** JSON Schema for the input */
|
|
946
|
+
schema?: Record<string, unknown>;
|
|
947
|
+
/** Whether this input is required */
|
|
948
|
+
required?: boolean;
|
|
949
|
+
/** Default value if not provided */
|
|
950
|
+
default?: unknown;
|
|
951
|
+
/** Human-readable description */
|
|
952
|
+
description?: string;
|
|
953
|
+
}
|
|
954
|
+
/**
|
|
955
|
+
* Workflow output definition for standalone reusable workflows
|
|
956
|
+
*/
|
|
957
|
+
interface WorkflowOutput {
|
|
958
|
+
/** Output name */
|
|
959
|
+
name: string;
|
|
960
|
+
/** Human-readable description */
|
|
961
|
+
description?: string;
|
|
962
|
+
/** Value using Liquid template syntax (references step outputs) */
|
|
963
|
+
value?: string;
|
|
964
|
+
/** Value using JavaScript expression (alternative to value) */
|
|
965
|
+
value_js?: string;
|
|
966
|
+
}
|
|
574
967
|
/**
|
|
575
968
|
* Main Visor configuration
|
|
576
969
|
*/
|
|
@@ -579,12 +972,22 @@ interface VisorConfig {
|
|
|
579
972
|
version: string;
|
|
580
973
|
/** Extends from other configurations - can be file path, HTTP(S) URL, or "default" */
|
|
581
974
|
extends?: string | string[];
|
|
975
|
+
/** Alias for extends - include from other configurations (backward compatibility) */
|
|
976
|
+
include?: string | string[];
|
|
977
|
+
/** Custom tool definitions that can be used in MCP blocks */
|
|
978
|
+
tools?: Record<string, CustomToolDefinition>;
|
|
979
|
+
/** Import workflow definitions from external files or URLs */
|
|
980
|
+
imports?: string[];
|
|
981
|
+
/** Workflow inputs (for standalone reusable workflows) */
|
|
982
|
+
inputs?: WorkflowInput[];
|
|
983
|
+
/** Workflow outputs (for standalone reusable workflows) */
|
|
984
|
+
outputs?: WorkflowOutput[];
|
|
582
985
|
/** Step configurations (recommended) */
|
|
583
986
|
steps?: Record<string, CheckConfig>;
|
|
584
987
|
/** Check configurations (legacy, use 'steps' instead) - always populated after normalization */
|
|
585
988
|
checks?: Record<string, CheckConfig>;
|
|
586
|
-
/** Output configuration */
|
|
587
|
-
output
|
|
989
|
+
/** Output configuration (optional - defaults provided) */
|
|
990
|
+
output?: OutputConfig;
|
|
588
991
|
/** HTTP server configuration for receiving webhooks */
|
|
589
992
|
http_server?: HttpServerConfig;
|
|
590
993
|
/** Memory storage configuration */
|
|
@@ -611,21 +1014,51 @@ interface VisorConfig {
|
|
|
611
1014
|
tag_filter?: TagFilter;
|
|
612
1015
|
/** Optional routing defaults for retry/goto/run policies */
|
|
613
1016
|
routing?: RoutingDefaults;
|
|
1017
|
+
/** Global execution limits */
|
|
1018
|
+
limits?: LimitsConfig;
|
|
1019
|
+
/** Optional integrations: event-driven frontends (e.g., ndjson-sink, github) */
|
|
1020
|
+
frontends?: Array<{
|
|
1021
|
+
/** Frontend name, e.g., 'ndjson-sink', 'github' */
|
|
1022
|
+
name: string;
|
|
1023
|
+
/** Frontend-specific configuration */
|
|
1024
|
+
config?: unknown;
|
|
1025
|
+
}>;
|
|
1026
|
+
/** Workspace isolation configuration for sandboxed execution */
|
|
1027
|
+
workspace?: WorkspaceConfig;
|
|
1028
|
+
/** Slack configuration */
|
|
1029
|
+
slack?: SlackConfig;
|
|
614
1030
|
}
|
|
615
|
-
|
|
616
1031
|
/**
|
|
617
|
-
*
|
|
1032
|
+
* Workspace isolation configuration
|
|
618
1033
|
*/
|
|
619
|
-
interface
|
|
620
|
-
/**
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
1034
|
+
interface WorkspaceConfig {
|
|
1035
|
+
/** Enable workspace isolation (default: true when config present) */
|
|
1036
|
+
enabled?: boolean;
|
|
1037
|
+
/** Base path for workspaces (default: /tmp/visor-workspaces) */
|
|
1038
|
+
base_path?: string;
|
|
1039
|
+
/** Clean up workspace on exit (default: true) */
|
|
1040
|
+
cleanup_on_exit?: boolean;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Slack configuration
|
|
1044
|
+
*/
|
|
1045
|
+
interface SlackConfig {
|
|
1046
|
+
/** Slack API version */
|
|
1047
|
+
version?: string;
|
|
1048
|
+
/** Mention handling: 'all', 'direct', etc. */
|
|
1049
|
+
mentions?: string;
|
|
1050
|
+
/** Thread handling: 'required', 'optional', etc. */
|
|
1051
|
+
threads?: string;
|
|
1052
|
+
/** Show raw output in Slack responses */
|
|
1053
|
+
show_raw_output?: boolean;
|
|
1054
|
+
/**
|
|
1055
|
+
* Append telemetry identifiers to Slack replies.
|
|
1056
|
+
*/
|
|
1057
|
+
telemetry?: SlackTelemetryConfig;
|
|
1058
|
+
}
|
|
1059
|
+
interface SlackTelemetryConfig {
|
|
1060
|
+
/** Enable telemetry ID suffix in Slack messages */
|
|
1061
|
+
enabled?: boolean;
|
|
629
1062
|
}
|
|
630
1063
|
|
|
631
1064
|
/**
|
|
@@ -636,10 +1069,12 @@ interface CheckExecutionStats {
|
|
|
636
1069
|
totalRuns: number;
|
|
637
1070
|
successfulRuns: number;
|
|
638
1071
|
failedRuns: number;
|
|
1072
|
+
skippedRuns: number;
|
|
639
1073
|
skipped: boolean;
|
|
640
|
-
skipReason?: 'if_condition' | 'fail_fast' | 'dependency_failed';
|
|
1074
|
+
skipReason?: 'if_condition' | 'fail_fast' | 'dependency_failed' | 'forEach_empty' | 'assume';
|
|
641
1075
|
skipCondition?: string;
|
|
642
1076
|
totalDuration: number;
|
|
1077
|
+
providerDurationMs?: number;
|
|
643
1078
|
perIterationDuration?: number[];
|
|
644
1079
|
issuesFound: number;
|
|
645
1080
|
issuesBySeverity: {
|
|
@@ -715,6 +1150,90 @@ interface DebugInfo {
|
|
|
715
1150
|
}>;
|
|
716
1151
|
}
|
|
717
1152
|
|
|
1153
|
+
interface EventEnvelope<T = any> {
|
|
1154
|
+
id: string;
|
|
1155
|
+
version: 1;
|
|
1156
|
+
timestamp: string;
|
|
1157
|
+
runId: string;
|
|
1158
|
+
workflowId?: string;
|
|
1159
|
+
caseId?: string;
|
|
1160
|
+
wave?: number;
|
|
1161
|
+
attempt?: number;
|
|
1162
|
+
checkId?: string;
|
|
1163
|
+
traceId?: string;
|
|
1164
|
+
spanId?: string;
|
|
1165
|
+
causationId?: string;
|
|
1166
|
+
correlationId?: string;
|
|
1167
|
+
payload: T;
|
|
1168
|
+
}
|
|
1169
|
+
type AnyEvent = any;
|
|
1170
|
+
|
|
1171
|
+
type EventHandler<T = AnyEvent> = (event: T | EventEnvelope<T>) => void | Promise<void>;
|
|
1172
|
+
interface Subscription {
|
|
1173
|
+
unsubscribe(): void;
|
|
1174
|
+
}
|
|
1175
|
+
declare class EventBus {
|
|
1176
|
+
private handlers;
|
|
1177
|
+
private anyHandlers;
|
|
1178
|
+
on<T = AnyEvent>(eventType: string, handler: EventHandler<T>): Subscription;
|
|
1179
|
+
onAny(handler: EventHandler): Subscription;
|
|
1180
|
+
emit(event: AnyEvent | EventEnvelope): Promise<void>;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Execution context passed to check providers
|
|
1185
|
+
*/
|
|
1186
|
+
interface ExecutionContext {
|
|
1187
|
+
/** Session information for AI session reuse */
|
|
1188
|
+
parentSessionId?: string;
|
|
1189
|
+
reuseSession?: boolean;
|
|
1190
|
+
/** CLI message value (from --message argument) */
|
|
1191
|
+
cliMessage?: string;
|
|
1192
|
+
/**
|
|
1193
|
+
* Stage-local baseline of output history lengths per check name.
|
|
1194
|
+
* When present, providers should expose an `outputs_history_stage` object in
|
|
1195
|
+
* Liquid/JS contexts that slices the global history from this baseline.
|
|
1196
|
+
* This enables stage-scoped assertions in the YAML test runner without
|
|
1197
|
+
* relying on global execution history.
|
|
1198
|
+
*/
|
|
1199
|
+
stageHistoryBase?: Record<string, number>;
|
|
1200
|
+
/** Workflow inputs - available when executing within a workflow */
|
|
1201
|
+
workflowInputs?: Record<string, unknown>;
|
|
1202
|
+
/** Custom arguments passed from on_init 'with' directive */
|
|
1203
|
+
args?: Record<string, unknown>;
|
|
1204
|
+
/** SDK hooks for human input */
|
|
1205
|
+
hooks?: {
|
|
1206
|
+
onHumanInput?: (request: HumanInputRequest) => Promise<string>;
|
|
1207
|
+
onPromptCaptured?: (info: {
|
|
1208
|
+
step: string;
|
|
1209
|
+
provider: string;
|
|
1210
|
+
prompt: string;
|
|
1211
|
+
}) => void;
|
|
1212
|
+
mockForStep?: (step: string) => unknown | undefined;
|
|
1213
|
+
};
|
|
1214
|
+
/**
|
|
1215
|
+
* Optional execution mode hints. The core engine does not read environment
|
|
1216
|
+
* variables directly; callers (CLI, test runner) can set these flags to
|
|
1217
|
+
* request certain behaviors without polluting core logic with test-specific
|
|
1218
|
+
* branches.
|
|
1219
|
+
*/
|
|
1220
|
+
mode?: {
|
|
1221
|
+
/** true when running under the YAML test runner */
|
|
1222
|
+
test?: boolean;
|
|
1223
|
+
/** post review comments from grouped execution paths (used by tests) */
|
|
1224
|
+
postGroupedComments?: boolean;
|
|
1225
|
+
/** reset per-run guard state before grouped execution */
|
|
1226
|
+
resetPerRunState?: boolean;
|
|
1227
|
+
};
|
|
1228
|
+
/** Optional event bus for emitting integration events (e.g., HumanInputRequested) */
|
|
1229
|
+
eventBus?: EventBus;
|
|
1230
|
+
/** Optional webhook context (e.g., Slack Events API payload) */
|
|
1231
|
+
webhookContext?: {
|
|
1232
|
+
webhookData?: Map<string, unknown>;
|
|
1233
|
+
eventType?: string;
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
|
|
718
1237
|
interface VisorOptions {
|
|
719
1238
|
cwd?: string;
|
|
720
1239
|
debug?: boolean;
|