@moberg_hr/work-tree 2.23.1 → 2.23.3
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-O62WFR7C.js → account-CCXROECI.js} +29 -28
- package/dist/{account-O62WFR7C.js.map → account-CCXROECI.js.map} +1 -1
- package/dist/{add-repo-FTAMMPVM.js → add-repo-KYSKVWWL.js} +20 -21
- package/dist/{add-repo-FTAMMPVM.js.map → add-repo-KYSKVWWL.js.map} +1 -1
- package/dist/{answer-LKNMN2ZM.js → answer-M5SVGKGO.js} +12 -12
- package/dist/{attach-A3KA4YTK.js → attach-YHIUKOTE.js} +21 -22
- package/dist/{attach-A3KA4YTK.js.map → attach-YHIUKOTE.js.map} +1 -1
- package/dist/bin.js +4 -4
- package/dist/{block-3ZUFH2RO.js → block-ONJSUTQ6.js} +17 -18
- package/dist/{block-3ZUFH2RO.js.map → block-ONJSUTQ6.js.map} +1 -1
- package/dist/{broadcast-I23BZI3R.js → broadcast-TVDWHKJE.js} +10 -10
- package/dist/{catchup-G4EOJIZP.js → catchup-UGDVV5RI.js} +15 -15
- package/dist/{child-MVNEFA2I.js → child-GPVONLJF.js} +18 -15
- package/dist/child-GPVONLJF.js.map +1 -0
- package/dist/{chunk-NXS53NHR.js → chunk-2MAMYB72.js} +4 -4
- package/dist/{chunk-ZNRPBP5O.js → chunk-2YDY25YI.js} +138 -7
- package/dist/chunk-2YDY25YI.js.map +1 -0
- package/dist/{chunk-HCYES6U7.js → chunk-32CMRR6M.js} +2 -2
- package/dist/{chunk-24FQ5XXN.js → chunk-35WLDIMQ.js} +3 -3
- package/dist/{chunk-FHC6KHIH.js → chunk-3DPHZKSL.js} +2 -2
- package/dist/{chunk-NWKVTUTN.js → chunk-3PO2LUY7.js} +355 -176
- package/dist/chunk-3PO2LUY7.js.map +1 -0
- package/dist/{chunk-T5GJVUSL.js → chunk-4CUYK2XD.js} +2 -2
- package/dist/{chunk-IVS2MAHD.js → chunk-4JQ3CMLS.js} +3 -3
- package/dist/{chunk-U4XSBYQW.js → chunk-5KYEDVL7.js} +5 -5
- package/dist/{chunk-N7T6NPE2.js → chunk-6A6XOLVB.js} +6 -6
- package/dist/{chunk-ZX4ONO5Y.js → chunk-6EFDXIA6.js} +5 -5
- package/dist/{chunk-NREZVTBP.js → chunk-6ER6IBFJ.js} +2 -2
- package/dist/{chunk-XIN6XUFL.js → chunk-6NOZK4JY.js} +2 -2
- package/dist/{chunk-4FN45EAF.js → chunk-7CH7FS5V.js} +3 -3
- package/dist/{chunk-OPV6BE3W.js → chunk-AB2KARHU.js} +8 -8
- package/dist/{chunk-GHY7GZWN.js → chunk-ADOCX5G3.js} +4 -4
- package/dist/{chunk-2MJQTFTI.js → chunk-B26TVG74.js} +3 -3
- package/dist/{chunk-GN7EAXHU.js → chunk-BFGD6UNG.js} +83 -21
- package/dist/chunk-BFGD6UNG.js.map +1 -0
- package/dist/{chunk-WOY35FXP.js → chunk-BHPTGWMO.js} +14 -12
- package/dist/chunk-BHPTGWMO.js.map +1 -0
- package/dist/{chunk-HNZ736XN.js → chunk-BUFPEKEG.js} +5 -5
- package/dist/{chunk-GNIYYXQX.js → chunk-CNR4IKC7.js} +2 -2
- package/dist/{chunk-5SXTMOO6.js → chunk-CUEAIOPD.js} +6 -6
- package/dist/{chunk-MVBBESXK.js → chunk-D4VRDMPK.js} +4 -4
- package/dist/{chunk-YKTJL4SW.js → chunk-D66CHEKN.js} +7 -7
- package/dist/{chunk-GF7RAQFD.js → chunk-FB7OAPCV.js} +3 -3
- package/dist/{chunk-ZMJR4Z6O.js → chunk-FW35KEAD.js} +2 -2
- package/dist/{chunk-2JLG65GB.js → chunk-G6LOB5IT.js} +3 -3
- package/dist/{chunk-HQDQRC4F.js → chunk-HEGROFQI.js} +2 -2
- package/dist/{chunk-ET5K6S5H.js → chunk-IMVJ3NEI.js} +22 -11
- package/dist/chunk-IMVJ3NEI.js.map +1 -0
- package/dist/chunk-J5QY4YRW.js +151 -0
- package/dist/chunk-J5QY4YRW.js.map +1 -0
- package/dist/{chunk-XBWS77S2.js → chunk-J7IGCYHZ.js} +2 -2
- package/dist/{chunk-5QENUGSC.js → chunk-JYYI2M4H.js} +18 -18
- package/dist/{chunk-MQXMYVZV.js → chunk-K3I2ZG2R.js} +15 -15
- package/dist/chunk-KBYXAQS3.js +482 -0
- package/dist/chunk-KBYXAQS3.js.map +1 -0
- package/dist/{chunk-4HQEYZIM.js → chunk-KEIID3YY.js} +7 -7
- package/dist/{chunk-INXHVNMZ.js → chunk-KPPDUVMP.js} +11 -11
- package/dist/{chunk-W5YYTITQ.js → chunk-KVLPKFGJ.js} +2 -2
- package/dist/{chunk-BI7HIO2I.js → chunk-LSEEMJH7.js} +6 -6
- package/dist/{chunk-44QJVFOF.js → chunk-M6PVGN5W.js} +2 -2
- package/dist/{chunk-HPUD5IGB.js → chunk-MBYQBTH2.js} +4 -4
- package/dist/{chunk-TL7VLRRF.js → chunk-MFSXOQLX.js} +7 -7
- package/dist/{chunk-VH5FRKJM.js → chunk-MG773CN7.js} +7 -7
- package/dist/{chunk-2FNYJEOH.js → chunk-NA4AOKAJ.js} +2 -2
- package/dist/{chunk-GTFMUWK6.js → chunk-NH6QDR7V.js} +7 -7
- package/dist/{chunk-ZG6HB4BO.js → chunk-NKC3QM4W.js} +13 -17
- package/dist/chunk-NKC3QM4W.js.map +1 -0
- package/dist/{chunk-HUWWMTNG.js → chunk-NVVDE63M.js} +22 -13
- package/dist/chunk-NVVDE63M.js.map +1 -0
- package/dist/{chunk-6PZ7RCXK.js → chunk-O3YB7GKT.js} +2 -2
- package/dist/{chunk-NS7WH53I.js → chunk-O45NATRC.js} +2 -2
- package/dist/{chunk-IXZOZZGD.js → chunk-OFIIGVE7.js} +9 -9
- package/dist/{chunk-DHZ5DF6Y.js → chunk-OPZL2MRQ.js} +34 -10
- package/dist/chunk-OPZL2MRQ.js.map +1 -0
- package/dist/{chunk-ETWP7MDS.js → chunk-Q53APMHH.js} +1 -1
- package/dist/chunk-Q53APMHH.js.map +1 -0
- package/dist/{chunk-IRDWXDID.js → chunk-QTDNSMOT.js} +2 -2
- package/dist/{chunk-XTAYJDL2.js → chunk-QZW77GWD.js} +6 -6
- package/dist/chunk-REVI2JIA.js +9 -0
- package/dist/{chunk-U2A2DHWP.js → chunk-RO25CJ2V.js} +5 -5
- package/dist/{chunk-ETAPX4JN.js → chunk-RSJZG4SD.js} +9 -9
- package/dist/chunk-RWGD6EXK.js +21 -0
- package/dist/chunk-RWGD6EXK.js.map +1 -0
- package/dist/{chunk-XWKN2HJD.js → chunk-S2Q6M64P.js} +60 -60
- package/dist/{chunk-773UJC5C.js → chunk-SEFMLXA6.js} +7 -7
- package/dist/{chunk-ZLPK2LQ3.js → chunk-V6U4HDFJ.js} +5 -5
- package/dist/{chunk-EORL2V7P.js → chunk-XPMXRCBW.js} +2 -2
- package/dist/{chunk-IXC6EXVJ.js → chunk-XR6EXIZN.js} +5 -5
- package/dist/{chunk-ROEEXEN7.js → chunk-XWUX474Q.js} +4 -150
- package/dist/chunk-XWUX474Q.js.map +1 -0
- package/dist/{chunk-APHVSSLI.js → chunk-XZAJSEXA.js} +2 -2
- package/dist/{chunk-ED6YLB4S.js → chunk-YQSWVHKK.js} +13 -13
- package/dist/chunk-YQSWVHKK.js.map +1 -0
- package/dist/{cleanup-ANVUCOBK.js → cleanup-54DBWJWN.js} +38 -40
- package/dist/{cleanup-ANVUCOBK.js.map → cleanup-54DBWJWN.js.map} +1 -1
- package/dist/{cli-CAF6VCVO.js → cli-VOZ6BCM5.js} +4 -4
- package/dist/{color-7CQNI6Y4.js → color-BVSEJ6G5.js} +14 -14
- package/dist/{config-EXQY26W4.js → config-6H54DGHU.js} +16 -17
- package/dist/{config-EXQY26W4.js.map → config-6H54DGHU.js.map} +1 -1
- package/dist/{coordinate-LRY7LXS6.js → coordinate-WXN3OGJE.js} +26 -16
- package/dist/coordinate-WXN3OGJE.js.map +1 -0
- package/dist/{diff-JRK3AUD5.js → diff-ZBMQVDNF.js} +15 -16
- package/dist/{diff-JRK3AUD5.js.map → diff-ZBMQVDNF.js.map} +1 -1
- package/dist/{digest-2AFW3WBL.js → digest-XEHPAI5L.js} +12 -12
- package/dist/{fork-DSNMPWUE.js → fork-UBBXUFNS.js} +33 -35
- package/dist/{fork-DSNMPWUE.js.map → fork-UBBXUFNS.js.map} +1 -1
- package/dist/{history-RFIDCGQY.js → history-CK3FEKBC.js} +10 -10
- package/dist/{hook-XBALB337.js → hook-FRKNNKO3.js} +31 -24
- package/dist/hook-FRKNNKO3.js.map +1 -0
- package/dist/{hydrate-DAEY4PB6.js → hydrate-K6TOIE7S.js} +11 -11
- package/dist/{init-4BK3T34W.js → init-JJFHX26N.js} +18 -19
- package/dist/{init-4BK3T34W.js.map → init-JJFHX26N.js.map} +1 -1
- package/dist/{install-skills-TL5D7HZU.js → install-skills-IUD6FMAF.js} +11 -9
- package/dist/install-skills-bin.js +10 -8
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{keep-57TUKADV.js → keep-APP2WSKT.js} +12 -12
- package/dist/{list-DRQRIT6U.js → list-OHGYVSWI.js} +11 -11
- package/dist/{move-UEHJ375P.js → move-OU33UWX6.js} +24 -25
- package/dist/{move-UEHJ375P.js.map → move-OU33UWX6.js.map} +1 -1
- package/dist/{note-FHPDVBRI.js → note-ELTUIFB6.js} +12 -12
- package/dist/{overlaps-GKAKEUB6.js → overlaps-C7LV7U47.js} +18 -19
- package/dist/{overlaps-GKAKEUB6.js.map → overlaps-C7LV7U47.js.map} +1 -1
- package/dist/{pin-CFTQDPPC.js → pin-W7A4GXHE.js} +13 -13
- package/dist/{pr-ZP4COZEZ.js → pr-G5PW3CQB.js} +26 -27
- package/dist/{pr-ZP4COZEZ.js.map → pr-G5PW3CQB.js.map} +1 -1
- package/dist/{prune-IQB2T45B.js → prune-ZVGGPC2X.js} +35 -37
- package/dist/{prune-IQB2T45B.js.map → prune-ZVGGPC2X.js.map} +1 -1
- package/dist/{pty-host-BPFGJFBC.js → pty-host-QRHAVCCV.js} +71 -32
- package/dist/pty-host-QRHAVCCV.js.map +1 -0
- package/dist/{read-DHJ6VY44.js → read-FHJHBUDI.js} +17 -13
- package/dist/{read-DHJ6VY44.js.map → read-FHJHBUDI.js.map} +1 -1
- package/dist/{recent-OZW2ZNJ4.js → recent-QOCMWXZY.js} +21 -22
- package/dist/{recent-OZW2ZNJ4.js.map → recent-QOCMWXZY.js.map} +1 -1
- package/dist/{remove-MW25RLNV.js → remove-BIF6SAUC.js} +36 -38
- package/dist/{remove-MW25RLNV.js.map → remove-BIF6SAUC.js.map} +1 -1
- package/dist/{report-II75EKM6.js → report-7TRHC2CQ.js} +16 -13
- package/dist/report-7TRHC2CQ.js.map +1 -0
- package/dist/{restart-4BGVRBX6.js → restart-YVWOAA7D.js} +14 -15
- package/dist/{restart-4BGVRBX6.js.map → restart-YVWOAA7D.js.map} +1 -1
- package/dist/{resume-4J53KDCO.js → resume-KDCRPOAZ.js} +21 -22
- package/dist/{resume-4J53KDCO.js.map → resume-KDCRPOAZ.js.map} +1 -1
- package/dist/{review-WKB3K6LI.js → review-YH5TH37K.js} +11 -11
- package/dist/{review-now-AT2SPPRO.js → review-now-4NBXZUJV.js} +2 -2
- package/dist/{run-YS2D7WAQ.js → run-T6YFDM2T.js} +10 -10
- package/dist/{screen-VVRNQXVW.js → screen-LXXS4KCS.js} +12 -12
- package/dist/{search-MKYCKZF4.js → search-HOIGQH66.js} +10 -10
- package/dist/{section-Y6RDD3MN.js → section-NF6SAXSF.js} +14 -14
- package/dist/{send-AZM2XKN2.js → send-ELRCW7PJ.js} +26 -16
- package/dist/send-ELRCW7PJ.js.map +1 -0
- package/dist/{sessions-OER6VNQJ.js → sessions-Y5X6OG3D.js} +31 -33
- package/dist/{sessions-OER6VNQJ.js.map → sessions-Y5X6OG3D.js.map} +1 -1
- package/dist/{show-33VV3XCF.js → show-5NYBZRYX.js} +11 -11
- package/dist/{snooze-OFYZVVYS.js → snooze-J2PV4C6X.js} +12 -12
- package/dist/{start-OEQ5VW7Y.js → start-DO4UJCS4.js} +12 -12
- package/dist/{state-HK67C4UA.js → state-63M6QBOW.js} +2 -2
- package/dist/{status-HPYMNO2T.js → status-FHIC2MKA.js} +15 -16
- package/dist/{status-HPYMNO2T.js.map → status-FHIC2MKA.js.map} +1 -1
- package/dist/{statusline-Z5HLKDIA.js → statusline-UP2KMHYX.js} +5 -5
- package/dist/{statusline-hook-VPPS3PFO.js → statusline-hook-6BNEVENM.js} +4 -4
- package/dist/{stop-QNICDWAU.js → stop-T2E62H4M.js} +12 -12
- package/dist/{sync-RH3M47QK.js → sync-3E4STI7L.js} +35 -37
- package/dist/{sync-RH3M47QK.js.map → sync-3E4STI7L.js.map} +1 -1
- package/dist/{time-PM72GK5W.js → time-JVF77UUA.js} +14 -14
- package/dist/{time-actions-O3MCB7FU.js → time-actions-JM3QKB5T.js} +3 -3
- package/dist/{timesheet-HJXQ4KHL.js → timesheet-B2HNBQQM.js} +23 -23
- package/dist/timesheet-B2HNBQQM.js.map +1 -0
- package/dist/{todo-UVKGOG7D.js → todo-3UNVCCMY.js} +2 -2
- package/dist/{tree-RGT736E3.js → tree-EMUBZEDU.js} +37 -39
- package/dist/{tree-RGT736E3.js.map → tree-EMUBZEDU.js.map} +1 -1
- package/dist/{update-CMYVBWV3.js → update-4XHZ4VQZ.js} +20 -21
- package/dist/{update-CMYVBWV3.js.map → update-4XHZ4VQZ.js.map} +1 -1
- package/dist/{usage-VEKD3JPL.js → usage-JDXG5SDA.js} +12 -12
- package/dist/{usage-ask-V2SIRW4F.js → usage-ask-5ZWNYLVJ.js} +11 -11
- package/dist/version-VT2JXBQT.js +31 -0
- package/dist/version-VT2JXBQT.js.map +1 -0
- package/dist/{wait-RQZU3KDY.js → wait-FEN3WAEQ.js} +13 -13
- package/dist/wd-bin.js +3 -3
- package/dist/web/assets/{PtyView-qP6blm2-.js → PtyView-C1X1ErwB.js} +2 -2
- package/dist/web/assets/{PtyView-qP6blm2-.js.map → PtyView-C1X1ErwB.js.map} +1 -1
- package/dist/web/assets/{index-yBTfBzDm.css → index-CfTmdABt.css} +1 -1
- package/dist/web/assets/index-vE5o2Ywu.js +129 -0
- package/dist/web/assets/index-vE5o2Ywu.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-GOCU26ZD.js → web-LU6GSQMK.js} +185 -100
- package/dist/web-LU6GSQMK.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/plugins/work-tree/skills/work-sessions/SKILL.md +35 -50
- package/dist/child-MVNEFA2I.js.map +0 -1
- package/dist/chunk-4CXUVBOD.js +0 -76
- package/dist/chunk-4CXUVBOD.js.map +0 -1
- package/dist/chunk-BMPTUIP4.js +0 -105
- package/dist/chunk-BMPTUIP4.js.map +0 -1
- package/dist/chunk-DHZ5DF6Y.js.map +0 -1
- package/dist/chunk-ED6YLB4S.js.map +0 -1
- package/dist/chunk-ET5K6S5H.js.map +0 -1
- package/dist/chunk-ETWP7MDS.js.map +0 -1
- package/dist/chunk-GN7EAXHU.js.map +0 -1
- package/dist/chunk-HUWWMTNG.js.map +0 -1
- package/dist/chunk-NRX5V443.js +0 -9
- package/dist/chunk-NWKVTUTN.js.map +0 -1
- package/dist/chunk-ROEEXEN7.js.map +0 -1
- package/dist/chunk-SJBEIYLK.js +0 -16
- package/dist/chunk-SJBEIYLK.js.map +0 -1
- package/dist/chunk-TC3H7I6O.js +0 -196
- package/dist/chunk-TC3H7I6O.js.map +0 -1
- package/dist/chunk-TNJF7T33.js +0 -17
- package/dist/chunk-TNJF7T33.js.map +0 -1
- package/dist/chunk-WOY35FXP.js.map +0 -1
- package/dist/chunk-ZG6HB4BO.js.map +0 -1
- package/dist/chunk-ZNRPBP5O.js.map +0 -1
- package/dist/coordinate-LRY7LXS6.js.map +0 -1
- package/dist/hook-XBALB337.js.map +0 -1
- package/dist/pty-host-BPFGJFBC.js.map +0 -1
- package/dist/report-II75EKM6.js.map +0 -1
- package/dist/send-AZM2XKN2.js.map +0 -1
- package/dist/timesheet-HJXQ4KHL.js.map +0 -1
- package/dist/version-RJ4PCHPB.js +0 -117
- package/dist/version-RJ4PCHPB.js.map +0 -1
- package/dist/web/assets/index-DuFRboh6.js +0 -129
- package/dist/web/assets/index-DuFRboh6.js.map +0 -1
- package/dist/web-GOCU26ZD.js.map +0 -1
- /package/dist/{answer-LKNMN2ZM.js.map → answer-M5SVGKGO.js.map} +0 -0
- /package/dist/{broadcast-I23BZI3R.js.map → broadcast-TVDWHKJE.js.map} +0 -0
- /package/dist/{catchup-G4EOJIZP.js.map → catchup-UGDVV5RI.js.map} +0 -0
- /package/dist/{chunk-NXS53NHR.js.map → chunk-2MAMYB72.js.map} +0 -0
- /package/dist/{chunk-HCYES6U7.js.map → chunk-32CMRR6M.js.map} +0 -0
- /package/dist/{chunk-24FQ5XXN.js.map → chunk-35WLDIMQ.js.map} +0 -0
- /package/dist/{chunk-FHC6KHIH.js.map → chunk-3DPHZKSL.js.map} +0 -0
- /package/dist/{chunk-T5GJVUSL.js.map → chunk-4CUYK2XD.js.map} +0 -0
- /package/dist/{chunk-IVS2MAHD.js.map → chunk-4JQ3CMLS.js.map} +0 -0
- /package/dist/{chunk-U4XSBYQW.js.map → chunk-5KYEDVL7.js.map} +0 -0
- /package/dist/{chunk-N7T6NPE2.js.map → chunk-6A6XOLVB.js.map} +0 -0
- /package/dist/{chunk-ZX4ONO5Y.js.map → chunk-6EFDXIA6.js.map} +0 -0
- /package/dist/{chunk-NREZVTBP.js.map → chunk-6ER6IBFJ.js.map} +0 -0
- /package/dist/{chunk-XIN6XUFL.js.map → chunk-6NOZK4JY.js.map} +0 -0
- /package/dist/{chunk-4FN45EAF.js.map → chunk-7CH7FS5V.js.map} +0 -0
- /package/dist/{chunk-OPV6BE3W.js.map → chunk-AB2KARHU.js.map} +0 -0
- /package/dist/{chunk-GHY7GZWN.js.map → chunk-ADOCX5G3.js.map} +0 -0
- /package/dist/{chunk-2MJQTFTI.js.map → chunk-B26TVG74.js.map} +0 -0
- /package/dist/{chunk-HNZ736XN.js.map → chunk-BUFPEKEG.js.map} +0 -0
- /package/dist/{chunk-GNIYYXQX.js.map → chunk-CNR4IKC7.js.map} +0 -0
- /package/dist/{chunk-5SXTMOO6.js.map → chunk-CUEAIOPD.js.map} +0 -0
- /package/dist/{chunk-MVBBESXK.js.map → chunk-D4VRDMPK.js.map} +0 -0
- /package/dist/{chunk-YKTJL4SW.js.map → chunk-D66CHEKN.js.map} +0 -0
- /package/dist/{chunk-GF7RAQFD.js.map → chunk-FB7OAPCV.js.map} +0 -0
- /package/dist/{chunk-ZMJR4Z6O.js.map → chunk-FW35KEAD.js.map} +0 -0
- /package/dist/{chunk-2JLG65GB.js.map → chunk-G6LOB5IT.js.map} +0 -0
- /package/dist/{chunk-HQDQRC4F.js.map → chunk-HEGROFQI.js.map} +0 -0
- /package/dist/{chunk-XBWS77S2.js.map → chunk-J7IGCYHZ.js.map} +0 -0
- /package/dist/{chunk-5QENUGSC.js.map → chunk-JYYI2M4H.js.map} +0 -0
- /package/dist/{chunk-MQXMYVZV.js.map → chunk-K3I2ZG2R.js.map} +0 -0
- /package/dist/{chunk-4HQEYZIM.js.map → chunk-KEIID3YY.js.map} +0 -0
- /package/dist/{chunk-INXHVNMZ.js.map → chunk-KPPDUVMP.js.map} +0 -0
- /package/dist/{chunk-W5YYTITQ.js.map → chunk-KVLPKFGJ.js.map} +0 -0
- /package/dist/{chunk-BI7HIO2I.js.map → chunk-LSEEMJH7.js.map} +0 -0
- /package/dist/{chunk-44QJVFOF.js.map → chunk-M6PVGN5W.js.map} +0 -0
- /package/dist/{chunk-HPUD5IGB.js.map → chunk-MBYQBTH2.js.map} +0 -0
- /package/dist/{chunk-TL7VLRRF.js.map → chunk-MFSXOQLX.js.map} +0 -0
- /package/dist/{chunk-VH5FRKJM.js.map → chunk-MG773CN7.js.map} +0 -0
- /package/dist/{chunk-2FNYJEOH.js.map → chunk-NA4AOKAJ.js.map} +0 -0
- /package/dist/{chunk-GTFMUWK6.js.map → chunk-NH6QDR7V.js.map} +0 -0
- /package/dist/{chunk-6PZ7RCXK.js.map → chunk-O3YB7GKT.js.map} +0 -0
- /package/dist/{chunk-NS7WH53I.js.map → chunk-O45NATRC.js.map} +0 -0
- /package/dist/{chunk-IXZOZZGD.js.map → chunk-OFIIGVE7.js.map} +0 -0
- /package/dist/{chunk-IRDWXDID.js.map → chunk-QTDNSMOT.js.map} +0 -0
- /package/dist/{chunk-XTAYJDL2.js.map → chunk-QZW77GWD.js.map} +0 -0
- /package/dist/{chunk-NRX5V443.js.map → chunk-REVI2JIA.js.map} +0 -0
- /package/dist/{chunk-U2A2DHWP.js.map → chunk-RO25CJ2V.js.map} +0 -0
- /package/dist/{chunk-ETAPX4JN.js.map → chunk-RSJZG4SD.js.map} +0 -0
- /package/dist/{chunk-XWKN2HJD.js.map → chunk-S2Q6M64P.js.map} +0 -0
- /package/dist/{chunk-773UJC5C.js.map → chunk-SEFMLXA6.js.map} +0 -0
- /package/dist/{chunk-ZLPK2LQ3.js.map → chunk-V6U4HDFJ.js.map} +0 -0
- /package/dist/{chunk-EORL2V7P.js.map → chunk-XPMXRCBW.js.map} +0 -0
- /package/dist/{chunk-IXC6EXVJ.js.map → chunk-XR6EXIZN.js.map} +0 -0
- /package/dist/{chunk-APHVSSLI.js.map → chunk-XZAJSEXA.js.map} +0 -0
- /package/dist/{cli-CAF6VCVO.js.map → cli-VOZ6BCM5.js.map} +0 -0
- /package/dist/{color-7CQNI6Y4.js.map → color-BVSEJ6G5.js.map} +0 -0
- /package/dist/{digest-2AFW3WBL.js.map → digest-XEHPAI5L.js.map} +0 -0
- /package/dist/{history-RFIDCGQY.js.map → history-CK3FEKBC.js.map} +0 -0
- /package/dist/{hydrate-DAEY4PB6.js.map → hydrate-K6TOIE7S.js.map} +0 -0
- /package/dist/{install-skills-TL5D7HZU.js.map → install-skills-IUD6FMAF.js.map} +0 -0
- /package/dist/{keep-57TUKADV.js.map → keep-APP2WSKT.js.map} +0 -0
- /package/dist/{list-DRQRIT6U.js.map → list-OHGYVSWI.js.map} +0 -0
- /package/dist/{note-FHPDVBRI.js.map → note-ELTUIFB6.js.map} +0 -0
- /package/dist/{pin-CFTQDPPC.js.map → pin-W7A4GXHE.js.map} +0 -0
- /package/dist/{review-WKB3K6LI.js.map → review-YH5TH37K.js.map} +0 -0
- /package/dist/{review-now-AT2SPPRO.js.map → review-now-4NBXZUJV.js.map} +0 -0
- /package/dist/{run-YS2D7WAQ.js.map → run-T6YFDM2T.js.map} +0 -0
- /package/dist/{screen-VVRNQXVW.js.map → screen-LXXS4KCS.js.map} +0 -0
- /package/dist/{search-MKYCKZF4.js.map → search-HOIGQH66.js.map} +0 -0
- /package/dist/{section-Y6RDD3MN.js.map → section-NF6SAXSF.js.map} +0 -0
- /package/dist/{show-33VV3XCF.js.map → show-5NYBZRYX.js.map} +0 -0
- /package/dist/{snooze-OFYZVVYS.js.map → snooze-J2PV4C6X.js.map} +0 -0
- /package/dist/{start-OEQ5VW7Y.js.map → start-DO4UJCS4.js.map} +0 -0
- /package/dist/{state-HK67C4UA.js.map → state-63M6QBOW.js.map} +0 -0
- /package/dist/{statusline-Z5HLKDIA.js.map → statusline-UP2KMHYX.js.map} +0 -0
- /package/dist/{statusline-hook-VPPS3PFO.js.map → statusline-hook-6BNEVENM.js.map} +0 -0
- /package/dist/{stop-QNICDWAU.js.map → stop-T2E62H4M.js.map} +0 -0
- /package/dist/{time-PM72GK5W.js.map → time-JVF77UUA.js.map} +0 -0
- /package/dist/{time-actions-O3MCB7FU.js.map → time-actions-JM3QKB5T.js.map} +0 -0
- /package/dist/{todo-UVKGOG7D.js.map → todo-3UNVCCMY.js.map} +0 -0
- /package/dist/{usage-VEKD3JPL.js.map → usage-JDXG5SDA.js.map} +0 -0
- /package/dist/{usage-ask-V2SIRW4F.js.map → usage-ask-5ZWNYLVJ.js.map} +0 -0
- /package/dist/{wait-RQZU3KDY.js.map → wait-FEN3WAEQ.js.map} +0 -0
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-Q53APMHH.js";
|
|
3
3
|
import "./chunk-D2J3AD6L.js";
|
|
4
4
|
import {
|
|
5
5
|
debug,
|
|
@@ -43,16 +43,16 @@ process.on("uncaughtException", handleFatalError);
|
|
|
43
43
|
process.on("unhandledRejection", handleFatalError);
|
|
44
44
|
var args = process.argv.slice(2);
|
|
45
45
|
if (args[0] === "hook" && args[1] === "statusline") {
|
|
46
|
-
const { runStatusLineHook } = await import("./statusline-hook-
|
|
46
|
+
const { runStatusLineHook } = await import("./statusline-hook-6BNEVENM.js");
|
|
47
47
|
await runStatusLineHook();
|
|
48
48
|
process.stdout.write("", () => process.exit(0));
|
|
49
49
|
} else if (args[0] === "hook") {
|
|
50
|
-
const { runHookEvent } = await import("./hook-
|
|
50
|
+
const { runHookEvent } = await import("./hook-FRKNNKO3.js");
|
|
51
51
|
await runHookEvent(args[1], args.slice(2));
|
|
52
52
|
} else {
|
|
53
53
|
const { default: chalk } = await import("chalk");
|
|
54
54
|
if (!process.env.NO_COLOR && chalk.level === 0) chalk.level = 1;
|
|
55
|
-
const { run } = await import("./cli-
|
|
55
|
+
const { run } = await import("./cli-VOZ6BCM5.js");
|
|
56
56
|
const { withReporter } = await import("./report-Z36H65YG.js");
|
|
57
57
|
const { consoleReporter, reportStreamFor } = await import("./console-reporter-XU6VFUZE.js");
|
|
58
58
|
await withReporter(consoleReporter(reportStreamFor(args)), () => run(args));
|
|
@@ -5,46 +5,45 @@ import {
|
|
|
5
5
|
blockRefFrom,
|
|
6
6
|
readBlock,
|
|
7
7
|
removeBlocker
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-35WLDIMQ.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionFromArgs,
|
|
11
11
|
sessionPositionals
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ADOCX5G3.js";
|
|
13
13
|
import "./chunk-6AQRYLOB.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FW35KEAD.js";
|
|
15
15
|
import "./chunk-ZSHWP2VS.js";
|
|
16
16
|
import "./chunk-UPS7NHKI.js";
|
|
17
17
|
import "./chunk-HUXS3VAI.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-RO25CJ2V.js";
|
|
19
19
|
import "./chunk-FGPXMAYU.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-4CXUVBOD.js";
|
|
20
|
+
import "./chunk-CNR4IKC7.js";
|
|
21
|
+
import "./chunk-4CUYK2XD.js";
|
|
22
|
+
import "./chunk-J7IGCYHZ.js";
|
|
24
23
|
import {
|
|
25
24
|
findSession,
|
|
26
25
|
loadHistory
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NVVDE63M.js";
|
|
28
27
|
import "./chunk-NEJVK5CF.js";
|
|
28
|
+
import "./chunk-3PO2LUY7.js";
|
|
29
|
+
import "./chunk-KGHWHAVF.js";
|
|
29
30
|
import {
|
|
30
31
|
sessionIdFor
|
|
31
32
|
} from "./chunk-QGUBOOEN.js";
|
|
32
|
-
import "./chunk-NWKVTUTN.js";
|
|
33
|
-
import "./chunk-KGHWHAVF.js";
|
|
34
|
-
import "./chunk-BMPTUIP4.js";
|
|
35
|
-
import "./chunk-ED6YLB4S.js";
|
|
36
33
|
import "./chunk-Z6ACV5ZQ.js";
|
|
37
|
-
import "./chunk-JUGF3YE7.js";
|
|
38
|
-
import "./chunk-HK6AZQ5Z.js";
|
|
39
|
-
import "./chunk-XIN6XUFL.js";
|
|
40
|
-
import "./chunk-ETWP7MDS.js";
|
|
41
34
|
import "./chunk-7ZATXG5F.js";
|
|
35
|
+
import "./chunk-JUGF3YE7.js";
|
|
42
36
|
import "./chunk-BR6OWWAA.js";
|
|
37
|
+
import "./chunk-KBYXAQS3.js";
|
|
38
|
+
import "./chunk-YQSWVHKK.js";
|
|
39
|
+
import "./chunk-6NOZK4JY.js";
|
|
40
|
+
import "./chunk-Q53APMHH.js";
|
|
43
41
|
import "./chunk-M2X6OHHR.js";
|
|
44
42
|
import "./chunk-QOSAWNOU.js";
|
|
45
43
|
import "./chunk-D2J3AD6L.js";
|
|
46
44
|
import "./chunk-5ZCCUM75.js";
|
|
47
45
|
import "./chunk-IAKOKZYW.js";
|
|
46
|
+
import "./chunk-HK6AZQ5Z.js";
|
|
48
47
|
import "./chunk-F2ECTTSY.js";
|
|
49
48
|
|
|
50
49
|
// src/commands/block.ts
|
|
@@ -100,4 +99,4 @@ var blockCommand = {
|
|
|
100
99
|
export {
|
|
101
100
|
blockCommand
|
|
102
101
|
};
|
|
103
|
-
//# sourceMappingURL=block-
|
|
102
|
+
//# sourceMappingURL=block-ONJSUTQ6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/block.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { blockRefFrom } from '../core/rail/session-blocks.js';\nimport { addBlocker, blockKey, readBlock, removeBlocker } from '../core/rail/session-blocks.js';\nimport { findSession, loadHistory } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/**\n * `work block` — \"Blocked by\" (session-blocks.ts) from a terminal: the\n * session waits on another session (`--on <alias> --on-branch <branch>`) or\n * a pull request (`--pr <url>`); `--off` stops waiting; no option lists it.\n */\nexport const blockCommand: CommandModule = {\n command: 'block [target] [branch]',\n describe: 'Mark a session as waiting on another session or a PR (out of the Inbox until that is done)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('on', { type: 'string', describe: 'The repo or group of the session it waits on' })\n .option('on-branch', { type: 'string', describe: 'The branch of the session it waits on' })\n .option('pr', { type: 'string', describe: 'A pull request URL it waits on' })\n .option('off', { type: 'boolean', describe: 'Stop waiting (on everything, or with --on/--pr on that one)' }),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n const name = `${s.target} · ${s.branch}`;\n let ref = null;\n if (typeof argv.on === 'string') {\n const other = typeof argv['on-branch'] === 'string' ? findSession(loadHistory(), argv.on, argv['on-branch']) : null;\n if (!other) {\n console.error(chalk.red(`No live session ${argv.on} ${argv['on-branch'] ?? '(give --on-branch)'}.`));\n process.exitCode = 1;\n return;\n }\n ref = blockRefFrom({ kind: 'session', id: sessionIdFor(other) });\n } else if (typeof argv.pr === 'string') {\n ref = blockRefFrom({ kind: 'pr', url: argv.pr });\n if (!ref) {\n console.error(chalk.red(`Not a pull request link: ${argv.pr}`));\n process.exitCode = 1;\n return;\n }\n }\n if (argv.off) {\n removeBlocker(id, ref ? blockKey(ref) : undefined);\n console.log(chalk.green(ref ? `${name} no longer waits on ${ref.label}.` : `${name} no longer waits on anything.`));\n return;\n }\n if (!ref) {\n const b = readBlock(id);\n if (!b) console.log(chalk.gray(`${name} waits on nothing.`));\n else\n for (const x of b.by)\n console.log(`${x.label}${x.kind === 'pr' ? ` ${chalk.gray(x.url)}${x.state ? ` (${x.state.toLowerCase()})` : ''}` : ''}`);\n return;\n }\n const r = addBlocker(id, ref);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(chalk.green(`${name} waits on ${ref.label}: out of the Inbox until it is done.`));\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/block.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { blockRefFrom } from '../core/rail/session-blocks.js';\nimport { addBlocker, blockKey, readBlock, removeBlocker } from '../core/rail/session-blocks.js';\nimport { findSession, loadHistory } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/**\n * `work block` — \"Blocked by\" (session-blocks.ts) from a terminal: the\n * session waits on another session (`--on <alias> --on-branch <branch>`) or\n * a pull request (`--pr <url>`); `--off` stops waiting; no option lists it.\n */\nexport const blockCommand: CommandModule = {\n command: 'block [target] [branch]',\n describe: 'Mark a session as waiting on another session or a PR (out of the Inbox until that is done)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('on', { type: 'string', describe: 'The repo or group of the session it waits on' })\n .option('on-branch', { type: 'string', describe: 'The branch of the session it waits on' })\n .option('pr', { type: 'string', describe: 'A pull request URL it waits on' })\n .option('off', { type: 'boolean', describe: 'Stop waiting (on everything, or with --on/--pr on that one)' }),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n const name = `${s.target} · ${s.branch}`;\n let ref = null;\n if (typeof argv.on === 'string') {\n const other = typeof argv['on-branch'] === 'string' ? findSession(loadHistory(), argv.on, argv['on-branch']) : null;\n if (!other) {\n console.error(chalk.red(`No live session ${argv.on} ${argv['on-branch'] ?? '(give --on-branch)'}.`));\n process.exitCode = 1;\n return;\n }\n ref = blockRefFrom({ kind: 'session', id: sessionIdFor(other) });\n } else if (typeof argv.pr === 'string') {\n ref = blockRefFrom({ kind: 'pr', url: argv.pr });\n if (!ref) {\n console.error(chalk.red(`Not a pull request link: ${argv.pr}`));\n process.exitCode = 1;\n return;\n }\n }\n if (argv.off) {\n removeBlocker(id, ref ? blockKey(ref) : undefined);\n console.log(chalk.green(ref ? `${name} no longer waits on ${ref.label}.` : `${name} no longer waits on anything.`));\n return;\n }\n if (!ref) {\n const b = readBlock(id);\n if (!b) console.log(chalk.gray(`${name} waits on nothing.`));\n else\n for (const x of b.by)\n console.log(`${x.label}${x.kind === 'pr' ? ` ${chalk.gray(x.url)}${x.state ? ` (${x.state.toLowerCase()})` : ''}` : ''}`);\n return;\n }\n const r = addBlocker(id, ref);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;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WAAW;AACnB;AAAA,MACF;AAAA,IACF;AACA,QAAI,KAAK,KAAK;AACZ,oBAAc,IAAI,MAAM,SAAS,GAAG,IAAI,MAAS;AACjD,cAAQ,IAAI,MAAM,MAAM,MAAM,GAAG,IAAI,uBAAuB,IAAI,KAAK,MAAM,GAAG,IAAI,+BAA+B,CAAC;AAClH;AAAA,IACF;AACA,QAAI,CAAC,KAAK;AACR,YAAM,IAAI,UAAU,EAAE;AACtB,UAAI,CAAC,EAAG,SAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,oBAAoB,CAAC;AAAA;AAEzD,mBAAW,KAAK,EAAE;AAChB,kBAAQ,IAAI,GAAG,EAAE,KAAK,GAAG,EAAE,SAAS,OAAO,KAAK,MAAM,KAAK,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,KAAK,EAAE,MAAM,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;AAC7H;AAAA,IACF;AACA,UAAM,IAAI,WAAW,IAAI,GAAG;AAC5B,QAAI,CAAC,EAAE,IAAI;AACT,cAAQ,MAAM,MAAM,IAAI,EAAE,KAAK,CAAC;AAChC,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,YAAQ,IAAI,MAAM,MAAM,GAAG,IAAI,aAAa,IAAI,KAAK,sCAAsC,CAAC;AAAA,EAC9F;AACF;","names":[]}
|
|
@@ -8,27 +8,27 @@ import {
|
|
|
8
8
|
import "./chunk-HUXS3VAI.js";
|
|
9
9
|
import {
|
|
10
10
|
loadHistory
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NVVDE63M.js";
|
|
12
12
|
import "./chunk-NEJVK5CF.js";
|
|
13
|
+
import "./chunk-3PO2LUY7.js";
|
|
14
|
+
import "./chunk-KGHWHAVF.js";
|
|
13
15
|
import {
|
|
14
16
|
sessionIdFor
|
|
15
17
|
} from "./chunk-QGUBOOEN.js";
|
|
16
|
-
import "./chunk-NWKVTUTN.js";
|
|
17
|
-
import "./chunk-KGHWHAVF.js";
|
|
18
|
-
import "./chunk-BMPTUIP4.js";
|
|
19
|
-
import "./chunk-ED6YLB4S.js";
|
|
20
18
|
import "./chunk-Z6ACV5ZQ.js";
|
|
21
|
-
import "./chunk-JUGF3YE7.js";
|
|
22
|
-
import "./chunk-HK6AZQ5Z.js";
|
|
23
|
-
import "./chunk-XIN6XUFL.js";
|
|
24
|
-
import "./chunk-ETWP7MDS.js";
|
|
25
19
|
import "./chunk-7ZATXG5F.js";
|
|
20
|
+
import "./chunk-JUGF3YE7.js";
|
|
26
21
|
import "./chunk-BR6OWWAA.js";
|
|
22
|
+
import "./chunk-KBYXAQS3.js";
|
|
23
|
+
import "./chunk-YQSWVHKK.js";
|
|
24
|
+
import "./chunk-6NOZK4JY.js";
|
|
25
|
+
import "./chunk-Q53APMHH.js";
|
|
27
26
|
import "./chunk-M2X6OHHR.js";
|
|
28
27
|
import "./chunk-QOSAWNOU.js";
|
|
29
28
|
import "./chunk-D2J3AD6L.js";
|
|
30
29
|
import "./chunk-5ZCCUM75.js";
|
|
31
30
|
import "./chunk-IAKOKZYW.js";
|
|
31
|
+
import "./chunk-HK6AZQ5Z.js";
|
|
32
32
|
import "./chunk-F2ECTTSY.js";
|
|
33
33
|
|
|
34
34
|
// src/commands/broadcast.ts
|
|
@@ -114,4 +114,4 @@ var broadcastCommand = {
|
|
|
114
114
|
export {
|
|
115
115
|
broadcastCommand
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=broadcast-
|
|
117
|
+
//# sourceMappingURL=broadcast-TVDWHKJE.js.map
|
|
@@ -3,40 +3,40 @@ import {
|
|
|
3
3
|
askCatchUp,
|
|
4
4
|
catchUp,
|
|
5
5
|
catchUpFacts
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-MFSXOQLX.js";
|
|
7
|
+
import "./chunk-V6U4HDFJ.js";
|
|
8
|
+
import "./chunk-QTDNSMOT.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionFromArgs,
|
|
11
11
|
sessionPositionals
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ADOCX5G3.js";
|
|
13
13
|
import "./chunk-6AQRYLOB.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FW35KEAD.js";
|
|
15
15
|
import "./chunk-ZSHWP2VS.js";
|
|
16
16
|
import "./chunk-UPS7NHKI.js";
|
|
17
17
|
import "./chunk-HUXS3VAI.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-NVVDE63M.js";
|
|
19
19
|
import "./chunk-NEJVK5CF.js";
|
|
20
|
+
import "./chunk-3PO2LUY7.js";
|
|
21
|
+
import "./chunk-KGHWHAVF.js";
|
|
20
22
|
import {
|
|
21
23
|
sessionIdFor
|
|
22
24
|
} from "./chunk-QGUBOOEN.js";
|
|
23
|
-
import "./chunk-NWKVTUTN.js";
|
|
24
|
-
import "./chunk-KGHWHAVF.js";
|
|
25
|
-
import "./chunk-BMPTUIP4.js";
|
|
26
|
-
import "./chunk-ED6YLB4S.js";
|
|
27
25
|
import "./chunk-JYWX2N5W.js";
|
|
28
26
|
import "./chunk-Z6ACV5ZQ.js";
|
|
29
|
-
import "./chunk-JUGF3YE7.js";
|
|
30
|
-
import "./chunk-HK6AZQ5Z.js";
|
|
31
|
-
import "./chunk-XIN6XUFL.js";
|
|
32
|
-
import "./chunk-ETWP7MDS.js";
|
|
33
27
|
import "./chunk-7ZATXG5F.js";
|
|
28
|
+
import "./chunk-JUGF3YE7.js";
|
|
34
29
|
import "./chunk-BR6OWWAA.js";
|
|
30
|
+
import "./chunk-KBYXAQS3.js";
|
|
31
|
+
import "./chunk-YQSWVHKK.js";
|
|
32
|
+
import "./chunk-6NOZK4JY.js";
|
|
33
|
+
import "./chunk-Q53APMHH.js";
|
|
35
34
|
import "./chunk-M2X6OHHR.js";
|
|
36
35
|
import "./chunk-QOSAWNOU.js";
|
|
37
36
|
import "./chunk-D2J3AD6L.js";
|
|
38
37
|
import "./chunk-5ZCCUM75.js";
|
|
39
38
|
import "./chunk-IAKOKZYW.js";
|
|
39
|
+
import "./chunk-HK6AZQ5Z.js";
|
|
40
40
|
import "./chunk-F2ECTTSY.js";
|
|
41
41
|
|
|
42
42
|
// src/commands/catchup.ts
|
|
@@ -61,4 +61,4 @@ var catchupCommand = {
|
|
|
61
61
|
export {
|
|
62
62
|
catchupCommand
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=catchup-
|
|
64
|
+
//# sourceMappingURL=catchup-UGDVV5RI.js.map
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
GRANT_HINT,
|
|
8
8
|
childrenOf,
|
|
9
9
|
coordinatorMessage,
|
|
10
|
-
coordinatorSince,
|
|
11
10
|
driveCheck,
|
|
11
|
+
mayCoordinate,
|
|
12
12
|
parentOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OPZL2MRQ.js";
|
|
14
14
|
import {
|
|
15
15
|
callWorkWeb
|
|
16
16
|
} from "./chunk-LB2GAU7E.js";
|
|
17
17
|
import {
|
|
18
18
|
findSessionForCwd
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FW35KEAD.js";
|
|
20
20
|
import "./chunk-ZSHWP2VS.js";
|
|
21
21
|
import "./chunk-UPS7NHKI.js";
|
|
22
22
|
import "./chunk-HUXS3VAI.js";
|
|
@@ -25,27 +25,29 @@ import {
|
|
|
25
25
|
findSessionById,
|
|
26
26
|
loadHistory,
|
|
27
27
|
readStatus
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-NVVDE63M.js";
|
|
29
29
|
import "./chunk-NEJVK5CF.js";
|
|
30
|
+
import "./chunk-3PO2LUY7.js";
|
|
31
|
+
import "./chunk-KGHWHAVF.js";
|
|
30
32
|
import {
|
|
31
33
|
sessionIdFor
|
|
32
34
|
} from "./chunk-QGUBOOEN.js";
|
|
33
|
-
import "./chunk-NWKVTUTN.js";
|
|
34
|
-
import "./chunk-KGHWHAVF.js";
|
|
35
|
-
import "./chunk-BMPTUIP4.js";
|
|
36
|
-
import "./chunk-ED6YLB4S.js";
|
|
37
35
|
import "./chunk-Z6ACV5ZQ.js";
|
|
38
|
-
import "./chunk-JUGF3YE7.js";
|
|
39
|
-
import "./chunk-HK6AZQ5Z.js";
|
|
40
|
-
import "./chunk-XIN6XUFL.js";
|
|
41
|
-
import "./chunk-ETWP7MDS.js";
|
|
42
36
|
import "./chunk-7ZATXG5F.js";
|
|
37
|
+
import "./chunk-JUGF3YE7.js";
|
|
43
38
|
import "./chunk-BR6OWWAA.js";
|
|
39
|
+
import "./chunk-KBYXAQS3.js";
|
|
40
|
+
import "./chunk-YQSWVHKK.js";
|
|
41
|
+
import "./chunk-6NOZK4JY.js";
|
|
42
|
+
import {
|
|
43
|
+
loadConfig
|
|
44
|
+
} from "./chunk-Q53APMHH.js";
|
|
44
45
|
import "./chunk-M2X6OHHR.js";
|
|
45
46
|
import "./chunk-QOSAWNOU.js";
|
|
46
47
|
import "./chunk-D2J3AD6L.js";
|
|
47
48
|
import "./chunk-5ZCCUM75.js";
|
|
48
49
|
import "./chunk-IAKOKZYW.js";
|
|
50
|
+
import "./chunk-HK6AZQ5Z.js";
|
|
49
51
|
import "./chunk-F2ECTTSY.js";
|
|
50
52
|
|
|
51
53
|
// src/commands/child.ts
|
|
@@ -69,6 +71,7 @@ var childCommand = {
|
|
|
69
71
|
const me = findSessionForCwd(process.cwd(), sessions);
|
|
70
72
|
if (!me) return fail("This folder is not inside a work session: run `work child` from the coordinating session's folder.");
|
|
71
73
|
const myId = sessionIdFor(me);
|
|
74
|
+
const coordinates = () => mayCoordinate(myId, me, loadConfig());
|
|
72
75
|
const json = argv.json === true;
|
|
73
76
|
if (action === "list") {
|
|
74
77
|
const rows = childrenOf(myId).map((k) => {
|
|
@@ -85,7 +88,7 @@ var childCommand = {
|
|
|
85
88
|
};
|
|
86
89
|
});
|
|
87
90
|
if (json) return void process.stdout.write(JSON.stringify(rows, null, 2) + "\n");
|
|
88
|
-
if (!
|
|
91
|
+
if (!coordinates()) console.error(chalk.gray(`Not coordinating: ${GRANT_HINT}.`));
|
|
89
92
|
if (!rows.length) return void console.log(chalk.gray("No sessions started from this one."));
|
|
90
93
|
for (const r2 of rows)
|
|
91
94
|
console.log(
|
|
@@ -124,7 +127,7 @@ var childCommand = {
|
|
|
124
127
|
const child = findSession(sessions, target, branch);
|
|
125
128
|
if (!child) return fail(`No session ${target} ${branch}.`);
|
|
126
129
|
const childId = sessionIdFor(child);
|
|
127
|
-
const may = driveCheck(myId, childId, { parentOf, coordinator: (id) =>
|
|
130
|
+
const may = driveCheck(myId, childId, { parentOf, coordinator: (id) => id === myId && coordinates() });
|
|
128
131
|
if (!may.ok) return fail(`${label(child)}: ${may.error}`);
|
|
129
132
|
if (action === "send") {
|
|
130
133
|
const msg = text(argv);
|
|
@@ -145,4 +148,4 @@ var childCommand = {
|
|
|
145
148
|
export {
|
|
146
149
|
childCommand
|
|
147
150
|
};
|
|
148
|
-
//# sourceMappingURL=child-
|
|
151
|
+
//# sourceMappingURL=child-GPVONLJF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/child.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { callWorkWeb } from '../core/platform/web-discovery.js';\nimport { findSession, findSessionById, loadHistory, type WorktreeSession } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { findSessionForCwd } from '../core/comments/pending-delivery.js';\nimport { loadConfig } from '../core/platform/config.js';\nimport { childrenOf, coordinatorMessage, driveCheck, GRANT_HINT, mayCoordinate, parentOf } from '../core/sessions/session-children.js';\nimport { sendHowText } from '../core/sessions/session-control.js';\nimport { readStatus } from '../core/status/session-status.js';\nimport type { SendWire } from '../core/api-types.js';\n\n/**\n * `work child` — a coordinating session's own sessions (session-children.ts): `spawn` one on a new branch with its\n * task, `list` them, `send` one a follow-up, `finish` one (archive it: its agent stopped, its work kept). Run from the\n * coordinator's folder; it acts only on the sessions that one started, and only once `work coordinate --on` granted\n * it — so work's session settings can allow `work child` without asking each time.\n */\n\nconst ACTIONS = ['spawn', 'list', 'send', 'finish'] as const;\ntype Action = (typeof ACTIONS)[number];\n\nconst label = (s: WorktreeSession) => `${s.target} · ${s.branch}`;\n\nfunction fail(message: string): void {\n console.error(chalk.red(message));\n process.exitCode = 1;\n}\n\n// No --file: `work child` runs without asking, and a file read for it would skip the repo's deny rules (no Read call).\nfunction text(argv: Record<string, unknown>): string | null {\n return typeof argv.message === 'string' ? argv.message : null;\n}\n\nexport const childCommand: CommandModule = {\n command: 'child <action> [target] [branch]',\n describe: \"A coordinating session's own sessions: spawn, list, send, finish (run from the coordinator's folder)\",\n builder: (yargs) =>\n yargs\n .positional('action', { choices: ACTIONS, describe: 'spawn | list | send | finish' })\n .positional('target', { type: 'string', describe: 'Repo alias or group of the child' })\n .positional('branch', { type: 'string', describe: \"The child's branch (spawn: a new one)\" })\n .option('message', { alias: 'm', type: 'string', describe: 'spawn: its task; send: the message' })\n .option('base', { type: 'string', describe: 'spawn: the branch to start from (default: the repo’s base)' })\n .option('name', { type: 'string', describe: 'spawn: a name for it' })\n .option('account', { type: 'string', describe: 'spawn: the Claude account it runs on' })\n .option('json', { type: 'boolean', default: false, describe: 'Print the result as JSON' }),\n handler: async (argv) => {\n const action = argv.action as Action;\n const sessions = loadHistory();\n const me = findSessionForCwd(process.cwd(), sessions);\n if (!me) return fail(\"This folder is not inside a work session: run `work child` from the coordinating session's folder.\");\n const myId = sessionIdFor(me);\n const coordinates = () => mayCoordinate(myId, me, loadConfig());\n const json = argv.json === true;\n\n if (action === 'list') {\n const rows = childrenOf(myId).map((k) => {\n const s = findSessionById(k.id);\n const st = readStatus(k.id);\n return {\n sessionId: k.id,\n target: s?.target ?? null,\n branch: s?.branch ?? null,\n startedAt: k.at,\n archived: !s || !!s.archivedAt,\n state: st?.state ?? null,\n summary: st?.summary ?? null,\n };\n });\n if (json) return void process.stdout.write(JSON.stringify(rows, null, 2) + '\\n');\n if (!coordinates()) console.error(chalk.gray(`Not coordinating: ${GRANT_HINT}.`));\n if (!rows.length) return void console.log(chalk.gray('No sessions started from this one.'));\n for (const r of rows)\n console.log(\n `${r.target ?? '?'} · ${r.branch ?? '?'} ${r.archived ? chalk.gray('archived') : (r.state ?? 'not started')}${r.summary && !r.archived ? chalk.gray(` ${r.summary}`) : ''}`,\n );\n return;\n }\n\n const target = typeof argv.target === 'string' ? argv.target : undefined;\n const branch = typeof argv.branch === 'string' ? argv.branch : undefined;\n if (!target || !branch) return fail(`work child ${action} needs <target> <branch>.`);\n\n if (action === 'spawn') {\n const task = text(argv);\n if (!task?.trim()) return fail('Give its task with -m \"…\".');\n const r = await callWorkWeb<{ sessionId: string; started?: string; startError?: string; warnings?: string[] }>(\n 'POST',\n '/api/worktrees',\n {\n target,\n branch,\n prompt: task,\n parentId: myId,\n ...(typeof argv.base === 'string' ? { base: argv.base } : {}),\n ...(typeof argv.name === 'string' ? { name: argv.name } : {}),\n ...(typeof argv.account === 'string' ? { account: argv.account } : {}),\n },\n 300_000, // a worktree, its setup and its agent's start\n );\n if (!r.ok) return fail(r.error);\n if (json) return void process.stdout.write(JSON.stringify({ target, branch, ...r.body }, null, 2) + '\\n');\n for (const w of r.body.warnings ?? []) console.error(chalk.yellow(w));\n if (r.body.startError) return fail(`${target} · ${branch} was made, but its agent did not start: ${r.body.startError}`);\n console.log(`${target} · ${branch}: started with its task. It reports back with \\`work report\\`.`);\n return;\n }\n\n const child = findSession(sessions, target, branch);\n if (!child) return fail(`No session ${target} ${branch}.`);\n const childId = sessionIdFor(child);\n const may = driveCheck(myId, childId, { parentOf, coordinator: (id) => id === myId && coordinates() });\n if (!may.ok) return fail(`${label(child)}: ${may.error}`);\n\n if (action === 'send') {\n const msg = text(argv);\n if (!msg?.trim()) return fail('Give the message with -m \"…\".');\n const r = await callWorkWeb<SendWire>('POST', `/api/sessions/${childId}/send`, {\n text: coordinatorMessage(me.title?.trim() || label(me), msg),\n });\n if (!r.ok) return fail(r.error);\n console.log(`${label(child)}: ${sendHowText(r.body.how)}`);\n return;\n }\n\n // finish: archived as the dashboard's Archive does — its agent stopped, uncommitted work saved, nothing discarded.\n const r = await callWorkWeb<{ ok: true; warnings?: string[] }>('POST', `/api/sessions/${childId}/archive`, { archived: true }, 120_000);\n if (!r.ok) return fail(`${label(child)}: ${r.error}`);\n for (const w of r.body.warnings ?? []) console.error(chalk.yellow(w));\n console.log(`${label(child)}: archived (its branch and work are kept; Restore brings it back).`);\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAmBlB,IAAM,UAAU,CAAC,SAAS,QAAQ,QAAQ,QAAQ;AAGlD,IAAM,QAAQ,CAAC,MAAuB,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM;AAE/D,SAAS,KAAK,SAAuB;AACnC,UAAQ,MAAM,MAAM,IAAI,OAAO,CAAC;AAChC,UAAQ,WAAW;AACrB;AAGA,SAAS,KAAK,MAA8C;AAC1D,SAAO,OAAO,KAAK,YAAY,WAAW,KAAK,UAAU;AAC3D;AAEO,IAAM,eAA8B;AAAA,EACzC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,MACG,WAAW,UAAU,EAAE,SAAS,SAAS,UAAU,+BAA+B,CAAC,EACnF,WAAW,UAAU,EAAE,MAAM,UAAU,UAAU,mCAAmC,CAAC,EACrF,WAAW,UAAU,EAAE,MAAM,UAAU,UAAU,wCAAwC,CAAC,EAC1F,OAAO,WAAW,EAAE,OAAO,KAAK,MAAM,UAAU,UAAU,qCAAqC,CAAC,EAChG,OAAO,QAAQ,EAAE,MAAM,UAAU,UAAU,kEAA6D,CAAC,EACzG,OAAO,QAAQ,EAAE,MAAM,UAAU,UAAU,uBAAuB,CAAC,EACnE,OAAO,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
|
+
} from "./chunk-M6PVGN5W.js";
|
|
6
6
|
import {
|
|
7
7
|
findSessionForCwd
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FW35KEAD.js";
|
|
9
9
|
import {
|
|
10
10
|
listProcessUsage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NVVDE63M.js";
|
|
12
12
|
import {
|
|
13
13
|
sessionIdFor
|
|
14
14
|
} from "./chunk-QGUBOOEN.js";
|
|
@@ -76,4 +76,4 @@ export {
|
|
|
76
76
|
agentsBySession,
|
|
77
77
|
summarizeAgents
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-2MAMYB72.js.map
|
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
continueWhenReady
|
|
4
|
+
} from "./chunk-XWUX474Q.js";
|
|
2
5
|
import {
|
|
3
6
|
validGrid
|
|
4
7
|
} from "./chunk-6KMG4WNW.js";
|
|
5
8
|
import {
|
|
9
|
+
PtyHostClient,
|
|
6
10
|
ensureHost,
|
|
7
11
|
probeHostDetailed
|
|
8
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6ER6IBFJ.js";
|
|
9
13
|
import {
|
|
10
14
|
hostInfoPath,
|
|
11
15
|
readHostInfo
|
|
12
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O45NATRC.js";
|
|
13
17
|
import {
|
|
14
18
|
agentFor,
|
|
15
19
|
agentSettings,
|
|
16
20
|
assistantAgent,
|
|
17
|
-
internalAgent
|
|
18
|
-
|
|
21
|
+
internalAgent,
|
|
22
|
+
liveAgents,
|
|
23
|
+
logSwallowed
|
|
24
|
+
} from "./chunk-3PO2LUY7.js";
|
|
25
|
+
import {
|
|
26
|
+
json,
|
|
27
|
+
tx,
|
|
28
|
+
withDb
|
|
29
|
+
} from "./chunk-QGUBOOEN.js";
|
|
19
30
|
import {
|
|
20
31
|
detachHere,
|
|
21
32
|
isPidAlive,
|
|
@@ -32,6 +43,98 @@ import {
|
|
|
32
43
|
debugLog
|
|
33
44
|
} from "./chunk-IAKOKZYW.js";
|
|
34
45
|
|
|
46
|
+
// src/core/pty/restart-carry-on.ts
|
|
47
|
+
var KEY = "pty:interrupted";
|
|
48
|
+
var CARRY_ON_FRESH_MS = 30 * 6e4;
|
|
49
|
+
var CARRY_ON_READY_MS = 18e4;
|
|
50
|
+
var asRecord = (v) => {
|
|
51
|
+
const o = v;
|
|
52
|
+
return o && Array.isArray(o.ids) && o.ids.every((x) => typeof x === "string") && typeof o.at === "string" ? o : null;
|
|
53
|
+
};
|
|
54
|
+
function interruptedBy(terminals, agents) {
|
|
55
|
+
const mid = new Set(agents.filter((a) => a.state === "busy" || a.state === "waiting").map((a) => a.pid));
|
|
56
|
+
return [...new Set(terminals.filter((t) => mid.has(t.pid)).map((t) => t.id))];
|
|
57
|
+
}
|
|
58
|
+
function freshIds(d, now) {
|
|
59
|
+
const row = d.prepare("SELECT value FROM meta WHERE key = ?").get(KEY);
|
|
60
|
+
if (!row) return [];
|
|
61
|
+
const rec = asRecord(json.parse(row.value));
|
|
62
|
+
if (rec && now - Date.parse(rec.at) <= CARRY_ON_FRESH_MS) return rec.ids;
|
|
63
|
+
d.prepare("DELETE FROM meta WHERE key = ?").run(KEY);
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
function write(d, ids, at) {
|
|
67
|
+
if (ids.length)
|
|
68
|
+
d.prepare("INSERT OR REPLACE INTO meta (key, value) VALUES (?, ?)").run(KEY, JSON.stringify({ ids, at: at.toISOString() }));
|
|
69
|
+
else d.prepare("DELETE FROM meta WHERE key = ?").run(KEY);
|
|
70
|
+
}
|
|
71
|
+
function recordInterrupted(ids, now = /* @__PURE__ */ new Date()) {
|
|
72
|
+
return tx((d) => {
|
|
73
|
+
const all = [.../* @__PURE__ */ new Set([...freshIds(d, now.getTime()), ...ids])];
|
|
74
|
+
write(d, all, now);
|
|
75
|
+
return all;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function unrecordInterrupted(ids, now = Date.now()) {
|
|
79
|
+
if (!ids.length) return;
|
|
80
|
+
tx((d) => {
|
|
81
|
+
const left = freshIds(d, now).filter((id) => !ids.includes(id));
|
|
82
|
+
write(d, left, new Date(now));
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function pendingInterrupted(now = Date.now()) {
|
|
86
|
+
return tx((d) => freshIds(d, now));
|
|
87
|
+
}
|
|
88
|
+
function interruptedWaiting(now = Date.now()) {
|
|
89
|
+
return withDb((d) => {
|
|
90
|
+
const row = d.prepare("SELECT value FROM meta WHERE key = ?").get(KEY);
|
|
91
|
+
const rec = row ? asRecord(json.parse(row.value)) : null;
|
|
92
|
+
return rec && now - Date.parse(rec.at) <= CARRY_ON_FRESH_MS ? rec.ids.length : 0;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function doneInterrupted(id) {
|
|
96
|
+
tx((d) => {
|
|
97
|
+
const row = d.prepare("SELECT value FROM meta WHERE key = ?").get(KEY);
|
|
98
|
+
const rec = row ? asRecord(json.parse(row.value)) : null;
|
|
99
|
+
if (!rec) return;
|
|
100
|
+
const left = rec.ids.filter((x) => x !== id);
|
|
101
|
+
if (left.length) d.prepare("INSERT OR REPLACE INTO meta (key, value) VALUES (?, ?)").run(KEY, JSON.stringify({ ...rec, ids: left }));
|
|
102
|
+
else d.prepare("DELETE FROM meta WHERE key = ?").run(KEY);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
async function carryOn(ids, io, opts = {}) {
|
|
106
|
+
const one = async (id) => {
|
|
107
|
+
if (io.pidOf(id) === null) return "not-restored";
|
|
108
|
+
let gone = false;
|
|
109
|
+
let failed = false;
|
|
110
|
+
const told = await continueWhenReady(
|
|
111
|
+
id,
|
|
112
|
+
{
|
|
113
|
+
ready: () => {
|
|
114
|
+
const pid = io.pidOf(id);
|
|
115
|
+
if (pid === null) gone = true;
|
|
116
|
+
return gone || io.ready(id, pid);
|
|
117
|
+
},
|
|
118
|
+
send: async (_id, text) => {
|
|
119
|
+
if (gone) return;
|
|
120
|
+
failed = !await io.submit(id, text).catch(() => false);
|
|
121
|
+
},
|
|
122
|
+
...io.sleep ? { sleep: io.sleep } : {}
|
|
123
|
+
},
|
|
124
|
+
{ everyMs: opts.everyMs, timeoutMs: opts.timeoutMs ?? CARRY_ON_READY_MS }
|
|
125
|
+
);
|
|
126
|
+
return gone ? "not-restored" : !told ? "never-ready" : failed ? "failed" : "told";
|
|
127
|
+
};
|
|
128
|
+
const out = await Promise.all(
|
|
129
|
+
ids.map(async (id) => {
|
|
130
|
+
const how = await one(id);
|
|
131
|
+
io.done?.(id);
|
|
132
|
+
return [id, how];
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
return Object.fromEntries(out);
|
|
136
|
+
}
|
|
137
|
+
|
|
35
138
|
// src/core/pty/host-control.ts
|
|
36
139
|
import fs from "fs";
|
|
37
140
|
import { execFile } from "child_process";
|
|
@@ -57,20 +160,43 @@ function commandLineOf(pid) {
|
|
|
57
160
|
function looksLikeHost(commandLine) {
|
|
58
161
|
return !!commandLine && /(^|\s|["'\\/])pty-host(\s|$|["'])/.test(commandLine) && !/\bpty-host\b.*--(stop|restart|status)\b/.test(commandLine);
|
|
59
162
|
}
|
|
163
|
+
async function noteInterrupted(info) {
|
|
164
|
+
try {
|
|
165
|
+
const agents = liveAgents().filter((a) => a.state === "busy" || a.state === "waiting");
|
|
166
|
+
if (!agents.length) return [];
|
|
167
|
+
const terminals = await Promise.race([
|
|
168
|
+
new PtyHostClient(info).list(),
|
|
169
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("the host did not list its terminals in time")), 3e3).unref())
|
|
170
|
+
]);
|
|
171
|
+
const ids = interruptedBy(terminals, agents);
|
|
172
|
+
if (ids.length) recordInterrupted(ids);
|
|
173
|
+
return ids;
|
|
174
|
+
} catch (err) {
|
|
175
|
+
logSwallowed("note the sessions a host stop interrupts", err);
|
|
176
|
+
return [];
|
|
177
|
+
}
|
|
178
|
+
}
|
|
60
179
|
async function stopHost(kill = killTree, probeTimeoutMs = 5e3, opts = {}) {
|
|
180
|
+
const note = opts.noteInterrupted === void 0 ? noteInterrupted : opts.noteInterrupted;
|
|
181
|
+
const noteThenKill = async (info) => {
|
|
182
|
+
const added = note ? await note(info) : [];
|
|
183
|
+
const outcome = killAndForget(kill, info.pid);
|
|
184
|
+
if (outcome !== "stopped" && added.length) unrecordInterrupted(added);
|
|
185
|
+
return outcome;
|
|
186
|
+
};
|
|
61
187
|
const hostInfo = readHostInfo();
|
|
62
188
|
if (!hostInfo) return "not-running";
|
|
63
189
|
const probe = await probeHostDetailed(hostInfo, probeTimeoutMs);
|
|
64
190
|
if (probe.kind === "timeout") {
|
|
65
191
|
const ours = opts.isOurHost ?? (async (pid) => isPidAlive(pid) && looksLikeHost(await commandLineOf(pid)));
|
|
66
192
|
if (!opts.force || !await ours(hostInfo.pid)) return "unresponsive";
|
|
67
|
-
return
|
|
193
|
+
return noteThenKill(hostInfo);
|
|
68
194
|
}
|
|
69
195
|
if (probe.kind !== "host" || probe.pid !== hostInfo.pid) {
|
|
70
196
|
removeInfo();
|
|
71
197
|
return "stale-file";
|
|
72
198
|
}
|
|
73
|
-
return
|
|
199
|
+
return noteThenKill(hostInfo);
|
|
74
200
|
}
|
|
75
201
|
function killAndForget(kill, pid) {
|
|
76
202
|
const ok = kill(pid);
|
|
@@ -187,8 +313,13 @@ function resumeFromParams(params) {
|
|
|
187
313
|
export {
|
|
188
314
|
withResume,
|
|
189
315
|
resumeFromParams,
|
|
316
|
+
CARRY_ON_FRESH_MS,
|
|
317
|
+
pendingInterrupted,
|
|
318
|
+
interruptedWaiting,
|
|
319
|
+
doneInterrupted,
|
|
320
|
+
carryOn,
|
|
190
321
|
stopHost,
|
|
191
322
|
restartHost,
|
|
192
323
|
ensureAgentPath
|
|
193
324
|
};
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
325
|
+
//# sourceMappingURL=chunk-2YDY25YI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/pty/restart-carry-on.ts","../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 type { LiveAgent } from '../agents/types.js';\nimport { json, tx, withDb } from '../platform/db.js';\nimport { continueWhenReady } from '../sessions/account-switch.js';\n\n/**\n * The turns a PTY host restart cut off, carried on by the new host (reported: \"just restarted terminal host after\n * update, do all sessions continue work automatically?\" — they didn't: five sessions sat idle, one of them having lost\n * the permission question it was waiting on). As a switch of account does (account-switch.ts):\n *\n * - **Before** the old host is stopped (`stopHost`, every way: `work pty-host --restart` / `--stop`, the dashboard's\n * Restart it, an update), the sessions it runs whose agent is mid-turn or waiting on you are recorded (`meta`\n * `pty:interrupted`, with when): the host's own terminals (its session ids and their pids) against Claude Code's\n * state for each process. A stop that fails takes them out again — those sessions weren't interrupted.\n * - **After** the new host restored its sessions, it reads the record and, for each one it restored, waits for its\n * agent to say it is at its prompt (`continueWhenReady`, the switch's), then types `continue`. Each one is taken out\n * of the record once dealt with, so a host stopped again before it got to them leaves them for the next one.\n *\n * A record older than CARRY_ON_FRESH_MS is dropped unread: a host stopped long ago and started today doesn't resume\n * yesterday's turns behind your back. One that was idle — its turn done, or at its prompt with background commands\n * (`shell`) — is left alone.\n */\nconst KEY = 'pty:interrupted';\nexport const CARRY_ON_FRESH_MS = 30 * 60_000;\n/** Restoring many sessions at once is slow: each one gets this long to be ready. */\nexport const CARRY_ON_READY_MS = 180_000;\n\ninterface Interrupted {\n ids: string[];\n at: string;\n}\n\nconst asRecord = (v: unknown): Interrupted | null => {\n const o = v as Interrupted | null;\n return o && Array.isArray(o.ids) && o.ids.every((x) => typeof x === 'string') && typeof o.at === 'string' ? o : null;\n};\n\n/**\n * The host's sessions whose agent is mid-turn or waiting on you: the host's terminals (`terminals`: session id → its\n * process) against the agents' own states. Pure.\n */\nexport function interruptedBy(\n terminals: ReadonlyArray<{ id: string; pid: number }>,\n agents: readonly Pick<LiveAgent, 'pid' | 'state'>[],\n): string[] {\n const mid = new Set(agents.filter((a) => a.state === 'busy' || a.state === 'waiting').map((a) => a.pid));\n return [...new Set(terminals.filter((t) => mid.has(t.pid)).map((t) => t.id))];\n}\n\n/** The record's ids when it is fresh, else none (a stale one is removed). Runs inside a transaction. */\nfunction freshIds(d: Parameters<Parameters<typeof tx>[0]>[0], now: number): string[] {\n const row = d.prepare('SELECT value FROM meta WHERE key = ?').get(KEY) as { value: string } | undefined;\n if (!row) return [];\n const rec = asRecord(json.parse(row.value));\n if (rec && now - Date.parse(rec.at) <= CARRY_ON_FRESH_MS) return rec.ids;\n d.prepare('DELETE FROM meta WHERE key = ?').run(KEY);\n return [];\n}\n\nfunction write(d: Parameters<Parameters<typeof tx>[0]>[0], ids: readonly string[], at: Date): void {\n if (ids.length)\n d.prepare('INSERT OR REPLACE INTO meta (key, value) VALUES (?, ?)').run(KEY, JSON.stringify({ ids, at: at.toISOString() }));\n else d.prepare('DELETE FROM meta WHERE key = ?').run(KEY);\n}\n\n/**\n * Record these as interrupted by the stop about to happen, with those an earlier stop recorded that weren't dealt\n * with yet (a host stopped again before it got to them). Returns the whole list now.\n */\nexport function recordInterrupted(ids: readonly string[], now = new Date()): string[] {\n return tx((d) => {\n const all = [...new Set([...freshIds(d, now.getTime()), ...ids])];\n write(d, all, now);\n return all;\n });\n}\n\n/** A stop that didn't happen: these weren't interrupted after all (the rest of the record stays). */\nexport function unrecordInterrupted(ids: readonly string[], now = Date.now()): void {\n if (!ids.length) return;\n tx((d) => {\n const left = freshIds(d, now).filter((id) => !ids.includes(id));\n write(d, left, new Date(now));\n });\n}\n\n/** The ones waiting for a host to carry them on (fresh only). */\nexport function pendingInterrupted(now = Date.now()): string[] {\n return tx((d) => freshIds(d, now));\n}\n\n/** How many are waiting (fresh only; for what a restart says). */\nexport function interruptedWaiting(now = Date.now()): number {\n return withDb((d) => {\n const row = d.prepare('SELECT value FROM meta WHERE key = ?').get(KEY) as { value: string } | undefined;\n const rec = row ? asRecord(json.parse(row.value)) : null;\n return rec && now - Date.parse(rec.at) <= CARRY_ON_FRESH_MS ? rec.ids.length : 0;\n });\n}\n\n/** One dealt with (told, not restored, never ready, failed): out of the record. */\nexport function doneInterrupted(id: string): void {\n tx((d) => {\n const row = d.prepare('SELECT value FROM meta WHERE key = ?').get(KEY) as { value: string } | undefined;\n const rec = row ? asRecord(json.parse(row.value)) : null;\n if (!rec) return;\n const left = rec.ids.filter((x) => x !== id);\n if (left.length) d.prepare('INSERT OR REPLACE INTO meta (key, value) VALUES (?, ?)').run(KEY, JSON.stringify({ ...rec, ids: left }));\n else d.prepare('DELETE FROM meta WHERE key = ?').run(KEY);\n });\n}\n\nexport interface CarryOnIo {\n /** Its agent's process in the new host: null when it wasn't restored, or its terminal has ended. */\n pidOf: (id: string) => number | null;\n /** That agent is at its prompt. */\n ready: (id: string, pid: number) => boolean;\n /** Type `text` into its prompt and submit it. */\n submit: (id: string, text: string) => Promise<boolean>;\n /** One was dealt with (each, as it is). */\n done?: (id: string) => void;\n sleep?: (ms: number) => Promise<void>;\n}\n\nexport type CarryOnOutcome = 'told' | 'not-restored' | 'never-ready' | 'failed';\n\n/**\n * Tell each restored one to continue once it is ready (`continueWhenReady`): all in parallel, each up to `timeoutMs`.\n * One whose terminal isn't there (not restored, or it ended meanwhile) stops being waited for. Returns each outcome.\n */\nexport async function carryOn(\n ids: readonly string[],\n io: CarryOnIo,\n opts: { everyMs?: number; timeoutMs?: number } = {},\n): Promise<Record<string, CarryOnOutcome>> {\n const one = async (id: string): Promise<CarryOnOutcome> => {\n if (io.pidOf(id) === null) return 'not-restored';\n let gone = false;\n let failed = false;\n const told = await continueWhenReady(\n id,\n {\n ready: () => {\n const pid = io.pidOf(id);\n if (pid === null) gone = true;\n return gone || io.ready(id, pid!);\n },\n send: async (_id, text) => {\n if (gone) return;\n failed = !(await io.submit(id, text).catch(() => false));\n },\n ...(io.sleep ? { sleep: io.sleep } : {}),\n },\n { everyMs: opts.everyMs, timeoutMs: opts.timeoutMs ?? CARRY_ON_READY_MS },\n );\n return gone ? 'not-restored' : !told ? 'never-ready' : failed ? 'failed' : 'told';\n };\n const out = await Promise.all(\n ids.map(async (id) => {\n const how = await one(id);\n io.done?.(id);\n return [id, how] as const;\n }),\n );\n return Object.fromEntries(out);\n}\n","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';\nimport { liveAgents } from '../agents/index.js';\nimport { interruptedBy, recordInterrupted, unrecordInterrupted } from './restart-carry-on.js';\nimport { PtyHostClient } from './pty-host-client.js';\nimport type { HostInfo } from './pty-host-protocol.js';\nimport { logSwallowed } from '../platform/best-effort.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 * Before the host is stopped: which of its sessions are mid-turn or waiting on you, recorded for the next host to tell\n * them to continue (restart-carry-on.ts). The agents' own states first — none busy (the usual stop): nothing more is\n * asked —, then the host's terminals (its session ids and their pids), never a guess from folders. Returns the ones\n * this stop added, to take out again should it fail. Never fails the stop: what can't be read records nothing.\n */\nexport async function noteInterrupted(info: HostInfo): Promise<string[]> {\n try {\n const agents = liveAgents().filter((a) => a.state === 'busy' || a.state === 'waiting');\n if (!agents.length) return [];\n // A hung host (a forced stop) may not answer: a few seconds, then nothing is recorded.\n const terminals = await Promise.race([\n new PtyHostClient(info).list(),\n new Promise<never>((_, reject) => setTimeout(() => reject(new Error('the host did not list its terminals in time')), 3000).unref()),\n ]);\n const ids = interruptedBy(terminals, agents);\n if (ids.length) recordInterrupted(ids);\n return ids;\n } catch (err) {\n logSwallowed('note the sessions a host stop interrupts', err);\n return [];\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 * What it interrupts is noted first (`noteInterrupted`; tests pass null), and taken out again when the kill fails.\n */\nexport async function stopHost(\n kill: (pid: number) => boolean = killTree,\n probeTimeoutMs = 5000,\n opts: {\n force?: boolean;\n isOurHost?: (pid: number) => Promise<boolean>;\n noteInterrupted?: ((info: HostInfo) => Promise<string[]>) | null;\n } = {},\n): Promise<StopOutcome> {\n const note = opts.noteInterrupted === undefined ? noteInterrupted : opts.noteInterrupted;\n const noteThenKill = async (info: HostInfo): Promise<StopOutcome> => {\n const added = note ? await note(info) : [];\n const outcome = killAndForget(kill, info.pid);\n // Not stopped: those sessions weren't interrupted after all.\n if (outcome !== 'stopped' && added.length) unrecordInterrupted(added);\n return outcome;\n };\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 noteThenKill(hostInfo);\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 noteThenKill(hostInfo);\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":";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