@probelabs/visor 0.1.106 → 0.1.107

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.
Files changed (450) hide show
  1. package/README.md +65 -2
  2. package/action.yml +1 -1
  3. package/defaults/code-refiner.yaml +114 -0
  4. package/defaults/{.visor.yaml → code-review.yaml} +35 -226
  5. package/defaults/override.yaml +52 -0
  6. package/defaults/task-refinement.yaml +620 -0
  7. package/defaults/visor.tests.yaml +674 -0
  8. package/defaults/visor.yaml +482 -0
  9. package/dist/663.index.js +2 -3
  10. package/dist/80.index.js +2 -3
  11. package/dist/action-cli-bridge.d.ts +11 -82
  12. package/dist/action-cli-bridge.d.ts.map +1 -1
  13. package/dist/ai-review-service.d.ts +15 -0
  14. package/dist/ai-review-service.d.ts.map +1 -1
  15. package/dist/check-execution-engine.d.ts +19 -331
  16. package/dist/check-execution-engine.d.ts.map +1 -1
  17. package/dist/cli-main.d.ts.map +1 -1
  18. package/dist/cli.d.ts +0 -1
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/config.d.ts +16 -0
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/cron-scheduler.d.ts +3 -3
  23. package/dist/cron-scheduler.d.ts.map +1 -1
  24. package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
  25. package/dist/defaults/code-refiner.yaml +114 -0
  26. package/dist/defaults/{.visor.yaml → code-review.yaml} +35 -226
  27. package/dist/defaults/override.yaml +52 -0
  28. package/dist/defaults/task-refinement.yaml +620 -0
  29. package/dist/defaults/visor.tests.yaml +674 -0
  30. package/dist/defaults/visor.yaml +482 -0
  31. package/dist/docs/DEPLOYMENT.md +118 -0
  32. package/dist/docs/GITHUB_CHECKS.md +280 -0
  33. package/dist/docs/NPM_USAGE.md +208 -0
  34. package/dist/docs/action-reference.md +19 -0
  35. package/dist/docs/advanced-ai.md +178 -0
  36. package/dist/docs/ai-configuration.md +468 -0
  37. package/dist/docs/author-permissions.md +610 -0
  38. package/dist/docs/ci-cli-mode.md +34 -0
  39. package/dist/docs/claude-code.md +74 -0
  40. package/dist/docs/command-provider.md +559 -0
  41. package/dist/docs/commands.md +8 -0
  42. package/dist/docs/configuration.md +303 -0
  43. package/dist/docs/custom-tools.md +424 -0
  44. package/dist/docs/dashboards/README.md +23 -0
  45. package/dist/docs/dashboards/grafana-visor-diagrams.json +20 -0
  46. package/dist/docs/dashboards/grafana-visor-overview.json +33 -0
  47. package/dist/docs/debug-visualizer-progress.md +572 -0
  48. package/dist/docs/debug-visualizer-rfc.md +691 -0
  49. package/dist/docs/debug-visualizer.md +114 -0
  50. package/dist/docs/debugging.md +636 -0
  51. package/dist/docs/default-output-schema.md +28 -0
  52. package/dist/docs/dependencies.md +369 -0
  53. package/dist/docs/dev-playbook.md +9 -0
  54. package/dist/docs/engine-state-machine-plan.md +333 -0
  55. package/dist/docs/event-driven-github-integration-rfc.md +743 -0
  56. package/dist/docs/event-triggers.md +292 -0
  57. package/dist/docs/execution-statistics-rfc.md +290 -0
  58. package/dist/docs/fact-validator-gap-analysis.md +178 -0
  59. package/dist/docs/fact-validator-implementation-plan.md +1235 -0
  60. package/dist/docs/fail-if.md +95 -0
  61. package/dist/docs/failure-conditions-implementation.md +271 -0
  62. package/dist/docs/failure-conditions-schema.md +173 -0
  63. package/dist/docs/failure-routing-rfc.md +193 -0
  64. package/dist/docs/failure-routing.md +507 -0
  65. package/dist/docs/foreach-dependency-propagation.md +473 -0
  66. package/dist/docs/github-ops.md +89 -0
  67. package/dist/docs/goto-forward-run-plan.md +113 -0
  68. package/dist/docs/guides/criticality-modes.md +332 -0
  69. package/dist/docs/guides/fault-management-and-contracts.md +738 -0
  70. package/dist/docs/guides/workflow-style-guide.md +224 -0
  71. package/dist/docs/http.md +299 -0
  72. package/dist/docs/human-input-provider.md +372 -0
  73. package/dist/docs/limits.md +64 -0
  74. package/dist/docs/liquid-templates.md +347 -0
  75. package/dist/docs/loop-routing-refactor.md +89 -0
  76. package/dist/docs/mcp-provider.md +557 -0
  77. package/dist/docs/mcp.md +124 -0
  78. package/dist/docs/memory.md +903 -0
  79. package/dist/docs/observability.md +12 -0
  80. package/dist/docs/output-formats.md +20 -0
  81. package/dist/docs/output-formatting.md +29 -0
  82. package/dist/docs/output-history.md +383 -0
  83. package/dist/docs/performance.md +6 -0
  84. package/dist/docs/pluggable.md +124 -0
  85. package/dist/docs/proposals/snapshot-scope-execution.md +236 -0
  86. package/dist/docs/recipes.md +21 -0
  87. package/dist/docs/roadmap/criticality-implementation-tasks.md +92 -0
  88. package/dist/docs/schema-next-pr.md +10 -0
  89. package/dist/docs/schema-templates.md +68 -0
  90. package/dist/docs/script.md +34 -0
  91. package/dist/docs/sdk.md +222 -0
  92. package/dist/docs/security.md +7 -0
  93. package/dist/docs/suppressions.md +89 -0
  94. package/dist/docs/tag-filtering.md +258 -0
  95. package/dist/docs/telemetry-setup.md +119 -0
  96. package/dist/docs/telemetry-tracing-rfc.md +275 -0
  97. package/dist/docs/test-framework-rfc.md +680 -0
  98. package/dist/docs/testing/assertions.md +85 -0
  99. package/dist/docs/testing/ci.md +44 -0
  100. package/dist/docs/testing/cli.md +41 -0
  101. package/dist/docs/testing/cookbook.md +172 -0
  102. package/dist/docs/testing/dsl-reference.md +199 -0
  103. package/dist/docs/testing/fixtures-and-mocks.md +91 -0
  104. package/dist/docs/testing/flows.md +92 -0
  105. package/dist/docs/testing/getting-started.md +93 -0
  106. package/dist/docs/testing/troubleshooting.md +55 -0
  107. package/dist/docs/timeouts.md +50 -0
  108. package/dist/docs/troubleshooting.md +7 -0
  109. package/dist/docs/visor-sdk-rfc.md +186 -0
  110. package/dist/docs/workflows.md +569 -0
  111. package/dist/engine/on-finish/orchestrator.d.ts +19 -0
  112. package/dist/engine/on-finish/orchestrator.d.ts.map +1 -0
  113. package/dist/engine/on-finish/utils.d.ts +44 -0
  114. package/dist/engine/on-finish/utils.d.ts.map +1 -0
  115. package/dist/event-bus/event-bus.d.ts +13 -0
  116. package/dist/event-bus/event-bus.d.ts.map +1 -0
  117. package/dist/event-bus/types.d.ts +57 -0
  118. package/dist/event-bus/types.d.ts.map +1 -0
  119. package/dist/examples/.claude/agents/code-reviewer.md +69 -0
  120. package/dist/examples/.mcp.json +34 -0
  121. package/dist/examples/CALCULATOR-SDK.md +364 -0
  122. package/dist/examples/README.md +384 -0
  123. package/dist/examples/ai-retry-fallback-config.yaml +180 -0
  124. package/dist/examples/ai-with-bash.yaml +126 -0
  125. package/dist/examples/ai-with-mcp.yaml +82 -0
  126. package/dist/examples/basic-human-input.yaml +15 -0
  127. package/dist/examples/bedrock-config.yaml +77 -0
  128. package/dist/examples/calculator-config.yaml +133 -0
  129. package/dist/examples/calculator-json-output-guide.md +311 -0
  130. package/dist/examples/calculator-sdk-automated.ts +340 -0
  131. package/dist/examples/calculator-sdk-example.ts +275 -0
  132. package/dist/examples/calculator-sdk-json.ts +331 -0
  133. package/dist/examples/calculator-sdk-real.ts +374 -0
  134. package/dist/examples/calculator-sdk-test.ts +148 -0
  135. package/dist/examples/claude-code-config.yaml +191 -0
  136. package/dist/examples/cron-webhook-config.yaml +215 -0
  137. package/dist/examples/custom-template.liquid +57 -0
  138. package/dist/examples/custom-tools-example.yaml +281 -0
  139. package/dist/examples/enhanced-config.yaml +165 -0
  140. package/dist/examples/environments/visor.base.yaml +92 -0
  141. package/dist/examples/environments/visor.dev.yaml +33 -0
  142. package/dist/examples/environments/visor.prod.yaml +95 -0
  143. package/dist/examples/environments/visor.staging.yaml +46 -0
  144. package/dist/examples/fact-validator.yaml +361 -0
  145. package/dist/examples/fail-if-simple.yaml +90 -0
  146. package/dist/examples/failure-conditions-advanced.yaml +136 -0
  147. package/dist/examples/failure-conditions-basic.yaml +48 -0
  148. package/dist/examples/failure-conditions-github-style.yaml +119 -0
  149. package/dist/examples/failure-conditions-migration.yaml +74 -0
  150. package/dist/examples/for-loop-example.yaml +176 -0
  151. package/dist/examples/forEach-example.yaml +120 -0
  152. package/dist/examples/github-workflow-with-tags.yml +163 -0
  153. package/dist/examples/http-integration-config.yaml +240 -0
  154. package/dist/examples/https-server-config.yaml +209 -0
  155. package/dist/examples/human-input-example.yaml +63 -0
  156. package/dist/examples/if-conditions.yaml +173 -0
  157. package/dist/examples/jira-simple-example.yaml +56 -0
  158. package/dist/examples/jira-single-issue-workflow.yaml +166 -0
  159. package/dist/examples/jira-workflow-mcp.yaml +182 -0
  160. package/dist/examples/mcp/analyzer.py +119 -0
  161. package/dist/examples/mcp-provider-example.yaml +301 -0
  162. package/dist/examples/memory-counter.yaml +99 -0
  163. package/dist/examples/memory-error-collection.yaml +104 -0
  164. package/dist/examples/memory-exec-js.yaml +247 -0
  165. package/dist/examples/memory-namespace-isolation.yaml +184 -0
  166. package/dist/examples/memory-retry-counter.yaml +65 -0
  167. package/dist/examples/memory-state-machine.yaml +170 -0
  168. package/dist/examples/outputs-raw-basic.yaml +26 -0
  169. package/dist/examples/project-with-tools.yaml +174 -0
  170. package/dist/examples/prompts/architecture-analysis.liquid +116 -0
  171. package/dist/examples/prompts/security-comprehensive.liquid +107 -0
  172. package/dist/examples/quick-start-tags.yaml +53 -0
  173. package/dist/examples/routing-basic.yaml +35 -0
  174. package/dist/examples/routing-dynamic-js.yaml +46 -0
  175. package/dist/examples/routing-foreach.yaml +34 -0
  176. package/dist/examples/routing-goto-event.yaml +34 -0
  177. package/dist/examples/routing-on-success.yaml +25 -0
  178. package/dist/examples/run-calculator-demo.sh +71 -0
  179. package/dist/examples/sdk-basic.mjs +10 -0
  180. package/dist/examples/sdk-cjs.cjs +10 -0
  181. package/dist/examples/sdk-comprehensive.mjs +175 -0
  182. package/dist/examples/sdk-manual-config.mjs +65 -0
  183. package/dist/examples/sdk-typescript.js +81 -0
  184. package/dist/examples/sdk-typescript.ts +92 -0
  185. package/dist/examples/session-reuse-config.yaml +151 -0
  186. package/dist/examples/templates/security-report.liquid +137 -0
  187. package/dist/examples/tools-library.yaml +281 -0
  188. package/dist/examples/transform-example.yaml +199 -0
  189. package/dist/examples/visor-with-tags.yaml +198 -0
  190. package/dist/examples/webhook-pipeline-config.yaml +218 -0
  191. package/dist/examples/workflows/calculator-workflow.yaml +163 -0
  192. package/dist/examples/workflows/code-quality.yaml +222 -0
  193. package/dist/examples/workflows/quick-pr-check.yaml +90 -0
  194. package/dist/examples/workflows/workflow-composition-example.yaml +130 -0
  195. package/dist/failure-condition-evaluator.d.ts +1 -0
  196. package/dist/failure-condition-evaluator.d.ts.map +1 -1
  197. package/dist/frontends/github-frontend.d.ts +38 -0
  198. package/dist/frontends/github-frontend.d.ts.map +1 -0
  199. package/dist/frontends/host.d.ts +43 -0
  200. package/dist/frontends/host.d.ts.map +1 -0
  201. package/dist/frontends/ndjson-sink.d.ts +12 -0
  202. package/dist/frontends/ndjson-sink.d.ts.map +1 -0
  203. package/dist/generated/config-schema.d.ts +564 -22
  204. package/dist/generated/config-schema.d.ts.map +1 -1
  205. package/dist/generated/config-schema.json +612 -24
  206. package/dist/github-check-service.d.ts +4 -6
  207. package/dist/github-check-service.d.ts.map +1 -1
  208. package/dist/github-comments.d.ts +0 -4
  209. package/dist/github-comments.d.ts.map +1 -1
  210. package/dist/index.d.ts.map +1 -1
  211. package/dist/index.js +70335 -62514
  212. package/dist/liquid-extensions.d.ts.map +1 -1
  213. package/dist/logger.d.ts +1 -0
  214. package/dist/logger.d.ts.map +1 -1
  215. package/dist/memory-store.d.ts +6 -0
  216. package/dist/memory-store.d.ts.map +1 -1
  217. package/dist/output/assistant-json/template.liquid +0 -0
  218. package/dist/output/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
  219. package/dist/output/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
  220. package/dist/output-formatters.d.ts +1 -1
  221. package/dist/output-formatters.d.ts.map +1 -1
  222. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  223. package/dist/providers/check-provider-registry.d.ts +6 -0
  224. package/dist/providers/check-provider-registry.d.ts.map +1 -1
  225. package/dist/providers/check-provider.interface.d.ts +34 -1
  226. package/dist/providers/check-provider.interface.d.ts.map +1 -1
  227. package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
  228. package/dist/providers/command-check-provider.d.ts +1 -1
  229. package/dist/providers/command-check-provider.d.ts.map +1 -1
  230. package/dist/providers/custom-tool-executor.d.ts +61 -0
  231. package/dist/providers/custom-tool-executor.d.ts.map +1 -0
  232. package/dist/providers/github-ops-provider.d.ts.map +1 -1
  233. package/dist/providers/http-client-provider.d.ts +1 -4
  234. package/dist/providers/http-client-provider.d.ts.map +1 -1
  235. package/dist/providers/human-input-check-provider.d.ts +3 -0
  236. package/dist/providers/human-input-check-provider.d.ts.map +1 -1
  237. package/dist/providers/index.d.ts +1 -0
  238. package/dist/providers/index.d.ts.map +1 -1
  239. package/dist/providers/log-check-provider.d.ts +2 -5
  240. package/dist/providers/log-check-provider.d.ts.map +1 -1
  241. package/dist/providers/mcp-check-provider.d.ts +9 -3
  242. package/dist/providers/mcp-check-provider.d.ts.map +1 -1
  243. package/dist/providers/memory-check-provider.d.ts +2 -8
  244. package/dist/providers/memory-check-provider.d.ts.map +1 -1
  245. package/dist/providers/script-check-provider.d.ts +25 -0
  246. package/dist/providers/script-check-provider.d.ts.map +1 -0
  247. package/dist/providers/workflow-check-provider.d.ts +56 -0
  248. package/dist/providers/workflow-check-provider.d.ts.map +1 -0
  249. package/dist/reviewer.d.ts +2 -1
  250. package/dist/reviewer.d.ts.map +1 -1
  251. package/dist/sdk/chunk-37ZSCMFC.mjs +482 -0
  252. package/dist/sdk/chunk-37ZSCMFC.mjs.map +1 -0
  253. package/dist/sdk/chunk-6Y4YTKCF.mjs +197 -0
  254. package/dist/sdk/chunk-6Y4YTKCF.mjs.map +1 -0
  255. package/dist/sdk/chunk-CNX7V5JK.mjs +89 -0
  256. package/dist/sdk/chunk-CNX7V5JK.mjs.map +1 -0
  257. package/dist/sdk/chunk-IEO6CFLG.mjs +1215 -0
  258. package/dist/sdk/chunk-IEO6CFLG.mjs.map +1 -0
  259. package/dist/sdk/chunk-JEHPDJIF.mjs +223 -0
  260. package/dist/sdk/chunk-JEHPDJIF.mjs.map +1 -0
  261. package/dist/sdk/chunk-O5EZDNYL.mjs +274 -0
  262. package/dist/sdk/chunk-O5EZDNYL.mjs.map +1 -0
  263. package/dist/sdk/{chunk-TUTOLSFV.mjs → chunk-OOZITMRU.mjs} +1 -1
  264. package/dist/sdk/chunk-OOZITMRU.mjs.map +1 -0
  265. package/dist/sdk/chunk-OWUVOILT.mjs +557 -0
  266. package/dist/sdk/chunk-OWUVOILT.mjs.map +1 -0
  267. package/dist/sdk/chunk-OZJ263FM.mjs +986 -0
  268. package/dist/sdk/chunk-OZJ263FM.mjs.map +1 -0
  269. package/dist/sdk/chunk-PTL3K3PN.mjs +3128 -0
  270. package/dist/sdk/chunk-PTL3K3PN.mjs.map +1 -0
  271. package/dist/sdk/chunk-S2RUE2RG.mjs +145 -0
  272. package/dist/sdk/chunk-S2RUE2RG.mjs.map +1 -0
  273. package/dist/sdk/chunk-VMPLF6FT.mjs +127 -0
  274. package/dist/sdk/chunk-VMPLF6FT.mjs.map +1 -0
  275. package/dist/sdk/chunk-YSN4G6CI.mjs +146 -0
  276. package/dist/sdk/chunk-YSN4G6CI.mjs.map +1 -0
  277. package/dist/sdk/chunk-ZYAUYXSW.mjs +206 -0
  278. package/dist/sdk/chunk-ZYAUYXSW.mjs.map +1 -0
  279. package/dist/sdk/config-M4ZNO6NU.mjs +14 -0
  280. package/dist/sdk/config-merger-PX3WIT57.mjs +10 -0
  281. package/dist/sdk/event-bus-5BEVPQ6T.mjs +35 -0
  282. package/dist/sdk/event-bus-5BEVPQ6T.mjs.map +1 -0
  283. package/dist/sdk/failure-condition-evaluator-NBO5YRXW.mjs +16 -0
  284. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +458 -0
  285. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +1 -0
  286. package/dist/sdk/github-frontend-4AWRJT7D.mjs +1242 -0
  287. package/dist/sdk/github-frontend-4AWRJT7D.mjs.map +1 -0
  288. package/dist/sdk/host-7GBC3S7L.mjs +49 -0
  289. package/dist/sdk/host-7GBC3S7L.mjs.map +1 -0
  290. package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs → liquid-extensions-C7EG3YKH.mjs} +7 -2
  291. package/dist/sdk/memory-store-GJACZC2A.mjs +11 -0
  292. package/dist/sdk/metrics-7PP3EJUH.mjs +29 -0
  293. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +44 -0
  294. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs.map +1 -0
  295. package/dist/sdk/renderer-schema-6RF26VUS.mjs +50 -0
  296. package/dist/sdk/renderer-schema-6RF26VUS.mjs.map +1 -0
  297. package/dist/sdk/routing-RP56JTV2.mjs +23 -0
  298. package/dist/sdk/routing-RP56JTV2.mjs.map +1 -0
  299. package/dist/sdk/sdk.d.mts +326 -21
  300. package/dist/sdk/sdk.d.ts +326 -21
  301. package/dist/sdk/sdk.js +21403 -16366
  302. package/dist/sdk/sdk.js.map +1 -1
  303. package/dist/sdk/sdk.mjs +13510 -2096
  304. package/dist/sdk/sdk.mjs.map +1 -1
  305. package/dist/sdk/session-registry-N5FFYFTM.mjs +10 -0
  306. package/dist/sdk/session-registry-N5FFYFTM.mjs.map +1 -0
  307. package/dist/sdk/trace-helpers-VP6QYVBX.mjs +23 -0
  308. package/dist/sdk/trace-helpers-VP6QYVBX.mjs.map +1 -0
  309. package/dist/sdk/{tracer-init-WC75N5NW.mjs → tracer-init-WP4X46IF.mjs} +2 -2
  310. package/dist/sdk/tracer-init-WP4X46IF.mjs.map +1 -0
  311. package/dist/sdk/workflow-registry-2YIIXQCK.mjs +11 -0
  312. package/dist/sdk/workflow-registry-2YIIXQCK.mjs.map +1 -0
  313. package/dist/sdk.d.ts.map +1 -1
  314. package/dist/snapshot-store.d.ts +59 -0
  315. package/dist/snapshot-store.d.ts.map +1 -0
  316. package/dist/state-machine/context/build-engine-context.d.ts +9 -0
  317. package/dist/state-machine/context/build-engine-context.d.ts.map +1 -0
  318. package/dist/state-machine/dispatch/dependency-gating.d.ts +12 -0
  319. package/dist/state-machine/dispatch/dependency-gating.d.ts.map +1 -0
  320. package/dist/state-machine/dispatch/execution-invoker.d.ts +14 -0
  321. package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -0
  322. package/dist/state-machine/dispatch/foreach-processor.d.ts +8 -0
  323. package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -0
  324. package/dist/state-machine/dispatch/history-snapshot.d.ts +8 -0
  325. package/dist/state-machine/dispatch/history-snapshot.d.ts.map +1 -0
  326. package/dist/state-machine/dispatch/renderer-schema.d.ts +8 -0
  327. package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -0
  328. package/dist/state-machine/dispatch/stats-manager.d.ts +15 -0
  329. package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -0
  330. package/dist/state-machine/dispatch/template-renderer.d.ts +7 -0
  331. package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -0
  332. package/dist/state-machine/execution/summary.d.ts +8 -0
  333. package/dist/state-machine/execution/summary.d.ts.map +1 -0
  334. package/dist/state-machine/runner.d.ts +73 -0
  335. package/dist/state-machine/runner.d.ts.map +1 -0
  336. package/dist/state-machine/states/check-running.d.ts +14 -0
  337. package/dist/state-machine/states/check-running.d.ts.map +1 -0
  338. package/dist/state-machine/states/completed.d.ts +12 -0
  339. package/dist/state-machine/states/completed.d.ts.map +1 -0
  340. package/dist/state-machine/states/error.d.ts +11 -0
  341. package/dist/state-machine/states/error.d.ts.map +1 -0
  342. package/dist/state-machine/states/init.d.ts +11 -0
  343. package/dist/state-machine/states/init.d.ts.map +1 -0
  344. package/dist/state-machine/states/level-dispatch.d.ts +17 -0
  345. package/dist/state-machine/states/level-dispatch.d.ts.map +1 -0
  346. package/dist/state-machine/states/plan-ready.d.ts +12 -0
  347. package/dist/state-machine/states/plan-ready.d.ts.map +1 -0
  348. package/dist/state-machine/states/routing.d.ts +52 -0
  349. package/dist/state-machine/states/routing.d.ts.map +1 -0
  350. package/dist/state-machine/states/wave-planning.d.ts +14 -0
  351. package/dist/state-machine/states/wave-planning.d.ts.map +1 -0
  352. package/dist/state-machine/workflow-projection.d.ts +47 -0
  353. package/dist/state-machine/workflow-projection.d.ts.map +1 -0
  354. package/dist/state-machine-execution-engine.d.ts +147 -0
  355. package/dist/state-machine-execution-engine.d.ts.map +1 -0
  356. package/dist/telemetry/opentelemetry.d.ts.map +1 -1
  357. package/dist/test-runner/assertions.d.ts +59 -0
  358. package/dist/test-runner/assertions.d.ts.map +1 -0
  359. package/dist/test-runner/core/environment.d.ts +8 -0
  360. package/dist/test-runner/core/environment.d.ts.map +1 -0
  361. package/dist/test-runner/core/fixture.d.ts +3 -0
  362. package/dist/test-runner/core/fixture.d.ts.map +1 -0
  363. package/dist/test-runner/core/flow-stage.d.ts +32 -0
  364. package/dist/test-runner/core/flow-stage.d.ts.map +1 -0
  365. package/dist/test-runner/core/mocks.d.ts +8 -0
  366. package/dist/test-runner/core/mocks.d.ts.map +1 -0
  367. package/dist/test-runner/core/test-execution-wrapper.d.ts +18 -0
  368. package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -0
  369. package/dist/test-runner/evaluators.d.ts +12 -0
  370. package/dist/test-runner/evaluators.d.ts.map +1 -0
  371. package/dist/test-runner/fixture-loader.d.ts +30 -0
  372. package/dist/test-runner/fixture-loader.d.ts.map +1 -0
  373. package/dist/test-runner/index.d.ts +120 -0
  374. package/dist/test-runner/index.d.ts.map +1 -0
  375. package/dist/test-runner/recorders/github-recorder.d.ts +23 -0
  376. package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -0
  377. package/dist/test-runner/recorders/global-recorder.d.ts +4 -0
  378. package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -0
  379. package/dist/test-runner/utils/selectors.d.ts +2 -0
  380. package/dist/test-runner/utils/selectors.d.ts.map +1 -0
  381. package/dist/test-runner/validator.d.ts +8 -0
  382. package/dist/test-runner/validator.d.ts.map +1 -0
  383. package/dist/traces/run-2025-11-21T11-50-46-505Z.ndjson +138 -0
  384. package/dist/traces/run-2025-11-21T11-51-33-674Z.ndjson +839 -0
  385. package/dist/types/cli.d.ts +4 -1
  386. package/dist/types/cli.d.ts.map +1 -1
  387. package/dist/types/config.d.ts +278 -5
  388. package/dist/types/config.d.ts.map +1 -1
  389. package/dist/types/engine.d.ts +172 -0
  390. package/dist/types/engine.d.ts.map +1 -0
  391. package/dist/types/execution.d.ts +73 -0
  392. package/dist/types/execution.d.ts.map +1 -0
  393. package/dist/types/github.d.ts +51 -0
  394. package/dist/types/github.d.ts.map +1 -0
  395. package/dist/types/workflow.d.ts +237 -0
  396. package/dist/types/workflow.d.ts.map +1 -0
  397. package/dist/utils/command-executor.d.ts +43 -0
  398. package/dist/utils/command-executor.d.ts.map +1 -0
  399. package/dist/utils/comment-metadata.d.ts +21 -0
  400. package/dist/utils/comment-metadata.d.ts.map +1 -0
  401. package/dist/utils/config-loader.d.ts.map +1 -1
  402. package/dist/utils/config-merger.d.ts.map +1 -1
  403. package/dist/utils/env-exposure.d.ts +3 -0
  404. package/dist/utils/env-exposure.d.ts.map +1 -0
  405. package/dist/utils/file-exclusion.d.ts.map +1 -1
  406. package/dist/utils/interactive-prompt.d.ts +1 -1
  407. package/dist/utils/interactive-prompt.d.ts.map +1 -1
  408. package/dist/utils/sandbox.d.ts.map +1 -1
  409. package/dist/utils/script-memory-ops.d.ts +21 -0
  410. package/dist/utils/script-memory-ops.d.ts.map +1 -0
  411. package/dist/utils/template-context.d.ts +7 -0
  412. package/dist/utils/template-context.d.ts.map +1 -0
  413. package/dist/webhook-server.d.ts +3 -3
  414. package/dist/webhook-server.d.ts.map +1 -1
  415. package/dist/workflow-executor.d.ts +81 -0
  416. package/dist/workflow-executor.d.ts.map +1 -0
  417. package/dist/workflow-registry.d.ts +79 -0
  418. package/dist/workflow-registry.d.ts.map +1 -0
  419. package/package.json +10 -5
  420. package/dist/output/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  421. package/dist/sdk/check-execution-engine-2YYKUUSH.mjs +0 -11
  422. package/dist/sdk/check-execution-engine-6QJXYYON.mjs +0 -11
  423. package/dist/sdk/check-execution-engine-PJZ4ZOKG.mjs +0 -11
  424. package/dist/sdk/chunk-33QVZ2D4.mjs +0 -316
  425. package/dist/sdk/chunk-33QVZ2D4.mjs.map +0 -1
  426. package/dist/sdk/chunk-B5QBV2QJ.mjs +0 -752
  427. package/dist/sdk/chunk-B5QBV2QJ.mjs.map +0 -1
  428. package/dist/sdk/chunk-BVFNRCHT.mjs +0 -14129
  429. package/dist/sdk/chunk-BVFNRCHT.mjs.map +0 -1
  430. package/dist/sdk/chunk-KWZW23FG.mjs +0 -14129
  431. package/dist/sdk/chunk-KWZW23FG.mjs.map +0 -1
  432. package/dist/sdk/chunk-O4RP4BRH.mjs +0 -14092
  433. package/dist/sdk/chunk-O4RP4BRH.mjs.map +0 -1
  434. package/dist/sdk/chunk-TUTOLSFV.mjs.map +0 -1
  435. package/dist/sdk/chunk-U5D2LY66.mjs +0 -245
  436. package/dist/sdk/chunk-U5D2LY66.mjs.map +0 -1
  437. package/dist/sdk/chunk-U7X54EMV.mjs +0 -331
  438. package/dist/sdk/chunk-U7X54EMV.mjs.map +0 -1
  439. package/dist/sdk/config-merger-TWUBWFC2.mjs +0 -8
  440. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs +0 -61
  441. package/dist/sdk/mermaid-telemetry-SN6A2TKW.mjs.map +0 -1
  442. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs +0 -61
  443. package/dist/sdk/mermaid-telemetry-YCTIG76M.mjs.map +0 -1
  444. package/dist/traces/run-2025-10-22T18-22-56-873Z.ndjson +0 -218
  445. /package/dist/sdk/{check-execution-engine-2YYKUUSH.mjs.map → config-M4ZNO6NU.mjs.map} +0 -0
  446. /package/dist/sdk/{check-execution-engine-6QJXYYON.mjs.map → config-merger-PX3WIT57.mjs.map} +0 -0
  447. /package/dist/sdk/{check-execution-engine-PJZ4ZOKG.mjs.map → failure-condition-evaluator-NBO5YRXW.mjs.map} +0 -0
  448. /package/dist/sdk/{config-merger-TWUBWFC2.mjs.map → liquid-extensions-C7EG3YKH.mjs.map} +0 -0
  449. /package/dist/sdk/{liquid-extensions-KVL4MKRH.mjs.map → memory-store-GJACZC2A.mjs.map} +0 -0
  450. /package/dist/sdk/{tracer-init-WC75N5NW.mjs.map → metrics-7PP3EJUH.mjs.map} +0 -0
@@ -0,0 +1,482 @@
1
+ version: "1.0"
2
+ include: "./code-review.yaml"
3
+
4
+ # Default Visor configuration - provides comprehensive code analysis out-of-the-box
5
+ # Uses mock provider for CI compatibility when no AI API keys are configured
6
+ # Users can override this by creating their own .visor.yaml in their project root
7
+
8
+ # Global AI provider settings - users should configure their preferred provider
9
+ # For CI testing, use --provider mock CLI flag instead
10
+
11
+ # Run up to 4 steps in parallel for faster execution
12
+ max_parallelism: 4
13
+
14
+ # Global fail condition - fail if critical or error severity issues are found
15
+ fail_if: "output.issues && output.issues.some(i => i.severity === 'critical' || i.severity === 'error')"
16
+
17
+ # Workflow steps (formerly 'checks' - both keys are supported for backward compatibility)
18
+ steps:
19
+ # AI-powered release notes generation - manual execution only for release workflows
20
+ release-notes:
21
+ type: ai
22
+ group: release
23
+ on: [manual]
24
+ prompt: |
25
+ Generate professional release notes for version {{ env.TAG_NAME }} of this project.
26
+
27
+ Analyze the git commits since the last release:
28
+ ```
29
+ {{ env.GIT_LOG }}
30
+ ```
31
+
32
+ And the file changes summary:
33
+ ```
34
+ {{ env.GIT_DIFF_STAT }}
35
+ ```
36
+
37
+ Create release notes with these sections:
38
+
39
+ ## 🚀 What's New in {{ env.TAG_NAME }}
40
+
41
+ ### ✨ New Features
42
+ List any new features added (look for feat: commits)
43
+
44
+ ### 🐛 Bug Fixes
45
+ List any bugs fixed (look for fix: commits)
46
+
47
+ ### 📈 Improvements
48
+ List any improvements or refactoring (look for refactor:, perf:, chore:, build: commits)
49
+
50
+ ### 🔥 Breaking Changes
51
+ List any breaking changes if present (look for BREAKING CHANGE or ! in commits)
52
+
53
+ ### 📊 Statistics
54
+ - Number of commits since last release
55
+ - Number of contributors involved
56
+ - Number of files changed
57
+
58
+ Keep descriptions concise and user-friendly. Focus on what changed from a user perspective, not implementation details.
59
+ Use present tense and action-oriented language. Group similar changes together.
60
+ schema: plain
61
+
62
+ # (overview, security, architecture, performance, quality) were extracted to defaults/code-review.yaml
63
+
64
+ # Apply labels based on overview tags — runs only on PR open (GitHub environments only)
65
+ apply-overview-labels:
66
+ type: github
67
+ criticality: external
68
+ tags: [github]
69
+ on: [pr_opened]
70
+ depends_on: [overview]
71
+ assume:
72
+ - "outputs['overview']?.tags?.label"
73
+ - "outputs['overview']?.tags?.['review-effort'] != null"
74
+ op: labels.add
75
+ values:
76
+ - "{{ outputs.overview.tags.label | default: '' | safe_label }}"
77
+ - "{{ outputs.overview.tags['review-effort'] | default: '' | prepend: 'review/effort:' | safe_label }}"
78
+
79
+ # Issue Assistant (issues only) — triage-quality prompt from main branch, structured output
80
+ issue-assistant:
81
+ type: ai
82
+ group: dynamic # New issue triage posts a standalone comment
83
+ on: [issue_opened]
84
+ prompt: |
85
+ You are an intelligent GitHub issue assistant for the {{ event.repository.fullName }} repository. Your role is to provide professional, knowledgeable assistance when a NEW issue is opened.
86
+
87
+ {%- liquid
88
+ # Correction context from the last validation wave (filtered)
89
+ # Keep only invalid or non-high confidence items using where_exp
90
+ assign issues = outputs_history["validate-fact"].last | where_exp: 'i', 'i && (i.is_valid != true || i.confidence != "high")'
91
+ assign has_problems = issues | not_empty
92
+ -%}
93
+ {% if has_problems %}
94
+ ⚠️ **IMPORTANT: Your previous response contained factual errors. Please correct them:**
95
+
96
+ <previous_response>
97
+ {% assign prev_comment = outputs_history["comment-assistant"].last %}
98
+ {{ prev_comment.text }}
99
+ </previous_response>
100
+
101
+ **Validation Errors Found:**
102
+ {% for issue in issues %}
103
+ {% if issue.is_valid == nil or issue.is_valid != true or issue.confidence != 'high' %}
104
+ - **{{ issue.claim }}**: {{ issue.evidence | default: "" }}
105
+ {% if issue.correction %}
106
+ Correction: {{ issue.correction }}
107
+ {% endif %}
108
+ Claim: {{ issue.claim }}
109
+ {% if issue.correction %}Correction: {{ issue.correction }}{% endif %}
110
+ {% endif %}
111
+ {% endfor %}
112
+
113
+ Please provide a corrected response that addresses these factual errors.
114
+ {% endif %}
115
+
116
+ Return ONE JSON object (no prose outside JSON) that validates the `issue-assistant` schema with:
117
+ - `text`: write a clear, well-structured markdown reply that welcomes the reporter, shows understanding, and provides next steps. Use sections and bullets where helpful.
118
+ - `intent`: must be "issue_triage" for this flow.
119
+ - `labels` (optional): array of labels that would help organization for this new issue.
120
+
121
+ Add a short “References” section at the end of the markdown `text` as a simple, clickable markdown list (no fenced code blocks). Keep it minimal. If you didn’t consult code, write `References: none`.
122
+
123
+ Example:
124
+ References:
125
+ - [path/to/file.ext:START-END](https://github.com/{{ event.repository.fullName }}/blob/{{ event.pull_request.head.sha | default: 'HEAD' }}/path/to/file.ext#LSTART-LEND) – very short note
126
+
127
+ Use this triage rubric (adopted from our main prompt):
128
+ 1) Categorize the issue - choose from: bug, chore, documentation, enhancement, feature, question, wontfix, invalid, duplicate
129
+ 2) Assess priority (low/medium/high/urgent)
130
+ 3) Estimate complexity (trivial/simple/moderate/complex)
131
+ 4) Recommend labels from the categories above
132
+ 5) Identify potential areas affected or relevant documentation
133
+ 6) Provide an initial response with clarifying questions if needed
134
+
135
+ Response style:
136
+ - Professional and welcoming
137
+ - Start by acknowledging what you understand from the issue report
138
+ - Clearly state what you're confident about based on the information provided
139
+ - Identify what is unclear or missing, and explicitly ask follow-up questions to help with debugging
140
+ - When information is incomplete, ask specific questions that would help diagnose the issue
141
+ - Provide actionable guidance and clear next steps
142
+ - Use natural markdown formatting; include code snippets where useful
143
+ - Be honest about what you know and what you don't know
144
+ - NEVER make promises about timelines, release dates, or team commitments
145
+ - NEVER say things like "we'll pick this up", "will be included in upcoming release", or "we will post updates"
146
+ - Focus on technical analysis and helpful information rather than commitments
147
+
148
+ # Comment Assistant (comments only) — intent detection and reply
149
+ comment-assistant:
150
+ type: ai
151
+ group: dynamic
152
+ on: [issue_comment]
153
+ command: "visor"
154
+ prompt: |
155
+ You are the GitHub comment assistant for {{ event.repository.fullName }}. Respond to user comments on issues or PR discussion threads.
156
+
157
+ Latest comment (verbatim):
158
+ {{ event.comment.body | default: "" }}
159
+
160
+ {%- liquid
161
+ # Correction context from the last validation wave (filtered)
162
+ assign issues = outputs_history["validate-fact"].last | where_exp: 'i', 'i && (i.is_valid != true || i.confidence != "high")'
163
+ assign has_problems = issues | not_empty
164
+ assign prev_comment = outputs_history["comment-assistant"].last
165
+ -%}
166
+ {% if has_problems %}
167
+ ⚠️ **IMPORTANT: Your previous response contained factual errors. Please correct them:**
168
+
169
+ <previous_response>
170
+ {{ prev_comment.text | default: "" }}
171
+ </previous_response>
172
+
173
+ **Validation Errors Found:**
174
+ {%- for issue in issues -%}
175
+ {%- if issue.is_valid == nil or issue.is_valid != true or issue.confidence != 'high' -%}
176
+ - **{{ issue.claim }}**: {{ issue.evidence | default: "" }}
177
+ {%- if issue.correction %}
178
+ Correction: {{ issue.correction }}
179
+ {%- endif %}
180
+ Claim: {{ issue.claim }}
181
+ {%- if issue.correction %}Correction: {{ issue.correction }}{% endif -%}
182
+ {%- endif -%}
183
+ {%- endfor -%}
184
+
185
+ Please provide a corrected response that addresses these factual errors.
186
+ {% endif %}
187
+
188
+ Return ONE JSON object (no prose outside JSON) that validates the `issue-assistant` schema with:
189
+ - `text`: a concise, helpful markdown reply to the latest comment.
190
+ - `intent`: choose one: "comment_reply" (normal reply) or "comment_retrigger" (pick this ONLY when the user explicitly asks to re-run checks OR explicitly asks to disable some checks).
191
+ - `labels`: omit for comments (do not include).
192
+
193
+ Add a short “References” section at the end of the markdown `text` as a clickable markdown list (no fenced blocks). If none used, write `References: none`.
194
+
195
+ Example:
196
+ References:
197
+ - [path/to/file.ext:START-END](https://github.com/{{ event.repository.fullName }}/blob/{{ event.pull_request.head.sha | default: 'HEAD' }}/path/to/file.ext#LSTART-LEND) – very short note
198
+
199
+ Rules:
200
+ - Never suggest rerun/disable unless asked explicitly.
201
+ - If asked to disable any check(s), set `intent` = "comment_retrigger" and in `text` acknowledge the request and say the checks will be re-run; DO NOT propose slash/directive comments.
202
+ - Stay technical, direct, and specific; add code snippets or links when helpful.
203
+ - When answering questions, acknowledge what you can answer confidently based on the context provided
204
+ - If you need more information to provide a complete answer, ask specific follow-up questions
205
+ - Be honest when you don't know something or can't find the answer in the available context
206
+ - If the question requires information not available in the PR/issue context, clearly state what's missing
207
+ - Provide partial answers when possible, and indicate what additional information would help give a complete response
208
+ schema: issue-assistant
209
+ on_success:
210
+ transitions:
211
+ - when: "event.name === 'issue_comment' && output?.intent === 'comment_retrigger'"
212
+ to: overview
213
+ goto_event: pr_updated
214
+
215
+ # Apply labels to new issues based on assistant output (GitHub-only)
216
+ apply-issue-labels:
217
+ type: github
218
+ criticality: external
219
+ tags: [github]
220
+ on: [issue_opened]
221
+ depends_on: [issue-assistant]
222
+ assume:
223
+ - "(outputs['issue-assistant']?.labels?.length ?? 0) > 0"
224
+ op: labels.add
225
+ # Explicitly derive labels from issue-assistant output with guardrails
226
+ # - Use Liquid to serialize labels array to JSON; provider will expand
227
+ # - Assumptions ensure the dependency exists and produced at least one label
228
+ values:
229
+ - "{{ outputs['issue-assistant'].labels | default: [] | json }}"
230
+
231
+ # External origin labelling for PRs and Issues
232
+ external-label:
233
+ type: github
234
+ criticality: external
235
+ tags: [github]
236
+ on: [pr_opened, issue_opened]
237
+ if: "!isMember() && !isContributor()"
238
+ op: labels.add
239
+ values:
240
+ - "external"
241
+
242
+ # ============================================================================
243
+ # Fact Validation System (enabled with ENABLE_FACT_VALIDATION env var)
244
+ # ============================================================================
245
+ # This system validates factual claims made by AI assistants before posting
246
+ # responses to GitHub issues and comments. It uses forEach with on_finish hooks
247
+ # to validate all facts, aggregate results, and retry with correction context
248
+ # if needed.
249
+ #
250
+ # To enable: Set ENABLE_FACT_VALIDATION=true environment variable
251
+ # ============================================================================
252
+
253
+ # Extract verifiable facts from assistant responses
254
+ # This is a forEach check that triggers validation for each fact
255
+ extract-facts:
256
+ type: ai
257
+ group: fact-validation
258
+ on: [issue_opened, issue_comment]
259
+ depends_on: ["issue-assistant|comment-assistant"]
260
+ # Only when validation is enabled (assistants schedule validate-fact; engine runs this dependency inline)
261
+ if: "env.ENABLE_FACT_VALIDATION === 'true'"
262
+ # Ensure we have an assistant output to analyze for this event type
263
+ assume:
264
+ - "outputs['issue-assistant'] || outputs['comment-assistant']"
265
+ ai:
266
+ skip_code_context: true
267
+ disableTools: true
268
+ prompt: |
269
+ Your task is to EXTRACT factual claims from the assistant's response below.
270
+
271
+ IMPORTANT: Do NOT investigate, verify, or validate any facts. Simply identify and list them.
272
+ Do NOT use any tools or search the codebase. Just read the response and extract claims.
273
+
274
+ Assistant's response to analyze:
275
+ ```
276
+ {% if outputs['issue-assistant'] %}{{ outputs['issue-assistant'].text }}{% else %}{{ outputs['comment-assistant'].text }}{% endif %}
277
+ ```
278
+
279
+ If the response ends with a “References” section in a fenced block labeled `refs`, parse it. Each line will be in the form:
280
+ path/to/file.ext[:start[-end]|#SymbolName] - note
281
+ Capture it as an array of objects `{ path, lines?, symbol? }` where `lines` is the numeric line or range if present, or `symbol` is the string after `#`.
282
+ When assigning references to facts:
283
+ - If a reference clearly maps to a specific fact, include only those refs for that fact.
284
+ - If mapping is ambiguous, include the entire refs list for that fact (better recall than omission).
285
+
286
+ Extract verifiable factual claims about:
287
+ - Configuration variables and their values (e.g., "max_parallelism defaults to 4")
288
+ - Feature capabilities (what is/isn't supported, how features work)
289
+ - File paths and locations mentioned (e.g., "config is in src/config.ts")
290
+ - Function/class names and their behavior
291
+ - Command syntax and available options
292
+ - API endpoints and their methods
293
+ - Environment variables and usage
294
+ - Default values and constants
295
+ - Line numbers or code locations mentioned
296
+ - Data structures and schemas
297
+ - Dependencies and version requirements
298
+
299
+ Guidelines:
300
+ - Extract claims AS STATED in the response (don't verify or investigate)
301
+ - Focus on specific, testable assertions
302
+ - Each claim MUST be self-contained with ALL necessary context
303
+ - Include file paths, line numbers, values in the claim itself
304
+ - AVOID duplicates - if same fact appears multiple times, extract it once
305
+ - Group related info when it's the SAME fact (e.g., "value is 3 at lines 100 and 200")
306
+ - Each fact should be atomic and independently verifiable
307
+
308
+ Example of GOOD claims:
309
+ - "max_parallelism defaults to 3 in src/check-execution-engine.ts at lines 2795 and 4712"
310
+ - "Configuration file defaults/visor.yaml sets max_parallelism to 4 at line 11"
311
+
312
+ Example of BAD claims (missing context):
313
+ - "Default is 3" (missing: default of what? where?)
314
+ - "Code has hardcoded value" (missing: what value? where? which file?)
315
+
316
+ Do NOT extract:
317
+ - Recommendations (e.g., "you should change X to Y")
318
+ - Opinions or preferences (e.g., "this is better than")
319
+ - General explanations without specific claims
320
+ - Your own knowledge - only extract what's IN the response
321
+ - Duplicate facts (same claim stated multiple ways)
322
+
323
+ Return ONLY the JSON array of fact objects. Do not investigate or verify anything.
324
+ Each item must be: { id, category, claim, verifiable, refs? } where refs items may contain `lines` or `symbol`.
325
+
326
+ schema:
327
+ type: array
328
+ items:
329
+ type: object
330
+ properties:
331
+ id:
332
+ type: string
333
+ description: Unique identifier for the fact (e.g., fact-1, fact-2)
334
+ category:
335
+ type: string
336
+ description: Type of claim (Configuration, Feature, Documentation, API, etc.)
337
+ claim:
338
+ type: string
339
+ description: The exact factual statement being made
340
+ verifiable:
341
+ type: boolean
342
+ description: Whether this claim can be verified against the codebase
343
+ refs:
344
+ type: array
345
+ description: Optional list of code references (parsed from assistant References block)
346
+ items:
347
+ type: object
348
+ properties:
349
+ path:
350
+ type: string
351
+ lines:
352
+ type: string
353
+ description: Line or range, e.g., "120-145" or "88"
354
+ required: [path]
355
+ required: [id, category, claim, verifiable]
356
+
357
+ forEach: true
358
+
359
+ # After one validation wave completes, route back to the appropriate assistant
360
+ # using declarative transitions so the engine forward-runs dependents
361
+ # (assistant → extract-facts → validate-fact).
362
+ on_finish:
363
+ transitions:
364
+ - when: "any(outputs_history['validate-fact'], v => v && (v.is_valid === false || v.valid === false)) && event.name === 'issue_opened'"
365
+ to: issue-assistant
366
+ - when: "any(outputs_history['validate-fact'], v => v && (v.is_valid === false || v.valid === false)) && event.name === 'issue_comment'"
367
+ to: comment-assistant
368
+
369
+ # Validate each extracted fact
370
+ validate-fact:
371
+ type: ai
372
+ group: fact-validation
373
+ on: [issue_opened, issue_comment]
374
+ depends_on: [extract-facts]
375
+ if: "env.ENABLE_FACT_VALIDATION === 'true'"
376
+ ai:
377
+ timeout: 180000 # 3 minutes hard cap per validation
378
+ # always validate each fact
379
+ prompt: |
380
+ Validate this factual claim against the codebase:
381
+
382
+ **Claim:** {{ outputs['extract-facts'].claim }}
383
+ **Category:** {{ outputs['extract-facts'].category }}
384
+ **Fact ID:** {{ outputs['extract-facts'].id }}
385
+
386
+ Use code search and file reading tools to verify if this claim is accurate.
387
+
388
+ If references were provided for this fact (parsed earlier), use them FIRST and prefer them strongly:
389
+ {% assign refs = outputs['extract-facts'].refs %}
390
+ {% assign __refs_len = refs | size %}
391
+ {% if refs and __refs_len > 0 %}
392
+ Provided References:
393
+ {% for r in refs %}- {{ r.path }}{% if r.lines %}:{{ r.lines }}{% endif %}{% if r.symbol %}#{{ r.symbol }}{% endif %}
394
+ {% endfor %}
395
+ Strategy:
396
+ - If a reference has `lines`, open those line ranges first and try to validate from there.
397
+ - If a reference has `symbol`, locate the symbol definition in the referenced file (e.g., function/class/const). Search for common patterns like:
398
+ - `function SYMBOL(`, `const SYMBOL`, `let SYMBOL`, `class SYMBOL`, `export .* SYMBOL`, `SYMBOL:\s*` (TypeScript), etc.
399
+ Then analyze ~100 lines around the definition (±50 lines) before expanding.
400
+ - Expand search to nearby lines in the same files if needed (±50 lines).
401
+ - Only if still inconclusive, perform a broader search.
402
+ {% else %}
403
+ No provided references. Perform a targeted search (prefer exact identifiers from the claim) before broader queries.
404
+ {% endif %}
405
+
406
+ Provide:
407
+ - Evidence of what you found in the codebase
408
+ - Confidence level (high/medium/low) in your validation
409
+ - If the claim is incorrect, provide the accurate information as a correction
410
+
411
+ schema:
412
+ type: object
413
+ properties:
414
+ fact_id:
415
+ type: string
416
+ description: ID of the fact being validated
417
+ claim:
418
+ type: string
419
+ description: The original claim being validated
420
+ is_valid:
421
+ type: boolean
422
+ description: Whether the claim is accurate
423
+ confidence:
424
+ type: string
425
+ enum: [high, medium, low]
426
+ description: Confidence level in the validation
427
+ evidence:
428
+ type: string
429
+ description: Evidence found in the codebase supporting the validation
430
+ correction:
431
+ type: string
432
+ description: If invalid, the correct information (optional)
433
+ required: [fact_id, claim, is_valid, confidence, evidence]
434
+
435
+ # Aggregate validation results and expose boolean all_valid
436
+ aggregate:
437
+ type: script
438
+ group: fact-validation
439
+ on: [issue_opened, issue_comment]
440
+ depends_on: [validate-fact]
441
+ if: "env.ENABLE_FACT_VALIDATION === 'true'"
442
+ assume:
443
+ # Run only when we have per-item validations and it's the first attempt
444
+ - "(outputs['validate-fact']?.forEachItems?.length ?? 0) > 0"
445
+ - "(memory.get('attempt', 'fact-validation') ?? 0) === 0"
446
+ content: |
447
+ const vf = (outputs.history['validate-fact']||[]).filter(v => v && typeof v === 'object');
448
+ const ex = (outputs.history['extract-facts']||[]);
449
+ let lastSize = 0; for (let i = ex.length - 1; i >= 0 && lastSize === 0; i--) { if (Array.isArray(ex[i])) { lastSize = ex[i].length; } }
450
+ const recent = lastSize > 0 ? vf.slice(-lastSize) : vf;
451
+ const allValid = recent.length > 0 && recent.every(i => i && (i.is_valid === true || i.valid === true));
452
+ memory.set('all_valid', allValid, 'fact-validation');
453
+ return { all_valid: allValid };
454
+ schema:
455
+ type: object
456
+ properties:
457
+ all_valid:
458
+ type: boolean
459
+ required:
460
+ - all_valid
461
+ additionalProperties: false
462
+ guarantee: "output && typeof output.all_valid === 'boolean'"
463
+ namespace: fact-validation
464
+
465
+ # Post only when all facts are valid
466
+ post-verified:
467
+ type: log
468
+ group: fact-validation
469
+ on: [issue_opened, issue_comment]
470
+ depends_on: [extract-facts]
471
+ if: "env.ENABLE_FACT_VALIDATION === 'true' && memory.get('all_valid', 'fact-validation') === true"
472
+ message: "✅ Posted verified response"
473
+ level: info
474
+
475
+ # Retrigger noop removed — comment-assistant schedules overview directly
476
+
477
+ output:
478
+ pr_comment:
479
+ format: markdown
480
+ # Grouping is determined solely by each check's `group` field.
481
+ # The renderer ignores any global group_by; keep comments compact.
482
+ collapse: true
package/dist/663.index.js CHANGED
@@ -212,7 +212,7 @@ function saveToken(token, projectId) {
212
212
  }
213
213
  const tokenPath = path.join(dir, "com.vercel.token", `${projectId}.json`);
214
214
  const tokenJson = JSON.stringify(token);
215
- fs.mkdirSync(path.dirname(tokenPath), { mode: 432, recursive: true });
215
+ fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });
216
216
  fs.writeFileSync(tokenPath, tokenJson);
217
217
  fs.chmodSync(tokenPath, 432);
218
218
  return;
@@ -249,9 +249,8 @@ function getTokenPayload(token) {
249
249
  );
250
250
  return JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
251
251
  }
252
- const TIME_15_MINUTES_IN_MS = 15 * 60 * 1e3;
253
252
  function isExpired(token) {
254
- return token.exp * 1e3 < Date.now() + TIME_15_MINUTES_IN_MS;
253
+ return token.exp * 1e3 < Date.now();
255
254
  }
256
255
  // Annotate the CommonJS export names for ESM import in node:
257
256
  0 && (0);
package/dist/80.index.js CHANGED
@@ -212,7 +212,7 @@ function saveToken(token, projectId) {
212
212
  }
213
213
  const tokenPath = path.join(dir, "com.vercel.token", `${projectId}.json`);
214
214
  const tokenJson = JSON.stringify(token);
215
- fs.mkdirSync(path.dirname(tokenPath), { mode: 432, recursive: true });
215
+ fs.mkdirSync(path.dirname(tokenPath), { mode: 504, recursive: true });
216
216
  fs.writeFileSync(tokenPath, tokenJson);
217
217
  fs.chmodSync(tokenPath, 432);
218
218
  return;
@@ -249,9 +249,8 @@ function getTokenPayload(token) {
249
249
  );
250
250
  return JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
251
251
  }
252
- const TIME_15_MINUTES_IN_MS = 15 * 60 * 1e3;
253
252
  function isExpired(token) {
254
- return token.exp * 1e3 < Date.now() + TIME_15_MINUTES_IN_MS;
253
+ return token.exp * 1e3 < Date.now();
255
254
  }
256
255
  // Annotate the CommonJS export names for ESM import in node:
257
256
  0 && (0);
@@ -1,47 +1,5 @@
1
- export interface GitHubActionInputs {
2
- 'github-token': string;
3
- owner?: string;
4
- repo?: string;
5
- 'auto-review'?: string;
6
- 'app-id'?: string;
7
- 'private-key'?: string;
8
- 'installation-id'?: string;
9
- checks?: string;
10
- 'output-format'?: string;
11
- 'config-path'?: string;
12
- 'comment-on-pr'?: string;
13
- 'create-check'?: string;
14
- 'add-labels'?: string;
15
- 'add-reactions'?: string;
16
- 'fail-on-critical'?: string;
17
- 'fail-on-api-error'?: string;
18
- 'min-score'?: string;
19
- 'max-parallelism'?: string;
20
- 'fail-fast'?: string;
21
- debug?: string;
22
- 'ai-provider'?: string;
23
- 'ai-model'?: string;
24
- tags?: string;
25
- 'exclude-tags'?: string;
26
- 'visor-config-path'?: string;
27
- 'visor-checks'?: string;
28
- }
29
- export interface GitHubContext {
30
- event_name: string;
31
- repository?: {
32
- owner: {
33
- login: string;
34
- };
35
- name: string;
36
- };
37
- event?: {
38
- comment?: Record<string, unknown>;
39
- issue?: Record<string, unknown>;
40
- pull_request?: Record<string, unknown>;
41
- action?: string;
42
- };
43
- payload?: Record<string, unknown>;
44
- }
1
+ import { GitHubActionInputs, GitHubContext } from './types/github';
2
+ export { GitHubActionInputs, GitHubContext };
45
3
  export interface ActionCliOutput {
46
4
  success: boolean;
47
5
  output?: string;
@@ -54,57 +12,28 @@ export interface ActionCliOutput {
54
12
  };
55
13
  }
56
14
  /**
57
- * Bridge between GitHub Action and Visor CLI
15
+ * Minimal bridge between GitHub Action and Visor
16
+ * Provides utility functions for parsing GitHub Action inputs
58
17
  */
59
18
  export declare class ActionCliBridge {
60
19
  private githubToken;
61
20
  private context;
62
21
  constructor(githubToken: string, context: GitHubContext);
63
22
  /**
64
- * Determine if Visor CLI should be used based on inputs
23
+ * Determine if legacy Visor inputs are present
65
24
  */
66
25
  shouldUseVisor(inputs: GitHubActionInputs): boolean;
67
26
  /**
68
- * Parse GitHub Action inputs to CLI arguments
27
+ * Parse GitHub Action inputs into CLI arguments
28
+ * Note: No validation - let the config system handle it
69
29
  */
70
30
  parseGitHubInputsToCliArgs(inputs: GitHubActionInputs): string[];
71
31
  /**
72
- * Execute CLI with GitHub context
73
- */
74
- executeCliWithContext(inputs: GitHubActionInputs, options?: {
75
- workingDir?: string;
76
- timeout?: number;
77
- }): Promise<ActionCliOutput>;
78
- /**
79
- * Merge CLI and Action outputs for backward compatibility
80
- */
81
- mergeActionAndCliOutputs(actionInputs: GitHubActionInputs, cliResult: ActionCliOutput, legacyOutputs?: Record<string, string>): Record<string, string>;
82
- /**
83
- * Execute command with timeout and proper error handling
84
- */
85
- private executeCommand;
86
- /**
87
- * Parse CLI JSON output to extract relevant data
88
- */
89
- private parseCliOutput;
90
- /**
91
- * Check if a check type is valid
92
- */
93
- private isValidCheck;
94
- /**
95
- * Create temporary config file from action inputs
96
- */
97
- createTempConfigFromInputs(inputs: GitHubActionInputs, options?: {
98
- workingDir?: string;
99
- }): Promise<string | null>;
100
- /**
101
- * Get AI prompt for a specific check type
32
+ * Merge CLI outputs with legacy Action outputs
102
33
  */
103
- private getPromptForCheck;
34
+ mergeActionAndCliOutputs(inputs: GitHubActionInputs, cliResult: ActionCliOutput, legacyOutputs?: Record<string, string>): Record<string, string>;
104
35
  /**
105
- * Cleanup temporary files
36
+ * Cleanup method for compatibility (no-op since we don't create temp files)
106
37
  */
107
- cleanup(options?: {
108
- workingDir?: string;
109
- }): Promise<void>;
38
+ cleanup(): Promise<void>;
110
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceR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AGG;IACI,0BAA0B,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,EAAE;IAgCvE;;OAEG;IACI,wBAAwB,CAC7B,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,eAAe,EAC1B,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACzC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAkBzB;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAItC"}
@@ -20,6 +20,17 @@ export interface AIReviewConfig {
20
20
  [key: string]: unknown;
21
21
  }>;
22
22
  mcpServers?: Record<string, import('./types/config').McpServerConfig>;
23
+ enableDelegate?: boolean;
24
+ promptType?: string;
25
+ systemPrompt?: string;
26
+ customPrompt?: string;
27
+ retry?: import('./types/config').AIRetryConfig;
28
+ fallback?: import('./types/config').AIFallbackConfig;
29
+ allowEdit?: boolean;
30
+ allowedTools?: string[];
31
+ disableTools?: boolean;
32
+ allowBash?: boolean;
33
+ bashConfig?: import('./types/config').BashConfig;
23
34
  }
24
35
  export interface AIDebugInfo {
25
36
  /** The prompt sent to the AI */
@@ -76,6 +87,10 @@ export declare class AIReviewService {
76
87
  * @param sessionMode - 'clone' (default) clones history, 'append' shares history
77
88
  */
78
89
  executeReviewWithSessionReuse(prInfo: PRInfo, customPrompt: string, parentSessionId: string, schema?: string | Record<string, unknown>, checkName?: string, sessionMode?: 'clone' | 'append'): Promise<ReviewSummary>;
90
+ /**
91
+ * Promise timeout helper that rejects after ms if unresolved
92
+ */
93
+ private withTimeout;
79
94
  /**
80
95
  * Register a new AI session in the session registry
81
96
  */