@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,424 @@
|
|
|
1
|
+
# Custom Tools in YAML Configuration
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Custom tools allow you to define reusable command-line tools directly in your YAML configuration. These tools can then be used in MCP (Model Context Protocol) blocks throughout your configuration, making it easy to integrate any command-line tool or script into your workflow.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Define tools in YAML**: No need to create separate scripts or programs
|
|
10
|
+
- **Input validation**: Define JSON Schema for tool parameters
|
|
11
|
+
- **Template support**: Use Liquid templates for dynamic command generation
|
|
12
|
+
- **Transform outputs**: Process tool output with Liquid templates or JavaScript
|
|
13
|
+
- **Reusable**: Define once, use multiple times across your configuration
|
|
14
|
+
- **Importable**: Share tools across projects using the `extends` mechanism
|
|
15
|
+
- **Type-safe**: Full TypeScript support with input/output schemas
|
|
16
|
+
- **MCP-compatible**: Tools follow the Model Context Protocol specification
|
|
17
|
+
|
|
18
|
+
## Basic Tool Definition
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
tools:
|
|
22
|
+
my-tool:
|
|
23
|
+
name: my-tool
|
|
24
|
+
description: Description of what the tool does
|
|
25
|
+
exec: 'echo "Hello World"'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Complete Tool Schema
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
tools:
|
|
32
|
+
tool-name:
|
|
33
|
+
# MCP-compatible fields (these map directly to MCP tool interface)
|
|
34
|
+
name: tool-name # Required: Tool identifier (MCP: name)
|
|
35
|
+
description: Tool description # Recommended: Human-readable description (MCP: description)
|
|
36
|
+
|
|
37
|
+
# Input schema (JSON Schema format) - MCP: inputSchema
|
|
38
|
+
# This follows the JSON Schema specification and is used for:
|
|
39
|
+
# 1. Validating tool inputs before execution
|
|
40
|
+
# 2. Providing type information to AI models
|
|
41
|
+
# 3. Auto-generating documentation
|
|
42
|
+
inputSchema:
|
|
43
|
+
type: object
|
|
44
|
+
properties:
|
|
45
|
+
param1:
|
|
46
|
+
type: string
|
|
47
|
+
description: Parameter description # Describe each parameter for AI models
|
|
48
|
+
param2:
|
|
49
|
+
type: number
|
|
50
|
+
description: Optional parameter
|
|
51
|
+
required: [param1] # List required parameters
|
|
52
|
+
additionalProperties: false # Strict mode: reject unknown parameters
|
|
53
|
+
|
|
54
|
+
# Custom tool execution fields
|
|
55
|
+
exec: 'command {{ args.param1 }}' # Required: Command to execute (supports Liquid)
|
|
56
|
+
stdin: '{{ args.param2 }}' # Optional: Data to pipe to stdin (supports Liquid)
|
|
57
|
+
|
|
58
|
+
cwd: /path/to/directory # Optional: Working directory
|
|
59
|
+
env: # Optional: Environment variables
|
|
60
|
+
MY_VAR: value
|
|
61
|
+
|
|
62
|
+
timeout: 30000 # Optional: Timeout in milliseconds (default: 30000)
|
|
63
|
+
parseJson: true # Optional: Parse output as JSON
|
|
64
|
+
|
|
65
|
+
# Transform output with Liquid template
|
|
66
|
+
transform: '{ "result": {{ output | json }} }'
|
|
67
|
+
|
|
68
|
+
# OR transform with JavaScript
|
|
69
|
+
transform_js: |
|
|
70
|
+
return {
|
|
71
|
+
processed: output.trim().toUpperCase()
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
# Output schema for validation (optional) - MCP: outputSchema
|
|
75
|
+
# Not currently enforced but useful for documentation
|
|
76
|
+
outputSchema:
|
|
77
|
+
type: object
|
|
78
|
+
properties:
|
|
79
|
+
result:
|
|
80
|
+
type: string
|
|
81
|
+
description: The processed result
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## MCP Compatibility
|
|
85
|
+
|
|
86
|
+
Custom tools are designed to be fully compatible with the Model Context Protocol (MCP) specification. When you define a custom tool, it automatically becomes available as an MCP tool with the following mapping:
|
|
87
|
+
|
|
88
|
+
| Custom Tool Field | MCP Tool Field | Purpose |
|
|
89
|
+
|------------------|----------------|---------|
|
|
90
|
+
| `name` | `name` | Unique identifier for the tool |
|
|
91
|
+
| `description` | `description` | Human-readable description for AI models and documentation |
|
|
92
|
+
| `inputSchema` | `inputSchema` | JSON Schema defining expected parameters |
|
|
93
|
+
| `outputSchema` | `outputSchema` | JSON Schema for output validation (informational) |
|
|
94
|
+
|
|
95
|
+
### Why MCP Compatibility Matters
|
|
96
|
+
|
|
97
|
+
1. **AI Model Integration**: Tools with proper descriptions and schemas can be automatically understood and used by AI models
|
|
98
|
+
2. **Type Safety**: Input schemas provide runtime validation and type checking
|
|
99
|
+
3. **Documentation**: Schemas serve as self-documenting interfaces
|
|
100
|
+
4. **Interoperability**: Tools can potentially be used with other MCP-compatible systems
|
|
101
|
+
|
|
102
|
+
### Best Practices for MCP Compatibility
|
|
103
|
+
|
|
104
|
+
1. **Always provide descriptions**: Help AI models understand what your tool does
|
|
105
|
+
```yaml
|
|
106
|
+
tools:
|
|
107
|
+
analyze-code:
|
|
108
|
+
name: analyze-code
|
|
109
|
+
description: "Analyzes source code for complexity metrics and potential issues"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
2. **Use detailed input schemas**: Include descriptions for each parameter
|
|
113
|
+
```yaml
|
|
114
|
+
inputSchema:
|
|
115
|
+
type: object
|
|
116
|
+
properties:
|
|
117
|
+
file:
|
|
118
|
+
type: string
|
|
119
|
+
description: "Path to the source code file to analyze"
|
|
120
|
+
metrics:
|
|
121
|
+
type: array
|
|
122
|
+
description: "List of metrics to calculate"
|
|
123
|
+
items:
|
|
124
|
+
type: string
|
|
125
|
+
enum: ["complexity", "lines", "dependencies"]
|
|
126
|
+
required: ["file"]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
3. **Consider output schemas**: While not enforced, they document expected outputs
|
|
130
|
+
```yaml
|
|
131
|
+
outputSchema:
|
|
132
|
+
type: object
|
|
133
|
+
properties:
|
|
134
|
+
complexity:
|
|
135
|
+
type: number
|
|
136
|
+
description: "Cyclomatic complexity score"
|
|
137
|
+
issues:
|
|
138
|
+
type: array
|
|
139
|
+
description: "List of detected issues"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Using Custom Tools
|
|
143
|
+
|
|
144
|
+
Once defined, custom tools can be used in any MCP block by setting `transport: custom`:
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
steps:
|
|
148
|
+
my-check:
|
|
149
|
+
type: mcp
|
|
150
|
+
transport: custom # Use custom transport
|
|
151
|
+
method: my-tool # Tool name
|
|
152
|
+
methodArgs: # Tool arguments
|
|
153
|
+
param1: "value1"
|
|
154
|
+
param2: 42
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Template Context
|
|
158
|
+
|
|
159
|
+
Tools have access to a rich template context through Liquid templates:
|
|
160
|
+
|
|
161
|
+
### In `exec` and `stdin`:
|
|
162
|
+
- `{{ args }}` - The arguments passed to the tool
|
|
163
|
+
- `{{ pr }}` - Pull request information (number, title, author, etc.)
|
|
164
|
+
- `{{ files }}` - List of files in the PR
|
|
165
|
+
- `{{ outputs }}` - Outputs from previous checks
|
|
166
|
+
- `{{ env }}` - Environment variables
|
|
167
|
+
|
|
168
|
+
### In `transform` and `transform_js`:
|
|
169
|
+
- All of the above, plus:
|
|
170
|
+
- `{{ output }}` - The raw command output
|
|
171
|
+
- `{{ stdout }}` - Standard output
|
|
172
|
+
- `{{ stderr }}` - Standard error
|
|
173
|
+
- `{{ exitCode }}` - Command exit code
|
|
174
|
+
|
|
175
|
+
## Examples
|
|
176
|
+
|
|
177
|
+
### 1. Simple Grep Tool
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
tools:
|
|
181
|
+
grep-todos:
|
|
182
|
+
name: grep-todos
|
|
183
|
+
description: Find TODO comments in code
|
|
184
|
+
inputSchema:
|
|
185
|
+
type: object
|
|
186
|
+
properties:
|
|
187
|
+
pattern:
|
|
188
|
+
type: string
|
|
189
|
+
files:
|
|
190
|
+
type: array
|
|
191
|
+
items:
|
|
192
|
+
type: string
|
|
193
|
+
exec: 'grep -n "{{ args.pattern }}" {{ args.files | join: " " }}'
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### 2. JSON Processing Tool
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
tools:
|
|
200
|
+
analyze-package:
|
|
201
|
+
name: analyze-package
|
|
202
|
+
description: Analyze package.json dependencies
|
|
203
|
+
inputSchema:
|
|
204
|
+
type: object
|
|
205
|
+
properties:
|
|
206
|
+
file:
|
|
207
|
+
type: string
|
|
208
|
+
exec: 'cat {{ args.file }}'
|
|
209
|
+
parseJson: true
|
|
210
|
+
transform_js: |
|
|
211
|
+
const deps = Object.keys(output.dependencies || {});
|
|
212
|
+
const devDeps = Object.keys(output.devDependencies || {});
|
|
213
|
+
return {
|
|
214
|
+
totalDeps: deps.length + devDeps.length,
|
|
215
|
+
prodDeps: deps.length,
|
|
216
|
+
devDeps: devDeps.length
|
|
217
|
+
};
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### 3. Multi-Step Tool with Error Handling
|
|
221
|
+
|
|
222
|
+
```yaml
|
|
223
|
+
tools:
|
|
224
|
+
build-and-test:
|
|
225
|
+
name: build-and-test
|
|
226
|
+
description: Build project and run tests
|
|
227
|
+
exec: |
|
|
228
|
+
npm run build && npm test
|
|
229
|
+
timeout: 300000 # 5 minutes
|
|
230
|
+
transform_js: |
|
|
231
|
+
if (exitCode !== 0) {
|
|
232
|
+
return {
|
|
233
|
+
success: false,
|
|
234
|
+
error: stderr || 'Build or tests failed'
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
success: true,
|
|
239
|
+
output: output
|
|
240
|
+
};
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### 4. Tool with Dynamic Command Generation
|
|
244
|
+
|
|
245
|
+
```yaml
|
|
246
|
+
tools:
|
|
247
|
+
flexible-linter:
|
|
248
|
+
name: flexible-linter
|
|
249
|
+
description: Run appropriate linter based on file type
|
|
250
|
+
inputSchema:
|
|
251
|
+
type: object
|
|
252
|
+
properties:
|
|
253
|
+
file:
|
|
254
|
+
type: string
|
|
255
|
+
exec: |
|
|
256
|
+
{% assign ext = args.file | split: "." | last %}
|
|
257
|
+
{% case ext %}
|
|
258
|
+
{% when "js", "ts" %}
|
|
259
|
+
eslint {{ args.file }}
|
|
260
|
+
{% when "py" %}
|
|
261
|
+
pylint {{ args.file }}
|
|
262
|
+
{% when "go" %}
|
|
263
|
+
golint {{ args.file }}
|
|
264
|
+
{% else %}
|
|
265
|
+
echo "No linter for .{{ ext }} files"
|
|
266
|
+
{% endcase %}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Tool Libraries and Extends
|
|
270
|
+
|
|
271
|
+
### Creating a Tool Library
|
|
272
|
+
|
|
273
|
+
Create a file with just tool definitions:
|
|
274
|
+
|
|
275
|
+
```yaml
|
|
276
|
+
# tools-library.yaml
|
|
277
|
+
version: "1.0"
|
|
278
|
+
|
|
279
|
+
tools:
|
|
280
|
+
tool1:
|
|
281
|
+
name: tool1
|
|
282
|
+
exec: 'command1'
|
|
283
|
+
|
|
284
|
+
tool2:
|
|
285
|
+
name: tool2
|
|
286
|
+
exec: 'command2'
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Importing Tools
|
|
290
|
+
|
|
291
|
+
Use the `extends` mechanism to import tools:
|
|
292
|
+
|
|
293
|
+
```yaml
|
|
294
|
+
version: "1.0"
|
|
295
|
+
extends: ./tools-library.yaml
|
|
296
|
+
|
|
297
|
+
# Additional tools can be defined here
|
|
298
|
+
tools:
|
|
299
|
+
local-tool:
|
|
300
|
+
name: local-tool
|
|
301
|
+
exec: 'local-command'
|
|
302
|
+
|
|
303
|
+
# Use both imported and local tools
|
|
304
|
+
steps:
|
|
305
|
+
check1:
|
|
306
|
+
type: mcp
|
|
307
|
+
transport: custom
|
|
308
|
+
method: tool1 # From tools-library.yaml
|
|
309
|
+
|
|
310
|
+
check2:
|
|
311
|
+
type: mcp
|
|
312
|
+
transport: custom
|
|
313
|
+
method: local-tool # Defined locally
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Multiple Extends
|
|
317
|
+
|
|
318
|
+
You can import from multiple sources:
|
|
319
|
+
|
|
320
|
+
```yaml
|
|
321
|
+
extends:
|
|
322
|
+
- ./base-tools.yaml
|
|
323
|
+
- ./security-tools.yaml
|
|
324
|
+
- https://example.com/shared-tools.yaml
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Tools are merged with later sources overriding earlier ones.
|
|
328
|
+
|
|
329
|
+
## Integration with Other Features
|
|
330
|
+
|
|
331
|
+
### Using with forEach
|
|
332
|
+
|
|
333
|
+
```yaml
|
|
334
|
+
steps:
|
|
335
|
+
lint-all-files:
|
|
336
|
+
type: mcp
|
|
337
|
+
transport: custom
|
|
338
|
+
method: my-linter
|
|
339
|
+
forEach: "{{ files }}"
|
|
340
|
+
methodArgs:
|
|
341
|
+
file: "{{ item.filename }}"
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Conditional Execution
|
|
345
|
+
|
|
346
|
+
```yaml
|
|
347
|
+
steps:
|
|
348
|
+
optional-check:
|
|
349
|
+
type: mcp
|
|
350
|
+
transport: custom
|
|
351
|
+
method: my-tool
|
|
352
|
+
if: "files.some(f => f.filename.endsWith('.js'))"
|
|
353
|
+
methodArgs:
|
|
354
|
+
target: "src/"
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Chaining with on_success/on_failure
|
|
358
|
+
|
|
359
|
+
```yaml
|
|
360
|
+
steps:
|
|
361
|
+
main-check:
|
|
362
|
+
type: mcp
|
|
363
|
+
transport: custom
|
|
364
|
+
method: build-tool
|
|
365
|
+
on_success:
|
|
366
|
+
- type: mcp
|
|
367
|
+
transport: custom
|
|
368
|
+
method: test-tool
|
|
369
|
+
on_failure:
|
|
370
|
+
- type: mcp
|
|
371
|
+
transport: custom
|
|
372
|
+
method: cleanup-tool
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## Best Practices
|
|
376
|
+
|
|
377
|
+
1. **Use Input Schemas**: Always define `inputSchema` to validate tool inputs
|
|
378
|
+
2. **Handle Errors**: Use `transform_js` to check exit codes and handle errors
|
|
379
|
+
3. **Set Timeouts**: Configure appropriate timeouts for long-running commands
|
|
380
|
+
4. **Parse JSON**: Use `parseJson: true` for tools that output JSON
|
|
381
|
+
5. **Document Tools**: Provide clear descriptions for each tool
|
|
382
|
+
6. **Create Libraries**: Group related tools in separate YAML files
|
|
383
|
+
7. **Version Control**: Store tool libraries in version control for sharing
|
|
384
|
+
8. **Test Tools**: Test tools independently before using in complex workflows
|
|
385
|
+
|
|
386
|
+
## Security Considerations
|
|
387
|
+
|
|
388
|
+
- Tools execute with the same permissions as the Visor process
|
|
389
|
+
- Be cautious with user input in tool commands
|
|
390
|
+
- Use input validation to prevent command injection
|
|
391
|
+
- Avoid exposing sensitive data in tool outputs
|
|
392
|
+
- Consider using environment variables for secrets
|
|
393
|
+
|
|
394
|
+
## Troubleshooting
|
|
395
|
+
|
|
396
|
+
### Tool Not Found
|
|
397
|
+
|
|
398
|
+
If you get "Tool not found" errors:
|
|
399
|
+
1. Ensure the tool is defined in the `tools` section
|
|
400
|
+
2. Check that the tool name matches exactly
|
|
401
|
+
3. Verify extends paths are correct
|
|
402
|
+
|
|
403
|
+
### Command Failures
|
|
404
|
+
|
|
405
|
+
For command execution issues:
|
|
406
|
+
1. Test the command manually first
|
|
407
|
+
2. Check working directory (`cwd`) settings
|
|
408
|
+
3. Verify required binaries are installed
|
|
409
|
+
4. Check timeout settings for long operations
|
|
410
|
+
|
|
411
|
+
### Template Errors
|
|
412
|
+
|
|
413
|
+
For Liquid template problems:
|
|
414
|
+
1. Validate template syntax
|
|
415
|
+
2. Check that variables exist in context
|
|
416
|
+
3. Use filters correctly (e.g., `| json`, `| join`)
|
|
417
|
+
|
|
418
|
+
### Transform Errors
|
|
419
|
+
|
|
420
|
+
For JavaScript transform issues:
|
|
421
|
+
1. Ensure valid JavaScript syntax
|
|
422
|
+
2. Always return a value
|
|
423
|
+
3. Handle undefined/null cases
|
|
424
|
+
4. Use try-catch for error handling
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Dashboards for Visor Telemetry
|
|
2
|
+
==============================
|
|
3
|
+
|
|
4
|
+
This folder contains example Grafana dashboards to visualize Visor traces and metrics exported via OpenTelemetry (Tempo + Prometheus).
|
|
5
|
+
|
|
6
|
+
What’s included
|
|
7
|
+
- grafana-visor-overview.json — Run/Check overview: durations, issue counts by severity, recent runs.
|
|
8
|
+
- grafana-visor-diagrams.json — Diagram telemetry (syntax pass rate, average score) if you enable diagram attributes.
|
|
9
|
+
|
|
10
|
+
Setup
|
|
11
|
+
1) Deploy Grafana + Tempo + Prometheus (or Grafana Cloud).
|
|
12
|
+
2) Configure your OTel Collector to receive OTLP traces/metrics and forward to Tempo/Prometheus.
|
|
13
|
+
3) Enable telemetry in Visor CI:
|
|
14
|
+
- VISOR_TELEMETRY_ENABLED=true
|
|
15
|
+
- VISOR_TELEMETRY_SINK=otlp
|
|
16
|
+
- OTEL_EXPORTER_OTLP_ENDPOINT=https://collector.example.com
|
|
17
|
+
- OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <token>
|
|
18
|
+
4) Import the JSON dashboards into Grafana and set the Tempo + Prometheus data sources.
|
|
19
|
+
|
|
20
|
+
Notes
|
|
21
|
+
- Spans appear in Tempo’s Explore/Trace view (service.name=visor).
|
|
22
|
+
- Metrics are emitted when OTLP metrics exporter is configured; see docs/telemetry-tracing-rfc.md for details.
|
|
23
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"__inputs": [],
|
|
3
|
+
"title": "Visor Diagrams",
|
|
4
|
+
"timezone": "browser",
|
|
5
|
+
"panels": [
|
|
6
|
+
{
|
|
7
|
+
"type": "bargauge",
|
|
8
|
+
"title": "Diagram Blocks by Origin (5m rate)",
|
|
9
|
+
"targets": [
|
|
10
|
+
{
|
|
11
|
+
"datasource": { "type": "prometheus", "uid": "PROM_DS" },
|
|
12
|
+
"expr": "sum(rate(visor_diagram_blocks_total[5m])) by (origin)"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"version": 1,
|
|
19
|
+
"editable": true
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"__inputs": [],
|
|
3
|
+
"title": "Visor Overview",
|
|
4
|
+
"timezone": "browser",
|
|
5
|
+
"panels": [
|
|
6
|
+
{
|
|
7
|
+
"type": "timeseries",
|
|
8
|
+
"title": "Check Duration (ms)",
|
|
9
|
+
"targets": [
|
|
10
|
+
{
|
|
11
|
+
"datasource": { "type": "prometheus", "uid": "PROM_DS" },
|
|
12
|
+
"expr": "histogram_quantile(0.95, sum(rate(visor_check_duration_ms_bucket[5m])) by (le))"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"fieldConfig": { "defaults": { "unit": "ms" }, "overrides": [] },
|
|
16
|
+
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "stat",
|
|
20
|
+
"title": "Issues by Severity (rate)",
|
|
21
|
+
"targets": [
|
|
22
|
+
{
|
|
23
|
+
"datasource": { "type": "prometheus", "uid": "PROM_DS" },
|
|
24
|
+
"expr": "sum(rate(visor_check_issues_total[5m])) by (severity)"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 }
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"version": 1,
|
|
31
|
+
"editable": true
|
|
32
|
+
}
|
|
33
|
+
|