@maycombhq/atticus 2.0.0-beta.25 → 2.0.0-beta.27
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/bin.js +3 -3
- package/dist/chunk-22A2K555.js +653 -0
- package/dist/{chunk-UTZMF5CV.js → chunk-23TTURB2.js} +1 -1
- package/dist/{chunk-F36DIKJ3.js → chunk-2666BPJE.js} +19 -19
- package/dist/{chunk-E2OP6JNF.js → chunk-2ALBHI4Q.js} +28 -27
- package/dist/chunk-2ANBMA74.js +107 -0
- package/dist/{chunk-S7UQFI4B.js → chunk-2HCW6HXK.js} +27 -26
- package/dist/{chunk-HV3KPEFH.js → chunk-2ISR6MWD.js} +15 -15
- package/dist/{chunk-QQD25YNF.js → chunk-2MRYL45Z.js} +50 -9
- package/dist/{chunk-KN4UQJ7R.js → chunk-3GNUHLAN.js} +4 -4
- package/dist/chunk-3GURU22K.js +44 -0
- package/dist/{chunk-4U3JLIRC.js → chunk-3M3MDBOG.js} +1 -1
- package/dist/{chunk-DJ4C5ELF.js → chunk-3PBIZBWN.js} +1 -1
- package/dist/{chunk-XUCHGEF5.js → chunk-3PWXVBCB.js} +83 -40
- package/dist/chunk-3W2QX6TT.js +58 -0
- package/dist/{chunk-CPFAWYVC.js → chunk-3Z7ATALI.js} +5 -5
- package/dist/{chunk-ZGULQAPZ.js → chunk-44SWXDD7.js} +8 -5
- package/dist/{chunk-LGE6H4UP.js → chunk-46N5O5H7.js} +5 -5
- package/dist/{chunk-SRLUADSY.js → chunk-4D4DNTFE.js} +4 -4
- package/dist/{chunk-DMQJDHXG.js → chunk-4EAT7HOX.js} +7 -5
- package/dist/{chunk-DPZD7WVX.js → chunk-4FLIW5PJ.js} +4 -4
- package/dist/{chunk-SGTAQNOP.js → chunk-4LWA5VMJ.js} +52 -37
- package/dist/{chunk-D45K3XKK.js → chunk-4ODVHNA6.js} +18 -17
- package/dist/{chunk-7QZDGM5V.js → chunk-4POSAXNC.js} +6 -6
- package/dist/{chunk-A3J75BO2.js → chunk-4PQ4KDOA.js} +16 -15
- package/dist/{chunk-2Y5FJQSF.js → chunk-4UVTNHA6.js} +1 -1
- package/dist/{chunk-KVVNAUIG.js → chunk-4XK3HLOH.js} +1 -0
- package/dist/{chunk-V7T6URII.js → chunk-523NRKHF.js} +4 -4
- package/dist/{chunk-7EAH2MFY.js → chunk-5GCCG3GJ.js} +11 -5
- package/dist/{chunk-7U6PBBXG.js → chunk-5XW6RUDV.js} +8 -8
- package/dist/{chunk-Y3J365UC.js → chunk-5YEUAZZE.js} +8 -8
- package/dist/{chunk-JWLABUXL.js → chunk-62LD7CSY.js} +13 -13
- package/dist/{chunk-LOJGNSPA.js → chunk-67Y2J55V.js} +22 -21
- package/dist/{chunk-UCKG6UE7.js → chunk-6DSZ4CL7.js} +37 -22
- package/dist/{chunk-FNP4M4VL.js → chunk-6G67LSBG.js} +283 -61
- package/dist/{chunk-5GLGLWAJ.js → chunk-6OEB4FTC.js} +20 -19
- package/dist/{chunk-5RKN5QIX.js → chunk-6OTGCKYH.js} +9 -9
- package/dist/{chunk-UI7ID4HG.js → chunk-6XLCMDIP.js} +13 -13
- package/dist/chunk-76DZJTU7.js +190 -0
- package/dist/chunk-7764GVJK.js +37 -0
- package/dist/{chunk-TKCNJJ2S.js → chunk-7BOGXFZ3.js} +11 -11
- package/dist/{chunk-Q52KWTG5.js → chunk-7CVHKNAF.js} +16 -15
- package/dist/{chunk-XF5UMMQL.js → chunk-7FEIS3KV.js} +25 -24
- package/dist/{chunk-UTYL4XVA.js → chunk-7GXM45T5.js} +26 -23
- package/dist/{chunk-4PW5SRKJ.js → chunk-7YMAMNMT.js} +17 -16
- package/dist/chunk-7YWS47SE.js +56 -0
- package/dist/{chunk-LZFKJ2BR.js → chunk-A3LVMCA5.js} +1 -1
- package/dist/{chunk-7YFUNWFM.js → chunk-A7ZJKLFC.js} +11 -11
- package/dist/chunk-AANQC5QP.js +47 -0
- package/dist/{chunk-LP5QGTCR.js → chunk-AIQLTDC3.js} +3 -3
- package/dist/{chunk-EPXYFJTY.js → chunk-AKZTCZ6F.js} +4 -4
- package/dist/{chunk-5267F4BS.js → chunk-ALCSTVWQ.js} +3 -3
- package/dist/{chunk-NMBHFSJQ.js → chunk-ALUHO7SE.js} +26 -25
- package/dist/{chunk-3WO7ASU7.js → chunk-AMZ4XMES.js} +8 -8
- package/dist/{chunk-JKEUPSCE.js → chunk-AOQG37K4.js} +8 -6
- package/dist/{chunk-3NA2VE45.js → chunk-ARXZTHEI.js} +16 -15
- package/dist/{chunk-W2W7YCFL.js → chunk-AS4CTARY.js} +16 -15
- package/dist/{chunk-7AKJ2XTW.js → chunk-AVUPW23W.js} +18 -17
- package/dist/{chunk-CMUJSPP4.js → chunk-B56FCIEJ.js} +12 -12
- package/dist/{chunk-K3OIBTCV.js → chunk-BABATPOZ.js} +18 -17
- package/dist/{chunk-VAZYNF6I.js → chunk-BIOKDLLX.js} +21 -19
- package/dist/{chunk-23QHP4JJ.js → chunk-BUBKKEUV.js} +5 -5
- package/dist/{chunk-N3OEBQTA.js → chunk-CDC6VECU.js} +3 -3
- package/dist/chunk-CHEFUNZ4.js +425 -0
- package/dist/{chunk-MM7YWUBB.js → chunk-CIFR3DPV.js} +6 -6
- package/dist/{chunk-JCKKAELC.js → chunk-CLBVKD4P.js} +16 -15
- package/dist/{chunk-HHZEXF7V.js → chunk-CLM5Z3R5.js} +5 -5
- package/dist/{chunk-M7XNX5IC.js → chunk-CLYV5MB6.js} +9 -9
- package/dist/{chunk-SHWHRCMU.js → chunk-CRYIBCGP.js} +37 -19
- package/dist/{chunk-6576X5BJ.js → chunk-D3L5SO27.js} +5 -5
- package/dist/chunk-DAZM2INZ.js +34 -0
- package/dist/{chunk-VBJHIRKV.js → chunk-DF4BXBB2.js} +6 -6
- package/dist/{chunk-U4HZ5CXL.js → chunk-E7Q52EOO.js} +11 -11
- package/dist/{chunk-MZTU5L6S.js → chunk-EFDUC35B.js} +3 -3
- package/dist/{chunk-GIOOA2ZO.js → chunk-EHXEJFHD.js} +5 -5
- package/dist/{chunk-M6HI36T3.js → chunk-ELJ5Q4J2.js} +2 -2
- package/dist/{chunk-MJAIBPI5.js → chunk-EM6DKBTJ.js} +3 -3
- package/dist/{chunk-YGS2YVF2.js → chunk-EMC46SU4.js} +38 -17
- package/dist/{chunk-CB6H7MH2.js → chunk-EQEDIWFQ.js} +25 -24
- package/dist/chunk-EW574EZI.js +57 -0
- package/dist/{chunk-JJEPU4VS.js → chunk-EYINWNXL.js} +5 -5
- package/dist/{chunk-MJOIMGS4.js → chunk-EYVYHYCA.js} +8 -8
- package/dist/{chunk-WGOQZ4PQ.js → chunk-F66542M6.js} +34 -9
- package/dist/{chunk-EUCATH2U.js → chunk-F74OMLNU.js} +6 -6
- package/dist/{chunk-G5P7F6RQ.js → chunk-FADIWOA5.js} +3 -3
- package/dist/{chunk-JMOZ6K5A.js → chunk-FC3ZVD3O.js} +3 -3
- package/dist/{chunk-XXJSGCDO.js → chunk-FG65LXED.js} +8 -8
- package/dist/{chunk-5WZV37WS.js → chunk-FKAUBC4Y.js} +8 -8
- package/dist/{chunk-WA644MUQ.js → chunk-FM3EEDS2.js} +15 -15
- package/dist/{chunk-XZQBFF65.js → chunk-FS4E7F6O.js} +403 -148
- package/dist/{chunk-Q6UYUCNS.js → chunk-FSYJPYLE.js} +16 -15
- package/dist/{chunk-H7GAPNGQ.js → chunk-G33UIUG3.js} +46 -20
- package/dist/{chunk-OEUTV6EL.js → chunk-G3F4BYML.js} +15 -14
- package/dist/{chunk-7UYRN4ON.js → chunk-GBJRFFDW.js} +5 -5
- package/dist/{chunk-7HW2CMIN.js → chunk-GF6GBHFN.js} +13 -11
- package/dist/{chunk-DCPI3ETH.js → chunk-GLHOUT5E.js} +26 -25
- package/dist/{chunk-VOBG7BLB.js → chunk-GM6GXO2A.js} +20 -19
- package/dist/{chunk-KJPKIU2R.js → chunk-GSJ2RXE7.js} +29 -28
- package/dist/{chunk-HU7VXMFV.js → chunk-GT72FDER.js} +6 -6
- package/dist/{chunk-SBNBVUOF.js → chunk-GW6ZH77P.js} +37 -36
- package/dist/{chunk-6WYOJCB4.js → chunk-GZILYRGC.js} +3 -3
- package/dist/{chunk-4SS5ZK47.js → chunk-GZSOZYEP.js} +3 -3
- package/dist/{chunk-N6SSI6XO.js → chunk-H25QNDKK.js} +58 -36
- package/dist/{chunk-DYVUNT4O.js → chunk-H3RKW4RF.js} +7 -7
- package/dist/chunk-H7M7ZH6H.js +52 -0
- package/dist/chunk-H7NRWSMP.js +55 -0
- package/dist/{chunk-KW4DIXUL.js → chunk-HDWVR5KD.js} +4 -4
- package/dist/{chunk-HR34F2AJ.js → chunk-HG24EF5S.js} +16 -15
- package/dist/chunk-HPNYSY5M.js +1068 -0
- package/dist/{chunk-3VC2XJ53.js → chunk-HUMM4S5I.js} +6 -6
- package/dist/{chunk-K373N5U6.js → chunk-HVPS2YCW.js} +11 -11
- package/dist/{chunk-IGOE6KPG.js → chunk-I34CXV2C.js} +185 -11
- package/dist/{chunk-U7YZ3IRI.js → chunk-I57IH5X6.js} +360 -271
- package/dist/{chunk-P56N3NPT.js → chunk-I5X4WU7U.js} +6 -6
- package/dist/chunk-IAVVJ34R.js +55 -0
- package/dist/chunk-IBJE2E2S.js +51 -0
- package/dist/{chunk-EXCXNDTQ.js → chunk-IF3X6FMO.js} +1 -1
- package/dist/{chunk-GAVEIYKH.js → chunk-IJHJIL6T.js} +154 -25
- package/dist/chunk-IM435QAM.js +72 -0
- package/dist/{chunk-7NLYSTEK.js → chunk-IMBJ7WAO.js} +6 -6
- package/dist/{chunk-EM7F6XEU.js → chunk-INCFIDCB.js} +2 -2
- package/dist/{chunk-AYWJMHSX.js → chunk-IPMPLTEG.js} +3 -3
- package/dist/{chunk-PGKCRK77.js → chunk-IPSZDVLI.js} +12 -12
- package/dist/{chunk-IMTAHDME.js → chunk-IX2EOYOU.js} +50 -13
- package/dist/{chunk-QE444DZ2.js → chunk-IXNMGPF7.js} +61 -28
- package/dist/{chunk-NL6GIEJU.js → chunk-J6GO3K7G.js} +19 -18
- package/dist/chunk-JBLM6IUA.js +42 -0
- package/dist/{chunk-IWQEZFVV.js → chunk-JL2VOYSL.js} +91 -93
- package/dist/{chunk-K77ILFUQ.js → chunk-JRXFZB6J.js} +8 -8
- package/dist/{chunk-UR6JGVX2.js → chunk-JTOLBS7R.js} +988 -410
- package/dist/{chunk-GD6FXN6R.js → chunk-K73BHPTQ.js} +19 -18
- package/dist/{chunk-PYVFLITV.js → chunk-KF7KVUNJ.js} +5 -5
- package/dist/{chunk-F4WKGX7K.js → chunk-KKUCBKJE.js} +20 -19
- package/dist/{chunk-U7F6E5M3.js → chunk-KLFFHBWG.js} +27 -26
- package/dist/{chunk-ROVOAF2O.js → chunk-KMYB2XO7.js} +21 -13
- package/dist/chunk-KNYQUWFN.js +52 -0
- package/dist/{chunk-KFDOL2Y4.js → chunk-KOAJPMU2.js} +31 -20
- package/dist/chunk-KRTSE73S.js +55 -0
- package/dist/{chunk-IW3QMW3X.js → chunk-L3AM5YRP.js} +28 -9
- package/dist/{chunk-334N6EI2.js → chunk-LCIIFAID.js} +22 -21
- package/dist/{chunk-DLNQ3HUM.js → chunk-LCQIRCOT.js} +55 -10
- package/dist/{chunk-QFOJ3UPU.js → chunk-LFHBAWIM.js} +13 -13
- package/dist/chunk-LIHEMWIT.js +39 -0
- package/dist/{chunk-T5QYYB5L.js → chunk-LJLYWILK.js} +14 -14
- package/dist/{chunk-E7PR4WMM.js → chunk-LNJKDS5C.js} +26 -25
- package/dist/{chunk-HHZ2ZKUD.js → chunk-LTHY7E2P.js} +16 -15
- package/dist/{chunk-4WIVTPGE.js → chunk-LTVOQJKT.js} +7 -7
- package/dist/{chunk-TIOYZDRB.js → chunk-LZO3JABE.js} +6 -6
- package/dist/{chunk-PXMV2LLY.js → chunk-M65AZ4ZE.js} +3 -5
- package/dist/chunk-MPNTEWNY.js +492 -0
- package/dist/chunk-MQGQ3AWK.js +58 -0
- package/dist/{chunk-NQLTWGF4.js → chunk-MUXYUIBV.js} +6 -6
- package/dist/{chunk-5R3FRI6H.js → chunk-MWRRJDXQ.js} +34 -31
- package/dist/{chunk-XY6FVBBV.js → chunk-MZDHFWTN.js} +2 -2
- package/dist/chunk-N2XCT5OX.js +68 -0
- package/dist/{chunk-C5LX54QK.js → chunk-N3JGYAMD.js} +15 -15
- package/dist/{chunk-RL7PETU6.js → chunk-N5DLB74D.js} +367 -71
- package/dist/{chunk-MJMEF7SD.js → chunk-NC3Q7RIB.js} +10 -10
- package/dist/{chunk-4GWQVT2C.js → chunk-NCNLX4DL.js} +19 -18
- package/dist/{chunk-3D74UADA.js → chunk-NGSGJLKW.js} +2 -2
- package/dist/{chunk-OOU4N2JQ.js → chunk-NN7K2LLN.js} +25 -24
- package/dist/{chunk-ELNIQYLR.js → chunk-NNURP7VO.js} +15 -15
- package/dist/chunk-NSQB24WR.js +56 -0
- package/dist/{chunk-MWOPED6I.js → chunk-NV5S63YK.js} +7 -7
- package/dist/{chunk-CTJHEG6A.js → chunk-NWMFVPEP.js} +2 -0
- package/dist/{chunk-7E3G5NCH.js → chunk-NYT6QGZA.js} +22 -18
- package/dist/chunk-OB2DAIJX.js +62 -0
- package/dist/{chunk-YAUMNRCB.js → chunk-OC3OXDTG.js} +13 -8
- package/dist/{chunk-DAHKLVHU.js → chunk-OD6RNYMQ.js} +16 -16
- package/dist/{chunk-7FUQAT2R.js → chunk-OFYBRMRG.js} +6 -6
- package/dist/chunk-OGTELPDN.js +43 -0
- package/dist/{chunk-BS52P2CM.js → chunk-OQ7SBQ2Z.js} +7 -7
- package/dist/{chunk-OMSH46JK.js → chunk-OUDGBJC2.js} +16 -9
- package/dist/{chunk-USH4VU5D.js → chunk-OUGTAOGA.js} +2 -2
- package/dist/chunk-OWP5FCYM.js +60 -0
- package/dist/{chunk-YEGGQG5E.js → chunk-P36PTWBM.js} +8 -8
- package/dist/{chunk-IKRM64KR.js → chunk-P6Y2J2QY.js} +12 -12
- package/dist/{chunk-P4QTTCVK.js → chunk-PDJL2HO5.js} +24 -22
- package/dist/{chunk-WDJGJ3HV.js → chunk-PPKH6ULR.js} +152 -20
- package/dist/{chunk-5OVSDV77.js → chunk-Q4PFF2ZE.js} +8 -8
- package/dist/chunk-Q7EUPQEG.js +5 -0
- package/dist/{chunk-YRKAJ42V.js → chunk-QC6GSNIK.js} +7074 -3456
- package/dist/chunk-QCRQNYGI.js +211 -0
- package/dist/chunk-QDF533AW.js +90 -0
- package/dist/chunk-QDGNDNBG.js +50 -0
- package/dist/{chunk-2ULVUSIP.js → chunk-QGMD3PYL.js} +31 -24
- package/dist/{chunk-QEP4HTJE.js → chunk-QLT3WYTD.js} +6 -6
- package/dist/{chunk-GX67TNFA.js → chunk-QNDMAKQS.js} +11 -3
- package/dist/{chunk-XM3JE4QY.js → chunk-QNXMVJMA.js} +8 -8
- package/dist/{chunk-XP5DF5MC.js → chunk-QPAANKUR.js} +13 -12
- package/dist/{chunk-SD3PGZSR.js → chunk-QS4VX3HZ.js} +1 -1
- package/dist/{chunk-ZD64ZR64.js → chunk-QSM4K6LI.js} +7 -7
- package/dist/{chunk-Z4N7BKLN.js → chunk-QUFZDWPC.js} +8 -8
- package/dist/{chunk-ELNLHU7Y.js → chunk-QXXEOH3A.js} +18 -6
- package/dist/{chunk-QA4O2GGC.js → chunk-R4TUWD4C.js} +17 -1
- package/dist/{chunk-TAIYQDIV.js → chunk-ROI64BAI.js} +22 -21
- package/dist/{chunk-NMGFXT4S.js → chunk-RPVL3RTX.js} +19 -18
- package/dist/{chunk-62FMA437.js → chunk-RUNHVUCW.js} +16 -15
- package/dist/{chunk-I2M7MXSV.js → chunk-RWYPLODE.js} +9 -9
- package/dist/{chunk-5K6ZKHZR.js → chunk-RZYRUXSU.js} +4 -4
- package/dist/{chunk-TVFADTAT.js → chunk-S6TLXRBR.js} +7 -7
- package/dist/{chunk-PCZ4C2V7.js → chunk-SCOP3J6X.js} +7 -7
- package/dist/{chunk-JXLUHMTC.js → chunk-SCP24MJX.js} +24 -23
- package/dist/{chunk-R6HJ4SDB.js → chunk-SF3HXNXR.js} +6 -6
- package/dist/{chunk-7F4GZ7U2.js → chunk-SFCFL7Y5.js} +1 -1
- package/dist/{chunk-5RDKQOY3.js → chunk-SHFY73RI.js} +53 -112
- package/dist/{chunk-H75SPCAW.js → chunk-SHIARIEZ.js} +20 -19
- package/dist/chunk-SMFFUFMN.js +1876 -0
- package/dist/{chunk-JQGWP3SC.js → chunk-SVOGRJO6.js} +197 -124
- package/dist/chunk-SVZAAOHJ.js +46 -0
- package/dist/{chunk-BJDVI5W6.js → chunk-SZOU32VF.js} +21 -20
- package/dist/{chunk-MXPKXCGP.js → chunk-T2MN24LZ.js} +1 -1
- package/dist/{chunk-A3AADMM2.js → chunk-TD5WWJLN.js} +6 -6
- package/dist/{chunk-SXF66YNZ.js → chunk-TFN2N227.js} +6 -6
- package/dist/{chunk-RSA5JJMN.js → chunk-TFXNOQEU.js} +28 -27
- package/dist/{chunk-BEDZNT62.js → chunk-TMETWJFO.js} +11 -11
- package/dist/chunk-TNSAIISO.js +50 -0
- package/dist/{chunk-IDTVBZQI.js → chunk-TRJO2I4S.js} +3 -3
- package/dist/{chunk-IFDCCCEN.js → chunk-TRSNIJNM.js} +7 -7
- package/dist/{chunk-GDGE7ZHC.js → chunk-U3Z2QZE3.js} +6 -6
- package/dist/{chunk-GVOQJPKA.js → chunk-U7L3ORPK.js} +22 -21
- package/dist/{chunk-5UJ7C7IH.js → chunk-UDM6HGF4.js} +6 -6
- package/dist/{chunk-Z3KEX7ON.js → chunk-UDM7LXNJ.js} +7 -7
- package/dist/chunk-UDTO3U6E.js +35 -0
- package/dist/{chunk-UVKJVTKX.js → chunk-UEUPEUZX.js} +3 -3
- package/dist/chunk-UWBODTY7.js +514 -0
- package/dist/{chunk-KGT5RIGE.js → chunk-UYYYQTPD.js} +84 -51
- package/dist/{chunk-LKRMVWXB.js → chunk-V34N6JAN.js} +32 -31
- package/dist/{chunk-RX56MZLX.js → chunk-V3Y5P7OS.js} +24 -23
- package/dist/chunk-V6MLVGTP.js +89 -0
- package/dist/chunk-VC2XHC7P.js +424 -0
- package/dist/{chunk-MM5OAVSW.js → chunk-VCYE4MUD.js} +29 -28
- package/dist/{chunk-AGAFNUYZ.js → chunk-VN2VJ6BV.js} +19 -15
- package/dist/{chunk-DBVQEPZB.js → chunk-VVLWEM2Y.js} +6 -6
- package/dist/{chunk-F56DNMDD.js → chunk-VWCNMDMZ.js} +5 -5
- package/dist/{chunk-LNGFTPU7.js → chunk-W2A4NHQD.js} +25 -24
- package/dist/{chunk-LQD3R6NZ.js → chunk-W6OY2PMB.js} +10 -10
- package/dist/{chunk-IP6TSICI.js → chunk-WC6DHBVG.js} +16 -15
- package/dist/{chunk-MELS6T5J.js → chunk-WCA3WIGG.js} +5 -5
- package/dist/{chunk-GLISHJ4G.js → chunk-WJWSB65O.js} +1602 -452
- package/dist/{chunk-77REYYY5.js → chunk-WNPGLGCJ.js} +5 -5
- package/dist/chunk-WTOVWEY3.js +67 -0
- package/dist/{chunk-WS7KBKP4.js → chunk-X5B7KYPD.js} +507 -20
- package/dist/{chunk-O6DJMDBR.js → chunk-X73WLHSN.js} +7 -7
- package/dist/{chunk-YGNQUFVZ.js → chunk-XIIT4PVT.js} +3 -3
- package/dist/{chunk-5P4PNGPL.js → chunk-XLTT5QCX.js} +28 -25
- package/dist/{chunk-NPZ4KXIV.js → chunk-XMIS25ZJ.js} +21 -20
- package/dist/{chunk-NB664KWQ.js → chunk-XPDQ4T6G.js} +27 -26
- package/dist/{chunk-EAGSM3XY.js → chunk-XRWUYOX3.js} +138 -22
- package/dist/{chunk-2VN4TLGI.js → chunk-XZY4GTCX.js} +14 -9
- package/dist/{chunk-QSKY7FE3.js → chunk-Y2TVTI4P.js} +121 -15
- package/dist/{chunk-XVQQ3BQS.js → chunk-Y2U4CSCA.js} +28 -27
- package/dist/chunk-Y2U63JKE.js +41 -0
- package/dist/{chunk-UJ535VWR.js → chunk-Y6S7VCYN.js} +6 -6
- package/dist/{chunk-SEBBJQWK.js → chunk-YAPMGK7E.js} +11 -11
- package/dist/{chunk-CNF7D3A7.js → chunk-YAPVAYZN.js} +3 -3
- package/dist/{chunk-B2U4AOZ5.js → chunk-YCBDNWX3.js} +78 -57
- package/dist/{chunk-CGVRLQAY.js → chunk-YIGSUTW2.js} +1329 -92
- package/dist/{chunk-J65TN6QU.js → chunk-YJTBE6AJ.js} +5 -5
- package/dist/chunk-YQ3IXQIH.js +185 -0
- package/dist/{chunk-ZJQ64T6M.js → chunk-YRHKEXTP.js} +11 -11
- package/dist/{chunk-MN2XDLDM.js → chunk-YSSFS3YC.js} +17 -17
- package/dist/{chunk-BPDS7KUR.js → chunk-YXG2VQJJ.js} +200 -56
- package/dist/{chunk-XC5ZDFW7.js → chunk-Z4GLFTEH.js} +8 -8
- package/dist/{chunk-7X3WLAKP.js → chunk-Z65FWO6A.js} +157 -89
- package/dist/{chunk-OW53P52N.js → chunk-ZDG637ZT.js} +22 -21
- package/dist/{chunk-BIQNPWGX.js → chunk-ZIAMPN7N.js} +6 -6
- package/dist/chunk-ZIIBQHCX.js +53 -0
- package/dist/{chunk-RFQW7XT3.js → chunk-ZJJMYPGZ.js} +57 -27
- package/dist/{chunk-Y6KPWRZJ.js → chunk-ZOAX7W5S.js} +11 -11
- package/dist/chunk-ZSSR5GGB.js +48 -0
- package/dist/files.json +655 -551
- package/dist/fixtures/forge/expected/crosscheck.json +726 -0
- package/dist/fixtures/forge/slots/README.md +13 -0
- package/dist/fixtures/forge/slots/build.json +2686 -0
- package/dist/fixtures/forge/slots/crosscheck/forge-ledger.crosscheck.yaml +8 -0
- package/dist/fixtures/forge/slots/facts/forge-ledger.jsonl +17 -0
- package/dist/fixtures/forge/slots/facts/forge-ledger.meta.json +9 -0
- package/dist/fixtures/forge/slots/legacy/joins.json +113 -0
- package/dist/fixtures/forge/slots/readers/forge-events.json +306 -0
- package/dist/fixtures/forge/slots/readers/forge-gateway.json +238 -0
- package/dist/fixtures/forge/slots/readers/forge-infra.json +264 -0
- package/dist/fixtures/forge/slots/readers/forge-ledger.json +756 -0
- package/dist/fixtures/forge/slots/readers/forge-portal-bff.json +349 -0
- package/dist/fixtures/forge/slots/readers/forge-portal-ui.json +214 -0
- package/dist/fixtures/forge/slots/readers/forge-reports-job.json +258 -0
- package/dist/packages/sdk/npm/index.js +3859 -2939
- package/dist/packages/ui/dist/assets/{elk-api-ts8TigYQ.js → elk-api-CPE6PVL8.js} +2 -2
- package/dist/packages/ui/dist/assets/index-BYcVqj0l.js +65 -0
- package/dist/packages/ui/dist/assets/index-DF52Ejvz.css +1 -0
- package/dist/packages/ui/dist/index.html +2 -2
- package/package.json +5 -5
- package/dist/chunk-24OXGB3P.js +0 -82
- package/dist/chunk-2RABF6RT.js +0 -36
- package/dist/chunk-5CPZIWIN.js +0 -38
- package/dist/chunk-7YSMZEO3.js +0 -55
- package/dist/chunk-AENMOZMM.js +0 -42
- package/dist/chunk-BDKYHCGI.js +0 -71
- package/dist/chunk-BMMTWRWE.js +0 -50
- package/dist/chunk-CQRFCWQV.js +0 -45
- package/dist/chunk-CVWKS6GO.js +0 -50
- package/dist/chunk-D2CGJ7RR.js +0 -46
- package/dist/chunk-D7QIZLWB.js +0 -38
- package/dist/chunk-DM3H4V2G.js +0 -62
- package/dist/chunk-EJGUEUXG.js +0 -51
- package/dist/chunk-ELKTDXV3.js +0 -67
- package/dist/chunk-EP7ZBZLT.js +0 -170
- package/dist/chunk-EXGXCVWC.js +0 -52
- package/dist/chunk-FJS2FZFZ.js +0 -41
- package/dist/chunk-G3ZFEHCX.js +0 -925
- package/dist/chunk-GAU2IFIC.js +0 -33
- package/dist/chunk-GPOL5H3B.js +0 -55
- package/dist/chunk-HD72AL3L.js +0 -43
- package/dist/chunk-K4C2DWOZ.js +0 -232
- package/dist/chunk-KY3BUZYI.js +0 -54
- package/dist/chunk-LMNCRSER.js +0 -257
- package/dist/chunk-LPXH2DA4.js +0 -40
- package/dist/chunk-MLUHBVCI.js +0 -45
- package/dist/chunk-ONB7M2AF.js +0 -52
- package/dist/chunk-QBK33722.js +0 -51
- package/dist/chunk-S7I7SLZN.js +0 -59
- package/dist/chunk-UCQB6NKS.js +0 -192
- package/dist/chunk-UKMA5JFE.js +0 -52
- package/dist/chunk-X7QLAUNS.js +0 -47
- package/dist/packages/ui/dist/assets/index-CIfmX7DJ.css +0 -1
- package/dist/packages/ui/dist/assets/index-DNtpSfZS.js +0 -63
package/dist/chunk-G3ZFEHCX.js
DELETED
|
@@ -1,925 +0,0 @@
|
|
|
1
|
-
import { createRequire as __atticusCreateRequire } from "node:module";
|
|
2
|
-
import { fileURLToPath as __atticusFileURLToPath } from "node:url";
|
|
3
|
-
var require = __atticusCreateRequire(import.meta.url);
|
|
4
|
-
var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
5
|
-
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
|
-
import {
|
|
7
|
-
keptFilesMayHaveChanged
|
|
8
|
-
} from "./chunk-CTJHEG6A.js";
|
|
9
|
-
|
|
10
|
-
// packages/core/dist/fs.js
|
|
11
|
-
import { randomBytes } from "node:crypto";
|
|
12
|
-
import { link, mkdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
13
|
-
import { hostname } from "node:os";
|
|
14
|
-
import { basename, dirname, join, resolve } from "node:path";
|
|
15
|
-
async function writeFileAtomic(path, data) {
|
|
16
|
-
await mkdir(dirname(path), { recursive: true });
|
|
17
|
-
const tmp = `${path}.${process.pid}.${randomBytes(4).toString("hex")}.tmp`;
|
|
18
|
-
try {
|
|
19
|
-
await writeFile(tmp, data, typeof data === "string" ? "utf8" : void 0);
|
|
20
|
-
await renameRetrying(tmp, path);
|
|
21
|
-
} catch (e) {
|
|
22
|
-
await rm(tmp, { force: true });
|
|
23
|
-
throw e;
|
|
24
|
-
} finally {
|
|
25
|
-
keptFilesMayHaveChanged(path);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
var FileChangedError = class extends Error {
|
|
29
|
-
path;
|
|
30
|
-
constructor(path) {
|
|
31
|
-
super(`${path} changed since it was read (another edit, or a person's): nothing was written. Read it again and redo the change.`);
|
|
32
|
-
this.path = path;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var writing = /* @__PURE__ */ new Map();
|
|
36
|
-
function writeFileIfUnchanged(path, before, data) {
|
|
37
|
-
const key = resolve(path);
|
|
38
|
-
const prev = writing.get(key) ?? Promise.resolve();
|
|
39
|
-
const work = async () => {
|
|
40
|
-
const now = await readFile(path, "utf8").catch(() => void 0);
|
|
41
|
-
if (now !== before)
|
|
42
|
-
throw new FileChangedError(path);
|
|
43
|
-
await writeFileAtomic(path, data);
|
|
44
|
-
};
|
|
45
|
-
const next = prev.then(work, work);
|
|
46
|
-
const tail = next.catch(() => void 0);
|
|
47
|
-
writing.set(key, tail);
|
|
48
|
-
void tail.then(() => {
|
|
49
|
-
if (writing.get(key) === tail)
|
|
50
|
-
writing.delete(key);
|
|
51
|
-
});
|
|
52
|
-
return next;
|
|
53
|
-
}
|
|
54
|
-
var BUSY = /* @__PURE__ */ new Set(["EPERM", "EBUSY", "EACCES"]);
|
|
55
|
-
async function renameRetrying(from, to, tries = 9) {
|
|
56
|
-
for (let i = 0; ; i++) {
|
|
57
|
-
try {
|
|
58
|
-
await rename(from, to);
|
|
59
|
-
return;
|
|
60
|
-
} catch (e) {
|
|
61
|
-
const code = e.code ?? "";
|
|
62
|
-
if (!BUSY.has(code) || i >= tries - 1)
|
|
63
|
-
throw e;
|
|
64
|
-
await new Promise((r) => setTimeout(r, 20 * 2 ** i));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
var LockHeldError = class extends Error {
|
|
69
|
-
held;
|
|
70
|
-
file;
|
|
71
|
-
constructor(held, file) {
|
|
72
|
-
super(`Another ${held.what} is running (process ${held.pid} on ${held.host}, since ${held.startedAt}). Wait for it to finish${file ? `; if nothing is running, delete ${file}` : ""}.`);
|
|
73
|
-
this.held = held;
|
|
74
|
-
this.file = file;
|
|
75
|
-
this.name = "LockHeldError";
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
var heldHere = /* @__PURE__ */ new Set();
|
|
79
|
-
var lockFileOf = (root, name) => join(root, ".atticus", "locks", `${name}.json`);
|
|
80
|
-
function alive(pid) {
|
|
81
|
-
try {
|
|
82
|
-
process.kill(pid, 0);
|
|
83
|
-
return true;
|
|
84
|
-
} catch (e) {
|
|
85
|
-
return e.code === "EPERM";
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
async function readLock(root, name, o = {}) {
|
|
89
|
-
try {
|
|
90
|
-
const file = lockFileOf(root, name);
|
|
91
|
-
const info = JSON.parse(await readFile(file, "utf8"));
|
|
92
|
-
const here = info.host === hostname();
|
|
93
|
-
const age = (o.now ?? (() => /* @__PURE__ */ new Date()))().getTime() - Date.parse(info.startedAt);
|
|
94
|
-
const stale = here && (!alive(info.pid) || info.pid === process.pid && !heldHere.has(file)) || o.maxAgeMs !== void 0 && Number.isFinite(age) && age > o.maxAgeMs;
|
|
95
|
-
return { ...info, stale };
|
|
96
|
-
} catch {
|
|
97
|
-
return void 0;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
async function acquireLock(root, name, what, now = () => /* @__PURE__ */ new Date(), o = {}) {
|
|
101
|
-
const file = lockFileOf(root, name);
|
|
102
|
-
await ensureLocalIgnore(root);
|
|
103
|
-
await mkdir(dirname(file), { recursive: true });
|
|
104
|
-
const info = {
|
|
105
|
-
pid: process.pid,
|
|
106
|
-
host: hostname(),
|
|
107
|
-
startedAt: now().toISOString(),
|
|
108
|
-
what
|
|
109
|
-
};
|
|
110
|
-
let interrupted;
|
|
111
|
-
for (let attempt = 0; attempt < 2; attempt++) {
|
|
112
|
-
try {
|
|
113
|
-
await writeFile(file, JSON.stringify(info), { encoding: "utf8", flag: "wx" });
|
|
114
|
-
heldHere.add(file);
|
|
115
|
-
const release = async () => {
|
|
116
|
-
const cur = await readLock(root, name);
|
|
117
|
-
if (cur && cur.pid === info.pid && cur.startedAt === info.startedAt)
|
|
118
|
-
await rm(file, { force: true });
|
|
119
|
-
heldHere.delete(file);
|
|
120
|
-
};
|
|
121
|
-
return interrupted ? { release, interrupted } : { release };
|
|
122
|
-
} catch (e) {
|
|
123
|
-
if (e.code !== "EEXIST")
|
|
124
|
-
throw e;
|
|
125
|
-
const held = await readLock(root, name, { ...o, now });
|
|
126
|
-
if (held && !held.stale)
|
|
127
|
-
throw new LockHeldError(held, file);
|
|
128
|
-
if (held) {
|
|
129
|
-
const { stale: _s, ...rest } = held;
|
|
130
|
-
interrupted = rest;
|
|
131
|
-
}
|
|
132
|
-
await rm(file, { force: true });
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
throw new Error(`Couldn't take the ${name} lock at ${file}.`);
|
|
136
|
-
}
|
|
137
|
-
var sharedLockFileOf = (path) => `${path}.lock`;
|
|
138
|
-
var sharing = /* @__PURE__ */ new Map();
|
|
139
|
-
var sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
140
|
-
var QUICK_WRITE_LOCK = { maxAgeMs: 12e4 };
|
|
141
|
-
function withSharedFileLock(path, work, o = {}) {
|
|
142
|
-
const key = resolve(path);
|
|
143
|
-
const prev = sharing.get(key) ?? Promise.resolve();
|
|
144
|
-
const run = async () => {
|
|
145
|
-
const release = await takeSharedLock(key, o);
|
|
146
|
-
try {
|
|
147
|
-
return await work();
|
|
148
|
-
} finally {
|
|
149
|
-
await release();
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
const next = prev.then(run, run);
|
|
153
|
-
const tail = next.catch(() => void 0);
|
|
154
|
-
sharing.set(key, tail);
|
|
155
|
-
void tail.then(() => {
|
|
156
|
-
if (sharing.get(key) === tail)
|
|
157
|
-
sharing.delete(key);
|
|
158
|
-
});
|
|
159
|
-
return next;
|
|
160
|
-
}
|
|
161
|
-
async function takeSharedLock(path, o) {
|
|
162
|
-
const file = sharedLockFileOf(path);
|
|
163
|
-
const staleMs = o.staleMs ?? 1e4;
|
|
164
|
-
const waitMs = o.waitMs ?? 15e3;
|
|
165
|
-
const info = {
|
|
166
|
-
pid: process.pid,
|
|
167
|
-
host: hostname(),
|
|
168
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
169
|
-
what: o.what ?? `write of ${basename(path)}`,
|
|
170
|
-
token: randomBytes(8).toString("hex")
|
|
171
|
-
};
|
|
172
|
-
await mkdir(dirname(file), { recursive: true });
|
|
173
|
-
const start = Date.now();
|
|
174
|
-
let delay = 5;
|
|
175
|
-
for (; ; ) {
|
|
176
|
-
let code;
|
|
177
|
-
try {
|
|
178
|
-
await writeFile(file, JSON.stringify(info), { encoding: "utf8", flag: "wx" });
|
|
179
|
-
return () => releaseShared(file, info.token);
|
|
180
|
-
} catch (e) {
|
|
181
|
-
code = e.code ?? "";
|
|
182
|
-
if (code !== "EEXIST" && !BUSY.has(code))
|
|
183
|
-
throw e;
|
|
184
|
-
}
|
|
185
|
-
let held;
|
|
186
|
-
if (code === "EEXIST") {
|
|
187
|
-
const seen = await readFile(file, "utf8").catch(() => void 0);
|
|
188
|
-
if (seen === void 0)
|
|
189
|
-
continue;
|
|
190
|
-
held = parseLockInfo(seen);
|
|
191
|
-
if (await isStaleShared(file, held, staleMs, o.maxAgeMs)) {
|
|
192
|
-
await takeOver(file, seen, info.token);
|
|
193
|
-
continue;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
if (Date.now() - start > waitMs)
|
|
197
|
-
throw new LockHeldError(held ?? { pid: 0, host: "?", startedAt: "?", what: `write of ${basename(path)}` }, file);
|
|
198
|
-
await sleep(delay + Math.floor(Math.random() * delay));
|
|
199
|
-
delay = Math.min(delay * 2, 100);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
function parseLockInfo(text) {
|
|
203
|
-
try {
|
|
204
|
-
const j = JSON.parse(text);
|
|
205
|
-
return typeof j.pid === "number" && typeof j.startedAt === "string" ? {
|
|
206
|
-
pid: j.pid,
|
|
207
|
-
host: String(j.host ?? ""),
|
|
208
|
-
startedAt: j.startedAt,
|
|
209
|
-
what: String(j.what ?? "")
|
|
210
|
-
} : void 0;
|
|
211
|
-
} catch {
|
|
212
|
-
return void 0;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
async function isStaleShared(file, held, staleMs, maxAgeMs) {
|
|
216
|
-
if (held && maxAgeMs !== void 0) {
|
|
217
|
-
const since2 = Date.parse(held.startedAt);
|
|
218
|
-
if (Number.isFinite(since2) && Date.now() - since2 > maxAgeMs)
|
|
219
|
-
return true;
|
|
220
|
-
}
|
|
221
|
-
if (held && held.host === hostname() && held.pid !== process.pid)
|
|
222
|
-
return !alive(held.pid);
|
|
223
|
-
const since = held ? Date.parse(held.startedAt) : await stat(file).then((s) => s.mtimeMs, () => NaN);
|
|
224
|
-
return Number.isFinite(since) && Date.now() - since > staleMs;
|
|
225
|
-
}
|
|
226
|
-
async function takeOver(file, seen, token) {
|
|
227
|
-
const aside = `${file}.${token}.stale`;
|
|
228
|
-
try {
|
|
229
|
-
await rename(file, aside);
|
|
230
|
-
} catch {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
const moved = await readFile(aside, "utf8").catch(() => void 0);
|
|
234
|
-
if (moved !== void 0 && moved !== seen)
|
|
235
|
-
await link(aside, file).catch(() => void 0);
|
|
236
|
-
await rmRetrying(aside);
|
|
237
|
-
}
|
|
238
|
-
async function releaseShared(file, token) {
|
|
239
|
-
const now = await readFile(file, "utf8").catch(() => void 0);
|
|
240
|
-
if (now === void 0)
|
|
241
|
-
return;
|
|
242
|
-
try {
|
|
243
|
-
if (JSON.parse(now).token !== token)
|
|
244
|
-
return;
|
|
245
|
-
} catch {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
await rmRetrying(file);
|
|
249
|
-
}
|
|
250
|
-
async function rmRetrying(file, tries = 9) {
|
|
251
|
-
for (let i = 0; ; i++) {
|
|
252
|
-
try {
|
|
253
|
-
await rm(file, { force: true });
|
|
254
|
-
return;
|
|
255
|
-
} catch (e) {
|
|
256
|
-
const code = e.code ?? "";
|
|
257
|
-
if (!BUSY.has(code) || i >= tries - 1)
|
|
258
|
-
throw e;
|
|
259
|
-
await sleep(20 * 2 ** i);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
var LOCAL_ONLY = [
|
|
264
|
-
"me.yaml",
|
|
265
|
-
"logs/",
|
|
266
|
-
"locks/",
|
|
267
|
-
"backups/",
|
|
268
|
-
"history/",
|
|
269
|
-
"probe/",
|
|
270
|
-
"cache/",
|
|
271
|
-
// ADR 0161: where `atticus map --all` is in the estate, so running it again resumes.
|
|
272
|
-
"map-all/"
|
|
273
|
-
];
|
|
274
|
-
async function ensureLocalIgnore(root) {
|
|
275
|
-
const file = join(root, ".atticus", ".gitignore");
|
|
276
|
-
const text = await readFile(file, "utf8").catch(() => "");
|
|
277
|
-
const have = new Set(text.split(/\r?\n/).map((l) => l.trim()));
|
|
278
|
-
const missing = LOCAL_ONLY.filter((l) => !have.has(l));
|
|
279
|
-
if (!missing.length)
|
|
280
|
-
return;
|
|
281
|
-
const prefix = text && !text.endsWith("\n") ? `${text}
|
|
282
|
-
` : text;
|
|
283
|
-
await writeFileAtomic(file, `${prefix}${prefix ? "" : "# This machine's own files: never committed.\n"}${missing.join("\n")}
|
|
284
|
-
`);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// packages/core/dist/log.js
|
|
288
|
-
import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
289
|
-
import { homedir, userInfo } from "node:os";
|
|
290
|
-
import { join as join2 } from "node:path";
|
|
291
|
-
var ORDER = { debug: 10, info: 20, warn: 30, error: 40, off: 100 };
|
|
292
|
-
var LOG_MAX_BYTES = 5 * 1024 * 1024;
|
|
293
|
-
var LOG_KEEP = 3;
|
|
294
|
-
var logFileOf = (root) => join2(root, ".atticus", "logs", "atticus.log");
|
|
295
|
-
var SECRET_KEY = /(token|password|passwd|pwd|secret|api[-_]?key|private[-_]?key|credential|authorization|cookie|session)/i;
|
|
296
|
-
function redactText(s, o = {}) {
|
|
297
|
-
let out = s.replace(/([a-z][a-z0-9+.-]*:\/\/)[^/@\s:]+:[^/@\s]+@/gi, "$1***@").replace(/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi, "$1 ***").replace(new RegExp(`(${SECRET_KEY.source})(["']?\\s*[:=]\\s*["']?)([^\\s"',;&]+)`, "gi"), "$1$3***").replace(/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{5,}/g, "***").replace(/\b(?=[A-Za-z0-9+_-]*\d)(?=[A-Za-z0-9+_-]*[A-Z])(?=[A-Za-z0-9+_-]*[a-z])[A-Za-z0-9+_-]{32,}={0,2}/g, "***");
|
|
298
|
-
const home = o.home ?? safeHome();
|
|
299
|
-
if (home && home.length > 3)
|
|
300
|
-
out = out.split(home).join("~");
|
|
301
|
-
const user = o.user ?? safeUser();
|
|
302
|
-
if (user && user.length > 2)
|
|
303
|
-
out = out.replace(new RegExp(`([\\\\/])${escapeRe(user)}(?=[\\\\/])`, "g"), "$1<user>");
|
|
304
|
-
return out;
|
|
305
|
-
}
|
|
306
|
-
function redact(v, o = {}) {
|
|
307
|
-
if (typeof v === "string")
|
|
308
|
-
return redactText(v, o);
|
|
309
|
-
if (Array.isArray(v))
|
|
310
|
-
return v.map((x) => redact(x, o));
|
|
311
|
-
if (v && typeof v === "object") {
|
|
312
|
-
const out = {};
|
|
313
|
-
for (const [k, x] of Object.entries(v))
|
|
314
|
-
out[k] = SECRET_KEY.test(k) ? "***" : redact(x, o);
|
|
315
|
-
return out;
|
|
316
|
-
}
|
|
317
|
-
return v;
|
|
318
|
-
}
|
|
319
|
-
var escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
320
|
-
function safeHome() {
|
|
321
|
-
try {
|
|
322
|
-
return homedir();
|
|
323
|
-
} catch {
|
|
324
|
-
return void 0;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
function safeUser() {
|
|
328
|
-
try {
|
|
329
|
-
return userInfo().username;
|
|
330
|
-
} catch {
|
|
331
|
-
return void 0;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
function rotate(file, max, keep) {
|
|
335
|
-
try {
|
|
336
|
-
if (statSync(file).size < max)
|
|
337
|
-
return;
|
|
338
|
-
} catch {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
rmSync(`${file}.${keep}`, { force: true });
|
|
342
|
-
for (let i = keep - 1; i >= 1; i--) {
|
|
343
|
-
try {
|
|
344
|
-
renameSync(`${file}.${i}`, `${file}.${i + 1}`);
|
|
345
|
-
} catch {
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
try {
|
|
349
|
-
renameSync(file, `${file}.1`);
|
|
350
|
-
} catch {
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
function logLevelFrom(env = process.env) {
|
|
354
|
-
const v = (env.ATTICUS_LOG ?? "").toLowerCase();
|
|
355
|
-
return v in ORDER ? v : "info";
|
|
356
|
-
}
|
|
357
|
-
function createLog(root, o = {}) {
|
|
358
|
-
const file = logFileOf(root);
|
|
359
|
-
const level = o.level ?? logLevelFrom();
|
|
360
|
-
const now = o.now ?? (() => /* @__PURE__ */ new Date());
|
|
361
|
-
const write = (lvl, event, fields) => {
|
|
362
|
-
if (ORDER[lvl] < ORDER[level])
|
|
363
|
-
return;
|
|
364
|
-
try {
|
|
365
|
-
mkdirSync(join2(file, ".."), { recursive: true });
|
|
366
|
-
ignoreLocalSync(root);
|
|
367
|
-
rotate(file, o.maxBytes ?? LOG_MAX_BYTES, o.keep ?? LOG_KEEP);
|
|
368
|
-
const entry = redact({ at: now().toISOString(), level: lvl, event, ...fields });
|
|
369
|
-
appendFileSync(file, `${JSON.stringify(entry)}
|
|
370
|
-
`, "utf8");
|
|
371
|
-
} catch {
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
return {
|
|
375
|
-
file,
|
|
376
|
-
debug: (e, f = {}) => write("debug", e, f),
|
|
377
|
-
info: (e, f = {}) => write("info", e, f),
|
|
378
|
-
warn: (e, f = {}) => write("warn", e, f),
|
|
379
|
-
error: (e, err, f = {}) => write("error", e, {
|
|
380
|
-
...f,
|
|
381
|
-
error: err instanceof Error ? { name: err.name, message: err.message, stack: err.stack?.split("\n").slice(0, 25) } : { message: String(err) }
|
|
382
|
-
})
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
function ignoreLocalSync(root) {
|
|
386
|
-
const f = join2(root, ".atticus", ".gitignore");
|
|
387
|
-
const text = existsSync(f) ? readFileSync(f, "utf8") : "";
|
|
388
|
-
const have = new Set(text.split(/\r?\n/).map((l) => l.trim()));
|
|
389
|
-
const missing = LOCAL_ONLY.filter((l) => !have.has(l));
|
|
390
|
-
if (!missing.length)
|
|
391
|
-
return;
|
|
392
|
-
const prefix = text && !text.endsWith("\n") ? `${text}
|
|
393
|
-
` : text;
|
|
394
|
-
const head = prefix ? "" : "# This machine's own files: never committed.\n";
|
|
395
|
-
writeFileSync(f, `${prefix}${head}${missing.join("\n")}
|
|
396
|
-
`, "utf8");
|
|
397
|
-
}
|
|
398
|
-
var NO_LOG = {
|
|
399
|
-
file: "",
|
|
400
|
-
debug: () => void 0,
|
|
401
|
-
info: () => void 0,
|
|
402
|
-
warn: () => void 0,
|
|
403
|
-
error: () => void 0
|
|
404
|
-
};
|
|
405
|
-
|
|
406
|
-
// packages/core/dist/run-log.js
|
|
407
|
-
import { createHash, randomBytes as randomBytes2 } from "node:crypto";
|
|
408
|
-
import { appendFileSync as appendFileSync2, closeSync, mkdirSync as mkdirSync2, openSync, readdirSync, readFileSync as readFileSync2, readSync, renameSync as renameSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
409
|
-
import { hostname as hostname2 } from "node:os";
|
|
410
|
-
import { join as join3 } from "node:path";
|
|
411
|
-
var RUN_LOG_KEEP = 50;
|
|
412
|
-
var RUN_LOG_MAX_BYTES = 2 * 1024 * 1024;
|
|
413
|
-
var RUN_LOG_LINE_MAX = 4e3;
|
|
414
|
-
var RUN_LOG_READ_MAX = 5e3;
|
|
415
|
-
var RUN_HEARTBEAT_MS = 3e4;
|
|
416
|
-
var RUN_SILENT_MS = 5 * 60 * 1e3;
|
|
417
|
-
var TERMINAL_RUN_ID = /^\d{8}-\d{6}-\d{1,10}-[0-9a-f]{4}$/;
|
|
418
|
-
var runLogsDirOf = (root) => join3(root, ".atticus", "logs", "runs");
|
|
419
|
-
var runningDirOf = (root) => join3(root, ".atticus", "logs", "running");
|
|
420
|
-
var RECORDED = {
|
|
421
|
-
map: true,
|
|
422
|
-
scan: true,
|
|
423
|
-
verify: true,
|
|
424
|
-
upgrade: true,
|
|
425
|
-
reconcile: true,
|
|
426
|
-
"run-ready": true,
|
|
427
|
-
workspace: /* @__PURE__ */ new Set(["sync", "bring-in", "open"]),
|
|
428
|
-
task: /* @__PURE__ */ new Set(["run", "run-ready"]),
|
|
429
|
-
knowledge: /* @__PURE__ */ new Set(["scan"]),
|
|
430
|
-
handoff: /* @__PURE__ */ new Set(["done"]),
|
|
431
|
-
index: /* @__PURE__ */ new Set(["rebuild", "embed"])
|
|
432
|
-
};
|
|
433
|
-
var NOT_RECORDED_FLAGS = /* @__PURE__ */ new Set(["help", "version", "check", "dry-run"]);
|
|
434
|
-
var QUICK = /* @__PURE__ */ new Set(["map render", "verify audit", "scan review"]);
|
|
435
|
-
function recordedCommand(positionals, flags) {
|
|
436
|
-
const [group, command] = positionals;
|
|
437
|
-
if (!group || flags.some((f) => NOT_RECORDED_FLAGS.has(f)))
|
|
438
|
-
return false;
|
|
439
|
-
if (command && QUICK.has(`${group} ${command}`))
|
|
440
|
-
return false;
|
|
441
|
-
const rule = RECORDED[group];
|
|
442
|
-
if (rule === true)
|
|
443
|
-
return true;
|
|
444
|
-
return !!rule && !!command && rule.has(command);
|
|
445
|
-
}
|
|
446
|
-
var ID_WORD = /^[A-Za-z0-9][A-Za-z0-9._/-]{0,99}$/;
|
|
447
|
-
var MAX_WORDS = 8;
|
|
448
|
-
var safeWord = (w) => ID_WORD.test(w) && !w.includes("//") && redactText(w, { home: "", user: "" }) === w ? w : "\u2026";
|
|
449
|
-
function runTitle(positionals, flags) {
|
|
450
|
-
const command = positionals.slice(0, MAX_WORDS).map(safeWord);
|
|
451
|
-
const names = flags.filter((f) => /^[a-z][a-z0-9-]{0,40}$/.test(f)).map((f) => `--${f}`);
|
|
452
|
-
return { command, title: ["atticus", ...command, ...names].join(" ") };
|
|
453
|
-
}
|
|
454
|
-
function startedByOf(env = process.env) {
|
|
455
|
-
if (env.ATTICUS_ACP_SESSION)
|
|
456
|
-
return "copilot";
|
|
457
|
-
const said = env.ATTICUS_STARTED_BY;
|
|
458
|
-
if (said === "vscode" || said === "intellij" || said === "terminal")
|
|
459
|
-
return said;
|
|
460
|
-
if (env.TERM_PROGRAM === "vscode")
|
|
461
|
-
return "vscode";
|
|
462
|
-
if ((env.TERMINAL_EMULATOR ?? "").startsWith("JetBrains"))
|
|
463
|
-
return "intellij";
|
|
464
|
-
return "terminal";
|
|
465
|
-
}
|
|
466
|
-
var hostHash = () => {
|
|
467
|
-
try {
|
|
468
|
-
return createHash("sha256").update(hostname2()).digest("hex").slice(0, 12);
|
|
469
|
-
} catch {
|
|
470
|
-
return "unknown";
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
function procStartOf(pid) {
|
|
474
|
-
if (process.platform !== "linux")
|
|
475
|
-
return void 0;
|
|
476
|
-
try {
|
|
477
|
-
const stat2 = readFileSync2(`/proc/${pid}/stat`, "utf8");
|
|
478
|
-
const v = stat2.slice(stat2.lastIndexOf(")") + 2).split(" ")[19];
|
|
479
|
-
return v && /^\d+$/.test(v) ? v : void 0;
|
|
480
|
-
} catch {
|
|
481
|
-
return void 0;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
var pad = (n, w = 2) => String(n).padStart(w, "0");
|
|
485
|
-
var idAt = (d, pid) => `${d.getUTCFullYear()}${pad(d.getUTCMonth() + 1)}${pad(d.getUTCDate())}-${pad(d.getUTCHours())}${pad(d.getUTCMinutes())}${pad(d.getUTCSeconds())}-${pid}-${randomBytes2(2).toString("hex")}`;
|
|
486
|
-
var ANSI = /\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b\][^\u0007]*\u0007/g;
|
|
487
|
-
function runLogLines(text, o = {}) {
|
|
488
|
-
return text.replace(ANSI, "").split(/\r?\n|\r/).map((l) => {
|
|
489
|
-
const r = redactText(l, o);
|
|
490
|
-
return r.length > RUN_LOG_LINE_MAX ? `${r.slice(0, RUN_LOG_LINE_MAX)}\u2026` : r;
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
var writeJson = (file, v) => {
|
|
494
|
-
const text = `${JSON.stringify(v, null, 2)}
|
|
495
|
-
`;
|
|
496
|
-
const tmp = `${file}.${process.pid}.tmp`;
|
|
497
|
-
try {
|
|
498
|
-
writeFileSync2(tmp, text, "utf8");
|
|
499
|
-
renameSync2(tmp, file);
|
|
500
|
-
} catch {
|
|
501
|
-
rmSync2(tmp, { force: true });
|
|
502
|
-
writeFileSync2(file, text, "utf8");
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
function prune(root, keep, live) {
|
|
506
|
-
let names;
|
|
507
|
-
try {
|
|
508
|
-
names = readdirSync(runningDirOf(root)).filter((n) => n.endsWith(".json") && TERMINAL_RUN_ID.test(n.slice(0, -5))).sort();
|
|
509
|
-
} catch {
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
const removed = /* @__PURE__ */ new Set();
|
|
513
|
-
let over = names.length - keep;
|
|
514
|
-
for (const n of names) {
|
|
515
|
-
if (over <= 0)
|
|
516
|
-
break;
|
|
517
|
-
const id = n.slice(0, -5);
|
|
518
|
-
if (live(id))
|
|
519
|
-
continue;
|
|
520
|
-
rmSync2(join3(runningDirOf(root), n), { force: true });
|
|
521
|
-
rmSync2(join3(runLogsDirOf(root), `${id}.log`), { force: true });
|
|
522
|
-
removed.add(id);
|
|
523
|
-
over--;
|
|
524
|
-
}
|
|
525
|
-
try {
|
|
526
|
-
const kept = new Set(names.map((n) => n.slice(0, -5)).filter((id) => !removed.has(id)));
|
|
527
|
-
for (const n of readdirSync(runLogsDirOf(root)))
|
|
528
|
-
if (n.endsWith(".log") && TERMINAL_RUN_ID.test(n.slice(0, -4)) && !kept.has(n.slice(0, -4)))
|
|
529
|
-
rmSync2(join3(runLogsDirOf(root), n), { force: true });
|
|
530
|
-
} catch {
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
function startTerminalRun(root, o) {
|
|
534
|
-
const now = o.now ?? (() => /* @__PURE__ */ new Date());
|
|
535
|
-
const pid = o.pid ?? process.pid;
|
|
536
|
-
const keep = Math.max(o.keep ?? RUN_LOG_KEEP, 1);
|
|
537
|
-
const maxBytes = Math.max(o.maxBytes ?? RUN_LOG_MAX_BYTES, 256);
|
|
538
|
-
const started = now();
|
|
539
|
-
const runId = idAt(started, pid);
|
|
540
|
-
const heartbeatMs = o.heartbeatMs ?? (o.hookProcess ? RUN_HEARTBEAT_MS : void 0);
|
|
541
|
-
const procStart = o.procStart ? o.procStart() : pid === process.pid ? procStartOf(pid) : void 0;
|
|
542
|
-
const { command, title } = runTitle(o.positionals, o.flags);
|
|
543
|
-
const rec = {
|
|
544
|
-
schemaVersion: 1,
|
|
545
|
-
runId,
|
|
546
|
-
pid,
|
|
547
|
-
host: hostHash(),
|
|
548
|
-
title,
|
|
549
|
-
command,
|
|
550
|
-
flags: o.flags.filter((f) => /^[a-z][a-z0-9-]{0,40}$/.test(f)),
|
|
551
|
-
startedBy: startedByOf(o.env),
|
|
552
|
-
startedAt: started.toISOString(),
|
|
553
|
-
state: "running",
|
|
554
|
-
lines: 0,
|
|
555
|
-
dropped: 0,
|
|
556
|
-
...procStart ? { procStart } : {},
|
|
557
|
-
...heartbeatMs ? { beatAt: started.toISOString() } : {}
|
|
558
|
-
};
|
|
559
|
-
const jsonFile = join3(runningDirOf(root), `${runId}.json`);
|
|
560
|
-
const logFile = join3(runLogsDirOf(root), `${runId}.log`);
|
|
561
|
-
try {
|
|
562
|
-
mkdirSync2(runningDirOf(root), { recursive: true });
|
|
563
|
-
mkdirSync2(runLogsDirOf(root), { recursive: true });
|
|
564
|
-
ignoreLocalSync(root);
|
|
565
|
-
const alive2 = o.alive ?? pidAlive;
|
|
566
|
-
prune(root, keep - 1, (id) => {
|
|
567
|
-
const r = readRecord(root, id);
|
|
568
|
-
return !!r && r.state === "running" && !goneRun(r, rec.host, alive2, now().getTime(), root);
|
|
569
|
-
});
|
|
570
|
-
writeFileSync2(logFile, "", "utf8");
|
|
571
|
-
writeJson(jsonFile, rec);
|
|
572
|
-
} catch {
|
|
573
|
-
return void 0;
|
|
574
|
-
}
|
|
575
|
-
let bytes = 0;
|
|
576
|
-
let inFile = 0;
|
|
577
|
-
let ended = false;
|
|
578
|
-
let broken = false;
|
|
579
|
-
const save = () => {
|
|
580
|
-
try {
|
|
581
|
-
if (heartbeatMs && !ended)
|
|
582
|
-
rec.beatAt = now().toISOString();
|
|
583
|
-
writeJson(jsonFile, { ...rec, lines: rec.dropped + inFile });
|
|
584
|
-
} catch {
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
const trim = () => {
|
|
588
|
-
const all = readFileSync2(logFile, "utf8").split("\n");
|
|
589
|
-
if (all.at(-1) === "")
|
|
590
|
-
all.pop();
|
|
591
|
-
let size = 0;
|
|
592
|
-
let at = all.length;
|
|
593
|
-
while (at > 0 && size + Buffer.byteLength(all[at - 1]) + 1 <= maxBytes / 2) {
|
|
594
|
-
size += Buffer.byteLength(all[at - 1]) + 1;
|
|
595
|
-
at--;
|
|
596
|
-
}
|
|
597
|
-
const kept = all.slice(at);
|
|
598
|
-
const tmp = `${logFile}.${process.pid}.tmp`;
|
|
599
|
-
const text = kept.length ? `${kept.join("\n")}
|
|
600
|
-
` : "";
|
|
601
|
-
try {
|
|
602
|
-
writeFileSync2(tmp, text, "utf8");
|
|
603
|
-
renameSync2(tmp, logFile);
|
|
604
|
-
} catch {
|
|
605
|
-
rmSync2(tmp, { force: true });
|
|
606
|
-
writeFileSync2(logFile, text, "utf8");
|
|
607
|
-
}
|
|
608
|
-
rec.dropped += at;
|
|
609
|
-
inFile = kept.length;
|
|
610
|
-
bytes = size;
|
|
611
|
-
save();
|
|
612
|
-
};
|
|
613
|
-
const unhook = [];
|
|
614
|
-
if (heartbeatMs) {
|
|
615
|
-
const beat = setInterval(() => {
|
|
616
|
-
if (!ended)
|
|
617
|
-
save();
|
|
618
|
-
}, heartbeatMs);
|
|
619
|
-
beat.unref?.();
|
|
620
|
-
unhook.push(() => clearInterval(beat));
|
|
621
|
-
}
|
|
622
|
-
const recorder = {
|
|
623
|
-
runId,
|
|
624
|
-
line(text) {
|
|
625
|
-
if (ended || broken)
|
|
626
|
-
return;
|
|
627
|
-
try {
|
|
628
|
-
for (const l of runLogLines(text, o.redact)) {
|
|
629
|
-
const s = `${l}
|
|
630
|
-
`;
|
|
631
|
-
const n = Buffer.byteLength(s);
|
|
632
|
-
if (bytes + n > maxBytes)
|
|
633
|
-
trim();
|
|
634
|
-
appendFileSync2(logFile, s, "utf8");
|
|
635
|
-
bytes += n;
|
|
636
|
-
inFile++;
|
|
637
|
-
}
|
|
638
|
-
} catch {
|
|
639
|
-
broken = true;
|
|
640
|
-
}
|
|
641
|
-
},
|
|
642
|
-
end(code, how) {
|
|
643
|
-
if (ended)
|
|
644
|
-
return;
|
|
645
|
-
ended = true;
|
|
646
|
-
for (const u of unhook)
|
|
647
|
-
u();
|
|
648
|
-
rec.state = how === "crash" ? "failed" : code === 0 ? "done" : code === 130 || code === 143 ? "cancelled" : "failed";
|
|
649
|
-
rec.exitCode = code;
|
|
650
|
-
rec.finishedAt = now().toISOString();
|
|
651
|
-
save();
|
|
652
|
-
}
|
|
653
|
-
};
|
|
654
|
-
if (o.hookProcess) {
|
|
655
|
-
const onExit = (code) => recorder.end(typeof code === "number" ? code : 1);
|
|
656
|
-
process.once("exit", onExit);
|
|
657
|
-
unhook.push(() => process.off("exit", onExit));
|
|
658
|
-
for (const [sig, code] of [
|
|
659
|
-
["SIGINT", 130],
|
|
660
|
-
["SIGTERM", 143]
|
|
661
|
-
]) {
|
|
662
|
-
const on = () => {
|
|
663
|
-
if (process.listenerCount(sig) > 1)
|
|
664
|
-
return;
|
|
665
|
-
recorder.end(code);
|
|
666
|
-
process.exit(code);
|
|
667
|
-
};
|
|
668
|
-
process.on(sig, on);
|
|
669
|
-
unhook.push(() => process.off(sig, on));
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
return recorder;
|
|
673
|
-
}
|
|
674
|
-
function pidAlive(pid) {
|
|
675
|
-
try {
|
|
676
|
-
process.kill(pid, 0);
|
|
677
|
-
return true;
|
|
678
|
-
} catch (e) {
|
|
679
|
-
return e.code === "EPERM";
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
var DAY = 24 * 60 * 60 * 1e3;
|
|
683
|
-
var mtimeOf = (file) => {
|
|
684
|
-
try {
|
|
685
|
-
return statSync2(file).mtimeMs;
|
|
686
|
-
} catch {
|
|
687
|
-
return 0;
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
|
-
function goneRun(r, here, alive2, now, root, startOf = procStartOf) {
|
|
691
|
-
const age = now - Date.parse(r.startedAt);
|
|
692
|
-
if (r.host !== here)
|
|
693
|
-
return age > 2 * DAY;
|
|
694
|
-
if (!alive2(r.pid) || age > 7 * DAY)
|
|
695
|
-
return true;
|
|
696
|
-
const started = r.procStart ? startOf(r.pid) : void 0;
|
|
697
|
-
if (started !== void 0)
|
|
698
|
-
return started !== r.procStart;
|
|
699
|
-
if (r.beatAt) {
|
|
700
|
-
const last = Math.max(Date.parse(r.beatAt) || 0, mtimeOf(join3(runLogsDirOf(root), `${r.runId}.log`)));
|
|
701
|
-
return now - last > RUN_SILENT_MS;
|
|
702
|
-
}
|
|
703
|
-
return false;
|
|
704
|
-
}
|
|
705
|
-
function readRecord(root, runId) {
|
|
706
|
-
if (!TERMINAL_RUN_ID.test(runId))
|
|
707
|
-
return void 0;
|
|
708
|
-
try {
|
|
709
|
-
const r = JSON.parse(readFileSync2(join3(runningDirOf(root), `${runId}.json`), "utf8"));
|
|
710
|
-
if (r.schemaVersion !== 1 || r.runId !== runId || typeof r.title !== "string" || typeof r.startedAt !== "string" || typeof r.pid !== "number" || !["running", "done", "failed", "cancelled"].includes(r.state))
|
|
711
|
-
return void 0;
|
|
712
|
-
return {
|
|
713
|
-
...r,
|
|
714
|
-
command: Array.isArray(r.command) ? r.command.map(String) : [],
|
|
715
|
-
flags: Array.isArray(r.flags) ? r.flags.map(String) : [],
|
|
716
|
-
lines: Number(r.lines) || 0,
|
|
717
|
-
dropped: Number(r.dropped) || 0,
|
|
718
|
-
...typeof r.procStart === "string" ? { procStart: r.procStart } : {},
|
|
719
|
-
...typeof r.beatAt === "string" ? { beatAt: r.beatAt } : {}
|
|
720
|
-
};
|
|
721
|
-
} catch {
|
|
722
|
-
return void 0;
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
function readTerminalRuns(root, o = {}) {
|
|
726
|
-
let names;
|
|
727
|
-
try {
|
|
728
|
-
names = readdirSync(runningDirOf(root));
|
|
729
|
-
} catch {
|
|
730
|
-
return [];
|
|
731
|
-
}
|
|
732
|
-
const here = hostHash();
|
|
733
|
-
const alive2 = o.alive ?? pidAlive;
|
|
734
|
-
const now = (o.now ?? (() => /* @__PURE__ */ new Date()))().getTime();
|
|
735
|
-
const out = [];
|
|
736
|
-
for (const n of names.sort().reverse()) {
|
|
737
|
-
if (!n.endsWith(".json"))
|
|
738
|
-
continue;
|
|
739
|
-
const r = readRecord(root, n.slice(0, -5));
|
|
740
|
-
if (!r)
|
|
741
|
-
continue;
|
|
742
|
-
if (r.state === "running") {
|
|
743
|
-
if (goneRun(r, here, alive2, now, root, o.startOf)) {
|
|
744
|
-
out.push({ ...r, stale: true });
|
|
745
|
-
continue;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
out.push(r);
|
|
749
|
-
}
|
|
750
|
-
return out;
|
|
751
|
-
}
|
|
752
|
-
var readTerminalRun = (root, runId, o = {}) => TERMINAL_RUN_ID.test(runId) ? readTerminalRuns(root, o).find((r) => r.runId === runId) : void 0;
|
|
753
|
-
function readTerminalRunLines(root, runId, from, max = RUN_LOG_READ_MAX) {
|
|
754
|
-
const r = readRecord(root, runId);
|
|
755
|
-
if (!r)
|
|
756
|
-
return void 0;
|
|
757
|
-
let text;
|
|
758
|
-
try {
|
|
759
|
-
text = readFileSync2(join3(runLogsDirOf(root), `${runId}.log`), "utf8");
|
|
760
|
-
} catch {
|
|
761
|
-
text = "";
|
|
762
|
-
}
|
|
763
|
-
const all = text.split("\n");
|
|
764
|
-
all.pop();
|
|
765
|
-
const total = r.dropped + all.length;
|
|
766
|
-
const start = from === void 0 ? Math.max(total - max, r.dropped) : Math.max(Math.min(from, total), r.dropped);
|
|
767
|
-
const lines = all.slice(start - r.dropped, start - r.dropped + max);
|
|
768
|
-
return { from: start, lines, total };
|
|
769
|
-
}
|
|
770
|
-
function linesIn(buf, skip, max) {
|
|
771
|
-
const lines = [];
|
|
772
|
-
let at = 0;
|
|
773
|
-
let n = 0;
|
|
774
|
-
while (at < buf.length) {
|
|
775
|
-
const nl = buf.indexOf(10, at);
|
|
776
|
-
if (nl < 0)
|
|
777
|
-
break;
|
|
778
|
-
if (n >= skip) {
|
|
779
|
-
if (lines.length >= max)
|
|
780
|
-
return { lines, end: at, more: true };
|
|
781
|
-
lines.push(buf.toString("utf8", at, nl));
|
|
782
|
-
}
|
|
783
|
-
n++;
|
|
784
|
-
at = nl + 1;
|
|
785
|
-
}
|
|
786
|
-
return { lines, end: at, more: false };
|
|
787
|
-
}
|
|
788
|
-
function readFrom(file, from, size) {
|
|
789
|
-
const buf = Buffer.alloc(Math.max(size - from, 0));
|
|
790
|
-
if (!buf.length)
|
|
791
|
-
return buf;
|
|
792
|
-
const fd = openSync(file, "r");
|
|
793
|
-
try {
|
|
794
|
-
let got = 0;
|
|
795
|
-
while (got < buf.length) {
|
|
796
|
-
const n = readSync(fd, buf, got, buf.length - got, from + got);
|
|
797
|
-
if (n <= 0)
|
|
798
|
-
break;
|
|
799
|
-
got += n;
|
|
800
|
-
}
|
|
801
|
-
return got < buf.length ? buf.subarray(0, got) : buf;
|
|
802
|
-
} finally {
|
|
803
|
-
closeSync(fd);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
function tailTerminalRunLines(root, runId, at, max = RUN_LOG_READ_MAX) {
|
|
807
|
-
const file = join3(runLogsDirOf(root), `${runId}.log`);
|
|
808
|
-
for (let tries = 0; ; tries++) {
|
|
809
|
-
const r = readRecord(root, runId);
|
|
810
|
-
if (!r)
|
|
811
|
-
return void 0;
|
|
812
|
-
let size = 0;
|
|
813
|
-
let ino = 0;
|
|
814
|
-
try {
|
|
815
|
-
const st = statSync2(file);
|
|
816
|
-
size = st.size;
|
|
817
|
-
ino = st.ino;
|
|
818
|
-
} catch {
|
|
819
|
-
}
|
|
820
|
-
if (at && at.dropped === r.dropped && at.ino === ino && size >= at.bytes) {
|
|
821
|
-
let buf2;
|
|
822
|
-
try {
|
|
823
|
-
buf2 = readFrom(file, at.bytes, size);
|
|
824
|
-
} catch {
|
|
825
|
-
buf2 = Buffer.alloc(0);
|
|
826
|
-
}
|
|
827
|
-
const got2 = linesIn(buf2, 0, max);
|
|
828
|
-
return {
|
|
829
|
-
from: at.line,
|
|
830
|
-
lines: got2.lines,
|
|
831
|
-
at: {
|
|
832
|
-
line: at.line + got2.lines.length,
|
|
833
|
-
bytes: at.bytes + got2.end,
|
|
834
|
-
dropped: r.dropped,
|
|
835
|
-
ino
|
|
836
|
-
},
|
|
837
|
-
more: got2.more
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
|
-
let buf;
|
|
841
|
-
try {
|
|
842
|
-
buf = readFileSync2(file);
|
|
843
|
-
} catch {
|
|
844
|
-
buf = Buffer.alloc(0);
|
|
845
|
-
}
|
|
846
|
-
const again = readRecord(root, runId);
|
|
847
|
-
if (again && again.dropped !== r.dropped && tries < 1)
|
|
848
|
-
continue;
|
|
849
|
-
let count = 0;
|
|
850
|
-
for (let i = buf.indexOf(10); i >= 0; i = buf.indexOf(10, i + 1))
|
|
851
|
-
count++;
|
|
852
|
-
const total = r.dropped + count;
|
|
853
|
-
const start = at === void 0 ? Math.max(total - max, r.dropped) : Math.max(Math.min(at.line, total), r.dropped);
|
|
854
|
-
const got = linesIn(buf, start - r.dropped, max);
|
|
855
|
-
return {
|
|
856
|
-
from: start,
|
|
857
|
-
lines: got.lines,
|
|
858
|
-
at: { line: start + got.lines.length, bytes: got.end, dropped: r.dropped, ino },
|
|
859
|
-
more: got.more
|
|
860
|
-
};
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
// packages/core/dist/printer.js
|
|
865
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
866
|
-
var printer = new AsyncLocalStorage();
|
|
867
|
-
function withPrinter(print, work) {
|
|
868
|
-
return printer.run(print, work);
|
|
869
|
-
}
|
|
870
|
-
function printToCurrent(line) {
|
|
871
|
-
const p = printer.getStore();
|
|
872
|
-
if (!p)
|
|
873
|
-
return;
|
|
874
|
-
try {
|
|
875
|
-
p(line);
|
|
876
|
-
} catch {
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
export {
|
|
881
|
-
writeFileAtomic,
|
|
882
|
-
FileChangedError,
|
|
883
|
-
writeFileIfUnchanged,
|
|
884
|
-
renameRetrying,
|
|
885
|
-
LockHeldError,
|
|
886
|
-
lockFileOf,
|
|
887
|
-
readLock,
|
|
888
|
-
acquireLock,
|
|
889
|
-
sharedLockFileOf,
|
|
890
|
-
QUICK_WRITE_LOCK,
|
|
891
|
-
withSharedFileLock,
|
|
892
|
-
LOCAL_ONLY,
|
|
893
|
-
ensureLocalIgnore,
|
|
894
|
-
LOG_MAX_BYTES,
|
|
895
|
-
LOG_KEEP,
|
|
896
|
-
logFileOf,
|
|
897
|
-
redactText,
|
|
898
|
-
redact,
|
|
899
|
-
logLevelFrom,
|
|
900
|
-
createLog,
|
|
901
|
-
ignoreLocalSync,
|
|
902
|
-
NO_LOG,
|
|
903
|
-
RUN_LOG_KEEP,
|
|
904
|
-
RUN_LOG_MAX_BYTES,
|
|
905
|
-
RUN_LOG_LINE_MAX,
|
|
906
|
-
RUN_LOG_READ_MAX,
|
|
907
|
-
RUN_HEARTBEAT_MS,
|
|
908
|
-
RUN_SILENT_MS,
|
|
909
|
-
TERMINAL_RUN_ID,
|
|
910
|
-
runLogsDirOf,
|
|
911
|
-
runningDirOf,
|
|
912
|
-
recordedCommand,
|
|
913
|
-
runTitle,
|
|
914
|
-
startedByOf,
|
|
915
|
-
procStartOf,
|
|
916
|
-
runLogLines,
|
|
917
|
-
startTerminalRun,
|
|
918
|
-
pidAlive,
|
|
919
|
-
readTerminalRuns,
|
|
920
|
-
readTerminalRun,
|
|
921
|
-
readTerminalRunLines,
|
|
922
|
-
tailTerminalRunLines,
|
|
923
|
-
withPrinter,
|
|
924
|
-
printToCurrent
|
|
925
|
-
};
|