@moberg_hr/work-tree 2.7.0 → 2.8.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-SOJAHTL5.js +245 -0
- package/dist/account-SOJAHTL5.js.map +1 -0
- package/dist/{add-repo-E7KWNJJV.js → add-repo-B4ITRH4Q.js} +26 -22
- package/dist/{add-repo-E7KWNJJV.js.map → add-repo-B4ITRH4Q.js.map} +1 -1
- package/dist/{answer-2CBOWCL5.js → answer-JHK4SZAH.js} +15 -12
- package/dist/{answer-2CBOWCL5.js.map → answer-JHK4SZAH.js.map} +1 -1
- package/dist/{attach-AWRY4LSI.js → attach-3IU7O7YE.js} +19 -16
- package/dist/{attach-AWRY4LSI.js.map → attach-3IU7O7YE.js.map} +1 -1
- package/dist/bin.js +7 -5
- package/dist/bin.js.map +1 -1
- package/dist/{block-JTJX5QIO.js → block-JTA7ULQS.js} +15 -12
- package/dist/{block-JTJX5QIO.js.map → block-JTA7ULQS.js.map} +1 -1
- package/dist/{broadcast-3SF55HA6.js → broadcast-JKPTCLUZ.js} +12 -9
- package/dist/{broadcast-3SF55HA6.js.map → broadcast-JKPTCLUZ.js.map} +1 -1
- package/dist/{catchup-2WNHEMLD.js → catchup-MT55LLAS.js} +18 -15
- package/dist/{catchup-2WNHEMLD.js.map → catchup-MT55LLAS.js.map} +1 -1
- package/dist/{chunk-TPPTL7LA.js → chunk-26MWJLDS.js} +3 -3
- package/dist/{chunk-ZNXACRZ5.js → chunk-27BDXWSY.js} +9 -5
- package/dist/{chunk-ZNXACRZ5.js.map → chunk-27BDXWSY.js.map} +1 -1
- package/dist/{chunk-5GA3PFK5.js → chunk-27UC5NXT.js} +13 -9
- package/dist/chunk-27UC5NXT.js.map +1 -0
- package/dist/{chunk-KUVL75PL.js → chunk-2MQWAQ2D.js} +8 -8
- package/dist/{chunk-O34CKSE4.js → chunk-3N3UQEC4.js} +2 -2
- package/dist/{chunk-EPNYZJMM.js → chunk-3TN77GOI.js} +9 -6
- package/dist/chunk-3TN77GOI.js.map +1 -0
- package/dist/{chunk-J5CMORVD.js → chunk-45DVD6HF.js} +15 -11
- package/dist/{chunk-J5CMORVD.js.map → chunk-45DVD6HF.js.map} +1 -1
- package/dist/chunk-4NITDMDH.js +372 -0
- package/dist/chunk-4NITDMDH.js.map +1 -0
- package/dist/{chunk-SNRP2MC3.js → chunk-5QGCF3PS.js} +2 -2
- package/dist/chunk-6THUVP6T.js +118 -0
- package/dist/chunk-6THUVP6T.js.map +1 -0
- package/dist/{chunk-MCSEYS2J.js → chunk-7GGIVYWP.js} +5 -5
- package/dist/{chunk-WIWO3YWP.js → chunk-7NVEGPZT.js} +2 -2
- package/dist/{chunk-JIYGGN2N.js → chunk-AU27USPZ.js} +2 -2
- package/dist/chunk-BOEAOIQT.js +43 -0
- package/dist/chunk-BOEAOIQT.js.map +1 -0
- package/dist/{chunk-5BNNPXID.js → chunk-BUX66OI7.js} +4 -4
- package/dist/{chunk-W4YWFAYC.js → chunk-C4T3F3XO.js} +4 -4
- package/dist/{chunk-QGKJXCEJ.js → chunk-CI4EAIMR.js} +19 -13
- package/dist/chunk-CI4EAIMR.js.map +1 -0
- package/dist/chunk-DJ2X4LKE.js +9 -0
- package/dist/{chunk-FUNZ7TOS.js → chunk-F6M255O5.js} +534 -121
- package/dist/chunk-F6M255O5.js.map +1 -0
- package/dist/chunk-FDKJFIUU.js +169 -0
- package/dist/chunk-FDKJFIUU.js.map +1 -0
- package/dist/{chunk-USUQYM6V.js → chunk-FMCSF2QB.js} +58 -54
- package/dist/chunk-FMCSF2QB.js.map +1 -0
- package/dist/{chunk-YNHIMOE7.js → chunk-GNGXYXBC.js} +2 -2
- package/dist/{chunk-C5HPSURF.js → chunk-HN2QQMMX.js} +12 -12
- package/dist/{chunk-KU63EHZO.js → chunk-ICJPVSRY.js} +2 -2
- package/dist/{chunk-ZS6F6JLC.js → chunk-IRKYLDMX.js} +88 -12
- package/dist/chunk-IRKYLDMX.js.map +1 -0
- package/dist/{chunk-LDFICXOZ.js → chunk-IWO4DILT.js} +10 -6
- package/dist/{chunk-LDFICXOZ.js.map → chunk-IWO4DILT.js.map} +1 -1
- package/dist/{chunk-B2HUKRWX.js → chunk-IXC7JM35.js} +4 -4
- package/dist/{chunk-UHYIB6AV.js → chunk-J2AZIO22.js} +2 -2
- package/dist/{chunk-VEKEA3ER.js → chunk-J36ULZBO.js} +2 -2
- package/dist/{chunk-4PRPDACI.js → chunk-JU5T3JIN.js} +10 -7
- package/dist/chunk-JU5T3JIN.js.map +1 -0
- package/dist/{chunk-3UHKPHTB.js → chunk-KH3TRWUV.js} +4 -4
- package/dist/{chunk-DYJ4VJJD.js → chunk-KLY6QDA5.js} +8 -33
- package/dist/chunk-KLY6QDA5.js.map +1 -0
- package/dist/{chunk-TBY6ZFAV.js → chunk-KNRGVUW7.js} +3 -3
- package/dist/{chunk-TTTIKTNR.js → chunk-LKZSPHAT.js} +2 -2
- package/dist/{chunk-5WEDCEZG.js → chunk-LXU24GCM.js} +5 -5
- package/dist/{chunk-CFLMBFBO.js → chunk-M6LJ3GE3.js} +76 -10
- package/dist/chunk-M6LJ3GE3.js.map +1 -0
- package/dist/{chunk-BVJ2ZE7B.js → chunk-MJGKE7XZ.js} +34 -13
- package/dist/chunk-MJGKE7XZ.js.map +1 -0
- package/dist/{chunk-3PLWNCRM.js → chunk-MMFXUIQQ.js} +2 -2
- package/dist/{chunk-YJ4CAD3X.js → chunk-MXA2RZBC.js} +5 -5
- package/dist/{chunk-OFCY7RCM.js → chunk-MZTPKKTO.js} +4 -4
- package/dist/{chunk-2IKWNRMV.js → chunk-NMAJM3C5.js} +3 -3
- package/dist/{chunk-W7WC7UA2.js → chunk-NPCBJV7T.js} +5 -5
- package/dist/{chunk-BHU26CNH.js → chunk-OAVHTRML.js} +6 -4
- package/dist/{chunk-BHU26CNH.js.map → chunk-OAVHTRML.js.map} +1 -1
- package/dist/{chunk-46UTKL5L.js → chunk-OMIMK3LB.js} +2 -2
- package/dist/chunk-P2HOLCBF.js +34 -0
- package/dist/chunk-P2HOLCBF.js.map +1 -0
- package/dist/{chunk-PUTZR6F5.js → chunk-P4EQWC5W.js} +2 -2
- package/dist/{chunk-MGQK6BWH.js → chunk-QLAVWIDJ.js} +35 -18
- package/dist/chunk-QLAVWIDJ.js.map +1 -0
- package/dist/{chunk-ZMCU2PZN.js → chunk-RCGFHJM7.js} +5 -3
- package/dist/chunk-RCGFHJM7.js.map +1 -0
- package/dist/{chunk-G2FE7HUB.js → chunk-RGUSVBGN.js} +2 -2
- package/dist/{chunk-R3DASZQF.js → chunk-S3BAD4IR.js} +2 -2
- package/dist/{chunk-LQXGNO5X.js → chunk-SDQI3QB3.js} +3 -3
- package/dist/{chunk-B7C3RYSJ.js → chunk-SG5LUMGE.js} +3 -3
- package/dist/{chunk-5XSY3C6E.js → chunk-UBOKRHNV.js} +13 -13
- package/dist/chunk-UBOKRHNV.js.map +1 -0
- package/dist/chunk-UESDYZG3.js +442 -0
- package/dist/chunk-UESDYZG3.js.map +1 -0
- package/dist/{chunk-PIKOCEWX.js → chunk-WTF4CYHH.js} +5 -5
- package/dist/{chunk-DO5NW46X.js → chunk-X4AXKO3A.js} +2 -2
- package/dist/{chunk-KE2TFF7B.js → chunk-XNLQSW6J.js} +23 -212
- package/dist/chunk-XNLQSW6J.js.map +1 -0
- package/dist/{chunk-ZGPWIBSZ.js → chunk-YEXW2OCN.js} +9 -34
- package/dist/chunk-YEXW2OCN.js.map +1 -0
- package/dist/{chunk-AFW7HREX.js → chunk-YKMURNKL.js} +9 -41
- package/dist/chunk-YKMURNKL.js.map +1 -0
- package/dist/{chunk-LWKFZOCJ.js → chunk-YRW4YF4U.js} +3 -3
- package/dist/{chunk-COKQPFLB.js → chunk-YYBXQBW2.js} +3 -3
- package/dist/{chunk-3JY3QT4J.js → chunk-YZPP6354.js} +5 -5
- package/dist/chunk-ZDMJPEBO.js +31 -0
- package/dist/chunk-ZDMJPEBO.js.map +1 -0
- package/dist/chunk-ZXHMC7UO.js +106 -0
- package/dist/chunk-ZXHMC7UO.js.map +1 -0
- package/dist/{cleanup-PWN4XZ2F.js → cleanup-PNTCVB2S.js} +31 -27
- package/dist/{cleanup-PWN4XZ2F.js.map → cleanup-PNTCVB2S.js.map} +1 -1
- package/dist/cli-OYO6OXNK.js +19 -0
- package/dist/{command-hook-installer-RJH5QLCD.js → command-hook-installer-7Q7UD7AU.js} +9 -8
- package/dist/command-hook-installer-7Q7UD7AU.js.map +1 -0
- package/dist/{config-KGDVJKQN.js → config-VILJYT6P.js} +19 -15
- package/dist/{config-KGDVJKQN.js.map → config-VILJYT6P.js.map} +1 -1
- package/dist/{diff-ZORXBJDI.js → diff-J6VRJYKR.js} +16 -13
- package/dist/{diff-ZORXBJDI.js.map → diff-J6VRJYKR.js.map} +1 -1
- package/dist/{digest-PUUBJTD3.js → digest-GMJLCYTF.js} +14 -11
- package/dist/{digest-PUUBJTD3.js.map → digest-GMJLCYTF.js.map} +1 -1
- package/dist/{fork-7L76HZAS.js → fork-NNHH2BXV.js} +27 -24
- package/dist/{fork-7L76HZAS.js.map → fork-NNHH2BXV.js.map} +1 -1
- package/dist/{history-YX74IRQY.js → history-52MGO5V5.js} +13 -8
- package/dist/{hook-JCD6SDB3.js → hook-SWX7NXJN.js} +20 -19
- package/dist/{hook-JCD6SDB3.js.map → hook-SWX7NXJN.js.map} +1 -1
- package/dist/{hydrate-W4V5RJYU.js → hydrate-F5XVXZ2T.js} +14 -11
- package/dist/{hydrate-W4V5RJYU.js.map → hydrate-F5XVXZ2T.js.map} +1 -1
- package/dist/{init-5MMV2UF5.js → init-MRGRQWQM.js} +14 -11
- package/dist/{init-5MMV2UF5.js.map → init-MRGRQWQM.js.map} +1 -1
- package/dist/install-skills-QTWYVAOZ.js +20 -0
- package/dist/install-skills-bin.js +9 -5
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{list-ZS3UWOGJ.js → list-5MMNVGNN.js} +14 -11
- package/dist/{list-ZS3UWOGJ.js.map → list-5MMNVGNN.js.map} +1 -1
- package/dist/{move-ZTL7HAIU.js → move-DUYNTJP2.js} +42 -18
- package/dist/move-DUYNTJP2.js.map +1 -0
- package/dist/{note-B4FVZGJJ.js → note-SZCVRH4D.js} +15 -12
- package/dist/{note-B4FVZGJJ.js.map → note-SZCVRH4D.js.map} +1 -1
- package/dist/{overlaps-W3BLUG53.js → overlaps-QANRNFZC.js} +13 -10
- package/dist/{overlaps-W3BLUG53.js.map → overlaps-QANRNFZC.js.map} +1 -1
- package/dist/{pin-YYQV5OPS.js → pin-UZGC26LU.js} +15 -12
- package/dist/{pin-YYQV5OPS.js.map → pin-UZGC26LU.js.map} +1 -1
- package/dist/{pr-HQTMQOF5.js → pr-EKNBGR6X.js} +15 -12
- package/dist/{pr-HQTMQOF5.js.map → pr-EKNBGR6X.js.map} +1 -1
- package/dist/{prune-6BYOFOUR.js → prune-AOR4R3CT.js} +29 -26
- package/dist/{prune-6BYOFOUR.js.map → prune-AOR4R3CT.js.map} +1 -1
- package/dist/{pty-host-KSS45FVH.js → pty-host-LYE546KI.js} +142 -37
- package/dist/pty-host-LYE546KI.js.map +1 -0
- package/dist/{read-I5TGSBPC.js → read-APEM6NPD.js} +14 -11
- package/dist/{read-I5TGSBPC.js.map → read-APEM6NPD.js.map} +1 -1
- package/dist/{recent-GRKJEEKT.js → recent-N7JQCDRG.js} +22 -12
- package/dist/recent-N7JQCDRG.js.map +1 -0
- package/dist/{remove-64T6TMOE.js → remove-QM5CRMEG.js} +28 -25
- package/dist/{remove-64T6TMOE.js.map → remove-QM5CRMEG.js.map} +1 -1
- package/dist/{report-KAS2UEXO.js → report-J7TUQRJS.js} +3 -3
- package/dist/{restart-WJROWFMU.js → restart-O6DYGEMN.js} +15 -12
- package/dist/{restart-WJROWFMU.js.map → restart-O6DYGEMN.js.map} +1 -1
- package/dist/{resume-634R6KNE.js → resume-P5DQOZ2R.js} +16 -12
- package/dist/resume-P5DQOZ2R.js.map +1 -0
- package/dist/{run-57LGOBXQ.js → run-PSGYELSP.js} +11 -8
- package/dist/{run-57LGOBXQ.js.map → run-PSGYELSP.js.map} +1 -1
- package/dist/{screen-CX7WUVXM.js → screen-EBITKGXW.js} +15 -12
- package/dist/{screen-CX7WUVXM.js.map → screen-EBITKGXW.js.map} +1 -1
- package/dist/{search-JYAQWT6A.js → search-MM35D6P4.js} +11 -8
- package/dist/{search-JYAQWT6A.js.map → search-MM35D6P4.js.map} +1 -1
- package/dist/{section-4FICXE46.js → section-6C6N7KKF.js} +15 -12
- package/dist/{section-4FICXE46.js.map → section-6C6N7KKF.js.map} +1 -1
- package/dist/{send-RRTPY47A.js → send-ASTESOMV.js} +16 -13
- package/dist/{send-RRTPY47A.js.map → send-ASTESOMV.js.map} +1 -1
- package/dist/{sessions-UJNUCYND.js → sessions-JTZF776H.js} +21 -18
- package/dist/{sessions-UJNUCYND.js.map → sessions-JTZF776H.js.map} +1 -1
- package/dist/{snooze-DJEPOBT5.js → snooze-M2IOYZSD.js} +14 -11
- package/dist/{snooze-DJEPOBT5.js.map → snooze-M2IOYZSD.js.map} +1 -1
- package/dist/{start-YPEN5QI3.js → start-HIBG7DYS.js} +15 -12
- package/dist/{start-YPEN5QI3.js.map → start-HIBG7DYS.js.map} +1 -1
- package/dist/{state-UAW6DWWU.js → state-DC73V5TS.js} +6 -4
- package/dist/{state-UAW6DWWU.js.map → state-DC73V5TS.js.map} +1 -1
- package/dist/{status-4EOTN33T.js → status-JSM6FETL.js} +13 -10
- package/dist/{status-4EOTN33T.js.map → status-JSM6FETL.js.map} +1 -1
- package/dist/{statusline-EUT6VZLP.js → statusline-A2DTGLK5.js} +40 -28
- package/dist/statusline-A2DTGLK5.js.map +1 -0
- package/dist/statusline-hook-OVWHHFBV.js +63 -0
- package/dist/statusline-hook-OVWHHFBV.js.map +1 -0
- package/dist/{stop-3UNZ22YA.js → stop-IEMNFVGW.js} +15 -12
- package/dist/{stop-3UNZ22YA.js.map → stop-IEMNFVGW.js.map} +1 -1
- package/dist/{sync-XXZBP6PK.js → sync-FP4J5ODY.js} +29 -26
- package/dist/{sync-XXZBP6PK.js.map → sync-FP4J5ODY.js.map} +1 -1
- package/dist/{time-G5Z57AE5.js → time-QHLGCYPZ.js} +17 -14
- package/dist/{time-G5Z57AE5.js.map → time-QHLGCYPZ.js.map} +1 -1
- package/dist/time-actions-4YP5DZKQ.js +16 -0
- package/dist/{timesheet-NA7NQUVR.js → timesheet-LSUOCD6V.js} +19 -16
- package/dist/{timesheet-NA7NQUVR.js.map → timesheet-LSUOCD6V.js.map} +1 -1
- package/dist/{todo-V7EVWHF2.js → todo-4VTGOCKH.js} +7 -5
- package/dist/{todo-V7EVWHF2.js.map → todo-4VTGOCKH.js.map} +1 -1
- package/dist/{tree-R5YXQTP7.js → tree-VTQRBC7I.js} +41 -30
- package/dist/tree-VTQRBC7I.js.map +1 -0
- package/dist/{update-B3MQXQJ6.js → update-VL67LR6U.js} +16 -13
- package/dist/{update-B3MQXQJ6.js.map → update-VL67LR6U.js.map} +1 -1
- package/dist/{usage-2HE4RSVM.js → usage-EMZVZZEQ.js} +18 -13
- package/dist/usage-EMZVZZEQ.js.map +1 -0
- package/dist/{wait-2OPYJO3K.js → wait-HQTY7OW5.js} +15 -12
- package/dist/{wait-2OPYJO3K.js.map → wait-HQTY7OW5.js.map} +1 -1
- package/dist/wd-bin.js +8 -6
- package/dist/wd-bin.js.map +1 -1
- package/dist/web/assets/{PtyView-DgdSx6WG.js → PtyView-BMRi1NT9.js} +2 -2
- package/dist/web/assets/{PtyView-DgdSx6WG.js.map → PtyView-BMRi1NT9.js.map} +1 -1
- package/dist/web/assets/{index-C5JNhi3-.css → index-BCCeJjez.css} +1 -1
- package/dist/web/assets/index-By_qebb-.js +119 -0
- package/dist/web/assets/index-By_qebb-.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-QXQ4NGCJ.js → web-6QSSPH4I.js} +319 -253
- package/dist/web-6QSSPH4I.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-3Q5RZCQW.js +0 -9
- package/dist/chunk-3ZGZNZTY.js +0 -134
- package/dist/chunk-3ZGZNZTY.js.map +0 -1
- package/dist/chunk-4PRPDACI.js.map +0 -1
- package/dist/chunk-5GA3PFK5.js.map +0 -1
- package/dist/chunk-5XSY3C6E.js.map +0 -1
- package/dist/chunk-AFW7HREX.js.map +0 -1
- package/dist/chunk-BVJ2ZE7B.js.map +0 -1
- package/dist/chunk-CFLMBFBO.js.map +0 -1
- package/dist/chunk-DYJ4VJJD.js.map +0 -1
- package/dist/chunk-EPNYZJMM.js.map +0 -1
- package/dist/chunk-FUNZ7TOS.js.map +0 -1
- package/dist/chunk-KE2TFF7B.js.map +0 -1
- package/dist/chunk-MGQK6BWH.js.map +0 -1
- package/dist/chunk-QGKJXCEJ.js.map +0 -1
- package/dist/chunk-TUFQJXXO.js +0 -19
- package/dist/chunk-TUFQJXXO.js.map +0 -1
- package/dist/chunk-USUQYM6V.js.map +0 -1
- package/dist/chunk-VMBWCDBA.js +0 -186
- package/dist/chunk-VMBWCDBA.js.map +0 -1
- package/dist/chunk-ZGPWIBSZ.js.map +0 -1
- package/dist/chunk-ZMCU2PZN.js.map +0 -1
- package/dist/chunk-ZS6F6JLC.js.map +0 -1
- package/dist/cli-UTID323G.js +0 -17
- package/dist/command-hook-installer-RJH5QLCD.js.map +0 -1
- package/dist/install-skills-7EHZBANC.js +0 -16
- package/dist/move-ZTL7HAIU.js.map +0 -1
- package/dist/pty-host-KSS45FVH.js.map +0 -1
- package/dist/recent-GRKJEEKT.js.map +0 -1
- package/dist/resume-634R6KNE.js.map +0 -1
- package/dist/statusline-EUT6VZLP.js.map +0 -1
- package/dist/statusline-hook-TZ7M762P.js +0 -118
- package/dist/statusline-hook-TZ7M762P.js.map +0 -1
- package/dist/time-actions-H5WCOYZG.js +0 -14
- package/dist/tree-R5YXQTP7.js.map +0 -1
- package/dist/usage-2HE4RSVM.js.map +0 -1
- package/dist/web/assets/index-O8yTaaWX.js +0 -119
- package/dist/web/assets/index-O8yTaaWX.js.map +0 -1
- package/dist/web-QXQ4NGCJ.js.map +0 -1
- /package/dist/{chunk-TPPTL7LA.js.map → chunk-26MWJLDS.js.map} +0 -0
- /package/dist/{chunk-KUVL75PL.js.map → chunk-2MQWAQ2D.js.map} +0 -0
- /package/dist/{chunk-O34CKSE4.js.map → chunk-3N3UQEC4.js.map} +0 -0
- /package/dist/{chunk-SNRP2MC3.js.map → chunk-5QGCF3PS.js.map} +0 -0
- /package/dist/{chunk-MCSEYS2J.js.map → chunk-7GGIVYWP.js.map} +0 -0
- /package/dist/{chunk-WIWO3YWP.js.map → chunk-7NVEGPZT.js.map} +0 -0
- /package/dist/{chunk-JIYGGN2N.js.map → chunk-AU27USPZ.js.map} +0 -0
- /package/dist/{chunk-5BNNPXID.js.map → chunk-BUX66OI7.js.map} +0 -0
- /package/dist/{chunk-W4YWFAYC.js.map → chunk-C4T3F3XO.js.map} +0 -0
- /package/dist/{chunk-3Q5RZCQW.js.map → chunk-DJ2X4LKE.js.map} +0 -0
- /package/dist/{chunk-YNHIMOE7.js.map → chunk-GNGXYXBC.js.map} +0 -0
- /package/dist/{chunk-C5HPSURF.js.map → chunk-HN2QQMMX.js.map} +0 -0
- /package/dist/{chunk-KU63EHZO.js.map → chunk-ICJPVSRY.js.map} +0 -0
- /package/dist/{chunk-B2HUKRWX.js.map → chunk-IXC7JM35.js.map} +0 -0
- /package/dist/{chunk-UHYIB6AV.js.map → chunk-J2AZIO22.js.map} +0 -0
- /package/dist/{chunk-VEKEA3ER.js.map → chunk-J36ULZBO.js.map} +0 -0
- /package/dist/{chunk-3UHKPHTB.js.map → chunk-KH3TRWUV.js.map} +0 -0
- /package/dist/{chunk-TBY6ZFAV.js.map → chunk-KNRGVUW7.js.map} +0 -0
- /package/dist/{chunk-TTTIKTNR.js.map → chunk-LKZSPHAT.js.map} +0 -0
- /package/dist/{chunk-5WEDCEZG.js.map → chunk-LXU24GCM.js.map} +0 -0
- /package/dist/{chunk-3PLWNCRM.js.map → chunk-MMFXUIQQ.js.map} +0 -0
- /package/dist/{chunk-YJ4CAD3X.js.map → chunk-MXA2RZBC.js.map} +0 -0
- /package/dist/{chunk-OFCY7RCM.js.map → chunk-MZTPKKTO.js.map} +0 -0
- /package/dist/{chunk-2IKWNRMV.js.map → chunk-NMAJM3C5.js.map} +0 -0
- /package/dist/{chunk-W7WC7UA2.js.map → chunk-NPCBJV7T.js.map} +0 -0
- /package/dist/{chunk-46UTKL5L.js.map → chunk-OMIMK3LB.js.map} +0 -0
- /package/dist/{chunk-PUTZR6F5.js.map → chunk-P4EQWC5W.js.map} +0 -0
- /package/dist/{chunk-G2FE7HUB.js.map → chunk-RGUSVBGN.js.map} +0 -0
- /package/dist/{chunk-R3DASZQF.js.map → chunk-S3BAD4IR.js.map} +0 -0
- /package/dist/{chunk-LQXGNO5X.js.map → chunk-SDQI3QB3.js.map} +0 -0
- /package/dist/{chunk-B7C3RYSJ.js.map → chunk-SG5LUMGE.js.map} +0 -0
- /package/dist/{chunk-PIKOCEWX.js.map → chunk-WTF4CYHH.js.map} +0 -0
- /package/dist/{chunk-DO5NW46X.js.map → chunk-X4AXKO3A.js.map} +0 -0
- /package/dist/{chunk-LWKFZOCJ.js.map → chunk-YRW4YF4U.js.map} +0 -0
- /package/dist/{chunk-COKQPFLB.js.map → chunk-YYBXQBW2.js.map} +0 -0
- /package/dist/{chunk-3JY3QT4J.js.map → chunk-YZPP6354.js.map} +0 -0
- /package/dist/{cli-UTID323G.js.map → cli-OYO6OXNK.js.map} +0 -0
- /package/dist/{history-YX74IRQY.js.map → history-52MGO5V5.js.map} +0 -0
- /package/dist/{install-skills-7EHZBANC.js.map → install-skills-QTWYVAOZ.js.map} +0 -0
- /package/dist/{report-KAS2UEXO.js.map → report-J7TUQRJS.js.map} +0 -0
- /package/dist/{time-actions-H5WCOYZG.js.map → time-actions-4YP5DZKQ.js.map} +0 -0
|
@@ -11,11 +11,17 @@ import {
|
|
|
11
11
|
serveSpa,
|
|
12
12
|
sessionBaseForPath,
|
|
13
13
|
submitReviewSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MXA2RZBC.js";
|
|
15
15
|
import {
|
|
16
|
-
ensureAgentPath
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
ensureAgentPath
|
|
17
|
+
} from "./chunk-YEXW2OCN.js";
|
|
18
|
+
import {
|
|
19
|
+
createBuildFoldersJob,
|
|
20
|
+
defaultBranchTidyDeps,
|
|
21
|
+
defaultBuildFoldersDeps,
|
|
22
|
+
deleteMergedBranches,
|
|
23
|
+
findMergedBranches
|
|
24
|
+
} from "./chunk-YKMURNKL.js";
|
|
19
25
|
import {
|
|
20
26
|
defaultTimeDeps,
|
|
21
27
|
fetchIssueDetail,
|
|
@@ -28,7 +34,10 @@ import {
|
|
|
28
34
|
graphProblem,
|
|
29
35
|
signOutGraph,
|
|
30
36
|
startDeviceLogin
|
|
31
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-45DVD6HF.js";
|
|
38
|
+
import {
|
|
39
|
+
defaultCleanupDeps
|
|
40
|
+
} from "./chunk-2MQWAQ2D.js";
|
|
32
41
|
import {
|
|
33
42
|
addTask,
|
|
34
43
|
completeTask,
|
|
@@ -36,7 +45,7 @@ import {
|
|
|
36
45
|
getTasks,
|
|
37
46
|
removeTask,
|
|
38
47
|
uncompleteTask
|
|
39
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-OMIMK3LB.js";
|
|
40
49
|
import {
|
|
41
50
|
announceChange,
|
|
42
51
|
createArchivedRows,
|
|
@@ -51,39 +60,42 @@ import {
|
|
|
51
60
|
stageSeenKey,
|
|
52
61
|
storeHolding,
|
|
53
62
|
withRestoring
|
|
54
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-27UC5NXT.js";
|
|
55
64
|
import {
|
|
56
65
|
DiffStatCache,
|
|
57
66
|
findOverlaps,
|
|
58
67
|
wantsDiffStat
|
|
59
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-J2AZIO22.js";
|
|
60
69
|
import {
|
|
61
70
|
createDigestSource
|
|
62
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-WTF4CYHH.js";
|
|
72
|
+
import {
|
|
73
|
+
QUEUE_RECHECK_MS,
|
|
74
|
+
accountSwitchNote,
|
|
75
|
+
busyForRestart,
|
|
76
|
+
createAccountSwitcher,
|
|
77
|
+
createRestarter,
|
|
78
|
+
defaultAccountSwitchDeps,
|
|
79
|
+
installedAtCache,
|
|
80
|
+
outdatedPtys,
|
|
81
|
+
restartNotesSummary,
|
|
82
|
+
switchRefusal
|
|
83
|
+
} from "./chunk-UESDYZG3.js";
|
|
84
|
+
import "./chunk-ZDMJPEBO.js";
|
|
63
85
|
import {
|
|
64
86
|
agentsBySession,
|
|
65
|
-
createBuildFoldersJob,
|
|
66
|
-
defaultBranchTidyDeps,
|
|
67
|
-
defaultBuildFoldersDeps,
|
|
68
|
-
deleteMergedBranches,
|
|
69
|
-
findMergedBranches,
|
|
70
87
|
summarizeAgents
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import
|
|
73
|
-
defaultCleanupDeps
|
|
74
|
-
} from "./chunk-KUVL75PL.js";
|
|
88
|
+
} from "./chunk-BOEAOIQT.js";
|
|
89
|
+
import "./chunk-TNJF7T33.js";
|
|
75
90
|
import {
|
|
76
91
|
buildUsage,
|
|
77
92
|
realUsageDeps,
|
|
78
93
|
setupAgentUsage
|
|
79
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-KLY6QDA5.js";
|
|
95
|
+
import "./chunk-P2HOLCBF.js";
|
|
80
96
|
import {
|
|
81
97
|
sendToSession
|
|
82
98
|
} from "./chunk-RYNBBSLY.js";
|
|
83
|
-
import {
|
|
84
|
-
LATER_TEXT,
|
|
85
|
-
restartCountsText
|
|
86
|
-
} from "./chunk-TNJF7T33.js";
|
|
87
99
|
import {
|
|
88
100
|
BehindCache,
|
|
89
101
|
behindMain,
|
|
@@ -99,7 +111,7 @@ import {
|
|
|
99
111
|
stackedOn,
|
|
100
112
|
updateFromBase,
|
|
101
113
|
updateFromMain
|
|
102
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-LXU24GCM.js";
|
|
103
115
|
import {
|
|
104
116
|
applyPlacePatch,
|
|
105
117
|
applySectionOp,
|
|
@@ -108,13 +120,13 @@ import {
|
|
|
108
120
|
cleanSectionOp,
|
|
109
121
|
placeSession,
|
|
110
122
|
readRailLayout
|
|
111
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-S3BAD4IR.js";
|
|
112
124
|
import {
|
|
113
125
|
MAX_NOTE_CHARS,
|
|
114
126
|
readNote,
|
|
115
127
|
saveNote,
|
|
116
128
|
sessionsWithNotes
|
|
117
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-GNGXYXBC.js";
|
|
118
130
|
import {
|
|
119
131
|
addBlocker,
|
|
120
132
|
allBlocks,
|
|
@@ -125,16 +137,16 @@ import {
|
|
|
125
137
|
removeBlocker,
|
|
126
138
|
sweepBlocks,
|
|
127
139
|
unblockedPrompt
|
|
128
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-SDQI3QB3.js";
|
|
129
141
|
import {
|
|
130
142
|
jiraWorklogPoster,
|
|
131
143
|
logWorkDay,
|
|
132
144
|
loggedDays,
|
|
133
145
|
worklogSettings
|
|
134
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-P4EQWC5W.js";
|
|
135
147
|
import {
|
|
136
148
|
sessionWorkTime
|
|
137
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-YRW4YF4U.js";
|
|
138
150
|
import {
|
|
139
151
|
DEFAULT_CATCH_UP_DAYS,
|
|
140
152
|
addDays,
|
|
@@ -153,15 +165,12 @@ import {
|
|
|
153
165
|
tempoSetup,
|
|
154
166
|
timeRange,
|
|
155
167
|
updateDay
|
|
156
|
-
} from "./chunk-
|
|
157
|
-
import {
|
|
158
|
-
isOwnCheckout
|
|
159
|
-
} from "./chunk-TUFQJXXO.js";
|
|
168
|
+
} from "./chunk-26MWJLDS.js";
|
|
160
169
|
import {
|
|
161
170
|
checkTools,
|
|
162
171
|
saveFolders,
|
|
163
172
|
setupState
|
|
164
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-IWO4DILT.js";
|
|
165
174
|
import {
|
|
166
175
|
RepoAdminError,
|
|
167
176
|
deleteGroup,
|
|
@@ -171,7 +180,7 @@ import {
|
|
|
171
180
|
saveGroup,
|
|
172
181
|
setRepoIgnored,
|
|
173
182
|
setScanRoot
|
|
174
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-27BDXWSY.js";
|
|
175
184
|
import {
|
|
176
185
|
freeLeftovers,
|
|
177
186
|
leftoversOf,
|
|
@@ -179,16 +188,16 @@ import {
|
|
|
179
188
|
openInLeftovers,
|
|
180
189
|
parsePrRef,
|
|
181
190
|
resolvePrToStart
|
|
182
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-ICJPVSRY.js";
|
|
183
192
|
import {
|
|
184
193
|
editorArgs,
|
|
185
194
|
openUrl
|
|
186
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-3TN77GOI.js";
|
|
187
196
|
import {
|
|
188
197
|
archiveMergedSession,
|
|
189
198
|
archiveWaiting,
|
|
190
199
|
defaultArchiveDeps
|
|
191
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-HN2QQMMX.js";
|
|
192
201
|
import {
|
|
193
202
|
MAX_REPLY_CHARS,
|
|
194
203
|
THREAD_ID,
|
|
@@ -203,7 +212,7 @@ import {
|
|
|
203
212
|
rememberSent,
|
|
204
213
|
retireResolvedReplies,
|
|
205
214
|
sessionRepoRefs
|
|
206
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-YZPP6354.js";
|
|
207
216
|
import {
|
|
208
217
|
cleanupVerdict,
|
|
209
218
|
createCleanupJob
|
|
@@ -211,11 +220,11 @@ import {
|
|
|
211
220
|
import {
|
|
212
221
|
sessionStatusView,
|
|
213
222
|
shownState
|
|
214
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-BUX66OI7.js";
|
|
215
224
|
import {
|
|
216
225
|
listProcesses,
|
|
217
226
|
runningFromNames
|
|
218
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-SG5LUMGE.js";
|
|
219
228
|
import {
|
|
220
229
|
fetchAllPullRequests
|
|
221
230
|
} from "./chunk-VTLDYH3C.js";
|
|
@@ -228,17 +237,14 @@ import {
|
|
|
228
237
|
defaultForkDeps,
|
|
229
238
|
forkSession,
|
|
230
239
|
startSessionWithPrompt
|
|
231
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-CI4EAIMR.js";
|
|
232
241
|
import {
|
|
233
242
|
askCatchUp,
|
|
234
243
|
cachedCatchUp,
|
|
235
244
|
catchUp,
|
|
236
245
|
catchUpFacts,
|
|
237
246
|
forgetCatchUp
|
|
238
|
-
} from "./chunk-
|
|
239
|
-
import {
|
|
240
|
-
resolveWorkBinPath
|
|
241
|
-
} from "./chunk-AH5TM3NB.js";
|
|
247
|
+
} from "./chunk-7GGIVYWP.js";
|
|
242
248
|
import {
|
|
243
249
|
childText,
|
|
244
250
|
createInChild,
|
|
@@ -246,17 +252,20 @@ import {
|
|
|
246
252
|
keyedQueue,
|
|
247
253
|
oneAtATime,
|
|
248
254
|
runWorkChild
|
|
249
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-JU5T3JIN.js";
|
|
256
|
+
import {
|
|
257
|
+
resolveWorkBinPath
|
|
258
|
+
} from "./chunk-AH5TM3NB.js";
|
|
250
259
|
import {
|
|
251
260
|
runInternal,
|
|
252
261
|
summarizeCheckpoint,
|
|
253
262
|
throttleTrailing
|
|
254
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-NPCBJV7T.js";
|
|
255
264
|
import {
|
|
256
265
|
computeDiff,
|
|
257
266
|
computeRangeDiff,
|
|
258
267
|
parseGitDiff
|
|
259
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-IXC7JM35.js";
|
|
260
269
|
import {
|
|
261
270
|
configurePtyPool,
|
|
262
271
|
detachPtyPool,
|
|
@@ -281,22 +290,22 @@ import {
|
|
|
281
290
|
subscribeSession,
|
|
282
291
|
syncPtyPool,
|
|
283
292
|
writeToPty
|
|
284
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-IRKYLDMX.js";
|
|
285
294
|
import {
|
|
286
295
|
dbPtySessions
|
|
287
|
-
} from "./chunk-
|
|
288
|
-
import "./chunk-
|
|
296
|
+
} from "./chunk-KNRGVUW7.js";
|
|
297
|
+
import "./chunk-M6LJ3GE3.js";
|
|
289
298
|
import {
|
|
290
299
|
ASSISTANT_ID,
|
|
291
300
|
CONTEXT_WARN,
|
|
292
301
|
assistantDir,
|
|
293
302
|
describeView,
|
|
294
303
|
writeAssistantContext
|
|
295
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-OAVHTRML.js";
|
|
296
305
|
import {
|
|
297
306
|
addRepoRefusal,
|
|
298
307
|
addedRepoNote
|
|
299
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-LKZSPHAT.js";
|
|
300
309
|
import {
|
|
301
310
|
clearDevWebDiscovery,
|
|
302
311
|
clearWebDiscovery,
|
|
@@ -308,17 +317,17 @@ import {
|
|
|
308
317
|
readWebUrl,
|
|
309
318
|
writeDevWebDiscovery,
|
|
310
319
|
writeWebDiscovery
|
|
311
|
-
} from "./chunk-
|
|
320
|
+
} from "./chunk-X4AXKO3A.js";
|
|
312
321
|
import {
|
|
313
322
|
NOTE_NUDGE,
|
|
314
323
|
findSessionForCwd,
|
|
315
324
|
readPendingForSession,
|
|
316
325
|
readPendingForWorktree
|
|
317
|
-
} from "./chunk-
|
|
326
|
+
} from "./chunk-KH3TRWUV.js";
|
|
318
327
|
import "./chunk-ZSHWP2VS.js";
|
|
319
328
|
import {
|
|
320
329
|
getCommentFileStore
|
|
321
|
-
} from "./chunk-
|
|
330
|
+
} from "./chunk-5QGCF3PS.js";
|
|
322
331
|
import {
|
|
323
332
|
createCommentStore
|
|
324
333
|
} from "./chunk-HUXS3VAI.js";
|
|
@@ -326,8 +335,8 @@ import {
|
|
|
326
335
|
teardownWorktree,
|
|
327
336
|
toBaseSpec,
|
|
328
337
|
wouldRefuseRemoval
|
|
329
|
-
} from "./chunk-
|
|
330
|
-
import "./chunk-
|
|
338
|
+
} from "./chunk-MJGKE7XZ.js";
|
|
339
|
+
import "./chunk-RGUSVBGN.js";
|
|
331
340
|
import {
|
|
332
341
|
isWorktreeFolder
|
|
333
342
|
} from "./chunk-KUCMJHQW.js";
|
|
@@ -344,13 +353,13 @@ import {
|
|
|
344
353
|
} from "./chunk-LNHSBM4L.js";
|
|
345
354
|
import {
|
|
346
355
|
VERSION
|
|
347
|
-
} from "./chunk-
|
|
356
|
+
} from "./chunk-DJ2X4LKE.js";
|
|
348
357
|
import {
|
|
349
358
|
resolveProjectTarget
|
|
350
|
-
} from "./chunk-
|
|
359
|
+
} from "./chunk-J36ULZBO.js";
|
|
351
360
|
import {
|
|
352
361
|
git
|
|
353
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-3N3UQEC4.js";
|
|
354
363
|
import {
|
|
355
364
|
DECISION_MARKER,
|
|
356
365
|
STAGE_WANTS_YOU,
|
|
@@ -431,7 +440,7 @@ import {
|
|
|
431
440
|
updateCheckpoint,
|
|
432
441
|
whileRestoring,
|
|
433
442
|
writeArchiveRecord
|
|
434
|
-
} from "./chunk-
|
|
443
|
+
} from "./chunk-QLAVWIDJ.js";
|
|
435
444
|
import {
|
|
436
445
|
dayKey
|
|
437
446
|
} from "./chunk-NEJVK5CF.js";
|
|
@@ -442,45 +451,54 @@ import {
|
|
|
442
451
|
sessionIdFor,
|
|
443
452
|
tx,
|
|
444
453
|
withDb
|
|
445
|
-
} from "./chunk-
|
|
454
|
+
} from "./chunk-YYBXQBW2.js";
|
|
446
455
|
import {
|
|
447
456
|
activityRoots,
|
|
457
|
+
agentAccountFolders,
|
|
448
458
|
agentFor,
|
|
449
459
|
agentOf,
|
|
450
460
|
agentWriteMs,
|
|
461
|
+
isOwnCheckout,
|
|
451
462
|
knownAgents,
|
|
452
463
|
lineTimeOf,
|
|
453
464
|
liveAgents,
|
|
454
465
|
readJsonlSince
|
|
455
|
-
} from "./chunk-
|
|
466
|
+
} from "./chunk-F6M255O5.js";
|
|
456
467
|
import {
|
|
457
468
|
usageDir
|
|
458
|
-
} from "./chunk-
|
|
469
|
+
} from "./chunk-RCGFHJM7.js";
|
|
470
|
+
import "./chunk-FDKJFIUU.js";
|
|
471
|
+
import {
|
|
472
|
+
DEFAULT_ACCOUNT,
|
|
473
|
+
DEFAULT_PROMPTS,
|
|
474
|
+
DEFAULT_TIME_SETTINGS,
|
|
475
|
+
isWorkday,
|
|
476
|
+
loadConfig
|
|
477
|
+
} from "./chunk-XNLQSW6J.js";
|
|
459
478
|
import {
|
|
460
479
|
detachHere,
|
|
461
480
|
isPidAlive,
|
|
462
481
|
recentProcessTable
|
|
463
|
-
} from "./chunk-
|
|
482
|
+
} from "./chunk-4NITDMDH.js";
|
|
464
483
|
import {
|
|
465
484
|
spawn_default
|
|
466
485
|
} from "./chunk-RCYI7SRA.js";
|
|
486
|
+
import {
|
|
487
|
+
atomicWriteFile
|
|
488
|
+
} from "./chunk-ZXHMC7UO.js";
|
|
467
489
|
import {
|
|
468
490
|
report
|
|
469
|
-
} from "./chunk-
|
|
491
|
+
} from "./chunk-AU27USPZ.js";
|
|
470
492
|
import {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
atomicWriteFile,
|
|
474
|
-
getConfigDir,
|
|
475
|
-
isWorkday,
|
|
476
|
-
loadConfig
|
|
477
|
-
} from "./chunk-KE2TFF7B.js";
|
|
493
|
+
getConfigDir
|
|
494
|
+
} from "./chunk-6THUVP6T.js";
|
|
478
495
|
|
|
479
496
|
// src/commands/web.ts
|
|
497
|
+
import fs16 from "fs";
|
|
480
498
|
import chalk from "chalk";
|
|
481
499
|
|
|
482
500
|
// src/server/web-server.ts
|
|
483
|
-
import
|
|
501
|
+
import fs14 from "fs";
|
|
484
502
|
|
|
485
503
|
// src/core/conversations/last-reply.ts
|
|
486
504
|
function lastReplyOf(entries) {
|
|
@@ -1150,8 +1168,8 @@ async function readCodeFile(s, repo, rel, io = realIo) {
|
|
|
1150
1168
|
// src/core/worktree/code-symbols.ts
|
|
1151
1169
|
var MAX_LINE_CHARS = 240;
|
|
1152
1170
|
function parseGrepLine(line) {
|
|
1153
|
-
const
|
|
1154
|
-
if (
|
|
1171
|
+
const z8 = /^([^\0]+)\0(\d+)\0(.*)$/.exec(line);
|
|
1172
|
+
if (z8) return { path: z8[1], line: Number(z8[2]), text: z8[3] };
|
|
1155
1173
|
const m = /^(.+?):(\d+):(.*)$/.exec(line);
|
|
1156
1174
|
return m ? { path: m[1], line: Number(m[2]), text: m[3] } : null;
|
|
1157
1175
|
}
|
|
@@ -2812,7 +2830,9 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
2812
2830
|
/** Start Claude with this as its first message. */
|
|
2813
2831
|
prompt: z4.string().max(2e4).optional(),
|
|
2814
2832
|
/** Name the session (its title); the branch stays its identity. */
|
|
2815
|
-
name: z4.string().max(120).optional()
|
|
2833
|
+
name: z4.string().max(120).optional(),
|
|
2834
|
+
/** The Claude account a new session runs on (a name from `work account list`); empty: the configured default. */
|
|
2835
|
+
account: z4.string().max(64).optional()
|
|
2816
2836
|
});
|
|
2817
2837
|
const startSession = opts.startSession ?? startSessionWithPrompt;
|
|
2818
2838
|
const create = opts.create ?? createInProcess;
|
|
@@ -2824,6 +2844,7 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
2824
2844
|
});
|
|
2825
2845
|
app.post("/api/worktrees", zValidator5("json", createSchema), async (c) => {
|
|
2826
2846
|
const { target, base, jiraKey, prompt, name } = c.req.valid("json");
|
|
2847
|
+
const account = c.req.valid("json").account?.trim() || void 0;
|
|
2827
2848
|
const config = loadConfig();
|
|
2828
2849
|
if (!config) return c.json({ error: "no config" }, 400);
|
|
2829
2850
|
const wanted = c.req.valid("json").branch?.trim() ?? "";
|
|
@@ -2831,7 +2852,7 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
2831
2852
|
return c.json({ error: "a base needs a branch to fork (leave both empty to open the repo as it is)" }, 400);
|
|
2832
2853
|
try {
|
|
2833
2854
|
const made = await create(
|
|
2834
|
-
{ target, branch: wanted || void 0, base: base?.trim() ? toBaseSpec(base.trim()) : void 0, jiraKey, name },
|
|
2855
|
+
{ target, branch: wanted || void 0, base: base?.trim() ? toBaseSpec(base.trim()) : void 0, jiraKey, name, account },
|
|
2835
2856
|
config
|
|
2836
2857
|
);
|
|
2837
2858
|
if (!made.ok) return c.json({ error: made.error }, 400);
|
|
@@ -5635,157 +5656,6 @@ async function bridgeToHost(ws, sessionId, pending) {
|
|
|
5635
5656
|
});
|
|
5636
5657
|
}
|
|
5637
5658
|
|
|
5638
|
-
// src/core/pty/agent-restart.ts
|
|
5639
|
-
import fs14 from "fs";
|
|
5640
|
-
var PACKED_MTIME_BEFORE = Date.parse("1990-01-01T00:00:00Z");
|
|
5641
|
-
function installedAt(cmd, find = findOnPath) {
|
|
5642
|
-
const file = find(cmd);
|
|
5643
|
-
if (!file) return null;
|
|
5644
|
-
try {
|
|
5645
|
-
return installTime(fs14.statSync(fs14.realpathSync(file)));
|
|
5646
|
-
} catch {
|
|
5647
|
-
return null;
|
|
5648
|
-
}
|
|
5649
|
-
}
|
|
5650
|
-
function installTime(st) {
|
|
5651
|
-
const real = (ms) => ms >= PACKED_MTIME_BEFORE ? ms : null;
|
|
5652
|
-
const known = [real(st.mtimeMs), real(st.birthtimeMs)].filter((x) => x !== null);
|
|
5653
|
-
return known.length ? Math.max(...known) : st.ctimeMs;
|
|
5654
|
-
}
|
|
5655
|
-
function installedAtCache(ttlMs = 6e4, look = installedAt, now = Date.now) {
|
|
5656
|
-
const cache = /* @__PURE__ */ new Map();
|
|
5657
|
-
return (cmd) => {
|
|
5658
|
-
const hit = cache.get(cmd);
|
|
5659
|
-
if (hit && now() - hit.read < ttlMs) return hit.at;
|
|
5660
|
-
const at = look(cmd);
|
|
5661
|
-
cache.set(cmd, { at, read: now() });
|
|
5662
|
-
return at;
|
|
5663
|
-
};
|
|
5664
|
-
}
|
|
5665
|
-
function outdatedPtys(ptys, toolInstalledAt) {
|
|
5666
|
-
return ptys.filter((p) => {
|
|
5667
|
-
if (p.exited || !p.tool) return false;
|
|
5668
|
-
const at = toolInstalledAt(p.tool);
|
|
5669
|
-
const started = Date.parse(p.startedAt);
|
|
5670
|
-
return at !== null && Number.isFinite(started) && started < at;
|
|
5671
|
-
});
|
|
5672
|
-
}
|
|
5673
|
-
var PRINTING_MS = 1e4;
|
|
5674
|
-
function busyForRestart(state, lastOutputMs, now = Date.now(), live = null) {
|
|
5675
|
-
if (live === "busy" || live === "waiting") return true;
|
|
5676
|
-
if (state === "working" || state === "needs_input") return true;
|
|
5677
|
-
return lastOutputMs !== null && now - lastOutputMs < PRINTING_MS;
|
|
5678
|
-
}
|
|
5679
|
-
function restartPlan(ids, busy) {
|
|
5680
|
-
const now = [];
|
|
5681
|
-
const later = [];
|
|
5682
|
-
for (const id of new Set(ids)) (busy(id) ? later : now).push(id);
|
|
5683
|
-
return { now, later };
|
|
5684
|
-
}
|
|
5685
|
-
var RESTART_AT_ONCE = 3;
|
|
5686
|
-
function restartNotesSummary(notes) {
|
|
5687
|
-
const n = (level) => notes.filter((x) => x.level === level).length;
|
|
5688
|
-
return restartCountsText({ restarted: n("action"), later: n("info"), failed: n("warn") });
|
|
5689
|
-
}
|
|
5690
|
-
var QUEUE_RECHECK_MS = 15e3;
|
|
5691
|
-
var TURN_END_GRACE_MS = 1e4;
|
|
5692
|
-
function createRestarter(deps) {
|
|
5693
|
-
const queued = /* @__PURE__ */ new Set();
|
|
5694
|
-
const inFlight = /* @__PURE__ */ new Map();
|
|
5695
|
-
const later = deps.later ?? ((fn, ms) => void setTimeout(fn, ms).unref?.());
|
|
5696
|
-
const one = (id) => {
|
|
5697
|
-
const running = inFlight.get(id);
|
|
5698
|
-
if (running) return running;
|
|
5699
|
-
queued.delete(id);
|
|
5700
|
-
const p = deps.restart(id).then(
|
|
5701
|
-
(how) => ({ ok: true, how: how || "restarted its agent (its conversation goes on)" }),
|
|
5702
|
-
(err) => ({ ok: false, error: err.message })
|
|
5703
|
-
);
|
|
5704
|
-
inFlight.set(id, p);
|
|
5705
|
-
void p.finally(() => inFlight.delete(id));
|
|
5706
|
-
return p;
|
|
5707
|
-
};
|
|
5708
|
-
const run = async (ids, notes) => {
|
|
5709
|
-
const failed = [];
|
|
5710
|
-
const ok = /* @__PURE__ */ new Set();
|
|
5711
|
-
const queue = [...ids];
|
|
5712
|
-
const worker = async () => {
|
|
5713
|
-
for (let id = queue.shift(); id !== void 0; id = queue.shift()) {
|
|
5714
|
-
const r = await one(id);
|
|
5715
|
-
if (r.ok) {
|
|
5716
|
-
ok.add(id);
|
|
5717
|
-
notes.push({ id, text: r.how, level: "action" });
|
|
5718
|
-
} else {
|
|
5719
|
-
failed.push({ id, error: r.error });
|
|
5720
|
-
notes.push({ id, text: `couldn't restart its agent: ${r.error}`, level: "warn" });
|
|
5721
|
-
}
|
|
5722
|
-
}
|
|
5723
|
-
};
|
|
5724
|
-
await Promise.all(Array.from({ length: Math.min(RESTART_AT_ONCE, queue.length) }, worker));
|
|
5725
|
-
return { done: ids.filter((id) => ok.has(id)), failed };
|
|
5726
|
-
};
|
|
5727
|
-
const finish = (notes) => {
|
|
5728
|
-
if (!notes.length) return;
|
|
5729
|
-
deps.report?.(notes);
|
|
5730
|
-
deps.changed?.();
|
|
5731
|
-
};
|
|
5732
|
-
const request = async (ids) => {
|
|
5733
|
-
const plan = restartPlan(ids, (id) => deps.busy(id));
|
|
5734
|
-
const notes = [];
|
|
5735
|
-
for (const id of plan.later) {
|
|
5736
|
-
queued.add(id);
|
|
5737
|
-
notes.push({ id, text: `${LATER_TEXT} (it is working or waiting on you)`, level: "info" });
|
|
5738
|
-
}
|
|
5739
|
-
const { done, failed } = await run(plan.now, notes);
|
|
5740
|
-
finish(notes);
|
|
5741
|
-
tick();
|
|
5742
|
-
return { now: done, later: plan.later, failed };
|
|
5743
|
-
};
|
|
5744
|
-
let ticking = false;
|
|
5745
|
-
const tick = () => {
|
|
5746
|
-
if (ticking) return;
|
|
5747
|
-
if (queued.size === 0) {
|
|
5748
|
-
deps.scheduled?.(null);
|
|
5749
|
-
return;
|
|
5750
|
-
}
|
|
5751
|
-
ticking = true;
|
|
5752
|
-
deps.scheduled?.(Date.now() + QUEUE_RECHECK_MS);
|
|
5753
|
-
later(() => {
|
|
5754
|
-
ticking = false;
|
|
5755
|
-
void retry().catch(() => {
|
|
5756
|
-
}).finally(tick);
|
|
5757
|
-
}, QUEUE_RECHECK_MS);
|
|
5758
|
-
};
|
|
5759
|
-
const retry = async (only, opts) => {
|
|
5760
|
-
const notes = [];
|
|
5761
|
-
const ready = [];
|
|
5762
|
-
for (const id of [...queued]) {
|
|
5763
|
-
if (only !== void 0 && id !== only) continue;
|
|
5764
|
-
if (!deps.running(id)) {
|
|
5765
|
-
queued.delete(id);
|
|
5766
|
-
notes.push({ id, text: "no longer waits to restart: it was stopped meanwhile (it starts on the new version)", level: "info" });
|
|
5767
|
-
continue;
|
|
5768
|
-
}
|
|
5769
|
-
if (!deps.busy(id, opts)) ready.push(id);
|
|
5770
|
-
}
|
|
5771
|
-
await run(ready, notes);
|
|
5772
|
-
finish(notes);
|
|
5773
|
-
};
|
|
5774
|
-
return {
|
|
5775
|
-
request,
|
|
5776
|
-
retry: () => retry(),
|
|
5777
|
-
/** A session's turn ended: restart it if it was waiting for that — and if it still reads as busy, look again shortly. */
|
|
5778
|
-
turnEnded: (id) => {
|
|
5779
|
-
if (!queued.has(id)) return;
|
|
5780
|
-
later(() => void retry(id, { turnEnded: true }).catch(() => {
|
|
5781
|
-
}), TURN_END_GRACE_MS);
|
|
5782
|
-
},
|
|
5783
|
-
queued: () => [...queued],
|
|
5784
|
-
/** Being restarted now (the host lists them as exited meanwhile: still this session's). */
|
|
5785
|
-
restarting: () => [...inFlight.keys()]
|
|
5786
|
-
};
|
|
5787
|
-
}
|
|
5788
|
-
|
|
5789
5659
|
// src/server/routes/agent-restart-routes.ts
|
|
5790
5660
|
function agentsWire(ptys, deps) {
|
|
5791
5661
|
const times = /* @__PURE__ */ new Map();
|
|
@@ -5822,6 +5692,72 @@ function mountAgentRestartRoutes(app, opts) {
|
|
|
5822
5692
|
});
|
|
5823
5693
|
}
|
|
5824
5694
|
|
|
5695
|
+
// src/server/routes/account-routes.ts
|
|
5696
|
+
import { zValidator as zValidator8 } from "@hono/zod-validator";
|
|
5697
|
+
import { z as z7 } from "zod";
|
|
5698
|
+
function mountAccountRoutes(app, opts) {
|
|
5699
|
+
app.get("/api/accounts", (c) => {
|
|
5700
|
+
const accounts = agentFor(loadConfig()).accounts;
|
|
5701
|
+
const list = accounts?.list() ?? [];
|
|
5702
|
+
return c.json({
|
|
5703
|
+
accounts: list.map((a) => ({ name: a.name, dir: a.dir, isDefault: a.isDefault, loggedIn: a.loggedIn })),
|
|
5704
|
+
default: accounts?.defaultName() ?? DEFAULT_ACCOUNT
|
|
5705
|
+
});
|
|
5706
|
+
});
|
|
5707
|
+
app.post("/api/sessions/:id/account", zValidator8("json", z7.object({ to: z7.string().min(1).max(64) })), async (c) => {
|
|
5708
|
+
if (opts.lookOnly) return c.json({ error: opts.lookOnly }, 409);
|
|
5709
|
+
const r = await opts.switcher.switchAccount(c.req.param("id"), c.req.valid("json").to).catch((err) => ({
|
|
5710
|
+
ok: false,
|
|
5711
|
+
status: 502,
|
|
5712
|
+
error: err.message
|
|
5713
|
+
}));
|
|
5714
|
+
if (!r.ok) return c.json({ error: r.error }, r.status);
|
|
5715
|
+
opts.broadcast("sessions-changed", { ts: Date.now() });
|
|
5716
|
+
return c.json({ ok: true, outcome: r.outcome, ...r.moved !== void 0 ? { moved: r.moved } : {} });
|
|
5717
|
+
});
|
|
5718
|
+
app.delete("/api/sessions/:id/account", (c) => {
|
|
5719
|
+
if (opts.lookOnly) return c.json({ error: opts.lookOnly }, 409);
|
|
5720
|
+
const r = opts.switcher.cancel(c.req.param("id"));
|
|
5721
|
+
if (r === "running") return c.json({ error: "the switch is being done right now" }, 409);
|
|
5722
|
+
if (r === "none") return c.json({ error: "no switch is waiting for its turn" }, 409);
|
|
5723
|
+
opts.broadcast("sessions-changed", { ts: Date.now() });
|
|
5724
|
+
return c.json({ ok: true });
|
|
5725
|
+
});
|
|
5726
|
+
}
|
|
5727
|
+
|
|
5728
|
+
// src/core/sessions/account-switch-link.ts
|
|
5729
|
+
function createAccountSwitchLink() {
|
|
5730
|
+
let restarter = null;
|
|
5731
|
+
let switcher = null;
|
|
5732
|
+
return {
|
|
5733
|
+
connect(r, s) {
|
|
5734
|
+
restarter = r;
|
|
5735
|
+
switcher = s;
|
|
5736
|
+
},
|
|
5737
|
+
/** The agent restarter's `foldedInto`: a switch that waits or runs restarts it anyway. */
|
|
5738
|
+
foldedInto: (id) => {
|
|
5739
|
+
const to = switcher?.restartsAnyway(id) ?? null;
|
|
5740
|
+
return to === null ? null : `its switch to the ${to || "other"} account`;
|
|
5741
|
+
},
|
|
5742
|
+
/** The switcher's `cancelRestart`. */
|
|
5743
|
+
cancelRestart: (id) => restarter?.cancel(id) ?? false,
|
|
5744
|
+
/** A session's turn ended: a restart or a switch that waited for it goes now (after its hooks have run). */
|
|
5745
|
+
turnEnded(id) {
|
|
5746
|
+
restarter?.turnEnded(id);
|
|
5747
|
+
switcher?.turnEnded(id);
|
|
5748
|
+
},
|
|
5749
|
+
/** The sweep: the ones waiting on a turn whose end no hook reported. Never rejects. */
|
|
5750
|
+
async retry() {
|
|
5751
|
+
await restarter?.retry().catch(() => {
|
|
5752
|
+
});
|
|
5753
|
+
await switcher?.retry().catch(() => {
|
|
5754
|
+
});
|
|
5755
|
+
},
|
|
5756
|
+
/** The account a session waits to move to (SessionWire.accountPending), or null. */
|
|
5757
|
+
pendingFor: (id) => switcher?.pendingFor(id) ?? null
|
|
5758
|
+
};
|
|
5759
|
+
}
|
|
5760
|
+
|
|
5825
5761
|
// src/core/pty/host-health.ts
|
|
5826
5762
|
var UNRESPONSIVE_MS = 11e3;
|
|
5827
5763
|
var SLOW_MS = 1500;
|
|
@@ -5958,7 +5894,7 @@ async function startWebServer(opts = {}) {
|
|
|
5958
5894
|
let activityWatcher = null;
|
|
5959
5895
|
if (!lean) {
|
|
5960
5896
|
try {
|
|
5961
|
-
const roots = activityRoots().filter((r) =>
|
|
5897
|
+
const roots = activityRoots().filter((r) => fs14.existsSync(r));
|
|
5962
5898
|
if (roots.length > 0) {
|
|
5963
5899
|
activityWatcher = createFsWatcher({
|
|
5964
5900
|
roots,
|
|
@@ -6060,6 +5996,7 @@ async function startWebServer(opts = {}) {
|
|
|
6060
5996
|
prStageFor: (id) => prStageWire(prWatch.state(id), (k) => stageSeen(id).has(k)),
|
|
6061
5997
|
replyDraftsFor: (id) => drafts.get(id) ?? 0,
|
|
6062
5998
|
hasNote: (id) => noted.has(id),
|
|
5999
|
+
accountPendingFor: (id) => accountLink.pendingFor(id),
|
|
6063
6000
|
blockedByFor: (id) => (blocks.get(id)?.by ?? []).filter((b) => !blockerDone(b, (x) => !live.has(x))).map((b) => ({
|
|
6064
6001
|
key: blockKey(b),
|
|
6065
6002
|
kind: b.kind,
|
|
@@ -6170,7 +6107,9 @@ async function startWebServer(opts = {}) {
|
|
|
6170
6107
|
return busyForRestart(session ? shownState(session) : null, opts2?.turnEnded ? null : ptyLastOutputMs(id), Date.now(), live);
|
|
6171
6108
|
};
|
|
6172
6109
|
const restartSchedule = dev ? null : activity.schedule("agents", "Agents waiting to restart", QUEUE_RECHECK_MS);
|
|
6110
|
+
const accountLink = createAccountSwitchLink();
|
|
6173
6111
|
const restarter = createRestarter({
|
|
6112
|
+
foldedInto: accountLink.foldedInto,
|
|
6174
6113
|
restart: restartPty,
|
|
6175
6114
|
busy: restartBusy,
|
|
6176
6115
|
running: peekPty,
|
|
@@ -6193,10 +6132,28 @@ async function startWebServer(opts = {}) {
|
|
|
6193
6132
|
// The dev server shares the real PTY host and acts on nothing: the real work web restarts.
|
|
6194
6133
|
lookOnly: dev ? "the dev server restarts nothing: use the real work web (the app, or `work restart`)" : void 0
|
|
6195
6134
|
});
|
|
6135
|
+
const accountSchedule = dev ? null : activity.schedule("accounts", "Account switches waiting for a turn", QUEUE_RECHECK_MS);
|
|
6136
|
+
const accountSwitcher = createAccountSwitcher(
|
|
6137
|
+
defaultAccountSwitchDeps({
|
|
6138
|
+
busy: restartBusy,
|
|
6139
|
+
note: accountSwitchNote(activity, (id) => {
|
|
6140
|
+
const s = findSession2(id);
|
|
6141
|
+
return s ? `${s.target} ${s.branch}` : null;
|
|
6142
|
+
}),
|
|
6143
|
+
changed: () => broadcast("sessions-changed", { ts: Date.now() }),
|
|
6144
|
+
scheduled: (nextAt) => accountSchedule?.next(nextAt),
|
|
6145
|
+
cancelRestart: accountLink.cancelRestart
|
|
6146
|
+
})
|
|
6147
|
+
);
|
|
6148
|
+
accountLink.connect(restarter, accountSwitcher);
|
|
6149
|
+
mountAccountRoutes(app, {
|
|
6150
|
+
switcher: accountSwitcher,
|
|
6151
|
+
broadcast,
|
|
6152
|
+
lookOnly: dev ? "the dev server switches nothing: use the real work web (the app, or `work account switch`)" : void 0
|
|
6153
|
+
});
|
|
6196
6154
|
const sleepIdle = async () => {
|
|
6197
6155
|
sleepSchedule?.next(Date.now() + SLEEP_EVERY_MS);
|
|
6198
|
-
await
|
|
6199
|
-
});
|
|
6156
|
+
await accountLink.retry();
|
|
6200
6157
|
const minutes = loadConfig()?.sleepIdleAfterMinutes ?? DEFAULT_SLEEP_AFTER_MINUTES;
|
|
6201
6158
|
if (sleepAfterMs(minutes) === 0)
|
|
6202
6159
|
return activity.skip("idle-sleep", "Looking for idle Claudes", "turned off (sleepIdleAfterMinutes: 0)");
|
|
@@ -6445,7 +6402,7 @@ async function startWebServer(opts = {}) {
|
|
|
6445
6402
|
} : {},
|
|
6446
6403
|
onStatusChanged: (id) => {
|
|
6447
6404
|
diffStats.invalidate(id);
|
|
6448
|
-
|
|
6405
|
+
accountLink.turnEnded(id);
|
|
6449
6406
|
timeKeeper?.soon();
|
|
6450
6407
|
if (jobs) void syncStacksAfter(id);
|
|
6451
6408
|
const session = findSession2(id);
|
|
@@ -6501,7 +6458,7 @@ async function startWebServer(opts = {}) {
|
|
|
6501
6458
|
updatesTimer?.unref?.();
|
|
6502
6459
|
const desktopFile = desktopUpdatePath();
|
|
6503
6460
|
const onDesktopUpdate = () => broadcast("updates-changed", { ts: Date.now() });
|
|
6504
|
-
if (jobs)
|
|
6461
|
+
if (jobs) fs14.watchFile(desktopFile, { interval: 3e3 }, onDesktopUpdate);
|
|
6505
6462
|
const usageWatcher = wireUsage(app, { broadcast, build: () => buildUsage(realUsageDeps()) });
|
|
6506
6463
|
app.get("/api/pty-host/health", (c) => c.json(hostHealth(hostBeat())));
|
|
6507
6464
|
let lastHostState = hostHealth(hostBeat()).state;
|
|
@@ -6568,7 +6525,7 @@ async function startWebServer(opts = {}) {
|
|
|
6568
6525
|
if (timeFirst) clearTimeout(timeFirst);
|
|
6569
6526
|
if (timeTimer) clearInterval(timeTimer);
|
|
6570
6527
|
timeKeeper?.stop();
|
|
6571
|
-
|
|
6528
|
+
fs14.unwatchFile(desktopFile, onDesktopUpdate);
|
|
6572
6529
|
usageWatcher.stop();
|
|
6573
6530
|
for (const t of conversationSyncs.values()) clearTimeout(t);
|
|
6574
6531
|
clearTimeout(sweepTimer);
|
|
@@ -6591,8 +6548,41 @@ async function startWebServer(opts = {}) {
|
|
|
6591
6548
|
};
|
|
6592
6549
|
}
|
|
6593
6550
|
|
|
6551
|
+
// src/core/agents/account-sync.ts
|
|
6552
|
+
var keyOf = (folders) => [...new Set(folders)].sort().join("\n");
|
|
6553
|
+
function startAccountSync(deps) {
|
|
6554
|
+
let last = keyOf(deps.folders());
|
|
6555
|
+
let running = false;
|
|
6556
|
+
const check = async () => {
|
|
6557
|
+
if (running) return false;
|
|
6558
|
+
let now;
|
|
6559
|
+
try {
|
|
6560
|
+
now = keyOf(deps.folders());
|
|
6561
|
+
} catch (err) {
|
|
6562
|
+
deps.onError?.(err);
|
|
6563
|
+
return false;
|
|
6564
|
+
}
|
|
6565
|
+
if (now === last) return false;
|
|
6566
|
+
running = true;
|
|
6567
|
+
last = now;
|
|
6568
|
+
try {
|
|
6569
|
+
await deps.apply();
|
|
6570
|
+
return true;
|
|
6571
|
+
} catch (err) {
|
|
6572
|
+
deps.onError?.(err);
|
|
6573
|
+
return false;
|
|
6574
|
+
} finally {
|
|
6575
|
+
running = false;
|
|
6576
|
+
}
|
|
6577
|
+
};
|
|
6578
|
+
const every = deps.everyMs ?? 1e4;
|
|
6579
|
+
const timer = every > 0 ? setInterval(() => void check(), every) : null;
|
|
6580
|
+
timer?.unref?.();
|
|
6581
|
+
return { check, stop: () => timer && clearInterval(timer) };
|
|
6582
|
+
}
|
|
6583
|
+
|
|
6594
6584
|
// src/core/platform/autostart.ts
|
|
6595
|
-
import
|
|
6585
|
+
import fs15 from "fs";
|
|
6596
6586
|
import path16 from "path";
|
|
6597
6587
|
function startupScriptPath() {
|
|
6598
6588
|
if (process.platform !== "win32" || !process.env.APPDATA) return null;
|
|
@@ -6614,11 +6604,11 @@ function setAutostart(enabled, workBin) {
|
|
|
6614
6604
|
const file = startupScriptPath();
|
|
6615
6605
|
if (!file) throw new Error("Autostart is only supported on Windows so far.");
|
|
6616
6606
|
if (enabled) {
|
|
6617
|
-
|
|
6618
|
-
|
|
6607
|
+
fs15.mkdirSync(path16.dirname(file), { recursive: true });
|
|
6608
|
+
fs15.writeFileSync(file, buildStartupScript(process.execPath, workBin), "utf-8");
|
|
6619
6609
|
} else {
|
|
6620
6610
|
try {
|
|
6621
|
-
|
|
6611
|
+
fs15.unlinkSync(file);
|
|
6622
6612
|
} catch {
|
|
6623
6613
|
}
|
|
6624
6614
|
}
|
|
@@ -6736,8 +6726,31 @@ function createDemoRepos(liveTargets) {
|
|
|
6736
6726
|
};
|
|
6737
6727
|
}
|
|
6738
6728
|
|
|
6729
|
+
// src/server/demo/demo-accounts.ts
|
|
6730
|
+
var DEMO_ACCOUNTS = {
|
|
6731
|
+
accounts: [
|
|
6732
|
+
{ name: "default", dir: "~/.claude", isDefault: true, loggedIn: true },
|
|
6733
|
+
{ name: "work", dir: "~/.claude-work", isDefault: false, loggedIn: true },
|
|
6734
|
+
{ name: "spare", dir: "~/.claude-spare", isDefault: false, loggedIn: false }
|
|
6735
|
+
],
|
|
6736
|
+
default: "default"
|
|
6737
|
+
};
|
|
6738
|
+
var isDemoAccount = (name) => DEMO_ACCOUNTS.accounts.some((a) => a.name === name);
|
|
6739
|
+
function demoSwitch(session, to) {
|
|
6740
|
+
const refused = switchRefusal(to, {
|
|
6741
|
+
archived: session.archived,
|
|
6742
|
+
accounts: { list: DEMO_ACCOUNTS.accounts, current: session.account ?? "default" },
|
|
6743
|
+
pendingTo: null,
|
|
6744
|
+
// The demo's Claudes are all "in the host": none runs in a terminal outside it.
|
|
6745
|
+
inHost: true,
|
|
6746
|
+
runningOutside: false
|
|
6747
|
+
});
|
|
6748
|
+
if (refused) return { ok: false, ...refused };
|
|
6749
|
+
return { ok: true, body: { ok: true, outcome: "recorded", moved: 0 } };
|
|
6750
|
+
}
|
|
6751
|
+
|
|
6739
6752
|
// src/server/demo/scenario.ts
|
|
6740
|
-
var DEMO_AGENT = { id: "claude", name: "Claude Code", can: { read: true, hooks: true, live: true, answer: true } };
|
|
6753
|
+
var DEMO_AGENT = { id: "claude", name: "Claude Code", can: { read: true, hooks: true, live: true, answer: true, accounts: true } };
|
|
6741
6754
|
function fileBlocks(diff) {
|
|
6742
6755
|
return diff ? diff.split(/(?=^diff --git )/m).filter((b) => b.startsWith("diff --git ")) : [];
|
|
6743
6756
|
}
|
|
@@ -7376,6 +7389,7 @@ ${reply}\r
|
|
|
7376
7389
|
const stat = this.diffStat(s);
|
|
7377
7390
|
return {
|
|
7378
7391
|
agent: DEMO_AGENT,
|
|
7392
|
+
...s.account && s.account !== "default" ? { account: s.account } : {},
|
|
7379
7393
|
id: s.id,
|
|
7380
7394
|
target: s.target,
|
|
7381
7395
|
branch: s.branch,
|
|
@@ -7766,6 +7780,17 @@ ${reply}\r
|
|
|
7766
7780
|
this.changed();
|
|
7767
7781
|
return true;
|
|
7768
7782
|
}
|
|
7783
|
+
/** Move a session to another account (demo-accounts.ts): just recorded. */
|
|
7784
|
+
switchAccount(id, to) {
|
|
7785
|
+
const s = this.sessions.get(id);
|
|
7786
|
+
if (!s) return null;
|
|
7787
|
+
const r = demoSwitch({ account: s.account, archived: !!s.archivedAt }, to);
|
|
7788
|
+
if (r.ok) {
|
|
7789
|
+
s.account = to === "default" ? void 0 : to;
|
|
7790
|
+
this.changed();
|
|
7791
|
+
}
|
|
7792
|
+
return r;
|
|
7793
|
+
}
|
|
7769
7794
|
remove(id) {
|
|
7770
7795
|
const ok = this.sessions.delete(id);
|
|
7771
7796
|
if (ok) this.changed();
|
|
@@ -7853,7 +7878,7 @@ ${reply}\r
|
|
|
7853
7878
|
this.changed();
|
|
7854
7879
|
return true;
|
|
7855
7880
|
}
|
|
7856
|
-
create(target, branch, prompt, baseBranch) {
|
|
7881
|
+
create(target, branch, prompt, baseBranch, account) {
|
|
7857
7882
|
const project = this.projects();
|
|
7858
7883
|
const group = project.groups.find((g) => g.name === target);
|
|
7859
7884
|
const first = prompt?.split("\n")[0];
|
|
@@ -7866,6 +7891,7 @@ ${reply}\r
|
|
|
7866
7891
|
0
|
|
7867
7892
|
);
|
|
7868
7893
|
if (baseBranch) s.baseBranch = baseBranch;
|
|
7894
|
+
if (account && account !== "default") s.account = account;
|
|
7869
7895
|
this.changed();
|
|
7870
7896
|
return this.wire(s);
|
|
7871
7897
|
}
|
|
@@ -8137,11 +8163,21 @@ function demoUsage(now = Date.now()) {
|
|
|
8137
8163
|
accounts: [
|
|
8138
8164
|
{
|
|
8139
8165
|
account: "default",
|
|
8166
|
+
isDefault: true,
|
|
8140
8167
|
at: new Date(now - 6e4).toISOString(),
|
|
8141
8168
|
windows: [
|
|
8142
8169
|
{ id: "five_hour", label: "5-hour limit", usedPercent: 42, resetsAt: new Date(now + 2 * 36e5).toISOString() },
|
|
8143
8170
|
{ id: "seven_day", label: "Weekly limit", usedPercent: 18, resetsAt: monday.toISOString() }
|
|
8144
8171
|
]
|
|
8172
|
+
},
|
|
8173
|
+
// The second login (demo-accounts.ts): little used this week, read a while ago.
|
|
8174
|
+
{
|
|
8175
|
+
account: "work",
|
|
8176
|
+
at: new Date(now - 3 * 36e5).toISOString(),
|
|
8177
|
+
windows: [
|
|
8178
|
+
{ id: "five_hour", label: "5-hour limit", usedPercent: 6, resetsAt: new Date(now + 4 * 36e5).toISOString() },
|
|
8179
|
+
{ id: "seven_day", label: "Weekly limit", usedPercent: 3, resetsAt: monday.toISOString() }
|
|
8180
|
+
]
|
|
8145
8181
|
}
|
|
8146
8182
|
]
|
|
8147
8183
|
}
|
|
@@ -8612,13 +8648,13 @@ async function startDemoServer(opts) {
|
|
|
8612
8648
|
(c) => c.json({
|
|
8613
8649
|
sessions: scenario.list().filter((w) => c.req.query("archived") === "1" || !w.archivedAt).map((w) => {
|
|
8614
8650
|
const out = draftsFor(w.id) ? { ...w, replyDrafts: draftsFor(w.id) } : { ...w };
|
|
8615
|
-
const
|
|
8651
|
+
const z8 = snoozes.get(w.id);
|
|
8616
8652
|
const waiting = (blocks.get(w.id) ?? []).filter(
|
|
8617
8653
|
(b) => b.kind === "pr" || scenario.list().some((x) => x.id === b.sessionId && !x.archivedAt)
|
|
8618
8654
|
);
|
|
8619
8655
|
const withBlocks = waiting.length ? { ...out, blockedBy: waiting } : out;
|
|
8620
8656
|
const noted = notes.has(w.id) ? { ...withBlocks, hasNote: true } : withBlocks;
|
|
8621
|
-
return
|
|
8657
|
+
return z8 && snoozeActive(z8, noted) ? { ...noted, snoozed: { until: z8.until } } : noted;
|
|
8622
8658
|
})
|
|
8623
8659
|
})
|
|
8624
8660
|
);
|
|
@@ -8626,13 +8662,13 @@ async function startDemoServer(opts) {
|
|
|
8626
8662
|
const body = await json2(c);
|
|
8627
8663
|
const w = scenario.list().find((x) => x.id === c.req.param("id"));
|
|
8628
8664
|
if (!w) return notFound(c);
|
|
8629
|
-
let
|
|
8630
|
-
if (typeof body.until === "string")
|
|
8631
|
-
else if (body.for === "2h" || body.for === "tomorrow" || body.for === "change")
|
|
8665
|
+
let z8;
|
|
8666
|
+
if (typeof body.until === "string") z8 = snoozeUntil(body.until, new Date(scenario.clockMs()));
|
|
8667
|
+
else if (body.for === "2h" || body.for === "tomorrow" || body.for === "change") z8 = snoozeFor(body.for, w);
|
|
8632
8668
|
else return c.json({ error: "for: '2h', 'tomorrow' or 'change', or until: a time" }, 400);
|
|
8633
|
-
if (!
|
|
8634
|
-
snoozes.set(w.id,
|
|
8635
|
-
return c.json({ ok: true, snooze:
|
|
8669
|
+
if (!z8) return c.json({ error: "not a time to snooze until: give one in the next 30 days" }, 400);
|
|
8670
|
+
snoozes.set(w.id, z8);
|
|
8671
|
+
return c.json({ ok: true, snooze: z8 });
|
|
8636
8672
|
});
|
|
8637
8673
|
app.delete("/api/sessions/:id/snooze", (c) => {
|
|
8638
8674
|
snoozes.delete(c.req.param("id"));
|
|
@@ -8988,7 +9024,9 @@ async function startDemoServer(opts) {
|
|
|
8988
9024
|
if (typeof body.target !== "string" || !body.target) return c.json({ error: "target is required" }, 400);
|
|
8989
9025
|
const branch = typeof body.branch === "string" && body.branch.trim() ? body.branch.trim() : "main";
|
|
8990
9026
|
const prompt = typeof body.prompt === "string" && body.prompt.trim() ? body.prompt.trim() : void 0;
|
|
8991
|
-
const
|
|
9027
|
+
const account = typeof body.account === "string" && body.account ? body.account : void 0;
|
|
9028
|
+
if (account !== void 0 && !isDemoAccount(account)) return c.json({ error: `Unknown Claude Code account: ${account}` }, 400);
|
|
9029
|
+
const s = scenario.create(body.target, branch, prompt, void 0, account);
|
|
8992
9030
|
return c.json({ sessionId: s.id, launchDir: s.paths[0], paths: s.paths, ...prompt ? { started: "started" } : {} });
|
|
8993
9031
|
});
|
|
8994
9032
|
const demoTime = createDemoTime(() => scenario.clockMs());
|
|
@@ -9147,6 +9185,18 @@ async function startDemoServer(opts) {
|
|
|
9147
9185
|
whatsNew: demoSeen === "2.1.0" ? null : "2.1.0"
|
|
9148
9186
|
});
|
|
9149
9187
|
app.get("/api/usage", (c) => c.json(demoUsage()));
|
|
9188
|
+
app.get("/api/accounts", (c) => c.json(DEMO_ACCOUNTS));
|
|
9189
|
+
app.post("/api/sessions/:id/account", async (c) => {
|
|
9190
|
+
const to = (await json2(c)).to;
|
|
9191
|
+
if (typeof to !== "string" || !to) return c.json({ error: "to is required" }, 400);
|
|
9192
|
+
const r = scenario.switchAccount(c.req.param("id"), to);
|
|
9193
|
+
if (!r) return notFound(c);
|
|
9194
|
+
return r.ok ? c.json(r.body) : c.json({ error: r.error }, r.status);
|
|
9195
|
+
});
|
|
9196
|
+
app.delete(
|
|
9197
|
+
"/api/sessions/:id/account",
|
|
9198
|
+
(c) => scenario.sessions.has(c.req.param("id")) ? c.json({ error: "no switch is waiting for its turn" }, 409) : notFound(c)
|
|
9199
|
+
);
|
|
9150
9200
|
app.get("/api/updates", (c) => c.json(demoUpdates()));
|
|
9151
9201
|
app.post("/api/updates/check", (c) => c.json(demoUpdates()));
|
|
9152
9202
|
app.post("/api/updates/restart", (c) => c.json({ error: "No downloaded update to restart into." }, 409));
|
|
@@ -9361,6 +9411,18 @@ async function installAgentHooks(lean, onError = () => () => {
|
|
|
9361
9411
|
await agent.events.install(lean ? LEAN_HOOKS : FULL_HOOKS, lean ? [] : LEGACY_HOOKS).catch(onError(agent.name));
|
|
9362
9412
|
}
|
|
9363
9413
|
}
|
|
9414
|
+
async function reinstallAgentSetup(lean) {
|
|
9415
|
+
await installAgentHooks(lean, (name) => swallow(`install ${name} hooks`));
|
|
9416
|
+
await setupAgentUsage(knownAgents(), loadConfig(), lean);
|
|
9417
|
+
}
|
|
9418
|
+
function startAccountSetupSync(lean, o = {}) {
|
|
9419
|
+
return startAccountSync({
|
|
9420
|
+
folders: () => (o.folders ?? agentAccountFolders)().filter((dir) => fs16.existsSync(dir)),
|
|
9421
|
+
apply: o.apply ?? (() => reinstallAgentSetup(lean)),
|
|
9422
|
+
onError: swallow("set up a changed Claude account"),
|
|
9423
|
+
...o.everyMs !== void 0 ? { everyMs: o.everyMs } : {}
|
|
9424
|
+
});
|
|
9425
|
+
}
|
|
9364
9426
|
function removeAgentHooksSync(lean) {
|
|
9365
9427
|
const ours = (lean ? LEAN_HOOKS : FULL_HOOKS).map(({ owner, edge }) => ({ owner, edge }));
|
|
9366
9428
|
for (const agent of hookedAgents()) bestEffort(`remove ${agent.name} hooks`, () => agent.events.removeSync([...ours, ...LEGACY_HOOKS]));
|
|
@@ -9513,7 +9575,9 @@ var webCommand = {
|
|
|
9513
9575
|
}
|
|
9514
9576
|
await installAgentHooks(lean, (name) => swallow(`install ${name} hooks`));
|
|
9515
9577
|
await setupAgentUsage(knownAgents(), loadConfig(), lean).catch(swallow("set up the usage readings"));
|
|
9578
|
+
const accountSync = startAccountSetupSync(lean);
|
|
9516
9579
|
shutdown = () => {
|
|
9580
|
+
accountSync.stop();
|
|
9517
9581
|
info(chalk.gray("\nStopping work web."));
|
|
9518
9582
|
clearWebDiscovery(process.pid);
|
|
9519
9583
|
removeAgentHooksSync(lean);
|
|
@@ -9641,8 +9705,10 @@ export {
|
|
|
9641
9705
|
LEAN_HOOKS,
|
|
9642
9706
|
LEGACY_HOOKS,
|
|
9643
9707
|
installAgentHooks,
|
|
9708
|
+
reinstallAgentSetup,
|
|
9644
9709
|
removeAgentHooksSync,
|
|
9710
|
+
startAccountSetupSync,
|
|
9645
9711
|
stopExisting,
|
|
9646
9712
|
webCommand
|
|
9647
9713
|
};
|
|
9648
|
-
//# sourceMappingURL=web-
|
|
9714
|
+
//# sourceMappingURL=web-6QSSPH4I.js.map
|