@probelabs/visor 0.1.106 → 0.1.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -2
- package/action.yml +1 -1
- package/defaults/code-refiner.yaml +114 -0
- package/defaults/{.visor.yaml → code-review.yaml} +35 -226
- package/defaults/override.yaml +52 -0
- package/defaults/task-refinement.yaml +624 -0
- package/defaults/visor.tests.yaml +685 -0
- package/defaults/visor.yaml +483 -0
- package/dist/action-cli-bridge.d.ts +11 -82
- package/dist/action-cli-bridge.d.ts.map +1 -1
- package/dist/ai-review-service.d.ts +28 -9
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/check-execution-engine.d.ts +19 -331
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/cron-scheduler.d.ts +3 -3
- package/dist/cron-scheduler.d.ts.map +1 -1
- package/dist/debug-visualizer/ws-server.d.ts +7 -1
- package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
- package/dist/defaults/code-refiner.yaml +114 -0
- package/dist/defaults/{.visor.yaml → code-review.yaml} +35 -226
- package/dist/defaults/override.yaml +52 -0
- package/dist/defaults/task-refinement.yaml +624 -0
- package/dist/defaults/visor.tests.yaml +685 -0
- package/dist/defaults/visor.yaml +483 -0
- package/dist/docs/DEPLOYMENT.md +118 -0
- package/dist/docs/GITHUB_CHECKS.md +280 -0
- package/dist/docs/NPM_USAGE.md +208 -0
- package/dist/docs/action-reference.md +19 -0
- package/dist/docs/advanced-ai.md +237 -0
- package/dist/docs/ai-configuration.md +535 -0
- package/dist/docs/ai-custom-tools-usage.md +261 -0
- package/dist/docs/ai-custom-tools.md +392 -0
- package/dist/docs/author-permissions.md +610 -0
- package/dist/docs/bot-transports-rfc.md +23 -0
- package/dist/docs/ci-cli-mode.md +34 -0
- package/dist/docs/claude-code.md +74 -0
- package/dist/docs/command-provider.md +559 -0
- package/dist/docs/commands.md +8 -0
- package/dist/docs/configuration.md +324 -0
- package/dist/docs/custom-tools.md +424 -0
- package/dist/docs/dashboards/README.md +23 -0
- package/dist/docs/dashboards/grafana-visor-diagrams.json +20 -0
- package/dist/docs/dashboards/grafana-visor-overview.json +33 -0
- package/dist/docs/debug-visualizer-progress.md +572 -0
- package/dist/docs/debug-visualizer-rfc.md +691 -0
- package/dist/docs/debug-visualizer.md +114 -0
- package/dist/docs/debugging.md +636 -0
- package/dist/docs/default-output-schema.md +28 -0
- package/dist/docs/dependencies.md +369 -0
- package/dist/docs/dev-playbook.md +9 -0
- package/dist/docs/engine-pause-resume-rfc.md +192 -0
- package/dist/docs/engine-state-machine-plan.md +333 -0
- package/dist/docs/event-driven-github-integration-rfc.md +743 -0
- package/dist/docs/event-triggers.md +292 -0
- package/dist/docs/execution-statistics-rfc.md +290 -0
- package/dist/docs/fact-validator-gap-analysis.md +178 -0
- package/dist/docs/fact-validator-implementation-plan.md +1235 -0
- package/dist/docs/fail-if.md +95 -0
- package/dist/docs/failure-conditions-implementation.md +271 -0
- package/dist/docs/failure-conditions-schema.md +173 -0
- package/dist/docs/failure-routing-rfc.md +193 -0
- package/dist/docs/failure-routing.md +507 -0
- package/dist/docs/foreach-dependency-propagation.md +473 -0
- package/dist/docs/github-ops.md +89 -0
- package/dist/docs/goto-forward-run-plan.md +113 -0
- package/dist/docs/guides/criticality-modes.md +332 -0
- package/dist/docs/guides/fault-management-and-contracts.md +738 -0
- package/dist/docs/guides/workflow-style-guide.md +224 -0
- package/dist/docs/http.md +299 -0
- package/dist/docs/human-input-provider.md +372 -0
- package/dist/docs/lifecycle-hooks.md +253 -0
- package/dist/docs/limits.md +64 -0
- package/dist/docs/liquid-templates.md +490 -0
- package/dist/docs/loop-routing-refactor.md +89 -0
- package/dist/docs/mcp-provider.md +557 -0
- package/dist/docs/mcp.md +124 -0
- package/dist/docs/memory.md +903 -0
- package/dist/docs/observability.md +12 -0
- package/dist/docs/output-formats.md +20 -0
- package/dist/docs/output-formatting.md +29 -0
- package/dist/docs/output-history.md +383 -0
- package/dist/docs/performance.md +6 -0
- package/dist/docs/pluggable.md +124 -0
- package/dist/docs/proposals/snapshot-scope-execution.md +236 -0
- package/dist/docs/providers/git-checkout.md +589 -0
- package/dist/docs/recipes.md +474 -0
- package/dist/docs/rfc/git-checkout-step.md +601 -0
- package/dist/docs/rfc/on_init-hook.md +1294 -0
- package/dist/docs/rfc/workspace-isolation.md +216 -0
- package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
- package/dist/docs/router-patterns.md +339 -0
- package/dist/docs/schema-next-pr.md +10 -0
- package/dist/docs/schema-templates.md +68 -0
- package/dist/docs/script.md +34 -0
- package/dist/docs/sdk.md +222 -0
- package/dist/docs/security.md +7 -0
- package/dist/docs/suppressions.md +89 -0
- package/dist/docs/tag-filtering.md +258 -0
- package/dist/docs/telemetry-setup.md +119 -0
- package/dist/docs/telemetry-tracing-rfc.md +275 -0
- package/dist/docs/test-framework-rfc.md +680 -0
- package/dist/docs/testing/assertions.md +85 -0
- package/dist/docs/testing/ci.md +44 -0
- package/dist/docs/testing/cli.md +41 -0
- package/dist/docs/testing/cookbook.md +172 -0
- package/dist/docs/testing/dsl-reference.md +199 -0
- package/dist/docs/testing/fixtures-and-mocks.md +91 -0
- package/dist/docs/testing/flows.md +92 -0
- package/dist/docs/testing/getting-started.md +93 -0
- package/dist/docs/testing/troubleshooting.md +55 -0
- package/dist/docs/timeouts.md +50 -0
- package/dist/docs/troubleshooting.md +7 -0
- package/dist/docs/visor-sdk-rfc.md +186 -0
- package/dist/docs/workflows.md +569 -0
- package/dist/engine/on-finish/orchestrator.d.ts +19 -0
- package/dist/engine/on-finish/orchestrator.d.ts.map +1 -0
- package/dist/engine/on-finish/utils.d.ts +44 -0
- package/dist/engine/on-finish/utils.d.ts.map +1 -0
- package/dist/event-bus/event-bus.d.ts +13 -0
- package/dist/event-bus/event-bus.d.ts.map +1 -0
- package/dist/event-bus/types.d.ts +71 -0
- package/dist/event-bus/types.d.ts.map +1 -0
- package/dist/examples/.claude/agents/code-reviewer.md +69 -0
- package/dist/examples/.mcp.json +34 -0
- package/dist/examples/CALCULATOR-SDK.md +364 -0
- package/dist/examples/README.md +384 -0
- package/dist/examples/ai-custom-tools-example.yaml +206 -0
- package/dist/examples/ai-custom-tools-simple.yaml +76 -0
- package/dist/examples/ai-retry-fallback-config.yaml +180 -0
- package/dist/examples/ai-with-bash.yaml +126 -0
- package/dist/examples/ai-with-mcp.yaml +82 -0
- package/dist/examples/basic-human-input.yaml +15 -0
- package/dist/examples/bedrock-config.yaml +77 -0
- package/dist/examples/calculator-config.yaml +133 -0
- package/dist/examples/calculator-json-output-guide.md +311 -0
- package/dist/examples/calculator-sdk-automated.ts +340 -0
- package/dist/examples/calculator-sdk-example.ts +275 -0
- package/dist/examples/calculator-sdk-json.ts +331 -0
- package/dist/examples/calculator-sdk-real.ts +374 -0
- package/dist/examples/calculator-sdk-test.ts +148 -0
- package/dist/examples/claude-code-config.yaml +191 -0
- package/dist/examples/cron-webhook-config.yaml +215 -0
- package/dist/examples/custom-template.liquid +57 -0
- package/dist/examples/custom-tools-example.yaml +281 -0
- package/dist/examples/enhanced-config.yaml +165 -0
- package/dist/examples/environments/visor.base.yaml +92 -0
- package/dist/examples/environments/visor.dev.yaml +33 -0
- package/dist/examples/environments/visor.prod.yaml +95 -0
- package/dist/examples/environments/visor.staging.yaml +46 -0
- package/dist/examples/fact-validator.yaml +361 -0
- package/dist/examples/fail-if-simple.yaml +90 -0
- package/dist/examples/failure-conditions-advanced.yaml +136 -0
- package/dist/examples/failure-conditions-basic.yaml +48 -0
- package/dist/examples/failure-conditions-github-style.yaml +119 -0
- package/dist/examples/failure-conditions-migration.yaml +74 -0
- package/dist/examples/for-loop-example.yaml +176 -0
- package/dist/examples/forEach-example.yaml +120 -0
- package/dist/examples/git-checkout-basic.yaml +32 -0
- package/dist/examples/git-checkout-compare.yaml +59 -0
- package/dist/examples/git-checkout-cross-repo.yaml +76 -0
- package/dist/examples/github-workflow-with-tags.yml +163 -0
- package/dist/examples/http-integration-config.yaml +240 -0
- package/dist/examples/https-server-config.yaml +209 -0
- package/dist/examples/human-input-example.yaml +63 -0
- package/dist/examples/if-conditions.yaml +173 -0
- package/dist/examples/jira-simple-example.yaml +56 -0
- package/dist/examples/jira-single-issue-workflow.yaml +166 -0
- package/dist/examples/jira-workflow-mcp.yaml +182 -0
- package/dist/examples/mcp/analyzer.py +119 -0
- package/dist/examples/mcp-provider-example.yaml +301 -0
- package/dist/examples/memory-counter.yaml +99 -0
- package/dist/examples/memory-error-collection.yaml +104 -0
- package/dist/examples/memory-exec-js.yaml +247 -0
- package/dist/examples/memory-namespace-isolation.yaml +184 -0
- package/dist/examples/memory-retry-counter.yaml +65 -0
- package/dist/examples/memory-state-machine.yaml +170 -0
- package/dist/examples/on-init-import-demo.yaml +179 -0
- package/dist/examples/outputs-raw-basic.yaml +26 -0
- package/dist/examples/project-with-tools.yaml +174 -0
- package/dist/examples/prompts/architecture-analysis.liquid +116 -0
- package/dist/examples/prompts/security-comprehensive.liquid +107 -0
- package/dist/examples/quick-start-tags.yaml +53 -0
- package/dist/examples/reusable-tools.yaml +92 -0
- package/dist/examples/reusable-workflows.yaml +88 -0
- package/dist/examples/routing-basic.yaml +35 -0
- package/dist/examples/routing-dynamic-js.yaml +46 -0
- package/dist/examples/routing-foreach.yaml +34 -0
- package/dist/examples/routing-goto-event.yaml +34 -0
- package/dist/examples/routing-on-success.yaml +25 -0
- package/dist/examples/run-calculator-demo.sh +71 -0
- package/dist/examples/sdk-basic.mjs +10 -0
- package/dist/examples/sdk-cjs.cjs +10 -0
- package/dist/examples/sdk-comprehensive.mjs +175 -0
- package/dist/examples/sdk-manual-config.mjs +65 -0
- package/dist/examples/sdk-typescript.js +81 -0
- package/dist/examples/sdk-typescript.ts +92 -0
- package/dist/examples/session-reuse-config.yaml +151 -0
- package/dist/examples/session-reuse-self.yaml +81 -0
- package/dist/examples/slack-simple-chat.yaml +775 -0
- package/dist/examples/templates/security-report.liquid +137 -0
- package/dist/examples/tools-library.yaml +281 -0
- package/dist/examples/transform-example.yaml +199 -0
- package/dist/examples/visor-with-tags.yaml +198 -0
- package/dist/examples/webhook-pipeline-config.yaml +218 -0
- package/dist/examples/workflows/calculator-workflow.yaml +163 -0
- package/dist/examples/workflows/code-quality.yaml +222 -0
- package/dist/examples/workflows/quick-pr-check.yaml +90 -0
- package/dist/examples/workflows/workflow-composition-example.yaml +130 -0
- package/dist/failure-condition-evaluator.d.ts +3 -0
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/frontends/github-frontend.d.ts +58 -0
- package/dist/frontends/github-frontend.d.ts.map +1 -0
- package/dist/frontends/host.d.ts +47 -0
- package/dist/frontends/host.d.ts.map +1 -0
- package/dist/frontends/ndjson-sink.d.ts +12 -0
- package/dist/frontends/ndjson-sink.d.ts.map +1 -0
- package/dist/frontends/slack-frontend.d.ts +58 -0
- package/dist/frontends/slack-frontend.d.ts.map +1 -0
- package/dist/generated/config-schema.d.ts +967 -57
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +1033 -56
- package/dist/github-check-service.d.ts +4 -6
- package/dist/github-check-service.d.ts.map +1 -1
- package/dist/github-comments.d.ts +2 -4
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134327 -99004
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/logger.d.ts +2 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/memory-store.d.ts +6 -0
- package/dist/memory-store.d.ts.map +1 -1
- package/dist/output/assistant-json/template.liquid +0 -0
- package/dist/output/traces/run-2026-01-20T19-22-58-043Z.ndjson +138 -0
- package/dist/output/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -0
- package/dist/output-formatters.d.ts +1 -1
- package/dist/output-formatters.d.ts.map +1 -1
- package/dist/providers/ai-check-provider.d.ts +12 -0
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/check-provider-registry.d.ts +6 -0
- package/dist/providers/check-provider-registry.d.ts.map +1 -1
- package/dist/providers/check-provider.interface.d.ts +43 -1
- package/dist/providers/check-provider.interface.d.ts.map +1 -1
- package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/custom-tool-executor.d.ts +61 -0
- package/dist/providers/custom-tool-executor.d.ts.map +1 -0
- package/dist/providers/git-checkout-provider.d.ts +25 -0
- package/dist/providers/git-checkout-provider.d.ts.map +1 -0
- package/dist/providers/github-ops-provider.d.ts.map +1 -1
- package/dist/providers/http-client-provider.d.ts +4 -4
- package/dist/providers/http-client-provider.d.ts.map +1 -1
- package/dist/providers/human-input-check-provider.d.ts +5 -0
- package/dist/providers/human-input-check-provider.d.ts.map +1 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/log-check-provider.d.ts +2 -5
- package/dist/providers/log-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-check-provider.d.ts +10 -4
- package/dist/providers/mcp-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-custom-sse-server.d.ts +66 -0
- package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -0
- package/dist/providers/memory-check-provider.d.ts +2 -8
- package/dist/providers/memory-check-provider.d.ts.map +1 -1
- package/dist/providers/script-check-provider.d.ts +25 -0
- package/dist/providers/script-check-provider.d.ts.map +1 -0
- package/dist/providers/workflow-check-provider.d.ts +56 -0
- package/dist/providers/workflow-check-provider.d.ts.map +1 -0
- package/dist/reviewer.d.ts +2 -1
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/sdk/check-provider-registry-534KL5HT.mjs +27 -0
- package/dist/sdk/chunk-23L3QRYX.mjs +16872 -0
- package/dist/sdk/chunk-23L3QRYX.mjs.map +1 -0
- package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-3OMWVM6J.mjs} +11 -1
- package/dist/sdk/chunk-3OMWVM6J.mjs.map +1 -0
- package/dist/sdk/chunk-7UK3NIIT.mjs +482 -0
- package/dist/sdk/chunk-7UK3NIIT.mjs.map +1 -0
- package/dist/sdk/chunk-AGIZJ4UZ.mjs +173 -0
- package/dist/sdk/chunk-AGIZJ4UZ.mjs.map +1 -0
- package/dist/sdk/chunk-AIVFBIS4.mjs +1371 -0
- package/dist/sdk/chunk-AIVFBIS4.mjs.map +1 -0
- package/dist/sdk/chunk-AK6BVWIT.mjs +426 -0
- package/dist/sdk/chunk-AK6BVWIT.mjs.map +1 -0
- package/dist/sdk/chunk-AUT26LHW.mjs +139 -0
- package/dist/sdk/chunk-AUT26LHW.mjs.map +1 -0
- package/dist/sdk/chunk-BOVFH3LI.mjs +232 -0
- package/dist/sdk/chunk-BOVFH3LI.mjs.map +1 -0
- package/dist/sdk/chunk-CNX7V5JK.mjs +89 -0
- package/dist/sdk/chunk-CNX7V5JK.mjs.map +1 -0
- package/dist/sdk/chunk-HTOKWMPO.mjs +157 -0
- package/dist/sdk/chunk-HTOKWMPO.mjs.map +1 -0
- package/dist/sdk/chunk-NAW3DB3I.mjs +197 -0
- package/dist/sdk/chunk-NAW3DB3I.mjs.map +1 -0
- package/dist/sdk/chunk-O5EZDNYL.mjs +274 -0
- package/dist/sdk/chunk-O5EZDNYL.mjs.map +1 -0
- package/dist/sdk/chunk-QR7MOMJH.mjs +558 -0
- package/dist/sdk/chunk-QR7MOMJH.mjs.map +1 -0
- package/dist/sdk/chunk-QY2XYPEV.mjs +3556 -0
- package/dist/sdk/chunk-QY2XYPEV.mjs.map +1 -0
- package/dist/sdk/chunk-S2RUE2RG.mjs +145 -0
- package/dist/sdk/chunk-S2RUE2RG.mjs.map +1 -0
- package/dist/sdk/chunk-SIWNBRTK.mjs +800 -0
- package/dist/sdk/chunk-SIWNBRTK.mjs.map +1 -0
- package/dist/sdk/chunk-YSN4G6CI.mjs +146 -0
- package/dist/sdk/chunk-YSN4G6CI.mjs.map +1 -0
- package/dist/sdk/chunk-ZYAUYXSW.mjs +206 -0
- package/dist/sdk/chunk-ZYAUYXSW.mjs.map +1 -0
- package/dist/sdk/command-executor-TYUV6HUS.mjs +14 -0
- package/dist/sdk/config-YNC2EOOT.mjs +16 -0
- package/dist/sdk/config-merger-PX3WIT57.mjs +10 -0
- package/dist/sdk/event-bus-5BEVPQ6T.mjs +35 -0
- package/dist/sdk/event-bus-5BEVPQ6T.mjs.map +1 -0
- package/dist/sdk/failure-condition-evaluator-YGTF2GHG.mjs +17 -0
- package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +458 -0
- package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +1 -0
- package/dist/sdk/github-frontend-SIAEOCON.mjs +1420 -0
- package/dist/sdk/github-frontend-SIAEOCON.mjs.map +1 -0
- package/dist/sdk/host-DXUYTNMU.mjs +52 -0
- package/dist/sdk/host-DXUYTNMU.mjs.map +1 -0
- package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-PKWCKK7E.mjs} +8 -2
- package/dist/sdk/memory-store-XGBB7LX7.mjs +12 -0
- package/dist/sdk/memory-store-XGBB7LX7.mjs.map +1 -0
- package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
- package/dist/sdk/metrics-7PP3EJUH.mjs.map +1 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
- package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
- package/dist/sdk/prompt-state-YRJY6QAL.mjs +16 -0
- package/dist/sdk/prompt-state-YRJY6QAL.mjs.map +1 -0
- package/dist/sdk/renderer-schema-LPKN5UJS.mjs +51 -0
- package/dist/sdk/renderer-schema-LPKN5UJS.mjs.map +1 -0
- package/dist/sdk/routing-6N45MJ4F.mjs +24 -0
- package/dist/sdk/routing-6N45MJ4F.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +541 -22
- package/dist/sdk/sdk.d.ts +541 -22
- package/dist/sdk/sdk.js +27963 -16505
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +1116 -2169
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/session-registry-4E6YRQ77.mjs +10 -0
- package/dist/sdk/session-registry-4E6YRQ77.mjs.map +1 -0
- package/dist/sdk/slack-frontend-BVKW3GD5.mjs +735 -0
- package/dist/sdk/slack-frontend-BVKW3GD5.mjs.map +1 -0
- package/dist/sdk/trace-helpers-VP6QYVBX.mjs +23 -0
- package/dist/sdk/trace-helpers-VP6QYVBX.mjs.map +1 -0
- package/dist/sdk/{tracer-init-WC75N5NW.mjs → tracer-init-GSLPPLCD.mjs} +2 -2
- package/dist/sdk/tracer-init-GSLPPLCD.mjs.map +1 -0
- package/dist/sdk/workflow-registry-R6KSACFR.mjs +12 -0
- package/dist/sdk/workflow-registry-R6KSACFR.mjs.map +1 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/slack/adapter.d.ts +36 -0
- package/dist/slack/adapter.d.ts.map +1 -0
- package/dist/slack/cache-prewarmer.d.ts +31 -0
- package/dist/slack/cache-prewarmer.d.ts.map +1 -0
- package/dist/slack/client.d.ts +77 -0
- package/dist/slack/client.d.ts.map +1 -0
- package/dist/slack/markdown.d.ts +45 -0
- package/dist/slack/markdown.d.ts.map +1 -0
- package/dist/slack/prompt-state.d.ts +33 -0
- package/dist/slack/prompt-state.d.ts.map +1 -0
- package/dist/slack/rate-limiter.d.ts +56 -0
- package/dist/slack/rate-limiter.d.ts.map +1 -0
- package/dist/slack/signature.d.ts +2 -0
- package/dist/slack/signature.d.ts.map +1 -0
- package/dist/slack/socket-runner.d.ts +42 -0
- package/dist/slack/socket-runner.d.ts.map +1 -0
- package/dist/slack/thread-cache.d.ts +51 -0
- package/dist/slack/thread-cache.d.ts.map +1 -0
- package/dist/snapshot-store.d.ts +59 -0
- package/dist/snapshot-store.d.ts.map +1 -0
- package/dist/state-machine/context/build-engine-context.d.ts +17 -0
- package/dist/state-machine/context/build-engine-context.d.ts.map +1 -0
- package/dist/state-machine/dispatch/dependency-gating.d.ts +12 -0
- package/dist/state-machine/dispatch/dependency-gating.d.ts.map +1 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts +14 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -0
- package/dist/state-machine/dispatch/foreach-processor.d.ts +8 -0
- package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -0
- package/dist/state-machine/dispatch/history-snapshot.d.ts +8 -0
- package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -0
- package/dist/state-machine/dispatch/on-init-handlers.d.ts +43 -0
- package/dist/state-machine/dispatch/on-init-handlers.d.ts.map +1 -0
- package/dist/state-machine/dispatch/renderer-schema.d.ts +8 -0
- package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -0
- package/dist/state-machine/dispatch/stats-manager.d.ts +15 -0
- package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -0
- package/dist/state-machine/dispatch/template-renderer.d.ts +7 -0
- package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -0
- package/dist/state-machine/execution/summary.d.ts +8 -0
- package/dist/state-machine/execution/summary.d.ts.map +1 -0
- package/dist/state-machine/runner.d.ts +79 -0
- package/dist/state-machine/runner.d.ts.map +1 -0
- package/dist/state-machine/states/check-running.d.ts +14 -0
- package/dist/state-machine/states/check-running.d.ts.map +1 -0
- package/dist/state-machine/states/completed.d.ts +12 -0
- package/dist/state-machine/states/completed.d.ts.map +1 -0
- package/dist/state-machine/states/error.d.ts +11 -0
- package/dist/state-machine/states/error.d.ts.map +1 -0
- package/dist/state-machine/states/init.d.ts +11 -0
- package/dist/state-machine/states/init.d.ts.map +1 -0
- package/dist/state-machine/states/level-dispatch.d.ts +17 -0
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -0
- package/dist/state-machine/states/plan-ready.d.ts +12 -0
- package/dist/state-machine/states/plan-ready.d.ts.map +1 -0
- package/dist/state-machine/states/routing.d.ts +52 -0
- package/dist/state-machine/states/routing.d.ts.map +1 -0
- package/dist/state-machine/states/wave-planning.d.ts +14 -0
- package/dist/state-machine/states/wave-planning.d.ts.map +1 -0
- package/dist/state-machine/workflow-projection.d.ts +47 -0
- package/dist/state-machine/workflow-projection.d.ts.map +1 -0
- package/dist/state-machine-execution-engine.d.ts +159 -0
- package/dist/state-machine-execution-engine.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -1
- package/dist/telemetry/state-capture.d.ts +5 -0
- package/dist/telemetry/state-capture.d.ts.map +1 -1
- package/dist/test-runner/assertions.d.ts +59 -0
- package/dist/test-runner/assertions.d.ts.map +1 -0
- package/dist/test-runner/core/environment.d.ts +8 -0
- package/dist/test-runner/core/environment.d.ts.map +1 -0
- package/dist/test-runner/core/fixture.d.ts +3 -0
- package/dist/test-runner/core/fixture.d.ts.map +1 -0
- package/dist/test-runner/core/flow-stage.d.ts +32 -0
- package/dist/test-runner/core/flow-stage.d.ts.map +1 -0
- package/dist/test-runner/core/mocks.d.ts +8 -0
- package/dist/test-runner/core/mocks.d.ts.map +1 -0
- package/dist/test-runner/core/test-execution-wrapper.d.ts +18 -0
- package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -0
- package/dist/test-runner/evaluators.d.ts +45 -0
- package/dist/test-runner/evaluators.d.ts.map +1 -0
- package/dist/test-runner/fixture-loader.d.ts +30 -0
- package/dist/test-runner/fixture-loader.d.ts.map +1 -0
- package/dist/test-runner/index.d.ts +127 -0
- package/dist/test-runner/index.d.ts.map +1 -0
- package/dist/test-runner/recorders/github-recorder.d.ts +23 -0
- package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -0
- package/dist/test-runner/recorders/global-recorder.d.ts +4 -0
- package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -0
- package/dist/test-runner/recorders/slack-recorder.d.ts +17 -0
- package/dist/test-runner/recorders/slack-recorder.d.ts.map +1 -0
- package/dist/test-runner/utils/selectors.d.ts +2 -0
- package/dist/test-runner/utils/selectors.d.ts.map +1 -0
- package/dist/test-runner/validator.d.ts +8 -0
- package/dist/test-runner/validator.d.ts.map +1 -0
- package/dist/traces/run-2026-01-20T19-22-58-043Z.ndjson +138 -0
- package/dist/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -0
- package/dist/types/bot.d.ts +109 -0
- package/dist/types/bot.d.ts.map +1 -0
- package/dist/types/cli.d.ts +8 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +459 -9
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts +177 -0
- package/dist/types/engine.d.ts.map +1 -0
- package/dist/types/execution.d.ts +73 -0
- package/dist/types/execution.d.ts.map +1 -0
- package/dist/types/git-checkout.d.ts +76 -0
- package/dist/types/git-checkout.d.ts.map +1 -0
- package/dist/types/github.d.ts +51 -0
- package/dist/types/github.d.ts.map +1 -0
- package/dist/types/workflow.d.ts +237 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/utils/command-executor.d.ts +43 -0
- package/dist/utils/command-executor.d.ts.map +1 -0
- package/dist/utils/comment-metadata.d.ts +21 -0
- package/dist/utils/comment-metadata.d.ts.map +1 -0
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-merger.d.ts.map +1 -1
- package/dist/utils/env-exposure.d.ts +3 -0
- package/dist/utils/env-exposure.d.ts.map +1 -0
- package/dist/utils/file-exclusion.d.ts.map +1 -1
- package/dist/utils/interactive-prompt.d.ts +1 -1
- package/dist/utils/interactive-prompt.d.ts.map +1 -1
- package/dist/utils/json-text-extractor.d.ts +17 -0
- package/dist/utils/json-text-extractor.d.ts.map +1 -0
- package/dist/utils/sandbox.d.ts +10 -0
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/script-memory-ops.d.ts +21 -0
- package/dist/utils/script-memory-ops.d.ts.map +1 -0
- package/dist/utils/template-context.d.ts +8 -0
- package/dist/utils/template-context.d.ts.map +1 -0
- package/dist/utils/tracer-init.d.ts.map +1 -1
- package/dist/utils/workspace-manager.d.ts +118 -0
- package/dist/utils/workspace-manager.d.ts.map +1 -0
- package/dist/utils/worktree-cleanup.d.ts +33 -0
- package/dist/utils/worktree-cleanup.d.ts.map +1 -0
- package/dist/utils/worktree-manager.d.ts +153 -0
- package/dist/utils/worktree-manager.d.ts.map +1 -0
- package/dist/webhook-server.d.ts +3 -3
- package/dist/webhook-server.d.ts.map +1 -1
- package/dist/workflow-executor.d.ts +81 -0
- package/dist/workflow-executor.d.ts.map +1 -0
- package/dist/workflow-registry.d.ts +79 -0
- package/dist/workflow-registry.d.ts.map +1 -0
- package/package.json +12 -5
- package/dist/output/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
- package/dist/sdk/check-execution-engine-2YYKUUSH.mjs +0 -11
- package/dist/sdk/check-execution-engine-6QJXYYON.mjs +0 -11
- package/dist/sdk/check-execution-engine-PJZ4ZOKG.mjs +0 -11
- package/dist/sdk/chunk-33QVZ2D4.mjs +0 -316
- package/dist/sdk/chunk-33QVZ2D4.mjs.map +0 -1
- package/dist/sdk/chunk-B5QBV2QJ.mjs +0 -752
- package/dist/sdk/chunk-B5QBV2QJ.mjs.map +0 -1
- package/dist/sdk/chunk-BVFNRCHT.mjs +0 -14129
- package/dist/sdk/chunk-BVFNRCHT.mjs.map +0 -1
- package/dist/sdk/chunk-KWZW23FG.mjs +0 -14129
- package/dist/sdk/chunk-KWZW23FG.mjs.map +0 -1
- package/dist/sdk/chunk-O4RP4BRH.mjs +0 -14092
- package/dist/sdk/chunk-O4RP4BRH.mjs.map +0 -1
- package/dist/sdk/chunk-TUTOLSFV.mjs.map +0 -1
- package/dist/sdk/chunk-U5D2LY66.mjs +0 -245
- package/dist/sdk/chunk-U5D2LY66.mjs.map +0 -1
- package/dist/sdk/chunk-U7X54EMV.mjs +0 -331
- package/dist/sdk/chunk-U7X54EMV.mjs.map +0 -1
- package/dist/sdk/config-merger-TWUBWFC2.mjs +0 -8
- package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs +0 -61
- package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs.map +0 -1
- package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs +0 -61
- package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs.map +0 -1
- package/dist/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
- /package/dist/sdk/{check-execution-engine-2YYKUUSH.mjs.map → check-provider-registry-534KL5HT.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → command-executor-TYUV6HUS.mjs.map} +0 -0
- /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → config-YNC2EOOT.mjs.map} +0 -0
- /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → failure-condition-evaluator-YGTF2GHG.mjs.map} +0 -0
- /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → liquid-extensions-PKWCKK7E.mjs.map} +0 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# 🔒 Security Analysis Report
|
|
2
|
+
|
|
3
|
+
{% if issues.size == 0 %}
|
|
4
|
+
## ✅ No Security Issues Found
|
|
5
|
+
|
|
6
|
+
Great job! This code review found no security vulnerabilities in the analyzed files.
|
|
7
|
+
|
|
8
|
+
{% else %}
|
|
9
|
+
|
|
10
|
+
## 📊 Security Summary
|
|
11
|
+
|
|
12
|
+
Found **{{ issues.size }}** security issue{% if issues.size > 1 %}s{% endif %} requiring attention:
|
|
13
|
+
|
|
14
|
+
{% assign critical_count = issues | where: "severity", "critical" | size %}
|
|
15
|
+
{% assign error_count = issues | where: "severity", "error" | size %}
|
|
16
|
+
{% assign warning_count = issues | where: "severity", "warning" | size %}
|
|
17
|
+
{% assign info_count = issues | where: "severity", "info" | size %}
|
|
18
|
+
|
|
19
|
+
| Severity | Count |
|
|
20
|
+
|----------|-------|
|
|
21
|
+
| 🔴 Critical | {{ critical_count }} |
|
|
22
|
+
| 🟠 Error | {{ error_count }} |
|
|
23
|
+
| 🟡 Warning | {{ warning_count }} |
|
|
24
|
+
| 🔵 Info | {{ info_count }} |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
{% if critical_count > 0 %}
|
|
29
|
+
## 🚨 Critical Security Issues
|
|
30
|
+
|
|
31
|
+
{% for issue in issues %}
|
|
32
|
+
{% if issue.severity == "critical" %}
|
|
33
|
+
### {{ issue.ruleId }}
|
|
34
|
+
**File**: `{{ issue.file }}:{{ issue.line }}`
|
|
35
|
+
|
|
36
|
+
{{ issue.message }}
|
|
37
|
+
|
|
38
|
+
{% if issue.suggestion %}
|
|
39
|
+
**💡 Recommended Fix**: {{ issue.suggestion }}
|
|
40
|
+
{% endif %}
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
{% endif %}
|
|
44
|
+
{% endfor %}
|
|
45
|
+
{% endif %}
|
|
46
|
+
|
|
47
|
+
{% if error_count > 0 %}
|
|
48
|
+
## ❌ Security Errors
|
|
49
|
+
|
|
50
|
+
{% for issue in issues %}
|
|
51
|
+
{% if issue.severity == "error" %}
|
|
52
|
+
### {{ issue.ruleId }}
|
|
53
|
+
**File**: `{{ issue.file }}:{{ issue.line }}`
|
|
54
|
+
|
|
55
|
+
{{ issue.message }}
|
|
56
|
+
|
|
57
|
+
{% if issue.suggestion %}
|
|
58
|
+
**💡 Recommended Fix**: {{ issue.suggestion }}
|
|
59
|
+
{% endif %}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
{% endif %}
|
|
63
|
+
{% endfor %}
|
|
64
|
+
{% endif %}
|
|
65
|
+
|
|
66
|
+
{% if warning_count > 0 %}
|
|
67
|
+
## ⚠️ Security Warnings
|
|
68
|
+
|
|
69
|
+
<details>
|
|
70
|
+
<summary>View {{ warning_count }} warning{% if warning_count > 1 %}s{% endif %}</summary>
|
|
71
|
+
|
|
72
|
+
{% for issue in issues %}
|
|
73
|
+
{% if issue.severity == "warning" %}
|
|
74
|
+
### {{ issue.ruleId }}
|
|
75
|
+
**File**: `{{ issue.file }}:{{ issue.line }}`
|
|
76
|
+
|
|
77
|
+
{{ issue.message }}
|
|
78
|
+
|
|
79
|
+
{% if issue.suggestion %}
|
|
80
|
+
**💡 Recommended Fix**: {{ issue.suggestion }}
|
|
81
|
+
{% endif %}
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
{% endif %}
|
|
85
|
+
{% endfor %}
|
|
86
|
+
|
|
87
|
+
</details>
|
|
88
|
+
{% endif %}
|
|
89
|
+
|
|
90
|
+
{% if info_count > 0 %}
|
|
91
|
+
## ℹ️ Security Information
|
|
92
|
+
|
|
93
|
+
<details>
|
|
94
|
+
<summary>View {{ info_count }} informational item{% if info_count > 1 %}s{% endif %}</summary>
|
|
95
|
+
|
|
96
|
+
{% for issue in issues %}
|
|
97
|
+
{% if issue.severity == "info" %}
|
|
98
|
+
### {{ issue.ruleId }}
|
|
99
|
+
**File**: `{{ issue.file }}:{{ issue.line }}`
|
|
100
|
+
|
|
101
|
+
{{ issue.message }}
|
|
102
|
+
|
|
103
|
+
{% if issue.suggestion %}
|
|
104
|
+
**💡 Suggested Improvement**: {{ issue.suggestion }}
|
|
105
|
+
{% endif %}
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
{% endif %}
|
|
109
|
+
{% endfor %}
|
|
110
|
+
|
|
111
|
+
</details>
|
|
112
|
+
{% endif %}
|
|
113
|
+
|
|
114
|
+
{% endif %}
|
|
115
|
+
|
|
116
|
+
## 🛡️ Security Best Practices
|
|
117
|
+
|
|
118
|
+
{% if suggestions.size > 0 %}
|
|
119
|
+
Based on this analysis, consider these recommendations:
|
|
120
|
+
|
|
121
|
+
{% for suggestion in suggestions %}
|
|
122
|
+
- {{ suggestion }}
|
|
123
|
+
{% endfor %}
|
|
124
|
+
{% endif %}
|
|
125
|
+
|
|
126
|
+
### General Security Reminders:
|
|
127
|
+
- Always validate and sanitize user input
|
|
128
|
+
- Use parameterized queries to prevent SQL injection
|
|
129
|
+
- Implement proper authentication and authorization
|
|
130
|
+
- Keep dependencies updated to patch known vulnerabilities
|
|
131
|
+
- Follow the principle of least privilege
|
|
132
|
+
- Use HTTPS for all data transmission
|
|
133
|
+
- Implement proper error handling without information disclosure
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
*🤖 Generated by Visor Security Analysis*
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
|
|
3
|
+
# Reusable Tool Library
|
|
4
|
+
# This file contains only tool definitions that can be imported by other configs
|
|
5
|
+
|
|
6
|
+
tools:
|
|
7
|
+
# Git tools
|
|
8
|
+
git-status:
|
|
9
|
+
name: git-status
|
|
10
|
+
description: Get git repository status
|
|
11
|
+
exec: 'git status --porcelain'
|
|
12
|
+
transform_js: |
|
|
13
|
+
const lines = output.trim().split('\n').filter(l => l);
|
|
14
|
+
return lines.map(line => {
|
|
15
|
+
const [status, ...pathParts] = line.trim().split(/\s+/);
|
|
16
|
+
return {
|
|
17
|
+
status: status,
|
|
18
|
+
file: pathParts.join(' ')
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
git-diff-stats:
|
|
23
|
+
name: git-diff-stats
|
|
24
|
+
description: Get statistics about changes
|
|
25
|
+
inputSchema:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
base:
|
|
29
|
+
type: string
|
|
30
|
+
description: Base branch to compare against
|
|
31
|
+
exec: 'git diff --stat {{ args.base }}..HEAD'
|
|
32
|
+
transform_js: |
|
|
33
|
+
const lines = output.trim().split('\n');
|
|
34
|
+
const summary = lines[lines.length - 1];
|
|
35
|
+
const match = summary.match(/(\d+) files? changed(?:, (\d+) insertions?)?(?:, (\d+) deletions?)?/);
|
|
36
|
+
return {
|
|
37
|
+
filesChanged: parseInt(match?.[1] || '0'),
|
|
38
|
+
insertions: parseInt(match?.[2] || '0'),
|
|
39
|
+
deletions: parseInt(match?.[3] || '0')
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
git-log-recent:
|
|
43
|
+
name: git-log-recent
|
|
44
|
+
description: Get recent commit messages
|
|
45
|
+
inputSchema:
|
|
46
|
+
type: object
|
|
47
|
+
properties:
|
|
48
|
+
count:
|
|
49
|
+
type: number
|
|
50
|
+
description: Number of commits to retrieve
|
|
51
|
+
exec: 'git log --oneline -n {{ args.count | default: 5 }}'
|
|
52
|
+
transform_js: |
|
|
53
|
+
const lines = output.trim().split('\n').filter(l => l);
|
|
54
|
+
return lines.map(line => {
|
|
55
|
+
const [hash, ...messageParts] = line.split(/\s+/);
|
|
56
|
+
return {
|
|
57
|
+
hash: hash,
|
|
58
|
+
message: messageParts.join(' ')
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
# Docker tools
|
|
63
|
+
docker-lint:
|
|
64
|
+
name: docker-lint
|
|
65
|
+
description: Lint Dockerfile for best practices
|
|
66
|
+
inputSchema:
|
|
67
|
+
type: object
|
|
68
|
+
properties:
|
|
69
|
+
file:
|
|
70
|
+
type: string
|
|
71
|
+
description: Dockerfile to lint
|
|
72
|
+
required: [file]
|
|
73
|
+
exec: 'hadolint {{ args.file }} --format json || echo "[]"'
|
|
74
|
+
parseJson: true
|
|
75
|
+
transform_js: |
|
|
76
|
+
// Convert hadolint output to issues
|
|
77
|
+
return output.map(issue => ({
|
|
78
|
+
file: args.file,
|
|
79
|
+
line: issue.line || 0,
|
|
80
|
+
message: issue.message,
|
|
81
|
+
severity: issue.level === 'error' ? 'error' : issue.level === 'warning' ? 'warning' : 'info',
|
|
82
|
+
category: 'style',
|
|
83
|
+
ruleId: issue.code || 'docker-lint'
|
|
84
|
+
}));
|
|
85
|
+
|
|
86
|
+
docker-scan:
|
|
87
|
+
name: docker-scan
|
|
88
|
+
description: Scan Docker image for vulnerabilities
|
|
89
|
+
inputSchema:
|
|
90
|
+
type: object
|
|
91
|
+
properties:
|
|
92
|
+
image:
|
|
93
|
+
type: string
|
|
94
|
+
description: Docker image to scan
|
|
95
|
+
required: [image]
|
|
96
|
+
exec: 'trivy image --format json --quiet {{ args.image }} || echo "{}"'
|
|
97
|
+
parseJson: true
|
|
98
|
+
timeout: 60000
|
|
99
|
+
transform_js: |
|
|
100
|
+
const vulnerabilities = [];
|
|
101
|
+
if (output.Results) {
|
|
102
|
+
for (const result of output.Results) {
|
|
103
|
+
if (result.Vulnerabilities) {
|
|
104
|
+
for (const vuln of result.Vulnerabilities) {
|
|
105
|
+
vulnerabilities.push({
|
|
106
|
+
file: result.Target || 'docker-image',
|
|
107
|
+
line: 0,
|
|
108
|
+
message: `${vuln.VulnerabilityID}: ${vuln.Title || vuln.Description}`,
|
|
109
|
+
severity: vuln.Severity?.toLowerCase() || 'info',
|
|
110
|
+
category: 'security',
|
|
111
|
+
ruleId: vuln.VulnerabilityID
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return vulnerabilities;
|
|
118
|
+
|
|
119
|
+
# Package management tools
|
|
120
|
+
npm-audit:
|
|
121
|
+
name: npm-audit
|
|
122
|
+
description: Run npm security audit
|
|
123
|
+
exec: 'npm audit --json || echo "{}"'
|
|
124
|
+
parseJson: true
|
|
125
|
+
transform_js: |
|
|
126
|
+
const issues = [];
|
|
127
|
+
if (output.vulnerabilities) {
|
|
128
|
+
for (const [pkg, vuln] of Object.entries(output.vulnerabilities)) {
|
|
129
|
+
issues.push({
|
|
130
|
+
file: 'package.json',
|
|
131
|
+
line: 0,
|
|
132
|
+
message: `${pkg}: ${vuln.severity} severity vulnerability`,
|
|
133
|
+
severity: vuln.severity === 'high' || vuln.severity === 'critical' ? 'error' : 'warning',
|
|
134
|
+
category: 'security',
|
|
135
|
+
ruleId: `npm-${vuln.severity}`
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return issues;
|
|
140
|
+
|
|
141
|
+
check-outdated:
|
|
142
|
+
name: check-outdated
|
|
143
|
+
description: Check for outdated dependencies
|
|
144
|
+
inputSchema:
|
|
145
|
+
type: object
|
|
146
|
+
properties:
|
|
147
|
+
manager:
|
|
148
|
+
type: string
|
|
149
|
+
enum: [npm, pip, go]
|
|
150
|
+
description: Package manager to use
|
|
151
|
+
exec: |
|
|
152
|
+
{% if args.manager == "npm" %}
|
|
153
|
+
npm outdated --json || echo "{}"
|
|
154
|
+
{% elsif args.manager == "pip" %}
|
|
155
|
+
pip list --outdated --format json || echo "[]"
|
|
156
|
+
{% elsif args.manager == "go" %}
|
|
157
|
+
go list -u -m -json all || echo "{}"
|
|
158
|
+
{% else %}
|
|
159
|
+
echo "{}"
|
|
160
|
+
{% endif %}
|
|
161
|
+
parseJson: true
|
|
162
|
+
transform_js: |
|
|
163
|
+
const outdated = [];
|
|
164
|
+
if (args.manager === 'npm' && typeof output === 'object') {
|
|
165
|
+
for (const [pkg, info] of Object.entries(output)) {
|
|
166
|
+
if (info.wanted !== info.current) {
|
|
167
|
+
outdated.push({
|
|
168
|
+
package: pkg,
|
|
169
|
+
current: info.current,
|
|
170
|
+
wanted: info.wanted,
|
|
171
|
+
latest: info.latest
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// Add handlers for pip and go...
|
|
177
|
+
return outdated;
|
|
178
|
+
|
|
179
|
+
# Testing tools
|
|
180
|
+
run-tests:
|
|
181
|
+
name: run-tests
|
|
182
|
+
description: Run test suite and parse results
|
|
183
|
+
inputSchema:
|
|
184
|
+
type: object
|
|
185
|
+
properties:
|
|
186
|
+
command:
|
|
187
|
+
type: string
|
|
188
|
+
description: Test command to run
|
|
189
|
+
format:
|
|
190
|
+
type: string
|
|
191
|
+
enum: [jest, pytest, go]
|
|
192
|
+
description: Test output format
|
|
193
|
+
required: [command]
|
|
194
|
+
exec: '{{ args.command }} 2>&1'
|
|
195
|
+
timeout: 300000
|
|
196
|
+
transform_js: |
|
|
197
|
+
// Parse test output based on format
|
|
198
|
+
const lines = output.split('\n');
|
|
199
|
+
let passed = 0, failed = 0, skipped = 0;
|
|
200
|
+
|
|
201
|
+
if (args.format === 'jest') {
|
|
202
|
+
const summary = lines.find(l => l.includes('Tests:'));
|
|
203
|
+
if (summary) {
|
|
204
|
+
const match = summary.match(/(\d+) passed/);
|
|
205
|
+
if (match) passed = parseInt(match[1]);
|
|
206
|
+
const failMatch = summary.match(/(\d+) failed/);
|
|
207
|
+
if (failMatch) failed = parseInt(failMatch[1]);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return {
|
|
212
|
+
passed: passed,
|
|
213
|
+
failed: failed,
|
|
214
|
+
skipped: skipped,
|
|
215
|
+
success: failed === 0
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
# Code quality tools
|
|
219
|
+
eslint-check:
|
|
220
|
+
name: eslint-check
|
|
221
|
+
description: Run ESLint on JavaScript/TypeScript files
|
|
222
|
+
inputSchema:
|
|
223
|
+
type: object
|
|
224
|
+
properties:
|
|
225
|
+
files:
|
|
226
|
+
type: array
|
|
227
|
+
items:
|
|
228
|
+
type: string
|
|
229
|
+
description: Files to lint
|
|
230
|
+
exec: 'npx eslint --format json {{ args.files | join: " " }} || echo "[]"'
|
|
231
|
+
parseJson: true
|
|
232
|
+
transform_js: |
|
|
233
|
+
const issues = [];
|
|
234
|
+
for (const file of output) {
|
|
235
|
+
for (const message of file.messages || []) {
|
|
236
|
+
issues.push({
|
|
237
|
+
file: file.filePath,
|
|
238
|
+
line: message.line || 0,
|
|
239
|
+
endLine: message.endLine,
|
|
240
|
+
column: message.column,
|
|
241
|
+
endColumn: message.endColumn,
|
|
242
|
+
message: message.message,
|
|
243
|
+
severity: message.severity === 2 ? 'error' : 'warning',
|
|
244
|
+
category: 'style',
|
|
245
|
+
ruleId: message.ruleId || 'eslint'
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return issues;
|
|
250
|
+
|
|
251
|
+
prettier-check:
|
|
252
|
+
name: prettier-check
|
|
253
|
+
description: Check code formatting with Prettier
|
|
254
|
+
inputSchema:
|
|
255
|
+
type: object
|
|
256
|
+
properties:
|
|
257
|
+
files:
|
|
258
|
+
type: array
|
|
259
|
+
items:
|
|
260
|
+
type: string
|
|
261
|
+
description: Files to check
|
|
262
|
+
exec: 'npx prettier --check {{ args.files | join: " " }} 2>&1'
|
|
263
|
+
transform_js: |
|
|
264
|
+
const unformatted = [];
|
|
265
|
+
const lines = output.split('\n');
|
|
266
|
+
for (const line of lines) {
|
|
267
|
+
if (line.includes('[warn]') && line.includes('Code style issues found')) {
|
|
268
|
+
const match = line.match(/in (.+?)$/);
|
|
269
|
+
if (match) {
|
|
270
|
+
unformatted.push({
|
|
271
|
+
file: match[1],
|
|
272
|
+
line: 0,
|
|
273
|
+
message: 'File needs formatting',
|
|
274
|
+
severity: 'warning',
|
|
275
|
+
category: 'style',
|
|
276
|
+
ruleId: 'prettier'
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return unformatted;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
# Example demonstrating the transform feature in Visor checks
|
|
3
|
+
# Transform allows you to reshape command output using Liquid templates
|
|
4
|
+
|
|
5
|
+
steps:
|
|
6
|
+
# Example 1: Extract specific key from JSON output
|
|
7
|
+
get-package-version:
|
|
8
|
+
type: command
|
|
9
|
+
exec: "cat package.json"
|
|
10
|
+
transform: |
|
|
11
|
+
{{ output.version }}
|
|
12
|
+
group: info
|
|
13
|
+
|
|
14
|
+
# Example 2: Extract array from nested object
|
|
15
|
+
get-dependencies:
|
|
16
|
+
type: command
|
|
17
|
+
exec: "cat package.json"
|
|
18
|
+
transform: |
|
|
19
|
+
{{ output.dependencies | json }}
|
|
20
|
+
forEach: true # Now each dependency can be processed individually
|
|
21
|
+
group: dependencies
|
|
22
|
+
|
|
23
|
+
# Example 3: Transform object to array of specific fields
|
|
24
|
+
list-dependency-names:
|
|
25
|
+
type: command
|
|
26
|
+
exec: "cat package.json"
|
|
27
|
+
transform: |
|
|
28
|
+
[
|
|
29
|
+
{% for dep in output.dependencies %}
|
|
30
|
+
"{{ dep[0] }}"{% unless forloop.last %},{% endunless %}
|
|
31
|
+
{% endfor %}
|
|
32
|
+
]
|
|
33
|
+
forEach: true
|
|
34
|
+
group: dependencies
|
|
35
|
+
|
|
36
|
+
# Example 4: Extract and reshape complex data
|
|
37
|
+
analyze-git-log:
|
|
38
|
+
type: command
|
|
39
|
+
exec: |
|
|
40
|
+
git log --format='{"hash":"%H","author":"%an","date":"%ad","message":"%s"}' -n 5 | jq -s '.'
|
|
41
|
+
transform: |
|
|
42
|
+
[
|
|
43
|
+
{% for commit in output %}
|
|
44
|
+
{
|
|
45
|
+
"id": {{ commit.hash | slice: 0, 7 | json }},
|
|
46
|
+
"author": {{ commit.author | json }},
|
|
47
|
+
"summary": {{ commit.message | truncate: 50 | json }}
|
|
48
|
+
}{% unless forloop.last %},{% endunless %}
|
|
49
|
+
{% endfor %}
|
|
50
|
+
]
|
|
51
|
+
group: git-analysis
|
|
52
|
+
|
|
53
|
+
# Example 5: Filter array based on condition
|
|
54
|
+
get-large-files:
|
|
55
|
+
type: command
|
|
56
|
+
exec: |
|
|
57
|
+
find . -type f -name "*.js" -exec wc -l {} + | awk '{print "{\"file\":\"" $2 "\",\"lines\":" $1 "}"}' | jq -s '.'
|
|
58
|
+
transform: |
|
|
59
|
+
[
|
|
60
|
+
{% for file in output %}
|
|
61
|
+
{% if file.lines > 100 %}
|
|
62
|
+
{{ file.file | json }}
|
|
63
|
+
{% endif %}
|
|
64
|
+
{% endfor %}
|
|
65
|
+
]
|
|
66
|
+
forEach: true # Process each large file
|
|
67
|
+
group: analysis
|
|
68
|
+
|
|
69
|
+
# Example 6: Combine with forEach - extract array then process each
|
|
70
|
+
get-test-files:
|
|
71
|
+
type: command
|
|
72
|
+
exec: |
|
|
73
|
+
find . -name "*.test.js" -o -name "*.spec.js" | head -10
|
|
74
|
+
transform: |
|
|
75
|
+
{{ output | split: "\n" | json }}
|
|
76
|
+
forEach: true
|
|
77
|
+
group: testing
|
|
78
|
+
|
|
79
|
+
run-each-test:
|
|
80
|
+
type: command
|
|
81
|
+
exec: |
|
|
82
|
+
echo "Running test: {{ outputs.get-test-files }}"
|
|
83
|
+
# npm test {{ outputs.get-test-files }}
|
|
84
|
+
depends_on: [get-test-files]
|
|
85
|
+
group: testing
|
|
86
|
+
|
|
87
|
+
# Example 7: Extract nested array from API response
|
|
88
|
+
fetch-pr-comments:
|
|
89
|
+
type: http_client
|
|
90
|
+
url: "https://api.github.com/repos/{{ pr.repo }}/pulls/{{ pr.number }}/comments"
|
|
91
|
+
transform: |
|
|
92
|
+
[
|
|
93
|
+
{% for comment in output %}
|
|
94
|
+
{
|
|
95
|
+
"author": {{ comment.user.login | json }},
|
|
96
|
+
"body": {{ comment.body | truncate: 100 | json }},
|
|
97
|
+
"file": {{ comment.path | json }},
|
|
98
|
+
"line": {{ comment.line }}
|
|
99
|
+
}{% unless forloop.last %},{% endunless %}
|
|
100
|
+
{% endfor %}
|
|
101
|
+
]
|
|
102
|
+
group: review
|
|
103
|
+
|
|
104
|
+
# Example 8: Create array from string output using filters
|
|
105
|
+
parse-csv-output:
|
|
106
|
+
type: command
|
|
107
|
+
exec: |
|
|
108
|
+
echo "file1.js,100,modified
|
|
109
|
+
file2.py,200,added
|
|
110
|
+
file3.ts,50,deleted"
|
|
111
|
+
transform: |
|
|
112
|
+
{% assign lines = output | split: "\n" %}
|
|
113
|
+
[
|
|
114
|
+
{% for line in lines %}
|
|
115
|
+
{% assign parts = line | split: "," %}
|
|
116
|
+
{% if parts.size == 3 %}
|
|
117
|
+
{
|
|
118
|
+
"file": {{ parts[0] | json }},
|
|
119
|
+
"lines": {{ parts[1] }},
|
|
120
|
+
"status": {{ parts[2] | json }}
|
|
121
|
+
}{% unless forloop.last %},{% endunless %}
|
|
122
|
+
{% endif %}
|
|
123
|
+
{% endfor %}
|
|
124
|
+
]
|
|
125
|
+
group: parsing
|
|
126
|
+
|
|
127
|
+
# Example 9: Complex transformation with calculations
|
|
128
|
+
aggregate-metrics:
|
|
129
|
+
type: command
|
|
130
|
+
exec: |
|
|
131
|
+
echo '[{"name":"moduleA","size":1000,"complexity":5},
|
|
132
|
+
{"name":"moduleB","size":2000,"complexity":8},
|
|
133
|
+
{"name":"moduleC","size":500,"complexity":2}]'
|
|
134
|
+
transform: |
|
|
135
|
+
{% assign total_size = 0 %}
|
|
136
|
+
{% assign total_complexity = 0 %}
|
|
137
|
+
{% for module in output %}
|
|
138
|
+
{% assign total_size = total_size | plus: module.size %}
|
|
139
|
+
{% assign total_complexity = total_complexity | plus: module.complexity %}
|
|
140
|
+
{% endfor %}
|
|
141
|
+
{
|
|
142
|
+
"modules": {{ output | size }},
|
|
143
|
+
"totalSize": {{ total_size }},
|
|
144
|
+
"totalComplexity": {{ total_complexity }},
|
|
145
|
+
"averageSize": {{ total_size | divided_by: output.size }},
|
|
146
|
+
"averageComplexity": {{ total_complexity | divided_by: output.size }},
|
|
147
|
+
"details": {{ output | json }}
|
|
148
|
+
}
|
|
149
|
+
group: metrics
|
|
150
|
+
|
|
151
|
+
# Example 10: Extract specific array from complex nested structure
|
|
152
|
+
get-security-issues:
|
|
153
|
+
type: command
|
|
154
|
+
exec: |
|
|
155
|
+
# Simulating a security scan output
|
|
156
|
+
echo '{
|
|
157
|
+
"scan_date": "2024-01-01",
|
|
158
|
+
"results": {
|
|
159
|
+
"vulnerabilities": [
|
|
160
|
+
{"severity": "high", "file": "auth.js", "line": 42, "issue": "SQL Injection"},
|
|
161
|
+
{"severity": "medium", "file": "config.js", "line": 10, "issue": "Hardcoded Secret"},
|
|
162
|
+
{"severity": "low", "file": "utils.js", "line": 100, "issue": "Weak Random"}
|
|
163
|
+
],
|
|
164
|
+
"summary": {"total": 3, "high": 1, "medium": 1, "low": 1}
|
|
165
|
+
}
|
|
166
|
+
}'
|
|
167
|
+
transform: |
|
|
168
|
+
{{ output.results.vulnerabilities | json }}
|
|
169
|
+
forEach: true # Each vulnerability will be processed separately
|
|
170
|
+
group: security
|
|
171
|
+
|
|
172
|
+
process-each-vulnerability:
|
|
173
|
+
type: ai
|
|
174
|
+
prompt: |
|
|
175
|
+
Analyze this security issue and provide remediation:
|
|
176
|
+
{{ outputs.get-security-issues | json }}
|
|
177
|
+
|
|
178
|
+
Provide specific code fix suggestions.
|
|
179
|
+
depends_on: [get-security-issues]
|
|
180
|
+
group: security
|
|
181
|
+
|
|
182
|
+
# How transform works:
|
|
183
|
+
# 1. The command output is captured in the 'output' variable
|
|
184
|
+
# 2. The transform Liquid template has access to:
|
|
185
|
+
# - output: The raw command output (parsed as JSON if possible)
|
|
186
|
+
# - pr: Pull request context
|
|
187
|
+
# - files: Changed files
|
|
188
|
+
# - env: Environment variables
|
|
189
|
+
# - outputs: Results from dependency checks
|
|
190
|
+
# 3. The transform template is rendered and the result replaces the original output
|
|
191
|
+
# 4. If the transformed result looks like JSON, it's parsed; otherwise kept as string
|
|
192
|
+
# 5. The final output is available to dependent checks via outputs.<check-name>
|
|
193
|
+
#
|
|
194
|
+
# Common patterns:
|
|
195
|
+
# - Extract field: {{ output.fieldName }}
|
|
196
|
+
# - Extract nested: {{ output.parent.child.field }}
|
|
197
|
+
# - Convert to JSON: {{ output | json }}
|
|
198
|
+
# - Filter array: {% for item in output %}{% if condition %}...{% endif %}{% endfor %}
|
|
199
|
+
# - Create new structure: { "key": {{ output.value | json }} }
|