@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,347 @@
1
+ # Liquid Templates in Visor
2
+
3
+ Visor uses [LiquidJS](https://liquidjs.com/) for templating in prompts, commands, and transformations. This enables dynamic content generation based on PR context, check outputs, and environment variables.
4
+
5
+ ## Available Variables
6
+
7
+ ### In Prompts and Commands
8
+
9
+ - `pr` - Pull request information
10
+ - `pr.number` - PR number
11
+ - `pr.title` - PR title
12
+ - `pr.body` - PR description
13
+ - `pr.author` - PR author username
14
+ - `pr.authorAssociation` - Author's association (OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, etc.)
15
+ - `pr.baseBranch` - Target branch
16
+ - `pr.headBranch` - Source branch
17
+ - `pr.totalAdditions` - Lines added
18
+ - `pr.totalDeletions` - Lines removed
19
+
20
+ - `files` - Array of changed files
21
+ - `files[].filename` - File path
22
+ - `files[].status` - Change type (added, modified, deleted)
23
+ - `files[].additions` - Lines added in this file
24
+ - `files[].deletions` - Lines removed in this file
25
+ - `files[].patch` - Diff content
26
+
27
+ - `event` - GitHub event context (varies by trigger)
28
+
29
+ - `outputs` - Results from dependency checks (Map)
30
+ - Access current value: `outputs.checkName`
31
+ - Access history: `outputs.history.checkName` - Array of all previous outputs from this check
32
+ - See [Output History](./output-history.md) for detailed usage in loops, retries, and forEach
33
+
34
+ - `env` - Safe environment variables
35
+
36
+ - `utils` - Utility functions
37
+ - `utils.timestamp` - Current timestamp
38
+ - `utils.date` - Current date
39
+
40
+ ## Custom Tags
41
+
42
+ ### Reading Files
43
+
44
+ The `readfile` tag allows you to include content from files within your templates:
45
+
46
+ ```liquid
47
+ # Read a file by path
48
+ {% readfile "config/settings.json" %}
49
+
50
+ # Read using a variable
51
+ {% readfile configPath %}
52
+
53
+ # Use in conditionals
54
+ {% if includeConfig %}
55
+ Config: {% readfile "config.yaml" %}
56
+ {% endif %}
57
+
58
+ # Use in loops
59
+ {% for file in configFiles %}
60
+ {% readfile file %}
61
+ {% endfor %}
62
+ ```
63
+
64
+ ### Parsing JSON from Files
65
+
66
+ You can read JSON files and parse them into objects using the `parse_json` filter:
67
+
68
+ ```liquid
69
+ # Read and parse JSON, then access properties
70
+ {% capture config_json %}{% readfile "config.json" %}{% endcapture %}
71
+ {% assign config = config_json | parse_json %}
72
+ Version: {{ config.version }}
73
+ Name: {{ config.name }}
74
+
75
+ # Use parsed JSON in conditionals
76
+ {% if config.enabled %}
77
+ Feature is enabled
78
+ {% endif %}
79
+
80
+ # Iterate over arrays from JSON
81
+ {% for item in config.items %}
82
+ - {{ item.name }}: {{ item.value }}
83
+ {% endfor %}
84
+
85
+ # Combine with other filters
86
+ {% assign pkg = '{% readfile "package.json" %}' | parse_json %}
87
+ Dependencies: {{ pkg.dependencies | json }}
88
+ ```
89
+
90
+ **Security notes:**
91
+ - Files are read relative to the project root
92
+ - Directory traversal attempts are blocked
93
+ - Absolute paths are not allowed
94
+ - Invalid JSON returns the original string
95
+
96
+ ## Useful Filters
97
+
98
+ ### JSON Serialization
99
+
100
+ The `json` filter serializes objects to JSON strings, useful for debugging or passing to tools:
101
+
102
+ ```liquid
103
+ # Debug output object
104
+ {{ outputs | json }}
105
+
106
+ ### Author Permission Filters
107
+
108
+ > **📖 For complete documentation, see [Author Permissions Guide](./author-permissions.md)**
109
+
110
+ Check the PR author's permission level in Liquid templates using filters:
111
+
112
+ ```liquid
113
+ # Check if author has at least MEMBER permission
114
+ {% if pr.authorAssociation | has_min_permission: "MEMBER" %}
115
+ Running quick scan for trusted member...
116
+ {% else %}
117
+ Running full security scan for external contributor...
118
+ {% endif %}
119
+
120
+ # Check specific permission levels
121
+ {% if pr.authorAssociation | is_owner %}
122
+ 🎖️ Repository owner
123
+ {% elsif pr.authorAssociation | is_member %}
124
+ 👥 Organization member
125
+ {% elsif pr.authorAssociation | is_collaborator %}
126
+ 🤝 Collaborator
127
+ {% elsif pr.authorAssociation | is_first_timer %}
128
+ 🎉 First-time contributor - Welcome!
129
+ {% endif %}
130
+
131
+ # Use in prompts
132
+ {% if pr.authorAssociation | is_member %}
133
+ Review this PR from team member {{ pr.author }}.
134
+ Focus on logic and design patterns.
135
+ {% else %}
136
+ Review this PR from external contributor {{ pr.author }}.
137
+ Pay extra attention to security and best practices.
138
+ {% endif %}
139
+
140
+ # Conditional commands
141
+ {% if pr.authorAssociation | has_min_permission: "COLLABORATOR" %}
142
+ gh pr review --approve
143
+ {% else %}
144
+ gh pr review --comment --body "Thanks! A maintainer will review soon."
145
+ {% endif %}
146
+ ```
147
+
148
+ **Available filters:**
149
+ - `has_min_permission: "LEVEL"` - Check if >= permission level
150
+ - `is_owner` - Repository owner
151
+ - `is_member` - Organization member or owner
152
+ - `is_collaborator` - Collaborator or higher
153
+ - `is_contributor` - Has contributed before
154
+ - `is_first_timer` - First-time contributor
155
+
156
+ ### Auto‑JSON Access
157
+
158
+ When a dependency's output is a JSON string, Visor exposes it as an object automatically in templates:
159
+
160
+ ```liquid
161
+ # If `fetch-tickets` printed '{"tickets":[{"key":"TT-101"}]}'
162
+ Ticket key: {{ outputs['fetch-tickets'].tickets[0].key }}
163
+ # No JSON.parse required
164
+ ```
165
+
166
+ If the underlying value is plain text, it behaves as a normal string.
167
+
168
+ # Debug specific check output
169
+ {{ outputs.security | json }}
170
+
171
+ # Pass to command safely
172
+ echo '{{ pr | json }}' | jq .
173
+
174
+ # Create JSON payload
175
+ {
176
+ "title": {{ pr.title | json }},
177
+ "files": {{ files | json }},
178
+ "outputs": {{ outputs | json }}
179
+ }
180
+ ```
181
+
182
+ ### String Filters
183
+
184
+ ```liquid
185
+ {{ pr.title | escape }} # HTML escape
186
+ {{ pr.title | upcase }} # Uppercase
187
+ {{ pr.title | downcase }} # Lowercase
188
+ {{ pr.title | capitalize }} # Capitalize first letter
189
+ {{ pr.title | truncate: 50 }} # Truncate to 50 chars
190
+ ```
191
+
192
+ ### Array Filters
193
+
194
+ ```liquid
195
+ {{ files | size }} # Count of files
196
+ {{ files | first }} # First file
197
+ {{ files | last }} # Last file
198
+ {{ files | map: "filename" }} # Array of filenames
199
+ ```
200
+
201
+ <!-- Removed merge_sort_by example: filter no longer provided -->
202
+
203
+ ## Examples
204
+
205
+ ### Debugging Outputs
206
+
207
+ When you see `[Object]` in your templates, use the `json` filter:
208
+
209
+ ```yaml
210
+ steps:
211
+ debug-outputs:
212
+ type: log
213
+ message: |
214
+ Raw outputs object: {{ outputs }}
215
+ JSON serialized: {{ outputs | json }}
216
+
217
+ Specific check output:
218
+ {{ outputs.security | json }}
219
+ ```
220
+
221
+ ### Conditional Content
222
+
223
+ ```liquid
224
+ {% if pr.totalAdditions > 500 %}
225
+ Large PR detected with {{ pr.totalAdditions }} additions.
226
+ {% endif %}
227
+
228
+ {% for file in files %}
229
+ {% if file.status == "added" %}
230
+ New file: {{ file.filename }}
231
+ {% endif %}
232
+ {% endfor %}
233
+ ```
234
+
235
+ ### Safe Command Execution
236
+
237
+ ```yaml
238
+ steps:
239
+ analyze-with-tool:
240
+ type: command
241
+ exec: |
242
+ # Use json filter for safe data passing
243
+ echo '{{ pr | json }}' > /tmp/pr-data.json
244
+ echo '{{ outputs | json }}' > /tmp/outputs.json
245
+
246
+ # Process with external tool
247
+ my-analyzer --pr-file /tmp/pr-data.json --outputs /tmp/outputs.json
248
+ ```
249
+
250
+ ### Transform Responses
251
+
252
+ ```yaml
253
+ steps:
254
+ http-webhook:
255
+ type: http_input
256
+ transform: |
257
+ {
258
+ "processed": true,
259
+ "original": {{ data | json }},
260
+ "pr_context": {{ pr | json }}
261
+ }
262
+ ```
263
+
264
+ ## Best Practices
265
+
266
+ 1. **Use `json` filter for debugging**: When you need to inspect complex objects
267
+ 2. **Escape user input**: Use appropriate filters (`escape`, `json`) when including user content
268
+ 3. **Validate before parsing**: When transforming to JSON, ensure valid syntax
269
+ 4. **Keep templates readable**: Use proper indentation and comments
270
+
271
+ ## Debugging Techniques
272
+
273
+ ### Using the `json` Filter for Inspection
274
+
275
+ The `json` filter is your primary debugging tool for inspecting data structures:
276
+
277
+ ```liquid
278
+ # Debug all available outputs
279
+ All outputs: {{ outputs | json }}
280
+
281
+ # Debug specific dependency output
282
+ Fetch result: {{ outputs["fetch-tickets"] | json }}
283
+
284
+ # Debug PR context
285
+ PR info: {{ pr | json }}
286
+
287
+ # Debug environment variables
288
+ Environment: {{ env | json }}
289
+ ```
290
+
291
+ ### Debugging in JavaScript Expressions
292
+
293
+ When using `transform_js` or conditions (`if`, `fail_if`), use the `log()` function:
294
+
295
+ ```yaml
296
+ steps:
297
+ my-check:
298
+ type: command
299
+ exec: curl -s https://api.example.com/data
300
+ transform_js: |
301
+ log("Raw output:", output);
302
+ const data = JSON.parse(output);
303
+ log("Parsed data:", data);
304
+ return data.items;
305
+ ```
306
+
307
+ See the [Debugging Guide](./debugging.md) for comprehensive debugging techniques.
308
+
309
+ ## Troubleshooting
310
+
311
+ ### "[Object]" in output
312
+ This means you're trying to output an object directly. Use the `json` filter:
313
+ - Wrong: `{{ outputs }}`
314
+ - Right: `{{ outputs | json }}`
315
+
316
+ ### Undefined variable errors
317
+ Check variable names match exactly (case-sensitive). Use conditional checks:
318
+ ```liquid
319
+ {% if outputs.security %}
320
+ Security data: {{ outputs.security | json }}
321
+ {% else %}
322
+ No security output available
323
+ {% endif %}
324
+ ```
325
+
326
+ ### Debugging missing outputs
327
+ ```liquid
328
+ # Check what outputs are available
329
+ Available outputs: {{ outputs | json }}
330
+
331
+ # Check specific output existence
332
+ {% if outputs["fetch-data"] %}
333
+ Data found: {{ outputs["fetch-data"] | json }}
334
+ {% else %}
335
+ Warning: fetch-data output not found.
336
+ Available keys: {% for key in outputs %}{{ key }}{% unless forloop.last %}, {% endunless %}{% endfor %}
337
+ {% endif %}
338
+ ```
339
+
340
+ ### JSON parsing errors
341
+ Ensure proper escaping when creating JSON:
342
+ ```liquid
343
+ {
344
+ "title": {{ pr.title | json }}, ✓ Properly escaped
345
+ "title": "{{ pr.title }}" ✗ May break with quotes in title
346
+ }
347
+ ```
@@ -0,0 +1,89 @@
1
+ # Manual Loop Routing Refactor — Plan and Status
2
+
3
+ This document captures the plan, rationale, completed work, and next steps to support manual‑only chat loops in Visor without special tags or goto_js.
4
+
5
+ ## Background
6
+
7
+ The previous behavior de‑duplicated a step when re‑routed in the same event, which stalled manual chat loops (ask → refine → ask …). We also experimented with a `repeatable` tag to bypass the guard, but it added concept complexity.
8
+
9
+ ## Goals
10
+
11
+ - Manual‑only loop: ask → refine → ask … until refined=true, then finish.
12
+ - No special tags, no goto_js, no schedule event hops.
13
+ - Use fail_if + on_fail/on_success only.
14
+ - Keep default suites green and avoid regressions.
15
+
16
+ ## Changes (Completed)
17
+
18
+ 1) Engine parity for inline runs
19
+ - Inline `fail_if` evaluation and post‑`fail_if` routing: honor `on_fail.goto` for inline runs.
20
+
21
+ 2) Routed re‑runs (no special tags)
22
+ - For `origin='on_fail'`, forward‑run allows re‑running the same step within the same grouped run; loop safety relies on `routing.max_loops`.
23
+
24
+ 3) Failure‑aware forward runs
25
+ - Skip static `on_success.goto` chains when the target produced fatal issues (including `fail_if`).
26
+ - For `origin='on_fail'`, schedule only direct dependents of the failed target; skip dependents when any direct dep has fatal issues.
27
+
28
+ 4) One‑shot opt‑in
29
+ - `tags: [one_shot]` prevents a terminal step (e.g., `finish`) from running more than once per grouped run.
30
+
31
+ 5) Test‑visible history
32
+ - `executeChecks` now attaches `reviewSummary.history` with a safe snapshot of per‑step outputs history for deterministic testing (no I/O).
33
+
34
+ 6) Task‑refinement agent (manual‑only)
35
+ - `defaults/task-refinement.yaml` uses `ask` → `refine` loop with `fail_if` and `on_fail/on_success` only; no `repeatable`, no `goto_js`, no `schedule`.
36
+ - Embedded tests: one‑pass and multi‑turn pass locally.
37
+
38
+ ## Removed
39
+
40
+ - `repeatable` / `x-repeatable` mechanics: no longer needed.
41
+
42
+ ## Tests
43
+
44
+ - YAML suites (green):
45
+ - `defaults/task-refinement.yaml` (both cases)
46
+ - `defaults/visor.tests.yaml` (10/10)
47
+
48
+ - Jest integration (added):
49
+ - `tests/integration/on-fail-no-cascade.test.ts`: verifies failure‑aware forward runs do not cascade into success chains.
50
+
51
+ - Jest integration (deferred):
52
+ - A deterministic loop test using `reviewSummary.history` to assert multiple turns. Will add a tiny test driver to stabilize execution context and tag filtering.
53
+
54
+ ## How to Validate Locally
55
+
56
+ ```bash
57
+ # Build CLI
58
+ npm run build:cli
59
+
60
+ # Task-refinement YAML
61
+ VISOR_DEBUG=true node dist/index.js test --config defaults/task-refinement.yaml --max-parallel 1
62
+
63
+ # Default suite
64
+ node dist/index.js test --config defaults/visor.tests.yaml --max-parallel 2 --json tmp/visor.json
65
+
66
+ # Focused Jest tests (engine behavior)
67
+ npm test -- on-fail-no-cascade.test.ts
68
+ ```
69
+
70
+ Acceptance criteria:
71
+ - Both YAML suites pass.
72
+ - No `repeatable`/`x-repeatable` in the codebase.
73
+ - `defaults/task-refinement.yaml` contains no `goto_js` and no `schedule` hops.
74
+
75
+ ## Next Steps (Planned)
76
+
77
+ 1) Deterministic Jest loop test
78
+ - Add a small engine test driver util (internal only) that seeds event=`manual` and disables tag filtering; assert loop counts via `reviewSummary.history`.
79
+
80
+ 2) Documentation
81
+ - Add a short “Manual Loops” page covering `fail_if`+`on_fail/on_success`, loop budgets, and `one_shot` for terminal steps.
82
+
83
+ 3) CI gates
84
+ - Add a CI job to run: default YAML, task‑refinement YAML, and the focused Jest tests.
85
+
86
+ ## Risk & Rollback
87
+
88
+ - Risk: forward‑run changes could over/under schedule dependents; mitigated by direct‑dependent + fatal‑skip guards.
89
+ - Rollback: revert to pre‑refactor `scheduleForwardRun` and inline `fail_if` handling while keeping `reviewSummary.history` attachment (benign).