@repo-os/repoos 0.5.56 → 0.5.58

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 (375) hide show
  1. package/README.md +9 -1
  2. package/dist/.build-info.json +3 -2
  3. package/dist/.build-stamp.json +1 -1
  4. package/dist/cli/index.js +23 -4
  5. package/dist/commands/check.d.ts +8 -7
  6. package/dist/commands/check.js +262 -49
  7. package/dist/commands/init.d.ts +7 -1
  8. package/dist/commands/init.js +186 -46
  9. package/dist/commands/serve.js +20 -1
  10. package/dist/commands/shot.d.ts +31 -0
  11. package/dist/commands/shot.js +427 -0
  12. package/dist/commands/tasks.js +2 -2
  13. package/dist/core/agent-compatibility.json +20 -0
  14. package/dist/core/agent-contract.js +67 -11
  15. package/dist/core/agent-updates.js +3 -0
  16. package/dist/core/areas.d.ts +102 -0
  17. package/dist/core/areas.js +145 -0
  18. package/dist/core/auth-store.d.ts +89 -0
  19. package/dist/core/auth-store.js +603 -0
  20. package/dist/core/board-columns.test.js +18 -0
  21. package/dist/core/build.d.ts +2 -0
  22. package/dist/core/build.js +5 -3
  23. package/dist/core/canary-repo.d.ts +12 -0
  24. package/dist/core/canary-repo.js +111 -0
  25. package/dist/core/canary-repo.test.d.ts +1 -0
  26. package/dist/core/canary-repo.test.js +71 -0
  27. package/dist/core/canary.d.ts +21 -7
  28. package/dist/core/canary.js +80 -12
  29. package/dist/core/canary.test.d.ts +1 -0
  30. package/dist/core/canary.test.js +73 -0
  31. package/dist/core/check-failure-summary.d.ts +11 -0
  32. package/dist/core/check-failure-summary.js +29 -0
  33. package/dist/core/check-plan.d.ts +28 -0
  34. package/dist/core/check-plan.js +44 -0
  35. package/dist/core/check-store.d.ts +93 -0
  36. package/dist/core/check-store.js +279 -0
  37. package/dist/core/config.d.ts +13 -2
  38. package/dist/core/config.js +360 -31
  39. package/dist/core/context-pack.js +9 -4
  40. package/dist/core/copy-inspector.d.ts +25 -0
  41. package/dist/core/copy-inspector.js +112 -0
  42. package/dist/core/db.js +32 -0
  43. package/dist/core/detect.js +13 -0
  44. package/dist/core/doctor.js +106 -0
  45. package/dist/core/git-activity.d.ts +35 -0
  46. package/dist/core/git-activity.js +26 -0
  47. package/dist/core/git.d.ts +131 -13
  48. package/dist/core/git.js +250 -37
  49. package/dist/core/models.js +27 -1
  50. package/dist/core/needs-input.d.ts +2 -0
  51. package/dist/core/needs-input.js +6 -0
  52. package/dist/core/pm-question-context.d.ts +6 -0
  53. package/dist/core/pm-question-context.js +20 -0
  54. package/dist/core/remote-hosts.d.ts +52 -0
  55. package/dist/core/remote-hosts.js +137 -0
  56. package/dist/core/repo-log.d.ts +4 -0
  57. package/dist/core/repo-log.js +6 -1
  58. package/dist/core/repoos.d.ts +6 -1
  59. package/dist/core/repoos.js +20 -1
  60. package/dist/core/runtime.d.ts +2 -0
  61. package/dist/core/runtime.js +62 -0
  62. package/dist/core/secret-store.d.ts +20 -0
  63. package/dist/core/secret-store.js +73 -0
  64. package/dist/core/secret-store.test.d.ts +1 -0
  65. package/dist/core/secret-store.test.js +38 -0
  66. package/dist/core/shot-targets.d.ts +90 -0
  67. package/dist/core/shot-targets.js +191 -0
  68. package/dist/core/stories.d.ts +19 -0
  69. package/dist/core/stories.js +117 -0
  70. package/dist/core/story-definition-files.d.ts +39 -2
  71. package/dist/core/story-definition-files.js +197 -11
  72. package/dist/core/story-display.d.ts +9 -1
  73. package/dist/core/story-display.js +2 -0
  74. package/dist/core/support-bundle.js +4 -0
  75. package/dist/core/tailscale.d.ts +15 -0
  76. package/dist/core/tailscale.js +76 -1
  77. package/dist/core/task-underspecified.d.ts +12 -0
  78. package/dist/core/task-underspecified.js +99 -0
  79. package/dist/core/task.js +52 -2
  80. package/dist/core/telegram-chat.d.ts +77 -0
  81. package/dist/core/telegram-chat.js +220 -0
  82. package/dist/core/telegram-disconnect.d.ts +19 -0
  83. package/dist/core/telegram-disconnect.js +40 -0
  84. package/dist/core/telegram-identity.d.ts +102 -0
  85. package/dist/core/telegram-identity.js +262 -0
  86. package/dist/core/types.d.ts +207 -6
  87. package/dist/core/types.js +3 -1
  88. package/dist/core/worktree-gc.js +10 -4
  89. package/dist/server/agents.d.ts +120 -12
  90. package/dist/server/agents.js +415 -55
  91. package/dist/server/area-migration.d.ts +24 -0
  92. package/dist/server/area-migration.js +131 -0
  93. package/dist/server/branchless-release.js +8 -5
  94. package/dist/server/debug-tldr.d.ts +101 -0
  95. package/dist/server/debug-tldr.js +311 -0
  96. package/dist/server/done.d.ts +16 -0
  97. package/dist/server/done.js +45 -3
  98. package/dist/server/freeform-runs.js +4 -1
  99. package/dist/server/freeform.d.ts +4 -1
  100. package/dist/server/freeform.js +52 -33
  101. package/dist/server/handoff.d.ts +19 -2
  102. package/dist/server/handoff.js +221 -36
  103. package/dist/server/integration-job.d.ts +20 -0
  104. package/dist/server/integration-job.js +27 -0
  105. package/dist/server/integration-orchestrator.d.ts +91 -1
  106. package/dist/server/integration-orchestrator.js +291 -59
  107. package/dist/server/live-index.d.ts +42 -1
  108. package/dist/server/live-index.js +26 -1
  109. package/dist/server/local-token.d.ts +10 -0
  110. package/dist/server/local-token.js +62 -0
  111. package/dist/server/needs-input-dismiss.d.ts +14 -0
  112. package/dist/server/needs-input-dismiss.js +51 -1
  113. package/dist/server/notifications/dispatch.d.ts +32 -0
  114. package/dist/server/notifications/dispatch.js +238 -0
  115. package/dist/server/notifications/format.d.ts +14 -0
  116. package/dist/server/notifications/format.js +23 -0
  117. package/dist/server/notifications/index.d.ts +9 -0
  118. package/dist/server/notifications/index.js +8 -0
  119. package/dist/server/notifications/link.d.ts +14 -0
  120. package/dist/server/notifications/link.js +45 -0
  121. package/dist/server/notifications/ntfy-provider.d.ts +10 -0
  122. package/dist/server/notifications/ntfy-provider.js +81 -0
  123. package/dist/server/notifications/progress.d.ts +14 -0
  124. package/dist/server/notifications/progress.js +26 -0
  125. package/dist/server/notifications/reasons.d.ts +6 -0
  126. package/dist/server/notifications/reasons.js +14 -0
  127. package/dist/server/notifications/spec.d.ts +27 -0
  128. package/dist/server/notifications/spec.js +79 -0
  129. package/dist/server/notifications/telegram-provider.d.ts +6 -0
  130. package/dist/server/notifications/telegram-provider.js +74 -0
  131. package/dist/server/notifications/types.d.ts +41 -0
  132. package/dist/server/notifications/types.js +1 -0
  133. package/dist/server/ntfy.d.ts +7 -48
  134. package/dist/server/ntfy.js +16 -102
  135. package/dist/server/pre-review-remote-gate.d.ts +101 -0
  136. package/dist/server/pre-review-remote-gate.js +163 -0
  137. package/dist/server/preview.js +30 -10
  138. package/dist/server/release.js +21 -28
  139. package/dist/server/reload.js +15 -10
  140. package/dist/server/remote-validation.d.ts +504 -11
  141. package/dist/server/remote-validation.js +1493 -57
  142. package/dist/server/repo-status.d.ts +95 -0
  143. package/dist/server/repo-status.js +313 -0
  144. package/dist/server/review.d.ts +3 -1
  145. package/dist/server/review.js +88 -9
  146. package/dist/server/routes/auth.d.ts +11 -1
  147. package/dist/server/routes/auth.js +7 -1
  148. package/dist/server/routes/check-runs.d.ts +14 -0
  149. package/dist/server/routes/check-runs.js +29 -0
  150. package/dist/server/routes/config.d.ts +9 -0
  151. package/dist/server/routes/config.js +240 -3
  152. package/dist/server/routes/copy-inspector.d.ts +11 -0
  153. package/dist/server/routes/copy-inspector.js +73 -0
  154. package/dist/server/routes/debugger.d.ts +10 -0
  155. package/dist/server/routes/debugger.js +4 -1
  156. package/dist/server/routes/helpers.d.ts +1 -0
  157. package/dist/server/routes/helpers.js +3 -1
  158. package/dist/server/routes/index.d.ts +5 -0
  159. package/dist/server/routes/index.js +5 -0
  160. package/dist/server/routes/info.js +6 -2
  161. package/dist/server/routes/repo-log.d.ts +11 -0
  162. package/dist/server/routes/repo-log.js +17 -1
  163. package/dist/server/routes/stories.d.ts +19 -1
  164. package/dist/server/routes/stories.js +179 -3
  165. package/dist/server/routes/tasks.d.ts +4 -0
  166. package/dist/server/routes/tasks.js +255 -12
  167. package/dist/server/routes/telegram-identity.d.ts +27 -0
  168. package/dist/server/routes/telegram-identity.js +290 -0
  169. package/dist/server/routes/telegram-webhook.d.ts +8 -0
  170. package/dist/server/routes/telegram-webhook.js +98 -0
  171. package/dist/server/routes/telegram.d.ts +36 -0
  172. package/dist/server/routes/telegram.js +411 -0
  173. package/dist/server/server.d.ts +19 -11
  174. package/dist/server/server.js +379 -83
  175. package/dist/server/shot-context.d.ts +21 -0
  176. package/dist/server/shot-context.js +30 -0
  177. package/dist/server/shots.d.ts +42 -0
  178. package/dist/server/shots.js +170 -0
  179. package/dist/server/story-pm.d.ts +1 -0
  180. package/dist/server/story-pm.js +5 -0
  181. package/dist/server/task-check.d.ts +24 -2
  182. package/dist/server/task-check.js +48 -2
  183. package/dist/server/task-underspecified-flag.d.ts +8 -0
  184. package/dist/server/task-underspecified-flag.js +35 -0
  185. package/dist/server/task-watchdog.d.ts +8 -0
  186. package/dist/server/task-watchdog.js +14 -8
  187. package/dist/server/telegram/actor.d.ts +16 -0
  188. package/dist/server/telegram/actor.js +4 -0
  189. package/dist/server/telegram/agent-chat.d.ts +87 -0
  190. package/dist/server/telegram/agent-chat.js +211 -0
  191. package/dist/server/telegram/api.d.ts +136 -0
  192. package/dist/server/telegram/api.js +217 -0
  193. package/dist/server/telegram/commands.d.ts +72 -0
  194. package/dist/server/telegram/commands.js +285 -0
  195. package/dist/server/telegram/disconnect.d.ts +65 -0
  196. package/dist/server/telegram/disconnect.js +147 -0
  197. package/dist/server/telegram/group-addressing.d.ts +15 -0
  198. package/dist/server/telegram/group-addressing.js +53 -0
  199. package/dist/server/telegram/guide-chat.d.ts +147 -0
  200. package/dist/server/telegram/guide-chat.js +296 -0
  201. package/dist/server/telegram/index.d.ts +116 -0
  202. package/dist/server/telegram/index.js +163 -0
  203. package/dist/server/telegram/intake.d.ts +46 -0
  204. package/dist/server/telegram/intake.js +200 -0
  205. package/dist/server/telegram/normalize.d.ts +32 -0
  206. package/dist/server/telegram/normalize.js +125 -0
  207. package/dist/server/telegram/polling.d.ts +81 -0
  208. package/dist/server/telegram/polling.js +214 -0
  209. package/dist/server/telegram/provider.d.ts +137 -0
  210. package/dist/server/telegram/provider.js +805 -0
  211. package/dist/server/telegram/provisioning.d.ts +68 -0
  212. package/dist/server/telegram/provisioning.js +234 -0
  213. package/dist/server/telegram/rate-limits.d.ts +4 -0
  214. package/dist/server/telegram/rate-limits.js +47 -0
  215. package/dist/server/telegram/redact.d.ts +18 -0
  216. package/dist/server/telegram/redact.js +59 -0
  217. package/dist/server/telegram/render.d.ts +51 -0
  218. package/dist/server/telegram/render.js +74 -0
  219. package/dist/server/telegram/store.d.ts +78 -0
  220. package/dist/server/telegram/store.js +226 -0
  221. package/dist/server/telegram/types.d.ts +322 -0
  222. package/dist/server/telegram/types.js +31 -0
  223. package/dist/server/watcher.d.ts +38 -0
  224. package/dist/server/watcher.js +109 -2
  225. package/dist/server/write.d.ts +6 -1
  226. package/dist/server/write.js +26 -2
  227. package/dist/ui/assets/ActivityIndicator-BNDj8i9m.js +1 -0
  228. package/dist/ui/assets/AgentModelModal-DzP177gt.js +1 -0
  229. package/dist/ui/assets/AgentsView-CA6vNzB_.js +1 -0
  230. package/dist/ui/assets/ChecksView-DXaRYvbW.css +1 -0
  231. package/dist/ui/assets/ChecksView-k-3IMvCn.js +0 -0
  232. package/dist/ui/assets/ContextView-CE7UCqYM.css +1 -0
  233. package/dist/ui/assets/ContextView-DIn7440o.js +4 -0
  234. package/dist/ui/assets/DashboardView-Dycyb_k9.js +1 -0
  235. package/dist/ui/assets/DeploymentsView-BEhIaXyw.css +1 -0
  236. package/dist/ui/assets/DeploymentsView-C8mGOGjE.js +1 -0
  237. package/dist/ui/assets/{DiffView-g587DbeS.js → DiffView-DMGq4a2J.js} +3 -3
  238. package/dist/ui/assets/InputsView-CD5Ajhdh.css +1 -0
  239. package/dist/ui/assets/InputsView-DLdABoFS.js +1 -0
  240. package/dist/ui/assets/LoginView-DJRB0cU8.js +1 -0
  241. package/dist/ui/assets/ReleasesView-CURY5err.css +1 -0
  242. package/dist/ui/assets/ReleasesView-UavG0AWn.js +3 -0
  243. package/dist/ui/assets/SettingsView-B0CnWYfh.js +4 -0
  244. package/dist/ui/assets/SettingsView-C7KstbuH.css +1 -0
  245. package/dist/ui/assets/StoriesView-C3GxoeML.css +1 -0
  246. package/dist/ui/assets/StoriesView-D1Rm_igY.js +1 -0
  247. package/dist/ui/assets/VoiceDictate-CCJfAGJk.js +16 -0
  248. package/dist/ui/assets/VoiceDictate-CEyIL7fp.css +1 -0
  249. package/dist/ui/assets/WorkView-C4lr2ckC.css +1 -0
  250. package/dist/ui/assets/WorkView-DoN6rK5X.js +2 -0
  251. package/dist/ui/assets/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
  252. package/dist/ui/assets/{abnfDiagram-VCTEODGH-C6WykvNa.js → abnfDiagram-VCTEODGH-DNJeaBue.js} +1 -1
  253. package/dist/ui/assets/api-0vqymbHB.js +1 -0
  254. package/dist/ui/assets/architecture-7GRP2DOG-CE8k1klh.js +1 -0
  255. package/dist/ui/assets/{architectureDiagram-5GKGNRK7-roEGL8m0.js → architectureDiagram-5GKGNRK7-CFYttSDP.js} +1 -1
  256. package/dist/ui/assets/{blockDiagram-I7D4REHJ-DJuucocN.js → blockDiagram-I7D4REHJ-D4x6ObYp.js} +1 -1
  257. package/dist/ui/assets/{button-DQcC_aLE.js → button-BsLUWnfn.js} +1 -1
  258. package/dist/ui/assets/{c4Diagram-7LVT6UL2-6sUrKoSN.js → c4Diagram-7LVT6UL2-CxtP3-uN.js} +1 -1
  259. package/dist/ui/assets/catppuccin-latte-CtsyrtPq.js +1 -0
  260. package/dist/ui/assets/catppuccin-mocha-DjuaAJKi.js +1 -0
  261. package/dist/ui/assets/channel-YsXE3acZ.js +1 -0
  262. package/dist/ui/assets/checkbox-Bu0fOTRa.js +1 -0
  263. package/dist/ui/assets/{chunk-4HAMMTFA-J0_pcEVf.js → chunk-4HAMMTFA-CuuPSpo5.js} +1 -1
  264. package/dist/ui/assets/{chunk-75Z2AOVW-BxJ2TNvr.js → chunk-75Z2AOVW-DA5zPl9A.js} +1 -1
  265. package/dist/ui/assets/{chunk-DU6HZSFF-BX0XMIVw.js → chunk-DU6HZSFF-_OVfIMg9.js} +1 -1
  266. package/dist/ui/assets/{chunk-F27PBJKO-atSjCf8v.js → chunk-F27PBJKO-DmAfAXfg.js} +1 -1
  267. package/dist/ui/assets/{chunk-GMAD6QVW-Bos7znjM.js → chunk-GMAD6QVW-7rYiJcfH.js} +1 -1
  268. package/dist/ui/assets/{chunk-GVQU2GXP-Co0d8Tfs.js → chunk-GVQU2GXP-DUvM8o5c.js} +1 -1
  269. package/dist/ui/assets/{chunk-IMKFNOWR-DkOJUS_A.js → chunk-IMKFNOWR-Dug5EN3L.js} +1 -1
  270. package/dist/ui/assets/{chunk-L3NEJ4N5-GBmbBw5A.js → chunk-L3NEJ4N5-B__JCALV.js} +1 -1
  271. package/dist/ui/assets/{chunk-OSK3NFVY-Pao3zNLe.js → chunk-OSK3NFVY-DNSy5va-.js} +1 -1
  272. package/dist/ui/assets/{chunk-P2QGCYS3-NVMl_E1J.js → chunk-P2QGCYS3-jZiRM4I9.js} +1 -1
  273. package/dist/ui/assets/{chunk-POPQ4Y6H-tzZL78RS.js → chunk-POPQ4Y6H-DUE_WVHL.js} +1 -1
  274. package/dist/ui/assets/{chunk-PWAF6VOD-DwrkqNeH.js → chunk-PWAF6VOD-CbMevpLH.js} +1 -1
  275. package/dist/ui/assets/{chunk-SHT3W25Y-8I7NMlT4.js → chunk-SHT3W25Y-MuvL_buO.js} +1 -1
  276. package/dist/ui/assets/{chunk-SVP7TREG-BpweZcGw.js → chunk-SVP7TREG-lOHx_pKr.js} +1 -1
  277. package/dist/ui/assets/{chunk-TICWLB2K-B8ZvCXdY.js → chunk-TICWLB2K-11z-MDx9.js} +1 -1
  278. package/dist/ui/assets/classDiagram-ZZMXUADV-DpeLlC2e.js +1 -0
  279. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-DpeLlC2e.js +1 -0
  280. package/dist/ui/assets/config-j80hL8dN.js +1 -0
  281. package/dist/ui/assets/{cynefin-OW5HDTMX-BHvKo-Aq.js → cynefin-OW5HDTMX-D8Tbtioe.js} +1 -1
  282. package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-3kuG-1VM.js → cynefinDiagram-5FMLGOSQ-DykcYZa1.js} +1 -1
  283. package/dist/ui/assets/{dagre-GXQ25YYZ-2P8Yk_4G.js → dagre-GXQ25YYZ-BCjGpohz.js} +1 -1
  284. package/dist/ui/assets/{diagram-S7CK7UJ4-DRs3pJcK.js → diagram-S7CK7UJ4-DrO95VpH.js} +1 -1
  285. package/dist/ui/assets/{diagram-UQ7AKVKN-B3pbA6Zl.js → diagram-UQ7AKVKN-Bl2XIcjq.js} +1 -1
  286. package/dist/ui/assets/{diagram-VSXAHHWV-BmFgGjHb.js → diagram-VSXAHHWV-D88EBlA1.js} +1 -1
  287. package/dist/ui/assets/{diagram-VX7I27RA-D5jJPu_a.js → diagram-VX7I27RA-Dd9fRIfD.js} +1 -1
  288. package/dist/ui/assets/{diagram-Z3DM3KII-cCr1BFg7.js → diagram-Z3DM3KII-CDvHYGee.js} +1 -1
  289. package/dist/ui/assets/{ebnfDiagram-PWID7BFC-Dg1VhPuY.js → ebnfDiagram-PWID7BFC-ROLkMsCj.js} +1 -1
  290. package/dist/ui/assets/{erDiagram-RLTQ6QDP-CT4xW2dC.js → erDiagram-RLTQ6QDP-hgEdVaDk.js} +1 -1
  291. package/dist/ui/assets/eventmodeling-NTZA5JFV-D4JrdfJN.js +1 -0
  292. package/dist/ui/assets/flowDiagram-HODETNUW-BuBvXaQp.js +1 -0
  293. package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-Hc1my0Jy.js → ganttDiagram-EL5Y4UJY-DyNYXsDm.js} +1 -1
  294. package/dist/ui/assets/{gitGraph-4MIJSDKK-ClQZHGcg.js → gitGraph-4MIJSDKK-DrwHooXn.js} +1 -1
  295. package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-BwlfrDKb.js → gitGraphDiagram-WWUBYQGX-_DOOuskB.js} +1 -1
  296. package/dist/ui/assets/index-BqREmSY8.js +46 -0
  297. package/dist/ui/assets/index-RS-D6B89.css +1 -0
  298. package/dist/ui/assets/{info-A6RAGUB7-GHiNutT4.js → info-A6RAGUB7-Bp4WG9KV.js} +1 -1
  299. package/dist/ui/assets/{infoDiagram-27XIBGKW-B5tfXwvj.js → infoDiagram-27XIBGKW-Bp9BY3BX.js} +1 -1
  300. package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-B8G11EdJ.js → ishikawaDiagram-5VMMS53U-Dmxsu_I6.js} +1 -1
  301. package/dist/ui/assets/{journeyDiagram-3NMN7TZE-ubCuNa3S.js → journeyDiagram-3NMN7TZE-DyCFShcT.js} +1 -1
  302. package/dist/ui/assets/{kanban-definition-UXKFOSKX-RHlFG4is.js → kanban-definition-UXKFOSKX-BY6mL0nV.js} +1 -1
  303. package/dist/ui/assets/{line-DMrn1eUc.js → line-CFvZJFGP.js} +1 -1
  304. package/dist/ui/assets/{mermaid-parser.core-D_ycqYZL.js → mermaid-parser.core-BlWQycY8.js} +3 -3
  305. package/dist/ui/assets/{mermaid.core-CaXJ86pu.js → mermaid.core-kuwSwalt.js} +4 -4
  306. package/dist/ui/assets/{mindmap-definition-YA3MSWOX-kx1nN_cJ.js → mindmap-definition-YA3MSWOX-Da8T6fiA.js} +1 -1
  307. package/dist/ui/assets/{packet-AYTQ26CC-L5erT19p.js → packet-AYTQ26CC-uA_F87fL.js} +1 -1
  308. package/dist/ui/assets/{pegDiagram-XKGWAZYB-C_KTXpQM.js → pegDiagram-XKGWAZYB-DlT4Tua4.js} +1 -1
  309. package/dist/ui/assets/{pie-WAS4IAKB-q2S3rGf9.js → pie-WAS4IAKB-CMlL534n.js} +1 -1
  310. package/dist/ui/assets/{pieDiagram-E7YTZNPT-BLHxbu3z.js → pieDiagram-E7YTZNPT-Dc1lWF3q.js} +1 -1
  311. package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-DNxwy4on.js → quadrantDiagram-AXDQQJYC-BqVcYO8d.js} +1 -1
  312. package/dist/ui/assets/{radar-RG4KPBEZ-5paFbTrA.js → radar-RG4KPBEZ-Dolxtcln.js} +1 -1
  313. package/dist/ui/assets/{railroad-74A4TZTK-C4zNgPiH.js → railroad-74A4TZTK-WQOQGRUO.js} +1 -1
  314. package/dist/ui/assets/railroad-abnf-HS5TGJTU-oeSeN2iQ.js +1 -0
  315. package/dist/ui/assets/railroad-ebnf-LZEXJU2U-CXhtQ5k4.js +1 -0
  316. package/dist/ui/assets/railroad-peg-WCYAUIDC-CZQ_zKCz.js +1 -0
  317. package/dist/ui/assets/{railroadDiagram-O6MQD6OU-VmXZ6m0T.js → railroadDiagram-O6MQD6OU-BvlFISOo.js} +1 -1
  318. package/dist/ui/assets/repo-CPWzR4oq.js +1 -0
  319. package/dist/ui/assets/{requirementDiagram-BXWQKSXE-BHuX0BwK.js → requirementDiagram-BXWQKSXE-BYKoXbW1.js} +1 -1
  320. package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-5kDwMhVC.js → sankeyDiagram-P5KCCOFB-ClkaPNXM.js} +1 -1
  321. package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-KSqKjCpq.js → sequenceDiagram-WJ2MYXX4-CnLXWS23.js} +1 -1
  322. package/dist/ui/assets/{stateDiagram-D77RDMKH-A_P_Un-0.js → stateDiagram-D77RDMKH-SURchdbJ.js} +1 -1
  323. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-3QeI6zO7.js +1 -0
  324. package/dist/ui/assets/{swimlanes-42K2YHIH-BMAnXKSs.js → swimlanes-42K2YHIH-ETHZRcl1.js} +1 -1
  325. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-2inBpL8s.js +8 -0
  326. package/dist/ui/assets/time-CwKjNEcq.js +1 -0
  327. package/dist/ui/assets/{timeline-definition-24CTP7MA-BWweJQmR.js → timeline-definition-24CTP7MA-CzmcMnEC.js} +1 -1
  328. package/dist/ui/assets/title-CmTcwJQC.js +1 -0
  329. package/dist/ui/assets/{treeView-Q6P3EWNA-DusMk7Rp.js → treeView-Q6P3EWNA-DpYbsVnL.js} +1 -1
  330. package/dist/ui/assets/{treemap-WGGIJYW6-BoIcxm2V.js → treemap-WGGIJYW6-CprmPbH2.js} +1 -1
  331. package/dist/ui/assets/useChatScroll-BD10j3cq.js +1 -0
  332. package/dist/ui/assets/vendor-ui-BbK4TVl8.js +3 -0
  333. package/dist/ui/assets/{vennDiagram-4TSXK5OY-DENh7Izt.js → vennDiagram-4TSXK5OY-h5jxvp23.js} +1 -1
  334. package/dist/ui/assets/{wardley-WFR3VGLG-D-IbkF5y.js → wardley-WFR3VGLG-C9hsSVZz.js} +1 -1
  335. package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-Cwsu4-ww.js → wardleyDiagram-VM6X3IG4-D58m5Tfi.js} +1 -1
  336. package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-wZXsbj8s.js → xychartDiagram-S5SC5T6Z-WeCot50K.js} +1 -1
  337. package/dist/ui/index.html +15 -7
  338. package/dist/ui/sw.js +2 -2
  339. package/package.json +4 -2
  340. package/dist/ui/assets/AgentsView-CqkgzCze.js +0 -1
  341. package/dist/ui/assets/ChecksView-C0TtYC-4.css +0 -1
  342. package/dist/ui/assets/ChecksView-Doy8ZRcs.js +0 -0
  343. package/dist/ui/assets/ContextView-BKPMIh5Q.css +0 -1
  344. package/dist/ui/assets/ContextView-HTKy3bOH.js +0 -4
  345. package/dist/ui/assets/DashboardView-DP7D-o1S.js +0 -1
  346. package/dist/ui/assets/DeploymentsView-BRgF6h-S.js +0 -1
  347. package/dist/ui/assets/DeploymentsView-DI5Y69BM.css +0 -1
  348. package/dist/ui/assets/InputsView-BLhcZaQg.js +0 -1
  349. package/dist/ui/assets/InputsView-CAOnQPzO.css +0 -1
  350. package/dist/ui/assets/LoginView-BKLriI-b.js +0 -1
  351. package/dist/ui/assets/ReleasesView-BpUqzAYv.js +0 -3
  352. package/dist/ui/assets/ReleasesView-DaX_TFoT.css +0 -1
  353. package/dist/ui/assets/SettingsView-DkZ64CDa.js +0 -4
  354. package/dist/ui/assets/SettingsView-tL4SoVW8.css +0 -1
  355. package/dist/ui/assets/StoriesView-BLX17KW4.css +0 -1
  356. package/dist/ui/assets/StoriesView-BqHkUyKa.js +0 -1
  357. package/dist/ui/assets/WorkView-BGW29rZ6.css +0 -1
  358. package/dist/ui/assets/WorkView-Dpkonfs7.js +0 -2
  359. package/dist/ui/assets/api-Dic4Uw1D.js +0 -1
  360. package/dist/ui/assets/architecture-7GRP2DOG-BobXoPbG.js +0 -1
  361. package/dist/ui/assets/channel-Cy_U0xgO.js +0 -1
  362. package/dist/ui/assets/classDiagram-ZZMXUADV-DentwTwE.js +0 -1
  363. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-DentwTwE.js +0 -1
  364. package/dist/ui/assets/config-Cl3iDM_B.js +0 -1
  365. package/dist/ui/assets/eventmodeling-NTZA5JFV-C-x4iElw.js +0 -1
  366. package/dist/ui/assets/flowDiagram-HODETNUW-BSzze3T9.js +0 -1
  367. package/dist/ui/assets/index-CWATVnBi.css +0 -1
  368. package/dist/ui/assets/index-ChI6cY4t.js +0 -35
  369. package/dist/ui/assets/railroad-abnf-HS5TGJTU-BXfjNyx0.js +0 -1
  370. package/dist/ui/assets/railroad-ebnf-LZEXJU2U-jn0Yk9uc.js +0 -1
  371. package/dist/ui/assets/railroad-peg-WCYAUIDC-Cv8anGyJ.js +0 -1
  372. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-BuGnvM9I.js +0 -1
  373. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DK-DtsW-.js +0 -8
  374. package/dist/ui/assets/title-ComEuLCp.js +0 -1
  375. package/dist/ui/assets/vendor-ui-DFGj-ZXN.js +0 -3
package/README.md CHANGED
@@ -96,7 +96,7 @@ install, `repoos upgrade` prints the matching package-manager command instead.
96
96
  Then in any repo:
97
97
 
98
98
  ```bash
99
- repoos init # scaffold work/, docs/, repoos.toml, AGENTS.md (idempotent)
99
+ repoos init # scaffold repoos/work/, repoos/docs/, repoos.toml, AGENTS.md (idempotent)
100
100
  ```
101
101
 
102
102
  Zero config required. `repoos init` walks up to find your repo root, creates the
@@ -219,6 +219,14 @@ your other Tailscale devices and from localhost-only tools on the same machine
219
219
  (e.g. a Cloudflare Tunnel's local origin). Pass `--host 127.0.0.1` explicitly
220
220
  to restrict it to localhost only.
221
221
 
222
+ In that mode `repoos serve` also runs `tailscale serve` for you and prints an
223
+ `https://<machine>.<tailnet>.ts.net` URL. Use it: a plain-`http://` Tailscale IP
224
+ isn't a browser secure context, so some UI features can't work there. It is
225
+ tailnet-only (not Funnel), never overwrites another `tailscale serve` mapping
226
+ (it falls back to port 8443, then 10000), and needs MagicDNS + HTTPS
227
+ Certificates enabled in the Tailscale admin console (`serve` prints a hint if
228
+ not). Pass `--no-tailscale-https` to skip it.
229
+
222
230
  ### Endpoints
223
231
 
224
232
  ```
@@ -1,4 +1,5 @@
1
1
  {
2
- "hash": "f30fcce6f5c1d53000699830d693eabb1921532ae40f9462a44af88519527c92",
3
- "version": "0.5.56"
2
+ "hash": "6231b4db3b8903881a94953190689ef5b00ce6583415cf10eb1b86fe1211e1f1",
3
+ "version": "0.5.58",
4
+ "devUi": false
4
5
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "generatedAt": "2026-09-26T09:59:53.699Z"
2
+ "generatedAt": "2026-09-29T22:20:00.607Z"
3
3
  }
package/dist/cli/index.js CHANGED
@@ -8,6 +8,7 @@ import { cmdList, cmdShow, cmdMv, cmdUpdate, cmdNew, cmdIndex, cmdNote, } from "
8
8
  import { cmdNewDoc } from "../commands/docs.js";
9
9
  import { cmdGc } from "../commands/gc.js";
10
10
  import { cmdCheck } from "../commands/check.js";
11
+ import { cmdShot } from "../commands/shot.js";
11
12
  import { cmdServe, serveProcessTitle, setServeProcessTitle } from "../commands/serve.js";
12
13
  import { cmdStop } from "../commands/stop.js";
13
14
  import { cmdTunnel } from "../commands/tunnel.js";
@@ -20,7 +21,7 @@ import { cmdSupport } from "../commands/support.js";
20
21
  import { cmdService } from "../commands/service.js";
21
22
  import { checkBuild } from "../core/build.js";
22
23
  import { loadConfig } from "../core/config.js";
23
- import { reexecUnderBunIfRequested } from "../core/runtime.js";
24
+ import { reexecAfterStaleBuild, reexecUnderBunIfRequested } from "../core/runtime.js";
24
25
  import { c } from "./colors.js";
25
26
  import { readFileSync } from "node:fs";
26
27
  import { dirname, join } from "node:path";
@@ -89,6 +90,7 @@ function help() {
89
90
  cmdRow("check --profile full", "Run every declared step, including ones held back from a routine run"),
90
91
  cmdRow("check --changed main", "Fast pre-review pass over steps affected by changed paths"),
91
92
  cmdRow("check --print-plan", "Print the resolved plan as [[check.steps]] TOML to commit"),
93
+ cmdRow("shot [<route|url>]", `Capture preview screenshots into the task's shots folder ${c.dim("flags: --target --selector --task --base --wait --full-page")}`),
92
94
  cmdRow("init [name]", "Scaffold work/, repoos.toml, AGENTS.md; outside a git repo runs a guided flow that can launch the web console"),
93
95
  cmdRow("list [status]", `Show the board (or one column: ${c.dim("inbox|ready|active|review|done")})`),
94
96
  cmdRow("status [--json]", "One-screen health snapshot: server, build freshness, board, worktrees, tunnel, git"),
@@ -103,7 +105,7 @@ function help() {
103
105
  cmdRow('new-doc "<desc>"', "Create a document from a description via PM agent"),
104
106
  cmdRow("index [--json]", "Rebuild the derived index cache"),
105
107
  cmdRow("gc [--yes|--dry-run]", "Collect leaked task worktrees/branches (done/absent tasks, integrate candidates)"),
106
- cmdRow("serve [--port N]", `Start the local server (live API + SSE stream) ${c.dim("flags: --host, --preview-overrides, --no-preview-overrides")}`),
108
+ cmdRow("serve [--port N]", `Start the local server (live API + SSE stream) ${c.dim("flags: --host, --no-tailscale-https, --preview-overrides, --no-preview-overrides")}`),
107
109
  cmdRow("stop [--port N]", "Stop this repo's serve process (by its own lockfile)"),
108
110
  cmdRow("service [sub]", `Manage background services ${c.dim("list|status|install|start|stop|restart|enable|disable|remove")}`),
109
111
  cmdRow("tunnel <sub>", `Publish local apps via Cloudflare Tunnel + Zero Trust ${c.dim("(setup|create|allow|deny|rename|destroy|start|install|stop|list|status)")}`),
@@ -113,13 +115,16 @@ function help() {
113
115
  const exampleLines = [
114
116
  exRow("repoos init"),
115
117
  exRow("repoos init myproject", "guided new-project flow outside a git repo"),
116
- exRow('repoos new "Add company dashboard" --ai --type feature --area web --priority p1'),
118
+ exRow('repoos new "Add company dashboard" --ai --type feature --area web,server --priority p1'),
117
119
  exRow('repoos new-doc "API design doc for the payment system"'),
118
120
  exRow("repoos mv 0012 active"),
119
121
  exRow('repoos mv 0012 active --note "Fix the regression in checkout; see review"'),
120
122
  exRow('repoos note 0012 "Handle the reviewer\'s suggestions before the next review"'),
121
- exRow('repoos update 0012 --title "New title" --area web'),
123
+ exRow('repoos update 0012 --title "New title" --area web,core'),
122
124
  exRow("repoos list ready"),
125
+ exRow("repoos shot", "screenshot the task preview for the current worktree"),
126
+ exRow("repoos shot /repo/commits/abc123", "capture one route"),
127
+ exRow("repoos shot --target 'Docs site' --selector '.sidebar'"),
123
128
  exRow("repoos status", "one-screen health snapshot"),
124
129
  exRow("repoos status --json", "machine-readable, for agents/tools"),
125
130
  exRow("repoos index --json", "machine-readable, for agents/tools"),
@@ -147,6 +152,9 @@ function main() {
147
152
  if (reexecUnderBunIfRequested()) {
148
153
  return;
149
154
  }
155
+ if (reexecAfterStaleBuild()) {
156
+ return;
157
+ }
150
158
  // Name the managed project in `ps`/Activity Monitor for the long-lived serve
151
159
  // process (#0347). Done here — before the staleness check — so the one-time
152
160
  // Bun re-exec inside setServeProcessTitle can't re-print that warning, and
@@ -261,6 +269,17 @@ function main() {
261
269
  case "check":
262
270
  void cmdCheck(rest);
263
271
  break;
272
+ case "shot":
273
+ void cmdShot(rest)
274
+ .then((code) => {
275
+ if (code !== 0)
276
+ process.exitCode = code;
277
+ })
278
+ .catch((err) => {
279
+ console.error(c.red(` ✗ shot failed: ${err.message}`));
280
+ process.exitCode = 1;
281
+ });
282
+ break;
264
283
  case "tunnel":
265
284
  void cmdTunnel(rest);
266
285
  break;
@@ -124,13 +124,12 @@ export declare function themeContrastOffenders(css: string, config: ThemeContras
124
124
  * actually be affected). Unset for a standalone `repoos check` — that path
125
125
  * is the full definition-of-done gate and must never narrow coverage.
126
126
  *
127
- * Only the two per-branch pre-merge checks set this: the engineer's own
128
- * self-check before requesting handoff, and the server's handoff-finalize
129
- * re-verification (both re-checking the SAME isolated branch, just diffed
130
- * against its own base). The close-out gate that validates the actual merge
131
- * onto main (integration-orchestrator.ts's validateCandidate) deliberately
132
- * never sets it — that check is about interaction with whatever else has
133
- * landed on main since, which a per-branch diff can't see.
127
+ * Set after a remote validation pass (close-out, pre-review handoff, or
128
+ * `repoos check` when `remoteValidation.enabled`) so the local gate skips only
129
+ * the Tests step. Per-branch pre-merge checks also set `REPOOS_CHECK_CHANGED`
130
+ * (engineer self-check and handoff re-verification). Close-out's merge-gate
131
+ * check deliberately never sets `REPOOS_CHECK_CHANGED` — that gate validates
132
+ * interaction with whatever else has landed on main since.
134
133
  */
135
134
  export declare function changedTestRef(env: NodeJS.ProcessEnv): string | undefined;
136
135
  /**
@@ -177,6 +176,8 @@ export interface CheckOptions {
177
176
  changed?: string;
178
177
  /** Print the resolved plan as `[[check.steps]]` TOML and exit 0. */
179
178
  printPlan?: boolean;
179
+ /** Skip the remote runner even when `remoteValidation.enabled` (#0520). */
180
+ localTestsOnly?: boolean;
180
181
  }
181
182
  /** Parse `repoos check` flags. Unknown flags are ignored, never fatal. */
182
183
  export declare function parseCheckArgs(argv?: string[]): CheckOptions;
@@ -31,6 +31,12 @@ import { preferBunForDevTasks } from "../core/runtime.js";
31
31
  import { blockingFailures, DEFAULT_PROFILE, describeStep, formatPlanToml, resolveCheckPlan, selectSteps, } from "../core/check-plan.js";
32
32
  import { detectRepoMarkers, missingBinaries, prereqDetail, runCommand, stepCwd, } from "../core/check-runner.js";
33
33
  import { writeCheckRun } from "../core/check-results-store.js";
34
+ import { extractFailedTests } from "../core/check-failure-summary.js";
35
+ import { envToRunContext, getCheckStore, localMachineName } from "../core/check-store.js";
36
+ import { mainCheckoutRoot } from "../core/git.js";
37
+ import { Logger } from "../core/logger.js";
38
+ import { createRemoteValidator } from "../server/remote-validation.js";
39
+ import { runRemotePreReviewGate, standaloneCliCanUseRemote, remoteValidationAlreadyAttempted, uncommittedFilesBlockingRemoteGate, shouldRunCliRemotePreReviewGate, } from "../server/pre-review-remote-gate.js";
34
40
  /**
35
41
  * Split a CSS selector list on top-level commas (respecting parentheses,
36
42
  * so `:not(.a,.b)` stays one group).
@@ -499,22 +505,12 @@ function resolveVar(value, map, depth = 0) {
499
505
  const next = map[`--${m[1]}`];
500
506
  return next !== undefined ? resolveVar(next, map, depth + 1) : value;
501
507
  }
502
- // KNOWN LIMITATION (fix tracked in #0504, found while registering the gruvbox
503
- // theme in #0503): the rgb()/rgba() branches below tolerate no whitespace between
504
- // components, but oxfmt writes `rgba(110, 157, 106, 0.22)` with spaces, so every
505
- // spaced literal fails to parse and returns null. A pair whose fg or bg yields no
506
- // candidates is SKIPPED rather than failed, so a `[check] contrastPairs` bg token
507
- // written as a spaced `rgba()` is silently never checked — as are the spaced
508
- // `rgba()` stops inside a gradient, which drop out of `colorCandidates`. Measured
509
- // on this repo's own stylesheet: 425 spaced literals, leaving 4-6 of the 9
510
- // configured pairs unchecked in every theme. A whitespace-tolerant regex (`\s*`
511
- // after each separator) was measured to produce ZERO new offenders across all five
512
- // themes, so the fix is a one-liner that only strengthens the gate. It is its own
513
- // task rather than folded into a theme change because it alters the guard's
514
- // behaviour repo-wide and for every project that configures
515
- // `[check] contrastPairs`. Until it lands, do not rely on this guard to catch a
516
- // contrast problem in a token written as `rgba(r, g, b, a)`; gruvbox deliberately
517
- // uses 8-digit hex for its checked alpha tokens to stay verifiable.
508
+ // Both rgb()/rgba() forms are whitespace-tolerant (`\s*` after each separator),
509
+ // so a formatter's `rgba(110, 157, 106, 0.22)` parses (#0504). Before that fix
510
+ // these branches tolerated no whitespace, which silently skipped any
511
+ // contrastPairs whose colour could not be read; if you ever loosen them again,
512
+ // a pair that fails to parse is SKIPPED rather than failed, so re-run the real
513
+ // guard against the real stylesheet rather than reasoning about it.
518
514
  function parseColor(v) {
519
515
  const s = v.trim().toLowerCase();
520
516
  if (!s || s === "none")
@@ -688,13 +684,12 @@ export function themeContrastOffenders(css, config) {
688
684
  * actually be affected). Unset for a standalone `repoos check` — that path
689
685
  * is the full definition-of-done gate and must never narrow coverage.
690
686
  *
691
- * Only the two per-branch pre-merge checks set this: the engineer's own
692
- * self-check before requesting handoff, and the server's handoff-finalize
693
- * re-verification (both re-checking the SAME isolated branch, just diffed
694
- * against its own base). The close-out gate that validates the actual merge
695
- * onto main (integration-orchestrator.ts's validateCandidate) deliberately
696
- * never sets it — that check is about interaction with whatever else has
697
- * landed on main since, which a per-branch diff can't see.
687
+ * Set after a remote validation pass (close-out, pre-review handoff, or
688
+ * `repoos check` when `remoteValidation.enabled`) so the local gate skips only
689
+ * the Tests step. Per-branch pre-merge checks also set `REPOOS_CHECK_CHANGED`
690
+ * (engineer self-check and handoff re-verification). Close-out's merge-gate
691
+ * check deliberately never sets `REPOOS_CHECK_CHANGED` — that gate validates
692
+ * interaction with whatever else has landed on main since.
698
693
  */
699
694
  export function changedTestRef(env) {
700
695
  const ref = env.REPOOS_CHECK_CHANGED;
@@ -763,6 +758,8 @@ export function parseCheckArgs(argv = []) {
763
758
  opts.changed = argv[++i];
764
759
  else if (a === "--print-plan")
765
760
  opts.printPlan = true;
761
+ else if (a === "--local-tests")
762
+ opts.localTestsOnly = true;
766
763
  }
767
764
  return opts;
768
765
  }
@@ -1338,6 +1335,16 @@ export async function runCheckPlan(plan, opts) {
1338
1335
  export async function cmdCheck(argv = []) {
1339
1336
  const opts = parseCheckArgs(argv);
1340
1337
  const repoRoot = findRepoRoot();
1338
+ // Where this run's history row(s) go (#0564 review): the MAIN checkout's
1339
+ // `.repoos/checks.db`, the one store the running server reads. A standalone
1340
+ // `repoos check` inside a task worktree used to write to the worktree's own
1341
+ // file, so an agent's self-check never appeared in Checks → Runs. An
1342
+ // explicit REPOOS_CHECK_STORE_ROOT (server-spawned paths) already points at
1343
+ // the main root and wins. Deliberately a local value, NOT a process.env
1344
+ // write: an exported env var reaches every child this command spawns —
1345
+ // including the test suite, whose own check-store fixtures would then
1346
+ // record into this repo's live store instead of their own tmp ones.
1347
+ const checkStoreRoot = resolveCheckStoreRoot(repoRoot);
1341
1348
  const cfg = loadConfig(repoRoot);
1342
1349
  const markers = detectRepoMarkers(repoRoot);
1343
1350
  const plan = resolveCheckPlan({
@@ -1390,35 +1397,186 @@ export async function cmdCheck(argv = []) {
1390
1397
  console.log(c.dim(` · Changed-path mode: ${changedPaths?.length ?? 0} path(s) differ from ${changedRef} ` +
1391
1398
  "(fast pre-review pass — close-out still runs the full plan)"));
1392
1399
  }
1393
- const runStartedAt = new Date();
1394
- const results = await runCheckPlan(plan, {
1395
- repoRoot,
1396
- cfg,
1397
- profile,
1398
- // Narrowed above after the null check; `?? undefined` keeps the types
1399
- // honest without a cast.
1400
- changedPaths: changedPaths ?? undefined,
1401
- changedRef,
1402
- onStart: (step) => {
1403
- heading(step.name);
1404
- console.log(c.dim(` · ${describeStep(step)}`));
1405
- },
1406
- onResult: (r) => {
1407
- const secs = r.durationMs >= 1000 ? ` (${(r.durationMs / 1000).toFixed(1)}s)` : "";
1408
- if (r.status === "passed") {
1409
- console.log(c.green(` ✔ ${r.name}${secs}${r.detail ? ` — ${r.detail}` : ""}`));
1410
- }
1411
- else if (r.status === "skipped") {
1412
- console.log(c.dim(` ⏭ ${r.name} — ${statusDetail(r)}`));
1400
+ if (cfg.remoteValidation?.enabled &&
1401
+ !standaloneCliCanUseRemote(cfg) &&
1402
+ !changedRef &&
1403
+ !opts.localTestsOnly &&
1404
+ !remoteValidationAlreadyAttempted(process.env)) {
1405
+ console.log(c.dim(" · remote validation: the Hetzner runner is owned by the server, so a standalone " +
1406
+ "`repoos check` runs the full local gate (handoff and close-out still use the runner)"));
1407
+ }
1408
+ let runRemoteGate = shouldRunCliRemotePreReviewGate(cfg, { ...opts, changedRef }, process.env);
1409
+ if (runRemoteGate) {
1410
+ // The runner tests a bundle of HEAD. Uncommitted work would be skipped by it
1411
+ // and then unverified locally (tests are skipped after a remote pass), so
1412
+ // test the working tree locally instead and say why.
1413
+ const uncommitted = await uncommittedFilesBlockingRemoteGate(repoRoot, cfg);
1414
+ if (uncommitted.length > 0) {
1415
+ runRemoteGate = false;
1416
+ const shown = uncommitted.slice(0, 5).join(", ");
1417
+ console.log(c.yellow(` ⚠ uncommitted changes (${shown}${uncommitted.length > 5 ? ", …" : ""}) — the remote ` +
1418
+ "gate tests committed HEAD only, so running the full local gate on the working tree instead\n"));
1419
+ }
1420
+ }
1421
+ // The plan never runs when the remote gate fails, so the normal end-of-run
1422
+ // record is never written: persist the failure for the Checks surface too,
1423
+ // like a local failure and like the handoff path (fail-soft).
1424
+ const persistRemoteFailure = (detail, output, startedAt) => {
1425
+ const finishedAt = new Date();
1426
+ const durationMs = finishedAt.getTime() - startedAt.getTime();
1427
+ writeCheckRun(repoRoot, {
1428
+ profile,
1429
+ source: plan.source,
1430
+ changedRef,
1431
+ startedAt: startedAt.toISOString(),
1432
+ finishedAt: finishedAt.toISOString(),
1433
+ durationMs,
1434
+ passed: false,
1435
+ results: [
1436
+ {
1437
+ name: "remote-validation",
1438
+ status: "failed",
1439
+ durationMs,
1440
+ output: output || undefined,
1441
+ detail,
1442
+ required: true,
1443
+ },
1444
+ ],
1445
+ }, cfg.cacheDir);
1446
+ };
1447
+ if (runRemoteGate) {
1448
+ heading("Remote validation");
1449
+ const logger = new Logger({ root: repoRoot });
1450
+ let remoteValidator;
1451
+ try {
1452
+ remoteValidator = createRemoteValidator(cfg, logger);
1453
+ }
1454
+ catch (e) {
1455
+ const msg = `remote validation init failed: ${e.message}`;
1456
+ if (!cfg.remoteValidation?.fallbackToLocal) {
1457
+ console.log(c.red(`\n ✗ ${msg}\n`));
1458
+ persistRemoteFailure(msg, "", new Date());
1459
+ // The runner never dispatched, so nothing else will record this
1460
+ // failed remote attempt in the history (#0564). Record it here —
1461
+ // machine unknown (no host was ever chosen), remote half only.
1462
+ recordRunHistoryRow({
1463
+ root: checkStoreRoot,
1464
+ cacheDir: cfg.cacheDir,
1465
+ scope: "full",
1466
+ startedAt: new Date().toISOString(),
1467
+ durationMs: 0,
1468
+ outcome: "fail",
1469
+ failedStep: "remote-validation",
1470
+ skippedSteps: [],
1471
+ detail: msg,
1472
+ });
1473
+ process.exit(1);
1413
1474
  }
1414
- else if (!r.required) {
1415
- console.log(c.yellow(` ⚠ ${r.name} failed (optional) — ${statusDetail(r)}`));
1475
+ console.log(c.yellow(` ⚠ ${msg} — running the full local gate\n`));
1476
+ }
1477
+ if (remoteValidator) {
1478
+ // Route the runner's own history rows (recordRemoteRunHistory reads
1479
+ // this env) to the resolved store root for THIS dispatch only, then
1480
+ // restore — a process-wide export here would leak into the check
1481
+ // plan's child processes (the test suite's own check-store fixtures
1482
+ // record via the same env and would land in the live store).
1483
+ const prevStoreRoot = process.env.REPOOS_CHECK_STORE_ROOT;
1484
+ process.env.REPOOS_CHECK_STORE_ROOT = checkStoreRoot;
1485
+ try {
1486
+ const taskId = process.env.REPOOS_TASK_ID?.trim() || "pre-review";
1487
+ const remoteStartedAt = new Date();
1488
+ let remoteOutput = "";
1489
+ // Which gate is calling (#0564): a caller-supplied task id means this is
1490
+ // a pre-review pass for that task; otherwise a bare CLI run.
1491
+ const { phase: runPhase } = envToRunContext(process.env);
1492
+ const gate = await runRemotePreReviewGate({
1493
+ config: cfg,
1494
+ remoteValidator,
1495
+ worktreePath: repoRoot,
1496
+ taskId,
1497
+ phase: runPhase,
1498
+ onChunk: (chunk) => {
1499
+ remoteOutput += chunk;
1500
+ process.stdout.write(chunk);
1501
+ },
1502
+ });
1503
+ // Await the teardown: the failure path below exits the process, and an
1504
+ // un-awaited async runner delete would be cut off mid-request, leaking a
1505
+ // warm VM that no idle timer survives the exit to reap.
1506
+ await remoteValidator.dispose().catch(() => { });
1507
+ if (gate.kind === "fail") {
1508
+ console.log(c.red(`\n ✗ ${gate.detail}\n`));
1509
+ persistRemoteFailure(gate.detail, remoteOutput, remoteStartedAt);
1510
+ process.exit(1);
1511
+ }
1512
+ if (gate.kind === "local-only" && gate.skipTests) {
1513
+ process.env.REPOOS_SKIP_TESTS = "1";
1514
+ console.log(c.green(" ✔ remote gate passed — running local guards only\n"));
1515
+ }
1516
+ else if (gate.kind === "local-only") {
1517
+ console.log(c.yellow(" ⚠ remote unavailable — running the full local gate\n"));
1518
+ }
1416
1519
  }
1417
- else {
1418
- console.log(c.red(` ✗ ${r.name}${secs}`));
1520
+ finally {
1521
+ if (prevStoreRoot === undefined)
1522
+ delete process.env.REPOOS_CHECK_STORE_ROOT;
1523
+ else
1524
+ process.env.REPOOS_CHECK_STORE_ROOT = prevStoreRoot;
1419
1525
  }
1420
- },
1421
- });
1526
+ }
1527
+ }
1528
+ const runStartedAt = new Date();
1529
+ let results;
1530
+ try {
1531
+ results = await runCheckPlan(plan, {
1532
+ repoRoot,
1533
+ cfg,
1534
+ profile,
1535
+ // Narrowed above after the null check; `?? undefined` keeps the types
1536
+ // honest without a cast.
1537
+ changedPaths: changedPaths ?? undefined,
1538
+ changedRef,
1539
+ onStart: (step) => {
1540
+ heading(step.name);
1541
+ console.log(c.dim(` · ${describeStep(step)}`));
1542
+ },
1543
+ onResult: (r) => {
1544
+ const secs = r.durationMs >= 1000 ? ` (${(r.durationMs / 1000).toFixed(1)}s)` : "";
1545
+ if (r.status === "passed") {
1546
+ console.log(c.green(` ✔ ${r.name}${secs}${r.detail ? ` — ${r.detail}` : ""}`));
1547
+ }
1548
+ else if (r.status === "skipped") {
1549
+ console.log(c.dim(` ⏭ ${r.name} — ${statusDetail(r)}`));
1550
+ }
1551
+ else if (!r.required) {
1552
+ console.log(c.yellow(` ⚠ ${r.name} failed (optional) — ${statusDetail(r)}`));
1553
+ }
1554
+ else {
1555
+ console.log(c.red(` ✗ ${r.name}${secs}`));
1556
+ }
1557
+ },
1558
+ });
1559
+ }
1560
+ catch (e) {
1561
+ // The plan runner is not expected to throw, but if it does the normal
1562
+ // end-of-run record below never runs — and the server-side check manager
1563
+ // records only `code === null`, so a child that dies on an unhandled
1564
+ // error would leave NO row at all (#0564 review). Record the crash, then
1565
+ // re-throw for the usual CLI error path.
1566
+ const finishedAt = new Date();
1567
+ recordRunHistoryRow({
1568
+ root: checkStoreRoot,
1569
+ cacheDir: cfg.cacheDir,
1570
+ scope: changedRef ? `changed:${changedRef}` : "full",
1571
+ startedAt: runStartedAt.toISOString(),
1572
+ durationMs: finishedAt.getTime() - runStartedAt.getTime(),
1573
+ outcome: "fail",
1574
+ failedStep: "check",
1575
+ skippedSteps: [],
1576
+ detail: `check crashed before completing: ${e.message}`,
1577
+ });
1578
+ throw e;
1579
+ }
1422
1580
  // ── Summary ─────────────────────────────────────────────────────────
1423
1581
  const gatingFailures = results.filter((r) => r.required && r.status !== "passed" && r.status !== "skipped");
1424
1582
  const optionalFailures = results.filter((r) => !r.required && r.status !== "passed" && r.status !== "skipped");
@@ -1468,8 +1626,63 @@ export async function cmdCheck(argv = []) {
1468
1626
  required: r.required,
1469
1627
  })),
1470
1628
  }, cfg.cacheDir);
1629
+ // Record the run in the durable history (#0564). The caller (handoff,
1630
+ // close-out, release) identifies itself via env; a bare `repoos check`
1631
+ // records as phase "cli" with a null task id. The store lives in the MAIN
1632
+ // checkout (resolved at the top of this command, #0564 review) so worktree
1633
+ // runs land in the history the server reads.
1634
+ recordRunHistoryRow({
1635
+ root: checkStoreRoot,
1636
+ cacheDir: cfg.cacheDir,
1637
+ scope: changedRef ? `changed:${changedRef}` : "full",
1638
+ startedAt: runStartedAt.toISOString(),
1639
+ durationMs: finishedAt.getTime() - runStartedAt.getTime(),
1640
+ outcome: gatingFailures.length === 0 ? "pass" : "fail",
1641
+ failedStep: gatingFailures[0]?.name ?? null,
1642
+ skippedSteps: results.filter((r) => r.status === "skipped").map((r) => r.name),
1643
+ detail: gatingFailures[0]?.detail ?? null,
1644
+ // The stored detail is a short log tail that routinely loses the failing
1645
+ // test's name; keep the names themselves so "which test?" is a query.
1646
+ failedTests: gatingFailures.flatMap((r) => extractFailedTests(r.output ?? "")),
1647
+ });
1471
1648
  process.exit(gatingFailures.length > 0 ? 1 : 0);
1472
1649
  }
1650
+ /**
1651
+ * Where a standalone run's check-run history rows belong (#0564 review): an
1652
+ * explicit `REPOOS_CHECK_STORE_ROOT` (server-spawned paths) wins; otherwise
1653
+ * the MAIN checkout, resolved through any linked worktree. Fail-soft.
1654
+ */
1655
+ function resolveCheckStoreRoot(repoRoot) {
1656
+ const envRoot = process.env.REPOOS_CHECK_STORE_ROOT?.trim();
1657
+ return envRoot || mainCheckoutRoot(repoRoot);
1658
+ }
1659
+ /**
1660
+ * Write one local check-run row into the durable history (#0564), attributing
1661
+ * the caller/phase from the environment. Fail-soft: history is observability,
1662
+ * never a gate input.
1663
+ */
1664
+ function recordRunHistoryRow(row) {
1665
+ try {
1666
+ const { taskId, phase } = envToRunContext(process.env);
1667
+ getCheckStore(row.root, row.cacheDir).record({
1668
+ taskId,
1669
+ phase,
1670
+ machine: localMachineName(),
1671
+ remote: false,
1672
+ scope: row.scope,
1673
+ startedAt: row.startedAt,
1674
+ durationMs: row.durationMs,
1675
+ outcome: row.outcome,
1676
+ failedStep: row.failedStep,
1677
+ skippedSteps: row.skippedSteps,
1678
+ detail: row.detail,
1679
+ failedTests: row.failedTests,
1680
+ });
1681
+ }
1682
+ catch {
1683
+ /* never fail the gate on a history write */
1684
+ }
1685
+ }
1473
1686
  /**
1474
1687
  * Names of steps that already failed and therefore block their dependents.
1475
1688
  * A timeout or a missing prerequisite counts; an OPTIONAL step never does —
@@ -1,3 +1,5 @@
1
+ /** Blockquote every line, so a multi-line (pasted markdown) description stays one quote. */
2
+ export declare function quoteBlock(text: string): string;
1
3
  /** Marker makes the optional existing-repo addition safe to offer repeatedly. */
2
4
  export declare const REPOOS_AGENTS_SECTION_MARKER = "<!-- repoos:managed-instructions -->";
3
5
  /**
@@ -19,7 +21,11 @@ export declare function repoOSAgentsSectionAddition(existing: string, workDir?:
19
21
  type ScaffoldLayout = string;
20
22
  /** Which starter task to seed beyond 0001 — a blank project or an existing repo. */
21
23
  type ScaffoldKind = "new" | "existing";
22
- export declare function scaffoldInto(root: string, description: string, layout?: ScaffoldLayout, kind?: ScaffoldKind): {
24
+ export declare function scaffoldInto(root: string, description: string, layout?: ScaffoldLayout, kind?: ScaffoldKind,
25
+ /** Areas collected at init time (#0583) — real `[[areas]]` rows when given. */
26
+ areas?: string[],
27
+ /** When true, scaffold commented `[[preview.targets]]` stubs for those areas. */
28
+ previewStub?: boolean): {
23
29
  created: string[];
24
30
  skipped: string[];
25
31
  };