@dylanpiercey/work 0.2.27 → 0.2.29

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 (518) hide show
  1. package/README.md +3 -1
  2. package/bin/cli/branches.mjs +3 -3
  3. package/bin/cli/session.mjs +41 -13
  4. package/bin/cli/topic.mjs +170 -55
  5. package/bin/work.mjs +37 -5
  6. package/dist/_Cg63x2E_.js +2 -0
  7. package/dist/_CkGqrA7b.js +2 -0
  8. package/dist/{_DfTVXy8g.js → _DQbVrULO.js} +7977 -143
  9. package/dist/{_DDAjcBsZ.js → _Dgcl4IXI.js} +76 -76
  10. package/dist/{_BpRTWX0Y.js → _cvaVxDgR.js} +118 -19
  11. package/dist/index.mjs +2676 -9814
  12. package/dist/public/assets/_-mNGJDx4.js +1 -0
  13. package/dist/public/assets/{_BXSZ_EAo.js → _09V6rMXz.js} +1 -1
  14. package/dist/public/assets/_09V6rMXz.js.br +0 -0
  15. package/dist/public/assets/_1-M5HrxV.js +1 -0
  16. package/dist/public/assets/{_fH8hCjbL.js → _2Ldh8N3j.js} +1 -1
  17. package/dist/public/assets/_2Ldh8N3j.js.br +0 -0
  18. package/dist/public/assets/_4dOGSUKj.js +1 -0
  19. package/dist/public/assets/_5JtCQAFW.js +1 -0
  20. package/dist/public/assets/_86ozSMcA.js +1 -0
  21. package/dist/public/assets/_8N3YzExI.js +1 -0
  22. package/dist/public/assets/_9_X4R12k.js +1 -0
  23. package/dist/public/assets/_AVe1cYkq.js +1 -0
  24. package/dist/public/assets/_AZkH5VDi.js +1 -0
  25. package/dist/public/assets/_AZkH5VDi.js.br +0 -0
  26. package/dist/public/assets/{_Cbqqax1B.js → _B-59fc2G.js} +1 -1
  27. package/dist/public/assets/_B-59fc2G.js.br +0 -0
  28. package/dist/public/assets/{_Bi_5Ao8u.js → _B3d0-ivx.js} +1 -1
  29. package/dist/public/assets/_B3d0-ivx.js.br +0 -0
  30. package/dist/public/assets/_B3wqVlOb.js +1 -0
  31. package/dist/public/assets/{_BIGof8iy.js → _B4KqC7bv.js} +1 -1
  32. package/dist/public/assets/_B4KqC7bv.js.br +0 -0
  33. package/dist/public/assets/{_BOdjVdJs.js → _B6s4hDj-.js} +1 -1
  34. package/dist/public/assets/_B6s4hDj-.js.br +0 -0
  35. package/dist/public/assets/_B7yMFKTT.js +1 -0
  36. package/dist/public/assets/_B7yMFKTT.js.br +0 -0
  37. package/dist/public/assets/_B9oI_ZQw.js +1 -0
  38. package/dist/public/assets/_BBxz-nlp.js +1 -0
  39. package/dist/public/assets/_BBxz-nlp.js.br +0 -0
  40. package/dist/public/assets/{_BbCf-0OR.js → _BD3-fcAh.js} +1 -1
  41. package/dist/public/assets/_BD3-fcAh.js.br +0 -0
  42. package/dist/public/assets/{_CMuhHF1_.js → _BD7vc-oj.js} +1 -1
  43. package/dist/public/assets/_BD7vc-oj.js.br +0 -0
  44. package/dist/public/assets/{_CSJbgtSE.js → _BDN1BqyL.js} +1 -1
  45. package/dist/public/assets/_BDN1BqyL.js.br +0 -0
  46. package/dist/public/assets/_BFad43cs.js +1 -0
  47. package/dist/public/assets/_BFad43cs.js.br +0 -0
  48. package/dist/public/assets/_BHSB0a9y.js +1 -0
  49. package/dist/public/assets/_BIfepPX7.js +1 -0
  50. package/dist/public/assets/_BIxNqHBZ.js +1 -0
  51. package/dist/public/assets/_BKXsx3Mt.js +1 -0
  52. package/dist/public/assets/_BLg2_OPP.js +1 -0
  53. package/dist/public/assets/_BNfVk7Ln.js +1591 -0
  54. package/dist/public/assets/_BNfVk7Ln.js.br +0 -0
  55. package/dist/public/assets/{_D8L5Ci6w.js → _BPQN8Ed2.js} +1 -1
  56. package/dist/public/assets/_BPQN8Ed2.js.br +0 -0
  57. package/dist/public/assets/{_CPyH_wio.js → _BSL42K7X.js} +1 -1
  58. package/dist/public/assets/_BSL42K7X.js.br +0 -0
  59. package/dist/public/assets/{_DfNVsO8k.js → _BTnRX2Ox.js} +1 -1
  60. package/dist/public/assets/_BTnRX2Ox.js.br +0 -0
  61. package/dist/public/assets/_BUwEFTQs.js +1 -0
  62. package/dist/public/assets/{_B_TbJVYf.js → _BVJXx_5V.js} +1 -1
  63. package/dist/public/assets/_BVJXx_5V.js.br +0 -0
  64. package/dist/public/assets/_BViN8UkI.js +1 -0
  65. package/dist/public/assets/{_CAfsM4Aw.js → _BVtrvOSe.js} +1 -1
  66. package/dist/public/assets/_BVtrvOSe.js.br +0 -0
  67. package/dist/public/assets/_BWzBkN65.js +86 -0
  68. package/dist/public/assets/_BWzBkN65.js.br +0 -0
  69. package/dist/public/assets/{_BvE9n3Nk.js → _BXUvWr3-.js} +1 -1
  70. package/dist/public/assets/_BXUvWr3-.js.br +0 -0
  71. package/dist/public/assets/_B_pf4NNB.js +1 -0
  72. package/dist/public/assets/_B_pf4NNB.js.br +0 -0
  73. package/dist/public/assets/{_BblNadWW.js → _BaFjyZ6N.js} +1 -1
  74. package/dist/public/assets/_BaFjyZ6N.js.br +0 -0
  75. package/dist/public/assets/{_BMpgdqmy.js → _BdJZauO_.js} +1 -1
  76. package/dist/public/assets/_BdJZauO_.js.br +0 -0
  77. package/dist/public/assets/{_DuNMiqGZ.js → _BdOW7TD_.js} +1 -1
  78. package/dist/public/assets/_BdOW7TD_.js.br +0 -0
  79. package/dist/public/assets/_Bej55pMc.js +1 -0
  80. package/dist/public/assets/{_BkoVGNIF.js → _BfAMUYPz.js} +1 -1
  81. package/dist/public/assets/_BfAMUYPz.js.br +0 -0
  82. package/dist/public/assets/{_CBk0XI3h.js → _Bg1HbBGf.js} +1 -1
  83. package/dist/public/assets/_Bg1HbBGf.js.br +0 -0
  84. package/dist/public/assets/_Bh1p4tTQ.js +1 -0
  85. package/dist/public/assets/_BjRK-O6i.js +1 -0
  86. package/dist/public/assets/_BjRK-O6i.js.br +0 -0
  87. package/dist/public/assets/{_B2-SwRFw.js → _BjzxTDQt.js} +1 -1
  88. package/dist/public/assets/_BjzxTDQt.js.br +0 -0
  89. package/dist/public/assets/{_3DcSidD1.js → _Bm7BEDP4.js} +1 -1
  90. package/dist/public/assets/_Bm7BEDP4.js.br +0 -0
  91. package/dist/public/assets/{_C2cBlAFc.js → _BnZnTECI.js} +1 -1
  92. package/dist/public/assets/_BnZnTECI.js.br +0 -0
  93. package/dist/public/assets/_BnkQB613.js +1 -0
  94. package/dist/public/assets/{_BLdVDkGQ.js → _BoyCK8R8.js} +1 -1
  95. package/dist/public/assets/_BoyCK8R8.js.br +0 -0
  96. package/dist/public/assets/_BpKfCptj.js +1 -0
  97. package/dist/public/assets/_BpkQvAkB.js +1 -0
  98. package/dist/public/assets/{_DpULBssi.js → _Bq350ccz.js} +1 -1
  99. package/dist/public/assets/_Bq350ccz.js.br +0 -0
  100. package/dist/public/assets/_BrqSK6iK.js +1 -0
  101. package/dist/public/assets/_BrqSK6iK.js.br +0 -0
  102. package/dist/public/assets/_BtMw49fh.js +1 -0
  103. package/dist/public/assets/_Bu5TbdOg.js +1 -0
  104. package/dist/public/assets/{_CdwEhxya.js → _BvaDtac_.js} +1 -1
  105. package/dist/public/assets/_BvaDtac_.js.br +0 -0
  106. package/dist/public/assets/_BxOI22Z9.js +1 -0
  107. package/dist/public/assets/{_CmXW2ayQ.js → _C-QoG-Y1.js} +1 -1
  108. package/dist/public/assets/_C-QoG-Y1.js.br +0 -0
  109. package/dist/public/assets/{_BdqBwfHB.js → _C-rpsEQE.js} +1 -1
  110. package/dist/public/assets/_C-rpsEQE.js.br +0 -0
  111. package/dist/public/assets/_C0lGfwfH.js +7 -0
  112. package/dist/public/assets/_C0lGfwfH.js.br +0 -0
  113. package/dist/public/assets/_C1j8Notv.js +1 -0
  114. package/dist/public/assets/_C2DZFbPd.js +1 -0
  115. package/dist/public/assets/_C2DZFbPd.js.br +0 -0
  116. package/dist/public/assets/{_Dumi0RZ1.js → _C2P0Gj8t.js} +1 -1
  117. package/dist/public/assets/_C2P0Gj8t.js.br +0 -0
  118. package/dist/public/assets/{_DQi3fIYP.js → _C3t6vaz9.js} +1 -1
  119. package/dist/public/assets/_C3t6vaz9.js.br +0 -0
  120. package/dist/public/assets/{_zBTheEl3.js → _C5Zx8Wi7.js} +1 -1
  121. package/dist/public/assets/_C5Zx8Wi7.js.br +0 -0
  122. package/dist/public/assets/{_D4u6UVR-.js → _C87fJHBJ.js} +1 -1
  123. package/dist/public/assets/_C87fJHBJ.js.br +0 -0
  124. package/dist/public/assets/{_owsls_KV.js → _C87psbTs.js} +1 -1
  125. package/dist/public/assets/_C87psbTs.js.br +0 -0
  126. package/dist/public/assets/_C8Otjsq6.js +1 -0
  127. package/dist/public/assets/_C9Pkf7Dy.js +1 -0
  128. package/dist/public/assets/{_B4RTOif8.js → _C9xqB77n.js} +3 -3
  129. package/dist/public/assets/_C9xqB77n.js.br +0 -0
  130. package/dist/public/assets/{_b6KoGl3T.js → _CBUtRm7T.js} +1 -1
  131. package/dist/public/assets/_CBUtRm7T.js.br +0 -0
  132. package/dist/public/assets/_CBaoo_Ot.js +1 -0
  133. package/dist/public/assets/_CBaoo_Ot.js.br +0 -0
  134. package/dist/public/assets/_CC8X6sBL.js +1 -0
  135. package/dist/public/assets/_CC8X6sBL.js.br +0 -0
  136. package/dist/public/assets/_CD-Nyy0q.js +1 -0
  137. package/dist/public/assets/_CELA8vjH.js +1 -0
  138. package/dist/public/assets/_CF7xvoR9.js +1 -0
  139. package/dist/public/assets/{_DIpOuScW.js → _CGMMMRN0.js} +1 -1
  140. package/dist/public/assets/_CGMMMRN0.js.br +0 -0
  141. package/dist/public/assets/_CHH0_fAt.js +1 -0
  142. package/dist/public/assets/{_D5cTCYFn.js → _CI51OPmm.js} +1 -1
  143. package/dist/public/assets/{_DhoMF2cz.js → _CIVJt8rO.js} +1 -1
  144. package/dist/public/assets/_CIVJt8rO.js.br +0 -0
  145. package/dist/public/assets/{_BgwCKZ8-.js → _CKX1CX1X.js} +1 -1
  146. package/dist/public/assets/_CKX1CX1X.js.br +0 -0
  147. package/dist/public/assets/_CL5PEIcw.js +1 -0
  148. package/dist/public/assets/_CMnOnjht.js +1 -0
  149. package/dist/public/assets/{_Cv5UQjKC.js → _CN9dOhkR.js} +1 -1
  150. package/dist/public/assets/_CN9dOhkR.js.br +0 -0
  151. package/dist/public/assets/_COH8-2hR.js +1 -0
  152. package/dist/public/assets/_CV1LYZzU.js +1 -0
  153. package/dist/public/assets/_CVntBfh0.js +1 -0
  154. package/dist/public/assets/_CWDRfuqt.js +1 -0
  155. package/dist/public/assets/_CWNpXddk.js +1 -0
  156. package/dist/public/assets/{_qQNZOtN1.js → _CZf-29Hc.js} +1 -1
  157. package/dist/public/assets/_CZf-29Hc.js.br +0 -0
  158. package/dist/public/assets/_CcaIHYPh.js +1 -0
  159. package/dist/public/assets/_Ccllh0vX.js +1 -0
  160. package/dist/public/assets/_Ccllh0vX.js.br +0 -0
  161. package/dist/public/assets/{_E3S13WyV.js → _CdD9d7LB.js} +1 -1
  162. package/dist/public/assets/_CeZQKzig.js +1 -0
  163. package/dist/public/assets/{_CRU6G0bW.js → _Cel834Vg.js} +1 -1
  164. package/dist/public/assets/_Cel834Vg.js.br +0 -0
  165. package/dist/public/assets/_Chry46hi.js +1 -0
  166. package/dist/public/assets/_Ckl0EUD5.js +15 -0
  167. package/dist/public/assets/_Ckl0EUD5.js.br +0 -0
  168. package/dist/public/assets/{_CNbBtFvd.js → _ClTlJPX-.js} +1 -1
  169. package/dist/public/assets/_ClTlJPX-.js.br +0 -0
  170. package/dist/public/assets/_CmY_mO0I.js +2 -0
  171. package/dist/public/assets/_CmY_mO0I.js.br +0 -0
  172. package/dist/public/assets/_CoQcFQgw.js +1 -0
  173. package/dist/public/assets/_CpGueDAK.js +1 -0
  174. package/dist/public/assets/_CpvhcOw6.js +1 -0
  175. package/dist/public/assets/_Cqldd767.js +1 -0
  176. package/dist/public/assets/_CtusPhfQ.js +1 -0
  177. package/dist/public/assets/{_G-GLfHX8.js → _CvdRYJ_c.js} +1 -1
  178. package/dist/public/assets/_CvdRYJ_c.js.br +0 -0
  179. package/dist/public/assets/_CyXOHGY9.js +1 -0
  180. package/dist/public/assets/_CyXOHGY9.js.br +0 -0
  181. package/dist/public/assets/_D01rLnA8.js +1 -0
  182. package/dist/public/assets/_D0fowFEW.js +1 -0
  183. package/dist/public/assets/{_DKZHF4Nv.js → _D4DvnfU9.js} +1 -1
  184. package/dist/public/assets/_D4DvnfU9.js.br +0 -0
  185. package/dist/public/assets/{_nNZypv5M.js → _D6GoSbE9.js} +1 -1
  186. package/dist/public/assets/_D6GoSbE9.js.br +0 -0
  187. package/dist/public/assets/{_ek3ORfsa.js → _D85Y7a83.js} +1 -1
  188. package/dist/public/assets/_D85Y7a83.js.br +0 -0
  189. package/dist/public/assets/{_NATcBWS4.js → _D9D7iaPq.js} +1 -1
  190. package/dist/public/assets/_D9D7iaPq.js.br +0 -0
  191. package/dist/public/assets/{_BRzneWL9.js → _DB4Nu6U4.js} +1 -1
  192. package/dist/public/assets/_DB4Nu6U4.js.br +0 -0
  193. package/dist/public/assets/{_Cds3wJDq.js → _DBG97rtR.js} +1 -1
  194. package/dist/public/assets/_DBG97rtR.js.br +0 -0
  195. package/dist/public/assets/_DBlBjpmH.js +1 -0
  196. package/dist/public/assets/{_gW77953_.js → _DFctnKCK.js} +1 -1
  197. package/dist/public/assets/_DFctnKCK.js.br +0 -0
  198. package/dist/public/assets/_DGkd7WRH.js +1 -0
  199. package/dist/public/assets/{_BepFxOFb.js → _DHp283GE.js} +1 -1
  200. package/dist/public/assets/_DHp283GE.js.br +0 -0
  201. package/dist/public/assets/_DOnJm8qx.js +1 -0
  202. package/dist/public/assets/_DPuqmI_y.js +1 -0
  203. package/dist/public/assets/{_D9My8aQO.js → _DQ3w0yT_.js} +1 -1
  204. package/dist/public/assets/_DQ3w0yT_.js.br +0 -0
  205. package/dist/public/assets/{_BivlcK2b.js → _DQPvHSlR.js} +1 -1
  206. package/dist/public/assets/_DQPvHSlR.js.br +0 -0
  207. package/dist/public/assets/{_htAYY3cR.js → _DT1q_BOi.js} +1 -1
  208. package/dist/public/assets/_DT1q_BOi.js.br +0 -0
  209. package/dist/public/assets/{_Ba99YPH7.js → _DTQjjI0s.js} +1 -1
  210. package/dist/public/assets/_DTQjjI0s.js.br +0 -0
  211. package/dist/public/assets/_DTyNE-ha.js +1 -0
  212. package/dist/public/assets/_DTyNE-ha.js.br +0 -0
  213. package/dist/public/assets/_DUPmd4_a.js +1 -0
  214. package/dist/public/assets/_DW5mYwY1.js +1 -0
  215. package/dist/public/assets/_DW68RPud.js +1 -0
  216. package/dist/public/assets/_DZm9X-7i.js +1 -0
  217. package/dist/public/assets/{_BEe3YNkF.js → _D_Ap1bE6.js} +1 -1
  218. package/dist/public/assets/_D_Ap1bE6.js.br +0 -0
  219. package/dist/public/assets/{_DdnHJ8Kq.js → _DchWCM-2.js} +1 -1
  220. package/dist/public/assets/_DchWCM-2.js.br +0 -0
  221. package/dist/public/assets/_DcuDxJqD.js +1 -0
  222. package/dist/public/assets/{_vKg7PBfN.js → _De44Kinm.js} +1 -1
  223. package/dist/public/assets/_De44Kinm.js.br +0 -0
  224. package/dist/public/assets/_Debax-3a.js +1 -0
  225. package/dist/public/assets/{_DwOSwLjq.js → _DekTDKVM.js} +1 -1
  226. package/dist/public/assets/_DekTDKVM.js.br +0 -0
  227. package/dist/public/assets/{_BPzgQc_S.js → _DiJwfnvW.js} +1 -1
  228. package/dist/public/assets/_DiJwfnvW.js.br +0 -0
  229. package/dist/public/assets/{_CebRQHak.js → _DkyjqG9e.js} +1 -1
  230. package/dist/public/assets/_DkyjqG9e.js.br +0 -0
  231. package/dist/public/assets/_DlRteSPN.js +1 -0
  232. package/dist/public/assets/{_BCgYpDrN.js → _Drdi4buU.js} +1 -1
  233. package/dist/public/assets/_Drdi4buU.js.br +0 -0
  234. package/dist/public/assets/{_Z-GJPVlS.js → _Ds_EvdLA.js} +1 -1
  235. package/dist/public/assets/_DuH-y6JT.js +2 -0
  236. package/dist/public/assets/_DuH-y6JT.js.br +0 -0
  237. package/dist/public/assets/_DvVBrYcq.js +1 -0
  238. package/dist/public/assets/_DvsqIVpn.js +1 -0
  239. package/dist/public/assets/{_Qo-0ok5W.js → _DwlEN8jO.js} +1 -1
  240. package/dist/public/assets/_DwlEN8jO.js.br +0 -0
  241. package/dist/public/assets/{_Cpzo7SZk.js → _DwsOEzgx.js} +1 -1
  242. package/dist/public/assets/_DwsOEzgx.js.br +0 -0
  243. package/dist/public/assets/{_VkJUIicU.js → _Dy30P2NB.js} +1 -1
  244. package/dist/public/assets/_Dy30P2NB.js.br +0 -0
  245. package/dist/public/assets/{_B_-YQiMi.js → _DyZ2PJ8P.js} +1 -1
  246. package/dist/public/assets/_DyZ2PJ8P.js.br +0 -0
  247. package/dist/public/assets/{_DMfntr1s.js → _EqF1UvUW.js} +1 -1
  248. package/dist/public/assets/_EqF1UvUW.js.br +0 -0
  249. package/dist/public/assets/{_BwRscix1.js → _IV6gVZT0.js} +1 -1
  250. package/dist/public/assets/_IV6gVZT0.js.br +0 -0
  251. package/dist/public/assets/_JJlyj9UR.js +1 -0
  252. package/dist/public/assets/{_DjSqGVfl.js → _JNKEmcfY.js} +1 -1
  253. package/dist/public/assets/_JNKEmcfY.js.br +0 -0
  254. package/dist/public/assets/_K-qm51rD.js +1 -0
  255. package/dist/public/assets/{_B6zt7nov.js → _LSN-vb5h.js} +1 -1
  256. package/dist/public/assets/_LSN-vb5h.js.br +0 -0
  257. package/dist/public/assets/{_BWWaKHkH.js → _M9dxfvST.js} +1 -1
  258. package/dist/public/assets/_M9dxfvST.js.br +0 -0
  259. package/dist/public/assets/_O16UBaq5.js +1 -0
  260. package/dist/public/assets/_OvEzz7e1.js +1 -0
  261. package/dist/public/assets/_Qq3oTKHZ.js +1 -0
  262. package/dist/public/assets/{_BQ2vcprU.js → _RMFadXyd.js} +1 -1
  263. package/dist/public/assets/{_DSE8pg3h.js → _XaX4L8DJ.js} +1 -1
  264. package/dist/public/assets/_XaX4L8DJ.js.br +0 -0
  265. package/dist/public/assets/_YjB7hD5x.js +1 -0
  266. package/dist/public/assets/_atbUayxf.js +1 -0
  267. package/dist/public/assets/_bhq40nJh.js +1 -0
  268. package/dist/public/assets/_fQx1DX5s.js +1 -0
  269. package/dist/public/assets/_jUcId35c.js +1 -0
  270. package/dist/public/assets/_kiUqt4qT.js +1 -0
  271. package/dist/public/assets/{_Dx0tsmHe.js → _kjnvW1ca.js} +1 -1
  272. package/dist/public/assets/_kjnvW1ca.js.br +0 -0
  273. package/dist/public/assets/_o3VAcp92.js +1 -0
  274. package/dist/public/assets/_prTeknmq.js +1 -0
  275. package/dist/public/assets/_qeC-hkqh.js +1 -0
  276. package/dist/public/assets/_qeC-hkqh.js.br +0 -0
  277. package/dist/public/assets/{_D4genPpn.js → _r2-rm8jK.js} +1 -1
  278. package/dist/public/assets/_r2-rm8jK.js.br +0 -0
  279. package/dist/public/assets/_r97JbCoa.js +1 -0
  280. package/dist/public/assets/_rOZZD8kn.js +1 -0
  281. package/dist/public/assets/_sqn4FW-F.js +1 -0
  282. package/dist/public/assets/{_DdOasiF_.js → _uE7Xqg1n.js} +1 -1
  283. package/dist/public/assets/_uE7Xqg1n.js.br +0 -0
  284. package/dist/public/assets/_uFhCDdP2.js +1 -0
  285. package/dist/public/assets/_uFhCDdP2.js.br +0 -0
  286. package/dist/public/assets/_wKB6E3bj.js +1 -0
  287. package/dist/public/assets/_wP4Qkv_P.js +1 -0
  288. package/dist/public/assets/_y1KeDZoR.js +1 -0
  289. package/dist/public/assets/_yT-Qf3uW.js +1 -0
  290. package/dist/public/assets/files-view-CbbvsHoj.js +2 -0
  291. package/dist/public/assets/manage-workspace-BssaPJK3.js +2 -0
  292. package/dist/public/assets/new-NMPkd8J_.js +1 -0
  293. package/dist/public/assets/new-workspace-DoYdfl6L.js +2 -0
  294. package/dist/public/assets/review-view-CGDvPz9J.js +2 -0
  295. package/dist/public/assets/settings-NMPkd8J_.js +1 -0
  296. package/dist/public/assets/settings-page-CLB0rFFP.js +2 -0
  297. package/dist/public/assets/styles-C7h1Fupr.css +1 -0
  298. package/dist/public/assets/styles-C7h1Fupr.css.br +0 -0
  299. package/dist/public/assets/w-NMPkd8J_.js +1 -0
  300. package/dist/public/assets/w._-BooPCAra.js +1 -0
  301. package/dist/public/assets/w._-DOlOuaiC.js +1 -0
  302. package/dist/public/assets/w._-NMPkd8J_.js +1 -0
  303. package/package.json +1 -1
  304. package/dist/_CMARj6MO.js +0 -2
  305. package/dist/_Dw8F4Pyb.js +0 -2
  306. package/dist/public/assets/_-faV08e8.js +0 -1
  307. package/dist/public/assets/_-lZrhrbN.js +0 -1
  308. package/dist/public/assets/_3DcSidD1.js.br +0 -0
  309. package/dist/public/assets/_3PsHe4bb.js +0 -1
  310. package/dist/public/assets/_4-IBI0Wn.js +0 -1
  311. package/dist/public/assets/_4-IBI0Wn.js.br +0 -0
  312. package/dist/public/assets/_8qzPhKsu.js +0 -1
  313. package/dist/public/assets/_B-sa5fp-.js +0 -1
  314. package/dist/public/assets/_B-xFYWHP.js +0 -1
  315. package/dist/public/assets/_B0Q8waOa.js +0 -1
  316. package/dist/public/assets/_B2-SwRFw.js.br +0 -0
  317. package/dist/public/assets/_B2Wdb3WJ.js +0 -1
  318. package/dist/public/assets/_B4AOPBEb.js +0 -1
  319. package/dist/public/assets/_B4RTOif8.js.br +0 -0
  320. package/dist/public/assets/_B623mj1w.js +0 -1
  321. package/dist/public/assets/_B6zt7nov.js.br +0 -0
  322. package/dist/public/assets/_B7t7QIzo.js +0 -1
  323. package/dist/public/assets/_BB9Txhm5.js +0 -1
  324. package/dist/public/assets/_BC7PZtyx.js +0 -1
  325. package/dist/public/assets/_BCgYpDrN.js.br +0 -0
  326. package/dist/public/assets/_BEe3YNkF.js.br +0 -0
  327. package/dist/public/assets/_BHFA_lPj.js +0 -1
  328. package/dist/public/assets/_BIGof8iy.js.br +0 -0
  329. package/dist/public/assets/_BIUuaaVc.js +0 -2
  330. package/dist/public/assets/_BIUuaaVc.js.br +0 -0
  331. package/dist/public/assets/_BKsSaWSw.js +0 -1
  332. package/dist/public/assets/_BKsSaWSw.js.br +0 -0
  333. package/dist/public/assets/_BLUCn1dd.js +0 -1
  334. package/dist/public/assets/_BLdVDkGQ.js.br +0 -0
  335. package/dist/public/assets/_BMpgdqmy.js.br +0 -0
  336. package/dist/public/assets/_BOdjVdJs.js.br +0 -0
  337. package/dist/public/assets/_BPyUvKx6.js +0 -1
  338. package/dist/public/assets/_BPyUvKx6.js.br +0 -0
  339. package/dist/public/assets/_BPzgQc_S.js.br +0 -0
  340. package/dist/public/assets/_BQxhO31I.js +0 -1
  341. package/dist/public/assets/_BROMDpBR.js +0 -1
  342. package/dist/public/assets/_BRzneWL9.js.br +0 -0
  343. package/dist/public/assets/_BUmgmay0.js +0 -1
  344. package/dist/public/assets/_BWWaKHkH.js.br +0 -0
  345. package/dist/public/assets/_BXSZ_EAo.js.br +0 -0
  346. package/dist/public/assets/_B_-YQiMi.js.br +0 -0
  347. package/dist/public/assets/_B_Fy_gS2.js +0 -1
  348. package/dist/public/assets/_B_TbJVYf.js.br +0 -0
  349. package/dist/public/assets/_Ba99YPH7.js.br +0 -0
  350. package/dist/public/assets/_BbCf-0OR.js.br +0 -0
  351. package/dist/public/assets/_BbDSIRuz.js +0 -1
  352. package/dist/public/assets/_BbWM1RJd.js +0 -1
  353. package/dist/public/assets/_BblNadWW.js.br +0 -0
  354. package/dist/public/assets/_Bd5qH_ET.js +0 -1
  355. package/dist/public/assets/_BdfgARQn.js +0 -1
  356. package/dist/public/assets/_BdqBwfHB.js.br +0 -0
  357. package/dist/public/assets/_BeJsts5I.js +0 -1
  358. package/dist/public/assets/_BepFxOFb.js.br +0 -0
  359. package/dist/public/assets/_BgGvVCi_.js +0 -1
  360. package/dist/public/assets/_BgwCKZ8-.js.br +0 -0
  361. package/dist/public/assets/_Bi_5Ao8u.js.br +0 -0
  362. package/dist/public/assets/_BivlcK2b.js.br +0 -0
  363. package/dist/public/assets/_Bj0mmf63.js +0 -1
  364. package/dist/public/assets/_BkoVGNIF.js.br +0 -0
  365. package/dist/public/assets/_BloLwEd3.js +0 -1
  366. package/dist/public/assets/_BloLwEd3.js.br +0 -0
  367. package/dist/public/assets/_BmLU8huH.js +0 -1
  368. package/dist/public/assets/_BnL19FUk.js +0 -1
  369. package/dist/public/assets/_BnL19FUk.js.br +0 -0
  370. package/dist/public/assets/_Br8IXpnj.js +0 -7
  371. package/dist/public/assets/_Br8IXpnj.js.br +0 -0
  372. package/dist/public/assets/_BufxiMJQ.js +0 -1
  373. package/dist/public/assets/_BvE9n3Nk.js.br +0 -0
  374. package/dist/public/assets/_BwRscix1.js.br +0 -0
  375. package/dist/public/assets/_C-xy_RbT.js +0 -1
  376. package/dist/public/assets/_C0XnVyXd.js +0 -1
  377. package/dist/public/assets/_C2cBlAFc.js.br +0 -0
  378. package/dist/public/assets/_C4f7S8JD.js +0 -1
  379. package/dist/public/assets/_C4f7S8JD.js.br +0 -0
  380. package/dist/public/assets/_C94ydGkX.js +0 -1
  381. package/dist/public/assets/_C9IyzePi.js +0 -1
  382. package/dist/public/assets/_CAfsM4Aw.js.br +0 -0
  383. package/dist/public/assets/_CBk0XI3h.js.br +0 -0
  384. package/dist/public/assets/_CC8K_HdS.js +0 -1
  385. package/dist/public/assets/_CDfEb8PD.js +0 -1
  386. package/dist/public/assets/_CEw9FTPN.js +0 -1
  387. package/dist/public/assets/_CEw9FTPN.js.br +0 -0
  388. package/dist/public/assets/_CK03n2AB.js +0 -1
  389. package/dist/public/assets/_CKE19Sj6.js +0 -1
  390. package/dist/public/assets/_CK_1ijBG.js +0 -1
  391. package/dist/public/assets/_CK_1ijBG.js.br +0 -0
  392. package/dist/public/assets/_CMuhHF1_.js.br +0 -0
  393. package/dist/public/assets/_CNSt-F4i.js +0 -1
  394. package/dist/public/assets/_CNSt-F4i.js.br +0 -0
  395. package/dist/public/assets/_CNbBtFvd.js.br +0 -0
  396. package/dist/public/assets/_CPyH_wio.js.br +0 -0
  397. package/dist/public/assets/_CRU6G0bW.js.br +0 -0
  398. package/dist/public/assets/_CS8DRdO6.js +0 -1
  399. package/dist/public/assets/_CSJbgtSE.js.br +0 -0
  400. package/dist/public/assets/_CV2MxYwO.js +0 -1
  401. package/dist/public/assets/_CV2MxYwO.js.br +0 -0
  402. package/dist/public/assets/_CbaGp8IK.js +0 -1
  403. package/dist/public/assets/_Cbqqax1B.js.br +0 -0
  404. package/dist/public/assets/_Cds3wJDq.js.br +0 -0
  405. package/dist/public/assets/_CdwEhxya.js.br +0 -0
  406. package/dist/public/assets/_CebRQHak.js.br +0 -0
  407. package/dist/public/assets/_Ch2uEQx8.js +0 -1
  408. package/dist/public/assets/_CkfxipEE.js +0 -1
  409. package/dist/public/assets/_CmXW2ayQ.js.br +0 -0
  410. package/dist/public/assets/_CmqP4GeD.js +0 -1
  411. package/dist/public/assets/_Cpzo7SZk.js.br +0 -0
  412. package/dist/public/assets/_CqwBobzE.js +0 -16
  413. package/dist/public/assets/_CqwBobzE.js.br +0 -0
  414. package/dist/public/assets/_CrFxpiku.js +0 -1
  415. package/dist/public/assets/_CrX8AjUs.js +0 -1
  416. package/dist/public/assets/_Cv5UQjKC.js.br +0 -0
  417. package/dist/public/assets/_Cv5xYC1-.js +0 -1
  418. package/dist/public/assets/_Cv5xYC1-.js.br +0 -0
  419. package/dist/public/assets/_CwQ2mXvq.js +0 -1
  420. package/dist/public/assets/_CxqjyoCN.js +0 -1
  421. package/dist/public/assets/_CyK0SPJ0.js +0 -86
  422. package/dist/public/assets/_CyK0SPJ0.js.br +0 -0
  423. package/dist/public/assets/_D0woUGQ2.js +0 -1
  424. package/dist/public/assets/_D0woUGQ2.js.br +0 -0
  425. package/dist/public/assets/_D1FUURh3.js +0 -1
  426. package/dist/public/assets/_D4WDjpDD.js +0 -1
  427. package/dist/public/assets/_D4genPpn.js.br +0 -0
  428. package/dist/public/assets/_D4u6UVR-.js.br +0 -0
  429. package/dist/public/assets/_D8L5Ci6w.js.br +0 -0
  430. package/dist/public/assets/_D9My8aQO.js.br +0 -0
  431. package/dist/public/assets/_DGvodZlR.js +0 -1
  432. package/dist/public/assets/_DGvodZlR.js.br +0 -0
  433. package/dist/public/assets/_DHoW9H92.js +0 -1
  434. package/dist/public/assets/_DI-_ehda.js +0 -1
  435. package/dist/public/assets/_DIHjcKHw.js +0 -1
  436. package/dist/public/assets/_DIpOuScW.js.br +0 -0
  437. package/dist/public/assets/_DKZHF4Nv.js.br +0 -0
  438. package/dist/public/assets/_DLm9Havl.js +0 -2
  439. package/dist/public/assets/_DLm9Havl.js.br +0 -0
  440. package/dist/public/assets/_DMfntr1s.js.br +0 -0
  441. package/dist/public/assets/_DMm87oUv.js +0 -1
  442. package/dist/public/assets/_DOhsbDLa.js +0 -1
  443. package/dist/public/assets/_DQi3fIYP.js.br +0 -0
  444. package/dist/public/assets/_DSE8pg3h.js.br +0 -0
  445. package/dist/public/assets/_D_6eD8j3.js +0 -1
  446. package/dist/public/assets/_DcxtAmo-.js +0 -1
  447. package/dist/public/assets/_DdOasiF_.js.br +0 -0
  448. package/dist/public/assets/_DdnHJ8Kq.js.br +0 -0
  449. package/dist/public/assets/_DezI6gnA.js +0 -1
  450. package/dist/public/assets/_DfNVsO8k.js.br +0 -0
  451. package/dist/public/assets/_DgjF1STl.js +0 -1
  452. package/dist/public/assets/_DhoMF2cz.js.br +0 -0
  453. package/dist/public/assets/_DjSqGVfl.js.br +0 -0
  454. package/dist/public/assets/_DkFEbOBr.js +0 -1
  455. package/dist/public/assets/_DkkcAqbk.js +0 -1
  456. package/dist/public/assets/_Dp9TI35N.js +0 -1
  457. package/dist/public/assets/_DpULBssi.js.br +0 -0
  458. package/dist/public/assets/_DpzCznBl.js +0 -1
  459. package/dist/public/assets/_DrvAhj7O.js +0 -1
  460. package/dist/public/assets/_DrvAhj7O.js.br +0 -0
  461. package/dist/public/assets/_DsVAGttj.js +0 -1
  462. package/dist/public/assets/_DuHu0WRs.js +0 -1
  463. package/dist/public/assets/_DuNMiqGZ.js.br +0 -0
  464. package/dist/public/assets/_DulJnxtm.js +0 -1
  465. package/dist/public/assets/_Dumi0RZ1.js.br +0 -0
  466. package/dist/public/assets/_DvJc1jSF.js +0 -1
  467. package/dist/public/assets/_DwOSwLjq.js.br +0 -0
  468. package/dist/public/assets/_Dx0tsmHe.js.br +0 -0
  469. package/dist/public/assets/_FjvRrhCB.js +0 -1
  470. package/dist/public/assets/_G-GLfHX8.js.br +0 -0
  471. package/dist/public/assets/_G1EPp0PT.js +0 -1
  472. package/dist/public/assets/_KrsBZBn3.js +0 -1
  473. package/dist/public/assets/_MR9h7pkP.js +0 -1
  474. package/dist/public/assets/_NATcBWS4.js.br +0 -0
  475. package/dist/public/assets/_OsNkXSZB.js +0 -1591
  476. package/dist/public/assets/_OsNkXSZB.js.br +0 -0
  477. package/dist/public/assets/_Qo-0ok5W.js.br +0 -0
  478. package/dist/public/assets/_RD_Hz0H2.js +0 -1
  479. package/dist/public/assets/_RV_K_kHP.js +0 -1
  480. package/dist/public/assets/_TCOeDlhN.js +0 -1
  481. package/dist/public/assets/_UoM3DIZw.js +0 -1
  482. package/dist/public/assets/_VkJUIicU.js.br +0 -0
  483. package/dist/public/assets/_WdENvayy.js +0 -1
  484. package/dist/public/assets/_ahCaQNeo.js +0 -1
  485. package/dist/public/assets/_ahCaQNeo.js.br +0 -0
  486. package/dist/public/assets/_b6KoGl3T.js.br +0 -0
  487. package/dist/public/assets/_ek3ORfsa.js.br +0 -0
  488. package/dist/public/assets/_fH8hCjbL.js.br +0 -0
  489. package/dist/public/assets/_fuNRGkMa.js +0 -1
  490. package/dist/public/assets/_gW77953_.js.br +0 -0
  491. package/dist/public/assets/_htAYY3cR.js.br +0 -0
  492. package/dist/public/assets/_kSD4rzLI.js +0 -1
  493. package/dist/public/assets/_lYsK448e.js +0 -1
  494. package/dist/public/assets/_lYsK448e.js.br +0 -0
  495. package/dist/public/assets/_mplkJgT0.js +0 -1
  496. package/dist/public/assets/_nNZypv5M.js.br +0 -0
  497. package/dist/public/assets/_oMjldHvb.js +0 -1
  498. package/dist/public/assets/_owsls_KV.js.br +0 -0
  499. package/dist/public/assets/_qQNZOtN1.js.br +0 -0
  500. package/dist/public/assets/_rBdtlfyy.js +0 -1
  501. package/dist/public/assets/_vKg7PBfN.js.br +0 -0
  502. package/dist/public/assets/_vjVYHF3d.js +0 -1
  503. package/dist/public/assets/_vrzgL0Wk.js +0 -1
  504. package/dist/public/assets/_xJf-SuLN.js +0 -1
  505. package/dist/public/assets/_zBTheEl3.js.br +0 -0
  506. package/dist/public/assets/files-view-UKaYNe4G.js +0 -2
  507. package/dist/public/assets/manage-workspace-Ck4Sbcut.js +0 -2
  508. package/dist/public/assets/new-CxpCkv-N.js +0 -1
  509. package/dist/public/assets/new-workspace-DSCQSeB-.js +0 -2
  510. package/dist/public/assets/review-view-BvXcLpwu.js +0 -2
  511. package/dist/public/assets/settings-CxpCkv-N.js +0 -1
  512. package/dist/public/assets/settings-page-CsWZu0Xz.js +0 -2
  513. package/dist/public/assets/styles-DsAPj1i4.css +0 -1
  514. package/dist/public/assets/styles-DsAPj1i4.css.br +0 -0
  515. package/dist/public/assets/w-CxpCkv-N.js +0 -1
  516. package/dist/public/assets/w._-C7I7a8wD.js +0 -1
  517. package/dist/public/assets/w._-CxpCkv-N.js +0 -1
  518. package/dist/public/assets/w._-pj9rjug_.js +0 -1
package/README.md CHANGED
@@ -222,7 +222,9 @@ targeting that branch.
222
222
 
223
223
  The usage panel (and `work usage`) reads plan/quota windows straight from each
224
224
  agent CLI's own credentials on disk — Claude, Codex, Cursor, Grok, and Copilot
225
- (via `gh`'s token). Providers you are not signed into simply say so.
225
+ (via `gh`'s token). Providers you are not signed into simply say so. A script
226
+ that waits for room in a window reads `work usage --json`, whose shape (and
227
+ what each field means when a reading is stale) `work help usage` spells out.
226
228
 
227
229
  Running more than one `work` (a laptop and a desk box, say)? Settings →
228
230
  Appearance gives each a name and an accent colour: the tab title, home-screen
@@ -61,10 +61,10 @@ export const commands = [
61
61
  unpushed: s.unpushed || 0,
62
62
  edits: s.edits || 0,
63
63
  merged: !!s.contained && !s.pr,
64
- // A PR's GitHub page beside its review: the link an agent
65
- // hands on for a PR names both.
64
+ // A PR's name is its GitHub page, its review beside it: the
65
+ // link an agent hands on for a PR names both.
66
66
  link: s.pr?.url
67
- ? `[${label}](${href}) ([GitHub](${s.pr.url}))`
67
+ ? `[${label}](${s.pr.url}) ([review](${href}))`
68
68
  : `[${label}](${href})`,
69
69
  href,
70
70
  };
@@ -89,20 +89,28 @@ async function textOf(value) {
89
89
  /** What became of a message, for the sender. */
90
90
  function sentText(id, r) {
91
91
  const lines = [
92
- r.delivered
93
- ? `sent to ${id}`
94
- : `queued for ${id} (${r.queued}): typed in once it is at its prompt`,
92
+ `${r.reopened ? `reopened ${id} on its conversation; ` : ""}${
93
+ r.delivered
94
+ ? `sent to ${id}`
95
+ : `queued for ${id} (${r.queued}): typed in once it is at its prompt`
96
+ }`,
95
97
  ];
96
98
  if (r.wantsReply)
97
99
  lines.push(
98
100
  `Its last message, as that turn ends, comes back to you as a prompt: end your turn to wait for it, or run \`work session wait ${id}\`.`,
99
101
  );
102
+ if (r.wantsReply && !r.delivered)
103
+ lines.push(
104
+ "A reply it sends before then answers what it is on now: each reply names the message of yours it answers.",
105
+ );
100
106
  return lines.join("\n");
101
107
  }
102
108
 
103
109
  function printReply(r) {
104
110
  const head =
105
- r.kind === "reply" ? `${r.label} replied:` : `${r.label}: ${r.text}`;
111
+ r.kind === "reply"
112
+ ? `${r.label} replied${r.answers ? ` to ${r.answers}` : ""}:`
113
+ : `${r.label}: ${r.text}`;
106
114
  console.log(head);
107
115
  if (r.kind === "reply") console.log(`${r.text}\n`);
108
116
  }
@@ -167,7 +175,7 @@ export const commands = [
167
175
  {
168
176
  name: "session",
169
177
  summary:
170
- "this session and the workspace's others: new, fanout, send, wait, team, kill",
178
+ "this session and the workspace's others: new, fanout, send, wait, keep, team, kill",
171
179
  help: `work session [--json]
172
180
  This session (WORK_SESSION_ID): its id, agent, name, state, and the
173
181
  workspace it is in (id, name, path) — what a link names (/w/<id>/…).
@@ -184,8 +192,11 @@ work session new [--agent <id>] [--title "<name>"] [--prompt "<text>"|-] [--no-r
184
192
  and the prompt is a message from it (below). --topic starts it in a
185
193
  topic branch of its own (\`work topic new\`). It closes once it has
186
194
  answered and is done with — when your job finishes, or after ten idle
187
- minutes — unless --keep, it is on the user's screen, or they have typed
188
- into it. Past ${SESSION_CAP} running sessions in the workspace it wants --force.
195
+ minutes — unless --keep (or \`work session keep\` since), it is on the
196
+ user's screen, or they have typed into it; a message to it then reopens
197
+ it on its own conversation, where its CLI can resume one (Claude,
198
+ Codex). Each reply from it says when it closes and what then. Past
199
+ ${SESSION_CAP} running sessions in the workspace it wants --force.
189
200
  work session fanout --agent <id> [--agent <id>…] [--count <n>] --prompt "<text>"|- [<item>…] [--title "<name>"] [--parallel <n>] [--stream] [--close-done|--keep] [--topic <name> [--repo <repo>…] [--install]]
190
201
  Start a group of sessions from this one: each --agent once (or --count
191
202
  times), or once for each <item> with {} in the prompt replaced by it
@@ -193,10 +204,10 @@ work session fanout --agent <id> [--agent <id>…] [--count <n>] --prompt "<text
193
204
  (4), however many there are. Their replies come back to you as one
194
205
  prompt once every member has answered (--stream: each as it comes); end
195
206
  your turn to wait, or \`work session wait <group>\`. A member's session
196
- closes once done with, as \`new\`'s does (its result is kept);
197
- --close-done closes it as soon as it answers, --keep never;
198
- --topic gives each member a topic branch of its own (<name>-1, -2, …),
199
- side by side in Review. For a quick sweep inside your own CLI, its own
207
+ closes once done with, as \`new\`'s does (its result is kept, and a
208
+ message reopens it); --close-done closes it as soon as it answers,
209
+ --keep never; --topic gives each member a topic branch of its own
210
+ (<name>-1, -2, …), side by side in Review. For a quick sweep inside your own CLI, its own
200
211
  subagents are cheaper: this is for other vendors, long work, or work the
201
212
  user may want to watch.
202
213
  work session team [--json]
@@ -214,7 +225,12 @@ work session send <id> "<text>"|- [--no-reply]
214
225
  or a draft someone is typing. From an agent's session it wants a reply
215
226
  unless --no-reply: the recipient's last message as that turn ends,
216
227
  typed into this session as a prompt of its own. End your turn to wait
217
- for it. A file's path says more than its text pasted in. An agent in
228
+ for it. One sent mid-turn is answered a turn later: the reply that
229
+ comes first answers what it was on, and each reply names the message
230
+ of yours it answers and those still queued. A session closed for being
231
+ done is reopened on its own conversation first, where its CLI can
232
+ resume one (Claude, Codex); otherwise the send says to start a new one.
233
+ A file's path says more than its text pasted in. An agent in
218
234
  another workspace (\`work session list <workspace>\`) can be messaged
219
235
  when the user asks, and only while it runs; everything else here an
220
236
  agent does in its own workspace only.
@@ -224,13 +240,17 @@ work session wait [<id>|<group>...] [--any] [--timeout <seconds>]
224
240
  typed in too. A group's come once all its members have answered, unless
225
241
  --any: then whatever is in, as soon as anything is. Exits 124 if some
226
242
  are still working after --timeout (${WAIT_S} s).
243
+ work session keep <id>
244
+ Keep a session this one started open for follow-ups, as \`new --keep\`
245
+ would have: it is never closed for being done.
227
246
  work session kill <id> [--keep-children] --yes
228
247
  Close a session and the process in it, and the sessions it started
229
248
  with theirs, unless --keep-children (they then stand on their own).
230
249
  Whoever waits on a reply from one is told.
231
250
  work session kill --done
232
251
  Close now the sessions this one started that are done with (answered,
233
- idle, not the user's): fan-out results stay in \`work session team\`.`,
252
+ idle, not the user's): fan-out results stay in \`work session team\`,
253
+ and a message to one reopens it, as \`send\` says.`,
234
254
  async run(ctx) {
235
255
  const [verb, ...rest] = ctx.parse([
236
256
  "--agent",
@@ -480,6 +500,14 @@ work session kill --done
480
500
  );
481
501
  return;
482
502
  }
503
+ case "keep": {
504
+ const [id] = rest;
505
+ if (!id) ctx.die("usage: work session keep <id>");
506
+ await ctx.api.post(`/api/sessions/${id}/keep${by()}`);
507
+ return ctx.out({ id, kept: true }, () =>
508
+ console.log(`kept ${id}: it is not closed for being done`),
509
+ );
510
+ }
483
511
  case "kill": {
484
512
  if (ctx.has("--done")) {
485
513
  const me = sessionId(ctx);
package/bin/cli/topic.mjs CHANGED
@@ -56,6 +56,56 @@ function owns(ref, branch, foreign) {
56
56
  return of(ref, branch) && !foreign.some((x) => of(x, branch) && of(ref, x));
57
57
  }
58
58
 
59
+ /** The branch `ref` names here (`HEAD` is the one the checkout has out,
60
+ * `origin/<b>` is `<b>`), or null for a commit or a tag. */
61
+ function branchOf(dir, ref) {
62
+ const full = git(dir, ["rev-parse", "--symbolic-full-name", ref], {
63
+ allowFail: true,
64
+ }).out;
65
+ return /^refs\/(?:heads|remotes\/origin)\/(.+)$/.exec(full)?.[1] ?? null;
66
+ }
67
+
68
+ /** Each branch's recorded base (`branch.<b>.gh-merge-base`), in one read. */
69
+ function mergeBases(dir) {
70
+ const out = git(
71
+ dir,
72
+ ["config", "--get-regexp", "^branch\\..*\\.gh-merge-base$"],
73
+ { allowFail: true },
74
+ ).out;
75
+ const map = new Map();
76
+ for (const line of out.split("\n")) {
77
+ const m = /^branch\.(.+)\.gh-merge-base (.+)$/.exec(line.trim());
78
+ if (m) map.set(m[1], m[2]);
79
+ }
80
+ return map;
81
+ }
82
+
83
+ /** The ref a base branch is counted against here, or null with neither
84
+ * copy. This workspace's own branches (it, and the topics one stacks on)
85
+ * go by the local one: they may never be pushed, and here is where they
86
+ * move. Any other (the repo's base) goes by origin's: a bare cache's local
87
+ * copy of it is as old as the clone, or as gh-stack's trunk. */
88
+ function baseRef(dir, name, ws, foreign) {
89
+ const local = has(dir, `refs/heads/${name}`) ? name : null;
90
+ const remote = has(dir, `refs/remotes/origin/${name}`)
91
+ ? `origin/${name}`
92
+ : null;
93
+ return owns(name, ws.branch, foreign) ? local || remote : remote || local;
94
+ }
95
+
96
+ /** Commits `tip` has that `base` lacks, and the reverse. */
97
+ function aheadBehind(dir, base, tip) {
98
+ const [behind, ahead] = git(dir, [
99
+ "rev-list",
100
+ "--left-right",
101
+ "--count",
102
+ `${base}...${tip}`,
103
+ ])
104
+ .out.split(/\s+/)
105
+ .map(Number);
106
+ return { ahead, behind };
107
+ }
108
+
59
109
  /** Where the workspace and its repos are, and the other workspaces'
60
110
  * branches (whose topics are not this one's). */
61
111
  async function context(ctx, fresh) {
@@ -219,13 +269,16 @@ export function makeTopics(
219
269
  // --no-track: its upstream is set by the first push, to its own name on
220
270
  // origin, never to the base it was cut from.
221
271
  git(repo.dir, ["worktree", "add", "--no-track", "-b", branch, dest, start]);
222
- const stacked = from && from !== `origin/${repo.base_branch}` ? from : null;
223
272
  // Its PR's base, said as gh reads it (branch.<b>.gh-merge-base): the
224
- // branch it stacks on, else the base it was cut from.
225
- const prBase = (stacked ?? repo.base_branch).replace(/^origin\//, "");
273
+ // branch it stacks on, else the base it was cut from. A commit or a tag
274
+ // names no branch, and leaves it unrecorded.
275
+ const prBase = from ? branchOf(repo.dir, from) : repo.base_branch;
276
+ const stacked =
277
+ from && prBase !== repo.base_branch ? (prBase ?? from) : null;
226
278
  if (
227
- has(repo.dir, `refs/heads/${prBase}`) ||
228
- has(repo.dir, `refs/remotes/origin/${prBase}`)
279
+ prBase &&
280
+ (has(repo.dir, `refs/heads/${prBase}`) ||
281
+ has(repo.dir, `refs/remotes/origin/${prBase}`))
229
282
  )
230
283
  git(repo.dir, ["config", `branch.${branch}.gh-merge-base`, prBase], {
231
284
  allowFail: true,
@@ -238,6 +291,7 @@ export function makeTopics(
238
291
  base: repo.base_branch,
239
292
  from: start,
240
293
  stacked,
294
+ prBase,
241
295
  install: installFor(dest),
242
296
  link: link(ws, repo, name),
243
297
  });
@@ -282,7 +336,9 @@ async function topicNew(ctx) {
282
336
  console.log(` from: ${m.from}`);
283
337
  if (m.stacked)
284
338
  console.log(
285
- ` stacked: on ${m.stacked}, not origin/${m.base} — its PR's base is that branch, and it rebases when that one merges`,
339
+ m.prBase
340
+ ? ` stacked: on ${m.stacked}, not origin/${m.base} — its PR's base is that branch, and it rebases when that one merges`
341
+ : ` stacked: on ${m.stacked}, which is no branch — its base stays origin/${m.base}`,
286
342
  );
287
343
  if (m.install)
288
344
  console.log(
@@ -298,7 +354,7 @@ async function topicNew(ctx) {
298
354
 
299
355
  /** Every topic of the workspace in one repo: local branches and origin's,
300
356
  * this workspace's (not a longer-named workspace's), with where each
301
- * stands against origin/<base>. */
357
+ * stands against its base: the branch it stacks on, else the repo's. */
302
358
  function topicsIn(ws, repo, foreign) {
303
359
  const prefix = `${ws.branch}-`;
304
360
  const refs = git(repo.dir, [
@@ -313,32 +369,32 @@ function topicsIn(ws, repo, foreign) {
313
369
  if (b && owns(b, ws.branch, foreign)) branches.add(b);
314
370
  }
315
371
  const trees = worktreesOf(repo.dir);
316
- const base = `origin/${repo.base_branch}`;
317
- const haveBase = has(repo.dir, base);
372
+ // What `topic new` recorded for gh: the branch it stacks on, else the
373
+ // repo's base.
374
+ const recorded = mergeBases(repo.dir);
375
+ const bases = new Map();
318
376
  return [...branches].sort().map((branch) => {
319
377
  const name = branch.slice(prefix.length);
320
378
  const local = oid(repo.dir, `refs/heads/${branch}`);
321
379
  const remote = oid(repo.dir, `refs/remotes/origin/${branch}`);
322
380
  const tip = local || remote;
323
- let ahead = null;
324
- let behind = null;
325
- if (haveBase) {
326
- const [b, a] = git(repo.dir, [
327
- "rev-list",
328
- "--left-right",
329
- "--count",
330
- `${base}...${tip}`,
331
- ]).out.split(/\s+/);
332
- ahead = Number(a);
333
- behind = Number(b);
334
- }
381
+ const baseBranch = recorded.get(branch) || repo.base_branch;
382
+ if (!bases.has(baseBranch))
383
+ bases.set(baseBranch, baseRef(repo.dir, baseBranch, ws, foreign));
384
+ const base = bases.get(baseBranch);
385
+ const { ahead, behind } = base
386
+ ? aheadBehind(repo.dir, base, tip)
387
+ : { ahead: null, behind: null };
335
388
  const worktree = trees.get(branch) || null;
336
389
  const pr = prFor(repo, branch);
337
390
  return {
338
391
  topic: name,
339
392
  repo: repo.worktree,
340
393
  branch,
394
+ // The ref it is counted against (`origin/main`, or a branch of this
395
+ // workspace's as it is here), null with no copy of `baseBranch`.
341
396
  base,
397
+ baseBranch,
342
398
  worktree,
343
399
  ahead,
344
400
  behind,
@@ -366,7 +422,7 @@ function topicsIn(ws, repo, foreign) {
366
422
  // Nothing of its own past the base: either merged as it was, or a
367
423
  // topic with no commits yet. Either way, nothing is lost by
368
424
  // putting its worktree away.
369
- contained: haveBase && ahead === 0,
425
+ contained: !!base && ahead === 0,
370
426
  link: link(ws, repo, name),
371
427
  };
372
428
  });
@@ -388,9 +444,11 @@ async function topicList(ctx) {
388
444
  for (const t of list) {
389
445
  const state = t.merged
390
446
  ? "merged"
391
- : t.contained
392
- ? `nothing past ${t.base}`
393
- : `${t.ahead} ahead, ${t.behind} behind`;
447
+ : !t.base
448
+ ? `no ${t.baseBranch} or origin/${t.baseBranch} here to count against`
449
+ : t.contained
450
+ ? `nothing past ${t.base}`
451
+ : `${t.ahead} ahead, ${t.behind} behind ${t.base}`;
394
452
  const flags = [
395
453
  t.dirty ? `${t.dirty} uncommitted` : null,
396
454
  t.local && !t.onOrigin && t.ahead ? "not pushed" : null,
@@ -457,6 +515,7 @@ async function topicDone(ctx) {
457
515
  removed: [],
458
516
  kept: [],
459
517
  refused: [],
518
+ restacked: [],
460
519
  rebase: [],
461
520
  };
462
521
  const touched = repos.filter(
@@ -472,9 +531,14 @@ async function topicDone(ctx) {
472
531
  if (!t) continue;
473
532
  const pr = prFor(repo, branch);
474
533
  if (!t.merged && !t.contained) {
534
+ const prState = t.pr
535
+ ? ` (#${t.pr.number} is ${t.pr.state.toLowerCase()})`
536
+ : "";
475
537
  result.refused.push({
476
538
  repo: repo.worktree,
477
- why: `${branch} is not merged${t.pr ? ` (#${t.pr.number} is ${t.pr.state.toLowerCase()})` : ""} and has ${t.ahead} commit(s) its base does not`,
539
+ why: t.base
540
+ ? `${branch} is not merged${prState} and has ${t.ahead} commit(s) ${t.base} does not`
541
+ : `${branch} is not merged${prState}, and there is no ${t.baseBranch} or origin/${t.baseBranch} here to check it against`,
478
542
  });
479
543
  continue;
480
544
  }
@@ -501,24 +565,65 @@ async function topicDone(ctx) {
501
565
  } else {
502
566
  result.kept.push({ repo: repo.worktree, why: "no worktree to remove" });
503
567
  }
504
- // The other open topics a squash-merge left on the old fork point.
568
+ // The other open topics the merge left behind their bases, each moved
569
+ // onto its own. Bases come before what stacks on them, and each is
570
+ // counted only as its turn comes, so a stack moves bottom first.
505
571
  const mergedTip = oid(repo.dir, `refs/heads/${branch}`);
506
- for (const other of topicsIn(ws, repo, foreign)) {
507
- if (other.branch === branch || other.merged || other.contained) continue;
508
- if (!other.local || !other.behind) continue;
509
- // Cut from the merged topic (a stack): only its own commits move.
572
+ // Each branch's tip before it moved (the merged topic's, which its base
573
+ // may hold only as a squash): past it, what was cut from it is its own.
574
+ const moved = new Map(mergedTip ? [[branch, mergedTip]] : []);
575
+ const others = topicsIn(ws, repo, foreign).filter(
576
+ (o) => o.branch !== branch && !o.merged,
577
+ );
578
+ const byBranch = new Map(others.map((o) => [o.branch, o]));
579
+ const depth = (o, seen = new Set([o.branch])) => {
580
+ const under = byBranch.get(o.baseBranch);
581
+ if (!under || seen.has(under.branch)) return 0;
582
+ seen.add(under.branch);
583
+ return 1 + depth(under, seen);
584
+ };
585
+ others.sort((a, b) => depth(a) - depth(b));
586
+ for (const other of others) {
587
+ // Stacked on the merged topic: it now stacks on what that one did,
588
+ // and its PR's base is that too, as gh reads it.
589
+ const restack = other.baseBranch === branch;
590
+ if (restack) {
591
+ git(repo.dir, [
592
+ "config",
593
+ `branch.${other.branch}.gh-merge-base`,
594
+ t.baseBranch,
595
+ ]);
596
+ result.restacked.push({
597
+ repo: repo.worktree,
598
+ branch: other.branch,
599
+ base: t.baseBranch,
600
+ });
601
+ }
602
+ // Nothing of its own: left where it is, unless what it stacks on
603
+ // moved out from under it.
604
+ if (other.contained && !moved.has(other.baseBranch)) continue;
605
+ const base = restack ? t.base : other.base;
606
+ if (!other.local || !base) continue;
607
+ const { behind } = aheadBehind(repo.dir, base, other.branch);
608
+ if (!behind) continue;
609
+ // Cut from a tip its base now holds only as copies (a squash-merge,
610
+ // or a rebase just now): only its own commits move.
611
+ const cut = moved.get(other.baseBranch) ?? mergedTip;
510
612
  const onto =
511
- mergedTip && contains(repo.dir, other.branch, mergedTip) && !t.contained
512
- ? mergedTip
613
+ cut &&
614
+ contains(repo.dir, other.branch, cut) &&
615
+ !contains(repo.dir, base, cut)
616
+ ? cut
513
617
  : null;
514
618
  const entry = {
515
619
  repo: repo.worktree,
516
620
  branch: other.branch,
517
621
  worktree: other.worktree,
518
- behind: other.behind,
622
+ base,
623
+ behind,
519
624
  command: onto
520
- ? `git rebase --onto origin/${repo.base_branch} ${onto.slice(0, 12)}`
521
- : `git rebase origin/${repo.base_branch}`,
625
+ ? `git rebase --onto ${base} ${onto.slice(0, 12)}`
626
+ : `git rebase ${base}`,
522
627
  state: "needs rebase",
523
628
  };
524
629
  if (ctx.has("--rebase")) {
@@ -527,11 +632,14 @@ async function topicDone(ctx) {
527
632
  entry.state = "skipped: uncommitted changes";
528
633
  else {
529
634
  const args = onto
530
- ? ["rebase", "--onto", `origin/${repo.base_branch}`, onto]
531
- : ["rebase", `origin/${repo.base_branch}`];
635
+ ? ["rebase", "--onto", base, onto]
636
+ : ["rebase", base];
637
+ const before = oid(repo.dir, `refs/heads/${other.branch}`);
532
638
  const r = git(other.worktree, args, { allowFail: true });
533
- if (r.ok) entry.state = "rebased";
534
- else {
639
+ if (r.ok) {
640
+ entry.state = "rebased";
641
+ moved.set(other.branch, before);
642
+ } else {
535
643
  // A rebase that stopped part-way is put back as it was; one that
536
644
  // never started (no identity to commit as, a lock) says why.
537
645
  const conflicted = /CONFLICT|could not apply/i.test(
@@ -559,9 +667,11 @@ async function topicDone(ctx) {
559
667
  for (const x of r.kept) console.log(`${x.repo}: ${x.why}`);
560
668
  for (const x of r.refused)
561
669
  console.log(`${x.repo}: left as it was — ${x.why}`);
670
+ for (const x of r.restacked)
671
+ console.log(`${x.repo}: ${x.branch} now stacks on ${x.base}`);
562
672
  for (const x of r.rebase)
563
673
  console.log(
564
- `${x.repo}: ${x.branch} ${x.behind} behind — ${x.state}${x.state === "needs rebase" ? ` (in ${x.worktree || "its checkout"}: ${x.command}, or work topic done ${name} --rebase)` : ""}`,
674
+ `${x.repo}: ${x.branch} ${x.behind} behind ${x.base} — ${x.state}${x.state === "needs rebase" ? ` (in ${x.worktree || "its checkout"}: ${x.command}, or work topic done ${name} --rebase)` : ""}`,
565
675
  );
566
676
  });
567
677
  if (
@@ -575,22 +685,27 @@ async function topicDone(ctx) {
575
685
 
576
686
  const HELP = `work topic new <name> [--repo <repo>]… [--from <ref>] [--install]
577
687
  start a topic branch, <ws-branch>-<name>, in its own worktree at
578
- <ws>/.worktrees/<name>/<repo>, from origin/<base> (or <ref>: a stack).
579
- The repo is the one the cwd is in, else the workspace's only one, else
580
- --repo (repeat it for several). Prints each path, the install command
581
- its lockfile wants (--install runs it) and the review link.
582
- \`<group>.<topic>\` folds topics into one review chip.
688
+ <ws>/.worktrees/<name>/<repo>, from origin/<base> (or <ref>: a stack,
689
+ whose branch becomes its base). The repo is the one the cwd is in,
690
+ else the workspace's only one, else --repo (repeat it for several).
691
+ Prints each path, the install command its lockfile wants (--install
692
+ runs it) and the review link. \`<group>.<topic>\` folds topics into one
693
+ review chip.
583
694
  work topic list [--all] [--fresh] [--json]
584
- this workspace's open topic branches: worktree, ahead/behind its base,
585
- uncommitted and unpushed work, PR, merged, review link. --all adds
586
- the ones put away (merged, worktree removed); --fresh asks GitHub
587
- for PRs again rather than the last minutes' answer.
695
+ this workspace's open topic branches: worktree, ahead/behind its base
696
+ (the branch it stacks on, which may be local only, else
697
+ origin/<base>), uncommitted and unpushed work, PR, merged, review
698
+ link. --all adds the ones put away (merged, worktree removed);
699
+ --fresh asks GitHub for PRs again rather than the last minutes'
700
+ answer.
588
701
  work topic done <name> [--rebase] [--json]
589
- after its PR merged (or with nothing past its base): fetch --prune,
590
- remove its worktree (only if clean, and only if the merge took every
591
- commit), keep the branch, and list the other open topics to rebase
592
- onto origin/<base> — --rebase does it where the worktree is clean,
593
- aborting on conflict. Never touches the workspace's own checkout.`;
702
+ after its PR merged, or once its base holds all of it (merged there
703
+ by hand, say): fetch --prune, remove its worktree (only if clean, and
704
+ only if the merge took every commit), keep the branch, and list the
705
+ other open topics to rebase, each onto its own base — one stacked on
706
+ this topic onto this one's, which becomes its base. --rebase does it
707
+ where the worktree is clean, aborting on conflict. Never touches the
708
+ workspace's own checkout.`;
594
709
 
595
710
  export const commands = [
596
711
  {
package/bin/work.mjs CHANGED
@@ -13,14 +13,27 @@
13
13
  // work doctor report machine readiness (--json, --fix to install what's missing)
14
14
  // work start run the server in the foreground
15
15
  // work update upgrade the npm package and refresh the service (--yes, --json as setup's)
16
- // work usage print agent plan/quota usage
16
+ // work usage print agent plan/quota usage, a row per signed-in account. Providers are
17
+ // asked at most once a minute, a reading over five minutes old is waited for,
18
+ // and a changed sign-in (a login, a token its CLI renewed) is read at once;
19
+ // --refresh asks again past two minutes. --json prints {agents: [{agent, plan,
20
+ // account, windows, absent, stale_seconds?, note?}]}:
21
+ // windows [{window, used_percent, resets_at}], one per window the plan
22
+ // has (5h, 7d or month, fable; resets_at can be null), kept
23
+ // once read: stale: true (stale_seconds, their age, where
24
+ // known) when its numbers are last-known, reset_passed: true
25
+ // once resets_at is past (used_percent is the last window's)
26
+ // absent windows the plan does not have; one in neither is unknown
27
+ // stale_seconds the row's numbers are last-known: how old they are
28
+ // note why a row is stale or empty, and what brings it back
17
29
  // work workspaces list workspaces (name, branch, sessions, ports)
18
30
  // work workspace [id|name] one workspace: repos, PRs, sessions, procs (default: the current one;
19
31
  // --fresh asks GitHub again rather than the PR cache, ~2 min old)
20
32
  // work repos [id|name] a workspace's repos with base branch and open PRs
21
33
  // work procs [id|name] a workspace's running processes and ports, each port with
22
34
  // the link that opens it from the user's browser (through the
23
- // address it last reached work by)
35
+ // address it last reached work by); an agent CLI a script runs
36
+ // once (`grok -p`, `codex exec`) is marked a background run
24
37
  // work review [id|name] pending review comments as markdown (--json for rows;
25
38
  // --take also clears exactly those from the review, as its
26
39
  // Send does, once acted on, so a later Send cannot repeat them)
@@ -247,12 +260,25 @@ async function usage() {
247
260
  .join(" · ");
248
261
  console.log(`\n${head}`);
249
262
  for (const win of agent.windows || []) {
263
+ // Turned over since it was read: not as full as it was.
264
+ if (win.reset_passed) {
265
+ console.log(
266
+ ` ${win.window.padEnd(5)} ${"░".repeat(10)} reset ${pctText(win.used_percent)} before it, not read since`,
267
+ );
268
+ continue;
269
+ }
250
270
  const pct = Math.max(0, Math.min(100, win.used_percent));
251
271
  const filled = Math.round(pct / 10);
252
272
  const bar = "█".repeat(filled) + "░".repeat(10 - filled);
253
273
  const resets = until(win.resets_at);
274
+ // A stale row says how old below; a window kept from an earlier
275
+ // reading of a live one says it here.
276
+ const old =
277
+ win.stale_seconds != null && agent.stale_seconds == null
278
+ ? ` (${duration(win.stale_seconds * 1000)} old)`
279
+ : "";
254
280
  console.log(
255
- ` ${win.window.padEnd(5)} ${bar} ${pctText(win.used_percent).padStart(5)}${resets ? ` ↻ ${resets}` : ""}`,
281
+ ` ${win.window.padEnd(5)} ${bar} ${pctText(win.used_percent).padStart(5)}${resets ? ` ↻ ${resets}` : ""}${old}`,
256
282
  );
257
283
  }
258
284
  // Only reason a row can be empty or wrong, so it goes last and unindented
@@ -440,7 +466,7 @@ async function workspaceCmd() {
440
466
  if (procs.length) {
441
467
  console.log(` running:`);
442
468
  for (const p of out.procs)
443
- console.log(` ${pad(p.pid, 7)} ${p.cmd}${portsText(p)}`);
469
+ console.log(` ${pad(p.pid, 7)} ${p.cmd}${runText(p)}${portsText(p)}`);
444
470
  }
445
471
  }
446
472
 
@@ -474,6 +500,12 @@ function withUrls(p, linkPort) {
474
500
  };
475
501
  }
476
502
 
503
+ /** An agent CLI a script runs once (`grok -p`, `codex exec`): a job of
504
+ * what started it, not a session (server/procs.ts `run`). */
505
+ function runText(p) {
506
+ return p.run ? " (background run)" : "";
507
+ }
508
+
477
509
  /** A process's ports for a line of text, each with where it opens. */
478
510
  function portsText(p) {
479
511
  if (!p.ports?.length) return "";
@@ -517,7 +549,7 @@ async function procsCmd() {
517
549
  if (jsonOut) return console.log(JSON.stringify(procs, null, 2));
518
550
  if (!procs.length) return console.log("nothing running");
519
551
  for (const p of procs)
520
- console.log(`${pad(p.pid, 7)} ${p.cmd}${portsText(p)}`);
552
+ console.log(`${pad(p.pid, 7)} ${p.cmd}${runText(p)}${portsText(p)}`);
521
553
  }
522
554
 
523
555
  /** Comments left on the review page but not yet sent: an agent can pull
@@ -0,0 +1,2 @@
1
+ import { f as teamsOf } from "./_cvaVxDgR.js";
2
+ export { teamsOf };
@@ -0,0 +1,2 @@
1
+ import { q as notifySessionsChanged } from "./_DQbVrULO.js";
2
+ export { notifySessionsChanged };