@repo-os/repoos 0.5.59 → 0.5.61

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 (219) hide show
  1. package/dist/.build-info.json +2 -2
  2. package/dist/.build-stamp.json +1 -1
  3. package/dist/cli/help.d.ts +17 -0
  4. package/dist/cli/help.js +270 -0
  5. package/dist/cli/index.js +15 -91
  6. package/dist/cli/layout.d.ts +62 -0
  7. package/dist/cli/layout.js +214 -0
  8. package/dist/commands/check.d.ts +35 -0
  9. package/dist/commands/check.js +246 -15
  10. package/dist/commands/doctor.d.ts +24 -2
  11. package/dist/commands/doctor.js +108 -38
  12. package/dist/commands/init.d.ts +13 -0
  13. package/dist/commands/init.js +100 -4
  14. package/dist/commands/serve-banner.test.js +5 -0
  15. package/dist/commands/serve.js +17 -4
  16. package/dist/commands/shot.js +72 -43
  17. package/dist/commands/status.js +4 -1
  18. package/dist/commands/ui-contrast-audit.d.ts +118 -0
  19. package/dist/commands/ui-contrast-audit.js +851 -0
  20. package/dist/commands/ui-harness.d.ts +12 -1
  21. package/dist/commands/ui-harness.js +10 -0
  22. package/dist/commands/ui-smoke.js +1 -7
  23. package/dist/core/areas.d.ts +13 -0
  24. package/dist/core/areas.js +22 -0
  25. package/dist/core/check-failure-summary.d.ts +18 -0
  26. package/dist/core/check-failure-summary.js +32 -0
  27. package/dist/core/check-plan.d.ts +8 -5
  28. package/dist/core/check-plan.js +13 -3
  29. package/dist/core/check-results-store.d.ts +7 -0
  30. package/dist/core/check-skip.d.ts +43 -0
  31. package/dist/core/check-skip.js +48 -0
  32. package/dist/core/check-store.d.ts +5 -1
  33. package/dist/core/close-out-failure.d.ts +41 -0
  34. package/dist/core/close-out-failure.js +187 -0
  35. package/dist/core/config.js +47 -1
  36. package/dist/core/doctor.js +7 -1
  37. package/dist/core/git.d.ts +9 -0
  38. package/dist/core/git.js +23 -0
  39. package/dist/core/models.d.ts +29 -2
  40. package/dist/core/models.js +223 -45
  41. package/dist/core/shot-page.d.ts +57 -0
  42. package/dist/core/shot-page.js +51 -0
  43. package/dist/core/shot-plan.d.ts +58 -0
  44. package/dist/core/shot-plan.js +231 -0
  45. package/dist/core/shot-targets.d.ts +19 -8
  46. package/dist/core/shot-targets.js +43 -20
  47. package/dist/core/tailscale.js +9 -1
  48. package/dist/core/types.d.ts +36 -1
  49. package/dist/server/agents.js +10 -1
  50. package/dist/server/area-migration.d.ts +34 -0
  51. package/dist/server/area-migration.js +112 -2
  52. package/dist/server/check-plan-info.d.ts +10 -2
  53. package/dist/server/check-plan-info.js +18 -4
  54. package/dist/server/debug-tldr.d.ts +31 -0
  55. package/dist/server/debug-tldr.js +185 -0
  56. package/dist/server/done.js +2 -0
  57. package/dist/server/handoff.js +9 -0
  58. package/dist/server/integration-job.d.ts +14 -1
  59. package/dist/server/integration-job.js +12 -1
  60. package/dist/server/integration-orchestrator.d.ts +6 -0
  61. package/dist/server/integration-orchestrator.js +60 -2
  62. package/dist/server/live-index.d.ts +9 -0
  63. package/dist/server/release-notes-cache.d.ts +26 -0
  64. package/dist/server/release-notes-cache.js +93 -0
  65. package/dist/server/release.d.ts +9 -1
  66. package/dist/server/release.js +6 -2
  67. package/dist/server/remote-validation.js +15 -4
  68. package/dist/server/review.js +1 -1
  69. package/dist/server/routes/config.js +57 -15
  70. package/dist/server/routes/info.js +4 -1
  71. package/dist/server/routes/models.js +14 -1
  72. package/dist/server/routes/release.d.ts +5 -0
  73. package/dist/server/routes/release.js +38 -2
  74. package/dist/server/routes/repo-log.js +7 -1
  75. package/dist/server/routes/tasks.d.ts +2 -0
  76. package/dist/server/routes/tasks.js +69 -2
  77. package/dist/server/server.js +51 -9
  78. package/dist/server/shot-capture.d.ts +52 -0
  79. package/dist/server/shot-capture.js +173 -0
  80. package/dist/server/shots.d.ts +7 -0
  81. package/dist/server/shots.js +3 -0
  82. package/dist/server/system.js +6 -2
  83. package/dist/server/task-check.d.ts +7 -0
  84. package/dist/server/task-check.js +5 -0
  85. package/dist/server/worktree-handoff-guard.d.ts +77 -0
  86. package/dist/server/worktree-handoff-guard.js +321 -0
  87. package/dist/ui/assets/AgentModelModal-CFdPv_af.js +1 -0
  88. package/dist/ui/assets/AgentsView-9q7anXPX.js +1 -0
  89. package/dist/ui/assets/ChecksView-DBUUKFT9.css +1 -0
  90. package/dist/ui/assets/ChecksView-WlGBjSN-.js +0 -0
  91. package/dist/ui/assets/ContextView-B87v6rtv.js +4 -0
  92. package/dist/ui/assets/ContextView-Bi-Nmygy.css +1 -0
  93. package/dist/ui/assets/{DashboardView-Dycyb_k9.js → DashboardView-CvSco6zw.js} +1 -1
  94. package/dist/ui/assets/{DashboardView-ZvEsCIs4.css → DashboardView-GqiLEeJW.css} +1 -1
  95. package/dist/ui/assets/{DeploymentsView-C8mGOGjE.js → DeploymentsView-CrveYuba.js} +1 -1
  96. package/dist/ui/assets/{DiffView-DMGq4a2J.js → DiffView-vysXxYX3.js} +1 -1
  97. package/dist/ui/assets/InputsView-ADPSWfEb.js +1 -0
  98. package/dist/ui/assets/InputsView-BDuzGLkC.css +1 -0
  99. package/dist/ui/assets/{LoginView-DJRB0cU8.js → LoginView-1MpUfPOJ.js} +1 -1
  100. package/dist/ui/assets/ReleasesView-BgGNVM_E.css +1 -0
  101. package/dist/ui/assets/ReleasesView-DR9hFdJP.js +3 -0
  102. package/dist/ui/assets/{SettingsView-B0CnWYfh.js → SettingsView-7duYhb2b.js} +4 -4
  103. package/dist/ui/assets/StoriesView-DBnVlo1n.js +1 -0
  104. package/dist/ui/assets/VoiceDictate-Bc00yWSj.css +1 -0
  105. package/dist/ui/assets/{VoiceDictate-CCJfAGJk.js → VoiceDictate-C0-jNbo1.js} +2 -2
  106. package/dist/ui/assets/WorkView-Bj-zrB-5.js +2 -0
  107. package/dist/ui/assets/WorkView-bYMFgM5P.css +1 -0
  108. package/dist/ui/assets/{abnfDiagram-VCTEODGH-DNJeaBue.js → abnfDiagram-VCTEODGH-DcvIp8yb.js} +1 -1
  109. package/dist/ui/assets/api-BXg3t-A6.js +1 -0
  110. package/dist/ui/assets/architecture-7GRP2DOG-BD7yzf3L.js +1 -0
  111. package/dist/ui/assets/{architectureDiagram-5GKGNRK7-CFYttSDP.js → architectureDiagram-5GKGNRK7-BZtu19cM.js} +1 -1
  112. package/dist/ui/assets/{blockDiagram-I7D4REHJ-D4x6ObYp.js → blockDiagram-I7D4REHJ-DmsRAZPM.js} +1 -1
  113. package/dist/ui/assets/{c4Diagram-7LVT6UL2-CxtP3-uN.js → c4Diagram-7LVT6UL2-CwkFgzc_.js} +1 -1
  114. package/dist/ui/assets/channel-DN5lHn6g.js +1 -0
  115. package/dist/ui/assets/check-setup-Bfqp1ySB.js +2 -0
  116. package/dist/ui/assets/{chunk-4HAMMTFA-CuuPSpo5.js → chunk-4HAMMTFA-NQ0EXnu1.js} +1 -1
  117. package/dist/ui/assets/{chunk-75Z2AOVW-DA5zPl9A.js → chunk-75Z2AOVW-D3vFPpCL.js} +1 -1
  118. package/dist/ui/assets/{chunk-DU6HZSFF-_OVfIMg9.js → chunk-DU6HZSFF-BUg7lr0p.js} +1 -1
  119. package/dist/ui/assets/{chunk-F27PBJKO-DmAfAXfg.js → chunk-F27PBJKO-CaIzqvK8.js} +1 -1
  120. package/dist/ui/assets/{chunk-GMAD6QVW-7rYiJcfH.js → chunk-GMAD6QVW-C6MmVDs8.js} +1 -1
  121. package/dist/ui/assets/{chunk-GVQU2GXP-DUvM8o5c.js → chunk-GVQU2GXP-DVsfbizv.js} +1 -1
  122. package/dist/ui/assets/{chunk-IMKFNOWR-Dug5EN3L.js → chunk-IMKFNOWR-Bm_Ho6tm.js} +1 -1
  123. package/dist/ui/assets/{chunk-L3NEJ4N5-B__JCALV.js → chunk-L3NEJ4N5-e6EnP3AO.js} +1 -1
  124. package/dist/ui/assets/{chunk-OSK3NFVY-DNSy5va-.js → chunk-OSK3NFVY-8PZkkCN2.js} +1 -1
  125. package/dist/ui/assets/{chunk-P2QGCYS3-jZiRM4I9.js → chunk-P2QGCYS3-cohJ6no2.js} +1 -1
  126. package/dist/ui/assets/{chunk-POPQ4Y6H-DUE_WVHL.js → chunk-POPQ4Y6H-DTK3n5KW.js} +1 -1
  127. package/dist/ui/assets/{chunk-PWAF6VOD-CbMevpLH.js → chunk-PWAF6VOD-DGHKZoGz.js} +1 -1
  128. package/dist/ui/assets/{chunk-SHT3W25Y-MuvL_buO.js → chunk-SHT3W25Y-p9PDFIUI.js} +1 -1
  129. package/dist/ui/assets/{chunk-SVP7TREG-lOHx_pKr.js → chunk-SVP7TREG-B55APnbi.js} +1 -1
  130. package/dist/ui/assets/{chunk-TICWLB2K-11z-MDx9.js → chunk-TICWLB2K-By49cCSI.js} +1 -1
  131. package/dist/ui/assets/classDiagram-ZZMXUADV-CT1EkiYq.js +1 -0
  132. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-CT1EkiYq.js +1 -0
  133. package/dist/ui/assets/clipboard-CkhTprDX.js +1 -0
  134. package/dist/ui/assets/config-BpusGwRJ.js +1 -0
  135. package/dist/ui/assets/{cynefin-OW5HDTMX-D8Tbtioe.js → cynefin-OW5HDTMX-DG3pgtMl.js} +1 -1
  136. package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-DykcYZa1.js → cynefinDiagram-5FMLGOSQ-BZWfawZP.js} +1 -1
  137. package/dist/ui/assets/{dagre-GXQ25YYZ-BCjGpohz.js → dagre-GXQ25YYZ-BjU77YUR.js} +1 -1
  138. package/dist/ui/assets/{diagram-S7CK7UJ4-DrO95VpH.js → diagram-S7CK7UJ4-pLPKv2uC.js} +1 -1
  139. package/dist/ui/assets/{diagram-UQ7AKVKN-Bl2XIcjq.js → diagram-UQ7AKVKN-BwdqJ0w5.js} +1 -1
  140. package/dist/ui/assets/{diagram-VSXAHHWV-D88EBlA1.js → diagram-VSXAHHWV-By6r2KA3.js} +1 -1
  141. package/dist/ui/assets/{diagram-VX7I27RA-Dd9fRIfD.js → diagram-VX7I27RA-CIJZw3zx.js} +1 -1
  142. package/dist/ui/assets/{diagram-Z3DM3KII-CDvHYGee.js → diagram-Z3DM3KII-CndjgxCz.js} +1 -1
  143. package/dist/ui/assets/{ebnfDiagram-PWID7BFC-ROLkMsCj.js → ebnfDiagram-PWID7BFC-BMuc5oZZ.js} +1 -1
  144. package/dist/ui/assets/{erDiagram-RLTQ6QDP-hgEdVaDk.js → erDiagram-RLTQ6QDP-DBaUexRT.js} +1 -1
  145. package/dist/ui/assets/eventmodeling-NTZA5JFV-VCxcChvR.js +1 -0
  146. package/dist/ui/assets/flowDiagram-HODETNUW-CcYzPgFT.js +1 -0
  147. package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-DyNYXsDm.js → ganttDiagram-EL5Y4UJY-DNjjWKzP.js} +1 -1
  148. package/dist/ui/assets/{gitGraph-4MIJSDKK-DrwHooXn.js → gitGraph-4MIJSDKK-EGWVt0D-.js} +1 -1
  149. package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-_DOOuskB.js → gitGraphDiagram-WWUBYQGX-FVI5MhlF.js} +1 -1
  150. package/dist/ui/assets/index-B_NqhhGa.css +1 -0
  151. package/dist/ui/assets/index-C1p-aj2F.js +48 -0
  152. package/dist/ui/assets/{info-A6RAGUB7-Bp4WG9KV.js → info-A6RAGUB7-C6JXgt_P.js} +1 -1
  153. package/dist/ui/assets/{infoDiagram-27XIBGKW-Bp9BY3BX.js → infoDiagram-27XIBGKW-LbHcbqu2.js} +1 -1
  154. package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-Dmxsu_I6.js → ishikawaDiagram-5VMMS53U-DfBOtewc.js} +1 -1
  155. package/dist/ui/assets/{journeyDiagram-3NMN7TZE-DyCFShcT.js → journeyDiagram-3NMN7TZE-COg2Q6b9.js} +1 -1
  156. package/dist/ui/assets/{kanban-definition-UXKFOSKX-BY6mL0nV.js → kanban-definition-UXKFOSKX-C1kytub8.js} +1 -1
  157. package/dist/ui/assets/{line-CFvZJFGP.js → line-A0XnPGQP.js} +1 -1
  158. package/dist/ui/assets/{mermaid-parser.core-BlWQycY8.js → mermaid-parser.core-5O3LQ8h4.js} +3 -3
  159. package/dist/ui/assets/{mermaid.core-kuwSwalt.js → mermaid.core-BzCX7E5U.js} +4 -4
  160. package/dist/ui/assets/{mindmap-definition-YA3MSWOX-Da8T6fiA.js → mindmap-definition-YA3MSWOX-CpFtBS4e.js} +1 -1
  161. package/dist/ui/assets/{packet-AYTQ26CC-uA_F87fL.js → packet-AYTQ26CC-Cm5QNu9T.js} +1 -1
  162. package/dist/ui/assets/{pegDiagram-XKGWAZYB-DlT4Tua4.js → pegDiagram-XKGWAZYB-CWWpQpMC.js} +1 -1
  163. package/dist/ui/assets/{pie-WAS4IAKB-CMlL534n.js → pie-WAS4IAKB-cth2dmy7.js} +1 -1
  164. package/dist/ui/assets/{pieDiagram-E7YTZNPT-Dc1lWF3q.js → pieDiagram-E7YTZNPT-BkMWAnyL.js} +1 -1
  165. package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-BqVcYO8d.js → quadrantDiagram-AXDQQJYC-CtYG0RMe.js} +1 -1
  166. package/dist/ui/assets/{radar-RG4KPBEZ-Dolxtcln.js → radar-RG4KPBEZ-CWQn9yqC.js} +1 -1
  167. package/dist/ui/assets/{railroad-74A4TZTK-WQOQGRUO.js → railroad-74A4TZTK-yzw5kp92.js} +1 -1
  168. package/dist/ui/assets/railroad-abnf-HS5TGJTU-BiZBX6Vw.js +1 -0
  169. package/dist/ui/assets/railroad-ebnf-LZEXJU2U-D9_CRhut.js +1 -0
  170. package/dist/ui/assets/railroad-peg-WCYAUIDC-DU96MxW6.js +1 -0
  171. package/dist/ui/assets/{railroadDiagram-O6MQD6OU-BvlFISOo.js → railroadDiagram-O6MQD6OU-DcZCjxPJ.js} +1 -1
  172. package/dist/ui/assets/repo-CrA_4-Ii.js +1 -0
  173. package/dist/ui/assets/{requirementDiagram-BXWQKSXE-BYKoXbW1.js → requirementDiagram-BXWQKSXE-CzitoqBl.js} +1 -1
  174. package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-ClkaPNXM.js → sankeyDiagram-P5KCCOFB-DFfw41CU.js} +1 -1
  175. package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-CnLXWS23.js → sequenceDiagram-WJ2MYXX4-DZoiKzMQ.js} +1 -1
  176. package/dist/ui/assets/{stateDiagram-D77RDMKH-SURchdbJ.js → stateDiagram-D77RDMKH-Yz89g9Nk.js} +1 -1
  177. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-Rj9MVdRm.js +1 -0
  178. package/dist/ui/assets/{swimlanes-42K2YHIH-ETHZRcl1.js → swimlanes-42K2YHIH-DEroTaU_.js} +1 -1
  179. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-Ceol23D9.js +8 -0
  180. package/dist/ui/assets/{timeline-definition-24CTP7MA-CzmcMnEC.js → timeline-definition-24CTP7MA-M5Q5DaRA.js} +1 -1
  181. package/dist/ui/assets/{treeView-Q6P3EWNA-DpYbsVnL.js → treeView-Q6P3EWNA-Tf-o5GnU.js} +1 -1
  182. package/dist/ui/assets/{treemap-WGGIJYW6-CprmPbH2.js → treemap-WGGIJYW6-CGGNjkt2.js} +1 -1
  183. package/dist/ui/assets/{vennDiagram-4TSXK5OY-h5jxvp23.js → vennDiagram-4TSXK5OY-5BIZGh7s.js} +1 -1
  184. package/dist/ui/assets/{wardley-WFR3VGLG-C9hsSVZz.js → wardley-WFR3VGLG-BRynAGzB.js} +1 -1
  185. package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-D58m5Tfi.js → wardleyDiagram-VM6X3IG4-N9SyQ8L2.js} +1 -1
  186. package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-WeCot50K.js → xychartDiagram-S5SC5T6Z-CzqGBWIA.js} +1 -1
  187. package/dist/ui/index.html +10 -8
  188. package/dist/ui/sw.js +2 -2
  189. package/package.json +2 -1
  190. package/dist/ui/assets/AgentModelModal-DzP177gt.js +0 -1
  191. package/dist/ui/assets/AgentsView-CA6vNzB_.js +0 -1
  192. package/dist/ui/assets/ChecksView-DXaRYvbW.css +0 -1
  193. package/dist/ui/assets/ChecksView-k-3IMvCn.js +0 -0
  194. package/dist/ui/assets/ContextView-CE7UCqYM.css +0 -1
  195. package/dist/ui/assets/ContextView-DIn7440o.js +0 -4
  196. package/dist/ui/assets/InputsView-CD5Ajhdh.css +0 -1
  197. package/dist/ui/assets/InputsView-DLdABoFS.js +0 -1
  198. package/dist/ui/assets/ReleasesView-CURY5err.css +0 -1
  199. package/dist/ui/assets/ReleasesView-UavG0AWn.js +0 -3
  200. package/dist/ui/assets/StoriesView-D1Rm_igY.js +0 -1
  201. package/dist/ui/assets/VoiceDictate-CEyIL7fp.css +0 -1
  202. package/dist/ui/assets/WorkView-C4lr2ckC.css +0 -1
  203. package/dist/ui/assets/WorkView-DoN6rK5X.js +0 -2
  204. package/dist/ui/assets/api-0vqymbHB.js +0 -1
  205. package/dist/ui/assets/architecture-7GRP2DOG-CE8k1klh.js +0 -1
  206. package/dist/ui/assets/channel-YsXE3acZ.js +0 -1
  207. package/dist/ui/assets/classDiagram-ZZMXUADV-DpeLlC2e.js +0 -1
  208. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-DpeLlC2e.js +0 -1
  209. package/dist/ui/assets/config-j80hL8dN.js +0 -1
  210. package/dist/ui/assets/eventmodeling-NTZA5JFV-D4JrdfJN.js +0 -1
  211. package/dist/ui/assets/flowDiagram-HODETNUW-BuBvXaQp.js +0 -1
  212. package/dist/ui/assets/index-BqREmSY8.js +0 -46
  213. package/dist/ui/assets/index-RS-D6B89.css +0 -1
  214. package/dist/ui/assets/railroad-abnf-HS5TGJTU-oeSeN2iQ.js +0 -1
  215. package/dist/ui/assets/railroad-ebnf-LZEXJU2U-CXhtQ5k4.js +0 -1
  216. package/dist/ui/assets/railroad-peg-WCYAUIDC-CZQ_zKCz.js +0 -1
  217. package/dist/ui/assets/repo-CPWzR4oq.js +0 -1
  218. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-3QeI6zO7.js +0 -1
  219. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-2inBpL8s.js +0 -8
@@ -1,5 +1,5 @@
1
1
  {
2
- "hash": "54bb7cbb6f6758af0e4594f62905c10fa0aa98c53e313ec47f2d21da7c028692",
3
- "version": "0.5.59",
2
+ "hash": "d8f2fd84b0323805456be5ae097bb68374f6464ff9c4a181f08c8a64066807ab",
3
+ "version": "0.5.61",
4
4
  "devUi": false
5
5
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "generatedAt": "2026-09-29T23:17:06.252Z"
2
+ "generatedAt": "2026-09-30T16:02:14.887Z"
3
3
  }
@@ -0,0 +1,17 @@
1
+ /** Commands whose own argument parser already handles `--help`. */
2
+ export declare const SELF_HELP_COMMANDS: Set<string>;
3
+ /** Resolve an alias to its canonical command name (identity when not an alias). */
4
+ export declare function canonicalCommand(name: string): string;
5
+ /** Full usage for a command (or alias), without the leading `repoos`, or null. */
6
+ export declare function commandUsage(name: string): string | null;
7
+ /**
8
+ * The full `repoos help` text at `width` — grouped command table plus
9
+ * examples. Returns a string so it is unit-testable at fixed widths.
10
+ */
11
+ export declare function renderHelp(width?: number): string;
12
+ export declare function printHelp(width?: number): void;
13
+ /**
14
+ * Print `repoos <name> --help`. Returns false when `name` is not a known
15
+ * command (so the caller can fall through to its normal dispatch).
16
+ */
17
+ export declare function printCommandHelp(name: string, width?: number): boolean;
@@ -0,0 +1,270 @@
1
+ /**
2
+ * `repoos help` and per-command `repoos <cmd> --help` (#0591).
3
+ *
4
+ * The single command table below drives both surfaces, so the top-level help
5
+ * and a command's own usage can never drift apart. Top-level help groups
6
+ * commands under headings and shows the command name only in the left column;
7
+ * flags get their own dim wrapped line under the description, and the full
8
+ * usage line lives in per-command help rather than inline.
9
+ */
10
+ import { readVersion } from "../core/version.js";
11
+ import { c } from "./colors.js";
12
+ import { table, termWidth, visibleWidth, wrap } from "./layout.js";
13
+ /** Commands whose own argument parser already handles `--help`. */
14
+ export const SELF_HELP_COMMANDS = new Set(["support", "tunnel", "shot", "uninstall"]);
15
+ const GROUPS = [
16
+ {
17
+ name: "Setup",
18
+ commands: [
19
+ {
20
+ name: "init",
21
+ usage: "init [name]",
22
+ desc: "Scaffold work/, repoos.toml, AGENTS.md; guided flow for a new project",
23
+ },
24
+ {
25
+ name: "upgrade",
26
+ usage: "upgrade [--channel beta|canary|rc]",
27
+ desc: "Self-update a standalone (curl-installed) repoos",
28
+ flags: "--channel beta|canary|rc",
29
+ },
30
+ {
31
+ name: "uninstall",
32
+ usage: "uninstall [--yes]",
33
+ desc: "Remove the standalone (curl-installed) repoos from this machine",
34
+ flags: "--yes",
35
+ },
36
+ ],
37
+ },
38
+ {
39
+ name: "Tasks",
40
+ commands: [
41
+ {
42
+ name: "list",
43
+ usage: "list [status]",
44
+ desc: "Show the board, or one status column (inbox|ready|active|review|done)",
45
+ },
46
+ { name: "show", usage: "show <id>", desc: "Show a task's full spec" },
47
+ {
48
+ name: "new",
49
+ usage: 'new "<title>" [--ai --type <t> --area <a> --priority <p> --body <b>]',
50
+ desc: "Create a task",
51
+ flags: "--ai --type --area --priority --body",
52
+ },
53
+ {
54
+ name: "new-doc",
55
+ usage: 'new-doc "<desc>"',
56
+ desc: "Create a document from a description via the PM agent",
57
+ },
58
+ {
59
+ name: "note",
60
+ usage: 'note <id> "<text>"',
61
+ desc: "Append a note to a task's activity log",
62
+ },
63
+ {
64
+ name: "mv",
65
+ usage: "mv <id> <status> [--note <text>] [--force-not-merged]",
66
+ desc: "Move a task to a new status — never merges code",
67
+ flags: '--note "..." · --force-not-merged',
68
+ },
69
+ {
70
+ name: "update",
71
+ usage: "update <id> [flags]",
72
+ desc: "Edit a task's metadata or body",
73
+ flags: "--title --area --priority --type --body --branch --assigned-to",
74
+ },
75
+ {
76
+ name: "index",
77
+ usage: "index [--json]",
78
+ desc: "Rebuild the derived index cache",
79
+ flags: "--json",
80
+ },
81
+ {
82
+ name: "gc",
83
+ usage: "gc [--yes|--dry-run]",
84
+ desc: "Collect leaked task worktrees and branches",
85
+ flags: "--yes · --dry-run",
86
+ },
87
+ ],
88
+ },
89
+ {
90
+ name: "Health",
91
+ commands: [
92
+ {
93
+ name: "status",
94
+ usage: "status [--json]",
95
+ desc: "One-screen health snapshot: server, build, board, worktrees, tunnel, git",
96
+ flags: "--json",
97
+ },
98
+ {
99
+ name: "check",
100
+ usage: "check [--profile <name>] [--changed <ref>] [--print-plan] [--local-tests]",
101
+ desc: "Definition-of-done gate: runs the plan declared in repoos.toml",
102
+ flags: "--profile <name> · --changed <ref> · --print-plan · --local-tests",
103
+ },
104
+ {
105
+ name: "doctor",
106
+ usage: "doctor [--json] [--verbose] [--probe <cli>] [--binary <path>]",
107
+ desc: "Readiness preflight: config, layout, tools, server and secrets",
108
+ flags: "--json · --verbose · --probe <cli> · --binary <path>",
109
+ },
110
+ {
111
+ name: "certify",
112
+ usage: "certify <cli> [--yes] [--json] [--binary <path>]",
113
+ desc: "Run the adapter contract suite and record certification evidence",
114
+ flags: "--yes · --json · --binary <path>",
115
+ },
116
+ {
117
+ name: "support",
118
+ usage: "support [bundle|inspect] [--dry-run|--out <path>|--json]",
119
+ desc: "Write or inspect a redacted diagnostic bundle",
120
+ flags: "bundle: --dry-run --out <path> · inspect: --json",
121
+ },
122
+ ],
123
+ },
124
+ {
125
+ name: "Server",
126
+ commands: [
127
+ {
128
+ name: "serve",
129
+ usage: "serve [--port N] [--host <h>] [--no-tailscale-https] [--quiet]",
130
+ desc: "Start the local server (live API + SSE stream)",
131
+ flags: "--port N · --host <h> · --no-tailscale-https · --preview-overrides · --no-preview-overrides · --quiet",
132
+ },
133
+ {
134
+ name: "stop",
135
+ usage: "stop [--port N]",
136
+ desc: "Stop this repo's serve process (by its own lockfile)",
137
+ flags: "--port N",
138
+ },
139
+ {
140
+ name: "service",
141
+ usage: "service <sub>",
142
+ desc: "Manage background services",
143
+ flags: "list|status|install|start|stop|restart|enable|disable|remove|health",
144
+ },
145
+ {
146
+ name: "tunnel",
147
+ usage: "tunnel <sub>",
148
+ desc: "Publish local apps via Cloudflare Tunnel + Zero Trust",
149
+ flags: "setup|create|destroy|rename|allow|deny|start|install|stop|list|status · create: --port --domain --allow --no-access",
150
+ },
151
+ {
152
+ name: "shot",
153
+ usage: "shot [<route|url>] [--target <t>] [--selector <css>] [--task <id>]",
154
+ desc: "Capture preview screenshots into the task's shots folder",
155
+ flags: "--target --selector --task --base --wait --viewport --full-page",
156
+ },
157
+ ],
158
+ },
159
+ ];
160
+ const EXAMPLES = [
161
+ { cmd: "repoos init" },
162
+ { cmd: "repoos init myproject", comment: "guided new-project flow outside a git repo" },
163
+ {
164
+ cmd: 'repoos new "Add company dashboard" --ai --type feature --area web,server --priority p1',
165
+ },
166
+ { cmd: 'repoos new-doc "API design doc for the payment system"' },
167
+ { cmd: "repoos mv 0012 active" },
168
+ { cmd: 'repoos mv 0012 active --note "Fix the regression in checkout; see review"' },
169
+ { cmd: 'repoos note 0012 "Handle the reviewer\'s suggestions before the next review"' },
170
+ { cmd: 'repoos update 0012 --title "New title" --area web,core' },
171
+ { cmd: "repoos list ready" },
172
+ { cmd: "repoos doctor", comment: "passing checks are hidden; --verbose shows all" },
173
+ { cmd: "repoos shot", comment: "screenshot the task preview for the current worktree" },
174
+ { cmd: "repoos shot /repo/commits/abc123", comment: "capture one route" },
175
+ { cmd: "repoos shot --target 'Docs site' --selector '.sidebar'" },
176
+ { cmd: "repoos status", comment: "one-screen health snapshot" },
177
+ { cmd: "repoos status --json", comment: "machine-readable, for agents/tools" },
178
+ { cmd: "repoos index --json", comment: "machine-readable, for agents/tools" },
179
+ { cmd: "repoos serve", comment: "live API + SSE at http://127.0.0.1:7171" },
180
+ ];
181
+ /** Command aliases accepted by the dispatcher (`src/cli/index.ts`). */
182
+ const ALIASES = {
183
+ ls: "list",
184
+ cat: "show",
185
+ move: "mv",
186
+ add: "new",
187
+ reindex: "index",
188
+ server: "serve",
189
+ };
190
+ /** Resolve an alias to its canonical command name (identity when not an alias). */
191
+ export function canonicalCommand(name) {
192
+ return ALIASES[name] ?? name;
193
+ }
194
+ /** Full usage for a command (or alias), without the leading `repoos`, or null. */
195
+ export function commandUsage(name) {
196
+ const canonical = canonicalCommand(name);
197
+ for (const group of GROUPS) {
198
+ for (const cmd of group.commands)
199
+ if (cmd.name === canonical)
200
+ return cmd.usage;
201
+ }
202
+ return null;
203
+ }
204
+ /** One EXAMPLES row, wrapping the command and moving its comment down if needed. */
205
+ function renderExample(ex, width) {
206
+ const indent = " ";
207
+ const base = c.dim("$") + " " + ex.cmd;
208
+ const comment = ex.comment ? c.dim("# " + ex.comment) : "";
209
+ const fitsOnOneLine = !ex.comment || visibleWidth(indent) + visibleWidth(base) + 2 + visibleWidth(comment) <= width;
210
+ if (fitsOnOneLine) {
211
+ return wrap(base + (comment ? " " + comment : ""), width - indent.length, indent);
212
+ }
213
+ const commentIndent = " ";
214
+ return [
215
+ wrap(base, width - indent.length, indent),
216
+ wrap(comment, width - commentIndent.length, commentIndent),
217
+ ].join("\n");
218
+ }
219
+ /**
220
+ * The full `repoos help` text at `width` — grouped command table plus
221
+ * examples. Returns a string so it is unit-testable at fixed widths.
222
+ */
223
+ export function renderHelp(width = termWidth()) {
224
+ const lines = [""];
225
+ lines.push(wrap(`${c.bold(c.cyan("RepoOS"))} ${c.dim("v" + readVersion())} — the repo is the operating system`, width - 2, " "));
226
+ lines.push("");
227
+ lines.push(" " + c.bold("USAGE"));
228
+ lines.push(" repoos <command> [args]");
229
+ lines.push(" repoos <command> --help");
230
+ lines.push(...wrap(c.dim("full usage and flags for one command"), Math.max(1, width - 6), " ").split("\n"));
231
+ for (const group of GROUPS) {
232
+ lines.push("");
233
+ lines.push(" " + c.bold(group.name));
234
+ lines.push(table(group.commands.map((cmd) => ({
235
+ label: c.cyan(cmd.name),
236
+ description: cmd.desc + (cmd.flags ? "\n" + c.dim("flags: " + cmd.flags) : ""),
237
+ })), { indent: 4, gap: 2, width }));
238
+ }
239
+ lines.push("");
240
+ lines.push(" " + c.bold("EXAMPLES"));
241
+ for (const ex of EXAMPLES)
242
+ lines.push(renderExample(ex, width));
243
+ lines.push("");
244
+ return lines.join("\n");
245
+ }
246
+ export function printHelp(width = termWidth()) {
247
+ console.log(renderHelp(width));
248
+ }
249
+ /**
250
+ * Print `repoos <name> --help`. Returns false when `name` is not a known
251
+ * command (so the caller can fall through to its normal dispatch).
252
+ */
253
+ export function printCommandHelp(name, width = termWidth()) {
254
+ const canonical = canonicalCommand(name);
255
+ for (const group of GROUPS) {
256
+ const cmd = group.commands.find((entry) => entry.name === canonical);
257
+ if (!cmd)
258
+ continue;
259
+ const lines = [""];
260
+ lines.push(...wrap(c.bold("repoos") + " " + cmd.usage, width - 2, " ").split("\n"));
261
+ lines.push(...wrap(cmd.desc, width - 2, " ").split("\n"));
262
+ if (cmd.flags) {
263
+ lines.push(...wrap(c.dim("flags: " + cmd.flags), width - 2, " ").split("\n"));
264
+ }
265
+ lines.push("");
266
+ console.log(lines.join("\n"));
267
+ return true;
268
+ }
269
+ return false;
270
+ }
package/dist/cli/index.js CHANGED
@@ -23,6 +23,7 @@ import { checkBuild } from "../core/build.js";
23
23
  import { loadConfig } from "../core/config.js";
24
24
  import { reexecAfterStaleBuild, reexecUnderBunIfRequested } from "../core/runtime.js";
25
25
  import { c } from "./colors.js";
26
+ import { commandUsage, printCommandHelp, printHelp, SELF_HELP_COMMANDS } from "./help.js";
26
27
  import { readVersion } from "../core/version.js";
27
28
  // node:sqlite (used by db.ts/auth-store.ts) is still marked experimental on
28
29
  // supported Node versions and prints a warning the first time it's loaded.
@@ -39,95 +40,6 @@ process.on("warning", (warning) => {
39
40
  console.warn(warning);
40
41
  });
41
42
  const VERSION = readVersion();
42
- // Column where COMMANDS descriptions start, measured from the start of the
43
- // command text (not counting the leading 4-space indent). Wide enough for
44
- // the longest single-line entry ("gc [--yes|--dry-run]", 21 chars) plus a
45
- // 2-space gap. Kept as one constant (rather than hand-counted spaces per
46
- // line) so every row stays aligned when an entry is added or renamed.
47
- const CMD_COL = 23;
48
- const CMD_INDENT = " ".repeat(4 + CMD_COL);
49
- /**
50
- * A COMMANDS row: `cmd` is plain text (for width math), `desc` may contain
51
- * ANSI codes. Callers join rows with `"\n "` — the 4-space indent lives
52
- * in the join separator (and the template literal for the first row), not
53
- * here, so a row must not add its own leading indent.
54
- */
55
- function cmdRow(cmd, desc) {
56
- if (cmd.length >= CMD_COL) {
57
- // Too long to share a line with its description — command on its own
58
- // line, description indented to the same column as every other row.
59
- return `${c.cyan(cmd)}\n${CMD_INDENT}${desc}`;
60
- }
61
- return `${c.cyan(cmd)}${" ".repeat(CMD_COL - cmd.length)}${desc}`;
62
- }
63
- // Column where trailing `# comment`s line up in the EXAMPLES block below.
64
- const EX_COL = 28;
65
- /** An EXAMPLES row; see cmdRow's doc comment re: indentation living in the join. */
66
- function exRow(cmd, comment) {
67
- if (!comment)
68
- return `${c.dim("$")} ${cmd}`;
69
- const pad = " ".repeat(Math.max(1, EX_COL - cmd.length));
70
- return `${c.dim("$")} ${cmd}${pad}${c.dim("# " + comment)}`;
71
- }
72
- function help() {
73
- const commandLines = [
74
- cmdRow("check", "Definition-of-done gate: runs the check plan declared in repoos.toml"),
75
- cmdRow("check --profile full", "Run every declared step, including ones held back from a routine run"),
76
- cmdRow("check --changed main", "Fast pre-review pass over steps affected by changed paths"),
77
- cmdRow("check --print-plan", "Print the resolved plan as [[check.steps]] TOML to commit"),
78
- cmdRow("shot [<route|url>]", `Capture preview screenshots into the task's shots folder ${c.dim("flags: --target --selector --task --base --wait --full-page")}`),
79
- cmdRow("init [name]", "Scaffold work/, repoos.toml, AGENTS.md; outside a git repo runs a guided flow that can launch the web console"),
80
- cmdRow("list [status]", `Show the board (or one column: ${c.dim("inbox|ready|active|review|done")})`),
81
- cmdRow("status [--json]", "One-screen health snapshot: server, build freshness, board, worktrees, tunnel, git"),
82
- cmdRow("doctor [--json] [--probe <cli>] [--binary <path>]", "Readiness preflight: identity, config, layout, tools, check plan, server, secrets (--probe runs a live contract check; --binary overrides PATH resolution)"),
83
- cmdRow("certify <cli> [--yes] [--binary <path>]", "Run the adapter contract suite and write certification evidence into agent-compatibility.json (--binary probes a specific binary)"),
84
- cmdRow("support bundle", "Write a redacted, inspectable diagnostic bundle for failed setups"),
85
- cmdRow("show <id>", "Show a task's full spec"),
86
- cmdRow("mv <id> <status>", `Move a task to a new status — never merges code ${c.dim('flags: --note "...", --force-not-merged')}`),
87
- cmdRow('note <id> "<text>"', "Append a free-form note to a task's activity log"),
88
- cmdRow("update <id>", `Edit a task's metadata/body ${c.dim("flags: --title --area --priority --type --body --branch --assigned-to")}`),
89
- cmdRow('new "<title>"', `Create a task ${c.dim("flags: --ai --type --area --priority --body")}`),
90
- cmdRow('new-doc "<desc>"', "Create a document from a description via PM agent"),
91
- cmdRow("index [--json]", "Rebuild the derived index cache"),
92
- cmdRow("gc [--yes|--dry-run]", "Collect leaked task worktrees/branches (done/absent tasks, integrate candidates)"),
93
- cmdRow("serve [--port N]", `Start the local server (live API + SSE stream) ${c.dim("flags: --host, --no-tailscale-https, --preview-overrides, --no-preview-overrides")}`),
94
- cmdRow("stop [--port N]", "Stop this repo's serve process (by its own lockfile)"),
95
- cmdRow("service [sub]", `Manage background services ${c.dim("list|status|install|start|stop|restart|enable|disable|remove")}`),
96
- cmdRow("tunnel <sub>", `Publish local apps via Cloudflare Tunnel + Zero Trust ${c.dim("(setup|create|allow|deny|rename|destroy|start|install|stop|list|status)")}`),
97
- cmdRow("upgrade [--channel beta|canary|rc]", `Self-update a standalone (curl-installed) repoos to the latest release\n${CMD_INDENT}(stable by default; --channel tracks a prerelease line instead)`),
98
- cmdRow("uninstall [--yes]", "Remove the standalone (curl-installed) repoos from this machine"),
99
- ].join("\n ");
100
- const exampleLines = [
101
- exRow("repoos init"),
102
- exRow("repoos init myproject", "guided new-project flow outside a git repo"),
103
- exRow('repoos new "Add company dashboard" --ai --type feature --area web,server --priority p1'),
104
- exRow('repoos new-doc "API design doc for the payment system"'),
105
- exRow("repoos mv 0012 active"),
106
- exRow('repoos mv 0012 active --note "Fix the regression in checkout; see review"'),
107
- exRow('repoos note 0012 "Handle the reviewer\'s suggestions before the next review"'),
108
- exRow('repoos update 0012 --title "New title" --area web,core'),
109
- exRow("repoos list ready"),
110
- exRow("repoos shot", "screenshot the task preview for the current worktree"),
111
- exRow("repoos shot /repo/commits/abc123", "capture one route"),
112
- exRow("repoos shot --target 'Docs site' --selector '.sidebar'"),
113
- exRow("repoos status", "one-screen health snapshot"),
114
- exRow("repoos status --json", "machine-readable, for agents/tools"),
115
- exRow("repoos index --json", "machine-readable, for agents/tools"),
116
- exRow("repoos serve", "live API + SSE at http://127.0.0.1:7171"),
117
- ].join("\n ");
118
- console.log(`
119
- ${c.bold(c.cyan("RepoOS"))} ${c.dim("v" + VERSION)} — the repo is the operating system
120
-
121
- ${c.bold("USAGE")}
122
- repoos <command> [args]
123
-
124
- ${c.bold("COMMANDS")}
125
- ${commandLines}
126
-
127
- ${c.bold("EXAMPLES")}
128
- ${exampleLines}
129
- `);
130
- }
131
43
  function main() {
132
44
  const [cmd, ...rest] = process.argv.slice(2);
133
45
  // Run every command under Bun when it's available (opt out with
@@ -147,6 +59,18 @@ function main() {
147
59
  // where a re-exec would restart the whole guided flow). Display-only.
148
60
  if (cmd === "serve" || cmd === "server")
149
61
  setServeProcessTitle(serveProcessTitle());
62
+ // Per-command help (#0591): `repoos <cmd> --help` prints that command's full
63
+ // usage instead of running it. Only the *first* argument counts, so a literal
64
+ // value like `repoos mv 0012 active --note "--help"` still runs the command.
65
+ // Commands that already implement `--help` themselves keep their own, richer
66
+ // output; aliases (`ls`, `server`, …) resolve to their canonical entry.
67
+ if (cmd &&
68
+ (rest[0] === "--help" || rest[0] === "-h") &&
69
+ !SELF_HELP_COMMANDS.has(cmd) &&
70
+ commandUsage(cmd) !== null) {
71
+ printCommandHelp(cmd);
72
+ return;
73
+ }
150
74
  // Staleness check — skip for version/help since those read no source, and
151
75
  // for `status`/`check` which report staleness themselves as first-class
152
76
  // output (a second, louder warning above their own would be noise).
@@ -283,11 +207,11 @@ function main() {
283
207
  case "help":
284
208
  case "--help":
285
209
  case "-h":
286
- help();
210
+ printHelp();
287
211
  break;
288
212
  default:
289
213
  console.error(c.red(` Unknown command: ${cmd}`));
290
- help();
214
+ printHelp();
291
215
  process.exitCode = 1;
292
216
  }
293
217
  }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Width-aware terminal layout helpers (#0591).
3
+ *
4
+ * The CLI prints with fixed `padEnd` columns and no knowledge of the terminal
5
+ * width, so long text wraps back to column 0 under the terminal's own,
6
+ * unaware line wrapping and breaks hanging indents (`repoos help`,
7
+ * `repoos doctor`, the serve banner). These helpers are the shared,
8
+ * dependency-free fix: `visibleWidth` and `wrap` measure and break text while
9
+ * ignoring ANSI SGR codes, and `table`/`kv` lay out a label column with a
10
+ * wrapped description column.
11
+ *
12
+ * Pure functions (width is a parameter, never read from the terminal inside
13
+ * them), so they are unit-testable at fixed widths. Zero runtime deps: no
14
+ * chalk, wrap-ansi or cli-table3.
15
+ */
16
+ /** Visible width of `s` in display columns, ignoring ANSI SGR codes. */
17
+ export declare function visibleWidth(s: string): number;
18
+ /**
19
+ * The width to lay out for. `$COLUMNS` wins when it is set and positive — so
20
+ * `COLUMNS=60 repoos help` works even under a TTY, which is how the layout is
21
+ * verified at fixed widths — then the terminal's own columns, then 80. Capped
22
+ * at 100 so a very wide terminal doesn't stretch descriptions into unreadable
23
+ * lines.
24
+ */
25
+ export declare function termWidth(env?: NodeJS.ProcessEnv, columns?: number | undefined): number;
26
+ /**
27
+ * ANSI-aware word wrap with a hanging indent. `text` may contain explicit
28
+ * newlines (they start a new wrapped line); `width` is the visible budget for
29
+ * each line *excluding* `indent`, so every returned line is at most
30
+ * `visibleWidth(indent) + width` visible characters wide. Pass the indentation
31
+ * as `indent` rather than embedding it in `text` — leading whitespace is a
32
+ * word separator and would be collapsed.
33
+ */
34
+ export declare function wrap(text: string, width: number, indent?: string): string;
35
+ export interface TableRow {
36
+ /** Left column — command name or check title. May contain ANSI. */
37
+ label: string;
38
+ /** Right column — wrapped at the remaining width. May contain ANSI. */
39
+ description: string;
40
+ }
41
+ export interface TableOptions {
42
+ /** Spaces between the label column and the description (default 2). */
43
+ gap?: number;
44
+ /** Leading spaces before the label column (default 0). */
45
+ indent?: number;
46
+ /** Total width to lay out for (default `termWidth()`). */
47
+ width?: number;
48
+ /** Force the label column width instead of sizing to the widest row. */
49
+ labelWidth?: number;
50
+ }
51
+ /**
52
+ * A two-column table: a label column sized to its widest entry, then a
53
+ * description column that word-wraps to the remaining width with a hanging
54
+ * indent. Every line stays within `width`.
55
+ */
56
+ export declare function table(rows: readonly TableRow[], opts?: TableOptions): string;
57
+ export interface KVRow {
58
+ label: string;
59
+ value: string;
60
+ }
61
+ /** `table` for a label/value listing — the shared shape serve/status/doctor use. */
62
+ export declare function kv(rows: readonly KVRow[], opts?: TableOptions): string;