@moberg_hr/work-tree 2.9.3 → 2.10.0
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-NG75VLRU.js → account-QSNXX5YV.js} +81 -98
- package/dist/account-QSNXX5YV.js.map +1 -0
- package/dist/{add-repo-EDU3QEYI.js → add-repo-YZ32MLZG.js} +32 -28
- package/dist/{add-repo-EDU3QEYI.js.map → add-repo-YZ32MLZG.js.map} +1 -1
- package/dist/{answer-MHOJ2J6S.js → answer-Y4T5X446.js} +16 -13
- package/dist/{answer-MHOJ2J6S.js.map → answer-Y4T5X446.js.map} +1 -1
- package/dist/{attach-37JOJ4C3.js → attach-XPYWYHDP.js} +25 -19
- package/dist/{attach-37JOJ4C3.js.map → attach-XPYWYHDP.js.map} +1 -1
- package/dist/bin.js +4 -4
- package/dist/{block-D5CAR53T.js → block-JVAGG5QA.js} +22 -13
- package/dist/block-JVAGG5QA.js.map +1 -0
- package/dist/{broadcast-LLYHUWXA.js → broadcast-FATIANHX.js} +11 -9
- package/dist/{broadcast-LLYHUWXA.js.map → broadcast-FATIANHX.js.map} +1 -1
- package/dist/{catchup-2SL3JGA7.js → catchup-OTI2KZG5.js} +17 -15
- package/dist/{catchup-2SL3JGA7.js.map → catchup-OTI2KZG5.js.map} +1 -1
- package/dist/{chunk-37XQIG7F.js → chunk-27LWL6QE.js} +111 -49
- package/dist/chunk-27LWL6QE.js.map +1 -0
- package/dist/chunk-2HHIDWHH.js +50 -0
- package/dist/chunk-2HHIDWHH.js.map +1 -0
- package/dist/{chunk-T7AFYEQ7.js → chunk-2K5TDJ7M.js} +5 -5
- package/dist/{chunk-2JNW2AQ2.js → chunk-2MAZV5KS.js} +17 -2
- package/dist/chunk-2MAZV5KS.js.map +1 -0
- package/dist/{chunk-S3FMTEFR.js → chunk-2VRZVUM7.js} +13 -6
- package/dist/chunk-2VRZVUM7.js.map +1 -0
- package/dist/{chunk-63VY4YJM.js → chunk-34E2LA3M.js} +34 -9
- package/dist/chunk-34E2LA3M.js.map +1 -0
- package/dist/{chunk-QL36KN7X.js → chunk-353ZINJ2.js} +3 -3
- package/dist/{chunk-5QGCF3PS.js → chunk-3BSFVKMK.js} +2 -2
- package/dist/{chunk-WTQ2QCAG.js → chunk-3S6L437Q.js} +4 -5
- package/dist/chunk-3S6L437Q.js.map +1 -0
- package/dist/{chunk-AAYWHIIT.js → chunk-3XG23PLG.js} +8 -55
- package/dist/chunk-3XG23PLG.js.map +1 -0
- package/dist/{chunk-RFINYWID.js → chunk-46XSWHCQ.js} +14 -5
- package/dist/{chunk-RFINYWID.js.map → chunk-46XSWHCQ.js.map} +1 -1
- package/dist/{chunk-J36ULZBO.js → chunk-4K4S53KX.js} +2 -2
- package/dist/{chunk-ZI2KXTKM.js → chunk-4O4VQQEA.js} +6 -10
- package/dist/chunk-4O4VQQEA.js.map +1 -0
- package/dist/chunk-4TTYEMOY.js +180 -0
- package/dist/chunk-4TTYEMOY.js.map +1 -0
- package/dist/{chunk-GRLKPVTP.js → chunk-5R5JEQW7.js} +55 -80
- package/dist/chunk-5R5JEQW7.js.map +1 -0
- package/dist/chunk-63ZLPXRL.js +199 -0
- package/dist/chunk-63ZLPXRL.js.map +1 -0
- package/dist/{chunk-QHTXLCG7.js → chunk-66VPQOVZ.js} +17 -14
- package/dist/chunk-66VPQOVZ.js.map +1 -0
- package/dist/{chunk-6FVYSW3E.js → chunk-6J6U7JXN.js} +20 -5
- package/dist/chunk-6J6U7JXN.js.map +1 -0
- package/dist/{chunk-P2HOLCBF.js → chunk-6UTH3A76.js} +18 -2
- package/dist/{chunk-P2HOLCBF.js.map → chunk-6UTH3A76.js.map} +1 -1
- package/dist/{chunk-HCVONKJI.js → chunk-6YMLYU5G.js} +15 -17
- package/dist/{chunk-HCVONKJI.js.map → chunk-6YMLYU5G.js.map} +1 -1
- package/dist/chunk-7E5XPDKX.js +22 -0
- package/dist/chunk-7E5XPDKX.js.map +1 -0
- package/dist/chunk-7QNVFVG6.js +196 -0
- package/dist/chunk-7QNVFVG6.js.map +1 -0
- package/dist/chunk-7S2NQRWL.js +9 -0
- package/dist/{chunk-NWIVXGSL.js.map → chunk-7S2NQRWL.js.map} +1 -1
- package/dist/{chunk-P4EQWC5W.js → chunk-ADIN3DTD.js} +2 -2
- package/dist/{chunk-IWJXFNM4.js → chunk-AHI2WVWP.js} +16 -24
- package/dist/chunk-AHI2WVWP.js.map +1 -0
- package/dist/{chunk-KUCMJHQW.js → chunk-AHYCZUPI.js} +2 -2
- package/dist/chunk-AQP6SCCJ.js +66 -0
- package/dist/chunk-AQP6SCCJ.js.map +1 -0
- package/dist/chunk-B5WDN63X.js +84 -0
- package/dist/chunk-B5WDN63X.js.map +1 -0
- package/dist/{chunk-26OVU2AE.js → chunk-BNKVENDF.js} +8 -8
- package/dist/chunk-DAKJTB6N.js +76 -0
- package/dist/chunk-DAKJTB6N.js.map +1 -0
- package/dist/{chunk-3N3UQEC4.js → chunk-DCCC7LEP.js} +4 -3
- package/dist/chunk-DCCC7LEP.js.map +1 -0
- package/dist/chunk-E67DOUVU.js +289 -0
- package/dist/chunk-E67DOUVU.js.map +1 -0
- package/dist/{chunk-6E2I2FBJ.js → chunk-E7WPTSHQ.js} +22 -22
- package/dist/chunk-EL3XL2OC.js +150 -0
- package/dist/chunk-EL3XL2OC.js.map +1 -0
- package/dist/{chunk-CLBQ7ZC4.js → chunk-F3PEUOTP.js} +3 -3
- package/dist/{chunk-ICJPVSRY.js → chunk-FKM67CZZ.js} +53 -51
- package/dist/chunk-FKM67CZZ.js.map +1 -0
- package/dist/{chunk-CCTALU3C.js → chunk-FMLE2WSN.js} +2 -2
- package/dist/{chunk-QSOEMCWQ.js → chunk-FSQJOZS4.js} +17 -10
- package/dist/chunk-FSQJOZS4.js.map +1 -0
- package/dist/chunk-FZHFD2AY.js +27 -0
- package/dist/chunk-FZHFD2AY.js.map +1 -0
- package/dist/{chunk-OTAZOIXK.js → chunk-GZGJQKQT.js} +2 -2
- package/dist/{chunk-5WM24P5N.js → chunk-I6MILNM5.js} +2 -2
- package/dist/chunk-I6MILNM5.js.map +1 -0
- package/dist/{chunk-S3BAD4IR.js → chunk-ICXUTMGH.js} +2 -2
- package/dist/{chunk-PRDRRU2B.js → chunk-IDQVTWLX.js} +5 -5
- package/dist/{chunk-3C3BKZ3H.js → chunk-IFQOOCT7.js} +8 -8
- package/dist/{chunk-TPSFJSO7.js → chunk-IKX3B26P.js} +13 -10
- package/dist/chunk-IKX3B26P.js.map +1 -0
- package/dist/{chunk-OMIMK3LB.js → chunk-IOHK45WE.js} +2 -2
- package/dist/{chunk-SG5LUMGE.js → chunk-JNBMANFM.js} +6 -3
- package/dist/chunk-JNBMANFM.js.map +1 -0
- package/dist/{chunk-QEVYCCKD.js → chunk-JNCKZ3OF.js} +12 -34
- package/dist/chunk-JNCKZ3OF.js.map +1 -0
- package/dist/{chunk-CMO5YUZR.js → chunk-JVBIWU7S.js} +4 -4
- package/dist/chunk-JVE2JFLV.js +15 -0
- package/dist/chunk-JVE2JFLV.js.map +1 -0
- package/dist/{chunk-MG5TTLYZ.js → chunk-KDO7D46L.js} +3 -3
- package/dist/{chunk-CYWI3ZW7.js → chunk-KL4YYV37.js} +4 -4
- package/dist/chunk-KSVYR4G2.js +47 -0
- package/dist/chunk-KSVYR4G2.js.map +1 -0
- package/dist/{chunk-RYNBBSLY.js → chunk-KWHHB737.js} +6 -8
- package/dist/chunk-KWHHB737.js.map +1 -0
- package/dist/chunk-L22AWXWA.js +29 -0
- package/dist/chunk-L22AWXWA.js.map +1 -0
- package/dist/{chunk-WXE7D44E.js → chunk-LJKF73JB.js} +8 -8
- package/dist/chunk-LJKF73JB.js.map +1 -0
- package/dist/{chunk-BSP2Z7B7.js → chunk-LKESANVD.js} +6 -6
- package/dist/{chunk-XVNRP7XE.js → chunk-LZZCJAJQ.js} +11 -11
- package/dist/{chunk-IPGH7TXJ.js → chunk-MM7344RC.js} +2 -2
- package/dist/{chunk-HMK3INUS.js → chunk-MQCDFSVF.js} +2 -2
- package/dist/{chunk-VJ7SVDED.js → chunk-MSJWQC7H.js} +6 -4
- package/dist/chunk-MSJWQC7H.js.map +1 -0
- package/dist/chunk-NWOCQVSL.js +307 -0
- package/dist/chunk-NWOCQVSL.js.map +1 -0
- package/dist/{chunk-RGUSVBGN.js → chunk-OCMNBOPX.js} +2 -2
- package/dist/{chunk-72IBYKIY.js → chunk-PCNNW63Z.js} +16 -5
- package/dist/chunk-PCNNW63Z.js.map +1 -0
- package/dist/chunk-PHGVVFTF.js +1603 -0
- package/dist/chunk-PHGVVFTF.js.map +1 -0
- package/dist/{chunk-4NITDMDH.js → chunk-PPZP7CA7.js} +9 -186
- package/dist/chunk-PPZP7CA7.js.map +1 -0
- package/dist/{chunk-X4AXKO3A.js → chunk-RGLIW45S.js} +2 -2
- package/dist/{chunk-P6BHOAQG.js → chunk-RHDZPV6C.js} +2 -2
- package/dist/{chunk-3GIH4WTA.js → chunk-RJUMLWXP.js} +109 -104
- package/dist/chunk-RJUMLWXP.js.map +1 -0
- package/dist/chunk-RQFHA5BM.js +1443 -0
- package/dist/chunk-RQFHA5BM.js.map +1 -0
- package/dist/chunk-S3CTXKSN.js +17 -0
- package/dist/chunk-S3CTXKSN.js.map +1 -0
- package/dist/chunk-SJBEIYLK.js +16 -0
- package/dist/chunk-SJBEIYLK.js.map +1 -0
- package/dist/chunk-TIG7NHVO.js +231 -0
- package/dist/chunk-TIG7NHVO.js.map +1 -0
- package/dist/{chunk-ATED7SAH.js → chunk-TKWUSJNQ.js} +36 -23
- package/dist/chunk-TKWUSJNQ.js.map +1 -0
- package/dist/{chunk-DQCUYCMX.js → chunk-UP2JTDBI.js} +3 -3
- package/dist/chunk-V4U5RGEG.js +59 -0
- package/dist/chunk-V4U5RGEG.js.map +1 -0
- package/dist/{chunk-HEPBANFJ.js → chunk-V7GCYL6A.js} +93 -196
- package/dist/chunk-V7GCYL6A.js.map +1 -0
- package/dist/{chunk-WC534PXU.js → chunk-VFH4SU3M.js} +34 -23
- package/dist/chunk-VFH4SU3M.js.map +1 -0
- package/dist/{chunk-KSUOVFO3.js → chunk-VV3NFLLP.js} +16 -9
- package/dist/chunk-VV3NFLLP.js.map +1 -0
- package/dist/{chunk-INQQGV2G.js → chunk-WKOJ7NXD.js} +4 -4
- package/dist/{chunk-7OUIZ2YQ.js → chunk-WVV54JP3.js} +56 -58
- package/dist/chunk-WVV54JP3.js.map +1 -0
- package/dist/chunk-WY7QZ2P7.js +71 -0
- package/dist/chunk-WY7QZ2P7.js.map +1 -0
- package/dist/{chunk-YYBXQBW2.js → chunk-Y7T73SAP.js} +13 -3
- package/dist/chunk-Y7T73SAP.js.map +1 -0
- package/dist/{chunk-WXMWZRBH.js → chunk-Z6ZMWFNV.js} +25 -7
- package/dist/chunk-Z6ZMWFNV.js.map +1 -0
- package/dist/{chunk-VUAVPBFR.js → chunk-Z7I6DQAR.js} +42 -57
- package/dist/chunk-Z7I6DQAR.js.map +1 -0
- package/dist/{chunk-GNGXYXBC.js → chunk-ZRATYLBB.js} +2 -2
- package/dist/{cleanup-5PSLKZLF.js → cleanup-M5TY4FQS.js} +46 -34
- package/dist/{cleanup-5PSLKZLF.js.map → cleanup-M5TY4FQS.js.map} +1 -1
- package/dist/cli-446A536X.js +19 -0
- package/dist/{completion-MXX5TRIV.js → completion-IAH7WRKJ.js} +3 -2
- package/dist/{completion-MXX5TRIV.js.map → completion-IAH7WRKJ.js.map} +1 -1
- package/dist/{config-6MSITKGB.js → config-JLORGUXN.js} +16 -13
- package/dist/{config-6MSITKGB.js.map → config-JLORGUXN.js.map} +1 -1
- package/dist/{diff-Q7MV6YGJ.js → diff-4O5HXNZ7.js} +23 -20
- package/dist/{diff-Q7MV6YGJ.js.map → diff-4O5HXNZ7.js.map} +1 -1
- package/dist/{digest-KUMVYXKZ.js → digest-IAAZXJCC.js} +13 -11
- package/dist/{digest-KUMVYXKZ.js.map → digest-IAAZXJCC.js.map} +1 -1
- package/dist/{fork-OFENISEM.js → fork-ULJYPEKY.js} +41 -28
- package/dist/{fork-OFENISEM.js.map → fork-ULJYPEKY.js.map} +1 -1
- package/dist/{history-5WKRWARZ.js → history-JFZF22M7.js} +12 -10
- package/dist/{hook-ARS32DG2.js → hook-UYOIQVJ7.js} +54 -20
- package/dist/hook-UYOIQVJ7.js.map +1 -0
- package/dist/{hydrate-LCT6DVB3.js → hydrate-DROI4RJ7.js} +14 -12
- package/dist/{hydrate-LCT6DVB3.js.map → hydrate-DROI4RJ7.js.map} +1 -1
- package/dist/{init-FJKPEY5N.js → init-FF75CQM7.js} +27 -19
- package/dist/{init-FJKPEY5N.js.map → init-FF75CQM7.js.map} +1 -1
- package/dist/install-skills-XSAHNBYD.js +22 -0
- package/dist/install-skills-bin.js +8 -6
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{list-GTKP5FAW.js → list-5FEHBP6N.js} +15 -13
- package/dist/{list-GTKP5FAW.js.map → list-5FEHBP6N.js.map} +1 -1
- package/dist/{move-GOCLEFGZ.js → move-422L6PPI.js} +33 -24
- package/dist/{move-GOCLEFGZ.js.map → move-422L6PPI.js.map} +1 -1
- package/dist/{note-B7TQBXQF.js → note-AAXPD5VA.js} +14 -12
- package/dist/{note-B7TQBXQF.js.map → note-AAXPD5VA.js.map} +1 -1
- package/dist/{overlaps-UKQHIJMU.js → overlaps-WPNUYOFF.js} +21 -11
- package/dist/{overlaps-UKQHIJMU.js.map → overlaps-WPNUYOFF.js.map} +1 -1
- package/dist/{pin-UZZCDK7M.js → pin-QXPF23BB.js} +14 -12
- package/dist/{pin-UZZCDK7M.js.map → pin-QXPF23BB.js.map} +1 -1
- package/dist/{pr-NU2ME2XW.js → pr-QLGXPKPQ.js} +46 -21
- package/dist/pr-QLGXPKPQ.js.map +1 -0
- package/dist/{prune-IZGEYTSB.js → prune-GRHKRRVT.js} +44 -32
- package/dist/{prune-IZGEYTSB.js.map → prune-GRHKRRVT.js.map} +1 -1
- package/dist/{pty-host-AWDIKPQN.js → pty-host-XDDXA4SL.js} +103 -39
- package/dist/pty-host-XDDXA4SL.js.map +1 -0
- package/dist/{read-U6GBGA5E.js → read-YWKD2DGP.js} +13 -11
- package/dist/{read-U6GBGA5E.js.map → read-YWKD2DGP.js.map} +1 -1
- package/dist/{recent-2DUMLUDG.js → recent-SI5BDVVH.js} +35 -26
- package/dist/recent-SI5BDVVH.js.map +1 -0
- package/dist/{remove-OXUP4O33.js → remove-RXXCHY44.js} +48 -36
- package/dist/{remove-OXUP4O33.js.map → remove-RXXCHY44.js.map} +1 -1
- package/dist/{restart-QEW4DJC3.js → restart-CPNDEXU6.js} +17 -15
- package/dist/{restart-QEW4DJC3.js.map → restart-CPNDEXU6.js.map} +1 -1
- package/dist/{resume-K45IT4QO.js → resume-BLP4TTJK.js} +35 -20
- package/dist/resume-BLP4TTJK.js.map +1 -0
- package/dist/review-now-ADWZPELT.js +22 -0
- package/dist/review-now-ADWZPELT.js.map +1 -0
- package/dist/{run-42LORGPS.js → run-JFCDJ3EV.js} +21 -15
- package/dist/run-JFCDJ3EV.js.map +1 -0
- package/dist/{screen-2TLIUH3G.js → screen-LBOPAUXV.js} +14 -12
- package/dist/{screen-2TLIUH3G.js.map → screen-LBOPAUXV.js.map} +1 -1
- package/dist/{search-7E4B2KX6.js → search-AMEGRH24.js} +10 -8
- package/dist/{search-7E4B2KX6.js.map → search-AMEGRH24.js.map} +1 -1
- package/dist/{section-OVA5VD7L.js → section-73Z34PVE.js} +14 -12
- package/dist/{section-OVA5VD7L.js.map → section-73Z34PVE.js.map} +1 -1
- package/dist/{send-BJY5CYLO.js → send-IZBSEET5.js} +19 -16
- package/dist/send-IZBSEET5.js.map +1 -0
- package/dist/{sessions-4A24ZORW.js → sessions-WVQ2U2W4.js} +58 -23
- package/dist/sessions-WVQ2U2W4.js.map +1 -0
- package/dist/{snooze-WIVKB3GH.js → snooze-7IBHY5MY.js} +13 -11
- package/dist/{snooze-WIVKB3GH.js.map → snooze-7IBHY5MY.js.map} +1 -1
- package/dist/{start-G6GR533S.js → start-AU62TW6M.js} +14 -12
- package/dist/{start-G6GR533S.js.map → start-AU62TW6M.js.map} +1 -1
- package/dist/{state-S3DGLT4J.js → state-IZV7DAPL.js} +8 -5
- package/dist/state-IZV7DAPL.js.map +1 -0
- package/dist/{status-BTAWY6JQ.js → status-Z7OMNYZX.js} +38 -13
- package/dist/status-Z7OMNYZX.js.map +1 -0
- package/dist/{statusline-WLXEU5DM.js → statusline-VJFY7ZAB.js} +12 -11
- package/dist/{statusline-WLXEU5DM.js.map → statusline-VJFY7ZAB.js.map} +1 -1
- package/dist/{statusline-hook-OVWHHFBV.js → statusline-hook-JA7MNE5H.js} +4 -3
- package/dist/{statusline-hook-OVWHHFBV.js.map → statusline-hook-JA7MNE5H.js.map} +1 -1
- package/dist/{stop-FN6EPFJ4.js → stop-PWNXSFBD.js} +14 -12
- package/dist/{stop-FN6EPFJ4.js.map → stop-PWNXSFBD.js.map} +1 -1
- package/dist/{sync-T3BSHX6Q.js → sync-2BTZVDDG.js} +44 -32
- package/dist/{sync-T3BSHX6Q.js.map → sync-2BTZVDDG.js.map} +1 -1
- package/dist/{time-5CH5O5MZ.js → time-CTCIAXIY.js} +15 -13
- package/dist/{time-5CH5O5MZ.js.map → time-CTCIAXIY.js.map} +1 -1
- package/dist/{time-actions-XEUQ3UF7.js → time-actions-UYBOXET6.js} +5 -4
- package/dist/{timesheet-FMQKPS5S.js → timesheet-BUFQ34FC.js} +24 -15
- package/dist/{timesheet-FMQKPS5S.js.map → timesheet-BUFQ34FC.js.map} +1 -1
- package/dist/{todo-23COLGR2.js → todo-2R7VID57.js} +4 -4
- package/dist/{tree-T33VU473.js → tree-LQDPAXQA.js} +65 -45
- package/dist/tree-LQDPAXQA.js.map +1 -0
- package/dist/{update-PJRSKQZ2.js → update-2IYJHY7H.js} +24 -14
- package/dist/{update-PJRSKQZ2.js.map → update-2IYJHY7H.js.map} +1 -1
- package/dist/{usage-TL66LWO4.js → usage-IR5GNF4R.js} +13 -11
- package/dist/{usage-TL66LWO4.js.map → usage-IR5GNF4R.js.map} +1 -1
- package/dist/version-ONEI52TI.js +115 -0
- package/dist/version-ONEI52TI.js.map +1 -0
- package/dist/{wait-YIEJO6YM.js → wait-6DH34L53.js} +16 -13
- package/dist/{wait-YIEJO6YM.js.map → wait-6DH34L53.js.map} +1 -1
- package/dist/wd-bin.js +6 -6
- package/dist/web/assets/{PtyView-DnDd6jLI.js → PtyView-kBcAOwHr.js} +2 -2
- package/dist/web/assets/{PtyView-DnDd6jLI.js.map → PtyView-kBcAOwHr.js.map} +1 -1
- package/dist/web/assets/index-BgfR3N99.js +124 -0
- package/dist/web/assets/index-BgfR3N99.js.map +1 -0
- package/dist/web/assets/index-CKpHjII8.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-IYUNJMQD.js → web-RIHGV7YY.js} +2786 -451
- package/dist/web-RIHGV7YY.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/plugins/work-tree/skills/wd-review/SKILL.md +1 -1
- package/plugins/work-tree/skills/work-sessions/SKILL.md +2 -2
- package/dist/account-NG75VLRU.js.map +0 -1
- package/dist/block-D5CAR53T.js.map +0 -1
- package/dist/chunk-2JNW2AQ2.js.map +0 -1
- package/dist/chunk-37XQIG7F.js.map +0 -1
- package/dist/chunk-3GIH4WTA.js.map +0 -1
- package/dist/chunk-3N3UQEC4.js.map +0 -1
- package/dist/chunk-4NITDMDH.js.map +0 -1
- package/dist/chunk-5WM24P5N.js.map +0 -1
- package/dist/chunk-63VY4YJM.js.map +0 -1
- package/dist/chunk-6FVYSW3E.js.map +0 -1
- package/dist/chunk-72IBYKIY.js.map +0 -1
- package/dist/chunk-7OUIZ2YQ.js.map +0 -1
- package/dist/chunk-AAYWHIIT.js.map +0 -1
- package/dist/chunk-ATED7SAH.js.map +0 -1
- package/dist/chunk-GRLKPVTP.js.map +0 -1
- package/dist/chunk-HEPBANFJ.js.map +0 -1
- package/dist/chunk-ICJPVSRY.js.map +0 -1
- package/dist/chunk-IWJXFNM4.js.map +0 -1
- package/dist/chunk-KSUOVFO3.js.map +0 -1
- package/dist/chunk-NWIVXGSL.js +0 -9
- package/dist/chunk-PTWVOT7A.js +0 -551
- package/dist/chunk-PTWVOT7A.js.map +0 -1
- package/dist/chunk-QEVYCCKD.js.map +0 -1
- package/dist/chunk-QHTXLCG7.js.map +0 -1
- package/dist/chunk-QSOEMCWQ.js.map +0 -1
- package/dist/chunk-RCYI7SRA.js +0 -15
- package/dist/chunk-RCYI7SRA.js.map +0 -1
- package/dist/chunk-RYNBBSLY.js.map +0 -1
- package/dist/chunk-S3FMTEFR.js.map +0 -1
- package/dist/chunk-SG5LUMGE.js.map +0 -1
- package/dist/chunk-TPSFJSO7.js.map +0 -1
- package/dist/chunk-VJ7SVDED.js.map +0 -1
- package/dist/chunk-VTLDYH3C.js +0 -227
- package/dist/chunk-VTLDYH3C.js.map +0 -1
- package/dist/chunk-VUAVPBFR.js.map +0 -1
- package/dist/chunk-WC534PXU.js.map +0 -1
- package/dist/chunk-WTQ2QCAG.js.map +0 -1
- package/dist/chunk-WXE7D44E.js.map +0 -1
- package/dist/chunk-WXMWZRBH.js.map +0 -1
- package/dist/chunk-YYBXQBW2.js.map +0 -1
- package/dist/chunk-ZDMJPEBO.js +0 -31
- package/dist/chunk-ZDMJPEBO.js.map +0 -1
- package/dist/chunk-ZI2KXTKM.js.map +0 -1
- package/dist/cli-AF7636FA.js +0 -19
- package/dist/hook-ARS32DG2.js.map +0 -1
- package/dist/install-skills-UYAFVJBA.js +0 -20
- package/dist/pr-NU2ME2XW.js.map +0 -1
- package/dist/pty-host-AWDIKPQN.js.map +0 -1
- package/dist/recent-2DUMLUDG.js.map +0 -1
- package/dist/resume-K45IT4QO.js.map +0 -1
- package/dist/run-42LORGPS.js.map +0 -1
- package/dist/send-BJY5CYLO.js.map +0 -1
- package/dist/sessions-4A24ZORW.js.map +0 -1
- package/dist/state-S3DGLT4J.js.map +0 -1
- package/dist/status-BTAWY6JQ.js.map +0 -1
- package/dist/tree-T33VU473.js.map +0 -1
- package/dist/web/assets/index-DxozAoUO.css +0 -1
- package/dist/web/assets/index-InmdAx6g.js +0 -120
- package/dist/web/assets/index-InmdAx6g.js.map +0 -1
- package/dist/web-IYUNJMQD.js.map +0 -1
- /package/dist/{chunk-T7AFYEQ7.js.map → chunk-2K5TDJ7M.js.map} +0 -0
- /package/dist/{chunk-QL36KN7X.js.map → chunk-353ZINJ2.js.map} +0 -0
- /package/dist/{chunk-5QGCF3PS.js.map → chunk-3BSFVKMK.js.map} +0 -0
- /package/dist/{chunk-J36ULZBO.js.map → chunk-4K4S53KX.js.map} +0 -0
- /package/dist/{chunk-P4EQWC5W.js.map → chunk-ADIN3DTD.js.map} +0 -0
- /package/dist/{chunk-KUCMJHQW.js.map → chunk-AHYCZUPI.js.map} +0 -0
- /package/dist/{chunk-26OVU2AE.js.map → chunk-BNKVENDF.js.map} +0 -0
- /package/dist/{chunk-6E2I2FBJ.js.map → chunk-E7WPTSHQ.js.map} +0 -0
- /package/dist/{chunk-CLBQ7ZC4.js.map → chunk-F3PEUOTP.js.map} +0 -0
- /package/dist/{chunk-CCTALU3C.js.map → chunk-FMLE2WSN.js.map} +0 -0
- /package/dist/{chunk-OTAZOIXK.js.map → chunk-GZGJQKQT.js.map} +0 -0
- /package/dist/{chunk-S3BAD4IR.js.map → chunk-ICXUTMGH.js.map} +0 -0
- /package/dist/{chunk-PRDRRU2B.js.map → chunk-IDQVTWLX.js.map} +0 -0
- /package/dist/{chunk-3C3BKZ3H.js.map → chunk-IFQOOCT7.js.map} +0 -0
- /package/dist/{chunk-OMIMK3LB.js.map → chunk-IOHK45WE.js.map} +0 -0
- /package/dist/{chunk-CMO5YUZR.js.map → chunk-JVBIWU7S.js.map} +0 -0
- /package/dist/{chunk-MG5TTLYZ.js.map → chunk-KDO7D46L.js.map} +0 -0
- /package/dist/{chunk-CYWI3ZW7.js.map → chunk-KL4YYV37.js.map} +0 -0
- /package/dist/{chunk-BSP2Z7B7.js.map → chunk-LKESANVD.js.map} +0 -0
- /package/dist/{chunk-XVNRP7XE.js.map → chunk-LZZCJAJQ.js.map} +0 -0
- /package/dist/{chunk-IPGH7TXJ.js.map → chunk-MM7344RC.js.map} +0 -0
- /package/dist/{chunk-HMK3INUS.js.map → chunk-MQCDFSVF.js.map} +0 -0
- /package/dist/{chunk-RGUSVBGN.js.map → chunk-OCMNBOPX.js.map} +0 -0
- /package/dist/{chunk-X4AXKO3A.js.map → chunk-RGLIW45S.js.map} +0 -0
- /package/dist/{chunk-P6BHOAQG.js.map → chunk-RHDZPV6C.js.map} +0 -0
- /package/dist/{chunk-DQCUYCMX.js.map → chunk-UP2JTDBI.js.map} +0 -0
- /package/dist/{chunk-INQQGV2G.js.map → chunk-WKOJ7NXD.js.map} +0 -0
- /package/dist/{chunk-GNGXYXBC.js.map → chunk-ZRATYLBB.js.map} +0 -0
- /package/dist/{cli-AF7636FA.js.map → cli-446A536X.js.map} +0 -0
- /package/dist/{history-5WKRWARZ.js.map → history-JFZF22M7.js.map} +0 -0
- /package/dist/{install-skills-UYAFVJBA.js.map → install-skills-XSAHNBYD.js.map} +0 -0
- /package/dist/{time-actions-XEUQ3UF7.js.map → time-actions-UYBOXET6.js.map} +0 -0
- /package/dist/{todo-23COLGR2.js.map → todo-2R7VID57.js.map} +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/core/platform/find-on-path.ts
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import path from "path";
|
|
6
|
+
function isProgramFile(p, platform = process.platform) {
|
|
7
|
+
const win = platform === "win32";
|
|
8
|
+
try {
|
|
9
|
+
const st = fs.statSync(p);
|
|
10
|
+
return st.isFile() && (win || (st.mode & 73) !== 0);
|
|
11
|
+
} catch {
|
|
12
|
+
if (!win) return false;
|
|
13
|
+
try {
|
|
14
|
+
return !fs.lstatSync(p).isDirectory();
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function pathExtOf(env) {
|
|
21
|
+
return (env.PATHEXT ?? env.Pathext ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean).map((e) => e.toLowerCase());
|
|
22
|
+
}
|
|
23
|
+
function findOnPath(cmd, env = process.env, platform = process.platform) {
|
|
24
|
+
const win = platform === "win32";
|
|
25
|
+
const isFile = (p) => isProgramFile(p, platform);
|
|
26
|
+
const pathExt = pathExtOf(env);
|
|
27
|
+
const hasExt = pathExt.includes(path.extname(cmd).toLowerCase());
|
|
28
|
+
const candidates = (base) => !win || hasExt ? [base] : pathExt.map((e) => base + e);
|
|
29
|
+
if (cmd.includes("/") || win && cmd.includes("\\")) return candidates(cmd).find(isFile) ?? null;
|
|
30
|
+
const dirs = (env.PATH ?? env.Path ?? "").split(win ? ";" : path.delimiter).filter(Boolean);
|
|
31
|
+
for (const dir of dirs) {
|
|
32
|
+
const hit = candidates(path.join(dir, cmd)).find(isFile);
|
|
33
|
+
if (hit) return hit;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/core/platform/shell-env.ts
|
|
39
|
+
var NO_CWD_LOOKUP = "NoDefaultCurrentDirectoryInExePath";
|
|
40
|
+
function shellEnv(env = process.env, platform = process.platform) {
|
|
41
|
+
if (platform !== "win32") return env;
|
|
42
|
+
const out = {};
|
|
43
|
+
for (const [k, v] of Object.entries(env)) if (k.toLowerCase() !== NO_CWD_LOOKUP.toLowerCase()) out[k] = v;
|
|
44
|
+
out[NO_CWD_LOOKUP] = "1";
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// src/core/platform/spawn.ts
|
|
49
|
+
import { createRequire } from "module";
|
|
50
|
+
|
|
51
|
+
// src/core/platform/program-path.ts
|
|
52
|
+
import path2 from "path";
|
|
53
|
+
var hits = /* @__PURE__ */ new Map();
|
|
54
|
+
var isPathLike = (cmd) => /[\\/]/.test(cmd) || path2.win32.isAbsolute(cmd) || /^[A-Za-z]:/.test(cmd);
|
|
55
|
+
function whereOnPath(cmd, env = process.env, platform = process.platform, cwd) {
|
|
56
|
+
if (platform !== "win32") return cmd;
|
|
57
|
+
const pathExt = env.PATHEXT ?? env.Pathext;
|
|
58
|
+
const extEnv = pathExt !== void 0 ? { PATHEXT: pathExt } : {};
|
|
59
|
+
if (isPathLike(cmd)) {
|
|
60
|
+
const full = path2.win32.resolve(cwd ?? process.cwd(), cmd);
|
|
61
|
+
return findOnPath(full, extEnv, "win32") ?? cmd;
|
|
62
|
+
}
|
|
63
|
+
const rawPath = env.PATH ?? env.Path ?? "";
|
|
64
|
+
const key = `${cmd.toLowerCase()}\0${rawPath}\0${pathExt ?? ""}`;
|
|
65
|
+
const cached = hits.get(key);
|
|
66
|
+
if (cached && isProgramFile(cached, "win32")) return cached;
|
|
67
|
+
hits.delete(key);
|
|
68
|
+
const absolute = rawPath.split(";").map((d) => d.trim().replace(/^"(.*)"$/, "$1")).filter((d) => d && path2.win32.isAbsolute(d) && !/^[\\/](?![\\/])/.test(d)).join(";");
|
|
69
|
+
const found = findOnPath(cmd, { PATH: absolute, ...extEnv }, "win32");
|
|
70
|
+
if (found) hits.set(key, found);
|
|
71
|
+
return found;
|
|
72
|
+
}
|
|
73
|
+
var STAND_IN_DIR = "work-not-on-path";
|
|
74
|
+
function notOnPath(cmd, env = process.env) {
|
|
75
|
+
return path2.win32.join(env.SystemRoot ?? env.SYSTEMROOT ?? "C:\\Windows", STAND_IN_DIR, cmd);
|
|
76
|
+
}
|
|
77
|
+
function standInFor(file) {
|
|
78
|
+
const m = /[\\/]work-not-on-path[\\/]([^\\/]+)$/i.exec(file);
|
|
79
|
+
return m ? m[1] : null;
|
|
80
|
+
}
|
|
81
|
+
function explainNotOnPath(err) {
|
|
82
|
+
if (!(err instanceof Error)) return err;
|
|
83
|
+
const e = err;
|
|
84
|
+
const name = (typeof e.path === "string" ? standInFor(e.path) : null) ?? /[\\/]work-not-on-path[\\/]([^\s\\/]+)/i.exec(e.message)?.[1];
|
|
85
|
+
if (!name) return err;
|
|
86
|
+
e.message = `${name} not found on PATH`;
|
|
87
|
+
e.path = name;
|
|
88
|
+
return err;
|
|
89
|
+
}
|
|
90
|
+
function programPath(cmd, env = process.env, platform = process.platform, cwd) {
|
|
91
|
+
return whereOnPath(cmd, env, platform, cwd) ?? notOnPath(cmd, env);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// src/core/platform/spawn.ts
|
|
95
|
+
var loaded = null;
|
|
96
|
+
var load = () => loaded ??= createRequire(import.meta.url)("cross-spawn");
|
|
97
|
+
var BATCH_FILE = /\.(cmd|bat)$/i;
|
|
98
|
+
function onPathOnly(args, platform = process.platform) {
|
|
99
|
+
const [cmd, second, third] = args;
|
|
100
|
+
const at = Array.isArray(second) ? 2 : 1;
|
|
101
|
+
const given = at === 2 ? third : second;
|
|
102
|
+
if (given && "keepCwdLookup" in given) {
|
|
103
|
+
const { keepCwdLookup, ...rest } = given;
|
|
104
|
+
args = [...args];
|
|
105
|
+
args[at] = rest;
|
|
106
|
+
if (keepCwdLookup === true) {
|
|
107
|
+
if (platform !== "win32" || typeof cmd !== "string") return args;
|
|
108
|
+
const cwd2 = typeof rest.cwd === "string" ? rest.cwd : void 0;
|
|
109
|
+
return [programPath(cmd, rest.env ?? process.env, platform, cwd2), ...args.slice(1)];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (platform !== "win32" || typeof cmd !== "string") return args;
|
|
113
|
+
const options = at === 2 ? args[2] : args[1];
|
|
114
|
+
if (options?.shell) {
|
|
115
|
+
const out2 = [...args];
|
|
116
|
+
out2[at] = { ...options, env: shellEnv(options.env ?? process.env, platform) };
|
|
117
|
+
return out2;
|
|
118
|
+
}
|
|
119
|
+
const cwd = typeof options?.cwd === "string" ? options.cwd : void 0;
|
|
120
|
+
const file = programPath(cmd, options?.env ?? process.env, platform, cwd);
|
|
121
|
+
const out = [file, ...args.slice(1)];
|
|
122
|
+
if (BATCH_FILE.test(file)) out[at] = { ...options ?? {}, env: shellEnv(options?.env ?? process.env, platform) };
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
var spawn = Object.assign(
|
|
126
|
+
(...args) => {
|
|
127
|
+
const child = load()(...onPathOnly(args));
|
|
128
|
+
child.prependListener?.("error", (err) => explainNotOnPath(err));
|
|
129
|
+
return child;
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
sync: (...args) => {
|
|
133
|
+
const r = load().sync(...onPathOnly(args));
|
|
134
|
+
if (r?.error) explainNotOnPath(r.error);
|
|
135
|
+
return r;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
var spawn_default = spawn;
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
findOnPath,
|
|
143
|
+
whereOnPath,
|
|
144
|
+
notOnPath,
|
|
145
|
+
explainNotOnPath,
|
|
146
|
+
programPath,
|
|
147
|
+
shellEnv,
|
|
148
|
+
spawn_default
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=chunk-EL3XL2OC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/platform/find-on-path.ts","../src/core/platform/shell-env.ts","../src/core/platform/spawn.ts","../src/core/platform/program-path.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\n/**\n * Whether `p` is a program file. Elsewhere than Windows: a file with an executable bit. On Windows: a file — or\n * an App Execution Alias, which `stat` can't read: the stubs in `%LOCALAPPDATA%\\Microsoft\\WindowsApps` (`wt.exe`,\n * `winget.exe`, the Store's `python.exe` and `pwsh.exe`) are reparse points that `stat` answers EACCES for, while\n * `lstat` sees them (as a link). Windows starts them; counting them missing made Windows Terminal look not\n * installed. So on Windows a hit whose `stat` fails but whose `lstat` is there and not a folder counts.\n */\nexport function isProgramFile(p: string, platform: NodeJS.Platform = process.platform): boolean {\n const win = platform === 'win32';\n try {\n const st = fs.statSync(p);\n return st.isFile() && (win || (st.mode & 0o111) !== 0);\n } catch {\n if (!win) return false;\n try {\n return !fs.lstatSync(p).isDirectory();\n } catch {\n return false;\n }\n }\n}\n\n/** PATHEXT's extensions, lower-cased (Windows' default when unset). */\nexport function pathExtOf(env: NodeJS.ProcessEnv): string[] {\n return (env.PATHEXT ?? env.Pathext ?? '.COM;.EXE;.BAT;.CMD')\n .split(';')\n .filter(Boolean)\n .map((e) => e.toLowerCase());\n}\n\n/**\n * The file a command name runs, as a shell finds it: a path is itself, else the\n * first match in PATH. On Windows a name without one of PATHEXT's extensions is\n * tried with each (`claude` is `claude.exe` or `claude.cmd`; npm's extension-less\n * `claude` sh shim beside them is never run) — a path too (`C:\\npm\\claude` starts\n * `C:\\npm\\claude.cmd`, as Windows and cross-spawn would); elsewhere only an\n * executable file counts. Null when there's none.\n */\nexport function findOnPath(cmd: string, env: NodeJS.ProcessEnv = process.env, platform: NodeJS.Platform = process.platform): string | null {\n const win = platform === 'win32';\n const isFile = (p: string) => isProgramFile(p, platform);\n const pathExt = pathExtOf(env);\n const hasExt = pathExt.includes(path.extname(cmd).toLowerCase());\n const candidates = (base: string) => (!win || hasExt ? [base] : pathExt.map((e) => base + e));\n if (cmd.includes('/') || (win && cmd.includes('\\\\'))) return candidates(cmd).find(isFile) ?? null;\n const dirs = (env.PATH ?? env.Path ?? '').split(win ? ';' : path.delimiter).filter(Boolean);\n for (const dir of dirs) {\n const hit = candidates(path.join(dir, cmd)).find(isFile);\n if (hit) return hit;\n }\n return null;\n}\n","/**\n * The environment for a command line a shell runs (`shell: true`, `cmd.exe /c …`): the user's own commands —\n * status hooks, `work run`, a dev server — run with a worktree as the working folder, and on Windows cmd.exe looks\n * a bare program name up in the working folder before PATH, so a `node.bat` or `git.cmd` committed at a branch's\n * root ran in place of the program the command names (measured with an echo-only file). Windows' own switch,\n * `NoDefaultCurrentDirectoryInExePath`, turns that lookup off for the shell and what it starts. A command that\n * means a file of the branch names it by its path (`.\\scripts\\dev.cmd`), which still runs. Off Windows: the\n * environment as given (a POSIX shell never looks in the working folder unless PATH says so).\n *\n * Only for tool runs — the CommandRunner, agents in the PTY host and `launchAi`, status hooks, `work run`, a dev\n * server. Not for long-lived interactive programs work opens for you (the editor, a URL, a terminal): their own\n * terminals and tasks would inherit the switch, changing how your shells there behave. Those calls pass\n * `keepCwdLookup: true` to the spawn wrapper (spawn.ts).\n */\nexport const NO_CWD_LOOKUP = 'NoDefaultCurrentDirectoryInExePath';\n\nexport function shellEnv(env: NodeJS.ProcessEnv = process.env, platform: NodeJS.Platform = process.platform): NodeJS.ProcessEnv {\n if (platform !== 'win32') return env;\n // Windows' variable names are case-blind: drop any other spelling (one saying 0 would win or clash).\n const out: NodeJS.ProcessEnv = {};\n for (const [k, v] of Object.entries(env)) if (k.toLowerCase() !== NO_CWD_LOOKUP.toLowerCase()) out[k] = v;\n out[NO_CWD_LOOKUP] = '1';\n return out;\n}\n","import { createRequire } from 'node:module';\nimport type { ChildProcess, SpawnOptions, SpawnSyncOptions, SpawnSyncReturns } from 'node:child_process';\nimport type CrossSpawnModule from 'cross-spawn';\nimport { explainNotOnPath, programPath } from './program-path.js';\nimport { shellEnv } from './shell-env.js';\n\n/**\n * cross-spawn, loaded on first use. core's modules all spawn through it, and\n * importing it up front put it (and its dependencies) on every `work hook`\n * — which runs twice per turn of every Claude — whether the hook spawned\n * anything or not. Same function, same `.sync`.\n *\n * On Windows a bare program name is started by its absolute path on PATH, never from the working\n * folder (`programPath`, program-path.ts): cross-spawn's lookup checks the spawn's cwd first, and a\n * `git.cmd` at a worktree's root would run in place of git. A path is resolved against the call's\n * cwd, as cross-spawn would. A program that resolves to a batch file runs in cmd.exe, so it gets `shellEnv` too\n * (a bare name inside it isn't looked up in the working folder). A `shell: true` command line is the caller's own: left as it is, run\n * with cmd.exe's lookup in the working folder turned off (`shellEnv`, shell-env.ts). A program\n * that isn't on PATH fails as \"<name> not found on PATH\" (`explainNotOnPath`).\n *\n * `keepCwdLookup: true` (work's own option, taken off before cross-spawn sees the call) leaves `shellEnv` out: for\n * long-lived interactive programs the user works in — an editor, a terminal, the browser — whose own terminals and\n * tasks would otherwise inherit the switch (shell-env.ts). Tool runs (the CommandRunner, agents, hooks, `work run`,\n * a dev server) never pass it.\n */\ntype CrossSpawn = typeof CrossSpawnModule;\n\nlet loaded: CrossSpawn | null = null;\nconst load = (): CrossSpawn => (loaded ??= createRequire(import.meta.url)('cross-spawn') as CrossSpawn);\n\ntype Options = { env?: NodeJS.ProcessEnv; shell?: unknown; cwd?: unknown; keepCwdLookup?: unknown };\n\n/** The spawn wrapper's own option (see above). */\nexport interface KeepCwdLookup {\n keepCwdLookup?: boolean;\n}\n\n/** What Windows starts through cmd.exe: a `.cmd` or `.bat` file. */\nexport const BATCH_FILE = /\\.(cmd|bat)$/i;\n\n/** The call's arguments with its program resolved from PATH (Windows; see above). */\nexport function onPathOnly(args: unknown[], platform: NodeJS.Platform = process.platform): unknown[] {\n const [cmd, second, third] = args;\n const at = Array.isArray(second) ? 2 : 1;\n const given = (at === 2 ? third : second) as Options | undefined;\n if (given && 'keepCwdLookup' in given) {\n // Taken off on every platform: cross-spawn and node never see it.\n const { keepCwdLookup, ...rest } = given;\n args = [...args];\n args[at] = rest;\n if (keepCwdLookup === true) {\n if (platform !== 'win32' || typeof cmd !== 'string') return args;\n const cwd = typeof rest.cwd === 'string' ? rest.cwd : undefined;\n return [programPath(cmd, rest.env ?? process.env, platform, cwd), ...args.slice(1)];\n }\n }\n if (platform !== 'win32' || typeof cmd !== 'string') return args;\n const options = (at === 2 ? args[2] : args[1]) as Options | undefined;\n if (options?.shell) {\n const out = [...args];\n out[at] = { ...options, env: shellEnv(options.env ?? process.env, platform) };\n return out;\n }\n const cwd = typeof options?.cwd === 'string' ? options.cwd : undefined;\n const file = programPath(cmd, options?.env ?? process.env, platform, cwd);\n const out = [file, ...args.slice(1)];\n // A batch file is run by cmd.exe (cross-spawn's `cmd.exe /d /s /c`), and a bare name inside it would be looked up\n // in the working folder first — a worktree's own `probex.bat` in place of the program the batch file means.\n if (BATCH_FILE.test(file)) out[at] = { ...(options ?? {}), env: shellEnv(options?.env ?? process.env, platform) };\n return out;\n}\n\nconst spawn = Object.assign(\n (...args: unknown[]) => {\n const child = (load() as unknown as (...a: unknown[]) => ChildProcess)(...onPathOnly(args));\n // First, so every listener sees the program's name rather than the stand-in path.\n child.prependListener?.('error', (err) => explainNotOnPath(err));\n return child;\n },\n {\n sync: (...args: unknown[]) => {\n const r = (load().sync as unknown as (...a: unknown[]) => SpawnSyncReturns<unknown>)(...onPathOnly(args));\n if (r?.error) explainNotOnPath(r.error);\n return r;\n },\n },\n) as unknown as WorkSpawn;\n\n/** cross-spawn's type, plus `keepCwdLookup` on a call with options. */\ntype WorkSpawn = CrossSpawn & {\n (command: string, args: readonly string[], options: SpawnOptions & KeepCwdLookup): ChildProcess;\n sync: CrossSpawn['sync'] &\n ((command: string, args: readonly string[], options: SpawnSyncOptions & KeepCwdLookup) => SpawnSyncReturns<Buffer>);\n};\n\nexport default spawn;\n","import path from 'node:path';\nimport { findOnPath, isProgramFile } from './find-on-path.js';\n\n/**\n * The program a bare command name starts, from PATH only — never the working folder.\n *\n * On Windows every way of starting a program by its bare name looks in the working folder first:\n * cross-spawn's lookup (node-which \"always checks the cwd first\", after a `chdir` into the spawn's\n * cwd), libuv's own (`execFile('git', …, {cwd})`) and cmd.exe's. work runs git, gh, az and acli with\n * the cwd in a worktree — someone else's branch too (Review, Work on it) — so a `git.cmd`, `gh.cmd` or\n * `git.exe` committed at its root ran in place of the real tool (measured with an echo-only file).\n * So on Windows a bare name is resolved here to the absolute file on PATH (absolute PATH entries\n * only: a relative one is the working folder again) and that path is what's started. App Execution\n * Aliases (`wt.exe`, `winget`, the Store's `python`) count: `stat` can't read them, Windows starts\n * them (`isProgramFile`). Not found: a path that doesn't exist, so the start fails as \"not installed\"\n * (ENOENT, said as \"<name> not found on PATH\": `explainNotOnPath`) and nothing from the working folder\n * runs. A name with a path in it (`./x`, `C:\\npm\\claude`) is resolved as Windows itself would — against\n * the start's working folder, with PATHEXT's extensions when it has none (`C:\\npm\\claude` is\n * `claude.cmd` beside it) — so what is judged (a batch file or not) is the file that really starts.\n * Off Windows everything is left as given (a POSIX lookup never takes the working folder unless PATH\n * says so).\n */\n\n/** Hits per name + PATH + PATHEXT, checked to still be there on use; a miss is never kept (a tool installed later is found). */\nconst hits = new Map<string, string>();\n\n/** Whether `cmd` names a path rather than a program to look up. */\nconst isPathLike = (cmd: string) => /[\\\\/]/.test(cmd) || path.win32.isAbsolute(cmd) || /^[A-Za-z]:/.test(cmd);\n\n/**\n * The absolute file PATH gives `cmd` on Windows (absolute PATH entries only), or null; `cmd` as given anywhere else.\n * A path is resolved against `cwd` (the start's working folder; this process's when not given) with PATHEXT's\n * extensions; one that doesn't resolve is returned as given (its start fails as not found by itself).\n */\nexport function whereOnPath(\n cmd: string,\n env: NodeJS.ProcessEnv = process.env,\n platform: NodeJS.Platform = process.platform,\n cwd?: string,\n): string | null {\n if (platform !== 'win32') return cmd;\n const pathExt = env.PATHEXT ?? env.Pathext;\n const extEnv = pathExt !== undefined ? { PATHEXT: pathExt } : {};\n if (isPathLike(cmd)) {\n const full = path.win32.resolve(cwd ?? process.cwd(), cmd);\n return findOnPath(full, extEnv, 'win32') ?? cmd;\n }\n const rawPath = env.PATH ?? env.Path ?? '';\n const key = `${cmd.toLowerCase()}\\0${rawPath}\\0${pathExt ?? ''}`;\n const cached = hits.get(key);\n if (cached && isProgramFile(cached, 'win32')) return cached;\n hits.delete(key);\n const absolute = rawPath\n .split(';')\n .map((d) => d.trim().replace(/^\"(.*)\"$/, '$1'))\n .filter((d) => d && path.win32.isAbsolute(d) && !/^[\\\\/](?![\\\\/])/.test(d))\n .join(';');\n const found = findOnPath(cmd, { PATH: absolute, ...extEnv }, 'win32');\n if (found) hits.set(key, found);\n return found;\n}\n\n/** The folder the stand-in for a program that isn't on PATH is in (never created). */\nconst STAND_IN_DIR = 'work-not-on-path';\n\n/** Where a program that isn't on PATH is \"started\" from: a folder that isn't there, so the start fails as not found. */\nexport function notOnPath(cmd: string, env: NodeJS.ProcessEnv = process.env): string {\n return path.win32.join(env.SystemRoot ?? env.SYSTEMROOT ?? 'C:\\\\Windows', STAND_IN_DIR, cmd);\n}\n\n/** The program name a `notOnPath` stand-in stands for, or null when `file` isn't one. */\nexport function standInFor(file: string): string | null {\n const m = /[\\\\/]work-not-on-path[\\\\/]([^\\\\/]+)$/i.exec(file);\n return m ? m[1] : null;\n}\n\n/**\n * A start's error that came from a `notOnPath` stand-in, said in the program's own name: \"winget not found on PATH\"\n * rather than \"spawn C:\\Windows\\work-not-on-path\\winget ENOENT\" (the stand-in is work's device, not a place to\n * look). The code stays ENOENT, so callers that tell \"not installed\" by it still do. Changes the error in place;\n * returns it.\n */\nexport function explainNotOnPath<T>(err: T): T {\n if (!(err instanceof Error)) return err;\n const e = err as NodeJS.ErrnoException;\n const name = (typeof e.path === 'string' ? standInFor(e.path) : null) ?? /[\\\\/]work-not-on-path[\\\\/]([^\\s\\\\/]+)/i.exec(e.message)?.[1];\n if (!name) return err;\n e.message = `${name} not found on PATH`;\n e.path = name;\n return err;\n}\n\n/** What to start for `cmd`: its absolute file on PATH (Windows), a path that fails as not found when it isn't there, `cmd` elsewhere. */\nexport function programPath(\n cmd: string,\n env: NodeJS.ProcessEnv = process.env,\n platform: NodeJS.Platform = process.platform,\n cwd?: string,\n): string {\n return whereOnPath(cmd, env, platform, cwd) ?? notOnPath(cmd, env);\n}\n"],"mappings":";;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AASV,SAAS,cAAc,GAAW,WAA4B,QAAQ,UAAmB;AAC9F,QAAM,MAAM,aAAa;AACzB,MAAI;AACF,UAAM,KAAK,GAAG,SAAS,CAAC;AACxB,WAAO,GAAG,OAAO,MAAM,QAAQ,GAAG,OAAO,QAAW;AAAA,EACtD,QAAQ;AACN,QAAI,CAAC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from "./chunk-KSVYR4G2.js";
|
|
5
5
|
import {
|
|
6
6
|
logSwallowed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-27LWL6QE.js";
|
|
8
8
|
|
|
9
9
|
// src/core/diff/diff-stat.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -207,4 +207,4 @@ export {
|
|
|
207
207
|
wantsDiffStat,
|
|
208
208
|
findOverlaps
|
|
209
209
|
};
|
|
210
|
-
//# sourceMappingURL=chunk-
|
|
210
|
+
//# sourceMappingURL=chunk-F3PEUOTP.js.map
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
parsePrLink
|
|
4
|
+
} from "./chunk-L22AWXWA.js";
|
|
2
5
|
import {
|
|
3
6
|
describeProcess,
|
|
4
7
|
findHolders,
|
|
5
8
|
normDir,
|
|
6
9
|
stopRunningFrom
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JNBMANFM.js";
|
|
8
11
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
isLeftover
|
|
13
|
+
} from "./chunk-AHYCZUPI.js";
|
|
11
14
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
hostForOrigin,
|
|
16
|
+
hostOfPrUrl
|
|
17
|
+
} from "./chunk-PHGVVFTF.js";
|
|
14
18
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
DEFAULT_HOST,
|
|
20
|
+
commandsFor
|
|
21
|
+
} from "./chunk-AQP6SCCJ.js";
|
|
22
|
+
import {
|
|
23
|
+
originUrl,
|
|
24
|
+
readGitConfig
|
|
25
|
+
} from "./chunk-MQCDFSVF.js";
|
|
17
26
|
import {
|
|
18
27
|
defaultRunner
|
|
19
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KSVYR4G2.js";
|
|
20
29
|
|
|
21
30
|
// src/core/archive/restore-leftovers.ts
|
|
22
31
|
function leftoversOf(paths) {
|
|
@@ -46,22 +55,23 @@ async function openInLeftovers(leftovers, io = {}) {
|
|
|
46
55
|
// src/core/pr/pr-ref.ts
|
|
47
56
|
function parsePrRef(input) {
|
|
48
57
|
const s = input.trim();
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
58
|
+
const link = parsePrLink(s);
|
|
59
|
+
if (link) return { repo: link.repoId, ...link.host === DEFAULT_HOST ? {} : { host: link.host }, number: link.number };
|
|
51
60
|
const n = /^#?(\d+)$/.exec(s);
|
|
52
61
|
return n && Number(n[1]) > 0 ? { number: Number(n[1]) } : null;
|
|
53
62
|
}
|
|
54
63
|
function workOnPrPrompt(pr, instruction) {
|
|
64
|
+
const cmd = commandsFor(pr.host);
|
|
55
65
|
const who = pr.author ? `@${pr.author}` : "its author";
|
|
56
66
|
const todo = instruction?.trim();
|
|
57
|
-
const upToSpeed = `Get up to speed first (
|
|
67
|
+
const upToSpeed = `Get up to speed first (${cmd.view(pr.number)}, ${cmd.diff(pr.number)})`;
|
|
58
68
|
return [
|
|
59
69
|
`Work on PR #${pr.number} by ${who}: ${pr.title}`,
|
|
60
70
|
pr.url,
|
|
61
71
|
"",
|
|
62
72
|
`This worktree is on ${who}'s branch: what you commit and push lands in their PR.`,
|
|
63
73
|
...todo ? [`${upToSpeed}, then:`, "", todo, ""] : [`${upToSpeed}, tell me where it stands, and wait for what I want done.`],
|
|
64
|
-
|
|
74
|
+
`Don't post on ${cmd.host} (no comments, reviews or replies).`
|
|
65
75
|
].join("\n");
|
|
66
76
|
}
|
|
67
77
|
|
|
@@ -69,12 +79,20 @@ function workOnPrPrompt(pr, instruction) {
|
|
|
69
79
|
async function resolvePrToStart(input, config, target, deps = {}) {
|
|
70
80
|
const run = deps.run ?? defaultRunner;
|
|
71
81
|
const gitConfig = deps.gitConfig ?? readGitConfig;
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
const linked = hostOfPrUrl(input);
|
|
83
|
+
const ref = linked ? { repo: linked.link.repoId, host: linked.host.id, number: linked.link.number } : parsePrRef(input);
|
|
84
|
+
if (!ref) return { ok: false, error: "Give a pull request link (as your browser shows it), or its number with a repo." };
|
|
85
|
+
const repoOf = (alias2) => {
|
|
86
|
+
const origin = originUrl(gitConfig(config.repos[alias2]) ?? "");
|
|
87
|
+
const host2 = hostForOrigin(origin);
|
|
88
|
+
return { host: host2, id: origin ? host2.repoId(origin) : null };
|
|
89
|
+
};
|
|
75
90
|
let alias;
|
|
76
91
|
if (ref.repo) {
|
|
77
|
-
const matches = Object.keys(config.repos).filter((a) =>
|
|
92
|
+
const matches = Object.keys(config.repos).filter((a) => {
|
|
93
|
+
const r = repoOf(a);
|
|
94
|
+
return r.id === ref.repo && (!ref.host || r.host.id === ref.host);
|
|
95
|
+
});
|
|
78
96
|
if (!matches.length) return { ok: false, error: `${ref.repo} isn't one of your repos: add it first (work config add <alias> <path>).` };
|
|
79
97
|
const within = target ? config.groups?.[target] ?? [target] : matches;
|
|
80
98
|
alias = matches.find((a) => within.includes(a));
|
|
@@ -86,51 +104,35 @@ async function resolvePrToStart(input, config, target, deps = {}) {
|
|
|
86
104
|
if (!config.repos[target]) return { ok: false, error: `${target} isn't one of your repos.` };
|
|
87
105
|
alias = target;
|
|
88
106
|
}
|
|
89
|
-
const
|
|
90
|
-
if (!
|
|
91
|
-
|
|
92
|
-
"gh",
|
|
93
|
-
[
|
|
94
|
-
"pr",
|
|
95
|
-
"view",
|
|
96
|
-
String(ref.number),
|
|
97
|
-
"--repo",
|
|
98
|
-
github,
|
|
99
|
-
"--json",
|
|
100
|
-
"number,title,url,headRefName,headRefOid,baseRefName,state,isCrossRepository,author,headRepositoryOwner"
|
|
101
|
-
],
|
|
102
|
-
config.repos[alias]
|
|
103
|
-
);
|
|
104
|
-
if (view.code === 127) return { ok: false, error: "GitHub CLI (gh) not found: install it to start from a PR." };
|
|
105
|
-
if (view.code !== 0)
|
|
106
|
-
return { ok: false, error: `PR #${ref.number} in ${github}: ${view.stderr.trim().split("\n")[0] || "gh pr view failed"}` };
|
|
107
|
-
let pr;
|
|
108
|
-
try {
|
|
109
|
-
pr = JSON.parse(view.stdout);
|
|
110
|
-
} catch {
|
|
111
|
-
return { ok: false, error: "Couldn't read what gh said about the PR." };
|
|
107
|
+
const { host, id: repoId } = repoOf(alias);
|
|
108
|
+
if (!repoId) {
|
|
109
|
+
return { ok: false, error: `${alias}'s origin isn't a ${host.name} repo work can read: it can only look up PRs on a host it knows.` };
|
|
112
110
|
}
|
|
111
|
+
const view = await host.prByNumber(run, config.repos[alias], repoId, ref.number);
|
|
112
|
+
if (!view.ok) return { ok: false, error: view.error };
|
|
113
|
+
const pr = view.pr;
|
|
113
114
|
if (pr.state && pr.state !== "OPEN") return { ok: false, error: `PR #${ref.number} is ${pr.state.toLowerCase()}.` };
|
|
114
|
-
if (pr.
|
|
115
|
-
const owner = pr.headRepositoryOwner?.login ?? "a fork";
|
|
115
|
+
if (pr.fork) {
|
|
116
116
|
return {
|
|
117
117
|
ok: false,
|
|
118
|
-
error: `PR #${ref.number} comes from a fork (${owner}): its branch isn't on origin, so a session couldn't push to it.`
|
|
118
|
+
error: `PR #${ref.number} comes from a fork (${pr.fork.owner}): its branch isn't on origin, so a session couldn't push to it.`
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
if (!pr.
|
|
122
|
-
const stale = await localGoneOtherWay(run, config.repos[alias], pr.
|
|
121
|
+
if (!pr.branch) return { ok: false, error: `PR #${ref.number}: ${host.cli.cmd} didn't say its branch.` };
|
|
122
|
+
const stale = await localGoneOtherWay(run, config.repos[alias], pr.branch, pr.headSha);
|
|
123
123
|
if (stale) return { ok: false, error: stale };
|
|
124
124
|
return {
|
|
125
125
|
ok: true,
|
|
126
126
|
pr: {
|
|
127
127
|
alias,
|
|
128
|
-
number: pr.number
|
|
129
|
-
title: pr.title
|
|
130
|
-
url: pr.url
|
|
131
|
-
branch: pr.
|
|
132
|
-
base: pr.
|
|
133
|
-
author:
|
|
128
|
+
number: pr.number,
|
|
129
|
+
title: pr.title,
|
|
130
|
+
url: pr.url,
|
|
131
|
+
branch: pr.branch,
|
|
132
|
+
base: pr.base,
|
|
133
|
+
author: pr.author,
|
|
134
|
+
// Absent for GitHub (the wire's default), so a reader from before hosts sees what it always did.
|
|
135
|
+
...host.id === DEFAULT_HOST ? {} : { host: host.id }
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
138
|
}
|
|
@@ -155,4 +157,4 @@ export {
|
|
|
155
157
|
workOnPrPrompt,
|
|
156
158
|
resolvePrToStart
|
|
157
159
|
};
|
|
158
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-FKM67CZZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/archive/restore-leftovers.ts","../src/core/pr/pr-ref.ts","../src/core/pr/pr-start.ts"],"sourcesContent":["import { isLeftover } from '../worktree/leftover.js';\nimport { describeProcess, findHolders, normDir, stopRunningFrom, type Holders } from '../platform/running-from.js';\n\n/**\n * Before a Restore makes a worktree again over what git left of it (a folder\n * it removed only in part, leftover.ts): that folder has to be moved out of\n * the way, and can't be while something runs from it — a dev server its\n * Claude left running. One place for both front-ends: the dashboard's\n * Restore (which asks \"Stop it and restore?\") and `work tree` (which says\n * what to stop).\n */\n\nexport interface LeftoverIo {\n /** What runs from or names the folders (running-from.ts). */\n holders?: (dirs: string[]) => Promise<Holders>;\n /** Stop what runs from them, saying what. */\n stop?: (dirs: string[]) => Promise<string[]>;\n}\n\n/** The session's folders git removed only in part. */\nexport function leftoversOf(paths: string[]): string[] {\n return paths.filter((p) => isLeftover(p));\n}\n\nconst names = (procs: Holders['stoppable'], dirs: string[]) =>\n procs.map((p) =>\n describeProcess(\n p,\n dirs.map((d) => normDir(d)),\n ),\n );\n\n/** What runs from the leftovers, and what has them open: one look at the processes (null: no answer). */\nexport async function lookAtLeftovers(leftovers: string[], io: LeftoverIo = {}): Promise<{ running: string[]; open: string[] } | null> {\n if (leftovers.length === 0) return { running: [], open: [] };\n const h = await (io.holders ?? ((d: string[]) => findHolders(d)))(leftovers).catch(() => null);\n if (!h) return null;\n const running = names(h.stoppable, leftovers);\n return { running, open: [...running, ...names(h.others, leftovers)] };\n}\n\n/** What runs from the leftovers now (\"node …\\vite\\bin\\vite.js --mode demo (PID 35464)\"): none to wait for, []. */\nexport async function runningFromLeftovers(leftovers: string[], io: LeftoverIo = {}): Promise<string[]> {\n return (await lookAtLeftovers(leftovers, io))?.running ?? [];\n}\n\n/** Stop what runs from the leftovers (asked for), saying what. */\nexport async function freeLeftovers(leftovers: string[], io: LeftoverIo = {}): Promise<string[]> {\n if (leftovers.length === 0) return [];\n return (io.stop ?? ((d: string[]) => stopRunningFrom(d)))(leftovers).catch(() => []);\n}\n\n/** Everything that has the leftovers open — what runs from them and what only names them (an editor) — for a failure's message. */\nexport async function openInLeftovers(leftovers: string[], io: LeftoverIo = {}): Promise<string[]> {\n return (await lookAtLeftovers(leftovers, io))?.open ?? [];\n}\n","/**\n * Starting a session on someone else's pull request — on their branch, so\n * what you push lands in their PR. Pure (the SPA and the demo use it): how a\n * PR is named, and what its session's Claude is told first. The lookup\n * (the repo's host) is `pr-start.ts`.\n */\n\nimport type { PrToStart } from '../api-types.js';\nimport { commandsFor, DEFAULT_HOST } from '../hosts/commands.js';\nimport { parsePrLink } from '../hosts/links.js';\n\nexport type { PrToStart };\n\n/** A PR as you'd name it: its link (repo known), or its number (in a repo you pick). */\nexport interface PrRef {\n /** The repo's id on its host, from a link (GitHub: `owner/name`, lowercase). */\n repo?: string;\n /** The host a link is on. */\n host?: string;\n number: number;\n}\n\n/** A PR link of a host work knows (any tail), `#123` or `123`; null for anything else. */\nexport function parsePrRef(input: string): PrRef | null {\n const s = input.trim();\n const link = parsePrLink(s);\n if (link) return { repo: link.repoId, ...(link.host === DEFAULT_HOST ? {} : { host: link.host }), number: link.number };\n const n = /^#?(\\d+)$/.exec(s);\n return n && Number(n[1]) > 0 ? { number: Number(n[1]) } : null;\n}\n\n/**\n * The first message to the session's Claude: whose PR this is, that what it\n * pushes lands there, and to get up to speed — then do `instruction`, or\n * with none, say where it stands and wait for what the user wants. Nothing\n * on the host (no comments, reviews or replies): that's the author's\n * conversation. Its commands are the PR's host's (`host`; GitHub's when absent).\n */\nexport function workOnPrPrompt(\n pr: Pick<PrToStart, 'number' | 'title' | 'url'> & { author?: string; host?: string },\n instruction?: string,\n): string {\n const cmd = commandsFor(pr.host);\n const who = pr.author ? `@${pr.author}` : 'its author';\n const todo = instruction?.trim();\n const upToSpeed = `Get up to speed first (${cmd.view(pr.number)}, ${cmd.diff(pr.number)})`;\n return [\n `Work on PR #${pr.number} by ${who}: ${pr.title}`,\n pr.url,\n '',\n `This worktree is on ${who}'s branch: what you commit and push lands in their PR.`,\n ...(todo ? [`${upToSpeed}, then:`, '', todo, ''] : [`${upToSpeed}, tell me where it stands, and wait for what I want done.`]),\n `Don't post on ${cmd.host} (no comments, reviews or replies).`,\n ].join('\\n');\n}\n","import type { WorkConfig } from '../platform/config.js';\nimport { originUrl, readGitConfig } from '../worktree/repo-scan.js';\nimport { parsePrRef, type PrRef, type PrToStart } from './pr-ref.js';\nimport { defaultRunner, type CommandRunner } from './ship.js';\nimport { DEFAULT_HOST, hostForOrigin, hostOfPrUrl } from '../hosts/index.js';\n\nexport type PrStartResult = { ok: true; pr: PrToStart } | { ok: false; error: string };\n\nexport interface PrStartDeps {\n run?: CommandRunner;\n /** A repo's `.git/config` text (tests pass their own). */\n gitConfig?: (repoPath: string) => string | null;\n}\n\n/**\n * Which of your repos a PR is in, and its branch: from its link (the repo\n * matched by its origin) or its number (in `target`, a repo). Refused: a\n * repo you haven't enrolled, a group as the repo of a bare number, a PR\n * that isn't open, and one from a fork — its branch isn't on origin, so the\n * session couldn't push to it (and `work tree` would make a new, empty\n * branch of that name instead).\n */\nexport async function resolvePrToStart(\n input: string,\n config: Pick<WorkConfig, 'repos' | 'groups'>,\n target?: string,\n deps: PrStartDeps = {},\n): Promise<PrStartResult> {\n const run = deps.run ?? defaultRunner;\n const gitConfig = deps.gitConfig ?? readGitConfig;\n // A link any host reads (one registered at run time too), else a number.\n const linked = hostOfPrUrl(input);\n const ref: PrRef | null = linked ? { repo: linked.link.repoId, host: linked.host.id, number: linked.link.number } : parsePrRef(input);\n if (!ref) return { ok: false, error: 'Give a pull request link (as your browser shows it), or its number with a repo.' };\n\n // Each repo on its own host (its origin's), with its id there.\n const repoOf = (alias: string) => {\n const origin = originUrl(gitConfig(config.repos[alias]) ?? '');\n const host = hostForOrigin(origin);\n return { host, id: origin ? host.repoId(origin) : null };\n };\n let alias: string | undefined;\n if (ref.repo) {\n const matches = Object.keys(config.repos).filter((a) => {\n const r = repoOf(a);\n return r.id === ref.repo && (!ref.host || r.host.id === ref.host);\n });\n if (!matches.length) return { ok: false, error: `${ref.repo} isn't one of your repos: add it first (work config add <alias> <path>).` };\n // A target named beside a link must hold it: the repo itself, or a group with it among its repos.\n const within = target ? (config.groups?.[target] ?? [target]) : matches;\n alias = matches.find((a) => within.includes(a));\n if (!alias) return { ok: false, error: `PR #${ref.number} is in ${matches.join(' / ')} (${ref.repo}), not ${target}.` };\n } else {\n if (!target) return { ok: false, error: `PR #${ref.number}: which repo? Give its link, or pick the repo.` };\n if (config.groups?.[target])\n return { ok: false, error: `${target} is a group: a PR is one repo's. Give its link, or one of the group's repos.` };\n if (!config.repos[target]) return { ok: false, error: `${target} isn't one of your repos.` };\n alias = target;\n }\n const { host, id: repoId } = repoOf(alias);\n if (!repoId) {\n return { ok: false, error: `${alias}'s origin isn't a ${host.name} repo work can read: it can only look up PRs on a host it knows.` };\n }\n\n const view = await host.prByNumber(run, config.repos[alias], repoId, ref.number);\n if (!view.ok) return { ok: false, error: view.error };\n const pr = view.pr;\n if (pr.state && pr.state !== 'OPEN') return { ok: false, error: `PR #${ref.number} is ${pr.state.toLowerCase()}.` };\n if (pr.fork) {\n return {\n ok: false,\n error: `PR #${ref.number} comes from a fork (${pr.fork.owner}): its branch isn't on origin, so a session couldn't push to it.`,\n };\n }\n if (!pr.branch) return { ok: false, error: `PR #${ref.number}: ${host.cli.cmd} didn't say its branch.` };\n const stale = await localGoneOtherWay(run, config.repos[alias], pr.branch, pr.headSha);\n if (stale) return { ok: false, error: stale };\n return {\n ok: true,\n pr: {\n alias,\n number: pr.number,\n title: pr.title,\n url: pr.url,\n branch: pr.branch,\n base: pr.base,\n author: pr.author,\n // Absent for GitHub (the wire's default), so a reader from before hosts sees what it always did.\n ...(host.id === DEFAULT_HOST ? {} : { host: host.id }),\n },\n };\n}\n\n/**\n * `work tree` takes a local branch of that name over origin's, moving it\n * forward when it can. One that has gone another way than the PR (the author\n * force-pushed, or an unrelated branch of the same name) would open on the\n * wrong commits, and what's pushed from it wouldn't go. Ahead (your commits\n * on top) or behind (it fast-forwards) is fine; when git can't tell (no\n * fetch), the usual warning on entering is left to say it.\n */\nasync function localGoneOtherWay(run: CommandRunner, repoPath: string, branch: string, headOid?: string): Promise<string | null> {\n if (!headOid) return null;\n const local = await run('git', ['rev-parse', '--verify', '--quiet', `refs/heads/${branch}`], repoPath);\n if (local.code !== 0) return null;\n await run('git', ['fetch', '--quiet', 'origin', branch], repoPath);\n const contains = await run('git', ['merge-base', '--is-ancestor', headOid, `refs/heads/${branch}`], repoPath);\n if (contains.code === 0) return null;\n const behind = await run('git', ['merge-base', '--is-ancestor', `refs/heads/${branch}`, headOid], repoPath);\n if (behind.code !== 1 || contains.code !== 1) return null; // 1 = not an ancestor; anything else: git couldn't say\n return `Your local branch ${branch} and the PR's have gone separate ways (a force-push, or another branch of that name): rename yours (git branch -m ${branch} ${branch}-old) and try again, or go into its session as it is (work tree <repo> ${branch}).`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,SAAS,YAAY,OAA2B;AACrD,SAAO,MAAM,OAAO,CAAC,MAAM,WAAW,CAAC,CAAC;AAC1C;AAEA,IAAM,QAAQ,CAAC,OAA6B,SAC1C,MAAM;AAAA,EA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IAAI,MAAM,0EAA0E,MAAM;AACzP;","names":["alias","host"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readStatus
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-27LWL6QE.js";
|
|
5
5
|
|
|
6
6
|
// src/commands/shared/turn-wait.ts
|
|
7
7
|
var cliWaitDeps = {
|
|
@@ -16,4 +16,4 @@ var cliWaitDeps = {
|
|
|
16
16
|
export {
|
|
17
17
|
cliWaitDeps
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-FMLE2WSN.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sessionWorkTime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-353ZINJ2.js";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_CATCH_UP_DAYS,
|
|
7
7
|
MAX_RANGE_DAYS,
|
|
@@ -16,22 +16,29 @@ import {
|
|
|
16
16
|
readIssueIds,
|
|
17
17
|
rememberIssueId,
|
|
18
18
|
timeSettings
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4O4VQQEA.js";
|
|
20
20
|
import {
|
|
21
21
|
runInternal
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-34E2LA3M.js";
|
|
23
|
+
import {
|
|
24
|
+
knownHosts
|
|
25
|
+
} from "./chunk-PHGVVFTF.js";
|
|
23
26
|
import {
|
|
24
27
|
loadHistory,
|
|
25
28
|
runGitAsync
|
|
26
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-27LWL6QE.js";
|
|
27
30
|
import {
|
|
28
31
|
sessionIdFor
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Y7T73SAP.js";
|
|
30
33
|
import {
|
|
31
34
|
isIssueKey,
|
|
32
35
|
issueKeys,
|
|
33
36
|
loadConfig
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-2MAZV5KS.js";
|
|
38
|
+
import {
|
|
39
|
+
explainNotOnPath,
|
|
40
|
+
programPath
|
|
41
|
+
} from "./chunk-EL3XL2OC.js";
|
|
35
42
|
import {
|
|
36
43
|
atomicWriteFile,
|
|
37
44
|
ensureFile,
|
|
@@ -86,8 +93,8 @@ import fs2 from "fs";
|
|
|
86
93
|
import { execFile } from "child_process";
|
|
87
94
|
function execAsync(cmd, args, timeout) {
|
|
88
95
|
return new Promise((resolve, reject) => {
|
|
89
|
-
execFile(cmd, args, { encoding: "utf-8", timeout, windowsHide: true }, (err, stdout) => {
|
|
90
|
-
if (err) reject(err);
|
|
96
|
+
execFile(programPath(cmd), args, { encoding: "utf-8", timeout, windowsHide: true }, (err, stdout) => {
|
|
97
|
+
if (err) reject(explainNotOnPath(err));
|
|
91
98
|
else resolve(stdout ?? "");
|
|
92
99
|
});
|
|
93
100
|
});
|
|
@@ -527,7 +534,7 @@ function commitsWrittenOn(stdout, day) {
|
|
|
527
534
|
const out = [];
|
|
528
535
|
for (const line of stdout.split("\n").filter(Boolean)) {
|
|
529
536
|
const [sha, authored, committer, ...rest] = line.split(" ");
|
|
530
|
-
if (committer
|
|
537
|
+
if (knownHosts().some((h) => h.hostCommit(committer ?? ""))) continue;
|
|
531
538
|
if (/^(index|untracked files) on /.test(rest.join(" "))) continue;
|
|
532
539
|
const at = Date.parse(authored ?? "");
|
|
533
540
|
if (Number.isNaN(at) || localDay(at) !== day) continue;
|
|
@@ -737,4 +744,4 @@ export {
|
|
|
737
744
|
finishDeviceLogin,
|
|
738
745
|
defaultTimeDeps
|
|
739
746
|
};
|
|
740
|
-
//# sourceMappingURL=chunk-
|
|
747
|
+
//# sourceMappingURL=chunk-FSQJOZS4.js.map
|