@reticlehq/server 2.2.1 → 2.4.0

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 (790) hide show
  1. package/README.md +1 -1
  2. package/dist/bridge-security.d.ts +0 -1
  3. package/dist/bridge-security.js +0 -1
  4. package/dist/bridge.d.ts +0 -1
  5. package/dist/bridge.js +102 -12
  6. package/dist/bridge.test-harness.d.ts +5 -1
  7. package/dist/bridge.test-harness.js +12 -1
  8. package/dist/capsule/capsule-store.d.ts +2 -3
  9. package/dist/capsule/capsule-store.js +0 -1
  10. package/dist/capsule/capsule.d.ts +0 -1
  11. package/dist/capsule/capsule.js +0 -1
  12. package/dist/capsule/causal-summary.d.ts +21 -1
  13. package/dist/capsule/causal-summary.js +20 -2
  14. package/dist/capsule/divergence.d.ts +0 -1
  15. package/dist/capsule/divergence.js +0 -1
  16. package/dist/capsule/minimize.d.ts +0 -1
  17. package/dist/capsule/minimize.js +0 -1
  18. package/dist/capsule/predicate-to-links.d.ts +0 -1
  19. package/dist/capsule/predicate-to-links.js +0 -1
  20. package/dist/cli-doctor.d.ts +6 -0
  21. package/dist/cli-doctor.js +60 -0
  22. package/dist/cli-flow-commands.d.ts +0 -1
  23. package/dist/cli-flow-commands.js +0 -1
  24. package/dist/cli-launch.d.ts +0 -1
  25. package/dist/cli-launch.js +7 -3
  26. package/dist/cli-parse.d.ts +47 -3
  27. package/dist/cli-parse.js +147 -13
  28. package/dist/cli-port.d.ts +3 -1
  29. package/dist/cli-port.js +21 -1
  30. package/dist/cli-verify.d.ts +0 -1
  31. package/dist/cli-verify.js +1 -2
  32. package/dist/cli.d.ts +0 -1
  33. package/dist/cli.js +88 -69
  34. package/dist/cloud/cloud-config.d.ts +0 -1
  35. package/dist/cloud/cloud-config.js +0 -1
  36. package/dist/cloud/cloud-sync.d.ts +4 -5
  37. package/dist/cloud/cloud-sync.js +0 -1
  38. package/dist/cloud-cli.d.ts +0 -1
  39. package/dist/cloud-cli.js +9 -2
  40. package/dist/crawl/crawl-tools.d.ts +0 -1
  41. package/dist/crawl/crawl-tools.js +1 -2
  42. package/dist/crawl/crawl.d.ts +17 -3
  43. package/dist/crawl/crawl.js +43 -4
  44. package/dist/daemon-resilience.d.ts +6 -1
  45. package/dist/daemon-resilience.js +63 -1
  46. package/dist/daemon.d.ts +23 -3
  47. package/dist/daemon.js +36 -24
  48. package/dist/domain/domain-model.d.ts +0 -1
  49. package/dist/domain/domain-model.js +1 -2
  50. package/dist/domain/domain-tools.d.ts +0 -7
  51. package/dist/domain/domain-tools.js +21 -4
  52. package/dist/domain/flow-risk.d.ts +0 -1
  53. package/dist/domain/flow-risk.js +0 -1
  54. package/dist/ee/audit-log.d.ts +0 -1
  55. package/dist/ee/audit-log.js +0 -1
  56. package/dist/events/body-failures.d.ts +4 -0
  57. package/dist/events/body-failures.js +113 -0
  58. package/dist/events/contradictions.d.ts +53 -0
  59. package/dist/events/contradictions.js +282 -0
  60. package/dist/events/echo-mismatch.d.ts +4 -0
  61. package/dist/events/echo-mismatch.js +138 -0
  62. package/dist/events/event-filters.d.ts +17 -3
  63. package/dist/events/event-filters.js +13 -3
  64. package/dist/events/json-salvage.d.ts +32 -0
  65. package/dist/events/json-salvage.js +96 -0
  66. package/dist/events/predicate-eval.d.ts +2 -1
  67. package/dist/events/predicate-eval.js +56 -9
  68. package/dist/events/predicate.d.ts +0 -1
  69. package/dist/events/predicate.js +56 -2
  70. package/dist/events/reaction.d.ts +0 -1
  71. package/dist/events/reaction.js +0 -1
  72. package/dist/events/reconcile.d.ts +39 -0
  73. package/dist/events/reconcile.js +211 -0
  74. package/dist/events/ring-buffer.d.ts +0 -1
  75. package/dist/events/ring-buffer.js +0 -1
  76. package/dist/events/stale-response.d.ts +4 -0
  77. package/dist/events/stale-response.js +139 -0
  78. package/dist/events/unit-mismatch.d.ts +16 -0
  79. package/dist/events/unit-mismatch.js +167 -0
  80. package/dist/flows/affected-tools.d.ts +18 -0
  81. package/dist/flows/affected-tools.js +52 -0
  82. package/dist/flows/affected.d.ts +0 -1
  83. package/dist/flows/affected.js +0 -1
  84. package/dist/flows/annotate-tools.d.ts +0 -1
  85. package/dist/flows/annotate-tools.js +21 -3
  86. package/dist/flows/annotate.d.ts +0 -1
  87. package/dist/flows/annotate.js +0 -1
  88. package/dist/flows/annotation-store.d.ts +0 -1
  89. package/dist/flows/annotation-store.js +0 -1
  90. package/dist/flows/assertion-integrity.d.ts +0 -1
  91. package/dist/flows/assertion-integrity.js +0 -1
  92. package/dist/flows/assertion-tiers-store.d.ts +0 -1
  93. package/dist/flows/assertion-tiers-store.js +0 -1
  94. package/dist/flows/buddy-status.d.ts +0 -1
  95. package/dist/flows/buddy-status.js +0 -1
  96. package/dist/flows/coverage.d.ts +0 -1
  97. package/dist/flows/coverage.js +0 -1
  98. package/dist/flows/decision.d.ts +0 -7
  99. package/dist/flows/decision.js +47 -7
  100. package/dist/flows/flake-store.d.ts +0 -1
  101. package/dist/flows/flake-store.js +0 -1
  102. package/dist/flows/flake.d.ts +0 -1
  103. package/dist/flows/flake.js +0 -1
  104. package/dist/flows/flow-classify.d.ts +0 -1
  105. package/dist/flows/flow-classify.js +0 -1
  106. package/dist/flows/flow-replay-run.d.ts +0 -1
  107. package/dist/flows/flow-replay-run.js +2 -3
  108. package/dist/flows/flow-replay.d.ts +20 -4
  109. package/dist/flows/flow-replay.js +9 -43
  110. package/dist/flows/flow-report.d.ts +0 -1
  111. package/dist/flows/flow-report.js +0 -1
  112. package/dist/flows/flow-scope.d.ts +0 -1
  113. package/dist/flows/flow-scope.js +0 -1
  114. package/dist/flows/flow-sources.d.ts +0 -1
  115. package/dist/flows/flow-sources.js +0 -1
  116. package/dist/flows/flow-step-runners.d.ts +23 -0
  117. package/dist/flows/flow-step-runners.js +102 -0
  118. package/dist/flows/flow-success.d.ts +0 -1
  119. package/dist/flows/flow-success.js +0 -1
  120. package/dist/flows/flow-tools.d.ts +0 -1
  121. package/dist/flows/flow-tools.js +44 -14
  122. package/dist/flows/flows.d.ts +6 -2
  123. package/dist/flows/flows.js +15 -2
  124. package/dist/flows/gate.d.ts +0 -1
  125. package/dist/flows/gate.js +0 -1
  126. package/dist/flows/git-changed.d.ts +0 -1
  127. package/dist/flows/git-changed.js +0 -1
  128. package/dist/flows/heal-run.d.ts +0 -1
  129. package/dist/flows/heal-run.js +0 -1
  130. package/dist/flows/heal.d.ts +0 -1
  131. package/dist/flows/heal.js +0 -1
  132. package/dist/flows/parallel-suite.d.ts +0 -1
  133. package/dist/flows/parallel-suite.js +0 -1
  134. package/dist/flows/recordings.d.ts +0 -1
  135. package/dist/flows/recordings.js +0 -1
  136. package/dist/flows/replay.d.ts +0 -1
  137. package/dist/flows/replay.js +71 -4
  138. package/dist/flows/server-verify.d.ts +0 -1
  139. package/dist/flows/server-verify.js +0 -1
  140. package/dist/flows/verify-change-tools.d.ts +2 -0
  141. package/dist/flows/verify-change-tools.js +187 -0
  142. package/dist/flows/watch-batcher.d.ts +0 -1
  143. package/dist/flows/watch-batcher.js +0 -1
  144. package/dist/honesty/accepted-write.d.ts +14 -0
  145. package/dist/honesty/accepted-write.js +17 -0
  146. package/dist/honesty/blind-spots.d.ts +18 -1
  147. package/dist/honesty/blind-spots.js +47 -5
  148. package/dist/honesty/honesty.d.ts +0 -1
  149. package/dist/honesty/honesty.js +0 -1
  150. package/dist/honesty/uncaptured-bodies.d.ts +19 -0
  151. package/dist/honesty/uncaptured-bodies.js +30 -0
  152. package/dist/honesty/unread-outcome.d.ts +2 -0
  153. package/dist/honesty/unread-outcome.js +50 -0
  154. package/dist/honesty/verified.d.ts +40 -0
  155. package/dist/honesty/verified.js +86 -0
  156. package/dist/http-server.d.ts +0 -1
  157. package/dist/http-server.js +5 -1
  158. package/dist/hunt/hunt-report.d.ts +50 -0
  159. package/dist/hunt/hunt-report.js +84 -0
  160. package/dist/idle-shutdown.d.ts +0 -1
  161. package/dist/idle-shutdown.js +0 -1
  162. package/dist/index.d.ts +0 -1
  163. package/dist/index.js +0 -1
  164. package/dist/init/agent-rules.d.ts +0 -1
  165. package/dist/init/agent-rules.js +4 -2
  166. package/dist/init/capabilities.d.ts +17 -0
  167. package/dist/init/capabilities.js +51 -0
  168. package/dist/init/cursor.d.ts +0 -1
  169. package/dist/init/cursor.js +0 -1
  170. package/dist/init/desktop-doctor.d.ts +40 -0
  171. package/dist/init/desktop-doctor.js +198 -0
  172. package/dist/init/detect.d.ts +25 -1
  173. package/dist/init/detect.js +65 -4
  174. package/dist/init/mcp.d.ts +0 -1
  175. package/dist/init/mcp.js +0 -1
  176. package/dist/init/next-patch.d.ts +41 -0
  177. package/dist/init/next-patch.js +106 -0
  178. package/dist/init/node-io.d.ts +0 -1
  179. package/dist/init/node-io.js +25 -1
  180. package/dist/init/patch-kind.d.ts +20 -0
  181. package/dist/init/patch-kind.js +10 -0
  182. package/dist/init/plan-framework.d.ts +35 -0
  183. package/dist/init/plan-framework.js +217 -0
  184. package/dist/init/plan.d.ts +55 -4
  185. package/dist/init/plan.js +130 -112
  186. package/dist/init/project-id.d.ts +0 -1
  187. package/dist/init/project-id.js +0 -1
  188. package/dist/init/run.d.ts +17 -1
  189. package/dist/init/run.js +237 -18
  190. package/dist/init/slash-command.d.ts +18 -0
  191. package/dist/init/slash-command.js +52 -0
  192. package/dist/init/snippets.d.ts +48 -3
  193. package/dist/init/snippets.js +156 -6
  194. package/dist/init/vite-config.d.ts +4 -11
  195. package/dist/init/vite-config.js +15 -8
  196. package/dist/input/driven-redaction.d.ts +15 -0
  197. package/dist/input/driven-redaction.js +76 -0
  198. package/dist/input/network-detail.d.ts +9 -4
  199. package/dist/input/network-detail.js +35 -16
  200. package/dist/input/network-mock-tools.d.ts +0 -1
  201. package/dist/input/network-mock-tools.js +3 -4
  202. package/dist/input/network-mock.d.ts +0 -1
  203. package/dist/input/network-mock.js +0 -1
  204. package/dist/input/real-input.d.ts +14 -1
  205. package/dist/input/real-input.js +45 -3
  206. package/dist/input/scroll-find.d.ts +0 -1
  207. package/dist/input/scroll-find.js +0 -1
  208. package/dist/input/scroll-tools.d.ts +0 -1
  209. package/dist/input/scroll-tools.js +0 -1
  210. package/dist/input/viewport-tools.d.ts +0 -1
  211. package/dist/input/viewport-tools.js +3 -4
  212. package/dist/journal/ambient-store.d.ts +0 -1
  213. package/dist/journal/ambient-store.js +0 -1
  214. package/dist/journal/ambient.d.ts +0 -1
  215. package/dist/journal/ambient.js +0 -1
  216. package/dist/journal/attach-journal.d.ts +0 -1
  217. package/dist/journal/attach-journal.js +0 -1
  218. package/dist/journal/deviation-report.d.ts +0 -1
  219. package/dist/journal/deviation-report.js +0 -1
  220. package/dist/journal/deviation-service.d.ts +0 -1
  221. package/dist/journal/deviation-service.js +0 -1
  222. package/dist/journal/envelope-store.d.ts +0 -1
  223. package/dist/journal/envelope-store.js +0 -1
  224. package/dist/journal/envelope.d.ts +8 -9
  225. package/dist/journal/envelope.js +0 -1
  226. package/dist/journal/journal-query.d.ts +0 -1
  227. package/dist/journal/journal-query.js +0 -1
  228. package/dist/journal/journal-recorder.d.ts +0 -1
  229. package/dist/journal/journal-recorder.js +0 -1
  230. package/dist/journal/retention.d.ts +0 -1
  231. package/dist/journal/retention.js +0 -1
  232. package/dist/journal/rollups.d.ts +0 -1
  233. package/dist/journal/rollups.js +0 -1
  234. package/dist/journal/session-end.d.ts +0 -1
  235. package/dist/journal/session-end.js +0 -1
  236. package/dist/journal/session-journal.d.ts +0 -1
  237. package/dist/journal/session-journal.js +0 -1
  238. package/dist/license/license.d.ts +0 -1
  239. package/dist/license/license.js +0 -1
  240. package/dist/log.d.ts +0 -1
  241. package/dist/log.js +0 -1
  242. package/dist/mcp-proxy.d.ts +35 -4
  243. package/dist/mcp-proxy.js +174 -28
  244. package/dist/mcp.d.ts +15 -1
  245. package/dist/mcp.js +145 -17
  246. package/dist/oracles/flow-instrument-gaps.d.ts +0 -1
  247. package/dist/oracles/flow-instrument-gaps.js +0 -1
  248. package/dist/oracles/propose-consequences.d.ts +0 -1
  249. package/dist/oracles/propose-consequences.js +0 -1
  250. package/dist/oracles/self-instrument.d.ts +0 -1
  251. package/dist/oracles/self-instrument.js +0 -1
  252. package/dist/pairing-token.d.ts +0 -1
  253. package/dist/pairing-token.js +0 -1
  254. package/dist/phenomena/phenomena.d.ts +0 -1
  255. package/dist/phenomena/phenomena.js +0 -1
  256. package/dist/pool/browser-pool.d.ts +0 -1
  257. package/dist/pool/browser-pool.js +0 -1
  258. package/dist/pool/lease-reaper.d.ts +0 -1
  259. package/dist/pool/lease-reaper.js +0 -1
  260. package/dist/pool/playwright-launcher.d.ts +0 -1
  261. package/dist/pool/playwright-launcher.js +10 -2
  262. package/dist/project/baselines.d.ts +0 -1
  263. package/dist/project/baselines.js +0 -1
  264. package/dist/project/file-lock.d.ts +2 -1
  265. package/dist/project/file-lock.js +12 -2
  266. package/dist/project/fs-port.d.ts +0 -1
  267. package/dist/project/fs-port.js +0 -1
  268. package/dist/project/project-store.d.ts +0 -1
  269. package/dist/project/project-store.js +0 -1
  270. package/dist/project/project-tools.d.ts +0 -1
  271. package/dist/project/project-tools.js +29 -4
  272. package/dist/project/reticle-dir.d.ts +0 -1
  273. package/dist/project/reticle-dir.js +0 -1
  274. package/dist/runs/build-verification-run.d.ts +0 -1
  275. package/dist/runs/build-verification-run.js +0 -1
  276. package/dist/runs/profile-redact.d.ts +0 -1
  277. package/dist/runs/profile-redact.js +0 -1
  278. package/dist/runs/render-report.d.ts +0 -1
  279. package/dist/runs/render-report.js +0 -1
  280. package/dist/runs/repair-prompt.d.ts +0 -1
  281. package/dist/runs/repair-prompt.js +0 -1
  282. package/dist/runs/replay-mapping.d.ts +0 -1
  283. package/dist/runs/replay-mapping.js +0 -1
  284. package/dist/runs/reticle-runner.d.ts +0 -1
  285. package/dist/runs/reticle-runner.js +4 -2
  286. package/dist/runs/risk-classify.d.ts +0 -1
  287. package/dist/runs/risk-classify.js +0 -1
  288. package/dist/runs/run-diff.d.ts +0 -1
  289. package/dist/runs/run-diff.js +0 -1
  290. package/dist/runs/run-store.d.ts +0 -1
  291. package/dist/runs/run-store.js +0 -1
  292. package/dist/runs/run-tools.d.ts +0 -1
  293. package/dist/runs/run-tools.js +0 -1
  294. package/dist/runs/runner-port.d.ts +0 -1
  295. package/dist/runs/runner-port.js +0 -1
  296. package/dist/runs/verification-sync.d.ts +0 -1
  297. package/dist/runs/verification-sync.js +0 -1
  298. package/dist/runs/verify-http.d.ts +0 -1
  299. package/dist/runs/verify-http.js +0 -1
  300. package/dist/runs/verify-server.d.ts +0 -1
  301. package/dist/runs/verify-server.js +0 -1
  302. package/dist/server-version.d.ts +0 -1
  303. package/dist/server-version.js +0 -1
  304. package/dist/session/command-timeout.d.ts +35 -0
  305. package/dist/session/command-timeout.js +41 -0
  306. package/dist/session/control-envelope.d.ts +2 -3
  307. package/dist/session/control-envelope.js +2 -3
  308. package/dist/session/last-act.d.ts +31 -0
  309. package/dist/session/last-act.js +24 -0
  310. package/dist/session/live-control-tools.d.ts +0 -1
  311. package/dist/session/live-control-tools.js +3 -4
  312. package/dist/session/live-control.d.ts +0 -1
  313. package/dist/session/live-control.js +0 -1
  314. package/dist/session/observed-state.d.ts +12 -2
  315. package/dist/session/observed-state.js +29 -2
  316. package/dist/session/output-budget.d.ts +0 -1
  317. package/dist/session/output-budget.js +0 -1
  318. package/dist/session/pending-commands.d.ts +12 -0
  319. package/dist/session/pending-commands.js +36 -0
  320. package/dist/session/presenter-args.d.ts +0 -1
  321. package/dist/session/presenter-args.js +0 -1
  322. package/dist/session/review-store.d.ts +0 -1
  323. package/dist/session/review-store.js +0 -1
  324. package/dist/session/session-health.d.ts +26 -2
  325. package/dist/session/session-health.js +13 -1
  326. package/dist/session/session-info.d.ts +29 -0
  327. package/dist/session/session-info.js +1 -0
  328. package/dist/session/session-lease.d.ts +25 -0
  329. package/dist/session/session-lease.js +14 -0
  330. package/dist/session/session-manager.d.ts +7 -19
  331. package/dist/session/session-manager.js +35 -2
  332. package/dist/session/session-readiness.d.ts +0 -1
  333. package/dist/session/session-readiness.js +3 -4
  334. package/dist/session/session-reaper.d.ts +0 -1
  335. package/dist/session/session-reaper.js +0 -1
  336. package/dist/session/session-recommendation.d.ts +0 -1
  337. package/dist/session/session-recommendation.js +0 -1
  338. package/dist/session/session-tools.d.ts +0 -1
  339. package/dist/session/session-tools.js +2 -3
  340. package/dist/session/session.d.ts +33 -53
  341. package/dist/session/session.js +102 -66
  342. package/dist/session/state-select.d.ts +0 -1
  343. package/dist/session/state-select.js +0 -1
  344. package/dist/telemetry/argument-shape.d.ts +41 -0
  345. package/dist/telemetry/argument-shape.js +87 -0
  346. package/dist/telemetry/bug-found.d.ts +33 -0
  347. package/dist/telemetry/bug-found.js +95 -0
  348. package/dist/telemetry/cli-telemetry.d.ts +13 -0
  349. package/dist/telemetry/cli-telemetry.js +43 -0
  350. package/dist/telemetry/connect-failure.d.ts +16 -0
  351. package/dist/telemetry/connect-failure.js +44 -0
  352. package/dist/telemetry/daemon-telemetry.d.ts +19 -0
  353. package/dist/telemetry/daemon-telemetry.js +76 -0
  354. package/dist/telemetry/dev-repo.d.ts +10 -0
  355. package/dist/telemetry/dev-repo.js +80 -0
  356. package/dist/telemetry/error-fingerprint.d.ts +24 -0
  357. package/dist/telemetry/error-fingerprint.js +88 -0
  358. package/dist/telemetry/feedback-cli.d.ts +31 -0
  359. package/dist/telemetry/feedback-cli.js +102 -0
  360. package/dist/telemetry/feedback-context.d.ts +32 -0
  361. package/dist/telemetry/feedback-context.js +143 -0
  362. package/dist/telemetry/feedback.d.ts +66 -0
  363. package/dist/telemetry/feedback.js +175 -0
  364. package/dist/telemetry/git-facts.d.ts +21 -0
  365. package/dist/telemetry/git-facts.js +109 -0
  366. package/dist/telemetry/identify.d.ts +22 -0
  367. package/dist/telemetry/identify.js +73 -0
  368. package/dist/telemetry/init-telemetry.d.ts +26 -0
  369. package/dist/telemetry/init-telemetry.js +33 -0
  370. package/dist/telemetry/machine-snapshot.d.ts +6 -0
  371. package/dist/telemetry/machine-snapshot.js +39 -0
  372. package/dist/telemetry/mcp-connection.d.ts +5 -0
  373. package/dist/telemetry/mcp-connection.js +44 -0
  374. package/dist/telemetry/project-profile.d.ts +44 -0
  375. package/dist/telemetry/project-profile.js +205 -0
  376. package/dist/telemetry/run-telemetry.d.ts +21 -0
  377. package/dist/telemetry/run-telemetry.js +62 -0
  378. package/dist/telemetry/session-metrics.d.ts +103 -0
  379. package/dist/telemetry/session-metrics.js +329 -0
  380. package/dist/telemetry/telemetry.d.ts +35 -8
  381. package/dist/telemetry/telemetry.js +105 -12
  382. package/dist/token-auth.d.ts +0 -1
  383. package/dist/token-auth.js +0 -1
  384. package/dist/tools/act-capsule.d.ts +23 -0
  385. package/dist/tools/act-capsule.js +47 -0
  386. package/dist/tools/act-danger.d.ts +7 -0
  387. package/dist/tools/act-danger.js +44 -0
  388. package/dist/tools/act-helpers.d.ts +17 -0
  389. package/dist/tools/act-helpers.js +40 -0
  390. package/dist/tools/act-tools.d.ts +8 -1
  391. package/dist/tools/act-tools.js +96 -98
  392. package/dist/tools/act-view.d.ts +7 -1
  393. package/dist/tools/act-view.js +13 -1
  394. package/dist/tools/assert-grade.d.ts +22 -1
  395. package/dist/tools/assert-grade.js +46 -1
  396. package/dist/tools/assert-verdict.d.ts +21 -0
  397. package/dist/tools/assert-verdict.js +62 -0
  398. package/dist/tools/browser-tools.d.ts +0 -1
  399. package/dist/tools/browser-tools.js +2 -2
  400. package/dist/tools/contract-tools.d.ts +0 -1
  401. package/dist/tools/contract-tools.js +0 -1
  402. package/dist/tools/coverage-tools.d.ts +9 -0
  403. package/dist/tools/coverage-tools.js +92 -0
  404. package/dist/tools/dynamic-tools.d.ts +0 -1
  405. package/dist/tools/dynamic-tools.js +21 -2
  406. package/dist/tools/error-recovery.d.ts +18 -2
  407. package/dist/tools/error-recovery.js +42 -7
  408. package/dist/tools/feedback-tools.d.ts +24 -0
  409. package/dist/tools/feedback-tools.js +180 -0
  410. package/dist/tools/invoke-tool.d.ts +0 -1
  411. package/dist/tools/invoke-tool.js +115 -5
  412. package/dist/tools/lease-tools.d.ts +0 -1
  413. package/dist/tools/lease-tools.js +6 -5
  414. package/dist/tools/merge-tools.d.ts +0 -1
  415. package/dist/tools/merge-tools.js +0 -1
  416. package/dist/tools/observe-tools.d.ts +0 -1
  417. package/dist/tools/observe-tools.js +91 -39
  418. package/dist/tools/profiles.d.ts +1 -2
  419. package/dist/tools/profiles.js +43 -16
  420. package/dist/tools/query-paginate.d.ts +0 -1
  421. package/dist/tools/query-paginate.js +0 -1
  422. package/dist/tools/read-tools.d.ts +0 -1
  423. package/dist/tools/read-tools.js +14 -8
  424. package/dist/tools/reconcile-tools.d.ts +2 -0
  425. package/dist/tools/reconcile-tools.js +111 -0
  426. package/dist/tools/snapshot-delta.d.ts +0 -1
  427. package/dist/tools/snapshot-delta.js +0 -0
  428. package/dist/tools/tool-invoker.d.ts +0 -1
  429. package/dist/tools/tool-invoker.js +0 -1
  430. package/dist/tools/tool-kit.d.ts +16 -1
  431. package/dist/tools/tool-kit.js +8 -2
  432. package/dist/tools/tool-names.d.ts +6 -1
  433. package/dist/tools/tool-names.js +6 -1
  434. package/dist/tools/tools-helpers.d.ts +0 -1
  435. package/dist/tools/tools-helpers.js +0 -1
  436. package/dist/tools/tools.d.ts +0 -1
  437. package/dist/tools/tools.js +24 -4
  438. package/dist/update/update-checker.d.ts +0 -1
  439. package/dist/update/update-checker.js +0 -1
  440. package/dist/update/update-nudge.d.ts +20 -0
  441. package/dist/update/update-nudge.js +72 -0
  442. package/dist/update/updater.d.ts +14 -1
  443. package/dist/update/updater.js +33 -2
  444. package/dist/visual/visual-diff.d.ts +0 -1
  445. package/dist/visual/visual-diff.js +0 -1
  446. package/dist/visual/visual-store.d.ts +0 -1
  447. package/dist/visual/visual-store.js +0 -1
  448. package/dist/visual/visual-tools.d.ts +0 -1
  449. package/dist/visual/visual-tools.js +103 -16
  450. package/package.json +2 -2
  451. package/dist/bridge-security.d.ts.map +0 -1
  452. package/dist/bridge-security.js.map +0 -1
  453. package/dist/bridge.d.ts.map +0 -1
  454. package/dist/bridge.js.map +0 -1
  455. package/dist/bridge.test-harness.d.ts.map +0 -1
  456. package/dist/bridge.test-harness.js.map +0 -1
  457. package/dist/capsule/capsule-store.d.ts.map +0 -1
  458. package/dist/capsule/capsule-store.js.map +0 -1
  459. package/dist/capsule/capsule.d.ts.map +0 -1
  460. package/dist/capsule/capsule.js.map +0 -1
  461. package/dist/capsule/causal-summary.d.ts.map +0 -1
  462. package/dist/capsule/causal-summary.js.map +0 -1
  463. package/dist/capsule/divergence.d.ts.map +0 -1
  464. package/dist/capsule/divergence.js.map +0 -1
  465. package/dist/capsule/minimize.d.ts.map +0 -1
  466. package/dist/capsule/minimize.js.map +0 -1
  467. package/dist/capsule/predicate-to-links.d.ts.map +0 -1
  468. package/dist/capsule/predicate-to-links.js.map +0 -1
  469. package/dist/cli-flow-commands.d.ts.map +0 -1
  470. package/dist/cli-flow-commands.js.map +0 -1
  471. package/dist/cli-launch.d.ts.map +0 -1
  472. package/dist/cli-launch.js.map +0 -1
  473. package/dist/cli-parse.d.ts.map +0 -1
  474. package/dist/cli-parse.js.map +0 -1
  475. package/dist/cli-port.d.ts.map +0 -1
  476. package/dist/cli-port.js.map +0 -1
  477. package/dist/cli-verify.d.ts.map +0 -1
  478. package/dist/cli-verify.js.map +0 -1
  479. package/dist/cli.d.ts.map +0 -1
  480. package/dist/cli.js.map +0 -1
  481. package/dist/cloud/cloud-config.d.ts.map +0 -1
  482. package/dist/cloud/cloud-config.js.map +0 -1
  483. package/dist/cloud/cloud-sync.d.ts.map +0 -1
  484. package/dist/cloud/cloud-sync.js.map +0 -1
  485. package/dist/cloud-cli.d.ts.map +0 -1
  486. package/dist/cloud-cli.js.map +0 -1
  487. package/dist/crawl/crawl-tools.d.ts.map +0 -1
  488. package/dist/crawl/crawl-tools.js.map +0 -1
  489. package/dist/crawl/crawl.d.ts.map +0 -1
  490. package/dist/crawl/crawl.js.map +0 -1
  491. package/dist/daemon-resilience.d.ts.map +0 -1
  492. package/dist/daemon-resilience.js.map +0 -1
  493. package/dist/daemon.d.ts.map +0 -1
  494. package/dist/daemon.js.map +0 -1
  495. package/dist/domain/domain-model.d.ts.map +0 -1
  496. package/dist/domain/domain-model.js.map +0 -1
  497. package/dist/domain/domain-tools.d.ts.map +0 -1
  498. package/dist/domain/domain-tools.js.map +0 -1
  499. package/dist/domain/flow-risk.d.ts.map +0 -1
  500. package/dist/domain/flow-risk.js.map +0 -1
  501. package/dist/ee/audit-log.d.ts.map +0 -1
  502. package/dist/ee/audit-log.js.map +0 -1
  503. package/dist/events/event-filters.d.ts.map +0 -1
  504. package/dist/events/event-filters.js.map +0 -1
  505. package/dist/events/predicate-eval.d.ts.map +0 -1
  506. package/dist/events/predicate-eval.js.map +0 -1
  507. package/dist/events/predicate.d.ts.map +0 -1
  508. package/dist/events/predicate.js.map +0 -1
  509. package/dist/events/reaction.d.ts.map +0 -1
  510. package/dist/events/reaction.js.map +0 -1
  511. package/dist/events/ring-buffer.d.ts.map +0 -1
  512. package/dist/events/ring-buffer.js.map +0 -1
  513. package/dist/flows/affected.d.ts.map +0 -1
  514. package/dist/flows/affected.js.map +0 -1
  515. package/dist/flows/annotate-tools.d.ts.map +0 -1
  516. package/dist/flows/annotate-tools.js.map +0 -1
  517. package/dist/flows/annotate.d.ts.map +0 -1
  518. package/dist/flows/annotate.js.map +0 -1
  519. package/dist/flows/annotation-store.d.ts.map +0 -1
  520. package/dist/flows/annotation-store.js.map +0 -1
  521. package/dist/flows/assertion-integrity.d.ts.map +0 -1
  522. package/dist/flows/assertion-integrity.js.map +0 -1
  523. package/dist/flows/assertion-tiers-store.d.ts.map +0 -1
  524. package/dist/flows/assertion-tiers-store.js.map +0 -1
  525. package/dist/flows/buddy-status.d.ts.map +0 -1
  526. package/dist/flows/buddy-status.js.map +0 -1
  527. package/dist/flows/coverage.d.ts.map +0 -1
  528. package/dist/flows/coverage.js.map +0 -1
  529. package/dist/flows/decision.d.ts.map +0 -1
  530. package/dist/flows/decision.js.map +0 -1
  531. package/dist/flows/flake-store.d.ts.map +0 -1
  532. package/dist/flows/flake-store.js.map +0 -1
  533. package/dist/flows/flake.d.ts.map +0 -1
  534. package/dist/flows/flake.js.map +0 -1
  535. package/dist/flows/flow-classify.d.ts.map +0 -1
  536. package/dist/flows/flow-classify.js.map +0 -1
  537. package/dist/flows/flow-replay-run.d.ts.map +0 -1
  538. package/dist/flows/flow-replay-run.js.map +0 -1
  539. package/dist/flows/flow-replay.d.ts.map +0 -1
  540. package/dist/flows/flow-replay.js.map +0 -1
  541. package/dist/flows/flow-report.d.ts.map +0 -1
  542. package/dist/flows/flow-report.js.map +0 -1
  543. package/dist/flows/flow-scope.d.ts.map +0 -1
  544. package/dist/flows/flow-scope.js.map +0 -1
  545. package/dist/flows/flow-sources.d.ts.map +0 -1
  546. package/dist/flows/flow-sources.js.map +0 -1
  547. package/dist/flows/flow-success.d.ts.map +0 -1
  548. package/dist/flows/flow-success.js.map +0 -1
  549. package/dist/flows/flow-tools.d.ts.map +0 -1
  550. package/dist/flows/flow-tools.js.map +0 -1
  551. package/dist/flows/flows.d.ts.map +0 -1
  552. package/dist/flows/flows.js.map +0 -1
  553. package/dist/flows/gate.d.ts.map +0 -1
  554. package/dist/flows/gate.js.map +0 -1
  555. package/dist/flows/git-changed.d.ts.map +0 -1
  556. package/dist/flows/git-changed.js.map +0 -1
  557. package/dist/flows/heal-run.d.ts.map +0 -1
  558. package/dist/flows/heal-run.js.map +0 -1
  559. package/dist/flows/heal.d.ts.map +0 -1
  560. package/dist/flows/heal.js.map +0 -1
  561. package/dist/flows/parallel-suite.d.ts.map +0 -1
  562. package/dist/flows/parallel-suite.js.map +0 -1
  563. package/dist/flows/recordings.d.ts.map +0 -1
  564. package/dist/flows/recordings.js.map +0 -1
  565. package/dist/flows/replay.d.ts.map +0 -1
  566. package/dist/flows/replay.js.map +0 -1
  567. package/dist/flows/server-verify.d.ts.map +0 -1
  568. package/dist/flows/server-verify.js.map +0 -1
  569. package/dist/flows/watch-batcher.d.ts.map +0 -1
  570. package/dist/flows/watch-batcher.js.map +0 -1
  571. package/dist/honesty/blind-spots.d.ts.map +0 -1
  572. package/dist/honesty/blind-spots.js.map +0 -1
  573. package/dist/honesty/honesty.d.ts.map +0 -1
  574. package/dist/honesty/honesty.js.map +0 -1
  575. package/dist/http-server.d.ts.map +0 -1
  576. package/dist/http-server.js.map +0 -1
  577. package/dist/idle-shutdown.d.ts.map +0 -1
  578. package/dist/idle-shutdown.js.map +0 -1
  579. package/dist/index.d.ts.map +0 -1
  580. package/dist/index.js.map +0 -1
  581. package/dist/init/agent-rules.d.ts.map +0 -1
  582. package/dist/init/agent-rules.js.map +0 -1
  583. package/dist/init/cursor.d.ts.map +0 -1
  584. package/dist/init/cursor.js.map +0 -1
  585. package/dist/init/detect.d.ts.map +0 -1
  586. package/dist/init/detect.js.map +0 -1
  587. package/dist/init/mcp.d.ts.map +0 -1
  588. package/dist/init/mcp.js.map +0 -1
  589. package/dist/init/node-io.d.ts.map +0 -1
  590. package/dist/init/node-io.js.map +0 -1
  591. package/dist/init/plan.d.ts.map +0 -1
  592. package/dist/init/plan.js.map +0 -1
  593. package/dist/init/project-id.d.ts.map +0 -1
  594. package/dist/init/project-id.js.map +0 -1
  595. package/dist/init/run.d.ts.map +0 -1
  596. package/dist/init/run.js.map +0 -1
  597. package/dist/init/snippets.d.ts.map +0 -1
  598. package/dist/init/snippets.js.map +0 -1
  599. package/dist/init/vite-config.d.ts.map +0 -1
  600. package/dist/init/vite-config.js.map +0 -1
  601. package/dist/input/network-detail.d.ts.map +0 -1
  602. package/dist/input/network-detail.js.map +0 -1
  603. package/dist/input/network-mock-tools.d.ts.map +0 -1
  604. package/dist/input/network-mock-tools.js.map +0 -1
  605. package/dist/input/network-mock.d.ts.map +0 -1
  606. package/dist/input/network-mock.js.map +0 -1
  607. package/dist/input/real-input.d.ts.map +0 -1
  608. package/dist/input/real-input.js.map +0 -1
  609. package/dist/input/scroll-find.d.ts.map +0 -1
  610. package/dist/input/scroll-find.js.map +0 -1
  611. package/dist/input/scroll-tools.d.ts.map +0 -1
  612. package/dist/input/scroll-tools.js.map +0 -1
  613. package/dist/input/viewport-tools.d.ts.map +0 -1
  614. package/dist/input/viewport-tools.js.map +0 -1
  615. package/dist/journal/ambient-store.d.ts.map +0 -1
  616. package/dist/journal/ambient-store.js.map +0 -1
  617. package/dist/journal/ambient.d.ts.map +0 -1
  618. package/dist/journal/ambient.js.map +0 -1
  619. package/dist/journal/attach-journal.d.ts.map +0 -1
  620. package/dist/journal/attach-journal.js.map +0 -1
  621. package/dist/journal/deviation-report.d.ts.map +0 -1
  622. package/dist/journal/deviation-report.js.map +0 -1
  623. package/dist/journal/deviation-service.d.ts.map +0 -1
  624. package/dist/journal/deviation-service.js.map +0 -1
  625. package/dist/journal/envelope-store.d.ts.map +0 -1
  626. package/dist/journal/envelope-store.js.map +0 -1
  627. package/dist/journal/envelope.d.ts.map +0 -1
  628. package/dist/journal/envelope.js.map +0 -1
  629. package/dist/journal/journal-query.d.ts.map +0 -1
  630. package/dist/journal/journal-query.js.map +0 -1
  631. package/dist/journal/journal-recorder.d.ts.map +0 -1
  632. package/dist/journal/journal-recorder.js.map +0 -1
  633. package/dist/journal/retention.d.ts.map +0 -1
  634. package/dist/journal/retention.js.map +0 -1
  635. package/dist/journal/rollups.d.ts.map +0 -1
  636. package/dist/journal/rollups.js.map +0 -1
  637. package/dist/journal/session-end.d.ts.map +0 -1
  638. package/dist/journal/session-end.js.map +0 -1
  639. package/dist/journal/session-journal.d.ts.map +0 -1
  640. package/dist/journal/session-journal.js.map +0 -1
  641. package/dist/license/license.d.ts.map +0 -1
  642. package/dist/license/license.js.map +0 -1
  643. package/dist/log.d.ts.map +0 -1
  644. package/dist/log.js.map +0 -1
  645. package/dist/mcp-proxy.d.ts.map +0 -1
  646. package/dist/mcp-proxy.js.map +0 -1
  647. package/dist/mcp.d.ts.map +0 -1
  648. package/dist/mcp.js.map +0 -1
  649. package/dist/oracles/flow-instrument-gaps.d.ts.map +0 -1
  650. package/dist/oracles/flow-instrument-gaps.js.map +0 -1
  651. package/dist/oracles/propose-consequences.d.ts.map +0 -1
  652. package/dist/oracles/propose-consequences.js.map +0 -1
  653. package/dist/oracles/self-instrument.d.ts.map +0 -1
  654. package/dist/oracles/self-instrument.js.map +0 -1
  655. package/dist/pairing-token.d.ts.map +0 -1
  656. package/dist/pairing-token.js.map +0 -1
  657. package/dist/phenomena/phenomena.d.ts.map +0 -1
  658. package/dist/phenomena/phenomena.js.map +0 -1
  659. package/dist/pool/browser-pool.d.ts.map +0 -1
  660. package/dist/pool/browser-pool.js.map +0 -1
  661. package/dist/pool/lease-reaper.d.ts.map +0 -1
  662. package/dist/pool/lease-reaper.js.map +0 -1
  663. package/dist/pool/playwright-launcher.d.ts.map +0 -1
  664. package/dist/pool/playwright-launcher.js.map +0 -1
  665. package/dist/project/baselines.d.ts.map +0 -1
  666. package/dist/project/baselines.js.map +0 -1
  667. package/dist/project/file-lock.d.ts.map +0 -1
  668. package/dist/project/file-lock.js.map +0 -1
  669. package/dist/project/fs-port.d.ts.map +0 -1
  670. package/dist/project/fs-port.js.map +0 -1
  671. package/dist/project/project-store.d.ts.map +0 -1
  672. package/dist/project/project-store.js.map +0 -1
  673. package/dist/project/project-tools.d.ts.map +0 -1
  674. package/dist/project/project-tools.js.map +0 -1
  675. package/dist/project/reticle-dir.d.ts.map +0 -1
  676. package/dist/project/reticle-dir.js.map +0 -1
  677. package/dist/runs/build-verification-run.d.ts.map +0 -1
  678. package/dist/runs/build-verification-run.js.map +0 -1
  679. package/dist/runs/profile-redact.d.ts.map +0 -1
  680. package/dist/runs/profile-redact.js.map +0 -1
  681. package/dist/runs/render-report.d.ts.map +0 -1
  682. package/dist/runs/render-report.js.map +0 -1
  683. package/dist/runs/repair-prompt.d.ts.map +0 -1
  684. package/dist/runs/repair-prompt.js.map +0 -1
  685. package/dist/runs/replay-mapping.d.ts.map +0 -1
  686. package/dist/runs/replay-mapping.js.map +0 -1
  687. package/dist/runs/reticle-runner.d.ts.map +0 -1
  688. package/dist/runs/reticle-runner.js.map +0 -1
  689. package/dist/runs/risk-classify.d.ts.map +0 -1
  690. package/dist/runs/risk-classify.js.map +0 -1
  691. package/dist/runs/run-diff.d.ts.map +0 -1
  692. package/dist/runs/run-diff.js.map +0 -1
  693. package/dist/runs/run-store.d.ts.map +0 -1
  694. package/dist/runs/run-store.js.map +0 -1
  695. package/dist/runs/run-tools.d.ts.map +0 -1
  696. package/dist/runs/run-tools.js.map +0 -1
  697. package/dist/runs/runner-port.d.ts.map +0 -1
  698. package/dist/runs/runner-port.js.map +0 -1
  699. package/dist/runs/verification-sync.d.ts.map +0 -1
  700. package/dist/runs/verification-sync.js.map +0 -1
  701. package/dist/runs/verify-http.d.ts.map +0 -1
  702. package/dist/runs/verify-http.js.map +0 -1
  703. package/dist/runs/verify-server.d.ts.map +0 -1
  704. package/dist/runs/verify-server.js.map +0 -1
  705. package/dist/server-version.d.ts.map +0 -1
  706. package/dist/server-version.js.map +0 -1
  707. package/dist/session/control-envelope.d.ts.map +0 -1
  708. package/dist/session/control-envelope.js.map +0 -1
  709. package/dist/session/live-control-tools.d.ts.map +0 -1
  710. package/dist/session/live-control-tools.js.map +0 -1
  711. package/dist/session/live-control.d.ts.map +0 -1
  712. package/dist/session/live-control.js.map +0 -1
  713. package/dist/session/observed-state.d.ts.map +0 -1
  714. package/dist/session/observed-state.js.map +0 -1
  715. package/dist/session/output-budget.d.ts.map +0 -1
  716. package/dist/session/output-budget.js.map +0 -1
  717. package/dist/session/presenter-args.d.ts.map +0 -1
  718. package/dist/session/presenter-args.js.map +0 -1
  719. package/dist/session/review-store.d.ts.map +0 -1
  720. package/dist/session/review-store.js.map +0 -1
  721. package/dist/session/session-health.d.ts.map +0 -1
  722. package/dist/session/session-health.js.map +0 -1
  723. package/dist/session/session-manager.d.ts.map +0 -1
  724. package/dist/session/session-manager.js.map +0 -1
  725. package/dist/session/session-readiness.d.ts.map +0 -1
  726. package/dist/session/session-readiness.js.map +0 -1
  727. package/dist/session/session-reaper.d.ts.map +0 -1
  728. package/dist/session/session-reaper.js.map +0 -1
  729. package/dist/session/session-recommendation.d.ts.map +0 -1
  730. package/dist/session/session-recommendation.js.map +0 -1
  731. package/dist/session/session-tools.d.ts.map +0 -1
  732. package/dist/session/session-tools.js.map +0 -1
  733. package/dist/session/session.d.ts.map +0 -1
  734. package/dist/session/session.js.map +0 -1
  735. package/dist/session/state-select.d.ts.map +0 -1
  736. package/dist/session/state-select.js.map +0 -1
  737. package/dist/telemetry/telemetry.d.ts.map +0 -1
  738. package/dist/telemetry/telemetry.js.map +0 -1
  739. package/dist/token-auth.d.ts.map +0 -1
  740. package/dist/token-auth.js.map +0 -1
  741. package/dist/tools/act-tools.d.ts.map +0 -1
  742. package/dist/tools/act-tools.js.map +0 -1
  743. package/dist/tools/act-view.d.ts.map +0 -1
  744. package/dist/tools/act-view.js.map +0 -1
  745. package/dist/tools/assert-grade.d.ts.map +0 -1
  746. package/dist/tools/assert-grade.js.map +0 -1
  747. package/dist/tools/browser-tools.d.ts.map +0 -1
  748. package/dist/tools/browser-tools.js.map +0 -1
  749. package/dist/tools/contract-tools.d.ts.map +0 -1
  750. package/dist/tools/contract-tools.js.map +0 -1
  751. package/dist/tools/dynamic-tools.d.ts.map +0 -1
  752. package/dist/tools/dynamic-tools.js.map +0 -1
  753. package/dist/tools/error-recovery.d.ts.map +0 -1
  754. package/dist/tools/error-recovery.js.map +0 -1
  755. package/dist/tools/invoke-tool.d.ts.map +0 -1
  756. package/dist/tools/invoke-tool.js.map +0 -1
  757. package/dist/tools/lease-tools.d.ts.map +0 -1
  758. package/dist/tools/lease-tools.js.map +0 -1
  759. package/dist/tools/merge-tools.d.ts.map +0 -1
  760. package/dist/tools/merge-tools.js.map +0 -1
  761. package/dist/tools/observe-tools.d.ts.map +0 -1
  762. package/dist/tools/observe-tools.js.map +0 -1
  763. package/dist/tools/profiles.d.ts.map +0 -1
  764. package/dist/tools/profiles.js.map +0 -1
  765. package/dist/tools/query-paginate.d.ts.map +0 -1
  766. package/dist/tools/query-paginate.js.map +0 -1
  767. package/dist/tools/read-tools.d.ts.map +0 -1
  768. package/dist/tools/read-tools.js.map +0 -1
  769. package/dist/tools/snapshot-delta.d.ts.map +0 -1
  770. package/dist/tools/snapshot-delta.js.map +0 -1
  771. package/dist/tools/tool-invoker.d.ts.map +0 -1
  772. package/dist/tools/tool-invoker.js.map +0 -1
  773. package/dist/tools/tool-kit.d.ts.map +0 -1
  774. package/dist/tools/tool-kit.js.map +0 -1
  775. package/dist/tools/tool-names.d.ts.map +0 -1
  776. package/dist/tools/tool-names.js.map +0 -1
  777. package/dist/tools/tools-helpers.d.ts.map +0 -1
  778. package/dist/tools/tools-helpers.js.map +0 -1
  779. package/dist/tools/tools.d.ts.map +0 -1
  780. package/dist/tools/tools.js.map +0 -1
  781. package/dist/update/update-checker.d.ts.map +0 -1
  782. package/dist/update/update-checker.js.map +0 -1
  783. package/dist/update/updater.d.ts.map +0 -1
  784. package/dist/update/updater.js.map +0 -1
  785. package/dist/visual/visual-diff.d.ts.map +0 -1
  786. package/dist/visual/visual-diff.js.map +0 -1
  787. package/dist/visual/visual-store.d.ts.map +0 -1
  788. package/dist/visual/visual-store.js.map +0 -1
  789. package/dist/visual/visual-tools.d.ts.map +0 -1
  790. package/dist/visual/visual-tools.js.map +0 -1
@@ -56,4 +56,3 @@ export class FlakeStore {
56
56
  .map(([flow]) => flow);
57
57
  }
58
58
  }
59
- //# sourceMappingURL=flake-store.js.map
@@ -55,4 +55,3 @@ export declare function recordOutcome(record: FlakeRecord, passed: boolean): Fla
55
55
  export declare function isFlaky(record: FlakeRecord, minRuns?: number): boolean;
56
56
  /** Observed intermittent-failure rate (0 when too few runs to judge). */
57
57
  export declare function flakeRate(record: FlakeRecord): number;
58
- //# sourceMappingURL=flake.d.ts.map
@@ -33,4 +33,3 @@ export function isFlaky(record, minRuns = DEFAULT_MIN_FLAKE_RUNS) {
33
33
  export function flakeRate(record) {
34
34
  return record.runs === 0 ? 0 : record.fails / record.runs;
35
35
  }
36
- //# sourceMappingURL=flake.js.map
@@ -49,4 +49,3 @@ export interface FlowAssertionClassification {
49
49
  warning?: string;
50
50
  }
51
51
  export declare function classifyFlowAssertions(flow: FlowFile): FlowAssertionClassification;
52
- //# sourceMappingURL=flow-classify.d.ts.map
@@ -88,4 +88,3 @@ export function classifyFlowAssertions(flow) {
88
88
  ...(warning !== undefined ? { warning } : {}),
89
89
  };
90
90
  }
91
- //# sourceMappingURL=flow-classify.js.map
@@ -30,4 +30,3 @@ export declare function replayNamedFlow(deps: ToolDeps, args: Record<string, unk
30
30
  * documented to work headless), so a missing/unknown session degrades to the global/legacy store.
31
31
  */
32
32
  export declare function sessionProjectId(deps: ToolDeps, sessionId: string | undefined): string | undefined;
33
- //# sourceMappingURL=flow-replay-run.d.ts.map
@@ -30,11 +30,11 @@ export function flowErrorMessage(code) {
30
30
  case FlowErrorCode.INVALID_NAME:
31
31
  return 'invalid flow name — use a single safe segment (letters/digits/-/_), no path separators';
32
32
  case FlowErrorCode.NOT_FOUND:
33
- return 'no such flow on disk — run reticle_flow_list to see saved flows';
33
+ return 'no such flow on disk — run reticle_flow{action:"list"} to see saved flows';
34
34
  case FlowErrorCode.PARSE_FAILED:
35
35
  return 'flow file is malformed — fix or regenerate it with reticle_flow_save';
36
36
  case FlowErrorCode.NO_RECORDING:
37
- return 'no compiled recording by that name — record one (reticle_record_start/stop) first';
37
+ return 'no compiled recording by that name — record one (reticle_record{action:"start"|"stop"}) first';
38
38
  }
39
39
  }
40
40
  /** Map the wire ReplayStatus onto the persisted RunStatus (ok→pass). */
@@ -216,4 +216,3 @@ export function sessionProjectId(deps, sessionId) {
216
216
  return undefined;
217
217
  }
218
218
  }
219
- //# sourceMappingURL=flow-replay-run.js.map
@@ -1,4 +1,4 @@
1
- import { type CommandResult, type FlowFile, type FlowStepResult, type ReticleEvent } from '@reticlehq/core';
1
+ import { AnchorKind, type CommandResult, type FlowAnchor, type FlowFile, type FlowStepResult, type ReticleEvent, type QueryEmptyHint } from '@reticlehq/core';
2
2
  import type { EvalResult, Predicate } from '../events/predicate.js';
3
3
  /**
4
4
  * The session surface flow-replay needs: QUERY to re-resolve a testid anchor against the live
@@ -40,13 +40,31 @@ export declare function editDistance(a: string, b: string): number;
40
40
  */
41
41
  export declare function nearestTestid(missing: string, present: string[]): string | null;
42
42
  /** Injected sleeper so tests drive replay with a no-op clock; production waits on a real timer. */
43
- type Sleep = (ms: number) => Promise<void>;
43
+ export type Sleep = (ms: number) => Promise<void>;
44
44
  /**
45
45
  * True when ≥2 present testids tie at the minimum edit distance to the missing one — `nearest` is
46
46
  * then an arbitrary lexical-tiebreak pick, so auto-healing would be a coin-flip between candidates.
47
47
  * Such a drift is surfaced (with a nearest) but never auto-healed.
48
48
  */
49
49
  export declare function nearestIsAmbiguous(missing: string, present: string[]): boolean;
50
+ /**
51
+ * Re-resolve any QUERY against the live DOM, tolerating an in-flight render: QUERY, and while it
52
+ * returns zero refs, sleep and retry up to ANCHOR_SETTLE_ATTEMPTS. Returns as soon as refs appear,
53
+ * so a present anchor costs one query; a genuinely missing one costs the full (bounded) settle and
54
+ * then drifts. The last result's near-miss hint is returned for the drift record.
55
+ */
56
+ export declare function resolveQuery(session: FlowReplaySession, queryArgs: Record<string, unknown>, sleep: Sleep): Promise<{
57
+ refs: string[];
58
+ hint?: QueryEmptyHint;
59
+ }>;
60
+ /** A compact, legible label for a component auto-anchor (component@file:line, or its best part). */
61
+ export declare function componentLabel(anchor: Extract<FlowAnchor, {
62
+ kind: typeof AnchorKind.COMPONENT;
63
+ }>): string;
64
+ /** QUERY args for a component auto-anchor — source (precise) + component name (coarse) as given. */
65
+ export declare function componentQueryArgs(anchor: Extract<FlowAnchor, {
66
+ kind: typeof AnchorKind.COMPONENT;
67
+ }>): Record<string, unknown>;
50
68
  /**
51
69
  * Replay a loaded flow by RE-RESOLVING every step's semantic anchor against the live DOM — never
52
70
  * a stale ref. A testid anchor is re-found by reticle_query; a signal anchor waits on a predicate.
@@ -54,5 +72,3 @@ export declare function nearestIsAmbiguous(missing: string, present: string[]):
54
72
  * results. This is the "whose fault is it" contract, not a blind "command failed".
55
73
  */
56
74
  export declare function replayFlow(session: FlowReplaySession, flow: FlowFile, waitForSignal: WaitForSignal, signalTimeoutMs: number, confirmDangerous?: boolean, sleep?: Sleep): Promise<FlowStepResult[]>;
57
- export {};
58
- //# sourceMappingURL=flow-replay.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { AnchorKind, DriftReason, EventType, ReticleCommand, QueryBy, } from '@reticlehq/core';
2
2
  import { asRecord, asString } from '../tools/tools-helpers.js';
3
3
  import { replayActionArgs, ambiguousTestidNote, queryRefs } from './replay.js';
4
+ import { runRoleStep, runComponentStep } from './flow-step-runners.js';
4
5
  import { ReticleTool } from '../tools/tool-names.js';
5
6
  /**
6
7
  * A single ASCII-ish edit distance (case-insensitive). Small inputs (testids), so O(n*m) is fine.
@@ -124,7 +125,7 @@ function testidDrift(value, hint) {
124
125
  * so a present anchor costs one query; a genuinely missing one costs the full (bounded) settle and
125
126
  * then drifts. The last result's near-miss hint is returned for the drift record.
126
127
  */
127
- async function resolveQuery(session, queryArgs, sleep) {
128
+ export async function resolveQuery(session, queryArgs, sleep) {
128
129
  let last = readQuery(await session.command(ReticleCommand.QUERY, queryArgs));
129
130
  for (let attempt = 1; last.refs.length === 0 && attempt < ANCHOR_SETTLE_ATTEMPTS; attempt += 1) {
130
131
  await sleep(ANCHOR_SETTLE_DELAY_MS);
@@ -196,7 +197,7 @@ function summarizeConsequence(events) {
196
197
  return parts.length > 0 ? parts.join('; ') : undefined;
197
198
  }
198
199
  /** A compact, legible label for a component auto-anchor (component@file:line, or its best part). */
199
- function componentLabel(anchor) {
200
+ export function componentLabel(anchor) {
200
201
  if (anchor.source !== undefined) {
201
202
  const base = anchor.source.file.split('/').pop() ?? anchor.source.file;
202
203
  const loc = `${base}:${anchor.source.line}`;
@@ -215,7 +216,7 @@ function anchorLabel(anchor) {
215
216
  return anchor.name ?? anchor.role;
216
217
  }
217
218
  /** QUERY args for a component auto-anchor — source (precise) + component name (coarse) as given. */
218
- function componentQueryArgs(anchor) {
219
+ export function componentQueryArgs(anchor) {
219
220
  const args = { by: QueryBy.COMPONENT };
220
221
  if (anchor.component !== undefined)
221
222
  args['component'] = anchor.component;
@@ -223,45 +224,6 @@ function componentQueryArgs(anchor) {
223
224
  args['source'] = anchor.source;
224
225
  return args;
225
226
  }
226
- /** Run one component-anchored step: re-resolve via QUERY by:'component', ACT on the live ref, else drift. */
227
- async function runComponentStep(session, step, index, anchor, confirmDangerous, sleep) {
228
- const label = componentLabel(anchor);
229
- const { refs } = await resolveQuery(session, componentQueryArgs(anchor), sleep);
230
- if (refs.length === 0) {
231
- return {
232
- step: index,
233
- tool: step.tool,
234
- anchor: label,
235
- ok: false,
236
- drift: {
237
- reasonKind: DriftReason.COMPONENT_NOT_FOUND,
238
- reason: `component anchor "${label}" not found`,
239
- anchor: label,
240
- nearest: null,
241
- },
242
- };
243
- }
244
- const ref = refs[0] ?? '';
245
- // Attribute the step's effects to the step. Without this window they arrive with no actionId and are
246
- // learned as ambient churn on the very regions the flow exercises.
247
- session.beginAction?.(ReticleTool.FLOW_REPLAY, { ref, action: step.action ?? '' });
248
- let act;
249
- try {
250
- act = await session.command(ReticleCommand.ACT, {
251
- ref,
252
- action: step.action ?? '',
253
- args: replayActionArgs(step.args, confirmDangerous),
254
- });
255
- }
256
- finally {
257
- // Close on every exit so a throwing step cannot leak the window onto the next step's events.
258
- session.finishAction?.();
259
- }
260
- const result = { step: index, tool: step.tool, anchor: label, ok: act.ok };
261
- if (!act.ok)
262
- result.error = act.error ?? 'command failed';
263
- return result;
264
- }
265
227
  /** Run one testid-anchored step: re-resolve via QUERY, then ACT on the live ref, else drift. */
266
228
  async function runTestidStep(session, step, index, value, dynamic, confirmDangerous, sleep) {
267
229
  const { refs, hint } = await resolveTestid(session, value, sleep);
@@ -393,6 +355,11 @@ export async function replayFlow(session, flow, waitForSignal, signalTimeoutMs,
393
355
  else if (step.anchor.kind === AnchorKind.COMPONENT) {
394
356
  result = await runComponentStep(session, step, index, step.anchor, confirmDangerous, sleep);
395
357
  }
358
+ else if (step.anchor.kind === AnchorKind.ROLE && step.anchor.name !== undefined) {
359
+ // A NAMED role anchor addresses one element. The nameless one is the degraded placeholder and
360
+ // keeps its old path, where it fails legibly rather than querying a role as if it were a testid.
361
+ result = await runRoleStep(session, step, index, step.anchor, confirmDangerous, sleep);
362
+ }
396
363
  else {
397
364
  result = await runTestidStep(session, step, index, label, dynamic, confirmDangerous, sleep);
398
365
  }
@@ -422,4 +389,3 @@ export async function replayFlow(session, flow, waitForSignal, signalTimeoutMs,
422
389
  }
423
390
  return results;
424
391
  }
425
- //# sourceMappingURL=flow-replay.js.map
@@ -20,4 +20,3 @@ interface FlowReportInput {
20
20
  }
21
21
  export declare function buildFlowReport(input: FlowReportInput): string;
22
22
  export {};
23
- //# sourceMappingURL=flow-report.d.ts.map
@@ -104,4 +104,3 @@ export function buildFlowReport(input) {
104
104
  out.push('');
105
105
  return out.join('\n');
106
106
  }
107
- //# sourceMappingURL=flow-report.js.map
@@ -22,4 +22,3 @@ export declare function flowInProjectScope(flowProjectId: string | undefined, se
22
22
  * flows starting from a non-testid anchor get a chip with no `start` (shown on every page).
23
23
  */
24
24
  export declare function buildFlowChips(flows: readonly FlowFile[], sessionProjectId: string | undefined): FlowChip[];
25
- //# sourceMappingURL=flow-scope.d.ts.map
@@ -31,4 +31,3 @@ export function buildFlowChips(flows, sessionProjectId) {
31
31
  }
32
32
  return chips;
33
33
  }
34
- //# sourceMappingURL=flow-scope.js.map
@@ -17,4 +17,3 @@ export interface NamedFlow {
17
17
  export declare function toFlowSources(flows: readonly NamedFlow[]): FlowSources[];
18
18
  /** Which saved flows a set of changed files affects — the derivation + index in one call. */
19
19
  export declare function affectedSavedFlows(flows: readonly NamedFlow[], changedFiles: readonly string[]): AffectedResult;
20
- //# sourceMappingURL=flow-sources.d.ts.map
@@ -30,4 +30,3 @@ export function toFlowSources(flows) {
30
30
  export function affectedSavedFlows(flows, changedFiles) {
31
31
  return affectedFlows(toFlowSources(flows), changedFiles);
32
32
  }
33
- //# sourceMappingURL=flow-sources.js.map
@@ -0,0 +1,23 @@
1
+ /**
2
+ * How one anchored step is turned into a live action.
3
+ *
4
+ * Split out of flow-replay.ts when adding the role+name runner pushed that file past the size cap.
5
+ * These three share one shape — resolve an anchor to a ref, then dispatch — and the sharing is the
6
+ * point: the action window must open and close identically no matter which anchor found the element,
7
+ * or a step's events land in the wrong window depending on how it was addressed.
8
+ */
9
+ import { AnchorKind, type FlowAnchor, type FlowStep, type FlowStepResult } from '@reticlehq/core';
10
+ import type { FlowReplaySession, Sleep } from './flow-replay.js';
11
+ /** Run one role+name-anchored step: re-resolve via QUERY by:'role', ACT on the live ref, else drift. */
12
+ export declare function runRoleStep(session: FlowReplaySession, step: FlowStep, index: number, anchor: Extract<FlowAnchor, {
13
+ kind: typeof AnchorKind.ROLE;
14
+ }>, confirmDangerous: boolean, sleep: Sleep): Promise<FlowStepResult>;
15
+ /**
16
+ * Dispatch one already-resolved step. Shared so every anchor kind runs the action the same way —
17
+ * including the action window, whose open/close must not depend on which anchor found the element.
18
+ */
19
+ export declare function actOnResolvedRef(session: FlowReplaySession, step: FlowStep, index: number, label: string, ref: string, confirmDangerous: boolean): Promise<FlowStepResult>;
20
+ /** Run one component-anchored step: re-resolve via QUERY by:'component', ACT on the live ref, else drift. */
21
+ export declare function runComponentStep(session: FlowReplaySession, step: FlowStep, index: number, anchor: Extract<FlowAnchor, {
22
+ kind: typeof AnchorKind.COMPONENT;
23
+ }>, confirmDangerous: boolean, sleep: Sleep): Promise<FlowStepResult>;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * How one anchored step is turned into a live action.
3
+ *
4
+ * Split out of flow-replay.ts when adding the role+name runner pushed that file past the size cap.
5
+ * These three share one shape — resolve an anchor to a ref, then dispatch — and the sharing is the
6
+ * point: the action window must open and close identically no matter which anchor found the element,
7
+ * or a step's events land in the wrong window depending on how it was addressed.
8
+ */
9
+ import { AnchorKind, DriftReason, QueryBy, ReticleCommand, } from '@reticlehq/core';
10
+ import { ReticleTool } from '../tools/tool-names.js';
11
+ import { replayActionArgs } from './replay.js';
12
+ import { componentLabel, componentQueryArgs, resolveQuery } from './flow-replay.js';
13
+ /** Query args for a NAMED role anchor — the handle that identifies an instance, not a JSX site. */
14
+ function roleQueryArgs(anchor) {
15
+ return {
16
+ by: QueryBy.ROLE,
17
+ value: anchor.role,
18
+ ...(anchor.name === undefined ? {} : { name: anchor.name }),
19
+ };
20
+ }
21
+ /** Run one role+name-anchored step: re-resolve via QUERY by:'role', ACT on the live ref, else drift. */
22
+ export async function runRoleStep(session, step, index, anchor, confirmDangerous, sleep) {
23
+ const label = `${anchor.role} "${String(anchor.name)}"`;
24
+ const { refs } = await resolveQuery(session, roleQueryArgs(anchor), sleep);
25
+ const ref = refs[0];
26
+ if (ref === undefined) {
27
+ return {
28
+ step: index,
29
+ tool: step.tool,
30
+ anchor: label,
31
+ ok: false,
32
+ drift: {
33
+ reasonKind: DriftReason.COMPONENT_NOT_FOUND,
34
+ reason: `role anchor ${label} not found`,
35
+ anchor: label,
36
+ nearest: null,
37
+ },
38
+ };
39
+ }
40
+ return await actOnResolvedRef(session, step, index, label, ref, confirmDangerous);
41
+ }
42
+ /**
43
+ * Dispatch one already-resolved step. Shared so every anchor kind runs the action the same way —
44
+ * including the action window, whose open/close must not depend on which anchor found the element.
45
+ */
46
+ export async function actOnResolvedRef(session, step, index, label, ref, confirmDangerous) {
47
+ session.beginAction?.(ReticleTool.FLOW_REPLAY, { ref, action: step.action ?? '' });
48
+ let act;
49
+ try {
50
+ act = await session.command(ReticleCommand.ACT, {
51
+ ref,
52
+ action: step.action ?? '',
53
+ args: replayActionArgs(step.args, confirmDangerous),
54
+ });
55
+ }
56
+ finally {
57
+ session.finishAction?.();
58
+ }
59
+ const result = { step: index, tool: step.tool, anchor: label, ok: act.ok };
60
+ if (!act.ok)
61
+ result.error = act.error ?? 'command failed';
62
+ return result;
63
+ }
64
+ /** Run one component-anchored step: re-resolve via QUERY by:'component', ACT on the live ref, else drift. */
65
+ export async function runComponentStep(session, step, index, anchor, confirmDangerous, sleep) {
66
+ const label = componentLabel(anchor);
67
+ const { refs } = await resolveQuery(session, componentQueryArgs(anchor), sleep);
68
+ if (refs.length === 0) {
69
+ return {
70
+ step: index,
71
+ tool: step.tool,
72
+ anchor: label,
73
+ ok: false,
74
+ drift: {
75
+ reasonKind: DriftReason.COMPONENT_NOT_FOUND,
76
+ reason: `component anchor "${label}" not found`,
77
+ anchor: label,
78
+ nearest: null,
79
+ },
80
+ };
81
+ }
82
+ const ref = refs[0] ?? '';
83
+ // Attribute the step's effects to the step. Without this window they arrive with no actionId and are
84
+ // learned as ambient churn on the very regions the flow exercises.
85
+ session.beginAction?.(ReticleTool.FLOW_REPLAY, { ref, action: step.action ?? '' });
86
+ let act;
87
+ try {
88
+ act = await session.command(ReticleCommand.ACT, {
89
+ ref,
90
+ action: step.action ?? '',
91
+ args: replayActionArgs(step.args, confirmDangerous),
92
+ });
93
+ }
94
+ finally {
95
+ // Close on every exit so a throwing step cannot leak the window onto the next step's events.
96
+ session.finishAction?.();
97
+ }
98
+ const result = { step: index, tool: step.tool, anchor: label, ok: act.ok };
99
+ if (!act.ok)
100
+ result.error = act.error ?? 'command failed';
101
+ return result;
102
+ }
@@ -30,4 +30,3 @@ export declare function successToPredicate(success: FlowExpect, dynamic: Readonl
30
30
  * the injected timeout. Never reads the wall clock.
31
31
  */
32
32
  export declare function assertSuccess(session: FlowReplaySession, success: FlowExpect | undefined, dynamic: ReadonlySet<string>, waitForSignal: WaitForSignal, timeoutMs: number, since?: number): Promise<EvalResult>;
33
- //# sourceMappingURL=flow-success.d.ts.map
@@ -128,4 +128,3 @@ export async function assertSuccess(session, success, dynamic, waitForSignal, ti
128
128
  // a prior replay/run (or, in heal, by the pre-heal drift replay) cannot fake a pass.
129
129
  return waitForSignal(session, predicate, timeoutMs, since);
130
130
  }
131
- //# sourceMappingURL=flow-success.js.map
@@ -13,4 +13,3 @@ export declare function leasableAppUrl(deps: ToolDeps, sessionId: string | undef
13
13
  /** A flow whose leased context never came up is a suite ERROR, never a silent pass. */
14
14
  export declare function leaseFailureReplay(name: string, error: string | undefined): FlowReplayResult;
15
15
  export declare const FLOW_TOOLS: ToolDef[];
16
- //# sourceMappingURL=flow-tools.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { FlowErrorCode, RecordedSaveError, ReplayStatus, } from '@reticlehq/core';
3
+ import { FlakeStore } from './flake-store.js';
3
4
  import { ReticleTool } from '../tools/tool-names.js';
4
5
  import { asNumber, asString } from '../tools/tools-helpers.js';
5
6
  import { log } from '../log.js';
@@ -71,7 +72,7 @@ export const FLOW_TOOLS = [
71
72
  inputSchema: {
72
73
  flowName: z
73
74
  .string()
74
- .describe('Name for the flow file (saved to .reticle/flows/<flowName>.json). Use again in reticle_flow_load/reticle_flow_replay.'),
75
+ .describe('Name for the flow file (saved to .reticle/flows/<flowName>.json). Use again in reticle_flow{action:"load"} / reticle_flow_replay.'),
75
76
  sessionId: z
76
77
  .string()
77
78
  .optional()
@@ -171,7 +172,7 @@ export const FLOW_TOOLS = [
171
172
  inputSchema: {
172
173
  flowName: z
173
174
  .string()
174
- .describe('Flow file name (without .json extension) from reticle_flow_list.'),
175
+ .describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
175
176
  sessionId: z
176
177
  .string()
177
178
  .optional()
@@ -200,7 +201,7 @@ export const FLOW_TOOLS = [
200
201
  inputSchema: {
201
202
  flowName: z
202
203
  .string()
203
- .describe('Flow file name (without .json extension) from reticle_flow_list.'),
204
+ .describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
204
205
  sessionId: z
205
206
  .string()
206
207
  .optional()
@@ -231,7 +232,7 @@ export const FLOW_TOOLS = [
231
232
  inputSchema: {
232
233
  flowName: z
233
234
  .string()
234
- .describe('Flow file name (without .json extension) from reticle_flow_list.'),
235
+ .describe('Flow file name (without .json extension) from reticle_flow{action:"list"}.'),
235
236
  confirmDangerous: z
236
237
  .boolean()
237
238
  .optional()
@@ -274,7 +275,7 @@ export const FLOW_TOOLS = [
274
275
  description: 'Replay EVERY saved flow (or a given subset) and return ONE consolidated suite verdict — the ' +
275
276
  'autonomous regression check to run after a build/change. Deterministic (no LLM per flow). ' +
276
277
  'Returns { status: pass|fail, total, passed, failed, summary, failures:[{ flow, verdict, ' +
277
- 'whatChanged, whereInSource, nextAction }] } — passing flows are counted, only failures carry ' +
278
+ 'whatChanged, whereInSource, nextAction }] } plus `flaky` (flows seen to pass AND fail on unchanged code) — passing flows are counted, only failures carry ' +
278
279
  'detail (the actionable fix). One call replaces N hand-driven replays.',
279
280
  inputSchema: {
280
281
  names: z
@@ -297,6 +298,13 @@ export const FLOW_TOOLS = [
297
298
  failed: z.number(),
298
299
  summary: z.string(),
299
300
  failures: z.array(z.unknown()),
301
+ flaky: z
302
+ .array(z.string())
303
+ .optional()
304
+ .describe('Flows that have both passed and failed on UNCHANGED code — intermittent, not regressions. Omitted when none are known.'),
305
+ // Session-EXEMPT, so it does not inherit `sessionEnvelopeShape` — declare the one-shot human
306
+ // feedback ask here or a validating profile strips it off the suite verdict.
307
+ feedback_prompt: z.unknown().optional(),
300
308
  },
301
309
  handler: async (deps, args) => {
302
310
  const sessionId = asString(args['sessionId']);
@@ -337,24 +345,47 @@ export const FLOW_TOOLS = [
337
345
  await lease.release().catch(() => undefined);
338
346
  }
339
347
  });
340
- return buildSuiteVerdict(outcomes.map((o, i) => ({
341
- replay: o.ok && o.value !== undefined
342
- ? o.value
343
- : leaseFailureReplay(requested[i] ?? '', o.error),
344
- })));
348
+ const parallelRuns = await Promise.all(outcomes.map(async (o, i) => {
349
+ const name = requested[i] ?? '';
350
+ const replay = o.ok && o.value !== undefined ? o.value : leaseFailureReplay(name, o.error);
351
+ const loaded = await deps.flows.load(name, projectId).catch(() => null);
352
+ const flow = loaded !== null && loaded.ok ? loaded.value : undefined;
353
+ return flow === undefined ? { replay } : { replay, flow };
354
+ }));
355
+ return buildSuiteVerdict(parallelRuns);
345
356
  }
357
+ // The flow FILE travels with each replay so the verdict can tell a green that verified
358
+ // something from a green that could never have gone red. Without it the suite reported "all 1
359
+ // flow pass" for a flow with no steps at all.
346
360
  const runs = [];
347
361
  const timed = [];
362
+ // The flake ledger the CLI gate already keeps — see FlakeStore. It was only ever written by
363
+ // `reticle flow` on the command line, so an AGENT running this tool a hundred times learned
364
+ // nothing about which flows are intermittent. Same product, same ledger, two surfaces, and the
365
+ // one an agent uses was the blind half.
366
+ const flakes = new FlakeStore(deps.fs, deps.reticleRoot);
348
367
  // Sequential default: every flow replays against the same live session, so they must not overlap.
349
368
  for (const flowName of requested) {
350
369
  const start = deps.now();
351
370
  const replay = await replayNamedFlow(deps, { flowName, sessionId });
352
- runs.push({ replay });
371
+ const loaded = await deps.flows.load(flowName, projectId).catch(() => null);
372
+ const flow = loaded !== null && loaded.ok ? loaded.value : undefined;
373
+ runs.push(flow === undefined ? { replay } : { replay, flow });
353
374
  timed.push({ replay, durationMs: deps.now() - start });
354
375
  }
376
+ // Accrue this run's outcomes, then report what the ledger knows. Best-effort on both halves: a
377
+ // flake ledger is memory, not a gate, and it must never turn a working verify into an error.
378
+ for (const { replay } of runs) {
379
+ await flakes.record(replay.name, replay.status === ReplayStatus.OK).catch(() => undefined);
380
+ }
381
+ const flaky = await flakes.flakyFlows().catch(() => []);
355
382
  // Emit the consolidated run artifact (Runs tab) + best-effort cloud push. Never blocks the verdict.
356
383
  await persistAndSyncVerificationRun(deps, timed, projectId);
357
- return buildSuiteVerdict(runs);
384
+ const verdict = buildSuiteVerdict(runs);
385
+ // A flow that has both passed and failed on UNCHANGED code is a different thing from a
386
+ // regression, and an agent that cannot tell them apart either chases a ghost or ignores a real
387
+ // break. Present only when the ledger has seen enough runs to say so.
388
+ return flaky.length > 0 ? { ...verdict, flaky } : verdict;
358
389
  },
359
390
  },
360
391
  {
@@ -423,7 +454,7 @@ export const FLOW_TOOLS = [
423
454
  'untouched). Returns { name, status: healed|drift|unhealable|consequence_broken|' +
424
455
  'nothing_to_heal|error, applied, proposals[], changed[], message }.',
425
456
  inputSchema: {
426
- flowName: z.string().describe('Flow file name to heal (from reticle_flow_list).'),
457
+ flowName: z.string().describe('Flow file name to heal (from reticle_flow{action:"list"}).'),
427
458
  apply: z.boolean().optional(),
428
459
  confirmDangerous: z
429
460
  .boolean()
@@ -446,4 +477,3 @@ export const FLOW_TOOLS = [
446
477
  handler: (deps, args) => healFlow(deps, args).then(({ name, ...rest }) => ({ flowName: name, ...rest })),
447
478
  },
448
479
  ];
449
- //# sourceMappingURL=flow-tools.js.map
@@ -1,5 +1,5 @@
1
1
  import { FlowErrorCode } from '@reticlehq/core';
2
- import type { FlowExpect, FlowFile, FlowStep, HealChange } from '@reticlehq/core';
2
+ import type { FlowAnchor, FlowExpect, FlowFile, FlowStep, HealChange } from '@reticlehq/core';
3
3
  import type { CompiledProgram, RecordedStep } from './recordings.js';
4
4
  import type { FileSystemPort } from '../project/fs-port.js';
5
5
  /** A monotonic clock injected for createdAt — never call Date.now inside the store (rule 7). */
@@ -14,6 +14,11 @@ export type FlowResult<T> = {
14
14
  ok: false;
15
15
  code: FlowErrorCode;
16
16
  };
17
+ /** Pick the on-disk anchor for a normalized step: testid > component(auto) > degraded role. */
18
+ export declare function anchorForStep(args: Record<string, unknown>): {
19
+ anchor: FlowAnchor;
20
+ degraded: boolean;
21
+ };
17
22
  /**
18
23
  * Pure: map one normalized RecordedStep → FlowStep with a semantic anchor (+ degraded marker).
19
24
  * A ref-only (stable:false) step is recorded with a best-effort anchor and degraded:true —
@@ -95,4 +100,3 @@ export declare class FlowStore {
95
100
  remove(name: string, projectId?: string): Promise<FlowResult<void>>;
96
101
  }
97
102
  export {};
98
- //# sourceMappingURL=flows.d.ts.map
@@ -50,7 +50,7 @@ function componentAnchor(src) {
50
50
  return anchor;
51
51
  }
52
52
  /** Pick the on-disk anchor for a normalized step: testid > component(auto) > degraded role. */
53
- function anchorForStep(args) {
53
+ export function anchorForStep(args) {
54
54
  const by = asString(args['by']);
55
55
  const value = asString(args['value']);
56
56
  if (by === QueryBy.TESTID && value !== undefined) {
@@ -63,6 +63,20 @@ function anchorForStep(args) {
63
63
  anchor.source = source;
64
64
  return { anchor, degraded: false };
65
65
  }
66
+ // Role + NAME is a real anchor, not a degraded placeholder.
67
+ //
68
+ // The vocabulary has always described `{ kind:'role', role, name }` as an addressable anchor, and
69
+ // nothing ever produced one — the only ROLE anchor written to disk was the degraded placeholder
70
+ // that means "add a data-testid". So a step the recorder anchored by accessible name arrived here
71
+ // and had that name thrown away, which is precisely the anchor that distinguishes one row's
72
+ // control from another's when a shared JSX source location cannot.
73
+ if (by === QueryBy.ROLE && value !== undefined) {
74
+ const name = asString(args['name']);
75
+ if (name !== undefined && name.length > 0) {
76
+ // The schema carries role + name only; provenance lives on the step, not the anchor.
77
+ return { anchor: { kind: AnchorKind.ROLE, role: value, name }, degraded: false };
78
+ }
79
+ }
66
80
  if (by === QueryBy.COMPONENT) {
67
81
  const anchor = componentAnchor(args);
68
82
  if (anchor !== null)
@@ -369,4 +383,3 @@ export class FlowStore {
369
383
  return { ok: true, value: undefined };
370
384
  }
371
385
  }
372
- //# sourceMappingURL=flows.js.map
@@ -36,4 +36,3 @@ export interface GateResult {
36
36
  deleted: string[];
37
37
  }
38
38
  export declare function gateDecision(input: GateInput): GateResult;
39
- //# sourceMappingURL=gate.d.ts.map
@@ -31,4 +31,3 @@ export function gateDecision(input) {
31
31
  deleted,
32
32
  };
33
33
  }
34
- //# sourceMappingURL=gate.js.map
@@ -6,4 +6,3 @@ export declare function parseGitFiles(output: string): string[];
6
6
  * than throwing — the caller degrades to "no changes" and the gate simply passes, never crashes CI.
7
7
  */
8
8
  export declare function changedFilesSince(ref: string, cwd: string): Promise<string[]>;
9
- //# sourceMappingURL=git-changed.d.ts.map
@@ -22,4 +22,3 @@ export async function changedFilesSince(ref, cwd) {
22
22
  return [];
23
23
  }
24
24
  }
25
- //# sourceMappingURL=git-changed.js.map
@@ -16,4 +16,3 @@ export declare const HEAL_MESSAGES: {
16
16
  readonly CONSEQUENCE_BROKEN: "rebind resolves the drifted locator to a surviving element, but the healed flow no longer satisfies its success consequence — refusing to write (a heal that loses the intent would ship a green-but-dead test). Fix by hand and verify";
17
17
  };
18
18
  export declare function healFlow(deps: ToolDeps, args: Record<string, unknown>): Promise<FlowHealResult>;
19
- //# sourceMappingURL=heal-run.d.ts.map
@@ -134,4 +134,3 @@ export async function healFlow(deps, args) {
134
134
  message: loaded.value.success !== undefined ? HEAL_MESSAGES.HEALED : HEAL_MESSAGES.HEALED_UNVERIFIED,
135
135
  };
136
136
  }
137
- //# sourceMappingURL=heal-run.js.map
@@ -40,4 +40,3 @@ export declare function proposeRebind(drift: Drift, step: number): HealProposal
40
40
  * the floor. Defaults to HEAL_CONFIDENCE_MIN (0.5) for backwards compatibility.
41
41
  */
42
42
  export declare function collectProposals(steps: FlowStepResult[], minConfidence?: number): HealProposal[];
43
- //# sourceMappingURL=heal.d.ts.map
@@ -95,4 +95,3 @@ export function collectProposals(steps, minConfidence = HEAL_CONFIDENCE_MIN) {
95
95
  }
96
96
  return proposals;
97
97
  }
98
- //# sourceMappingURL=heal.js.map
@@ -24,4 +24,3 @@ export declare function mapWithConcurrency<I, T>(items: readonly I[], limit: num
24
24
  * and never below 1. Explicit `requested` (the tool's `parallel` arg) wins when it is a sane number.
25
25
  */
26
26
  export declare function resolveConcurrency(flowCount: number, poolCapacity: number, requested?: number): number;
27
- //# sourceMappingURL=parallel-suite.d.ts.map
@@ -48,4 +48,3 @@ export function resolveConcurrency(flowCount, poolCapacity, requested) {
48
48
  return ceiling;
49
49
  return Math.max(1, Math.min(Math.floor(requested), ceiling));
50
50
  }
51
- //# sourceMappingURL=parallel-suite.js.map