@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,280 @@
|
|
|
1
|
+
# GitHub Checks API Integration
|
|
2
|
+
|
|
3
|
+
Visor now supports GitHub Checks API integration, allowing each configured check to appear as a separate check run in the GitHub PR interface with proper status reporting and issue annotations.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Individual Check Runs**: Each configured check appears as a separate GitHub check run
|
|
8
|
+
- **Real-time Status Updates**: Check runs show "in progress" while executing and complete with success/failure
|
|
9
|
+
- **Issue Annotations**: Issues are displayed as inline annotations on the PR files
|
|
10
|
+
- **Failure Conditions**: Support for custom failure conditions using simple expressions
|
|
11
|
+
- **Configurable**: Can be enabled/disabled via action inputs or configuration
|
|
12
|
+
- **Permission Handling**: Gracefully handles insufficient permissions with helpful error messages
|
|
13
|
+
|
|
14
|
+
## Configuration
|
|
15
|
+
|
|
16
|
+
### Action Inputs
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
- uses: probelabs/visor@v1
|
|
20
|
+
with:
|
|
21
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
# Enable/disable GitHub check runs (default: true)
|
|
23
|
+
create-check: 'true'
|
|
24
|
+
# Other Visor configurations...
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Visor Configuration (`.visor.yaml`)
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
version: "1.0"
|
|
31
|
+
|
|
32
|
+
output:
|
|
33
|
+
github_checks:
|
|
34
|
+
# Enable/disable GitHub check runs (default: true)
|
|
35
|
+
enabled: true
|
|
36
|
+
# Create individual check runs per check (default: true)
|
|
37
|
+
# If false, creates a single combined check run
|
|
38
|
+
per_check: true
|
|
39
|
+
# Custom name prefix for check runs (default: "Visor")
|
|
40
|
+
name_prefix: "Visor AI"
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
security-audit:
|
|
44
|
+
type: ai
|
|
45
|
+
prompt: "Review for security vulnerabilities"
|
|
46
|
+
# Fail if critical issues found
|
|
47
|
+
fail_if: "criticalIssues > 0"
|
|
48
|
+
|
|
49
|
+
performance-review:
|
|
50
|
+
type: ai
|
|
51
|
+
prompt: "Analyze for performance issues"
|
|
52
|
+
# Fail if more than 2 error-level issues
|
|
53
|
+
fail_if: "errorIssues > 2"
|
|
54
|
+
|
|
55
|
+
# Global failure condition (applies to all checks)
|
|
56
|
+
fail_if: "criticalIssues > 0"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Failure Conditions
|
|
60
|
+
|
|
61
|
+
Use simple expressions to define when checks should fail:
|
|
62
|
+
|
|
63
|
+
### Available Variables
|
|
64
|
+
- `totalIssues`: Total number of issues found
|
|
65
|
+
- `criticalIssues`: Number of critical severity issues
|
|
66
|
+
- `errorIssues`: Number of error severity issues
|
|
67
|
+
- `warningIssues`: Number of warning severity issues
|
|
68
|
+
|
|
69
|
+
### Examples
|
|
70
|
+
```yaml
|
|
71
|
+
fail_if: "criticalIssues > 0" # Fail if any critical issues
|
|
72
|
+
fail_if: "errorIssues > 5" # Fail if more than 5 errors
|
|
73
|
+
fail_if: "totalIssues > 10" # Fail if more than 10 total issues
|
|
74
|
+
fail_if: "criticalIssues + errorIssues > 3" # Fail if critical + error > 3
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## GitHub Permissions
|
|
78
|
+
|
|
79
|
+
To use GitHub Checks API, your GitHub token needs the `checks:write` permission:
|
|
80
|
+
|
|
81
|
+
### GitHub Actions (default token)
|
|
82
|
+
The default `${{ secrets.GITHUB_TOKEN }}` includes `checks:write` permission by default.
|
|
83
|
+
|
|
84
|
+
### Personal Access Token (PAT)
|
|
85
|
+
If using a PAT, ensure it has the following scopes:
|
|
86
|
+
- `repo` (for private repositories)
|
|
87
|
+
- `public_repo` (for public repositories)
|
|
88
|
+
|
|
89
|
+
### GitHub App
|
|
90
|
+
If using GitHub App authentication, ensure the app has:
|
|
91
|
+
- **Repository permissions**: Checks (Write)
|
|
92
|
+
|
|
93
|
+
## Action Outputs
|
|
94
|
+
|
|
95
|
+
The action provides outputs about the GitHub checks:
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
- name: Check Results
|
|
99
|
+
run: |
|
|
100
|
+
echo "Checks API Available: ${{ steps.visor.outputs.checks-api-available }}"
|
|
101
|
+
echo "Check Runs Created: ${{ steps.visor.outputs.check-runs-created }}"
|
|
102
|
+
echo "Check Run URLs: ${{ steps.visor.outputs.check-runs-urls }}"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Error Handling
|
|
106
|
+
|
|
107
|
+
### Insufficient Permissions
|
|
108
|
+
If the GitHub token lacks `checks:write` permission:
|
|
109
|
+
- A warning is logged
|
|
110
|
+
- GitHub checks are skipped
|
|
111
|
+
- PR comments continue to work normally
|
|
112
|
+
- The action does not fail
|
|
113
|
+
|
|
114
|
+
### API Rate Limits
|
|
115
|
+
If GitHub API rate limits are hit:
|
|
116
|
+
- Individual check runs may fail
|
|
117
|
+
- Failed checks show appropriate error messages
|
|
118
|
+
- Other checks continue to execute
|
|
119
|
+
|
|
120
|
+
### Network Issues
|
|
121
|
+
If GitHub API is unavailable:
|
|
122
|
+
- Check creation is retried
|
|
123
|
+
- Failures are logged but don't stop the review
|
|
124
|
+
- PR comments serve as fallback
|
|
125
|
+
|
|
126
|
+
## Examples
|
|
127
|
+
|
|
128
|
+
### Basic Setup
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
name: Visor Code Review
|
|
132
|
+
on:
|
|
133
|
+
pull_request:
|
|
134
|
+
types: [opened, synchronize]
|
|
135
|
+
|
|
136
|
+
jobs:
|
|
137
|
+
review:
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
steps:
|
|
140
|
+
- uses: actions/checkout@v4
|
|
141
|
+
- uses: probelabs/visor@nightly
|
|
142
|
+
with:
|
|
143
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
144
|
+
config-path: '.visor.yaml'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### With GitHub App Authentication
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
- uses: probelabs/visor@v1
|
|
151
|
+
with:
|
|
152
|
+
app-id: ${{ secrets.VISOR_APP_ID }}
|
|
153
|
+
private-key: ${{ secrets.VISOR_PRIVATE_KEY }}
|
|
154
|
+
config-path: '.visor.yaml'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Disable GitHub Checks
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
- uses: probelabs/visor@nightly
|
|
161
|
+
with:
|
|
162
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
163
|
+
create-check: 'false' # Disable GitHub checks
|
|
164
|
+
comment-on-pr: 'true' # Still comment on PR
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Fork PR Support
|
|
168
|
+
|
|
169
|
+
### Overview
|
|
170
|
+
|
|
171
|
+
GitHub restricts permissions for workflows triggered by external contributors from forked repositories for security reasons. This affects check runs but not PR comments.
|
|
172
|
+
|
|
173
|
+
**Default behavior (`pull_request` trigger)**:
|
|
174
|
+
- ✅ Works for PRs from same repository (branch PRs)
|
|
175
|
+
- ❌ Check runs fail with 403 error for fork PRs
|
|
176
|
+
- ✅ PR comments work for all PRs (including forks)
|
|
177
|
+
- ✅ Visor gracefully falls back to comments only for forks
|
|
178
|
+
|
|
179
|
+
**For fork PR support with check runs** (use `pull_request_target` trigger):
|
|
180
|
+
- ✅ Works for both fork and branch PRs
|
|
181
|
+
- ✅ Check runs work for all PRs
|
|
182
|
+
- ⚠️ Security consideration: Workflow runs with write permissions
|
|
183
|
+
|
|
184
|
+
### Enabling Fork PR Support
|
|
185
|
+
|
|
186
|
+
To enable check runs for external contributor PRs, change the workflow trigger:
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
name: Visor Code Review
|
|
190
|
+
on:
|
|
191
|
+
pull_request_target: # Instead of pull_request
|
|
192
|
+
types: [opened, synchronize, edited]
|
|
193
|
+
|
|
194
|
+
permissions:
|
|
195
|
+
contents: read
|
|
196
|
+
pull-requests: write
|
|
197
|
+
issues: write
|
|
198
|
+
checks: write
|
|
199
|
+
|
|
200
|
+
jobs:
|
|
201
|
+
review:
|
|
202
|
+
runs-on: ubuntu-latest
|
|
203
|
+
steps:
|
|
204
|
+
# Explicitly checkout PR code (not base branch)
|
|
205
|
+
- uses: actions/checkout@v4
|
|
206
|
+
with:
|
|
207
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
208
|
+
|
|
209
|
+
- uses: probelabs/visor@v1
|
|
210
|
+
with:
|
|
211
|
+
# ... your configuration
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Key differences**:
|
|
215
|
+
1. **Trigger**: `pull_request_target` instead of `pull_request`
|
|
216
|
+
2. **Checkout**: Must specify `ref: ${{ github.event.pull_request.head.sha }}` to analyze PR code
|
|
217
|
+
3. **Security**: Workflow definition comes from base branch (protected from malicious modifications)
|
|
218
|
+
|
|
219
|
+
### Security Considerations
|
|
220
|
+
|
|
221
|
+
When using `pull_request_target`:
|
|
222
|
+
|
|
223
|
+
✅ **Safe** (Visor's approach):
|
|
224
|
+
- Workflow file is from base branch (can't be modified by PR)
|
|
225
|
+
- Only analyzes code (read-only operation)
|
|
226
|
+
- Uses controlled AI providers with API keys from secrets
|
|
227
|
+
- Comments and checks are the only write operations
|
|
228
|
+
|
|
229
|
+
⚠️ **Risks to avoid**:
|
|
230
|
+
- Don't execute arbitrary code from the PR (scripts, dependencies)
|
|
231
|
+
- Don't use `npm install` if package.json is modified by PR
|
|
232
|
+
- Don't run untrusted build commands
|
|
233
|
+
|
|
234
|
+
### Fallback Behavior
|
|
235
|
+
|
|
236
|
+
If check runs fail (403 error), Visor automatically:
|
|
237
|
+
|
|
238
|
+
1. **Logs clean error message**:
|
|
239
|
+
```
|
|
240
|
+
⚠️ Could not create check run for security: Resource not accessible by integration
|
|
241
|
+
💬 Review will continue using PR comments instead
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
2. **Continues review**: All checks run normally
|
|
245
|
+
3. **Uses PR comments**: Full review posted as comment
|
|
246
|
+
4. **Fails if needed**: Action still fails if critical issues found
|
|
247
|
+
|
|
248
|
+
No code changes needed - fallback is automatic.
|
|
249
|
+
|
|
250
|
+
## Troubleshooting
|
|
251
|
+
|
|
252
|
+
### Check Runs Not Appearing
|
|
253
|
+
1. Verify token has `checks:write` permission
|
|
254
|
+
2. Check action logs for permission errors
|
|
255
|
+
3. Ensure `create-check: 'true'` (default)
|
|
256
|
+
4. Verify configuration `output.github_checks.enabled: true`
|
|
257
|
+
5. **For fork PRs**: Use `pull_request_target` trigger (see [Fork PR Support](#fork-pr-support))
|
|
258
|
+
|
|
259
|
+
### Check Runs Failing Unexpectedly
|
|
260
|
+
1. Review failure conditions in configuration
|
|
261
|
+
2. Check issue severity counts in check run details
|
|
262
|
+
3. Verify expressions use correct variable names
|
|
263
|
+
4. Test failure conditions with sample data
|
|
264
|
+
|
|
265
|
+
### Permission Denied Errors (403)
|
|
266
|
+
1. **For fork PRs**: This is expected with `pull_request` trigger - use `pull_request_target` or accept comment-only mode
|
|
267
|
+
2. For GitHub Apps: Check repository permissions include "Checks (Write)"
|
|
268
|
+
3. For PATs: Ensure token has appropriate repository scopes
|
|
269
|
+
4. For default token: Usually works out of the box for same-repo PRs
|
|
270
|
+
|
|
271
|
+
## Migration from Comments Only
|
|
272
|
+
|
|
273
|
+
If you're currently using Visor with only PR comments:
|
|
274
|
+
|
|
275
|
+
1. **No action required**: GitHub checks are enabled by default
|
|
276
|
+
2. **Customize check names**: Set `output.github_checks.name_prefix`
|
|
277
|
+
3. **Add failure conditions**: Define `fail_if` conditions for your checks
|
|
278
|
+
4. **Test in staging**: Verify checks appear correctly before production use
|
|
279
|
+
|
|
280
|
+
The integration is designed to be backward-compatible - existing configurations continue to work with the addition of GitHub checks.
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Using Visor via npm/npx
|
|
2
|
+
|
|
3
|
+
## Quick Start (No Installation Required)
|
|
4
|
+
|
|
5
|
+
Run Visor directly using npx:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx -y @probelabs/visor@latest --help
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Safety & Criticality (Quick Note)
|
|
12
|
+
|
|
13
|
+
Visor follows a criticality‑first model:
|
|
14
|
+
|
|
15
|
+
- Declare criticality on steps (`criticality: external|internal|policy|info`).
|
|
16
|
+
- Pair critical steps with contracts:
|
|
17
|
+
- `assume:` preconditions (skip if unmet; use a guard step if you need a hard fail)
|
|
18
|
+
- `guarantee:` postconditions (violation adds issues and routes `on_fail`)
|
|
19
|
+
- Prefer declarative `transitions` over `goto_js` for routing.
|
|
20
|
+
|
|
21
|
+
Example (block‑style YAML):
|
|
22
|
+
```yaml
|
|
23
|
+
checks:
|
|
24
|
+
post-comment:
|
|
25
|
+
type: github
|
|
26
|
+
criticality: external
|
|
27
|
+
on:
|
|
28
|
+
- pr_opened
|
|
29
|
+
op: comment.create
|
|
30
|
+
assume:
|
|
31
|
+
- "isMember()"
|
|
32
|
+
guarantee:
|
|
33
|
+
- "output && typeof output.id === 'number'"
|
|
34
|
+
continue_on_failure: false
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Global Installation
|
|
38
|
+
|
|
39
|
+
Install globally for frequent use:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install -g @probelabs/visor
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then use the `visor` command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
visor --check all --output table
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Local Project Installation
|
|
52
|
+
|
|
53
|
+
Add to your project as a dev dependency:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm install --save-dev @probelabs/visor
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Add to your package.json scripts:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"scripts": {
|
|
64
|
+
"review": "visor --check all",
|
|
65
|
+
"review:security": "visor --check security --output json"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Usage Examples
|
|
71
|
+
|
|
72
|
+
### Validate configuration
|
|
73
|
+
```bash
|
|
74
|
+
# Validate config in current directory (searches for .visor.yaml)
|
|
75
|
+
npx -y @probelabs/visor validate
|
|
76
|
+
|
|
77
|
+
# Validate specific config file
|
|
78
|
+
npx -y @probelabs/visor validate --config .visor.yaml
|
|
79
|
+
|
|
80
|
+
# Validate before committing
|
|
81
|
+
npx -y @probelabs/visor validate --config examples/my-config.yaml
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The `validate` command checks your configuration for:
|
|
85
|
+
- Missing required fields (e.g., `version`)
|
|
86
|
+
- Invalid check types or event triggers
|
|
87
|
+
- Incorrect field names and values
|
|
88
|
+
- Schema compliance
|
|
89
|
+
|
|
90
|
+
It provides detailed error messages with helpful hints to fix issues.
|
|
91
|
+
|
|
92
|
+
### Run all checks
|
|
93
|
+
```bash
|
|
94
|
+
npx -y @probelabs/visor@latest --check all
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Security check with JSON output
|
|
98
|
+
```bash
|
|
99
|
+
npx -y @probelabs/visor@latest --check security --output json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Multiple checks with custom config
|
|
103
|
+
```bash
|
|
104
|
+
npx -y @probelabs/visor@latest --check performance --check architecture --config .visor.yaml
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Generate SARIF report for CI/CD
|
|
108
|
+
```bash
|
|
109
|
+
npx -y @probelabs/visor@latest --check security --output sarif --output-file results.sarif
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Save JSON to a file (recommended)
|
|
113
|
+
```bash
|
|
114
|
+
npx -y @probelabs/visor@latest --check all --output json --output-file visor-results.json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Configuration
|
|
118
|
+
|
|
119
|
+
Create a `.visor.yaml` file in your project root:
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
project:
|
|
123
|
+
name: my-project
|
|
124
|
+
language: typescript
|
|
125
|
+
|
|
126
|
+
steps:
|
|
127
|
+
- type: ai
|
|
128
|
+
prompt: security
|
|
129
|
+
- type: ai
|
|
130
|
+
prompt: performance
|
|
131
|
+
|
|
132
|
+
output:
|
|
133
|
+
format: table
|
|
134
|
+
verbose: false
|
|
135
|
+
|
|
136
|
+
## Structured outputs and schemas (unified `schema`)
|
|
137
|
+
|
|
138
|
+
Use a single `schema` field:
|
|
139
|
+
|
|
140
|
+
- Strings (e.g., `code-review` or `markdown`) select the renderer/template and do not imply validation.
|
|
141
|
+
- Objects (JSON Schema) validate the produced `output` after execution for any provider (ai, command, script, http).
|
|
142
|
+
|
|
143
|
+
Examples:
|
|
144
|
+
```yaml
|
|
145
|
+
checks:
|
|
146
|
+
summary:
|
|
147
|
+
type: ai
|
|
148
|
+
schema: code-review
|
|
149
|
+
prompt: |
|
|
150
|
+
Summarize the PR...
|
|
151
|
+
|
|
152
|
+
summarize-json:
|
|
153
|
+
type: ai
|
|
154
|
+
schema:
|
|
155
|
+
type: object
|
|
156
|
+
properties:
|
|
157
|
+
ok: { type: boolean }
|
|
158
|
+
items: { type: array, items: { type: string } }
|
|
159
|
+
required: [ok, items]
|
|
160
|
+
prompt: |
|
|
161
|
+
Return JSON with ok and items...
|
|
162
|
+
|
|
163
|
+
parse:
|
|
164
|
+
type: command
|
|
165
|
+
exec: node scripts/parse.js
|
|
166
|
+
schema:
|
|
167
|
+
type: object
|
|
168
|
+
properties:
|
|
169
|
+
count: { type: integer }
|
|
170
|
+
required: [count]
|
|
171
|
+
|
|
172
|
+
aggregate:
|
|
173
|
+
type: script
|
|
174
|
+
content: |
|
|
175
|
+
return { all_valid: true };
|
|
176
|
+
schema:
|
|
177
|
+
type: object
|
|
178
|
+
properties:
|
|
179
|
+
all_valid: { type: boolean }
|
|
180
|
+
required: [all_valid]
|
|
181
|
+
additionalProperties: false
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Note: `output_schema` is deprecated and kept for backward compatibility. Prefer `schema` as a JSON object for validation.
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Environment Variables
|
|
188
|
+
|
|
189
|
+
Set API keys for AI-powered reviews:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
export GOOGLE_API_KEY=your-key-here
|
|
193
|
+
# or
|
|
194
|
+
export ANTHROPIC_API_KEY=your-key-here
|
|
195
|
+
# or
|
|
196
|
+
export OPENAI_API_KEY=your-key-here
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## CI/CD Integration
|
|
200
|
+
|
|
201
|
+
Add to your GitHub Actions workflow:
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
- name: Run Visor Code Review
|
|
205
|
+
run: npx -y @probelabs/visor@latest --check all --output markdown
|
|
206
|
+
env:
|
|
207
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
208
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## 🎯 GitHub Action Reference
|
|
2
|
+
|
|
3
|
+
### Inputs (selected)
|
|
4
|
+
|
|
5
|
+
| Input | Description | Default |
|
|
6
|
+
|-------|-------------|---------|
|
|
7
|
+
| `max-parallelism` | Maximum number of checks in parallel | `3` |
|
|
8
|
+
| `fail-fast` | Stop on first failure | `false` |
|
|
9
|
+
| `config-path` | Path to config file | `.visor.yaml` |
|
|
10
|
+
|
|
11
|
+
### Outputs (selected)
|
|
12
|
+
|
|
13
|
+
| Output | Description |
|
|
14
|
+
|--------|-------------|
|
|
15
|
+
| `issues-found` | Total number of issues found |
|
|
16
|
+
| `critical-issues` | Number of critical issues |
|
|
17
|
+
|
|
18
|
+
See README Quick Start for minimal workflow. For full list, open `action.yml`.
|
|
19
|
+
|