@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,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example: SDK with manually constructed config object
|
|
3
|
+
* This demonstrates using loadConfig() with a raw config object
|
|
4
|
+
* instead of loading from a file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { loadConfig, runChecks } from '../dist/sdk/sdk.mjs';
|
|
8
|
+
|
|
9
|
+
async function main() {
|
|
10
|
+
// Load and validate config from an object (not a file!)
|
|
11
|
+
// loadConfig() validates, applies defaults, and returns a complete config
|
|
12
|
+
const config = await loadConfig({
|
|
13
|
+
version: '1.0',
|
|
14
|
+
checks: {
|
|
15
|
+
'security-check': {
|
|
16
|
+
type: 'command',
|
|
17
|
+
exec: 'echo "Running security scan..."',
|
|
18
|
+
},
|
|
19
|
+
'lint-check': {
|
|
20
|
+
type: 'command',
|
|
21
|
+
exec: 'echo "Running linter..."',
|
|
22
|
+
depends_on: ['security-check'],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
console.log('Running checks with manually constructed config...\n');
|
|
28
|
+
|
|
29
|
+
// Run all checks defined in the config
|
|
30
|
+
const result = await runChecks({
|
|
31
|
+
config,
|
|
32
|
+
checks: Object.keys(config.checks),
|
|
33
|
+
output: { format: 'json' },
|
|
34
|
+
debug: false,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Display results
|
|
38
|
+
console.log('Execution summary:');
|
|
39
|
+
console.log(` Total checks executed: ${result.checksExecuted.length}`);
|
|
40
|
+
console.log(` Total issues found: ${result.reviewSummary.issues?.length || 0}`);
|
|
41
|
+
console.log(` Execution time: ${result.executionTime}ms`);
|
|
42
|
+
console.log(` Timestamp: ${result.timestamp}`);
|
|
43
|
+
|
|
44
|
+
// Display check results
|
|
45
|
+
console.log('\nCheck results:');
|
|
46
|
+
for (const checkName of result.checksExecuted) {
|
|
47
|
+
console.log(` ✓ ${checkName}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Display any issues found
|
|
51
|
+
if (result.reviewSummary.issues && result.reviewSummary.issues.length > 0) {
|
|
52
|
+
console.log('\nIssues found:');
|
|
53
|
+
result.reviewSummary.issues.forEach((issue, idx) => {
|
|
54
|
+
console.log(` ${idx + 1}. [${issue.severity}] ${issue.message}`);
|
|
55
|
+
console.log(` File: ${issue.file}:${issue.line}`);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
main().catch((err) => {
|
|
63
|
+
console.error('Error:', err);
|
|
64
|
+
process.exit(1);
|
|
65
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript SDK Example
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates:
|
|
5
|
+
* - Type-safe config construction
|
|
6
|
+
* - TypeScript type inference
|
|
7
|
+
* - Compile-time type checking
|
|
8
|
+
* - Using exported types
|
|
9
|
+
*/
|
|
10
|
+
// Import from the package for full TypeScript type definitions
|
|
11
|
+
// In a real project, you would use: '@probelabs/visor/sdk'
|
|
12
|
+
// For this example, we import from the built SDK with type definitions
|
|
13
|
+
import { loadConfig, runChecks } from '../dist/sdk/sdk.js';
|
|
14
|
+
async function main() {
|
|
15
|
+
console.log('=== Visor SDK - TypeScript Example ===\n');
|
|
16
|
+
// Type-safe config construction (note: VisorConfig is exported from SDK)
|
|
17
|
+
const rawConfig = {
|
|
18
|
+
version: '1.0',
|
|
19
|
+
checks: {
|
|
20
|
+
'type-check': {
|
|
21
|
+
type: 'command',
|
|
22
|
+
exec: 'echo "Running TypeScript compiler..."',
|
|
23
|
+
tags: ['typescript', 'build'],
|
|
24
|
+
},
|
|
25
|
+
'unit-tests': {
|
|
26
|
+
type: 'command',
|
|
27
|
+
exec: 'echo "Running unit tests..."',
|
|
28
|
+
depends_on: ['type-check'],
|
|
29
|
+
tags: ['testing'],
|
|
30
|
+
},
|
|
31
|
+
'build': {
|
|
32
|
+
type: 'command',
|
|
33
|
+
exec: 'echo "Building application..."',
|
|
34
|
+
depends_on: ['type-check', 'unit-tests'],
|
|
35
|
+
tags: ['build'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
max_parallelism: 2,
|
|
39
|
+
fail_fast: false,
|
|
40
|
+
};
|
|
41
|
+
// Load and validate config with full type safety
|
|
42
|
+
const config = await loadConfig(rawConfig);
|
|
43
|
+
console.log('✅ Config validated and loaded');
|
|
44
|
+
console.log(` Checks: ${Object.keys(config.checks).length}`);
|
|
45
|
+
console.log(` Max parallelism: ${config.max_parallelism}\n`);
|
|
46
|
+
// Run checks with type-safe options
|
|
47
|
+
const result = await runChecks({
|
|
48
|
+
config,
|
|
49
|
+
checks: ['type-check', 'unit-tests', 'build'],
|
|
50
|
+
output: { format: 'json' },
|
|
51
|
+
maxParallelism: 2,
|
|
52
|
+
debug: false,
|
|
53
|
+
tagFilter: { include: ['typescript', 'testing', 'build'] },
|
|
54
|
+
});
|
|
55
|
+
// Type-safe result inspection
|
|
56
|
+
console.log('📊 Results:');
|
|
57
|
+
console.log(` Checks executed: ${result.checksExecuted.length}`);
|
|
58
|
+
console.log(` Execution time: ${result.executionTime}ms`);
|
|
59
|
+
console.log(` Issues found: ${result.reviewSummary.issues?.length ?? 0}`);
|
|
60
|
+
console.log(` Timestamp: ${result.timestamp}`);
|
|
61
|
+
// Type-safe iteration over results
|
|
62
|
+
console.log('\n Executed checks:');
|
|
63
|
+
result.checksExecuted.forEach((checkName, index) => {
|
|
64
|
+
console.log(` ${index + 1}. ${checkName}`);
|
|
65
|
+
});
|
|
66
|
+
// Demonstrate type checking with issues
|
|
67
|
+
if (result.reviewSummary.issues && result.reviewSummary.issues.length > 0) {
|
|
68
|
+
console.log('\n Issues:');
|
|
69
|
+
result.reviewSummary.issues.forEach((issue) => {
|
|
70
|
+
// TypeScript knows the structure of issue
|
|
71
|
+
console.log(` ${issue.file}:${issue.line} - ${issue.message}`);
|
|
72
|
+
console.log(` Severity: ${issue.severity}`);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
console.log('\n✅ TypeScript example complete!\n');
|
|
76
|
+
}
|
|
77
|
+
// Run with proper error handling
|
|
78
|
+
main().catch((error) => {
|
|
79
|
+
console.error('❌ Error:', error.message);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript SDK Example
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates:
|
|
5
|
+
* - Type-safe config construction
|
|
6
|
+
* - TypeScript type inference
|
|
7
|
+
* - Compile-time type checking
|
|
8
|
+
* - Using exported types
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Import from the package for full TypeScript type definitions
|
|
12
|
+
// In a real project, you would use: '@probelabs/visor/sdk'
|
|
13
|
+
// For this example, we import from the built SDK with type definitions
|
|
14
|
+
import { loadConfig, runChecks, type VisorConfig, type RunOptions } from '../dist/sdk/sdk.js';
|
|
15
|
+
|
|
16
|
+
async function main(): Promise<void> {
|
|
17
|
+
console.log('=== Visor SDK - TypeScript Example ===\n');
|
|
18
|
+
|
|
19
|
+
// Type-safe config construction (note: VisorConfig is exported from SDK)
|
|
20
|
+
const rawConfig: Partial<VisorConfig> = {
|
|
21
|
+
version: '1.0',
|
|
22
|
+
checks: {
|
|
23
|
+
'type-check': {
|
|
24
|
+
type: 'command',
|
|
25
|
+
exec: 'echo "Running TypeScript compiler..."',
|
|
26
|
+
tags: ['typescript', 'build'],
|
|
27
|
+
},
|
|
28
|
+
'unit-tests': {
|
|
29
|
+
type: 'command',
|
|
30
|
+
exec: 'echo "Running unit tests..."',
|
|
31
|
+
depends_on: ['type-check'],
|
|
32
|
+
tags: ['testing'],
|
|
33
|
+
},
|
|
34
|
+
'build': {
|
|
35
|
+
type: 'command',
|
|
36
|
+
exec: 'echo "Building application..."',
|
|
37
|
+
depends_on: ['type-check', 'unit-tests'],
|
|
38
|
+
tags: ['build'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
max_parallelism: 2,
|
|
42
|
+
fail_fast: false,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Load and validate config with full type safety
|
|
46
|
+
const config = await loadConfig(rawConfig);
|
|
47
|
+
|
|
48
|
+
console.log('✅ Config validated and loaded');
|
|
49
|
+
console.log(` Checks: ${Object.keys(config.checks).length}`);
|
|
50
|
+
console.log(` Max parallelism: ${config.max_parallelism}\n`);
|
|
51
|
+
|
|
52
|
+
// Run checks with type-safe options
|
|
53
|
+
const result = await runChecks({
|
|
54
|
+
config,
|
|
55
|
+
checks: ['type-check', 'unit-tests', 'build'],
|
|
56
|
+
output: { format: 'json' },
|
|
57
|
+
maxParallelism: 2,
|
|
58
|
+
debug: false,
|
|
59
|
+
tagFilter: { include: ['typescript', 'testing', 'build'] },
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Type-safe result inspection
|
|
63
|
+
console.log('📊 Results:');
|
|
64
|
+
console.log(` Checks executed: ${result.checksExecuted.length}`);
|
|
65
|
+
console.log(` Execution time: ${result.executionTime}ms`);
|
|
66
|
+
console.log(` Issues found: ${result.reviewSummary.issues?.length ?? 0}`);
|
|
67
|
+
console.log(` Timestamp: ${result.timestamp}`);
|
|
68
|
+
|
|
69
|
+
// Type-safe iteration over results
|
|
70
|
+
console.log('\n Executed checks:');
|
|
71
|
+
result.checksExecuted.forEach((checkName: string, index: number) => {
|
|
72
|
+
console.log(` ${index + 1}. ${checkName}`);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Demonstrate type checking with issues
|
|
76
|
+
if (result.reviewSummary.issues && result.reviewSummary.issues.length > 0) {
|
|
77
|
+
console.log('\n Issues:');
|
|
78
|
+
result.reviewSummary.issues.forEach((issue) => {
|
|
79
|
+
// TypeScript knows the structure of issue
|
|
80
|
+
console.log(` ${issue.file}:${issue.line} - ${issue.message}`);
|
|
81
|
+
console.log(` Severity: ${issue.severity}`);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
console.log('\n✅ TypeScript example complete!\n');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Run with proper error handling
|
|
89
|
+
main().catch((error: Error) => {
|
|
90
|
+
console.error('❌ Error:', error.message);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
});
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Example configuration demonstrating AI session reuse functionality
|
|
2
|
+
# This allows subsequent checks to continue conversations with AI models
|
|
3
|
+
|
|
4
|
+
version: "1.0"
|
|
5
|
+
|
|
6
|
+
# Example 1: Simple session reuse for follow-up analysis
|
|
7
|
+
steps:
|
|
8
|
+
# Initial security analysis - creates a new AI session
|
|
9
|
+
security-analysis:
|
|
10
|
+
type: ai
|
|
11
|
+
prompt: |
|
|
12
|
+
You are a security expert reviewing code changes. Analyze the provided code for:
|
|
13
|
+
|
|
14
|
+
1. Authentication and authorization issues
|
|
15
|
+
2. Input validation vulnerabilities
|
|
16
|
+
3. Data exposure risks
|
|
17
|
+
4. Cryptographic weaknesses
|
|
18
|
+
5. Injection vulnerabilities
|
|
19
|
+
|
|
20
|
+
Provide specific examples and recommendations for each issue found.
|
|
21
|
+
on:
|
|
22
|
+
- pr_opened
|
|
23
|
+
- pr_updated
|
|
24
|
+
ai:
|
|
25
|
+
provider: anthropic # or google, openai
|
|
26
|
+
model: claude-3-sonnet-20240229
|
|
27
|
+
|
|
28
|
+
# Follow-up check that reuses the previous AI session
|
|
29
|
+
security-remediation:
|
|
30
|
+
type: ai
|
|
31
|
+
prompt: |
|
|
32
|
+
Based on our previous security analysis discussion, now provide:
|
|
33
|
+
|
|
34
|
+
1. Detailed remediation steps for each identified security issue
|
|
35
|
+
2. Code examples showing secure implementations
|
|
36
|
+
3. Best practices specific to this codebase
|
|
37
|
+
4. Priority ranking of fixes needed
|
|
38
|
+
|
|
39
|
+
Build upon the context we established in our previous conversation.
|
|
40
|
+
on:
|
|
41
|
+
- pr_opened
|
|
42
|
+
- pr_updated
|
|
43
|
+
depends_on:
|
|
44
|
+
- security-analysis
|
|
45
|
+
reuse_ai_session: true # This will reuse the AI session from security-analysis
|
|
46
|
+
|
|
47
|
+
# Example 2: Multi-level session reuse chain
|
|
48
|
+
architecture-review:
|
|
49
|
+
type: ai
|
|
50
|
+
prompt: |
|
|
51
|
+
Analyze the architectural patterns and design decisions in this code.
|
|
52
|
+
Identify the main components, their interactions, and design quality.
|
|
53
|
+
on:
|
|
54
|
+
- pr_opened
|
|
55
|
+
ai:
|
|
56
|
+
provider: anthropic
|
|
57
|
+
model: claude-3-sonnet-20240229
|
|
58
|
+
|
|
59
|
+
performance-analysis:
|
|
60
|
+
type: ai
|
|
61
|
+
prompt: |
|
|
62
|
+
Continuing our architectural discussion, now focus on performance aspects.
|
|
63
|
+
Consider the architectural patterns we identified and analyze:
|
|
64
|
+
|
|
65
|
+
1. Performance bottlenecks
|
|
66
|
+
2. Scalability concerns
|
|
67
|
+
3. Resource usage efficiency
|
|
68
|
+
4. Optimization opportunities
|
|
69
|
+
on:
|
|
70
|
+
- pr_opened
|
|
71
|
+
depends_on:
|
|
72
|
+
- architecture-review
|
|
73
|
+
reuse_ai_session: true
|
|
74
|
+
|
|
75
|
+
recommendations-summary:
|
|
76
|
+
type: ai
|
|
77
|
+
prompt: |
|
|
78
|
+
Based on our complete analysis covering architecture and performance,
|
|
79
|
+
provide a prioritized summary of recommendations with:
|
|
80
|
+
|
|
81
|
+
1. Critical issues requiring immediate attention
|
|
82
|
+
2. Medium-term improvements
|
|
83
|
+
3. Long-term architectural considerations
|
|
84
|
+
4. Implementation roadmap
|
|
85
|
+
on:
|
|
86
|
+
- pr_opened
|
|
87
|
+
depends_on:
|
|
88
|
+
- performance-analysis
|
|
89
|
+
reuse_ai_session: true
|
|
90
|
+
|
|
91
|
+
# Example 3: Mixed session reuse and independent checks
|
|
92
|
+
code-style:
|
|
93
|
+
type: ai
|
|
94
|
+
prompt: |
|
|
95
|
+
Review code style, formatting, and maintainability concerns.
|
|
96
|
+
Focus on readability, naming conventions, and code organization.
|
|
97
|
+
on:
|
|
98
|
+
- pr_opened
|
|
99
|
+
ai:
|
|
100
|
+
provider: openai
|
|
101
|
+
model: gpt-4
|
|
102
|
+
|
|
103
|
+
documentation-review:
|
|
104
|
+
type: ai
|
|
105
|
+
prompt: |
|
|
106
|
+
Review documentation quality including:
|
|
107
|
+
- Code comments
|
|
108
|
+
- README updates
|
|
109
|
+
- API documentation
|
|
110
|
+
- Inline documentation
|
|
111
|
+
on:
|
|
112
|
+
- pr_opened
|
|
113
|
+
# This runs independently - no session reuse
|
|
114
|
+
|
|
115
|
+
comprehensive-summary:
|
|
116
|
+
type: ai
|
|
117
|
+
prompt: |
|
|
118
|
+
Create a comprehensive summary combining insights from all previous analyses.
|
|
119
|
+
Provide an executive summary with key findings and recommendations.
|
|
120
|
+
on:
|
|
121
|
+
- pr_opened
|
|
122
|
+
depends_on:
|
|
123
|
+
- security-remediation
|
|
124
|
+
- recommendations-summary
|
|
125
|
+
- code-style
|
|
126
|
+
- documentation-review
|
|
127
|
+
reuse_ai_session: true # Reuses session from security-remediation (first dependency)
|
|
128
|
+
|
|
129
|
+
# Output configuration
|
|
130
|
+
output:
|
|
131
|
+
pr_comment:
|
|
132
|
+
format: markdown
|
|
133
|
+
group_by: check
|
|
134
|
+
collapse: true
|
|
135
|
+
debug:
|
|
136
|
+
enabled: true
|
|
137
|
+
includePrompts: false
|
|
138
|
+
includeRawResponses: false
|
|
139
|
+
includeTiming: true
|
|
140
|
+
includeProviderInfo: true
|
|
141
|
+
|
|
142
|
+
# Execution settings
|
|
143
|
+
max_parallelism: 3 # Session reuse checks will still run sequentially when needed
|
|
144
|
+
fail_fast: false
|
|
145
|
+
|
|
146
|
+
# Notes:
|
|
147
|
+
# 1. reuse_ai_session: true REQUIRES depends_on to be specified
|
|
148
|
+
# 2. Checks with session reuse will force sequential execution within their dependency chain
|
|
149
|
+
# 3. Session IDs are automatically managed and cleaned up after execution
|
|
150
|
+
# 4. Sessions maintain conversation context, allowing for more sophisticated analysis
|
|
151
|
+
# 5. Mix session reuse with independent checks for optimal performance and context
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
version: "2.0"
|
|
2
|
+
|
|
3
|
+
# Session reuse example: reuse_ai_session: self
|
|
4
|
+
# ---------------------------------------------
|
|
5
|
+
# This example demonstrates how a single AI step can reuse its own
|
|
6
|
+
# ProbeAgent session across multiple loops within the same engine run.
|
|
7
|
+
#
|
|
8
|
+
# Flow:
|
|
9
|
+
# seed (script) → convo (ai, reuse_ai_session: self, session_mode: append)
|
|
10
|
+
# └─ on_success.goto_js: loops back to convo up to 3 times
|
|
11
|
+
#
|
|
12
|
+
# The first time `convo` runs, it creates a new AI session. On subsequent
|
|
13
|
+
# iterations in the same run, `reuse_ai_session: self` causes the engine
|
|
14
|
+
# to reuse that same session (with `session_mode: append`), so the model
|
|
15
|
+
# keeps conversational context.
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
# Simple seed step to provide deterministic input to the AI check.
|
|
19
|
+
seed:
|
|
20
|
+
type: script
|
|
21
|
+
criticality: info
|
|
22
|
+
content: |
|
|
23
|
+
return { text: "hello from seed" };
|
|
24
|
+
|
|
25
|
+
# AI step that loops back to itself while reusing its own session.
|
|
26
|
+
convo:
|
|
27
|
+
type: ai
|
|
28
|
+
depends_on: [seed]
|
|
29
|
+
criticality: info
|
|
30
|
+
reuse_ai_session: self
|
|
31
|
+
session_mode: append
|
|
32
|
+
# Keep schema simple here – we only care about call counts in tests.
|
|
33
|
+
ai:
|
|
34
|
+
provider: mock
|
|
35
|
+
model: mock
|
|
36
|
+
disableTools: true
|
|
37
|
+
allowedTools: []
|
|
38
|
+
system_prompt: |
|
|
39
|
+
You are a tiny echo assistant.
|
|
40
|
+
Answer concisely and keep track of how the conversation evolves.
|
|
41
|
+
prompt: |
|
|
42
|
+
You are in a small internal conversation used to test AI session reuse.
|
|
43
|
+
|
|
44
|
+
Seed message: {{ outputs['seed'].text }}
|
|
45
|
+
|
|
46
|
+
Past convo outputs for this run (if any):
|
|
47
|
+
{% assign hist = outputs_history['convo'] | default: empty %}
|
|
48
|
+
{% if hist and hist.size > 0 %}
|
|
49
|
+
{% for h in hist %}
|
|
50
|
+
- Previous reply {{ forloop.index }} seen in this run.
|
|
51
|
+
{% endfor %}
|
|
52
|
+
{% else %}
|
|
53
|
+
- No previous replies yet in this run.
|
|
54
|
+
{% endif %}
|
|
55
|
+
on_success:
|
|
56
|
+
# Loop this step a few times to exercise reuse_ai_session: self.
|
|
57
|
+
goto_js: |
|
|
58
|
+
// "attempt" is the 1-based execution count for this step in this run.
|
|
59
|
+
// Run convo exactly 3 times, then stop.
|
|
60
|
+
return attempt < 3 ? 'convo' : null;
|
|
61
|
+
|
|
62
|
+
tests:
|
|
63
|
+
defaults:
|
|
64
|
+
strict: true
|
|
65
|
+
ai_provider: mock
|
|
66
|
+
|
|
67
|
+
cases:
|
|
68
|
+
- name: self-session-single-run
|
|
69
|
+
description: |
|
|
70
|
+
Basic smoke test: the workflow executes successfully and the
|
|
71
|
+
convo step runs exactly once. The config itself demonstrates
|
|
72
|
+
reuse_ai_session: self + session_mode: append for workflows
|
|
73
|
+
that route back to the same AI step.
|
|
74
|
+
event: manual
|
|
75
|
+
fixture: local.minimal
|
|
76
|
+
expect:
|
|
77
|
+
calls:
|
|
78
|
+
- step: seed
|
|
79
|
+
exactly: 1
|
|
80
|
+
- step: convo
|
|
81
|
+
exactly: 1
|