@probelabs/visor 0.1.106 → 0.1.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -2
- package/action.yml +1 -1
- package/defaults/code-refiner.yaml +114 -0
- package/defaults/{.visor.yaml → code-review.yaml} +35 -226
- package/defaults/override.yaml +52 -0
- package/defaults/task-refinement.yaml +620 -0
- package/defaults/visor.tests.yaml +674 -0
- package/defaults/visor.yaml +482 -0
- package/dist/663.index.js +2 -3
- package/dist/80.index.js +2 -3
- package/dist/action-cli-bridge.d.ts +11 -82
- package/dist/action-cli-bridge.d.ts.map +1 -1
- package/dist/ai-review-service.d.ts +15 -0
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/check-execution-engine.d.ts +19 -331
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/cron-scheduler.d.ts +3 -3
- package/dist/cron-scheduler.d.ts.map +1 -1
- package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
- package/dist/defaults/code-refiner.yaml +114 -0
- package/dist/defaults/{.visor.yaml → code-review.yaml} +35 -226
- package/dist/defaults/override.yaml +52 -0
- package/dist/defaults/task-refinement.yaml +620 -0
- package/dist/defaults/visor.tests.yaml +674 -0
- package/dist/defaults/visor.yaml +482 -0
- package/dist/docs/DEPLOYMENT.md +118 -0
- package/dist/docs/GITHUB_CHECKS.md +280 -0
- package/dist/docs/NPM_USAGE.md +208 -0
- package/dist/docs/action-reference.md +19 -0
- package/dist/docs/advanced-ai.md +178 -0
- package/dist/docs/ai-configuration.md +468 -0
- package/dist/docs/author-permissions.md +610 -0
- package/dist/docs/ci-cli-mode.md +34 -0
- package/dist/docs/claude-code.md +74 -0
- package/dist/docs/command-provider.md +559 -0
- package/dist/docs/commands.md +8 -0
- package/dist/docs/configuration.md +303 -0
- package/dist/docs/custom-tools.md +424 -0
- package/dist/docs/dashboards/README.md +23 -0
- package/dist/docs/dashboards/grafana-visor-diagrams.json +20 -0
- package/dist/docs/dashboards/grafana-visor-overview.json +33 -0
- package/dist/docs/debug-visualizer-progress.md +572 -0
- package/dist/docs/debug-visualizer-rfc.md +691 -0
- package/dist/docs/debug-visualizer.md +114 -0
- package/dist/docs/debugging.md +636 -0
- package/dist/docs/default-output-schema.md +28 -0
- package/dist/docs/dependencies.md +369 -0
- package/dist/docs/dev-playbook.md +9 -0
- package/dist/docs/engine-state-machine-plan.md +333 -0
- package/dist/docs/event-driven-github-integration-rfc.md +743 -0
- package/dist/docs/event-triggers.md +292 -0
- package/dist/docs/execution-statistics-rfc.md +290 -0
- package/dist/docs/fact-validator-gap-analysis.md +178 -0
- package/dist/docs/fact-validator-implementation-plan.md +1235 -0
- package/dist/docs/fail-if.md +95 -0
- package/dist/docs/failure-conditions-implementation.md +271 -0
- package/dist/docs/failure-conditions-schema.md +173 -0
- package/dist/docs/failure-routing-rfc.md +193 -0
- package/dist/docs/failure-routing.md +507 -0
- package/dist/docs/foreach-dependency-propagation.md +473 -0
- package/dist/docs/github-ops.md +89 -0
- package/dist/docs/goto-forward-run-plan.md +113 -0
- package/dist/docs/guides/criticality-modes.md +332 -0
- package/dist/docs/guides/fault-management-and-contracts.md +738 -0
- package/dist/docs/guides/workflow-style-guide.md +224 -0
- package/dist/docs/http.md +299 -0
- package/dist/docs/human-input-provider.md +372 -0
- package/dist/docs/limits.md +64 -0
- package/dist/docs/liquid-templates.md +347 -0
- package/dist/docs/loop-routing-refactor.md +89 -0
- package/dist/docs/mcp-provider.md +557 -0
- package/dist/docs/mcp.md +124 -0
- package/dist/docs/memory.md +903 -0
- package/dist/docs/observability.md +12 -0
- package/dist/docs/output-formats.md +20 -0
- package/dist/docs/output-formatting.md +29 -0
- package/dist/docs/output-history.md +383 -0
- package/dist/docs/performance.md +6 -0
- package/dist/docs/pluggable.md +124 -0
- package/dist/docs/proposals/snapshot-scope-execution.md +236 -0
- package/dist/docs/recipes.md +21 -0
- package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
- package/dist/docs/schema-next-pr.md +10 -0
- package/dist/docs/schema-templates.md +68 -0
- package/dist/docs/script.md +34 -0
- package/dist/docs/sdk.md +222 -0
- package/dist/docs/security.md +7 -0
- package/dist/docs/suppressions.md +89 -0
- package/dist/docs/tag-filtering.md +258 -0
- package/dist/docs/telemetry-setup.md +119 -0
- package/dist/docs/telemetry-tracing-rfc.md +275 -0
- package/dist/docs/test-framework-rfc.md +680 -0
- package/dist/docs/testing/assertions.md +85 -0
- package/dist/docs/testing/ci.md +44 -0
- package/dist/docs/testing/cli.md +41 -0
- package/dist/docs/testing/cookbook.md +172 -0
- package/dist/docs/testing/dsl-reference.md +199 -0
- package/dist/docs/testing/fixtures-and-mocks.md +91 -0
- package/dist/docs/testing/flows.md +92 -0
- package/dist/docs/testing/getting-started.md +93 -0
- package/dist/docs/testing/troubleshooting.md +55 -0
- package/dist/docs/timeouts.md +50 -0
- package/dist/docs/troubleshooting.md +7 -0
- package/dist/docs/visor-sdk-rfc.md +186 -0
- package/dist/docs/workflows.md +569 -0
- package/dist/engine/on-finish/orchestrator.d.ts +19 -0
- package/dist/engine/on-finish/orchestrator.d.ts.map +1 -0
- package/dist/engine/on-finish/utils.d.ts +44 -0
- package/dist/engine/on-finish/utils.d.ts.map +1 -0
- package/dist/event-bus/event-bus.d.ts +13 -0
- package/dist/event-bus/event-bus.d.ts.map +1 -0
- package/dist/event-bus/types.d.ts +57 -0
- package/dist/event-bus/types.d.ts.map +1 -0
- package/dist/examples/.claude/agents/code-reviewer.md +69 -0
- package/dist/examples/.mcp.json +34 -0
- package/dist/examples/CALCULATOR-SDK.md +364 -0
- package/dist/examples/README.md +384 -0
- package/dist/examples/ai-retry-fallback-config.yaml +180 -0
- package/dist/examples/ai-with-bash.yaml +126 -0
- package/dist/examples/ai-with-mcp.yaml +82 -0
- package/dist/examples/basic-human-input.yaml +15 -0
- package/dist/examples/bedrock-config.yaml +77 -0
- package/dist/examples/calculator-config.yaml +133 -0
- package/dist/examples/calculator-json-output-guide.md +311 -0
- package/dist/examples/calculator-sdk-automated.ts +340 -0
- package/dist/examples/calculator-sdk-example.ts +275 -0
- package/dist/examples/calculator-sdk-json.ts +331 -0
- package/dist/examples/calculator-sdk-real.ts +374 -0
- package/dist/examples/calculator-sdk-test.ts +148 -0
- package/dist/examples/claude-code-config.yaml +191 -0
- package/dist/examples/cron-webhook-config.yaml +215 -0
- package/dist/examples/custom-template.liquid +57 -0
- package/dist/examples/custom-tools-example.yaml +281 -0
- package/dist/examples/enhanced-config.yaml +165 -0
- package/dist/examples/environments/visor.base.yaml +92 -0
- package/dist/examples/environments/visor.dev.yaml +33 -0
- package/dist/examples/environments/visor.prod.yaml +95 -0
- package/dist/examples/environments/visor.staging.yaml +46 -0
- package/dist/examples/fact-validator.yaml +361 -0
- package/dist/examples/fail-if-simple.yaml +90 -0
- package/dist/examples/failure-conditions-advanced.yaml +136 -0
- package/dist/examples/failure-conditions-basic.yaml +48 -0
- package/dist/examples/failure-conditions-github-style.yaml +119 -0
- package/dist/examples/failure-conditions-migration.yaml +74 -0
- package/dist/examples/for-loop-example.yaml +176 -0
- package/dist/examples/forEach-example.yaml +120 -0
- package/dist/examples/github-workflow-with-tags.yml +163 -0
- package/dist/examples/http-integration-config.yaml +240 -0
- package/dist/examples/https-server-config.yaml +209 -0
- package/dist/examples/human-input-example.yaml +63 -0
- package/dist/examples/if-conditions.yaml +173 -0
- package/dist/examples/jira-simple-example.yaml +56 -0
- package/dist/examples/jira-single-issue-workflow.yaml +166 -0
- package/dist/examples/jira-workflow-mcp.yaml +182 -0
- package/dist/examples/mcp/analyzer.py +119 -0
- package/dist/examples/mcp-provider-example.yaml +301 -0
- package/dist/examples/memory-counter.yaml +99 -0
- package/dist/examples/memory-error-collection.yaml +104 -0
- package/dist/examples/memory-exec-js.yaml +247 -0
- package/dist/examples/memory-namespace-isolation.yaml +184 -0
- package/dist/examples/memory-retry-counter.yaml +65 -0
- package/dist/examples/memory-state-machine.yaml +170 -0
- package/dist/examples/outputs-raw-basic.yaml +26 -0
- package/dist/examples/project-with-tools.yaml +174 -0
- package/dist/examples/prompts/architecture-analysis.liquid +116 -0
- package/dist/examples/prompts/security-comprehensive.liquid +107 -0
- package/dist/examples/quick-start-tags.yaml +53 -0
- package/dist/examples/routing-basic.yaml +35 -0
- package/dist/examples/routing-dynamic-js.yaml +46 -0
- package/dist/examples/routing-foreach.yaml +34 -0
- package/dist/examples/routing-goto-event.yaml +34 -0
- package/dist/examples/routing-on-success.yaml +25 -0
- package/dist/examples/run-calculator-demo.sh +71 -0
- package/dist/examples/sdk-basic.mjs +10 -0
- package/dist/examples/sdk-cjs.cjs +10 -0
- package/dist/examples/sdk-comprehensive.mjs +175 -0
- package/dist/examples/sdk-manual-config.mjs +65 -0
- package/dist/examples/sdk-typescript.js +81 -0
- package/dist/examples/sdk-typescript.ts +92 -0
- package/dist/examples/session-reuse-config.yaml +151 -0
- package/dist/examples/templates/security-report.liquid +137 -0
- package/dist/examples/tools-library.yaml +281 -0
- package/dist/examples/transform-example.yaml +199 -0
- package/dist/examples/visor-with-tags.yaml +198 -0
- package/dist/examples/webhook-pipeline-config.yaml +218 -0
- package/dist/examples/workflows/calculator-workflow.yaml +163 -0
- package/dist/examples/workflows/code-quality.yaml +222 -0
- package/dist/examples/workflows/quick-pr-check.yaml +90 -0
- package/dist/examples/workflows/workflow-composition-example.yaml +130 -0
- package/dist/failure-condition-evaluator.d.ts +1 -0
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/frontends/github-frontend.d.ts +38 -0
- package/dist/frontends/github-frontend.d.ts.map +1 -0
- package/dist/frontends/host.d.ts +43 -0
- package/dist/frontends/host.d.ts.map +1 -0
- package/dist/frontends/ndjson-sink.d.ts +12 -0
- package/dist/frontends/ndjson-sink.d.ts.map +1 -0
- package/dist/generated/config-schema.d.ts +564 -22
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +612 -24
- package/dist/github-check-service.d.ts +4 -6
- package/dist/github-check-service.d.ts.map +1 -1
- package/dist/github-comments.d.ts +0 -4
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +70335 -62514
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/memory-store.d.ts +6 -0
- package/dist/memory-store.d.ts.map +1 -1
- package/dist/output/assistant-json/template.liquid +0 -0
- package/dist/output/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
- package/dist/output/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
- package/dist/output-formatters.d.ts +1 -1
- package/dist/output-formatters.d.ts.map +1 -1
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/check-provider-registry.d.ts +6 -0
- package/dist/providers/check-provider-registry.d.ts.map +1 -1
- package/dist/providers/check-provider.interface.d.ts +34 -1
- package/dist/providers/check-provider.interface.d.ts.map +1 -1
- package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/custom-tool-executor.d.ts +61 -0
- package/dist/providers/custom-tool-executor.d.ts.map +1 -0
- package/dist/providers/github-ops-provider.d.ts.map +1 -1
- package/dist/providers/http-client-provider.d.ts +1 -4
- package/dist/providers/http-client-provider.d.ts.map +1 -1
- package/dist/providers/human-input-check-provider.d.ts +3 -0
- package/dist/providers/human-input-check-provider.d.ts.map +1 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/log-check-provider.d.ts +2 -5
- package/dist/providers/log-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-check-provider.d.ts +9 -3
- package/dist/providers/mcp-check-provider.d.ts.map +1 -1
- package/dist/providers/memory-check-provider.d.ts +2 -8
- package/dist/providers/memory-check-provider.d.ts.map +1 -1
- package/dist/providers/script-check-provider.d.ts +25 -0
- package/dist/providers/script-check-provider.d.ts.map +1 -0
- package/dist/providers/workflow-check-provider.d.ts +56 -0
- package/dist/providers/workflow-check-provider.d.ts.map +1 -0
- package/dist/reviewer.d.ts +2 -1
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/sdk/chunk-37ZSCMFC.mjs +482 -0
- package/dist/sdk/chunk-37ZSCMFC.mjs.map +1 -0
- package/dist/sdk/chunk-6Y4YTKCF.mjs +197 -0
- package/dist/sdk/chunk-6Y4YTKCF.mjs.map +1 -0
- package/dist/sdk/chunk-CNX7V5JK.mjs +89 -0
- package/dist/sdk/chunk-CNX7V5JK.mjs.map +1 -0
- package/dist/sdk/chunk-IEO6CFLG.mjs +1215 -0
- package/dist/sdk/chunk-IEO6CFLG.mjs.map +1 -0
- package/dist/sdk/chunk-JEHPDJIF.mjs +223 -0
- package/dist/sdk/chunk-JEHPDJIF.mjs.map +1 -0
- package/dist/sdk/chunk-O5EZDNYL.mjs +274 -0
- package/dist/sdk/chunk-O5EZDNYL.mjs.map +1 -0
- package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-OOZITMRU.mjs} +1 -1
- package/dist/sdk/chunk-OOZITMRU.mjs.map +1 -0
- package/dist/sdk/chunk-OWUVOILT.mjs +557 -0
- package/dist/sdk/chunk-OWUVOILT.mjs.map +1 -0
- package/dist/sdk/chunk-OZJ263FM.mjs +986 -0
- package/dist/sdk/chunk-OZJ263FM.mjs.map +1 -0
- package/dist/sdk/chunk-PTL3K3PN.mjs +3128 -0
- package/dist/sdk/chunk-PTL3K3PN.mjs.map +1 -0
- package/dist/sdk/chunk-S2RUE2RG.mjs +145 -0
- package/dist/sdk/chunk-S2RUE2RG.mjs.map +1 -0
- package/dist/sdk/chunk-VMPLF6FT.mjs +127 -0
- package/dist/sdk/chunk-VMPLF6FT.mjs.map +1 -0
- package/dist/sdk/chunk-YSN4G6CI.mjs +146 -0
- package/dist/sdk/chunk-YSN4G6CI.mjs.map +1 -0
- package/dist/sdk/chunk-ZYAUYXSW.mjs +206 -0
- package/dist/sdk/chunk-ZYAUYXSW.mjs.map +1 -0
- package/dist/sdk/config-M4ZNO6NU.mjs +14 -0
- package/dist/sdk/config-merger-PX3WIT57.mjs +10 -0
- package/dist/sdk/event-bus-5BEVPQ6T.mjs +35 -0
- package/dist/sdk/event-bus-5BEVPQ6T.mjs.map +1 -0
- package/dist/sdk/failure-condition-evaluator-NBO5YRXW.mjs +16 -0
- package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +458 -0
- package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +1 -0
- package/dist/sdk/github-frontend-4AWRJT7D.mjs +1242 -0
- package/dist/sdk/github-frontend-4AWRJT7D.mjs.map +1 -0
- package/dist/sdk/host-7GBC3S7L.mjs +49 -0
- package/dist/sdk/host-7GBC3S7L.mjs.map +1 -0
- package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-C7EG3YKH.mjs} +7 -2
- package/dist/sdk/memory-store-GJACZC2A.mjs +11 -0
- package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
- package/dist/sdk/renderer-schema-6RF26VUS.mjs +50 -0
- package/dist/sdk/renderer-schema-6RF26VUS.mjs.map +1 -0
- package/dist/sdk/routing-RP56JTV2.mjs +23 -0
- package/dist/sdk/routing-RP56JTV2.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +326 -21
- package/dist/sdk/sdk.d.ts +326 -21
- package/dist/sdk/sdk.js +21403 -16366
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +13510 -2096
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/session-registry-N5FFYFTM.mjs +10 -0
- package/dist/sdk/session-registry-N5FFYFTM.mjs.map +1 -0
- package/dist/sdk/trace-helpers-VP6QYVBX.mjs +23 -0
- package/dist/sdk/trace-helpers-VP6QYVBX.mjs.map +1 -0
- package/dist/sdk/{tracer-init-WC75N5NW.mjs → tracer-init-WP4X46IF.mjs} +2 -2
- package/dist/sdk/tracer-init-WP4X46IF.mjs.map +1 -0
- package/dist/sdk/workflow-registry-2YIIXQCK.mjs +11 -0
- package/dist/sdk/workflow-registry-2YIIXQCK.mjs.map +1 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/snapshot-store.d.ts +59 -0
- package/dist/snapshot-store.d.ts.map +1 -0
- package/dist/state-machine/context/build-engine-context.d.ts +9 -0
- package/dist/state-machine/context/build-engine-context.d.ts.map +1 -0
- package/dist/state-machine/dispatch/dependency-gating.d.ts +12 -0
- package/dist/state-machine/dispatch/dependency-gating.d.ts.map +1 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts +14 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -0
- package/dist/state-machine/dispatch/foreach-processor.d.ts +8 -0
- package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -0
- package/dist/state-machine/dispatch/history-snapshot.d.ts +8 -0
- package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -0
- package/dist/state-machine/dispatch/renderer-schema.d.ts +8 -0
- package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -0
- package/dist/state-machine/dispatch/stats-manager.d.ts +15 -0
- package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -0
- package/dist/state-machine/dispatch/template-renderer.d.ts +7 -0
- package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -0
- package/dist/state-machine/execution/summary.d.ts +8 -0
- package/dist/state-machine/execution/summary.d.ts.map +1 -0
- package/dist/state-machine/runner.d.ts +73 -0
- package/dist/state-machine/runner.d.ts.map +1 -0
- package/dist/state-machine/states/check-running.d.ts +14 -0
- package/dist/state-machine/states/check-running.d.ts.map +1 -0
- package/dist/state-machine/states/completed.d.ts +12 -0
- package/dist/state-machine/states/completed.d.ts.map +1 -0
- package/dist/state-machine/states/error.d.ts +11 -0
- package/dist/state-machine/states/error.d.ts.map +1 -0
- package/dist/state-machine/states/init.d.ts +11 -0
- package/dist/state-machine/states/init.d.ts.map +1 -0
- package/dist/state-machine/states/level-dispatch.d.ts +17 -0
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -0
- package/dist/state-machine/states/plan-ready.d.ts +12 -0
- package/dist/state-machine/states/plan-ready.d.ts.map +1 -0
- package/dist/state-machine/states/routing.d.ts +52 -0
- package/dist/state-machine/states/routing.d.ts.map +1 -0
- package/dist/state-machine/states/wave-planning.d.ts +14 -0
- package/dist/state-machine/states/wave-planning.d.ts.map +1 -0
- package/dist/state-machine/workflow-projection.d.ts +47 -0
- package/dist/state-machine/workflow-projection.d.ts.map +1 -0
- package/dist/state-machine-execution-engine.d.ts +147 -0
- package/dist/state-machine-execution-engine.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -1
- package/dist/test-runner/assertions.d.ts +59 -0
- package/dist/test-runner/assertions.d.ts.map +1 -0
- package/dist/test-runner/core/environment.d.ts +8 -0
- package/dist/test-runner/core/environment.d.ts.map +1 -0
- package/dist/test-runner/core/fixture.d.ts +3 -0
- package/dist/test-runner/core/fixture.d.ts.map +1 -0
- package/dist/test-runner/core/flow-stage.d.ts +32 -0
- package/dist/test-runner/core/flow-stage.d.ts.map +1 -0
- package/dist/test-runner/core/mocks.d.ts +8 -0
- package/dist/test-runner/core/mocks.d.ts.map +1 -0
- package/dist/test-runner/core/test-execution-wrapper.d.ts +18 -0
- package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -0
- package/dist/test-runner/evaluators.d.ts +12 -0
- package/dist/test-runner/evaluators.d.ts.map +1 -0
- package/dist/test-runner/fixture-loader.d.ts +30 -0
- package/dist/test-runner/fixture-loader.d.ts.map +1 -0
- package/dist/test-runner/index.d.ts +120 -0
- package/dist/test-runner/index.d.ts.map +1 -0
- package/dist/test-runner/recorders/github-recorder.d.ts +23 -0
- package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -0
- package/dist/test-runner/recorders/global-recorder.d.ts +4 -0
- package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -0
- package/dist/test-runner/utils/selectors.d.ts +2 -0
- package/dist/test-runner/utils/selectors.d.ts.map +1 -0
- package/dist/test-runner/validator.d.ts +8 -0
- package/dist/test-runner/validator.d.ts.map +1 -0
- package/dist/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
- package/dist/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
- package/dist/types/cli.d.ts +4 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +278 -5
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts +172 -0
- package/dist/types/engine.d.ts.map +1 -0
- package/dist/types/execution.d.ts +73 -0
- package/dist/types/execution.d.ts.map +1 -0
- package/dist/types/github.d.ts +51 -0
- package/dist/types/github.d.ts.map +1 -0
- package/dist/types/workflow.d.ts +237 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/utils/command-executor.d.ts +43 -0
- package/dist/utils/command-executor.d.ts.map +1 -0
- package/dist/utils/comment-metadata.d.ts +21 -0
- package/dist/utils/comment-metadata.d.ts.map +1 -0
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-merger.d.ts.map +1 -1
- package/dist/utils/env-exposure.d.ts +3 -0
- package/dist/utils/env-exposure.d.ts.map +1 -0
- package/dist/utils/file-exclusion.d.ts.map +1 -1
- package/dist/utils/interactive-prompt.d.ts +1 -1
- package/dist/utils/interactive-prompt.d.ts.map +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/script-memory-ops.d.ts +21 -0
- package/dist/utils/script-memory-ops.d.ts.map +1 -0
- package/dist/utils/template-context.d.ts +7 -0
- package/dist/utils/template-context.d.ts.map +1 -0
- package/dist/webhook-server.d.ts +3 -3
- package/dist/webhook-server.d.ts.map +1 -1
- package/dist/workflow-executor.d.ts +81 -0
- package/dist/workflow-executor.d.ts.map +1 -0
- package/dist/workflow-registry.d.ts +79 -0
- package/dist/workflow-registry.d.ts.map +1 -0
- package/package.json +10 -5
- package/dist/output/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
- package/dist/sdk/check-execution-engine-2YYKUUSH.mjs +0 -11
- package/dist/sdk/check-execution-engine-6QJXYYON.mjs +0 -11
- package/dist/sdk/check-execution-engine-PJZ4ZOKG.mjs +0 -11
- package/dist/sdk/chunk-33QVZ2D4.mjs +0 -316
- package/dist/sdk/chunk-33QVZ2D4.mjs.map +0 -1
- package/dist/sdk/chunk-B5QBV2QJ.mjs +0 -752
- package/dist/sdk/chunk-B5QBV2QJ.mjs.map +0 -1
- package/dist/sdk/chunk-BVFNRCHT.mjs +0 -14129
- package/dist/sdk/chunk-BVFNRCHT.mjs.map +0 -1
- package/dist/sdk/chunk-KWZW23FG.mjs +0 -14129
- package/dist/sdk/chunk-KWZW23FG.mjs.map +0 -1
- package/dist/sdk/chunk-O4RP4BRH.mjs +0 -14092
- package/dist/sdk/chunk-O4RP4BRH.mjs.map +0 -1
- package/dist/sdk/chunk-TUTOLSFV.mjs.map +0 -1
- package/dist/sdk/chunk-U5D2LY66.mjs +0 -245
- package/dist/sdk/chunk-U5D2LY66.mjs.map +0 -1
- package/dist/sdk/chunk-U7X54EMV.mjs +0 -331
- package/dist/sdk/chunk-U7X54EMV.mjs.map +0 -1
- package/dist/sdk/config-merger-TWUBWFC2.mjs +0 -8
- package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs +0 -61
- package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs.map +0 -1
- package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs +0 -61
- package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs.map +0 -1
- package/dist/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
- /package/dist/sdk/{check-execution-engine-2YYKUUSH.mjs.map → config-M4ZNO6NU.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → failure-condition-evaluator-NBO5YRXW.mjs.map} +0 -0
- /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → liquid-extensions-C7EG3YKH.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → memory-store-GJACZC2A.mjs.map} +0 -0
- /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → metrics-7PP3EJUH.mjs.map} +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
|
|
3
|
+
# Failure conditions using GitHub Actions-like syntax
|
|
4
|
+
# This example shows how to use familiar GitHub Actions expression functions
|
|
5
|
+
|
|
6
|
+
# Global failure conditions that apply to all checks
|
|
7
|
+
failure_conditions:
|
|
8
|
+
# Using success() and failure() functions like GitHub Actions
|
|
9
|
+
check_must_succeed: "!failure()"
|
|
10
|
+
|
|
11
|
+
# Using contains() like GitHub Actions
|
|
12
|
+
no_sql_injection:
|
|
13
|
+
condition: '!contains(checkName, "skip") || !output.issues.some(i => i.severity === "critical")'
|
|
14
|
+
message: "Critical issues found in non-skipped checks"
|
|
15
|
+
severity: error
|
|
16
|
+
|
|
17
|
+
# Using startsWith() for check name patterns
|
|
18
|
+
security_checks_strict:
|
|
19
|
+
condition: 'startsWith(checkName, "security") && output.issues.length == 0'
|
|
20
|
+
message: "Security checks must have zero issues"
|
|
21
|
+
severity: error
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
# Security check with GitHub Actions-style conditions
|
|
25
|
+
security-scan:
|
|
26
|
+
type: ai
|
|
27
|
+
schema: code-review
|
|
28
|
+
prompt: "Analyze for security vulnerabilities"
|
|
29
|
+
on: [pr_opened, pr_updated]
|
|
30
|
+
|
|
31
|
+
failure_conditions:
|
|
32
|
+
# Using contains() to check for specific text in file paths
|
|
33
|
+
sensitive_files:
|
|
34
|
+
condition: 'hasFileMatching(output.issues, ".env") || hasFileMatching(output.issues, "secret")'
|
|
35
|
+
message: "Issues found in sensitive files"
|
|
36
|
+
severity: error
|
|
37
|
+
|
|
38
|
+
# Using success() to check overall health
|
|
39
|
+
must_complete_successfully:
|
|
40
|
+
condition: "success() || always()"
|
|
41
|
+
message: "Check completed"
|
|
42
|
+
severity: info
|
|
43
|
+
|
|
44
|
+
# Performance check with familiar syntax
|
|
45
|
+
performance-check:
|
|
46
|
+
type: ai
|
|
47
|
+
schema: code-review
|
|
48
|
+
prompt: "Review for performance issues"
|
|
49
|
+
on: [pr_opened, pr_updated]
|
|
50
|
+
|
|
51
|
+
failure_conditions:
|
|
52
|
+
# Combining multiple GitHub Actions-like functions
|
|
53
|
+
performance_gates:
|
|
54
|
+
condition: |
|
|
55
|
+
!failure() &&
|
|
56
|
+
!contains(checkName, "skip") &&
|
|
57
|
+
!output.issues.some(i => i.severity === "critical")
|
|
58
|
+
message: "Performance check passed quality gates"
|
|
59
|
+
severity: info
|
|
60
|
+
|
|
61
|
+
# Using endsWith() for file type checking
|
|
62
|
+
frontend_performance:
|
|
63
|
+
condition: 'hasFileMatching(output.issues, ".js") || hasFileMatching(output.issues, ".tsx")'
|
|
64
|
+
message: "Frontend performance issues detected"
|
|
65
|
+
severity: warning
|
|
66
|
+
|
|
67
|
+
# Style check with conditional logic
|
|
68
|
+
code-style:
|
|
69
|
+
type: ai
|
|
70
|
+
schema: code-review
|
|
71
|
+
prompt: "Check code style and formatting"
|
|
72
|
+
on: [pr_opened, pr_updated]
|
|
73
|
+
|
|
74
|
+
failure_conditions:
|
|
75
|
+
# Complex condition similar to GitHub Actions
|
|
76
|
+
style_enforcement:
|
|
77
|
+
condition: |
|
|
78
|
+
(checkName.includes('code-review') && output.issues.filter(i => i.severity === 'warning').length > 5) ||
|
|
79
|
+
(contains(checkName, 'strict') && output.issues.length > 0)
|
|
80
|
+
message: "Style violations exceed threshold"
|
|
81
|
+
severity: warning
|
|
82
|
+
|
|
83
|
+
# Always pass for draft PRs (conceptual example)
|
|
84
|
+
draft_pr_lenient:
|
|
85
|
+
condition: "always()"
|
|
86
|
+
message: "Style check completed"
|
|
87
|
+
severity: info
|
|
88
|
+
|
|
89
|
+
# Comparison with GitHub Actions syntax:
|
|
90
|
+
#
|
|
91
|
+
# GitHub Actions:
|
|
92
|
+
# if: contains(github.event.head_commit.message, 'skip-ci')
|
|
93
|
+
#
|
|
94
|
+
# Visor (JavaScript):
|
|
95
|
+
# condition: "contains(commit.message, 'skip-ci')"
|
|
96
|
+
#
|
|
97
|
+
# GitHub Actions:
|
|
98
|
+
# if: success() && github.event_name == 'pull_request'
|
|
99
|
+
#
|
|
100
|
+
# Visor (JavaScript):
|
|
101
|
+
# condition: "success() && event.name == 'pull_request'"
|
|
102
|
+
#
|
|
103
|
+
# GitHub Actions:
|
|
104
|
+
# if: failure() || cancelled()
|
|
105
|
+
#
|
|
106
|
+
# Visor (JavaScript):
|
|
107
|
+
# condition: "failure() || metadata.cancelled"
|
|
108
|
+
#
|
|
109
|
+
# GitHub Actions:
|
|
110
|
+
# if: startsWith(github.ref, 'refs/heads/release')
|
|
111
|
+
#
|
|
112
|
+
# Visor (JavaScript):
|
|
113
|
+
# condition: "startsWith(event.ref, 'refs/heads/release')"
|
|
114
|
+
|
|
115
|
+
output:
|
|
116
|
+
pr_comment:
|
|
117
|
+
format: markdown
|
|
118
|
+
group_by: check
|
|
119
|
+
collapse: true
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Migration Example: Before and After
|
|
2
|
+
# This example shows how to migrate from basic configuration to failure conditions
|
|
3
|
+
|
|
4
|
+
version: "1.0"
|
|
5
|
+
|
|
6
|
+
# BEFORE: Simple configuration without failure conditions
|
|
7
|
+
# checks:
|
|
8
|
+
# security:
|
|
9
|
+
# type: ai
|
|
10
|
+
# prompt: "Security analysis..."
|
|
11
|
+
# on: [pr_opened, pr_updated]
|
|
12
|
+
|
|
13
|
+
# AFTER: Enhanced configuration with failure conditions
|
|
14
|
+
|
|
15
|
+
# Global failure conditions - start simple
|
|
16
|
+
failure_conditions:
|
|
17
|
+
# Basic quality gate
|
|
18
|
+
default_quality_gate: "output.issues.length > 20"
|
|
19
|
+
|
|
20
|
+
# Critical issue blocker
|
|
21
|
+
critical_blocker:
|
|
22
|
+
condition: "output.issues.some(i => i.severity === 'critical')"
|
|
23
|
+
message: "Critical issues found - deployment blocked"
|
|
24
|
+
severity: error
|
|
25
|
+
halt_execution: true
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
# Migrated security check with failure conditions
|
|
29
|
+
security:
|
|
30
|
+
type: ai
|
|
31
|
+
group: review
|
|
32
|
+
schema: code-review
|
|
33
|
+
prompt: |
|
|
34
|
+
Analyze security vulnerabilities in the code changes.
|
|
35
|
+
Look for common security issues and provide specific recommendations.
|
|
36
|
+
on: [pr_opened, pr_updated]
|
|
37
|
+
|
|
38
|
+
# Start with simple check-specific conditions
|
|
39
|
+
failure_conditions:
|
|
40
|
+
# Security-specific gate
|
|
41
|
+
security_gate: "output.issues.some(i => i.severity === 'error')"
|
|
42
|
+
|
|
43
|
+
# Specific security patterns
|
|
44
|
+
sensitive_operations:
|
|
45
|
+
condition: "hasFileWith(output.issues, 'password') || hasFileWith(output.issues, 'token')"
|
|
46
|
+
message: "Sensitive security operations detected"
|
|
47
|
+
severity: warning
|
|
48
|
+
|
|
49
|
+
# New performance check with conditions
|
|
50
|
+
performance:
|
|
51
|
+
type: ai
|
|
52
|
+
group: review
|
|
53
|
+
schema: code-review
|
|
54
|
+
prompt: |
|
|
55
|
+
Analyze performance implications of code changes.
|
|
56
|
+
on: [pr_opened, pr_updated]
|
|
57
|
+
|
|
58
|
+
failure_conditions:
|
|
59
|
+
# Performance threshold
|
|
60
|
+
performance_issues: "output.issues.filter(i => i.severity === 'error').length > 2"
|
|
61
|
+
|
|
62
|
+
# Output configuration
|
|
63
|
+
output:
|
|
64
|
+
pr_comment:
|
|
65
|
+
format: markdown
|
|
66
|
+
group_by: check
|
|
67
|
+
collapse: false
|
|
68
|
+
|
|
69
|
+
# Migration Steps:
|
|
70
|
+
# 1. Add global failure_conditions section with basic conditions
|
|
71
|
+
# 2. Add group and schema to existing checks
|
|
72
|
+
# 3. Add check-specific failure_conditions as needed
|
|
73
|
+
# 4. Test conditions using debug mode
|
|
74
|
+
# 5. Gradually refine expressions based on results
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
# Example demonstrating Liquid template for loops in Visor
|
|
3
|
+
|
|
4
|
+
steps:
|
|
5
|
+
# Example 1: Loop through all files in PR
|
|
6
|
+
file-summary:
|
|
7
|
+
type: log
|
|
8
|
+
level: info
|
|
9
|
+
message: |
|
|
10
|
+
📁 File Changes Summary:
|
|
11
|
+
|
|
12
|
+
Total files changed: {{ files | size }}
|
|
13
|
+
|
|
14
|
+
{% for file in files %}
|
|
15
|
+
- {{ file.filename }}
|
|
16
|
+
Status: {{ file.status }}
|
|
17
|
+
Changes: +{{ file.additions }}/-{{ file.deletions }}
|
|
18
|
+
{% endfor %}
|
|
19
|
+
|
|
20
|
+
# Example 2: Loop with conditions - only show large files
|
|
21
|
+
large-files:
|
|
22
|
+
type: log
|
|
23
|
+
level: warning
|
|
24
|
+
message: |
|
|
25
|
+
⚠️ Large File Changes (>100 lines):
|
|
26
|
+
|
|
27
|
+
{% for file in files %}
|
|
28
|
+
{% assign total_changes = file.additions | plus: file.deletions %}
|
|
29
|
+
{% if total_changes > 100 %}
|
|
30
|
+
- {{ file.filename }}: {{ total_changes }} lines changed
|
|
31
|
+
{% endif %}
|
|
32
|
+
{% endfor %}
|
|
33
|
+
|
|
34
|
+
# Example 3: Group files by extension using nested loops
|
|
35
|
+
files-by-type:
|
|
36
|
+
type: log
|
|
37
|
+
level: info
|
|
38
|
+
message: |
|
|
39
|
+
📊 Files Grouped by Extension:
|
|
40
|
+
|
|
41
|
+
{% for ext, files in utils.filesByExtension %}
|
|
42
|
+
{{ ext | upcase }} Files ({{ files | size }}):
|
|
43
|
+
{% for file in files %}
|
|
44
|
+
- {{ file.filename }} ({{ file.status }})
|
|
45
|
+
{% endfor %}
|
|
46
|
+
{% endfor %}
|
|
47
|
+
|
|
48
|
+
# Example 4: Create markdown table from files
|
|
49
|
+
file-table:
|
|
50
|
+
type: log
|
|
51
|
+
level: info
|
|
52
|
+
message: |
|
|
53
|
+
## File Change Details
|
|
54
|
+
|
|
55
|
+
| File | Type | Status | Additions | Deletions |
|
|
56
|
+
|------|------|--------|-----------|-----------|
|
|
57
|
+
{% for file in files %}
|
|
58
|
+
| `{{ file.filename }}` | {{ file.filename | split: "." | last }} | {{ file.status }} | +{{ file.additions }} | -{{ file.deletions }} |
|
|
59
|
+
{% endfor %}
|
|
60
|
+
|
|
61
|
+
# Example 5: Loop through check outputs (when using dependencies)
|
|
62
|
+
dependency-summary:
|
|
63
|
+
type: log
|
|
64
|
+
level: info
|
|
65
|
+
depends_on: [file-summary, large-files]
|
|
66
|
+
message: |
|
|
67
|
+
📋 Previous Check Results:
|
|
68
|
+
|
|
69
|
+
{% for checkName, result in outputs %}
|
|
70
|
+
Check: {{ checkName }}
|
|
71
|
+
{% if result.issues %}
|
|
72
|
+
Issues found: {{ result.issues | size }}
|
|
73
|
+
{% for issue in result.issues %}
|
|
74
|
+
- {{ issue.severity }}: {{ issue.message }}
|
|
75
|
+
{% endfor %}
|
|
76
|
+
{% else %}
|
|
77
|
+
No issues found
|
|
78
|
+
{% endif %}
|
|
79
|
+
{% endfor %}
|
|
80
|
+
|
|
81
|
+
# Example 6: Advanced filtering and counting
|
|
82
|
+
security-file-scan:
|
|
83
|
+
type: ai
|
|
84
|
+
prompt: |
|
|
85
|
+
Review these security-sensitive files:
|
|
86
|
+
|
|
87
|
+
{% assign security_files = 0 %}
|
|
88
|
+
{% for file in files %}
|
|
89
|
+
{% if file.filename contains ".env" or file.filename contains "config" or file.filename contains "secret" %}
|
|
90
|
+
{% assign security_files = security_files | plus: 1 %}
|
|
91
|
+
- {{ file.filename }} (SECURITY SENSITIVE)
|
|
92
|
+
{% endif %}
|
|
93
|
+
{% endfor %}
|
|
94
|
+
|
|
95
|
+
{% if security_files == 0 %}
|
|
96
|
+
No security-sensitive files detected in this PR.
|
|
97
|
+
{% else %}
|
|
98
|
+
Found {{ security_files }} security-sensitive files. Please review carefully.
|
|
99
|
+
{% endif %}
|
|
100
|
+
|
|
101
|
+
# Example 7: Create JSON from loop data
|
|
102
|
+
json-output:
|
|
103
|
+
type: command
|
|
104
|
+
exec: |
|
|
105
|
+
echo '{
|
|
106
|
+
"files": [
|
|
107
|
+
{% for file in files %}
|
|
108
|
+
{
|
|
109
|
+
"name": {{ file.filename | json }},
|
|
110
|
+
"status": {{ file.status | json }},
|
|
111
|
+
"additions": {{ file.additions }},
|
|
112
|
+
"deletions": {{ file.deletions }}
|
|
113
|
+
}{% unless forloop.last %},{% endunless %}
|
|
114
|
+
{% endfor %}
|
|
115
|
+
],
|
|
116
|
+
"total": {{ files | size }}
|
|
117
|
+
}' | jq .
|
|
118
|
+
|
|
119
|
+
# Example 8: Loop with index
|
|
120
|
+
numbered-list:
|
|
121
|
+
type: log
|
|
122
|
+
level: info
|
|
123
|
+
message: |
|
|
124
|
+
📝 Files (numbered):
|
|
125
|
+
|
|
126
|
+
{% for file in files %}
|
|
127
|
+
{{ forloop.index }}. {{ file.filename }}
|
|
128
|
+
- First in loop: {{ forloop.first }}
|
|
129
|
+
- Last in loop: {{ forloop.last }}
|
|
130
|
+
- Index (0-based): {{ forloop.index0 }}
|
|
131
|
+
- Index (1-based): {{ forloop.index }}
|
|
132
|
+
{% endfor %}
|
|
133
|
+
|
|
134
|
+
# Example 9: Break and continue (using unless/if)
|
|
135
|
+
filter-files:
|
|
136
|
+
type: log
|
|
137
|
+
level: info
|
|
138
|
+
message: |
|
|
139
|
+
📂 Non-test TypeScript files:
|
|
140
|
+
|
|
141
|
+
{% for file in files %}
|
|
142
|
+
{% unless file.filename contains ".test." %}
|
|
143
|
+
{% if file.filename endswith ".ts" or file.filename endswith ".tsx" %}
|
|
144
|
+
- {{ file.filename }}
|
|
145
|
+
{% endif %}
|
|
146
|
+
{% endunless %}
|
|
147
|
+
{% endfor %}
|
|
148
|
+
|
|
149
|
+
# Example 10: Complex nested structure
|
|
150
|
+
pr-analysis:
|
|
151
|
+
type: ai
|
|
152
|
+
prompt: |
|
|
153
|
+
Analyze this PR structure:
|
|
154
|
+
|
|
155
|
+
{% for ext, files in utils.filesByExtension %}
|
|
156
|
+
{% if files.size > 0 %}
|
|
157
|
+
=== {{ ext | upcase }} Files ({{ files.size }}) ===
|
|
158
|
+
|
|
159
|
+
New files:
|
|
160
|
+
{% for file in files %}
|
|
161
|
+
{% if file.status == "added" %}
|
|
162
|
+
- {{ file.filename }}
|
|
163
|
+
{% endif %}
|
|
164
|
+
{% endfor %}
|
|
165
|
+
|
|
166
|
+
Modified files:
|
|
167
|
+
{% for file in files %}
|
|
168
|
+
{% if file.status == "modified" %}
|
|
169
|
+
- {{ file.filename }} ({{ file.changes }} lines)
|
|
170
|
+
{% endif %}
|
|
171
|
+
{% endfor %}
|
|
172
|
+
|
|
173
|
+
{% endif %}
|
|
174
|
+
{% endfor %}
|
|
175
|
+
|
|
176
|
+
Focus your review on the files with the most changes.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
# Example demonstrating the forEach flag in Visor checks
|
|
3
|
+
# forEach allows a check to output an array, and dependent checks will run once for each item
|
|
4
|
+
|
|
5
|
+
steps:
|
|
6
|
+
# Step 1: Get a list of JSON files (outputs an array)
|
|
7
|
+
list-json-files:
|
|
8
|
+
type: command
|
|
9
|
+
exec: |
|
|
10
|
+
# This outputs a JSON array of file paths
|
|
11
|
+
find . -name "*.json" -type f | head -5 | jq -R -s -c 'split("\n")[:-1]'
|
|
12
|
+
forEach: true # Enable forEach - output will be treated as an array for iteration
|
|
13
|
+
group: validation
|
|
14
|
+
|
|
15
|
+
# Step 2: This check will run once for each JSON file from list-json-files
|
|
16
|
+
validate-each-json:
|
|
17
|
+
type: command
|
|
18
|
+
exec: |
|
|
19
|
+
# {{ outputs.list-json-files }} will be a single file path, not the array
|
|
20
|
+
echo "Validating: {{ outputs.list-json-files }}"
|
|
21
|
+
jsonlint "{{ outputs.list-json-files }}" 2>&1 || echo "Invalid JSON: {{ outputs.list-json-files }}"
|
|
22
|
+
depends_on: [list-json-files]
|
|
23
|
+
group: validation
|
|
24
|
+
|
|
25
|
+
# Another example: Process multiple PR files
|
|
26
|
+
get-changed-js-files:
|
|
27
|
+
type: command
|
|
28
|
+
exec: |
|
|
29
|
+
# Output array of JavaScript files from the PR
|
|
30
|
+
echo '{{ files | json }}' | jq '[.[] | select(.filename | endswith(".js")) | .filename]'
|
|
31
|
+
forEach: true
|
|
32
|
+
group: analysis
|
|
33
|
+
|
|
34
|
+
# This runs for each JS file
|
|
35
|
+
analyze-each-js-file:
|
|
36
|
+
type: command
|
|
37
|
+
exec: |
|
|
38
|
+
echo "Analyzing file: {{ outputs.get-changed-js-files }}"
|
|
39
|
+
# Could run ESLint, complexity analysis, etc.
|
|
40
|
+
wc -l "{{ outputs.get-changed-js-files }}" 2>/dev/null || echo "File not found locally"
|
|
41
|
+
depends_on: [get-changed-js-files]
|
|
42
|
+
group: analysis
|
|
43
|
+
|
|
44
|
+
# Example with AI checks
|
|
45
|
+
list-security-concerns:
|
|
46
|
+
type: ai
|
|
47
|
+
prompt: |
|
|
48
|
+
List the top 3 security-sensitive files in this PR as a JSON array of strings.
|
|
49
|
+
Only include file paths, nothing else.
|
|
50
|
+
Return format: ["file1.js", "file2.py", "file3.yml"]
|
|
51
|
+
schema: plain
|
|
52
|
+
forEach: true # The AI output (array) will be used for iteration
|
|
53
|
+
group: security
|
|
54
|
+
|
|
55
|
+
# This AI check runs for each security-sensitive file
|
|
56
|
+
deep-security-review:
|
|
57
|
+
type: ai
|
|
58
|
+
prompt: |
|
|
59
|
+
Perform a detailed security review of this specific file:
|
|
60
|
+
{{ outputs.list-security-concerns }}
|
|
61
|
+
|
|
62
|
+
Focus only on this one file and provide specific security recommendations.
|
|
63
|
+
depends_on: [list-security-concerns]
|
|
64
|
+
group: security
|
|
65
|
+
|
|
66
|
+
# Example with transform to create array
|
|
67
|
+
extract-functions:
|
|
68
|
+
type: command
|
|
69
|
+
exec: |
|
|
70
|
+
# Extract function names from a TypeScript file
|
|
71
|
+
grep -o "function [a-zA-Z_][a-zA-Z0-9_]*" src/example.ts | cut -d' ' -f2
|
|
72
|
+
transform: |
|
|
73
|
+
{{ output | split: "\n" | json }}
|
|
74
|
+
forEach: true
|
|
75
|
+
group: documentation
|
|
76
|
+
|
|
77
|
+
# Document each function
|
|
78
|
+
document-function:
|
|
79
|
+
type: ai
|
|
80
|
+
prompt: |
|
|
81
|
+
Write JSDoc documentation for the function named: {{ outputs.extract-functions }}
|
|
82
|
+
depends_on: [extract-functions]
|
|
83
|
+
group: documentation
|
|
84
|
+
|
|
85
|
+
# Complex example: Process webhook data
|
|
86
|
+
get-jira-tickets:
|
|
87
|
+
type: http_client
|
|
88
|
+
url: "https://api.example.com/jira/tickets?pr={{ pr.number }}"
|
|
89
|
+
transform: |
|
|
90
|
+
{{ data.issues | json }}
|
|
91
|
+
forEach: true
|
|
92
|
+
group: tracking
|
|
93
|
+
|
|
94
|
+
update-each-ticket:
|
|
95
|
+
type: http
|
|
96
|
+
url: "https://api.example.com/jira/ticket/{{ outputs.get-jira-tickets.id }}"
|
|
97
|
+
body: |
|
|
98
|
+
{
|
|
99
|
+
"status": "in-review",
|
|
100
|
+
"pr_number": {{ pr.number }},
|
|
101
|
+
"reviewer": "{{ pr.author }}"
|
|
102
|
+
}
|
|
103
|
+
depends_on: [get-jira-tickets]
|
|
104
|
+
group: tracking
|
|
105
|
+
|
|
106
|
+
# How forEach works:
|
|
107
|
+
# 1. A check with forEach: true outputs an array (or string that can be parsed as array)
|
|
108
|
+
# 2. The check stores this array internally as forEachItems
|
|
109
|
+
# 3. Any check that depends on a forEach check will:
|
|
110
|
+
# - Execute once for each item in the array
|
|
111
|
+
# - Receive a single item (not the array) in outputs.<check-name>
|
|
112
|
+
# - Aggregate all results from all iterations
|
|
113
|
+
#
|
|
114
|
+
# Example execution flow:
|
|
115
|
+
# - list-json-files outputs: ["file1.json", "file2.json", "file3.json"]
|
|
116
|
+
# - validate-each-json runs 3 times:
|
|
117
|
+
# - Run 1: outputs.list-json-files = "file1.json"
|
|
118
|
+
# - Run 2: outputs.list-json-files = "file2.json"
|
|
119
|
+
# - Run 3: outputs.list-json-files = "file3.json"
|
|
120
|
+
# - All issues from all runs are collected and reported together
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# GitHub Actions Workflow - Progressive Code Review with Tags
|
|
2
|
+
# This workflow demonstrates different tag strategies for various scenarios
|
|
3
|
+
#
|
|
4
|
+
# NOTE: For fork PR support with check runs, change pull_request to pull_request_target
|
|
5
|
+
# See docs/GITHUB_CHECKS.md#fork-pr-support for details
|
|
6
|
+
|
|
7
|
+
name: Progressive Code Review
|
|
8
|
+
on:
|
|
9
|
+
pull_request:
|
|
10
|
+
types: [opened, synchronize, reopened]
|
|
11
|
+
issue_comment:
|
|
12
|
+
types: [created]
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
# ============================================
|
|
16
|
+
# STAGE 1: Quick validation (runs always)
|
|
17
|
+
# ============================================
|
|
18
|
+
quick-validation:
|
|
19
|
+
name: Fast Critical Checks
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0 # Full history for better analysis
|
|
25
|
+
|
|
26
|
+
- name: Run critical fast checks
|
|
27
|
+
uses: gates-ai/visor-action@v1
|
|
28
|
+
with:
|
|
29
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
tags: "critical,fast"
|
|
31
|
+
fail-fast: "true" # Stop immediately on critical issues
|
|
32
|
+
max-parallelism: "5" # Run checks in parallel
|
|
33
|
+
env:
|
|
34
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
35
|
+
|
|
36
|
+
# ============================================
|
|
37
|
+
# STAGE 2: Security scan (parallel with Stage 1)
|
|
38
|
+
# ============================================
|
|
39
|
+
security-scan:
|
|
40
|
+
name: Security Analysis
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
with:
|
|
45
|
+
fetch-depth: 0
|
|
46
|
+
|
|
47
|
+
- name: Run all security checks
|
|
48
|
+
uses: gates-ai/visor-action@v1
|
|
49
|
+
with:
|
|
50
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
51
|
+
tags: "security"
|
|
52
|
+
exclude-tags: "experimental"
|
|
53
|
+
env:
|
|
54
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
55
|
+
|
|
56
|
+
# ============================================
|
|
57
|
+
# STAGE 3: Full review (only for main branch)
|
|
58
|
+
# ============================================
|
|
59
|
+
comprehensive-review:
|
|
60
|
+
name: Comprehensive Analysis
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
if: github.base_ref == 'main' || github.base_ref == 'master'
|
|
63
|
+
needs: [quick-validation] # Only run if quick checks pass
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
with:
|
|
67
|
+
fetch-depth: 0
|
|
68
|
+
|
|
69
|
+
- name: Run comprehensive checks
|
|
70
|
+
uses: gates-ai/visor-action@v1
|
|
71
|
+
with:
|
|
72
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
73
|
+
tags: "comprehensive,remote"
|
|
74
|
+
exclude-tags: "experimental,fast" # Skip fast checks (already ran)
|
|
75
|
+
env:
|
|
76
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
77
|
+
# Use more powerful model for comprehensive checks
|
|
78
|
+
AI_MODEL: "gemini-1.5-pro"
|
|
79
|
+
|
|
80
|
+
# ============================================
|
|
81
|
+
# STAGE 4: Performance profiling (for performance PRs)
|
|
82
|
+
# ============================================
|
|
83
|
+
performance-analysis:
|
|
84
|
+
name: Performance Profiling
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
if: contains(github.event.pull_request.labels.*.name, 'performance') || contains(github.event.pull_request.title, 'perf')
|
|
87
|
+
steps:
|
|
88
|
+
- uses: actions/checkout@v4
|
|
89
|
+
with:
|
|
90
|
+
fetch-depth: 0
|
|
91
|
+
|
|
92
|
+
- name: Run performance checks
|
|
93
|
+
uses: gates-ai/visor-action@v1
|
|
94
|
+
with:
|
|
95
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
96
|
+
tags: "performance"
|
|
97
|
+
env:
|
|
98
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
99
|
+
|
|
100
|
+
# ============================================
|
|
101
|
+
# STAGE 5: Frontend checks (for frontend changes)
|
|
102
|
+
# ============================================
|
|
103
|
+
frontend-checks:
|
|
104
|
+
name: Frontend Analysis
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
if: |
|
|
107
|
+
contains(github.event.pull_request.files.*.filename, '.tsx') ||
|
|
108
|
+
contains(github.event.pull_request.files.*.filename, '.jsx') ||
|
|
109
|
+
contains(github.event.pull_request.files.*.filename, '.css')
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/checkout@v4
|
|
112
|
+
|
|
113
|
+
- name: Run frontend-specific checks
|
|
114
|
+
uses: gates-ai/visor-action@v1
|
|
115
|
+
with:
|
|
116
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
117
|
+
tags: "frontend,accessibility,style"
|
|
118
|
+
env:
|
|
119
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
120
|
+
|
|
121
|
+
# ============================================
|
|
122
|
+
# OPTIONAL: Experimental features (manual trigger)
|
|
123
|
+
# ============================================
|
|
124
|
+
experimental-features:
|
|
125
|
+
name: Experimental Analysis
|
|
126
|
+
runs-on: ubuntu-latest
|
|
127
|
+
if: contains(github.event.comment.body, '/experimental')
|
|
128
|
+
steps:
|
|
129
|
+
- uses: actions/checkout@v4
|
|
130
|
+
|
|
131
|
+
- name: Run experimental checks
|
|
132
|
+
uses: gates-ai/visor-action@v1
|
|
133
|
+
with:
|
|
134
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
135
|
+
tags: "experimental"
|
|
136
|
+
debug: "true" # Enable debug for experimental features
|
|
137
|
+
env:
|
|
138
|
+
CLAUDE_CODE_API_KEY: ${{ secrets.CLAUDE_CODE_API_KEY }}
|
|
139
|
+
# Use Claude for experimental features
|
|
140
|
+
AI_PROVIDER: "claude-code"
|
|
141
|
+
|
|
142
|
+
# ============================================
|
|
143
|
+
# NIGHTLY: Deep analysis (scheduled)
|
|
144
|
+
# ============================================
|
|
145
|
+
deep-analysis:
|
|
146
|
+
name: Deep Code Analysis
|
|
147
|
+
runs-on: ubuntu-latest
|
|
148
|
+
if: github.event_name == 'schedule' # Only for scheduled runs
|
|
149
|
+
steps:
|
|
150
|
+
- uses: actions/checkout@v4
|
|
151
|
+
with:
|
|
152
|
+
fetch-depth: 0
|
|
153
|
+
|
|
154
|
+
- name: Run all checks including slow ones
|
|
155
|
+
uses: gates-ai/visor-action@v1
|
|
156
|
+
with:
|
|
157
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
158
|
+
# Run everything except experimental
|
|
159
|
+
exclude-tags: "experimental"
|
|
160
|
+
# No tag filter means run all
|
|
161
|
+
env:
|
|
162
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
163
|
+
AI_MODEL: "gemini-1.5-pro" # Use best model for deep analysis
|