@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,215 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
|
|
3
|
+
# Global HTTP server configuration for receiving webhooks
|
|
4
|
+
# Note: ${...} syntax reads from environment variables
|
|
5
|
+
# This server is automatically disabled when running in GitHub Actions
|
|
6
|
+
http_server:
|
|
7
|
+
enabled: true
|
|
8
|
+
port: 8080
|
|
9
|
+
host: "0.0.0.0"
|
|
10
|
+
auth:
|
|
11
|
+
type: bearer_token
|
|
12
|
+
secret: "${WEBHOOK_SECRET}" # Read from WEBHOOK_SECRET environment variable
|
|
13
|
+
endpoints:
|
|
14
|
+
- path: "/deploy"
|
|
15
|
+
name: "deployment-webhook"
|
|
16
|
+
transform: |
|
|
17
|
+
{
|
|
18
|
+
"environment": "{{ webhook.environment }}",
|
|
19
|
+
"version": "{{ webhook.version }}",
|
|
20
|
+
"service": "{{ webhook.service }}",
|
|
21
|
+
"timestamp": "{{ webhook.timestamp | default: timestamp }}"
|
|
22
|
+
}
|
|
23
|
+
- path: "/ci-complete"
|
|
24
|
+
name: "ci-webhook"
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
# Scheduled nightly security scan
|
|
28
|
+
nightly-security-scan:
|
|
29
|
+
type: ai
|
|
30
|
+
schedule: "0 2 * * *" # Every night at 2 AM
|
|
31
|
+
prompt: |
|
|
32
|
+
Perform a comprehensive security audit of the codebase.
|
|
33
|
+
Focus on:
|
|
34
|
+
- SQL injection vulnerabilities
|
|
35
|
+
- XSS vulnerabilities
|
|
36
|
+
- Authentication/authorization issues
|
|
37
|
+
- Sensitive data exposure
|
|
38
|
+
- Dependency vulnerabilities
|
|
39
|
+
group: security
|
|
40
|
+
schema: code-review
|
|
41
|
+
|
|
42
|
+
# Send security scan results to Slack
|
|
43
|
+
security-to-slack:
|
|
44
|
+
type: http
|
|
45
|
+
depends_on: [nightly-security-scan]
|
|
46
|
+
url: "${SLACK_WEBHOOK_URL}" # Read from SLACK_WEBHOOK_URL environment variable
|
|
47
|
+
method: POST
|
|
48
|
+
headers:
|
|
49
|
+
Content-Type: "application/json"
|
|
50
|
+
body: |
|
|
51
|
+
{
|
|
52
|
+
"text": "🔒 Nightly Security Scan Results",
|
|
53
|
+
"blocks": [
|
|
54
|
+
{
|
|
55
|
+
"type": "header",
|
|
56
|
+
"text": {
|
|
57
|
+
"type": "plain_text",
|
|
58
|
+
"text": "Security Scan Report"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "section",
|
|
63
|
+
"text": {
|
|
64
|
+
"type": "mrkdwn",
|
|
65
|
+
"text": "*Total Issues:* {{ outputs['nightly-security-scan'].totalIssues }}\n*Critical:* {{ outputs['nightly-security-scan'].criticalIssues }}\n*Errors:* {{ outputs['nightly-security-scan'].errorIssues }}"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{% if outputs['nightly-security-scan'].issues %}
|
|
69
|
+
{
|
|
70
|
+
"type": "section",
|
|
71
|
+
"text": {
|
|
72
|
+
"type": "mrkdwn",
|
|
73
|
+
"text": "*Top Issues:*\n{% for issue in outputs['nightly-security-scan'].issues | slice: 0, 3 %}• {{ issue.message | truncate: 80 }}\n{% endfor %}"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{% endif %}
|
|
77
|
+
{
|
|
78
|
+
"type": "context",
|
|
79
|
+
"elements": [
|
|
80
|
+
{
|
|
81
|
+
"type": "mrkdwn",
|
|
82
|
+
"text": "Scan completed at {{ timestamp }}"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
# Weekly performance analysis
|
|
90
|
+
weekly-performance:
|
|
91
|
+
type: ai
|
|
92
|
+
schedule: "0 0 * * 0" # Sunday at midnight
|
|
93
|
+
prompt: |
|
|
94
|
+
Analyze the codebase for performance issues:
|
|
95
|
+
- Inefficient algorithms (O(n²) or worse)
|
|
96
|
+
- Database N+1 queries
|
|
97
|
+
- Memory leaks
|
|
98
|
+
- Unnecessary re-renders (React/Vue)
|
|
99
|
+
- Bundle size issues
|
|
100
|
+
group: performance
|
|
101
|
+
schema: code-review
|
|
102
|
+
|
|
103
|
+
# Webhook input for deployment notifications
|
|
104
|
+
deployment-webhook:
|
|
105
|
+
type: http_input
|
|
106
|
+
endpoint: "/deploy"
|
|
107
|
+
on: [webhook_received]
|
|
108
|
+
|
|
109
|
+
# Post-deployment validation check
|
|
110
|
+
post-deploy-validation:
|
|
111
|
+
type: ai
|
|
112
|
+
depends_on: [deployment-webhook]
|
|
113
|
+
prompt: |
|
|
114
|
+
Deployment notification received:
|
|
115
|
+
- Environment: {{ outputs['deployment-webhook'].environment }}
|
|
116
|
+
- Version: {{ outputs['deployment-webhook'].version }}
|
|
117
|
+
- Service: {{ outputs['deployment-webhook'].service }}
|
|
118
|
+
|
|
119
|
+
Analyze the deployed version for:
|
|
120
|
+
1. Configuration drift from expected state
|
|
121
|
+
2. Security implications of the deployment
|
|
122
|
+
3. Potential compatibility issues
|
|
123
|
+
4. Required post-deployment tasks
|
|
124
|
+
|
|
125
|
+
Generate actionable recommendations.
|
|
126
|
+
group: deployment
|
|
127
|
+
schema: plain
|
|
128
|
+
|
|
129
|
+
# Send deployment analysis to ops team
|
|
130
|
+
notify-ops-team:
|
|
131
|
+
type: http
|
|
132
|
+
depends_on: [post-deploy-validation]
|
|
133
|
+
url: "${OPS_WEBHOOK_URL}" # Read from OPS_WEBHOOK_URL environment variable
|
|
134
|
+
method: POST
|
|
135
|
+
headers:
|
|
136
|
+
Content-Type: "application/json"
|
|
137
|
+
X-API-Key: "${OPS_API_KEY}" # Read from OPS_API_KEY environment variable
|
|
138
|
+
body: |
|
|
139
|
+
{
|
|
140
|
+
"deployment": {
|
|
141
|
+
"environment": "{{ outputs['deployment-webhook'].environment }}",
|
|
142
|
+
"version": "{{ outputs['deployment-webhook'].version }}",
|
|
143
|
+
"service": "{{ outputs['deployment-webhook'].service }}"
|
|
144
|
+
},
|
|
145
|
+
"analysis": {
|
|
146
|
+
"issues": {{ outputs['post-deploy-validation'].issues | json }},
|
|
147
|
+
"recommendations": {{ outputs['post-deploy-validation'].suggestions | json }},
|
|
148
|
+
"severity": "{% if outputs['post-deploy-validation'].criticalIssues > 0 %}critical{% elsif outputs['post-deploy-validation'].errorIssues > 0 %}error{% elsif outputs['post-deploy-validation'].warningIssues > 0 %}warning{% else %}info{% endif %}"
|
|
149
|
+
},
|
|
150
|
+
"timestamp": "{{ timestamp }}",
|
|
151
|
+
"visor_version": "1.0"
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
# CI completion webhook input
|
|
155
|
+
ci-completion:
|
|
156
|
+
type: http_input
|
|
157
|
+
endpoint: "/ci-complete"
|
|
158
|
+
transform: |
|
|
159
|
+
{
|
|
160
|
+
"build_id": "{{ webhook.build_id }}",
|
|
161
|
+
"status": "{{ webhook.status }}",
|
|
162
|
+
"branch": "{{ webhook.branch }}",
|
|
163
|
+
"commit": "{{ webhook.commit }}",
|
|
164
|
+
"test_results": {{ webhook.test_results | json }}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
# Analyze CI results
|
|
168
|
+
ci-analysis:
|
|
169
|
+
type: ai
|
|
170
|
+
depends_on: [ci-completion]
|
|
171
|
+
prompt: |
|
|
172
|
+
CI build completed:
|
|
173
|
+
- Status: {{ outputs['ci-completion'].status }}
|
|
174
|
+
- Branch: {{ outputs['ci-completion'].branch }}
|
|
175
|
+
- Test Results: {{ outputs['ci-completion'].test_results }}
|
|
176
|
+
|
|
177
|
+
{% if outputs['ci-completion'].status == 'failed' %}
|
|
178
|
+
Analyze the failure and provide:
|
|
179
|
+
1. Root cause analysis
|
|
180
|
+
2. Suggested fixes
|
|
181
|
+
3. Impact assessment
|
|
182
|
+
{% else %}
|
|
183
|
+
Review the successful build for:
|
|
184
|
+
1. Test coverage improvements
|
|
185
|
+
2. Performance metrics
|
|
186
|
+
3. Code quality trends
|
|
187
|
+
{% endif %}
|
|
188
|
+
|
|
189
|
+
# Hourly monitoring check (business hours only)
|
|
190
|
+
business-hours-monitor:
|
|
191
|
+
type: command
|
|
192
|
+
schedule: "0 9-17 * * 1-5" # Every hour 9 AM - 5 PM, Monday-Friday
|
|
193
|
+
exec: "curl -s https://api.example.com/health"
|
|
194
|
+
group: monitoring
|
|
195
|
+
|
|
196
|
+
# Send monitoring alerts
|
|
197
|
+
monitoring-alert:
|
|
198
|
+
type: http
|
|
199
|
+
depends_on: [business-hours-monitor]
|
|
200
|
+
url: "${ALERT_WEBHOOK_URL}" # Read from ALERT_WEBHOOK_URL environment variable
|
|
201
|
+
body: |
|
|
202
|
+
{
|
|
203
|
+
"service": "API Health Check",
|
|
204
|
+
"status": "{{ outputs['business-hours-monitor'].exitCode == 0 ? 'healthy' : 'unhealthy' }}",
|
|
205
|
+
"timestamp": "{{ timestamp }}",
|
|
206
|
+
"details": {{ outputs['business-hours-monitor'] | json }}
|
|
207
|
+
}
|
|
208
|
+
if: "outputs['business-hours-monitor'].exitCode != 0"
|
|
209
|
+
|
|
210
|
+
output:
|
|
211
|
+
pr_comment:
|
|
212
|
+
format: markdown
|
|
213
|
+
group_by: check
|
|
214
|
+
collapse: true
|
|
215
|
+
suppressionEnabled: true
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 🔍 {{ checkName | capitalize }} Review Results
|
|
2
|
+
|
|
3
|
+
{% if issues.size == 0 %}
|
|
4
|
+
## ✅ No Issues Found
|
|
5
|
+
Great job! No issues were detected in this check.
|
|
6
|
+
{% else %}
|
|
7
|
+
## 📋 Issues Summary
|
|
8
|
+
Found **{{ issues.size }}** issue{% if issues.size > 1 %}s{% endif %} to review:
|
|
9
|
+
|
|
10
|
+
{% assign critical_issues = issues | where: "severity", "critical" %}
|
|
11
|
+
{% assign error_issues = issues | where: "severity", "error" %}
|
|
12
|
+
{% assign warning_issues = issues | where: "severity", "warning" %}
|
|
13
|
+
{% assign info_issues = issues | where: "severity", "info" %}
|
|
14
|
+
|
|
15
|
+
{% if critical_issues.size > 0 %}
|
|
16
|
+
### 🚨 Critical Issues ({{ critical_issues.size }})
|
|
17
|
+
{% for issue in critical_issues %}
|
|
18
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
19
|
+
{% if issue.suggestion %}
|
|
20
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
21
|
+
{% endif %}
|
|
22
|
+
{% endfor %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% if error_issues.size > 0 %}
|
|
26
|
+
### ❌ Errors ({{ error_issues.size }})
|
|
27
|
+
{% for issue in error_issues %}
|
|
28
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
29
|
+
{% if issue.suggestion %}
|
|
30
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
31
|
+
{% endif %}
|
|
32
|
+
{% endfor %}
|
|
33
|
+
{% endif %}
|
|
34
|
+
|
|
35
|
+
{% if warning_issues.size > 0 %}
|
|
36
|
+
### ⚠️ Warnings ({{ warning_issues.size }})
|
|
37
|
+
{% for issue in warning_issues %}
|
|
38
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
39
|
+
{% if issue.suggestion %}
|
|
40
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
41
|
+
{% endif %}
|
|
42
|
+
{% endfor %}
|
|
43
|
+
{% endif %}
|
|
44
|
+
|
|
45
|
+
{% if info_issues.size > 0 %}
|
|
46
|
+
### ℹ️ Info ({{ info_issues.size }})
|
|
47
|
+
{% for issue in info_issues %}
|
|
48
|
+
- **{{ issue.file }}:{{ issue.line }}** - {{ issue.message }}
|
|
49
|
+
{% if issue.suggestion %}
|
|
50
|
+
💡 **Suggestion:** {{ issue.suggestion }}
|
|
51
|
+
{% endif %}
|
|
52
|
+
{% endfor %}
|
|
53
|
+
{% endif %}
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
*Powered by Custom Template*
|
|
57
|
+
{% endif %}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
|
|
3
|
+
# Custom Tool Definitions
|
|
4
|
+
# These tools can be used in any MCP block with transport: custom
|
|
5
|
+
tools:
|
|
6
|
+
# Simple grep tool for finding patterns in files
|
|
7
|
+
grep-pattern:
|
|
8
|
+
name: grep-pattern
|
|
9
|
+
description: Search for patterns in files using grep
|
|
10
|
+
inputSchema:
|
|
11
|
+
type: object
|
|
12
|
+
properties:
|
|
13
|
+
pattern:
|
|
14
|
+
type: string
|
|
15
|
+
description: Regular expression pattern to search for
|
|
16
|
+
files:
|
|
17
|
+
type: array
|
|
18
|
+
items:
|
|
19
|
+
type: string
|
|
20
|
+
description: List of files to search in
|
|
21
|
+
required: [pattern]
|
|
22
|
+
exec: 'grep -n "{{ args.pattern }}" {{ args.files | join: " " }}'
|
|
23
|
+
transform_js: |
|
|
24
|
+
// Parse grep output into structured format
|
|
25
|
+
const lines = output.trim().split('\n').filter(l => l);
|
|
26
|
+
return lines.map(line => {
|
|
27
|
+
const match = line.match(/^([^:]+):(\d+):(.*)$/);
|
|
28
|
+
if (!match) return null;
|
|
29
|
+
return {
|
|
30
|
+
file: match[1],
|
|
31
|
+
line: parseInt(match[2]),
|
|
32
|
+
content: match[3].trim()
|
|
33
|
+
};
|
|
34
|
+
}).filter(Boolean);
|
|
35
|
+
|
|
36
|
+
# Tool to count lines of code
|
|
37
|
+
count-lines:
|
|
38
|
+
name: count-lines
|
|
39
|
+
description: Count lines of code in files
|
|
40
|
+
inputSchema:
|
|
41
|
+
type: object
|
|
42
|
+
properties:
|
|
43
|
+
files:
|
|
44
|
+
type: array
|
|
45
|
+
items:
|
|
46
|
+
type: string
|
|
47
|
+
description: Files to count lines in
|
|
48
|
+
exclude_blank:
|
|
49
|
+
type: boolean
|
|
50
|
+
description: Exclude blank lines from count
|
|
51
|
+
exec: |
|
|
52
|
+
{% if args.exclude_blank %}
|
|
53
|
+
cat {{ args.files | join: " " }} | grep -v "^$" | wc -l
|
|
54
|
+
{% else %}
|
|
55
|
+
cat {{ args.files | join: " " }} | wc -l
|
|
56
|
+
{% endif %}
|
|
57
|
+
transform_js: 'return parseInt(output.trim());'
|
|
58
|
+
|
|
59
|
+
# Tool to check if a file contains sensitive data patterns
|
|
60
|
+
check-secrets:
|
|
61
|
+
name: check-secrets
|
|
62
|
+
description: Check for potential secrets in files
|
|
63
|
+
inputSchema:
|
|
64
|
+
type: object
|
|
65
|
+
properties:
|
|
66
|
+
file:
|
|
67
|
+
type: string
|
|
68
|
+
description: File to check
|
|
69
|
+
required: [file]
|
|
70
|
+
exec: |
|
|
71
|
+
grep -E "(api[_-]?key|secret|token|password|pwd|auth|credential)" -i "{{ args.file }}" || echo "No secrets found"
|
|
72
|
+
transform_js: |
|
|
73
|
+
if (output.includes("No secrets found")) {
|
|
74
|
+
return { safe: true, issues: [] };
|
|
75
|
+
}
|
|
76
|
+
const lines = output.trim().split('\n');
|
|
77
|
+
return {
|
|
78
|
+
safe: false,
|
|
79
|
+
issues: lines.map(line => ({
|
|
80
|
+
type: 'potential_secret',
|
|
81
|
+
content: line.substring(0, 100) // Truncate for safety
|
|
82
|
+
}))
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
# Tool to analyze code complexity
|
|
86
|
+
analyze-complexity:
|
|
87
|
+
name: analyze-complexity
|
|
88
|
+
description: Analyze code complexity metrics
|
|
89
|
+
inputSchema:
|
|
90
|
+
type: object
|
|
91
|
+
properties:
|
|
92
|
+
file:
|
|
93
|
+
type: string
|
|
94
|
+
description: Source code file to analyze
|
|
95
|
+
language:
|
|
96
|
+
type: string
|
|
97
|
+
description: Programming language (js, py, go, etc.)
|
|
98
|
+
required: [file]
|
|
99
|
+
exec: |
|
|
100
|
+
echo "Analyzing {{ args.file }}"
|
|
101
|
+
# Count functions/methods
|
|
102
|
+
{% if args.language == "js" or args.language == "ts" %}
|
|
103
|
+
grep -c "function\|=>" "{{ args.file }}" || echo "0"
|
|
104
|
+
{% elsif args.language == "py" %}
|
|
105
|
+
grep -c "def " "{{ args.file }}" || echo "0"
|
|
106
|
+
{% elsif args.language == "go" %}
|
|
107
|
+
grep -c "func " "{{ args.file }}" || echo "0"
|
|
108
|
+
{% else %}
|
|
109
|
+
echo "0"
|
|
110
|
+
{% endif %}
|
|
111
|
+
transform_js: |
|
|
112
|
+
const functionCount = parseInt(output.trim().split('\n').pop() || '0');
|
|
113
|
+
return {
|
|
114
|
+
file: args.file,
|
|
115
|
+
language: args.language || 'unknown',
|
|
116
|
+
metrics: {
|
|
117
|
+
functionCount: functionCount,
|
|
118
|
+
complexity: functionCount > 10 ? 'high' : functionCount > 5 ? 'medium' : 'low'
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
# Tool to validate JSON/YAML files
|
|
123
|
+
validate-config:
|
|
124
|
+
name: validate-config
|
|
125
|
+
description: Validate configuration file syntax
|
|
126
|
+
inputSchema:
|
|
127
|
+
type: object
|
|
128
|
+
properties:
|
|
129
|
+
file:
|
|
130
|
+
type: string
|
|
131
|
+
description: Configuration file to validate
|
|
132
|
+
type:
|
|
133
|
+
type: string
|
|
134
|
+
enum: [json, yaml]
|
|
135
|
+
description: File type to validate
|
|
136
|
+
required: [file, type]
|
|
137
|
+
exec: |
|
|
138
|
+
{% if args.type == "json" %}
|
|
139
|
+
python3 -m json.tool "{{ args.file }}" > /dev/null 2>&1 && echo "Valid JSON" || echo "Invalid JSON"
|
|
140
|
+
{% else %}
|
|
141
|
+
python3 -c "import yaml; yaml.safe_load(open('{{ args.file }}'))" 2>&1 && echo "Valid YAML" || echo "Invalid YAML"
|
|
142
|
+
{% endif %}
|
|
143
|
+
parseJson: false
|
|
144
|
+
transform_js: |
|
|
145
|
+
const isValid = output.includes("Valid");
|
|
146
|
+
return {
|
|
147
|
+
file: args.file,
|
|
148
|
+
type: args.type,
|
|
149
|
+
valid: isValid,
|
|
150
|
+
message: output.trim()
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
# Tool to generate file statistics
|
|
154
|
+
file-stats:
|
|
155
|
+
name: file-stats
|
|
156
|
+
description: Generate statistics about files
|
|
157
|
+
inputSchema:
|
|
158
|
+
type: object
|
|
159
|
+
properties:
|
|
160
|
+
pattern:
|
|
161
|
+
type: string
|
|
162
|
+
description: Glob pattern for files to analyze
|
|
163
|
+
exec: |
|
|
164
|
+
find . -name "{{ args.pattern }}" -type f | xargs wc -l | tail -1
|
|
165
|
+
transform_js: |
|
|
166
|
+
const parts = output.trim().split(/\s+/);
|
|
167
|
+
return {
|
|
168
|
+
totalLines: parseInt(parts[0] || '0'),
|
|
169
|
+
fileCount: Math.max(0, parts.length - 2) // Subtract total line
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
# Example usage of custom tools in checks
|
|
173
|
+
steps:
|
|
174
|
+
# Use custom tool to find TODO comments
|
|
175
|
+
find-todos:
|
|
176
|
+
type: mcp
|
|
177
|
+
transport: custom
|
|
178
|
+
method: grep-pattern
|
|
179
|
+
methodArgs:
|
|
180
|
+
pattern: "TODO|FIXME|HACK"
|
|
181
|
+
files: ["*.js", "*.ts", "*.py"]
|
|
182
|
+
transform_js: |
|
|
183
|
+
// Convert grep results to issues
|
|
184
|
+
output.map(match => ({
|
|
185
|
+
file: match.file,
|
|
186
|
+
line: match.line,
|
|
187
|
+
message: `Found comment: ${match.content}`,
|
|
188
|
+
severity: match.content.includes('FIXME') ? 'warning' : 'info',
|
|
189
|
+
category: 'documentation',
|
|
190
|
+
ruleId: 'todo-comment'
|
|
191
|
+
}))
|
|
192
|
+
|
|
193
|
+
# Check for secrets using custom tool
|
|
194
|
+
security-check:
|
|
195
|
+
type: mcp
|
|
196
|
+
transport: custom
|
|
197
|
+
method: check-secrets
|
|
198
|
+
forEach: "{{ files | map: 'filename' }}"
|
|
199
|
+
methodArgs:
|
|
200
|
+
file: "{{ item }}"
|
|
201
|
+
transform_js: |
|
|
202
|
+
if (!output.safe) {
|
|
203
|
+
return output.issues.map(issue => ({
|
|
204
|
+
file: args.file,
|
|
205
|
+
line: 0,
|
|
206
|
+
message: `Potential secret detected: ${issue.type}`,
|
|
207
|
+
severity: 'critical',
|
|
208
|
+
category: 'security',
|
|
209
|
+
ruleId: 'potential-secret'
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
return [];
|
|
213
|
+
|
|
214
|
+
# Analyze code complexity
|
|
215
|
+
complexity-analysis:
|
|
216
|
+
type: mcp
|
|
217
|
+
transport: custom
|
|
218
|
+
method: analyze-complexity
|
|
219
|
+
forEach: "{{ files | where: 'filename', 'endsWith', '.js' }}"
|
|
220
|
+
methodArgs:
|
|
221
|
+
file: "{{ item.filename }}"
|
|
222
|
+
language: "js"
|
|
223
|
+
transform_js: |
|
|
224
|
+
const complexity = output.metrics.complexity;
|
|
225
|
+
if (complexity === 'high') {
|
|
226
|
+
return [{
|
|
227
|
+
file: output.file,
|
|
228
|
+
line: 0,
|
|
229
|
+
message: `High complexity detected: ${output.metrics.functionCount} functions`,
|
|
230
|
+
severity: 'warning',
|
|
231
|
+
category: 'performance',
|
|
232
|
+
ruleId: 'high-complexity'
|
|
233
|
+
}];
|
|
234
|
+
}
|
|
235
|
+
return [];
|
|
236
|
+
|
|
237
|
+
# Validate all JSON config files
|
|
238
|
+
validate-json-configs:
|
|
239
|
+
type: mcp
|
|
240
|
+
transport: custom
|
|
241
|
+
method: validate-config
|
|
242
|
+
forEach: "{{ files | where: 'filename', 'endsWith', '.json' }}"
|
|
243
|
+
methodArgs:
|
|
244
|
+
file: "{{ item.filename }}"
|
|
245
|
+
type: "json"
|
|
246
|
+
fail_if: "!output.valid"
|
|
247
|
+
transform_js: |
|
|
248
|
+
if (!output.valid) {
|
|
249
|
+
return [{
|
|
250
|
+
file: output.file,
|
|
251
|
+
line: 0,
|
|
252
|
+
message: output.message,
|
|
253
|
+
severity: 'error',
|
|
254
|
+
category: 'style',
|
|
255
|
+
ruleId: 'invalid-json'
|
|
256
|
+
}];
|
|
257
|
+
}
|
|
258
|
+
return [];
|
|
259
|
+
|
|
260
|
+
# Get repository statistics
|
|
261
|
+
repo-stats:
|
|
262
|
+
type: mcp
|
|
263
|
+
transport: custom
|
|
264
|
+
method: file-stats
|
|
265
|
+
methodArgs:
|
|
266
|
+
pattern: "*.{js,ts,py,go}"
|
|
267
|
+
transform_js: |
|
|
268
|
+
// Create informational message about repo size
|
|
269
|
+
[{
|
|
270
|
+
file: 'repository',
|
|
271
|
+
line: 0,
|
|
272
|
+
message: `Repository contains ${output.fileCount} source files with ${output.totalLines} total lines`,
|
|
273
|
+
severity: 'info',
|
|
274
|
+
category: 'documentation',
|
|
275
|
+
ruleId: 'repo-stats'
|
|
276
|
+
}]
|
|
277
|
+
|
|
278
|
+
# Output configuration
|
|
279
|
+
output:
|
|
280
|
+
format: table
|
|
281
|
+
groupBy: severity
|