@moberg_hr/work-tree 2.9.3 → 2.11.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-Q5Y3YKI7.js} +83 -100
- package/dist/account-Q5Y3YKI7.js.map +1 -0
- package/dist/{add-repo-EDU3QEYI.js → add-repo-L4ZTGBLO.js} +35 -31
- package/dist/{add-repo-EDU3QEYI.js.map → add-repo-L4ZTGBLO.js.map} +1 -1
- package/dist/{answer-MHOJ2J6S.js → answer-GNR4ZBWV.js} +18 -15
- package/dist/{answer-MHOJ2J6S.js.map → answer-GNR4ZBWV.js.map} +1 -1
- package/dist/{attach-37JOJ4C3.js → attach-QNSDKRW7.js} +27 -21
- package/dist/{attach-37JOJ4C3.js.map → attach-QNSDKRW7.js.map} +1 -1
- package/dist/bin.js +5 -5
- package/dist/{block-D5CAR53T.js → block-3YUIMA62.js} +23 -15
- package/dist/block-3YUIMA62.js.map +1 -0
- package/dist/{broadcast-LLYHUWXA.js → broadcast-DR3JFINO.js} +13 -11
- package/dist/{broadcast-LLYHUWXA.js.map → broadcast-DR3JFINO.js.map} +1 -1
- package/dist/{catchup-2SL3JGA7.js → catchup-YG2UOZBL.js} +19 -17
- package/dist/{catchup-2SL3JGA7.js.map → catchup-YG2UOZBL.js.map} +1 -1
- package/dist/{chunk-P6BHOAQG.js → chunk-246OTVRR.js} +2 -2
- package/dist/{chunk-KSUOVFO3.js → chunk-26YZYL77.js} +16 -9
- package/dist/chunk-26YZYL77.js.map +1 -0
- package/dist/{chunk-TPSFJSO7.js → chunk-2KN5ECHJ.js} +13 -10
- package/dist/chunk-2KN5ECHJ.js.map +1 -0
- package/dist/chunk-2QLLPZ2L.js +59 -0
- package/dist/chunk-2QLLPZ2L.js.map +1 -0
- package/dist/chunk-2ZQRD73B.js +376 -0
- package/dist/chunk-2ZQRD73B.js.map +1 -0
- package/dist/{chunk-GNGXYXBC.js → chunk-33XSEAHO.js} +2 -2
- package/dist/{chunk-IPGH7TXJ.js → chunk-4CNBSPNL.js} +2 -2
- package/dist/{chunk-J36ULZBO.js → chunk-4K4S53KX.js} +2 -2
- package/dist/chunk-5PAMO6OG.js +9 -0
- package/dist/{chunk-NWIVXGSL.js.map → chunk-5PAMO6OG.js.map} +1 -1
- package/dist/chunk-63ZLPXRL.js +199 -0
- package/dist/chunk-63ZLPXRL.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-5QGCF3PS.js → chunk-7DUGVGUZ.js} +2 -2
- package/dist/chunk-7E5XPDKX.js +22 -0
- package/dist/chunk-7E5XPDKX.js.map +1 -0
- package/dist/{chunk-6FVYSW3E.js → chunk-7NNGYM3G.js} +21 -6
- package/dist/chunk-7NNGYM3G.js.map +1 -0
- package/dist/{chunk-DQCUYCMX.js → chunk-7NNOGTMC.js} +3 -3
- package/dist/{chunk-OMIMK3LB.js → chunk-7OFVXQSM.js} +2 -2
- package/dist/chunk-7QNVFVG6.js +196 -0
- package/dist/chunk-7QNVFVG6.js.map +1 -0
- package/dist/chunk-7RHC5U7X.js +1578 -0
- package/dist/chunk-7RHC5U7X.js.map +1 -0
- package/dist/{chunk-KUCMJHQW.js → chunk-AHYCZUPI.js} +2 -2
- package/dist/chunk-B6MWNZCN.js +415 -0
- package/dist/chunk-B6MWNZCN.js.map +1 -0
- package/dist/{chunk-CCTALU3C.js → chunk-BLGCU4HT.js} +2 -2
- package/dist/{chunk-RCGFHJM7.js → chunk-CBCOVIXZ.js} +2 -2
- package/dist/{chunk-WTQ2QCAG.js → chunk-CDYCZ3PR.js} +4 -5
- package/dist/chunk-CDYCZ3PR.js.map +1 -0
- package/dist/{chunk-HCVONKJI.js → chunk-CR4LUAP4.js} +15 -17
- package/dist/{chunk-HCVONKJI.js.map → chunk-CR4LUAP4.js.map} +1 -1
- package/dist/{chunk-ZXHMC7UO.js → chunk-D2J3AD6L.js} +3 -5
- package/dist/chunk-D2J3AD6L.js.map +1 -0
- 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-S3BAD4IR.js → chunk-DGVCN7HB.js} +2 -2
- package/dist/chunk-DMGNJ73M.js +84 -0
- package/dist/chunk-DMGNJ73M.js.map +1 -0
- package/dist/{chunk-QL36KN7X.js → chunk-DYQQLUSB.js} +3 -3
- package/dist/{chunk-IWJXFNM4.js → chunk-DZ4LX2EK.js} +16 -24
- package/dist/chunk-DZ4LX2EK.js.map +1 -0
- package/dist/{chunk-3C3BKZ3H.js → chunk-EDIHBLZY.js} +51 -29
- package/dist/chunk-EDIHBLZY.js.map +1 -0
- package/dist/chunk-EL3XL2OC.js +150 -0
- package/dist/chunk-EL3XL2OC.js.map +1 -0
- package/dist/{chunk-T7AFYEQ7.js → chunk-F2CDUWZU.js} +5 -5
- package/dist/chunk-F2NOCGMA.js +243 -0
- package/dist/chunk-F2NOCGMA.js.map +1 -0
- package/dist/chunk-FGPXMAYU.js +25 -0
- package/dist/chunk-FGPXMAYU.js.map +1 -0
- package/dist/{chunk-ICJPVSRY.js → chunk-FLHMFRZB.js} +51 -51
- package/dist/chunk-FLHMFRZB.js.map +1 -0
- package/dist/{chunk-CLBQ7ZC4.js → chunk-FR7B7QH6.js} +3 -3
- package/dist/chunk-FZHFD2AY.js +27 -0
- package/dist/chunk-FZHFD2AY.js.map +1 -0
- package/dist/{chunk-7OUIZ2YQ.js → chunk-G4QUJO7W.js} +56 -58
- package/dist/chunk-G4QUJO7W.js.map +1 -0
- package/dist/{chunk-26OVU2AE.js → chunk-G4ZR5YZL.js} +8 -8
- package/dist/{chunk-P4EQWC5W.js → chunk-GG4VKPAX.js} +2 -2
- package/dist/{chunk-INQQGV2G.js → chunk-GZNF6762.js} +4 -4
- package/dist/{chunk-QHTXLCG7.js → chunk-H3LP3Z4U.js} +19 -13
- package/dist/chunk-H3LP3Z4U.js.map +1 -0
- package/dist/{chunk-6E2I2FBJ.js → chunk-HJKYE57I.js} +22 -22
- package/dist/{chunk-CYWI3ZW7.js → chunk-I5FZXDCO.js} +4 -4
- package/dist/{chunk-5WM24P5N.js → chunk-I6MILNM5.js} +2 -2
- package/dist/chunk-I6MILNM5.js.map +1 -0
- package/dist/{chunk-BSP2Z7B7.js → chunk-IQ4MITHC.js} +6 -6
- package/dist/chunk-J3GEINBH.js +307 -0
- package/dist/chunk-J3GEINBH.js.map +1 -0
- package/dist/{chunk-WXE7D44E.js → chunk-JCFCEJ2D.js} +8 -8
- package/dist/chunk-JCFCEJ2D.js.map +1 -0
- package/dist/{chunk-WXMWZRBH.js → chunk-JF25PSYF.js} +24 -8
- package/dist/chunk-JF25PSYF.js.map +1 -0
- package/dist/{chunk-SG5LUMGE.js → chunk-JNBMANFM.js} +6 -3
- package/dist/chunk-JNBMANFM.js.map +1 -0
- package/dist/chunk-JVE2JFLV.js +15 -0
- package/dist/chunk-JVE2JFLV.js.map +1 -0
- package/dist/{chunk-RGUSVBGN.js → chunk-JVHHSKBJ.js} +2 -2
- 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-MG5TTLYZ.js → chunk-LHM3GB5K.js} +3 -3
- package/dist/{chunk-PSUJZUYX.js → chunk-LM2T5OR3.js} +3 -2
- package/dist/{chunk-GRLKPVTP.js → chunk-LQNHIMJM.js} +56 -81
- package/dist/chunk-LQNHIMJM.js.map +1 -0
- package/dist/{chunk-UBOKRHNV.js → chunk-MKJH2D4V.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-MXOHW4U2.js +187 -0
- package/dist/chunk-MXOHW4U2.js.map +1 -0
- package/dist/{chunk-VUAVPBFR.js → chunk-N4W34U3I.js} +78 -60
- package/dist/chunk-N4W34U3I.js.map +1 -0
- package/dist/{chunk-72IBYKIY.js → chunk-NFWSJFYY.js} +16 -5
- package/dist/chunk-NFWSJFYY.js.map +1 -0
- package/dist/{chunk-2JNW2AQ2.js → chunk-O5ZJY5BT.js} +32 -4
- package/dist/chunk-O5ZJY5BT.js.map +1 -0
- package/dist/{chunk-CMO5YUZR.js → chunk-OY46QHLX.js} +4 -4
- package/dist/{chunk-OTAZOIXK.js → chunk-PKQROEFP.js} +2 -2
- package/dist/{chunk-4NITDMDH.js → chunk-PPZP7CA7.js} +9 -186
- package/dist/chunk-PPZP7CA7.js.map +1 -0
- package/dist/chunk-QBI6K23L.js +50 -0
- package/dist/chunk-QBI6K23L.js.map +1 -0
- package/dist/{chunk-AAYWHIIT.js → chunk-QLFJNYBV.js} +9 -56
- package/dist/chunk-QLFJNYBV.js.map +1 -0
- package/dist/{chunk-PRDRRU2B.js → chunk-R5JCCRGD.js} +5 -5
- package/dist/{chunk-X4AXKO3A.js → chunk-RGLIW45S.js} +2 -2
- package/dist/{chunk-YYBXQBW2.js → chunk-RUYTU2WJ.js} +17 -3
- package/dist/chunk-RUYTU2WJ.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-WC534PXU.js → chunk-SPP7MA3D.js} +36 -25
- package/dist/chunk-SPP7MA3D.js.map +1 -0
- package/dist/{chunk-RFINYWID.js → chunk-TEL27NRC.js} +16 -6
- package/dist/chunk-TEL27NRC.js.map +1 -0
- package/dist/{chunk-ATED7SAH.js → chunk-TEVCBUEN.js} +36 -25
- package/dist/chunk-TEVCBUEN.js.map +1 -0
- package/dist/{chunk-QSOEMCWQ.js → chunk-URGHBFB3.js} +18 -11
- package/dist/chunk-URGHBFB3.js.map +1 -0
- package/dist/{chunk-S3FMTEFR.js → chunk-VAMLU5VH.js} +13 -6
- package/dist/chunk-VAMLU5VH.js.map +1 -0
- package/dist/{chunk-ZI2KXTKM.js → chunk-VJ5XMYXE.js} +6 -10
- package/dist/chunk-VJ5XMYXE.js.map +1 -0
- package/dist/{chunk-QEVYCCKD.js → chunk-VRQKIIC2.js} +12 -34
- package/dist/chunk-VRQKIIC2.js.map +1 -0
- package/dist/{chunk-63VY4YJM.js → chunk-W7MGB3Q2.js} +34 -9
- package/dist/chunk-W7MGB3Q2.js.map +1 -0
- package/dist/{chunk-HEPBANFJ.js → chunk-X3RHLYGI.js} +93 -196
- package/dist/chunk-X3RHLYGI.js.map +1 -0
- package/dist/chunk-YKQLHFY4.js +1478 -0
- package/dist/chunk-YKQLHFY4.js.map +1 -0
- package/dist/chunk-YPXFDJ76.js +71 -0
- package/dist/chunk-YPXFDJ76.js.map +1 -0
- package/dist/{chunk-XVNRP7XE.js → chunk-YQBBFX7D.js} +11 -11
- package/dist/{chunk-37XQIG7F.js → chunk-ZG2M4ECW.js} +569 -55
- package/dist/chunk-ZG2M4ECW.js.map +1 -0
- package/dist/{cleanup-5PSLKZLF.js → cleanup-X7G66SPY.js} +49 -37
- package/dist/{cleanup-5PSLKZLF.js.map → cleanup-X7G66SPY.js.map} +1 -1
- package/dist/cli-RJVX6HVT.js +19 -0
- package/dist/{command-hook-installer-7Q7UD7AU.js → command-hook-installer-GMQ4IVDE.js} +3 -3
- 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-ZBU5PHMG.js} +18 -15
- package/dist/{config-6MSITKGB.js.map → config-ZBU5PHMG.js.map} +1 -1
- package/dist/{diff-Q7MV6YGJ.js → diff-ADSD4SNQ.js} +25 -22
- package/dist/{diff-Q7MV6YGJ.js.map → diff-ADSD4SNQ.js.map} +1 -1
- package/dist/{digest-KUMVYXKZ.js → digest-ORN6JFNE.js} +15 -13
- package/dist/{digest-KUMVYXKZ.js.map → digest-ORN6JFNE.js.map} +1 -1
- package/dist/{fork-OFENISEM.js → fork-VWHAU76U.js} +44 -31
- package/dist/{fork-OFENISEM.js.map → fork-VWHAU76U.js.map} +1 -1
- package/dist/{history-5WKRWARZ.js → history-PP7RHA2V.js} +14 -12
- package/dist/{hook-ARS32DG2.js → hook-6AL5LIQO.js} +56 -22
- package/dist/hook-6AL5LIQO.js.map +1 -0
- package/dist/{hydrate-LCT6DVB3.js → hydrate-JW5MIWLZ.js} +16 -14
- package/dist/{hydrate-LCT6DVB3.js.map → hydrate-JW5MIWLZ.js.map} +1 -1
- package/dist/{init-FJKPEY5N.js → init-SIIKJF3K.js} +29 -21
- package/dist/{init-FJKPEY5N.js.map → init-SIIKJF3K.js.map} +1 -1
- package/dist/install-skills-KS6N4U6L.js +22 -0
- package/dist/install-skills-bin.js +10 -8
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{list-GTKP5FAW.js → list-UTQF7KHP.js} +17 -15
- package/dist/{list-GTKP5FAW.js.map → list-UTQF7KHP.js.map} +1 -1
- package/dist/{move-GOCLEFGZ.js → move-P6WOVUGF.js} +35 -26
- package/dist/{move-GOCLEFGZ.js.map → move-P6WOVUGF.js.map} +1 -1
- package/dist/{note-B7TQBXQF.js → note-GEFCZKMT.js} +16 -14
- package/dist/{note-B7TQBXQF.js.map → note-GEFCZKMT.js.map} +1 -1
- package/dist/{overlaps-UKQHIJMU.js → overlaps-QMI2RJSG.js} +23 -13
- package/dist/{overlaps-UKQHIJMU.js.map → overlaps-QMI2RJSG.js.map} +1 -1
- package/dist/{pin-UZZCDK7M.js → pin-ZALBX2XK.js} +16 -14
- package/dist/{pin-UZZCDK7M.js.map → pin-ZALBX2XK.js.map} +1 -1
- package/dist/{pr-NU2ME2XW.js → pr-D3EZ7C5H.js} +48 -23
- package/dist/pr-D3EZ7C5H.js.map +1 -0
- package/dist/{prune-IZGEYTSB.js → prune-ZCOBL7IB.js} +47 -35
- package/dist/{prune-IZGEYTSB.js.map → prune-ZCOBL7IB.js.map} +1 -1
- package/dist/{pty-host-AWDIKPQN.js → pty-host-UCM6GV42.js} +104 -40
- package/dist/pty-host-UCM6GV42.js.map +1 -0
- package/dist/{read-U6GBGA5E.js → read-NHRSGZI4.js} +15 -13
- package/dist/{read-U6GBGA5E.js.map → read-NHRSGZI4.js.map} +1 -1
- package/dist/{recent-2DUMLUDG.js → recent-V4JVL4Y2.js} +36 -27
- package/dist/recent-V4JVL4Y2.js.map +1 -0
- package/dist/{remove-OXUP4O33.js → remove-YNO2I3HR.js} +51 -39
- package/dist/{remove-OXUP4O33.js.map → remove-YNO2I3HR.js.map} +1 -1
- package/dist/{restart-QEW4DJC3.js → restart-6YKAD7QQ.js} +19 -17
- package/dist/{restart-QEW4DJC3.js.map → restart-6YKAD7QQ.js.map} +1 -1
- package/dist/{resume-K45IT4QO.js → resume-PNZ7BRXJ.js} +36 -21
- package/dist/resume-PNZ7BRXJ.js.map +1 -0
- package/dist/review-now-HHQIBVUS.js +22 -0
- package/dist/review-now-HHQIBVUS.js.map +1 -0
- package/dist/{run-42LORGPS.js → run-3QYP7GBN.js} +23 -17
- package/dist/run-3QYP7GBN.js.map +1 -0
- package/dist/{screen-2TLIUH3G.js → screen-I6N6FKMF.js} +16 -14
- package/dist/{screen-2TLIUH3G.js.map → screen-I6N6FKMF.js.map} +1 -1
- package/dist/{search-7E4B2KX6.js → search-MLLK3ZCW.js} +12 -10
- package/dist/{search-7E4B2KX6.js.map → search-MLLK3ZCW.js.map} +1 -1
- package/dist/{section-OVA5VD7L.js → section-EQOZ36FS.js} +16 -14
- package/dist/{section-OVA5VD7L.js.map → section-EQOZ36FS.js.map} +1 -1
- package/dist/{send-BJY5CYLO.js → send-LET73FB6.js} +21 -18
- package/dist/send-LET73FB6.js.map +1 -0
- package/dist/{sessions-4A24ZORW.js → sessions-MDOJJZCK.js} +60 -25
- package/dist/sessions-MDOJJZCK.js.map +1 -0
- package/dist/{snooze-WIVKB3GH.js → snooze-TNA7QTXS.js} +15 -13
- package/dist/{snooze-WIVKB3GH.js.map → snooze-TNA7QTXS.js.map} +1 -1
- package/dist/{start-G6GR533S.js → start-OV6LZJ2V.js} +16 -14
- package/dist/{start-G6GR533S.js.map → start-OV6LZJ2V.js.map} +1 -1
- package/dist/{state-S3DGLT4J.js → state-BR43ONIH.js} +18 -6
- package/dist/state-BR43ONIH.js.map +1 -0
- package/dist/{status-BTAWY6JQ.js → status-HDDGCX4J.js} +40 -15
- package/dist/status-HDDGCX4J.js.map +1 -0
- package/dist/{statusline-WLXEU5DM.js → statusline-WKKYCH7O.js} +13 -12
- package/dist/{statusline-WLXEU5DM.js.map → statusline-WKKYCH7O.js.map} +1 -1
- package/dist/{statusline-hook-OVWHHFBV.js → statusline-hook-K7KPN2H6.js} +6 -5
- package/dist/{statusline-hook-OVWHHFBV.js.map → statusline-hook-K7KPN2H6.js.map} +1 -1
- package/dist/{stop-FN6EPFJ4.js → stop-3TJWZBJB.js} +16 -14
- package/dist/{stop-FN6EPFJ4.js.map → stop-3TJWZBJB.js.map} +1 -1
- package/dist/{sync-T3BSHX6Q.js → sync-67AOBEYR.js} +47 -35
- package/dist/{sync-T3BSHX6Q.js.map → sync-67AOBEYR.js.map} +1 -1
- package/dist/{time-5CH5O5MZ.js → time-F6SLY6HR.js} +17 -15
- package/dist/{time-5CH5O5MZ.js.map → time-F6SLY6HR.js.map} +1 -1
- package/dist/{time-actions-XEUQ3UF7.js → time-actions-YOXF5WC7.js} +6 -5
- package/dist/{timesheet-FMQKPS5S.js → timesheet-QUEDQSJ2.js} +26 -17
- package/dist/{timesheet-FMQKPS5S.js.map → timesheet-QUEDQSJ2.js.map} +1 -1
- package/dist/{todo-23COLGR2.js → todo-TALKJYK6.js} +5 -5
- package/dist/{tree-T33VU473.js → tree-FOOQBNVW.js} +66 -47
- package/dist/tree-FOOQBNVW.js.map +1 -0
- package/dist/{update-PJRSKQZ2.js → update-5O3I5P4N.js} +26 -16
- package/dist/{update-PJRSKQZ2.js.map → update-5O3I5P4N.js.map} +1 -1
- package/dist/{usage-TL66LWO4.js → usage-DVKHDT5J.js} +15 -13
- package/dist/{usage-TL66LWO4.js.map → usage-DVKHDT5J.js.map} +1 -1
- package/dist/version-TVT6GSRF.js +115 -0
- package/dist/version-TVT6GSRF.js.map +1 -0
- package/dist/{wait-YIEJO6YM.js → wait-5HZZPKNM.js} +18 -15
- package/dist/{wait-YIEJO6YM.js.map → wait-5HZZPKNM.js.map} +1 -1
- package/dist/wd-bin.js +7 -7
- package/dist/web/assets/{PtyView-DnDd6jLI.js → PtyView-DIGlBtjg.js} +2 -2
- package/dist/web/assets/{PtyView-DnDd6jLI.js.map → PtyView-DIGlBtjg.js.map} +1 -1
- package/dist/web/assets/index-CpqiTeqj.css +1 -0
- package/dist/web/assets/index-Cx0PMo6D.js +126 -0
- package/dist/web/assets/index-Cx0PMo6D.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-IYUNJMQD.js → web-T7UPV3QY.js} +5158 -1822
- package/dist/web-T7UPV3QY.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-3C3BKZ3H.js.map +0 -1
- package/dist/chunk-3GIH4WTA.js +0 -314
- 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-RFINYWID.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/chunk-ZXHMC7UO.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-P6BHOAQG.js.map → chunk-246OTVRR.js.map} +0 -0
- /package/dist/{chunk-GNGXYXBC.js.map → chunk-33XSEAHO.js.map} +0 -0
- /package/dist/{chunk-IPGH7TXJ.js.map → chunk-4CNBSPNL.js.map} +0 -0
- /package/dist/{chunk-J36ULZBO.js.map → chunk-4K4S53KX.js.map} +0 -0
- /package/dist/{chunk-5QGCF3PS.js.map → chunk-7DUGVGUZ.js.map} +0 -0
- /package/dist/{chunk-DQCUYCMX.js.map → chunk-7NNOGTMC.js.map} +0 -0
- /package/dist/{chunk-OMIMK3LB.js.map → chunk-7OFVXQSM.js.map} +0 -0
- /package/dist/{chunk-KUCMJHQW.js.map → chunk-AHYCZUPI.js.map} +0 -0
- /package/dist/{chunk-CCTALU3C.js.map → chunk-BLGCU4HT.js.map} +0 -0
- /package/dist/{chunk-RCGFHJM7.js.map → chunk-CBCOVIXZ.js.map} +0 -0
- /package/dist/{chunk-S3BAD4IR.js.map → chunk-DGVCN7HB.js.map} +0 -0
- /package/dist/{chunk-QL36KN7X.js.map → chunk-DYQQLUSB.js.map} +0 -0
- /package/dist/{chunk-T7AFYEQ7.js.map → chunk-F2CDUWZU.js.map} +0 -0
- /package/dist/{chunk-CLBQ7ZC4.js.map → chunk-FR7B7QH6.js.map} +0 -0
- /package/dist/{chunk-26OVU2AE.js.map → chunk-G4ZR5YZL.js.map} +0 -0
- /package/dist/{chunk-P4EQWC5W.js.map → chunk-GG4VKPAX.js.map} +0 -0
- /package/dist/{chunk-INQQGV2G.js.map → chunk-GZNF6762.js.map} +0 -0
- /package/dist/{chunk-6E2I2FBJ.js.map → chunk-HJKYE57I.js.map} +0 -0
- /package/dist/{chunk-CYWI3ZW7.js.map → chunk-I5FZXDCO.js.map} +0 -0
- /package/dist/{chunk-BSP2Z7B7.js.map → chunk-IQ4MITHC.js.map} +0 -0
- /package/dist/{chunk-RGUSVBGN.js.map → chunk-JVHHSKBJ.js.map} +0 -0
- /package/dist/{chunk-MG5TTLYZ.js.map → chunk-LHM3GB5K.js.map} +0 -0
- /package/dist/{chunk-PSUJZUYX.js.map → chunk-LM2T5OR3.js.map} +0 -0
- /package/dist/{chunk-UBOKRHNV.js.map → chunk-MKJH2D4V.js.map} +0 -0
- /package/dist/{chunk-HMK3INUS.js.map → chunk-MQCDFSVF.js.map} +0 -0
- /package/dist/{chunk-CMO5YUZR.js.map → chunk-OY46QHLX.js.map} +0 -0
- /package/dist/{chunk-OTAZOIXK.js.map → chunk-PKQROEFP.js.map} +0 -0
- /package/dist/{chunk-PRDRRU2B.js.map → chunk-R5JCCRGD.js.map} +0 -0
- /package/dist/{chunk-X4AXKO3A.js.map → chunk-RGLIW45S.js.map} +0 -0
- /package/dist/{chunk-XVNRP7XE.js.map → chunk-YQBBFX7D.js.map} +0 -0
- /package/dist/{cli-AF7636FA.js.map → cli-RJVX6HVT.js.map} +0 -0
- /package/dist/{command-hook-installer-7Q7UD7AU.js.map → command-hook-installer-GMQ4IVDE.js.map} +0 -0
- /package/dist/{history-5WKRWARZ.js.map → history-PP7RHA2V.js.map} +0 -0
- /package/dist/{install-skills-UYAFVJBA.js.map → install-skills-KS6N4U6L.js.map} +0 -0
- /package/dist/{time-actions-XEUQ3UF7.js.map → time-actions-YOXF5WC7.js.map} +0 -0
- /package/dist/{todo-23COLGR2.js.map → todo-TALKJYK6.js.map} +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
isEnvDelta
|
|
4
|
+
} from "./chunk-DMGNJ73M.js";
|
|
5
|
+
import {
|
|
6
|
+
getConfigDir
|
|
7
|
+
} from "./chunk-6THUVP6T.js";
|
|
8
|
+
|
|
9
|
+
// src/core/pty/pty-host-protocol.ts
|
|
10
|
+
import fs from "fs";
|
|
11
|
+
import path from "path";
|
|
12
|
+
var PROTOCOL_VERSION = 2;
|
|
13
|
+
var HOST_FEATURES = ["agentEnv", "halt"];
|
|
14
|
+
var SECRET_NAME = /TOKEN|SECRET|PASS|PWD|CREDENTIAL|PRIVATE|KEY|AUTH|BEARER|COOKIE|SESSION|CERT|SIGN|SALT|(^|_)PAT($|_)|DSN|CONN|DATABASE_URL|_URI$|_URL$/i;
|
|
15
|
+
var SECRET_VALUE = /:\/\/[^/\s:@]+:[^/\s@]+@/;
|
|
16
|
+
var ALWAYS_KEPT_ENV = ["CLAUDE_CONFIG_DIR"];
|
|
17
|
+
function keepEnv(env, names) {
|
|
18
|
+
if (!env) return void 0;
|
|
19
|
+
const kept = Object.fromEntries(
|
|
20
|
+
[.../* @__PURE__ */ new Set([...names, ...ALWAYS_KEPT_ENV])].filter((n) => !SECRET_NAME.test(n) && typeof env[n] === "string" && !SECRET_VALUE.test(env[n])).map((n) => [n, env[n]])
|
|
21
|
+
);
|
|
22
|
+
return Object.keys(kept).length ? kept : void 0;
|
|
23
|
+
}
|
|
24
|
+
function isPersistedPty(x) {
|
|
25
|
+
const e = x;
|
|
26
|
+
return !!e && typeof e === "object" && typeof e.cwd === "string" && !!e.tool && typeof e.tool === "object" && (e.agentEnv === void 0 || isEnvDelta(e.agentEnv)) && (e.keptEnv === void 0 || !!e.keptEnv && typeof e.keptEnv === "object" && Object.values(e.keptEnv).every((v) => typeof v === "string"));
|
|
27
|
+
}
|
|
28
|
+
function hostInfoPath() {
|
|
29
|
+
return path.join(getConfigDir(), "pty-host.json");
|
|
30
|
+
}
|
|
31
|
+
function hostStartLockPath() {
|
|
32
|
+
return path.join(getConfigDir(), "pty-host.start.lock");
|
|
33
|
+
}
|
|
34
|
+
function ptySessionsPath() {
|
|
35
|
+
return path.join(getConfigDir(), "pty-sessions.json");
|
|
36
|
+
}
|
|
37
|
+
function readHostInfo() {
|
|
38
|
+
try {
|
|
39
|
+
const raw = JSON.parse(fs.readFileSync(hostInfoPath(), "utf-8"));
|
|
40
|
+
if (typeof raw.port === "number" && typeof raw.token === "string" && typeof raw.pid === "number") {
|
|
41
|
+
return raw;
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
} catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
PROTOCOL_VERSION,
|
|
51
|
+
HOST_FEATURES,
|
|
52
|
+
keepEnv,
|
|
53
|
+
isPersistedPty,
|
|
54
|
+
hostInfoPath,
|
|
55
|
+
hostStartLockPath,
|
|
56
|
+
ptySessionsPath,
|
|
57
|
+
readHostInfo
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-2QLLPZ2L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/pty/pty-host-protocol.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { getConfigDir } from '../platform/config.js';\nimport type { AiToolSpec } from '../platform/ai-launcher.js';\nimport { isEnvDelta, type EnvDelta } from '../platform/env-delta.js';\n\n/**\n * Wire contract between the PTY host (`work pty-host`, the long-lived\n * process that owns every Claude PTY) and its clients (`work web`,\n * `work attach`). Bump PROTOCOL_VERSION on any incompatible change: a\n * client that finds an older host running tells the user to restart it\n * (`work pty-host --restart`) instead of silently misbehaving — the host\n * outlives rebuilds by design.\n *\n * 2: the restore list moved from pty-sessions.json into state.db. A v1 host\n * still writes the file, which a v2 host adopts on start\n * (adoptLegacyRestoreList).\n */\nexport const PROTOCOL_VERSION = 2;\n\n/**\n * What this host can do beyond PROTOCOL_VERSION, answered by `/health` (additive: a host from before answers none).\n * `agentEnv`: it applies a spawn's / restart's / resume's `agentEnv` (a session's Claude account); `halt`: halt / resume.\n * A client asks before sending something an older host would silently drop (pty-pool.ts).\n */\nexport const HOST_FEATURES = ['agentEnv', 'halt'] as const;\nexport type HostFeature = (typeof HOST_FEATURES)[number];\n\n/** Discovery file: where the running host listens and its auth token. */\nexport interface HostInfo {\n pid: number;\n port: number;\n token: string;\n version: number;\n}\n\n/** What a client asks the host to spawn. The host decides `--continue`\n * itself (see `hasClaudeConversation`) so restores after a reboot make\n * the same call a fresh spawn would. */\nexport interface SpawnSpec {\n cwd: string;\n tool: AiToolSpec;\n port?: number;\n cols?: number;\n rows?: number;\n // No `unsafe` any more: every agent starts in its own permission mode. An older client may still send\n // `unsafe: true`, and a restore list written by an older host may hold it (and its tool an `unsafeFlag`): extra\n // fields, so no PROTOCOL_VERSION bump. A current host starts nothing from them and drops both when it restores or\n // restarts a session (pty-registry.ts); for one release legacy-unsafe.ts reads an entry's `unsafe: true` as \"an\n // older host still runs this agent without permission prompts\" and keeps its guards (REMOVE IN THE NEXT RELEASE).\n /** `--fresh`: start a new conversation even if one exists. First spawn\n * only — a restore always continues. */\n fresh?: boolean;\n /** `--prompt` / `--prompt-file` contents. First spawn only. */\n initialPrompt?: string;\n /** The launching shell's environment. First spawn only and never\n * persisted — it can hold secrets; a restore after reboot uses the\n * host's own environment. */\n env?: Record<string, string>;\n /**\n * What the agent's environment differs by for this session (its account's `CLAUDE_CONFIG_DIR`: set, or `null` = taken\n * out), applied over whatever environment the process starts with — the shell's, or the host's own. Persisted (a\n * folder path is no secret), so a restore keeps it. Additive, no PROTOCOL_VERSION bump: a host from before ignores\n * it and starts the agent on the environment it inherits (`work pty-host --restart` after upgrading).\n */\n agentEnv?: EnvDelta;\n}\n\n/** One entry of the host's restore list: how to respawn a session. The\n * spec as launched, minus `env` (never persisted: it can hold secrets) —\n * except the variables config `hostEnv` names (`keptEnv`), which a restore\n * after a reboot puts back over the host's own environment. */\nexport interface PersistedPty extends SpawnSpec {\n startedAt: string;\n keptEnv?: Record<string, string>;\n}\n\n/** Names that look like secrets (or carry them, as a connection string does): never kept on disk, whatever `hostEnv` says. */\nconst SECRET_NAME =\n /TOKEN|SECRET|PASS|PWD|CREDENTIAL|PRIVATE|KEY|AUTH|BEARER|COOKIE|SESSION|CERT|SIGN|SALT|(^|_)PAT($|_)|DSN|CONN|DATABASE_URL|_URI$|_URL$/i;\n/** Values that carry a password whatever their name: `scheme://user:pass@host`. */\nconst SECRET_VALUE = /:\\/\\/[^/\\s:@]+:[^/\\s@]+@/;\n\n/** Always kept for a restore, whatever `hostEnv` says: the agent's account folder (a path, not a secret — SECRET_VALUE still applies). */\nexport const ALWAYS_KEPT_ENV = ['CLAUDE_CONFIG_DIR'] as const;\n\n/** The variables of `env` to keep for a restore: the ones named (and `ALWAYS_KEPT_ENV`), that exist, and look like neither a secret nor a URL with a password in it. Pure. */\nexport function keepEnv(env: Record<string, string> | undefined, names: readonly string[]): Record<string, string> | undefined {\n if (!env) return undefined;\n const kept = Object.fromEntries(\n [...new Set([...names, ...ALWAYS_KEPT_ENV])]\n .filter((n) => !SECRET_NAME.test(n) && typeof env[n] === 'string' && !SECRET_VALUE.test(env[n]))\n .map((n) => [n, env[n]]),\n );\n return Object.keys(kept).length ? kept : undefined;\n}\nexport type PersistedPtys = Record<string, PersistedPty>;\n\n/** Shape check for a restore-list entry read back from storage. */\nexport function isPersistedPty(x: unknown): x is PersistedPty {\n const e = x as PersistedPty | null;\n return (\n !!e &&\n typeof e === 'object' &&\n typeof e.cwd === 'string' &&\n !!e.tool &&\n typeof e.tool === 'object' &&\n (e.agentEnv === undefined || isEnvDelta(e.agentEnv)) &&\n (e.keptEnv === undefined ||\n (!!e.keptEnv && typeof e.keptEnv === 'object' && Object.values(e.keptEnv).every((v) => typeof v === 'string')))\n );\n}\n\nexport interface PtyInfo {\n id: string;\n cwd: string;\n pid: number;\n exited: boolean;\n cols: number;\n rows: number;\n startedAt: string;\n /** Respawned by the host on startup from the persisted session list\n * (after a crash, `--restart` or reboot), not by a client. */\n restored: boolean;\n /** Clients attached right now (dashboard Terminal tabs, `work attach`).\n * Additive: a host from before it sends none. */\n clients?: number;\n /** When the PTY last printed anything (ISO). Additive, like clients. */\n lastOutputAt?: string;\n /** The tool's binary (`claude`, `opencode`…). Additive, like clients. */\n tool?: string;\n}\n\n/** Client → host frames on the attach WebSocket (text, JSON). Host →\n * client PTY output is sent as binary frames; control frames as text. */\nexport type ClientFrame = { type: 'input'; data: string } | { type: 'resize'; cols: number; rows: number };\n\nexport type HostControlFrame =\n /** Sent once, first, on attach: the serialized screen and the grid it was\n * drawn for. Clients draw it at exactly cols×rows, then resize to their\n * own size (which makes Claude redraw), and only then send input. */\n { type: 'replay'; data: string; cols: number; rows: number } | { type: 'exit'; code: number } | { type: 'error'; message: string };\n\nexport function hostInfoPath(): string {\n return path.join(getConfigDir(), 'pty-host.json');\n}\n\n/** Held by a starting host from \"is one running?\" through writing its\n * discovery file AND restoring the saved sessions — so two hosts can't\n * both start, and a `work remove` racing a start waits for the restore\n * instead of slipping between it (see stopSessionPty). */\nexport function hostStartLockPath(): string {\n return path.join(getConfigDir(), 'pty-host.start.lock');\n}\n\n/** The pre-SQLite restore list. Only the one-time import reads it now. */\nexport function ptySessionsPath(): string {\n return path.join(getConfigDir(), 'pty-sessions.json');\n}\n\nexport function readHostInfo(): HostInfo | null {\n try {\n const raw = JSON.parse(fs.readFileSync(hostInfoPath(), 'utf-8')) as HostInfo;\n if (typeof raw.port === 'number' && typeof raw.token === 'string' && typeof raw.pid === 'number') {\n return raw;\n }\n return null;\n } catch {\n return null;\n }\n}\n"],"mappings":";;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAiBV,IAAM,mBAAmB;AAOzB,IAAM,gBAAgB,CAAC,YAAY,MAAM;AAqDhD,IAAM,cACJ;AAEF,IAAM,eAAe;AAGd,IAAM,kBAAkB,CAAC,mBAAmB;AAG5C,SAAS,QAAQ,KAAyC,OAA8D;AAC7H,MAAI,CAAC,IAAK,QAAO;AACjB,QAAM,OAAO,OAAO;AAAA,IAClB,CAAC,GAAG,oBAAI,IAAI,CAAC,GAAG,OAAO,GAAG,eAAe,CAAC,CAAC,EACxC,OAAO,CAAC,MAAM,CAAC,YAAY,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,MAAM,YAAY,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,EAC9F,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3B;AACA,SAAO,OAAO,KAAK,IAAI,EAAE,SAAS,OAAO;AAC3C;AAIO,SAAS,eAAe,GAA+B;AAC5D,QAAM,IAAI;AACV,SACE,CAAC,CAAC,KACF,OAAO,MAAM,YACb,OAAO,EAAE,QAAQ,YACjB,CAAC,CAAC,EAAE,QACJ,OAAO,EAAE,SAAS,aACjB,EAAE,aAAa,UAAa,WAAW,EAAE,QAAQ,OACjD,EAAE,YAAY,UACZ,CAAC,CAAC,EAAE,WAAW,OAAO,EAAE,YAAY,YAAY,OAAO,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,OAAO,MAAM,QAAQ;AAElH;AAgCO,SAAS,eAAuB;AACrC,SAAO,KAAK,KAAK,aAAa,GAAG,eAAe;AAClD;AAMO,SAAS,oBAA4B;AAC1C,SAAO,KAAK,KAAK,aAAa,GAAG,qBAAqB;AACxD;AAGO,SAAS,kBAA0B;AACxC,SAAO,KAAK,KAAK,aAAa,GAAG,mBAAmB;AACtD;AAEO,SAAS,eAAgC;AAC9C,MAAI;AACF,UAAM,MAAM,KAAK,MAAM,GAAG,aAAa,aAAa,GAAG,OAAO,CAAC;AAC/D,QAAI,OAAO,IAAI,SAAS,YAAY,OAAO,IAAI,UAAU,YAAY,OAAO,IAAI,QAAQ,UAAU;AAChG,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
checkedOutBranch,
|
|
4
|
+
gitDirs
|
|
5
|
+
} from "./chunk-ZG2M4ECW.js";
|
|
6
|
+
import {
|
|
7
|
+
json,
|
|
8
|
+
sessionIdFor,
|
|
9
|
+
tx,
|
|
10
|
+
withDb
|
|
11
|
+
} from "./chunk-RUYTU2WJ.js";
|
|
12
|
+
|
|
13
|
+
// src/core/sessions/session-branches.ts
|
|
14
|
+
import path2 from "path";
|
|
15
|
+
|
|
16
|
+
// src/core/git/reflog.ts
|
|
17
|
+
import fs from "fs";
|
|
18
|
+
import path from "path";
|
|
19
|
+
function parseReflogLine(line) {
|
|
20
|
+
const tab = line.indexOf(" ");
|
|
21
|
+
if (tab < 0) return null;
|
|
22
|
+
const m = /\s(\d+)\s+[+-]\d{4}\s*$/.exec(line.slice(0, tab));
|
|
23
|
+
if (!m) return null;
|
|
24
|
+
const sha = /^[0-9a-f]{40,64} ([0-9a-f]{40,64}) /.exec(line)?.[1];
|
|
25
|
+
return { at: Number(m[1]) * 1e3, message: line.slice(tab + 1).trim(), ...sha && !/^0+$/.test(sha) ? { sha } : {} };
|
|
26
|
+
}
|
|
27
|
+
function looksLikeBranch(name) {
|
|
28
|
+
if (!name || name === "HEAD" || /\s/.test(name)) return false;
|
|
29
|
+
if (/^[0-9a-f]{7,40}$/.test(name)) return false;
|
|
30
|
+
if (/^(?:origin|upstream)\//.test(name) || name.startsWith("refs/remotes/")) return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function branchesFromReflog(lines, opts = {}) {
|
|
34
|
+
const out = /* @__PURE__ */ new Map();
|
|
35
|
+
const firstMove = lines.map((l) => moveOf(l.message)).find((m) => m !== null);
|
|
36
|
+
let on = firstMove?.from ?? opts.start ?? opts.current ?? null;
|
|
37
|
+
const see = (name, at, from) => {
|
|
38
|
+
if (!name || !looksLikeBranch(name)) return;
|
|
39
|
+
const b = out.get(name);
|
|
40
|
+
if (b) b.lastSeen = Math.max(b.lastSeen, at);
|
|
41
|
+
else out.set(name, { name, firstSeen: at, lastSeen: at, ...from && looksLikeBranch(from) ? { movedFrom: from } : {} });
|
|
42
|
+
};
|
|
43
|
+
for (const l of lines) {
|
|
44
|
+
const move = moveOf(l.message);
|
|
45
|
+
if (move) {
|
|
46
|
+
see(on, l.at);
|
|
47
|
+
on = move.to;
|
|
48
|
+
see(on, l.at, move.from);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const back = /returning to refs\/heads\/(.+)$/.exec(l.message);
|
|
52
|
+
if (back) on = back[1].trim();
|
|
53
|
+
see(on, l.at);
|
|
54
|
+
}
|
|
55
|
+
if (opts.current && !out.has(opts.current) && looksLikeBranch(opts.current)) {
|
|
56
|
+
const at = lines.length ? lines[lines.length - 1].at : 0;
|
|
57
|
+
out.set(opts.current, { name: opts.current, firstSeen: at, lastSeen: at });
|
|
58
|
+
}
|
|
59
|
+
return [...out.values()];
|
|
60
|
+
}
|
|
61
|
+
function moveOf(message) {
|
|
62
|
+
const m = /^checkout: moving from (\S+) to (\S+)$/.exec(message);
|
|
63
|
+
return m ? { from: m[1], to: m[2] } : null;
|
|
64
|
+
}
|
|
65
|
+
function createdFromLine(message) {
|
|
66
|
+
const m = /^branch: Created from (\S+)$/.exec(message);
|
|
67
|
+
return m ? m[1] : null;
|
|
68
|
+
}
|
|
69
|
+
function readReflog(file, max = 5e3) {
|
|
70
|
+
let text;
|
|
71
|
+
try {
|
|
72
|
+
text = fs.readFileSync(file, "utf8");
|
|
73
|
+
} catch {
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
const lines = text.split(/\r?\n/);
|
|
77
|
+
return lines.slice(Math.max(0, lines.length - max)).map(parseReflogLine).filter((l) => l !== null);
|
|
78
|
+
}
|
|
79
|
+
function branchCreatedFrom(commonDir, name, movedFrom) {
|
|
80
|
+
const first = readReflog(path.join(commonDir, "logs", "refs", "heads", ...name.split("/")), 50)[0];
|
|
81
|
+
const from = first ? createdFromLine(first.message) : null;
|
|
82
|
+
if (from && from !== "HEAD") return from;
|
|
83
|
+
return movedFrom ?? null;
|
|
84
|
+
}
|
|
85
|
+
function startFromReflog(lines, name, upstream) {
|
|
86
|
+
let start = null;
|
|
87
|
+
let own = /* @__PURE__ */ new Set();
|
|
88
|
+
const moveTo = (sha) => {
|
|
89
|
+
if (own.has(sha)) return;
|
|
90
|
+
start = sha;
|
|
91
|
+
own = /* @__PURE__ */ new Set([sha]);
|
|
92
|
+
};
|
|
93
|
+
for (const l of lines) {
|
|
94
|
+
const onto = /\bonto ([0-9a-f]{40,64})\s*$/.exec(l.message);
|
|
95
|
+
if (onto && /^(?:rebase|pull)\b[^:]*\(finish\)|^rebase finished/.test(l.message)) moveTo(onto[1]);
|
|
96
|
+
else if (l.sha && createdFromLine(l.message) !== null) {
|
|
97
|
+
start = l.sha;
|
|
98
|
+
own = /* @__PURE__ */ new Set([l.sha]);
|
|
99
|
+
} else if (l.sha && /: Fast-forward\b/.test(l.message) && !fromItsOwnCopy(l.message, name, upstream)) moveTo(l.sha);
|
|
100
|
+
else if (l.sha && (/^reset: moving to /.test(l.message) || /^branch: Reset to /.test(l.message))) moveTo(l.sha);
|
|
101
|
+
if (l.sha && start) own.add(l.sha);
|
|
102
|
+
}
|
|
103
|
+
return start;
|
|
104
|
+
}
|
|
105
|
+
function fromItsOwnCopy(message, name, upstream) {
|
|
106
|
+
if (!name) return false;
|
|
107
|
+
const m = /^(merge|pull)\b(.*?):\s*Fast-forward/.exec(message);
|
|
108
|
+
if (!m) return false;
|
|
109
|
+
const words = m[2].trim().split(/\s+/).filter((w) => w && !w.startsWith("-"));
|
|
110
|
+
const ref = words[words.length - 1] ?? (m[1] === "pull" ? upstream ?? void 0 : void 0);
|
|
111
|
+
return !!ref && (ref === name || ref.endsWith(`/${name}`));
|
|
112
|
+
}
|
|
113
|
+
function branchUpstream(commonDir, name) {
|
|
114
|
+
let text;
|
|
115
|
+
try {
|
|
116
|
+
text = fs.readFileSync(path.join(commonDir, "config"), "utf8");
|
|
117
|
+
} catch {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
let inIt = false;
|
|
121
|
+
let merge = null;
|
|
122
|
+
for (const raw of text.split(/\r?\n/)) {
|
|
123
|
+
const line = raw.trim();
|
|
124
|
+
const section = /^\[\s*([A-Za-z0-9.-]+)(?:\s+"((?:[^"\\]|\\.)*)")?\s*\]/.exec(line);
|
|
125
|
+
if (section) {
|
|
126
|
+
inIt = section[1].toLowerCase() === "branch" && section[2]?.replace(/\\(.)/g, "$1") === name;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (!inIt) continue;
|
|
130
|
+
const kv = /^merge\s*=\s*(.*?)\s*$/i.exec(line);
|
|
131
|
+
if (kv) merge = kv[1].replace(/^"(.*)"$/, "$1");
|
|
132
|
+
}
|
|
133
|
+
return merge ? merge.replace(/^refs\/heads\//, "") : null;
|
|
134
|
+
}
|
|
135
|
+
var branchLogFile = (commonDir, name) => path.join(commonDir, "logs", "refs", "heads", ...name.split("/"));
|
|
136
|
+
function branchStart(commonDir, name) {
|
|
137
|
+
return startFromReflog(readReflog(branchLogFile(commonDir, name)), name, branchUpstream(commonDir, name));
|
|
138
|
+
}
|
|
139
|
+
function branchLogChangedSince(commonDir, name, since) {
|
|
140
|
+
const at = Date.parse(since);
|
|
141
|
+
if (!at) return true;
|
|
142
|
+
try {
|
|
143
|
+
return fs.statSync(branchLogFile(commonDir, name)).mtimeMs > at;
|
|
144
|
+
} catch {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function checkoutBranchHistory(checkout, start) {
|
|
149
|
+
const dirs = gitDirs(checkout);
|
|
150
|
+
if (!dirs) return [];
|
|
151
|
+
const lines = readReflog(path.join(dirs.gitDir, "logs", "HEAD"));
|
|
152
|
+
return branchesFromReflog(lines, { start: start ?? null, current: checkedOutBranch(checkout) }).map((b) => {
|
|
153
|
+
const from = branchCreatedFrom(dirs.commonDir, b.name, b.movedFrom);
|
|
154
|
+
const at = branchStart(dirs.commonDir, b.name);
|
|
155
|
+
return { ...b, ...from && from !== b.name ? { from } : {}, ...at ? { start: at } : {} };
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// src/core/sessions/session-branches.ts
|
|
160
|
+
var MAX_BRANCHES_PER_REPO = 30;
|
|
161
|
+
var isIso = (v) => typeof v === "string" && Number.isFinite(Date.parse(v));
|
|
162
|
+
var isSha = (v) => typeof v === "string" && /^[0-9a-f]{40,64}$/.test(v);
|
|
163
|
+
function cleanBranches(raw) {
|
|
164
|
+
const o = raw;
|
|
165
|
+
if (!o || typeof o !== "object" || !Array.isArray(o.branches)) return null;
|
|
166
|
+
const branches = [];
|
|
167
|
+
for (const b of o.branches) {
|
|
168
|
+
const x = b;
|
|
169
|
+
if (!x || typeof x !== "object" || typeof x.repo !== "string" || !x.repo || typeof x.name !== "string" || !x.name) continue;
|
|
170
|
+
if (!isIso(x.firstSeen) || !isIso(x.lastSeen)) continue;
|
|
171
|
+
branches.push({
|
|
172
|
+
repo: x.repo,
|
|
173
|
+
name: x.name,
|
|
174
|
+
firstSeen: x.firstSeen,
|
|
175
|
+
lastSeen: x.lastSeen,
|
|
176
|
+
...typeof x.from === "string" && x.from ? { from: x.from } : {},
|
|
177
|
+
...isIso(x.gone) ? { gone: x.gone } : {},
|
|
178
|
+
...x.merged === true ? { merged: true } : {},
|
|
179
|
+
...x.pushed === true ? { pushed: true } : {},
|
|
180
|
+
...isSha(x.start) ? { start: x.start } : {},
|
|
181
|
+
...isSha(x.tip) ? { tip: x.tip } : {}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
return { branches, ...isIso(o.backfilled) ? { backfilled: o.backfilled } : {} };
|
|
185
|
+
}
|
|
186
|
+
function readSessionBranches(sessionId) {
|
|
187
|
+
const row = withDb(
|
|
188
|
+
(d) => d.prepare("SELECT data FROM session_branches WHERE session_id = ?").get(sessionId)
|
|
189
|
+
);
|
|
190
|
+
return row ? cleanBranches(json.parse(row.data)) : null;
|
|
191
|
+
}
|
|
192
|
+
function allSessionBranches() {
|
|
193
|
+
const rows = withDb(
|
|
194
|
+
(d) => d.prepare("SELECT session_id, data FROM session_branches").all()
|
|
195
|
+
);
|
|
196
|
+
const out = /* @__PURE__ */ new Map();
|
|
197
|
+
for (const r of rows) {
|
|
198
|
+
const b = cleanBranches(json.parse(r.data));
|
|
199
|
+
if (b) out.set(r.session_id, b);
|
|
200
|
+
}
|
|
201
|
+
return out;
|
|
202
|
+
}
|
|
203
|
+
var LAST_SEEN_STEP_MS = 10 * 6e4;
|
|
204
|
+
function withSightings(rec, seen, now, opts = {}) {
|
|
205
|
+
const base = rec ?? { branches: [] };
|
|
206
|
+
let changed = !rec || opts.backfilled === true && !base.backfilled;
|
|
207
|
+
const branches = base.branches.map((b) => ({ ...b }));
|
|
208
|
+
const nowIso = now.toISOString();
|
|
209
|
+
for (const s of seen) {
|
|
210
|
+
const first = s.firstSeen ?? nowIso;
|
|
211
|
+
const last = s.lastSeen ?? nowIso;
|
|
212
|
+
const b = branches.find((x) => x.repo === s.repo && x.name === s.name);
|
|
213
|
+
if (!b) {
|
|
214
|
+
branches.push({
|
|
215
|
+
repo: s.repo,
|
|
216
|
+
name: s.name,
|
|
217
|
+
firstSeen: first,
|
|
218
|
+
lastSeen: last,
|
|
219
|
+
...s.from ? { from: s.from } : {},
|
|
220
|
+
...s.start ? { start: s.start } : {}
|
|
221
|
+
});
|
|
222
|
+
changed = true;
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (Date.parse(first) < Date.parse(b.firstSeen)) {
|
|
226
|
+
b.firstSeen = first;
|
|
227
|
+
changed = true;
|
|
228
|
+
}
|
|
229
|
+
if (Date.parse(last) - Date.parse(b.lastSeen) >= LAST_SEEN_STEP_MS) {
|
|
230
|
+
b.lastSeen = last;
|
|
231
|
+
changed = true;
|
|
232
|
+
}
|
|
233
|
+
if (s.from && !b.from) {
|
|
234
|
+
b.from = s.from;
|
|
235
|
+
changed = true;
|
|
236
|
+
}
|
|
237
|
+
if (s.start && b.start !== s.start) {
|
|
238
|
+
b.start = s.start;
|
|
239
|
+
changed = true;
|
|
240
|
+
}
|
|
241
|
+
if (b.gone && s.lastSeen === void 0) {
|
|
242
|
+
delete b.gone;
|
|
243
|
+
changed = true;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (!changed) return base;
|
|
247
|
+
const kept = [];
|
|
248
|
+
for (const repo of [...new Set(branches.map((b) => b.repo))]) {
|
|
249
|
+
const mine = branches.filter((b) => b.repo === repo);
|
|
250
|
+
const keep = new Set([...mine].sort((a, b) => Date.parse(b.lastSeen) - Date.parse(a.lastSeen)).slice(0, MAX_BRANCHES_PER_REPO));
|
|
251
|
+
kept.push(...mine.filter((b) => keep.has(b)));
|
|
252
|
+
}
|
|
253
|
+
return {
|
|
254
|
+
branches: kept,
|
|
255
|
+
...base.backfilled ? { backfilled: base.backfilled } : opts.backfilled ? { backfilled: nowIso } : {}
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function write(sessionId, rec) {
|
|
259
|
+
withDb((d) => d.prepare("INSERT OR REPLACE INTO session_branches (session_id, data) VALUES (?, ?)").run(sessionId, JSON.stringify(rec)));
|
|
260
|
+
}
|
|
261
|
+
function noteBranches(sessionId, seen, now = /* @__PURE__ */ new Date(), opts = {}) {
|
|
262
|
+
return tx((d) => {
|
|
263
|
+
const row = d.prepare("SELECT data FROM session_branches WHERE session_id = ?").get(sessionId);
|
|
264
|
+
const old = row ? cleanBranches(json.parse(row.data)) : null;
|
|
265
|
+
const next = withSightings(old, seen, now, opts);
|
|
266
|
+
if (next !== old) write(sessionId, next);
|
|
267
|
+
return next;
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function noteBranchFacts(sessionId, facts, now = /* @__PURE__ */ new Date()) {
|
|
271
|
+
tx((d) => {
|
|
272
|
+
const row = d.prepare("SELECT data FROM session_branches WHERE session_id = ?").get(sessionId);
|
|
273
|
+
const rec = row ? cleanBranches(json.parse(row.data)) : null;
|
|
274
|
+
if (!rec) return;
|
|
275
|
+
let changed = false;
|
|
276
|
+
for (const f of facts) {
|
|
277
|
+
const b = rec.branches.find((x) => x.repo === f.repo && x.name === f.name);
|
|
278
|
+
if (!b) continue;
|
|
279
|
+
if (!f.exists && !b.gone) {
|
|
280
|
+
b.gone = now.toISOString();
|
|
281
|
+
changed = true;
|
|
282
|
+
} else if (f.exists && b.gone) {
|
|
283
|
+
delete b.gone;
|
|
284
|
+
changed = true;
|
|
285
|
+
}
|
|
286
|
+
if (f.merged && !b.merged) {
|
|
287
|
+
b.merged = true;
|
|
288
|
+
changed = true;
|
|
289
|
+
}
|
|
290
|
+
if (f.pushed && !b.pushed) {
|
|
291
|
+
b.pushed = true;
|
|
292
|
+
changed = true;
|
|
293
|
+
}
|
|
294
|
+
if (f.exists && f.sha && isSha(f.sha) && b.tip !== f.sha) {
|
|
295
|
+
b.tip = f.sha;
|
|
296
|
+
changed = true;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (changed) write(sessionId, rec);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
var repoNameOf = (s, checkout) => s.isGroup ? path2.basename(checkout) : s.target;
|
|
303
|
+
function sightingStart(stale, read) {
|
|
304
|
+
return stale ? read() : void 0;
|
|
305
|
+
}
|
|
306
|
+
function recordCheckedOutBranches(s, now = /* @__PURE__ */ new Date()) {
|
|
307
|
+
if (s.archivedAt) return null;
|
|
308
|
+
const id = sessionIdFor(s);
|
|
309
|
+
const seen = [];
|
|
310
|
+
const known = readSessionBranches(id);
|
|
311
|
+
for (const p of s.paths) {
|
|
312
|
+
const name = checkedOutBranch(p);
|
|
313
|
+
if (!name) continue;
|
|
314
|
+
const repo = repoNameOf(s, p);
|
|
315
|
+
const had = known?.branches.find((b) => b.repo === repo && b.name === name);
|
|
316
|
+
const dirs = gitDirs(p);
|
|
317
|
+
const from = !had && dirs && branchCreatedFrom(dirs.commonDir, name) || void 0;
|
|
318
|
+
const stale = !had?.start || (dirs ? branchLogChangedSince(dirs.commonDir, name, had.lastSeen) : false);
|
|
319
|
+
const start = sightingStart(stale, () => dirs && branchStart(dirs.commonDir, name) || void 0);
|
|
320
|
+
seen.push({ repo, name, ...from && from !== name ? { from } : {}, ...start ? { start } : {} });
|
|
321
|
+
}
|
|
322
|
+
if (!seen.length) return null;
|
|
323
|
+
if (known && withSightings(known, seen, now) === known) return known;
|
|
324
|
+
return noteBranches(id, seen, now);
|
|
325
|
+
}
|
|
326
|
+
function backfillSessionBranches(s, now = /* @__PURE__ */ new Date()) {
|
|
327
|
+
const id = sessionIdFor(s);
|
|
328
|
+
const seen = [];
|
|
329
|
+
for (const p of s.paths) {
|
|
330
|
+
const repo = repoNameOf(s, p);
|
|
331
|
+
const history = checkoutBranchHistory(p, s.branch);
|
|
332
|
+
if (!history.some((b) => b.name === s.branch) && s.createdAt) {
|
|
333
|
+
seen.push({ repo, name: s.branch, firstSeen: s.createdAt, lastSeen: s.createdAt });
|
|
334
|
+
}
|
|
335
|
+
for (const b of history) {
|
|
336
|
+
seen.push({
|
|
337
|
+
repo,
|
|
338
|
+
name: b.name,
|
|
339
|
+
firstSeen: new Date(b.firstSeen || Date.parse(s.createdAt) || now.getTime()).toISOString(),
|
|
340
|
+
lastSeen: new Date(b.lastSeen || b.firstSeen || now.getTime()).toISOString(),
|
|
341
|
+
...b.from ? { from: b.from } : {},
|
|
342
|
+
...b.start ? { start: b.start } : {}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return noteBranches(id, seen, now, { backfilled: true });
|
|
347
|
+
}
|
|
348
|
+
function wasPushed(rec, repo, name) {
|
|
349
|
+
return !!rec?.branches.some((b) => b.repo === repo && b.name === name && b.pushed);
|
|
350
|
+
}
|
|
351
|
+
var GONE_SHOWN_MS = 3 * 24 * 36e5;
|
|
352
|
+
function branchHidden(b, now, prMerged = false) {
|
|
353
|
+
if (!b.gone || !(b.merged || prMerged)) return false;
|
|
354
|
+
return now - Date.parse(b.gone) >= GONE_SHOWN_MS;
|
|
355
|
+
}
|
|
356
|
+
var BRANCH_WATCH_MS = 30 * 24 * 36e5;
|
|
357
|
+
var MAX_WATCHED_BRANCHES = 5;
|
|
358
|
+
function otherBranchesToWatch(rec, repo, current, now, withinMs) {
|
|
359
|
+
return (rec?.branches ?? []).filter((b) => b.repo === repo && b.name !== current && now - Date.parse(b.lastSeen) <= withinMs && !branchHidden(b, now)).sort((a, b) => Date.parse(b.lastSeen) - Date.parse(a.lastSeen)).slice(0, MAX_WATCHED_BRANCHES).map((b) => b.name);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export {
|
|
363
|
+
branchStart,
|
|
364
|
+
readSessionBranches,
|
|
365
|
+
allSessionBranches,
|
|
366
|
+
noteBranchFacts,
|
|
367
|
+
repoNameOf,
|
|
368
|
+
recordCheckedOutBranches,
|
|
369
|
+
backfillSessionBranches,
|
|
370
|
+
wasPushed,
|
|
371
|
+
branchHidden,
|
|
372
|
+
BRANCH_WATCH_MS,
|
|
373
|
+
MAX_WATCHED_BRANCHES,
|
|
374
|
+
otherBranchesToWatch
|
|
375
|
+
};
|
|
376
|
+
//# sourceMappingURL=chunk-2ZQRD73B.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/sessions/session-branches.ts","../src/core/git/reflog.ts"],"sourcesContent":["import path from 'node:path';\nimport { json, tx, withDb } from '../platform/db.js';\nimport { checkedOutBranch, gitDirs } from '../git/git-head.js';\nimport { branchCreatedFrom, branchLogChangedSince, branchStart, checkoutBranchHistory } from '../git/reflog.js';\nimport type { WorktreeSession } from './session-types.js';\nimport { sessionIdFor } from './session-id.js';\n\n/**\n * Every branch a session's repos have been on, recorded as it goes — so the\n * dashboard shows the work on all of them without asking git each time.\n * Claude often moves on in the same worktree: a PR merges, and the next fix\n * is a new branch made from origin/dev, then another. Only the checked-out\n * branch was ever looked at, so the earlier one's commits and PR (and the\n * first new one's, once a second came) vanished from the session.\n *\n * Per session in state.db `session_branches` (schema v12, gone with the\n * session: purgeSessionRows): each repo's branches with when they were first\n * and last checked out, and where they were made from when the reflog says.\n * Written at each turn's end (the turn-end hook reads HEAD files, no git),\n * when work checks a branch out (setupWorktree, Update), and once from the\n * reflog for a session recorded before (`backfilled`).\n */\n\nexport interface RecordedBranch {\n /** The repo, as the session names it (Ship and the PR watch): a group's folder, else the target. */\n repo: string;\n name: string;\n /** ISO. */\n firstSeen: string;\n lastSeen: string;\n /** The branch or ref it was made from (`origin/dev`), when known. */\n from?: string;\n /** When it was first seen deleted (the branch facts' look): a merged one stops showing after a while. */\n gone?: string;\n /** It was seen merged (its commits in main, or its PR merged): kept so a deleted one still reads merged. */\n merged?: true;\n /** It was seen on origin once: its PR is asked about even after origin's copy was deleted (a merge's tidy-up). */\n pushed?: true;\n /** The commit it was made at (its reflog's first line): its own work is what it has beyond it, merged or not. */\n start?: string;\n /** Its tip when last looked at (the branch facts): what the Diff tab shows of it once it is deleted. */\n tip?: string;\n}\n\nexport interface SessionBranches {\n branches: RecordedBranch[];\n /** When its reflog was read for the branches before the record began (once per session). */\n backfilled?: string;\n}\n\n/** Most branches kept per repo: the ones last seen longest ago go. */\nexport const MAX_BRANCHES_PER_REPO = 30;\n\nconst isIso = (v: unknown): v is string => typeof v === 'string' && Number.isFinite(Date.parse(v));\nconst isSha = (v: unknown): v is string => typeof v === 'string' && /^[0-9a-f]{40,64}$/.test(v);\n\n/** A stored record, shape-checked; entries that don't hold up are dropped, not the record. */\nexport function cleanBranches(raw: unknown): SessionBranches | null {\n const o = raw as { branches?: unknown; backfilled?: unknown } | null;\n if (!o || typeof o !== 'object' || !Array.isArray(o.branches)) return null;\n const branches: RecordedBranch[] = [];\n for (const b of o.branches as unknown[]) {\n const x = b as Partial<Record<keyof RecordedBranch, unknown>> | null;\n if (!x || typeof x !== 'object' || typeof x.repo !== 'string' || !x.repo || typeof x.name !== 'string' || !x.name) continue;\n if (!isIso(x.firstSeen) || !isIso(x.lastSeen)) continue;\n branches.push({\n repo: x.repo,\n name: x.name,\n firstSeen: x.firstSeen,\n lastSeen: x.lastSeen,\n ...(typeof x.from === 'string' && x.from ? { from: x.from } : {}),\n ...(isIso(x.gone) ? { gone: x.gone } : {}),\n ...(x.merged === true ? { merged: true as const } : {}),\n ...(x.pushed === true ? { pushed: true as const } : {}),\n ...(isSha(x.start) ? { start: x.start } : {}),\n ...(isSha(x.tip) ? { tip: x.tip } : {}),\n });\n }\n return { branches, ...(isIso(o.backfilled) ? { backfilled: o.backfilled } : {}) };\n}\n\nexport function readSessionBranches(sessionId: string): SessionBranches | null {\n const row = withDb(\n (d) => d.prepare('SELECT data FROM session_branches WHERE session_id = ?').get(sessionId) as { data: string } | undefined,\n );\n return row ? cleanBranches(json.parse(row.data)) : null;\n}\n\n/** Every session's record, in one query (the sessions list reads them per build). */\nexport function allSessionBranches(): Map<string, SessionBranches> {\n const rows = withDb(\n (d) => d.prepare('SELECT session_id, data FROM session_branches').all() as Array<{ session_id: string; data: string }>,\n );\n const out = new Map<string, SessionBranches>();\n for (const r of rows) {\n const b = cleanBranches(json.parse(r.data));\n if (b) out.set(r.session_id, b);\n }\n return out;\n}\n\n/** A branch seen checked out (or found in the reflog): its repo, name, and when. */\nexport interface BranchSighting {\n repo: string;\n name: string;\n /** ISO; default now. */\n firstSeen?: string;\n lastSeen?: string;\n from?: string;\n /** The commit it was made at, when its reflog says. */\n start?: string;\n}\n\n/** lastSeen is written again only when it moved this much: a turn's end needn't write the row every time. */\nexport const LAST_SEEN_STEP_MS = 10 * 60_000;\n\n/**\n * The record with these sightings: a new branch appended, a known one's first\n * and last sighting widened, its `from` filled in when it had none; a branch\n * seen again un-gone. Returns the record unchanged (the same object) when\n * nothing worth a write moved. Pure.\n */\nexport function withSightings(\n rec: SessionBranches | null,\n seen: BranchSighting[],\n now: Date,\n opts: { backfilled?: boolean } = {},\n): SessionBranches {\n const base: SessionBranches = rec ?? { branches: [] };\n let changed = !rec || (opts.backfilled === true && !base.backfilled);\n const branches = base.branches.map((b) => ({ ...b }));\n const nowIso = now.toISOString();\n for (const s of seen) {\n const first = s.firstSeen ?? nowIso;\n const last = s.lastSeen ?? nowIso;\n const b = branches.find((x) => x.repo === s.repo && x.name === s.name);\n if (!b) {\n branches.push({\n repo: s.repo,\n name: s.name,\n firstSeen: first,\n lastSeen: last,\n ...(s.from ? { from: s.from } : {}),\n ...(s.start ? { start: s.start } : {}),\n });\n changed = true;\n continue;\n }\n if (Date.parse(first) < Date.parse(b.firstSeen)) {\n b.firstSeen = first;\n changed = true;\n }\n if (Date.parse(last) - Date.parse(b.lastSeen) >= LAST_SEEN_STEP_MS) {\n b.lastSeen = last;\n changed = true;\n }\n if (s.from && !b.from) {\n b.from = s.from;\n changed = true;\n }\n // Where its own work begins moves when it is rebased or fast-forwarded: the newest reading wins.\n if (s.start && b.start !== s.start) {\n b.start = s.start;\n changed = true;\n }\n if (b.gone && s.lastSeen === undefined) {\n // Checked out now: it exists again.\n delete b.gone;\n changed = true;\n }\n }\n if (!changed) return base;\n // Per repo, the most recent MAX_BRANCHES_PER_REPO.\n const kept: RecordedBranch[] = [];\n for (const repo of [...new Set(branches.map((b) => b.repo))]) {\n const mine = branches.filter((b) => b.repo === repo);\n const keep = new Set([...mine].sort((a, b) => Date.parse(b.lastSeen) - Date.parse(a.lastSeen)).slice(0, MAX_BRANCHES_PER_REPO));\n kept.push(...mine.filter((b) => keep.has(b)));\n }\n return {\n branches: kept,\n ...(base.backfilled ? { backfilled: base.backfilled } : opts.backfilled ? { backfilled: nowIso } : {}),\n };\n}\n\nfunction write(sessionId: string, rec: SessionBranches): void {\n withDb((d) => d.prepare('INSERT OR REPLACE INTO session_branches (session_id, data) VALUES (?, ?)').run(sessionId, JSON.stringify(rec)));\n}\n\n/** Record sightings, in one transaction over the row as it is now. Returns the record after; writes only when something moved. */\nexport function noteBranches(\n sessionId: string,\n seen: BranchSighting[],\n now = new Date(),\n opts: { backfilled?: boolean } = {},\n): SessionBranches {\n return tx((d) => {\n const row = d.prepare('SELECT data FROM session_branches WHERE session_id = ?').get(sessionId) as { data: string } | undefined;\n const old = row ? cleanBranches(json.parse(row.data)) : null;\n const next = withSightings(old, seen, now, opts);\n if (next !== old) write(sessionId, next);\n return next;\n });\n}\n\n/**\n * What the branch facts saw of recorded branches: deleted (gone, from when it\n * was first seen so), or merged. One transaction; writes only a change.\n */\nexport function noteBranchFacts(\n sessionId: string,\n facts: Array<{ repo: string; name: string; exists: boolean; merged: boolean; pushed?: boolean; sha?: string | null }>,\n now = new Date(),\n): void {\n tx((d) => {\n const row = d.prepare('SELECT data FROM session_branches WHERE session_id = ?').get(sessionId) as { data: string } | undefined;\n const rec = row ? cleanBranches(json.parse(row.data)) : null;\n if (!rec) return;\n let changed = false;\n for (const f of facts) {\n const b = rec.branches.find((x) => x.repo === f.repo && x.name === f.name);\n if (!b) continue;\n if (!f.exists && !b.gone) {\n b.gone = now.toISOString();\n changed = true;\n } else if (f.exists && b.gone) {\n delete b.gone;\n changed = true;\n }\n if (f.merged && !b.merged) {\n b.merged = true;\n changed = true;\n }\n if (f.pushed && !b.pushed) {\n b.pushed = true;\n changed = true;\n }\n if (f.exists && f.sha && isSha(f.sha) && b.tip !== f.sha) {\n b.tip = f.sha;\n changed = true;\n }\n }\n if (changed) write(sessionId, rec);\n });\n}\n\n/** A session's repo as Ship and the PR watch name it: a group's folder, a single repo's target. */\nexport const repoNameOf = (s: Pick<WorktreeSession, 'isGroup' | 'target'>, checkout: string): string =>\n s.isGroup ? path.basename(checkout) : s.target;\n\n/**\n * The start a turn's sighting carries: only one read now, when the branch's reflog moved (`stale`) — never the\n * record's own, read before the write: carried into it, that would overwrite a newer start another process stored\n * meanwhile (the write is its own transaction, and a sighting with no start keeps the stored one). Pure but for `read`.\n */\nexport function sightingStart(stale: boolean, read: () => string | undefined): string | undefined {\n return stale ? read() : undefined;\n}\n\n/**\n * Record the branch each of the session's repos has checked out now (HEAD\n * files: no git), and for a branch new to the record, where it was made from\n * (its reflog's first line). The turn-end hook's step; cheap. Returns the\n * record after, or null when nothing is checked out on a branch.\n */\nexport function recordCheckedOutBranches(\n s: Pick<WorktreeSession, 'target' | 'branch' | 'isGroup' | 'paths' | 'archivedAt'>,\n now = new Date(),\n): SessionBranches | null {\n if (s.archivedAt) return null;\n const id = sessionIdFor(s);\n const seen: BranchSighting[] = [];\n const known = readSessionBranches(id);\n for (const p of s.paths) {\n const name = checkedOutBranch(p);\n if (!name) continue;\n const repo = repoNameOf(s, p);\n const had = known?.branches.find((b) => b.repo === repo && b.name === name);\n const dirs = gitDirs(p);\n // A new branch: where it came from. Every turn: where its own work begins (a rebase or fast-forward moves it),\n // kept so the Diff tab still has it once the branch — and its reflog — are deleted.\n const from = (!had && dirs && branchCreatedFrom(dirs.commonDir, name)) || undefined;\n // Read only when its reflog was written since the record last saw it (a stat): a repo's own main has a reflog\n // of thousands of lines, and this runs at every turn's end of every Claude.\n const stale = !had?.start || (dirs ? branchLogChangedSince(dirs.commonDir, name, had.lastSeen) : false);\n const start = sightingStart(stale, () => (dirs && branchStart(dirs.commonDir, name)) || undefined);\n seen.push({ repo, name, ...(from && from !== name ? { from } : {}), ...(start ? { start } : {}) });\n }\n if (!seen.length) return null;\n // Nothing moved (the usual turn end): no write transaction at all.\n if (known && withSightings(known, seen, now) === known) return known;\n return noteBranches(id, seen, now);\n}\n\n/**\n * Once per session recorded before the list began: the branches its repos'\n * reflogs show they were on (the session's own branch included), merged into\n * the record and marked backfilled. File reads only; run it in the\n * background, never on a request's path. Returns the record after.\n */\nexport function backfillSessionBranches(\n s: Pick<WorktreeSession, 'target' | 'branch' | 'isGroup' | 'paths' | 'createdAt'>,\n now = new Date(),\n): SessionBranches {\n const id = sessionIdFor(s);\n const seen: BranchSighting[] = [];\n for (const p of s.paths) {\n const repo = repoNameOf(s, p);\n const history = checkoutBranchHistory(p, s.branch);\n if (!history.some((b) => b.name === s.branch) && s.createdAt) {\n // The session's own branch, even when its reflog is gone or cut short.\n seen.push({ repo, name: s.branch, firstSeen: s.createdAt, lastSeen: s.createdAt });\n }\n for (const b of history) {\n seen.push({\n repo,\n name: b.name,\n firstSeen: new Date(b.firstSeen || Date.parse(s.createdAt) || now.getTime()).toISOString(),\n lastSeen: new Date(b.lastSeen || b.firstSeen || now.getTime()).toISOString(),\n ...(b.from ? { from: b.from } : {}),\n ...(b.start ? { start: b.start } : {}),\n });\n }\n }\n return noteBranches(id, seen, now, { backfilled: true });\n}\n\n/** A recorded branch that was seen on origin once (its PR is worth asking about even with origin's copy gone). */\nexport function wasPushed(rec: SessionBranches | null | undefined, repo: string, name: string): boolean {\n return !!rec?.branches.some((b) => b.repo === repo && b.name === name && b.pushed);\n}\n\n/** How long a merged branch that was deleted goes on showing. */\nexport const GONE_SHOWN_MS = 3 * 24 * 3600_000;\n\n/** A recorded branch no longer worth showing: deleted, merged, and that a while ago (kept in the record). */\nexport function branchHidden(b: Pick<RecordedBranch, 'gone' | 'merged'>, now: number, prMerged = false): boolean {\n if (!b.gone || !(b.merged || prMerged)) return false;\n return now - Date.parse(b.gone) >= GONE_SHOWN_MS;\n}\n\n/** How long after it was last checked out another branch is still looked at (the PR watch's window). */\nexport const BRANCH_WATCH_MS = 30 * 24 * 3600_000;\n\n/** At most this many other branches per repo are asked about (git facts, the host's PR). */\nexport const MAX_WATCHED_BRANCHES = 5;\n\n/**\n * A repo's recorded branches other than the one checked out that are worth a\n * look: seen within `withinMs`, not hidden, newest first, at most\n * MAX_WATCHED_BRANCHES. Pure.\n */\nexport function otherBranchesToWatch(\n rec: SessionBranches | null | undefined,\n repo: string,\n current: string | null,\n now: number,\n withinMs: number,\n): string[] {\n return (rec?.branches ?? [])\n .filter((b) => b.repo === repo && b.name !== current && now - Date.parse(b.lastSeen) <= withinMs && !branchHidden(b, now))\n .sort((a, b) => Date.parse(b.lastSeen) - Date.parse(a.lastSeen))\n .slice(0, MAX_WATCHED_BRANCHES)\n .map((b) => b.name);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport { checkedOutBranch, gitDirs } from './git-head.js';\n\n/**\n * Which branches a checkout has been on, read from its reflog files — no\n * `git` process. A checkout's own `logs/HEAD` has a line per move of HEAD\n * (`checkout: moving from feat/x to fix/y`, a commit, a reset…), each with\n * its time; a branch's own reflog in the shared folder\n * (`logs/refs/heads/<name>`) starts with where it was made from\n * (`branch: Created from origin/dev`). The parsing is pure; the reads are\n * small files.\n */\n\nexport interface ReflogLine {\n /** When, in ms. */\n at: number;\n /** What git wrote after the tab: `checkout: moving from a to b`, `commit: …`. */\n message: string;\n /** The commit it moved to (the line's second object name), when the line has one. */\n sha?: string;\n}\n\n/** `<old> <new> Name <email> 1793784300 +0100\\t<message>` → its time and message; null for a line that isn't one. */\nexport function parseReflogLine(line: string): ReflogLine | null {\n const tab = line.indexOf('\\t');\n if (tab < 0) return null;\n const m = /\\s(\\d+)\\s+[+-]\\d{4}\\s*$/.exec(line.slice(0, tab));\n if (!m) return null;\n const sha = /^[0-9a-f]{40,64} ([0-9a-f]{40,64}) /.exec(line)?.[1];\n return { at: Number(m[1]) * 1000, message: line.slice(tab + 1).trim(), ...(sha && !/^0+$/.test(sha) ? { sha } : {}) };\n}\n\n/** A checkout target that names a branch: not a commit (detached), not a remote-tracking ref, not HEAD. */\nexport function looksLikeBranch(name: string): boolean {\n if (!name || name === 'HEAD' || /\\s/.test(name)) return false;\n if (/^[0-9a-f]{7,40}$/.test(name)) return false;\n if (/^(?:origin|upstream)\\//.test(name) || name.startsWith('refs/remotes/')) return false;\n return true;\n}\n\nexport interface ReflogBranch {\n name: string;\n /** When HEAD first came to it (ms): its first sighting in this reflog. */\n firstSeen: number;\n /** When HEAD was last on it (ms): the last line written while it was checked out. */\n lastSeen: number;\n /** The branch HEAD left to come to it, the first time. */\n movedFrom?: string;\n}\n\n/**\n * The branches a checkout's HEAD reflog shows it on, in the order it came to\n * them. `start`: the branch it was on before the first move the reflog shows\n * (the session's own); `current`: what HEAD names now — a reflog cut short\n * still has it. Pure.\n */\nexport function branchesFromReflog(lines: ReflogLine[], opts: { start?: string | null; current?: string | null } = {}): ReflogBranch[] {\n const out = new Map<string, ReflogBranch>();\n const firstMove = lines.map((l) => moveOf(l.message)).find((m) => m !== null);\n // Before the first move HEAD was on the branch it moved from — the start branch, when the reflog has no move.\n let on: string | null = firstMove?.from ?? opts.start ?? opts.current ?? null;\n const see = (name: string | null, at: number, from?: string) => {\n if (!name || !looksLikeBranch(name)) return;\n const b = out.get(name);\n if (b) b.lastSeen = Math.max(b.lastSeen, at);\n else out.set(name, { name, firstSeen: at, lastSeen: at, ...(from && looksLikeBranch(from) ? { movedFrom: from } : {}) });\n };\n for (const l of lines) {\n const move = moveOf(l.message);\n if (move) {\n see(on, l.at);\n on = move.to;\n see(on, l.at, move.from);\n continue;\n }\n // `rebase (finish): returning to refs/heads/x`: back on x after a rebase's detached steps.\n const back = /returning to refs\\/heads\\/(.+)$/.exec(l.message);\n if (back) on = back[1].trim();\n see(on, l.at);\n }\n if (opts.current && !out.has(opts.current) && looksLikeBranch(opts.current)) {\n const at = lines.length ? lines[lines.length - 1].at : 0;\n out.set(opts.current, { name: opts.current, firstSeen: at, lastSeen: at });\n }\n return [...out.values()];\n}\n\nfunction moveOf(message: string): { from: string; to: string } | null {\n const m = /^checkout: moving from (\\S+) to (\\S+)$/.exec(message);\n return m ? { from: m[1], to: m[2] } : null;\n}\n\n/** `branch: Created from origin/dev` (a branch's own reflog, its first line) → `origin/dev`; null when it says nothing of the kind. */\nexport function createdFromLine(message: string): string | null {\n const m = /^branch: Created from (\\S+)$/.exec(message);\n return m ? m[1] : null;\n}\n\n/** Lines of a reflog file, oldest first; [] when it isn't there. At most the last `max` lines (a reflog grows for good). */\nexport function readReflog(file: string, max = 5000): ReflogLine[] {\n let text: string;\n try {\n text = fs.readFileSync(file, 'utf8');\n } catch {\n return [];\n }\n const lines = text.split(/\\r?\\n/);\n return lines\n .slice(Math.max(0, lines.length - max))\n .map(parseReflogLine)\n .filter((l): l is ReflogLine => l !== null);\n}\n\n/**\n * Where a branch was made from, as its own reflog says (`origin/dev`), or —\n * made from HEAD (`Created from HEAD`) — the branch HEAD left for it\n * (`movedFrom`). Null when neither says. Reads one small file.\n */\nexport function branchCreatedFrom(commonDir: string, name: string, movedFrom?: string): string | null {\n const first = readReflog(path.join(commonDir, 'logs', 'refs', 'heads', ...name.split('/')), 50)[0];\n const from = first ? createdFromLine(first.message) : null;\n if (from && from !== 'HEAD') return from;\n return movedFrom ?? null;\n}\n\n/**\n * Where a branch's own work begins, from its own reflog: the newest point it was put onto from outside — made\n * (`branch: Created from …`), fast-forwarded (`merge origin/dev: Fast-forward`, `pull: Fast-forward`), reset,\n * or rebased (`rebase (finish): … onto <sha>`: what it was replayed on). Its own work is what it has beyond that,\n * along its first parents, even once it is merged into what it was made from; a merge of its base into it isn't\n * a new start (first parents step over it). Null when the reflog says none (cut short, or never made here). Pure.\n *\n * Reported: a branch made from dev, fast-forwarded and rebased onto newer dev before its first commit listed dev's\n * own merges as its work, read from where it was made.\n *\n * Moves within its own work aren't from outside: a reset or rebase onto a commit the branch itself was at since its\n * start (`reset --soft HEAD~1`, `rebase -i HEAD~2`: a squash) keeps the start, or its earlier commits would drop out\n * of its work; and so does a fast-forward from its own copy (`merge origin/<name>`, `pull origin <name>`: a\n * colleague's commits on the same branch are its work too). `name`: the branch's own name; without it every\n * fast-forward moves the start.\n */\nexport function startFromReflog(lines: ReflogLine[], name?: string, upstream?: string | null): string | null {\n let start: string | null = null;\n // The commits the branch itself was at since its start: a move back onto one of them is within its own work.\n let own = new Set<string>();\n const moveTo = (sha: string) => {\n if (own.has(sha)) return;\n start = sha;\n own = new Set([sha]);\n };\n for (const l of lines) {\n const onto = /\\bonto ([0-9a-f]{40,64})\\s*$/.exec(l.message);\n // `rebase (finish)`, `pull --rebase (finish)`, and `pull --quiet (finish)` — a plain pull with pull.rebase set\n // (work's own re-entry pull) — all replay the branch onto what follows `onto`.\n if (onto && /^(?:rebase|pull)\\b[^:]*\\(finish\\)|^rebase finished/.test(l.message)) moveTo(onto[1]);\n else if (l.sha && createdFromLine(l.message) !== null) {\n start = l.sha;\n own = new Set([l.sha]);\n } else if (l.sha && /: Fast-forward\\b/.test(l.message) && !fromItsOwnCopy(l.message, name, upstream)) moveTo(l.sha);\n else if (l.sha && (/^reset: moving to /.test(l.message) || /^branch: Reset to /.test(l.message))) moveTo(l.sha);\n if (l.sha && start) own.add(l.sha);\n }\n return start;\n}\n\n/**\n * `merge origin/fix/x: Fast-forward`, `pull origin fix/x: Fast-forward`: the branch's own copy brought in. A pull\n * that names no ref (`pull: Fast-forward`, `pull --quiet: Fast-forward` — options aren't refs) took its upstream:\n * its own copy when that is the branch of its own name (`upstream`, branch.<name>.merge), not when it tracks\n * origin/main as work's new branches do.\n */\nfunction fromItsOwnCopy(message: string, name: string | undefined, upstream?: string | null): boolean {\n if (!name) return false;\n const m = /^(merge|pull)\\b(.*?):\\s*Fast-forward/.exec(message);\n if (!m) return false;\n const words = m[2]\n .trim()\n .split(/\\s+/)\n .filter((w) => w && !w.startsWith('-'));\n const ref = words[words.length - 1] ?? (m[1] === 'pull' ? (upstream ?? undefined) : undefined);\n return !!ref && (ref === name || ref.endsWith(`/${name}`));\n}\n\n/**\n * The branch a branch pulls from (`branch.<name>.merge`, `refs/heads/` taken off), read from the repo's config\n * file — no git. Null when it has none or the file can't be read.\n */\nexport function branchUpstream(commonDir: string, name: string): string | null {\n let text: string;\n try {\n text = fs.readFileSync(path.join(commonDir, 'config'), 'utf8');\n } catch {\n return null;\n }\n let inIt = false;\n let merge: string | null = null;\n for (const raw of text.split(/\\r?\\n/)) {\n const line = raw.trim();\n const section = /^\\[\\s*([A-Za-z0-9.-]+)(?:\\s+\"((?:[^\"\\\\]|\\\\.)*)\")?\\s*\\]/.exec(line);\n if (section) {\n inIt = section[1].toLowerCase() === 'branch' && section[2]?.replace(/\\\\(.)/g, '$1') === name;\n continue;\n }\n if (!inIt) continue;\n const kv = /^merge\\s*=\\s*(.*?)\\s*$/i.exec(line);\n if (kv) merge = kv[1].replace(/^\"(.*)\"$/, '$1'); // the last one wins, as git reads it\n }\n return merge ? merge.replace(/^refs\\/heads\\//, '') : null;\n}\n\n/** A branch's own reflog file. */\nconst branchLogFile = (commonDir: string, name: string): string => path.join(commonDir, 'logs', 'refs', 'heads', ...name.split('/'));\n\n/** startFromReflog over a branch's reflog file. Reads one small file. */\nexport function branchStart(commonDir: string, name: string): string | null {\n return startFromReflog(readReflog(branchLogFile(commonDir, name)), name, branchUpstream(commonDir, name));\n}\n\n/**\n * Whether a branch's reflog was written after `since` (ISO): what it says may have moved. True when it can't be\n * told (no file, a bad date). A stat, no read: the turn-end hook asks it for every repo of every session.\n */\nexport function branchLogChangedSince(commonDir: string, name: string, since: string): boolean {\n const at = Date.parse(since);\n if (!at) return true;\n try {\n return fs.statSync(branchLogFile(commonDir, name)).mtimeMs > at;\n } catch {\n return true;\n }\n}\n\n/**\n * The branches a checkout has been on (its HEAD reflog), each with where it\n * was made from when its own reflog says, and the commit it was made at. File reads only. `start`: the\n * session's branch. [] when it isn't a checkout.\n */\nexport function checkoutBranchHistory(checkout: string, start?: string | null): Array<ReflogBranch & { from?: string; start?: string }> {\n const dirs = gitDirs(checkout);\n if (!dirs) return [];\n const lines = readReflog(path.join(dirs.gitDir, 'logs', 'HEAD'));\n return branchesFromReflog(lines, { start: start ?? null, current: checkedOutBranch(checkout) }).map((b) => {\n const from = branchCreatedFrom(dirs.commonDir, b.name, b.movedFrom);\n const at = branchStart(dirs.commonDir, b.name);\n return { ...b, ...(from && from !== b.name ? { from } : {}), ...(at ? { start: at } : {}) };\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,WAAU;;;ACAjB,OAAO,QAAQ;AACf,OAAO,UAAU;AAuBV,SAAS,gBAAgB,MAAiC;AAC/D,QAAM,MAAM,KAAK,QAAQ,GAAI;AAC7B,MAAI,MAAM,EAAG,QAAO;AACpB,QAAM,IAAI,0BAA0B,KAAK,KAAK,MAAM,GAAG,GAAG,CAAC;AAC3D,MAAI,CAAC,EAAG,QAAO;AACf,QAAM,MAAM,sCAAsC,KAAK,IAAI,IAAI,CAAC;AAChE,SAAO,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC,IAAI,KAAM,SAAS,KAAK,MAAM,MAAM,CAAC,EAAE,KAAK,GAAG,GAAI,OAAO,CAAC,OAAO,KAAK,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC,EAAG;AACtH;AAGO,SAAS,gBAAgB,MAAuB;AACrD,MAAI,CAAC,QAAQ,SAAS,UAAU,KAAK,KAAK,IAAI,EAAG,QAAO;AACxD,MAAI,mBAAmB,KAAK,IAAI,EAAG,QAAO;AAC1C,MAAI,yBAAyB,KAAK,IAAI,KAAK,KAAK,WAAW,eAAe,EAAG,QAAO;AACpF,SAAO;AACT;AAkBO,SAAS,mBAAmB,OAAqB,OAA2D,CAAC,GAAmB;AACrI,QAAM,MAAM,oBAAI,IAA0B;AAC1C,QAAM,YAAY,MAAM,IAAI,CAAC,MAAM,OAAO,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,MAAM,IAAI;AAE5E,MAAI,KAAoB,WAAW,QAAQ,KAAK,SAAS,KAAK,WAAW;AACzE,QAAM,MAAM,CAAC,MAAqB,IAAY,SAAkB;AAC9D,QAAI,CAAC,QAAQ,CAAC,gBAAgB,IAAI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,CAAC,GAAG,MAAM,KAAK,MAAM,EAAE,QAAQ,IAAI,KAAK,MAAM,EAAE,QAAQ,CAAC,EAC9D,MAAM,GAAG,oBAAoB,EAC7B,IAAI,CAAC,MAAM,EAAE,IAAI;AACtB;","names":["path","path"]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
json,
|
|
4
4
|
tx,
|
|
5
5
|
withDb
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RUYTU2WJ.js";
|
|
7
7
|
|
|
8
8
|
// src/core/rail/session-notes.ts
|
|
9
9
|
var MAX_NOTE_CHARS = 2e4;
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
saveNote,
|
|
52
52
|
appendNote
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-33XSEAHO.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-LNHSBM4L.js";
|
|
5
5
|
import {
|
|
6
6
|
knownAgents
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N4W34U3I.js";
|
|
8
8
|
|
|
9
9
|
// src/commands/install-skills.ts
|
|
10
10
|
import chalk from "chalk";
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
runInstallSkills,
|
|
45
45
|
installSkillsCommand
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-4CNBSPNL.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getCurrentBranch,
|
|
4
4
|
getMainRepoRoot,
|
|
5
5
|
getWorktreeRoot
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DCCC7LEP.js";
|
|
7
7
|
|
|
8
8
|
// src/core/worktree/resolve.ts
|
|
9
9
|
import fs from "fs";
|
|
@@ -120,4 +120,4 @@ export {
|
|
|
120
120
|
getAllTargetNames,
|
|
121
121
|
resolveFromCwd
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=chunk-
|
|
123
|
+
//# sourceMappingURL=chunk-4K4S53KX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["declare const __WORK2_VERSION__: string;\n\n/**\n * Inlined at build time from package.json#version. When running via `tsx`\n * (dev mode) the define isn't applied, so we fall back to a placeholder.\n */\nexport const VERSION: string = typeof __WORK2_VERSION__ !== 'undefined' ? __WORK2_VERSION__ : 'dev';\n"],"mappings":";;;AAMO,IAAM,UAAkB,OAA2C,
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["declare const __WORK2_VERSION__: string;\n\n/**\n * Inlined at build time from package.json#version. When running via `tsx`\n * (dev mode) the define isn't applied, so we fall back to a placeholder.\n */\nexport const VERSION: string = typeof __WORK2_VERSION__ !== 'undefined' ? __WORK2_VERSION__ : 'dev';\n"],"mappings":";;;AAMO,IAAM,UAAkB,OAA2C,WAAoB;","names":[]}
|