@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,557 @@
|
|
|
1
|
+
# MCP Provider
|
|
2
|
+
|
|
3
|
+
The MCP (Model Context Protocol) provider allows you to call MCP tools directly from Visor checks without requiring an AI provider. This is useful for integrating external tools, services, or custom logic into your review workflows.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Unlike the AI provider's MCP support (which enhances AI models with additional tools), the standalone MCP provider directly invokes MCP tools and returns their results. This enables you to:
|
|
8
|
+
|
|
9
|
+
- Call external APIs and services via MCP tools
|
|
10
|
+
- Execute custom analysis tools
|
|
11
|
+
- Integrate third-party MCP servers
|
|
12
|
+
- Chain MCP tool outputs with other checks using dependencies
|
|
13
|
+
|
|
14
|
+
## Transport Types
|
|
15
|
+
|
|
16
|
+
The MCP provider supports three transport mechanisms:
|
|
17
|
+
|
|
18
|
+
### 1. stdio (default)
|
|
19
|
+
|
|
20
|
+
Execute a local command that implements the MCP protocol over standard input/output.
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
steps:
|
|
24
|
+
probe-analysis:
|
|
25
|
+
type: mcp
|
|
26
|
+
transport: stdio
|
|
27
|
+
command: npx
|
|
28
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
29
|
+
method: search_code
|
|
30
|
+
methodArgs:
|
|
31
|
+
query: "TODO"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Configuration:**
|
|
35
|
+
- `command` (required): Command to execute
|
|
36
|
+
- `args` (optional): Array of command arguments
|
|
37
|
+
- `env` (optional): Environment variables
|
|
38
|
+
- `workingDirectory` (optional): Working directory for the command
|
|
39
|
+
|
|
40
|
+
**Security:** Commands are validated to prevent shell injection. Metacharacters like `;`, `|`, `&`, `` ` ``, `$`, `()`, `{}`, `[]` are rejected.
|
|
41
|
+
|
|
42
|
+
### 2. SSE (Server-Sent Events)
|
|
43
|
+
|
|
44
|
+
Connect to an MCP server via SSE (legacy transport).
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
steps:
|
|
48
|
+
remote-analysis:
|
|
49
|
+
type: mcp
|
|
50
|
+
transport: sse
|
|
51
|
+
url: https://mcp-server.example.com/sse
|
|
52
|
+
headers:
|
|
53
|
+
Authorization: "Bearer ${MCP_TOKEN}"
|
|
54
|
+
method: analyze
|
|
55
|
+
methodArgs:
|
|
56
|
+
file: "{{ pr.files[0].filename }}"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Configuration:**
|
|
60
|
+
- `url` (required): SSE endpoint URL
|
|
61
|
+
- `headers` (optional): HTTP headers for authentication
|
|
62
|
+
|
|
63
|
+
### 3. HTTP (Streamable HTTP)
|
|
64
|
+
|
|
65
|
+
Connect to an MCP server via modern Streamable HTTP transport.
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
steps:
|
|
69
|
+
http-tool:
|
|
70
|
+
type: mcp
|
|
71
|
+
transport: http
|
|
72
|
+
url: https://mcp-server.example.com/mcp
|
|
73
|
+
sessionId: "my-session-123" # Optional, server may generate one
|
|
74
|
+
headers:
|
|
75
|
+
Authorization: "Bearer ${MCP_TOKEN}"
|
|
76
|
+
method: process
|
|
77
|
+
methodArgs:
|
|
78
|
+
data: "{{ pr.title }}"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Configuration:**
|
|
82
|
+
- `url` (required): HTTP endpoint URL
|
|
83
|
+
- `sessionId` (optional): Session ID for stateful interactions
|
|
84
|
+
- `headers` (optional): HTTP headers
|
|
85
|
+
|
|
86
|
+
**Note:** HTTP transport supports stateful sessions. The server may generate a session ID if not provided.
|
|
87
|
+
|
|
88
|
+
## Method Arguments
|
|
89
|
+
|
|
90
|
+
### Static Arguments
|
|
91
|
+
|
|
92
|
+
Provide method arguments directly:
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
steps:
|
|
96
|
+
search-todos:
|
|
97
|
+
type: mcp
|
|
98
|
+
command: npx
|
|
99
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
100
|
+
method: search_code
|
|
101
|
+
methodArgs:
|
|
102
|
+
query: "TODO"
|
|
103
|
+
limit: 10
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Templated Arguments with Liquid
|
|
107
|
+
|
|
108
|
+
Use Liquid templates to build arguments from PR context:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
steps:
|
|
112
|
+
dynamic-search:
|
|
113
|
+
type: mcp
|
|
114
|
+
command: npx
|
|
115
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
116
|
+
method: search_code
|
|
117
|
+
argsTransform: |
|
|
118
|
+
{
|
|
119
|
+
"query": "{{ pr.title | split: ' ' | first }}",
|
|
120
|
+
"files": [{% for file in pr.files %}"{{ file.filename }}"{% unless forloop.last %},{% endunless %}{% endfor %}]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Template Context:**
|
|
125
|
+
- `pr` - PR metadata (number, title, author, branch, base)
|
|
126
|
+
- `files` - Array of changed files
|
|
127
|
+
- `fileCount` - Number of changed files
|
|
128
|
+
- `outputs` - Results from dependent checks (see Dependencies)
|
|
129
|
+
- `env` - Safe environment variables (CI_*, GITHUB_*, etc.)
|
|
130
|
+
|
|
131
|
+
## Output Transformation
|
|
132
|
+
|
|
133
|
+
### Liquid Transform
|
|
134
|
+
|
|
135
|
+
Transform MCP output using Liquid templates:
|
|
136
|
+
|
|
137
|
+
```yaml
|
|
138
|
+
steps:
|
|
139
|
+
format-results:
|
|
140
|
+
type: mcp
|
|
141
|
+
command: npx
|
|
142
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
143
|
+
method: search_code
|
|
144
|
+
methodArgs:
|
|
145
|
+
query: "FIXME"
|
|
146
|
+
transform: |
|
|
147
|
+
{
|
|
148
|
+
"count": {{ output.results | size }},
|
|
149
|
+
"files": [{% for result in output.results %}"{{ result.file }}"{% unless forloop.last %},{% endunless %}{% endfor %}]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Transform Context:**
|
|
154
|
+
- `output` - MCP method result
|
|
155
|
+
- All context from `argsTransform` (pr, files, outputs, env)
|
|
156
|
+
|
|
157
|
+
### JavaScript Transform
|
|
158
|
+
|
|
159
|
+
Apply JavaScript transformations in a secure sandbox:
|
|
160
|
+
|
|
161
|
+
```yaml
|
|
162
|
+
steps:
|
|
163
|
+
js-transform:
|
|
164
|
+
type: mcp
|
|
165
|
+
command: npx
|
|
166
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
167
|
+
method: search_code
|
|
168
|
+
methodArgs:
|
|
169
|
+
query: "TODO"
|
|
170
|
+
transform_js: |
|
|
171
|
+
// Filter and map results
|
|
172
|
+
output.results
|
|
173
|
+
.filter(r => r.severity === 'high')
|
|
174
|
+
.map(r => ({
|
|
175
|
+
file: r.file,
|
|
176
|
+
message: `TODO found: ${r.text}`
|
|
177
|
+
}))
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Available in sandbox:**
|
|
181
|
+
- Standard JavaScript: `Array`, `String`, `Object`, `Math`, `JSON`
|
|
182
|
+
- Context variables: `output`, `pr`, `files`, `outputs`, `env`
|
|
183
|
+
- Safe methods only (no `eval`, `Function`, `require`, etc.)
|
|
184
|
+
|
|
185
|
+
**Note:** Both transforms can be used together. Liquid runs first, then JavaScript.
|
|
186
|
+
|
|
187
|
+
## Issue Extraction
|
|
188
|
+
|
|
189
|
+
The MCP provider automatically extracts issues from output in several formats:
|
|
190
|
+
|
|
191
|
+
### Array of Issues
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
[
|
|
195
|
+
{
|
|
196
|
+
"file": "src/index.ts",
|
|
197
|
+
"line": 42,
|
|
198
|
+
"message": "Security vulnerability detected",
|
|
199
|
+
"severity": "error",
|
|
200
|
+
"category": "security"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Object with Issues Property
|
|
206
|
+
|
|
207
|
+
```json
|
|
208
|
+
{
|
|
209
|
+
"issues": [...],
|
|
210
|
+
"metadata": { "scanned": 15 }
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
The `issues` array is extracted and remaining properties are preserved in `output`.
|
|
215
|
+
|
|
216
|
+
### Single Issue Object
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"file": "src/app.ts",
|
|
221
|
+
"line": 10,
|
|
222
|
+
"message": "Performance issue",
|
|
223
|
+
"severity": "warning"
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Supported Issue Fields:**
|
|
228
|
+
- `message` (required): Issue description (aliases: `text`, `description`, `summary`)
|
|
229
|
+
- `file`: File path (aliases: `path`, `filename`, defaults to "system")
|
|
230
|
+
- `line`: Line number (aliases: `startLine`, `lineNumber`, defaults to 0)
|
|
231
|
+
- `endLine`: End line number (aliases: `end_line`, `stopLine`)
|
|
232
|
+
- `severity`: info/warning/error/critical (aliases: `level`, `priority`, defaults to "warning")
|
|
233
|
+
- `category`: security/performance/style/logic/documentation (aliases: `type`, `group`, defaults to "logic")
|
|
234
|
+
- `ruleId`: Rule identifier (aliases: `rule`, `id`, `check`, defaults to "mcp")
|
|
235
|
+
- `suggestion`: Suggested fix
|
|
236
|
+
- `replacement`: Replacement code
|
|
237
|
+
|
|
238
|
+
## Dependencies
|
|
239
|
+
|
|
240
|
+
Use outputs from other checks in MCP arguments:
|
|
241
|
+
|
|
242
|
+
```yaml
|
|
243
|
+
steps:
|
|
244
|
+
fetch-data:
|
|
245
|
+
type: http_client
|
|
246
|
+
url: https://api.example.com/issues
|
|
247
|
+
|
|
248
|
+
analyze-issues:
|
|
249
|
+
type: mcp
|
|
250
|
+
depends_on: [fetch-data]
|
|
251
|
+
command: npx
|
|
252
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
253
|
+
method: analyze
|
|
254
|
+
argsTransform: |
|
|
255
|
+
{
|
|
256
|
+
"issues": {{ outputs["fetch-data"] | json }}
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Outputs are available as:
|
|
261
|
+
- `outputs["check-name"]` - Full result object or `output` property if present
|
|
262
|
+
- Safe to use in both `argsTransform` and `transform`
|
|
263
|
+
|
|
264
|
+
## Configuration Reference
|
|
265
|
+
|
|
266
|
+
### Required Fields
|
|
267
|
+
|
|
268
|
+
- `type: mcp` - Provider type
|
|
269
|
+
- `method` - MCP tool/method name to call
|
|
270
|
+
|
|
271
|
+
### Transport Configuration
|
|
272
|
+
|
|
273
|
+
**stdio transport:**
|
|
274
|
+
- `transport: stdio` (optional, default)
|
|
275
|
+
- `command` - Command to execute
|
|
276
|
+
- `args` - Command arguments (optional)
|
|
277
|
+
- `env` - Environment variables (optional)
|
|
278
|
+
- `workingDirectory` - Working directory (optional)
|
|
279
|
+
|
|
280
|
+
**sse transport:**
|
|
281
|
+
- `transport: sse`
|
|
282
|
+
- `url` - SSE endpoint URL
|
|
283
|
+
- `headers` - HTTP headers (optional)
|
|
284
|
+
|
|
285
|
+
**http transport:**
|
|
286
|
+
- `transport: http`
|
|
287
|
+
- `url` - HTTP endpoint URL
|
|
288
|
+
- `sessionId` - Session ID (optional)
|
|
289
|
+
- `headers` - HTTP headers (optional)
|
|
290
|
+
|
|
291
|
+
### Method Configuration
|
|
292
|
+
|
|
293
|
+
- `methodArgs` - Static method arguments (optional)
|
|
294
|
+
- `argsTransform` - Liquid template for dynamic arguments (optional)
|
|
295
|
+
- `transform` - Liquid template for output transformation (optional)
|
|
296
|
+
- `transform_js` - JavaScript expression for output transformation (optional)
|
|
297
|
+
|
|
298
|
+
### General
|
|
299
|
+
|
|
300
|
+
- `timeout` - Timeout in seconds (default: 60)
|
|
301
|
+
- `depends_on` - Array of check names this depends on
|
|
302
|
+
- `if` - Conditional execution (JavaScript expression)
|
|
303
|
+
- `on` - Event filter (pr_opened, pr_updated, etc.)
|
|
304
|
+
- `tags` - Array of tags for filtering
|
|
305
|
+
- `group` - Comment group name
|
|
306
|
+
|
|
307
|
+
## Real-World Examples
|
|
308
|
+
|
|
309
|
+
See [examples/mcp-provider-example.yaml](../examples/mcp-provider-example.yaml) for comprehensive production-ready workflows.
|
|
310
|
+
|
|
311
|
+
### Security Scanning with Semgrep
|
|
312
|
+
|
|
313
|
+
Detect vulnerabilities in changed code:
|
|
314
|
+
|
|
315
|
+
```yaml
|
|
316
|
+
steps:
|
|
317
|
+
semgrep-scan:
|
|
318
|
+
type: mcp
|
|
319
|
+
command: npx
|
|
320
|
+
args: ["-y", "@semgrep/mcp"]
|
|
321
|
+
method: scan
|
|
322
|
+
methodArgs:
|
|
323
|
+
paths: "{{ files | map: 'filename' | json }}"
|
|
324
|
+
rules: ["security", "owasp-top-10"]
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### GitHub Issue Detection
|
|
328
|
+
|
|
329
|
+
Find related or duplicate issues:
|
|
330
|
+
|
|
331
|
+
```yaml
|
|
332
|
+
steps:
|
|
333
|
+
check-duplicates:
|
|
334
|
+
type: mcp
|
|
335
|
+
command: npx
|
|
336
|
+
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
337
|
+
method: search_issues
|
|
338
|
+
methodArgs:
|
|
339
|
+
query: "{{ pr.title }}"
|
|
340
|
+
state: "open"
|
|
341
|
+
transform_js: |
|
|
342
|
+
output.items
|
|
343
|
+
.filter(issue => issue.number !== pr.number)
|
|
344
|
+
.map(issue => ({
|
|
345
|
+
file: 'github',
|
|
346
|
+
line: 0,
|
|
347
|
+
message: `Related: #${issue.number} - ${issue.title}`,
|
|
348
|
+
severity: 'info',
|
|
349
|
+
category: 'documentation'
|
|
350
|
+
}))
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Database Schema Validation
|
|
354
|
+
|
|
355
|
+
Verify migrations don't break schema:
|
|
356
|
+
|
|
357
|
+
```yaml
|
|
358
|
+
steps:
|
|
359
|
+
validate-schema:
|
|
360
|
+
type: mcp
|
|
361
|
+
command: npx
|
|
362
|
+
args: ["-y", "@modelcontextprotocol/server-postgres"]
|
|
363
|
+
if: "files.some(f => f.filename.includes('migrations/'))"
|
|
364
|
+
method: query
|
|
365
|
+
methodArgs:
|
|
366
|
+
query: "SELECT * FROM information_schema.tables WHERE table_schema = 'public'"
|
|
367
|
+
transform_js: |
|
|
368
|
+
const criticalTables = ['users', 'sessions', 'payments'];
|
|
369
|
+
const existing = output.rows.map(r => r.table_name);
|
|
370
|
+
const missing = criticalTables.filter(t => !existing.includes(t));
|
|
371
|
+
|
|
372
|
+
return missing.map(table => ({
|
|
373
|
+
file: 'database',
|
|
374
|
+
line: 0,
|
|
375
|
+
message: `Critical table '${table}' missing after migration`,
|
|
376
|
+
severity: 'error',
|
|
377
|
+
category: 'logic'
|
|
378
|
+
}));
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Jira Ticket Validation
|
|
382
|
+
|
|
383
|
+
Ensure PR links to valid Jira ticket:
|
|
384
|
+
|
|
385
|
+
```yaml
|
|
386
|
+
steps:
|
|
387
|
+
jira-check:
|
|
388
|
+
type: mcp
|
|
389
|
+
command: npx
|
|
390
|
+
args: ["-y", "@atlassian/mcp-server-jira"]
|
|
391
|
+
method: get_issue
|
|
392
|
+
argsTransform: |
|
|
393
|
+
{
|
|
394
|
+
"issueKey": "{{ pr.title | split: ' ' | first | upcase }}"
|
|
395
|
+
}
|
|
396
|
+
transform_js: |
|
|
397
|
+
if (output.error || !output.fields) {
|
|
398
|
+
return [{
|
|
399
|
+
file: 'jira',
|
|
400
|
+
line: 0,
|
|
401
|
+
message: 'PR must reference valid Jira ticket (e.g., PROJ-123)',
|
|
402
|
+
severity: 'error',
|
|
403
|
+
category: 'documentation'
|
|
404
|
+
}];
|
|
405
|
+
}
|
|
406
|
+
return [];
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Slack Notifications
|
|
410
|
+
|
|
411
|
+
Alert team when critical issues found:
|
|
412
|
+
|
|
413
|
+
```yaml
|
|
414
|
+
steps:
|
|
415
|
+
notify-security:
|
|
416
|
+
type: mcp
|
|
417
|
+
depends_on: [semgrep-scan]
|
|
418
|
+
command: npx
|
|
419
|
+
args: ["-y", "@modelcontextprotocol/server-slack"]
|
|
420
|
+
if: "outputs['semgrep-scan']?.issues?.filter(i => i.severity === 'error').length > 0"
|
|
421
|
+
method: post_message
|
|
422
|
+
argsTransform: |
|
|
423
|
+
{
|
|
424
|
+
"channel": "#security-alerts",
|
|
425
|
+
"text": "🚨 PR #{{ pr.number }} has critical security issues"
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### License Header Validation
|
|
430
|
+
|
|
431
|
+
Check all source files have license headers:
|
|
432
|
+
|
|
433
|
+
```yaml
|
|
434
|
+
steps:
|
|
435
|
+
check-licenses:
|
|
436
|
+
type: mcp
|
|
437
|
+
command: npx
|
|
438
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"]
|
|
439
|
+
method: read_file
|
|
440
|
+
forEach:
|
|
441
|
+
items: "{{ files | map: 'filename' | json }}"
|
|
442
|
+
itemVar: filepath
|
|
443
|
+
methodArgs:
|
|
444
|
+
path: "{{ filepath }}"
|
|
445
|
+
transform_js: |
|
|
446
|
+
const content = output.content || '';
|
|
447
|
+
const hasLicense = content.includes('Copyright') || content.includes('SPDX-License');
|
|
448
|
+
|
|
449
|
+
if (!hasLicense && filepath.match(/\.(ts|js|py|go)$/)) {
|
|
450
|
+
return [{
|
|
451
|
+
file: filepath,
|
|
452
|
+
line: 1,
|
|
453
|
+
message: 'Missing license header',
|
|
454
|
+
severity: 'warning',
|
|
455
|
+
category: 'documentation',
|
|
456
|
+
suggestion: 'Add SPDX-License-Identifier comment'
|
|
457
|
+
}];
|
|
458
|
+
}
|
|
459
|
+
return [];
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### Web Scraping with Puppeteer
|
|
463
|
+
|
|
464
|
+
Validate external documentation links:
|
|
465
|
+
|
|
466
|
+
```yaml
|
|
467
|
+
steps:
|
|
468
|
+
validate-links:
|
|
469
|
+
type: mcp
|
|
470
|
+
command: npx
|
|
471
|
+
args: ["-y", "@modelcontextprotocol/server-puppeteer"]
|
|
472
|
+
if: "files.some(f => f.filename.endsWith('.md'))"
|
|
473
|
+
method: navigate
|
|
474
|
+
methodArgs:
|
|
475
|
+
url: "https://docs.example.com"
|
|
476
|
+
waitUntil: "networkidle2"
|
|
477
|
+
transform_js: |
|
|
478
|
+
if (output.statusCode >= 400) {
|
|
479
|
+
return [{
|
|
480
|
+
file: 'documentation',
|
|
481
|
+
line: 0,
|
|
482
|
+
message: `Broken link: ${output.url} (${output.statusCode})`,
|
|
483
|
+
severity: 'warning',
|
|
484
|
+
category: 'documentation'
|
|
485
|
+
}];
|
|
486
|
+
}
|
|
487
|
+
return [];
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
### CVE Checking with Brave Search
|
|
491
|
+
|
|
492
|
+
Search for known vulnerabilities:
|
|
493
|
+
|
|
494
|
+
```yaml
|
|
495
|
+
steps:
|
|
496
|
+
check-cves:
|
|
497
|
+
type: mcp
|
|
498
|
+
command: npx
|
|
499
|
+
args: ["-y", "@modelcontextprotocol/server-brave-search"]
|
|
500
|
+
if: "files.some(f => f.filename.match(/package\\.json|requirements\\.txt/))"
|
|
501
|
+
method: search
|
|
502
|
+
argsTransform: |
|
|
503
|
+
{
|
|
504
|
+
"query": "CVE {{ pr.title }} vulnerability"
|
|
505
|
+
}
|
|
506
|
+
transform_js: |
|
|
507
|
+
const cvePattern = /CVE-\d{4}-\d{4,7}/g;
|
|
508
|
+
const results = output.web?.results || [];
|
|
509
|
+
const cves = new Set();
|
|
510
|
+
|
|
511
|
+
results.forEach(result => {
|
|
512
|
+
const matches = result.description?.match(cvePattern) || [];
|
|
513
|
+
matches.forEach(cve => cves.add(cve));
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
if (cves.size > 0) {
|
|
517
|
+
return [{
|
|
518
|
+
file: 'dependencies',
|
|
519
|
+
line: 0,
|
|
520
|
+
message: `Potential CVEs: ${Array.from(cves).join(', ')}`,
|
|
521
|
+
severity: 'warning',
|
|
522
|
+
category: 'security'
|
|
523
|
+
}];
|
|
524
|
+
}
|
|
525
|
+
return [];
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
## Security Considerations
|
|
529
|
+
|
|
530
|
+
1. **Command Validation**: stdio commands are validated to prevent injection attacks
|
|
531
|
+
2. **Sandboxed JavaScript**: `transform_js` runs in a secure sandbox without access to system resources
|
|
532
|
+
3. **Safe Environment**: Only whitelisted environment variables are exposed (CI_*, GITHUB_*, etc.)
|
|
533
|
+
4. **URL Validation**: Only http: and https: protocols are allowed for SSE/HTTP transports
|
|
534
|
+
5. **Timeout Protection**: All MCP calls have configurable timeouts (default 60s)
|
|
535
|
+
|
|
536
|
+
## Debugging
|
|
537
|
+
|
|
538
|
+
Enable debug mode to see MCP interactions:
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
visor --check my-mcp-check --debug
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Debug output includes:
|
|
545
|
+
- MCP server connection details
|
|
546
|
+
- Available tools from the server
|
|
547
|
+
- Method call arguments and results
|
|
548
|
+
- Session IDs for HTTP transport
|
|
549
|
+
- Transform errors and outputs
|
|
550
|
+
|
|
551
|
+
## Related Documentation
|
|
552
|
+
|
|
553
|
+
- [MCP Tools for AI Providers](./mcp.md) - Using MCP to enhance AI analysis
|
|
554
|
+
- [Command Provider](./command-provider.md) - Execute shell commands
|
|
555
|
+
- [HTTP Integration](./http.md) - HTTP client and webhook providers
|
|
556
|
+
- [Dependencies](./dependencies.md) - Check dependency management
|
|
557
|
+
- [Liquid Templates](./liquid-templates.md) - Template syntax reference
|
package/dist/docs/mcp.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
### MCP (Model Context Protocol) Support for AI Providers
|
|
2
|
+
|
|
3
|
+
Visor supports MCP servers for AI providers, enabling enhanced code analysis with specialized tools. MCP servers can provide additional context and capabilities to AI models.
|
|
4
|
+
|
|
5
|
+
MCP configuration follows the same pattern as AI provider configuration, supporting global, check-level, and AI object-level settings.
|
|
6
|
+
|
|
7
|
+
#### Global MCP Configuration
|
|
8
|
+
|
|
9
|
+
Configure MCP servers once globally for all AI checks:
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
# Global configuration
|
|
13
|
+
ai_provider: anthropic
|
|
14
|
+
ai_model: claude-3-sonnet
|
|
15
|
+
ai_mcp_servers:
|
|
16
|
+
probe:
|
|
17
|
+
command: "npx"
|
|
18
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
19
|
+
filesystem:
|
|
20
|
+
command: "npx"
|
|
21
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
security_review:
|
|
25
|
+
type: ai
|
|
26
|
+
prompt: "Review code using available MCP tools"
|
|
27
|
+
# Inherits global MCP servers automatically
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
#### Check-Level MCP Configuration (YAML keys and precedence)
|
|
31
|
+
|
|
32
|
+
You can declare MCP servers for an individual check in two ways. Visor supports both and merges them with the following precedence (last wins):
|
|
33
|
+
|
|
34
|
+
1) Global: `ai_mcp_servers` at the root of `.visor.yaml` (applies to all AI checks)
|
|
35
|
+
2) Check level: `ai_mcp_servers` under a specific check (overrides global for that check)
|
|
36
|
+
3) AI object: `ai.mcpServers` inside the same check (highest precedence)
|
|
37
|
+
|
|
38
|
+
For Claude Code checks, use `claude_code.mcpServers` (provider‑specific) instead of `ai_mcp_servers`.
|
|
39
|
+
|
|
40
|
+
Override global MCP servers for specific checks:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
steps:
|
|
44
|
+
performance_review:
|
|
45
|
+
type: ai
|
|
46
|
+
prompt: "Analyze performance using specialized tools"
|
|
47
|
+
# Option A: check-level (recommended for simple cases)
|
|
48
|
+
ai_mcp_servers:
|
|
49
|
+
probe:
|
|
50
|
+
command: "npx"
|
|
51
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
52
|
+
custom_profiler:
|
|
53
|
+
command: "python3"
|
|
54
|
+
args: ["./tools/performance-analyzer.py"]
|
|
55
|
+
# Option B: via ai.mcpServers (overrides check-level if both present)
|
|
56
|
+
ai:
|
|
57
|
+
mcpServers:
|
|
58
|
+
probe:
|
|
59
|
+
command: "npx"
|
|
60
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### AI Object-Level MCP Configuration
|
|
64
|
+
|
|
65
|
+
Most specific level - overrides both global and check-level:
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
steps:
|
|
69
|
+
comprehensive_review:
|
|
70
|
+
type: ai
|
|
71
|
+
prompt: "Comprehensive analysis with specific tools"
|
|
72
|
+
ai:
|
|
73
|
+
provider: anthropic
|
|
74
|
+
mcpServers: # Overrides everything else
|
|
75
|
+
probe:
|
|
76
|
+
command: "npx"
|
|
77
|
+
args: ["-y", "@probelabs/probe@latest", "mcp"]
|
|
78
|
+
github:
|
|
79
|
+
command: "npx"
|
|
80
|
+
args: ["-y", "@modelcontextprotocol/server-github"]
|
|
81
|
+
|
|
82
|
+
#### Claude Code Provider (check-level)
|
|
83
|
+
|
|
84
|
+
When using the `claude-code` provider, configure MCP servers under `claude_code.mcpServers`:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
steps:
|
|
88
|
+
claude_with_mcp:
|
|
89
|
+
type: claude-code
|
|
90
|
+
prompt: "Analyze code complexity and architecture"
|
|
91
|
+
claude_code:
|
|
92
|
+
mcpServers:
|
|
93
|
+
custom_analyzer:
|
|
94
|
+
command: "node"
|
|
95
|
+
args: ["./mcp-servers/analyzer.js"]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### How Visor passes MCP to the engine
|
|
99
|
+
|
|
100
|
+
- For AI checks (`type: ai`), Visor forwards your MCP server configuration directly to the ProbeAgent SDK as:
|
|
101
|
+
- `enableMcp: true`
|
|
102
|
+
- `mcpConfig: { mcpServers: { ... } }`
|
|
103
|
+
|
|
104
|
+
The SDK handles all MCP server lifecycle management including spawning processes, discovering tools, and routing tool calls.
|
|
105
|
+
|
|
106
|
+
- For Claude Code checks (`type: claude-code`), Visor passes `claude_code.mcpServers` configuration directly to the Claude Code SDK via the query object. The SDK manages all server operations internally.
|
|
107
|
+
|
|
108
|
+
Tip: run with `--debug` to see how many MCP servers were configured for a check.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Available MCP Servers
|
|
112
|
+
|
|
113
|
+
- Probe: Advanced code search and analysis (`@probelabs/probe`)
|
|
114
|
+
- Jira: Jira Cloud integration for issue management (`@orengrinker/jira-mcp-server`)
|
|
115
|
+
- Filesystem: File system access (`@modelcontextprotocol/server-filesystem`)
|
|
116
|
+
- GitHub: GitHub API access (coming soon)
|
|
117
|
+
- Custom: Your own MCP servers
|
|
118
|
+
|
|
119
|
+
#### Example Configurations
|
|
120
|
+
|
|
121
|
+
- [Basic MCP with Probe](../examples/ai-with-mcp.yaml) - Code analysis with multiple MCP servers
|
|
122
|
+
- [Jira Workflow Automation](../examples/jira-workflow-mcp.yaml) - Complete Jira integration examples
|
|
123
|
+
- [Simple Jira Analysis](../examples/jira-simple-example.yaml) - Basic JQL → analyze → label workflow
|
|
124
|
+
- [Setup Guide](../examples/JIRA_MCP_SETUP.md) - Detailed Jira MCP configuration instructions
|