@namzu/cli 57.0.0 → 58.0.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/CHANGELOG.md +142 -0
- package/README.md +5 -5
- package/dist/bin.js +1 -1
- package/dist/boot-narrative.d.ts.map +1 -1
- package/dist/browser/control.d.ts +25 -2
- package/dist/browser/control.d.ts.map +1 -1
- package/dist/chunks/{acp-KBPTK4GN.js → acp-OZG7H75P.js} +441 -205
- package/dist/chunks/acp-OZG7H75P.js.map +6 -0
- package/dist/chunks/{activity-command-JOED2VWN.js → activity-command-ZROH53CS.js} +14 -15
- package/dist/chunks/activity-command-ZROH53CS.js.map +6 -0
- package/dist/chunks/{add-66AQ7SKZ.js → add-DKSV5Y3C.js} +36 -34
- package/dist/chunks/add-DKSV5Y3C.js.map +6 -0
- package/dist/chunks/{agent-DL7YTL5B.js → agent-MSSMOEBP.js} +58 -48
- package/dist/chunks/agent-session-VCB6HX3E.js +89 -0
- package/dist/chunks/{apply-at-exit-5GUCOPX3.js → apply-at-exit-Z34ZOT4A.js} +9 -9
- package/dist/chunks/{apply-at-exit-5GUCOPX3.js.map → apply-at-exit-Z34ZOT4A.js.map} +1 -1
- package/dist/chunks/{archive-ED4CWEU2.js → archive-UMNSALTJ.js} +16 -13
- package/dist/chunks/archive-UMNSALTJ.js.map +6 -0
- package/dist/chunks/auth-2NEDWCS7.js +242 -0
- package/dist/chunks/auth-2NEDWCS7.js.map +6 -0
- package/dist/chunks/{bin-main-JDJ6LEOK.js → bin-main-2E6XD7MQ.js} +8 -8
- package/dist/chunks/{binding-NU3G3EBQ.js → binding-NAPEU62B.js} +3 -3
- package/dist/chunks/browser-M7U6GZOY.js +76 -0
- package/dist/chunks/browser-M7U6GZOY.js.map +6 -0
- package/dist/chunks/{chat-ISFH5CPZ.js → chat-34SAREPI.js} +17 -18
- package/dist/chunks/chat-34SAREPI.js.map +6 -0
- package/dist/chunks/{chunk-C4CUPDOU.js → chunk-27ICMJVV.js} +3 -3
- package/dist/chunks/{chunk-6XIPTDOH.js → chunk-2D5WW5KP.js} +2 -2
- package/dist/chunks/{chunk-T3VMBZEY.js → chunk-2GKFWJ3O.js} +7 -186
- package/dist/chunks/chunk-2GKFWJ3O.js.map +6 -0
- package/dist/chunks/{chunk-K3NVHXN7.js → chunk-2J2Z6S3V.js} +21 -21
- package/dist/chunks/{chunk-G3WCIRCZ.js → chunk-2PRVGX6U.js} +8 -8
- package/dist/chunks/chunk-2QJNPJOC.js +39 -0
- package/dist/chunks/chunk-2QJNPJOC.js.map +6 -0
- package/dist/chunks/{chunk-K5FGK5AP.js → chunk-32CPPPKX.js} +3 -3
- package/dist/chunks/{chunk-ETDOSJF7.js → chunk-3SBROSVS.js} +2 -2
- package/dist/chunks/{chunk-ZT3DLJQZ.js → chunk-3ZL6YBMT.js} +6 -6
- package/dist/chunks/chunk-4AWE33MD.js +186 -0
- package/dist/chunks/chunk-4AWE33MD.js.map +6 -0
- package/dist/chunks/{chunk-C534SIJI.js → chunk-4RCXY7WO.js} +2 -2
- package/dist/chunks/{chunk-IH5NEU2Y.js → chunk-4WLMPRGO.js} +4 -4
- package/dist/chunks/{chunk-IH5NEU2Y.js.map → chunk-4WLMPRGO.js.map} +1 -1
- package/dist/chunks/{chunk-NQ3MZ6N4.js → chunk-4YQJ262B.js} +2 -2
- package/dist/chunks/{chunk-WEL6L6DN.js → chunk-52DZTN4C.js} +5 -3
- package/dist/chunks/{chunk-QF4HGWRL.js → chunk-5564PCLT.js} +11 -9
- package/dist/chunks/chunk-5564PCLT.js.map +6 -0
- package/dist/chunks/{chunk-2TU3QQRG.js → chunk-5COLG33E.js} +35 -6
- package/dist/chunks/chunk-5COLG33E.js.map +6 -0
- package/dist/chunks/{chunk-MTSXDMJB.js → chunk-5GI7W4SM.js} +9 -9
- package/dist/chunks/{chunk-I7WXDTCF.js → chunk-5NIQMCRF.js} +2 -2
- package/dist/chunks/{chunk-JOORBY5L.js → chunk-5WS5Q2KW.js} +3 -3
- package/dist/chunks/{chunk-T5MBQXU2.js → chunk-655EBPZH.js} +36 -12
- package/dist/chunks/{chunk-T5MBQXU2.js.map → chunk-655EBPZH.js.map} +1 -1
- package/dist/chunks/{chunk-7EL5RPEU.js → chunk-66DFXMZG.js} +5 -5
- package/dist/chunks/{chunk-6SEDSZBH.js → chunk-6MMKNZYL.js} +3 -3
- package/dist/chunks/{chunk-Y3KKZ7HS.js → chunk-6QQVZXUE.js} +2 -2
- package/dist/chunks/{chunk-X2JFYB5A.js → chunk-6RBEIDSC.js} +3 -3
- package/dist/chunks/{chunk-IRCAPHCE.js → chunk-6V4VYVRZ.js} +2 -2
- package/dist/chunks/{chunk-QJYK566B.js → chunk-6ZWEKSAV.js} +7 -7
- package/dist/chunks/{chunk-AFNHI46Y.js → chunk-774DAIPO.js} +1188 -744
- package/dist/chunks/chunk-774DAIPO.js.map +6 -0
- package/dist/chunks/{chunk-F7ECENUK.js → chunk-7BSLOLTU.js} +2 -2
- package/dist/chunks/{chunk-TOADRNOV.js → chunk-7BXJPOEG.js} +4 -4
- package/dist/chunks/{chunk-BFTAE67C.js → chunk-7DERK6IR.js} +3 -3
- package/dist/chunks/{chunk-4KGXEARZ.js → chunk-7EASTT3H.js} +2 -2
- package/dist/chunks/{chunk-OP2GILCA.js → chunk-7LCU5IKH.js} +20 -20
- package/dist/chunks/{chunk-OP2GILCA.js.map → chunk-7LCU5IKH.js.map} +1 -1
- package/dist/chunks/{chunk-5PTXGBPL.js → chunk-7MYLYFIV.js} +2 -2
- package/dist/chunks/{chunk-KOVWQARO.js → chunk-7NAHUZAR.js} +2 -2
- package/dist/chunks/{chunk-GQU3OUV5.js → chunk-7NQLCFYX.js} +5 -5
- package/dist/chunks/{chunk-ICQYIDIR.js → chunk-7ROZ2N57.js} +35 -3
- package/dist/chunks/chunk-7ROZ2N57.js.map +6 -0
- package/dist/chunks/{chunk-SIG7WHBU.js → chunk-7YC42EXB.js} +5 -1
- package/dist/chunks/{chunk-SIG7WHBU.js.map → chunk-7YC42EXB.js.map} +1 -1
- package/dist/chunks/{chunk-JRIDJW3W.js → chunk-A5O5VTQM.js} +3 -3
- package/dist/chunks/{chunk-VFB4ZUOR.js → chunk-ADLNBLRA.js} +28 -16
- package/dist/chunks/chunk-ADLNBLRA.js.map +6 -0
- package/dist/chunks/{chunk-JB3UZ7JJ.js → chunk-BATWKQWV.js} +2 -2
- package/dist/chunks/{chunk-6JAWZGSH.js → chunk-CK47DTW6.js} +5 -5
- package/dist/chunks/{chunk-P7UV5M73.js → chunk-CSO7BHDJ.js} +2 -2
- package/dist/chunks/{chunk-ECDMJNZU.js → chunk-D42SQGEO.js} +2 -2
- package/dist/chunks/{chunk-DYCSVG2K.js → chunk-DIBXZBOP.js} +7 -7
- package/dist/chunks/{chunk-3ZHOM2L7.js → chunk-DZA7UXA2.js} +15 -63
- package/dist/chunks/chunk-DZA7UXA2.js.map +6 -0
- package/dist/chunks/{chunk-CJUK4IWQ.js → chunk-EFWF72V4.js} +3 -3
- package/dist/chunks/{chunk-A4I24ISL.js → chunk-ENNAZGUX.js} +3 -3
- package/dist/chunks/{chunk-5GRTRQTV.js → chunk-EOLXS2ZV.js} +5 -5
- package/dist/chunks/{chunk-QF2FZ2DM.js → chunk-ESHAWCBR.js} +43 -12
- package/dist/chunks/chunk-ESHAWCBR.js.map +6 -0
- package/dist/chunks/{chunk-YBAPUTER.js → chunk-F6NUMURW.js} +3 -3
- package/dist/chunks/{chunk-LD4COIFG.js → chunk-FJG7JN4W.js} +5 -5
- package/dist/chunks/{chunk-LD4COIFG.js.map → chunk-FJG7JN4W.js.map} +1 -1
- package/dist/chunks/{chunk-ZFQOF5A5.js → chunk-FZPIEOFR.js} +3 -3
- package/dist/chunks/{chunk-372SLS6Y.js → chunk-G7UGGWOR.js} +2 -2
- package/dist/chunks/{chunk-4PX62LQ2.js → chunk-GLZJBFDO.js} +4 -4
- package/dist/chunks/{chunk-O5YDY6XR.js → chunk-GVLU2YM7.js} +17 -20
- package/dist/chunks/{chunk-O5YDY6XR.js.map → chunk-GVLU2YM7.js.map} +1 -1
- package/dist/chunks/{chunk-QERO7OI6.js → chunk-HBGRWJU5.js} +13 -13
- package/dist/chunks/{chunk-DBXWOXG3.js → chunk-HGOU2QRN.js} +19 -19
- package/dist/chunks/{chunk-DBXWOXG3.js.map → chunk-HGOU2QRN.js.map} +1 -1
- package/dist/chunks/{chunk-BQR2C4RM.js → chunk-HICZARAY.js} +2 -2
- package/dist/chunks/{chunk-HQFAVCTF.js → chunk-HONSYTUC.js} +4 -4
- package/dist/chunks/{chunk-XYF26ZUO.js → chunk-HRKY4ARS.js} +13 -11
- package/dist/chunks/chunk-HRKY4ARS.js.map +6 -0
- package/dist/chunks/{chunk-X4W4DN3S.js → chunk-I5BNXO63.js} +2 -2
- package/dist/chunks/{chunk-RF6EIDPV.js → chunk-IBENEKM4.js} +27 -5
- package/dist/chunks/chunk-IBENEKM4.js.map +6 -0
- package/dist/chunks/{chunk-DID4WFOD.js → chunk-IH2JBJ6I.js} +4 -4
- package/dist/chunks/{chunk-5X4XLHLF.js → chunk-J4GPHTRN.js} +8 -8
- package/dist/chunks/{chunk-I5CWCNRN.js → chunk-JFA2XPTW.js} +5 -5
- package/dist/chunks/{chunk-IT2OFHF7.js → chunk-JSY23B3Q.js} +3 -3
- package/dist/chunks/{chunk-L2Q467T7.js → chunk-JX6O7Y55.js} +4 -4
- package/dist/chunks/{chunk-L2Q467T7.js.map → chunk-JX6O7Y55.js.map} +1 -1
- package/dist/chunks/{chunk-U77GVCK3.js → chunk-K5VLCRHY.js} +2 -2
- package/dist/chunks/chunk-K7ZQYJJE.js +197 -0
- package/dist/chunks/chunk-K7ZQYJJE.js.map +6 -0
- package/dist/chunks/{chunk-7AXLZKTB.js → chunk-KCBOIL5Q.js} +7 -7
- package/dist/chunks/{chunk-KE53UTUG.js → chunk-KIWLK2WZ.js} +7 -9
- package/dist/chunks/chunk-KIWLK2WZ.js.map +6 -0
- package/dist/chunks/chunk-L4LGUBYZ.js +167 -0
- package/dist/chunks/chunk-L4LGUBYZ.js.map +6 -0
- package/dist/chunks/{chunk-X7QC2Q7P.js → chunk-L5FCGDB7.js} +1674 -688
- package/dist/chunks/chunk-L5FCGDB7.js.map +6 -0
- package/dist/chunks/{chunk-LS5KVRMV.js → chunk-LM2OGSW5.js} +6 -6
- package/dist/chunks/{chunk-LS5KVRMV.js.map → chunk-LM2OGSW5.js.map} +1 -1
- package/dist/chunks/{chunk-QUI2ZAGY.js → chunk-LRUY5C6H.js} +83 -18
- package/dist/chunks/chunk-LRUY5C6H.js.map +6 -0
- package/dist/chunks/{chunk-QW3Y3RDE.js → chunk-MJ32RCFZ.js} +4 -4
- package/dist/chunks/{chunk-Q4LXBL4Z.js → chunk-MJJA277Z.js} +19 -4
- package/dist/chunks/{chunk-Q4LXBL4Z.js.map → chunk-MJJA277Z.js.map} +1 -1
- package/dist/chunks/{chunk-5TJZWGTZ.js → chunk-MOY2OERC.js} +463 -135
- package/dist/chunks/chunk-MOY2OERC.js.map +6 -0
- package/dist/chunks/{chunk-PHDA4JI7.js → chunk-MX3U5TBQ.js} +17 -6
- package/dist/chunks/chunk-MX3U5TBQ.js.map +6 -0
- package/dist/chunks/{chunk-WIO3JRB5.js → chunk-NBJ4OTXL.js} +8 -8
- package/dist/chunks/{chunk-BFYETM56.js → chunk-NFTQDITK.js} +91 -6
- package/dist/chunks/chunk-NFTQDITK.js.map +6 -0
- package/dist/chunks/{chunk-66ZXPQGB.js → chunk-NO3F3QQ3.js} +13 -13
- package/dist/chunks/{chunk-LJDAHRWI.js → chunk-NQYOMRPT.js} +2 -2
- package/dist/chunks/{chunk-WXCJTJK4.js → chunk-O6C4RETO.js} +3 -3
- package/dist/chunks/{chunk-W5TYUJI5.js → chunk-O6EDUJ77.js} +6 -6
- package/dist/chunks/{chunk-F7LHGSEQ.js → chunk-OD2PMTXS.js} +3 -3
- package/dist/chunks/{chunk-5LDYBGOZ.js → chunk-OGEOUETU.js} +3 -3
- package/dist/chunks/{chunk-WSO7YQLR.js → chunk-OY3UN3KD.js} +145 -3
- package/dist/chunks/{chunk-WSO7YQLR.js.map → chunk-OY3UN3KD.js.map} +2 -2
- package/dist/chunks/chunk-P6RYPNSD.js +435 -0
- package/dist/chunks/chunk-P6RYPNSD.js.map +6 -0
- package/dist/chunks/{chunk-MI6WMBDQ.js → chunk-PYTTGYZS.js} +3 -3
- package/dist/chunks/chunk-RHJOIAFS.js +201 -0
- package/dist/chunks/chunk-RHJOIAFS.js.map +6 -0
- package/dist/chunks/{chunk-U2MFIQ6X.js → chunk-RR7FS6SQ.js} +3 -3
- package/dist/chunks/{chunk-7O2WNQQZ.js → chunk-RTMX7IDM.js} +2 -2
- package/dist/chunks/{chunk-ZAPPY4VF.js → chunk-S4OEUN6F.js} +2 -2
- package/dist/chunks/{chunk-EXE7JBHE.js → chunk-SEVORRUA.js} +2 -2
- package/dist/chunks/{chunk-WCPKRDGR.js → chunk-TAIC3PC2.js} +3 -3
- package/dist/chunks/{chunk-AF4ILHID.js → chunk-TGLXWW5B.js} +3 -3
- package/dist/chunks/{chunk-4YN7VGLV.js → chunk-TJAUF5NX.js} +3 -3
- package/dist/chunks/{chunk-AWU5MYX3.js → chunk-TL535OCL.js} +29 -13
- package/dist/chunks/chunk-TL535OCL.js.map +6 -0
- package/dist/chunks/{chunk-E7RD32NX.js → chunk-TSU4F6DF.js} +2 -2
- package/dist/chunks/{chunk-MPIYLDWJ.js → chunk-TXMWKHYW.js} +2 -2
- package/dist/chunks/{chunk-6F3M3P3W.js → chunk-U4DBETHR.js} +807 -755
- package/dist/chunks/chunk-U4DBETHR.js.map +6 -0
- package/dist/chunks/{chunk-PYR7VRWF.js → chunk-UBGDYBSQ.js} +2 -2
- package/dist/chunks/{chunk-73VS7EXG.js → chunk-ULFR2FWA.js} +2 -2
- package/dist/chunks/{chunk-HXW5DQLU.js → chunk-UMPJ4VXN.js} +4 -4
- package/dist/chunks/{chunk-MN426ZWA.js → chunk-URZPVSHV.js} +4 -4
- package/dist/chunks/{chunk-7WDKN3QG.js → chunk-UXLQNJDR.js} +4 -4
- package/dist/chunks/{chunk-QS44GK4N.js → chunk-WEPINZBQ.js} +12 -4
- package/dist/chunks/{chunk-QS44GK4N.js.map → chunk-WEPINZBQ.js.map} +1 -1
- package/dist/chunks/{chunk-GWH6BOVE.js → chunk-XQZMTH3S.js} +12 -40
- package/dist/chunks/chunk-XQZMTH3S.js.map +6 -0
- package/dist/chunks/{chunk-SQ32S3OE.js → chunk-XWP64X6U.js} +6 -6
- package/dist/chunks/{chunk-YQOT7ABG.js → chunk-Y3NC6RIL.js} +4 -4
- package/dist/chunks/{chunk-LMPUBX5R.js → chunk-YEWJVAM4.js} +57 -9
- package/dist/chunks/chunk-YEWJVAM4.js.map +6 -0
- package/dist/chunks/{chunk-FNSWIOFJ.js → chunk-ZDMI3JSL.js} +26 -4
- package/dist/chunks/{chunk-FNSWIOFJ.js.map → chunk-ZDMI3JSL.js.map} +1 -1
- package/dist/chunks/{cli-runtime-2HOSJR5Y.js → cli-runtime-BLOWAO6Q.js} +34 -19
- package/dist/chunks/cli-runtime-BLOWAO6Q.js.map +6 -0
- package/dist/chunks/{commands-TKD5BHAC.js → commands-VWBRELWZ.js} +6 -6
- package/dist/chunks/{computer-FQRWTC6M.js → computer-6P3GAOV2.js} +15 -7
- package/dist/chunks/computer-6P3GAOV2.js.map +6 -0
- package/dist/chunks/{config-2JST7BZT.js → config-77NN5LSS.js} +20 -17
- package/dist/chunks/config-77NN5LSS.js.map +6 -0
- package/dist/chunks/{cost-AZAQ3AC5.js → cost-IVLAFD5T.js} +5 -5
- package/dist/chunks/{crash-report-IYMUJRDT.js → crash-report-CA3Y7LA6.js} +6 -6
- package/dist/chunks/{dist-5JRS362B.js → dist-3SGAVJFN.js} +2 -2
- package/dist/chunks/{dist-PYOYSQIZ.js → dist-5G52QS75.js} +193 -33
- package/dist/chunks/dist-5G52QS75.js.map +6 -0
- package/dist/chunks/{dist-S4GG5BOF.js → dist-7BSYEFE5.js} +2 -2
- package/dist/chunks/{dist-SPKR3SBF.js → dist-AM6FWCIJ.js} +10 -2
- package/dist/chunks/{dist-YGZEZT7E.js → dist-ISRJEZRF.js} +2 -2
- package/dist/chunks/{dist-BECOVIWQ.js → dist-PBFZXU4L.js} +2 -2
- package/dist/chunks/{dist-VQGHI5SR.js → dist-RDXEBTCL.js} +2 -2
- package/dist/chunks/{dist-NLY5ZLEK.js → dist-V43PPTPF.js} +2 -2
- package/dist/chunks/{doctor-MYN7YCXB.js → doctor-FGOCO7UR.js} +39 -39
- package/dist/chunks/{drain-IEZMA72M.js → drain-A3DLR5A4.js} +18 -18
- package/dist/chunks/{entry-SS5QYOOM.js → entry-4LHTI3VQ.js} +6 -6
- package/dist/chunks/{eval-4QK2EYXU.js → eval-IYWGGPWF.js} +12 -12
- package/dist/chunks/{eval-4QK2EYXU.js.map → eval-IYWGGPWF.js.map} +1 -1
- package/dist/chunks/{exec-Z6TIWDJM.js → exec-HWK44ZYI.js} +104 -60
- package/dist/chunks/exec-HWK44ZYI.js.map +6 -0
- package/dist/chunks/{extension-4SMB7XQP.js → extension-BP7Q3PFK.js} +5 -5
- package/dist/chunks/{github-X352BD5R.js → github-IF3JVVJF.js} +5 -1
- package/dist/chunks/github-IF3JVVJF.js.map +6 -0
- package/dist/chunks/{home-YYLBZ3E7.js → home-GR6YDAAE.js} +3 -3
- package/dist/chunks/{hooks-KVCP7AHB.js → hooks-KSSNBDF2.js} +22 -22
- package/dist/chunks/{hooks-report-7BAQ5FJD.js → hooks-report-H4JAHJXE.js} +18 -18
- package/dist/chunks/{host-CAZNAKUM.js → host-ISKJDJ7B.js} +10 -10
- package/dist/chunks/host-queries-CUG75GYD.js +37 -0
- package/dist/chunks/{installed-list-X7D2METU.js → installed-list-GPVOP4E3.js} +4 -4
- package/dist/chunks/{learn-BSA4OH3O.js → learn-AFNJQGOU.js} +18 -18
- package/dist/chunks/{learn-builtin-YIJE4KDM.js → learn-builtin-LUD6XO6W.js} +21 -21
- package/dist/chunks/{lifecycle-4CCVUYHX.js → lifecycle-TCRMEVJP.js} +31 -32
- package/dist/chunks/{list-Y365NWT5.js → list-4OJNF5N2.js} +16 -16
- package/dist/chunks/{live-3URICZBD.js → live-LJ76XHPK.js} +38 -38
- package/dist/chunks/{load-LXAWOITU.js → load-2ERMTCD4.js} +12 -10
- package/dist/chunks/{logs-OGG4QEIR.js → logs-DV6GC7PT.js} +4 -4
- package/dist/chunks/{mcp-VCZRILZ2.js → mcp-5VV24FGZ.js} +449 -61
- package/dist/chunks/mcp-5VV24FGZ.js.map +6 -0
- package/dist/chunks/mcp-serve-TT4Q7V55.js +311 -0
- package/dist/chunks/mcp-serve-TT4Q7V55.js.map +6 -0
- package/dist/chunks/{message-command-RN3TYTUE.js → message-command-6RHBI3R4.js} +56 -54
- package/dist/chunks/message-command-6RHBI3R4.js.map +6 -0
- package/dist/chunks/{open-S3T2QSFD.js → open-3VUS3XWX.js} +7 -7
- package/dist/chunks/{operator-tools-4FKDVXEJ.js → operator-tools-BZ5X5ZDE.js} +15 -16
- package/dist/chunks/operator-tools-BZ5X5ZDE.js.map +6 -0
- package/dist/chunks/{output-schema-JZS2DYJS.js → output-schema-2GHHC5ZZ.js} +3 -3
- package/dist/chunks/{pal-N4BQKNXH.js → pal-TT7X5JF3.js} +150 -15
- package/dist/chunks/pal-TT7X5JF3.js.map +6 -0
- package/dist/chunks/{peers-3QJCXMVT.js → peers-SJFCJTA6.js} +149 -19
- package/dist/chunks/peers-SJFCJTA6.js.map +6 -0
- package/dist/chunks/{peers-B46EOYXB.js → peers-SLFOET3O.js} +7 -7
- package/dist/chunks/{plugin-SJ3Y2P53.js → plugin-I35EQ4CC.js} +22 -18
- package/dist/chunks/plugin-I35EQ4CC.js.map +6 -0
- package/dist/chunks/{providers-6HCMKQUI.js → providers-MX47EUPL.js} +22 -19
- package/dist/chunks/providers-MX47EUPL.js.map +6 -0
- package/dist/chunks/{providers-AAGYOW7X.js → providers-SOFGNZ4F.js} +10 -10
- package/dist/chunks/{pty-Y6DQ3O7S.js → pty-3T7AE7ZA.js} +3 -3
- package/dist/chunks/resume-5JACRBQO.js +25 -0
- package/dist/chunks/{resume-command-GPX3ZFJG.js → resume-command-H4FOREZO.js} +4 -4
- package/dist/chunks/{running-XXZFJXM2.js → running-NONPWC5C.js} +4 -4
- package/dist/chunks/{schedule-36SDQUHA.js → schedule-BWR4NKGX.js} +245 -10
- package/dist/chunks/schedule-BWR4NKGX.js.map +6 -0
- package/dist/chunks/{send-3I5I445I.js → send-H27WTBLZ.js} +18 -18
- package/dist/chunks/send-person-NNGL2U4H.js +31 -0
- package/dist/chunks/{serve-CZDHGDZL.js → serve-4VIDXLEB.js} +2 -2
- package/dist/chunks/{service-2KVKUVPK.js → service-NVOIN2MV.js} +32 -33
- package/dist/chunks/service-NVOIN2MV.js.map +6 -0
- package/dist/chunks/{setting-cli-BIG2WZWH.js → setting-cli-ETVPDSRA.js} +13 -13
- package/dist/chunks/{skills-ROGIKQBK.js → skills-XAONTP56.js} +28 -25
- package/dist/chunks/skills-XAONTP56.js.map +6 -0
- package/dist/chunks/{start-check-WZ3L3FAC.js → start-check-A5FG7224.js} +2 -2
- package/dist/chunks/{startup-failure-Y6OKFLWB.js → startup-failure-6MZNIJXI.js} +2 -2
- package/dist/chunks/{state-EK4XKBK5.js → state-MVYWWBAA.js} +556 -26
- package/dist/chunks/state-MVYWWBAA.js.map +6 -0
- package/dist/chunks/{store-IOOFZ6PN.js → store-4PPSKMYT.js} +3 -3
- package/dist/chunks/{store-A6ZRPCAB.js → store-5K5HIPUT.js} +12 -13
- package/dist/chunks/{store-FLT5PL3C.js → store-6WG6CRWK.js} +4 -4
- package/dist/chunks/{store-NX2MC2JN.js → store-UPAOLS5B.js} +8 -8
- package/dist/chunks/{tui-DT36PST5.js → tui-MRMMX2TV.js} +99 -87
- package/dist/chunks/tui-MRMMX2TV.js.map +6 -0
- package/dist/chunks/{upgrade-AHGIHDGH.js → update-RMHLR4LI.js} +35 -35
- package/dist/chunks/{upgrade-AHGIHDGH.js.map → update-RMHLR4LI.js.map} +2 -2
- package/dist/chunks/{watch-AFI4NLCR.js → watch-3QQJ4XHX.js} +93 -89
- package/dist/chunks/watch-3QQJ4XHX.js.map +6 -0
- package/dist/chunks/{workspaces-QKVXLISC.js → workspaces-HEA2VNIH.js} +15 -20
- package/dist/chunks/workspaces-HEA2VNIH.js.map +6 -0
- package/dist/chunks/{worktree-NWJLCB5C.js → worktree-NAVT42R4.js} +26 -23
- package/dist/chunks/worktree-NAVT42R4.js.map +6 -0
- package/dist/cli-runtime.d.ts +3 -1
- package/dist/cli-runtime.d.ts.map +1 -1
- package/dist/cli.d.ts +15 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp-browser-pane.d.ts +81 -0
- package/dist/commands/acp-browser-pane.d.ts.map +1 -0
- package/dist/commands/acp-provider-retry.d.ts +2 -1
- package/dist/commands/acp-provider-retry.d.ts.map +1 -1
- package/dist/commands/acp.d.ts +18 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/action-help.d.ts +37 -0
- package/dist/commands/action-help.d.ts.map +1 -0
- package/dist/commands/actions/auth.d.ts +3 -0
- package/dist/commands/actions/auth.d.ts.map +1 -0
- package/dist/commands/actions/browser.d.ts +3 -0
- package/dist/commands/actions/browser.d.ts.map +1 -0
- package/dist/commands/actions/extension.d.ts +3 -0
- package/dist/commands/actions/extension.d.ts.map +1 -0
- package/dist/commands/actions/mcp.d.ts +3 -0
- package/dist/commands/actions/mcp.d.ts.map +1 -0
- package/dist/commands/actions/pal.d.ts +3 -0
- package/dist/commands/actions/pal.d.ts.map +1 -0
- package/dist/commands/actions/peers.d.ts +3 -0
- package/dist/commands/actions/peers.d.ts.map +1 -0
- package/dist/commands/actions/schedule.d.ts +3 -0
- package/dist/commands/actions/schedule.d.ts.map +1 -0
- package/dist/commands/actions/small.d.ts +11 -0
- package/dist/commands/actions/small.d.ts.map +1 -0
- package/dist/commands/archive.d.ts.map +1 -1
- package/dist/commands/auth-status.d.ts +24 -0
- package/dist/commands/auth-status.d.ts.map +1 -0
- package/dist/commands/auth.d.ts +9 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/browser.d.ts.map +1 -1
- package/dist/commands/computer.d.ts.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/desktop-host.d.ts +3 -3
- package/dist/commands/desktop-host.d.ts.map +1 -1
- package/dist/commands/exec-flags.d.ts +17 -3
- package/dist/commands/exec-flags.d.ts.map +1 -1
- package/dist/commands/exec-json.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/extension.d.ts.map +1 -1
- package/dist/commands/github.d.ts.map +1 -1
- package/dist/commands/launch-extras.d.ts +48 -0
- package/dist/commands/launch-extras.d.ts.map +1 -0
- package/dist/commands/lazy.d.ts +3 -3
- package/dist/commands/lazy.d.ts.map +1 -1
- package/dist/commands/login.d.ts +1 -1
- package/dist/commands/manifest.d.ts +3 -4
- package/dist/commands/manifest.d.ts.map +1 -1
- package/dist/commands/mcp-serve.d.ts +16 -0
- package/dist/commands/mcp-serve.d.ts.map +1 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/pal.d.ts.map +1 -1
- package/dist/commands/peers.d.ts.map +1 -1
- package/dist/commands/plugin.d.ts.map +1 -1
- package/dist/commands/providers.d.ts.map +1 -1
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/run-flags.d.ts +10 -2
- package/dist/commands/run-flags.d.ts.map +1 -1
- package/dist/commands/schedule.d.ts.map +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/state.d.ts +11 -0
- package/dist/commands/state.d.ts.map +1 -1
- package/dist/commands/types.d.ts +9 -2
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/{upgrade-progress.d.ts → update-progress.d.ts} +3 -3
- package/dist/commands/update-progress.d.ts.map +1 -0
- package/dist/commands/{upgrade.d.ts → update.d.ts} +9 -9
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/workspaces.d.ts +1 -1
- package/dist/commands/workspaces.d.ts.map +1 -1
- package/dist/commands/worktree.d.ts.map +1 -1
- package/dist/computer/run.d.ts.map +1 -1
- package/dist/config/debug.d.ts.map +1 -1
- package/dist/config/hooks-report.d.ts +3 -1
- package/dist/config/hooks-report.d.ts.map +1 -1
- package/dist/config/load.d.ts +37 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +15 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/settings-descriptors.d.ts +4 -0
- package/dist/config/settings-descriptors.d.ts.map +1 -1
- package/dist/config/turn-duration-default.d.ts +6 -0
- package/dist/config/turn-duration-default.d.ts.map +1 -0
- package/dist/context/doctrine.d.ts.map +1 -1
- package/dist/context/environment.d.ts +18 -0
- package/dist/context/environment.d.ts.map +1 -1
- package/dist/context/file-placement.d.ts.map +1 -1
- package/dist/context/project-tracker.d.ts +3 -0
- package/dist/context/project-tracker.d.ts.map +1 -1
- package/dist/context/system-prompt.d.ts +6 -0
- package/dist/context/system-prompt.d.ts.map +1 -1
- package/dist/index.js +39 -39
- package/dist/integrations/auto-update/apply.d.ts +1 -1
- package/dist/integrations/auto-update/apply.d.ts.map +1 -1
- package/dist/integrations/auto-update/policy.d.ts +1 -1
- package/dist/integrations/auto-update/policy.d.ts.map +1 -1
- package/dist/integrations/auto-update/state.d.ts +1 -1
- package/dist/integrations/auto-update/state.d.ts.map +1 -1
- package/dist/integrations/mcp/project-file.d.ts +16 -0
- package/dist/integrations/mcp/project-file.d.ts.map +1 -0
- package/dist/integrations/mcp/serve.d.ts +55 -0
- package/dist/integrations/mcp/serve.d.ts.map +1 -0
- package/dist/integrations/mcp/servers.d.ts +6 -0
- package/dist/integrations/mcp/servers.d.ts.map +1 -1
- package/dist/integrations/mcp/shared-file.d.ts +2 -1
- package/dist/integrations/mcp/shared-file.d.ts.map +1 -1
- package/dist/integrations/network/controller.d.ts.map +1 -1
- package/dist/integrations/network/format.d.ts.map +1 -1
- package/dist/integrations/network/runtime.d.ts +7 -0
- package/dist/integrations/network/runtime.d.ts.map +1 -1
- package/dist/integrations/network/types.d.ts +2 -0
- package/dist/integrations/network/types.d.ts.map +1 -1
- package/dist/integrations/npm-global.d.ts +2 -2
- package/dist/integrations/npm-global.d.ts.map +1 -1
- package/dist/integrations/outstanding/status.d.ts +4 -0
- package/dist/integrations/outstanding/status.d.ts.map +1 -1
- package/dist/integrations/providers/connections.d.ts +1 -1
- package/dist/integrations/providers/connections.d.ts.map +1 -1
- package/dist/integrations/providers/pending-login.d.ts +1 -1
- package/dist/integrations/providers/subscription-login.d.ts +1 -1
- package/dist/integrations/sessions/session-watch.d.ts +8 -1
- package/dist/integrations/sessions/session-watch.d.ts.map +1 -1
- package/dist/integrations/state/purge.d.ts +66 -0
- package/dist/integrations/state/purge.d.ts.map +1 -0
- package/dist/integrations/subagents/activity.d.ts +1 -1
- package/dist/integrations/subagents/agent-names.d.ts +1 -1
- package/dist/integrations/subagents/row-labels.d.ts +18 -0
- package/dist/integrations/subagents/row-labels.d.ts.map +1 -0
- package/dist/integrations/subagents/runtime.d.ts +8 -1
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/stop-guidance.d.ts +14 -0
- package/dist/integrations/subagents/stop-guidance.d.ts.map +1 -0
- package/dist/integrations/web/open-url.d.ts +1 -1
- package/dist/integrations/web/search.d.ts +1 -1
- package/dist/integrations/workflows/host.d.ts.map +1 -1
- package/dist/integrations/workflows/notice.d.ts +9 -0
- package/dist/integrations/workflows/notice.d.ts.map +1 -1
- package/dist/integrations/workflows/offering.d.ts +3 -2
- package/dist/integrations/workflows/offering.d.ts.map +1 -1
- package/dist/integrations/workflows/orphans.d.ts +17 -0
- package/dist/integrations/workflows/orphans.d.ts.map +1 -1
- package/dist/integrations/workflows/owners.d.ts +17 -0
- package/dist/integrations/workflows/owners.d.ts.map +1 -0
- package/dist/integrations/workflows/registry.d.ts +17 -2
- package/dist/integrations/workflows/registry.d.ts.map +1 -1
- package/dist/logging.d.ts +10 -1
- package/dist/logging.d.ts.map +1 -1
- package/dist/memory/screen-archive.d.ts +2 -0
- package/dist/memory/screen-archive.d.ts.map +1 -1
- package/dist/permissions/auto-classifier.d.ts.map +1 -1
- package/dist/permissions/launch.d.ts +1 -1
- package/dist/permissions/mode.d.ts +2 -2
- package/dist/permissions/path-rules.d.ts.map +1 -1
- package/dist/permissions/rules.d.ts +2 -0
- package/dist/permissions/rules.d.ts.map +1 -1
- package/dist/permissions/tool-flags.d.ts +5 -1
- package/dist/permissions/tool-flags.d.ts.map +1 -1
- package/dist/reminders/changed-files.d.ts.map +1 -1
- package/dist/reminders/frame.d.ts +1 -1
- package/dist/reminders/frame.d.ts.map +1 -1
- package/dist/reminders/hypermode.d.ts.map +1 -1
- package/dist/reminders/index.d.ts +3 -0
- package/dist/reminders/index.d.ts.map +1 -1
- package/dist/reminders/memory-nudge.d.ts +20 -0
- package/dist/reminders/memory-nudge.d.ts.map +1 -0
- package/dist/rounds/types.d.ts +6 -1
- package/dist/rounds/types.d.ts.map +1 -1
- package/dist/schedule/commands/add.d.ts.map +1 -1
- package/dist/schedule/fire/fire.d.ts +1 -1
- package/dist/schedule/fire/fire.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +11 -8
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/App.d.ts +2 -0
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/ChoicePicker.d.ts +7 -1
- package/dist/tui/ChoicePicker.d.ts.map +1 -1
- package/dist/tui/Composer.d.ts +1 -7
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/PendingInputPanel.d.ts +2 -0
- package/dist/tui/PendingInputPanel.d.ts.map +1 -1
- package/dist/tui/StatusBar.d.ts +8 -1
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/agent-calls.d.ts.map +1 -1
- package/dist/tui/agent-transcript-rows.d.ts +6 -1
- package/dist/tui/agent-transcript-rows.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +61 -6
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/choice-selection.d.ts +3 -1
- package/dist/tui/choice-selection.d.ts.map +1 -1
- package/dist/tui/computer-use-live.d.ts +41 -0
- package/dist/tui/computer-use-live.d.ts.map +1 -0
- package/dist/tui/context-grid.d.ts +5 -0
- package/dist/tui/context-grid.d.ts.map +1 -1
- package/dist/tui/fullscreen/FullscreenTranscript.d.ts +3 -2
- package/dist/tui/fullscreen/FullscreenTranscript.d.ts.map +1 -1
- package/dist/tui/keypad-keys.d.ts +1 -1
- package/dist/tui/keypad-keys.d.ts.map +1 -1
- package/dist/tui/launch-settings.d.ts +2 -0
- package/dist/tui/launch-settings.d.ts.map +1 -1
- package/dist/tui/login-prompt.d.ts +1 -1
- package/dist/tui/notice-display.d.ts +8 -0
- package/dist/tui/notice-display.d.ts.map +1 -0
- package/dist/tui/outcome-line.d.ts.map +1 -1
- package/dist/tui/plain-interruption.d.ts +7 -0
- package/dist/tui/plain-interruption.d.ts.map +1 -1
- package/dist/tui/restored-rows.d.ts +2 -0
- package/dist/tui/restored-rows.d.ts.map +1 -1
- package/dist/tui/sign-in-watch.d.ts +31 -0
- package/dist/tui/sign-in-watch.d.ts.map +1 -0
- package/dist/tui/slashCommands.d.ts +11 -0
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/stopped-turn-line.d.ts +22 -0
- package/dist/tui/stopped-turn-line.d.ts.map +1 -0
- package/dist/tui/tidy-tool-output.d.ts.map +1 -1
- package/dist/tui/tool-presentation.d.ts +2 -0
- package/dist/tui/tool-presentation.d.ts.map +1 -1
- package/dist/tui/turn-duration-setting.d.ts +11 -0
- package/dist/tui/turn-duration-setting.d.ts.map +1 -0
- package/dist/tui/turn-interruption.d.ts +1 -1
- package/dist/tui/turn-interruption.d.ts.map +1 -1
- package/dist/tui/types.d.ts +13 -1
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/tui/untrusted-display.d.ts +12 -0
- package/dist/tui/untrusted-display.d.ts.map +1 -0
- package/dist/tui/web-activity.d.ts +4 -2
- package/dist/tui/web-activity.d.ts.map +1 -1
- package/dist/usage-error.d.ts.map +1 -1
- package/package.json +5 -5
- package/skills/document/SKILL.md +22 -11
- package/skills/verify-change/SKILL.md +2 -1
- package/dist/chunks/acp-KBPTK4GN.js.map +0 -6
- package/dist/chunks/activity-command-JOED2VWN.js.map +0 -6
- package/dist/chunks/add-66AQ7SKZ.js.map +0 -6
- package/dist/chunks/agent-session-KQIXHDGU.js +0 -87
- package/dist/chunks/archive-ED4CWEU2.js.map +0 -6
- package/dist/chunks/browser-7DRWOIEZ.js +0 -31
- package/dist/chunks/browser-7DRWOIEZ.js.map +0 -6
- package/dist/chunks/chat-ISFH5CPZ.js.map +0 -6
- package/dist/chunks/chunk-2TU3QQRG.js.map +0 -6
- package/dist/chunks/chunk-3ZHOM2L7.js.map +0 -6
- package/dist/chunks/chunk-5TJZWGTZ.js.map +0 -6
- package/dist/chunks/chunk-6F3M3P3W.js.map +0 -6
- package/dist/chunks/chunk-AFNHI46Y.js.map +0 -6
- package/dist/chunks/chunk-AWU5MYX3.js.map +0 -6
- package/dist/chunks/chunk-BFYETM56.js.map +0 -6
- package/dist/chunks/chunk-GBOOHDIH.js +0 -94
- package/dist/chunks/chunk-GBOOHDIH.js.map +0 -6
- package/dist/chunks/chunk-GWH6BOVE.js.map +0 -6
- package/dist/chunks/chunk-ICQYIDIR.js.map +0 -6
- package/dist/chunks/chunk-KE53UTUG.js.map +0 -6
- package/dist/chunks/chunk-LMPUBX5R.js.map +0 -6
- package/dist/chunks/chunk-PHDA4JI7.js.map +0 -6
- package/dist/chunks/chunk-QF2FZ2DM.js.map +0 -6
- package/dist/chunks/chunk-QF4HGWRL.js.map +0 -6
- package/dist/chunks/chunk-QUI2ZAGY.js.map +0 -6
- package/dist/chunks/chunk-RF6EIDPV.js.map +0 -6
- package/dist/chunks/chunk-T3VMBZEY.js.map +0 -6
- package/dist/chunks/chunk-VFB4ZUOR.js.map +0 -6
- package/dist/chunks/chunk-X7QC2Q7P.js.map +0 -6
- package/dist/chunks/chunk-XYF26ZUO.js.map +0 -6
- package/dist/chunks/cli-runtime-2HOSJR5Y.js.map +0 -6
- package/dist/chunks/computer-FQRWTC6M.js.map +0 -6
- package/dist/chunks/config-2JST7BZT.js.map +0 -6
- package/dist/chunks/dist-PYOYSQIZ.js.map +0 -6
- package/dist/chunks/exec-Z6TIWDJM.js.map +0 -6
- package/dist/chunks/github-X352BD5R.js.map +0 -6
- package/dist/chunks/host-queries-NVNPXLV6.js +0 -38
- package/dist/chunks/login-QDMS62PW.js +0 -38
- package/dist/chunks/mcp-VCZRILZ2.js.map +0 -6
- package/dist/chunks/message-command-RN3TYTUE.js.map +0 -6
- package/dist/chunks/operator-tools-4FKDVXEJ.js.map +0 -6
- package/dist/chunks/pal-N4BQKNXH.js.map +0 -6
- package/dist/chunks/peers-3QJCXMVT.js.map +0 -6
- package/dist/chunks/plugin-SJ3Y2P53.js.map +0 -6
- package/dist/chunks/providers-6HCMKQUI.js.map +0 -6
- package/dist/chunks/resume-URQRK5DV.js +0 -26
- package/dist/chunks/schedule-36SDQUHA.js.map +0 -6
- package/dist/chunks/send-person-YWJEDJLC.js +0 -31
- package/dist/chunks/service-2KVKUVPK.js.map +0 -6
- package/dist/chunks/skills-ROGIKQBK.js.map +0 -6
- package/dist/chunks/state-EK4XKBK5.js.map +0 -6
- package/dist/chunks/store-NX2MC2JN.js.map +0 -6
- package/dist/chunks/tui-DT36PST5.js.map +0 -6
- package/dist/chunks/watch-AFI4NLCR.js.map +0 -6
- package/dist/chunks/workspaces-QKVXLISC.js.map +0 -6
- package/dist/chunks/worktree-NWJLCB5C.js.map +0 -6
- package/dist/commands/upgrade-progress.d.ts.map +0 -1
- package/dist/commands/upgrade.d.ts.map +0 -1
- /package/dist/chunks/{agent-DL7YTL5B.js.map → agent-MSSMOEBP.js.map} +0 -0
- /package/dist/chunks/{agent-session-KQIXHDGU.js.map → agent-session-VCB6HX3E.js.map} +0 -0
- /package/dist/chunks/{bin-main-JDJ6LEOK.js.map → bin-main-2E6XD7MQ.js.map} +0 -0
- /package/dist/chunks/{binding-NU3G3EBQ.js.map → binding-NAPEU62B.js.map} +0 -0
- /package/dist/chunks/{chunk-C4CUPDOU.js.map → chunk-27ICMJVV.js.map} +0 -0
- /package/dist/chunks/{chunk-6XIPTDOH.js.map → chunk-2D5WW5KP.js.map} +0 -0
- /package/dist/chunks/{chunk-K3NVHXN7.js.map → chunk-2J2Z6S3V.js.map} +0 -0
- /package/dist/chunks/{chunk-G3WCIRCZ.js.map → chunk-2PRVGX6U.js.map} +0 -0
- /package/dist/chunks/{chunk-K5FGK5AP.js.map → chunk-32CPPPKX.js.map} +0 -0
- /package/dist/chunks/{chunk-ETDOSJF7.js.map → chunk-3SBROSVS.js.map} +0 -0
- /package/dist/chunks/{chunk-ZT3DLJQZ.js.map → chunk-3ZL6YBMT.js.map} +0 -0
- /package/dist/chunks/{chunk-C534SIJI.js.map → chunk-4RCXY7WO.js.map} +0 -0
- /package/dist/chunks/{chunk-NQ3MZ6N4.js.map → chunk-4YQJ262B.js.map} +0 -0
- /package/dist/chunks/{chunk-WEL6L6DN.js.map → chunk-52DZTN4C.js.map} +0 -0
- /package/dist/chunks/{chunk-MTSXDMJB.js.map → chunk-5GI7W4SM.js.map} +0 -0
- /package/dist/chunks/{chunk-I7WXDTCF.js.map → chunk-5NIQMCRF.js.map} +0 -0
- /package/dist/chunks/{chunk-JOORBY5L.js.map → chunk-5WS5Q2KW.js.map} +0 -0
- /package/dist/chunks/{chunk-7EL5RPEU.js.map → chunk-66DFXMZG.js.map} +0 -0
- /package/dist/chunks/{chunk-6SEDSZBH.js.map → chunk-6MMKNZYL.js.map} +0 -0
- /package/dist/chunks/{chunk-Y3KKZ7HS.js.map → chunk-6QQVZXUE.js.map} +0 -0
- /package/dist/chunks/{chunk-X2JFYB5A.js.map → chunk-6RBEIDSC.js.map} +0 -0
- /package/dist/chunks/{chunk-IRCAPHCE.js.map → chunk-6V4VYVRZ.js.map} +0 -0
- /package/dist/chunks/{chunk-QJYK566B.js.map → chunk-6ZWEKSAV.js.map} +0 -0
- /package/dist/chunks/{chunk-F7ECENUK.js.map → chunk-7BSLOLTU.js.map} +0 -0
- /package/dist/chunks/{chunk-TOADRNOV.js.map → chunk-7BXJPOEG.js.map} +0 -0
- /package/dist/chunks/{chunk-BFTAE67C.js.map → chunk-7DERK6IR.js.map} +0 -0
- /package/dist/chunks/{chunk-4KGXEARZ.js.map → chunk-7EASTT3H.js.map} +0 -0
- /package/dist/chunks/{chunk-5PTXGBPL.js.map → chunk-7MYLYFIV.js.map} +0 -0
- /package/dist/chunks/{chunk-KOVWQARO.js.map → chunk-7NAHUZAR.js.map} +0 -0
- /package/dist/chunks/{chunk-GQU3OUV5.js.map → chunk-7NQLCFYX.js.map} +0 -0
- /package/dist/chunks/{chunk-JRIDJW3W.js.map → chunk-A5O5VTQM.js.map} +0 -0
- /package/dist/chunks/{chunk-JB3UZ7JJ.js.map → chunk-BATWKQWV.js.map} +0 -0
- /package/dist/chunks/{chunk-6JAWZGSH.js.map → chunk-CK47DTW6.js.map} +0 -0
- /package/dist/chunks/{chunk-P7UV5M73.js.map → chunk-CSO7BHDJ.js.map} +0 -0
- /package/dist/chunks/{chunk-ECDMJNZU.js.map → chunk-D42SQGEO.js.map} +0 -0
- /package/dist/chunks/{chunk-DYCSVG2K.js.map → chunk-DIBXZBOP.js.map} +0 -0
- /package/dist/chunks/{chunk-CJUK4IWQ.js.map → chunk-EFWF72V4.js.map} +0 -0
- /package/dist/chunks/{chunk-A4I24ISL.js.map → chunk-ENNAZGUX.js.map} +0 -0
- /package/dist/chunks/{chunk-5GRTRQTV.js.map → chunk-EOLXS2ZV.js.map} +0 -0
- /package/dist/chunks/{chunk-YBAPUTER.js.map → chunk-F6NUMURW.js.map} +0 -0
- /package/dist/chunks/{chunk-ZFQOF5A5.js.map → chunk-FZPIEOFR.js.map} +0 -0
- /package/dist/chunks/{chunk-372SLS6Y.js.map → chunk-G7UGGWOR.js.map} +0 -0
- /package/dist/chunks/{chunk-4PX62LQ2.js.map → chunk-GLZJBFDO.js.map} +0 -0
- /package/dist/chunks/{chunk-QERO7OI6.js.map → chunk-HBGRWJU5.js.map} +0 -0
- /package/dist/chunks/{chunk-BQR2C4RM.js.map → chunk-HICZARAY.js.map} +0 -0
- /package/dist/chunks/{chunk-HQFAVCTF.js.map → chunk-HONSYTUC.js.map} +0 -0
- /package/dist/chunks/{chunk-X4W4DN3S.js.map → chunk-I5BNXO63.js.map} +0 -0
- /package/dist/chunks/{chunk-DID4WFOD.js.map → chunk-IH2JBJ6I.js.map} +0 -0
- /package/dist/chunks/{chunk-5X4XLHLF.js.map → chunk-J4GPHTRN.js.map} +0 -0
- /package/dist/chunks/{chunk-I5CWCNRN.js.map → chunk-JFA2XPTW.js.map} +0 -0
- /package/dist/chunks/{chunk-IT2OFHF7.js.map → chunk-JSY23B3Q.js.map} +0 -0
- /package/dist/chunks/{chunk-U77GVCK3.js.map → chunk-K5VLCRHY.js.map} +0 -0
- /package/dist/chunks/{chunk-7AXLZKTB.js.map → chunk-KCBOIL5Q.js.map} +0 -0
- /package/dist/chunks/{chunk-QW3Y3RDE.js.map → chunk-MJ32RCFZ.js.map} +0 -0
- /package/dist/chunks/{chunk-WIO3JRB5.js.map → chunk-NBJ4OTXL.js.map} +0 -0
- /package/dist/chunks/{chunk-66ZXPQGB.js.map → chunk-NO3F3QQ3.js.map} +0 -0
- /package/dist/chunks/{chunk-LJDAHRWI.js.map → chunk-NQYOMRPT.js.map} +0 -0
- /package/dist/chunks/{chunk-WXCJTJK4.js.map → chunk-O6C4RETO.js.map} +0 -0
- /package/dist/chunks/{chunk-W5TYUJI5.js.map → chunk-O6EDUJ77.js.map} +0 -0
- /package/dist/chunks/{chunk-F7LHGSEQ.js.map → chunk-OD2PMTXS.js.map} +0 -0
- /package/dist/chunks/{chunk-5LDYBGOZ.js.map → chunk-OGEOUETU.js.map} +0 -0
- /package/dist/chunks/{chunk-MI6WMBDQ.js.map → chunk-PYTTGYZS.js.map} +0 -0
- /package/dist/chunks/{chunk-U2MFIQ6X.js.map → chunk-RR7FS6SQ.js.map} +0 -0
- /package/dist/chunks/{chunk-7O2WNQQZ.js.map → chunk-RTMX7IDM.js.map} +0 -0
- /package/dist/chunks/{chunk-ZAPPY4VF.js.map → chunk-S4OEUN6F.js.map} +0 -0
- /package/dist/chunks/{chunk-EXE7JBHE.js.map → chunk-SEVORRUA.js.map} +0 -0
- /package/dist/chunks/{chunk-WCPKRDGR.js.map → chunk-TAIC3PC2.js.map} +0 -0
- /package/dist/chunks/{chunk-AF4ILHID.js.map → chunk-TGLXWW5B.js.map} +0 -0
- /package/dist/chunks/{chunk-4YN7VGLV.js.map → chunk-TJAUF5NX.js.map} +0 -0
- /package/dist/chunks/{chunk-E7RD32NX.js.map → chunk-TSU4F6DF.js.map} +0 -0
- /package/dist/chunks/{chunk-MPIYLDWJ.js.map → chunk-TXMWKHYW.js.map} +0 -0
- /package/dist/chunks/{chunk-PYR7VRWF.js.map → chunk-UBGDYBSQ.js.map} +0 -0
- /package/dist/chunks/{chunk-73VS7EXG.js.map → chunk-ULFR2FWA.js.map} +0 -0
- /package/dist/chunks/{chunk-HXW5DQLU.js.map → chunk-UMPJ4VXN.js.map} +0 -0
- /package/dist/chunks/{chunk-MN426ZWA.js.map → chunk-URZPVSHV.js.map} +0 -0
- /package/dist/chunks/{chunk-7WDKN3QG.js.map → chunk-UXLQNJDR.js.map} +0 -0
- /package/dist/chunks/{chunk-SQ32S3OE.js.map → chunk-XWP64X6U.js.map} +0 -0
- /package/dist/chunks/{chunk-YQOT7ABG.js.map → chunk-Y3NC6RIL.js.map} +0 -0
- /package/dist/chunks/{commands-TKD5BHAC.js.map → commands-VWBRELWZ.js.map} +0 -0
- /package/dist/chunks/{cost-AZAQ3AC5.js.map → cost-IVLAFD5T.js.map} +0 -0
- /package/dist/chunks/{crash-report-IYMUJRDT.js.map → crash-report-CA3Y7LA6.js.map} +0 -0
- /package/dist/chunks/{dist-5JRS362B.js.map → dist-3SGAVJFN.js.map} +0 -0
- /package/dist/chunks/{dist-S4GG5BOF.js.map → dist-7BSYEFE5.js.map} +0 -0
- /package/dist/chunks/{dist-SPKR3SBF.js.map → dist-AM6FWCIJ.js.map} +0 -0
- /package/dist/chunks/{dist-YGZEZT7E.js.map → dist-ISRJEZRF.js.map} +0 -0
- /package/dist/chunks/{dist-BECOVIWQ.js.map → dist-PBFZXU4L.js.map} +0 -0
- /package/dist/chunks/{dist-VQGHI5SR.js.map → dist-RDXEBTCL.js.map} +0 -0
- /package/dist/chunks/{dist-NLY5ZLEK.js.map → dist-V43PPTPF.js.map} +0 -0
- /package/dist/chunks/{doctor-MYN7YCXB.js.map → doctor-FGOCO7UR.js.map} +0 -0
- /package/dist/chunks/{drain-IEZMA72M.js.map → drain-A3DLR5A4.js.map} +0 -0
- /package/dist/chunks/{entry-SS5QYOOM.js.map → entry-4LHTI3VQ.js.map} +0 -0
- /package/dist/chunks/{extension-4SMB7XQP.js.map → extension-BP7Q3PFK.js.map} +0 -0
- /package/dist/chunks/{home-YYLBZ3E7.js.map → home-GR6YDAAE.js.map} +0 -0
- /package/dist/chunks/{hooks-KVCP7AHB.js.map → hooks-KSSNBDF2.js.map} +0 -0
- /package/dist/chunks/{hooks-report-7BAQ5FJD.js.map → hooks-report-H4JAHJXE.js.map} +0 -0
- /package/dist/chunks/{host-CAZNAKUM.js.map → host-ISKJDJ7B.js.map} +0 -0
- /package/dist/chunks/{host-queries-NVNPXLV6.js.map → host-queries-CUG75GYD.js.map} +0 -0
- /package/dist/chunks/{installed-list-X7D2METU.js.map → installed-list-GPVOP4E3.js.map} +0 -0
- /package/dist/chunks/{learn-BSA4OH3O.js.map → learn-AFNJQGOU.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-YIJE4KDM.js.map → learn-builtin-LUD6XO6W.js.map} +0 -0
- /package/dist/chunks/{lifecycle-4CCVUYHX.js.map → lifecycle-TCRMEVJP.js.map} +0 -0
- /package/dist/chunks/{list-Y365NWT5.js.map → list-4OJNF5N2.js.map} +0 -0
- /package/dist/chunks/{live-3URICZBD.js.map → live-LJ76XHPK.js.map} +0 -0
- /package/dist/chunks/{load-LXAWOITU.js.map → load-2ERMTCD4.js.map} +0 -0
- /package/dist/chunks/{logs-OGG4QEIR.js.map → logs-DV6GC7PT.js.map} +0 -0
- /package/dist/chunks/{login-QDMS62PW.js.map → open-3VUS3XWX.js.map} +0 -0
- /package/dist/chunks/{open-S3T2QSFD.js.map → output-schema-2GHHC5ZZ.js.map} +0 -0
- /package/dist/chunks/{output-schema-JZS2DYJS.js.map → peers-SLFOET3O.js.map} +0 -0
- /package/dist/chunks/{peers-B46EOYXB.js.map → providers-SOFGNZ4F.js.map} +0 -0
- /package/dist/chunks/{providers-AAGYOW7X.js.map → pty-3T7AE7ZA.js.map} +0 -0
- /package/dist/chunks/{pty-Y6DQ3O7S.js.map → resume-5JACRBQO.js.map} +0 -0
- /package/dist/chunks/{resume-URQRK5DV.js.map → resume-command-H4FOREZO.js.map} +0 -0
- /package/dist/chunks/{resume-command-GPX3ZFJG.js.map → running-NONPWC5C.js.map} +0 -0
- /package/dist/chunks/{running-XXZFJXM2.js.map → send-H27WTBLZ.js.map} +0 -0
- /package/dist/chunks/{send-3I5I445I.js.map → send-person-NNGL2U4H.js.map} +0 -0
- /package/dist/chunks/{serve-CZDHGDZL.js.map → serve-4VIDXLEB.js.map} +0 -0
- /package/dist/chunks/{send-person-YWJEDJLC.js.map → setting-cli-ETVPDSRA.js.map} +0 -0
- /package/dist/chunks/{setting-cli-BIG2WZWH.js.map → start-check-A5FG7224.js.map} +0 -0
- /package/dist/chunks/{startup-failure-Y6OKFLWB.js.map → startup-failure-6MZNIJXI.js.map} +0 -0
- /package/dist/chunks/{start-check-WZ3L3FAC.js.map → store-4PPSKMYT.js.map} +0 -0
- /package/dist/chunks/{store-A6ZRPCAB.js.map → store-5K5HIPUT.js.map} +0 -0
- /package/dist/chunks/{store-FLT5PL3C.js.map → store-6WG6CRWK.js.map} +0 -0
- /package/dist/chunks/{store-IOOFZ6PN.js.map → store-UPAOLS5B.js.map} +0 -0
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
2
|
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
holderPidOf,
|
|
5
|
+
processIsAlive
|
|
6
|
+
} from "./chunk-2GKFWJ3O.js";
|
|
7
|
+
import {
|
|
8
|
+
promptHistoryPath,
|
|
9
|
+
readPromptHistory,
|
|
10
|
+
rewritePromptHistory
|
|
11
|
+
} from "./chunk-P6RYPNSD.js";
|
|
12
|
+
import {
|
|
13
|
+
STATE_ACTIONS
|
|
14
|
+
} from "./chunk-RHJOIAFS.js";
|
|
3
15
|
import {
|
|
4
16
|
PROJECT_AUTHORED_NAMES,
|
|
5
17
|
PROJECT_LEGACY_NAMES,
|
|
6
18
|
PROJECT_SETTINGS_NAMES,
|
|
7
19
|
moveProjectLegacyState
|
|
8
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-URZPVSHV.js";
|
|
21
|
+
import {
|
|
22
|
+
findProject
|
|
23
|
+
} from "./chunk-2QJNPJOC.js";
|
|
24
|
+
import "./chunk-KIWLK2WZ.js";
|
|
9
25
|
import {
|
|
10
26
|
cliProjectRoot
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-NFTQDITK.js";
|
|
28
|
+
import "./chunk-UMPJ4VXN.js";
|
|
29
|
+
import "./chunk-6V4VYVRZ.js";
|
|
30
|
+
import "./chunk-2D5WW5KP.js";
|
|
31
|
+
import "./chunk-27ICMJVV.js";
|
|
13
32
|
import {
|
|
33
|
+
EXIT_FAIL,
|
|
14
34
|
EXIT_OK,
|
|
15
35
|
EXIT_UNAVAILABLE,
|
|
16
36
|
EXIT_USAGE
|
|
@@ -18,29 +38,414 @@ import {
|
|
|
18
38
|
import {
|
|
19
39
|
terminalDisplayText
|
|
20
40
|
} from "./chunk-I4GTRFPK.js";
|
|
41
|
+
import "./chunk-ESHAWCBR.js";
|
|
42
|
+
import "./chunk-5WORROIE.js";
|
|
43
|
+
import "./chunk-655EBPZH.js";
|
|
44
|
+
import "./chunk-WMEZTDLT.js";
|
|
45
|
+
import "./chunk-LCGXWCVU.js";
|
|
46
|
+
import "./chunk-7YC42EXB.js";
|
|
47
|
+
import "./chunk-LVVD32KJ.js";
|
|
21
48
|
import {
|
|
22
49
|
homePath
|
|
23
50
|
} from "./chunk-GMUWAUKQ.js";
|
|
51
|
+
import "./chunk-PJ6IEIKJ.js";
|
|
52
|
+
import "./chunk-7ROZ2N57.js";
|
|
24
53
|
import "./chunk-G6YSAHKC.js";
|
|
25
54
|
import "./chunk-JORONMD3.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-7MYLYFIV.js";
|
|
56
|
+
import "./chunk-GLZJBFDO.js";
|
|
57
|
+
import "./chunk-IBENEKM4.js";
|
|
58
|
+
import "./chunk-WRPEQ3KP.js";
|
|
59
|
+
import "./chunk-A6RHRNY2.js";
|
|
60
|
+
import "./chunk-K5VLCRHY.js";
|
|
28
61
|
import "./chunk-U5UV2YRE.js";
|
|
62
|
+
import "./chunk-PHW6PWIJ.js";
|
|
29
63
|
import {
|
|
30
64
|
hashedSlugForCwd,
|
|
31
65
|
isEntityId,
|
|
66
|
+
isLeaseLive,
|
|
67
|
+
readSessionLease,
|
|
32
68
|
resolveNamzuHome,
|
|
33
69
|
slugForCwd
|
|
34
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-L5FCGDB7.js";
|
|
35
71
|
import {
|
|
36
72
|
__name
|
|
37
73
|
} from "./chunk-76FLAFCG.js";
|
|
38
74
|
|
|
75
|
+
// src/commands/state.ts
|
|
76
|
+
import { realpath as realpath3 } from "node:fs/promises";
|
|
77
|
+
import { resolve as resolve2 } from "node:path";
|
|
78
|
+
import { createInterface } from "node:readline/promises";
|
|
79
|
+
|
|
80
|
+
// src/integrations/state/purge.ts
|
|
81
|
+
import { lstat, readFile, readdir, realpath, rm } from "node:fs/promises";
|
|
82
|
+
import { createRequire } from "node:module";
|
|
83
|
+
import { join, sep } from "node:path";
|
|
84
|
+
var SLUG = /^[A-Za-z0-9._-]+$/;
|
|
85
|
+
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
86
|
+
function errorCode(error) {
|
|
87
|
+
return error?.code;
|
|
88
|
+
}
|
|
89
|
+
__name(errorCode, "errorCode");
|
|
90
|
+
async function realHomeOf(home) {
|
|
91
|
+
try {
|
|
92
|
+
return await realpath(home);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
if (errorCode(error) === "ENOENT" || errorCode(error) === "ENOTDIR") return null;
|
|
95
|
+
throw error;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
__name(realHomeOf, "realHomeOf");
|
|
99
|
+
function within(root, path) {
|
|
100
|
+
return path === root || path.startsWith(root.endsWith(sep) ? root : `${root}${sep}`);
|
|
101
|
+
}
|
|
102
|
+
__name(within, "within");
|
|
103
|
+
async function checkPath(realHome, path) {
|
|
104
|
+
let entry;
|
|
105
|
+
try {
|
|
106
|
+
entry = await lstat(path);
|
|
107
|
+
} catch (error) {
|
|
108
|
+
if (errorCode(error) === "ENOENT" || errorCode(error) === "ENOTDIR") return "absent";
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
if (entry.isSymbolicLink()) return "it is a link";
|
|
112
|
+
const parent = path.slice(0, Math.max(path.lastIndexOf(sep), 0)) || sep;
|
|
113
|
+
let realParent;
|
|
114
|
+
try {
|
|
115
|
+
realParent = await realpath(parent);
|
|
116
|
+
} catch (error) {
|
|
117
|
+
if (errorCode(error) === "ENOENT") return "absent";
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
if (!within(realHome, realParent)) {
|
|
121
|
+
return "it is outside the Namzu home";
|
|
122
|
+
}
|
|
123
|
+
return "ok";
|
|
124
|
+
}
|
|
125
|
+
__name(checkPath, "checkPath");
|
|
126
|
+
async function measure(path) {
|
|
127
|
+
const total = { files: 0, bytes: 0 };
|
|
128
|
+
const walk2 = /* @__PURE__ */ __name(async (current) => {
|
|
129
|
+
const entry = await lstat(current);
|
|
130
|
+
if (entry.isSymbolicLink() || !entry.isDirectory()) {
|
|
131
|
+
total.files += 1;
|
|
132
|
+
total.bytes += entry.isSymbolicLink() ? 0 : entry.size;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
for (const name of await readdir(current)) await walk2(join(current, name));
|
|
136
|
+
}, "walk");
|
|
137
|
+
await walk2(path);
|
|
138
|
+
return total;
|
|
139
|
+
}
|
|
140
|
+
__name(measure, "measure");
|
|
141
|
+
async function liveHolder(projectDir, seams) {
|
|
142
|
+
const now = seams.now?.() ?? Date.now();
|
|
143
|
+
const alive = seams.isProcessAlive ?? processIsAlive;
|
|
144
|
+
let names;
|
|
145
|
+
try {
|
|
146
|
+
names = await readdir(projectDir);
|
|
147
|
+
} catch {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
for (const name of names) {
|
|
151
|
+
const dir = join(projectDir, name);
|
|
152
|
+
let entry;
|
|
153
|
+
try {
|
|
154
|
+
entry = await lstat(dir);
|
|
155
|
+
} catch {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
if (!entry.isDirectory() || entry.isSymbolicLink()) continue;
|
|
159
|
+
const lease = await readSessionLease(dir).catch(() => null);
|
|
160
|
+
if (lease === null || !isLeaseLive(lease, now)) continue;
|
|
161
|
+
const pid = holderPidOf(lease);
|
|
162
|
+
if (pid !== void 0 && !alive(pid)) continue;
|
|
163
|
+
return pid === void 0 ? {} : { pid };
|
|
164
|
+
}
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
__name(liveHolder, "liveHolder");
|
|
168
|
+
async function folderOf(projectFile) {
|
|
169
|
+
try {
|
|
170
|
+
const parsed = JSON.parse(await readFile(projectFile, "utf8"));
|
|
171
|
+
return typeof parsed.cwd === "string" ? parsed.cwd : null;
|
|
172
|
+
} catch {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
__name(folderOf, "folderOf");
|
|
177
|
+
async function worktreesHeld(realHome, projectDir) {
|
|
178
|
+
const dir = join(projectDir, "worktrees");
|
|
179
|
+
if (await checkPath(realHome, dir) !== "ok") return false;
|
|
180
|
+
try {
|
|
181
|
+
return (await readdir(dir)).length > 0;
|
|
182
|
+
} catch {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
__name(worktreesHeld, "worktreesHeld");
|
|
187
|
+
var NODE_SQLITE = createRequire(new URL("../", import.meta.url).href + "integrations/state/purge.js");
|
|
188
|
+
function openIndex(path, readOnly) {
|
|
189
|
+
try {
|
|
190
|
+
const { DatabaseSync } = NODE_SQLITE("node:sqlite");
|
|
191
|
+
return new DatabaseSync(path, { readOnly });
|
|
192
|
+
} catch {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
__name(openIndex, "openIndex");
|
|
197
|
+
async function indexCount(realHome, slug) {
|
|
198
|
+
const path = join(realHome, "index.sqlite");
|
|
199
|
+
if (await checkPath(realHome, path) !== "ok") return null;
|
|
200
|
+
const db = openIndex(path, true);
|
|
201
|
+
if (db === null) return null;
|
|
202
|
+
try {
|
|
203
|
+
const row = db.prepare("SELECT COUNT(*) AS n FROM sessions WHERE slug = ?").get(slug);
|
|
204
|
+
const n = Number(row?.n ?? 0);
|
|
205
|
+
const known = db.prepare("SELECT COUNT(*) AS n FROM projects WHERE slug = ?").get(slug);
|
|
206
|
+
return n + Number(known?.n ?? 0) > 0 ? { path, count: n } : null;
|
|
207
|
+
} catch {
|
|
208
|
+
return null;
|
|
209
|
+
} finally {
|
|
210
|
+
db.close();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
__name(indexCount, "indexCount");
|
|
214
|
+
async function allSlugs(realHome) {
|
|
215
|
+
const slugs = /* @__PURE__ */ new Set();
|
|
216
|
+
const add = /* @__PURE__ */ __name((name) => {
|
|
217
|
+
if (SLUG.test(name) && !UUID.test(name) && !name.startsWith(".")) slugs.add(name);
|
|
218
|
+
}, "add");
|
|
219
|
+
for (const [dir, strip] of [
|
|
220
|
+
["projects", ""],
|
|
221
|
+
[join("backups", "projects"), ""],
|
|
222
|
+
["memory-inbox", ".jsonl"],
|
|
223
|
+
["memory-usage", ".json"],
|
|
224
|
+
["legacy", ""]
|
|
225
|
+
]) {
|
|
226
|
+
let names;
|
|
227
|
+
try {
|
|
228
|
+
names = await readdir(join(realHome, dir));
|
|
229
|
+
} catch {
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
for (const name of names)
|
|
233
|
+
add(strip && name.endsWith(strip) ? name.slice(0, -strip.length) : name);
|
|
234
|
+
}
|
|
235
|
+
return [...slugs].sort();
|
|
236
|
+
}
|
|
237
|
+
__name(allSlugs, "allSlugs");
|
|
238
|
+
async function planProject(realHome, slug, folders, seams) {
|
|
239
|
+
if (!SLUG.test(slug)) throw new Error(`not a project name: ${slug}`);
|
|
240
|
+
const projectDir = join(realHome, "projects", slug);
|
|
241
|
+
const projectFolder = await folderOf(join(projectDir, "project.json"));
|
|
242
|
+
const items = [];
|
|
243
|
+
const places = [
|
|
244
|
+
["folder", "conversations, checkpoints, file history, plans, memory and learning", projectDir],
|
|
245
|
+
["folder", "recovery copies of settings files", join(realHome, "backups", "projects", slug)],
|
|
246
|
+
[
|
|
247
|
+
"folder",
|
|
248
|
+
"state moved out of the project by `namzu state move legacy`",
|
|
249
|
+
join(realHome, "legacy", slug)
|
|
250
|
+
],
|
|
251
|
+
["file", "memory inbox", join(realHome, "memory-inbox", `${slug}.jsonl`)],
|
|
252
|
+
["file", "memory usage", join(realHome, "memory-usage", `${slug}.json`)]
|
|
253
|
+
];
|
|
254
|
+
for (const [kind, what, path] of places) {
|
|
255
|
+
const state = await checkPath(realHome, path);
|
|
256
|
+
if (state === "absent") continue;
|
|
257
|
+
if (state !== "ok") {
|
|
258
|
+
return {
|
|
259
|
+
slug,
|
|
260
|
+
folder: projectFolder,
|
|
261
|
+
folders: [],
|
|
262
|
+
items: [],
|
|
263
|
+
blocked: `${path}: ${state}; nothing was deleted`
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
const size = await measure(path);
|
|
267
|
+
items.push({ kind, what, path, files: size.files, bytes: size.bytes });
|
|
268
|
+
}
|
|
269
|
+
if (items.some((item) => item.path === projectDir)) {
|
|
270
|
+
if (await worktreesHeld(realHome, projectDir)) {
|
|
271
|
+
return {
|
|
272
|
+
slug,
|
|
273
|
+
folder: projectFolder,
|
|
274
|
+
folders: [],
|
|
275
|
+
items: [],
|
|
276
|
+
blocked: "git worktrees Namzu made for it are still there; remove them first with `namzu worktree`, then purge"
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
const holder = await liveHolder(projectDir, seams);
|
|
280
|
+
if (holder !== null) {
|
|
281
|
+
return {
|
|
282
|
+
slug,
|
|
283
|
+
folder: projectFolder,
|
|
284
|
+
folders: [],
|
|
285
|
+
items: [],
|
|
286
|
+
blocked: `a session of this project is running${holder.pid === void 0 ? "" : ` (process ${holder.pid})`}; stop it first`
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
const mine = /* @__PURE__ */ new Set([...folders, ...projectFolder === null ? [] : [projectFolder]]);
|
|
291
|
+
if (mine.size > 0) {
|
|
292
|
+
const history = await readPromptHistory(realHome);
|
|
293
|
+
const count = history.entries.filter((entry) => mine.has(entry.project)).length;
|
|
294
|
+
if (count > 0) {
|
|
295
|
+
items.push({
|
|
296
|
+
kind: "history",
|
|
297
|
+
what: "prompts in the prompt history",
|
|
298
|
+
path: promptHistoryPath(realHome),
|
|
299
|
+
files: 0,
|
|
300
|
+
bytes: 0,
|
|
301
|
+
count
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const indexed = await indexCount(realHome, slug);
|
|
306
|
+
if (indexed !== null) {
|
|
307
|
+
items.push({
|
|
308
|
+
kind: "index",
|
|
309
|
+
what: "rows in the session index",
|
|
310
|
+
path: indexed.path,
|
|
311
|
+
files: 0,
|
|
312
|
+
bytes: 0,
|
|
313
|
+
count: indexed.count
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
return { slug, folder: projectFolder, folders: [...mine], items };
|
|
317
|
+
}
|
|
318
|
+
__name(planProject, "planProject");
|
|
319
|
+
async function planProjectPurge(home, projectRoot, seams = {}) {
|
|
320
|
+
const realHome = await realHomeOf(home);
|
|
321
|
+
if (realHome === null) return { home, projects: [] };
|
|
322
|
+
const found = await findProject(realHome, projectRoot);
|
|
323
|
+
const slug = found?.slug ?? slugForCwd(projectRoot);
|
|
324
|
+
const project = await planProject(realHome, slug, /* @__PURE__ */ new Set([projectRoot]), seams);
|
|
325
|
+
return { home: realHome, projects: project.items.length > 0 || project.blocked ? [project] : [] };
|
|
326
|
+
}
|
|
327
|
+
__name(planProjectPurge, "planProjectPurge");
|
|
328
|
+
async function planAllPurge(home, seams = {}) {
|
|
329
|
+
const realHome = await realHomeOf(home);
|
|
330
|
+
if (realHome === null) return { home, projects: [] };
|
|
331
|
+
const projects = [];
|
|
332
|
+
for (const slug of await allSlugs(realHome)) {
|
|
333
|
+
const project = await planProject(realHome, slug, /* @__PURE__ */ new Set(), seams);
|
|
334
|
+
if (project.items.length > 0 || project.blocked) projects.push(project);
|
|
335
|
+
}
|
|
336
|
+
const lines = (await readPromptHistory(realHome)).entries.length;
|
|
337
|
+
const history = lines > 0 && projects.every((project) => project.blocked === void 0) ? {
|
|
338
|
+
kind: "history",
|
|
339
|
+
what: "prompts in the prompt history",
|
|
340
|
+
path: promptHistoryPath(realHome),
|
|
341
|
+
files: 0,
|
|
342
|
+
bytes: 0,
|
|
343
|
+
count: lines
|
|
344
|
+
} : void 0;
|
|
345
|
+
return { home: realHome, projects, ...history ? { history } : {} };
|
|
346
|
+
}
|
|
347
|
+
__name(planAllPurge, "planAllPurge");
|
|
348
|
+
function dropIndexRows(path, slug) {
|
|
349
|
+
const db = openIndex(path, false);
|
|
350
|
+
if (db === null) throw new Error("the session index could not be opened");
|
|
351
|
+
try {
|
|
352
|
+
db.exec("PRAGMA busy_timeout = 5000");
|
|
353
|
+
db.exec("BEGIN");
|
|
354
|
+
const own = "(SELECT id FROM sessions WHERE slug = ?)";
|
|
355
|
+
for (const table of [
|
|
356
|
+
"turns",
|
|
357
|
+
"pending_decisions",
|
|
358
|
+
"external_refs",
|
|
359
|
+
"children",
|
|
360
|
+
"batches",
|
|
361
|
+
"evidence_fts"
|
|
362
|
+
]) {
|
|
363
|
+
db.prepare(`DELETE FROM ${table} WHERE session_id IN ${own}`).run(slug);
|
|
364
|
+
}
|
|
365
|
+
db.prepare("DELETE FROM sessions WHERE slug = ?").run(slug);
|
|
366
|
+
db.prepare("DELETE FROM projects WHERE slug = ?").run(slug);
|
|
367
|
+
db.exec("COMMIT");
|
|
368
|
+
} catch (error) {
|
|
369
|
+
try {
|
|
370
|
+
db.exec("ROLLBACK");
|
|
371
|
+
} catch {
|
|
372
|
+
}
|
|
373
|
+
throw error;
|
|
374
|
+
} finally {
|
|
375
|
+
db.close();
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
__name(dropIndexRows, "dropIndexRows");
|
|
379
|
+
async function executePurge(plan, options, seams = {}) {
|
|
380
|
+
const realHome = await realHomeOf(plan.home);
|
|
381
|
+
const outcomes = [];
|
|
382
|
+
for (const project of plan.projects) {
|
|
383
|
+
const deleted = [];
|
|
384
|
+
const failed = [];
|
|
385
|
+
if (realHome === null || project.blocked !== void 0) {
|
|
386
|
+
outcomes.push({ slug: project.slug, deleted, failed });
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
389
|
+
if (project.items.some((item) => item.path === join(realHome, "projects", project.slug))) {
|
|
390
|
+
const holder = await liveHolder(join(realHome, "projects", project.slug), seams);
|
|
391
|
+
if (holder !== null) {
|
|
392
|
+
failed.push(
|
|
393
|
+
`${project.slug}: a session of this project is running${holder.pid === void 0 ? "" : ` (process ${holder.pid})`}; left alone, stop it first`
|
|
394
|
+
);
|
|
395
|
+
outcomes.push({ slug: project.slug, deleted, failed });
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
const folders = new Set(project.folders);
|
|
400
|
+
for (const item of project.items) {
|
|
401
|
+
try {
|
|
402
|
+
if (item.kind === "folder" || item.kind === "file") {
|
|
403
|
+
const state = await checkPath(realHome, item.path);
|
|
404
|
+
if (state === "absent") continue;
|
|
405
|
+
if (state !== "ok") {
|
|
406
|
+
failed.push(`${item.path}: ${state}`);
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
await rm(item.path, { recursive: item.kind === "folder", force: true });
|
|
410
|
+
deleted.push(item.path);
|
|
411
|
+
} else if (item.kind === "history") {
|
|
412
|
+
const dropped = await rewritePromptHistory(
|
|
413
|
+
realHome,
|
|
414
|
+
(entry) => !folders.has(entry.project)
|
|
415
|
+
);
|
|
416
|
+
if (dropped > 0)
|
|
417
|
+
deleted.push(`${dropped} prompt${dropped === 1 ? "" : "s"} in ${item.path}`);
|
|
418
|
+
} else {
|
|
419
|
+
dropIndexRows(item.path, project.slug);
|
|
420
|
+
deleted.push(`rows in ${item.path}`);
|
|
421
|
+
}
|
|
422
|
+
} catch (error) {
|
|
423
|
+
failed.push(`${item.path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
outcomes.push({ slug: project.slug, deleted, failed });
|
|
427
|
+
}
|
|
428
|
+
if (plan.history !== void 0 && realHome !== null && options.all) {
|
|
429
|
+
const deleted = [];
|
|
430
|
+
const failed = [];
|
|
431
|
+
try {
|
|
432
|
+
const dropped = await rewritePromptHistory(realHome, () => false);
|
|
433
|
+
if (dropped > 0)
|
|
434
|
+
deleted.push(`${dropped} prompt${dropped === 1 ? "" : "s"} in ${plan.history.path}`);
|
|
435
|
+
} catch (error) {
|
|
436
|
+
failed.push(`${plan.history.path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
437
|
+
}
|
|
438
|
+
outcomes.push({ slug: "(prompt history)", deleted, failed });
|
|
439
|
+
}
|
|
440
|
+
return outcomes;
|
|
441
|
+
}
|
|
442
|
+
__name(executePurge, "executePurge");
|
|
443
|
+
|
|
39
444
|
// src/integrations/state/report.ts
|
|
40
445
|
import { constants } from "node:fs";
|
|
41
|
-
import { lstat, open, opendir, realpath } from "node:fs/promises";
|
|
446
|
+
import { lstat as lstat2, open, opendir, realpath as realpath2 } from "node:fs/promises";
|
|
42
447
|
import { homedir } from "node:os";
|
|
43
|
-
import { basename, join, resolve, sep } from "node:path";
|
|
448
|
+
import { basename, join as join2, resolve, sep as sep2 } from "node:path";
|
|
44
449
|
var MAX_METADATA_BYTES = 4 * 1024 * 1024;
|
|
45
450
|
var MAX_REPORTED_ISSUES = 100;
|
|
46
451
|
var MAX_ENTRIES = 1e5;
|
|
@@ -87,11 +492,11 @@ var EntryChangedError = class extends Error {
|
|
|
87
492
|
async function inspectNamzuState(options = {}) {
|
|
88
493
|
const cwd = await canonicalBase(options.cwd ?? process.cwd());
|
|
89
494
|
const home = await canonicalBase(options.home ?? homedir());
|
|
90
|
-
const projectRoot =
|
|
495
|
+
const projectRoot = join2(cwd, ".namzu");
|
|
91
496
|
const environment = options.env ?? (options.home !== void 0 ? {} : process.env);
|
|
92
497
|
const configuredHome = environment.NAMZU_HOME;
|
|
93
498
|
const userRoot = await canonicalBase(
|
|
94
|
-
configuredHome === void 0 || configuredHome.length === 0 ?
|
|
499
|
+
configuredHome === void 0 || configuredHome.length === 0 ? join2(home, ".namzu") : configuredHome
|
|
95
500
|
);
|
|
96
501
|
const overlap = projectRoot === userRoot;
|
|
97
502
|
const specs = overlap ? [{ path: projectRoot, roles: ["project", "user"] }] : [
|
|
@@ -121,9 +526,9 @@ async function inspectNamzuState(options = {}) {
|
|
|
121
526
|
}),
|
|
122
527
|
{ roots: 0, files: 0, logicalBytes: 0 }
|
|
123
528
|
);
|
|
124
|
-
const projectConfigPath =
|
|
529
|
+
const projectConfigPath = join2(cwd, "namzu.config.json");
|
|
125
530
|
const projectConfig = await inspectOneRegularFile(projectConfigPath);
|
|
126
|
-
const legacyLocalConfigPath =
|
|
531
|
+
const legacyLocalConfigPath = join2(cwd, "namzu.config.local.json");
|
|
127
532
|
const legacyLocalConfig = await inspectOneRegularFile(legacyLocalConfigPath);
|
|
128
533
|
const userCollection = collections.get(userRoot);
|
|
129
534
|
const projectBinding = await inspectProjectBinding(userCollection, cwd);
|
|
@@ -155,7 +560,7 @@ __name(inspectNamzuState, "inspectNamzuState");
|
|
|
155
560
|
async function canonicalBase(path) {
|
|
156
561
|
const absolute = resolve(path);
|
|
157
562
|
try {
|
|
158
|
-
return await
|
|
563
|
+
return await realpath2(absolute);
|
|
159
564
|
} catch {
|
|
160
565
|
return absolute;
|
|
161
566
|
}
|
|
@@ -163,7 +568,7 @@ async function canonicalBase(path) {
|
|
|
163
568
|
__name(canonicalBase, "canonicalBase");
|
|
164
569
|
async function inspectOneRegularFile(path) {
|
|
165
570
|
try {
|
|
166
|
-
const stat = await
|
|
571
|
+
const stat = await lstat2(path);
|
|
167
572
|
return stat.isFile() ? { status: "present", logicalBytes: stat.size } : { status: "unsupported", logicalBytes: 0 };
|
|
168
573
|
} catch (error) {
|
|
169
574
|
if (error.code === "ENOENT") {
|
|
@@ -177,7 +582,7 @@ async function collectRoot(root, entryLimit) {
|
|
|
177
582
|
const sink = { issues: [], omitted: 0 };
|
|
178
583
|
let rootStat;
|
|
179
584
|
try {
|
|
180
|
-
rootStat = await
|
|
585
|
+
rootStat = await lstat2(root);
|
|
181
586
|
} catch (error) {
|
|
182
587
|
if (error.code === "ENOENT") {
|
|
183
588
|
return { root, exists: false, entries: [], issues: [], omittedIssues: 0 };
|
|
@@ -246,12 +651,12 @@ function rootEntry(root, stat) {
|
|
|
246
651
|
}
|
|
247
652
|
__name(rootEntry, "rootEntry");
|
|
248
653
|
async function walk(root, relativeDir, entries, sink, entryLimit) {
|
|
249
|
-
const absoluteDir = relativeDir === "" ? root :
|
|
654
|
+
const absoluteDir = relativeDir === "" ? root : join2(root, relativeDir);
|
|
250
655
|
const childDirectories = [];
|
|
251
656
|
try {
|
|
252
657
|
const directory = await opendir(absoluteDir);
|
|
253
658
|
for await (const child of directory) {
|
|
254
|
-
const relativePath = relativeDir === "" ? child.name :
|
|
659
|
+
const relativePath = relativeDir === "" ? child.name : join2(relativeDir, child.name);
|
|
255
660
|
if (entries.length >= entryLimit) {
|
|
256
661
|
pushIssue(sink, {
|
|
257
662
|
code: "inspection_skipped",
|
|
@@ -260,10 +665,10 @@ async function walk(root, relativeDir, entries, sink, entryLimit) {
|
|
|
260
665
|
});
|
|
261
666
|
return false;
|
|
262
667
|
}
|
|
263
|
-
const absolute =
|
|
668
|
+
const absolute = join2(root, relativePath);
|
|
264
669
|
let stat;
|
|
265
670
|
try {
|
|
266
|
-
stat = await
|
|
671
|
+
stat = await lstat2(absolute);
|
|
267
672
|
} catch (error) {
|
|
268
673
|
addIssue(sink, relativePath, error);
|
|
269
674
|
continue;
|
|
@@ -307,7 +712,7 @@ async function walk(root, relativeDir, entries, sink, entryLimit) {
|
|
|
307
712
|
}
|
|
308
713
|
__name(walk, "walk");
|
|
309
714
|
function normalizeRelative(path) {
|
|
310
|
-
return
|
|
715
|
+
return sep2 === "/" ? path : path.split(sep2).join("/");
|
|
311
716
|
}
|
|
312
717
|
__name(normalizeRelative, "normalizeRelative");
|
|
313
718
|
function addIssue(sink, path, error) {
|
|
@@ -646,6 +1051,7 @@ Usage:
|
|
|
646
1051
|
namzu state
|
|
647
1052
|
namzu state report
|
|
648
1053
|
namzu state move legacy [--dry-run]
|
|
1054
|
+
namzu state purge [path] [--dry-run] [--yes] [--all]
|
|
649
1055
|
|
|
650
1056
|
report (the default) lists what Namzu keeps and where, without changing
|
|
651
1057
|
anything: it does not load project configuration, create a Session, repair,
|
|
@@ -658,11 +1064,21 @@ trust, moves only names an earlier Namzu wrote, and leaves in place what git
|
|
|
658
1064
|
tracks, a git worktree with changes and anything it cannot check, saying why.
|
|
659
1065
|
--dry-run says what would move and changes nothing.
|
|
660
1066
|
|
|
1067
|
+
purge deletes the state Namzu keeps in its home for one project (this folder's
|
|
1068
|
+
by default, or the project of [path]): its conversations, checkpoints, file
|
|
1069
|
+
history, plans, memory, recovery copies, its prompts in the prompt history and
|
|
1070
|
+
its rows in the session index. It never deletes anything in the project folder
|
|
1071
|
+
itself, so settings files kept there stay. It lists what it will delete and asks
|
|
1072
|
+
first; with no terminal it needs --yes. It stops while a session of the project
|
|
1073
|
+
is running, and while git worktrees Namzu made for it still exist.
|
|
1074
|
+
|
|
661
1075
|
Output:
|
|
662
1076
|
Use the global --format json or --format yaml flag for structured output.
|
|
663
1077
|
|
|
664
1078
|
Options:
|
|
665
|
-
--dry-run With move legacy: list what would
|
|
1079
|
+
--dry-run With move legacy or purge: list what would change, change nothing
|
|
1080
|
+
--yes With purge: delete without asking
|
|
1081
|
+
--all With purge: every project, not one
|
|
666
1082
|
-h, --help Show this help`;
|
|
667
1083
|
function createStateCommand(deps) {
|
|
668
1084
|
return {
|
|
@@ -670,11 +1086,13 @@ function createStateCommand(deps) {
|
|
|
670
1086
|
description: "Inspect local Namzu state, or move what an earlier Namzu left in a project",
|
|
671
1087
|
passThrough: true,
|
|
672
1088
|
help: HELP,
|
|
1089
|
+
actions: STATE_ACTIONS,
|
|
673
1090
|
handler: /* @__PURE__ */ __name(async ({ ctx, rawArgs }) => {
|
|
674
1091
|
if (rawArgs[0] === "move-legacy") {
|
|
675
1092
|
ctx.formatter.error({ message: "This command is now `namzu state move legacy`." });
|
|
676
1093
|
return EXIT_USAGE;
|
|
677
1094
|
}
|
|
1095
|
+
if (rawArgs[0] === "purge") return await runPurge(ctx.formatter, rawArgs.slice(1), deps.purge);
|
|
678
1096
|
if (rawArgs[0] === "move" && rawArgs[1] === "legacy") {
|
|
679
1097
|
const rest = rawArgs.slice(2);
|
|
680
1098
|
if (!(rest.length === 0 || rest.length === 1 && rest[0] === "--dry-run")) {
|
|
@@ -695,7 +1113,9 @@ function createStateCommand(deps) {
|
|
|
695
1113
|
return EXIT_OK;
|
|
696
1114
|
}
|
|
697
1115
|
if (!(rawArgs.length === 0 || rawArgs.length === 1 && rawArgs[0] === "report")) {
|
|
698
|
-
ctx.formatter.error({
|
|
1116
|
+
ctx.formatter.error({
|
|
1117
|
+
message: "Usage: namzu state [report | move legacy [--dry-run] | purge [path] [--dry-run] [--yes] [--all]]"
|
|
1118
|
+
});
|
|
699
1119
|
return EXIT_USAGE;
|
|
700
1120
|
}
|
|
701
1121
|
const report = await deps.inspect();
|
|
@@ -705,6 +1125,114 @@ function createStateCommand(deps) {
|
|
|
705
1125
|
};
|
|
706
1126
|
}
|
|
707
1127
|
__name(createStateCommand, "createStateCommand");
|
|
1128
|
+
async function askOnTerminal(question) {
|
|
1129
|
+
const rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
1130
|
+
try {
|
|
1131
|
+
const answer = await rl.question(question);
|
|
1132
|
+
return /^y(es)?$/i.test(answer.trim());
|
|
1133
|
+
} finally {
|
|
1134
|
+
rl.close();
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
__name(askOnTerminal, "askOnTerminal");
|
|
1138
|
+
async function runPurge(formatter, args, seams = {}) {
|
|
1139
|
+
let dryRun = false;
|
|
1140
|
+
let yes = false;
|
|
1141
|
+
let all = false;
|
|
1142
|
+
const operands = [];
|
|
1143
|
+
for (const arg of args) {
|
|
1144
|
+
if (arg === "--dry-run") dryRun = true;
|
|
1145
|
+
else if (arg === "--yes") yes = true;
|
|
1146
|
+
else if (arg === "--all") all = true;
|
|
1147
|
+
else if (arg.startsWith("-")) {
|
|
1148
|
+
formatter.error({ message: "Usage: namzu state purge [path] [--dry-run] [--yes] [--all]" });
|
|
1149
|
+
return EXIT_USAGE;
|
|
1150
|
+
} else operands.push(arg);
|
|
1151
|
+
}
|
|
1152
|
+
if (operands.length > 1 || all && operands.length > 0) {
|
|
1153
|
+
formatter.error({
|
|
1154
|
+
message: all ? "`namzu state purge --all` takes no path." : "Usage: namzu state purge [path] [--dry-run] [--yes] [--all]"
|
|
1155
|
+
});
|
|
1156
|
+
return EXIT_USAGE;
|
|
1157
|
+
}
|
|
1158
|
+
const isTerminal = seams.isTerminal ?? (() => Boolean(process.stdin.isTTY && process.stdout.isTTY));
|
|
1159
|
+
if (!dryRun && !yes && !isTerminal()) {
|
|
1160
|
+
formatter.error({
|
|
1161
|
+
message: "There is no terminal to ask on: add --yes to delete, or --dry-run to only list."
|
|
1162
|
+
});
|
|
1163
|
+
return EXIT_USAGE;
|
|
1164
|
+
}
|
|
1165
|
+
const home = (seams.home ?? (() => resolveNamzuHome()))();
|
|
1166
|
+
let plan;
|
|
1167
|
+
if (all) {
|
|
1168
|
+
plan = await planAllPurge(home, seams.seams);
|
|
1169
|
+
} else {
|
|
1170
|
+
const cwd = (seams.cwd ?? (() => process.cwd()))();
|
|
1171
|
+
let folder;
|
|
1172
|
+
try {
|
|
1173
|
+
folder = await realpath3(resolve2(cwd, operands[0] ?? "."));
|
|
1174
|
+
} catch {
|
|
1175
|
+
formatter.error({ message: `There is no folder at ${safePath(operands[0] ?? cwd)}.` });
|
|
1176
|
+
return EXIT_USAGE;
|
|
1177
|
+
}
|
|
1178
|
+
plan = await planProjectPurge(home, cliProjectRoot(folder), seams.seams);
|
|
1179
|
+
}
|
|
1180
|
+
const blocked = plan.projects.filter((project) => project.blocked !== void 0);
|
|
1181
|
+
const items = plan.projects.flatMap((project) => project.items);
|
|
1182
|
+
if (items.length === 0 && plan.history === void 0) {
|
|
1183
|
+
const text = blocked.length > 0 ? renderPurgePlan(plan, dryRun) : "Nothing is kept in the Namzu home for this.";
|
|
1184
|
+
formatter.print({ ...plan, text });
|
|
1185
|
+
return blocked.length > 0 ? EXIT_FAIL : EXIT_OK;
|
|
1186
|
+
}
|
|
1187
|
+
if (dryRun) {
|
|
1188
|
+
formatter.print({ ...plan, dryRun: true, text: renderPurgePlan(plan, true) });
|
|
1189
|
+
return blocked.length > 0 ? EXIT_FAIL : EXIT_OK;
|
|
1190
|
+
}
|
|
1191
|
+
formatter.print({ ...plan, text: renderPurgePlan(plan, false) });
|
|
1192
|
+
if (!yes) {
|
|
1193
|
+
const ok = await (seams.confirm ?? askOnTerminal)("Delete this? [y/N] ");
|
|
1194
|
+
if (!ok) {
|
|
1195
|
+
formatter.print({ text: "Nothing was deleted." });
|
|
1196
|
+
return EXIT_OK;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
const outcomes = await executePurge(plan, { all }, seams.seams);
|
|
1200
|
+
formatter.print({ outcomes, text: renderPurgeOutcome(outcomes) });
|
|
1201
|
+
return outcomes.some((outcome) => outcome.failed.length > 0) || blocked.length > 0 ? EXIT_FAIL : EXIT_OK;
|
|
1202
|
+
}
|
|
1203
|
+
__name(runPurge, "runPurge");
|
|
1204
|
+
function renderPurgePlan(plan, dryRun) {
|
|
1205
|
+
const lines = [
|
|
1206
|
+
dryRun ? "Would delete (nothing is deleted):" : "This deletes, under the Namzu home:"
|
|
1207
|
+
];
|
|
1208
|
+
const describe = /* @__PURE__ */ __name((item) => item.count !== void 0 ? `${item.count} ${item.count === 1 ? item.what.replace(/^(prompt|row)s /, "$1 ") : item.what}` : `${item.what}: ${formatBytes(item.bytes)} \xB7 ${item.files} files`, "describe");
|
|
1209
|
+
for (const project of plan.projects) {
|
|
1210
|
+
lines.push("", project.folder !== null ? safePath(project.folder) : project.slug);
|
|
1211
|
+
if (project.blocked !== void 0) {
|
|
1212
|
+
lines.push(` left alone: ${safeLine(project.blocked)}`);
|
|
1213
|
+
continue;
|
|
1214
|
+
}
|
|
1215
|
+
for (const item of project.items) {
|
|
1216
|
+
lines.push(` ${safePath(homePath(item.path))}`);
|
|
1217
|
+
lines.push(` ${describe(item)}`);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
if (plan.history !== void 0) {
|
|
1221
|
+
lines.push("", ` ${safePath(homePath(plan.history.path))}`, ` ${describe(plan.history)}`);
|
|
1222
|
+
}
|
|
1223
|
+
lines.push("", "Files inside the project folders are not touched.");
|
|
1224
|
+
return lines.join("\n");
|
|
1225
|
+
}
|
|
1226
|
+
__name(renderPurgePlan, "renderPurgePlan");
|
|
1227
|
+
function renderPurgeOutcome(outcomes) {
|
|
1228
|
+
const lines = [];
|
|
1229
|
+
for (const outcome of outcomes) {
|
|
1230
|
+
for (const done of outcome.deleted) lines.push(`Deleted ${safePath(homePath(done))}`);
|
|
1231
|
+
for (const bad of outcome.failed) lines.push(`Could not delete ${safeLine(bad)}`);
|
|
1232
|
+
}
|
|
1233
|
+
return lines.length > 0 ? lines.join("\n") : "Nothing was deleted.";
|
|
1234
|
+
}
|
|
1235
|
+
__name(renderPurgeOutcome, "renderPurgeOutcome");
|
|
708
1236
|
var stateCommand = createStateCommand({
|
|
709
1237
|
inspect: inspectNamzuState
|
|
710
1238
|
});
|
|
@@ -767,9 +1295,9 @@ function renderStateReport(report) {
|
|
|
767
1295
|
lines.push(
|
|
768
1296
|
` ${formatBytes(root.logicalBytes)} \xB7 ${root.files} files \xB7 ${root.directories} directories`
|
|
769
1297
|
);
|
|
770
|
-
for (const [category,
|
|
771
|
-
if (
|
|
772
|
-
lines.push(` ${category}: ${formatBytes(
|
|
1298
|
+
for (const [category, measure2] of Object.entries(root.categories)) {
|
|
1299
|
+
if (measure2.files === 0) continue;
|
|
1300
|
+
lines.push(` ${category}: ${formatBytes(measure2.logicalBytes)} \xB7 ${measure2.files} files`);
|
|
773
1301
|
}
|
|
774
1302
|
const inventory = root.inventory;
|
|
775
1303
|
if (inventory.projects > 0 || inventory.sessionLogs.files > 0) {
|
|
@@ -848,7 +1376,9 @@ __name(safeLine, "safeLine");
|
|
|
848
1376
|
export {
|
|
849
1377
|
createStateCommand,
|
|
850
1378
|
renderLegacyMove,
|
|
1379
|
+
renderPurgeOutcome,
|
|
1380
|
+
renderPurgePlan,
|
|
851
1381
|
renderStateReport,
|
|
852
1382
|
stateCommand
|
|
853
1383
|
};
|
|
854
|
-
//# sourceMappingURL=state-
|
|
1384
|
+
//# sourceMappingURL=state-MVYWWBAA.js.map
|