@moberg_hr/work-tree 2.14.1 → 2.16.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-GOU2FC56.js → account-MYGAXTF6.js} +31 -30
- package/dist/account-MYGAXTF6.js.map +1 -0
- package/dist/{add-repo-PHD76M4S.js → add-repo-7PLONSB6.js} +30 -29
- package/dist/{add-repo-PHD76M4S.js.map → add-repo-7PLONSB6.js.map} +1 -1
- package/dist/{answer-HUVZ3XMW.js → answer-H3D6OLHJ.js} +19 -18
- package/dist/{answer-HUVZ3XMW.js.map → answer-H3D6OLHJ.js.map} +1 -1
- package/dist/{attach-RJ53ABQN.js → attach-Z2HEZVZW.js} +26 -26
- package/dist/bin.js +9 -7
- package/dist/bin.js.map +1 -1
- package/dist/{block-W34JH22B.js → block-BWRLOTSM.js} +24 -23
- package/dist/{block-W34JH22B.js.map → block-BWRLOTSM.js.map} +1 -1
- package/dist/{broadcast-7YTINXQF.js → broadcast-RY6NAYGN.js} +16 -15
- package/dist/{broadcast-7YTINXQF.js.map → broadcast-RY6NAYGN.js.map} +1 -1
- package/dist/{catchup-5HC52SDK.js → catchup-K5ICNWDH.js} +22 -21
- package/dist/{catchup-5HC52SDK.js.map → catchup-K5ICNWDH.js.map} +1 -1
- package/dist/{chunk-WAZCBD7Y.js → chunk-2CVBAJH7.js} +3 -3
- package/dist/{chunk-X5XVXJ4B.js → chunk-2H3H23W5.js} +2 -2
- package/dist/{chunk-7ZL3GJGY.js → chunk-2L2TNYQA.js} +4 -4
- package/dist/{chunk-6MUKE253.js → chunk-3JANKWY2.js} +4 -4
- package/dist/{chunk-VLUME72O.js → chunk-3L5VDONX.js} +4 -4
- package/dist/chunk-3OMFMSZ4.js +9 -0
- package/dist/{chunk-RUIBZ6DI.js → chunk-42WCSVBK.js} +5 -5
- package/dist/chunk-42WCSVBK.js.map +1 -0
- package/dist/{chunk-JQ42ERH3.js → chunk-44UME4JD.js} +2 -2
- package/dist/{chunk-KJY2AJQS.js → chunk-45QJQIWF.js} +12 -12
- package/dist/chunk-45QJQIWF.js.map +1 -0
- package/dist/{chunk-2K44PZRP.js → chunk-473UMEVN.js} +60 -59
- package/dist/chunk-473UMEVN.js.map +1 -0
- package/dist/{chunk-AYHDJMMJ.js → chunk-4CXUVBOD.js} +2 -2
- package/dist/{chunk-Z3T5FWM6.js → chunk-4HNMJIUZ.js} +2 -2
- package/dist/{chunk-MKJH2D4V.js → chunk-4NIOURHZ.js} +2 -2
- package/dist/{chunk-T7K276XW.js → chunk-4YO2PDUC.js} +6 -6
- package/dist/{chunk-AU27USPZ.js → chunk-5ZCCUM75.js} +2 -2
- package/dist/{chunk-UTBIZ6W5.js → chunk-63NT2NZD.js} +7 -7
- package/dist/{chunk-RRNIJ7YO.js → chunk-ALBTIOP3.js} +3 -3
- package/dist/{chunk-UIG3CTXU.js → chunk-C5F36EGT.js} +8 -8
- package/dist/{chunk-MOTKVMGL.js → chunk-C6TKUX7I.js} +30 -5
- package/dist/chunk-C6TKUX7I.js.map +1 -0
- package/dist/{chunk-DWEW7I53.js → chunk-CJQPKHDO.js} +9 -9
- package/dist/{chunk-RVSRZ57P.js → chunk-CNZV3UCM.js} +2 -2
- package/dist/{chunk-CBCOVIXZ.js → chunk-DOYJR2HF.js} +5 -3
- package/dist/{chunk-CBCOVIXZ.js.map → chunk-DOYJR2HF.js.map} +1 -1
- package/dist/{chunk-LSZ6HI3U.js → chunk-EORL2V7P.js} +2 -2
- package/dist/{chunk-EHUKDUNJ.js → chunk-EQJZ2GXX.js} +7 -7
- package/dist/{chunk-UI45HNNQ.js → chunk-EVZUJLZH.js} +9 -9
- package/dist/{chunk-5D5V4P7J.js → chunk-EX6ELNTN.js} +5 -5
- package/dist/chunk-F2ECTTSY.js +22 -0
- package/dist/chunk-F2ECTTSY.js.map +1 -0
- package/dist/{chunk-AGRUEZQX.js → chunk-GNIYYXQX.js} +2 -2
- package/dist/{chunk-ERXXU72V.js → chunk-GT3KUREW.js} +7 -7
- package/dist/{chunk-Y2DBNXZH.js → chunk-H3WBTKPB.js} +291 -114
- package/dist/chunk-H3WBTKPB.js.map +1 -0
- package/dist/chunk-HK6AZQ5Z.js +54 -0
- package/dist/chunk-HK6AZQ5Z.js.map +1 -0
- package/dist/{chunk-ULI3NB4J.js → chunk-HT52LVYU.js} +7 -7
- package/dist/{chunk-RCWQD32G.js → chunk-HWMQV4YD.js} +5 -5
- package/dist/{chunk-MUCUSF6Y.js → chunk-I5YQ7AC5.js} +3 -3
- package/dist/{chunk-6THUVP6T.js → chunk-IAKOKZYW.js} +13 -27
- package/dist/chunk-IAKOKZYW.js.map +1 -0
- package/dist/{chunk-TUDDISCX.js → chunk-ICEP4WAK.js} +4 -4
- package/dist/{chunk-FLY3VR6B.js → chunk-IKGSTBTG.js} +3 -2
- package/dist/chunk-IKGSTBTG.js.map +1 -0
- package/dist/{chunk-7UXV4X2Y.js → chunk-IPHADNF5.js} +2 -2
- package/dist/{chunk-K5EAVRXX.js → chunk-JYWX2N5W.js} +4 -6
- package/dist/{chunk-K5EAVRXX.js.map → chunk-JYWX2N5W.js.map} +1 -1
- package/dist/chunk-KL7RY6UG.js +36 -0
- package/dist/chunk-KL7RY6UG.js.map +1 -0
- package/dist/{chunk-YXUVNSDM.js → chunk-LBPYBBXX.js} +2 -2
- package/dist/{chunk-6AJFOISA.js → chunk-LMD2J2JN.js} +4 -4
- package/dist/{chunk-T26N4I4E.js → chunk-LMSKMRNU.js} +11 -11
- package/dist/chunk-LMSKMRNU.js.map +1 -0
- package/dist/{chunk-2Y2ARDXI.js → chunk-MD6QMSXQ.js} +2 -2
- package/dist/{chunk-TNKBZIR5.js → chunk-MH4D37RT.js} +3 -3
- package/dist/{chunk-U2MOKVPZ.js → chunk-MHL66TIL.js} +2 -2
- package/dist/{chunk-GDR4RWF4.js → chunk-N5P2OY5O.js} +2 -2
- package/dist/{chunk-BPAV2PIE.js → chunk-NIAXRF5E.js} +2 -2
- package/dist/{chunk-NCXRMJGS.js → chunk-O2IARWVM.js} +9 -6
- package/dist/chunk-O2IARWVM.js.map +1 -0
- package/dist/{chunk-BXVBNYQT.js → chunk-OA3TYOAY.js} +4 -4
- package/dist/{chunk-DPO6I7OR.js → chunk-P5633SI2.js} +12 -12
- package/dist/{chunk-AKDTLWWD.js → chunk-PJPYRXKJ.js} +8 -8
- package/dist/{chunk-UH72CZAX.js → chunk-PZ7WTBSI.js} +2 -2
- package/dist/{chunk-ZS7ZXAXB.js → chunk-QOSAWNOU.js} +66 -2
- package/dist/chunk-QOSAWNOU.js.map +1 -0
- package/dist/{chunk-XSI4WZIX.js → chunk-QTUYNY3F.js} +5 -5
- package/dist/{chunk-UY5J2KY2.js → chunk-QUL26RYB.js} +32 -22
- package/dist/chunk-QUL26RYB.js.map +1 -0
- package/dist/{chunk-RCBDG7CW.js → chunk-R5DHVUA2.js} +4 -3
- package/dist/{chunk-RCBDG7CW.js.map → chunk-R5DHVUA2.js.map} +1 -1
- package/dist/{chunk-BK73QU45.js → chunk-REPFZIPP.js} +27 -8
- package/dist/chunk-REPFZIPP.js.map +1 -0
- package/dist/{chunk-CWWWZRMN.js → chunk-RJAGFLAP.js} +3 -3
- package/dist/{chunk-PJQRSOLE.js → chunk-SMARTMBW.js} +4 -4
- package/dist/{chunk-ZLQGKBBE.js → chunk-SRE4CK6Y.js} +2 -2
- package/dist/{chunk-LKJLUSYR.js → chunk-SRGOCF73.js} +3 -3
- package/dist/{chunk-MQQADIRH.js → chunk-SSXKC635.js} +4 -4
- package/dist/{chunk-S43GVNRB.js → chunk-SWAFQ343.js} +8 -8
- package/dist/{chunk-TMBO55MM.js → chunk-SZAD5U3J.js} +2 -2
- package/dist/{chunk-ZIFWZJ7X.js → chunk-T5GJVUSL.js} +2 -2
- package/dist/{chunk-DZ6SLAIZ.js → chunk-TC3H7I6O.js} +2 -2
- package/dist/{chunk-5SMTFIYI.js → chunk-TLXZUE4T.js} +7 -7
- package/dist/{chunk-5U3CSRV5.js → chunk-UAXKMJYA.js} +9 -9
- package/dist/{chunk-FLQOSWVR.js → chunk-UN33JXAD.js} +140 -53
- package/dist/chunk-UN33JXAD.js.map +1 -0
- package/dist/{chunk-4B2UV6JH.js → chunk-VH6EUWX7.js} +26 -24
- package/dist/chunk-VH6EUWX7.js.map +1 -0
- package/dist/{chunk-G2V2V5UC.js → chunk-VHENFC2S.js} +2 -2
- package/dist/{chunk-7XKIRMS4.js → chunk-VHYFFFZU.js} +2 -2
- package/dist/{chunk-7UIRKGY7.js → chunk-WLU7EWPD.js} +21 -16
- package/dist/chunk-WLU7EWPD.js.map +1 -0
- package/dist/{chunk-PAEWU7UC.js → chunk-WMIQOBHU.js} +8 -8
- package/dist/{chunk-GSL6ZBQX.js → chunk-WPHTWUNV.js} +23 -18
- package/dist/{chunk-GSL6ZBQX.js.map → chunk-WPHTWUNV.js.map} +1 -1
- package/dist/{chunk-MKQ7IA6U.js → chunk-XBWS77S2.js} +3 -3
- package/dist/{chunk-AAOAVXBF.js → chunk-XHUKX3HO.js} +8 -8
- package/dist/{chunk-A3R3VO6G.js → chunk-XHVRFFOY.js} +6 -6
- package/dist/{chunk-JNKFPFH6.js → chunk-XIOGNTUA.js} +3 -3
- package/dist/{chunk-S2CQ73G4.js → chunk-YLB2QGAR.js} +5 -5
- package/dist/{chunk-RE3NKV4Z.js → chunk-Z3HC36JK.js} +3 -3
- package/dist/{chunk-LCUN2I5Q.js → chunk-ZAAWSVTU.js} +11 -9
- package/dist/{chunk-LCUN2I5Q.js.map → chunk-ZAAWSVTU.js.map} +1 -1
- package/dist/{chunk-V72WJIGN.js → chunk-ZWBXRP2V.js} +10 -10
- package/dist/{chunk-SAPDMQTO.js → chunk-ZXDRQ2MV.js} +8 -8
- package/dist/{cleanup-KVZ7P6EN.js → cleanup-HXZ4S2IO.js} +48 -47
- package/dist/{cleanup-KVZ7P6EN.js.map → cleanup-HXZ4S2IO.js.map} +1 -1
- package/dist/cli-GKHHCDRV.js +20 -0
- package/dist/color-E73MIJWD.js +65 -0
- package/dist/color-E73MIJWD.js.map +1 -0
- package/dist/{command-hook-installer-GMQ4IVDE.js → command-hook-installer-TRLJ4QFP.js} +13 -4
- package/dist/{command-hook-installer-GMQ4IVDE.js.map → command-hook-installer-TRLJ4QFP.js.map} +1 -1
- package/dist/{completion-OEU4UZEA.js → completion-SV446DXJ.js} +3 -4
- package/dist/{completion-OEU4UZEA.js.map → completion-SV446DXJ.js.map} +1 -1
- package/dist/{config-JEVEBD3O.js → config-24BNXN5C.js} +21 -20
- package/dist/{config-JEVEBD3O.js.map → config-24BNXN5C.js.map} +1 -1
- package/dist/{diff-3ZGUWMX4.js → diff-NAL5334E.js} +27 -27
- package/dist/{digest-XJYJDGVX.js → digest-NU6XNA7D.js} +18 -17
- package/dist/{digest-XJYJDGVX.js.map → digest-NU6XNA7D.js.map} +1 -1
- package/dist/{fork-AGFYDM5U.js → fork-QVFWYP2Z.js} +44 -44
- package/dist/{history-VYAGUN2X.js → history-W5DQNAY3.js} +15 -14
- package/dist/{hook-PWMF5WBD.js → hook-OIAJHLTJ.js} +27 -29
- package/dist/hook-OIAJHLTJ.js.map +1 -0
- package/dist/{hydrate-PMH6OEVU.js → hydrate-VAJO2JGT.js} +17 -16
- package/dist/{hydrate-PMH6OEVU.js.map → hydrate-VAJO2JGT.js.map} +1 -1
- package/dist/{init-A3J3OC6Y.js → init-2IHQUZ4E.js} +26 -25
- package/dist/{init-A3J3OC6Y.js.map → init-2IHQUZ4E.js.map} +1 -1
- package/dist/install-skills-RJPZOV37.js +24 -0
- package/dist/install-skills-bin.js +13 -12
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{keep-VRBCD2OU.js → keep-IJDON5AL.js} +18 -17
- package/dist/{keep-VRBCD2OU.js.map → keep-IJDON5AL.js.map} +1 -1
- package/dist/{list-WT2YLARZ.js → list-6LPLVUUD.js} +17 -16
- package/dist/{list-WT2YLARZ.js.map → list-6LPLVUUD.js.map} +1 -1
- package/dist/{move-4P2X2VL2.js → move-GY5G47JO.js} +32 -31
- package/dist/{move-4P2X2VL2.js.map → move-GY5G47JO.js.map} +1 -1
- package/dist/{note-INPWMP2K.js → note-6Q3AT7W6.js} +19 -18
- package/dist/{note-INPWMP2K.js.map → note-6Q3AT7W6.js.map} +1 -1
- package/dist/{overlaps-SEMKBXBD.js → overlaps-JQVWZXEB.js} +25 -24
- package/dist/{overlaps-SEMKBXBD.js.map → overlaps-JQVWZXEB.js.map} +1 -1
- package/dist/{pin-4524YHPO.js → pin-MIWOAQ7R.js} +19 -18
- package/dist/{pin-4524YHPO.js.map → pin-MIWOAQ7R.js.map} +1 -1
- package/dist/{pr-CRLSAAGA.js → pr-3F3PJCQN.js} +39 -38
- package/dist/{pr-CRLSAAGA.js.map → pr-3F3PJCQN.js.map} +1 -1
- package/dist/{prune-3XFHACES.js → prune-RKQQWEU6.js} +46 -45
- package/dist/{prune-3XFHACES.js.map → prune-RKQQWEU6.js.map} +1 -1
- package/dist/{pty-host-4NEN3SID.js → pty-host-QTWYR5QT.js} +43 -39
- package/dist/pty-host-QTWYR5QT.js.map +1 -0
- package/dist/{read-TNPMUPCX.js → read-RFLYBHLU.js} +18 -17
- package/dist/{read-TNPMUPCX.js.map → read-RFLYBHLU.js.map} +1 -1
- package/dist/{recent-GUABGTFG.js → recent-R24GG3OG.js} +35 -27
- package/dist/recent-R24GG3OG.js.map +1 -0
- package/dist/{remove-FDXCPMGJ.js → remove-ULIYLBRK.js} +47 -46
- package/dist/{remove-FDXCPMGJ.js.map → remove-ULIYLBRK.js.map} +1 -1
- package/dist/{report-J7TUQRJS.js → report-Z36H65YG.js} +4 -3
- package/dist/{restart-OETITN5N.js → restart-VKQEQEU3.js} +22 -21
- package/dist/{restart-OETITN5N.js.map → restart-VKQEQEU3.js.map} +1 -1
- package/dist/{resume-XDUTFTWV.js → resume-LE3SXWGI.js} +35 -27
- package/dist/resume-LE3SXWGI.js.map +1 -0
- package/dist/{review-EKSF3BUM.js → review-QGBSWK2M.js} +57 -10
- package/dist/review-QGBSWK2M.js.map +1 -0
- package/dist/{review-now-XUEDTNMP.js → review-now-74ISYEFP.js} +7 -6
- package/dist/{review-now-XUEDTNMP.js.map → review-now-74ISYEFP.js.map} +1 -1
- package/dist/{run-INEROJF3.js → run-RXCZSZKP.js} +15 -14
- package/dist/{run-INEROJF3.js.map → run-RXCZSZKP.js.map} +1 -1
- package/dist/{screen-JNM536PR.js → screen-27WNAGP5.js} +19 -18
- package/dist/{screen-JNM536PR.js.map → screen-27WNAGP5.js.map} +1 -1
- package/dist/{search-FOBT55YQ.js → search-OSNZYFMI.js} +15 -14
- package/dist/{search-FOBT55YQ.js.map → search-OSNZYFMI.js.map} +1 -1
- package/dist/{section-7ZGM5YOL.js → section-HIYOC5HZ.js} +19 -18
- package/dist/{section-7ZGM5YOL.js.map → section-HIYOC5HZ.js.map} +1 -1
- package/dist/{send-6X2IKY54.js → send-BFS32VDO.js} +24 -23
- package/dist/{send-6X2IKY54.js.map → send-BFS32VDO.js.map} +1 -1
- package/dist/{sessions-6DLS2JQG.js → sessions-Q5EVPLLK.js} +42 -41
- package/dist/{sessions-6DLS2JQG.js.map → sessions-Q5EVPLLK.js.map} +1 -1
- package/dist/{show-YTJ3NVMP.js → show-JYXEQQM2.js} +18 -17
- package/dist/{show-YTJ3NVMP.js.map → show-JYXEQQM2.js.map} +1 -1
- package/dist/{snooze-7WV4NKX7.js → snooze-YDBFRJYB.js} +18 -17
- package/dist/{snooze-7WV4NKX7.js.map → snooze-YDBFRJYB.js.map} +1 -1
- package/dist/{start-3EE3H4UE.js → start-KWQLMKAL.js} +19 -18
- package/dist/{start-3EE3H4UE.js.map → start-KWQLMKAL.js.map} +1 -1
- package/dist/{state-GPEV4FHA.js → state-NXTIYKP5.js} +6 -5
- package/dist/{state-GPEV4FHA.js.map → state-NXTIYKP5.js.map} +1 -1
- package/dist/{status-DDHIRFAB.js → status-ROO4SRGQ.js} +22 -21
- package/dist/{status-DDHIRFAB.js.map → status-ROO4SRGQ.js.map} +1 -1
- package/dist/statusline-AMFMWPTV.js +67 -0
- package/dist/statusline-AMFMWPTV.js.map +1 -0
- package/dist/{statusline-hook-W7KWKWAC.js → statusline-hook-H5MM2PA2.js} +16 -11
- package/dist/statusline-hook-H5MM2PA2.js.map +1 -0
- package/dist/{stop-DYT5BIRN.js → stop-FMBFJUXI.js} +19 -18
- package/dist/{stop-DYT5BIRN.js.map → stop-FMBFJUXI.js.map} +1 -1
- package/dist/{sync-NOLPKVWO.js → sync-2DVHV7FT.js} +46 -45
- package/dist/{sync-NOLPKVWO.js.map → sync-2DVHV7FT.js.map} +1 -1
- package/dist/{time-WANFTVEE.js → time-LMBQVMQG.js} +24 -23
- package/dist/time-LMBQVMQG.js.map +1 -0
- package/dist/{time-actions-B7YKVDVE.js → time-actions-4GZLAV4C.js} +7 -6
- package/dist/{timesheet-GG5UR2NU.js → timesheet-DWWIBU5Y.js} +27 -26
- package/dist/{timesheet-GG5UR2NU.js.map → timesheet-DWWIBU5Y.js.map} +1 -1
- package/dist/{todo-VBWHS2HU.js → todo-SECMZCGC.js} +7 -6
- package/dist/{todo-VBWHS2HU.js.map → todo-SECMZCGC.js.map} +1 -1
- package/dist/{tree-HYJHJ7HD.js → tree-NH43RR6O.js} +57 -56
- package/dist/tree-NH43RR6O.js.map +1 -0
- package/dist/{update-IMNOHV3J.js → update-THIANISA.js} +28 -27
- package/dist/{update-IMNOHV3J.js.map → update-THIANISA.js.map} +1 -1
- package/dist/{usage-FUWADDO4.js → usage-CZZOI34H.js} +17 -16
- package/dist/{usage-FUWADDO4.js.map → usage-CZZOI34H.js.map} +1 -1
- package/dist/{version-VXE4NJRN.js → version-2YUMQ4EN.js} +12 -13
- package/dist/{version-VXE4NJRN.js.map → version-2YUMQ4EN.js.map} +1 -1
- package/dist/{wait-2U7PLYRS.js → wait-QBBM7MR5.js} +19 -18
- package/dist/{wait-2U7PLYRS.js.map → wait-QBBM7MR5.js.map} +1 -1
- package/dist/wd-bin.js +9 -9
- package/dist/web/assets/{PtyView-s01AhxxX.js → PtyView-CJOk_dgn.js} +2 -2
- package/dist/web/assets/{PtyView-s01AhxxX.js.map → PtyView-CJOk_dgn.js.map} +1 -1
- package/dist/web/assets/index-1hFrx0fV.js +126 -0
- package/dist/web/assets/index-1hFrx0fV.js.map +1 -0
- package/dist/web/assets/index-DXP8G0eh.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-KEQI7DQO.js → web-PHQBICO5.js} +517 -341
- package/dist/web-PHQBICO5.js.map +1 -0
- package/dist/work-command-JHNC4JZK.js +13 -0
- package/dist/work-command-JHNC4JZK.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/plugins/work-tree/skills/work-sessions/SKILL.md +3 -1
- package/dist/account-GOU2FC56.js.map +0 -1
- package/dist/chunk-2K44PZRP.js.map +0 -1
- package/dist/chunk-4B2UV6JH.js.map +0 -1
- package/dist/chunk-6THUVP6T.js.map +0 -1
- package/dist/chunk-7UIRKGY7.js.map +0 -1
- package/dist/chunk-AH5TM3NB.js +0 -21
- package/dist/chunk-AH5TM3NB.js.map +0 -1
- package/dist/chunk-BK73QU45.js.map +0 -1
- package/dist/chunk-DW245WK4.js +0 -74
- package/dist/chunk-DW245WK4.js.map +0 -1
- package/dist/chunk-FLQOSWVR.js.map +0 -1
- package/dist/chunk-FLY3VR6B.js.map +0 -1
- package/dist/chunk-KI26QYWS.js +0 -9
- package/dist/chunk-KJY2AJQS.js.map +0 -1
- package/dist/chunk-MOTKVMGL.js.map +0 -1
- package/dist/chunk-NCXRMJGS.js.map +0 -1
- package/dist/chunk-RUIBZ6DI.js.map +0 -1
- package/dist/chunk-T26N4I4E.js.map +0 -1
- package/dist/chunk-UY5J2KY2.js.map +0 -1
- package/dist/chunk-Y2DBNXZH.js.map +0 -1
- package/dist/chunk-ZS7ZXAXB.js.map +0 -1
- package/dist/cli-SGRXK4G2.js +0 -20
- package/dist/hook-PWMF5WBD.js.map +0 -1
- package/dist/install-skills-QX4OATOS.js +0 -23
- package/dist/pty-host-4NEN3SID.js.map +0 -1
- package/dist/recent-GUABGTFG.js.map +0 -1
- package/dist/resume-XDUTFTWV.js.map +0 -1
- package/dist/review-EKSF3BUM.js.map +0 -1
- package/dist/statusline-QN4AERZC.js +0 -107
- package/dist/statusline-QN4AERZC.js.map +0 -1
- package/dist/statusline-hook-W7KWKWAC.js.map +0 -1
- package/dist/time-WANFTVEE.js.map +0 -1
- package/dist/tree-HYJHJ7HD.js.map +0 -1
- package/dist/web/assets/index-BNHgDFNt.css +0 -1
- package/dist/web/assets/index-DWb77ss2.js +0 -126
- package/dist/web/assets/index-DWb77ss2.js.map +0 -1
- package/dist/web-KEQI7DQO.js.map +0 -1
- /package/dist/{attach-RJ53ABQN.js.map → attach-Z2HEZVZW.js.map} +0 -0
- /package/dist/{chunk-WAZCBD7Y.js.map → chunk-2CVBAJH7.js.map} +0 -0
- /package/dist/{chunk-X5XVXJ4B.js.map → chunk-2H3H23W5.js.map} +0 -0
- /package/dist/{chunk-7ZL3GJGY.js.map → chunk-2L2TNYQA.js.map} +0 -0
- /package/dist/{chunk-6MUKE253.js.map → chunk-3JANKWY2.js.map} +0 -0
- /package/dist/{chunk-VLUME72O.js.map → chunk-3L5VDONX.js.map} +0 -0
- /package/dist/{chunk-KI26QYWS.js.map → chunk-3OMFMSZ4.js.map} +0 -0
- /package/dist/{chunk-JQ42ERH3.js.map → chunk-44UME4JD.js.map} +0 -0
- /package/dist/{chunk-AYHDJMMJ.js.map → chunk-4CXUVBOD.js.map} +0 -0
- /package/dist/{chunk-Z3T5FWM6.js.map → chunk-4HNMJIUZ.js.map} +0 -0
- /package/dist/{chunk-MKJH2D4V.js.map → chunk-4NIOURHZ.js.map} +0 -0
- /package/dist/{chunk-T7K276XW.js.map → chunk-4YO2PDUC.js.map} +0 -0
- /package/dist/{chunk-AU27USPZ.js.map → chunk-5ZCCUM75.js.map} +0 -0
- /package/dist/{chunk-UTBIZ6W5.js.map → chunk-63NT2NZD.js.map} +0 -0
- /package/dist/{chunk-RRNIJ7YO.js.map → chunk-ALBTIOP3.js.map} +0 -0
- /package/dist/{chunk-UIG3CTXU.js.map → chunk-C5F36EGT.js.map} +0 -0
- /package/dist/{chunk-DWEW7I53.js.map → chunk-CJQPKHDO.js.map} +0 -0
- /package/dist/{chunk-RVSRZ57P.js.map → chunk-CNZV3UCM.js.map} +0 -0
- /package/dist/{chunk-LSZ6HI3U.js.map → chunk-EORL2V7P.js.map} +0 -0
- /package/dist/{chunk-EHUKDUNJ.js.map → chunk-EQJZ2GXX.js.map} +0 -0
- /package/dist/{chunk-UI45HNNQ.js.map → chunk-EVZUJLZH.js.map} +0 -0
- /package/dist/{chunk-5D5V4P7J.js.map → chunk-EX6ELNTN.js.map} +0 -0
- /package/dist/{chunk-AGRUEZQX.js.map → chunk-GNIYYXQX.js.map} +0 -0
- /package/dist/{chunk-ERXXU72V.js.map → chunk-GT3KUREW.js.map} +0 -0
- /package/dist/{chunk-ULI3NB4J.js.map → chunk-HT52LVYU.js.map} +0 -0
- /package/dist/{chunk-RCWQD32G.js.map → chunk-HWMQV4YD.js.map} +0 -0
- /package/dist/{chunk-MUCUSF6Y.js.map → chunk-I5YQ7AC5.js.map} +0 -0
- /package/dist/{chunk-TUDDISCX.js.map → chunk-ICEP4WAK.js.map} +0 -0
- /package/dist/{chunk-7UXV4X2Y.js.map → chunk-IPHADNF5.js.map} +0 -0
- /package/dist/{chunk-YXUVNSDM.js.map → chunk-LBPYBBXX.js.map} +0 -0
- /package/dist/{chunk-6AJFOISA.js.map → chunk-LMD2J2JN.js.map} +0 -0
- /package/dist/{chunk-2Y2ARDXI.js.map → chunk-MD6QMSXQ.js.map} +0 -0
- /package/dist/{chunk-TNKBZIR5.js.map → chunk-MH4D37RT.js.map} +0 -0
- /package/dist/{chunk-U2MOKVPZ.js.map → chunk-MHL66TIL.js.map} +0 -0
- /package/dist/{chunk-GDR4RWF4.js.map → chunk-N5P2OY5O.js.map} +0 -0
- /package/dist/{chunk-BPAV2PIE.js.map → chunk-NIAXRF5E.js.map} +0 -0
- /package/dist/{chunk-BXVBNYQT.js.map → chunk-OA3TYOAY.js.map} +0 -0
- /package/dist/{chunk-DPO6I7OR.js.map → chunk-P5633SI2.js.map} +0 -0
- /package/dist/{chunk-AKDTLWWD.js.map → chunk-PJPYRXKJ.js.map} +0 -0
- /package/dist/{chunk-UH72CZAX.js.map → chunk-PZ7WTBSI.js.map} +0 -0
- /package/dist/{chunk-XSI4WZIX.js.map → chunk-QTUYNY3F.js.map} +0 -0
- /package/dist/{chunk-CWWWZRMN.js.map → chunk-RJAGFLAP.js.map} +0 -0
- /package/dist/{chunk-PJQRSOLE.js.map → chunk-SMARTMBW.js.map} +0 -0
- /package/dist/{chunk-ZLQGKBBE.js.map → chunk-SRE4CK6Y.js.map} +0 -0
- /package/dist/{chunk-LKJLUSYR.js.map → chunk-SRGOCF73.js.map} +0 -0
- /package/dist/{chunk-MQQADIRH.js.map → chunk-SSXKC635.js.map} +0 -0
- /package/dist/{chunk-S43GVNRB.js.map → chunk-SWAFQ343.js.map} +0 -0
- /package/dist/{chunk-TMBO55MM.js.map → chunk-SZAD5U3J.js.map} +0 -0
- /package/dist/{chunk-ZIFWZJ7X.js.map → chunk-T5GJVUSL.js.map} +0 -0
- /package/dist/{chunk-DZ6SLAIZ.js.map → chunk-TC3H7I6O.js.map} +0 -0
- /package/dist/{chunk-5SMTFIYI.js.map → chunk-TLXZUE4T.js.map} +0 -0
- /package/dist/{chunk-5U3CSRV5.js.map → chunk-UAXKMJYA.js.map} +0 -0
- /package/dist/{chunk-G2V2V5UC.js.map → chunk-VHENFC2S.js.map} +0 -0
- /package/dist/{chunk-7XKIRMS4.js.map → chunk-VHYFFFZU.js.map} +0 -0
- /package/dist/{chunk-PAEWU7UC.js.map → chunk-WMIQOBHU.js.map} +0 -0
- /package/dist/{chunk-MKQ7IA6U.js.map → chunk-XBWS77S2.js.map} +0 -0
- /package/dist/{chunk-AAOAVXBF.js.map → chunk-XHUKX3HO.js.map} +0 -0
- /package/dist/{chunk-A3R3VO6G.js.map → chunk-XHVRFFOY.js.map} +0 -0
- /package/dist/{chunk-JNKFPFH6.js.map → chunk-XIOGNTUA.js.map} +0 -0
- /package/dist/{chunk-S2CQ73G4.js.map → chunk-YLB2QGAR.js.map} +0 -0
- /package/dist/{chunk-RE3NKV4Z.js.map → chunk-Z3HC36JK.js.map} +0 -0
- /package/dist/{chunk-V72WJIGN.js.map → chunk-ZWBXRP2V.js.map} +0 -0
- /package/dist/{chunk-SAPDMQTO.js.map → chunk-ZXDRQ2MV.js.map} +0 -0
- /package/dist/{cli-SGRXK4G2.js.map → cli-GKHHCDRV.js.map} +0 -0
- /package/dist/{diff-3ZGUWMX4.js.map → diff-NAL5334E.js.map} +0 -0
- /package/dist/{fork-AGFYDM5U.js.map → fork-QVFWYP2Z.js.map} +0 -0
- /package/dist/{history-VYAGUN2X.js.map → history-W5DQNAY3.js.map} +0 -0
- /package/dist/{install-skills-QX4OATOS.js.map → install-skills-RJPZOV37.js.map} +0 -0
- /package/dist/{report-J7TUQRJS.js.map → report-Z36H65YG.js.map} +0 -0
- /package/dist/{time-actions-B7YKVDVE.js.map → time-actions-4GZLAV4C.js.map} +0 -0
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
commentInputSchema,
|
|
4
|
+
detectParentBranch,
|
|
5
|
+
launch,
|
|
6
|
+
readContextLines,
|
|
7
|
+
refuseReason,
|
|
8
|
+
resolveRepoDiff,
|
|
9
|
+
resolveRepoDiffAsync,
|
|
10
|
+
resolveSchema,
|
|
11
|
+
resolveWebRoot,
|
|
12
|
+
serveSpa,
|
|
13
|
+
sessionBaseForPath,
|
|
14
|
+
submitReviewSchema
|
|
15
|
+
} from "./chunk-4YO2PDUC.js";
|
|
2
16
|
import {
|
|
3
17
|
ensureAgentPath,
|
|
4
18
|
restartHost
|
|
5
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WMIQOBHU.js";
|
|
20
|
+
import {
|
|
21
|
+
dropLocalReview,
|
|
22
|
+
readLocalReview,
|
|
23
|
+
saveLocalReview
|
|
24
|
+
} from "./chunk-KL7RY6UG.js";
|
|
6
25
|
import {
|
|
7
26
|
createMonthGather,
|
|
8
27
|
defaultTimeDeps,
|
|
@@ -16,7 +35,7 @@ import {
|
|
|
16
35
|
graphProblem,
|
|
17
36
|
signOutGraph,
|
|
18
37
|
startDeviceLogin
|
|
19
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-45QJQIWF.js";
|
|
20
39
|
import {
|
|
21
40
|
addTask,
|
|
22
41
|
completeTask,
|
|
@@ -24,21 +43,7 @@ import {
|
|
|
24
43
|
getTasks,
|
|
25
44
|
removeTask,
|
|
26
45
|
uncompleteTask
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import {
|
|
29
|
-
commentInputSchema,
|
|
30
|
-
detectParentBranch,
|
|
31
|
-
launch,
|
|
32
|
-
readContextLines,
|
|
33
|
-
refuseReason,
|
|
34
|
-
resolveRepoDiff,
|
|
35
|
-
resolveRepoDiffAsync,
|
|
36
|
-
resolveSchema,
|
|
37
|
-
resolveWebRoot,
|
|
38
|
-
serveSpa,
|
|
39
|
-
sessionBaseForPath,
|
|
40
|
-
submitReviewSchema
|
|
41
|
-
} from "./chunk-T7K276XW.js";
|
|
46
|
+
} from "./chunk-44UME4JD.js";
|
|
42
47
|
import {
|
|
43
48
|
announceChange,
|
|
44
49
|
createArchivedRows,
|
|
@@ -53,25 +58,25 @@ import {
|
|
|
53
58
|
stageSeenKey,
|
|
54
59
|
storeHolding,
|
|
55
60
|
withRestoring
|
|
56
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-WLU7EWPD.js";
|
|
57
62
|
import {
|
|
58
63
|
createDigestSource
|
|
59
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-YLB2QGAR.js";
|
|
60
65
|
import {
|
|
61
66
|
createBuildFoldersJob,
|
|
62
67
|
defaultBranchTidyDeps,
|
|
63
68
|
defaultBuildFoldersDeps,
|
|
64
69
|
deleteMergedBranches,
|
|
65
70
|
findMergedBranches
|
|
66
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-P5633SI2.js";
|
|
67
72
|
import {
|
|
68
73
|
defaultCleanupDeps
|
|
69
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-UAXKMJYA.js";
|
|
70
75
|
import {
|
|
71
76
|
DiffStatCache,
|
|
72
77
|
findOverlaps,
|
|
73
78
|
wantsDiffStat
|
|
74
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-Z3HC36JK.js";
|
|
75
80
|
import {
|
|
76
81
|
sendToSession
|
|
77
82
|
} from "./chunk-KWHHB737.js";
|
|
@@ -80,7 +85,7 @@ import {
|
|
|
80
85
|
readNote,
|
|
81
86
|
saveNote,
|
|
82
87
|
sessionsWithNotes
|
|
83
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-MD6QMSXQ.js";
|
|
84
89
|
import {
|
|
85
90
|
addBlocker,
|
|
86
91
|
allBlocks,
|
|
@@ -92,13 +97,13 @@ import {
|
|
|
92
97
|
removeBlocker,
|
|
93
98
|
sweepBlocks,
|
|
94
99
|
unblockedPrompt
|
|
95
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-OA3TYOAY.js";
|
|
96
101
|
import {
|
|
97
102
|
jiraWorklogPoster,
|
|
98
103
|
logWorkDay,
|
|
99
104
|
loggedDays,
|
|
100
105
|
worklogSettings
|
|
101
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-SRE4CK6Y.js";
|
|
102
107
|
import {
|
|
103
108
|
accountOverview,
|
|
104
109
|
accountSkillsNote,
|
|
@@ -110,25 +115,63 @@ import {
|
|
|
110
115
|
removeAgentAccount,
|
|
111
116
|
setDefaultAgentAccount,
|
|
112
117
|
switchRefusal
|
|
113
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-EVZUJLZH.js";
|
|
114
119
|
import {
|
|
115
120
|
buildUsage,
|
|
116
121
|
realUsageDeps,
|
|
117
122
|
setupAgentUsage
|
|
118
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-C5F36EGT.js";
|
|
119
124
|
import {
|
|
120
125
|
sessionWorkTime
|
|
121
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-I5YQ7AC5.js";
|
|
122
127
|
import "./chunk-UVZITL47.js";
|
|
128
|
+
import {
|
|
129
|
+
removeWorktreeInChild
|
|
130
|
+
} from "./chunk-MH4D37RT.js";
|
|
131
|
+
import {
|
|
132
|
+
archiveMergedSession,
|
|
133
|
+
archiveWaiting,
|
|
134
|
+
defaultArchiveDeps
|
|
135
|
+
} from "./chunk-WPHTWUNV.js";
|
|
136
|
+
import {
|
|
137
|
+
MAX_REPLY_CHARS,
|
|
138
|
+
discardReply,
|
|
139
|
+
draftCounts,
|
|
140
|
+
draftReply,
|
|
141
|
+
isThreadId,
|
|
142
|
+
listReplies,
|
|
143
|
+
markPostedAnswered,
|
|
144
|
+
postReply,
|
|
145
|
+
rememberSent,
|
|
146
|
+
replyFolder,
|
|
147
|
+
replyFolderOnDisk,
|
|
148
|
+
retireResolvedReplies,
|
|
149
|
+
sessionRepoRefs,
|
|
150
|
+
withThreadContext
|
|
151
|
+
} from "./chunk-PJPYRXKJ.js";
|
|
152
|
+
import {
|
|
153
|
+
DEFAULT_TRUSTED_BOTS,
|
|
154
|
+
createCiStore,
|
|
155
|
+
createSeenStores,
|
|
156
|
+
newFeedback,
|
|
157
|
+
openThreadCount,
|
|
158
|
+
openThreadsOf,
|
|
159
|
+
reviewMessage,
|
|
160
|
+
subAgentHint
|
|
161
|
+
} from "./chunk-SSXKC635.js";
|
|
162
|
+
import {
|
|
163
|
+
cleanupVerdict,
|
|
164
|
+
createCleanupJob
|
|
165
|
+
} from "./chunk-AKMPF72Y.js";
|
|
123
166
|
import {
|
|
124
167
|
defaultForkDeps,
|
|
125
168
|
forkSession,
|
|
126
169
|
startSessionWithPrompt
|
|
127
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-ZWBXRP2V.js";
|
|
128
171
|
import {
|
|
129
172
|
addRepoRefusal,
|
|
130
173
|
addedRepoNote
|
|
131
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-LBPYBBXX.js";
|
|
132
175
|
import {
|
|
133
176
|
BehindCache,
|
|
134
177
|
behindMain,
|
|
@@ -144,15 +187,32 @@ import {
|
|
|
144
187
|
stackedOn,
|
|
145
188
|
updateFromBase,
|
|
146
189
|
updateFromMain
|
|
147
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-ZAAWSVTU.js";
|
|
191
|
+
import {
|
|
192
|
+
sessionStatusView,
|
|
193
|
+
shownState
|
|
194
|
+
} from "./chunk-LMD2J2JN.js";
|
|
148
195
|
import {
|
|
149
196
|
askCatchUp,
|
|
150
197
|
cachedCatchUp,
|
|
151
198
|
catchUp,
|
|
152
199
|
catchUpFacts,
|
|
153
200
|
forgetCatchUp
|
|
154
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-HWMQV4YD.js";
|
|
202
|
+
import {
|
|
203
|
+
internalReadOnly,
|
|
204
|
+
runInternal,
|
|
205
|
+
runInternalReadOnly,
|
|
206
|
+
summarizeCheckpoint,
|
|
207
|
+
throttleTrailing
|
|
208
|
+
} from "./chunk-GT3KUREW.js";
|
|
155
209
|
import {
|
|
210
|
+
computeDiff,
|
|
211
|
+
computeRangeDiff,
|
|
212
|
+
parseGitDiff
|
|
213
|
+
} from "./chunk-QTUYNY3F.js";
|
|
214
|
+
import {
|
|
215
|
+
PLACE_PATCH_EXPECTED,
|
|
156
216
|
applyPlacePatch,
|
|
157
217
|
applySectionOp,
|
|
158
218
|
changeRailSections,
|
|
@@ -160,7 +220,16 @@ import {
|
|
|
160
220
|
cleanSectionOp,
|
|
161
221
|
placeSession,
|
|
162
222
|
readRailLayout
|
|
163
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-C6TKUX7I.js";
|
|
224
|
+
import {
|
|
225
|
+
QUEUE_RECHECK_MS,
|
|
226
|
+
busyForRestart,
|
|
227
|
+
createRestarter,
|
|
228
|
+
installedAtCache,
|
|
229
|
+
outdatedPtys,
|
|
230
|
+
restartNotesSummary
|
|
231
|
+
} from "./chunk-TC3H7I6O.js";
|
|
232
|
+
import "./chunk-TNJF7T33.js";
|
|
164
233
|
import {
|
|
165
234
|
DEFAULT_CATCH_UP_DAYS,
|
|
166
235
|
addDays,
|
|
@@ -185,7 +254,7 @@ import {
|
|
|
185
254
|
tempoSetup,
|
|
186
255
|
timeRange,
|
|
187
256
|
updateDay
|
|
188
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-42WCSVBK.js";
|
|
189
258
|
import {
|
|
190
259
|
DISCUSSION_OPEN_MIN_MS,
|
|
191
260
|
LEFT_OVER_SUBMIT,
|
|
@@ -229,7 +298,7 @@ import {
|
|
|
229
298
|
withClaim,
|
|
230
299
|
withFixClaim,
|
|
231
300
|
withoutFixClaim
|
|
232
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-R5DHVUA2.js";
|
|
233
302
|
import {
|
|
234
303
|
asData,
|
|
235
304
|
asDataBlock
|
|
@@ -245,12 +314,12 @@ import {
|
|
|
245
314
|
readWebUrl,
|
|
246
315
|
writeDevWebDiscovery,
|
|
247
316
|
writeWebDiscovery
|
|
248
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-SZAD5U3J.js";
|
|
249
318
|
import {
|
|
250
319
|
checkTools,
|
|
251
320
|
saveFolders,
|
|
252
321
|
setupState
|
|
253
|
-
} from "./chunk-
|
|
322
|
+
} from "./chunk-XHVRFFOY.js";
|
|
254
323
|
import {
|
|
255
324
|
RepoAdminError,
|
|
256
325
|
deleteGroup,
|
|
@@ -262,7 +331,7 @@ import {
|
|
|
262
331
|
setRepoIgnored,
|
|
263
332
|
setReviewMode,
|
|
264
333
|
setScanRoot
|
|
265
|
-
} from "./chunk-
|
|
334
|
+
} from "./chunk-EX6ELNTN.js";
|
|
266
335
|
import {
|
|
267
336
|
freeLeftovers,
|
|
268
337
|
leftoversOf,
|
|
@@ -271,78 +340,17 @@ import {
|
|
|
271
340
|
parsePrRef,
|
|
272
341
|
resolvePrToStart,
|
|
273
342
|
workOnPrPrompt
|
|
274
|
-
} from "./chunk-
|
|
343
|
+
} from "./chunk-TLXZUE4T.js";
|
|
275
344
|
import {
|
|
276
345
|
legacyUnsafeCheck
|
|
277
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-63NT2NZD.js";
|
|
278
347
|
import {
|
|
279
348
|
howToLift
|
|
280
349
|
} from "./chunk-FZHFD2AY.js";
|
|
281
350
|
import {
|
|
282
351
|
agentsBySession,
|
|
283
352
|
summarizeAgents
|
|
284
|
-
} from "./chunk-
|
|
285
|
-
import {
|
|
286
|
-
resolveWorkBinPath
|
|
287
|
-
} from "./chunk-AH5TM3NB.js";
|
|
288
|
-
import {
|
|
289
|
-
editorArgs,
|
|
290
|
-
openUrl
|
|
291
|
-
} from "./chunk-S43GVNRB.js";
|
|
292
|
-
import {
|
|
293
|
-
removeWorktreeInChild
|
|
294
|
-
} from "./chunk-TNKBZIR5.js";
|
|
295
|
-
import {
|
|
296
|
-
archiveMergedSession,
|
|
297
|
-
archiveWaiting,
|
|
298
|
-
defaultArchiveDeps
|
|
299
|
-
} from "./chunk-GSL6ZBQX.js";
|
|
300
|
-
import {
|
|
301
|
-
cleanupVerdict,
|
|
302
|
-
createCleanupJob
|
|
303
|
-
} from "./chunk-AKMPF72Y.js";
|
|
304
|
-
import {
|
|
305
|
-
MAX_REPLY_CHARS,
|
|
306
|
-
discardReply,
|
|
307
|
-
draftCounts,
|
|
308
|
-
draftReply,
|
|
309
|
-
isThreadId,
|
|
310
|
-
listReplies,
|
|
311
|
-
markPostedAnswered,
|
|
312
|
-
postReply,
|
|
313
|
-
rememberSent,
|
|
314
|
-
replyFolder,
|
|
315
|
-
replyFolderOnDisk,
|
|
316
|
-
retireResolvedReplies,
|
|
317
|
-
sessionRepoRefs,
|
|
318
|
-
withThreadContext
|
|
319
|
-
} from "./chunk-AKDTLWWD.js";
|
|
320
|
-
import {
|
|
321
|
-
DEFAULT_TRUSTED_BOTS,
|
|
322
|
-
createCiStore,
|
|
323
|
-
createSeenStores,
|
|
324
|
-
newFeedback,
|
|
325
|
-
openThreadCount,
|
|
326
|
-
openThreadsOf,
|
|
327
|
-
reviewMessage,
|
|
328
|
-
subAgentHint
|
|
329
|
-
} from "./chunk-MQQADIRH.js";
|
|
330
|
-
import {
|
|
331
|
-
sessionStatusView,
|
|
332
|
-
shownState
|
|
333
|
-
} from "./chunk-6AJFOISA.js";
|
|
334
|
-
import {
|
|
335
|
-
internalReadOnly,
|
|
336
|
-
runInternal,
|
|
337
|
-
runInternalReadOnly,
|
|
338
|
-
summarizeCheckpoint,
|
|
339
|
-
throttleTrailing
|
|
340
|
-
} from "./chunk-ERXXU72V.js";
|
|
341
|
-
import {
|
|
342
|
-
computeDiff,
|
|
343
|
-
computeRangeDiff,
|
|
344
|
-
parseGitDiff
|
|
345
|
-
} from "./chunk-XSI4WZIX.js";
|
|
353
|
+
} from "./chunk-RJAGFLAP.js";
|
|
346
354
|
import {
|
|
347
355
|
commandWords,
|
|
348
356
|
describeProcess,
|
|
@@ -351,7 +359,7 @@ import {
|
|
|
351
359
|
normDir,
|
|
352
360
|
runningFromNames,
|
|
353
361
|
runsFrom
|
|
354
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-ICEP4WAK.js";
|
|
355
363
|
import {
|
|
356
364
|
childText,
|
|
357
365
|
createInChild,
|
|
@@ -359,7 +367,7 @@ import {
|
|
|
359
367
|
keyedQueue,
|
|
360
368
|
oneAtATime,
|
|
361
369
|
runWorkChild
|
|
362
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-LMSKMRNU.js";
|
|
363
371
|
import {
|
|
364
372
|
configurePtyPool,
|
|
365
373
|
detachPtyPool,
|
|
@@ -374,6 +382,7 @@ import {
|
|
|
374
382
|
ptyLastOutputMs,
|
|
375
383
|
ptyPid,
|
|
376
384
|
ptyPids,
|
|
385
|
+
ptyTerminals,
|
|
377
386
|
readPtyScreen,
|
|
378
387
|
restartPty,
|
|
379
388
|
resumePersistedSessions,
|
|
@@ -383,43 +392,47 @@ import {
|
|
|
383
392
|
syncPtyPool,
|
|
384
393
|
terminalTicketUrl,
|
|
385
394
|
writeToPty
|
|
386
|
-
} from "./chunk-
|
|
387
|
-
import "./chunk-
|
|
395
|
+
} from "./chunk-QUL26RYB.js";
|
|
396
|
+
import "./chunk-3L5VDONX.js";
|
|
388
397
|
import {
|
|
389
398
|
disposeAllWatchers,
|
|
390
399
|
disposeSessionWatcher,
|
|
391
400
|
findSession as findSession2,
|
|
392
401
|
subscribeSession
|
|
393
|
-
} from "./chunk-
|
|
394
|
-
import "./chunk-
|
|
395
|
-
import "./chunk-
|
|
402
|
+
} from "./chunk-2H3H23W5.js";
|
|
403
|
+
import "./chunk-2CVBAJH7.js";
|
|
404
|
+
import "./chunk-XIOGNTUA.js";
|
|
396
405
|
import {
|
|
397
406
|
teardownWorktree,
|
|
398
407
|
toBaseSpec,
|
|
399
408
|
wouldRefuseRemoval
|
|
400
|
-
} from "./chunk-
|
|
401
|
-
import "./chunk-
|
|
409
|
+
} from "./chunk-VH6EUWX7.js";
|
|
410
|
+
import "./chunk-PZ7WTBSI.js";
|
|
402
411
|
import {
|
|
403
412
|
isWorktreeFolder
|
|
404
|
-
} from "./chunk-
|
|
413
|
+
} from "./chunk-EORL2V7P.js";
|
|
414
|
+
import {
|
|
415
|
+
accountLoginId,
|
|
416
|
+
accountOfLoginId
|
|
417
|
+
} from "./chunk-SJBEIYLK.js";
|
|
405
418
|
import {
|
|
406
419
|
ASSISTANT_ID,
|
|
407
420
|
assistantDir,
|
|
408
421
|
describeView,
|
|
409
422
|
writeAssistantContext
|
|
410
|
-
} from "./chunk-
|
|
423
|
+
} from "./chunk-O2IARWVM.js";
|
|
411
424
|
import "./chunk-7E5XPDKX.js";
|
|
412
|
-
import "./chunk-
|
|
425
|
+
import "./chunk-NIAXRF5E.js";
|
|
413
426
|
import {
|
|
414
427
|
NOTE_NUDGE,
|
|
415
428
|
findSessionForCwd,
|
|
416
429
|
readPendingForSession,
|
|
417
430
|
readPendingForWorktree
|
|
418
|
-
} from "./chunk-
|
|
431
|
+
} from "./chunk-XHUKX3HO.js";
|
|
432
|
+
import "./chunk-ZSHWP2VS.js";
|
|
419
433
|
import {
|
|
420
434
|
getCommentFileStore
|
|
421
|
-
} from "./chunk-
|
|
422
|
-
import "./chunk-ZSHWP2VS.js";
|
|
435
|
+
} from "./chunk-CNZV3UCM.js";
|
|
423
436
|
import {
|
|
424
437
|
createCommentStore
|
|
425
438
|
} from "./chunk-HUXS3VAI.js";
|
|
@@ -435,17 +448,17 @@ import {
|
|
|
435
448
|
stageInputOf,
|
|
436
449
|
withRequiredChecks,
|
|
437
450
|
workElsewhere
|
|
438
|
-
} from "./chunk-
|
|
451
|
+
} from "./chunk-ZXDRQ2MV.js";
|
|
439
452
|
import {
|
|
440
453
|
createSessionBranches
|
|
441
|
-
} from "./chunk-
|
|
454
|
+
} from "./chunk-CJQPKHDO.js";
|
|
442
455
|
import {
|
|
443
456
|
defaultHost,
|
|
444
457
|
hostById,
|
|
445
458
|
hostForRepo,
|
|
446
459
|
hostOfPrUrl,
|
|
447
460
|
originHostname
|
|
448
|
-
} from "./chunk-
|
|
461
|
+
} from "./chunk-HT52LVYU.js";
|
|
449
462
|
import {
|
|
450
463
|
MAX_THREAD_BODY
|
|
451
464
|
} from "./chunk-FGPXMAYU.js";
|
|
@@ -458,16 +471,21 @@ import {
|
|
|
458
471
|
readSessionBranches,
|
|
459
472
|
repoNameOf,
|
|
460
473
|
wasPushed
|
|
461
|
-
} from "./chunk-
|
|
474
|
+
} from "./chunk-SRGOCF73.js";
|
|
475
|
+
import {
|
|
476
|
+
editorArgs,
|
|
477
|
+
openUrl
|
|
478
|
+
} from "./chunk-SWAFQ343.js";
|
|
462
479
|
import {
|
|
463
480
|
enrollProblem,
|
|
464
481
|
groupProblem,
|
|
465
482
|
suggestAlias
|
|
466
|
-
} from "./chunk-
|
|
467
|
-
import "./chunk-
|
|
483
|
+
} from "./chunk-GNIYYXQX.js";
|
|
484
|
+
import "./chunk-T5GJVUSL.js";
|
|
468
485
|
import {
|
|
469
486
|
defaultRunner
|
|
470
|
-
} from "./chunk-
|
|
487
|
+
} from "./chunk-XBWS77S2.js";
|
|
488
|
+
import "./chunk-4CXUVBOD.js";
|
|
471
489
|
import {
|
|
472
490
|
DECISION_MARKER,
|
|
473
491
|
DEFAULT_HOST,
|
|
@@ -479,8 +497,6 @@ import {
|
|
|
479
497
|
archiveRoot,
|
|
480
498
|
archiveSession,
|
|
481
499
|
archivedForMerge,
|
|
482
|
-
bestEffort,
|
|
483
|
-
bestEffortAsync,
|
|
484
500
|
buildDigest,
|
|
485
501
|
cleanSnoozeRequest,
|
|
486
502
|
cleanStageRef,
|
|
@@ -503,10 +519,10 @@ import {
|
|
|
503
519
|
hostName,
|
|
504
520
|
isRestoring,
|
|
505
521
|
lastConversationWriteMs,
|
|
522
|
+
listIssues,
|
|
506
523
|
listScopes,
|
|
507
524
|
loadHistory,
|
|
508
525
|
loadManifest,
|
|
509
|
-
logSwallowed,
|
|
510
526
|
markAgentStopped,
|
|
511
527
|
markScopeEnded,
|
|
512
528
|
markSeen,
|
|
@@ -515,6 +531,7 @@ import {
|
|
|
515
531
|
notifyKindForTransition,
|
|
516
532
|
onArchived,
|
|
517
533
|
onArchivingChange,
|
|
534
|
+
placeBySource,
|
|
518
535
|
prStageOf,
|
|
519
536
|
promptsSince,
|
|
520
537
|
readArchive,
|
|
@@ -551,7 +568,6 @@ import {
|
|
|
551
568
|
stopDev,
|
|
552
569
|
subscribeScope,
|
|
553
570
|
suppressScopeWatch,
|
|
554
|
-
swallow,
|
|
555
571
|
syncConversation,
|
|
556
572
|
syncConversations,
|
|
557
573
|
takeCheckpoint,
|
|
@@ -559,7 +575,7 @@ import {
|
|
|
559
575
|
updateCheckpoint,
|
|
560
576
|
whileRestoring,
|
|
561
577
|
writeArchiveRecord
|
|
562
|
-
} from "./chunk-
|
|
578
|
+
} from "./chunk-UN33JXAD.js";
|
|
563
579
|
import {
|
|
564
580
|
dayKey
|
|
565
581
|
} from "./chunk-NEJVK5CF.js";
|
|
@@ -570,61 +586,53 @@ import {
|
|
|
570
586
|
sessionIdFor,
|
|
571
587
|
tx,
|
|
572
588
|
withDb
|
|
573
|
-
} from "./chunk-
|
|
589
|
+
} from "./chunk-ALBTIOP3.js";
|
|
574
590
|
import {
|
|
575
591
|
packageRoot
|
|
576
592
|
} from "./chunk-LNHSBM4L.js";
|
|
577
593
|
import {
|
|
578
594
|
AccountAdminError,
|
|
595
|
+
RETIRED_HOOK_OWNERS,
|
|
579
596
|
activityRoots,
|
|
580
|
-
agentAccountFolders,
|
|
581
597
|
agentFor,
|
|
582
598
|
agentOf,
|
|
583
599
|
agentWriteMs,
|
|
600
|
+
bestEffort,
|
|
601
|
+
bestEffortAsync,
|
|
584
602
|
checkedOutBranch,
|
|
585
603
|
gitDirs,
|
|
586
604
|
isOwnCheckout,
|
|
587
605
|
knownAgents,
|
|
588
606
|
lineTimeOf,
|
|
589
607
|
liveAgents,
|
|
608
|
+
logSwallowed,
|
|
590
609
|
ownsBranch,
|
|
591
610
|
projectList,
|
|
592
611
|
readJsonlSince,
|
|
593
612
|
refShaFromFiles,
|
|
613
|
+
swallow,
|
|
594
614
|
workingBranch
|
|
595
|
-
} from "./chunk-
|
|
615
|
+
} from "./chunk-H3WBTKPB.js";
|
|
616
|
+
import "./chunk-4HNMJIUZ.js";
|
|
596
617
|
import {
|
|
597
618
|
VERSION
|
|
598
|
-
} from "./chunk-
|
|
619
|
+
} from "./chunk-3OMFMSZ4.js";
|
|
599
620
|
import {
|
|
600
621
|
resolveProjectTarget
|
|
601
|
-
} from "./chunk-
|
|
622
|
+
} from "./chunk-IPHADNF5.js";
|
|
602
623
|
import {
|
|
603
624
|
git
|
|
604
|
-
} from "./chunk-
|
|
625
|
+
} from "./chunk-JYWX2N5W.js";
|
|
605
626
|
import {
|
|
606
627
|
usageDir
|
|
607
|
-
} from "./chunk-
|
|
608
|
-
import "./chunk-BK73QU45.js";
|
|
628
|
+
} from "./chunk-DOYJR2HF.js";
|
|
609
629
|
import {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
createRestarter,
|
|
613
|
-
installedAtCache,
|
|
614
|
-
outdatedPtys,
|
|
615
|
-
restartNotesSummary
|
|
616
|
-
} from "./chunk-DZ6SLAIZ.js";
|
|
617
|
-
import "./chunk-TNJF7T33.js";
|
|
618
|
-
import {
|
|
619
|
-
accountLoginId,
|
|
620
|
-
accountOfLoginId
|
|
621
|
-
} from "./chunk-SJBEIYLK.js";
|
|
622
|
-
import "./chunk-AYHDJMMJ.js";
|
|
623
|
-
import "./chunk-Z3T5FWM6.js";
|
|
630
|
+
resolveWorkBinPath
|
|
631
|
+
} from "./chunk-HK6AZQ5Z.js";
|
|
624
632
|
import {
|
|
625
633
|
DEFAULT_ACCOUNT_NAME,
|
|
626
634
|
accountNameProblem
|
|
627
|
-
} from "./chunk-
|
|
635
|
+
} from "./chunk-2L2TNYQA.js";
|
|
628
636
|
import {
|
|
629
637
|
DEFAULT_ACCOUNT,
|
|
630
638
|
DEFAULT_PROMPTS,
|
|
@@ -632,38 +640,81 @@ import {
|
|
|
632
640
|
getConfigPath,
|
|
633
641
|
isWorkday,
|
|
634
642
|
loadConfig
|
|
635
|
-
} from "./chunk-
|
|
643
|
+
} from "./chunk-IKGSTBTG.js";
|
|
644
|
+
import "./chunk-REPFZIPP.js";
|
|
636
645
|
import {
|
|
637
646
|
bootTime,
|
|
638
647
|
detachHere,
|
|
639
648
|
isPidAlive,
|
|
640
649
|
killTreeAsync,
|
|
641
650
|
recentProcessTable
|
|
642
|
-
} from "./chunk-
|
|
643
|
-
import {
|
|
644
|
-
shellEnv,
|
|
645
|
-
spawn_default
|
|
646
|
-
} from "./chunk-DW245WK4.js";
|
|
651
|
+
} from "./chunk-VHENFC2S.js";
|
|
647
652
|
import {
|
|
648
653
|
explainNotOnPath,
|
|
649
654
|
programPath,
|
|
655
|
+
shellEnv,
|
|
656
|
+
spawn_default,
|
|
650
657
|
takeSlowestSync
|
|
651
|
-
} from "./chunk-
|
|
658
|
+
} from "./chunk-QOSAWNOU.js";
|
|
652
659
|
import {
|
|
653
660
|
atomicWriteFile
|
|
654
661
|
} from "./chunk-D2J3AD6L.js";
|
|
655
662
|
import {
|
|
656
663
|
report
|
|
657
|
-
} from "./chunk-
|
|
664
|
+
} from "./chunk-5ZCCUM75.js";
|
|
665
|
+
import {
|
|
666
|
+
debugLog
|
|
667
|
+
} from "./chunk-IAKOKZYW.js";
|
|
658
668
|
import {
|
|
659
|
-
debugLog,
|
|
660
669
|
getConfigDir
|
|
661
|
-
} from "./chunk-
|
|
670
|
+
} from "./chunk-F2ECTTSY.js";
|
|
662
671
|
|
|
663
672
|
// src/commands/web.ts
|
|
664
|
-
import fs21 from "fs";
|
|
665
673
|
import chalk from "chalk";
|
|
666
674
|
|
|
675
|
+
// src/core/status/startup-question.ts
|
|
676
|
+
function createStartupQuestions(deps) {
|
|
677
|
+
const read = /* @__PURE__ */ new Map();
|
|
678
|
+
return {
|
|
679
|
+
/** The question a session's agent is stopped at, if any. */
|
|
680
|
+
for: (id) => read.get(id)?.found ?? null,
|
|
681
|
+
/**
|
|
682
|
+
* Look again. `changed`: some session's answer differs from before (its row needs a refresh); `asked`: the ones
|
|
683
|
+
* newly found waiting (to say so once). A screen that can't be read is tried again next time.
|
|
684
|
+
*/
|
|
685
|
+
async check(terminals) {
|
|
686
|
+
let changed = false;
|
|
687
|
+
const asked = [];
|
|
688
|
+
const here = new Set(terminals.map((t) => t.id));
|
|
689
|
+
for (const [id, was] of read)
|
|
690
|
+
if (!here.has(id)) {
|
|
691
|
+
read.delete(id);
|
|
692
|
+
if (was.found) changed = true;
|
|
693
|
+
}
|
|
694
|
+
for (const t of terminals) {
|
|
695
|
+
const was = read.get(t.id);
|
|
696
|
+
if (t.turnAt >= (Date.parse(t.startedAt) || 0)) {
|
|
697
|
+
if (was?.found) changed = true;
|
|
698
|
+
read.set(t.id, { key: "turn", found: null });
|
|
699
|
+
continue;
|
|
700
|
+
}
|
|
701
|
+
const key = `${t.startedAt}|${t.lastOutputAt ?? ""}`;
|
|
702
|
+
if (was?.key === key) continue;
|
|
703
|
+
const screen = await deps.screen(t.id).catch(() => null);
|
|
704
|
+
if (screen === null) continue;
|
|
705
|
+
const what = deps.question(t.id, screen);
|
|
706
|
+
const found = what ? { what, since: was?.found?.what === what ? was.found.since : (deps.now?.() ?? /* @__PURE__ */ new Date()).toISOString() } : null;
|
|
707
|
+
if ((was?.found?.what ?? null) !== (found?.what ?? null)) {
|
|
708
|
+
changed = true;
|
|
709
|
+
if (found) asked.push(t.id);
|
|
710
|
+
}
|
|
711
|
+
read.set(t.id, { key, found });
|
|
712
|
+
}
|
|
713
|
+
return { changed, asked };
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
|
|
667
718
|
// src/server/web-server.ts
|
|
668
719
|
import fs18 from "fs";
|
|
669
720
|
|
|
@@ -997,7 +1048,7 @@ function mountCatchUpRoutes(app, opts = {}) {
|
|
|
997
1048
|
const s = findSession2(id);
|
|
998
1049
|
if (!s) return c.json({ error: "unknown session" }, 404);
|
|
999
1050
|
const logged = Object.fromEntries(Object.entries(loggedDays(id)).map(([day, l]) => [day, l.seconds]));
|
|
1000
|
-
return c.json({ configured: !!worklogSettings(loadConfig()), issueKey: s.
|
|
1051
|
+
return c.json({ configured: !!worklogSettings(loadConfig()), issueKey: s.issueKey ?? null, logged });
|
|
1001
1052
|
});
|
|
1002
1053
|
app.post("/api/sessions/:id/worklog", async (c) => {
|
|
1003
1054
|
const id = c.req.param("id");
|
|
@@ -1006,12 +1057,12 @@ function mountCatchUpRoutes(app, opts = {}) {
|
|
|
1006
1057
|
const settings = worklogSettings(loadConfig());
|
|
1007
1058
|
if (!settings)
|
|
1008
1059
|
return c.json({ error: "Jira worklogs are not set up (config jiraWorklog: site, email, and an API token in JIRA_API_TOKEN)." }, 409);
|
|
1009
|
-
if (!s.
|
|
1060
|
+
if (!s.issueKey) return c.json({ error: "this session has no Jira issue" }, 409);
|
|
1010
1061
|
const body = await c.req.json().catch(() => ({}));
|
|
1011
1062
|
const time = await sessionWorkTime(s);
|
|
1012
1063
|
const day = typeof body.day === "string" ? time.byDay.find((d) => d.day === body.day) : time.byDay[0];
|
|
1013
1064
|
if (!day) return c.json({ error: "no work that day to log" }, 409);
|
|
1014
|
-
const r = await logWorkDay(id, s.
|
|
1065
|
+
const r = await logWorkDay(id, s.issueKey, day.day, day.ms, opts.postWorklog?.(settings) ?? jiraWorklogPoster(settings));
|
|
1015
1066
|
if (!r.ok) return c.json({ error: r.error }, r.status);
|
|
1016
1067
|
return c.json(r);
|
|
1017
1068
|
});
|
|
@@ -1350,6 +1401,10 @@ function withFocusNotes(main, passes, paths) {
|
|
|
1350
1401
|
}
|
|
1351
1402
|
return added ? JSON.stringify({ ...o, notes }) : main;
|
|
1352
1403
|
}
|
|
1404
|
+
var MAX_ALSO_CHARS = 2e3;
|
|
1405
|
+
function alsoPoints(also) {
|
|
1406
|
+
return (also ?? "").split(/\r?\n/).map((l) => l.trim()).filter(Boolean);
|
|
1407
|
+
}
|
|
1353
1408
|
function pickChanges(diff, repo) {
|
|
1354
1409
|
const changed = diff.repos.filter((r) => r.files.length > 0);
|
|
1355
1410
|
const picked = repo === void 0 ? changed : changed.filter((r) => r.name === repo);
|
|
@@ -1360,7 +1415,7 @@ function pickChanges(diff, repo) {
|
|
|
1360
1415
|
function localSignature(diff, repo) {
|
|
1361
1416
|
return diffSignature(pickChanges(diff, repo).all);
|
|
1362
1417
|
}
|
|
1363
|
-
async function prepareLocalReview(session, repo, deps) {
|
|
1418
|
+
async function prepareLocalReview(session, repo, deps, also) {
|
|
1364
1419
|
const diff = deps.diff(session);
|
|
1365
1420
|
if (repo !== void 0 && !diff.repos.some((r) => r.name === repo)) throw new Error(`${repo} is not one of this session's repos`);
|
|
1366
1421
|
const { repos, picked, together, all } = pickChanges(diff, repo);
|
|
@@ -1374,7 +1429,8 @@ async function prepareLocalReview(session, repo, deps) {
|
|
|
1374
1429
|
const meta = localMeta(session, picked.map((r) => r.name).join(REPOS_JOIN), diff.resolvedBase, diffSignature(all));
|
|
1375
1430
|
const kinds = kindsOf(files, extras, rules);
|
|
1376
1431
|
const agent = deps.agent;
|
|
1377
|
-
const
|
|
1432
|
+
const asked = also?.trim() ? also.trim() : void 0;
|
|
1433
|
+
const attention = attentionItems(alsoPoints(asked), deps.attention?.(session));
|
|
1378
1434
|
const told = attention.length ? { attention } : {};
|
|
1379
1435
|
const prompt = agent ? reviewPrompt(meta, files, kinds, told) : null;
|
|
1380
1436
|
const tree = prompt && agent && deps.inTree ? await deps.inTree(
|
|
@@ -1396,13 +1452,13 @@ async function prepareLocalReview(session, repo, deps) {
|
|
|
1396
1452
|
const plain = reviewPrompt(meta, files, kinds, { ...opts, ...told });
|
|
1397
1453
|
return plain ? agent(plain).catch(() => null) : null;
|
|
1398
1454
|
};
|
|
1399
|
-
const
|
|
1400
|
-
const focused = together && prompt ? picked.map((r) => r.name).filter((name) =>
|
|
1455
|
+
const askedPaths = promptPaths(kinds);
|
|
1456
|
+
const focused = together && prompt ? picked.map((r) => r.name).filter((name) => askedPaths.some((p) => p.startsWith(`${name}/`))) : [];
|
|
1401
1457
|
const [main, ...passes] = prompt && agent ? await Promise.all([ask(), ...focused.map((name) => ask({ focus: focusLines(name), first: (p) => p.startsWith(`${name}/`) }))]) : [void 0];
|
|
1402
1458
|
const answer = main === void 0 ? void 0 : withFocusNotes(
|
|
1403
1459
|
main,
|
|
1404
1460
|
focused.map((name, i) => ({ repo: name, answer: passes[i] ?? null })),
|
|
1405
|
-
|
|
1461
|
+
askedPaths
|
|
1406
1462
|
);
|
|
1407
1463
|
const review = buildReview(meta, files, extras, answer, {
|
|
1408
1464
|
...rules ? { rules } : {},
|
|
@@ -1412,7 +1468,7 @@ async function prepareLocalReview(session, repo, deps) {
|
|
|
1412
1468
|
ignored
|
|
1413
1469
|
});
|
|
1414
1470
|
const how = !prompt ? void 0 : inTree ? fellBack === 0 ? "read in its folder" : fellBack === passesAsked ? "read from the diff alone (the run in its folder gave no answer)" : `read in its folder (${fellBack} of ${passesAsked} passes from the diff alone: the run in its folder gave no answer)` : tree && "why" in tree ? `read from the diff alone (${tree.why})` : "read from the diff alone";
|
|
1415
|
-
return { review, repo: together ? null : picked[0].name, files, repos, ...how ? { how } : {} };
|
|
1471
|
+
return { review, repo: together ? null : picked[0].name, files, repos, ...how ? { how } : {}, ...asked ? { also: asked } : {} };
|
|
1416
1472
|
}
|
|
1417
1473
|
function localReviewLine(k) {
|
|
1418
1474
|
if (k.status === "running") return "Preparing its review\u2026";
|
|
@@ -1477,6 +1533,7 @@ function createLocalReviews(deps) {
|
|
|
1477
1533
|
at: k.at,
|
|
1478
1534
|
...k.prepared ? { review: k.prepared.review, sent: k.sent, dismissed: k.dismissed } : {},
|
|
1479
1535
|
...k.prepared?.how ? { how: k.prepared.how } : {},
|
|
1536
|
+
...k.prepared?.also ? { also: k.prepared.also } : {},
|
|
1480
1537
|
...k.error ? { error: k.error } : {}
|
|
1481
1538
|
};
|
|
1482
1539
|
const mark = (sessionId, change) => {
|
|
@@ -1490,7 +1547,7 @@ function createLocalReviews(deps) {
|
|
|
1490
1547
|
state: (sessionId) => wire(of(sessionId)),
|
|
1491
1548
|
/** The diff the kept review was made of; null when none is ready. */
|
|
1492
1549
|
files: (sessionId) => of(sessionId)?.prepared?.files ?? null,
|
|
1493
|
-
start(sessionId, session, repo) {
|
|
1550
|
+
start(sessionId, session, repo, also) {
|
|
1494
1551
|
const was = of(sessionId);
|
|
1495
1552
|
if (was?.status === "running") return wire(was);
|
|
1496
1553
|
const running = {
|
|
@@ -1505,7 +1562,7 @@ function createLocalReviews(deps) {
|
|
|
1505
1562
|
};
|
|
1506
1563
|
kept.set(sessionId, running);
|
|
1507
1564
|
lines.delete(sessionId);
|
|
1508
|
-
void deps.prepare(session, repo).then(
|
|
1565
|
+
void deps.prepare(session, repo, also).then(
|
|
1509
1566
|
// Another review: none of its notes is sent or dismissed yet.
|
|
1510
1567
|
// Finished: yours to look at (the tab marks it seen when it shows it).
|
|
1511
1568
|
(p) => ({ status: "ready", repo: p.repo, repos: p.repos, prepared: p, at: now(), sent: [], dismissed: [], seen: false }),
|
|
@@ -1620,7 +1677,10 @@ function mountSessionReviewRoutes(app, deps) {
|
|
|
1620
1677
|
if (session.archivedAt) return c.json({ error: "It is archived: restore it first." }, 409);
|
|
1621
1678
|
const body = await c.req.json().catch(() => ({}));
|
|
1622
1679
|
if (body.repo !== void 0 && typeof body.repo !== "string") return c.json({ error: "repo: string" }, 400);
|
|
1623
|
-
|
|
1680
|
+
if (body.also !== void 0 && typeof body.also !== "string") return c.json({ error: "also: string" }, 400);
|
|
1681
|
+
if (body.also && body.also.length > MAX_ALSO_CHARS)
|
|
1682
|
+
return c.json({ error: `also: at most ${MAX_ALSO_CHARS} characters (points for every review belong in Settings)` }, 400);
|
|
1683
|
+
const started = reviews.start(id, session, body.repo, body.also);
|
|
1624
1684
|
rowChanged();
|
|
1625
1685
|
return c.json(started);
|
|
1626
1686
|
});
|
|
@@ -1960,30 +2020,6 @@ function mountSessionShowRoutes(app, deps) {
|
|
|
1960
2020
|
return { drop: (sessionId) => void shown.close(sessionId) };
|
|
1961
2021
|
}
|
|
1962
2022
|
|
|
1963
|
-
// src/core/review/local-review-store.ts
|
|
1964
|
-
var strings2 = (v) => Array.isArray(v) && v.every((x) => typeof x === "string");
|
|
1965
|
-
function isStoredLocalReview(v) {
|
|
1966
|
-
const o = v;
|
|
1967
|
-
if (!o || typeof o !== "object") return false;
|
|
1968
|
-
const p = o.prepared;
|
|
1969
|
-
return (o.repo === null || typeof o.repo === "string") && strings2(o.repos) && typeof o.at === "string" && strings2(o.sent) && strings2(o.dismissed) && !!p && typeof p === "object" && Array.isArray(p.files) && strings2(p.repos) && !!p.review && typeof p.review === "object" && typeof p.review.headSha === "string" && Array.isArray(p.review.drafts) && Array.isArray(p.review.stories) && Array.isArray(p.review.files);
|
|
1970
|
-
}
|
|
1971
|
-
function readLocalReview(sessionId) {
|
|
1972
|
-
const row = withDb(
|
|
1973
|
-
(d) => d.prepare("SELECT data FROM session_reviews WHERE session_id = ?").get(sessionId)
|
|
1974
|
-
);
|
|
1975
|
-
const v = row ? json.parse(row.data) : null;
|
|
1976
|
-
return isStoredLocalReview(v) ? v : null;
|
|
1977
|
-
}
|
|
1978
|
-
function saveLocalReview(sessionId, review) {
|
|
1979
|
-
withDb(
|
|
1980
|
-
(d) => d.prepare("INSERT OR REPLACE INTO session_reviews (session_id, data) VALUES (?, ?)").run(sessionId, JSON.stringify(review))
|
|
1981
|
-
);
|
|
1982
|
-
}
|
|
1983
|
-
function dropLocalReview(sessionId) {
|
|
1984
|
-
withDb((d) => d.prepare("DELETE FROM session_reviews WHERE session_id = ?").run(sessionId));
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
2023
|
// src/core/review/local-review-tree.ts
|
|
1988
2024
|
import path4 from "path";
|
|
1989
2025
|
var norm2 = (p) => path4.resolve(p).replace(/\\/g, "/").replace(/\/+$/, "");
|
|
@@ -2960,6 +2996,8 @@ var SettingsError = class extends Error {
|
|
|
2960
2996
|
}
|
|
2961
2997
|
};
|
|
2962
2998
|
var SETTING_PATTERNS = {
|
|
2999
|
+
/** A line of `issues.rules` (issue-place.ts's parseIssueRule reads the same shape; a GitHub scope is owner/repo). */
|
|
3000
|
+
issueRule: "^\\s*(?:(?:jira|azure)\\s*:\\s*[^/\\s][^/]*(?:/\\s*\\S.*?)?|github\\s*:\\s*[^/\\s]+/[^/\\s]+)\\s*(?:->|\u2192|=>)\\s*[^\\s(][^(]*?(?:\\s*\\(\\s*(?:[Aa][Uu][Tt][Oo]|[Aa][Ss][Kk])\\s*\\))?\\s*$",
|
|
2963
3001
|
issueKey: "^[A-Z][A-Z0-9]{1,9}-\\d+$",
|
|
2964
3002
|
project: "^[A-Z][A-Z0-9]{1,9}$",
|
|
2965
3003
|
customField: "^customfield_\\d+$",
|
|
@@ -3165,18 +3203,32 @@ var SETTINGS = [
|
|
|
3165
3203
|
kind: { type: "number", min: 1, max: 1e6 },
|
|
3166
3204
|
default: 3e3
|
|
3167
3205
|
},
|
|
3168
|
-
// ----
|
|
3206
|
+
// ---- Issues
|
|
3207
|
+
{
|
|
3208
|
+
path: "issues.rules",
|
|
3209
|
+
section: "Issues",
|
|
3210
|
+
label: "Issues start in",
|
|
3211
|
+
help: 'Which of your projects (a repo or a group) an issue\u2019s work starts in, one rule a line: "jira:PAY -> api" (every issue of the Jira project PAY), "jira:SHOP/checkout -> shop" (issues of SHOP with that component or label; the narrower rule wins), "github:acme/web -> shop" (issues of that GitHub repo). Start on the Issues tab opens with that project filled in. Add "(auto)" after the project \u2014 "jira:PAY -> api (auto)" \u2014 to let the watch start a newly assigned issue of that rule by itself; nothing starts by itself without it. An issue with no (auto) rule is listed with the project it would go in, for you to start.',
|
|
3212
|
+
kind: {
|
|
3213
|
+
type: "list",
|
|
3214
|
+
placeholder: "e.g. jira:PAY -> api",
|
|
3215
|
+
pattern: SETTING_PATTERNS.issueRule,
|
|
3216
|
+
patternError: "isn\u2019t a rule: write source:scope -> project, optionally followed by (auto); the source is one of jira, github, azure"
|
|
3217
|
+
},
|
|
3218
|
+
default: [],
|
|
3219
|
+
when: "the next issue started"
|
|
3220
|
+
},
|
|
3169
3221
|
{
|
|
3170
3222
|
path: "jiraWatch.maxPerDay",
|
|
3171
|
-
section: "
|
|
3223
|
+
section: "Issues",
|
|
3172
3224
|
label: "Most issues the Jira watch starts a day",
|
|
3173
|
-
help: "Newly assigned issues it starts by itself (when it is on, on the
|
|
3225
|
+
help: "Newly assigned issues it starts by itself (when it is on, on the Issues tab).",
|
|
3174
3226
|
kind: { type: "number", min: 0, max: 100 },
|
|
3175
3227
|
default: 5
|
|
3176
3228
|
},
|
|
3177
3229
|
{
|
|
3178
3230
|
path: "jiraWorklog.site",
|
|
3179
|
-
section: "
|
|
3231
|
+
section: "Issues",
|
|
3180
3232
|
label: "Jira site for worklogs",
|
|
3181
3233
|
help: "Where \u2192 PAY-12 writes a worklog, e.g. yourcompany.atlassian.net.",
|
|
3182
3234
|
kind: { type: "text", placeholder: "yourcompany.atlassian.net" },
|
|
@@ -3184,7 +3236,7 @@ var SETTINGS = [
|
|
|
3184
3236
|
},
|
|
3185
3237
|
{
|
|
3186
3238
|
path: "jiraWorklog.email",
|
|
3187
|
-
section: "
|
|
3239
|
+
section: "Issues",
|
|
3188
3240
|
label: "Your Jira email",
|
|
3189
3241
|
help: "Who the worklog is written as.",
|
|
3190
3242
|
kind: { type: "text" },
|
|
@@ -3192,7 +3244,7 @@ var SETTINGS = [
|
|
|
3192
3244
|
},
|
|
3193
3245
|
{
|
|
3194
3246
|
path: "jiraWorklog.tokenEnv",
|
|
3195
|
-
section: "
|
|
3247
|
+
section: "Issues",
|
|
3196
3248
|
label: "Environment variable with the API token",
|
|
3197
3249
|
help: "The token itself is never stored here.",
|
|
3198
3250
|
kind: { type: "text", placeholder: "JIRA_API_TOKEN" },
|
|
@@ -3337,9 +3389,9 @@ var SETTINGS = [
|
|
|
3337
3389
|
"usage.statusLine",
|
|
3338
3390
|
"Archive & usage",
|
|
3339
3391
|
"Read plan limits from Claude's status line",
|
|
3340
|
-
"The Usage meter's source. Off
|
|
3392
|
+
"The Usage meter's source: work's line on the Claudes work starts. Off: they show your own. Your own settings are never changed.",
|
|
3341
3393
|
true,
|
|
3342
|
-
"
|
|
3394
|
+
"when each Claude next starts"
|
|
3343
3395
|
)
|
|
3344
3396
|
];
|
|
3345
3397
|
var settingAt = (path23) => SETTINGS.find((f) => f.path === path23);
|
|
@@ -3700,14 +3752,10 @@ function mountBlockRoutes(app, opts) {
|
|
|
3700
3752
|
});
|
|
3701
3753
|
}
|
|
3702
3754
|
|
|
3703
|
-
// src/server/routes/jira-watch-routes.ts
|
|
3704
|
-
import fs8 from "fs";
|
|
3705
|
-
import path9 from "path";
|
|
3706
|
-
|
|
3707
3755
|
// src/core/jira/jira-prompt.ts
|
|
3708
3756
|
var branchFor = (issue) => `feat/${issue.key}`;
|
|
3709
3757
|
function sessionIsForIssue(s, issue) {
|
|
3710
|
-
return s.
|
|
3758
|
+
return s.issueKey === issue.key || s.branch === branchFor(issue);
|
|
3711
3759
|
}
|
|
3712
3760
|
function jiraPrompt(issue, opts = {}) {
|
|
3713
3761
|
const lines = [
|
|
@@ -3725,6 +3773,58 @@ function jiraPrompt(issue, opts = {}) {
|
|
|
3725
3773
|
return lines.join("\n");
|
|
3726
3774
|
}
|
|
3727
3775
|
|
|
3776
|
+
// src/core/issues/jira-source.ts
|
|
3777
|
+
var JIRA_KEY = /^[A-Z][A-Z0-9_]*-\d+$/;
|
|
3778
|
+
function jiraAsIssue(issue) {
|
|
3779
|
+
return {
|
|
3780
|
+
source: "jira",
|
|
3781
|
+
key: issue.key,
|
|
3782
|
+
summary: issue.summary,
|
|
3783
|
+
status: issue.status,
|
|
3784
|
+
...issue.statusCategory ? { statusCategory: issue.statusCategory } : {},
|
|
3785
|
+
issuetype: issue.issuetype,
|
|
3786
|
+
priority: issue.priority,
|
|
3787
|
+
url: issue.url
|
|
3788
|
+
};
|
|
3789
|
+
}
|
|
3790
|
+
function jiraSource(deps = {}) {
|
|
3791
|
+
const pane = deps.pane ?? fetchJiraPane;
|
|
3792
|
+
const all = deps.all ?? fetchMyIssuesOrThrow;
|
|
3793
|
+
const detail = deps.detail ?? fetchIssueDetail;
|
|
3794
|
+
return {
|
|
3795
|
+
id: "jira",
|
|
3796
|
+
name: "Jira",
|
|
3797
|
+
async mine() {
|
|
3798
|
+
const r = await pane();
|
|
3799
|
+
return { available: r.available, issues: r.issues.map(jiraAsIssue) };
|
|
3800
|
+
},
|
|
3801
|
+
async mineOrThrow() {
|
|
3802
|
+
return (await all()).map(jiraAsIssue);
|
|
3803
|
+
},
|
|
3804
|
+
async detail(key) {
|
|
3805
|
+
const d = await detail(key);
|
|
3806
|
+
return d ? { scope: d.project, facets: [...d.components, ...d.labels], description: d.description, created: d.created } : null;
|
|
3807
|
+
},
|
|
3808
|
+
scopeOf: (key) => JIRA_KEY.test(key) ? key.split("-")[0] : null,
|
|
3809
|
+
isKey: (text) => JIRA_KEY.test(text),
|
|
3810
|
+
branchFor: (issue) => branchFor(issue),
|
|
3811
|
+
prompt: (issue, opts) => jiraPrompt(issue, opts)
|
|
3812
|
+
};
|
|
3813
|
+
}
|
|
3814
|
+
function issueSources() {
|
|
3815
|
+
return [jiraSource()];
|
|
3816
|
+
}
|
|
3817
|
+
|
|
3818
|
+
// src/core/issues/jira-placed.ts
|
|
3819
|
+
var asDetail = (d) => d ? { scope: d.project, facets: [...d.components, ...d.labels] } : d;
|
|
3820
|
+
function placeJira(issue, detail, cfg) {
|
|
3821
|
+
return placeBySource(jiraSource(), issue.key, asDetail(detail), cfg);
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
// src/server/routes/jira-watch-routes.ts
|
|
3825
|
+
import fs8 from "fs";
|
|
3826
|
+
import path9 from "path";
|
|
3827
|
+
|
|
3728
3828
|
// src/core/jira/jira-watch.ts
|
|
3729
3829
|
var START_PER_SWEEP = 2;
|
|
3730
3830
|
var DEFAULT_MAX_PER_DAY = 5;
|
|
@@ -3800,7 +3900,7 @@ function adoptListChange(issues, now = /* @__PURE__ */ new Date()) {
|
|
|
3800
3900
|
function projectHistory(sessions) {
|
|
3801
3901
|
const out = /* @__PURE__ */ new Map();
|
|
3802
3902
|
for (const s of sessions) {
|
|
3803
|
-
const key = s.
|
|
3903
|
+
const key = s.issueKey ?? /\b([A-Za-z][A-Za-z0-9]+)-\d+\b/.exec(s.branch)?.[0];
|
|
3804
3904
|
const project = key ? key.split("-")[0].toUpperCase() : null;
|
|
3805
3905
|
if (!project) continue;
|
|
3806
3906
|
const m = out.get(project) ?? /* @__PURE__ */ new Map();
|
|
@@ -3883,7 +3983,10 @@ async function sweepJira(deps) {
|
|
|
3883
3983
|
continue;
|
|
3884
3984
|
}
|
|
3885
3985
|
const detail = await deps.detail(issue.key);
|
|
3886
|
-
const
|
|
3986
|
+
const placed = deps.place?.(issue, detail) ?? null;
|
|
3987
|
+
const guess = placed ? null : parseChoice(await deps.ask(choicePrompt(issue, detail, targets, history)), targets);
|
|
3988
|
+
const choice = placed ? { target: placed.target, confident: placed.target !== null && placed.auto, reason: placed.reason } : { target: guess.target, confident: false, reason: guess.reason };
|
|
3989
|
+
const why = placed ? placed.target === null ? "your rules don\u2019t settle where it belongs" : "its rule doesn\u2019t say (auto)" : "no rule of yours is about it";
|
|
3887
3990
|
if (!choice.confident || !choice.target) {
|
|
3888
3991
|
saveDecision({
|
|
3889
3992
|
...base,
|
|
@@ -3893,7 +3996,7 @@ async function sweepJira(deps) {
|
|
|
3893
3996
|
reason: choice.reason
|
|
3894
3997
|
});
|
|
3895
3998
|
deps.note?.(
|
|
3896
|
-
`${issue.key}: not
|
|
3999
|
+
`${issue.key}: not started by itself (${why})${choice.target ? `; it would go in ${choice.target}` : ""} \u2014 start it from the Issues tab. ${choice.reason}`,
|
|
3897
4000
|
"info"
|
|
3898
4001
|
);
|
|
3899
4002
|
out.suggested++;
|
|
@@ -3959,7 +4062,7 @@ function mountJiraWatchRoutes(app, opts) {
|
|
|
3959
4062
|
const config = loadConfig();
|
|
3960
4063
|
if (!config) throw new Error("no work config");
|
|
3961
4064
|
const made = await (opts.create ?? createInProcess)(
|
|
3962
|
-
{ target, branch,
|
|
4065
|
+
{ target, branch, issueKey: issue.key, name: `${issue.key} ${issue.summary}`.slice(0, 120) },
|
|
3963
4066
|
config
|
|
3964
4067
|
);
|
|
3965
4068
|
if (!made.ok) throw new Error(made.error || `could not create ${branch} in ${target}`);
|
|
@@ -3983,6 +4086,7 @@ function mountJiraWatchRoutes(app, opts) {
|
|
|
3983
4086
|
detail: fetchIssueDetail,
|
|
3984
4087
|
targets: () => watchTargets(),
|
|
3985
4088
|
sessions: () => loadHistory(),
|
|
4089
|
+
place: (issue, detail) => placeJira(issue, detail, loadConfig()),
|
|
3986
4090
|
ask: (prompt) => runInternal(prompt, 9e4),
|
|
3987
4091
|
start: (target, branch, issue) => start(target, branch, issue, true),
|
|
3988
4092
|
note: (text, level, sessionId) => run2?.note(text, { level, ...sessionId ? { sessionId } : {} }),
|
|
@@ -4015,7 +4119,8 @@ function mountJiraWatchRoutes(app, opts) {
|
|
|
4015
4119
|
nextRunAt = new Date(Date.now() + EVERY_MS).toISOString();
|
|
4016
4120
|
schedule?.next(Date.now() + EVERY_MS);
|
|
4017
4121
|
}
|
|
4018
|
-
|
|
4122
|
+
const at = (tail = "") => [`/api/issues/watch${tail}`, `/api/jira/watch${tail}`];
|
|
4123
|
+
app.on("GET", [...at()], (c) => {
|
|
4019
4124
|
const body = {
|
|
4020
4125
|
settings: readSettings2(),
|
|
4021
4126
|
decisions: listDecisions().filter((d) => d.action !== "baseline").slice(0, 30),
|
|
@@ -4025,7 +4130,7 @@ function mountJiraWatchRoutes(app, opts) {
|
|
|
4025
4130
|
};
|
|
4026
4131
|
return c.json(body);
|
|
4027
4132
|
});
|
|
4028
|
-
app.
|
|
4133
|
+
app.on("PUT", [...at()], async (c) => {
|
|
4029
4134
|
const body = await c.req.json().catch(() => null);
|
|
4030
4135
|
if (typeof body?.enabled !== "boolean") return c.json({ error: "enabled (true/false) required" }, 400);
|
|
4031
4136
|
let current = [];
|
|
@@ -4043,8 +4148,8 @@ function mountJiraWatchRoutes(app, opts) {
|
|
|
4043
4148
|
opts.broadcast("jira-watch-changed", { ts: Date.now() });
|
|
4044
4149
|
return c.json({ settings });
|
|
4045
4150
|
});
|
|
4046
|
-
app.
|
|
4047
|
-
const key = c.req.param("key");
|
|
4151
|
+
app.on("POST", [...at("/:key/start")], async (c) => {
|
|
4152
|
+
const key = c.req.param("key") ?? "";
|
|
4048
4153
|
const body = await c.req.json().catch(() => null);
|
|
4049
4154
|
const target = typeof body?.target === "string" ? body.target : "";
|
|
4050
4155
|
if (!watchTargets().some((t) => t.name === target)) return c.json({ error: "unknown project" }, 400);
|
|
@@ -4071,8 +4176,8 @@ function mountJiraWatchRoutes(app, opts) {
|
|
|
4071
4176
|
return c.json({ error: err.message }, 500);
|
|
4072
4177
|
}
|
|
4073
4178
|
});
|
|
4074
|
-
app.
|
|
4075
|
-
const d = readDecision(c.req.param("key"));
|
|
4179
|
+
app.on("POST", [...at("/:key/dismiss")], (c) => {
|
|
4180
|
+
const d = readDecision(c.req.param("key") ?? "");
|
|
4076
4181
|
if (!d) return c.json({ error: "no such issue" }, 404);
|
|
4077
4182
|
saveDecision({ ...d, action: "dismissed", at: (/* @__PURE__ */ new Date()).toISOString(), reason: "you said not this one" });
|
|
4078
4183
|
opts.broadcast("jira-watch-changed", { ts: Date.now() });
|
|
@@ -4376,13 +4481,48 @@ function mountPanesRoutes(app, opts) {
|
|
|
4376
4481
|
});
|
|
4377
4482
|
}
|
|
4378
4483
|
});
|
|
4484
|
+
let issuesInFlight = null;
|
|
4485
|
+
app.get("/api/issues", async (c) => {
|
|
4486
|
+
issuesInFlight ??= (async () => {
|
|
4487
|
+
const run2 = opts.activity?.start("jira", "Fetching your issues");
|
|
4488
|
+
try {
|
|
4489
|
+
const r = await listIssues(issueSources(), loadConfig());
|
|
4490
|
+
const down = r.sources.filter((s) => !s.available);
|
|
4491
|
+
if (down.length && down.length === r.sources.length)
|
|
4492
|
+
run2?.fail(`${down.map((s) => s.name).join(", ")}: not available or not signed in`);
|
|
4493
|
+
else
|
|
4494
|
+
run2?.done(
|
|
4495
|
+
`${r.issues.length} issue${r.issues.length === 1 ? "" : "s"}${down.length ? ` \xB7 ${down.map((s) => s.name).join(", ")} not available` : ""}`
|
|
4496
|
+
);
|
|
4497
|
+
return r;
|
|
4498
|
+
} catch (err) {
|
|
4499
|
+
run2?.fail(err.message);
|
|
4500
|
+
throw err;
|
|
4501
|
+
} finally {
|
|
4502
|
+
issuesInFlight = null;
|
|
4503
|
+
}
|
|
4504
|
+
})();
|
|
4505
|
+
try {
|
|
4506
|
+
return c.json(await issuesInFlight);
|
|
4507
|
+
} catch (err) {
|
|
4508
|
+
return c.json({ sources: [], issues: [], error: err.message }, 502);
|
|
4509
|
+
}
|
|
4510
|
+
});
|
|
4379
4511
|
let jiraInFlight = null;
|
|
4380
4512
|
app.get("/api/jira", async (c) => {
|
|
4381
4513
|
if (!jiraInFlight) {
|
|
4382
4514
|
jiraInFlight = (async () => {
|
|
4383
4515
|
const run2 = opts.activity?.start("jira", "Fetching your Jira issues");
|
|
4384
4516
|
try {
|
|
4385
|
-
const
|
|
4517
|
+
const got = await fetchJiraPane();
|
|
4518
|
+
const cfg = loadConfig();
|
|
4519
|
+
const r = {
|
|
4520
|
+
...got,
|
|
4521
|
+
issues: got.issues.map((i) => {
|
|
4522
|
+
const placed = placeJira(i, void 0, cfg);
|
|
4523
|
+
return placed?.target ? { ...i, startsIn: placed.target } : i;
|
|
4524
|
+
})
|
|
4525
|
+
};
|
|
4386
4526
|
if (!r.available) run2?.fail("Jira CLI (acli) not available or not logged in");
|
|
4387
4527
|
else run2?.done(`${r.issues.length} issue${r.issues.length === 1 ? "" : "s"}`);
|
|
4388
4528
|
return r;
|
|
@@ -4476,7 +4616,7 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
4476
4616
|
/** Empty or left out: the repo's own checkout, on the branch it has (`work tree <repo>`). */
|
|
4477
4617
|
branch: z4.string().optional(),
|
|
4478
4618
|
base: z4.string().optional(),
|
|
4479
|
-
|
|
4619
|
+
issueKey: z4.string().optional(),
|
|
4480
4620
|
/** Start Claude with this as its first message. */
|
|
4481
4621
|
prompt: z4.string().max(2e4).optional(),
|
|
4482
4622
|
/** Name the session (its title); the branch stays its identity. */
|
|
@@ -4493,7 +4633,7 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
4493
4633
|
return r.ok ? c.json({ pr: r.pr }) : c.json({ error: r.error }, 400);
|
|
4494
4634
|
});
|
|
4495
4635
|
app.post("/api/worktrees", zValidator5("json", createSchema), async (c) => {
|
|
4496
|
-
const { target, base,
|
|
4636
|
+
const { target, base, issueKey, prompt, name } = c.req.valid("json");
|
|
4497
4637
|
const account = c.req.valid("json").account?.trim() || void 0;
|
|
4498
4638
|
const config = loadConfig();
|
|
4499
4639
|
if (!config) return c.json({ error: "no config" }, 400);
|
|
@@ -4502,7 +4642,7 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
4502
4642
|
return c.json({ error: "a base needs a branch to fork (leave both empty to open the repo as it is)" }, 400);
|
|
4503
4643
|
try {
|
|
4504
4644
|
const made = await create(
|
|
4505
|
-
{ target, branch: wanted || void 0, base: base?.trim() ? toBaseSpec(base.trim()) : void 0,
|
|
4645
|
+
{ target, branch: wanted || void 0, base: base?.trim() ? toBaseSpec(base.trim()) : void 0, issueKey, name, account },
|
|
4506
4646
|
config
|
|
4507
4647
|
);
|
|
4508
4648
|
if (!made.ok) return c.json({ error: made.error }, 400);
|
|
@@ -6426,7 +6566,7 @@ function mountRailRoutes(app, opts) {
|
|
|
6426
6566
|
const id = c.req.param("id");
|
|
6427
6567
|
if (!findSession2(id)) return c.json({ error: "unknown session" }, 404);
|
|
6428
6568
|
const patch = cleanPlacePatch(await c.req.json().catch(() => null));
|
|
6429
|
-
if (!patch) return c.json({ error:
|
|
6569
|
+
if (!patch) return c.json({ error: PLACE_PATCH_EXPECTED }, 400);
|
|
6430
6570
|
const r = placeSession(id, patch);
|
|
6431
6571
|
if (!r.ok) return c.json({ error: r.error }, 409);
|
|
6432
6572
|
changed();
|
|
@@ -7378,7 +7518,10 @@ function mountReviewRoutes(app, deps) {
|
|
|
7378
7518
|
const repo = c.req.param("repo");
|
|
7379
7519
|
const n = num3(c.req.param("number"));
|
|
7380
7520
|
if (n === null) return c.json({ error: "not a PR number" }, 400);
|
|
7381
|
-
const
|
|
7521
|
+
const body = await c.req.json().catch(() => ({}));
|
|
7522
|
+
if (body.also !== void 0 && typeof body.also !== "string") return c.json({ error: "also: string" }, 400);
|
|
7523
|
+
if (body.also && body.also.length > MAX_ALSO_CHARS) return c.json({ error: `also: at most ${MAX_ALSO_CHARS} characters` }, 400);
|
|
7524
|
+
const r = await deps.runNow(repo, n, body.also?.trim() || void 0);
|
|
7382
7525
|
changed(repo, n);
|
|
7383
7526
|
return r.ok ? c.json(r.review) : c.json({ error: r.error }, 409);
|
|
7384
7527
|
});
|
|
@@ -7761,10 +7904,10 @@ function createReviewQueue(deps) {
|
|
|
7761
7904
|
return { discussion: { ...got.discussion, ...when ? { updatedAt: when } : {}, at: now().toISOString() } };
|
|
7762
7905
|
}
|
|
7763
7906
|
const setStatus = (meta, status, why, opts = {}) => deps.store.upsert(meta.repo, meta.number, (was) => withStatus(was, meta, status, why, now(), opts));
|
|
7764
|
-
async function aiStep(project, at, prepared, rules, discussion) {
|
|
7907
|
+
async function aiStep(project, at, prepared, rules, discussion, also) {
|
|
7765
7908
|
if (!deps.agent) return { answer: void 0 };
|
|
7766
7909
|
const kinds = kindsOf(prepared.files, prepared.extras, rules);
|
|
7767
|
-
const attention = deps.attention?.(project.alias)
|
|
7910
|
+
const attention = attentionItems(alsoPoints(also), deps.attention?.(project.alias));
|
|
7768
7911
|
const said = { ...discussion ? { discussion } : {}, ...attention.length ? { attention } : {} };
|
|
7769
7912
|
const prompt = reviewPrompt(at, prepared.files, kinds, said);
|
|
7770
7913
|
if (!prompt) return { answer: void 0 };
|
|
@@ -7776,14 +7919,14 @@ function createReviewQueue(deps) {
|
|
|
7776
7919
|
reviewPrompt(at, prepared.files, kinds, { checkout: lines, ...said }) ?? prompt
|
|
7777
7920
|
).catch((err) => ({ answer: null, why: err.message }));
|
|
7778
7921
|
if (inTree?.answer)
|
|
7779
|
-
return { answer: inTree.answer, how: `read in a temporary checkout of the PR${inTree.why ? ` (${inTree.why})` : ""}` };
|
|
7922
|
+
return { answer: inTree.answer, attention, how: `read in a temporary checkout of the PR${inTree.why ? ` (${inTree.why})` : ""}` };
|
|
7780
7923
|
if (inTree?.skipped) fellBack = inTree.why ?? "the checkout run was skipped";
|
|
7781
7924
|
else if (inTree) fellBack = `the checkout run gave no answer${inTree.why ? `: ${inTree.why}` : ""}`;
|
|
7782
7925
|
}
|
|
7783
7926
|
const answer = await deps.agent(prompt).catch(() => null);
|
|
7784
|
-
return { answer, how: `read from the diff alone (${fellBack})` };
|
|
7927
|
+
return { answer, attention, how: `read from the diff alone (${fellBack})` };
|
|
7785
7928
|
}
|
|
7786
|
-
async function prepareOne(project, meta, size, auto, note) {
|
|
7929
|
+
async function prepareOne(project, meta, size, auto, note, also) {
|
|
7787
7930
|
const k = key(meta.repo, meta.number);
|
|
7788
7931
|
active.add(k);
|
|
7789
7932
|
try {
|
|
@@ -7819,13 +7962,15 @@ function createReviewQueue(deps) {
|
|
|
7819
7962
|
`${meta.repo} #${meta.number}: couldn't read its discussion (${read.why}); ${discussion ? "the last read stays" : "none shown"}`,
|
|
7820
7963
|
"warn"
|
|
7821
7964
|
);
|
|
7822
|
-
const { answer, how } = await aiStep(project, at, prep, rules, discussion);
|
|
7965
|
+
const { answer, how, attention } = await aiStep(project, at, prep, rules, discussion, also);
|
|
7823
7966
|
const fresh = {
|
|
7824
7967
|
...buildReview(at, prep.files, prep.extras, answer, {
|
|
7825
7968
|
rules,
|
|
7826
7969
|
ignored: split.ignored,
|
|
7827
7970
|
now: now(),
|
|
7828
|
-
notAskedWhy: deps.agent ? void 0 : "no agent for the AI step: stories are by folder"
|
|
7971
|
+
notAskedWhy: deps.agent ? void 0 : "no agent for the AI step: stories are by folder",
|
|
7972
|
+
// What it was asked to pay attention to: said on the review (only when the AI step ran with it).
|
|
7973
|
+
...attention?.length ? { attention } : {}
|
|
7829
7974
|
}),
|
|
7830
7975
|
listedHead: meta.headSha,
|
|
7831
7976
|
mergeBase: prepared.mergeBase,
|
|
@@ -7947,7 +8092,7 @@ function createReviewQueue(deps) {
|
|
|
7947
8092
|
});
|
|
7948
8093
|
return sweeping;
|
|
7949
8094
|
},
|
|
7950
|
-
async runNow(repo, number) {
|
|
8095
|
+
async runNow(repo, number, also) {
|
|
7951
8096
|
const project = deps.projects().find((p) => p.alias === repo);
|
|
7952
8097
|
if (!project) return { ok: false, error: `${repo} isn't one of your repos` };
|
|
7953
8098
|
const host = deps.hostOf(project.path);
|
|
@@ -7957,7 +8102,7 @@ function createReviewQueue(deps) {
|
|
|
7957
8102
|
if (!pr) return { ok: false, error: `#${number} isn't an open pull request of ${repo}` };
|
|
7958
8103
|
const run2 = deps.activity?.start("reviews", `Preparing the review of ${repo} #${number}`);
|
|
7959
8104
|
const note = (text, level = "info") => run2?.note(text, { level });
|
|
7960
|
-
const r = await oneAtATime2(() => prepareOne(project, metaOf(repo, host, pr), pr, false, note));
|
|
8105
|
+
const r = await oneAtATime2(() => prepareOne(project, metaOf(repo, host, pr), pr, false, note, also));
|
|
7961
8106
|
if (r.ok) run2?.done(`prepared${r.how ? `; ${r.how}` : ""}`);
|
|
7962
8107
|
else run2?.fail(r.error);
|
|
7963
8108
|
return r.ok ? { ok: true, review: r.review } : { ok: false, error: r.error };
|
|
@@ -9200,6 +9345,11 @@ function sleepChecks() {
|
|
|
9200
9345
|
|
|
9201
9346
|
// src/server/web-server.ts
|
|
9202
9347
|
var LEFTOVERS_EVERY_MS = 60 * 6e4;
|
|
9348
|
+
var STARTUP_QUESTION_EVERY_MS = 5e3;
|
|
9349
|
+
var startupQuestions = createStartupQuestions({
|
|
9350
|
+
screen: (id) => readPtyScreen(id),
|
|
9351
|
+
question: (id, screen) => agentOf(findSession2(id)).input.startupQuestion?.(screen) ?? null
|
|
9352
|
+
});
|
|
9203
9353
|
var localReviewRow = () => null;
|
|
9204
9354
|
function computeSessionDiff(s, base) {
|
|
9205
9355
|
const resolved = s.paths.map((p) => resolveRepoDiff(p, base, s.baseBranches?.[p] ?? s.baseBranch));
|
|
@@ -9356,6 +9506,7 @@ async function startWebServer(opts = {}) {
|
|
|
9356
9506
|
},
|
|
9357
9507
|
hostedLive: (id) => peekPty(id),
|
|
9358
9508
|
outputStatusFor: (id) => outputStatus(id),
|
|
9509
|
+
startupQuestionFor: (id) => startupQuestions.for(id),
|
|
9359
9510
|
shadowed: (id) => shadow.has(id),
|
|
9360
9511
|
reviewThreadsFor: (id) => reviewThreadsOf(prWatch.state(id)),
|
|
9361
9512
|
prStageFor: (id) => prStageWire(prWatch.state(id), (k) => stageSeen(id).has(k)),
|
|
@@ -9560,6 +9711,26 @@ async function startWebServer(opts = {}) {
|
|
|
9560
9711
|
};
|
|
9561
9712
|
sleepSchedule?.next(Date.now() + SLEEP_EVERY_MS);
|
|
9562
9713
|
const sleepTimer = !jobs ? null : setInterval(() => void sleepIdle(), SLEEP_EVERY_MS);
|
|
9714
|
+
let lookingForQuestions = false;
|
|
9715
|
+
const lookForStartupQuestions = async () => {
|
|
9716
|
+
if (lookingForQuestions) return;
|
|
9717
|
+
lookingForQuestions = true;
|
|
9718
|
+
const { changed, asked } = await startupQuestions.check(ptyTerminals().map((t) => ({ ...t, turnAt: Date.parse(readStatus(t.id)?.updatedAt ?? "") || 0 }))).finally(() => lookingForQuestions = false);
|
|
9719
|
+
if (changed) broadcast("sessions-changed", { ts: Date.now() });
|
|
9720
|
+
for (const id of asked) {
|
|
9721
|
+
const session = findSession2(id);
|
|
9722
|
+
const what = startupQuestions.for(id)?.what;
|
|
9723
|
+
if (session && what)
|
|
9724
|
+
broadcast("notify", {
|
|
9725
|
+
sessionId: id,
|
|
9726
|
+
kind: "needs_input",
|
|
9727
|
+
title: `${session.title || session.branch}: needs you`,
|
|
9728
|
+
body: what
|
|
9729
|
+
});
|
|
9730
|
+
}
|
|
9731
|
+
};
|
|
9732
|
+
const startupTimer = !jobs ? null : setInterval(() => void lookForStartupQuestions().catch(() => void 0), STARTUP_QUESTION_EVERY_MS);
|
|
9733
|
+
startupTimer?.unref?.();
|
|
9563
9734
|
const timeDeps = defaultTimeDeps();
|
|
9564
9735
|
const timeSchedule = !jobs ? null : activity.schedule("time", "Time: today and missing days", TIME_EVERY_MS);
|
|
9565
9736
|
const timeKeeper = !jobs ? null : createTimeKeeper(timeDeps, { activity, changed: () => broadcast("time-changed", {}) });
|
|
@@ -9583,7 +9754,7 @@ async function startWebServer(opts = {}) {
|
|
|
9583
9754
|
});
|
|
9584
9755
|
mountReviewRoutes(app, {
|
|
9585
9756
|
...reviewIo,
|
|
9586
|
-
runNow: (repo, n) => reviewQueue.runNow(repo, n),
|
|
9757
|
+
runNow: (repo, n, also) => reviewQueue.runNow(repo, n, also),
|
|
9587
9758
|
refreshDiscussion: (repo, n) => reviewQueue.refreshDiscussion(repo, n),
|
|
9588
9759
|
broadcast,
|
|
9589
9760
|
// Fix it myself: a session on the PR's branch, made as New worktree makes one, or the live one told by a note.
|
|
@@ -9863,19 +10034,24 @@ async function startWebServer(opts = {}) {
|
|
|
9863
10034
|
mountNoteRoutes(app, { broadcast });
|
|
9864
10035
|
mountSessionShowRoutes(app, { broadcast });
|
|
9865
10036
|
localReviewRow = mountSessionReviewRoutes(app, {
|
|
9866
|
-
prepare: (session, repo) => prepareLocalReview(
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
10037
|
+
prepare: (session, repo, also) => prepareLocalReview(
|
|
10038
|
+
session,
|
|
10039
|
+
repo,
|
|
10040
|
+
{
|
|
10041
|
+
diff: (s) => computeSessionDiff(s, "branch"),
|
|
10042
|
+
agent: (prompt) => runInternal(prompt, 24e4, { lane: "localReviews" }),
|
|
10043
|
+
// Read-only in the session's own folder when the agent can: it then answers what the diff leaves open.
|
|
10044
|
+
inTree: (s, names) => localTreeRun(s.paths, names, {
|
|
10045
|
+
readOnly: internalReadOnly,
|
|
10046
|
+
run: (prompt, cwd, deny) => runInternalReadOnly(prompt, cwd, LOCAL_TREE_TIMEOUT_MS, { lane: "localReviews", deny }),
|
|
10047
|
+
exists: (dir) => fs18.existsSync(dir)
|
|
10048
|
+
}),
|
|
10049
|
+
rules: () => rulesWith(loadConfig()?.reviews?.rules),
|
|
10050
|
+
// Its project's and each of its repos' own points, with the ones for every review.
|
|
10051
|
+
attention: (s) => reviewFocus(loadConfig(), [s.target, ...s.repos ?? []])
|
|
10052
|
+
},
|
|
10053
|
+
also
|
|
10054
|
+
),
|
|
9879
10055
|
signature: (s, repo) => localSignature(computeSessionDiff(s, "branch"), repo ?? void 0),
|
|
9880
10056
|
store: { read: readLocalReview, save: saveLocalReview, drop: dropLocalReview },
|
|
9881
10057
|
tell: noteThroughComments(app),
|
|
@@ -9975,6 +10151,7 @@ async function startWebServer(opts = {}) {
|
|
|
9975
10151
|
if (decayTick) clearInterval(decayTick);
|
|
9976
10152
|
stopPrWatch?.();
|
|
9977
10153
|
if (sleepTimer) clearInterval(sleepTimer);
|
|
10154
|
+
if (startupTimer) clearInterval(startupTimer);
|
|
9978
10155
|
if (conversationsTimer) clearInterval(conversationsTimer);
|
|
9979
10156
|
if (conversationsFirst) clearTimeout(conversationsFirst);
|
|
9980
10157
|
if (updatesFirst) clearTimeout(updatesFirst);
|
|
@@ -10006,37 +10183,44 @@ async function startWebServer(opts = {}) {
|
|
|
10006
10183
|
};
|
|
10007
10184
|
}
|
|
10008
10185
|
|
|
10009
|
-
// src/core/agents/
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10186
|
+
// src/core/agents/hook-migration.ts
|
|
10187
|
+
function agentsOnOldHooks(i) {
|
|
10188
|
+
return i.running.filter((a) => {
|
|
10189
|
+
if (!i.inSession(a.cwd)) return false;
|
|
10190
|
+
if (a.startedAt !== null && a.startedAt >= i.since && !i.fromHost?.(a.pid)) return false;
|
|
10191
|
+
const cmd = i.commandOf(a.pid);
|
|
10192
|
+
return !(cmd && i.startedWithSessionHooks(cmd));
|
|
10193
|
+
});
|
|
10194
|
+
}
|
|
10195
|
+
async function settleAgentHooks(io) {
|
|
10196
|
+
const out = [];
|
|
10197
|
+
let lines = null;
|
|
10198
|
+
for (const agent of (io.agents ?? knownAgents)()) {
|
|
10199
|
+
if (!agent.events) continue;
|
|
10200
|
+
const startedWith = agent.launch.startedWithSessionHooks;
|
|
10201
|
+
const running = agent.live?.running() ?? [];
|
|
10202
|
+
let old = [];
|
|
10203
|
+
if (startedWith && running.length > 0) {
|
|
10204
|
+
lines ??= await io.commandLines().catch(() => /* @__PURE__ */ new Map());
|
|
10205
|
+
const known = lines;
|
|
10206
|
+
old = agentsOnOldHooks({
|
|
10207
|
+
running,
|
|
10208
|
+
commandOf: (pid) => known.get(pid),
|
|
10209
|
+
inSession: io.inSession,
|
|
10210
|
+
since: io.since,
|
|
10211
|
+
fromHost: (pid) => io.hostPids?.().has(pid) ?? false,
|
|
10212
|
+
startedWithSessionHooks: startedWith
|
|
10213
|
+
});
|
|
10022
10214
|
}
|
|
10023
|
-
if (
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
await
|
|
10028
|
-
|
|
10029
|
-
} catch (err) {
|
|
10030
|
-
deps.onError?.(err);
|
|
10031
|
-
return false;
|
|
10032
|
-
} finally {
|
|
10033
|
-
running = false;
|
|
10215
|
+
if (old.length > 0) {
|
|
10216
|
+
await agent.events.bridge();
|
|
10217
|
+
out.push({ agent: agent.id, done: "bridged", waitingOn: old.length });
|
|
10218
|
+
} else {
|
|
10219
|
+
await agent.events.removeInstalled(RETIRED_HOOK_OWNERS);
|
|
10220
|
+
out.push({ agent: agent.id, done: "removed" });
|
|
10034
10221
|
}
|
|
10035
|
-
}
|
|
10036
|
-
|
|
10037
|
-
const timer = every > 0 ? setInterval(() => void check(), every) : null;
|
|
10038
|
-
timer?.unref?.();
|
|
10039
|
-
return { check, stop: () => timer && clearInterval(timer) };
|
|
10222
|
+
}
|
|
10223
|
+
return out;
|
|
10040
10224
|
}
|
|
10041
10225
|
|
|
10042
10226
|
// src/core/platform/autostart.ts
|
|
@@ -12945,15 +13129,15 @@ async function startDemoServer(opts) {
|
|
|
12945
13129
|
const worklogs = /* @__PURE__ */ new Map();
|
|
12946
13130
|
app.get("/api/sessions/:id/worklog", (c) => {
|
|
12947
13131
|
const w = scenario.list().find((x) => x.id === c.req.param("id"));
|
|
12948
|
-
return w ? c.json({ configured: true, issueKey: w.
|
|
13132
|
+
return w ? c.json({ configured: true, issueKey: w.issueKey ?? null, logged: worklogs.get(w.id) ?? {} }) : notFound(c);
|
|
12949
13133
|
});
|
|
12950
13134
|
app.post("/api/sessions/:id/worklog", (c) => {
|
|
12951
13135
|
const w = scenario.list().find((x) => x.id === c.req.param("id"));
|
|
12952
13136
|
if (!w) return notFound(c);
|
|
12953
|
-
if (!w.
|
|
13137
|
+
if (!w.issueKey) return c.json({ error: "this session has no Jira issue" }, 409);
|
|
12954
13138
|
const day = dayKey(scenario.clockMs());
|
|
12955
13139
|
worklogs.set(w.id, { ...worklogs.get(w.id) ?? {}, [day]: 3600 });
|
|
12956
|
-
return c.json({ ok: true, logged: 3600, total: 3600, text: `1h logged on ${w.
|
|
13140
|
+
return c.json({ ok: true, logged: 3600, total: 3600, text: `1h logged on ${w.issueKey} for ${day}` });
|
|
12957
13141
|
});
|
|
12958
13142
|
app.get("/api/sessions/:id/timeline", (c) => {
|
|
12959
13143
|
const w = scenario.list().find((x) => x.id === c.req.param("id"));
|
|
@@ -13426,7 +13610,7 @@ async function startDemoServer(opts) {
|
|
|
13426
13610
|
const id = c.req.param("id");
|
|
13427
13611
|
if (!scenario.list().some((x) => x.id === id)) return notFound(c);
|
|
13428
13612
|
const patch = cleanPlacePatch(await json2(c));
|
|
13429
|
-
if (!patch) return c.json({ error:
|
|
13613
|
+
if (!patch) return c.json({ error: PLACE_PATCH_EXPECTED }, 400);
|
|
13430
13614
|
if (patch.section && !rail.sections.some((s) => s.id === patch.section)) return c.json({ error: "no such section" }, 409);
|
|
13431
13615
|
const places = { ...rail.places };
|
|
13432
13616
|
const next = applyPlacePatch(places[id], patch);
|
|
@@ -13843,10 +14027,19 @@ async function startDemoServer(opts) {
|
|
|
13843
14027
|
app.get("/api/activity", (c) => c.json(activity.log.snapshot()));
|
|
13844
14028
|
app.get("/api/prs", (c) => c.json({ prs: scenario.prs() }));
|
|
13845
14029
|
app.get("/api/jira", (c) => c.json({ available: true, issues: scenario.jira() }));
|
|
14030
|
+
app.get(
|
|
14031
|
+
"/api/issues",
|
|
14032
|
+
(c) => c.json({
|
|
14033
|
+
sources: [{ id: "jira", name: "Jira", available: true }],
|
|
14034
|
+
issues: scenario.jira().map((i) => ({ source: "jira", ...i }))
|
|
14035
|
+
})
|
|
14036
|
+
);
|
|
13846
14037
|
let jiraWatch = { enabled: false, since: null };
|
|
13847
14038
|
const jiraDecisions = [];
|
|
13848
|
-
|
|
13849
|
-
|
|
14039
|
+
const watchAt = (tail = "") => [`/api/issues/watch${tail}`, `/api/jira/watch${tail}`];
|
|
14040
|
+
app.on(
|
|
14041
|
+
"GET",
|
|
14042
|
+
watchAt(),
|
|
13850
14043
|
(c) => c.json({
|
|
13851
14044
|
settings: jiraWatch,
|
|
13852
14045
|
decisions: jiraDecisions,
|
|
@@ -13855,14 +14048,14 @@ async function startDemoServer(opts) {
|
|
|
13855
14048
|
nextRunAt: null
|
|
13856
14049
|
})
|
|
13857
14050
|
);
|
|
13858
|
-
app.
|
|
14051
|
+
app.on("PUT", watchAt(), async (c) => {
|
|
13859
14052
|
const body = await json2(c);
|
|
13860
14053
|
if (typeof body.enabled !== "boolean") return c.json({ error: "enabled (true/false) required" }, 400);
|
|
13861
14054
|
jiraWatch = { enabled: body.enabled, since: body.enabled ? (/* @__PURE__ */ new Date()).toISOString() : null };
|
|
13862
14055
|
return c.json({ settings: jiraWatch });
|
|
13863
14056
|
});
|
|
13864
|
-
app.
|
|
13865
|
-
app.
|
|
14057
|
+
app.on("POST", watchAt("/:key/start"), (c) => c.json({ error: "the demo starts nothing" }, 400));
|
|
14058
|
+
app.on("POST", watchAt("/:key/dismiss"), (c) => {
|
|
13866
14059
|
const d = jiraDecisions.find((x) => x.key === c.req.param("key"));
|
|
13867
14060
|
if (!d) return c.json({ error: "no such issue" }, 404);
|
|
13868
14061
|
d.action = "dismissed";
|
|
@@ -14023,45 +14216,37 @@ function stopOnSignals(proc, stop) {
|
|
|
14023
14216
|
}
|
|
14024
14217
|
|
|
14025
14218
|
// src/commands/web.ts
|
|
14026
|
-
var
|
|
14027
|
-
|
|
14028
|
-
|
|
14029
|
-
|
|
14030
|
-
|
|
14031
|
-
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
|
|
14035
|
-
|
|
14036
|
-
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
|
|
14042
|
-
|
|
14043
|
-
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
apply: o.apply ?? (() => reinstallAgentSetup(lean)),
|
|
14058
|
-
onError: swallow("set up a changed Claude account"),
|
|
14059
|
-
...o.everyMs !== void 0 ? { everyMs: o.everyMs } : {}
|
|
14060
|
-
});
|
|
14061
|
-
}
|
|
14062
|
-
function removeAgentHooksSync(lean) {
|
|
14063
|
-
const ours = (lean ? LEAN_HOOKS : FULL_HOOKS).map(({ owner, edge }) => ({ owner, edge }));
|
|
14064
|
-
for (const agent of hookedAgents()) bestEffort(`remove ${agent.name} hooks`, () => agent.events.removeSync([...ours, ...LEGACY_HOOKS]));
|
|
14219
|
+
var HOOK_MIGRATION_EVERY_MS = 2 * 6e4;
|
|
14220
|
+
async function removeRetiredAgentSetup(io = {}) {
|
|
14221
|
+
const since = io.since ?? Date.now();
|
|
14222
|
+
const migrationIo = {
|
|
14223
|
+
since,
|
|
14224
|
+
commandLines: io.commandLines ?? (async () => new Map((await listProcesses()).map((p) => [p.pid, p.command]))),
|
|
14225
|
+
inSession: io.inSession ?? ((cwd) => findSessionForCwd(cwd) !== null),
|
|
14226
|
+
hostPids: io.hostPids ?? ptyPids,
|
|
14227
|
+
...io.agents ? { agents: io.agents } : {}
|
|
14228
|
+
};
|
|
14229
|
+
const step = async () => {
|
|
14230
|
+
try {
|
|
14231
|
+
const done = await settleAgentHooks(migrationIo);
|
|
14232
|
+
for (const d of done)
|
|
14233
|
+
if (d.done === "bridged")
|
|
14234
|
+
debugLog("INFO", `[hooks] ${d.agent}: kept in its settings for ${d.waitingOn} session(s) started before the update`);
|
|
14235
|
+
return done;
|
|
14236
|
+
} catch (err) {
|
|
14237
|
+
logSwallowed("move the agents' hooks out of their settings", err);
|
|
14238
|
+
return [];
|
|
14239
|
+
}
|
|
14240
|
+
};
|
|
14241
|
+
await setupAgentUsage(knownAgents(), loadConfig(), false).catch(swallow("give back the agents' status lines"));
|
|
14242
|
+
const first = await step();
|
|
14243
|
+
let last = first;
|
|
14244
|
+
const timer = setInterval(() => {
|
|
14245
|
+
if (last.length > 0 && last.every((d) => d.done === "removed")) return clearInterval(timer);
|
|
14246
|
+
void step().then((d) => last = d);
|
|
14247
|
+
}, io.everyMs ?? HOOK_MIGRATION_EVERY_MS);
|
|
14248
|
+
timer.unref?.();
|
|
14249
|
+
return { stop: () => clearInterval(timer), first };
|
|
14065
14250
|
}
|
|
14066
14251
|
function info(message) {
|
|
14067
14252
|
process.stderr.write(message + "\n");
|
|
@@ -14216,16 +14401,13 @@ var webCommand = {
|
|
|
14216
14401
|
(err) => info(chalk.yellow(`Could not restore sessions: ${err.message}`))
|
|
14217
14402
|
);
|
|
14218
14403
|
}
|
|
14219
|
-
|
|
14220
|
-
await setupAgentUsage(knownAgents(), loadConfig(), lean).catch(swallow("set up the usage readings"));
|
|
14221
|
-
const accountSync = startAccountSetupSync(lean);
|
|
14404
|
+
const hookMigration = await removeRetiredAgentSetup();
|
|
14222
14405
|
shutdown = (how) => {
|
|
14223
14406
|
life.end(how);
|
|
14224
|
-
|
|
14407
|
+
hookMigration.stop();
|
|
14225
14408
|
info(chalk.gray(`
|
|
14226
14409
|
Stopping work web (${how}).`));
|
|
14227
14410
|
clearWebDiscovery(process.pid);
|
|
14228
|
-
removeAgentHooksSync(lean);
|
|
14229
14411
|
void handle.stop().finally(() => process.exit(0));
|
|
14230
14412
|
};
|
|
14231
14413
|
stopOnSignals(process, (how) => shutdown(how));
|
|
@@ -14347,14 +14529,8 @@ async function runDemo(open) {
|
|
|
14347
14529
|
});
|
|
14348
14530
|
}
|
|
14349
14531
|
export {
|
|
14350
|
-
|
|
14351
|
-
LEAN_HOOKS,
|
|
14352
|
-
LEGACY_HOOKS,
|
|
14353
|
-
installAgentHooks,
|
|
14354
|
-
reinstallAgentSetup,
|
|
14355
|
-
removeAgentHooksSync,
|
|
14356
|
-
startAccountSetupSync,
|
|
14532
|
+
removeRetiredAgentSetup,
|
|
14357
14533
|
stopExisting,
|
|
14358
14534
|
webCommand
|
|
14359
14535
|
};
|
|
14360
|
-
//# sourceMappingURL=web-
|
|
14536
|
+
//# sourceMappingURL=web-PHQBICO5.js.map
|