@moberg_hr/work-tree 2.1.0 → 2.2.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 (186) hide show
  1. package/README.md +232 -378
  2. package/dist/{answer-EGNJ2KYK.js → answer-OF2QNF4A.js} +6 -6
  3. package/dist/{attach-64ILZMTD.js → attach-PAFAZ2EH.js} +9 -9
  4. package/dist/bin.js +2 -2
  5. package/dist/{block-H74FYSLK.js → block-3LEG4LKJ.js} +6 -6
  6. package/dist/{broadcast-WRHZWOQN.js → broadcast-ZDIL7UBP.js} +3 -3
  7. package/dist/{catchup-7QBOC5JJ.js → catchup-ZZ5HZJIT.js} +8 -8
  8. package/dist/{chunk-E35NZVPX.js → chunk-2GX3IOSV.js} +15 -2
  9. package/dist/chunk-2GX3IOSV.js.map +1 -0
  10. package/dist/{chunk-A3M5WTVC.js → chunk-3GAYLP7W.js} +4 -4
  11. package/dist/{chunk-MXIFBNCV.js → chunk-453EGT2R.js} +11 -7
  12. package/dist/chunk-453EGT2R.js.map +1 -0
  13. package/dist/{chunk-NPVMYGT7.js → chunk-46VAWZZX.js} +2 -2
  14. package/dist/{chunk-3D7MELCW.js → chunk-4CVUV2SE.js} +2 -2
  15. package/dist/{chunk-3NPEMTQT.js → chunk-62C3CJ5M.js} +2 -2
  16. package/dist/chunk-6MLU6MNS.js +9 -0
  17. package/dist/{chunk-YEEDWV4H.js → chunk-77SVSNME.js} +4 -4
  18. package/dist/{chunk-723C3D5X.js → chunk-C7OK4XEZ.js} +58 -9
  19. package/dist/chunk-C7OK4XEZ.js.map +1 -0
  20. package/dist/{chunk-ATBH7QW3.js → chunk-DLSAAP3S.js} +2 -2
  21. package/dist/{chunk-SSVVCHJB.js → chunk-EDAOG56H.js} +3 -3
  22. package/dist/{chunk-2LIVAJLK.js → chunk-EXJYPF64.js} +3 -3
  23. package/dist/{chunk-37I2GFXK.js → chunk-INVFNKU7.js} +4 -4
  24. package/dist/{chunk-DXHZWRVE.js → chunk-ISZM5C22.js} +15 -9
  25. package/dist/chunk-ISZM5C22.js.map +1 -0
  26. package/dist/{chunk-S45H7N6X.js → chunk-KSVZVHTI.js} +6 -6
  27. package/dist/{chunk-S45H7N6X.js.map → chunk-KSVZVHTI.js.map} +1 -1
  28. package/dist/{chunk-RQE5UOIW.js → chunk-KTFDSJUD.js} +16 -1
  29. package/dist/chunk-KTFDSJUD.js.map +1 -0
  30. package/dist/{chunk-ONEXQW7Q.js → chunk-KWU35O5S.js} +3 -3
  31. package/dist/{chunk-U4UB4LG6.js → chunk-LBQR7KTC.js} +2 -2
  32. package/dist/{chunk-DXAIGNWF.js → chunk-LGDECE7V.js} +3 -3
  33. package/dist/{chunk-2QZ3RZOY.js → chunk-M4YXBQZN.js} +5 -5
  34. package/dist/{chunk-OOCMPS5L.js → chunk-MRXD2NSO.js} +2 -2
  35. package/dist/{chunk-6OG3W3PY.js → chunk-NBI2INQS.js} +3 -3
  36. package/dist/{chunk-MLTMXVLD.js → chunk-OE34YZFO.js} +2 -2
  37. package/dist/{chunk-POTGMLPV.js → chunk-OIQY4OKO.js} +2 -2
  38. package/dist/{chunk-OND6YRWZ.js → chunk-R4M5DDSN.js} +4 -4
  39. package/dist/{chunk-QXDBVVSC.js → chunk-RK6NHIL6.js} +2 -2
  40. package/dist/chunk-TN2TXRHS.js +249 -0
  41. package/dist/chunk-TN2TXRHS.js.map +1 -0
  42. package/dist/{chunk-4Y35ABCO.js → chunk-TROTIHD5.js} +3 -3
  43. package/dist/{chunk-XILMZRNS.js → chunk-U4YUMSJY.js} +3 -3
  44. package/dist/{chunk-KFSLF65S.js → chunk-U5V5J237.js} +6 -6
  45. package/dist/{chunk-LCSWFGIM.js → chunk-UDOXLAE7.js} +2 -2
  46. package/dist/{chunk-MI3PS2SH.js → chunk-UOSZFFNY.js} +2 -2
  47. package/dist/{chunk-6DWPIK7D.js → chunk-X6VBITXV.js} +4 -4
  48. package/dist/{chunk-PYOSW6X5.js → chunk-XIL4QZFW.js} +3 -3
  49. package/dist/{chunk-HY566NNR.js → chunk-XLP24AH5.js} +45 -45
  50. package/dist/{chunk-QX4LFFNS.js → chunk-ZR2KWY6V.js} +2 -2
  51. package/dist/{chunk-4MXWNDH7.js → chunk-ZVJEWMJN.js} +39 -1
  52. package/dist/chunk-ZVJEWMJN.js.map +1 -0
  53. package/dist/{cleanup-YSVZAGJF.js → cleanup-W5RGZ3Q6.js} +17 -15
  54. package/dist/{cleanup-YSVZAGJF.js.map → cleanup-W5RGZ3Q6.js.map} +1 -1
  55. package/dist/{cli-XT4AS3M2.js → cli-3BI62MNT.js} +3 -3
  56. package/dist/{config-GQRUETZ6.js → config-MR7UZCST.js} +4 -4
  57. package/dist/{diff-L3TWGBA4.js → diff-URDY6YMT.js} +7 -7
  58. package/dist/{digest-R52JZ3AK.js → digest-D4FEZNLU.js} +6 -6
  59. package/dist/{fork-MCPMOGS5.js → fork-7EUVNEB7.js} +15 -15
  60. package/dist/{hook-S64C4G2C.js → hook-6AD3FRKZ.js} +6 -6
  61. package/dist/{hydrate-G5AMKHRD.js → hydrate-ZJZPM6YW.js} +3 -3
  62. package/dist/{init-PCZCSRZI.js → init-LWL4WVSJ.js} +4 -4
  63. package/dist/{install-skills-Z76FLXOU.js → install-skills-TQVWZDUD.js} +3 -3
  64. package/dist/install-skills-bin.js +2 -2
  65. package/dist/{move-MMGOA7MV.js → move-URV7XIDT.js} +7 -7
  66. package/dist/{note-WVKK65IH.js → note-S6EGTEIL.js} +5 -5
  67. package/dist/{overlaps-REVVBZCX.js → overlaps-4T7NLTJH.js} +5 -5
  68. package/dist/{pin-NRSD2ZT7.js → pin-KKQZ3AR6.js} +5 -5
  69. package/dist/{pr-JYOI7LCK.js → pr-5ZILTVDM.js} +5 -5
  70. package/dist/{prune-AGZ24MPD.js → prune-OK23KLHG.js} +16 -14
  71. package/dist/{prune-AGZ24MPD.js.map → prune-OK23KLHG.js.map} +1 -1
  72. package/dist/{pty-host-AZ2ORVV2.js → pty-host-I5OJGWYA.js} +5 -5
  73. package/dist/{read-A7LFAPPZ.js → read-NHK26F22.js} +5 -5
  74. package/dist/{recent-H2LD5JOK.js → recent-DNSOJQVQ.js} +4 -4
  75. package/dist/{remove-3HQTJQWN.js → remove-TZQVN2EG.js} +15 -13
  76. package/dist/{remove-3HQTJQWN.js.map → remove-TZQVN2EG.js.map} +1 -1
  77. package/dist/{restart-BTUO4DTI.js → restart-WHJDPDQA.js} +6 -6
  78. package/dist/{resume-I7GXT2II.js → resume-BXIYEZM3.js} +4 -4
  79. package/dist/{run-TE2AFYA6.js → run-4MQLY3XF.js} +3 -3
  80. package/dist/{screen-XZPDSK65.js → screen-URKN7PU6.js} +6 -6
  81. package/dist/{search-MGTME3CE.js → search-MNBYJEL7.js} +3 -3
  82. package/dist/{section-YVBDU5MO.js → section-B3OQFADP.js} +5 -5
  83. package/dist/{send-WKIX3AT5.js → send-2QTMQQ6E.js} +7 -7
  84. package/dist/{sessions-2OWYXO55.js → sessions-4B22O45G.js} +12 -12
  85. package/dist/{snooze-WKY2T4VZ.js → snooze-LSCCM3QT.js} +5 -5
  86. package/dist/{start-ZCQT7G4C.js → start-KVNLZRF5.js} +6 -6
  87. package/dist/{status-INIBC7GA.js → status-UEMXFLZZ.js} +3 -3
  88. package/dist/{stop-H4PTRFNX.js → stop-NEQBEYEY.js} +6 -6
  89. package/dist/{sync-6SHCY6LZ.js → sync-BHEY6RXE.js} +16 -14
  90. package/dist/{sync-6SHCY6LZ.js.map → sync-BHEY6RXE.js.map} +1 -1
  91. package/dist/{time-XQ2R7Z33.js → time-ON27QFG4.js} +6 -6
  92. package/dist/{timesheet-DX2TLHIB.js → timesheet-HK5CHAA7.js} +8 -8
  93. package/dist/{tree-5AAHU4K5.js → tree-C5BEEKLO.js} +18 -11
  94. package/dist/tree-C5BEEKLO.js.map +1 -0
  95. package/dist/{update-6G2E5QXG.js → update-M4KS23HB.js} +7 -7
  96. package/dist/{wait-LFFXWBY7.js → wait-5QVWSCOL.js} +6 -6
  97. package/dist/wd-bin.js +2 -2
  98. package/dist/web/assets/{PtyView-l4za-VIj.js → PtyView-DIEUYCTu.js} +2 -2
  99. package/dist/web/assets/{PtyView-l4za-VIj.js.map → PtyView-DIEUYCTu.js.map} +1 -1
  100. package/dist/web/assets/index-Bi1IRGtb.js +119 -0
  101. package/dist/web/assets/index-Bi1IRGtb.js.map +1 -0
  102. package/dist/web/assets/index-YbJdcXjZ.css +1 -0
  103. package/dist/web/index.html +2 -2
  104. package/dist/{web-MWSFIUIJ.js → web-CT3EZNBL.js} +746 -147
  105. package/dist/web-CT3EZNBL.js.map +1 -0
  106. package/npm-shrinkwrap.json +2 -2
  107. package/package.json +1 -1
  108. package/dist/chunk-4MXWNDH7.js.map +0 -1
  109. package/dist/chunk-723C3D5X.js.map +0 -1
  110. package/dist/chunk-DXHZWRVE.js.map +0 -1
  111. package/dist/chunk-E35NZVPX.js.map +0 -1
  112. package/dist/chunk-MXIFBNCV.js.map +0 -1
  113. package/dist/chunk-RQE5UOIW.js.map +0 -1
  114. package/dist/chunk-UIZEMKED.js +0 -9
  115. package/dist/tree-5AAHU4K5.js.map +0 -1
  116. package/dist/web/assets/index-B4wFhe7U.css +0 -1
  117. package/dist/web/assets/index-DaCK_AAw.js +0 -118
  118. package/dist/web/assets/index-DaCK_AAw.js.map +0 -1
  119. package/dist/web-MWSFIUIJ.js.map +0 -1
  120. /package/dist/{answer-EGNJ2KYK.js.map → answer-OF2QNF4A.js.map} +0 -0
  121. /package/dist/{attach-64ILZMTD.js.map → attach-PAFAZ2EH.js.map} +0 -0
  122. /package/dist/{block-H74FYSLK.js.map → block-3LEG4LKJ.js.map} +0 -0
  123. /package/dist/{broadcast-WRHZWOQN.js.map → broadcast-ZDIL7UBP.js.map} +0 -0
  124. /package/dist/{catchup-7QBOC5JJ.js.map → catchup-ZZ5HZJIT.js.map} +0 -0
  125. /package/dist/{chunk-A3M5WTVC.js.map → chunk-3GAYLP7W.js.map} +0 -0
  126. /package/dist/{chunk-NPVMYGT7.js.map → chunk-46VAWZZX.js.map} +0 -0
  127. /package/dist/{chunk-3D7MELCW.js.map → chunk-4CVUV2SE.js.map} +0 -0
  128. /package/dist/{chunk-3NPEMTQT.js.map → chunk-62C3CJ5M.js.map} +0 -0
  129. /package/dist/{chunk-UIZEMKED.js.map → chunk-6MLU6MNS.js.map} +0 -0
  130. /package/dist/{chunk-YEEDWV4H.js.map → chunk-77SVSNME.js.map} +0 -0
  131. /package/dist/{chunk-ATBH7QW3.js.map → chunk-DLSAAP3S.js.map} +0 -0
  132. /package/dist/{chunk-SSVVCHJB.js.map → chunk-EDAOG56H.js.map} +0 -0
  133. /package/dist/{chunk-2LIVAJLK.js.map → chunk-EXJYPF64.js.map} +0 -0
  134. /package/dist/{chunk-37I2GFXK.js.map → chunk-INVFNKU7.js.map} +0 -0
  135. /package/dist/{chunk-ONEXQW7Q.js.map → chunk-KWU35O5S.js.map} +0 -0
  136. /package/dist/{chunk-U4UB4LG6.js.map → chunk-LBQR7KTC.js.map} +0 -0
  137. /package/dist/{chunk-DXAIGNWF.js.map → chunk-LGDECE7V.js.map} +0 -0
  138. /package/dist/{chunk-2QZ3RZOY.js.map → chunk-M4YXBQZN.js.map} +0 -0
  139. /package/dist/{chunk-OOCMPS5L.js.map → chunk-MRXD2NSO.js.map} +0 -0
  140. /package/dist/{chunk-6OG3W3PY.js.map → chunk-NBI2INQS.js.map} +0 -0
  141. /package/dist/{chunk-MLTMXVLD.js.map → chunk-OE34YZFO.js.map} +0 -0
  142. /package/dist/{chunk-POTGMLPV.js.map → chunk-OIQY4OKO.js.map} +0 -0
  143. /package/dist/{chunk-OND6YRWZ.js.map → chunk-R4M5DDSN.js.map} +0 -0
  144. /package/dist/{chunk-QXDBVVSC.js.map → chunk-RK6NHIL6.js.map} +0 -0
  145. /package/dist/{chunk-4Y35ABCO.js.map → chunk-TROTIHD5.js.map} +0 -0
  146. /package/dist/{chunk-XILMZRNS.js.map → chunk-U4YUMSJY.js.map} +0 -0
  147. /package/dist/{chunk-KFSLF65S.js.map → chunk-U5V5J237.js.map} +0 -0
  148. /package/dist/{chunk-LCSWFGIM.js.map → chunk-UDOXLAE7.js.map} +0 -0
  149. /package/dist/{chunk-MI3PS2SH.js.map → chunk-UOSZFFNY.js.map} +0 -0
  150. /package/dist/{chunk-6DWPIK7D.js.map → chunk-X6VBITXV.js.map} +0 -0
  151. /package/dist/{chunk-PYOSW6X5.js.map → chunk-XIL4QZFW.js.map} +0 -0
  152. /package/dist/{chunk-HY566NNR.js.map → chunk-XLP24AH5.js.map} +0 -0
  153. /package/dist/{chunk-QX4LFFNS.js.map → chunk-ZR2KWY6V.js.map} +0 -0
  154. /package/dist/{cli-XT4AS3M2.js.map → cli-3BI62MNT.js.map} +0 -0
  155. /package/dist/{config-GQRUETZ6.js.map → config-MR7UZCST.js.map} +0 -0
  156. /package/dist/{diff-L3TWGBA4.js.map → diff-URDY6YMT.js.map} +0 -0
  157. /package/dist/{digest-R52JZ3AK.js.map → digest-D4FEZNLU.js.map} +0 -0
  158. /package/dist/{fork-MCPMOGS5.js.map → fork-7EUVNEB7.js.map} +0 -0
  159. /package/dist/{hook-S64C4G2C.js.map → hook-6AD3FRKZ.js.map} +0 -0
  160. /package/dist/{hydrate-G5AMKHRD.js.map → hydrate-ZJZPM6YW.js.map} +0 -0
  161. /package/dist/{init-PCZCSRZI.js.map → init-LWL4WVSJ.js.map} +0 -0
  162. /package/dist/{install-skills-Z76FLXOU.js.map → install-skills-TQVWZDUD.js.map} +0 -0
  163. /package/dist/{move-MMGOA7MV.js.map → move-URV7XIDT.js.map} +0 -0
  164. /package/dist/{note-WVKK65IH.js.map → note-S6EGTEIL.js.map} +0 -0
  165. /package/dist/{overlaps-REVVBZCX.js.map → overlaps-4T7NLTJH.js.map} +0 -0
  166. /package/dist/{pin-NRSD2ZT7.js.map → pin-KKQZ3AR6.js.map} +0 -0
  167. /package/dist/{pr-JYOI7LCK.js.map → pr-5ZILTVDM.js.map} +0 -0
  168. /package/dist/{pty-host-AZ2ORVV2.js.map → pty-host-I5OJGWYA.js.map} +0 -0
  169. /package/dist/{read-A7LFAPPZ.js.map → read-NHK26F22.js.map} +0 -0
  170. /package/dist/{recent-H2LD5JOK.js.map → recent-DNSOJQVQ.js.map} +0 -0
  171. /package/dist/{restart-BTUO4DTI.js.map → restart-WHJDPDQA.js.map} +0 -0
  172. /package/dist/{resume-I7GXT2II.js.map → resume-BXIYEZM3.js.map} +0 -0
  173. /package/dist/{run-TE2AFYA6.js.map → run-4MQLY3XF.js.map} +0 -0
  174. /package/dist/{screen-XZPDSK65.js.map → screen-URKN7PU6.js.map} +0 -0
  175. /package/dist/{search-MGTME3CE.js.map → search-MNBYJEL7.js.map} +0 -0
  176. /package/dist/{section-YVBDU5MO.js.map → section-B3OQFADP.js.map} +0 -0
  177. /package/dist/{send-WKIX3AT5.js.map → send-2QTMQQ6E.js.map} +0 -0
  178. /package/dist/{sessions-2OWYXO55.js.map → sessions-4B22O45G.js.map} +0 -0
  179. /package/dist/{snooze-WKY2T4VZ.js.map → snooze-LSCCM3QT.js.map} +0 -0
  180. /package/dist/{start-ZCQT7G4C.js.map → start-KVNLZRF5.js.map} +0 -0
  181. /package/dist/{status-INIBC7GA.js.map → status-UEMXFLZZ.js.map} +0 -0
  182. /package/dist/{stop-H4PTRFNX.js.map → stop-NEQBEYEY.js.map} +0 -0
  183. /package/dist/{time-XQ2R7Z33.js.map → time-ON27QFG4.js.map} +0 -0
  184. /package/dist/{timesheet-DX2TLHIB.js.map → timesheet-HK5CHAA7.js.map} +0 -0
  185. /package/dist/{update-6G2E5QXG.js.map → update-M4KS23HB.js.map} +0 -0
  186. /package/dist/{wait-LFFXWBY7.js.map → wait-5QVWSCOL.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  isPersistedPty,
4
4
  ptySessionsPath
5
- } from "./chunk-MI3PS2SH.js";
5
+ } from "./chunk-UOSZFFNY.js";
6
6
  import {
7
7
  json,
8
8
  tx,
@@ -73,4 +73,4 @@ export {
73
73
  adoptLegacyRestoreList,
74
74
  forgetPersistedSession
75
75
  };
76
- //# sourceMappingURL=chunk-U4UB4LG6.js.map
76
+ //# sourceMappingURL=chunk-LBQR7KTC.js.map
@@ -4,10 +4,10 @@ import {
4
4
  workSteps,
5
5
  workedBetween,
6
6
  workedByDay
7
- } from "./chunk-723C3D5X.js";
7
+ } from "./chunk-C7OK4XEZ.js";
8
8
  import {
9
9
  agentOf
10
- } from "./chunk-RQE5UOIW.js";
10
+ } from "./chunk-KTFDSJUD.js";
11
11
 
12
12
  // src/core/conversations/work-time-source.ts
13
13
  import fs from "fs";
@@ -103,4 +103,4 @@ async function sessionWorkTime(s, now = Date.now(), days = DAYS_SHOWN) {
103
103
  export {
104
104
  sessionWorkTime
105
105
  };
106
- //# sourceMappingURL=chunk-DXAIGNWF.js.map
106
+ //# sourceMappingURL=chunk-LGDECE7V.js.map
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  defaultCleanupDeps
4
- } from "./chunk-S45H7N6X.js";
4
+ } from "./chunk-KSVZVHTI.js";
5
5
  import {
6
6
  normPath
7
7
  } from "./chunk-AKMPF72Y.js";
8
8
  import {
9
9
  findSessionForCwd
10
- } from "./chunk-LCSWFGIM.js";
10
+ } from "./chunk-UDOXLAE7.js";
11
11
  import {
12
12
  buildFoldersOf,
13
13
  clearBuildFolders
@@ -17,10 +17,10 @@ import {
17
17
  } from "./chunk-4KZBZA5D.js";
18
18
  import {
19
19
  loadHistory
20
- } from "./chunk-723C3D5X.js";
20
+ } from "./chunk-C7OK4XEZ.js";
21
21
  import {
22
22
  liveAgents
23
- } from "./chunk-RQE5UOIW.js";
23
+ } from "./chunk-KTFDSJUD.js";
24
24
  import {
25
25
  sessionIdFor
26
26
  } from "./chunk-RT4QZRTC.js";
@@ -292,4 +292,4 @@ export {
292
292
  deleteMergedBranches,
293
293
  defaultBranchTidyDeps
294
294
  };
295
- //# sourceMappingURL=chunk-2QZ3RZOY.js.map
295
+ //# sourceMappingURL=chunk-M4YXBQZN.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-LNHSBM4L.js";
5
5
  import {
6
6
  knownAgents
7
- } from "./chunk-RQE5UOIW.js";
7
+ } from "./chunk-KTFDSJUD.js";
8
8
 
9
9
  // src/commands/install-skills.ts
10
10
  import chalk from "chalk";
@@ -44,4 +44,4 @@ export {
44
44
  runInstallSkills,
45
45
  installSkillsCommand
46
46
  };
47
- //# sourceMappingURL=chunk-OOCMPS5L.js.map
47
+ //# sourceMappingURL=chunk-MRXD2NSO.js.map
@@ -38,10 +38,10 @@ import {
38
38
  upsertSession,
39
39
  upsertSessionWithPort,
40
40
  writeArchiveRecord
41
- } from "./chunk-723C3D5X.js";
41
+ } from "./chunk-C7OK4XEZ.js";
42
42
  import {
43
43
  agentFor
44
- } from "./chunk-RQE5UOIW.js";
44
+ } from "./chunk-KTFDSJUD.js";
45
45
  import {
46
46
  sessionIdFor
47
47
  } from "./chunk-RT4QZRTC.js";
@@ -903,4 +903,4 @@ export {
903
903
  teardownWorktree,
904
904
  openBaseCheckout
905
905
  };
906
- //# sourceMappingURL=chunk-6OG3W3PY.js.map
906
+ //# sourceMappingURL=chunk-NBI2INQS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  computeChanges,
4
4
  findOverlaps,
5
5
  wantsDiffStat
6
- } from "./chunk-QXDBVVSC.js";
6
+ } from "./chunk-RK6NHIL6.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-MLTMXVLD.js.map
37
+ //# sourceMappingURL=chunk-OE34YZFO.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-RKEY4573.js";
5
5
  import {
6
6
  writeTempTree
7
- } from "./chunk-723C3D5X.js";
7
+ } from "./chunk-C7OK4XEZ.js";
8
8
  import {
9
9
  spawn_default
10
10
  } from "./chunk-RCYI7SRA.js";
@@ -534,4 +534,4 @@ export {
534
534
  computeDiff,
535
535
  computeRangeDiff
536
536
  };
537
- //# sourceMappingURL=chunk-POTGMLPV.js.map
537
+ //# sourceMappingURL=chunk-OIQY4OKO.js.map
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  sessionWorkTime
4
- } from "./chunk-DXAIGNWF.js";
4
+ } from "./chunk-LGDECE7V.js";
5
5
  import {
6
6
  runInternal
7
- } from "./chunk-A3M5WTVC.js";
7
+ } from "./chunk-3GAYLP7W.js";
8
8
  import {
9
9
  DEFAULT_CATCH_UP_DAYS,
10
10
  addDays,
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  loadHistory,
18
18
  runGitAsync
19
- } from "./chunk-723C3D5X.js";
19
+ } from "./chunk-C7OK4XEZ.js";
20
20
  import {
21
21
  sessionIdFor
22
22
  } from "./chunk-RT4QZRTC.js";
@@ -653,4 +653,4 @@ export {
653
653
  finishDeviceLogin,
654
654
  defaultTimeDeps
655
655
  };
656
- //# sourceMappingURL=chunk-OND6YRWZ.js.map
656
+ //# sourceMappingURL=chunk-R4M5DDSN.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-4KZBZA5D.js";
5
5
  import {
6
6
  logSwallowed
7
- } from "./chunk-723C3D5X.js";
7
+ } from "./chunk-C7OK4XEZ.js";
8
8
 
9
9
  // src/core/diff/diff-stat.ts
10
10
  import fs from "fs";
@@ -207,4 +207,4 @@ export {
207
207
  wantsDiffStat,
208
208
  findOverlaps
209
209
  };
210
- //# sourceMappingURL=chunk-QXDBVVSC.js.map
210
+ //# sourceMappingURL=chunk-RK6NHIL6.js.map
@@ -0,0 +1,249 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ packageRoot
4
+ } from "./chunk-LNHSBM4L.js";
5
+ import {
6
+ isPidAlive,
7
+ killTreeAsync
8
+ } from "./chunk-KTFDSJUD.js";
9
+ import {
10
+ getConfigDir
11
+ } from "./chunk-QXUHOISF.js";
12
+
13
+ // src/core/platform/running-from.ts
14
+ import fs from "fs";
15
+ import path from "path";
16
+ import { execFile } from "child_process";
17
+ var INTERPRETERS = /* @__PURE__ */ new Set(["node", "bun", "deno", "python", "python3", "pythonw", "py", "dotnet", "java", "javaw", "ruby", "php"]);
18
+ var win = process.platform === "win32";
19
+ function normDir(p, windows = win) {
20
+ if (windows) return path.win32.normalize(p.replace(/\//g, "\\")).replace(/\\+$/, "").toLowerCase();
21
+ return path.posix.normalize(p).replace(/\/+$/, "");
22
+ }
23
+ function under(p, dir, windows) {
24
+ const a = normDir(p, windows);
25
+ const sep = windows ? "\\" : "/";
26
+ return a === dir || a.startsWith(dir + sep);
27
+ }
28
+ function commandWords(command) {
29
+ const out = [];
30
+ for (const m of command.matchAll(/"([^"]*)"|(\S+)/g)) out.push(m[1] ?? m[2]);
31
+ return out;
32
+ }
33
+ var bare = (file) => file.split(/[\\/]/).pop().toLowerCase().replace(/\.exe$/, "");
34
+ function runsFrom(p, dirs, windows = win) {
35
+ const words = commandWords(p.command);
36
+ const exe = p.exe ?? words[0] ?? "";
37
+ if (exe && dirs.some((d) => under(exe, d, windows))) return true;
38
+ if (!INTERPRETERS.has(bare(exe || p.name).replace(/[\d.]+$/, ""))) return false;
39
+ const args = words.slice(1);
40
+ const first = args.find((w) => !w.startsWith("-"));
41
+ const relative = (w) => !(windows ? path.win32.isAbsolute(w) : w.startsWith("/"));
42
+ const scripts = [first, args.find((w) => SCRIPT_FILE.test(w))].filter((w) => !!w && (/[\\/]/.test(w) || !!p.cwd && SCRIPT_FILE.test(w))).map((w) => relative(w) && p.cwd ? windows ? path.win32.resolve(p.cwd, w) : path.posix.resolve(p.cwd, w) : w);
43
+ return scripts.some((w) => dirs.some((d) => under(w, d, windows)));
44
+ }
45
+ var SCRIPT_FILE = /\.(c|m)?(js|ts)$|\.(py|dll|jar|rb|php)$/i;
46
+ function isPtyHelper(p) {
47
+ return /[\\/]node-pty[\\/]/i.test(`${p.exe ?? ""} ${p.command}`) || /^(conpty|openconsole|winpty-agent)(\.exe)?$/i.test(p.name);
48
+ }
49
+ function isEditorHelper(p) {
50
+ const words = commandWords(p.command);
51
+ if (words.some((w) => /^--(useNodeIpc|node-ipc|clientProcessId(=.*)?|cancellationPipeName)$/i.test(w))) return true;
52
+ return words.slice(1).some((w) => /[\\/](tsserver|typingsInstaller)\.js$|language-?server|langserver/i.test(w));
53
+ }
54
+ function workBinPaths() {
55
+ const root = packageRoot();
56
+ return root ? [normDir(path.join(root, "dist", "bin.js"))] : [];
57
+ }
58
+ function isWorkProcess(p, bins = workBinPaths(), windows = win) {
59
+ if (bins.length === 0) return false;
60
+ const raw = commandWords(p.command);
61
+ return raw.some((w, i) => /^(pty-host|web|hook)$/.test(raw[i + 1] ?? "") && bins.includes(normDir(w, windows)));
62
+ }
63
+ function mentions(p, dirs, windows = win) {
64
+ const norm = (s) => windows ? s.replace(/\//g, "\\").toLowerCase() : s;
65
+ const text = `${norm(p.exe ?? "")} ${norm(p.command)}`;
66
+ return dirs.some((d) => {
67
+ for (let at = text.indexOf(d); at >= 0; at = text.indexOf(d, at + 1)) {
68
+ const next = text[at + d.length];
69
+ if (next === void 0 || !/[\w.-]/.test(next)) return true;
70
+ }
71
+ return false;
72
+ });
73
+ }
74
+ function holdersOf(procs, dirs, self = process.pid, windows = win, spare = /* @__PURE__ */ new Set(), bins = workBinPaths()) {
75
+ const norm = dirs.map((d) => normDir(d, windows));
76
+ const byPid = new Map(procs.map((p) => [p.pid, p]));
77
+ const mine = /* @__PURE__ */ new Set();
78
+ for (let pid = self; pid && !mine.has(pid); pid = byPid.get(pid)?.ppid) mine.add(pid);
79
+ const ownWork = (q) => spare.has(q.pid) || isWorkProcess(q, bins, windows);
80
+ const spared = (p) => {
81
+ if (ownWork(p)) return true;
82
+ if (!isPtyHelper(p)) return false;
83
+ const seen = /* @__PURE__ */ new Set();
84
+ for (let q = byPid.get(p.ppid); q && !seen.has(q.pid); q = byPid.get(q.ppid)) {
85
+ if (ownWork(q)) return true;
86
+ seen.add(q.pid);
87
+ }
88
+ return false;
89
+ };
90
+ const candidates = procs.filter((p) => !mine.has(p.pid) && !spared(p));
91
+ const running = candidates.filter((p) => runsFrom(p, norm, windows) && !isEditorHelper(p));
92
+ const runningPids = new Set(running.map((p) => p.pid));
93
+ return {
94
+ stoppable: running.filter((p) => !runningPids.has(p.ppid)),
95
+ running,
96
+ others: candidates.filter((p) => !runningPids.has(p.pid) && mentions(p, norm, windows))
97
+ };
98
+ }
99
+ function workPids(dir = getConfigDir()) {
100
+ const out = /* @__PURE__ */ new Set();
101
+ for (const file of ["pty-host.json", "web.pid", "web-dev.pid"]) {
102
+ try {
103
+ const raw = fs.readFileSync(path.join(dir, file), "utf-8").trim();
104
+ const pid = raw.startsWith("{") ? JSON.parse(raw).pid : Number(raw.split(/\s/)[0]);
105
+ if (typeof pid === "number" && Number.isInteger(pid) && pid > 0) out.add(pid);
106
+ } catch {
107
+ }
108
+ }
109
+ return out;
110
+ }
111
+ function describeProcess(p, dirs, windows = win) {
112
+ const words = commandWords(p.command).slice(1);
113
+ let args = words.join(" ");
114
+ for (const d of dirs) {
115
+ const fold = (s) => windows ? [...s].map((c) => {
116
+ const l = (c === "/" ? "\\" : c).toLowerCase();
117
+ return l.length === c.length ? l : c;
118
+ }).join("") : s;
119
+ for (let at = fold(args).indexOf(d); at >= 0; at = fold(args).indexOf(d)) args = args.slice(0, at) + "\u2026" + args.slice(at + d.length);
120
+ }
121
+ if (args.length > 90) args = `${args.slice(0, 89)}\u2026`;
122
+ const name = bare(p.name || p.exe || "?");
123
+ return `${name}${args ? ` ${args}` : ""} (PID ${p.pid})`;
124
+ }
125
+ function parseCimProcesses(json) {
126
+ let data;
127
+ try {
128
+ data = JSON.parse(json);
129
+ } catch {
130
+ return [];
131
+ }
132
+ const rows = Array.isArray(data) ? data : data ? [data] : [];
133
+ const out = [];
134
+ for (const r of rows) {
135
+ if (!r || typeof r !== "object") continue;
136
+ const o = r;
137
+ if (typeof o.ProcessId !== "number") continue;
138
+ out.push({
139
+ pid: o.ProcessId,
140
+ ppid: typeof o.ParentProcessId === "number" ? o.ParentProcessId : 0,
141
+ name: typeof o.Name === "string" ? o.Name : "",
142
+ exe: typeof o.ExecutablePath === "string" ? o.ExecutablePath : null,
143
+ command: typeof o.CommandLine === "string" ? o.CommandLine : ""
144
+ });
145
+ }
146
+ return out;
147
+ }
148
+ function parsePsProcesses(stdout) {
149
+ const out = [];
150
+ for (const line of stdout.split(/\r?\n/)) {
151
+ const m = /^\s*(\d+)\s+(\d+)\s+(.*)$/.exec(line);
152
+ if (!m) continue;
153
+ const command = m[3].trim();
154
+ const first = commandWords(command)[0] ?? "";
155
+ out.push({
156
+ pid: Number(m[1]),
157
+ ppid: Number(m[2]),
158
+ name: path.posix.basename(first),
159
+ exe: first.startsWith("/") ? first : null,
160
+ command
161
+ });
162
+ }
163
+ return out;
164
+ }
165
+ async function linuxProcesses() {
166
+ const out = [];
167
+ let pids;
168
+ try {
169
+ pids = (await fs.promises.readdir("/proc")).filter((d) => /^\d+$/.test(d));
170
+ } catch {
171
+ return out;
172
+ }
173
+ for (const d of pids) {
174
+ try {
175
+ const stat = await fs.promises.readFile(`/proc/${d}/stat`, "utf-8");
176
+ const ppid = Number(stat.slice(stat.lastIndexOf(")") + 2).split(" ")[1]);
177
+ const command = (await fs.promises.readFile(`/proc/${d}/cmdline`, "utf-8")).split("\0").filter(Boolean).map((w) => /\s/.test(w) ? `"${w}"` : w).join(" ");
178
+ let exe = null;
179
+ let cwd = null;
180
+ try {
181
+ exe = await fs.promises.readlink(`/proc/${d}/exe`);
182
+ cwd = await fs.promises.readlink(`/proc/${d}/cwd`);
183
+ } catch {
184
+ }
185
+ out.push({ pid: Number(d), ppid, name: exe ? path.posix.basename(exe) : "", exe, command, cwd });
186
+ } catch {
187
+ }
188
+ }
189
+ return out;
190
+ }
191
+ var run = (cmd, args) => new Promise(
192
+ (resolve) => execFile(
193
+ cmd,
194
+ args,
195
+ { encoding: "utf-8", windowsHide: true, timeout: 2e4, maxBuffer: 64 * 1024 * 1024 },
196
+ (_err, stdout) => resolve(stdout ?? "")
197
+ )
198
+ );
199
+ async function listProcesses() {
200
+ if (process.platform === "linux") return linuxProcesses();
201
+ if (process.platform === "win32") {
202
+ return parseCimProcesses(
203
+ await run("powershell", [
204
+ "-NoProfile",
205
+ "-NonInteractive",
206
+ "-Command",
207
+ // UTF-8 out: the console's code page would turn a path with Š or č into ?.
208
+ "[Console]::OutputEncoding = [Text.Encoding]::UTF8; Get-CimInstance Win32_Process | Select-Object ProcessId,ParentProcessId,Name,ExecutablePath,CommandLine | ConvertTo-Json -Compress"
209
+ ])
210
+ );
211
+ }
212
+ return parsePsProcesses(await run("ps", ["-A", "-o", "pid=,ppid=,args="]));
213
+ }
214
+ async function findHolders(dirs, list = listProcesses, spare = workPids()) {
215
+ const existing = dirs.filter((d) => fs.existsSync(d));
216
+ if (existing.length === 0) return { stoppable: [], running: [], others: [] };
217
+ return holdersOf(await list(), existing, process.pid, win, spare);
218
+ }
219
+ async function runningFromNames(dirs, list = listProcesses) {
220
+ const procs = await list();
221
+ if (procs.length === 0) throw new Error("couldn't read the running processes");
222
+ const h = await findHolders(dirs, async () => procs);
223
+ const norm = dirs.map((d) => normDir(d));
224
+ return h.stoppable.map((p) => describeProcess(p, norm));
225
+ }
226
+ var EXIT_WAIT_MS = 3e3;
227
+ async function stopRunningFrom(dirs, io = {}) {
228
+ const h = await findHolders(dirs, io.list, io.spare);
229
+ const kill = io.kill ?? killTreeAsync;
230
+ const alive = io.alive ?? isPidAlive;
231
+ const targets = win ? h.stoppable : h.running ?? h.stoppable;
232
+ const killed = await Promise.all(targets.map((p) => Promise.resolve(kill(p.pid)).catch(() => false)));
233
+ const stopped = targets.filter((_, i) => killed[i]);
234
+ for (const until = Date.now() + (io.waitMs ?? EXIT_WAIT_MS); stopped.some((p) => alive(p.pid)) && Date.now() < until; ) {
235
+ await new Promise((r) => setTimeout(r, 100));
236
+ }
237
+ const norm = dirs.map((d) => normDir(d));
238
+ const named = new Set(h.stoppable.map((p) => p.pid));
239
+ return stopped.filter((p) => named.has(p.pid)).map((p) => describeProcess(p, norm));
240
+ }
241
+
242
+ export {
243
+ normDir,
244
+ describeProcess,
245
+ findHolders,
246
+ runningFromNames,
247
+ stopRunningFrom
248
+ };
249
+ //# sourceMappingURL=chunk-TN2TXRHS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/platform/running-from.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { execFile } from 'node:child_process';\nimport { isPidAlive, killTreeAsync } from './process.js';\nimport { packageRoot } from './package-root.js';\nimport { getConfigDir } from './config.js';\n\n/**\n * Processes running from a folder — a dev server, a watcher, a built app\n * Claude started in a worktree — and what keeps a folder in use on Windows.\n * Archiving stops Claude, but not what it started in the background (`vite`\n * with `run_in_background`): that held a file in `node_modules`, so git\n * removed the worktree only in part, and Restore couldn't move what was left.\n *\n * Two kinds, kept apart on purpose:\n * - runs from it: its program is in the folder — the executable, or an\n * interpreter's script (`node <dir>/node_modules/vite/bin/vite.js`,\n * `dotnet <dir>/bin/App.dll`). Work's to stop, with the session's work.\n * - mentions it: anything else naming the folder (an editor opened on it,\n * a terminal). Named in a message, never stopped: it's the user's.\n */\n\nexport interface RunningProcess {\n pid: number;\n ppid: number;\n /** Its executable's file name (\"node.exe\"). */\n name: string;\n /** Its executable's full path, when the system says. */\n exe: string | null;\n /** Its command line ('' when it can't be read). */\n command: string;\n /** Its working folder, where the system says (Linux): a relative script (`node dist/server.js`) is under it. */\n cwd?: string | null;\n}\n\n/** Interpreters whose script is the program: the first argument that isn't an option. */\nconst INTERPRETERS = new Set(['node', 'bun', 'deno', 'python', 'python3', 'pythonw', 'py', 'dotnet', 'java', 'javaw', 'ruby', 'php']);\n\nconst win = process.platform === 'win32';\n\n/** A path as compared: absolute, normalised, `\\` and case-blind on Windows. */\nexport function normDir(p: string, windows = win): string {\n if (windows) return path.win32.normalize(p.replace(/\\//g, '\\\\')).replace(/\\\\+$/, '').toLowerCase();\n return path.posix.normalize(p).replace(/\\/+$/, '');\n}\n\nfunction under(p: string, dir: string, windows: boolean): boolean {\n const a = normDir(p, windows);\n const sep = windows ? '\\\\' : '/';\n return a === dir || a.startsWith(dir + sep);\n}\n\n/** A command line's words: quotes group, and are dropped (Windows' rules, roughly; enough to find a path). */\nexport function commandWords(command: string): string[] {\n const out: string[] = [];\n for (const m of command.matchAll(/\"([^\"]*)\"|(\\S+)/g)) out.push(m[1] ?? m[2]);\n return out;\n}\n\nconst bare = (file: string) =>\n file\n .split(/[\\\\/]/)\n .pop()!\n .toLowerCase()\n .replace(/\\.exe$/, '');\n\n/** Its program is in one of `dirs` (normalised with normDir): the executable, or an interpreter's script. */\nexport function runsFrom(p: RunningProcess, dirs: string[], windows = win): boolean {\n const words = commandWords(p.command);\n const exe = p.exe ?? words[0] ?? '';\n if (exe && dirs.some((d) => under(exe, d, windows))) return true;\n // Its version gone: python3.12, node22 (Linux names the binary itself).\n if (!INTERPRETERS.has(bare(exe || p.name).replace(/[\\d.]+$/, ''))) return false;\n // Its script: the first argument that isn't an option, or the first that names a program file (an option's value\n // comes first in `node -r ts-node/register <dir>/src/index.ts`). Not any later one: `node C:\\tools\\fmt.js <dir>\\a.ts`\n // runs a tool of yours on a file there, its program elsewhere.\n const args = words.slice(1);\n const first = args.find((w) => !w.startsWith('-'));\n const relative = (w: string) => !(windows ? path.win32.isAbsolute(w) : w.startsWith('/'));\n const scripts = [first, args.find((w) => SCRIPT_FILE.test(w))]\n .filter((w): w is string => !!w && (/[\\\\/]/.test(w) || (!!p.cwd && SCRIPT_FILE.test(w))))\n // A relative one is where the process works (`node dist/server.js`, `python manage.py`), when that's known.\n .map((w) => (relative(w) && p.cwd ? (windows ? path.win32.resolve(p.cwd, w) : path.posix.resolve(p.cwd, w)) : w));\n return scripts.some((w) => dirs.some((d) => under(w, d, windows)));\n}\n\nconst SCRIPT_FILE = /\\.(c|m)?(js|ts)$|\\.(py|dll|jar|rb|php)$/i;\n\n/** node-pty's own processes (the console it gives a terminal): work's, when it runs from a checkout. */\nexport function isPtyHelper(p: RunningProcess): boolean {\n return /[\\\\/]node-pty[\\\\/]/i.test(`${p.exe ?? ''} ${p.command}`) || /^(conpty|openconsole|winpty-agent)(\\.exe)?$/i.test(p.name);\n}\n\n/**\n * An editor's helper — a language server, the TypeScript server — even one running the worktree's own copy\n * (`node <wt>/node_modules/typescript/lib/tsserver.js`, VS Code's \"use the workspace version\"): the editor's, which\n * the user closes; stopping it only makes the editor report a crash. Known by what editors start them with.\n */\nexport function isEditorHelper(p: RunningProcess): boolean {\n const words = commandWords(p.command);\n if (words.some((w) => /^--(useNodeIpc|node-ipc|clientProcessId(=.*)?|cancellationPipeName)$/i.test(w))) return true;\n return words.slice(1).some((w) => /[\\\\/](tsserver|typingsInstaller)\\.js$|language-?server|langserver/i.test(w));\n}\n\n/** Where this work runs from: its `dist/bin.js` (an npm install, a linked checkout, the desktop app's copy). */\nexport function workBinPaths(): string[] {\n const root = packageRoot();\n return root ? [normDir(path.join(root, 'dist', 'bin.js'))] : [];\n}\n\n/**\n * One of work's own (the PTY host, a work web, a hook): this work's own `bin.js` running one of those — never\n * stopped, wherever it's installed (stopping the PTY host stops every session's Claude). Not any `bin.js web`:\n * a project's own would be spared, and keep its worktree in use.\n */\nexport function isWorkProcess(p: RunningProcess, bins: string[] = workBinPaths(), windows = win): boolean {\n if (bins.length === 0) return false;\n const raw = commandWords(p.command);\n return raw.some((w, i) => /^(pty-host|web|hook)$/.test(raw[i + 1] ?? '') && bins.includes(normDir(w, windows)));\n}\n\n/** It names one of `dirs` somewhere in its command line or executable path. */\nexport function mentions(p: RunningProcess, dirs: string[], windows = win): boolean {\n const norm = (s: string) => (windows ? s.replace(/\\//g, '\\\\').toLowerCase() : s);\n const text = `${norm(p.exe ?? '')} ${norm(p.command)}`;\n // The folder itself, or inside it: anything but more of a name may follow (a separator, a quote, `&`, `;`, the\n // end) — not feat-x2 or feat-x-old, which are other folders.\n return dirs.some((d) => {\n for (let at = text.indexOf(d); at >= 0; at = text.indexOf(d, at + 1)) {\n const next = text[at + d.length];\n if (next === undefined || !/[\\w.-]/.test(next)) return true;\n }\n return false;\n });\n}\n\nexport interface Holders {\n /** Run from the folders: stop these (each the top of its tree — its children go with it on Windows). */\n stoppable: RunningProcess[];\n /** Every one that runs from them, children too: POSIX kills one process at a time. */\n running?: RunningProcess[];\n /** Name the folders but run from elsewhere (an editor, a shell): the user's to close. */\n others: RunningProcess[];\n}\n\n/**\n * What runs from or names `dirs`, in `procs`. Never this process or one it runs under, never one in `spare` (the\n * PTY host and work web by their recorded pids) or under it, and never one of work's own by its command line\n * (isWorkProcess) — whatever folder they run from.\n */\nexport function holdersOf(\n procs: RunningProcess[],\n dirs: string[],\n self = process.pid,\n windows = win,\n spare: ReadonlySet<number> = new Set(),\n bins: string[] = workBinPaths(),\n): Holders {\n const norm = dirs.map((d) => normDir(d, windows));\n const byPid = new Map(procs.map((p) => [p.pid, p]));\n const mine = new Set<number>();\n for (let pid: number | undefined = self; pid && !mine.has(pid); pid = byPid.get(pid)?.ppid) mine.add(pid);\n // work's own (by pid or command line), and the terminal helpers they run (node-pty's, from where work is\n // installed — a checkout's node_modules). Not everything under them: a dev server a Claude started is a\n // descendant of the PTY host until that Claude is gone, and stopping it is the point.\n const ownWork = (q: RunningProcess) => spare.has(q.pid) || isWorkProcess(q, bins, windows);\n const spared = (p: RunningProcess): boolean => {\n if (ownWork(p)) return true;\n if (!isPtyHelper(p)) return false;\n const seen = new Set<number>();\n for (let q = byPid.get(p.ppid); q && !seen.has(q.pid); q = byPid.get(q.ppid)) {\n if (ownWork(q)) return true;\n seen.add(q.pid);\n }\n return false;\n };\n const candidates = procs.filter((p) => !mine.has(p.pid) && !spared(p));\n // An editor's helper is the user's, like the editor: named, never stopped.\n const running = candidates.filter((p) => runsFrom(p, norm, windows) && !isEditorHelper(p));\n const runningPids = new Set(running.map((p) => p.pid));\n return {\n stoppable: running.filter((p) => !runningPids.has(p.ppid)),\n running,\n others: candidates.filter((p) => !runningPids.has(p.pid) && mentions(p, norm, windows)),\n };\n}\n\n/** The pids work recorded for its PTY host and work web (and the dev server's): spared by every stop. */\nexport function workPids(dir = getConfigDir()): Set<number> {\n const out = new Set<number>();\n for (const file of ['pty-host.json', 'web.pid', 'web-dev.pid']) {\n try {\n const raw = fs.readFileSync(path.join(dir, file), 'utf-8').trim();\n const pid = raw.startsWith('{') ? (JSON.parse(raw) as { pid?: unknown }).pid : Number(raw.split(/\\s/)[0]);\n if (typeof pid === 'number' && Number.isInteger(pid) && pid > 0) out.add(pid);\n } catch {\n /* not running, or not recorded */\n }\n }\n return out;\n}\n\n/** \"node …\\vite\\bin\\vite.js --mode demo (PID 35464)\": its name and command, the folder shortened to \"…\". */\nexport function describeProcess(p: RunningProcess, dirs: string[], windows = win): string {\n const words = commandWords(p.command).slice(1);\n let args = words.join(' ');\n // The folder (normalised as normDir: `\\`, lower case on Windows) wherever it appears, as typed.\n for (const d of dirs) {\n // Char by char, and only where lower case keeps the length (an İ doesn't): the positions stay those of `args`.\n const fold = (s: string) =>\n windows\n ? [...s]\n .map((c) => {\n const l = (c === '/' ? '\\\\' : c).toLowerCase();\n return l.length === c.length ? l : c;\n })\n .join('')\n : s;\n for (let at = fold(args).indexOf(d); at >= 0; at = fold(args).indexOf(d)) args = args.slice(0, at) + '…' + args.slice(at + d.length);\n }\n if (args.length > 90) args = `${args.slice(0, 89)}…`;\n const name = bare(p.name || p.exe || '?');\n return `${name}${args ? ` ${args}` : ''} (PID ${p.pid})`;\n}\n\n/** Windows: `Get-CimInstance Win32_Process` as JSON (one object, or a list). */\nexport function parseCimProcesses(json: string): RunningProcess[] {\n let data: unknown;\n try {\n data = JSON.parse(json);\n } catch {\n return [];\n }\n const rows = Array.isArray(data) ? data : data ? [data] : [];\n const out: RunningProcess[] = [];\n for (const r of rows) {\n if (!r || typeof r !== 'object') continue;\n const o = r as Record<string, unknown>;\n if (typeof o.ProcessId !== 'number') continue;\n out.push({\n pid: o.ProcessId,\n ppid: typeof o.ParentProcessId === 'number' ? o.ParentProcessId : 0,\n name: typeof o.Name === 'string' ? o.Name : '',\n exe: typeof o.ExecutablePath === 'string' ? o.ExecutablePath : null,\n command: typeof o.CommandLine === 'string' ? o.CommandLine : '',\n });\n }\n return out;\n}\n\n/** macOS: `ps -A -o pid=,ppid=,args=`. */\nexport function parsePsProcesses(stdout: string): RunningProcess[] {\n const out: RunningProcess[] = [];\n for (const line of stdout.split(/\\r?\\n/)) {\n const m = /^\\s*(\\d+)\\s+(\\d+)\\s+(.*)$/.exec(line);\n if (!m) continue;\n const command = m[3].trim();\n const first = commandWords(command)[0] ?? '';\n out.push({\n pid: Number(m[1]),\n ppid: Number(m[2]),\n name: path.posix.basename(first),\n exe: first.startsWith('/') ? first : null,\n command,\n });\n }\n return out;\n}\n\n/** Read asynchronously: work web's requests wait behind a synchronous walk of /proc. */\nasync function linuxProcesses(): Promise<RunningProcess[]> {\n const out: RunningProcess[] = [];\n let pids: string[];\n try {\n pids = (await fs.promises.readdir('/proc')).filter((d) => /^\\d+$/.test(d));\n } catch {\n return out;\n }\n for (const d of pids) {\n try {\n const stat = await fs.promises.readFile(`/proc/${d}/stat`, 'utf-8');\n const ppid = Number(stat.slice(stat.lastIndexOf(')') + 2).split(' ')[1]);\n const command = (await fs.promises.readFile(`/proc/${d}/cmdline`, 'utf-8'))\n .split('\\0')\n .filter(Boolean)\n .map((w) => (/\\s/.test(w) ? `\"${w}\"` : w))\n .join(' ');\n let exe: string | null = null;\n let cwd: string | null = null;\n try {\n exe = await fs.promises.readlink(`/proc/${d}/exe`);\n cwd = await fs.promises.readlink(`/proc/${d}/cwd`);\n } catch {\n /* another user's */\n }\n out.push({ pid: Number(d), ppid, name: exe ? path.posix.basename(exe) : '', exe, command, cwd });\n } catch {\n /* gone meanwhile */\n }\n }\n return out;\n}\n\nconst run = (cmd: string, args: string[]): Promise<string> =>\n new Promise((resolve) =>\n execFile(cmd, args, { encoding: 'utf-8', windowsHide: true, timeout: 20_000, maxBuffer: 64 * 1024 * 1024 }, (_err, stdout) =>\n resolve(stdout ?? ''),\n ),\n );\n\n/** Every process with its parent, executable and command line. Empty when they can't be read. */\nexport async function listProcesses(): Promise<RunningProcess[]> {\n if (process.platform === 'linux') return linuxProcesses();\n if (process.platform === 'win32') {\n return parseCimProcesses(\n await run('powershell', [\n '-NoProfile',\n '-NonInteractive',\n '-Command',\n // UTF-8 out: the console's code page would turn a path with Š or č into ?.\n '[Console]::OutputEncoding = [Text.Encoding]::UTF8; Get-CimInstance Win32_Process | Select-Object ProcessId,ParentProcessId,Name,ExecutablePath,CommandLine | ConvertTo-Json -Compress',\n ]),\n );\n }\n return parsePsProcesses(await run('ps', ['-A', '-o', 'pid=,ppid=,args=']));\n}\n\n/** Look up what runs from or names `dirs` now. */\nexport async function findHolders(\n dirs: string[],\n list: () => Promise<RunningProcess[]> = listProcesses,\n spare: ReadonlySet<number> = workPids(),\n): Promise<Holders> {\n const existing = dirs.filter((d) => fs.existsSync(d));\n if (existing.length === 0) return { stoppable: [], running: [], others: [] };\n return holdersOf(await list(), existing, process.pid, win, spare);\n}\n\n/**\n * What runs from `dirs`, by name, stopping nothing. Throws when the processes can't be read (none listed: there are\n * always some), so \"nothing runs there\" is never a guess.\n */\nexport async function runningFromNames(dirs: string[], list: () => Promise<RunningProcess[]> = listProcesses): Promise<string[]> {\n const procs = await list();\n if (procs.length === 0) throw new Error(\"couldn't read the running processes\");\n const h = await findHolders(dirs, async () => procs);\n const norm = dirs.map((d) => normDir(d));\n return h.stoppable.map((p) => describeProcess(p, norm));\n}\n\n/** How long a stop waits for what it stopped to be gone (its files let go) before going on. */\nconst EXIT_WAIT_MS = 3000;\n\n/**\n * Stop what runs from `dirs`, and say what: [\"node …\\vite\\bin\\vite.js --mode demo (PID 35464)\"]. Only processes\n * whose program is in the folders — never an editor open on them, never one of work's own. Windows stops each\n * tree; POSIX each process (a kill there is one process). Waits a moment for them to be gone, so the folder is\n * free when it returns.\n */\nexport async function stopRunningFrom(\n dirs: string[],\n io: {\n list?: () => Promise<RunningProcess[]>;\n kill?: (pid: number) => Promise<boolean> | boolean;\n alive?: (pid: number) => boolean;\n spare?: ReadonlySet<number>;\n waitMs?: number;\n } = {},\n): Promise<string[]> {\n const h = await findHolders(dirs, io.list, io.spare);\n const kill = io.kill ?? killTreeAsync;\n const alive = io.alive ?? isPidAlive;\n const targets = win ? h.stoppable : (h.running ?? h.stoppable);\n // All at once, and off the event loop (taskkill takes a few hundred ms each; work web answers meanwhile).\n const killed = await Promise.all(targets.map((p) => Promise.resolve(kill(p.pid)).catch(() => false)));\n const stopped = targets.filter((_, i) => killed[i]);\n for (const until = Date.now() + (io.waitMs ?? EXIT_WAIT_MS); stopped.some((p) => alive(p.pid)) && Date.now() < until;) {\n await new Promise((r) => setTimeout(r, 100));\n }\n const norm = dirs.map((d) => normDir(d));\n const named = new Set(h.stoppable.map((p) => p.pid));\n return stopped.filter((p) => named.has(p.pid)).map((p) => describeProcess(p, norm));\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,SAAS,gBAAgB;AAkCzB,IAAM,eAAe,oBAAI,IAAI,CAAC,QAAQ,OAAO,QAAQ,UAAU,WAAW,WAAW,MAAM,UAAU,QAAQ,SAAS,QAAQ,KAAK,CAAC;AAEpI,IAAM,MAAM,QAAQ,aAAa;AAG1B,SAAS,QAAQ,GAAW,UAAU,KAAa;AACxD,MAAI,QAAS,QAAO,KAAK,MAAM,UAAU,EAAE,QAAQ,OAAO,IAAI,CAAC,EAAE,QAAQ,QAAQ,EAAE,EAAE,YAAY;AACjG,SAAO,KAAK,MAAM,UAAU,CAAC,EAAE,QAAQ,QAAQ,EAAE;AACnD;AAEA,SAAS,MAAM,GAAW,KAAa,SAA2B;AAChE,QAAM,IAAI,QAAQ,G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,GAAG,MAAM,GAAG,KAAK;AACnD,QAAM,OAAO,GAAG,QAAQ;AACxB,QAAM,QAAQ,GAAG,SAAS;AAC1B,QAAM,UAAU,MAAM,EAAE,YAAa,EAAE,WAAW,EAAE;AAEpD,QAAM,SAAS,MAAM,QAAQ,IAAI,QAAQ,IAAI,CAAC,MAAM,QAAQ,QAAQ,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,MAAM,KAAK,CAAC,CAAC;AACpG,QAAM,UAAU,QAAQ,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,CAAC;AAClD,aAAW,QAAQ,KAAK,IAAI,KAAK,GAAG,UAAU,eAAe,QAAQ,KAAK,CAAC,MAAM,MAAM,EAAE,GAAG,CAAC,KAAK,KAAK,IAAI,IAAI,SAAQ;AACrH,UAAM,IAAI,QAAQ,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAAA,EAC7C;AACA,QAAM,OAAO,KAAK,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC;AACvC,QAAM,QAAQ,IAAI,IAAI,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;AACnD,SAAO,QAAQ,OAAO,CAAC,MAAM,MAAM,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AACpF;","names":[]}
@@ -6,11 +6,11 @@ import {
6
6
  lastTurnEntryMs,
7
7
  readSessionActivity,
8
8
  readStatus
9
- } from "./chunk-723C3D5X.js";
9
+ } from "./chunk-C7OK4XEZ.js";
10
10
  import {
11
11
  agentOf,
12
12
  readJsonlTail
13
- } from "./chunk-RQE5UOIW.js";
13
+ } from "./chunk-KTFDSJUD.js";
14
14
  import {
15
15
  sessionIdFor
16
16
  } from "./chunk-RT4QZRTC.js";
@@ -45,4 +45,4 @@ export {
45
45
  sessionStatusView,
46
46
  shownState
47
47
  };
48
- //# sourceMappingURL=chunk-4Y35ABCO.js.map
48
+ //# sourceMappingURL=chunk-TROTIHD5.js.map
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-AH5TM3NB.js";
5
5
  import {
6
6
  spawnSpecFor
7
- } from "./chunk-KFSLF65S.js";
7
+ } from "./chunk-U5V5J237.js";
8
8
  import {
9
9
  PtyHostClient,
10
10
  ensureHost
11
- } from "./chunk-MI3PS2SH.js";
11
+ } from "./chunk-UOSZFFNY.js";
12
12
  import {
13
13
  sessionIdFor
14
14
  } from "./chunk-RT4QZRTC.js";
@@ -117,4 +117,4 @@ async function attachSession(session, launch = {}) {
117
117
  export {
118
118
  attachSession
119
119
  };
120
- //# sourceMappingURL=chunk-XILMZRNS.js.map
120
+ //# sourceMappingURL=chunk-U4YUMSJY.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  dbPtySessions,
4
4
  forgetPersistedSession
5
- } from "./chunk-U4UB4LG6.js";
5
+ } from "./chunk-LBQR7KTC.js";
6
6
  import {
7
7
  PtyHostBusyError,
8
8
  PtyHostClient,
@@ -11,23 +11,23 @@ import {
11
11
  findHost,
12
12
  findHostPatient,
13
13
  hostStartLockPath
14
- } from "./chunk-MI3PS2SH.js";
14
+ } from "./chunk-UOSZFFNY.js";
15
15
  import {
16
16
  ASSISTANT_ID,
17
17
  prepareAssistantDir
18
- } from "./chunk-3NPEMTQT.js";
18
+ } from "./chunk-62C3CJ5M.js";
19
19
  import {
20
20
  createFsWatcher,
21
21
  findSessionById,
22
22
  logSwallowed,
23
23
  noClaudeBecause,
24
24
  swallow
25
- } from "./chunk-723C3D5X.js";
25
+ } from "./chunk-C7OK4XEZ.js";
26
26
  import {
27
27
  agentFor,
28
28
  agentSettings,
29
29
  assistantAgent
30
- } from "./chunk-RQE5UOIW.js";
30
+ } from "./chunk-KTFDSJUD.js";
31
31
  import {
32
32
  sessionIdFor
33
33
  } from "./chunk-RT4QZRTC.js";
@@ -357,4 +357,4 @@ export {
357
357
  stopSessionPty,
358
358
  detachPtyPool
359
359
  };
360
- //# sourceMappingURL=chunk-KFSLF65S.js.map
360
+ //# sourceMappingURL=chunk-U5V5J237.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-E3Y4ZACK.js";
10
10
  import {
11
11
  loadHistory
12
- } from "./chunk-723C3D5X.js";
12
+ } from "./chunk-C7OK4XEZ.js";
13
13
  import {
14
14
  sessionIdFor,
15
15
  tx,
@@ -206,4 +206,4 @@ export {
206
206
  claimForDelivery,
207
207
  formatPendingForPrompt
208
208
  };
209
- //# sourceMappingURL=chunk-LCSWFGIM.js.map
209
+ //# sourceMappingURL=chunk-UDOXLAE7.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  isPidAlive,
4
4
  spawnDetachedWork
5
- } from "./chunk-RQE5UOIW.js";
5
+ } from "./chunk-KTFDSJUD.js";
6
6
  import {
7
7
  ensureFile,
8
8
  getConfigDir,
@@ -244,4 +244,4 @@ export {
244
244
  ensureHost,
245
245
  PtyHostClient
246
246
  };
247
- //# sourceMappingURL=chunk-MI3PS2SH.js.map
247
+ //# sourceMappingURL=chunk-UOSZFFNY.js.map
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createInProcess
4
- } from "./chunk-PYOSW6X5.js";
4
+ } from "./chunk-XIL4QZFW.js";
5
5
  import {
6
6
  ensurePty,
7
7
  peekPty
8
- } from "./chunk-KFSLF65S.js";
8
+ } from "./chunk-U5V5J237.js";
9
9
  import {
10
10
  resolveProjectTarget
11
11
  } from "./chunk-JTHILJFB.js";
12
12
  import {
13
13
  checkedOutBranch
14
- } from "./chunk-LCSWFGIM.js";
14
+ } from "./chunk-UDOXLAE7.js";
15
15
  import {
16
16
  getCommentFileStore
17
17
  } from "./chunk-E3Y4ZACK.js";
@@ -148,4 +148,4 @@ export {
148
148
  uncommittedFiles,
149
149
  defaultForkDeps
150
150
  };
151
- //# sourceMappingURL=chunk-6DWPIK7D.js.map
151
+ //# sourceMappingURL=chunk-X6VBITXV.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  openBaseCheckout,
4
4
  setupWorktree
5
- } from "./chunk-6OG3W3PY.js";
5
+ } from "./chunk-NBI2INQS.js";
6
6
  import {
7
7
  resolveProjectTarget
8
8
  } from "./chunk-JTHILJFB.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  findSession,
14
14
  loadHistory
15
- } from "./chunk-723C3D5X.js";
15
+ } from "./chunk-C7OK4XEZ.js";
16
16
  import {
17
17
  spawn_default
18
18
  } from "./chunk-RCYI7SRA.js";
@@ -159,4 +159,4 @@ export {
159
159
  createInChild,
160
160
  createInProcess
161
161
  };
162
- //# sourceMappingURL=chunk-PYOSW6X5.js.map
162
+ //# sourceMappingURL=chunk-XIL4QZFW.js.map