@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,148 @@
|
|
|
1
|
+
#!/usr/bin/env ts-node
|
|
2
|
+
/**
|
|
3
|
+
* Automated test for calculator SDK example
|
|
4
|
+
* Tests fail_if validation with outputs from previous checks
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { runChecks } from '../src/sdk';
|
|
8
|
+
import { HumanInputCheckProvider } from '../src/providers/human-input-check-provider';
|
|
9
|
+
import type { VisorConfig, HumanInputRequest } from '../src/types/config';
|
|
10
|
+
|
|
11
|
+
// Calculator configuration
|
|
12
|
+
const calculatorConfig: VisorConfig = {
|
|
13
|
+
version: '1.0',
|
|
14
|
+
checks: {
|
|
15
|
+
'get-number1': {
|
|
16
|
+
type: 'human-input',
|
|
17
|
+
prompt: 'Enter the first number:',
|
|
18
|
+
placeholder: 'e.g., 42',
|
|
19
|
+
allow_empty: false,
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
'store-number1': {
|
|
23
|
+
type: 'memory',
|
|
24
|
+
depends_on: ['get-number1'],
|
|
25
|
+
operation: 'set',
|
|
26
|
+
namespace: 'calculator',
|
|
27
|
+
key: 'number1',
|
|
28
|
+
value_js: "parseFloat(outputs['get-number1'])",
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
'get-number2': {
|
|
32
|
+
type: 'human-input',
|
|
33
|
+
depends_on: ['store-number1'],
|
|
34
|
+
prompt: 'Enter the second number:',
|
|
35
|
+
placeholder: 'e.g., 7',
|
|
36
|
+
allow_empty: false,
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
'store-number2': {
|
|
40
|
+
type: 'memory',
|
|
41
|
+
depends_on: ['get-number2'],
|
|
42
|
+
operation: 'set',
|
|
43
|
+
namespace: 'calculator',
|
|
44
|
+
key: 'number2',
|
|
45
|
+
value_js: "parseFloat(outputs['get-number2'])",
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
'get-operation': {
|
|
49
|
+
type: 'human-input',
|
|
50
|
+
depends_on: ['store-number2'],
|
|
51
|
+
prompt: 'Select operation (+, -, *, /):',
|
|
52
|
+
placeholder: 'Enter one of: + - * /',
|
|
53
|
+
allow_empty: false,
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
'store-operation': {
|
|
57
|
+
type: 'memory',
|
|
58
|
+
depends_on: ['get-operation'],
|
|
59
|
+
operation: 'set',
|
|
60
|
+
namespace: 'calculator',
|
|
61
|
+
key: 'operation',
|
|
62
|
+
value_js: "outputs['get-operation'].trim()",
|
|
63
|
+
// THIS IS THE KEY TEST: fail_if should have access to outputs['get-operation']
|
|
64
|
+
fail_if: "!['+', '-', '*', '/'].includes(outputs['get-operation'].trim())",
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
'calculate': {
|
|
68
|
+
type: 'script',
|
|
69
|
+
depends_on: ['store-operation'],
|
|
70
|
+
content: `
|
|
71
|
+
const num1 = memory.get('number1', 'calculator');
|
|
72
|
+
const num2 = memory.get('number2', 'calculator');
|
|
73
|
+
const op = memory.get('operation', 'calculator');
|
|
74
|
+
|
|
75
|
+
log('🔢 Calculating:', num1, op, num2);
|
|
76
|
+
|
|
77
|
+
let result;
|
|
78
|
+
switch(op) {
|
|
79
|
+
case '+': result = num1 + num2; break;
|
|
80
|
+
case '-': result = num1 - num2; break;
|
|
81
|
+
case '*': result = num1 * num2; break;
|
|
82
|
+
case '/': result = num1 / num2; break;
|
|
83
|
+
default: throw new Error('Invalid operation');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
log('✅ Result:', result);
|
|
87
|
+
return result;
|
|
88
|
+
`,
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
'show-result': {
|
|
92
|
+
type: 'log',
|
|
93
|
+
depends_on: ['calculate'],
|
|
94
|
+
message: `Result: {{ outputs['get-number1'] }} {{ outputs['get-operation'] }} {{ outputs['get-number2'] }} = {{ outputs['calculate'] }}`,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
async function runCalculatorTest() {
|
|
100
|
+
console.log('Testing calculator with fail_if validation...\n');
|
|
101
|
+
|
|
102
|
+
// Simulated user inputs
|
|
103
|
+
const inputs = {
|
|
104
|
+
'get-number1': '10',
|
|
105
|
+
'get-number2': '5',
|
|
106
|
+
'get-operation': '+',
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
let currentCheckId = '';
|
|
110
|
+
|
|
111
|
+
// Set up human-input hook
|
|
112
|
+
HumanInputCheckProvider.setHooks({
|
|
113
|
+
onHumanInput: async (request: HumanInputRequest) => {
|
|
114
|
+
currentCheckId = request.checkId;
|
|
115
|
+
const input = inputs[request.checkId as keyof typeof inputs];
|
|
116
|
+
console.log(`📝 ${request.prompt}`);
|
|
117
|
+
console.log(` → ${input}\n`);
|
|
118
|
+
return input;
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
try {
|
|
123
|
+
// Execute checks using SDK
|
|
124
|
+
const result = await runChecks({
|
|
125
|
+
config: calculatorConfig,
|
|
126
|
+
checks: Object.keys(calculatorConfig.checks!),
|
|
127
|
+
outputFormat: 'table',
|
|
128
|
+
maxParallelism: 1,
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
console.log('\n✅ Test PASSED: All checks completed successfully!');
|
|
132
|
+
console.log(` No fail_if errors detected`);
|
|
133
|
+
console.log(` Result: 10 + 5 = 15\n`);
|
|
134
|
+
|
|
135
|
+
return 0;
|
|
136
|
+
} catch (error) {
|
|
137
|
+
console.error('\n❌ Test FAILED:', error);
|
|
138
|
+
return 1;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Run test
|
|
143
|
+
runCalculatorTest()
|
|
144
|
+
.then((code) => process.exit(code))
|
|
145
|
+
.catch((error) => {
|
|
146
|
+
console.error('Unexpected error:', error);
|
|
147
|
+
process.exit(1);
|
|
148
|
+
});
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Claude Code Provider Configuration Example
|
|
2
|
+
# This example demonstrates how to use the Claude Code provider
|
|
3
|
+
# for advanced AI-powered code reviews with MCP tools
|
|
4
|
+
|
|
5
|
+
version: "1.0"
|
|
6
|
+
project: claude-code-example
|
|
7
|
+
language: typescript
|
|
8
|
+
|
|
9
|
+
# Claude Code checks with various configurations
|
|
10
|
+
steps:
|
|
11
|
+
# Basic Claude Code analysis
|
|
12
|
+
claude_security_review:
|
|
13
|
+
type: claude-code
|
|
14
|
+
group: security
|
|
15
|
+
prompt: |
|
|
16
|
+
Analyze this code for security vulnerabilities including:
|
|
17
|
+
- SQL injection risks
|
|
18
|
+
- XSS vulnerabilities
|
|
19
|
+
- Authentication/authorization issues
|
|
20
|
+
- Sensitive data exposure
|
|
21
|
+
- Input validation problems
|
|
22
|
+
claude_code:
|
|
23
|
+
allowedTools: ['Grep', 'Read']
|
|
24
|
+
maxTurns: 3
|
|
25
|
+
systemPrompt: "You are a senior security engineer conducting a thorough security audit."
|
|
26
|
+
on: [pr_opened, pr_updated]
|
|
27
|
+
|
|
28
|
+
# Architecture analysis with MCP tools
|
|
29
|
+
claude_architecture:
|
|
30
|
+
type: claude-code
|
|
31
|
+
group: architecture
|
|
32
|
+
prompt: |
|
|
33
|
+
Analyze the code architecture and provide insights on:
|
|
34
|
+
- Code organization and structure
|
|
35
|
+
- Design patterns usage
|
|
36
|
+
- Coupling and cohesion
|
|
37
|
+
- Modularity and maintainability
|
|
38
|
+
claude_code:
|
|
39
|
+
allowedTools:
|
|
40
|
+
- Read
|
|
41
|
+
- Grep
|
|
42
|
+
- analyze_file_structure
|
|
43
|
+
- detect_patterns
|
|
44
|
+
- calculate_complexity
|
|
45
|
+
maxTurns: 5
|
|
46
|
+
systemPrompt: "You are a software architect reviewing code for best practices."
|
|
47
|
+
on: [pr_opened, pr_updated]
|
|
48
|
+
|
|
49
|
+
# Performance analysis with custom MCP server
|
|
50
|
+
claude_performance:
|
|
51
|
+
type: claude-code
|
|
52
|
+
group: performance
|
|
53
|
+
prompt: |
|
|
54
|
+
Review the code for performance issues:
|
|
55
|
+
- Algorithm efficiency
|
|
56
|
+
- Database query optimization
|
|
57
|
+
- Memory leaks and management
|
|
58
|
+
- Caching opportunities
|
|
59
|
+
- Async/await patterns
|
|
60
|
+
claude_code:
|
|
61
|
+
allowedTools:
|
|
62
|
+
- Read
|
|
63
|
+
- Grep
|
|
64
|
+
- calculate_complexity
|
|
65
|
+
- suggest_improvements
|
|
66
|
+
maxTurns: 4
|
|
67
|
+
systemPrompt: "Focus on performance bottlenecks and optimization opportunities."
|
|
68
|
+
# Custom MCP server for performance profiling
|
|
69
|
+
mcpServers:
|
|
70
|
+
perf_analyzer:
|
|
71
|
+
command: "node"
|
|
72
|
+
args: ["./tools/performance-analyzer.js"]
|
|
73
|
+
env:
|
|
74
|
+
PROFILE_MODE: "detailed"
|
|
75
|
+
on: [pr_opened, pr_updated]
|
|
76
|
+
|
|
77
|
+
# Code quality with web search
|
|
78
|
+
claude_quality:
|
|
79
|
+
type: claude-code
|
|
80
|
+
group: quality
|
|
81
|
+
prompt: |
|
|
82
|
+
Assess overall code quality:
|
|
83
|
+
- Naming conventions and readability
|
|
84
|
+
- Documentation completeness
|
|
85
|
+
- Test coverage assessment
|
|
86
|
+
- Error handling
|
|
87
|
+
- Code duplication
|
|
88
|
+
Search for best practices if needed.
|
|
89
|
+
claude_code:
|
|
90
|
+
allowedTools:
|
|
91
|
+
- Read
|
|
92
|
+
- Grep
|
|
93
|
+
- WebSearch
|
|
94
|
+
- detect_patterns
|
|
95
|
+
- suggest_improvements
|
|
96
|
+
maxTurns: 6
|
|
97
|
+
systemPrompt: "You are a code quality expert. Use web search to find current best practices when needed."
|
|
98
|
+
on: [pr_opened, pr_updated]
|
|
99
|
+
|
|
100
|
+
# Dependency analysis with session reuse
|
|
101
|
+
claude_dependencies:
|
|
102
|
+
type: claude-code
|
|
103
|
+
group: dependencies
|
|
104
|
+
prompt: |
|
|
105
|
+
Analyze the project dependencies:
|
|
106
|
+
- Outdated packages
|
|
107
|
+
- Security vulnerabilities in dependencies
|
|
108
|
+
- Unused dependencies
|
|
109
|
+
- Missing peer dependencies
|
|
110
|
+
claude_code:
|
|
111
|
+
allowedTools:
|
|
112
|
+
- Read
|
|
113
|
+
- Grep
|
|
114
|
+
- WebSearch
|
|
115
|
+
maxTurns: 3
|
|
116
|
+
depends_on: [claude_quality]
|
|
117
|
+
reuse_ai_session: true # Reuse session from quality check
|
|
118
|
+
on: [pr_opened, pr_updated]
|
|
119
|
+
|
|
120
|
+
# Advanced review with subagent
|
|
121
|
+
claude_comprehensive:
|
|
122
|
+
type: claude-code
|
|
123
|
+
group: comprehensive
|
|
124
|
+
prompt: |
|
|
125
|
+
Perform a comprehensive code review covering all aspects.
|
|
126
|
+
Delegate specific tasks to specialized subagents as needed.
|
|
127
|
+
claude_code:
|
|
128
|
+
allowedTools:
|
|
129
|
+
- Read
|
|
130
|
+
- Grep
|
|
131
|
+
- WebSearch
|
|
132
|
+
- analyze_file_structure
|
|
133
|
+
- detect_patterns
|
|
134
|
+
- calculate_complexity
|
|
135
|
+
- suggest_improvements
|
|
136
|
+
maxTurns: 10
|
|
137
|
+
systemPrompt: "You are the lead code reviewer. Use all available tools and delegate to subagents."
|
|
138
|
+
# Subagent for specialized tasks
|
|
139
|
+
subagent: "./.claude/agents/code-reviewer.md"
|
|
140
|
+
# Hooks for custom processing
|
|
141
|
+
hooks:
|
|
142
|
+
onStart: "echo 'Starting comprehensive Claude Code review'"
|
|
143
|
+
onToolUse: "./hooks/log-tool-usage.sh"
|
|
144
|
+
onEnd: "echo 'Comprehensive review complete'"
|
|
145
|
+
on: [manual] # Run manually due to high resource usage
|
|
146
|
+
|
|
147
|
+
# Output configuration
|
|
148
|
+
output:
|
|
149
|
+
# PR comment format
|
|
150
|
+
pr_comment:
|
|
151
|
+
enabled: true
|
|
152
|
+
update_existing: true
|
|
153
|
+
group_by: group
|
|
154
|
+
|
|
155
|
+
# Multiple output formats
|
|
156
|
+
format: table
|
|
157
|
+
|
|
158
|
+
# Save detailed reports
|
|
159
|
+
file:
|
|
160
|
+
enabled: true
|
|
161
|
+
path: "./reports/claude-review-{{date}}.md"
|
|
162
|
+
format: markdown
|
|
163
|
+
|
|
164
|
+
# Global AI settings (fallback for non-Claude checks)
|
|
165
|
+
ai_provider: google
|
|
166
|
+
ai_model: gemini-pro
|
|
167
|
+
|
|
168
|
+
# Failure conditions
|
|
169
|
+
fail_if: "criticalIssues > 0 || securityIssues > 5"
|
|
170
|
+
|
|
171
|
+
# Custom MCP server configuration
|
|
172
|
+
# This can be extended in .mcp.json for more servers
|
|
173
|
+
mcp_config:
|
|
174
|
+
servers:
|
|
175
|
+
code_analyzer:
|
|
176
|
+
command: "python"
|
|
177
|
+
args: ["./mcp/analyzer.py"]
|
|
178
|
+
env:
|
|
179
|
+
ANALYSIS_LEVEL: "deep"
|
|
180
|
+
|
|
181
|
+
security_scanner:
|
|
182
|
+
command: "node"
|
|
183
|
+
args: ["./mcp/security.js"]
|
|
184
|
+
env:
|
|
185
|
+
SCAN_MODE: "full"
|
|
186
|
+
|
|
187
|
+
# Environment variables for checks
|
|
188
|
+
env:
|
|
189
|
+
ANALYSIS_DEPTH: "comprehensive"
|
|
190
|
+
INCLUDE_SUGGESTIONS: "true"
|
|
191
|
+
MAX_FILE_SIZE: "1000000"
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
|
|
3
|
+
# Global HTTP server configuration for receiving webhooks
|
|
4
|
+
# Note: ${...} syntax reads from environment variables
|
|
5
|
+
# This server is automatically disabled when running in GitHub Actions
|
|
6
|
+
http_server:
|
|
7
|
+
enabled: true
|
|
8
|
+
port: 8080
|
|
9
|
+
host: "0.0.0.0"
|
|
10
|
+
auth:
|
|
11
|
+
type: bearer_token
|
|
12
|
+
secret: "${WEBHOOK_SECRET}" # Read from WEBHOOK_SECRET environment variable
|
|
13
|
+
endpoints:
|
|
14
|
+
- path: "/deploy"
|
|
15
|
+
name: "deployment-webhook"
|
|
16
|
+
transform: |
|
|
17
|
+
{
|
|
18
|
+
"environment": "{{ webhook.environment }}",
|
|
19
|
+
"version": "{{ webhook.version }}",
|
|
20
|
+
"service": "{{ webhook.service }}",
|
|
21
|
+
"timestamp": "{{ webhook.timestamp | default: timestamp }}"
|
|
22
|
+
}
|
|
23
|
+
- path: "/ci-complete"
|
|
24
|
+
name: "ci-webhook"
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
# Scheduled nightly security scan
|
|
28
|
+
nightly-security-scan:
|
|
29
|
+
type: ai
|
|
30
|
+
schedule: "0 2 * * *" # Every night at 2 AM
|
|
31
|
+
prompt: |
|
|
32
|
+
Perform a comprehensive security audit of the codebase.
|
|
33
|
+
Focus on:
|
|
34
|
+
- SQL injection vulnerabilities
|
|
35
|
+
- XSS vulnerabilities
|
|
36
|
+
- Authentication/authorization issues
|
|
37
|
+
- Sensitive data exposure
|
|
38
|
+
- Dependency vulnerabilities
|
|
39
|
+
group: security
|
|
40
|
+
schema: code-review
|
|
41
|
+
|
|
42
|
+
# Send security scan results to Slack
|
|
43
|
+
security-to-slack:
|
|
44
|
+
type: http
|
|
45
|
+
depends_on: [nightly-security-scan]
|
|
46
|
+
url: "${SLACK_WEBHOOK_URL}" # Read from SLACK_WEBHOOK_URL environment variable
|
|
47
|
+
method: POST
|
|
48
|
+
headers:
|
|
49
|
+
Content-Type: "application/json"
|
|
50
|
+
body: |
|
|
51
|
+
{
|
|
52
|
+
"text": "🔒 Nightly Security Scan Results",
|
|
53
|
+
"blocks": [
|
|
54
|
+
{
|
|
55
|
+
"type": "header",
|
|
56
|
+
"text": {
|
|
57
|
+
"type": "plain_text",
|
|
58
|
+
"text": "Security Scan Report"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "section",
|
|
63
|
+
"text": {
|
|
64
|
+
"type": "mrkdwn",
|
|
65
|
+
"text": "*Total Issues:* {{ outputs['nightly-security-scan'].totalIssues }}\n*Critical:* {{ outputs['nightly-security-scan'].criticalIssues }}\n*Errors:* {{ outputs['nightly-security-scan'].errorIssues }}"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{% if outputs['nightly-security-scan'].issues %}
|
|
69
|
+
{
|
|
70
|
+
"type": "section",
|
|
71
|
+
"text": {
|
|
72
|
+
"type": "mrkdwn",
|
|
73
|
+
"text": "*Top Issues:*\n{% for issue in outputs['nightly-security-scan'].issues | slice: 0, 3 %}• {{ issue.message | truncate: 80 }}\n{% endfor %}"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{% endif %}
|
|
77
|
+
{
|
|
78
|
+
"type": "context",
|
|
79
|
+
"elements": [
|
|
80
|
+
{
|
|
81
|
+
"type": "mrkdwn",
|
|
82
|
+
"text": "Scan completed at {{ timestamp }}"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
# Weekly performance analysis
|
|
90
|
+
weekly-performance:
|
|
91
|
+
type: ai
|
|
92
|
+
schedule: "0 0 * * 0" # Sunday at midnight
|
|
93
|
+
prompt: |
|
|
94
|
+
Analyze the codebase for performance issues:
|
|
95
|
+
- Inefficient algorithms (O(n²) or worse)
|
|
96
|
+
- Database N+1 queries
|
|
97
|
+
- Memory leaks
|
|
98
|
+
- Unnecessary re-renders (React/Vue)
|
|
99
|
+
- Bundle size issues
|
|
100
|
+
group: performance
|
|
101
|
+
schema: code-review
|
|
102
|
+
|
|
103
|
+
# Webhook input for deployment notifications
|
|
104
|
+
deployment-webhook:
|
|
105
|
+
type: http_input
|
|
106
|
+
endpoint: "/deploy"
|
|
107
|
+
on: [webhook_received]
|
|
108
|
+
|
|
109
|
+
# Post-deployment validation check
|
|
110
|
+
post-deploy-validation:
|
|
111
|
+
type: ai
|
|
112
|
+
depends_on: [deployment-webhook]
|
|
113
|
+
prompt: |
|
|
114
|
+
Deployment notification received:
|
|
115
|
+
- Environment: {{ outputs['deployment-webhook'].environment }}
|
|
116
|
+
- Version: {{ outputs['deployment-webhook'].version }}
|
|
117
|
+
- Service: {{ outputs['deployment-webhook'].service }}
|
|
118
|
+
|
|
119
|
+
Analyze the deployed version for:
|
|
120
|
+
1. Configuration drift from expected state
|
|
121
|
+
2. Security implications of the deployment
|
|
122
|
+
3. Potential compatibility issues
|
|
123
|
+
4. Required post-deployment tasks
|
|
124
|
+
|
|
125
|
+
Generate actionable recommendations.
|
|
126
|
+
group: deployment
|
|
127
|
+
schema: plain
|
|
128
|
+
|
|
129
|
+
# Send deployment analysis to ops team
|
|
130
|
+
notify-ops-team:
|
|
131
|
+
type: http
|
|
132
|
+
depends_on: [post-deploy-validation]
|
|
133
|
+
url: "${OPS_WEBHOOK_URL}" # Read from OPS_WEBHOOK_URL environment variable
|
|
134
|
+
method: POST
|
|
135
|
+
headers:
|
|
136
|
+
Content-Type: "application/json"
|
|
137
|
+
X-API-Key: "${OPS_API_KEY}" # Read from OPS_API_KEY environment variable
|
|
138
|
+
body: |
|
|
139
|
+
{
|
|
140
|
+
"deployment": {
|
|
141
|
+
"environment": "{{ outputs['deployment-webhook'].environment }}",
|
|
142
|
+
"version": "{{ outputs['deployment-webhook'].version }}",
|
|
143
|
+
"service": "{{ outputs['deployment-webhook'].service }}"
|
|
144
|
+
},
|
|
145
|
+
"analysis": {
|
|
146
|
+
"issues": {{ outputs['post-deploy-validation'].issues | json }},
|
|
147
|
+
"recommendations": {{ outputs['post-deploy-validation'].suggestions | json }},
|
|
148
|
+
"severity": "{% if outputs['post-deploy-validation'].criticalIssues > 0 %}critical{% elsif outputs['post-deploy-validation'].errorIssues > 0 %}error{% elsif outputs['post-deploy-validation'].warningIssues > 0 %}warning{% else %}info{% endif %}"
|
|
149
|
+
},
|
|
150
|
+
"timestamp": "{{ timestamp }}",
|
|
151
|
+
"visor_version": "1.0"
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
# CI completion webhook input
|
|
155
|
+
ci-completion:
|
|
156
|
+
type: http_input
|
|
157
|
+
endpoint: "/ci-complete"
|
|
158
|
+
transform: |
|
|
159
|
+
{
|
|
160
|
+
"build_id": "{{ webhook.build_id }}",
|
|
161
|
+
"status": "{{ webhook.status }}",
|
|
162
|
+
"branch": "{{ webhook.branch }}",
|
|
163
|
+
"commit": "{{ webhook.commit }}",
|
|
164
|
+
"test_results": {{ webhook.test_results | json }}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
# Analyze CI results
|
|
168
|
+
ci-analysis:
|
|
169
|
+
type: ai
|
|
170
|
+
depends_on: [ci-completion]
|
|
171
|
+
prompt: |
|
|
172
|
+
CI build completed:
|
|
173
|
+
- Status: {{ outputs['ci-completion'].status }}
|
|
174
|
+
- Branch: {{ outputs['ci-completion'].branch }}
|
|
175
|
+
- Test Results: {{ outputs['ci-completion'].test_results }}
|
|
176
|
+
|
|
177
|
+
{% if outputs['ci-completion'].status == 'failed' %}
|
|
178
|
+
Analyze the failure and provide:
|
|
179
|
+
1. Root cause analysis
|
|
180
|
+
2. Suggested fixes
|
|
181
|
+
3. Impact assessment
|
|
182
|
+
{% else %}
|
|
183
|
+
Review the successful build for:
|
|
184
|
+
1. Test coverage improvements
|
|
185
|
+
2. Performance metrics
|
|
186
|
+
3. Code quality trends
|
|
187
|
+
{% endif %}
|
|
188
|
+
|
|
189
|
+
# Hourly monitoring check (business hours only)
|
|
190
|
+
business-hours-monitor:
|
|
191
|
+
type: command
|
|
192
|
+
schedule: "0 9-17 * * 1-5" # Every hour 9 AM - 5 PM, Monday-Friday
|
|
193
|
+
exec: "curl -s https://api.example.com/health"
|
|
194
|
+
group: monitoring
|
|
195
|
+
|
|
196
|
+
# Send monitoring alerts
|
|
197
|
+
monitoring-alert:
|
|
198
|
+
type: http
|
|
199
|
+
depends_on: [business-hours-monitor]
|
|
200
|
+
url: "${ALERT_WEBHOOK_URL}" # Read from ALERT_WEBHOOK_URL environment variable
|
|
201
|
+
body: |
|
|
202
|
+
{
|
|
203
|
+
"service": "API Health Check",
|
|
204
|
+
"status": "{{ outputs['business-hours-monitor'].exitCode == 0 ? 'healthy' : 'unhealthy' }}",
|
|
205
|
+
"timestamp": "{{ timestamp }}",
|
|
206
|
+
"details": {{ outputs['business-hours-monitor'] | json }}
|
|
207
|
+
}
|
|
208
|
+
if: "outputs['business-hours-monitor'].exitCode != 0"
|
|
209
|
+
|
|
210
|
+
output:
|
|
211
|
+
pr_comment:
|
|
212
|
+
format: markdown
|
|
213
|
+
group_by: check
|
|
214
|
+
collapse: true
|
|
215
|
+
suppressionEnabled: true
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 🔍 {{ checkName | capitalize }} Review Results
|
|
2
|
+
|
|
3
|
+
{% if issues.size == 0 %}
|
|
4
|
+
## ✅ No Issues Found
|
|
5
|
+
Great job! No issues were detected in this check.
|
|
6
|
+
{% else %}
|
|
7
|
+
## 📋 Issues Summary
|
|
8
|
+
Found **{{ issues.size }}** issue{% if issues.size > 1 %}s{% endif %} to review:
|
|
9
|
+
|
|
10
|
+
{% assign critical_issues = issues | where: "severity", "critical" %}
|
|
11
|
+
{% assign error_issues = issues | where: "severity", "error" %}
|
|
12
|
+
{% assign warning_issues = issues | where: "severity", "warning" %}
|
|
13
|
+
{% assign info_issues = issues | where: "severity", "info" %}
|
|
14
|
+
|
|
15
|
+
{% if critical_issues.size > 0 %}
|
|
16
|
+
### 🚨 Critical Issues ({{ critical_issues.size }})
|
|
17
|
+
{% for issue in critical_issues %}
|
|
18
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
19
|
+
{% if issue.suggestion %}
|
|
20
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
21
|
+
{% endif %}
|
|
22
|
+
{% endfor %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% if error_issues.size > 0 %}
|
|
26
|
+
### ❌ Errors ({{ error_issues.size }})
|
|
27
|
+
{% for issue in error_issues %}
|
|
28
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
29
|
+
{% if issue.suggestion %}
|
|
30
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
31
|
+
{% endif %}
|
|
32
|
+
{% endfor %}
|
|
33
|
+
{% endif %}
|
|
34
|
+
|
|
35
|
+
{% if warning_issues.size > 0 %}
|
|
36
|
+
### ⚠️ Warnings ({{ warning_issues.size }})
|
|
37
|
+
{% for issue in warning_issues %}
|
|
38
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
39
|
+
{% if issue.suggestion %}
|
|
40
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
41
|
+
{% endif %}
|
|
42
|
+
{% endfor %}
|
|
43
|
+
{% endif %}
|
|
44
|
+
|
|
45
|
+
{% if info_issues.size > 0 %}
|
|
46
|
+
### ℹ️ Info ({{ info_issues.size }})
|
|
47
|
+
{% for issue in info_issues %}
|
|
48
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
49
|
+
{% if issue.suggestion %}
|
|
50
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
51
|
+
{% endif %}
|
|
52
|
+
{% endfor %}
|
|
53
|
+
{% endif %}
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
*Powered by Custom Template*
|
|
57
|
+
{% endif %}
|