@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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## 👀 Observability
|
|
2
|
+
|
|
3
|
+
- Machine-readable output: `--output json` or `--output sarif`.
|
|
4
|
+
- Prefer the built‑in `--output-file <path>` to save results without touching stdout.
|
|
5
|
+
- Status/progress logs are written to stderr; control verbosity via `-q`, `-v`, or `--debug`.
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
visor --check all --output json --output-file results.json
|
|
11
|
+
visor --check security --output sarif --output-file visor-results.sarif
|
|
12
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## 📊 Output Formats
|
|
2
|
+
|
|
3
|
+
- Table: default terminal summary
|
|
4
|
+
- JSON: `--output json` for pipelines
|
|
5
|
+
- Markdown: render comments as markdown
|
|
6
|
+
- SARIF 2.1.0: `--output sarif` for code scanning
|
|
7
|
+
|
|
8
|
+
### Saving outputs reliably
|
|
9
|
+
|
|
10
|
+
- Use the built‑in `--output-file <path>` to write the formatted result directly to a file without mixing with logs.
|
|
11
|
+
- All status logs are sent to stderr; stdout contains only the formatted result when not using `--output-file`.
|
|
12
|
+
|
|
13
|
+
Examples:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
visor --check all --output json --output-file results.json
|
|
17
|
+
visor --check security --output sarif --output-file visor-results.sarif
|
|
18
|
+
visor --check architecture --output markdown --output-file report.md
|
|
19
|
+
visor --check style --output table --output-file summary.txt
|
|
20
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## Output Formatting and Safety Limits
|
|
2
|
+
|
|
3
|
+
Visor renders human‑friendly tables in the CLI using `cli-table3`. Extremely large or unbroken strings can make third‑party wrapping/width calculation slow. To keep rendering fast and predictable, Visor pre‑wraps and truncates content before handing it to the table library.
|
|
4
|
+
|
|
5
|
+
What this means when `--output table` is used:
|
|
6
|
+
|
|
7
|
+
- Long words are soft‑broken to avoid expensive width calculations.
|
|
8
|
+
- Very large cells are truncated with a clear marker:
|
|
9
|
+
|
|
10
|
+
… [truncated]
|
|
11
|
+
|
|
12
|
+
- Code replacements are line‑capped and soft‑wrapped so they fit in the table column.
|
|
13
|
+
|
|
14
|
+
Environment knobs (advanced)
|
|
15
|
+
|
|
16
|
+
- `VISOR_MAX_TABLE_CELL` (default: `4000`)
|
|
17
|
+
- Maximum characters allowed per table cell (after wrapping). Content beyond this is truncated and annotated.
|
|
18
|
+
- `VISOR_MAX_TABLE_CODE_LINES` (default: `120`)
|
|
19
|
+
- Maximum number of code lines included in a single table cell. Extra lines are dropped and the block is annotated.
|
|
20
|
+
|
|
21
|
+
Notes
|
|
22
|
+
|
|
23
|
+
- These safety limits affect only the table output. JSON, SARIF, and Markdown formats are unaffected.
|
|
24
|
+
- If you need the complete, untruncated data for automation, prefer `--output json` (optionally with `--output-file`).
|
|
25
|
+
|
|
26
|
+
Troubleshooting
|
|
27
|
+
|
|
28
|
+
- If you notice slowdowns at “Formatting results as table”, try reducing `VISOR_MAX_TABLE_CELL` (e.g., `2000`) or use `--output json` for machine‑readable pipelines.
|
|
29
|
+
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
# Output History
|
|
2
|
+
|
|
3
|
+
The `outputs.history` feature tracks all outputs from check executions, making it easy to access previous iterations in loops, retries, and forEach operations.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
When checks execute multiple times (through `goto` loops, `retry` attempts, or `forEach` iterations), Visor automatically tracks all output values in `outputs.history`. This is essential for:
|
|
8
|
+
|
|
9
|
+
- **Loop iteration tracking** - Access all values from previous goto loop iterations
|
|
10
|
+
- **Retry analysis** - See outputs from all retry attempts
|
|
11
|
+
- **forEach processing** - Track all items processed in a forEach loop
|
|
12
|
+
- **Debugging** - Understand the full execution history
|
|
13
|
+
- **Progressive calculations** - Build on previous iteration results
|
|
14
|
+
|
|
15
|
+
## Structure
|
|
16
|
+
|
|
17
|
+
The `outputs` variable has two main parts:
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
outputs['check-name'] // Current/latest value from this check
|
|
21
|
+
outputs.history['check-name'] // Array of ALL previous values from this check
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Current vs History
|
|
25
|
+
|
|
26
|
+
- **`outputs['check-name']`** - Always contains the **LATEST** value
|
|
27
|
+
- Updated each time the check executes
|
|
28
|
+
- Single value (not an array)
|
|
29
|
+
- What you typically want to use for conditions and decisions
|
|
30
|
+
|
|
31
|
+
- **`outputs.history['check-name']`** - Contains **ALL PREVIOUS** values
|
|
32
|
+
- Array of all outputs in chronological order
|
|
33
|
+
- First element is from first execution, last is most recent
|
|
34
|
+
- Useful for tracking progress, calculating totals, comparing changes
|
|
35
|
+
|
|
36
|
+
## Usage Examples
|
|
37
|
+
|
|
38
|
+
### Basic Loop Tracking
|
|
39
|
+
|
|
40
|
+
Track a counter through multiple goto iterations:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
steps:
|
|
44
|
+
counter:
|
|
45
|
+
type: script
|
|
46
|
+
content: |
|
|
47
|
+
const count = (memory.get('count') || 0) + 1;
|
|
48
|
+
memory.set('count', count);
|
|
49
|
+
return { iteration: count, timestamp: Date.now() };
|
|
50
|
+
|
|
51
|
+
process:
|
|
52
|
+
type: script
|
|
53
|
+
depends_on: [counter]
|
|
54
|
+
content: |
|
|
55
|
+
// Current iteration
|
|
56
|
+
log('Current iteration:', outputs.counter.iteration);
|
|
57
|
+
|
|
58
|
+
// All previous iterations
|
|
59
|
+
log('All iterations:', outputs.history.counter.map(h => h.iteration));
|
|
60
|
+
|
|
61
|
+
// History length equals current iteration
|
|
62
|
+
log('History length:', outputs.history.counter.length);
|
|
63
|
+
|
|
64
|
+
return `Processed iteration ${outputs.counter.iteration}`;
|
|
65
|
+
on_success:
|
|
66
|
+
goto: counter
|
|
67
|
+
goto_js: |
|
|
68
|
+
// Continue looping until iteration 5
|
|
69
|
+
return outputs.counter.iteration < 5 ? 'counter' : null;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Retry Tracking
|
|
73
|
+
|
|
74
|
+
Track all retry attempts:
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
steps:
|
|
78
|
+
attempt-counter:
|
|
79
|
+
type: script
|
|
80
|
+
content: |
|
|
81
|
+
const attempt = (memory.get('attempt') || 0) + 1;
|
|
82
|
+
memory.set('attempt', attempt);
|
|
83
|
+
return { attempt, timestamp: Date.now() };
|
|
84
|
+
|
|
85
|
+
flaky-operation:
|
|
86
|
+
type: command
|
|
87
|
+
depends_on: [attempt-counter]
|
|
88
|
+
exec: './scripts/flaky-operation.sh'
|
|
89
|
+
transform_js: |
|
|
90
|
+
const attempt = outputs['attempt-counter'].attempt;
|
|
91
|
+
log('Attempt number:', attempt);
|
|
92
|
+
|
|
93
|
+
// Simulate success only on 3rd attempt
|
|
94
|
+
if (attempt < 3) {
|
|
95
|
+
throw new Error('Simulated failure');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
succeeded: true,
|
|
100
|
+
attempt,
|
|
101
|
+
allAttempts: outputs.history['attempt-counter'].map(h => h.attempt)
|
|
102
|
+
};
|
|
103
|
+
on_fail:
|
|
104
|
+
retry:
|
|
105
|
+
max_attempts: 5
|
|
106
|
+
delay: 1000
|
|
107
|
+
goto: attempt-counter
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### forEach History
|
|
111
|
+
|
|
112
|
+
Track all forEach iterations:
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
steps:
|
|
116
|
+
generate-items:
|
|
117
|
+
type: script
|
|
118
|
+
content: |
|
|
119
|
+
return [
|
|
120
|
+
{ id: 1, name: 'alpha', value: 10 },
|
|
121
|
+
{ id: 2, name: 'beta', value: 20 },
|
|
122
|
+
{ id: 3, name: 'gamma', value: 30 }
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
process-item:
|
|
126
|
+
type: script
|
|
127
|
+
depends_on: [generate-items]
|
|
128
|
+
forEach: true
|
|
129
|
+
content: |
|
|
130
|
+
// Process current item (use current dependency value)
|
|
131
|
+
const curr = outputs['generate-items'];
|
|
132
|
+
const processed = { ...curr, doubled: curr.value * 2, processedAt: Date.now() };
|
|
133
|
+
|
|
134
|
+
log('Processing item:', item.id);
|
|
135
|
+
log('Items processed so far:', outputs.history['process-item'].length);
|
|
136
|
+
|
|
137
|
+
return processed;
|
|
138
|
+
|
|
139
|
+
summarize:
|
|
140
|
+
type: script
|
|
141
|
+
depends_on: [process-item]
|
|
142
|
+
content: |
|
|
143
|
+
// Access all forEach results
|
|
144
|
+
const allProcessed = outputs.history['process-item'];
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
totalProcessed: allProcessed.length,
|
|
148
|
+
totalValue: allProcessed.reduce((sum, item) => sum + item.doubled, 0),
|
|
149
|
+
allIds: allProcessed.map(item => item.id),
|
|
150
|
+
allNames: allProcessed.map(item => item.name)
|
|
151
|
+
};
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Comparing with Previous Iteration
|
|
155
|
+
|
|
156
|
+
Compare current value with previous:
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
steps:
|
|
160
|
+
monitor-metric:
|
|
161
|
+
type: command
|
|
162
|
+
exec: 'curl -s https://api.example.com/metrics | jq .cpu_usage'
|
|
163
|
+
transform_js: |
|
|
164
|
+
const current = parseFloat(output);
|
|
165
|
+
return { value: current, timestamp: Date.now() };
|
|
166
|
+
|
|
167
|
+
check-trend:
|
|
168
|
+
type: script
|
|
169
|
+
depends_on: [monitor-metric]
|
|
170
|
+
content: |
|
|
171
|
+
const current = outputs['monitor-metric'].value;
|
|
172
|
+
const history = outputs.history['monitor-metric'];
|
|
173
|
+
|
|
174
|
+
if (history.length > 1) {
|
|
175
|
+
const previous = history[history.length - 1].value;
|
|
176
|
+
const change = current - previous;
|
|
177
|
+
const percentChange = (change / previous) * 100;
|
|
178
|
+
|
|
179
|
+
log('Current:', current);
|
|
180
|
+
log('Previous:', previous);
|
|
181
|
+
log('Change:', percentChange.toFixed(2) + '%');
|
|
182
|
+
|
|
183
|
+
if (percentChange > 50) {
|
|
184
|
+
throw new Error(`CPU usage spiked by ${percentChange.toFixed(2)}%`);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return { current, changeTracked: history.length > 1 };
|
|
189
|
+
on_success:
|
|
190
|
+
goto: monitor-metric
|
|
191
|
+
goto_js: |
|
|
192
|
+
// Monitor for 5 iterations
|
|
193
|
+
return outputs.history['monitor-metric'].length < 5 ? 'monitor-metric' : null;
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Progressive Aggregation
|
|
197
|
+
|
|
198
|
+
Build up results over iterations:
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
steps:
|
|
202
|
+
fetch-page:
|
|
203
|
+
type: script
|
|
204
|
+
content: |
|
|
205
|
+
const page = (memory.get('page') || 0) + 1;
|
|
206
|
+
memory.set('page', page);
|
|
207
|
+
|
|
208
|
+
// Simulate fetching a page of data
|
|
209
|
+
return {
|
|
210
|
+
page,
|
|
211
|
+
items: [`item-${page}-1`, `item-${page}-2`, `item-${page}-3`]
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
aggregate-results:
|
|
215
|
+
type: script
|
|
216
|
+
depends_on: [fetch-page]
|
|
217
|
+
content: |
|
|
218
|
+
// Collect all items from all pages
|
|
219
|
+
const allPages = outputs.history['fetch-page'];
|
|
220
|
+
const allItems = allPages.flatMap(page => page.items);
|
|
221
|
+
|
|
222
|
+
log('Pages fetched:', allPages.length);
|
|
223
|
+
log('Total items:', allItems.length);
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
totalPages: allPages.length,
|
|
227
|
+
totalItems: allItems.length,
|
|
228
|
+
items: allItems
|
|
229
|
+
};
|
|
230
|
+
on_success:
|
|
231
|
+
goto: fetch-page
|
|
232
|
+
goto_js: |
|
|
233
|
+
// Fetch 3 pages
|
|
234
|
+
return outputs.history['fetch-page'].length < 3 ? 'fetch-page' : null;
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Access in Different Contexts
|
|
238
|
+
|
|
239
|
+
### JavaScript Expressions
|
|
240
|
+
|
|
241
|
+
In script content, `transform_js`, `goto_js`, `fail_if`, etc.:
|
|
242
|
+
|
|
243
|
+
```javascript
|
|
244
|
+
// Current value
|
|
245
|
+
outputs['check-name']
|
|
246
|
+
outputs.checkName
|
|
247
|
+
|
|
248
|
+
// History array
|
|
249
|
+
outputs.history['check-name']
|
|
250
|
+
outputs.history.checkName
|
|
251
|
+
|
|
252
|
+
// Array operations
|
|
253
|
+
outputs.history.counter.length
|
|
254
|
+
outputs.history.counter.map(h => h.value)
|
|
255
|
+
outputs.history.counter.filter(h => h.success)
|
|
256
|
+
outputs.history.counter.every(h => h.valid)
|
|
257
|
+
outputs.history.counter.some(h => h.error)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Liquid Templates
|
|
261
|
+
|
|
262
|
+
In templates (logger, http body, etc.):
|
|
263
|
+
|
|
264
|
+
```liquid
|
|
265
|
+
{# Current value #}
|
|
266
|
+
Current: {{ outputs.counter }}
|
|
267
|
+
|
|
268
|
+
{# History array #}
|
|
269
|
+
History: {% for val in outputs.history.counter %}{{ val }}{% unless forloop.last %}, {% endunless %}{% endfor %}
|
|
270
|
+
|
|
271
|
+
{# History length #}
|
|
272
|
+
Total iterations: {{ outputs.history.counter.size }}
|
|
273
|
+
|
|
274
|
+
{# Access specific iteration #}
|
|
275
|
+
First: {{ outputs.history.counter[0] }}
|
|
276
|
+
Last: {{ outputs.history.counter | last }}
|
|
277
|
+
|
|
278
|
+
{# Complex iteration #}
|
|
279
|
+
{% for item in outputs.history['process-item'] %}
|
|
280
|
+
- Item {{ item.id }}: {{ item.name }}
|
|
281
|
+
{% endfor %}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Command Templates
|
|
285
|
+
|
|
286
|
+
In shell commands:
|
|
287
|
+
|
|
288
|
+
```yaml
|
|
289
|
+
steps:
|
|
290
|
+
show-history:
|
|
291
|
+
type: command
|
|
292
|
+
depends_on: [counter]
|
|
293
|
+
exec: |
|
|
294
|
+
echo "Current: {{ outputs.counter }}"
|
|
295
|
+
echo "History: {{ outputs.history.counter | json }}"
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Important Behaviors
|
|
299
|
+
|
|
300
|
+
### History Contains Current Execution
|
|
301
|
+
|
|
302
|
+
The history array includes the current execution. So after 3 iterations:
|
|
303
|
+
- `outputs.counter` = value from 3rd iteration
|
|
304
|
+
- `outputs.history.counter` = `[value1, value2, value3]` (length = 3)
|
|
305
|
+
|
|
306
|
+
### Empty History
|
|
307
|
+
|
|
308
|
+
If a check hasn't executed yet, or has no output:
|
|
309
|
+
- `outputs.history['check-name']` = `[]` (empty array, not undefined)
|
|
310
|
+
- Always safe to check `.length` or iterate
|
|
311
|
+
|
|
312
|
+
### Failed Executions
|
|
313
|
+
|
|
314
|
+
Failed executions that throw errors are NOT added to history. Only successful outputs are tracked.
|
|
315
|
+
|
|
316
|
+
### forEach Iterations
|
|
317
|
+
|
|
318
|
+
Each forEach iteration is tracked separately:
|
|
319
|
+
|
|
320
|
+
```yaml
|
|
321
|
+
steps:
|
|
322
|
+
process-items:
|
|
323
|
+
forEach: true
|
|
324
|
+
type: script
|
|
325
|
+
content: |
|
|
326
|
+
const curr = outputs['process-items'];
|
|
327
|
+
return { itemId: (curr && curr.id) || null, processed: true };
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
After processing 3 items, `outputs.history['process-items']` will have 3 entries (one per item).
|
|
331
|
+
|
|
332
|
+
## Debugging with History
|
|
333
|
+
|
|
334
|
+
### Log All Iterations
|
|
335
|
+
|
|
336
|
+
```javascript
|
|
337
|
+
log('All counter values:', outputs.history.counter);
|
|
338
|
+
log('Iterations count:', outputs.history.counter.length);
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Verify Sequential Execution
|
|
342
|
+
|
|
343
|
+
```javascript
|
|
344
|
+
// Check that iterations are sequential
|
|
345
|
+
for (let i = 0; i < outputs.history.counter.length; i++) {
|
|
346
|
+
if (outputs.history.counter[i].iteration !== i + 1) {
|
|
347
|
+
throw new Error('Iteration order incorrect');
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Track Timing
|
|
353
|
+
|
|
354
|
+
```javascript
|
|
355
|
+
const allTimestamps = outputs.history.counter.map(h => h.timestamp);
|
|
356
|
+
const durations = [];
|
|
357
|
+
for (let i = 1; i < allTimestamps.length; i++) {
|
|
358
|
+
durations.push(allTimestamps[i] - allTimestamps[i-1]);
|
|
359
|
+
}
|
|
360
|
+
log('Average iteration time:', durations.reduce((a,b) => a+b, 0) / durations.length);
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## Performance Considerations
|
|
364
|
+
|
|
365
|
+
- History stores only the output values, not full check results
|
|
366
|
+
- Memory usage grows linearly with iterations (O(n))
|
|
367
|
+
- For very long-running loops (100+ iterations), consider periodically clearing or summarizing
|
|
368
|
+
- Use `max_loops` configuration to prevent infinite loops
|
|
369
|
+
|
|
370
|
+
## Related Documentation
|
|
371
|
+
|
|
372
|
+
- [Liquid Templates](./liquid-templates.md) - Using history in templates
|
|
373
|
+
- [Memory Provider](./memory.md) - Storing and accessing state
|
|
374
|
+
- [Failure Routing](./failure-routing.md) - Using goto and retry with history
|
|
375
|
+
- [forEach Dependency Propagation](./foreach-dependency-propagation.md) - How forEach interacts with history
|
|
376
|
+
- [Debugging](./debugging.md) - Debugging techniques using history
|
|
377
|
+
|
|
378
|
+
## Examples
|
|
379
|
+
|
|
380
|
+
See the test files for complete working examples:
|
|
381
|
+
- `tests/unit/output-history.test.ts` - Basic history functionality
|
|
382
|
+
- `tests/integration/output-history-integration.test.ts` - Complex loop scenarios
|
|
383
|
+
- `tests/unit/goto-current-output.test.ts` - Verifying current vs history values
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
## 🔧 Pluggable Architecture
|
|
2
|
+
|
|
3
|
+
Visor supports multiple provider types (ai, mcp, http, http_client, log, command, github, claude-code). You can also add custom providers.
|
|
4
|
+
|
|
5
|
+
### Custom Provider Skeleton (TypeScript)
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
class CustomCheckProvider {
|
|
9
|
+
name = 'custom';
|
|
10
|
+
async run(input) {
|
|
11
|
+
// ... implement your logic
|
|
12
|
+
return { issues: [] };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Built-in Providers
|
|
18
|
+
|
|
19
|
+
#### AI Provider (`type: ai`)
|
|
20
|
+
Execute AI-powered analysis using Google Gemini, Anthropic Claude, OpenAI, or AWS Bedrock.
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
steps:
|
|
24
|
+
security:
|
|
25
|
+
type: ai
|
|
26
|
+
prompt: "Review for security issues"
|
|
27
|
+
schema: code-review
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[Learn more](./ai-configuration.md)
|
|
31
|
+
|
|
32
|
+
#### MCP Provider (`type: mcp`)
|
|
33
|
+
Call MCP (Model Context Protocol) tools directly via stdio, SSE, or HTTP transports. Unlike AI provider MCP support, this provider directly invokes MCP tools without an AI model.
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
steps:
|
|
37
|
+
probe-search:
|
|
38
|
+
type: mcp
|
|
39
|
+
transport: stdio
|
|
40
|
+
command: npx
|
|
41
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
42
|
+
method: search_code
|
|
43
|
+
methodArgs:
|
|
44
|
+
query: "TODO"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
[Learn more](./mcp-provider.md)
|
|
48
|
+
|
|
49
|
+
#### Command Provider (`type: command`)
|
|
50
|
+
Execute shell commands with templating and security controls.
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
steps:
|
|
54
|
+
lint:
|
|
55
|
+
type: command
|
|
56
|
+
exec: npm run lint
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
[Learn more](./command-provider.md)
|
|
60
|
+
|
|
61
|
+
#### HTTP Client Provider (`type: http_client`)
|
|
62
|
+
Make HTTP requests to external APIs.
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
steps:
|
|
66
|
+
api-check:
|
|
67
|
+
type: http_client
|
|
68
|
+
url: https://api.example.com/analyze
|
|
69
|
+
method: POST
|
|
70
|
+
body: '{{ pr | json }}'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
[Learn more](./http.md)
|
|
74
|
+
|
|
75
|
+
#### HTTP Provider (`type: http`)
|
|
76
|
+
Send check results to external webhooks.
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
steps:
|
|
80
|
+
notify:
|
|
81
|
+
type: http
|
|
82
|
+
url: https://webhook.example.com/notify
|
|
83
|
+
method: POST
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
[Learn more](./http.md)
|
|
87
|
+
|
|
88
|
+
#### Logger Provider (`type: logger`)
|
|
89
|
+
Log messages for debugging and workflow visibility.
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
steps:
|
|
93
|
+
debug:
|
|
94
|
+
type: logger
|
|
95
|
+
message: "PR #{{ pr.number }}: {{ fileCount }} files changed"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
[Learn more](./debugging.md)
|
|
99
|
+
|
|
100
|
+
#### GitHub Provider (`type: github`)
|
|
101
|
+
Interact with GitHub API for labels, comments, and status checks.
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
steps:
|
|
105
|
+
label-pr:
|
|
106
|
+
type: github
|
|
107
|
+
op: labels.add
|
|
108
|
+
values: ["security", "needs-review"]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
[Learn more](./github-ops.md)
|
|
112
|
+
|
|
113
|
+
#### Claude Code Provider (`type: claude-code`)
|
|
114
|
+
Use Claude Code SDK with MCP tools and advanced agent capabilities.
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
steps:
|
|
118
|
+
claude-analysis:
|
|
119
|
+
type: claude-code
|
|
120
|
+
prompt: "Analyze code architecture"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
[Learn more](./claude-code.md)
|
|
124
|
+
|