@moberg_hr/work-tree 2.18.1 → 2.20.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-B3HHUCH6.js → account-VGJEBBCS.js} +19 -18
- package/dist/{account-B3HHUCH6.js.map → account-VGJEBBCS.js.map} +1 -1
- package/dist/{add-repo-2U2FLGJQ.js → add-repo-KA723SUN.js} +16 -15
- package/dist/{add-repo-2U2FLGJQ.js.map → add-repo-KA723SUN.js.map} +1 -1
- package/dist/{answer-HHCSBUQE.js → answer-2MLNGB7P.js} +12 -11
- package/dist/{answer-HHCSBUQE.js.map → answer-2MLNGB7P.js.map} +1 -1
- package/dist/{attach-RNWANIFC.js → attach-4DSUBQBI.js} +17 -16
- package/dist/{attach-RNWANIFC.js.map → attach-4DSUBQBI.js.map} +1 -1
- package/dist/bin.js +4 -4
- package/dist/{block-FSGNBJSN.js → block-KCHJ4KMQ.js} +14 -13
- package/dist/{block-FSGNBJSN.js.map → block-KCHJ4KMQ.js.map} +1 -1
- package/dist/{broadcast-5WAUMYVO.js → broadcast-XZZ6S6MH.js} +10 -9
- package/dist/{broadcast-5WAUMYVO.js.map → broadcast-XZZ6S6MH.js.map} +1 -1
- package/dist/{catchup-T5SOCXHV.js → catchup-IVNPQHRM.js} +15 -14
- package/dist/{catchup-T5SOCXHV.js.map → catchup-IVNPQHRM.js.map} +1 -1
- package/dist/child-6ZMI62MQ.js +148 -0
- package/dist/child-6ZMI62MQ.js.map +1 -0
- package/dist/{chunk-7334DEPX.js → chunk-2YGVF224.js} +2 -2
- package/dist/{chunk-S7OCHVVD.js → chunk-4EFPHIME.js} +8 -8
- package/dist/chunk-6DOAS4VP.js +9 -0
- package/dist/{chunk-AT4EPCOV.js → chunk-6V6LBFWB.js} +2 -2
- package/dist/{chunk-A72CRTFG.js → chunk-75PWH7BG.js} +7 -5
- package/dist/chunk-75PWH7BG.js.map +1 -0
- package/dist/{chunk-2SLALFWA.js → chunk-7ZOWY7GC.js} +16 -5
- package/dist/chunk-7ZOWY7GC.js.map +1 -0
- package/dist/{chunk-56D4WJ2S.js → chunk-AB3TSGJ4.js} +3 -3
- package/dist/{chunk-V76KARDB.js → chunk-AFYYUXWA.js} +2 -2
- package/dist/chunk-AGICFQMJ.js +151 -0
- package/dist/chunk-AGICFQMJ.js.map +1 -0
- package/dist/{chunk-2LUTV7UB.js → chunk-B56NMAPD.js} +2 -2
- package/dist/{chunk-44UME4JD.js → chunk-BDZDOPAA.js} +2 -2
- package/dist/{chunk-BGPCIL4U.js → chunk-D7TL6I5A.js} +4 -4
- package/dist/{chunk-IVH5T4U2.js → chunk-DCEYDF77.js} +2 -2
- package/dist/{chunk-DAQJZE3B.js → chunk-EHVT6G2Z.js} +16 -14
- package/dist/{chunk-DAQJZE3B.js.map → chunk-EHVT6G2Z.js.map} +1 -1
- package/dist/{chunk-6EW27TKI.js → chunk-EVP5MMA7.js} +13 -11
- package/dist/{chunk-6EW27TKI.js.map → chunk-EVP5MMA7.js.map} +1 -1
- package/dist/{chunk-PYHYZGY4.js → chunk-F2H4FQ62.js} +4 -4
- package/dist/{chunk-AWP2MCMN.js → chunk-FCUVFJSY.js} +5 -5
- package/dist/{chunk-FJYM2JQN.js → chunk-FDFFJOV6.js} +147 -216
- package/dist/chunk-FDFFJOV6.js.map +1 -0
- package/dist/{chunk-GUEJVX2X.js → chunk-GROMKF62.js} +2 -2
- package/dist/{chunk-55T4LC2P.js → chunk-HNZRVCQF.js} +4 -4
- package/dist/{chunk-XQEP3QYX.js → chunk-ILLPPOIY.js} +8 -6
- package/dist/{chunk-XQEP3QYX.js.map → chunk-ILLPPOIY.js.map} +1 -1
- package/dist/{chunk-WKHP3AXS.js → chunk-IMTPBX3L.js} +4 -4
- package/dist/{chunk-KK5RCNDL.js → chunk-J3XKW5CH.js} +8 -8
- package/dist/{chunk-VG5WQPQB.js → chunk-JDLRVOX7.js} +4 -4
- package/dist/{chunk-AC7FECH5.js → chunk-JQO5ANP4.js} +7 -7
- package/dist/{chunk-PZGLIYMD.js → chunk-JTADL4BQ.js} +60 -57
- package/dist/chunk-JTADL4BQ.js.map +1 -0
- package/dist/{chunk-H4TNGZKT.js → chunk-JTH2PASW.js} +10 -10
- package/dist/{chunk-ADVMIHTB.js → chunk-L74WY44N.js} +2 -2
- package/dist/{chunk-R5DHVUA2.js → chunk-LHKUHNE3.js} +2 -2
- package/dist/{chunk-MWIPHUAE.js → chunk-LXBHVWOY.js} +2 -1
- package/dist/chunk-LXBHVWOY.js.map +1 -0
- package/dist/{chunk-ITNSUPVJ.js → chunk-M5NJSO3M.js} +7 -7
- package/dist/{chunk-MD6QMSXQ.js → chunk-MQGNH74M.js} +2 -2
- package/dist/{chunk-F5RPC3LT.js → chunk-MRTSFVRF.js} +3 -3
- package/dist/{chunk-BMLV63AW.js → chunk-MYMMOUTW.js} +2 -2
- package/dist/{chunk-ATBSACIU.js → chunk-NB7IBSKF.js} +3 -3
- package/dist/{chunk-WVDIS22N.js → chunk-NDSZQKYL.js} +3 -3
- package/dist/{chunk-BGS5M542.js → chunk-NDXZKB27.js} +3 -3
- package/dist/{chunk-WIYDT3PY.js → chunk-NFM4NGTI.js} +2 -2
- package/dist/{chunk-PSEVXDTS.js → chunk-NHZZMY3H.js} +3 -3
- package/dist/{chunk-4J2F6OWM.js → chunk-OHX7WKZU.js} +2 -2
- package/dist/{chunk-AMKLWFT3.js → chunk-OOQBMWTK.js} +2 -2
- package/dist/{chunk-3JLMVWRO.js → chunk-PORC2R73.js} +3 -3
- package/dist/{chunk-ALBTIOP3.js → chunk-QGUBOOEN.js} +16 -3
- package/dist/chunk-QGUBOOEN.js.map +1 -0
- package/dist/{chunk-QTENJUM3.js → chunk-QSY3HEP4.js} +7 -7
- package/dist/{chunk-G7VLIMOH.js → chunk-R7FZ4FNO.js} +4 -4
- package/dist/{chunk-2YRR5Q3C.js → chunk-RQ7W2CVL.js} +3 -3
- package/dist/{chunk-XKPF4MD2.js → chunk-SM6RE2AH.js} +3 -3
- package/dist/{chunk-IBTA4DSY.js → chunk-TNBZUIIP.js} +7 -7
- package/dist/{chunk-QO4QWQUO.js → chunk-UD5CFHUS.js} +2 -2
- package/dist/{chunk-WXYUABCL.js → chunk-UEEZ6DGK.js} +7 -7
- package/dist/{chunk-J5B2Z7SO.js → chunk-UNV2YM5V.js} +3 -3
- package/dist/{chunk-CNZV3UCM.js → chunk-UPS7NHKI.js} +2 -2
- package/dist/{chunk-QDNNFL56.js → chunk-UXEFUSJV.js} +4 -4
- package/dist/{chunk-HGB7BITW.js → chunk-W4GDPHIF.js} +3 -2
- package/dist/chunk-W4GDPHIF.js.map +1 -0
- package/dist/{chunk-374HKMSE.js → chunk-WC4IN5MD.js} +2 -2
- package/dist/{chunk-SRE4CK6Y.js → chunk-WIXY4EDH.js} +2 -2
- package/dist/{chunk-LBJHFVH3.js → chunk-WUW6WRKP.js} +6 -6
- package/dist/{chunk-H5JNYD63.js → chunk-XDKH4X4N.js} +2 -2
- package/dist/{chunk-CIUTNNF4.js → chunk-XEA3XWKW.js} +5 -5
- package/dist/{chunk-VBB3E37Z.js → chunk-XHDC3IU4.js} +7 -7
- package/dist/{chunk-PJ7ZKAZF.js → chunk-XVHRBV2I.js} +3 -3
- package/dist/{chunk-PZ7WTBSI.js → chunk-Y7PWSACJ.js} +2 -2
- package/dist/{chunk-26DBVWJC.js → chunk-YJYYR5RY.js} +4 -4
- package/dist/chunk-Z6ACV5ZQ.js +86 -0
- package/dist/chunk-Z6ACV5ZQ.js.map +1 -0
- package/dist/{chunk-LVNPLXUO.js → chunk-ZAOX63AG.js} +8 -8
- package/dist/{chunk-N2IDEZGB.js → chunk-ZSDMH3TI.js} +5 -5
- package/dist/{cleanup-LJHC5O6U.js → cleanup-6DHF6MVQ.js} +31 -30
- package/dist/{cleanup-LJHC5O6U.js.map → cleanup-6DHF6MVQ.js.map} +1 -1
- package/dist/{cli-K6T6AJHP.js → cli-7XVDO432.js} +4 -4
- package/dist/{color-7PZNDE4R.js → color-G7OB6JRX.js} +13 -12
- package/dist/{color-7PZNDE4R.js.map → color-G7OB6JRX.js.map} +1 -1
- package/dist/{config-TM37HUBM.js → config-WLHZ5EOU.js} +11 -10
- package/dist/{config-TM37HUBM.js.map → config-WLHZ5EOU.js.map} +1 -1
- package/dist/coordinate-YOTO6WGQ.js +122 -0
- package/dist/coordinate-YOTO6WGQ.js.map +1 -0
- package/dist/{diff-RSSLOKE7.js → diff-TKHHSR2G.js} +12 -11
- package/dist/{diff-RSSLOKE7.js.map → diff-TKHHSR2G.js.map} +1 -1
- package/dist/{digest-LCHLLJ4M.js → digest-OVUDG6O7.js} +11 -10
- package/dist/{digest-LCHLLJ4M.js.map → digest-OVUDG6O7.js.map} +1 -1
- package/dist/{fork-XVNZMWCA.js → fork-6AQ62ODJ.js} +28 -27
- package/dist/{fork-XVNZMWCA.js.map → fork-6AQ62ODJ.js.map} +1 -1
- package/dist/{history-CRUFLMA2.js → history-ZT6YAO62.js} +9 -8
- package/dist/{hook-U4WCMGD6.js → hook-MDENN4PE.js} +17 -16
- package/dist/{hook-U4WCMGD6.js.map → hook-MDENN4PE.js.map} +1 -1
- package/dist/{hydrate-BYXK4W6T.js → hydrate-3KEAOXSE.js} +10 -9
- package/dist/{hydrate-BYXK4W6T.js.map → hydrate-3KEAOXSE.js.map} +1 -1
- package/dist/{init-JWBB4HBE.js → init-UDRGQJWV.js} +14 -13
- package/dist/{init-JWBB4HBE.js.map → init-UDRGQJWV.js.map} +1 -1
- package/dist/{install-skills-M2Y6ZGQC.js → install-skills-QTNDVA4T.js} +8 -7
- package/dist/install-skills-bin.js +7 -6
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{keep-OZJ2XXKF.js → keep-G4Z6EBQM.js} +12 -11
- package/dist/{keep-OZJ2XXKF.js.map → keep-G4Z6EBQM.js.map} +1 -1
- package/dist/{list-YVZSGKT4.js → list-DFENHOZN.js} +9 -8
- package/dist/{list-YVZSGKT4.js.map → list-DFENHOZN.js.map} +1 -1
- package/dist/{move-7TAU3LI3.js → move-ZF4Z7X5U.js} +16 -15
- package/dist/{move-7TAU3LI3.js.map → move-ZF4Z7X5U.js.map} +1 -1
- package/dist/{note-ESLGTIYH.js → note-UIC3ZWUV.js} +13 -12
- package/dist/{note-ESLGTIYH.js.map → note-UIC3ZWUV.js.map} +1 -1
- package/dist/{overlaps-FYXO3OL2.js → overlaps-SHQUKU7E.js} +15 -14
- package/dist/{overlaps-FYXO3OL2.js.map → overlaps-SHQUKU7E.js.map} +1 -1
- package/dist/{pin-AAMXBCV3.js → pin-LC33A2NH.js} +13 -12
- package/dist/{pin-AAMXBCV3.js.map → pin-LC33A2NH.js.map} +1 -1
- package/dist/{pr-42UBVLUT.js → pr-FRW5V6HV.js} +22 -21
- package/dist/{pr-42UBVLUT.js.map → pr-FRW5V6HV.js.map} +1 -1
- package/dist/{prune-B72T33B6.js → prune-BZ2NL4VG.js} +29 -28
- package/dist/{prune-B72T33B6.js.map → prune-BZ2NL4VG.js.map} +1 -1
- package/dist/{pty-host-72L4DQL5.js → pty-host-ULFHBYSP.js} +14 -13
- package/dist/{pty-host-72L4DQL5.js.map → pty-host-ULFHBYSP.js.map} +1 -1
- package/dist/{read-75KS2EXO.js → read-NQMJXBGZ.js} +12 -11
- package/dist/{read-75KS2EXO.js.map → read-NQMJXBGZ.js.map} +1 -1
- package/dist/{recent-H665DNCJ.js → recent-5POY67P2.js} +16 -15
- package/dist/{recent-H665DNCJ.js.map → recent-5POY67P2.js.map} +1 -1
- package/dist/{remove-ZZBCNASU.js → remove-4Z2PPUMR.js} +30 -29
- package/dist/{remove-ZZBCNASU.js.map → remove-4Z2PPUMR.js.map} +1 -1
- package/dist/report-RBBVHVHD.js +74 -0
- package/dist/report-RBBVHVHD.js.map +1 -0
- package/dist/{restart-WFMCSOPB.js → restart-S3SSGR6A.js} +12 -11
- package/dist/{restart-WFMCSOPB.js.map → restart-S3SSGR6A.js.map} +1 -1
- package/dist/{resume-GICIEI2I.js → resume-FLLXA3RH.js} +16 -15
- package/dist/{resume-GICIEI2I.js.map → resume-FLLXA3RH.js.map} +1 -1
- package/dist/{review-TZUVYEAL.js → review-SFRX7ODW.js} +13 -12
- package/dist/{review-TZUVYEAL.js.map → review-SFRX7ODW.js.map} +1 -1
- package/dist/{review-now-LYGJDHDE.js → review-now-KZDBETZK.js} +4 -4
- package/dist/{run-SVJLTKSR.js → run-BMD66HMR.js} +9 -8
- package/dist/{run-SVJLTKSR.js.map → run-BMD66HMR.js.map} +1 -1
- package/dist/{screen-JC6L6MT5.js → screen-MKRRQSIU.js} +12 -11
- package/dist/{screen-JC6L6MT5.js.map → screen-MKRRQSIU.js.map} +1 -1
- package/dist/{search-3BZMJM3P.js → search-2NDA23G4.js} +9 -8
- package/dist/{search-3BZMJM3P.js.map → search-2NDA23G4.js.map} +1 -1
- package/dist/{section-GNYPAEQC.js → section-Z5G4B5IO.js} +13 -12
- package/dist/{section-GNYPAEQC.js.map → section-Z5G4B5IO.js.map} +1 -1
- package/dist/{send-KVUFOWCP.js → send-EVYK2JXH.js} +13 -12
- package/dist/{send-KVUFOWCP.js.map → send-EVYK2JXH.js.map} +1 -1
- package/dist/{sessions-W36QTHAD.js → sessions-UD7GC6PL.js} +25 -24
- package/dist/{sessions-W36QTHAD.js.map → sessions-UD7GC6PL.js.map} +1 -1
- package/dist/{show-FQPMGZO3.js → show-K4MELKXA.js} +11 -10
- package/dist/{show-FQPMGZO3.js.map → show-K4MELKXA.js.map} +1 -1
- package/dist/{snooze-HGO3W2OF.js → snooze-457UM2MR.js} +12 -11
- package/dist/{snooze-HGO3W2OF.js.map → snooze-457UM2MR.js.map} +1 -1
- package/dist/{start-UQSJGUMJ.js → start-CMYT5ELG.js} +12 -11
- package/dist/{start-UQSJGUMJ.js.map → start-CMYT5ELG.js.map} +1 -1
- package/dist/{state-24H5QRPO.js → state-TOTGEK7J.js} +9 -5
- package/dist/state-TOTGEK7J.js.map +1 -0
- package/dist/{status-MGTUAZTA.js → status-M5RGLGOI.js} +13 -12
- package/dist/{status-MGTUAZTA.js.map → status-M5RGLGOI.js.map} +1 -1
- package/dist/{statusline-B6U3ANSM.js → statusline-QZKHVDHR.js} +4 -4
- package/dist/statusline-hook-Q645N4XF.js +162 -0
- package/dist/statusline-hook-Q645N4XF.js.map +1 -0
- package/dist/{stop-JBUL4WY3.js → stop-QUXZ4KOU.js} +12 -11
- package/dist/{stop-JBUL4WY3.js.map → stop-QUXZ4KOU.js.map} +1 -1
- package/dist/{sync-ILYA3AHS.js → sync-LOUYX24W.js} +29 -28
- package/dist/{sync-ILYA3AHS.js.map → sync-LOUYX24W.js.map} +1 -1
- package/dist/{time-ZOJD7HFL.js → time-DQ55WLCX.js} +14 -13
- package/dist/{time-ZOJD7HFL.js.map → time-DQ55WLCX.js.map} +1 -1
- package/dist/{time-actions-AIKJ7ENX.js → time-actions-HY3AML3Y.js} +4 -4
- package/dist/{timesheet-WT7QUB7M.js → timesheet-F4ATWRKK.js} +15 -14
- package/dist/{timesheet-WT7QUB7M.js.map → timesheet-F4ATWRKK.js.map} +1 -1
- package/dist/{todo-GB7X6KWW.js → todo-QY5ZPN24.js} +4 -4
- package/dist/{tree-M6YEJCXF.js → tree-7BZQE5JA.js} +28 -27
- package/dist/{tree-M6YEJCXF.js.map → tree-7BZQE5JA.js.map} +1 -1
- package/dist/{update-47FZ6YO5.js → update-A5N2KKOV.js} +18 -17
- package/dist/{update-47FZ6YO5.js.map → update-A5N2KKOV.js.map} +1 -1
- package/dist/{usage-PTD3C34L.js → usage-ZEZY46OJ.js} +11 -10
- package/dist/{usage-PTD3C34L.js.map → usage-ZEZY46OJ.js.map} +1 -1
- package/dist/{usage-ask-BULFMCUZ.js → usage-ask-C3QLGFC5.js} +3 -3
- package/dist/{version-6UJN2CCE.js → version-3UR4YFMC.js} +4 -4
- package/dist/{wait-JHFM3MA7.js → wait-ZOTGREAN.js} +13 -12
- package/dist/{wait-JHFM3MA7.js.map → wait-ZOTGREAN.js.map} +1 -1
- package/dist/wd-bin.js +3 -3
- package/dist/web/assets/{PtyView-DpIVcrTI.js → PtyView-dPCRmDiL.js} +2 -2
- package/dist/web/assets/{PtyView-DpIVcrTI.js.map → PtyView-dPCRmDiL.js.map} +1 -1
- package/dist/web/assets/{index-DhXqtaRc.js → index-1o9y5y_j.js} +57 -56
- package/dist/web/assets/index-1o9y5y_j.js.map +1 -0
- package/dist/web/assets/{index-B1gUTG37.css → index-Dt4XbNcI.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/{web-HRGWOUDV.js → web-HKNHNSJM.js} +322 -141
- package/dist/web-HKNHNSJM.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/plugins/work-tree/skills/work-sessions/SKILL.md +18 -0
- package/dist/chunk-2SLALFWA.js.map +0 -1
- package/dist/chunk-4YG55UQ6.js +0 -9
- package/dist/chunk-A72CRTFG.js.map +0 -1
- package/dist/chunk-ALBTIOP3.js.map +0 -1
- package/dist/chunk-FJYM2JQN.js.map +0 -1
- package/dist/chunk-HGB7BITW.js.map +0 -1
- package/dist/chunk-MWIPHUAE.js.map +0 -1
- package/dist/chunk-PZGLIYMD.js.map +0 -1
- package/dist/state-24H5QRPO.js.map +0 -1
- package/dist/statusline-hook-SYRLMSDL.js +0 -72
- package/dist/statusline-hook-SYRLMSDL.js.map +0 -1
- package/dist/web/assets/index-DhXqtaRc.js.map +0 -1
- package/dist/web-HRGWOUDV.js.map +0 -1
- /package/dist/{chunk-7334DEPX.js.map → chunk-2YGVF224.js.map} +0 -0
- /package/dist/{chunk-S7OCHVVD.js.map → chunk-4EFPHIME.js.map} +0 -0
- /package/dist/{chunk-4YG55UQ6.js.map → chunk-6DOAS4VP.js.map} +0 -0
- /package/dist/{chunk-AT4EPCOV.js.map → chunk-6V6LBFWB.js.map} +0 -0
- /package/dist/{chunk-56D4WJ2S.js.map → chunk-AB3TSGJ4.js.map} +0 -0
- /package/dist/{chunk-V76KARDB.js.map → chunk-AFYYUXWA.js.map} +0 -0
- /package/dist/{chunk-2LUTV7UB.js.map → chunk-B56NMAPD.js.map} +0 -0
- /package/dist/{chunk-44UME4JD.js.map → chunk-BDZDOPAA.js.map} +0 -0
- /package/dist/{chunk-BGPCIL4U.js.map → chunk-D7TL6I5A.js.map} +0 -0
- /package/dist/{chunk-IVH5T4U2.js.map → chunk-DCEYDF77.js.map} +0 -0
- /package/dist/{chunk-PYHYZGY4.js.map → chunk-F2H4FQ62.js.map} +0 -0
- /package/dist/{chunk-AWP2MCMN.js.map → chunk-FCUVFJSY.js.map} +0 -0
- /package/dist/{chunk-GUEJVX2X.js.map → chunk-GROMKF62.js.map} +0 -0
- /package/dist/{chunk-55T4LC2P.js.map → chunk-HNZRVCQF.js.map} +0 -0
- /package/dist/{chunk-WKHP3AXS.js.map → chunk-IMTPBX3L.js.map} +0 -0
- /package/dist/{chunk-KK5RCNDL.js.map → chunk-J3XKW5CH.js.map} +0 -0
- /package/dist/{chunk-VG5WQPQB.js.map → chunk-JDLRVOX7.js.map} +0 -0
- /package/dist/{chunk-AC7FECH5.js.map → chunk-JQO5ANP4.js.map} +0 -0
- /package/dist/{chunk-H4TNGZKT.js.map → chunk-JTH2PASW.js.map} +0 -0
- /package/dist/{chunk-ADVMIHTB.js.map → chunk-L74WY44N.js.map} +0 -0
- /package/dist/{chunk-R5DHVUA2.js.map → chunk-LHKUHNE3.js.map} +0 -0
- /package/dist/{chunk-ITNSUPVJ.js.map → chunk-M5NJSO3M.js.map} +0 -0
- /package/dist/{chunk-MD6QMSXQ.js.map → chunk-MQGNH74M.js.map} +0 -0
- /package/dist/{chunk-F5RPC3LT.js.map → chunk-MRTSFVRF.js.map} +0 -0
- /package/dist/{chunk-BMLV63AW.js.map → chunk-MYMMOUTW.js.map} +0 -0
- /package/dist/{chunk-ATBSACIU.js.map → chunk-NB7IBSKF.js.map} +0 -0
- /package/dist/{chunk-WVDIS22N.js.map → chunk-NDSZQKYL.js.map} +0 -0
- /package/dist/{chunk-BGS5M542.js.map → chunk-NDXZKB27.js.map} +0 -0
- /package/dist/{chunk-WIYDT3PY.js.map → chunk-NFM4NGTI.js.map} +0 -0
- /package/dist/{chunk-PSEVXDTS.js.map → chunk-NHZZMY3H.js.map} +0 -0
- /package/dist/{chunk-4J2F6OWM.js.map → chunk-OHX7WKZU.js.map} +0 -0
- /package/dist/{chunk-AMKLWFT3.js.map → chunk-OOQBMWTK.js.map} +0 -0
- /package/dist/{chunk-3JLMVWRO.js.map → chunk-PORC2R73.js.map} +0 -0
- /package/dist/{chunk-QTENJUM3.js.map → chunk-QSY3HEP4.js.map} +0 -0
- /package/dist/{chunk-G7VLIMOH.js.map → chunk-R7FZ4FNO.js.map} +0 -0
- /package/dist/{chunk-2YRR5Q3C.js.map → chunk-RQ7W2CVL.js.map} +0 -0
- /package/dist/{chunk-XKPF4MD2.js.map → chunk-SM6RE2AH.js.map} +0 -0
- /package/dist/{chunk-IBTA4DSY.js.map → chunk-TNBZUIIP.js.map} +0 -0
- /package/dist/{chunk-QO4QWQUO.js.map → chunk-UD5CFHUS.js.map} +0 -0
- /package/dist/{chunk-WXYUABCL.js.map → chunk-UEEZ6DGK.js.map} +0 -0
- /package/dist/{chunk-J5B2Z7SO.js.map → chunk-UNV2YM5V.js.map} +0 -0
- /package/dist/{chunk-CNZV3UCM.js.map → chunk-UPS7NHKI.js.map} +0 -0
- /package/dist/{chunk-QDNNFL56.js.map → chunk-UXEFUSJV.js.map} +0 -0
- /package/dist/{chunk-374HKMSE.js.map → chunk-WC4IN5MD.js.map} +0 -0
- /package/dist/{chunk-SRE4CK6Y.js.map → chunk-WIXY4EDH.js.map} +0 -0
- /package/dist/{chunk-LBJHFVH3.js.map → chunk-WUW6WRKP.js.map} +0 -0
- /package/dist/{chunk-H5JNYD63.js.map → chunk-XDKH4X4N.js.map} +0 -0
- /package/dist/{chunk-CIUTNNF4.js.map → chunk-XEA3XWKW.js.map} +0 -0
- /package/dist/{chunk-VBB3E37Z.js.map → chunk-XHDC3IU4.js.map} +0 -0
- /package/dist/{chunk-PJ7ZKAZF.js.map → chunk-XVHRBV2I.js.map} +0 -0
- /package/dist/{chunk-PZ7WTBSI.js.map → chunk-Y7PWSACJ.js.map} +0 -0
- /package/dist/{chunk-26DBVWJC.js.map → chunk-YJYYR5RY.js.map} +0 -0
- /package/dist/{chunk-LVNPLXUO.js.map → chunk-ZAOX63AG.js.map} +0 -0
- /package/dist/{chunk-N2IDEZGB.js.map → chunk-ZSDMH3TI.js.map} +0 -0
- /package/dist/{cli-K6T6AJHP.js.map → cli-7XVDO432.js.map} +0 -0
- /package/dist/{history-CRUFLMA2.js.map → history-ZT6YAO62.js.map} +0 -0
- /package/dist/{install-skills-M2Y6ZGQC.js.map → install-skills-QTNDVA4T.js.map} +0 -0
- /package/dist/{review-now-LYGJDHDE.js.map → review-now-KZDBETZK.js.map} +0 -0
- /package/dist/{statusline-B6U3ANSM.js.map → statusline-QZKHVDHR.js.map} +0 -0
- /package/dist/{time-actions-AIKJ7ENX.js.map → time-actions-HY3AML3Y.js.map} +0 -0
- /package/dist/{todo-GB7X6KWW.js.map → todo-QY5ZPN24.js.map} +0 -0
- /package/dist/{usage-ask-BULFMCUZ.js.map → usage-ask-C3QLGFC5.js.map} +0 -0
- /package/dist/{version-6UJN2CCE.js.map → version-3UR4YFMC.js.map} +0 -0
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
blockRefFrom,
|
|
6
6
|
readBlock,
|
|
7
7
|
removeBlocker
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HNZRVCQF.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionFromArgs,
|
|
11
11
|
sessionPositionals
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JDLRVOX7.js";
|
|
13
13
|
import "./chunk-6AQRYLOB.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FCUVFJSY.js";
|
|
15
15
|
import "./chunk-ZSHWP2VS.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-UPS7NHKI.js";
|
|
17
17
|
import "./chunk-HUXS3VAI.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-IMTPBX3L.js";
|
|
19
19
|
import "./chunk-FGPXMAYU.js";
|
|
20
20
|
import "./chunk-GNIYYXQX.js";
|
|
21
21
|
import "./chunk-T5GJVUSL.js";
|
|
@@ -24,20 +24,21 @@ import "./chunk-4CXUVBOD.js";
|
|
|
24
24
|
import {
|
|
25
25
|
findSession,
|
|
26
26
|
loadHistory
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-75PWH7BG.js";
|
|
28
28
|
import "./chunk-NEJVK5CF.js";
|
|
29
29
|
import {
|
|
30
30
|
sessionIdFor
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-QGUBOOEN.js";
|
|
32
|
+
import "./chunk-FDFFJOV6.js";
|
|
33
33
|
import "./chunk-KGHWHAVF.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-NFM4NGTI.js";
|
|
35
35
|
import "./chunk-YQSWVHKK.js";
|
|
36
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
36
37
|
import "./chunk-JUGF3YE7.js";
|
|
37
38
|
import "./chunk-HK6AZQ5Z.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-2YGVF224.js";
|
|
40
|
+
import "./chunk-LXBHVWOY.js";
|
|
41
|
+
import "./chunk-W4GDPHIF.js";
|
|
41
42
|
import "./chunk-BR6OWWAA.js";
|
|
42
43
|
import "./chunk-VHENFC2S.js";
|
|
43
44
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -99,4 +100,4 @@ var blockCommand = {
|
|
|
99
100
|
export {
|
|
100
101
|
blockCommand
|
|
101
102
|
};
|
|
102
|
-
//# sourceMappingURL=block-
|
|
103
|
+
//# sourceMappingURL=block-KCHJ4KMQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/block.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { blockRefFrom } from '../core/rail/session-blocks.js';\nimport { addBlocker, blockKey, readBlock, removeBlocker } from '../core/rail/session-blocks.js';\nimport { findSession, loadHistory } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/**\n * `work block` — \"Blocked by\" (session-blocks.ts) from a terminal: the\n * session waits on another session (`--on <alias> --on-branch <branch>`) or\n * a pull request (`--pr <url>`); `--off` stops waiting; no option lists it.\n */\nexport const blockCommand: CommandModule = {\n command: 'block [target] [branch]',\n describe: 'Mark a session as waiting on another session or a PR (out of the Inbox until that is done)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('on', { type: 'string', describe: 'The repo or group of the session it waits on' })\n .option('on-branch', { type: 'string', describe: 'The branch of the session it waits on' })\n .option('pr', { type: 'string', describe: 'A pull request URL it waits on' })\n .option('off', { type: 'boolean', describe: 'Stop waiting (on everything, or with --on/--pr on that one)' }),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n const name = `${s.target} · ${s.branch}`;\n let ref = null;\n if (typeof argv.on === 'string') {\n const other = typeof argv['on-branch'] === 'string' ? findSession(loadHistory(), argv.on, argv['on-branch']) : null;\n if (!other) {\n console.error(chalk.red(`No live session ${argv.on} ${argv['on-branch'] ?? '(give --on-branch)'}.`));\n process.exitCode = 1;\n return;\n }\n ref = blockRefFrom({ kind: 'session', id: sessionIdFor(other) });\n } else if (typeof argv.pr === 'string') {\n ref = blockRefFrom({ kind: 'pr', url: argv.pr });\n if (!ref) {\n console.error(chalk.red(`Not a pull request link: ${argv.pr}`));\n process.exitCode = 1;\n return;\n }\n }\n if (argv.off) {\n removeBlocker(id, ref ? blockKey(ref) : undefined);\n console.log(chalk.green(ref ? `${name} no longer waits on ${ref.label}.` : `${name} no longer waits on anything.`));\n return;\n }\n if (!ref) {\n const b = readBlock(id);\n if (!b) console.log(chalk.gray(`${name} waits on nothing.`));\n else\n for (const x of b.by)\n console.log(`${x.label}${x.kind === 'pr' ? ` ${chalk.gray(x.url)}${x.state ? ` (${x.state.toLowerCase()})` : ''}` : ''}`);\n return;\n }\n const r = addBlocker(id, ref);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(chalk.green(`${name} waits on ${ref.label}: out of the Inbox until it is done.`));\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/block.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { blockRefFrom } from '../core/rail/session-blocks.js';\nimport { addBlocker, blockKey, readBlock, removeBlocker } from '../core/rail/session-blocks.js';\nimport { findSession, loadHistory } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/**\n * `work block` — \"Blocked by\" (session-blocks.ts) from a terminal: the\n * session waits on another session (`--on <alias> --on-branch <branch>`) or\n * a pull request (`--pr <url>`); `--off` stops waiting; no option lists it.\n */\nexport const blockCommand: CommandModule = {\n command: 'block [target] [branch]',\n describe: 'Mark a session as waiting on another session or a PR (out of the Inbox until that is done)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('on', { type: 'string', describe: 'The repo or group of the session it waits on' })\n .option('on-branch', { type: 'string', describe: 'The branch of the session it waits on' })\n .option('pr', { type: 'string', describe: 'A pull request URL it waits on' })\n .option('off', { type: 'boolean', describe: 'Stop waiting (on everything, or with --on/--pr on that one)' }),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n const name = `${s.target} · ${s.branch}`;\n let ref = null;\n if (typeof argv.on === 'string') {\n const other = typeof argv['on-branch'] === 'string' ? findSession(loadHistory(), argv.on, argv['on-branch']) : null;\n if (!other) {\n console.error(chalk.red(`No live session ${argv.on} ${argv['on-branch'] ?? '(give --on-branch)'}.`));\n process.exitCode = 1;\n return;\n }\n ref = blockRefFrom({ kind: 'session', id: sessionIdFor(other) });\n } else if (typeof argv.pr === 'string') {\n ref = blockRefFrom({ kind: 'pr', url: argv.pr });\n if (!ref) {\n console.error(chalk.red(`Not a pull request link: ${argv.pr}`));\n process.exitCode = 1;\n return;\n }\n }\n if (argv.off) {\n removeBlocker(id, ref ? blockKey(ref) : undefined);\n console.log(chalk.green(ref ? `${name} no longer waits on ${ref.label}.` : `${name} no longer waits on anything.`));\n return;\n }\n if (!ref) {\n const b = readBlock(id);\n if (!b) console.log(chalk.gray(`${name} waits on nothing.`));\n else\n for (const x of b.by)\n console.log(`${x.label}${x.kind === 'pr' ? ` ${chalk.gray(x.url)}${x.state ? ` (${x.state.toLowerCase()})` : ''}` : ''}`);\n return;\n }\n const r = addBlocker(id, ref);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(chalk.green(`${name} waits on ${ref.label}: out of the Inbox until it is done.`));\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAaX,IAAM,eAA8B;AAAA,EACzC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,mBAAmB,KAAK,EACrB,OAAO,MAAM,EAAE,MAAM,UAAU,UAAU,+CAA+C,CAAC,EACzF,OAAO,aAAa,EAAE,MAAM,UAAU,UAAU,wCAAwC,CAAC,EACzF,OAAO,MAAM,EAAE,MAAM,UAAU,UAAU,iCAAiC,CAAC,EAC3E,OAAO,OAAO,EAAE,MAAM,WAAW,UAAU,8DAA8D,CAAC;AAAA,EAC/G,SAAS,CAAC,SAAS;AACjB,UAAM,IAAI,gBAAgB,IAAI;AAC9B,QAAI,CAAC,EAAG;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E;AAC7H;AAAA,IACF;AACA,UAAM,IAAI,WAAW,IAAI,GAAG;AAC5B,QAAI,CAAC,EAAE,IAAI;AACT,cAAQ,MAAM,MAAM,IAAI,EAAE,KAAK,CAAC;AAChC,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,YAAQ,IAAI,MAAM,MAAM,GAAG,IAAI,aAAa,IAAI,KAAK,sCAAsC,CAAC;AAAA,EAC9F;AACF;","names":[]}
|
|
@@ -4,24 +4,25 @@ import {
|
|
|
4
4
|
} from "./chunk-WMJIU3YW.js";
|
|
5
5
|
import {
|
|
6
6
|
getCommentFileStore
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UPS7NHKI.js";
|
|
8
8
|
import "./chunk-HUXS3VAI.js";
|
|
9
9
|
import {
|
|
10
10
|
loadHistory
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-75PWH7BG.js";
|
|
12
12
|
import "./chunk-NEJVK5CF.js";
|
|
13
13
|
import {
|
|
14
14
|
sessionIdFor
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-QGUBOOEN.js";
|
|
16
|
+
import "./chunk-FDFFJOV6.js";
|
|
17
17
|
import "./chunk-KGHWHAVF.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-NFM4NGTI.js";
|
|
19
19
|
import "./chunk-YQSWVHKK.js";
|
|
20
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
20
21
|
import "./chunk-JUGF3YE7.js";
|
|
21
22
|
import "./chunk-HK6AZQ5Z.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-2YGVF224.js";
|
|
24
|
+
import "./chunk-LXBHVWOY.js";
|
|
25
|
+
import "./chunk-W4GDPHIF.js";
|
|
25
26
|
import "./chunk-BR6OWWAA.js";
|
|
26
27
|
import "./chunk-VHENFC2S.js";
|
|
27
28
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -113,4 +114,4 @@ var broadcastCommand = {
|
|
|
113
114
|
export {
|
|
114
115
|
broadcastCommand
|
|
115
116
|
};
|
|
116
|
-
//# sourceMappingURL=broadcast-
|
|
117
|
+
//# sourceMappingURL=broadcast-XZZ6S6MH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/broadcast.ts","../src/core/comments/broadcast.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { loadHistory } from '../core/sessions/history.js';\nimport { broadcastPrompt } from '../core/comments/broadcast.js';\n\n/** Read the whole of stdin synchronously (for `broadcast -`). */\nfunction readStdin(): string {\n try {\n return fs.readFileSync(0, 'utf-8');\n } catch {\n return '';\n }\n}\n\nexport const broadcastCommand: CommandModule = {\n command: 'broadcast <prompt>',\n describe: \"Queue a prompt to every live session; delivered on each session's next turn\",\n builder: (yargs) =>\n yargs\n .positional('prompt', {\n describe: 'Prompt to send, or \"-\" to read from stdin',\n type: 'string',\n })\n .option('target', {\n describe: 'Only sessions for this project/group alias',\n type: 'string',\n })\n .option('branch', {\n describe: 'With --target, only this branch',\n type: 'string',\n })\n .option('all', {\n describe: 'Required to broadcast to every session when no --target',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n let prompt = (argv.prompt as string | undefined) ?? '';\n if (prompt === '-') {\n prompt = readStdin();\n }\n prompt = prompt.trim();\n if (!prompt) {\n console.error(chalk.red('Empty prompt. Usage: work broadcast <prompt>'));\n process.exitCode = 1;\n return;\n }\n\n const target = argv.target as string | undefined;\n const branch = argv.branch as string | undefined;\n const all = argv.all as boolean;\n if (branch && !target) {\n console.error(chalk.red('--branch requires --target.'));\n process.exitCode = 1;\n return;\n }\n // Guardrail: broadcasting to every session is a wide blast radius, so\n // require an explicit --all (or a narrowing --target) rather than letting\n // a bare `work broadcast \"...\"` fan out to the whole fleet by accident.\n if (!target && !all) {\n console.error(chalk.red('Refusing to broadcast to every session. Pass --all to confirm, or --target <alias> to narrow.'));\n process.exitCode = 1;\n return;\n }\n\n const queued = await broadcastPrompt(loadHistory(), { target, branch }, prompt);\n\n if (queued.length === 0) {\n console.log(chalk.yellow('No matching sessions to broadcast to.'));\n return;\n }\n\n console.log(chalk.cyan(`Queued prompt to ${queued.length} session${queued.length === 1 ? '' : 's'}:`));\n for (const t of queued) {\n console.log(` ${chalk.cyan(`[${t.session.target}/${t.session.branch}]`)} ${chalk.gray(t.sessionId)}`);\n }\n console.log('');\n console.log(chalk.gray('Delivery is lazy: each session picks this up on its next prompt (UserPromptSubmit hook).'));\n },\n};\n","/**\n * Core for `work broadcast`: queue a prompt to every (filtered) live session\n * via the existing pending-delivery mechanism. We do NOT touch PTYs — those\n * are per-process and unreachable from a separate CLI. Instead we post a\n * `published`, `author:'user'` comment to each session's comment file store;\n * `work hook prompt-submit` surfaces it on that session's next turn (see\n * pending-delivery.ts `readPendingForSession`, which selects exactly those).\n *\n * Broadcast writes from a SEPARATE process while `work web` may be writing\n * the same session's comments; the comment store's writes are database\n * transactions that reload first, so neither side's write is lost.\n */\n\nimport { getCommentFileStore } from './comment-file-store.js';\nimport { sessionIdFor } from '../sessions/session-id.js';\nimport { selectSessions, type FleetFilter } from '../sessions/fleet.js';\nimport type { WorktreeSession } from '../sessions/history.js';\n\nexport interface BroadcastTarget {\n session: WorktreeSession;\n sessionId: string;\n commentId: string;\n}\n\n/**\n * Post `prompt` as a published user comment (side 'general') to every session\n * matching `filter`. Returns one entry per session queued.\n */\nexport async function broadcastPrompt(sessions: WorktreeSession[], filter: FleetFilter, prompt: string): Promise<BroadcastTarget[]> {\n const body = prompt.trim();\n if (!body) throw new Error('broadcast prompt is empty');\n\n const selected = selectSessions(sessions, filter);\n const out: BroadcastTarget[] = [];\n for (const session of selected) {\n const sessionId = sessionIdFor(session);\n // The store's post is a transaction that reloads first, so a\n // concurrent work web write to the same session can't be lost.\n const c = getCommentFileStore(sessionId).post({ side: 'general', status: 'published', author: 'user', body });\n out.push({ session, sessionId, commentId: c.id });\n }\n return out;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/broadcast.ts","../src/core/comments/broadcast.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { loadHistory } from '../core/sessions/history.js';\nimport { broadcastPrompt } from '../core/comments/broadcast.js';\n\n/** Read the whole of stdin synchronously (for `broadcast -`). */\nfunction readStdin(): string {\n try {\n return fs.readFileSync(0, 'utf-8');\n } catch {\n return '';\n }\n}\n\nexport const broadcastCommand: CommandModule = {\n command: 'broadcast <prompt>',\n describe: \"Queue a prompt to every live session; delivered on each session's next turn\",\n builder: (yargs) =>\n yargs\n .positional('prompt', {\n describe: 'Prompt to send, or \"-\" to read from stdin',\n type: 'string',\n })\n .option('target', {\n describe: 'Only sessions for this project/group alias',\n type: 'string',\n })\n .option('branch', {\n describe: 'With --target, only this branch',\n type: 'string',\n })\n .option('all', {\n describe: 'Required to broadcast to every session when no --target',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n let prompt = (argv.prompt as string | undefined) ?? '';\n if (prompt === '-') {\n prompt = readStdin();\n }\n prompt = prompt.trim();\n if (!prompt) {\n console.error(chalk.red('Empty prompt. Usage: work broadcast <prompt>'));\n process.exitCode = 1;\n return;\n }\n\n const target = argv.target as string | undefined;\n const branch = argv.branch as string | undefined;\n const all = argv.all as boolean;\n if (branch && !target) {\n console.error(chalk.red('--branch requires --target.'));\n process.exitCode = 1;\n return;\n }\n // Guardrail: broadcasting to every session is a wide blast radius, so\n // require an explicit --all (or a narrowing --target) rather than letting\n // a bare `work broadcast \"...\"` fan out to the whole fleet by accident.\n if (!target && !all) {\n console.error(chalk.red('Refusing to broadcast to every session. Pass --all to confirm, or --target <alias> to narrow.'));\n process.exitCode = 1;\n return;\n }\n\n const queued = await broadcastPrompt(loadHistory(), { target, branch }, prompt);\n\n if (queued.length === 0) {\n console.log(chalk.yellow('No matching sessions to broadcast to.'));\n return;\n }\n\n console.log(chalk.cyan(`Queued prompt to ${queued.length} session${queued.length === 1 ? '' : 's'}:`));\n for (const t of queued) {\n console.log(` ${chalk.cyan(`[${t.session.target}/${t.session.branch}]`)} ${chalk.gray(t.sessionId)}`);\n }\n console.log('');\n console.log(chalk.gray('Delivery is lazy: each session picks this up on its next prompt (UserPromptSubmit hook).'));\n },\n};\n","/**\n * Core for `work broadcast`: queue a prompt to every (filtered) live session\n * via the existing pending-delivery mechanism. We do NOT touch PTYs — those\n * are per-process and unreachable from a separate CLI. Instead we post a\n * `published`, `author:'user'` comment to each session's comment file store;\n * `work hook prompt-submit` surfaces it on that session's next turn (see\n * pending-delivery.ts `readPendingForSession`, which selects exactly those).\n *\n * Broadcast writes from a SEPARATE process while `work web` may be writing\n * the same session's comments; the comment store's writes are database\n * transactions that reload first, so neither side's write is lost.\n */\n\nimport { getCommentFileStore } from './comment-file-store.js';\nimport { sessionIdFor } from '../sessions/session-id.js';\nimport { selectSessions, type FleetFilter } from '../sessions/fleet.js';\nimport type { WorktreeSession } from '../sessions/history.js';\n\nexport interface BroadcastTarget {\n session: WorktreeSession;\n sessionId: string;\n commentId: string;\n}\n\n/**\n * Post `prompt` as a published user comment (side 'general') to every session\n * matching `filter`. Returns one entry per session queued.\n */\nexport async function broadcastPrompt(sessions: WorktreeSession[], filter: FleetFilter, prompt: string): Promise<BroadcastTarget[]> {\n const body = prompt.trim();\n if (!body) throw new Error('broadcast prompt is empty');\n\n const selected = selectSessions(sessions, filter);\n const out: BroadcastTarget[] = [];\n for (const session of selected) {\n const sessionId = sessionIdFor(session);\n // The store's post is a transaction that reloads first, so a\n // concurrent work web write to the same session can't be lost.\n const c = getCommentFileStore(sessionId).post({ side: 'general', status: 'published', author: 'user', body });\n out.push({ session, sessionId, commentId: c.id });\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,Q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SAAS,KAAK;AACpB,UAAM,MAAM,KAAK;AACjB,QAAI,UAAU,CAAC,QAAQ;AACrB,cAAQ,MAAM,MAAM,IAAI,6BAA6B,CAAC;AACtD,cAAQ,WAAW;AACnB;AAAA,IACF;AAIA,QAAI,CAAC,UAAU,CAAC,KAAK;AACnB,cAAQ,MAAM,MAAM,IAAI,+FAA+F,CAAC;AACxH,cAAQ,WAAW;AACnB;AAAA,IACF;AAEA,UAAM,SAAS,MAAM,gBAAgB,YAAY,GAAG,EAAE,QAAQ,OAAO,GAAG,MAAM;AAE9E,QAAI,OAAO,WAAW,GAAG;AACvB,cAAQ,IAAI,MAAM,OAAO,uCAAuC,CAAC;AACjE;AAAA,IACF;AAEA,YAAQ,IAAI,MAAM,KAAK,oBAAoB,OAAO,MAAM,WAAW,OAAO,WAAW,IAAI,KAAK,GAAG,GAAG,CAAC;AACrG,eAAW,KAAK,QAAQ;AACtB,cAAQ,IAAI,KAAK,MAAM,KAAK,IAAI,EAAE,QAAQ,MAAM,IAAI,EAAE,QAAQ,MAAM,GAAG,CAAC,IAAI,MAAM,KAAK,EAAE,SAAS,CAAC,EAAE;AAAA,IACvG;AACA,YAAQ,IAAI,EAAE;AACd,YAAQ,IAAI,MAAM,KAAK,0FAA0F,CAAC;AAAA,EACpH;AACF;","names":[]}
|
|
@@ -3,33 +3,34 @@ import {
|
|
|
3
3
|
askCatchUp,
|
|
4
4
|
catchUp,
|
|
5
5
|
catchUpFacts
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-XEA3XWKW.js";
|
|
7
|
+
import "./chunk-D7TL6I5A.js";
|
|
8
|
+
import "./chunk-UD5CFHUS.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionFromArgs,
|
|
11
11
|
sessionPositionals
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JDLRVOX7.js";
|
|
13
13
|
import "./chunk-6AQRYLOB.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FCUVFJSY.js";
|
|
15
15
|
import "./chunk-ZSHWP2VS.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-UPS7NHKI.js";
|
|
17
17
|
import "./chunk-HUXS3VAI.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-75PWH7BG.js";
|
|
19
19
|
import "./chunk-NEJVK5CF.js";
|
|
20
20
|
import {
|
|
21
21
|
sessionIdFor
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-QGUBOOEN.js";
|
|
23
|
+
import "./chunk-FDFFJOV6.js";
|
|
24
24
|
import "./chunk-KGHWHAVF.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-NFM4NGTI.js";
|
|
26
26
|
import "./chunk-YQSWVHKK.js";
|
|
27
27
|
import "./chunk-JYWX2N5W.js";
|
|
28
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
28
29
|
import "./chunk-JUGF3YE7.js";
|
|
29
30
|
import "./chunk-HK6AZQ5Z.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-2YGVF224.js";
|
|
32
|
+
import "./chunk-LXBHVWOY.js";
|
|
33
|
+
import "./chunk-W4GDPHIF.js";
|
|
33
34
|
import "./chunk-BR6OWWAA.js";
|
|
34
35
|
import "./chunk-VHENFC2S.js";
|
|
35
36
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -60,4 +61,4 @@ var catchupCommand = {
|
|
|
60
61
|
export {
|
|
61
62
|
catchupCommand
|
|
62
63
|
};
|
|
63
|
-
//# sourceMappingURL=catchup-
|
|
64
|
+
//# sourceMappingURL=catchup-IVNPQHRM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/catchup.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { askCatchUp, catchUpFacts } from '../core/conversations/catch-up-deps.js';\nimport { catchUp } from '../core/conversations/catch-up.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work catchup` — the dashboard's Catch me up (catch-up.ts): a few sentences on where a session stands. */\nexport const catchupCommand: CommandModule = {\n command: 'catchup [target] [branch]',\n describe: 'A few sentences on where a session stands: done, left, anything waiting on you (default: the session for this folder)',\n builder: (yargs) => sessionPositionals(yargs),\n handler: async (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n console.error(chalk.gray(`Reading the last week of ${s.target} · ${s.branch}…`));\n const r = await catchUp(s, askCatchUp, catchUpFacts(sessionIdFor(s)));\n if (!r) {\n console.error(chalk.yellow('Nothing to go on: no conversation in the last week, or no answer from Claude.'));\n process.exitCode = 1;\n return;\n }\n console.log(r.text);\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/catchup.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { askCatchUp, catchUpFacts } from '../core/conversations/catch-up-deps.js';\nimport { catchUp } from '../core/conversations/catch-up.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work catchup` — the dashboard's Catch me up (catch-up.ts): a few sentences on where a session stands. */\nexport const catchupCommand: CommandModule = {\n command: 'catchup [target] [branch]',\n describe: 'A few sentences on where a session stands: done, left, anything waiting on you (default: the session for this folder)',\n builder: (yargs) => sessionPositionals(yargs),\n handler: async (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n console.error(chalk.gray(`Reading the last week of ${s.target} · ${s.branch}…`));\n const r = await catchUp(s, askCatchUp, catchUpFacts(sessionIdFor(s)));\n if (!r) {\n console.error(chalk.yellow('Nothing to go on: no conversation in the last week, or no answer from Claude.'));\n process.exitCode = 1;\n return;\n }\n console.log(r.text);\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAQX,IAAM,iBAAgC;AAAA,EAC3C,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UAAU,mBAAmB,KAAK;AAAA,EAC5C,SAAS,OAAO,SAAS;AACvB,UAAM,IAAI,gBAAgB,IAAI;AAC9B,QAAI,CAAC,EAAG;AACR,YAAQ,MAAM,MAAM,KAAK,4BAA4B,EAAE,MAAM,SAAM,EAAE,MAAM,QAAG,CAAC;AAC/E,UAAM,IAAI,MAAM,QAAQ,GAAG,YAAY,aAAa,aAAa,CAAC,CAAC,CAAC;AACpE,QAAI,CAAC,GAAG;AACN,cAAQ,MAAM,MAAM,OAAO,+EAA+E,CAAC;AAC3G,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,YAAQ,IAAI,EAAE,IAAI;AAAA,EACpB;AACF;","names":[]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
GRANT_HINT,
|
|
4
|
+
childrenOf,
|
|
5
|
+
coordinatorMessage,
|
|
6
|
+
coordinatorSince,
|
|
7
|
+
driveCheck,
|
|
8
|
+
parentOf
|
|
9
|
+
} from "./chunk-AGICFQMJ.js";
|
|
10
|
+
import {
|
|
11
|
+
sendHowText
|
|
12
|
+
} from "./chunk-KWHHB737.js";
|
|
13
|
+
import "./chunk-FZHFD2AY.js";
|
|
14
|
+
import {
|
|
15
|
+
callWorkWeb
|
|
16
|
+
} from "./chunk-SZAD5U3J.js";
|
|
17
|
+
import {
|
|
18
|
+
findSessionForCwd
|
|
19
|
+
} from "./chunk-FCUVFJSY.js";
|
|
20
|
+
import "./chunk-ZSHWP2VS.js";
|
|
21
|
+
import "./chunk-UPS7NHKI.js";
|
|
22
|
+
import "./chunk-HUXS3VAI.js";
|
|
23
|
+
import {
|
|
24
|
+
findSession,
|
|
25
|
+
findSessionById,
|
|
26
|
+
loadHistory,
|
|
27
|
+
readStatus
|
|
28
|
+
} from "./chunk-75PWH7BG.js";
|
|
29
|
+
import "./chunk-NEJVK5CF.js";
|
|
30
|
+
import {
|
|
31
|
+
sessionIdFor
|
|
32
|
+
} from "./chunk-QGUBOOEN.js";
|
|
33
|
+
import "./chunk-FDFFJOV6.js";
|
|
34
|
+
import "./chunk-KGHWHAVF.js";
|
|
35
|
+
import "./chunk-NFM4NGTI.js";
|
|
36
|
+
import "./chunk-YQSWVHKK.js";
|
|
37
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
38
|
+
import "./chunk-JUGF3YE7.js";
|
|
39
|
+
import "./chunk-HK6AZQ5Z.js";
|
|
40
|
+
import "./chunk-2YGVF224.js";
|
|
41
|
+
import "./chunk-LXBHVWOY.js";
|
|
42
|
+
import "./chunk-W4GDPHIF.js";
|
|
43
|
+
import "./chunk-BR6OWWAA.js";
|
|
44
|
+
import "./chunk-VHENFC2S.js";
|
|
45
|
+
import "./chunk-QOSAWNOU.js";
|
|
46
|
+
import "./chunk-D2J3AD6L.js";
|
|
47
|
+
import "./chunk-5ZCCUM75.js";
|
|
48
|
+
import "./chunk-IAKOKZYW.js";
|
|
49
|
+
import "./chunk-F2ECTTSY.js";
|
|
50
|
+
|
|
51
|
+
// src/commands/child.ts
|
|
52
|
+
import chalk from "chalk";
|
|
53
|
+
var ACTIONS = ["spawn", "list", "send", "finish"];
|
|
54
|
+
var label = (s) => `${s.target} \xB7 ${s.branch}`;
|
|
55
|
+
function fail(message) {
|
|
56
|
+
console.error(chalk.red(message));
|
|
57
|
+
process.exitCode = 1;
|
|
58
|
+
}
|
|
59
|
+
function text(argv) {
|
|
60
|
+
return typeof argv.message === "string" ? argv.message : null;
|
|
61
|
+
}
|
|
62
|
+
var childCommand = {
|
|
63
|
+
command: "child <action> [target] [branch]",
|
|
64
|
+
describe: "A coordinating session's own sessions: spawn, list, send, finish (run from the coordinator's folder)",
|
|
65
|
+
builder: (yargs) => yargs.positional("action", { choices: ACTIONS, describe: "spawn | list | send | finish" }).positional("target", { type: "string", describe: "Repo alias or group of the child" }).positional("branch", { type: "string", describe: "The child's branch (spawn: a new one)" }).option("message", { alias: "m", type: "string", describe: "spawn: its task; send: the message" }).option("base", { type: "string", describe: "spawn: the branch to start from (default: the repo\u2019s base)" }).option("name", { type: "string", describe: "spawn: a name for it" }).option("account", { type: "string", describe: "spawn: the Claude account it runs on" }).option("json", { type: "boolean", default: false, describe: "Print the result as JSON" }),
|
|
66
|
+
handler: async (argv) => {
|
|
67
|
+
const action = argv.action;
|
|
68
|
+
const sessions = loadHistory();
|
|
69
|
+
const me = findSessionForCwd(process.cwd(), sessions);
|
|
70
|
+
if (!me) return fail("This folder is not inside a work session: run `work child` from the coordinating session's folder.");
|
|
71
|
+
const myId = sessionIdFor(me);
|
|
72
|
+
const json = argv.json === true;
|
|
73
|
+
if (action === "list") {
|
|
74
|
+
const rows = childrenOf(myId).map((k) => {
|
|
75
|
+
const s = findSessionById(k.id);
|
|
76
|
+
const st = readStatus(k.id);
|
|
77
|
+
return {
|
|
78
|
+
sessionId: k.id,
|
|
79
|
+
target: s?.target ?? null,
|
|
80
|
+
branch: s?.branch ?? null,
|
|
81
|
+
startedAt: k.at,
|
|
82
|
+
archived: !s || !!s.archivedAt,
|
|
83
|
+
state: st?.state ?? null,
|
|
84
|
+
summary: st?.summary ?? null
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
if (json) return void process.stdout.write(JSON.stringify(rows, null, 2) + "\n");
|
|
88
|
+
if (!coordinatorSince(myId)) console.error(chalk.gray(`Not coordinating: ${GRANT_HINT}.`));
|
|
89
|
+
if (!rows.length) return void console.log(chalk.gray("No sessions started from this one."));
|
|
90
|
+
for (const r2 of rows)
|
|
91
|
+
console.log(
|
|
92
|
+
`${r2.target ?? "?"} \xB7 ${r2.branch ?? "?"} ${r2.archived ? chalk.gray("archived") : r2.state ?? "not started"}${r2.summary && !r2.archived ? chalk.gray(` ${r2.summary}`) : ""}`
|
|
93
|
+
);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const target = typeof argv.target === "string" ? argv.target : void 0;
|
|
97
|
+
const branch = typeof argv.branch === "string" ? argv.branch : void 0;
|
|
98
|
+
if (!target || !branch) return fail(`work child ${action} needs <target> <branch>.`);
|
|
99
|
+
if (action === "spawn") {
|
|
100
|
+
const task = text(argv);
|
|
101
|
+
if (!task?.trim()) return fail('Give its task with -m "\u2026".');
|
|
102
|
+
const r2 = await callWorkWeb(
|
|
103
|
+
"POST",
|
|
104
|
+
"/api/worktrees",
|
|
105
|
+
{
|
|
106
|
+
target,
|
|
107
|
+
branch,
|
|
108
|
+
prompt: task,
|
|
109
|
+
parentId: myId,
|
|
110
|
+
...typeof argv.base === "string" ? { base: argv.base } : {},
|
|
111
|
+
...typeof argv.name === "string" ? { name: argv.name } : {},
|
|
112
|
+
...typeof argv.account === "string" ? { account: argv.account } : {}
|
|
113
|
+
},
|
|
114
|
+
3e5
|
|
115
|
+
// a worktree, its setup and its agent's start
|
|
116
|
+
);
|
|
117
|
+
if (!r2.ok) return fail(r2.error);
|
|
118
|
+
if (json) return void process.stdout.write(JSON.stringify({ target, branch, ...r2.body }, null, 2) + "\n");
|
|
119
|
+
for (const w of r2.body.warnings ?? []) console.error(chalk.yellow(w));
|
|
120
|
+
if (r2.body.startError) return fail(`${target} \xB7 ${branch} was made, but its agent did not start: ${r2.body.startError}`);
|
|
121
|
+
console.log(`${target} \xB7 ${branch}: started with its task. It reports back with \`work report\`.`);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const child = findSession(sessions, target, branch);
|
|
125
|
+
if (!child) return fail(`No session ${target} ${branch}.`);
|
|
126
|
+
const childId = sessionIdFor(child);
|
|
127
|
+
const may = driveCheck(myId, childId, { parentOf, coordinator: (id) => coordinatorSince(id) !== null });
|
|
128
|
+
if (!may.ok) return fail(`${label(child)}: ${may.error}`);
|
|
129
|
+
if (action === "send") {
|
|
130
|
+
const msg = text(argv);
|
|
131
|
+
if (!msg?.trim()) return fail('Give the message with -m "\u2026".');
|
|
132
|
+
const r2 = await callWorkWeb("POST", `/api/sessions/${childId}/send`, {
|
|
133
|
+
text: coordinatorMessage(me.title?.trim() || label(me), msg)
|
|
134
|
+
});
|
|
135
|
+
if (!r2.ok) return fail(r2.error);
|
|
136
|
+
console.log(`${label(child)}: ${sendHowText(r2.body.how)}`);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const r = await callWorkWeb("POST", `/api/sessions/${childId}/archive`, { archived: true }, 12e4);
|
|
140
|
+
if (!r.ok) return fail(`${label(child)}: ${r.error}`);
|
|
141
|
+
for (const w of r.body.warnings ?? []) console.error(chalk.yellow(w));
|
|
142
|
+
console.log(`${label(child)}: archived (its branch and work are kept; Restore brings it back).`);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
export {
|
|
146
|
+
childCommand
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=child-6ZMI62MQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/child.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { callWorkWeb } from '../core/platform/web-discovery.js';\nimport { findSession, findSessionById, loadHistory, type WorktreeSession } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { findSessionForCwd } from '../core/comments/pending-delivery.js';\nimport { childrenOf, coordinatorMessage, coordinatorSince, driveCheck, GRANT_HINT, parentOf } from '../core/sessions/session-children.js';\nimport { sendHowText } from '../core/sessions/session-control.js';\nimport { readStatus } from '../core/status/session-status.js';\nimport type { SendWire } from '../core/api-types.js';\n\n/**\n * `work child` — a coordinating session's own sessions (session-children.ts): `spawn` one on a new branch with its\n * task, `list` them, `send` one a follow-up, `finish` one (archive it: its agent stopped, its work kept). Run from the\n * coordinator's folder; it acts only on the sessions that one started, and only once `work coordinate --on` granted\n * it — so work's session settings can allow `work child` without asking each time.\n */\n\nconst ACTIONS = ['spawn', 'list', 'send', 'finish'] as const;\ntype Action = (typeof ACTIONS)[number];\n\nconst label = (s: WorktreeSession) => `${s.target} · ${s.branch}`;\n\nfunction fail(message: string): void {\n console.error(chalk.red(message));\n process.exitCode = 1;\n}\n\n// No --file: `work child` runs without asking, and a file read for it would skip the repo's deny rules (no Read call).\nfunction text(argv: Record<string, unknown>): string | null {\n return typeof argv.message === 'string' ? argv.message : null;\n}\n\nexport const childCommand: CommandModule = {\n command: 'child <action> [target] [branch]',\n describe: \"A coordinating session's own sessions: spawn, list, send, finish (run from the coordinator's folder)\",\n builder: (yargs) =>\n yargs\n .positional('action', { choices: ACTIONS, describe: 'spawn | list | send | finish' })\n .positional('target', { type: 'string', describe: 'Repo alias or group of the child' })\n .positional('branch', { type: 'string', describe: \"The child's branch (spawn: a new one)\" })\n .option('message', { alias: 'm', type: 'string', describe: 'spawn: its task; send: the message' })\n .option('base', { type: 'string', describe: 'spawn: the branch to start from (default: the repo’s base)' })\n .option('name', { type: 'string', describe: 'spawn: a name for it' })\n .option('account', { type: 'string', describe: 'spawn: the Claude account it runs on' })\n .option('json', { type: 'boolean', default: false, describe: 'Print the result as JSON' }),\n handler: async (argv) => {\n const action = argv.action as Action;\n const sessions = loadHistory();\n const me = findSessionForCwd(process.cwd(), sessions);\n if (!me) return fail(\"This folder is not inside a work session: run `work child` from the coordinating session's folder.\");\n const myId = sessionIdFor(me);\n const json = argv.json === true;\n\n if (action === 'list') {\n const rows = childrenOf(myId).map((k) => {\n const s = findSessionById(k.id);\n const st = readStatus(k.id);\n return {\n sessionId: k.id,\n target: s?.target ?? null,\n branch: s?.branch ?? null,\n startedAt: k.at,\n archived: !s || !!s.archivedAt,\n state: st?.state ?? null,\n summary: st?.summary ?? null,\n };\n });\n if (json) return void process.stdout.write(JSON.stringify(rows, null, 2) + '\\n');\n if (!coordinatorSince(myId)) console.error(chalk.gray(`Not coordinating: ${GRANT_HINT}.`));\n if (!rows.length) return void console.log(chalk.gray('No sessions started from this one.'));\n for (const r of rows)\n console.log(\n `${r.target ?? '?'} · ${r.branch ?? '?'} ${r.archived ? chalk.gray('archived') : (r.state ?? 'not started')}${r.summary && !r.archived ? chalk.gray(` ${r.summary}`) : ''}`,\n );\n return;\n }\n\n const target = typeof argv.target === 'string' ? argv.target : undefined;\n const branch = typeof argv.branch === 'string' ? argv.branch : undefined;\n if (!target || !branch) return fail(`work child ${action} needs <target> <branch>.`);\n\n if (action === 'spawn') {\n const task = text(argv);\n if (!task?.trim()) return fail('Give its task with -m \"…\".');\n const r = await callWorkWeb<{ sessionId: string; started?: string; startError?: string; warnings?: string[] }>(\n 'POST',\n '/api/worktrees',\n {\n target,\n branch,\n prompt: task,\n parentId: myId,\n ...(typeof argv.base === 'string' ? { base: argv.base } : {}),\n ...(typeof argv.name === 'string' ? { name: argv.name } : {}),\n ...(typeof argv.account === 'string' ? { account: argv.account } : {}),\n },\n 300_000, // a worktree, its setup and its agent's start\n );\n if (!r.ok) return fail(r.error);\n if (json) return void process.stdout.write(JSON.stringify({ target, branch, ...r.body }, null, 2) + '\\n');\n for (const w of r.body.warnings ?? []) console.error(chalk.yellow(w));\n if (r.body.startError) return fail(`${target} · ${branch} was made, but its agent did not start: ${r.body.startError}`);\n console.log(`${target} · ${branch}: started with its task. It reports back with \\`work report\\`.`);\n return;\n }\n\n const child = findSession(sessions, target, branch);\n if (!child) return fail(`No session ${target} ${branch}.`);\n const childId = sessionIdFor(child);\n const may = driveCheck(myId, childId, { parentOf, coordinator: (id) => coordinatorSince(id) !== null });\n if (!may.ok) return fail(`${label(child)}: ${may.error}`);\n\n if (action === 'send') {\n const msg = text(argv);\n if (!msg?.trim()) return fail('Give the message with -m \"…\".');\n const r = await callWorkWeb<SendWire>('POST', `/api/sessions/${childId}/send`, {\n text: coordinatorMessage(me.title?.trim() || label(me), msg),\n });\n if (!r.ok) return fail(r.error);\n console.log(`${label(child)}: ${sendHowText(r.body.how)}`);\n return;\n }\n\n // finish: archived as the dashboard's Archive does — its agent stopped, uncommitted work saved, nothing discarded.\n const r = await callWorkWeb<{ ok: true; warnings?: string[] }>('POST', `/api/sessions/${childId}/archive`, { archived: true }, 120_000);\n if (!r.ok) return fail(`${label(child)}: ${r.error}`);\n for (const w of r.body.warnings ?? []) console.error(chalk.yellow(w));\n console.log(`${label(child)}: archived (its branch and work are kept; Restore brings it back).`);\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAkBlB,IAAM,UAAU,CAAC,SAAS,QAAQ,QAAQ,QAAQ;AAGlD,IAAM,QAAQ,CAAC,MAAuB,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM;AAE/D,SAAS,KAAK,SAAuB;AACnC,UAAQ,MAAM,MAAM,IAAI,OAAO,CAAC;AAChC,UAAQ,WAAW;AACrB;AAGA,SAAS,KAAK,MAA8C;AAC1D,SAAO,OAAO,KAAK,YAAY,WAAW,KAAK,UAAU;AAC3D;AAEO,IAAM,eAA8B;AAAA,EACzC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,MACG,WAAW,UAAU,EAAE,SAAS,SAAS,UAAU,+BAA+B,CAAC,EACnF,WAAW,UAAU,EAAE,MAAM,UAAU,UAAU,mCAAmC,CAAC,EACrF,WAAW,UAAU,EAAE,MAAM,UAAU,UAAU,wCAAwC,CAAC,EAC1F,OAAO,WAAW,EAAE,OAAO,KAAK,MAAM,UAAU,UAAU,qCAAqC,CAAC,EAChG,OAAO,QAAQ,EAAE,MAAM,UAAU,UAAU,kEAA6D,CAAC,EACzG,OAAO,QAAQ,EAAE,MAAM,UAAU,UAAU,uBAAuB,CAAC,EACnE,OAAO,WAAW,EAAE,MAAM,UAAU,UAAU,uCAAuC,CAAC,EACtF,OAAO,QAAQ,EAAE,MAAM,WAAW,SAAS,OAAO,UAAU,2BAA2B,CAAC;AAAA,E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180
180
|
accountEnv
|
|
181
181
|
};
|
|
182
|
-
//# sourceMappingURL=chunk-
|
|
182
|
+
//# sourceMappingURL=chunk-2YGVF224.js.map
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-VRMALBZK.js";
|
|
10
10
|
import {
|
|
11
11
|
findSession
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WC4IN5MD.js";
|
|
13
13
|
import {
|
|
14
14
|
dbPtySessions,
|
|
15
15
|
forgetPersistedSession
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OHX7WKZU.js";
|
|
17
17
|
import {
|
|
18
18
|
hostStartLockPath
|
|
19
19
|
} from "./chunk-DLV7TRON.js";
|
|
@@ -24,13 +24,13 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
ASSISTANT_ID,
|
|
26
26
|
prepareAssistantDir
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-OOQBMWTK.js";
|
|
28
28
|
import {
|
|
29
29
|
noClaudeBecause
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-75PWH7BG.js";
|
|
31
31
|
import {
|
|
32
32
|
sessionIdFor
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QGUBOOEN.js";
|
|
34
34
|
import {
|
|
35
35
|
AccountAdminError,
|
|
36
36
|
agentFor,
|
|
@@ -39,13 +39,13 @@ import {
|
|
|
39
39
|
logSwallowed,
|
|
40
40
|
sessionToolFor,
|
|
41
41
|
swallow
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FDFFJOV6.js";
|
|
43
43
|
import {
|
|
44
44
|
hasEnvDelta
|
|
45
45
|
} from "./chunk-YQSWVHKK.js";
|
|
46
46
|
import {
|
|
47
47
|
loadConfig
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-LXBHVWOY.js";
|
|
49
49
|
import {
|
|
50
50
|
ensureFile,
|
|
51
51
|
withFileLock
|
|
@@ -426,4 +426,4 @@ export {
|
|
|
426
426
|
stopSessionPty,
|
|
427
427
|
detachPtyPool
|
|
428
428
|
};
|
|
429
|
-
//# sourceMappingURL=chunk-
|
|
429
|
+
//# sourceMappingURL=chunk-4EFPHIME.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XBWS77S2.js";
|
|
5
5
|
import {
|
|
6
6
|
logSwallowed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FDFFJOV6.js";
|
|
8
8
|
|
|
9
9
|
// src/core/diff/diff-stat.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -207,4 +207,4 @@ export {
|
|
|
207
207
|
wantsDiffStat,
|
|
208
208
|
findOverlaps
|
|
209
209
|
};
|
|
210
|
-
//# sourceMappingURL=chunk-
|
|
210
|
+
//# sourceMappingURL=chunk-6V6LBFWB.js.map
|
|
@@ -8,18 +8,20 @@ import {
|
|
|
8
8
|
sessionIdFor,
|
|
9
9
|
tx,
|
|
10
10
|
withDb
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QGUBOOEN.js";
|
|
12
12
|
import {
|
|
13
13
|
agentFor,
|
|
14
14
|
agentOf,
|
|
15
15
|
agentToRecord,
|
|
16
16
|
logSwallowed,
|
|
17
|
-
readJsonlTail
|
|
17
|
+
readJsonlTail
|
|
18
|
+
} from "./chunk-FDFFJOV6.js";
|
|
19
|
+
import {
|
|
18
20
|
workingBranch
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-Z6ACV5ZQ.js";
|
|
20
22
|
import {
|
|
21
23
|
loadConfig
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LXBHVWOY.js";
|
|
23
25
|
import {
|
|
24
26
|
bootTime,
|
|
25
27
|
isPidAlive,
|
|
@@ -3198,4 +3200,4 @@ export {
|
|
|
3198
3200
|
mergeHydratedSessions,
|
|
3199
3201
|
forgetOtherBaseCheckoutEntries
|
|
3200
3202
|
};
|
|
3201
|
-
//# sourceMappingURL=chunk-
|
|
3203
|
+
//# sourceMappingURL=chunk-75PWH7BG.js.map
|