@moberg_hr/work-tree 2.17.2 → 2.18.1

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 (253) hide show
  1. package/dist/{account-H2PGGR3Q.js → account-B3HHUCH6.js} +25 -22
  2. package/dist/{account-H2PGGR3Q.js.map → account-B3HHUCH6.js.map} +1 -1
  3. package/dist/{add-repo-6OLFENCR.js → add-repo-2U2FLGJQ.js} +20 -17
  4. package/dist/{add-repo-6OLFENCR.js.map → add-repo-2U2FLGJQ.js.map} +1 -1
  5. package/dist/{answer-AAWIGGVF.js → answer-HHCSBUQE.js} +12 -9
  6. package/dist/{answer-AAWIGGVF.js.map → answer-HHCSBUQE.js.map} +1 -1
  7. package/dist/{attach-3CLKNIHR.js → attach-RNWANIFC.js} +20 -17
  8. package/dist/{attach-3CLKNIHR.js.map → attach-RNWANIFC.js.map} +1 -1
  9. package/dist/bin.js +3 -3
  10. package/dist/{block-CCHW2U25.js → block-FSGNBJSN.js} +13 -10
  11. package/dist/{block-CCHW2U25.js.map → block-FSGNBJSN.js.map} +1 -1
  12. package/dist/{broadcast-RWGJLRU7.js → broadcast-5WAUMYVO.js} +9 -6
  13. package/dist/{broadcast-RWGJLRU7.js.map → broadcast-5WAUMYVO.js.map} +1 -1
  14. package/dist/{catchup-CWPIE6X3.js → catchup-T5SOCXHV.js} +14 -11
  15. package/dist/{catchup-CWPIE6X3.js.map → catchup-T5SOCXHV.js.map} +1 -1
  16. package/dist/{chunk-WC23KWN4.js → chunk-26DBVWJC.js} +3 -3
  17. package/dist/{chunk-A5OQHOEV.js → chunk-2LUTV7UB.js} +2 -2
  18. package/dist/{chunk-XT2ZKXMT.js → chunk-2SLALFWA.js} +17 -5
  19. package/dist/chunk-2SLALFWA.js.map +1 -0
  20. package/dist/{chunk-JTQBQEL4.js → chunk-2YRR5Q3C.js} +3 -3
  21. package/dist/{chunk-QAY2Q2JC.js → chunk-374HKMSE.js} +2 -2
  22. package/dist/{chunk-3A3HSUBD.js → chunk-3JLMVWRO.js} +2 -2
  23. package/dist/{chunk-UKEI5DJS.js → chunk-4J2F6OWM.js} +2 -2
  24. package/dist/chunk-4YG55UQ6.js +9 -0
  25. package/dist/{chunk-WJGSOT6H.js → chunk-55T4LC2P.js} +3 -3
  26. package/dist/{chunk-LHUSNLSJ.js → chunk-6EW27TKI.js} +9 -9
  27. package/dist/{chunk-VS6DDWIX.js → chunk-A72CRTFG.js} +2 -2
  28. package/dist/{chunk-6T5JRU75.js → chunk-AC7FECH5.js} +5 -5
  29. package/dist/{chunk-YXDWREKR.js → chunk-ADVMIHTB.js} +2 -2
  30. package/dist/{chunk-ZWFNIN6O.js → chunk-AMKLWFT3.js} +2 -2
  31. package/dist/{chunk-ZFFWFVER.js → chunk-AT4EPCOV.js} +2 -2
  32. package/dist/{chunk-RF6DCSJM.js → chunk-AWP2MCMN.js} +3 -3
  33. package/dist/{chunk-2AENPORN.js → chunk-BGPCIL4U.js} +5 -5
  34. package/dist/{chunk-TMRRQ6TT.js → chunk-BGS5M542.js} +2 -2
  35. package/dist/{chunk-DOOT25BN.js → chunk-BMLV63AW.js} +2 -2
  36. package/dist/chunk-BR6OWWAA.js +64 -0
  37. package/dist/chunk-BR6OWWAA.js.map +1 -0
  38. package/dist/{chunk-YJVBX3HU.js → chunk-CIUTNNF4.js} +4 -4
  39. package/dist/{chunk-RFNMR7M4.js → chunk-DAQJZE3B.js} +13 -13
  40. package/dist/{chunk-63HMFHNG.js → chunk-DLV7TRON.js} +2 -2
  41. package/dist/{chunk-INQVYKB4.js → chunk-F5RPC3LT.js} +3 -3
  42. package/dist/{chunk-OHMLCXRW.js → chunk-FJYM2JQN.js} +21 -26
  43. package/dist/chunk-FJYM2JQN.js.map +1 -0
  44. package/dist/{chunk-D4V5W6IC.js → chunk-G7VLIMOH.js} +4 -4
  45. package/dist/{chunk-DAVDKNRH.js → chunk-GUEJVX2X.js} +2 -2
  46. package/dist/{chunk-CHSKQHYY.js → chunk-H4TNGZKT.js} +5 -5
  47. package/dist/{chunk-S6V3G3J5.js → chunk-H5JNYD63.js} +3 -3
  48. package/dist/{chunk-REPFZIPP.js → chunk-HGB7BITW.js} +16 -70
  49. package/dist/chunk-HGB7BITW.js.map +1 -0
  50. package/dist/{chunk-FDTBJW7M.js → chunk-IBTA4DSY.js} +5 -5
  51. package/dist/{chunk-GUHRMQNP.js → chunk-ITNSUPVJ.js} +4 -4
  52. package/dist/{chunk-E2PKPMWC.js → chunk-IVH5T4U2.js} +2 -2
  53. package/dist/{chunk-3HWQYW6S.js → chunk-J5B2Z7SO.js} +2 -2
  54. package/dist/{chunk-DOYJR2HF.js → chunk-JUGF3YE7.js} +5 -4
  55. package/dist/chunk-JUGF3YE7.js.map +1 -0
  56. package/dist/chunk-KGHWHAVF.js +24 -0
  57. package/dist/chunk-KGHWHAVF.js.map +1 -0
  58. package/dist/{chunk-UM4R6YIC.js → chunk-KK5RCNDL.js} +8 -8
  59. package/dist/{chunk-UBGKHTXX.js → chunk-LBJHFVH3.js} +9 -9
  60. package/dist/{chunk-UVZITL47.js → chunk-LK7HJGUC.js} +1 -1
  61. package/dist/chunk-LK7HJGUC.js.map +1 -0
  62. package/dist/{chunk-V2TTONXR.js → chunk-LVNPLXUO.js} +5 -5
  63. package/dist/{chunk-HX7B4PI2.js → chunk-N2IDEZGB.js} +4 -4
  64. package/dist/{chunk-WK5ZIO6B.js → chunk-PJ7ZKAZF.js} +2 -2
  65. package/dist/{chunk-T3HVNKHI.js → chunk-PYHYZGY4.js} +3 -3
  66. package/dist/{chunk-33SBTWZW.js → chunk-PZGLIYMD.js} +54 -54
  67. package/dist/{chunk-DZACN5FM.js → chunk-QDNNFL56.js} +3 -3
  68. package/dist/{chunk-2I3HHZMS.js → chunk-QO4QWQUO.js} +2 -2
  69. package/dist/{chunk-OUPQW7WQ.js → chunk-QTENJUM3.js} +5 -5
  70. package/dist/{chunk-4GUB7MQG.js → chunk-S7OCHVVD.js} +9 -9
  71. package/dist/{chunk-IWMODEU4.js → chunk-V76KARDB.js} +4 -4
  72. package/dist/{chunk-Q6RMN7PX.js → chunk-VBB3E37Z.js} +5 -5
  73. package/dist/{chunk-RYFHY3JQ.js → chunk-VG5WQPQB.js} +3 -3
  74. package/dist/{chunk-4TTIEI7I.js → chunk-VRMALBZK.js} +2 -2
  75. package/dist/{chunk-JHCR7H4Y.js → chunk-WIYDT3PY.js} +5 -29
  76. package/dist/chunk-WIYDT3PY.js.map +1 -0
  77. package/dist/{chunk-SNQVTLBX.js → chunk-WKHP3AXS.js} +2 -2
  78. package/dist/{chunk-3E3WHGSI.js → chunk-WVDIS22N.js} +3 -3
  79. package/dist/{chunk-6FD52UQ6.js → chunk-WXYUABCL.js} +6 -6
  80. package/dist/{chunk-NKKISMHV.js → chunk-XKPF4MD2.js} +3 -3
  81. package/dist/{chunk-ZED6QQJ5.js → chunk-XQEP3QYX.js} +4 -4
  82. package/dist/chunk-YQSWVHKK.js +33 -0
  83. package/dist/chunk-YQSWVHKK.js.map +1 -0
  84. package/dist/{cleanup-6QC2ISW2.js → cleanup-LJHC5O6U.js} +31 -28
  85. package/dist/{cleanup-6QC2ISW2.js.map → cleanup-LJHC5O6U.js.map} +1 -1
  86. package/dist/{cli-7RMR5D5O.js → cli-K6T6AJHP.js} +3 -3
  87. package/dist/{color-CRVXKHMC.js → color-7PZNDE4R.js} +11 -8
  88. package/dist/{color-CRVXKHMC.js.map → color-7PZNDE4R.js.map} +1 -1
  89. package/dist/{config-4EZIXQDV.js → config-TM37HUBM.js} +11 -8
  90. package/dist/{config-4EZIXQDV.js.map → config-TM37HUBM.js.map} +1 -1
  91. package/dist/{diff-PU2AYXR7.js → diff-RSSLOKE7.js} +12 -9
  92. package/dist/{diff-PU2AYXR7.js.map → diff-RSSLOKE7.js.map} +1 -1
  93. package/dist/{digest-NRVPOSQO.js → digest-LCHLLJ4M.js} +11 -8
  94. package/dist/{digest-NRVPOSQO.js.map → digest-LCHLLJ4M.js.map} +1 -1
  95. package/dist/{fork-AHV22A2S.js → fork-XVNZMWCA.js} +32 -29
  96. package/dist/{fork-AHV22A2S.js.map → fork-XVNZMWCA.js.map} +1 -1
  97. package/dist/{history-II3FYVXY.js → history-CRUFLMA2.js} +9 -6
  98. package/dist/{hook-CSOXC4SP.js → hook-U4WCMGD6.js} +16 -13
  99. package/dist/{hook-CSOXC4SP.js.map → hook-U4WCMGD6.js.map} +1 -1
  100. package/dist/{hydrate-MMQX5KGM.js → hydrate-BYXK4W6T.js} +9 -6
  101. package/dist/{hydrate-MMQX5KGM.js.map → hydrate-BYXK4W6T.js.map} +1 -1
  102. package/dist/{init-2GUP4SBN.js → init-JWBB4HBE.js} +14 -11
  103. package/dist/{init-2GUP4SBN.js.map → init-JWBB4HBE.js.map} +1 -1
  104. package/dist/{install-skills-LAFRMJ7N.js → install-skills-M2Y6ZGQC.js} +9 -6
  105. package/dist/install-skills-bin.js +8 -5
  106. package/dist/install-skills-bin.js.map +1 -1
  107. package/dist/{keep-HD6TXD65.js → keep-OZJ2XXKF.js} +11 -8
  108. package/dist/{keep-HD6TXD65.js.map → keep-OZJ2XXKF.js.map} +1 -1
  109. package/dist/{list-7HHYTAIA.js → list-YVZSGKT4.js} +9 -6
  110. package/dist/{list-7HHYTAIA.js.map → list-YVZSGKT4.js.map} +1 -1
  111. package/dist/{move-AJTGIGJR.js → move-7TAU3LI3.js} +21 -18
  112. package/dist/{move-AJTGIGJR.js.map → move-7TAU3LI3.js.map} +1 -1
  113. package/dist/{note-5H5CDNXB.js → note-ESLGTIYH.js} +11 -8
  114. package/dist/{note-5H5CDNXB.js.map → note-ESLGTIYH.js.map} +1 -1
  115. package/dist/{overlaps-YB2S7TEC.js → overlaps-FYXO3OL2.js} +15 -12
  116. package/dist/{overlaps-YB2S7TEC.js.map → overlaps-FYXO3OL2.js.map} +1 -1
  117. package/dist/{pin-4IHOP6F6.js → pin-AAMXBCV3.js} +11 -8
  118. package/dist/{pin-4IHOP6F6.js.map → pin-AAMXBCV3.js.map} +1 -1
  119. package/dist/{pr-RTFRPS5N.js → pr-42UBVLUT.js} +27 -24
  120. package/dist/{pr-RTFRPS5N.js.map → pr-42UBVLUT.js.map} +1 -1
  121. package/dist/{prune-P3Y6HAGE.js → prune-B72T33B6.js} +29 -26
  122. package/dist/{prune-P3Y6HAGE.js.map → prune-B72T33B6.js.map} +1 -1
  123. package/dist/{pty-host-CXWNRSC6.js → pty-host-72L4DQL5.js} +16 -13
  124. package/dist/{pty-host-CXWNRSC6.js.map → pty-host-72L4DQL5.js.map} +1 -1
  125. package/dist/{read-FAAEZAAH.js → read-75KS2EXO.js} +11 -8
  126. package/dist/{read-FAAEZAAH.js.map → read-75KS2EXO.js.map} +1 -1
  127. package/dist/{recent-4A7ROGTU.js → recent-H665DNCJ.js} +16 -13
  128. package/dist/{recent-4A7ROGTU.js.map → recent-H665DNCJ.js.map} +1 -1
  129. package/dist/{remove-4HT5JHPR.js → remove-ZZBCNASU.js} +30 -27
  130. package/dist/{remove-4HT5JHPR.js.map → remove-ZZBCNASU.js.map} +1 -1
  131. package/dist/{restart-X4VCGVVD.js → restart-WFMCSOPB.js} +11 -8
  132. package/dist/{restart-X4VCGVVD.js.map → restart-WFMCSOPB.js.map} +1 -1
  133. package/dist/{resume-CIYUYUGR.js → resume-GICIEI2I.js} +16 -13
  134. package/dist/{resume-CIYUYUGR.js.map → resume-GICIEI2I.js.map} +1 -1
  135. package/dist/{review-WTNHUBNY.js → review-TZUVYEAL.js} +10 -7
  136. package/dist/{review-WTNHUBNY.js.map → review-TZUVYEAL.js.map} +1 -1
  137. package/dist/{run-VYG6IYO4.js → run-SVJLTKSR.js} +9 -6
  138. package/dist/{run-VYG6IYO4.js.map → run-SVJLTKSR.js.map} +1 -1
  139. package/dist/{screen-LPWYIT4D.js → screen-JC6L6MT5.js} +11 -8
  140. package/dist/{screen-LPWYIT4D.js.map → screen-JC6L6MT5.js.map} +1 -1
  141. package/dist/{search-T3GQMWFL.js → search-3BZMJM3P.js} +9 -6
  142. package/dist/{search-T3GQMWFL.js.map → search-3BZMJM3P.js.map} +1 -1
  143. package/dist/{section-Y6LOV4R5.js → section-GNYPAEQC.js} +11 -8
  144. package/dist/{section-Y6LOV4R5.js.map → section-GNYPAEQC.js.map} +1 -1
  145. package/dist/{send-HSDMFC6W.js → send-KVUFOWCP.js} +13 -10
  146. package/dist/{send-HSDMFC6W.js.map → send-KVUFOWCP.js.map} +1 -1
  147. package/dist/{sessions-WLYINQDP.js → sessions-W36QTHAD.js} +29 -26
  148. package/dist/{sessions-WLYINQDP.js.map → sessions-W36QTHAD.js.map} +1 -1
  149. package/dist/{show-CRU7ZNCF.js → show-FQPMGZO3.js} +10 -7
  150. package/dist/{show-CRU7ZNCF.js.map → show-FQPMGZO3.js.map} +1 -1
  151. package/dist/{snooze-YQFTGZL5.js → snooze-HGO3W2OF.js} +11 -8
  152. package/dist/{snooze-YQFTGZL5.js.map → snooze-HGO3W2OF.js.map} +1 -1
  153. package/dist/{start-EYFMHXJ6.js → start-UQSJGUMJ.js} +11 -8
  154. package/dist/{start-EYFMHXJ6.js.map → start-UQSJGUMJ.js.map} +1 -1
  155. package/dist/{status-PFGSYLDB.js → status-MGTUAZTA.js} +13 -10
  156. package/dist/{status-PFGSYLDB.js.map → status-MGTUAZTA.js.map} +1 -1
  157. package/dist/{statusline-NEVXTHUY.js → statusline-B6U3ANSM.js} +3 -2
  158. package/dist/{statusline-NEVXTHUY.js.map → statusline-B6U3ANSM.js.map} +1 -1
  159. package/dist/{statusline-hook-H5MM2PA2.js → statusline-hook-SYRLMSDL.js} +7 -5
  160. package/dist/{statusline-hook-H5MM2PA2.js.map → statusline-hook-SYRLMSDL.js.map} +1 -1
  161. package/dist/{stop-AV7NEC7U.js → stop-JBUL4WY3.js} +11 -8
  162. package/dist/{stop-AV7NEC7U.js.map → stop-JBUL4WY3.js.map} +1 -1
  163. package/dist/{sync-2M5O3NX7.js → sync-ILYA3AHS.js} +29 -26
  164. package/dist/{sync-2M5O3NX7.js.map → sync-ILYA3AHS.js.map} +1 -1
  165. package/dist/{time-E7FJHTKI.js → time-ZOJD7HFL.js} +12 -9
  166. package/dist/{time-E7FJHTKI.js.map → time-ZOJD7HFL.js.map} +1 -1
  167. package/dist/{timesheet-LTC7EXNJ.js → timesheet-WT7QUB7M.js} +14 -11
  168. package/dist/{timesheet-LTC7EXNJ.js.map → timesheet-WT7QUB7M.js.map} +1 -1
  169. package/dist/{tree-CQT5LU62.js → tree-M6YEJCXF.js} +28 -25
  170. package/dist/{tree-CQT5LU62.js.map → tree-M6YEJCXF.js.map} +1 -1
  171. package/dist/{update-BZOZCI7G.js → update-47FZ6YO5.js} +17 -14
  172. package/dist/{update-BZOZCI7G.js.map → update-47FZ6YO5.js.map} +1 -1
  173. package/dist/{usage-IOCB7U4W.js → usage-PTD3C34L.js} +15 -10
  174. package/dist/usage-PTD3C34L.js.map +1 -0
  175. package/dist/usage-ask-BULFMCUZ.js +176 -0
  176. package/dist/usage-ask-BULFMCUZ.js.map +1 -0
  177. package/dist/{version-U2QIALPO.js → version-6UJN2CCE.js} +3 -2
  178. package/dist/{version-U2QIALPO.js.map → version-6UJN2CCE.js.map} +1 -1
  179. package/dist/{wait-J5BM6222.js → wait-JHFM3MA7.js} +13 -10
  180. package/dist/{wait-J5BM6222.js.map → wait-JHFM3MA7.js.map} +1 -1
  181. package/dist/wd-bin.js +2 -2
  182. package/dist/web/assets/{PtyView-DiTbw6LM.js → PtyView-DpIVcrTI.js} +2 -2
  183. package/dist/web/assets/{PtyView-DiTbw6LM.js.map → PtyView-DpIVcrTI.js.map} +1 -1
  184. package/dist/web/assets/{index-Du3J-M5I.js → index-DhXqtaRc.js} +4 -4
  185. package/dist/web/assets/index-DhXqtaRc.js.map +1 -0
  186. package/dist/web/index.html +1 -1
  187. package/dist/{web-52FISJAC.js → web-HRGWOUDV.js} +178 -158
  188. package/dist/web-HRGWOUDV.js.map +1 -0
  189. package/npm-shrinkwrap.json +2 -2
  190. package/package.json +1 -1
  191. package/dist/chunk-DOYJR2HF.js.map +0 -1
  192. package/dist/chunk-JHCR7H4Y.js.map +0 -1
  193. package/dist/chunk-M7CC2GUA.js +0 -9
  194. package/dist/chunk-OHMLCXRW.js.map +0 -1
  195. package/dist/chunk-REPFZIPP.js.map +0 -1
  196. package/dist/chunk-UVZITL47.js.map +0 -1
  197. package/dist/chunk-XT2ZKXMT.js.map +0 -1
  198. package/dist/usage-IOCB7U4W.js.map +0 -1
  199. package/dist/web/assets/index-Du3J-M5I.js.map +0 -1
  200. package/dist/web-52FISJAC.js.map +0 -1
  201. /package/dist/{chunk-WC23KWN4.js.map → chunk-26DBVWJC.js.map} +0 -0
  202. /package/dist/{chunk-A5OQHOEV.js.map → chunk-2LUTV7UB.js.map} +0 -0
  203. /package/dist/{chunk-JTQBQEL4.js.map → chunk-2YRR5Q3C.js.map} +0 -0
  204. /package/dist/{chunk-QAY2Q2JC.js.map → chunk-374HKMSE.js.map} +0 -0
  205. /package/dist/{chunk-3A3HSUBD.js.map → chunk-3JLMVWRO.js.map} +0 -0
  206. /package/dist/{chunk-UKEI5DJS.js.map → chunk-4J2F6OWM.js.map} +0 -0
  207. /package/dist/{chunk-M7CC2GUA.js.map → chunk-4YG55UQ6.js.map} +0 -0
  208. /package/dist/{chunk-WJGSOT6H.js.map → chunk-55T4LC2P.js.map} +0 -0
  209. /package/dist/{chunk-LHUSNLSJ.js.map → chunk-6EW27TKI.js.map} +0 -0
  210. /package/dist/{chunk-VS6DDWIX.js.map → chunk-A72CRTFG.js.map} +0 -0
  211. /package/dist/{chunk-6T5JRU75.js.map → chunk-AC7FECH5.js.map} +0 -0
  212. /package/dist/{chunk-YXDWREKR.js.map → chunk-ADVMIHTB.js.map} +0 -0
  213. /package/dist/{chunk-ZWFNIN6O.js.map → chunk-AMKLWFT3.js.map} +0 -0
  214. /package/dist/{chunk-ZFFWFVER.js.map → chunk-AT4EPCOV.js.map} +0 -0
  215. /package/dist/{chunk-RF6DCSJM.js.map → chunk-AWP2MCMN.js.map} +0 -0
  216. /package/dist/{chunk-2AENPORN.js.map → chunk-BGPCIL4U.js.map} +0 -0
  217. /package/dist/{chunk-TMRRQ6TT.js.map → chunk-BGS5M542.js.map} +0 -0
  218. /package/dist/{chunk-DOOT25BN.js.map → chunk-BMLV63AW.js.map} +0 -0
  219. /package/dist/{chunk-YJVBX3HU.js.map → chunk-CIUTNNF4.js.map} +0 -0
  220. /package/dist/{chunk-RFNMR7M4.js.map → chunk-DAQJZE3B.js.map} +0 -0
  221. /package/dist/{chunk-63HMFHNG.js.map → chunk-DLV7TRON.js.map} +0 -0
  222. /package/dist/{chunk-INQVYKB4.js.map → chunk-F5RPC3LT.js.map} +0 -0
  223. /package/dist/{chunk-D4V5W6IC.js.map → chunk-G7VLIMOH.js.map} +0 -0
  224. /package/dist/{chunk-DAVDKNRH.js.map → chunk-GUEJVX2X.js.map} +0 -0
  225. /package/dist/{chunk-CHSKQHYY.js.map → chunk-H4TNGZKT.js.map} +0 -0
  226. /package/dist/{chunk-S6V3G3J5.js.map → chunk-H5JNYD63.js.map} +0 -0
  227. /package/dist/{chunk-FDTBJW7M.js.map → chunk-IBTA4DSY.js.map} +0 -0
  228. /package/dist/{chunk-GUHRMQNP.js.map → chunk-ITNSUPVJ.js.map} +0 -0
  229. /package/dist/{chunk-E2PKPMWC.js.map → chunk-IVH5T4U2.js.map} +0 -0
  230. /package/dist/{chunk-3HWQYW6S.js.map → chunk-J5B2Z7SO.js.map} +0 -0
  231. /package/dist/{chunk-UM4R6YIC.js.map → chunk-KK5RCNDL.js.map} +0 -0
  232. /package/dist/{chunk-UBGKHTXX.js.map → chunk-LBJHFVH3.js.map} +0 -0
  233. /package/dist/{chunk-V2TTONXR.js.map → chunk-LVNPLXUO.js.map} +0 -0
  234. /package/dist/{chunk-HX7B4PI2.js.map → chunk-N2IDEZGB.js.map} +0 -0
  235. /package/dist/{chunk-WK5ZIO6B.js.map → chunk-PJ7ZKAZF.js.map} +0 -0
  236. /package/dist/{chunk-T3HVNKHI.js.map → chunk-PYHYZGY4.js.map} +0 -0
  237. /package/dist/{chunk-33SBTWZW.js.map → chunk-PZGLIYMD.js.map} +0 -0
  238. /package/dist/{chunk-DZACN5FM.js.map → chunk-QDNNFL56.js.map} +0 -0
  239. /package/dist/{chunk-2I3HHZMS.js.map → chunk-QO4QWQUO.js.map} +0 -0
  240. /package/dist/{chunk-OUPQW7WQ.js.map → chunk-QTENJUM3.js.map} +0 -0
  241. /package/dist/{chunk-4GUB7MQG.js.map → chunk-S7OCHVVD.js.map} +0 -0
  242. /package/dist/{chunk-IWMODEU4.js.map → chunk-V76KARDB.js.map} +0 -0
  243. /package/dist/{chunk-Q6RMN7PX.js.map → chunk-VBB3E37Z.js.map} +0 -0
  244. /package/dist/{chunk-RYFHY3JQ.js.map → chunk-VG5WQPQB.js.map} +0 -0
  245. /package/dist/{chunk-4TTIEI7I.js.map → chunk-VRMALBZK.js.map} +0 -0
  246. /package/dist/{chunk-SNQVTLBX.js.map → chunk-WKHP3AXS.js.map} +0 -0
  247. /package/dist/{chunk-3E3WHGSI.js.map → chunk-WVDIS22N.js.map} +0 -0
  248. /package/dist/{chunk-6FD52UQ6.js.map → chunk-WXYUABCL.js.map} +0 -0
  249. /package/dist/{chunk-NKKISMHV.js.map → chunk-XKPF4MD2.js.map} +0 -0
  250. /package/dist/{chunk-ZED6QQJ5.js.map → chunk-XQEP3QYX.js.map} +0 -0
  251. /package/dist/{cli-7RMR5D5O.js.map → cli-K6T6AJHP.js.map} +0 -0
  252. /package/dist/{history-II3FYVXY.js.map → history-CRUFLMA2.js.map} +0 -0
  253. /package/dist/{install-skills-LAFRMJ7N.js.map → install-skills-M2Y6ZGQC.js.map} +0 -0
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createInProcess
4
- } from "./chunk-D4V5W6IC.js";
4
+ } from "./chunk-G7VLIMOH.js";
5
5
  import {
6
6
  ensurePty,
7
7
  peekPty
8
- } from "./chunk-4GUB7MQG.js";
8
+ } from "./chunk-S7OCHVVD.js";
9
9
  import {
10
10
  getCommentFileStore
11
11
  } from "./chunk-CNZV3UCM.js";
12
12
  import {
13
13
  recordedRepos,
14
14
  sessionAliases
15
- } from "./chunk-VS6DDWIX.js";
15
+ } from "./chunk-A72CRTFG.js";
16
16
  import {
17
17
  sessionIdFor
18
18
  } from "./chunk-ALBTIOP3.js";
19
19
  import {
20
20
  checkedOutBranch
21
- } from "./chunk-OHMLCXRW.js";
21
+ } from "./chunk-FJYM2JQN.js";
22
22
  import {
23
23
  resolveProjectTarget
24
24
  } from "./chunk-IPHADNF5.js";
@@ -174,4 +174,4 @@ export {
174
174
  uncommittedFiles,
175
175
  defaultForkDeps
176
176
  };
177
- //# sourceMappingURL=chunk-CHSKQHYY.js.map
177
+ //# sourceMappingURL=chunk-H4TNGZKT.js.map
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-4CXUVBOD.js";
5
5
  import {
6
6
  buildAiLaunchArgs
7
- } from "./chunk-OHMLCXRW.js";
7
+ } from "./chunk-FJYM2JQN.js";
8
8
  import {
9
9
  applyEnvDelta,
10
10
  hasEnvDelta
11
- } from "./chunk-JHCR7H4Y.js";
11
+ } from "./chunk-YQSWVHKK.js";
12
12
  import {
13
13
  detachHere
14
14
  } from "./chunk-VHENFC2S.js";
@@ -63,4 +63,4 @@ export {
63
63
  openVSCode,
64
64
  launchAi
65
65
  };
66
- //# sourceMappingURL=chunk-S6V3G3J5.js.map
66
+ //# sourceMappingURL=chunk-H5JNYD63.js.map
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ accountOf
4
+ } from "./chunk-BR6OWWAA.js";
2
5
  import {
3
6
  detachHere,
4
7
  killTree
@@ -10,72 +13,17 @@ import {
10
13
  getConfigDir
11
14
  } from "./chunk-F2ECTTSY.js";
12
15
 
13
- // src/core/agents/claude/rate-limits.ts
14
- import os from "os";
15
- import path from "path";
16
- import { createHash } from "crypto";
17
- var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
18
- var clampPercent = (n) => Math.round(Math.min(100, Math.max(0, n)) * 10) / 10;
19
- function resetIso(v) {
20
- let ms;
21
- if (typeof v === "number" && Number.isFinite(v)) ms = v < 1e12 ? v * 1e3 : v;
22
- else if (typeof v === "string" && v.trim() !== "") ms = Date.parse(v);
23
- else return null;
24
- return Number.isFinite(ms) ? new Date(ms).toISOString() : null;
25
- }
26
- var capitalise = (s) => s.charAt(0).toUpperCase() + s.slice(1);
27
- function labelOf(key) {
28
- if (key === "five_hour") return "5-hour limit";
29
- if (key === "seven_day") return "Weekly limit";
30
- const named = /^seven_day_(.+)$/.exec(key);
31
- if (named) return `Weekly ${capitalise(named[1].replace(/_/g, " "))} limit`;
32
- const span = /^(\d+)_(hour|day)$/.exec(key);
33
- if (span) return `${span[1]}-${span[2]} limit`;
34
- return `${capitalise(key.replace(/_/g, " "))} limit`;
35
- }
36
- var rank = (key) => key === "five_hour" ? 0 : key === "seven_day" ? 1 : 2;
37
- function parseClaudeRateLimits(raw) {
38
- if (!isRecord(raw)) return [];
39
- const windows = [];
40
- const keys = Object.keys(raw).filter((k) => k !== "spend_limit").sort((a, b) => rank(a) - rank(b) || a.localeCompare(b));
41
- for (const key of keys) {
42
- const w = raw[key];
43
- if (!isRecord(w) || typeof w.used_percentage !== "number" || !Number.isFinite(w.used_percentage)) continue;
44
- windows.push({ id: key, label: labelOf(key), usedPercent: clampPercent(w.used_percentage), resetsAt: resetIso(w.resets_at) });
45
- }
46
- const spend = raw.spend_limit;
47
- if (isRecord(spend)) {
48
- const { used_percentage: pct, used_usd: used, limit_usd: limit } = spend;
49
- let percent = null;
50
- if (typeof pct === "number" && Number.isFinite(pct)) percent = pct;
51
- else if (typeof used === "number" && typeof limit === "number" && Number.isFinite(used) && Number.isFinite(limit) && limit > 0)
52
- percent = used / limit * 100;
53
- if (percent !== null) {
54
- windows.push({ id: "spend_limit", label: "Spend limit", usedPercent: clampPercent(percent), resetsAt: resetIso(spend.resets_at) });
55
- }
56
- }
57
- return windows;
58
- }
59
- function accountOf(configDir) {
60
- if (!configDir) return "default";
61
- const norm = (p) => process.platform === "win32" ? path.resolve(p).toLowerCase() : path.resolve(p);
62
- const resolved = norm(configDir);
63
- if (resolved === norm(path.join(os.homedir(), ".claude"))) return "default";
64
- const hash = createHash("sha1").update(resolved).digest("hex");
65
- return `cfg-${hash.slice(0, 8)}`;
66
- }
67
-
68
16
  // src/core/agents/claude/statusline-run.ts
69
17
  import fs from "fs";
70
- import os2 from "os";
71
- import path2 from "path";
18
+ import os from "os";
19
+ import path from "path";
72
20
  var NESTED_ENV = "WORK_STATUSLINE_NESTED";
73
- var isRecord2 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
21
+ var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
74
22
  var savedPath = (configDir) => {
75
23
  const account = accountOf(configDir);
76
- return path2.join(getConfigDir(), account === "default" ? "statusline.json" : `statusline-${account}.json`);
24
+ return path.join(getConfigDir(), account === "default" ? "statusline.json" : `statusline-${account}.json`);
77
25
  };
78
- var isOurs = (v) => isRecord2(v) && typeof v.command === "string" && /\bhook\s+statusline\b/.test(v.command);
26
+ var isOurs = (v) => isRecord(v) && typeof v.command === "string" && /\bhook\s+statusline\b/.test(v.command);
79
27
  function readSaved(configDir) {
80
28
  let text;
81
29
  try {
@@ -90,9 +38,9 @@ function readSaved(configDir) {
90
38
  } catch (e) {
91
39
  return { kind: "unreadable", why: e instanceof Error ? e.message : String(e) };
92
40
  }
93
- if (!isRecord2(v) || !("original" in v)) return { kind: "unreadable", why: "no original in it" };
41
+ if (!isRecord(v) || !("original" in v)) return { kind: "unreadable", why: "no original in it" };
94
42
  if (v.original === null) return { kind: "ok", original: null };
95
- return isRecord2(v.original) ? { kind: "ok", original: v.original } : { kind: "unreadable", why: "original is not an object" };
43
+ return isRecord(v.original) ? { kind: "ok", original: v.original } : { kind: "unreadable", why: "original is not an object" };
96
44
  }
97
45
  function originalStatusLine(onDamage, configDir) {
98
46
  let saved = readSaved(configDir);
@@ -104,15 +52,15 @@ function originalStatusLine(onDamage, configDir) {
104
52
  function statusLineIn(file) {
105
53
  try {
106
54
  const v = JSON.parse(fs.readFileSync(file, "utf-8"));
107
- return isRecord2(v) && isRecord2(v.statusLine) ? v.statusLine : null;
55
+ return isRecord(v) && isRecord(v.statusLine) ? v.statusLine : null;
108
56
  } catch {
109
57
  return null;
110
58
  }
111
59
  }
112
60
  function userStatusLine(o = {}) {
113
61
  const files = [
114
- ...o.projectDir ? [path2.join(o.projectDir, ".claude", "settings.local.json"), path2.join(o.projectDir, ".claude", "settings.json")] : [],
115
- path2.join(o.configDir || path2.join(o.home ?? os2.homedir(), ".claude"), "settings.json")
62
+ ...o.projectDir ? [path.join(o.projectDir, ".claude", "settings.local.json"), path.join(o.projectDir, ".claude", "settings.json")] : [],
63
+ path.join(o.configDir || path.join(o.home ?? os.homedir(), ".claude"), "settings.json")
116
64
  ];
117
65
  for (const file of files) {
118
66
  const line = statusLineIn(file);
@@ -128,8 +76,8 @@ function shellFor(platform = process.platform, env = process.env, exists = fs.ex
128
76
  const configured = env.CLAUDE_CODE_GIT_BASH_PATH;
129
77
  if (configured && exists(configured)) return { file: configured, args };
130
78
  for (const dir of (env.PATH ?? env.Path ?? "").split(";").filter(Boolean)) {
131
- if (!exists(path2.win32.join(dir, "git.exe"))) continue;
132
- for (const bash of [path2.win32.join(dir, "..", "bin", "bash.exe"), path2.win32.join(dir, "bash.exe")])
79
+ if (!exists(path.win32.join(dir, "git.exe"))) continue;
80
+ for (const bash of [path.win32.join(dir, "..", "bin", "bash.exe"), path.win32.join(dir, "bash.exe")])
133
81
  if (exists(bash)) return { file: bash, args };
134
82
  }
135
83
  const standard = "C:\\Program Files\\Git\\bin\\bash.exe";
@@ -202,8 +150,6 @@ function runStatusLineCommand(cmd, stdin, o = {}) {
202
150
  }
203
151
 
204
152
  export {
205
- parseClaudeRateLimits,
206
- accountOf,
207
153
  NESTED_ENV,
208
154
  savedPath,
209
155
  isOurs,
@@ -211,4 +157,4 @@ export {
211
157
  userStatusLine,
212
158
  runStatusLineCommand
213
159
  };
214
- //# sourceMappingURL=chunk-REPFZIPP.js.map
160
+ //# sourceMappingURL=chunk-HGB7BITW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/agents/claude/statusline-run.ts"],"sourcesContent":["import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { getConfigDir } from '../../platform/config-dir.js';\nimport { detachHere, killTree } from '../../platform/process.js';\nimport spawn from '../../platform/spawn.js';\nimport { accountOf } from './rate-limits.js';\n\n// The status-line hook's half: what runs on every refresh of every Claude work started. Light on purpose — no\n// settings editor, no locks, no registry; giving back the wrapper older builds put in the user's settings is statusline.ts.\n\n/** Set on the user's own command: a status line that runs work's hook again (it called `work hook statusline` itself) records, and runs nothing more. */\nexport const NESTED_ENV = 'WORK_STATUSLINE_NESTED';\n\nexport type StatusLine = Record<string, unknown>;\n\nexport const isRecord = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);\n/**\n * Where the user's own status line is saved: `statusline.json` for the default account, `statusline-<account>.json` for\n * another — named by `accountOf(CLAUDE_CONFIG_DIR)`, a short hash of the folder, the same name the hook computes from its\n * environment (it knows the folder, not the registry's name for it, and loads no config to find out; a renamed account\n * keeps its saved line).\n */\nexport const savedPath = (configDir?: string) => {\n const account = accountOf(configDir);\n return path.join(getConfigDir(), account === 'default' ? 'statusline.json' : `statusline-${account}.json`);\n};\n\n/**\n * work's hook under any path (`/usr/bin/work hook statusline`, `node …/bin.js hook statusline`), with or without the\n * user's line after `||` as its fallback: saved as \"the original\", it would run itself.\n */\nexport const isOurs = (v: unknown) => isRecord(v) && typeof v.command === 'string' && /\\bhook\\s+statusline\\b/.test(v.command);\n\n/** What ~/.work/statusline.json says: an original (null: there was none), nothing saved, or a file that can't be read. */\nexport type Saved = { kind: 'ok'; original: StatusLine | null } | { kind: 'missing' } | { kind: 'unreadable'; why: string };\n\nexport function readSaved(configDir?: string): Saved {\n let text: string;\n try {\n text = fs.readFileSync(savedPath(configDir), 'utf-8');\n } catch (e) {\n const code = (e as NodeJS.ErrnoException).code;\n return code === 'ENOENT' ? { kind: 'missing' } : { kind: 'unreadable', why: code ?? String(e) };\n }\n let v: unknown;\n try {\n v = JSON.parse(text);\n } catch (e) {\n return { kind: 'unreadable', why: e instanceof Error ? e.message : String(e) };\n }\n if (!isRecord(v) || !('original' in v)) return { kind: 'unreadable', why: 'no original in it' };\n if (v.original === null) return { kind: 'ok', original: null };\n return isRecord(v.original) ? { kind: 'ok', original: v.original } : { kind: 'unreadable', why: 'original is not an object' };\n}\n\n/**\n * The user's own status line command, when they had one — the one saved for the account of the Claude that runs it\n * (`configDir`: its `CLAUDE_CONFIG_DIR`). `onDamage` hears why a saved file couldn't be read.\n *\n * An account with nothing saved whose settings run work's line anyway — a settings.json copied from the default\n * account's, or a folder shared with it — falls back to the default account's saved original: that is the line its\n * settings came with, and without it the user's own line would show nowhere on that account.\n */\nexport function originalStatusLine(onDamage?: (why: string) => void, configDir?: string): { command: string } | null {\n let saved = readSaved(configDir);\n if (saved.kind === 'missing' && accountOf(configDir) !== 'default') saved = readSaved();\n if (saved.kind === 'unreadable') onDamage?.(saved.why);\n const o = saved.kind === 'ok' ? saved.original : null;\n return o && typeof o.command === 'string' && o.command ? { command: o.command } : null;\n}\n\n/** A settings file's statusLine entry; null when it has none or can't be read. */\nfunction statusLineIn(file: string): StatusLine | null {\n try {\n const v: unknown = JSON.parse(fs.readFileSync(file, 'utf-8'));\n return isRecord(v) && isRecord(v.statusLine) ? v.statusLine : null;\n } catch {\n return null;\n }\n}\n\n/**\n * The status line the Claude running work's hook would show without it. work gives its Claudes its own line with\n * `--settings` (session-settings.ts), which takes the place of the user's; the user's is what Claude Code would read\n * otherwise — the project's local settings, the project's, then the account's own (`configDir`: its\n * `CLAUDE_CONFIG_DIR`, else ~/.claude). One that is work's (an older work web wrapped the user's settings and it is\n * not yet given back) is the saved original's (originalStatusLine). `onDamage` hears why a saved file couldn't be read.\n */\nexport function userStatusLine(\n o: { configDir?: string; projectDir?: string; home?: string; onDamage?: (why: string) => void } = {},\n): { command: string } | null {\n const files = [\n ...(o.projectDir\n ? [path.join(o.projectDir, '.claude', 'settings.local.json'), path.join(o.projectDir, '.claude', 'settings.json')]\n : []),\n path.join(o.configDir || path.join(o.home ?? os.homedir(), '.claude'), 'settings.json'),\n ];\n for (const file of files) {\n const line = statusLineIn(file);\n if (!line) continue;\n if (isOurs(line)) return originalStatusLine(o.onDamage, o.configDir);\n return typeof line.command === 'string' && line.command ? { command: line.command } : null;\n }\n return null;\n}\n\n/** The shell Claude Code runs a status line in: sh on POSIX, Git Bash on Windows. */\nexport function shellFor(\n platform: NodeJS.Platform = process.platform,\n env: NodeJS.ProcessEnv = process.env,\n exists: (p: string) => boolean = fs.existsSync,\n): { file: string; args: (cmd: string) => string[] } {\n const args = (cmd: string) => ['-c', cmd];\n if (platform !== 'win32') return { file: '/bin/sh', args };\n const configured = env.CLAUDE_CODE_GIT_BASH_PATH;\n if (configured && exists(configured)) return { file: configured, args };\n for (const dir of (env.PATH ?? env.Path ?? '').split(';').filter(Boolean)) {\n if (!exists(path.win32.join(dir, 'git.exe'))) continue;\n for (const bash of [path.win32.join(dir, '..', 'bin', 'bash.exe'), path.win32.join(dir, 'bash.exe')])\n if (exists(bash)) return { file: bash, args };\n }\n const standard = 'C:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe';\n return { file: exists(standard) ? standard : 'bash', args };\n}\n\nconst OUTPUT_CAP = 64 * 1024;\n/** After the command exits, how long what it printed may still be on its way: its stdout can stay open past its exit. */\nconst EXIT_GRACE_MS = 100;\n\n/** Stop the command and whatever it started: its process group on POSIX (a `cmd &` holding stdout keeps no hook alive), taskkill /T on Windows. */\nfunction killCommand(pid: number): void {\n if (detachHere()) {\n try {\n process.kill(-pid, 'SIGKILL');\n return;\n } catch {\n /* no group (it wasn't detached, or has gone): the process alone */\n }\n }\n killTree(pid);\n}\n\n/** Run the user's own status line with Claude's JSON on stdin. Its output, or '' when it fails or takes too long: never rejects. */\nexport function runStatusLineCommand(cmd: string, stdin: string, o: { timeoutMs?: number; cwd?: string } = {}): Promise<string> {\n return new Promise((resolve) => {\n let done = false;\n const out: Buffer[] = [];\n let outBytes = 0;\n let timer: NodeJS.Timeout | undefined;\n let grace: NodeJS.Timeout | undefined;\n let child: ReturnType<typeof spawn> | undefined;\n const finish = (ok: boolean) => {\n if (done) return;\n done = true;\n clearTimeout(timer);\n clearTimeout(grace);\n // Let go of it: a pipe still held by something it started would keep this process (Claude's hook) alive past its cap.\n child?.stdout?.destroy();\n child?.stdin?.destroy();\n child?.unref();\n resolve(ok ? Buffer.concat(out).subarray(0, OUTPUT_CAP).toString('utf-8') : '');\n };\n try {\n const sh = shellFor();\n child = spawn(sh.file, sh.args(cmd), {\n stdio: ['pipe', 'pipe', 'ignore'],\n windowsHide: true,\n cwd: o.cwd,\n // Its own process group on POSIX, so a timeout stops what it started too.\n detached: detachHere(),\n // Marked, so a command that runs work's hook again doesn't run itself (runStatusLineHook).\n env: { ...process.env, [NESTED_ENV]: '1' },\n });\n const c = child;\n timer = setTimeout(() => {\n if (c.pid) killCommand(c.pid);\n finish(false);\n }, o.timeoutMs ?? 5000);\n c.on('error', () => finish(false));\n c.stdout?.on('data', (d: Buffer) => {\n if (outBytes >= OUTPUT_CAP) return;\n out.push(d);\n outBytes += d.length;\n });\n // 'close' waits for stdout to end, and something the command left running (`cmd &`) holds it: the line would wait\n // for the cap, and be lost. Its exit decides; what it printed is read until stdout ends, or a moment more.\n c.on('exit', (code) => {\n if (code !== 0) finish(false);\n else grace ??= setTimeout(() => finish(true), EXIT_GRACE_MS);\n });\n c.on('close', (code) => finish(code === 0));\n c.stdin?.on('error', () => {\n /* it exited before reading: its exit code decides */\n });\n c.stdin?.end(stdin);\n } catch {\n finish(false);\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,O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aAAa;AAAA,QACb,KAAK,EAAE;AAAA;AAAA,QAEP,UAAU,WAAW;AAAA;AAAA,QAErB,KAAK,EAAE,GAAG,QAAQ,KAAK,CAAC,UAAU,GAAG,IAAI;AAAA,MAC3C,CAAC;AACD,YAAM,IAAI;AACV,cAAQ,WAAW,MAAM;AACvB,YAAI,EAAE,IAAK,aAAY,EAAE,GAAG;AAC5B,eAAO,KAAK;AAAA,MACd,GAAG,EAAE,aAAa,GAAI;AACtB,QAAE,GAAG,SAAS,MAAM,OAAO,KAAK,CAAC;AACjC,QAAE,QAAQ,GAAG,QAAQ,CAAC,MAAc;AAClC,YAAI,YAAY,WAAY;AAC5B,YAAI,KAAK,CAAC;AACV,oBAAY,EAAE;AAAA,MAChB,CAAC;AAGD,QAAE,GAAG,QAAQ,CAAC,SAAS;AACrB,YAAI,SAAS,EAAG,QAAO,KAAK;AAAA,YACvB,WAAU,WAAW,MAAM,OAAO,IAAI,GAAG,aAAa;AAAA,MAC7D,CAAC;AACD,QAAE,GAAG,SAAS,CAAC,SAAS,OAAO,SAAS,CAAC,CAAC;AAC1C,QAAE,OAAO,GAAG,SAAS,MAAM;AAAA,MAE3B,CAAC;AACD,QAAE,OAAO,IAAI,KAAK;AAAA,IACpB,QAAQ;AACN,aAAO,KAAK;AAAA,IACd;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  shownState
4
- } from "./chunk-DZACN5FM.js";
4
+ } from "./chunk-QDNNFL56.js";
5
5
  import {
6
6
  recordCheckedOutBranches
7
- } from "./chunk-3A3HSUBD.js";
7
+ } from "./chunk-3JLMVWRO.js";
8
8
  import {
9
9
  defaultRunner
10
10
  } from "./chunk-XBWS77S2.js";
@@ -14,14 +14,14 @@ import {
14
14
  readArchive,
15
15
  sessionAliases,
16
16
  setSessionBase
17
- } from "./chunk-VS6DDWIX.js";
17
+ } from "./chunk-A72CRTFG.js";
18
18
  import {
19
19
  sessionIdFor
20
20
  } from "./chunk-ALBTIOP3.js";
21
21
  import {
22
22
  bestEffort,
23
23
  logSwallowed
24
- } from "./chunk-OHMLCXRW.js";
24
+ } from "./chunk-FJYM2JQN.js";
25
25
  import {
26
26
  loadConfig
27
27
  } from "./chunk-MWIPHUAE.js";
@@ -428,4 +428,4 @@ export {
428
428
  moveOntoMain,
429
429
  updateSession
430
430
  };
431
- //# sourceMappingURL=chunk-FDTBJW7M.js.map
431
+ //# sourceMappingURL=chunk-IBTA4DSY.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-LM2T5OR3.js";
15
15
  import {
16
16
  recordCheckedOutBranches
17
- } from "./chunk-3A3HSUBD.js";
17
+ } from "./chunk-3JLMVWRO.js";
18
18
  import {
19
19
  isBuildOutputPath
20
20
  } from "./chunk-T5GJVUSL.js";
@@ -35,14 +35,14 @@ import {
35
35
  upsertSession,
36
36
  upsertSessionWithPort,
37
37
  writeArchiveRecord
38
- } from "./chunk-VS6DDWIX.js";
38
+ } from "./chunk-A72CRTFG.js";
39
39
  import {
40
40
  sessionIdFor
41
41
  } from "./chunk-ALBTIOP3.js";
42
42
  import {
43
43
  agentFor,
44
44
  bestEffort
45
- } from "./chunk-OHMLCXRW.js";
45
+ } from "./chunk-FJYM2JQN.js";
46
46
  import {
47
47
  resolveProjectTarget
48
48
  } from "./chunk-IPHADNF5.js";
@@ -1102,4 +1102,4 @@ export {
1102
1102
  teardownWorktree,
1103
1103
  openBaseCheckout
1104
1104
  };
1105
- //# sourceMappingURL=chunk-GUHRMQNP.js.map
1105
+ //# sourceMappingURL=chunk-ITNSUPVJ.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  isFolderSession,
4
4
  sessionRepos
5
- } from "./chunk-VS6DDWIX.js";
5
+ } from "./chunk-A72CRTFG.js";
6
6
 
7
7
  // src/core/worktree/add-repo-rules.ts
8
8
  import path from "path";
@@ -36,4 +36,4 @@ export {
36
36
  addRepoRefusal,
37
37
  addedRepoNote
38
38
  };
39
- //# sourceMappingURL=chunk-E2PKPMWC.js.map
39
+ //# sourceMappingURL=chunk-IVH5T4U2.js.map
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-GNIYYXQX.js";
9
9
  import {
10
10
  recordedRepos
11
- } from "./chunk-VS6DDWIX.js";
11
+ } from "./chunk-A72CRTFG.js";
12
12
  import {
13
13
  getConfigPath
14
14
  } from "./chunk-MWIPHUAE.js";
@@ -180,4 +180,4 @@ export {
180
180
  deleteGroup,
181
181
  setReviewMode
182
182
  };
183
- //# sourceMappingURL=chunk-3HWQYW6S.js.map
183
+ //# sourceMappingURL=chunk-J5B2Z7SO.js.map
@@ -16,7 +16,7 @@ var REFRESH_MS = 6e4;
16
16
  var usageDir = () => path.join(getConfigDir(), "usage");
17
17
  var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
18
18
  function isWindow(v) {
19
- return isRecord(v) && typeof v.id === "string" && typeof v.label === "string" && typeof v.usedPercent === "number" && (v.resetsAt === null || typeof v.resetsAt === "string") && (v.reset === void 0 || v.reset === true);
19
+ return isRecord(v) && typeof v.id === "string" && typeof v.label === "string" && typeof v.usedPercent === "number" && (v.resetsAt === null || typeof v.resetsAt === "string") && (v.reset === void 0 || v.reset === true) && (v.asked === void 0 || v.asked === true);
20
20
  }
21
21
  function parseStored(text) {
22
22
  let v;
@@ -35,7 +35,7 @@ function keepHigher(stored, fresh) {
35
35
  return was && was.usedPercent > w.usedPercent ? { ...w, usedPercent: was.usedPercent } : w;
36
36
  });
37
37
  }
38
- function recordReading(agent, account, windows, now = Date.now()) {
38
+ function recordReading(agent, account, windows, now = Date.now(), opts = {}) {
39
39
  if (windows.length === 0) return false;
40
40
  try {
41
41
  const file = fileFor(agent, account);
@@ -44,7 +44,8 @@ function recordReading(agent, account, windows, now = Date.now()) {
44
44
  stored = parseStored(fs.readFileSync(file, "utf-8"));
45
45
  } catch {
46
46
  }
47
- const kept = stored ? keepHigher(stored.windows, windows) : windows;
47
+ const carried = stored && !opts.full ? stored.windows.filter((w) => w.asked && !windows.some((f) => f.id === w.id)) : [];
48
+ const kept = [...stored ? keepHigher(stored.windows, windows) : windows, ...carried];
48
49
  if (stored && JSON.stringify(stored.windows) === JSON.stringify(kept) && now - Date.parse(stored.at) < REFRESH_MS) return false;
49
50
  fs.mkdirSync(usageDir(), { recursive: true });
50
51
  atomicWriteFile(file, JSON.stringify({ at: new Date(now).toISOString(), windows: kept }));
@@ -80,4 +81,4 @@ export {
80
81
  recordReading,
81
82
  readReadings
82
83
  };
83
- //# sourceMappingURL=chunk-DOYJR2HF.js.map
84
+ //# sourceMappingURL=chunk-JUGF3YE7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/usage/usage-store.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { getConfigDir } from '../platform/config-dir.js';\nimport { atomicWriteFile } from '../platform/fs-safe.js';\nimport { debugLog } from '../platform/logger.js';\nimport type { UsageAccount, UsageWindow } from './usage.js';\n\n// Readings the agents' hooks leave behind, one file per agent and account. The status-line hook calls recordReading on every refresh, so it stays cheap.\n\n/** A reading that hasn't changed is rewritten only when its time is this old: the age stays honest without a write per refresh. */\nconst REFRESH_MS = 60_000;\n\ntype Stored = Omit<UsageAccount, 'account'>;\n\nexport const usageDir = () => path.join(getConfigDir(), 'usage');\n\nconst isRecord = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);\n\nfunction isWindow(v: unknown): v is UsageWindow {\n return (\n isRecord(v) &&\n typeof v.id === 'string' &&\n typeof v.label === 'string' &&\n typeof v.usedPercent === 'number' &&\n (v.resetsAt === null || typeof v.resetsAt === 'string') &&\n (v.reset === undefined || v.reset === true) &&\n (v.asked === undefined || v.asked === true)\n );\n}\n\nfunction parseStored(text: string): Stored | null {\n let v: unknown;\n try {\n v = JSON.parse(text);\n } catch {\n return null;\n }\n if (!isRecord(v) || typeof v.at !== 'string' || !Array.isArray(v.windows) || !v.windows.every(isWindow)) return null;\n return { at: v.at, windows: v.windows };\n}\n\nconst fileFor = (agent: string, account: string) => path.join(usageDir(), `${agent}-${account}.json`);\n\n/**\n * Within one window (same id, same known reset) usage only grows: an idle agent's redraw can carry an older, lower figure\n * than another session just reported, and it mustn't win.\n */\nfunction keepHigher(stored: UsageWindow[], fresh: UsageWindow[]): UsageWindow[] {\n return fresh.map((w) => {\n const was = w.resetsAt === null ? undefined : stored.find((s) => s.id === w.id && s.resetsAt === w.resetsAt);\n return was && was.usedPercent > w.usedPercent ? { ...w, usedPercent: was.usedPercent } : w;\n });\n}\n\n/**\n * Keep a reading. Writes only when it changed (or the stored time is over a minute old); returns whether it wrote. Never throws.\n * `full`: the reading is the agent's whole answer when asked (every window it has, `asked` ones included), so it replaces\n * the stored one; otherwise (a status line) the stored `asked` windows it doesn't carry are kept.\n */\nexport function recordReading(\n agent: string,\n account: string,\n windows: UsageWindow[],\n now = Date.now(),\n opts: { full?: boolean } = {},\n): boolean {\n if (windows.length === 0) return false;\n try {\n const file = fileFor(agent, account);\n let stored: Stored | null = null;\n try {\n stored = parseStored(fs.readFileSync(file, 'utf-8'));\n } catch {\n /* nothing stored yet */\n }\n const carried = stored && !opts.full ? stored.windows.filter((w) => w.asked && !windows.some((f) => f.id === w.id)) : [];\n const kept = [...(stored ? keepHigher(stored.windows, windows) : windows), ...carried];\n if (stored && JSON.stringify(stored.windows) === JSON.stringify(kept) && now - Date.parse(stored.at) < REFRESH_MS) return false;\n fs.mkdirSync(usageDir(), { recursive: true });\n atomicWriteFile(file, JSON.stringify({ at: new Date(now).toISOString(), windows: kept }));\n return true;\n } catch (e) {\n // Only the log: this runs in an agent's hook (Claude's status line), which shows nothing of ours.\n const err = e as NodeJS.ErrnoException;\n debugLog('WARN', `[usage] reading not kept: ${err.code ? `${err.code} ` : ''}${err.message ?? String(e)}`);\n return false;\n }\n}\n\n/** Every account's last reading for an agent, by account name. A file that isn't a reading is skipped. */\nexport function readReadings(agent: string): UsageAccount[] {\n let names: string[];\n try {\n names = fs.readdirSync(usageDir());\n } catch {\n return [];\n }\n const prefix = `${agent}-`;\n const out: UsageAccount[] = [];\n for (const name of names) {\n if (!name.startsWith(prefix) || !name.endsWith('.json')) continue;\n try {\n const stored = parseStored(fs.readFileSync(path.join(usageDir(), name), 'utf-8'));\n if (stored) out.push({ account: name.slice(prefix.length, -'.json'.length), ...stored });\n } catch {\n /* unreadable: skipped */\n }\n }\n return out.sort((a, b) => a.account.localeCompare(b.account));\n}\n"],"mappings":";;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AASjB,IAAM,aAAa;AAIZ,IAAM,WAAW,MAAM,KAAK,KAAK,aAAa,GAAG,OAAO;AAE/D,IAAM,WAAW,CAAC,MAA6C,OAAO,MAAM,YAAY,MAAM,QAAQ,CAAC,MAAM,QAAQ,CAAC;AAEtH,SAAS,SAAS,GAA8B;AAC9C,SACE,SAAS,CAAC,KACV,OAAO,EAAE,OAAO,YAChB,OAAO,EAAE,UAAU,YACnB,OAAO,EAAE,gBAAgB,aACxB,EAAE,aAAa,QAAQ,OAAO,EAAE,aAAa,cAC7C,EAAE,UAAU,UAAa,EAAE,UAAU,UACrC,EAAE,UAAU,UAAa,EAAE,UAAU;AAE1C;AAEA,SAAS,YAAY,MAA6B;AAChD,MAAI;AACJ,MAAI;AACF,QAAI,KAAK,MAAM,IAAI;AAAA,EACrB,QAAQ;AACN,WAAO;AAAA,EACT;AACA,MAAI,CAAC,SAAS,CAAC,KAAK,OAAO,EAAE,OAAO,YAAY,CAAC,MAAM,QAAQ,EAAE,OAAO,KAAK,CAAC,EAAE,QAAQ,MAAM,QAAQ,EAAG,QAAO;AAChH,SAAO,EAAE,IAAI,EAAE,IAAI,SAAS,EAAE,QAAQ;AACxC;AAEA,IAAM,UAAU,CAAC,OAAe,YAAoB,KAAK,KAAK,SAAS,GAAG,GAAG,KAAK,IAAI,OAAO,OAAO;AAMpG,SAAS,WAAW,QAAuB,OAAqC;AAC9E,SAAO,MAA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O,SAAS,aAAa,OAA+B;AAC1D,MAAI;AACJ,MAAI;AACF,YAAQ,GAAG,YAAY,SAAS,CAAC;AAAA,EACnC,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACA,QAAM,SAAS,GAAG,KAAK;AACvB,QAAM,MAAsB,CAAC;AAC7B,aAAW,QAAQ,OAAO;AACxB,QAAI,CAAC,KAAK,WAAW,MAAM,KAAK,CAAC,KAAK,SAAS,OAAO,EAAG;AACzD,QAAI;AACF,YAAM,SAAS,YAAY,GAAG,aAAa,KAAK,KAAK,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC;AAChF,UAAI,OAAQ,KAAI,KAAK,EAAE,SAAS,KAAK,MAAM,OAAO,QAAQ,CAAC,QAAQ,MAAM,GAAG,GAAG,OAAO,CAAC;AAAA,IACzF,QAAQ;AAAA,IAER;AAAA,EACF;AACA,SAAO,IAAI,KAAK,CAAC,GAAG,MAAM,EAAE,QAAQ,cAAc,EAAE,OAAO,CAAC;AAC9D;","names":[]}
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/core/agents/claude/env.ts
4
+ var PARENT_SESSION_VARS = [
5
+ "CLAUDECODE",
6
+ "CLAUDE_CODE_CHILD_SESSION",
7
+ "CLAUDE_CODE_SESSION_ID",
8
+ "CLAUDE_CODE_SESSION_ATTENDED",
9
+ "CLAUDE_CODE_BRIDGE_SESSION_ID",
10
+ "CLAUDE_CODE_MESSAGING_SOCKET",
11
+ "CLAUDE_CODE_MESSAGING_TOKEN",
12
+ "CLAUDE_CODE_ENTRYPOINT",
13
+ "CLAUDE_CODE_EXECPATH",
14
+ "CLAUDE_PID"
15
+ ];
16
+ function withoutParentSession(env) {
17
+ const drop = new Set(PARENT_SESSION_VARS);
18
+ return Object.fromEntries(Object.entries(env).filter(([k]) => !drop.has(k.toUpperCase())));
19
+ }
20
+
21
+ export {
22
+ withoutParentSession
23
+ };
24
+ //# sourceMappingURL=chunk-KGHWHAVF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/agents/claude/env.ts"],"sourcesContent":["/**\n * Claude Code marks the processes it runs with its own session: whether\n * it's a child session, its session id, pid, messaging socket and token.\n * A Claude that `work` starts is a session of its own, but it inherits\n * these whenever `work` itself was started from inside a Claude — `work\n * tree` typed in Claude's shell, or the PTY host restarted by one. Then it\n * believes it's a child session and doesn't save its transcript (\"Transcript\n * saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker\"), and carries\n * another session's messaging token.\n *\n * Only the session's identity goes; user settings (CLAUDE_CONFIG_DIR,\n * CLAUDE_CODE_USE_BEDROCK, API keys, …) are kept.\n */\nexport const PARENT_SESSION_VARS = [\n 'CLAUDECODE',\n 'CLAUDE_CODE_CHILD_SESSION',\n 'CLAUDE_CODE_SESSION_ID',\n 'CLAUDE_CODE_SESSION_ATTENDED',\n 'CLAUDE_CODE_BRIDGE_SESSION_ID',\n 'CLAUDE_CODE_MESSAGING_SOCKET',\n 'CLAUDE_CODE_MESSAGING_TOKEN',\n 'CLAUDE_CODE_ENTRYPOINT',\n 'CLAUDE_CODE_EXECPATH',\n 'CLAUDE_PID',\n] as const;\n\n/** `env` without the parent Claude session's markers (case-insensitive, for Windows). */\nexport function withoutParentSession<T extends Record<string, string | undefined>>(env: T): T {\n const drop = new Set<string>(PARENT_SESSION_VARS);\n return Object.fromEntries(Object.entries(env).filter(([k]) => !drop.has(k.toUpperCase()))) as T;\n}\n"],"mappings":";;;AAaO,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,SAAS,qBAAmE,KAAW;AAC5F,QAAM,OAAO,IAAI,IAAY,mBAAmB;AAChD,SAAO,OAAO,YAAY,OAAO,QAAQ,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;AAC3F;","names":[]}
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  defaultCleanupDeps
4
- } from "./chunk-OUPQW7WQ.js";
4
+ } from "./chunk-QTENJUM3.js";
5
+ import {
6
+ agentsBySession
7
+ } from "./chunk-BGS5M542.js";
5
8
  import {
6
9
  normPath
7
10
  } from "./chunk-AKMPF72Y.js";
8
- import {
9
- agentsBySession
10
- } from "./chunk-TMRRQ6TT.js";
11
11
  import {
12
12
  hostForRepo
13
- } from "./chunk-SNQVTLBX.js";
13
+ } from "./chunk-WKHP3AXS.js";
14
14
  import {
15
15
  buildFoldersOf,
16
16
  clearBuildFolders
@@ -21,13 +21,13 @@ import {
21
21
  import {
22
22
  loadHistory,
23
23
  sessionAliases
24
- } from "./chunk-VS6DDWIX.js";
24
+ } from "./chunk-A72CRTFG.js";
25
25
  import {
26
26
  sessionIdFor
27
27
  } from "./chunk-ALBTIOP3.js";
28
28
  import {
29
29
  liveAgents
30
- } from "./chunk-OHMLCXRW.js";
30
+ } from "./chunk-FJYM2JQN.js";
31
31
  import {
32
32
  loadConfig
33
33
  } from "./chunk-MWIPHUAE.js";
@@ -253,4 +253,4 @@ export {
253
253
  deleteMergedBranches,
254
254
  defaultBranchTidyDeps
255
255
  };
256
- //# sourceMappingURL=chunk-UM4R6YIC.js.map
256
+ //# sourceMappingURL=chunk-KK5RCNDL.js.map
@@ -1,10 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- createRestarter
4
- } from "./chunk-TC3H7I6O.js";
5
2
  import {
6
3
  agentsBySession
7
- } from "./chunk-TMRRQ6TT.js";
4
+ } from "./chunk-BGS5M542.js";
8
5
  import {
9
6
  accountSwitchRefusal,
10
7
  haltPty,
@@ -12,20 +9,23 @@ import {
12
9
  ptyPid,
13
10
  ptyPids,
14
11
  resumePtyOnAccount
15
- } from "./chunk-4GUB7MQG.js";
12
+ } from "./chunk-S7OCHVVD.js";
16
13
  import {
17
14
  findSession
18
- } from "./chunk-QAY2Q2JC.js";
15
+ } from "./chunk-374HKMSE.js";
16
+ import {
17
+ createRestarter
18
+ } from "./chunk-TC3H7I6O.js";
19
19
  import {
20
20
  isArchiving,
21
21
  loadHistory,
22
22
  setSessionAccount
23
- } from "./chunk-VS6DDWIX.js";
23
+ } from "./chunk-A72CRTFG.js";
24
24
  import {
25
25
  AccountAdminError,
26
26
  agentOf,
27
27
  liveAgents
28
- } from "./chunk-OHMLCXRW.js";
28
+ } from "./chunk-FJYM2JQN.js";
29
29
 
30
30
  // src/core/sessions/account-switch-rules.ts
31
31
  function switchRefusal(to, f) {
@@ -336,4 +336,4 @@ export {
336
336
  createAccountLogins,
337
337
  accountSkillsNote
338
338
  };
339
- //# sourceMappingURL=chunk-UBGKHTXX.js.map
339
+ //# sourceMappingURL=chunk-LBJHFVH3.js.map
@@ -47,4 +47,4 @@ export {
47
47
  ageText,
48
48
  usageText
49
49
  };
50
- //# sourceMappingURL=chunk-UVZITL47.js.map
50
+ //# sourceMappingURL=chunk-LK7HJGUC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/usage/usage.ts"],"sourcesContent":["// What an agent's plan limits look like (5-hour, weekly, spend) and how work shows them. Pure and agent-neutral: the SPA and the demo import it (each agent parses its own, e.g. agents/claude/rate-limits.ts).\n\nexport interface UsageWindow {\n id: string;\n label: string;\n usedPercent: number;\n /** ISO time the window resets; null when the agent didn't say. */\n resetsAt: string | null;\n /** Set when the reset time has passed since the reading: the percent is shown as 0. */\n reset?: true;\n /**\n * Only asking the agent gives it (Claude Code's `get_usage`: a model's own weekly window, as Fable's), not its status\n * line: a status-line reading keeps it as last asked rather than dropping it (usage-store.ts).\n */\n asked?: true;\n}\n\n/** One account's last reading of an agent's plan limits (each config folder an agent runs with is an account). */\nexport interface UsageAccount {\n /** The account's name (the agent's own, e.g. a Claude account in config `claudeAccounts`; `default`), or the key a reading was kept under when it names none. */\n account: string;\n /** The account new sessions use (set on the one only). */\n isDefault?: true;\n at: string;\n windows: UsageWindow[];\n}\n\n/** An agent's readings, one per account: what the meter picks from. */\nexport interface AgentUsage {\n agent: string;\n name: string;\n accounts: UsageAccount[];\n}\n\n/** A window whose reset has passed since it was read starts over at 0. */\nexport function agedWindow(w: UsageWindow, now: number): UsageWindow {\n if (w.resetsAt === null) return w;\n const at = Date.parse(w.resetsAt);\n if (!Number.isFinite(at) || at > now) return w;\n return { ...w, usedPercent: 0, reset: true };\n}\n\n/**\n * The window closest to its limit, for the top bar: of each agent's account in use — the one new sessions start on\n * (`isDefault`) — and of every account while none is marked (reported: after moving every session to a second\n * account and making it the default, the bar still showed the old account's 98%). The panel lists them all. Ties go\n * to the one resetting later.\n */\nexport function meterWindow(\n agents: AgentUsage[],\n now: number,\n): { agent: string; name: string; account: string; window: UsageWindow } | null {\n let best: { agent: string; name: string; account: string; window: UsageWindow } | null = null;\n const resetMs = (w: UsageWindow) => (w.resetsAt === null ? -Infinity : Date.parse(w.resetsAt) || -Infinity);\n for (const a of agents) {\n const inUse = a.accounts.filter((x) => x.isDefault);\n for (const acc of inUse.length ? inUse : a.accounts) {\n for (const raw of acc.windows) {\n const window = agedWindow(raw, now);\n if (\n !best ||\n window.usedPercent > best.window.usedPercent ||\n (window.usedPercent === best.window.usedPercent && resetMs(window) > resetMs(best.window))\n ) {\n best = { agent: a.agent, name: a.name, account: acc.account, window };\n }\n }\n }\n }\n return best;\n}\n\n/** 273, 1.7k, 48k, 1.6M, 48M, 1.2B: the size of a token count, short enough for a panel row. */\nexport function formatTokens(n: number): string {\n const one = (v: number) => String(Math.round(v * 10) / 10);\n const x = Math.max(0, Math.round(n));\n if (x < 1e3) return String(x);\n if (x < 1e4) return `${one(x / 1e3)}k`;\n if (Math.round(x / 1e3) < 1e3) return `${Math.round(x / 1e3)}k`;\n if (x < 1e7) return `${one(x / 1e6)}M`;\n if (Math.round(x / 1e6) < 1e3) return `${Math.round(x / 1e6)}M`;\n return `${one(x / 1e9)}B`;\n}\n\nconst WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\nconst clock = (d: Date) => `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`;\n\n/** \"resets 15:10\" within a day, \"resets Mon 09:00\" after that (local time); '' when there is no valid time. */\nexport function resetPhrase(resetsAt: string | null, now: number): string {\n const at = resetsAt ? Date.parse(resetsAt) : NaN;\n if (!Number.isFinite(at)) return '';\n const d = new Date(at);\n return at - now < 24 * 3_600_000 ? `resets ${clock(d)}` : `resets ${WEEKDAYS[d.getDay()]} ${clock(d)}`;\n}\n\n/** How long ago, in a few words (\"3 min ago\"). */\nexport function ageText(ms: number): string {\n const min = Math.round(ms / 60_000);\n if (min < 1) return 'just now';\n if (min < 60) return `${min} min ago`;\n const h = Math.round(min / 60);\n if (h < 48) return `${h} h ago`;\n return `${Math.round(h / 24)} days ago`;\n}\n\n/** An account's last reading in a line (\"5-hour limit 42% · Weekly limit 18% · read 3 min ago\"); a window past its reset reads 0. */\nexport function usageText(reading: Pick<UsageAccount, 'at' | 'windows'> | null | undefined, now: number): string {\n if (!reading || reading.windows.length === 0) return 'no usage reading yet';\n const windows = reading.windows.map((w) => `${w.label} ${Math.round(agedWindow(w, now).usedPercent)}%`);\n const at = Date.parse(reading.at);\n return [...windows, Number.isFinite(at) ? `read ${ageText(now - at)}` : ''].filter(Boolean).join(' · ');\n}\n"],"mappings":";;;AAmCO,SAAS,WAAW,GAAgB,KAA0B;AACnE,MAAI,EAAE,aAAa,KAAM,QAAO;AAChC,QAAM,KAAK,KAAK,MAAM,EAAE,QAAQ;AAChC,MAAI,CAAC,OAAO,SAAS,EAAE,KAAK,KAAK,IAAK,QAAO;AAC7C,SAAO,EAAE,GAAG,GAAG,aAAa,GAAG,OAAO,KAAK;AAC7C;AAiCO,SAAS,aAAa,GAAmB;AAC9C,QAAM,MAAM,CAAC,MAAc,OAAO,KAAK,MAAM,IAAI,EAAE,IAAI,EAAE;AACzD,QAAM,IAAI,KAAK,IAA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GO,SAAS,UAAU,SAAkE,KAAqB;AAC/G,MAAI,CAAC,WAAW,QAAQ,QAAQ,WAAW,EAAG,QAAO;AACrD,QAAM,UAAU,QAAQ,QAAQ,IAAI,CAAC,MAAM,GAAG,EAAE,KAAK,IAAI,KAAK,MAAM,WAAW,GAAG,GAAG,EAAE,WAAW,CAAC,GAAG;AACtG,QAAM,KAAK,KAAK,MAAM,QAAQ,EAAE;AAChC,SAAO,CAAC,GAAG,SAAS,OAAO,SAAS,EAAE,IAAI,QAAQ,QAAQ,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,QAAK;AACxG;","names":[]}
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  sessionWorkTime
4
- } from "./chunk-INQVYKB4.js";
4
+ } from "./chunk-F5RPC3LT.js";
5
5
  import {
6
6
  runInternal
7
- } from "./chunk-2AENPORN.js";
7
+ } from "./chunk-BGPCIL4U.js";
8
8
  import {
9
9
  DEFAULT_CATCH_UP_DAYS,
10
10
  MAX_RANGE_DAYS,
@@ -22,11 +22,11 @@ import {
22
22
  } from "./chunk-56D4WJ2S.js";
23
23
  import {
24
24
  knownHosts
25
- } from "./chunk-SNQVTLBX.js";
25
+ } from "./chunk-WKHP3AXS.js";
26
26
  import {
27
27
  loadHistory,
28
28
  runGitAsync
29
- } from "./chunk-VS6DDWIX.js";
29
+ } from "./chunk-A72CRTFG.js";
30
30
  import {
31
31
  sessionIdFor
32
32
  } from "./chunk-ALBTIOP3.js";
@@ -744,4 +744,4 @@ export {
744
744
  finishDeviceLogin,
745
745
  defaultTimeDeps
746
746
  };
747
- //# sourceMappingURL=chunk-V2TTONXR.js.map
747
+ //# sourceMappingURL=chunk-LVNPLXUO.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  sessionStatusView
4
- } from "./chunk-DZACN5FM.js";
4
+ } from "./chunk-QDNNFL56.js";
5
5
  import {
6
6
  buildDigest,
7
7
  loadHistory,
@@ -11,7 +11,7 @@ import {
11
11
  readStatus,
12
12
  scopeHashForPaths,
13
13
  workSteps
14
- } from "./chunk-VS6DDWIX.js";
14
+ } from "./chunk-A72CRTFG.js";
15
15
  import {
16
16
  sessionIdFor
17
17
  } from "./chunk-ALBTIOP3.js";
@@ -19,7 +19,7 @@ import {
19
19
  agentOf,
20
20
  lineTimeOf,
21
21
  readJsonlSince
22
- } from "./chunk-OHMLCXRW.js";
22
+ } from "./chunk-FJYM2JQN.js";
23
23
 
24
24
  // src/core/conversations/digest-source.ts
25
25
  function digestWindow(sinceMs, now = Date.now()) {
@@ -99,4 +99,4 @@ function createDigestSource(deps = {}) {
99
99
  export {
100
100
  createDigestSource
101
101
  };
102
- //# sourceMappingURL=chunk-HX7B4PI2.js.map
102
+ //# sourceMappingURL=chunk-N2IDEZGB.js.map
@@ -3,7 +3,7 @@ import {
3
3
  computeChanges,
4
4
  findOverlaps,
5
5
  wantsDiffStat
6
- } from "./chunk-ZFFWFVER.js";
6
+ } from "./chunk-AT4EPCOV.js";
7
7
  import {
8
8
  pool
9
9
  } from "./chunk-AKMPF72Y.js";
@@ -34,4 +34,4 @@ async function scanChanges(sessions, opts = {}) {
34
34
  export {
35
35
  scanChanges
36
36
  };
37
- //# sourceMappingURL=chunk-WK5ZIO6B.js.map
37
+ //# sourceMappingURL=chunk-PJ7ZKAZF.js.map
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CONTEXT_WARN
4
- } from "./chunk-DAVDKNRH.js";
4
+ } from "./chunk-GUEJVX2X.js";
5
5
  import {
6
6
  MAX_THREAD_BODY,
7
7
  isThreadCode
8
8
  } from "./chunk-FGPXMAYU.js";
9
9
  import {
10
10
  commandsFor
11
- } from "./chunk-VS6DDWIX.js";
11
+ } from "./chunk-A72CRTFG.js";
12
12
  import {
13
13
  json,
14
14
  withDb
@@ -184,4 +184,4 @@ export {
184
184
  isSessionCi,
185
185
  createCiStore
186
186
  };
187
- //# sourceMappingURL=chunk-T3HVNKHI.js.map
187
+ //# sourceMappingURL=chunk-PYHYZGY4.js.map