@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,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NRX5V443.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveProjectTarget
|
|
7
7
|
} from "./chunk-IPHADNF5.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-JYWX2N5W.js";
|
|
12
12
|
import {
|
|
13
13
|
loadConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ETWP7MDS.js";
|
|
15
15
|
|
|
16
16
|
// src/cli.ts
|
|
17
17
|
import chalk from "chalk";
|
|
@@ -136,7 +136,7 @@ function completeRepoBranches(alias, current, config, done) {
|
|
|
136
136
|
}
|
|
137
137
|
async function recordedGroupBranches(groupName) {
|
|
138
138
|
try {
|
|
139
|
-
const { loadHistory } = await import("./history-
|
|
139
|
+
const { loadHistory } = await import("./history-RFIDCGQY.js");
|
|
140
140
|
return loadHistory().filter((s) => s.target === groupName && s.isGroup && !s.archivedAt).map((s) => s.branch);
|
|
141
141
|
} catch {
|
|
142
142
|
return [];
|
|
@@ -172,62 +172,62 @@ async function completeGroupBranches(groupName, repoAliases, current, config, do
|
|
|
172
172
|
|
|
173
173
|
// src/cli.ts
|
|
174
174
|
var COMMANDS = [
|
|
175
|
-
{ names: ["init"], load: async () => (await import("./init-
|
|
176
|
-
{ names: ["config"], load: async () => (await import("./config-
|
|
177
|
-
{ names: ["tree", "t"], load: async () => (await import("./tree-
|
|
178
|
-
{ names: ["remove"], load: async () => (await import("./remove-
|
|
179
|
-
{ names: ["fork"], load: async () => (await import("./fork-
|
|
180
|
-
{ names: ["add-repo"], load: async () => (await import("./add-repo-
|
|
181
|
-
{ names: ["update"], load: async () => (await import("./update-
|
|
182
|
-
{ names: ["catchup"], load: async () => (await import("./catchup-
|
|
183
|
-
{ names: ["snooze"], load: async () => (await import("./snooze-
|
|
184
|
-
{ names: ["pin"], load: async () => (await import("./pin-
|
|
185
|
-
{ names: ["keep"], load: async () => (await import("./keep-
|
|
186
|
-
{ names: ["show"], load: async () => (await import("./show-
|
|
187
|
-
{ names: ["section"], load: async () => (await import("./section-
|
|
188
|
-
{ names: ["color"], load: async () => (await import("./color-
|
|
189
|
-
{ names: ["note"], load: async () => (await import("./note-
|
|
190
|
-
{ names: ["block"], load: async () => (await import("./block-
|
|
191
|
-
{ names: ["time"], load: async () => (await import("./time-
|
|
192
|
-
{ names: ["account"], load: async () => (await import("./account-
|
|
193
|
-
{ names: ["usage"], load: async () => (await import("./usage-
|
|
194
|
-
{ names: ["read"], load: async () => (await import("./read-
|
|
195
|
-
{ names: ["screen"], load: async () => (await import("./screen-
|
|
196
|
-
{ names: ["send"], load: async () => (await import("./send-
|
|
197
|
-
{ names: ["wait"], load: async () => (await import("./wait-
|
|
198
|
-
{ names: ["start"], load: async () => (await import("./start-
|
|
199
|
-
{ names: ["stop"], load: async () => (await import("./stop-
|
|
200
|
-
{ names: ["restart"], load: async () => (await import("./restart-
|
|
201
|
-
{ names: ["answer"], load: async () => (await import("./answer-
|
|
202
|
-
{ names: ["coordinate"], load: async () => (await import("./coordinate-
|
|
203
|
-
{ names: ["child"], load: async () => (await import("./child-
|
|
204
|
-
{ names: ["report"], load: async () => (await import("./report-
|
|
205
|
-
{ names: ["list"], load: async () => (await import("./list-
|
|
206
|
-
{ names: ["status"], load: async () => (await import("./status-
|
|
207
|
-
{ names: ["recent"], load: async () => (await import("./recent-
|
|
208
|
-
{ names: ["resume"], load: async () => (await import("./resume-
|
|
209
|
-
{ names: ["sessions"], load: async () => (await import("./sessions-
|
|
210
|
-
{ names: ["digest"], load: async () => (await import("./digest-
|
|
211
|
-
{ names: ["cleanup"], load: async () => (await import("./cleanup-
|
|
212
|
-
{ names: ["overlaps"], load: async () => (await import("./overlaps-
|
|
213
|
-
{ names: ["search"], load: async () => (await import("./search-
|
|
214
|
-
{ names: ["pr"], load: async () => (await import("./pr-
|
|
215
|
-
{ names: ["review"], load: async () => (await import("./review-
|
|
216
|
-
{ names: ["timesheet"], load: async () => (await import("./timesheet-
|
|
217
|
-
{ names: ["prune"], load: async () => (await import("./prune-
|
|
218
|
-
{ names: ["sync"], load: async () => (await import("./sync-
|
|
219
|
-
{ names: ["todo"], load: async () => (await import("./todo-
|
|
220
|
-
{ names: ["hydrate"], load: async () => (await import("./hydrate-
|
|
221
|
-
{ names: ["diff"], load: async () => (await import("./diff-
|
|
222
|
-
{ names: ["web"], load: async () => (await import("./web-
|
|
223
|
-
{ names: ["hook"], load: async () => (await import("./hook-
|
|
224
|
-
{ names: ["run"], load: async () => (await import("./run-
|
|
225
|
-
{ names: ["broadcast"], load: async () => (await import("./broadcast-
|
|
226
|
-
{ names: ["attach", "a"], load: async () => (await import("./attach-
|
|
227
|
-
{ names: ["pty-host"], load: async () => (await import("./pty-host-
|
|
228
|
-
{ names: ["state"], load: async () => (await import("./state-
|
|
229
|
-
{ names: ["move"], load: async () => (await import("./move-
|
|
230
|
-
{ names: ["install-skills"], load: async () => (await import("./install-skills-
|
|
175
|
+
{ names: ["init"], load: async () => (await import("./init-4BK3T34W.js")).initCommand },
|
|
176
|
+
{ names: ["config"], load: async () => (await import("./config-EXQY26W4.js")).configCommand },
|
|
177
|
+
{ names: ["tree", "t"], load: async () => (await import("./tree-RGT736E3.js")).treeCommand },
|
|
178
|
+
{ names: ["remove"], load: async () => (await import("./remove-MW25RLNV.js")).removeCommand },
|
|
179
|
+
{ names: ["fork"], load: async () => (await import("./fork-DSNMPWUE.js")).forkCommand },
|
|
180
|
+
{ names: ["add-repo"], load: async () => (await import("./add-repo-FTAMMPVM.js")).addRepoCommand },
|
|
181
|
+
{ names: ["update"], load: async () => (await import("./update-CMYVBWV3.js")).updateCommand },
|
|
182
|
+
{ names: ["catchup"], load: async () => (await import("./catchup-G4EOJIZP.js")).catchupCommand },
|
|
183
|
+
{ names: ["snooze"], load: async () => (await import("./snooze-OFYZVVYS.js")).snoozeCommand },
|
|
184
|
+
{ names: ["pin"], load: async () => (await import("./pin-CFTQDPPC.js")).pinCommand },
|
|
185
|
+
{ names: ["keep"], load: async () => (await import("./keep-57TUKADV.js")).keepCommand },
|
|
186
|
+
{ names: ["show"], load: async () => (await import("./show-33VV3XCF.js")).showCommand },
|
|
187
|
+
{ names: ["section"], load: async () => (await import("./section-Y6RDD3MN.js")).sectionCommand },
|
|
188
|
+
{ names: ["color"], load: async () => (await import("./color-7CQNI6Y4.js")).colorCommand },
|
|
189
|
+
{ names: ["note"], load: async () => (await import("./note-FHPDVBRI.js")).noteCommand },
|
|
190
|
+
{ names: ["block"], load: async () => (await import("./block-3ZUFH2RO.js")).blockCommand },
|
|
191
|
+
{ names: ["time"], load: async () => (await import("./time-PM72GK5W.js")).timeCommand },
|
|
192
|
+
{ names: ["account"], load: async () => (await import("./account-O62WFR7C.js")).accountCommand },
|
|
193
|
+
{ names: ["usage"], load: async () => (await import("./usage-VEKD3JPL.js")).usageCommand },
|
|
194
|
+
{ names: ["read"], load: async () => (await import("./read-DHJ6VY44.js")).readCommand },
|
|
195
|
+
{ names: ["screen"], load: async () => (await import("./screen-VVRNQXVW.js")).screenCommand },
|
|
196
|
+
{ names: ["send"], load: async () => (await import("./send-AZM2XKN2.js")).sendCommand },
|
|
197
|
+
{ names: ["wait"], load: async () => (await import("./wait-RQZU3KDY.js")).waitCommand },
|
|
198
|
+
{ names: ["start"], load: async () => (await import("./start-OEQ5VW7Y.js")).startCommand },
|
|
199
|
+
{ names: ["stop"], load: async () => (await import("./stop-QNICDWAU.js")).stopCommand },
|
|
200
|
+
{ names: ["restart"], load: async () => (await import("./restart-4BGVRBX6.js")).restartCommand },
|
|
201
|
+
{ names: ["answer"], load: async () => (await import("./answer-LKNMN2ZM.js")).answerCommand },
|
|
202
|
+
{ names: ["coordinate"], load: async () => (await import("./coordinate-LRY7LXS6.js")).coordinateCommand },
|
|
203
|
+
{ names: ["child"], load: async () => (await import("./child-MVNEFA2I.js")).childCommand },
|
|
204
|
+
{ names: ["report"], load: async () => (await import("./report-II75EKM6.js")).reportCommand },
|
|
205
|
+
{ names: ["list"], load: async () => (await import("./list-DRQRIT6U.js")).listCommand },
|
|
206
|
+
{ names: ["status"], load: async () => (await import("./status-HPYMNO2T.js")).statusCommand },
|
|
207
|
+
{ names: ["recent"], load: async () => (await import("./recent-OZW2ZNJ4.js")).recentCommand },
|
|
208
|
+
{ names: ["resume"], load: async () => (await import("./resume-4J53KDCO.js")).resumeCommand },
|
|
209
|
+
{ names: ["sessions"], load: async () => (await import("./sessions-OER6VNQJ.js")).sessionsCommand },
|
|
210
|
+
{ names: ["digest"], load: async () => (await import("./digest-2AFW3WBL.js")).digestCommand },
|
|
211
|
+
{ names: ["cleanup"], load: async () => (await import("./cleanup-ANVUCOBK.js")).cleanupCommand },
|
|
212
|
+
{ names: ["overlaps"], load: async () => (await import("./overlaps-GKAKEUB6.js")).overlapsCommand },
|
|
213
|
+
{ names: ["search"], load: async () => (await import("./search-MKYCKZF4.js")).searchCommand },
|
|
214
|
+
{ names: ["pr"], load: async () => (await import("./pr-ZP4COZEZ.js")).prCommand },
|
|
215
|
+
{ names: ["review"], load: async () => (await import("./review-WKB3K6LI.js")).reviewCommand },
|
|
216
|
+
{ names: ["timesheet"], load: async () => (await import("./timesheet-HJXQ4KHL.js")).timesheetCommand },
|
|
217
|
+
{ names: ["prune"], load: async () => (await import("./prune-IQB2T45B.js")).pruneCommand },
|
|
218
|
+
{ names: ["sync"], load: async () => (await import("./sync-RH3M47QK.js")).syncCommand },
|
|
219
|
+
{ names: ["todo"], load: async () => (await import("./todo-UVKGOG7D.js")).todoCommand },
|
|
220
|
+
{ names: ["hydrate"], load: async () => (await import("./hydrate-DAEY4PB6.js")).hydrateCommand },
|
|
221
|
+
{ names: ["diff"], load: async () => (await import("./diff-JRK3AUD5.js")).diffCommand },
|
|
222
|
+
{ names: ["web"], load: async () => (await import("./web-GOCU26ZD.js")).webCommand },
|
|
223
|
+
{ names: ["hook"], load: async () => (await import("./hook-XBALB337.js")).hookCommand },
|
|
224
|
+
{ names: ["run"], load: async () => (await import("./run-YS2D7WAQ.js")).runCommand },
|
|
225
|
+
{ names: ["broadcast"], load: async () => (await import("./broadcast-I23BZI3R.js")).broadcastCommand },
|
|
226
|
+
{ names: ["attach", "a"], load: async () => (await import("./attach-A3KA4YTK.js")).attachCommand },
|
|
227
|
+
{ names: ["pty-host"], load: async () => (await import("./pty-host-BPFGJFBC.js")).ptyHostCommand },
|
|
228
|
+
{ names: ["state"], load: async () => (await import("./state-HK67C4UA.js")).stateCommand },
|
|
229
|
+
{ names: ["move"], load: async () => (await import("./move-UEHJ375P.js")).moveCommand },
|
|
230
|
+
{ names: ["install-skills"], load: async () => (await import("./install-skills-TL5D7HZU.js")).installSkillsCommand },
|
|
231
231
|
{ names: ["completion"], load: async () => (await import("./completion-SV446DXJ.js")).completionCommand }
|
|
232
232
|
];
|
|
233
233
|
async function commandsFor(argv) {
|
|
@@ -328,4 +328,4 @@ export {
|
|
|
328
328
|
commandsFor,
|
|
329
329
|
run
|
|
330
330
|
};
|
|
331
|
-
//# sourceMappingURL=chunk-
|
|
331
|
+
//# sourceMappingURL=chunk-XWKN2HJD.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
defaultArchiveDeps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MQXMYVZV.js";
|
|
5
5
|
import {
|
|
6
6
|
normPath
|
|
7
7
|
} from "./chunk-AKMPF72Y.js";
|
|
8
8
|
import {
|
|
9
9
|
disposePty
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5QENUGSC.js";
|
|
11
11
|
import {
|
|
12
12
|
teardownWorktree
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IXZOZZGD.js";
|
|
14
14
|
import {
|
|
15
15
|
defaultRunner
|
|
16
16
|
} from "./chunk-XBWS77S2.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
readStatus,
|
|
22
22
|
removeSession,
|
|
23
23
|
sessionAliases
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HUWWMTNG.js";
|
|
25
25
|
import {
|
|
26
26
|
sessionIdFor
|
|
27
27
|
} from "./chunk-QGUBOOEN.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-JYWX2N5W.js";
|
|
31
31
|
import {
|
|
32
32
|
loadConfig
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ETWP7MDS.js";
|
|
34
34
|
|
|
35
35
|
// src/core/cleanup/cleanup-deps.ts
|
|
36
36
|
import fs from "fs";
|
|
@@ -160,4 +160,4 @@ function defaultCleanupDeps(opts = {}) {
|
|
|
160
160
|
export {
|
|
161
161
|
defaultCleanupDeps
|
|
162
162
|
};
|
|
163
|
-
//# sourceMappingURL=chunk-
|
|
163
|
+
//# sourceMappingURL=chunk-YKTJL4SW.js.map
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
knownAgents,
|
|
3
4
|
packageRoot
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
knownAgents
|
|
7
|
-
} from "./chunk-KQMHGEI2.js";
|
|
5
|
+
} from "./chunk-NWKVTUTN.js";
|
|
8
6
|
|
|
9
7
|
// src/commands/install-skills.ts
|
|
10
8
|
import chalk from "chalk";
|
|
@@ -44,4 +42,4 @@ export {
|
|
|
44
42
|
runInstallSkills,
|
|
45
43
|
installSkillsCommand
|
|
46
44
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-ZG6HB4BO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/install-skills.ts","../src/core/agents/skills.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { installSkills } from '../core/agents/skills.js';\n\n/** Give each agent work knows its skills (core/skills.ts) and say how it went, a line per agent. Best-effort: never throws. */\nexport async function runInstallSkills(): Promise<void> {\n for (const r of await installSkills()) console.log(`work-tree: ${r.agent}: ${r.ok ? r.message : chalk.yellow(r.message)}`);\n}\n\n/**\n * `work install-skills` (hidden) — the same by hand. npm's postinstall and\n * the desktop app's first start run dist/install-skills-bin.js, which is\n * only this: not the whole CLI (no logger, nothing written to ~/.work).\n */\nexport const installSkillsCommand: CommandModule = {\n command: 'install-skills',\n describe: false,\n handler: runInstallSkills,\n};\n","import fs from 'node:fs';\nimport { packageRoot } from '../platform/package-root.js';\nimport path from 'node:path';\nimport { knownAgents } from './index.js';\nimport type { AgentAdapter } from './types.js';\n\n/**\n * work's skills — how to use `work` (work-sessions) and `wd -c` (wd-review) —\n * are SKILL.md folders under plugins/work-tree/skills, the Agent Skills\n * format. Each agent's adapter makes them available its own way\n * (types.ts `AgentSkills`; Claude's: its plugin marketplace). Run at npm\n * install (scripts/postinstall.mjs → dist/install-skills-bin.js) and by the\n * desktop app's first start; `work install-skills` by hand.\n */\n\n/** The shipped skills folder: plugins/ beside dist/ in the package (or in this repo, in dev). */\nexport function skillsDir(): string | null {\n const root = packageRoot();\n const dir = root ? path.join(root, 'plugins', 'work-tree', 'skills') : null;\n return dir && fs.existsSync(path.join(dir, 'work-sessions', 'SKILL.md')) ? dir : null;\n}\n\nexport interface SkillsInstall {\n agent: string;\n ok: boolean;\n message: string;\n}\n\n/** Give every agent work knows that can take skills the shipped ones. Never throws: each agent's outcome is reported. */\nexport async function installSkills(agents: AgentAdapter[] = knownAgents(), dir: string | null = skillsDir()): Promise<SkillsInstall[]> {\n const out: SkillsInstall[] = [];\n for (const a of agents) {\n if (!a.skills) continue;\n // A missing folder is each agent's to judge: Claude's come from its marketplace, not from here.\n try {\n out.push({ agent: a.name, ...(await a.skills.install({ skillsDir: dir })) });\n } catch (err) {\n out.push({ agent: a.name, ok: false, message: (err as Error).message });\n }\n }\n return out;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/install-skills.ts","../src/core/agents/skills.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { installSkills } from '../core/agents/skills.js';\n\n/** Give each agent work knows its skills (core/skills.ts) and say how it went, a line per agent. Best-effort: never throws. */\nexport async function runInstallSkills(): Promise<void> {\n for (const r of await installSkills()) console.log(`work-tree: ${r.agent}: ${r.ok ? r.message : chalk.yellow(r.message)}`);\n}\n\n/**\n * `work install-skills` (hidden) — the same by hand. npm's postinstall and\n * the desktop app's first start run dist/install-skills-bin.js, which is\n * only this: not the whole CLI (no logger, nothing written to ~/.work).\n */\nexport const installSkillsCommand: CommandModule = {\n command: 'install-skills',\n describe: false,\n handler: runInstallSkills,\n};\n","import fs from 'node:fs';\nimport { packageRoot } from '../platform/package-root.js';\nimport path from 'node:path';\nimport { knownAgents } from './index.js';\nimport type { AgentAdapter } from './types.js';\n\n/**\n * work's skills — how to use `work` (work-sessions) and `wd -c` (wd-review) —\n * are SKILL.md folders under plugins/work-tree/skills, the Agent Skills\n * format. Each agent's adapter makes them available its own way\n * (types.ts `AgentSkills`; Claude's: its plugin marketplace). Run at npm\n * install (scripts/postinstall.mjs → dist/install-skills-bin.js) and by the\n * desktop app's first start; `work install-skills` by hand.\n */\n\n/** The shipped skills folder: plugins/ beside dist/ in the package (or in this repo, in dev). */\nexport function skillsDir(): string | null {\n const root = packageRoot();\n const dir = root ? path.join(root, 'plugins', 'work-tree', 'skills') : null;\n return dir && fs.existsSync(path.join(dir, 'work-sessions', 'SKILL.md')) ? dir : null;\n}\n\nexport interface SkillsInstall {\n agent: string;\n ok: boolean;\n message: string;\n}\n\n/** Give every agent work knows that can take skills the shipped ones. Never throws: each agent's outcome is reported. */\nexport async function installSkills(agents: AgentAdapter[] = knownAgents(), dir: string | null = skillsDir()): Promise<SkillsInstall[]> {\n const out: SkillsInstall[] = [];\n for (const a of agents) {\n if (!a.skills) continue;\n // A missing folder is each agent's to judge: Claude's come from its marketplace, not from here.\n try {\n out.push({ agent: a.name, ...(await a.skills.install({ skillsDir: dir })) });\n } catch (err) {\n out.push({ agent: a.name, ok: false, message: (err as Error).message });\n }\n }\n return out;\n}\n"],"mappings":";;;;;;;AAAA,OAAO,WAAW;;;ACAlB,OAAO,QAAQ;AAEf,OAAO,UAAU;AAcV,SAAS,YAA2B;AACzC,QAAM,OAAO,YAAY;AACzB,QAAM,MAAM,OAAO,KAAK,KAAK,MAAM,WAAW,aAAa,QAAQ,IAAI;AACvE,SAAO,OAAO,GAAG,WAAW,KAAK,KAAK,KAAK,iBAAiB,UAAU,CAAC,IAAI,MAAM;AACnF;AASA,eAAsB,cAAc,SAAyB,YAAY,GAAG,MAAqB,UAAU,GAA6B;AACtI,QAAM,MAAuB,CAAC;AAC9B,aAAW,KAAK,QAAQ;AACtB,QAAI,CAAC,EAAE,OAAQ;AAEf,QAAI;AACF,UAAI,KAAK,EAAE,OAAO,EAAE,MAAM,GAAI,MAAM,EAAE,OAAO,QAAQ,EAAE,WAAW,IAAI,CAAC,EAAG,CAAC;AAAA,IAC7E,SAAS,KAAK;AACZ,UAAI,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,OAAO,SAAU,IAAc,QAAQ,CAAC;AAAA,IACxE;AAAA,EACF;AACA,SAAO;AACT;;;ADpCA,eAAsB,mBAAkC;AACtD,aAAW,KAAK,MAAM,cAAc,EAAG,SAAQ,IAAI,cAAc,EAAE,KAAK,KAAK,EAAE,KAAK,EAAE,UAAU,MAAM,OAAO,EAAE,OAAO,CAAC,EAAE;AAC3H;AAOO,IAAM,uBAAsC;AAAA,EACjD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;","names":[]}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
computeRangeDiff
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IRDWXDID.js";
|
|
5
5
|
import {
|
|
6
6
|
loadManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HUWWMTNG.js";
|
|
8
8
|
import {
|
|
9
9
|
agentSettings,
|
|
10
10
|
internalAgent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NWKVTUTN.js";
|
|
12
12
|
import {
|
|
13
13
|
internalRunEnv
|
|
14
14
|
} from "./chunk-ED6YLB4S.js";
|
|
15
15
|
import {
|
|
16
16
|
killTree
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-M2X6OHHR.js";
|
|
18
18
|
import {
|
|
19
19
|
spawn_default
|
|
20
20
|
} from "./chunk-QOSAWNOU.js";
|
|
@@ -232,4 +232,4 @@ export {
|
|
|
232
232
|
runInternalReadOnly,
|
|
233
233
|
summarizeCheckpoint
|
|
234
234
|
};
|
|
235
|
-
//# sourceMappingURL=chunk-
|
|
235
|
+
//# sourceMappingURL=chunk-ZLPK2LQ3.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-UPS7NHKI.js";
|
|
10
10
|
import {
|
|
11
11
|
loadHistory
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HUWWMTNG.js";
|
|
13
13
|
import {
|
|
14
14
|
sessionIdFor,
|
|
15
15
|
tx,
|
|
@@ -41,12 +41,22 @@ function owns(candidate, current, root) {
|
|
|
41
41
|
return (Date.parse(candidate.lastAccessedAt) || 0) > (Date.parse(current.lastAccessedAt) || 0);
|
|
42
42
|
}
|
|
43
43
|
function findSessionForCwd(cwd, sessions = loadHistory()) {
|
|
44
|
-
|
|
44
|
+
return sessionAt(cwd, sessions, (p) => p) ?? sessionAt(cwd, sessions, realOrSame);
|
|
45
|
+
}
|
|
46
|
+
function realOrSame(p) {
|
|
47
|
+
try {
|
|
48
|
+
return fs.realpathSync.native(p);
|
|
49
|
+
} catch {
|
|
50
|
+
return p;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function sessionAt(cwd, sessions, as) {
|
|
54
|
+
const here = normalize(as(cwd));
|
|
45
55
|
let best = null;
|
|
46
56
|
for (const s of sessions) {
|
|
47
57
|
const roots = s.isGroup && s.paths[0] ? [...s.paths, path.dirname(s.paths[0])] : s.paths;
|
|
48
58
|
for (const root of roots) {
|
|
49
|
-
const r = normalize(root);
|
|
59
|
+
const r = normalize(as(root));
|
|
50
60
|
if (!(here === r || here.startsWith(r + "/"))) continue;
|
|
51
61
|
if (!best || r.length > best.len || r.length === best.len && owns(s, best.session, root)) {
|
|
52
62
|
best = { session: s, root, len: r.length };
|
|
@@ -54,9 +64,9 @@ function findSessionForCwd(cwd, sessions = loadHistory()) {
|
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
66
|
if (!best) return null;
|
|
57
|
-
const own = new Set(best.session.paths.map(normalize));
|
|
58
|
-
const top = normalize(best.root);
|
|
59
|
-
for (let dir = path.resolve(cwd); normalize(dir) !== top && normalize(dir).startsWith(top + "/"); dir = path.dirname(dir)) {
|
|
67
|
+
const own = new Set(best.session.paths.map((p) => normalize(as(p))));
|
|
68
|
+
const top = normalize(as(best.root));
|
|
69
|
+
for (let dir = path.resolve(as(cwd)); normalize(dir) !== top && normalize(dir).startsWith(top + "/"); dir = path.dirname(dir)) {
|
|
60
70
|
if (!own.has(normalize(dir)) && fs.existsSync(path.join(dir, ".git"))) return null;
|
|
61
71
|
if (path.dirname(dir) === dir) break;
|
|
62
72
|
}
|
|
@@ -186,4 +196,4 @@ export {
|
|
|
186
196
|
claimForDelivery,
|
|
187
197
|
formatPendingForPrompt
|
|
188
198
|
};
|
|
189
|
-
//# sourceMappingURL=chunk-
|
|
199
|
+
//# sourceMappingURL=chunk-ZMJR4Z6O.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/comments/pending-delivery.ts"],"sourcesContent":["/**\n * Bridge between `work web` review comments and any live Claude session\n * running in the same worktree. Storage (state.db, see db.ts):\n *\n * comments the comment stores (comment-file-store.ts)\n * comment_deliveries (session, comment id) pairs surfaced to Claude\n *\n * \"Pending\" = published, user-authored, not in the delivered list. Replies\n * authored by Claude (author === 'claude') are excluded — Claude wrote\n * them; we don't need to echo them back.\n *\n * Delivery is lazy: when a Claude in the matching worktree submits a\n * prompt, the hook reads pending comments via this module, prints them as\n * a system-reminder block to stdout (which Claude Code injects into the\n * conversation), and marks them delivered.\n */\n\nimport { checkedOutBranch } from '../git/git-head.js';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { loadHistory, type WorktreeSession } from '../sessions/history.js';\nimport { sessionIdFor } from '../sessions/session-id.js';\nimport { getCommentFileStore, readStoreComments, readStoresComments } from './comment-file-store.js';\nimport { scopeHashFor } from '../diff/repo-spec.js';\nimport { tx, withDb, type Db } from '../platform/db.js';\nimport type { Comment } from './comment-types.js';\n\nfunction deliveredIds(d: Db, sessionId: string): Set<string> {\n return new Set(\n (d.prepare('SELECT comment_id FROM comment_deliveries WHERE session_id = ?').all(sessionId) as Array<{ comment_id: string }>).map(\n (r) => r.comment_id,\n ),\n );\n}\n\n/** Norm-path comparison that mirrors what we do server-side. */\nfunction normalize(p: string): string {\n return path.resolve(p).replace(/\\\\/g, '/').toLowerCase();\n}\n\n/** Map a Claude cwd back to a session. Tries direct-match against any\n * session's path first, then ancestor match (so cwd inside a subdir of a\n * worktree still resolves to the worktree's session). */\n/**\n * Two sessions on one folder (an old entry and a newer one, a typo'd target\n * re-added): which of them a Claude there is. Not an archived one when the\n * other isn't; then the one whose branch is checked out there; then the one\n * entered last. The oldest used to win, so status and comments went to an\n * entry nobody looks at.\n */\nfunction owns(candidate: WorktreeSession, current: WorktreeSession, root: string): boolean {\n if (!!candidate.archivedAt !== !!current.archivedAt) return !candidate.archivedAt;\n const onBranch = checkedOutBranch(root);\n const a = candidate.branch === onBranch;\n const b = current.branch === onBranch;\n if (a !== b) return a;\n return (Date.parse(candidate.lastAccessedAt) || 0) > (Date.parse(current.lastAccessedAt) || 0);\n}\n\nexport function findSessionForCwd(cwd: string, sessions: WorktreeSession[] = loadHistory()): WorktreeSession | null {\n // As written first (this runs on every hook); then by real paths, links followed on both sides: a session recorded\n // through a link isn't found from its real folder otherwise (reported: `work attach` in a worktree under macOS's\n // /var — really /private/var, which the process's cwd says — answered \"not inside a work session\").\n return sessionAt(cwd, sessions, (p) => p) ?? sessionAt(cwd, sessions, realOrSame);\n}\n\n/** A path with its links followed; as it is when it can't be (gone, unreadable). */\nfunction realOrSame(p: string): string {\n try {\n return fs.realpathSync.native(p);\n } catch {\n return p;\n }\n}\n\nfunction sessionAt(cwd: string, sessions: WorktreeSession[], as: (p: string) => string): WorktreeSession | null {\n const here = normalize(as(cwd));\n // Deepest root containing cwd wins, so nested worktrees disambiguate. A\n // group's roots include the group root (the sub-repos' parent) — that's\n // where `work tree` launches Claude for a group, so hooks fire from there.\n let best: { session: WorktreeSession; root: string; len: number } | null = null;\n for (const s of sessions) {\n const roots = s.isGroup && s.paths[0] ? [...s.paths, path.dirname(s.paths[0])] : s.paths;\n for (const root of roots) {\n const r = normalize(as(root));\n if (!(here === r || here.startsWith(r + '/'))) continue;\n if (!best || r.length > best.len || (r.length === best.len && owns(s, best.session, root))) {\n best = { session: s, root, len: r.length };\n }\n }\n }\n if (!best) return null;\n // A separate checkout nested INSIDE the session's tree (a git worktree at\n // <repo>/.claude/worktrees/x, a vendored repo) is not this session: its\n // Claude must not report status, take checkpoints or receive comments as\n // if it were the parent. Any `.git` between cwd and the matched root —\n // other than the session's own repos — marks a different checkout.\n // (Plain fs checks: this runs on every hook.)\n const own = new Set(best.session.paths.map((p) => normalize(as(p))));\n const top = normalize(as(best.root));\n for (let dir = path.resolve(as(cwd)); normalize(dir) !== top && normalize(dir).startsWith(top + '/'); dir = path.dirname(dir)) {\n if (!own.has(normalize(dir)) && fs.existsSync(path.join(dir, '.git'))) return null;\n if (path.dirname(dir) === dir) break;\n }\n return best.session;\n}\n\nfunction isPendingFor(delivered: Set<string>) {\n return (c: Comment) => c.status === 'published' && c.author === 'user' && !delivered.has(c.id);\n}\n\n/** Returns published user comments that haven't been delivered yet.\n * Reads through the file-store cache so we see in-flight writes\n * (`session-meta.ts` and other readers couldn't, when they re-read the\n * disk directly). */\n/**\n * The line typed into an idle Claude (or given as the first prompt of one\n * work starts) so its UserPromptSubmit hook attaches the pending comments.\n * Short on purpose: a long typed note got mangled by Claude Code's paste\n * handling. It says where the content is, so it reads right in the\n * transcript.\n */\nexport const NOTE_NUDGE =\n 'work has new notes for you (review feedback, CI results or comments); they are attached to this message. Work through them now.';\n\nexport function readPendingForSession(sessionId: string): Comment[] {\n const delivered = withDb((d) => deliveredIds(d, sessionId));\n return readStoreComments(sessionId).filter(isPendingFor(delivered));\n}\n\n/** Comment-store ids for every `wd` scope that could cover this worktree.\n * A scope is keyed by `sha1` of its sorted repo roots (see\n * `repo-spec.scopeHashFor`), so from a session's paths we can rebuild the\n * exact ids without consulting `work web`'s in-memory scope registry:\n * - the whole-set hash → a group `wd` opened at the group root, or the\n * single-repo `wd` (one path);\n * - each individual path's hash → a `wd` opened inside one sub-repo of a\n * group worktree.\n * `registerScope` hashes `path.resolve()`d roots, so we resolve here too or\n * the hashes won't line up. Mirrors `scope-manager.commentStoreIdForScope`\n * (`scope-<hash>`). */\nexport function scopeStoreIdsForPaths(paths: string[]): string[] {\n const resolved = paths.map((p) => path.resolve(p));\n const ids = new Set<string>();\n ids.add(`scope-${scopeHashFor(resolved)}`);\n for (const p of resolved) ids.add(`scope-${scopeHashFor([p])}`);\n return [...ids];\n}\n\n/**\n * Pending comments for a whole worktree: the session's own comment store\n * PLUS any `wd` / `wd -c` scope review store covering the same paths.\n *\n * `wd` registers its review under a scope-hash comment store, not the\n * session store the hook reads — without this merge, comments left in the\n * `wd` review UI would never reach the Claude running in that worktree.\n * Delivered-tracking stays per-session (one `<sessionId>.delivered.json`),\n * so a comment surfaced here won't be re-delivered regardless of which\n * store it came from.\n */\nexport function readPendingForWorktree(session: WorktreeSession, sessionId: string = sessionIdFor(session)): Comment[] {\n const delivered = withDb((d) => deliveredIds(d, sessionId));\n const pending = isPendingFor(delivered);\n const storeIds = [sessionId, ...scopeStoreIdsForPaths(session.paths)];\n const rows = readStoresComments(storeIds); // one query: this runs for every row of /api/sessions\n const seen = new Set<string>();\n const out: Comment[] = [];\n for (const storeId of storeIds) {\n for (const c of rows.get(storeId) ?? []) {\n if (seen.has(c.id) || !pending(c)) continue;\n seen.add(c.id);\n out.push(c);\n }\n }\n return out;\n}\n\n/**\n * What was handed to Claude is done once its turn really ends: your review\n * comments and work's notes to it (PR feedback, CI, a prompt you sent) —\n * every top-level comment of yours it was given, in the session's store and\n * any `wd` scope store over its paths — are marked resolved. Left open, they\n * piled up on the Diff tab's badge (three PR-watch notes read as \"3\"), to\n * resolve or delete by hand. Resolved threads stay listed (dimmed) and can\n * be reopened. Claude's own replies are left as they are. Returns the ids\n * resolved.\n */\nexport function resolveAddressed(session: WorktreeSession): string[] {\n const sessionId = sessionIdFor(session);\n const delivered = withDb((d) => deliveredIds(d, sessionId));\n if (delivered.size === 0) return [];\n const done: string[] = [];\n for (const storeId of [sessionId, ...scopeStoreIdsForPaths(session.paths)]) {\n const open = readStoreComments(storeId).filter(\n (c) => delivered.has(c.id) && c.author === 'user' && c.status === 'published' && !c.parentId && !c.resolved,\n );\n if (open.length === 0) continue;\n const store = getCommentFileStore(storeId);\n for (const c of open) if (store.setResolved(c.id, true)) done.push(c.id);\n }\n return done;\n}\n\n/** Persist a delivery batch, so these ids are never surfaced again. */\nexport function markDelivered(sessionId: string, ids: string[]): void {\n if (ids.length === 0) return;\n tx((d) => {\n const ins = d.prepare('INSERT OR IGNORE INTO comment_deliveries (session_id, comment_id) VALUES (?, ?)');\n for (const id of ids) ins.run(sessionId, id);\n });\n}\n\n/**\n * Claim comments for delivery: of `ids`, return the ones nobody has\n * delivered yet, and mark them delivered — atomically. Two deliverers\n * racing (a Stop hook and the PTY push for the same comment) then can't\n * both send it: only the one that claimed it does. A deliverer whose send\n * fails gives the ids back with `releaseClaim`.\n */\nexport function claimForDelivery(sessionId: string, ids: string[]): string[] {\n if (ids.length === 0) return [];\n // INSERT OR IGNORE in one write transaction: a row inserted here is our\n // claim; one that already existed was someone else's.\n return tx((d) => {\n const ins = d.prepare('INSERT OR IGNORE INTO comment_deliveries (session_id, comment_id) VALUES (?, ?)');\n return ids.filter((id) => ins.run(sessionId, id).changes > 0);\n });\n}\n\n/** Undo a claim whose delivery failed, so the next hook picks them up. */\nexport function releaseClaim(sessionId: string, ids: string[]): void {\n if (ids.length === 0) return;\n tx((d) => {\n const del = d.prepare('DELETE FROM comment_deliveries WHERE session_id = ? AND comment_id = ?');\n for (const id of ids) del.run(sessionId, id);\n });\n}\n\n/** Cap the size of one comment body we surface to Claude. A pathologically\n * long comment shouldn't blow out Claude's context — we truncate, then\n * hint at the rest via \"(truncated)\". 4 KB is generous for a code-review\n * note while leaving headroom for batches. */\nconst MAX_BODY_BYTES = 4 * 1024;\n/** A general note: a prompt, or work's own note (a PR review round quotes\n * every thread, then a bot's overview). 4 KB once cut such a note before\n * the line telling Claude how to draft its replies. */\nconst MAX_NOTE_BYTES = 16 * 1024;\n/** Overall cap on the whole system-reminder payload. Multiple long\n * comments at once still get bounded — but room for four whole notes, since\n * the cut falls on the newest one's end: its instructions. */\nconst MAX_TOTAL_BYTES = 4 * MAX_NOTE_BYTES;\n\n/**\n * Format pending comments as a system-reminder block suitable for stdout.\n * Returns empty string when there's nothing pending — the caller (the\n * `work hook` CLI) just exits silently in that case.\n *\n * Truncates pathologically long bodies and caps the overall payload so\n * one runaway comment can't displace the rest of Claude's context.\n */\nexport function formatPendingForPrompt(pending: Comment[]): string {\n if (pending.length === 0) return '';\n\n const sorted = [...pending].sort((a, b) => a.createdAt.localeCompare(b.createdAt));\n\n const general = sorted.filter((c) => c.side === 'general' && !c.parentId);\n const inline = sorted.filter((c) => c.side !== 'general' && !c.parentId);\n const replies = sorted.filter((c) => c.parentId);\n\n const lines: string[] = [];\n lines.push('<system-reminder>');\n lines.push(`New review comments from \\`work web\\` (${pending.length} item${pending.length === 1 ? '' : 's'}):`);\n lines.push('');\n\n if (general.length > 0) {\n lines.push('## General notes');\n for (const c of general) {\n // General notes (this is where `work broadcast` lands) may be multi-line\n // prompts — deliver the whole body, not just line 1. Only the byte cap\n // applies. Inline/reply comments still use the one-line `formatBody`.\n lines.push(formatFullBody('-', c));\n }\n lines.push('');\n }\n\n if (inline.length > 0) {\n lines.push('## Inline comments');\n for (const c of inline) {\n const where = `${c.repo}/${c.file}:${c.line} (${c.side})`;\n lines.push(formatBody(`- ${where}`, c));\n }\n lines.push('');\n }\n\n if (replies.length > 0) {\n lines.push('## Replies');\n for (const c of replies) {\n lines.push(formatBody(`- (reply to ${c.parentId})`, c));\n }\n lines.push('');\n }\n\n lines.push(\n 'Address them as part of your next response. You can reply via the same review UI by posting back to the latest review URL at `~/.work/web.url` + `/api/sessions/<id>/comments` with `author: \"claude\"`.',\n );\n lines.push('</system-reminder>');\n const out = lines.join('\\n');\n if (out.length <= MAX_TOTAL_BYTES) return out;\n const trimmed = out.slice(0, MAX_TOTAL_BYTES - 200);\n return (\n trimmed +\n '\\n\\n(…review payload truncated for context-window safety; ' +\n `${pending.length} comment(s) total — open work web for the full list.)\\n` +\n '</system-reminder>'\n );\n}\n\nfunction formatBody(prefix: string, c: Comment): string {\n const lead = c.body.split('\\n')[0].trim();\n const capped = lead.length > MAX_BODY_BYTES ? `${lead.slice(0, MAX_BODY_BYTES)}…` : lead;\n return `${prefix}: ${capped}${c.body.includes('\\n') ? ' …' : ''}`;\n}\n\n/** Like `formatBody` but preserves the full multi-line body (only the note\n * cap applies). Multi-line bodies are emitted under the bullet, indented, so\n * a broadcast prompt arrives intact rather than truncated to its first line. */\nfunction formatFullBody(prefix: string, c: Comment): string {\n const body = c.body.trim();\n const capped = body.length > MAX_NOTE_BYTES ? `${body.slice(0, MAX_NOTE_BYTES)}…` : body;\n const bodyLines = capped.split('\\n');\n if (bodyLines.length === 1) return `${prefix}: ${bodyLines[0]}`;\n const [first, ...rest] = bodyLines;\n return [`${prefix}: ${first}`, ...rest.map((l) => ` ${l}`)].join('\\n');\n}\n\n/** Re-export so consumers don't have to know which module owns it. */\nexport { sessionIdFor };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBA,OAAO,QAAQ;AACf,OAAO,UAAU;AAQjB,SAAS,aAAa,GAAO,WAAgC;AAC3D,SAAO,IAAI;AAAA,IACR,EAAE,QAAQ,gEAAgE,EAAE,IAAI,SAAS,EAAoC;AAAA,MAC5H,CAAC,MAAM,EAAE;AA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import {
|
|
3
6
|
ensureHost,
|
|
4
7
|
probeHostDetailed
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NREZVTBP.js";
|
|
6
9
|
import {
|
|
7
10
|
hostInfoPath,
|
|
8
11
|
readHostInfo
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NS7WH53I.js";
|
|
10
13
|
import {
|
|
11
14
|
agentFor,
|
|
12
15
|
agentSettings,
|
|
13
16
|
assistantAgent,
|
|
14
17
|
internalAgent
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NWKVTUTN.js";
|
|
16
19
|
import {
|
|
17
20
|
detachHere,
|
|
18
21
|
isPidAlive,
|
|
19
22
|
killTree
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-M2X6OHHR.js";
|
|
21
24
|
import {
|
|
22
25
|
findOnPath,
|
|
23
26
|
programPath
|
|
@@ -164,9 +167,28 @@ function ensureAgentPath(deps = {}) {
|
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
|
|
170
|
+
// src/core/pty/resume.ts
|
|
171
|
+
var RESUME_PARAM = "resume";
|
|
172
|
+
var FORMAT = /^([0-9a-f]{8,64})-(\d{1,15})-(\d{1,4})x(\d{1,4})$/;
|
|
173
|
+
function withResume(url, at) {
|
|
174
|
+
if (!at) return url;
|
|
175
|
+
const value = `${at.stream}-${at.offset}-${at.cols}x${at.rows}`;
|
|
176
|
+
return `${url}${url.includes("?") ? "&" : "?"}${RESUME_PARAM}=${value}`;
|
|
177
|
+
}
|
|
178
|
+
function resumeFromParams(params) {
|
|
179
|
+
const m = FORMAT.exec(params.get(RESUME_PARAM) ?? "");
|
|
180
|
+
if (!m) return null;
|
|
181
|
+
const offset = Number(m[2]);
|
|
182
|
+
const grid = validGrid(Number(m[3]), Number(m[4]));
|
|
183
|
+
if (!Number.isSafeInteger(offset) || !grid) return null;
|
|
184
|
+
return { stream: m[1], offset, cols: grid.cols, rows: grid.rows };
|
|
185
|
+
}
|
|
186
|
+
|
|
167
187
|
export {
|
|
188
|
+
withResume,
|
|
189
|
+
resumeFromParams,
|
|
168
190
|
stopHost,
|
|
169
191
|
restartHost,
|
|
170
192
|
ensureAgentPath
|
|
171
193
|
};
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
194
|
+
//# sourceMappingURL=chunk-ZNRPBP5O.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/pty/host-control.ts","../src/core/platform/shell-path.ts","../src/core/agents/agent-path.ts","../src/core/pty/resume.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { execFile } from 'node:child_process';\nimport { programPath } from '../platform/program-path.js';\nimport { ensureHost, probeHostDetailed } from './pty-host-client.js';\nimport { hostInfoPath, readHostInfo } from './pty-host-protocol.js';\nimport { isPidAlive, killTree } from '../platform/process.js';\n\n/**\n * Stopping and restarting the PTY host — the CLI's `work pty-host\n * --stop/--restart` and the dashboard's Restart share it. The persisted\n * session list stays, so the next host restores them with --continue.\n */\n\nexport type StopOutcome = 'stopped' | 'not-running' | 'stale-file' | 'unresponsive' | 'failed';\n\n/** A process's command line, or null when it isn't running or can't be read (Windows: CIM; elsewhere: ps). */\nexport function commandLineOf(pid: number): Promise<string | null> {\n return new Promise((resolve) => {\n const done = (err: Error | null, out: string) => resolve(err ? null : out.trim() || null);\n if (process.platform === 'win32')\n execFile(\n programPath('powershell'),\n ['-NoProfile', '-Command', `(Get-CimInstance Win32_Process -Filter 'ProcessId=${Math.trunc(pid)}').CommandLine`],\n { windowsHide: true, timeout: 15_000 },\n (err, out) => done(err, String(out)),\n );\n else\n execFile(programPath('ps'), ['-o', 'args=', '-p', String(Math.trunc(pid))], { windowsHide: true, timeout: 5000 }, (err, out) =>\n done(err, String(out)),\n );\n });\n}\n\n/**\n * The recorded pid really is a running PTY host of work's: alive, and its command line runs `pty-host` (not a\n * `--stop`/`--restart`/`--status` call). Pids get reused — on Windows fast — so a host that doesn't answer is only\n * force-stopped after this: blind, it could take down any process that took its number. Pure over its inputs.\n */\nexport function looksLikeHost(commandLine: string | null): boolean {\n return (\n !!commandLine && /(^|\\s|[\"'\\\\/])pty-host(\\s|$|[\"'])/.test(commandLine) && !/\\bpty-host\\b.*--(stop|restart|status)\\b/.test(commandLine)\n );\n}\n\n/**\n * Kill the running host and its PTYs. Only a PID that proves it's our host gets killed: it answers /health with the\n * discovery file's token and that same PID — or, with `force`, it doesn't answer at all (hung: a ConPTY start that\n * blocked its event loop) but its process is alive and runs `work pty-host` (`looksLikeHost`). The file survives\n * crashes and reboots (TerminateProcess skips cleanup), and Windows reuses PIDs. A stale file is just removed.\n */\nexport async function stopHost(\n kill: (pid: number) => boolean = killTree,\n probeTimeoutMs = 5000,\n opts: { force?: boolean; isOurHost?: (pid: number) => Promise<boolean> } = {},\n): Promise<StopOutcome> {\n const hostInfo = readHostInfo();\n if (!hostInfo) return 'not-running';\n // A busy host (restoring many sessions) can miss a short probe; give it\n // longer before concluding anything.\n const probe = await probeHostDetailed(hostInfo, probeTimeoutMs);\n if (probe.kind === 'timeout') {\n // Alive-but-slow must NOT be treated as stale: deleting the file would\n // orphan a live host, and --restart would then start a second one that\n // restores every session again. Keep the file, kill nothing — unless\n // asked to stop a hung one, and it proves to be ours.\n const ours = opts.isOurHost ?? (async (pid: number) => isPidAlive(pid) && looksLikeHost(await commandLineOf(pid)));\n if (!opts.force || !(await ours(hostInfo.pid))) return 'unresponsive';\n return killAndForget(kill, hostInfo.pid);\n }\n if (probe.kind !== 'host' || probe.pid !== hostInfo.pid) {\n // Nothing listening, or someone else on that port: the file is stale\n // (reboot, crash, PID/port reused). Remove it; kill nothing.\n removeInfo();\n return 'stale-file';\n }\n return killAndForget(kill, hostInfo.pid);\n}\n\nfunction killAndForget(kill: (pid: number) => boolean, pid: number): StopOutcome {\n const ok = kill(pid);\n // TerminateProcess means the host never runs its own cleanup.\n removeInfo();\n return ok ? 'stopped' : 'failed';\n}\n\nfunction removeInfo(): void {\n try {\n fs.unlinkSync(hostInfoPath());\n } catch {\n /* */\n }\n}\n\n/**\n * Stop the host and start a new one, which restores every saved session with --continue. `force`: a host that\n * doesn't answer is stopped too (see stopHost). Never starts a second host beside one it couldn't stop.\n */\nexport async function restartHost(\n workBin: string,\n opts: { force?: boolean } = {},\n steps: { stop?: (force: boolean) => Promise<StopOutcome>; start?: (workBin: string) => Promise<{ pid: number }>; pauseMs?: number } = {},\n): Promise<{ outcome: StopOutcome; pid: number | null }> {\n const outcome = await (steps.stop ?? ((force) => stopHost(killTree, 5000, { force })))(!!opts.force);\n if (outcome === 'failed' || outcome === 'unresponsive') return { outcome, pid: null };\n // The old one's port and lock let go before the new one takes them.\n await new Promise((r) => setTimeout(r, steps.pauseMs ?? 500));\n const host = await (steps.start ?? ensureHost)(workBin);\n return { outcome, pid: host.pid };\n}\n","import { spawnSync, type SpawnSyncOptionsWithStringEncoding } from 'node:child_process';\nimport path from 'node:path';\nimport { findOnPath } from './find-on-path.js';\nimport { report } from './report.js';\nimport { debugLog } from './logger.js';\nimport { detachHere } from './process.js';\n\n/**\n * The PATH of the user's login shell, for a work started without one.\n *\n * Reported from a Mac: every session ended at once with \"session exited with code 1\", and Enter\n * gave the same. The desktop app started from the Dock or Finder gets the system's minimal PATH\n * (/usr/bin:/bin:/usr/sbin:/sbin), not the one the user's shell sets up, and passes it on to work\n * web, the PTY host and every Claude: `claude` (in ~/.local/bin, /opt/homebrew/bin, an nvm folder…)\n * isn't found, and node-pty's child exits with 1 when its exec fails. So when work web or the PTY\n * host starts on macOS or Linux and the agent's command isn't on its PATH, it asks the login shell\n * for its PATH (`$SHELL -ilc`, as a terminal would set it up) and puts it first. Started from a\n * terminal, the command is found and nothing is asked.\n */\n\nconst MARK = '__WORK_SHELL_PATH__';\n\n/** The shell's PATH first, then what we had that it lacks (e.g. the app's ~/.work/bin). */\nexport function mergePath(current: string | undefined, shellPath: string, sep = path.delimiter): string {\n const out: string[] = [];\n for (const d of [...shellPath.split(sep), ...(current ?? '').split(sep)]) if (d && !out.includes(d)) out.push(d);\n return out.join(sep);\n}\n\n/** The PATH between the markers of the shell's output (an interactive shell may print a greeting around it). */\nexport function parseShellPath(stdout: string): string | null {\n const m = new RegExp(`${MARK}(.*?)${MARK}`, 's').exec(stdout);\n const p = m?.[1].trim();\n return p ? p : null;\n}\n\n/** How long the login shell may take to say its PATH. */\nexport const SHELL_PATH_TIMEOUT_MS = 5_000;\n\n/** The shell's arguments: a login, interactive shell (what a terminal runs) printing its PATH between markers. */\nexport const shellPathArgs = (): string[] => ['-ilc', `printf '%s%s%s' '${MARK}' \"$PATH\" '${MARK}'`];\n\n/**\n * How it's started. `killSignal: SIGKILL`: an interactive bash or zsh ignores SIGTERM (spawnSync's\n * default at the timeout), and Node then waits for it — a stuck profile held work web up for as long as\n * it hung (reproduced: a 2 s timeout returned after 8 s). `detached` (POSIX): its own session, so it\n * never takes this terminal's foreground group — killed while holding it, it left `work web` in the\n * background, where Ctrl+C no longer reached it (reproduced).\n */\nexport const shellPathSpawnOptions = (timeoutMs = SHELL_PATH_TIMEOUT_MS): SpawnSyncOptionsWithStringEncoding =>\n // `detached` isn't in @types/node's spawnSync options, but spawnSync honors it (spawn_sync reads it).\n ({\n encoding: 'utf8',\n timeout: timeoutMs,\n killSignal: 'SIGKILL',\n detached: detachHere(),\n stdio: ['ignore', 'pipe', 'ignore'],\n windowsHide: true,\n }) as SpawnSyncOptionsWithStringEncoding;\n\ntype ShellRun = (cmd: string, args: string[]) => { stdout?: string | null; status?: number | null; signal?: string | null; error?: Error };\n\n/** Ask the login shell for its PATH: its PATH, or why it couldn't say (a timeout, no such shell, no markers). */\nexport function readShellPath(\n shell = process.env.SHELL || '/bin/zsh',\n run: ShellRun = (cmd, args) => spawnSync(cmd, args, shellPathSpawnOptions()),\n): { path: string } | { why: string } {\n try {\n const r = run(shell, shellPathArgs());\n const p = parseShellPath(r.stdout ?? '');\n if (p) return { path: p };\n const how = r.error\n ? r.error.message\n : r.signal\n ? `stopped by ${r.signal} (over ${SHELL_PATH_TIMEOUT_MS / 1000} s?)`\n : `exit ${r.status ?? '?'}, no PATH printed`;\n return { why: `${shell} -ilc: ${how}` };\n } catch (err) {\n return { why: `${shell} -ilc: ${(err as Error).message}` };\n }\n}\n\n/**\n * Make sure the commands in `need` (the agent's binary) can be found: on macOS and Linux, when one\n * isn't on PATH, the login shell's PATH is merged into this process's (which everything it starts\n * inherits). Says what it did; never throws.\n */\nexport function ensureShellPath(\n need: string[],\n opts: {\n platform?: NodeJS.Platform;\n env?: NodeJS.ProcessEnv;\n readPath?: () => { path: string } | { why: string };\n find?: (cmd: string, env: NodeJS.ProcessEnv) => string | null;\n } = {},\n): 'found' | 'added' | 'unavailable' {\n const platform = opts.platform ?? process.platform;\n const env = opts.env ?? process.env;\n if (platform === 'win32') return 'found';\n const find = opts.find ?? ((c: string, e: NodeJS.ProcessEnv) => findOnPath(c, e, platform));\n const missing = need.filter((c) => !find(c, env));\n if (!missing.length) return 'found';\n // Said in the debug log too: started by the desktop app, nothing shows what a reporter prints.\n const say = (level: 'info' | 'warn', text: string) => {\n report(level, text);\n debugLog(level === 'warn' ? 'WARN' : 'INFO', text);\n };\n const read = (opts.readPath ?? (() => readShellPath(env.SHELL)))();\n if ('why' in read) {\n say('warn', `${missing.join(', ')} isn't on PATH (${env.PATH ?? ''}), and the login shell's PATH couldn't be read: ${read.why}`);\n return 'unavailable';\n }\n env.PATH = mergePath(env.PATH, read.path);\n const still = missing.filter((c) => !find(c, env));\n say(\n still.length ? 'warn' : 'info',\n still.length\n ? `${still.join(', ')} isn't on PATH, even with the login shell's (${env.PATH})`\n : `${missing.join(', ')} found with the login shell's PATH: using it (${env.PATH})`,\n );\n return 'added';\n}\n","import { agentFor, agentSettings, assistantAgent, internalAgent } from './index.js';\nimport type { AgentSettings } from './index.js';\nimport { ensureShellPath } from '../platform/shell-path.js';\nimport { debugLog } from '../platform/logger.js';\n\n/**\n * The agents' commands, found on PATH before work web or the PTY host starts any of them\n * (`core/platform/shell-path.ts` says why: the Mac app from the Dock gets the system's PATH).\n */\n\n/** The commands work starts agents with, from the registry: new sessions', the Ctrl+K assistant's, the summaries'. */\nexport function agentCommands(settings: AgentSettings = agentSettings()): string[] {\n return [...new Set([agentFor(settings), assistantAgent(settings), internalAgent(settings)].map((a) => a.launch.tool(settings).cmd))];\n}\n\n/** For `work web` and the PTY host as they start (not wd's lean server: it starts no agent). Never throws. */\nexport function ensureAgentPath(\n deps: { commands?: () => string[]; ensure?: (need: string[]) => ReturnType<typeof ensureShellPath> } = {},\n): ReturnType<typeof ensureShellPath> | 'failed' {\n try {\n return (deps.ensure ?? ensureShellPath)((deps.commands ?? agentCommands)());\n } catch (err) {\n debugLog('WARN', 'finding the agents on PATH failed:', err);\n return 'failed';\n }\n}\n","import { validGrid } from './terminal-size.js';\n\n/**\n * Reattach where a client left off (terminal-rendering.md, \"Reattach where you left off\"). Pure; the Terminal tab and\n * the PTY host share it.\n *\n * Every screen the host sends (the `replay` frame) says which output stream it belongs to (`stream`: one per PTY entry\n * in one host, so a new spawn under the same id after the entry ended, or a host started again, is another stream) and\n * the offset it stands at (`offset`: characters of output since the entry was spawned, the pacer's unit, UTF-16 code\n * units). A restart or halt of its agent in place keeps the entry, and so the stream and the count: the clients attached\n * through it are sent the new process's output as it continues the old one's, with no screen in between, and a client\n * resuming across it is sent the same characters from its offset (pty-registry.test.ts, \"across a restart\"). Live\n * output follows in frames that are contiguous slices of that output, so a client knows its offset without any stamp\n * on them: the screen's offset plus what it was sent since (`utf16Length` of each binary frame, flow-control.ts).\n *\n * Reconnecting, a client that kept its screen states `?resume=<stream>-<offset>-<cols>x<rows>`: it has drawn\n * everything of that stream up to that offset, and its terminal is that grid. If the host can prove that sending what\n * came since is all it needs, it sends that (`replay` with `resumed: true`) and no screen; otherwise a screen as on\n * any attach. Absent, or from an older host or client, nothing changes: a screen.\n */\n\n/** The attach address's parameter a reconnecting client states its position in. An older host ignores it. */\nexport const RESUME_PARAM = 'resume';\n\n/** Where a client stands in a PTY's output: it has drawn all of `stream` up to `offset`, at this grid. */\nexport interface ResumePoint {\n stream: string;\n offset: number;\n cols: number;\n rows: number;\n}\n\n/** A stream id: what the host makes (pty-registry.ts), hex. */\nconst STREAM = /^[0-9a-f]{8,64}$/;\nconst FORMAT = /^([0-9a-f]{8,64})-(\\d{1,15})-(\\d{1,4})x(\\d{1,4})$/;\n\nexport function isStreamId(s: unknown): s is string {\n return typeof s === 'string' && STREAM.test(s);\n}\n\n/** `url` with the client's position added (`?resume=…`). */\nexport function withResume(url: string, at: ResumePoint | null | undefined): string {\n if (!at) return url;\n const value = `${at.stream}-${at.offset}-${at.cols}x${at.rows}`;\n return `${url}${url.includes('?') ? '&' : '?'}${RESUME_PARAM}=${value}`;\n}\n\n/** The position stated on an attach address, or null when there is none or it isn't one (then: a screen). */\nexport function resumeFromParams(params: URLSearchParams): ResumePoint | null {\n const m = FORMAT.exec(params.get(RESUME_PARAM) ?? '');\n if (!m) return null;\n const offset = Number(m[2]);\n const grid = validGrid(Number(m[3]), Number(m[4]));\n if (!Number.isSafeInteger(offset) || !grid) return null;\n return { stream: m[1], offset, cols: grid.cols, rows: grid.rows };\n}\n\n/** What a `replay` frame says about the stream (fields a host from before sends none of). */\nexport interface ReplayPosition {\n stream?: unknown;\n offset?: unknown;\n resumed?: unknown;\n}\n\n/**\n * A client's position in the PTY's output, as it receives it: set by each `replay` frame (a screen, or what it missed),\n * moved on by each binary frame. Unknown (null) when the host said nothing of it (an older host): then the client\n * never asks to resume.\n */\nexport class StreamPosition {\n private stream: string | null = null;\n private at = 0;\n\n /** A `replay` frame: it stands at its offset now (a screen replaces what was drawn; what was missed continues it). */\n replay(msg: ReplayPosition): void {\n const ok = isStreamId(msg.stream) && typeof msg.offset === 'number' && Number.isSafeInteger(msg.offset) && msg.offset >= 0;\n this.stream = ok ? (msg.stream as string) : null;\n this.at = ok ? (msg.offset as number) : 0;\n }\n\n /** A frame of live output, `chars` long in the host's unit (`utf16Length` of its bytes). */\n output(chars: number): void {\n if (this.stream !== null && chars > 0) this.at += chars;\n }\n\n /** Where it stands, at its terminal's grid; null when unknown. */\n point(cols: number, rows: number): ResumePoint | null {\n if (this.stream === null) return null;\n const grid = validGrid(cols, rows);\n return grid ? { stream: this.stream, offset: this.at, cols: grid.cols, rows: grid.rows } : null;\n }\n\n /** Forget it (the screen will be replaced whatever the host says: a fresh terminal). */\n forget(): void {\n this.stream = null;\n this.at = 0;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,SAAS,gBAAgB;AAelB,SAAS,cAAc,KAAqC;AACjE,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,UAAM,OAAO,CAAC,KAAmB,QAAgB,QAAQ,MAAM,OAAO,IAAI,KAAK,KAAK,IAAI;AACxF,QAAI,QAAQ,aAAa;AACvB;AAAA,QACE,YAAY,YAAY;AAAA,QACxB,CAAC,cAAc,YAAY,qDAAqD,KAAK,MAAM,GAAG,CAAC,gBAAgB;AAAA,QAC/G,EAAE,aAAa,MAAM,SAAS,KAAO;AAAA,QACrC,CAAC,KAAK,QAAQ,KAAK,KAAK,OAAO,GAAG,CAAC;AAAA,MACrC;AAAA;AAEA;AAAA,QAAS,YAAY,IAAI;AAAA,QAAG,CAAC,MAAM,SAAS,MAAM,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC;AAAA,QAAG,EAAE,aAAa,MAAM,SAAS,IAAK;AAAA,QAAG,CAAC,KAAK,QACtH,KAAK,KAAK,OAAO,GAAG,CAAC;AAAA,MACvB;AAAA,EACJ,CAAC;AACH;AAOO,SAAS,cAAc,aAAqC;AACjE,SACE,CAAC,CAAC,eAAe,oCAAoC,KAAK,WAAW,KAAK,CAAC,0CAA0C,KAAK,WAAW;AAEzI;AAQA,eAAsB,SACpB,OAAiC,UACjC,iBAAiB,KACjB,OAA2E,CAAC,GACtD;AACtB,QAAM,WAAW,aAAa;AAC9B,MAAI,CAAC,SAAU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K,YAAY,eAAe,CAAC;AAAA,EAC5E,SAAS,KAAK;AACZ,aAAS,QAAQ,sCAAsC,GAAG;AAC1D,WAAO;AAAA,EACT;AACF;;;ACHO,IAAM,eAAe;AAY5B,IAAM,SAAS;AAOR,SAAS,WAAW,KAAa,IAA4C;AAClF,MAAI,CAAC,GAAI,QAAO;AAChB,QAAM,QAAQ,GAAG,GAAG,MAAM,IAAI,GAAG,MAAM,IAAI,GAAG,IAAI,IAAI,GAAG,IAAI;AAC7D,SAAO,GAAG,GAAG,GAAG,IAAI,SAAS,GAAG,IAAI,MAAM,GAAG,GAAG,YAAY,IAAI,KAAK;AACvE;AAGO,SAAS,iBAAiB,QAA6C;AAC5E,QAAM,IAAI,OAAO,KAAK,OAAO,IAAI,YAAY,KAAK,EAAE;AACpD,MAAI,CAAC,EAAG,QAAO;AACf,QAAM,SAAS,OAAO,EAAE,CAAC,CAAC;AAC1B,QAAM,OAAO,UAAU,OAAO,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;AACjD,MAAI,CAAC,OAAO,cAAc,MAAM,KAAK,CAAC,KAAM,QAAO;AACnD,SAAO,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,MAAM,KAAK,MAAM,MAAM,KAAK,KAAK;AAClE;","names":[]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createInProcess
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IXC6EXVJ.js";
|
|
5
5
|
import {
|
|
6
6
|
ensurePty,
|
|
7
7
|
peekPty
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5QENUGSC.js";
|
|
9
9
|
import {
|
|
10
10
|
getCommentFileStore
|
|
11
11
|
} from "./chunk-UPS7NHKI.js";
|
|
12
12
|
import {
|
|
13
13
|
recordedRepos,
|
|
14
14
|
sessionAliases
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HUWWMTNG.js";
|
|
16
16
|
import {
|
|
17
17
|
sessionIdFor
|
|
18
18
|
} from "./chunk-QGUBOOEN.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
DEFAULT_ACCOUNT,
|
|
31
31
|
loadConfig
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ETWP7MDS.js";
|
|
33
33
|
|
|
34
34
|
// src/core/sessions/fork.ts
|
|
35
35
|
import path from "path";
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
uncommittedFiles,
|
|
175
175
|
defaultForkDeps
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=chunk-
|
|
177
|
+
//# sourceMappingURL=chunk-ZX4ONO5Y.js.map
|