@moberg_hr/work-tree 2.22.5 → 2.23.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.
- package/dist/{account-J55P3HXH.js → account-O62WFR7C.js} +23 -20
- package/dist/{account-J55P3HXH.js.map → account-O62WFR7C.js.map} +1 -1
- package/dist/{add-repo-ALVEGU25.js → add-repo-FTAMMPVM.js} +13 -13
- package/dist/{answer-CI2SPQQL.js → answer-LKNMN2ZM.js} +11 -11
- package/dist/{attach-7LBIFBLX.js → attach-A3KA4YTK.js} +20 -17
- package/dist/{attach-7LBIFBLX.js.map → attach-A3KA4YTK.js.map} +1 -1
- package/dist/bin.js +4 -4
- package/dist/{block-TVIYWRJ5.js → block-3ZUFH2RO.js} +12 -12
- package/dist/{broadcast-GZNMZFOY.js → broadcast-I23BZI3R.js} +8 -8
- package/dist/{catchup-ZURJI6BF.js → catchup-G4EOJIZP.js} +13 -13
- package/dist/{child-K6YYF6MQ.js → child-MVNEFA2I.js} +11 -11
- package/dist/{chunk-ZTWZS5RK.js → chunk-24FQ5XXN.js} +3 -3
- package/dist/{chunk-D2SVBU7R.js → chunk-2FNYJEOH.js} +2 -2
- package/dist/{chunk-EEHPZMS3.js → chunk-2JLG65GB.js} +2 -2
- package/dist/{chunk-DC73NF67.js → chunk-2MJQTFTI.js} +3 -3
- package/dist/chunk-44QJVFOF.js +64 -0
- package/dist/chunk-44QJVFOF.js.map +1 -0
- package/dist/{chunk-7Q5PBXF6.js → chunk-4FN45EAF.js} +51 -10
- package/dist/chunk-4FN45EAF.js.map +1 -0
- package/dist/{chunk-G4T2HGLJ.js → chunk-4HQEYZIM.js} +4 -4
- package/dist/{chunk-WRDULHAN.js → chunk-5QENUGSC.js} +117 -16
- package/dist/chunk-5QENUGSC.js.map +1 -0
- package/dist/{chunk-CA56ETYX.js → chunk-5SXTMOO6.js} +5 -5
- package/dist/chunk-6KMG4WNW.js +87 -0
- package/dist/chunk-6KMG4WNW.js.map +1 -0
- package/dist/{chunk-OCUUM755.js → chunk-6PZ7RCXK.js} +2 -2
- package/dist/{chunk-RTCTD5PJ.js → chunk-773UJC5C.js} +4 -4
- package/dist/{chunk-W4GDPHIF.js → chunk-7ZATXG5F.js} +2 -2
- package/dist/{chunk-PTAG6WIE.js → chunk-APHVSSLI.js} +17 -3
- package/dist/chunk-APHVSSLI.js.map +1 -0
- package/dist/chunk-BCYBF7KJ.js +207 -0
- package/dist/chunk-BCYBF7KJ.js.map +1 -0
- package/dist/{chunk-6Y3VLCKA.js → chunk-BI7HIO2I.js} +3 -3
- package/dist/{chunk-FGBLFF4O.js → chunk-BMPTUIP4.js} +2 -2
- package/dist/{chunk-VQDE3DRG.js → chunk-DHZ5DF6Y.js} +6 -2
- package/dist/{chunk-VQDE3DRG.js.map → chunk-DHZ5DF6Y.js.map} +1 -1
- package/dist/{chunk-BQS73CWR.js → chunk-ET5K6S5H.js} +2 -2
- package/dist/{chunk-B2WV5RAL.js → chunk-ETAPX4JN.js} +5 -5
- package/dist/{chunk-3ZPVKUYD.js → chunk-ETWP7MDS.js} +7 -1
- package/dist/chunk-ETWP7MDS.js.map +1 -0
- package/dist/{chunk-RLPC3YKZ.js → chunk-FHC6KHIH.js} +2 -2
- package/dist/{chunk-DF4GOVDE.js → chunk-GF7RAQFD.js} +2 -2
- package/dist/{chunk-ZO7TF5OL.js → chunk-GHY7GZWN.js} +4 -4
- package/dist/{chunk-5FIUVBUC.js → chunk-GN7EAXHU.js} +7 -7
- package/dist/{chunk-EYJ42LDG.js → chunk-GTFMUWK6.js} +4 -4
- package/dist/{chunk-4QMWNAEJ.js → chunk-HCYES6U7.js} +2 -2
- package/dist/{chunk-TOMDOA4P.js → chunk-HNZ736XN.js} +2 -2
- package/dist/{chunk-ATQB6PTV.js → chunk-HPUD5IGB.js} +3 -3
- package/dist/{chunk-FV7BSQPQ.js → chunk-HQDQRC4F.js} +2 -2
- package/dist/{chunk-AITL3JYB.js → chunk-HUWWMTNG.js} +399 -69
- package/dist/chunk-HUWWMTNG.js.map +1 -0
- package/dist/{chunk-SDYY5MHW.js → chunk-INXHVNMZ.js} +7 -7
- package/dist/{chunk-QNOJOZYK.js → chunk-IRDWXDID.js} +2 -2
- package/dist/{chunk-EA4C6TVY.js → chunk-IVS2MAHD.js} +3 -3
- package/dist/{chunk-QOLHDDM2.js → chunk-IXC6EXVJ.js} +4 -4
- package/dist/{chunk-IU6LA6EB.js → chunk-IXZOZZGD.js} +4 -4
- package/dist/{chunk-SZAD5U3J.js → chunk-LB2GAU7E.js} +2 -2
- package/dist/{chunk-VHENFC2S.js → chunk-M2X6OHHR.js} +14 -1
- package/dist/chunk-M2X6OHHR.js.map +1 -0
- package/dist/{chunk-23QLXVH6.js → chunk-MQXMYVZV.js} +12 -14
- package/dist/{chunk-23QLXVH6.js.map → chunk-MQXMYVZV.js.map} +1 -1
- package/dist/{chunk-GNERWNZY.js → chunk-MVBBESXK.js} +4 -4
- package/dist/{chunk-AIYZJ7XD.js → chunk-N7T6NPE2.js} +5 -5
- package/dist/{chunk-GQ5WECPJ.js → chunk-NREZVTBP.js} +3 -3
- package/dist/chunk-NRX5V443.js +9 -0
- package/dist/{chunk-USENBMUV.js → chunk-NS7WH53I.js} +1 -1
- package/dist/chunk-NS7WH53I.js.map +1 -0
- package/dist/{chunk-KQMHGEI2.js → chunk-NWKVTUTN.js} +53 -15
- package/dist/chunk-NWKVTUTN.js.map +1 -0
- package/dist/chunk-NXS53NHR.js +79 -0
- package/dist/chunk-NXS53NHR.js.map +1 -0
- package/dist/{chunk-NYGKSOQ4.js → chunk-OPV6BE3W.js} +6 -6
- package/dist/{chunk-UAF2YFLZ.js → chunk-ROEEXEN7.js} +6 -6
- package/dist/{chunk-F4UIKOU6.js → chunk-TL7VLRRF.js} +4 -4
- package/dist/{chunk-NOQA7MJ4.js → chunk-U2A2DHWP.js} +3 -3
- package/dist/{chunk-Q2B3NUSM.js → chunk-U4XSBYQW.js} +4 -4
- package/dist/{chunk-Z4FWXDJG.js → chunk-VH5FRKJM.js} +3 -3
- package/dist/{chunk-DCENKA6E.js → chunk-W5YYTITQ.js} +2 -2
- package/dist/{chunk-5P27YL64.js → chunk-WOY35FXP.js} +8 -8
- package/dist/{chunk-HI674QZF.js → chunk-XIN6XUFL.js} +2 -2
- package/dist/{chunk-KU3TQAA7.js → chunk-XTAYJDL2.js} +8 -10
- package/dist/{chunk-KU3TQAA7.js.map → chunk-XTAYJDL2.js.map} +1 -1
- package/dist/{chunk-EVTMZ5IH.js → chunk-XWKN2HJD.js} +60 -60
- package/dist/{chunk-CMRTNTMU.js → chunk-YKTJL4SW.js} +6 -6
- package/dist/{chunk-RNPNBGVX.js → chunk-ZG6HB4BO.js} +3 -5
- package/dist/{chunk-RNPNBGVX.js.map → chunk-ZG6HB4BO.js.map} +1 -1
- package/dist/{chunk-PUJSLL6R.js → chunk-ZLPK2LQ3.js} +5 -5
- package/dist/{chunk-LV5JRLBM.js → chunk-ZMJR4Z6O.js} +17 -7
- package/dist/chunk-ZMJR4Z6O.js.map +1 -0
- package/dist/{chunk-YO3BNAAK.js → chunk-ZNRPBP5O.js} +27 -5
- package/dist/chunk-ZNRPBP5O.js.map +1 -0
- package/dist/{chunk-Z4P23XG3.js → chunk-ZX4ONO5Y.js} +5 -5
- package/dist/{cleanup-G4WQACD6.js → cleanup-ANVUCOBK.js} +32 -31
- package/dist/{cleanup-G4WQACD6.js.map → cleanup-ANVUCOBK.js.map} +1 -1
- package/dist/{cli-OPORB5PF.js → cli-CAF6VCVO.js} +4 -4
- package/dist/{color-C223W3Z6.js → color-7CQNI6Y4.js} +11 -11
- package/dist/{config-KQYXQCQA.js → config-EXQY26W4.js} +10 -10
- package/dist/{coordinate-4E5GIMC6.js → coordinate-LRY7LXS6.js} +11 -11
- package/dist/{diff-HEOLTXO2.js → diff-JRK3AUD5.js} +12 -13
- package/dist/{diff-HEOLTXO2.js.map → diff-JRK3AUD5.js.map} +1 -1
- package/dist/{digest-GYF4YLUH.js → digest-2AFW3WBL.js} +11 -11
- package/dist/{fork-B35ONP3Z.js → fork-DSNMPWUE.js} +29 -26
- package/dist/{fork-B35ONP3Z.js.map → fork-DSNMPWUE.js.map} +1 -1
- package/dist/{history-25DNQKKC.js → history-RFIDCGQY.js} +8 -8
- package/dist/{hook-B4JO2X57.js → hook-XBALB337.js} +20 -20
- package/dist/{hydrate-IJEKNZIP.js → hydrate-DAEY4PB6.js} +8 -8
- package/dist/{init-UJVOUDJI.js → init-4BK3T34W.js} +12 -12
- package/dist/{install-skills-FV2L5QHE.js → install-skills-TL5D7HZU.js} +8 -9
- package/dist/install-skills-bin.js +7 -8
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{keep-PKXGFZO2.js → keep-57TUKADV.js} +10 -10
- package/dist/{list-VYQ3QE2H.js → list-DRQRIT6U.js} +8 -8
- package/dist/{move-IAZY23ZX.js → move-UEHJ375P.js} +16 -16
- package/dist/{note-6HQUKUYY.js → note-FHPDVBRI.js} +10 -10
- package/dist/{overlaps-CGP3RJOW.js → overlaps-GKAKEUB6.js} +13 -13
- package/dist/{pin-PAWGQ4Q2.js → pin-CFTQDPPC.js} +11 -11
- package/dist/{pr-OJOGE3A3.js → pr-ZP4COZEZ.js} +22 -21
- package/dist/{pr-OJOGE3A3.js.map → pr-ZP4COZEZ.js.map} +1 -1
- package/dist/{prune-42MS36OR.js → prune-IQB2T45B.js} +29 -29
- package/dist/pty-host-BPFGJFBC.js +2658 -0
- package/dist/pty-host-BPFGJFBC.js.map +1 -0
- package/dist/{read-ATNCW4KH.js → read-DHJ6VY44.js} +10 -10
- package/dist/{recent-MTBFQT36.js → recent-OZW2ZNJ4.js} +16 -15
- package/dist/{recent-MTBFQT36.js.map → recent-OZW2ZNJ4.js.map} +1 -1
- package/dist/{remove-GLDJOKUI.js → remove-MW25RLNV.js} +30 -30
- package/dist/{report-AK7Z2Y4S.js → report-II75EKM6.js} +11 -11
- package/dist/{restart-DEPDGEZB.js → restart-4BGVRBX6.js} +11 -11
- package/dist/{resume-C2QPKKFN.js → resume-4J53KDCO.js} +16 -15
- package/dist/{resume-C2QPKKFN.js.map → resume-4J53KDCO.js.map} +1 -1
- package/dist/{review-RYAGH3PY.js → review-WKB3K6LI.js} +10 -10
- package/dist/{review-now-K4UWD7A5.js → review-now-AT2SPPRO.js} +2 -2
- package/dist/{run-WNP2SMNW.js → run-YS2D7WAQ.js} +8 -8
- package/dist/{screen-P746M4F2.js → screen-VVRNQXVW.js} +11 -11
- package/dist/{search-XQ2WMK5X.js → search-MKYCKZF4.js} +8 -8
- package/dist/{section-Q7TPOV7U.js → section-Y6RDD3MN.js} +11 -11
- package/dist/{send-EGG23J2B.js → send-AZM2XKN2.js} +12 -12
- package/dist/{sessions-2NNCWIND.js → sessions-OER6VNQJ.js} +26 -24
- package/dist/{sessions-2NNCWIND.js.map → sessions-OER6VNQJ.js.map} +1 -1
- package/dist/{show-KSMC7AJL.js → show-33VV3XCF.js} +10 -10
- package/dist/{snooze-4LVYUQEX.js → snooze-OFYZVVYS.js} +10 -10
- package/dist/{start-YKLLXW3L.js → start-OEQ5VW7Y.js} +11 -11
- package/dist/{state-GM22X3RN.js → state-HK67C4UA.js} +3 -3
- package/dist/state-HK67C4UA.js.map +1 -0
- package/dist/{status-4HGP4ZEF.js → status-HPYMNO2T.js} +11 -11
- package/dist/{statusline-QJ6CJGHB.js → statusline-Z5HLKDIA.js} +5 -5
- package/dist/{statusline-hook-Q645N4XF.js → statusline-hook-VPPS3PFO.js} +3 -3
- package/dist/{stop-YBQL6NFF.js → stop-QNICDWAU.js} +11 -11
- package/dist/{sync-DUXN2MFJ.js → sync-RH3M47QK.js} +29 -29
- package/dist/{time-Q42HPZZ3.js → time-PM72GK5W.js} +11 -11
- package/dist/{time-actions-IXZRVKKQ.js → time-actions-O3MCB7FU.js} +3 -3
- package/dist/{timesheet-YJ6O3GUU.js → timesheet-HJXQ4KHL.js} +15 -15
- package/dist/{todo-ZBFRL2A5.js → todo-UVKGOG7D.js} +2 -2
- package/dist/{tree-H2UYE6LH.js → tree-RGT736E3.js} +30 -28
- package/dist/{tree-H2UYE6LH.js.map → tree-RGT736E3.js.map} +1 -1
- package/dist/{update-RGNKMRUL.js → update-CMYVBWV3.js} +15 -15
- package/dist/{usage-YZRZKJ3H.js → usage-VEKD3JPL.js} +10 -10
- package/dist/{usage-ask-BYPNLA2B.js → usage-ask-V2SIRW4F.js} +3 -3
- package/dist/{version-4IOMOIDP.js → version-RJ4PCHPB.js} +5 -5
- package/dist/{wait-YOHPFWVJ.js → wait-RQZU3KDY.js} +11 -11
- package/dist/wd-bin.js +3 -3
- package/dist/web/assets/{PtyView-CYAhB_pW.js → PtyView-qP6blm2-.js} +26 -28
- package/dist/web/assets/PtyView-qP6blm2-.js.map +1 -0
- package/dist/web/assets/index-DuFRboh6.js +129 -0
- package/dist/web/assets/index-DuFRboh6.js.map +1 -0
- package/dist/web/assets/index-yBTfBzDm.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-Q672AIMZ.js → web-GOCU26ZD.js} +617 -526
- package/dist/web-GOCU26ZD.js.map +1 -0
- package/npm-shrinkwrap.json +3 -4
- package/package.json +2 -2
- package/dist/chunk-3ZPVKUYD.js.map +0 -1
- package/dist/chunk-7Q5PBXF6.js.map +0 -1
- package/dist/chunk-7ZOY2QQN.js +0 -43
- package/dist/chunk-7ZOY2QQN.js.map +0 -1
- package/dist/chunk-AITL3JYB.js.map +0 -1
- package/dist/chunk-EXZ4A6VJ.js +0 -9
- package/dist/chunk-ICEP4WAK.js +0 -256
- package/dist/chunk-ICEP4WAK.js.map +0 -1
- package/dist/chunk-KQMHGEI2.js.map +0 -1
- package/dist/chunk-LNHSBM4L.js +0 -26
- package/dist/chunk-LNHSBM4L.js.map +0 -1
- package/dist/chunk-LV5JRLBM.js.map +0 -1
- package/dist/chunk-PTAG6WIE.js.map +0 -1
- package/dist/chunk-USENBMUV.js.map +0 -1
- package/dist/chunk-VHENFC2S.js.map +0 -1
- package/dist/chunk-WRDULHAN.js.map +0 -1
- package/dist/chunk-YO3BNAAK.js.map +0 -1
- package/dist/pty-host-EAWW62U4.js +0 -1235
- package/dist/pty-host-EAWW62U4.js.map +0 -1
- package/dist/state-GM22X3RN.js.map +0 -1
- package/dist/web/assets/PtyView-CYAhB_pW.js.map +0 -1
- package/dist/web/assets/index-Ca7KbCED.css +0 -1
- package/dist/web/assets/index-iBmmgBZv.js +0 -129
- package/dist/web/assets/index-iBmmgBZv.js.map +0 -1
- package/dist/web-Q672AIMZ.js.map +0 -1
- /package/dist/{add-repo-ALVEGU25.js.map → add-repo-FTAMMPVM.js.map} +0 -0
- /package/dist/{answer-CI2SPQQL.js.map → answer-LKNMN2ZM.js.map} +0 -0
- /package/dist/{block-TVIYWRJ5.js.map → block-3ZUFH2RO.js.map} +0 -0
- /package/dist/{broadcast-GZNMZFOY.js.map → broadcast-I23BZI3R.js.map} +0 -0
- /package/dist/{catchup-ZURJI6BF.js.map → catchup-G4EOJIZP.js.map} +0 -0
- /package/dist/{child-K6YYF6MQ.js.map → child-MVNEFA2I.js.map} +0 -0
- /package/dist/{chunk-ZTWZS5RK.js.map → chunk-24FQ5XXN.js.map} +0 -0
- /package/dist/{chunk-D2SVBU7R.js.map → chunk-2FNYJEOH.js.map} +0 -0
- /package/dist/{chunk-EEHPZMS3.js.map → chunk-2JLG65GB.js.map} +0 -0
- /package/dist/{chunk-DC73NF67.js.map → chunk-2MJQTFTI.js.map} +0 -0
- /package/dist/{chunk-G4T2HGLJ.js.map → chunk-4HQEYZIM.js.map} +0 -0
- /package/dist/{chunk-CA56ETYX.js.map → chunk-5SXTMOO6.js.map} +0 -0
- /package/dist/{chunk-OCUUM755.js.map → chunk-6PZ7RCXK.js.map} +0 -0
- /package/dist/{chunk-RTCTD5PJ.js.map → chunk-773UJC5C.js.map} +0 -0
- /package/dist/{chunk-W4GDPHIF.js.map → chunk-7ZATXG5F.js.map} +0 -0
- /package/dist/{chunk-6Y3VLCKA.js.map → chunk-BI7HIO2I.js.map} +0 -0
- /package/dist/{chunk-FGBLFF4O.js.map → chunk-BMPTUIP4.js.map} +0 -0
- /package/dist/{chunk-BQS73CWR.js.map → chunk-ET5K6S5H.js.map} +0 -0
- /package/dist/{chunk-B2WV5RAL.js.map → chunk-ETAPX4JN.js.map} +0 -0
- /package/dist/{chunk-RLPC3YKZ.js.map → chunk-FHC6KHIH.js.map} +0 -0
- /package/dist/{chunk-DF4GOVDE.js.map → chunk-GF7RAQFD.js.map} +0 -0
- /package/dist/{chunk-ZO7TF5OL.js.map → chunk-GHY7GZWN.js.map} +0 -0
- /package/dist/{chunk-5FIUVBUC.js.map → chunk-GN7EAXHU.js.map} +0 -0
- /package/dist/{chunk-EYJ42LDG.js.map → chunk-GTFMUWK6.js.map} +0 -0
- /package/dist/{chunk-4QMWNAEJ.js.map → chunk-HCYES6U7.js.map} +0 -0
- /package/dist/{chunk-TOMDOA4P.js.map → chunk-HNZ736XN.js.map} +0 -0
- /package/dist/{chunk-ATQB6PTV.js.map → chunk-HPUD5IGB.js.map} +0 -0
- /package/dist/{chunk-FV7BSQPQ.js.map → chunk-HQDQRC4F.js.map} +0 -0
- /package/dist/{chunk-SDYY5MHW.js.map → chunk-INXHVNMZ.js.map} +0 -0
- /package/dist/{chunk-QNOJOZYK.js.map → chunk-IRDWXDID.js.map} +0 -0
- /package/dist/{chunk-EA4C6TVY.js.map → chunk-IVS2MAHD.js.map} +0 -0
- /package/dist/{chunk-QOLHDDM2.js.map → chunk-IXC6EXVJ.js.map} +0 -0
- /package/dist/{chunk-IU6LA6EB.js.map → chunk-IXZOZZGD.js.map} +0 -0
- /package/dist/{chunk-SZAD5U3J.js.map → chunk-LB2GAU7E.js.map} +0 -0
- /package/dist/{chunk-GNERWNZY.js.map → chunk-MVBBESXK.js.map} +0 -0
- /package/dist/{chunk-AIYZJ7XD.js.map → chunk-N7T6NPE2.js.map} +0 -0
- /package/dist/{chunk-GQ5WECPJ.js.map → chunk-NREZVTBP.js.map} +0 -0
- /package/dist/{chunk-EXZ4A6VJ.js.map → chunk-NRX5V443.js.map} +0 -0
- /package/dist/{chunk-NYGKSOQ4.js.map → chunk-OPV6BE3W.js.map} +0 -0
- /package/dist/{chunk-UAF2YFLZ.js.map → chunk-ROEEXEN7.js.map} +0 -0
- /package/dist/{chunk-F4UIKOU6.js.map → chunk-TL7VLRRF.js.map} +0 -0
- /package/dist/{chunk-NOQA7MJ4.js.map → chunk-U2A2DHWP.js.map} +0 -0
- /package/dist/{chunk-Q2B3NUSM.js.map → chunk-U4XSBYQW.js.map} +0 -0
- /package/dist/{chunk-Z4FWXDJG.js.map → chunk-VH5FRKJM.js.map} +0 -0
- /package/dist/{chunk-DCENKA6E.js.map → chunk-W5YYTITQ.js.map} +0 -0
- /package/dist/{chunk-5P27YL64.js.map → chunk-WOY35FXP.js.map} +0 -0
- /package/dist/{chunk-HI674QZF.js.map → chunk-XIN6XUFL.js.map} +0 -0
- /package/dist/{chunk-EVTMZ5IH.js.map → chunk-XWKN2HJD.js.map} +0 -0
- /package/dist/{chunk-CMRTNTMU.js.map → chunk-YKTJL4SW.js.map} +0 -0
- /package/dist/{chunk-PUJSLL6R.js.map → chunk-ZLPK2LQ3.js.map} +0 -0
- /package/dist/{chunk-Z4P23XG3.js.map → chunk-ZX4ONO5Y.js.map} +0 -0
- /package/dist/{cli-OPORB5PF.js.map → cli-CAF6VCVO.js.map} +0 -0
- /package/dist/{color-C223W3Z6.js.map → color-7CQNI6Y4.js.map} +0 -0
- /package/dist/{config-KQYXQCQA.js.map → config-EXQY26W4.js.map} +0 -0
- /package/dist/{coordinate-4E5GIMC6.js.map → coordinate-LRY7LXS6.js.map} +0 -0
- /package/dist/{digest-GYF4YLUH.js.map → digest-2AFW3WBL.js.map} +0 -0
- /package/dist/{history-25DNQKKC.js.map → history-RFIDCGQY.js.map} +0 -0
- /package/dist/{hook-B4JO2X57.js.map → hook-XBALB337.js.map} +0 -0
- /package/dist/{hydrate-IJEKNZIP.js.map → hydrate-DAEY4PB6.js.map} +0 -0
- /package/dist/{init-UJVOUDJI.js.map → init-4BK3T34W.js.map} +0 -0
- /package/dist/{install-skills-FV2L5QHE.js.map → install-skills-TL5D7HZU.js.map} +0 -0
- /package/dist/{keep-PKXGFZO2.js.map → keep-57TUKADV.js.map} +0 -0
- /package/dist/{list-VYQ3QE2H.js.map → list-DRQRIT6U.js.map} +0 -0
- /package/dist/{move-IAZY23ZX.js.map → move-UEHJ375P.js.map} +0 -0
- /package/dist/{note-6HQUKUYY.js.map → note-FHPDVBRI.js.map} +0 -0
- /package/dist/{overlaps-CGP3RJOW.js.map → overlaps-GKAKEUB6.js.map} +0 -0
- /package/dist/{pin-PAWGQ4Q2.js.map → pin-CFTQDPPC.js.map} +0 -0
- /package/dist/{prune-42MS36OR.js.map → prune-IQB2T45B.js.map} +0 -0
- /package/dist/{read-ATNCW4KH.js.map → read-DHJ6VY44.js.map} +0 -0
- /package/dist/{remove-GLDJOKUI.js.map → remove-MW25RLNV.js.map} +0 -0
- /package/dist/{report-AK7Z2Y4S.js.map → report-II75EKM6.js.map} +0 -0
- /package/dist/{restart-DEPDGEZB.js.map → restart-4BGVRBX6.js.map} +0 -0
- /package/dist/{review-RYAGH3PY.js.map → review-WKB3K6LI.js.map} +0 -0
- /package/dist/{review-now-K4UWD7A5.js.map → review-now-AT2SPPRO.js.map} +0 -0
- /package/dist/{run-WNP2SMNW.js.map → run-YS2D7WAQ.js.map} +0 -0
- /package/dist/{screen-P746M4F2.js.map → screen-VVRNQXVW.js.map} +0 -0
- /package/dist/{search-XQ2WMK5X.js.map → search-MKYCKZF4.js.map} +0 -0
- /package/dist/{section-Q7TPOV7U.js.map → section-Y6RDD3MN.js.map} +0 -0
- /package/dist/{send-EGG23J2B.js.map → send-AZM2XKN2.js.map} +0 -0
- /package/dist/{show-KSMC7AJL.js.map → show-33VV3XCF.js.map} +0 -0
- /package/dist/{snooze-4LVYUQEX.js.map → snooze-OFYZVVYS.js.map} +0 -0
- /package/dist/{start-YKLLXW3L.js.map → start-OEQ5VW7Y.js.map} +0 -0
- /package/dist/{status-4HGP4ZEF.js.map → status-HPYMNO2T.js.map} +0 -0
- /package/dist/{statusline-QJ6CJGHB.js.map → statusline-Z5HLKDIA.js.map} +0 -0
- /package/dist/{statusline-hook-Q645N4XF.js.map → statusline-hook-VPPS3PFO.js.map} +0 -0
- /package/dist/{stop-YBQL6NFF.js.map → stop-QNICDWAU.js.map} +0 -0
- /package/dist/{sync-DUXN2MFJ.js.map → sync-RH3M47QK.js.map} +0 -0
- /package/dist/{time-Q42HPZZ3.js.map → time-PM72GK5W.js.map} +0 -0
- /package/dist/{time-actions-IXZRVKKQ.js.map → time-actions-O3MCB7FU.js.map} +0 -0
- /package/dist/{timesheet-YJ6O3GUU.js.map → timesheet-HJXQ4KHL.js.map} +0 -0
- /package/dist/{todo-ZBFRL2A5.js.map → todo-UVKGOG7D.js.map} +0 -0
- /package/dist/{update-RGNKMRUL.js.map → update-CMYVBWV3.js.map} +0 -0
- /package/dist/{usage-YZRZKJ3H.js.map → usage-VEKD3JPL.js.map} +0 -0
- /package/dist/{usage-ask-BYPNLA2B.js.map → usage-ask-V2SIRW4F.js.map} +0 -0
- /package/dist/{version-4IOMOIDP.js.map → version-RJ4PCHPB.js.map} +0 -0
- /package/dist/{wait-YOHPFWVJ.js.map → wait-RQZU3KDY.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
hostOfPrUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U2A2DHWP.js";
|
|
5
5
|
import {
|
|
6
6
|
loadHistory,
|
|
7
7
|
parsePrLink
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HUWWMTNG.js";
|
|
9
9
|
import {
|
|
10
10
|
json,
|
|
11
11
|
sessionIdFor,
|
|
@@ -164,4 +164,4 @@ export {
|
|
|
164
164
|
blockRefFrom,
|
|
165
165
|
blockedPrState
|
|
166
166
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-24FQ5XXN.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
childText,
|
|
4
4
|
runWorkChild
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IXC6EXVJ.js";
|
|
6
6
|
import {
|
|
7
7
|
report
|
|
8
8
|
} from "./chunk-5ZCCUM75.js";
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
WORKTREE_REMOVED,
|
|
35
35
|
removeWorktreeInChild
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-2FNYJEOH.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XBWS77S2.js";
|
|
5
5
|
import {
|
|
6
6
|
logSwallowed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NWKVTUTN.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-
|
|
210
|
+
//# sourceMappingURL=chunk-2JLG65GB.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CONTEXT_WARN
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HQDQRC4F.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-
|
|
11
|
+
} from "./chunk-HUWWMTNG.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-
|
|
187
|
+
//# sourceMappingURL=chunk-2MJQTFTI.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
listProcessUsage
|
|
4
|
+
} from "./chunk-HUWWMTNG.js";
|
|
5
|
+
import {
|
|
6
|
+
isPidAlive,
|
|
7
|
+
killTreeAsync
|
|
8
|
+
} from "./chunk-M2X6OHHR.js";
|
|
9
|
+
|
|
10
|
+
// src/core/platform/process-tree.ts
|
|
11
|
+
function processesUnder(pid, rows) {
|
|
12
|
+
const byParent = /* @__PURE__ */ new Map();
|
|
13
|
+
for (const r of rows) if (r.pid !== r.ppid) byParent.set(r.ppid, [...byParent.get(r.ppid) ?? [], r]);
|
|
14
|
+
const out = [];
|
|
15
|
+
const seen = /* @__PURE__ */ new Set([pid]);
|
|
16
|
+
let level = [pid];
|
|
17
|
+
while (level.length) {
|
|
18
|
+
const next = [];
|
|
19
|
+
for (const p of level)
|
|
20
|
+
for (const child of byParent.get(p) ?? []) {
|
|
21
|
+
if (seen.has(child.pid)) continue;
|
|
22
|
+
seen.add(child.pid);
|
|
23
|
+
out.push(child);
|
|
24
|
+
next.push(child.pid);
|
|
25
|
+
}
|
|
26
|
+
level = next;
|
|
27
|
+
}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
function ancestorsOf(pid, rows) {
|
|
31
|
+
const parent = new Map(rows.map((r) => [r.pid, r.ppid]));
|
|
32
|
+
const out = /* @__PURE__ */ new Set();
|
|
33
|
+
for (let p = pid; p !== void 0 && p > 0 && !out.has(p); p = parent.get(p)) out.add(p);
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
function startedUnder(pid, rows, self) {
|
|
37
|
+
const under = processesUnder(pid, rows);
|
|
38
|
+
const above = ancestorsOf(self, rows);
|
|
39
|
+
if (!under.some((r) => r.pid === self)) return under.filter((r) => !above.has(r.pid));
|
|
40
|
+
const mine = /* @__PURE__ */ new Set([...above, ...processesUnder(self, rows).map((r) => r.pid)]);
|
|
41
|
+
return under.filter((r) => !mine.has(r.pid));
|
|
42
|
+
}
|
|
43
|
+
function sameProcess(then, now) {
|
|
44
|
+
if (!now) return false;
|
|
45
|
+
if (then.startedAt !== null && now.startedAt !== null) return Math.abs(then.startedAt - now.startedAt) <= 2e3;
|
|
46
|
+
return then.command === now.command;
|
|
47
|
+
}
|
|
48
|
+
var realStopIo = { list: () => listProcessUsage(), kill: killTreeAsync, alive: isPidAlive };
|
|
49
|
+
async function stopLeftovers(found, io = realStopIo) {
|
|
50
|
+
const live = found.filter((p) => io.alive(p.pid));
|
|
51
|
+
if (!live.length) return [];
|
|
52
|
+
const now = new Map((await io.list()).map((r) => [r.pid, r]));
|
|
53
|
+
const same = live.filter((p) => sameProcess(p, now.get(p.pid)));
|
|
54
|
+
const stopped = [];
|
|
55
|
+
for (const p of [...same].reverse()) if (await io.kill(p.pid)) stopped.push(p);
|
|
56
|
+
return stopped.reverse();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
processesUnder,
|
|
61
|
+
startedUnder,
|
|
62
|
+
stopLeftovers
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=chunk-44QJVFOF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/platform/process-tree.ts"],"sourcesContent":["import { isPidAlive, killTreeAsync } from './process.js';\nimport { listProcessUsage, type ProcessUsage } from './process-usage.js';\n\n/**\n * What an agent started, found while it still runs and stopped after it (reported: four `dotnet run` a Claude had\n * started kept running for days after it was gone — stopping a process on macOS and Linux kills that one process, and\n * its children are handed to launchd / init, where nothing says whose they were). The listing is\n * `listProcessUsage` (process-usage.ts), the one ⋯ → Processes… reads.\n */\nexport type ProcessRow = Pick<ProcessUsage, 'pid' | 'ppid' | 'command' | 'startedAt'>;\n\n/** Every process under `pid` (children, theirs, …), nearest first; never `pid` itself. Pure. */\nexport function processesUnder<T extends Pick<ProcessRow, 'pid' | 'ppid'>>(pid: number, rows: readonly T[]): T[] {\n const byParent = new Map<number, T[]>();\n for (const r of rows) if (r.pid !== r.ppid) byParent.set(r.ppid, [...(byParent.get(r.ppid) ?? []), r]);\n const out: T[] = [];\n const seen = new Set<number>([pid]);\n let level = [pid];\n while (level.length) {\n const next: number[] = [];\n for (const p of level)\n for (const child of byParent.get(p) ?? []) {\n if (seen.has(child.pid)) continue;\n seen.add(child.pid);\n out.push(child);\n next.push(child.pid);\n }\n level = next;\n }\n return out;\n}\n\n/** `pid` and the processes above it (its parent, theirs, …). Pure. */\nexport function ancestorsOf(pid: number, rows: readonly Pick<ProcessRow, 'pid' | 'ppid'>[]): Set<number> {\n const parent = new Map(rows.map((r) => [r.pid, r.ppid]));\n const out = new Set<number>();\n for (let p: number | undefined = pid; p !== undefined && p > 0 && !out.has(p); p = parent.get(p)) out.add(p);\n return out;\n}\n\n/**\n * What runs under `pid`, never `self` (this process: the PTY host), a process above it or one under it — a Claude may\n * have started the host itself (`work pty-host --restart` from its terminal): the host never stops itself, nor the\n * other sessions it runs. Pure.\n */\nexport function startedUnder<T extends Pick<ProcessRow, 'pid' | 'ppid'>>(pid: number, rows: readonly T[], self: number): T[] {\n const under = processesUnder(pid, rows);\n const above = ancestorsOf(self, rows);\n if (!under.some((r) => r.pid === self)) return under.filter((r) => !above.has(r.pid));\n // The host is under this agent: it, what is between them and everything the host runs stay.\n const mine = new Set([...above, ...processesUnder(self, rows).map((r) => r.pid)]);\n return under.filter((r) => !mine.has(r.pid));\n}\n\n/** The same process as when it was listed: same start time (±2 s) where both say, else the same command line (§1.6). Pure. */\nexport function sameProcess(then: ProcessRow, now: ProcessRow | undefined): boolean {\n if (!now) return false;\n if (then.startedAt !== null && now.startedAt !== null) return Math.abs(then.startedAt - now.startedAt) <= 2000;\n return then.command === now.command;\n}\n\nexport interface StopIo {\n list: () => Promise<ProcessRow[]>;\n kill: (pid: number) => Promise<boolean>;\n alive: (pid: number) => boolean;\n}\n\nexport const realStopIo: StopIo = { list: () => listProcessUsage(), kill: killTreeAsync, alive: isPidAlive };\n\n/**\n * Stop processes found earlier, each only if it is still the same process (pids are reused, §1.6), deepest first so a\n * parent doesn't start a child again. Returns the ones it stopped, in the order given.\n */\nexport async function stopLeftovers(found: readonly ProcessRow[], io: StopIo = realStopIo): Promise<ProcessRow[]> {\n const live = found.filter((p) => io.alive(p.pid));\n if (!live.length) return [];\n const now = new Map((await io.list()).map((r) => [r.pid, r]));\n const same = live.filter((p) => sameProcess(p, now.get(p.pid)));\n const stopped: ProcessRow[] = [];\n for (const p of [...same].reverse()) if (await io.kill(p.pid)) stopped.push(p);\n return stopped.reverse();\n}\n"],"mappings":";;;;;;;;;;AAYO,SAAS,eAA2D,KAAa,MAAyB;AAC/G,QAAM,WAAW,oBAAI,IAAiB;AACtC,aAAW,KAAK,KAAM,KAAI,EAAE,QAAQ,EAAE,KAAM,UAAS,IAAI,EAAE,MAAM,CAAC,GAAI,SAAS,IAAI,EAAE,IAAI,KAAK,CAAC,GAAI,CAAC,CAAC;AACrG,QAAM,MAAW,CAAC;AAClB,QAAM,OAAO,oBAAI,IAAY,CAAC,GAAG,CAAC;AAClC,MAAI,QAAQ,CAAC,GAAG;AAChB,SAAO,MAAM,QAAQ;AACnB,UAAM,OAAiB,CAAC;AACxB,eAAW,KAAK;AACd,iBAAW,SAAS,SAAS,IAAI,CAAC,KAAK,CAAC,GAAG;AACzC,YAAI,KAAK,IAAI,MAAM,GAAG,EAAG;AACzB,aAAK,IAAI,MAAM,GAAG;AAClB,YAAI,KAAK,KAAK;AACd,aAAK,KAAK,MAAM,GAAG;AAAA,MACrB;AACF,YAAQ;AAAA,EACV;AACA,SAAO;AACT;AAGO,SAAS,YAAY,KAAa,MAAgE;AACvG,QAAM,SAAS,IAAI,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AACvD,QAAM,MAAM,oBAAI,IAAY;AAC5B,WAAS,IAAwB,KAAK,MAAM,UAAa,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,OAAO,IAAI,CAAC,EAAG,KAAI,IAAI,CAAC;AAC3G,SAAO;AACT;AAOO,SAAS,aAAyD,KAAa,MAAoB,MAAmB;AAC3H,QAAM,QAAQ,eAAe,KAAK,IAAI;AACtC,QAAM,QAAQ,YAAY,MAAM,IAAI;AACpC,MAAI,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,QAAQ,IAAI,EAAG,QAAO,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,GAAG,CAAC;AAEpF,QAAM,OAAO,oBAAI,IAAI,CAAC,GAAG,OAAO,GAAG,eAAe,MAAM,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAChF,SAAO,MAAM,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,CAAC;AAC7C;AAGO,SAAS,YAAY,MAAkB,KAAsC;AAClF,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,KAAK,cAAc,QAAQ,IAAI,cAAc,KAAM,QAAO,KAAK,IAAI,KAAK,YAAY,IAAI,SAAS,KAAK;AAC1G,SAAO,KAAK,YAAY,IAAI;AAC9B;AAQO,IAAM,aAAqB,EAAE,MAAM,MAAM,iBAAiB,GAAG,MAAM,eAAe,OAAO,WAAW;AAM3G,eAAsB,cAAc,OAA8B,KAAa,YAAmC;AAChH,QAAM,OAAO,MAAM,OAAO,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC;AAChD,MAAI,CAAC,KAAK,OAAQ,QAAO,CAAC;AAC1B,QAAM,MAAM,IAAI,KAAK,MAAM,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5D,QAAM,OAAO,KAAK,OAAO,CAAC,MAAM,YAAY,GAAG,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC;AAC9D,QAAM,UAAwB,CAAC;AAC/B,aAAW,KAAK,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAG,KAAI,MAAM,GAAG,KAAK,EAAE,GAAG,EAAG,SAAQ,KAAK,CAAC;AAC7E,SAAO,QAAQ,QAAQ;AACzB;","names":[]}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
AckCounter,
|
|
4
|
+
ackFrame,
|
|
5
|
+
sameGrid,
|
|
6
|
+
utf16Length,
|
|
7
|
+
validGrid,
|
|
8
|
+
withFlow,
|
|
9
|
+
withGrid
|
|
10
|
+
} from "./chunk-6KMG4WNW.js";
|
|
2
11
|
import {
|
|
3
12
|
spawnSpecFor
|
|
4
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5QENUGSC.js";
|
|
5
14
|
import {
|
|
6
15
|
PtyHostClient,
|
|
7
16
|
ensureHost
|
|
8
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NREZVTBP.js";
|
|
9
18
|
import {
|
|
10
19
|
sessionIdFor
|
|
11
20
|
} from "./chunk-QGUBOOEN.js";
|
|
@@ -16,6 +25,32 @@ import {
|
|
|
16
25
|
// src/commands/shared/attach-session.ts
|
|
17
26
|
import chalk from "chalk";
|
|
18
27
|
import { WebSocket } from "ws";
|
|
28
|
+
|
|
29
|
+
// src/core/pty/terminal-reset.ts
|
|
30
|
+
var KITTY_KEYS_OFF = "\x1B[<255u\x1B[=0;1u";
|
|
31
|
+
var TERMINAL_RESET = KITTY_KEYS_OFF + "\x1B7\x1B[?1049l" + KITTY_KEYS_OFF + "\x1B[?9;1000;1002;1003;1005;1006;1015;1016l\x1B[?1004;2004l\x1B[?1l\x1B>\x1B[>4m\x1B7\x1B[r\x1B8\x1B[0 q\x1B[?25h\x1B(B\x1B[0m";
|
|
32
|
+
|
|
33
|
+
// src/commands/shared/attach-output.ts
|
|
34
|
+
var CLEAR_SCREEN = "\x1B[2J\x1B[H";
|
|
35
|
+
function attachOutput(io) {
|
|
36
|
+
let replayed = false;
|
|
37
|
+
const acks = new AckCounter((chars) => io.ack(chars));
|
|
38
|
+
return {
|
|
39
|
+
output(data) {
|
|
40
|
+
const chars = utf16Length(data);
|
|
41
|
+
io.write(data, () => acks.drawn(chars));
|
|
42
|
+
},
|
|
43
|
+
replay(data) {
|
|
44
|
+
const first = !replayed;
|
|
45
|
+
replayed = true;
|
|
46
|
+
io.write(CLEAR_SCREEN + data, () => {
|
|
47
|
+
});
|
|
48
|
+
return first;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// src/commands/shared/attach-session.ts
|
|
19
54
|
var DETACH = "";
|
|
20
55
|
async function attachSession(session, launch = {}) {
|
|
21
56
|
const spec = spawnSpecFor(session);
|
|
@@ -45,10 +80,17 @@ async function attachSession(session, launch = {}) {
|
|
|
45
80
|
env
|
|
46
81
|
});
|
|
47
82
|
process.stdout.write(`\x1B]0;${session.target} \xB7 ${session.branch || "(base)"}\x07`);
|
|
48
|
-
const
|
|
83
|
+
const grid = validGrid(cols, rows);
|
|
84
|
+
const ws = new WebSocket(withGrid(withFlow(host.attachUrl(id), { screenOnly: true }), grid));
|
|
49
85
|
const sendFrame = (frame) => {
|
|
50
86
|
if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify(frame));
|
|
51
87
|
};
|
|
88
|
+
const screen = attachOutput({
|
|
89
|
+
write: (data, done) => process.stdout.write(data, () => done()),
|
|
90
|
+
ack: (chars) => {
|
|
91
|
+
if (ws.readyState === WebSocket.OPEN) ws.send(ackFrame(chars));
|
|
92
|
+
}
|
|
93
|
+
});
|
|
52
94
|
let exitCode = 0;
|
|
53
95
|
let message = "";
|
|
54
96
|
const stdin = process.stdin;
|
|
@@ -76,18 +118,16 @@ async function attachSession(session, launch = {}) {
|
|
|
76
118
|
process.stdout.on("resize", onResize);
|
|
77
119
|
ws.on("message", (data, isBinary) => {
|
|
78
120
|
if (isBinary) {
|
|
79
|
-
|
|
121
|
+
screen.output(data);
|
|
80
122
|
return;
|
|
81
123
|
}
|
|
82
124
|
try {
|
|
83
125
|
const msg = JSON.parse(data.toString());
|
|
84
126
|
if (msg.type === "replay") {
|
|
85
|
-
|
|
127
|
+
if (!screen.replay(msg.data ?? "")) return;
|
|
86
128
|
replayed = true;
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
sendFrame({ type: "resize", cols: c, rows: Math.max(2, r - 1) });
|
|
90
|
-
sendFrame({ type: "resize", cols: c, rows: r });
|
|
129
|
+
const own = validGrid(process.stdout.columns || cols, process.stdout.rows || rows);
|
|
130
|
+
if (own && !sameGrid(own, validGrid(msg.cols, msg.rows))) sendFrame({ type: "resize", ...own });
|
|
91
131
|
} else if (msg.type === "exit") {
|
|
92
132
|
exitCode = msg.code ?? 0;
|
|
93
133
|
message = "Claude exited.";
|
|
@@ -108,6 +148,7 @@ async function attachSession(session, launch = {}) {
|
|
|
108
148
|
});
|
|
109
149
|
restoreTty();
|
|
110
150
|
process.stdout.off("resize", onResize);
|
|
151
|
+
if (process.stdout.isTTY) process.stdout.write(TERMINAL_RESET);
|
|
111
152
|
if (message) process.stderr.write("\r\n" + chalk.gray(message) + "\r\n");
|
|
112
153
|
stdin.destroy();
|
|
113
154
|
return exitCode;
|
|
@@ -116,4 +157,4 @@ async function attachSession(session, launch = {}) {
|
|
|
116
157
|
export {
|
|
117
158
|
attachSession
|
|
118
159
|
};
|
|
119
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-4FN45EAF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/shared/attach-session.ts","../src/core/pty/terminal-reset.ts","../src/commands/shared/attach-output.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { WebSocket } from 'ws';\nimport type { WorktreeSession } from '../../core/sessions/history.js';\nimport { sessionIdFor } from '../../core/sessions/web-state.js';\nimport { spawnSpecFor } from '../../core/pty/pty-pool.js';\nimport { ensureHost, PtyHostClient } from '../../core/pty/pty-host-client.js';\nimport { resolveWorkBinPath } from '../../core/platform/work-bin.js';\nimport { TERMINAL_RESET } from '../../core/pty/terminal-reset.js';\nimport { ackFrame, withFlow } from '../../core/pty/flow-control.js';\nimport { sameGrid, validGrid, withGrid } from '../../core/pty/terminal-size.js';\nimport { attachOutput } from './attach-output.js';\n\n// Bridges this terminal to a session in the PTY host. Shared by\n// `work attach` and `work tree --host`; it lives here rather than in either\n// command so commands never import each other (architecture rule).\n\n/** Ctrl+] — detaches, leaving Claude running in the PTY host. Same key\n * telnet uses; Claude Code doesn't bind it. */\nconst DETACH = '\\x1d';\n\n/** One-shot launch options `work tree --host` forwards on first spawn. */\nexport interface AttachSpawnOptions {\n fresh?: boolean;\n initialPrompt?: string;\n /** Forward this process's environment (PATH, AWS_PROFILE, WT_SESSION…)\n * so the tool sees the shell it was launched from. */\n forwardEnv?: boolean;\n}\n\n/**\n * Spawn the session's tool in the PTY host if it isn't running, then bridge\n * this terminal to it until the tool exits or the user detaches (Ctrl+]).\n * Shared by `work attach` and `work tree --host`. Resolves to the exit code\n * the caller should report; never calls process.exit (see the end).\n */\nexport async function attachSession(session: WorktreeSession, launch: AttachSpawnOptions = {}): Promise<number> {\n const spec = spawnSpecFor(session);\n if (!spec) {\n console.error(chalk.red('Session has no worktree path.'));\n return 1;\n }\n\n const id = sessionIdFor(session);\n const host = new PtyHostClient(await ensureHost(resolveWorkBinPath(process.argv[1])));\n const cols = process.stdout.columns || 120;\n const rows = process.stdout.rows || 32;\n const existing = await host.get(id);\n if (existing && !existing.exited && (launch.initialPrompt || launch.fresh)) {\n // Spawn is idempotent — a live session keeps its conversation.\n console.error(\n chalk.yellow(\n `Session already running in the PTY host — attaching to it; ${launch.initialPrompt ? '--prompt' : '--fresh'} not applied.`,\n ),\n );\n }\n const env = launch.forwardEnv\n ? Object.fromEntries(Object.entries(process.env).filter((e): e is [string, string] => e[1] != null))\n : undefined;\n await host.spawn(id, {\n ...spec,\n cols,\n rows,\n fresh: launch.fresh,\n initialPrompt: launch.initialPrompt,\n env,\n });\n\n // Tab title = the session, so a row of Windows Terminal tabs reads as\n // a list of agents rather than ten \"claude\"s.\n process.stdout.write(`\\x1b]0;${session.target} · ${session.branch || '(base)'}\\x07`);\n\n // It acks what your terminal took (`?flow=1`): a terminal slower than the agent is paced, or sent the screen once it caught up.\n // It states your terminal's grid (`?cols&rows`, terminal-size.ts): the host resizes the PTY to it before it takes the\n // screen it sends first, so that screen is drawn for this terminal, and the agent's repaint for it follows as output.\n const grid = validGrid(cols, rows);\n const ws = new WebSocket(withGrid(withFlow(host.attachUrl(id), { screenOnly: true }), grid));\n const sendFrame = (frame: object) => {\n if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify(frame));\n };\n const screen = attachOutput({\n write: (data, done) => process.stdout.write(data, () => done()),\n ack: (chars) => {\n if (ws.readyState === WebSocket.OPEN) ws.send(ackFrame(chars));\n },\n });\n let exitCode = 0;\n let message = '';\n\n const stdin = process.stdin;\n const restoreTty = () => {\n if (stdin.isTTY) stdin.setRawMode(false);\n stdin.pause();\n };\n\n ws.on('open', () => {\n if (stdin.isTTY) stdin.setRawMode(true);\n stdin.resume();\n stdin.on('data', (buf: Buffer) => {\n const data = buf.toString('utf-8');\n if (data === DETACH) {\n message = 'Detached — Claude keeps running. `work attach` to come back.';\n ws.close(1000);\n return;\n }\n // Held until the replay is drawn (it's always the first frame).\n if (replayed) sendFrame({ type: 'input', data });\n });\n });\n let replayed = false;\n const onResize = () => {\n sendFrame({ type: 'resize', cols: process.stdout.columns, rows: process.stdout.rows });\n };\n process.stdout.on('resize', onResize);\n ws.on('message', (data, isBinary) => {\n if (isBinary) {\n screen.output(data as Buffer);\n return;\n }\n try {\n const msg = JSON.parse(data.toString()) as {\n type?: string;\n code?: number;\n message?: string;\n data?: string;\n cols?: number;\n rows?: number;\n };\n if (msg.type === 'replay') {\n // A later one (it fell behind and caught up) is only drawn: no resize, which would take the PTY's size.\n if (!screen.replay(msg.data ?? '')) return;\n replayed = true;\n // Drawn at this terminal's grid (a current host took the grid stated above): nothing to do — the PTY is at it,\n // and an agent that had to repaint for it did so as the output that follows. Drawn at another (an older host,\n // which ignores the parameters; or the terminal resized meanwhile): this terminal's grid, which makes the agent\n // repaint for it. It used to nudge the size a row and back here instead, a repaint on every attach.\n const own = validGrid(process.stdout.columns || cols, process.stdout.rows || rows);\n if (own && !sameGrid(own, validGrid(msg.cols, msg.rows))) sendFrame({ type: 'resize', ...own });\n } else if (msg.type === 'exit') {\n exitCode = msg.code ?? 0;\n message = 'Claude exited.';\n } else if (msg.type === 'error') {\n exitCode = 1;\n message = msg.message ?? 'PTY host error';\n }\n } catch {\n /* not a control frame */\n }\n });\n await new Promise<void>((resolve) => {\n ws.on('close', () => resolve());\n ws.on('error', (err) => {\n exitCode = 1;\n message = `Lost the PTY host: ${err.message}`;\n resolve();\n });\n });\n restoreTty();\n process.stdout.off('resize', onResize);\n // The agent's modes (mouse, paste, kitty keys, hidden cursor, alternate screen…) off again in your own terminal.\n if (process.stdout.isTTY) process.stdout.write(TERMINAL_RESET);\n if (message) process.stderr.write('\\r\\n' + chalk.gray(message) + '\\r\\n');\n // Let the event loop drain instead of process.exit(): on Windows,\n // exiting while a fetch's AbortSignal.timeout is still pending trips a\n // libuv assertion (`!(handle->flags & UV_HANDLE_CLOSING)`, exit code\n // 0xC0000409) — i.e. a quick detach crashed.\n stdin.destroy();\n return exitCode;\n}\n","/**\n * What `work attach` writes to your own terminal when it lets go of a session (Ctrl+], the agent ended, the PTY\n * host went away): the agent's input and screen modes would otherwise stay on in the shell you return to — the\n * mouse reporting escape codes on every click, a paste arriving wrapped in 200~/201~, keys stuck in kitty's CSI-u\n * encoding or modifyOtherKeys, no cursor, a scroll region, the alternate screen. Fixed, not tracked: the client\n * doesn't parse what it shows, and each of these is harmless to say when it is already off. Pure (no imports).\n *\n * - kitty keyboard flags: pop more than any stack holds (which empties it), then flags 0 — once for the alternate\n * screen's stack and once, after leaving it, for the main screen's (kitty keeps one per screen).\n * - ESC 7 before 1049l: 1049l puts back the cursor 1049h saved; on the main screen already, it puts back the one\n * ESC 7 just saved, so the cursor stays where it is.\n * - The scroll region: DECSTBM homes the cursor, so between ESC 7 and ESC 8.\n * - `CSI > 4 m` (modifyOtherKeys back to default) before the SGR reset: a terminal that doesn't know it may take it\n * for SGR 4 (underline), which the reset at the end undoes.\n */\nconst KITTY_KEYS_OFF = '\\x1b[<255u\\x1b[=0;1u';\n\nexport const TERMINAL_RESET =\n KITTY_KEYS_OFF +\n '\\x1b7\\x1b[?1049l' +\n KITTY_KEYS_OFF +\n '\\x1b[?9;1000;1002;1003;1005;1006;1015;1016l' + // mouse reporting off, every encoding\n '\\x1b[?1004;2004l' + // focus reports, bracketed paste\n '\\x1b[?1l\\x1b>' + // cursor keys and keypad: normal\n '\\x1b[>4m' + // modifyOtherKeys: default\n '\\x1b7\\x1b[r\\x1b8' + // scroll region: the whole screen\n '\\x1b[0 q\\x1b[?25h' + // cursor: the terminal's own shape, shown\n '\\x1b(B\\x1b[0m'; // ASCII, default colours\n","import { AckCounter, utf16Length } from '../../core/pty/flow-control.js';\n\n/**\n * Before every screen: the screen cleared, your terminal's history above it kept — never `CSI 3 J`, which would erase\n * your shell's history from before the attach. A screen sent mid-session (this terminal fell behind and caught up:\n * output-pacer.ts) is the screen only (`withFlow(…, { screenOnly })`), so it adds nothing to that history; an older host\n * sends its scrollback too, drawn into your history again (a copy, nothing lost).\n */\nexport const CLEAR_SCREEN = '\\x1b[2J\\x1b[H';\n\nexport interface AttachOutput {\n /** PTY output: written, and acked once your terminal took it. */\n output(data: Uint8Array): void;\n /** A replay frame. True for the first one: the caller then nudges the size and starts sending input. A later one is only drawn. */\n replay(data: string): boolean;\n}\n\n/**\n * What `work attach` does with what the PTY host sends it: output written to your terminal and acked once written\n * (`process.stdout.write`'s callback: flow-control.ts), and each replay drawn over a cleared screen (a later one: it\n * fell behind). `ack` sends the ack frame.\n */\nexport function attachOutput(io: { write(data: Uint8Array | string, done: () => void): void; ack(chars: number): void }): AttachOutput {\n let replayed = false;\n const acks = new AckCounter((chars) => io.ack(chars));\n return {\n output(data) {\n const chars = utf16Length(data);\n io.write(data, () => acks.drawn(chars));\n },\n replay(data) {\n const first = !replayed;\n replayed = true;\n io.write(CLEAR_SCREEN + data, () => {});\n return first;\n },\n };\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sessionTokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IVS2MAHD.js";
|
|
5
5
|
import {
|
|
6
6
|
agedWindow
|
|
7
7
|
} from "./chunk-LK7HJGUC.js";
|
|
8
8
|
import {
|
|
9
9
|
lastConversationWriteMs,
|
|
10
10
|
loadHistory
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HUWWMTNG.js";
|
|
12
12
|
import {
|
|
13
13
|
dayKey
|
|
14
14
|
} from "./chunk-NEJVK5CF.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
knownAgents,
|
|
20
20
|
logSwallowed
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-NWKVTUTN.js";
|
|
22
22
|
|
|
23
23
|
// src/core/usage/usage-source.ts
|
|
24
24
|
var WEEK_DAYS = 7;
|
|
@@ -155,4 +155,4 @@ export {
|
|
|
155
155
|
setupAgentUsage,
|
|
156
156
|
restoreAgentUsage
|
|
157
157
|
};
|
|
158
|
-
//# sourceMappingURL=chunk-
|
|
158
|
+
//# sourceMappingURL=chunk-4HQEYZIM.js.map
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
PROGRESS_INDETERMINATE,
|
|
4
|
+
PROGRESS_SET,
|
|
5
|
+
streamSignalFrom
|
|
6
|
+
} from "./chunk-BCYBF7KJ.js";
|
|
2
7
|
import {
|
|
3
8
|
PtyHostBusyError,
|
|
4
9
|
PtyHostClient,
|
|
@@ -6,17 +11,17 @@ import {
|
|
|
6
11
|
ensureHost,
|
|
7
12
|
findHost,
|
|
8
13
|
findHostPatient
|
|
9
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NREZVTBP.js";
|
|
10
15
|
import {
|
|
11
16
|
findSession
|
|
12
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6PZ7RCXK.js";
|
|
13
18
|
import {
|
|
14
19
|
dbPtySessions,
|
|
15
20
|
forgetPersistedSession
|
|
16
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HCYES6U7.js";
|
|
17
22
|
import {
|
|
18
23
|
hostStartLockPath
|
|
19
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NS7WH53I.js";
|
|
20
25
|
import {
|
|
21
26
|
accountLoginId,
|
|
22
27
|
accountOfLoginId
|
|
@@ -24,10 +29,14 @@ import {
|
|
|
24
29
|
import {
|
|
25
30
|
ASSISTANT_ID,
|
|
26
31
|
prepareAssistantDir
|
|
27
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HNZ736XN.js";
|
|
33
|
+
import {
|
|
34
|
+
parentOf
|
|
35
|
+
} from "./chunk-DHZ5DF6Y.js";
|
|
28
36
|
import {
|
|
37
|
+
STALE_WORKING_MS,
|
|
29
38
|
noClaudeBecause
|
|
30
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-HUWWMTNG.js";
|
|
31
40
|
import {
|
|
32
41
|
sessionIdFor
|
|
33
42
|
} from "./chunk-QGUBOOEN.js";
|
|
@@ -36,17 +45,18 @@ import {
|
|
|
36
45
|
agentFor,
|
|
37
46
|
agentSettings,
|
|
38
47
|
assistantAgent,
|
|
48
|
+
bestEffort,
|
|
39
49
|
logSwallowed,
|
|
40
50
|
sessionToolFor,
|
|
41
51
|
swallow,
|
|
42
52
|
trustAgentFolder
|
|
43
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-NWKVTUTN.js";
|
|
44
54
|
import {
|
|
45
55
|
hasEnvDelta
|
|
46
56
|
} from "./chunk-ED6YLB4S.js";
|
|
47
57
|
import {
|
|
48
58
|
loadConfig
|
|
49
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-ETWP7MDS.js";
|
|
50
60
|
import {
|
|
51
61
|
ensureFile,
|
|
52
62
|
withFileLock
|
|
@@ -58,19 +68,74 @@ import {
|
|
|
58
68
|
// src/core/pty/output-status.ts
|
|
59
69
|
var OUTPUT_WORKING_MS = 1e4;
|
|
60
70
|
function statusFromOutput(p, now) {
|
|
61
|
-
if (!p.tool || p.tool === "claude"
|
|
71
|
+
if (!p.tool || p.tool === "claude") return null;
|
|
72
|
+
const said = p.signal ? statusFromSignal(p.signal, p.tool, p.lastOutputAt, now) : null;
|
|
73
|
+
if (said) return said;
|
|
74
|
+
if (!p.lastOutputAt) return null;
|
|
62
75
|
const at = Date.parse(p.lastOutputAt);
|
|
63
76
|
if (!Number.isFinite(at)) return null;
|
|
64
|
-
const
|
|
77
|
+
const working2 = now - at < OUTPUT_WORKING_MS;
|
|
65
78
|
return {
|
|
66
|
-
state:
|
|
79
|
+
state: working2 ? "working" : "idle",
|
|
67
80
|
seen: true,
|
|
68
81
|
since: p.lastOutputAt,
|
|
69
82
|
updatedAt: p.lastOutputAt,
|
|
70
83
|
stale: false,
|
|
71
|
-
summary: `${
|
|
84
|
+
summary: `${working2 ? "Printing" : "Quiet"} \u2014 from its terminal output (${p.tool} has no status hooks)`
|
|
72
85
|
};
|
|
73
86
|
}
|
|
87
|
+
var WAITING_FOR = /* @__PURE__ */ new Map([
|
|
88
|
+
["permission", "your permission"],
|
|
89
|
+
["question", "your answer"],
|
|
90
|
+
["auth", "you to sign in"]
|
|
91
|
+
]);
|
|
92
|
+
function statusFromSignal(signal, tool, lastOutputAt, now) {
|
|
93
|
+
const by = `${tool} says so in its terminal`;
|
|
94
|
+
const program = signal.program;
|
|
95
|
+
if (program) {
|
|
96
|
+
const percent = program.progress !== void 0 ? `, ${program.progress}%` : "";
|
|
97
|
+
const base = {
|
|
98
|
+
since: program.since,
|
|
99
|
+
updatedAt: lastOutputAt ?? program.since,
|
|
100
|
+
...program.progress !== void 0 ? { progress: program.progress } : {}
|
|
101
|
+
};
|
|
102
|
+
switch (program.state) {
|
|
103
|
+
case "working":
|
|
104
|
+
return working(base, lastOutputAt, now, `Working${percent}`, by);
|
|
105
|
+
case "blocked":
|
|
106
|
+
return {
|
|
107
|
+
...base,
|
|
108
|
+
state: "needs_input",
|
|
109
|
+
seen: false,
|
|
110
|
+
stale: false,
|
|
111
|
+
summary: program.message ?? `Waiting for ${WAITING_FOR.get(program.kind ?? "") ?? "you"}${percent} \u2014 ${by}`
|
|
112
|
+
};
|
|
113
|
+
case "done":
|
|
114
|
+
return { ...base, state: "idle", seen: true, stale: false, summary: program.message ?? `Finished \u2014 ${by}` };
|
|
115
|
+
case "error":
|
|
116
|
+
return { ...base, state: "idle", seen: true, stale: false, summary: program.message ?? `Stopped on an error \u2014 ${by}` };
|
|
117
|
+
case "idle":
|
|
118
|
+
return { ...base, state: "idle", seen: true, stale: false, summary: `Idle \u2014 ${by}` };
|
|
119
|
+
default:
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const bar = signal.progress;
|
|
124
|
+
if (bar && (bar.state === PROGRESS_SET || bar.state === PROGRESS_INDETERMINATE)) {
|
|
125
|
+
const set = bar.state === PROGRESS_SET;
|
|
126
|
+
const base = { since: bar.since, updatedAt: lastOutputAt ?? bar.since, ...set ? { progress: bar.percent } : {} };
|
|
127
|
+
return working(base, lastOutputAt, now, `Busy${set ? `, ${bar.percent}%` : ""}`, `its progress bar (${tool})`);
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
function working(base, lastOutputAt, now, what, by) {
|
|
132
|
+
const last = Date.parse(lastOutputAt ?? base.since);
|
|
133
|
+
if (Number.isFinite(last) && now - last > STALE_WORKING_MS) {
|
|
134
|
+
const quiet = `${Math.round(STALE_WORKING_MS / 6e4)} min`;
|
|
135
|
+
return { ...base, state: "idle", seen: true, stale: true, summary: `Said it was working, then printed nothing for ${quiet} \u2014 ${by}` };
|
|
136
|
+
}
|
|
137
|
+
return { ...base, state: "working", seen: true, stale: false, summary: `${what} \u2014 ${by}` };
|
|
138
|
+
}
|
|
74
139
|
|
|
75
140
|
// src/core/pty/pty-pool.ts
|
|
76
141
|
import path2 from "path";
|
|
@@ -142,7 +207,10 @@ async function refresh() {
|
|
|
142
207
|
live = new Set(ptys.filter((p) => !p.exited).map((p) => p.id));
|
|
143
208
|
livePids = new Set(ptys.filter((p) => !p.exited).map((p) => p.pid));
|
|
144
209
|
outputs = new Map(
|
|
145
|
-
ptys.filter((p) => !p.exited).map((p) =>
|
|
210
|
+
ptys.filter((p) => !p.exited).map((p) => {
|
|
211
|
+
const signal = streamSignalFrom(p.signal);
|
|
212
|
+
return [p.id, { tool: p.tool, lastOutputAt: p.lastOutputAt, startedAt: p.startedAt, pid: p.pid, ...signal ? { signal } : {} }];
|
|
213
|
+
})
|
|
146
214
|
);
|
|
147
215
|
} catch (err) {
|
|
148
216
|
beat.known = beat.known || err instanceof PtyHostBusyError;
|
|
@@ -190,6 +258,17 @@ function assistantSpec() {
|
|
|
190
258
|
...hasEnvDelta(agentEnv) ? { agentEnv } : {}
|
|
191
259
|
};
|
|
192
260
|
}
|
|
261
|
+
function coordinatorFolders(session) {
|
|
262
|
+
return bestEffort(
|
|
263
|
+
`coordinator folders of ${session.target}:${session.branch}`,
|
|
264
|
+
() => {
|
|
265
|
+
const link = parentOf(sessionIdFor(session));
|
|
266
|
+
const parent = link ? findSession(link.parentId) : null;
|
|
267
|
+
return parent ? agentFor(loadConfig(), parent).tempFolders?.(parent) ?? [] : [];
|
|
268
|
+
},
|
|
269
|
+
[]
|
|
270
|
+
) ?? [];
|
|
271
|
+
}
|
|
193
272
|
function spawnSpecFor(session) {
|
|
194
273
|
const first = session.paths[0];
|
|
195
274
|
if (!first) return null;
|
|
@@ -199,7 +278,9 @@ function spawnSpecFor(session) {
|
|
|
199
278
|
const launch = agent.launch;
|
|
200
279
|
trustAgentFolder(agent, session, cwd);
|
|
201
280
|
const agentEnv = launch.env?.(session);
|
|
202
|
-
const
|
|
281
|
+
const shared = coordinatorFolders(session);
|
|
282
|
+
const base = sessionToolFor(launch.tool(config), { write: mayStartHost });
|
|
283
|
+
const tool = shared.length && launch.withFolders ? launch.withFolders(base, shared) : base;
|
|
203
284
|
return { cwd, tool, port: session.port, ...hasEnvDelta(agentEnv) ? { agentEnv } : {} };
|
|
204
285
|
}
|
|
205
286
|
async function ensurePty(sessionId, extra = {}) {
|
|
@@ -210,7 +291,12 @@ async function ensurePty(sessionId, extra = {}) {
|
|
|
210
291
|
if (refused) throw new Error(refused);
|
|
211
292
|
const base = loginFor !== null ? accountLoginSpec(loginFor, agentFor(loadConfig()).accounts) : sessionId === ASSISTANT_ID ? assistantSpec() : session ? spawnSpecFor(session) : null;
|
|
212
293
|
if (!base) return null;
|
|
213
|
-
|
|
294
|
+
if (extra.attachOnly) return attachToRunning(sessionId);
|
|
295
|
+
const spec = {
|
|
296
|
+
...base,
|
|
297
|
+
...extra.initialPrompt ? { initialPrompt: extra.initialPrompt } : {},
|
|
298
|
+
...extra.grid ? { cols: extra.grid.cols, rows: extra.grid.rows } : {}
|
|
299
|
+
};
|
|
214
300
|
let c = await getClient(true);
|
|
215
301
|
if (!c) return null;
|
|
216
302
|
if (setsEnv(spec.agentEnv) && !await hostTakesAgentEnv(c) && !await runsIn(c, sessionId)) throw new Error(OLD_HOST_ACCOUNTS);
|
|
@@ -225,6 +311,21 @@ async function ensurePty(sessionId, extra = {}) {
|
|
|
225
311
|
live.add(sessionId);
|
|
226
312
|
return c.attachUrl(sessionId);
|
|
227
313
|
}
|
|
314
|
+
async function attachToRunning(sessionId) {
|
|
315
|
+
const look = async () => {
|
|
316
|
+
const c = await getClient(false);
|
|
317
|
+
return c ? { c, info: await c.get(sessionId) } : null;
|
|
318
|
+
};
|
|
319
|
+
let found = await look();
|
|
320
|
+
if (found && !found.info) {
|
|
321
|
+
client = null;
|
|
322
|
+
found = await look();
|
|
323
|
+
}
|
|
324
|
+
if (!found?.info || found.info.exited) throw new Error(NOT_RUNNING);
|
|
325
|
+
live.add(sessionId);
|
|
326
|
+
return found.c.attachUrl(sessionId);
|
|
327
|
+
}
|
|
328
|
+
var NOT_RUNNING = "its terminal is not running";
|
|
228
329
|
async function terminalTicketUrl(sessionId, origin) {
|
|
229
330
|
const c = await getClient(false);
|
|
230
331
|
return c ? c.ticketUrl(sessionId, origin).catch(() => null) : null;
|
|
@@ -429,4 +530,4 @@ export {
|
|
|
429
530
|
stopSessionPty,
|
|
430
531
|
detachPtyPool
|
|
431
532
|
};
|
|
432
|
-
//# sourceMappingURL=chunk-
|
|
533
|
+
//# sourceMappingURL=chunk-5QENUGSC.js.map
|