@maycombhq/atticus 2.0.0-beta.26 → 2.0.0-beta.27.1
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-7JZONWAA.js → chunk-23OQZY5Z.js} +22 -18
- package/dist/{chunk-UTZMF5CV.js → chunk-23TTURB2.js} +1 -1
- package/dist/{chunk-YIOYKA4V.js → chunk-2AIOOA3U.js} +7 -7
- package/dist/chunk-2ANBMA74.js +107 -0
- package/dist/{chunk-ZYLGEWTC.js → chunk-2FORECYK.js} +78 -57
- package/dist/{chunk-D5H3RZNE.js → chunk-2J2GMERV.js} +16 -15
- package/dist/{chunk-ZDA72732.js → chunk-2MRYL45Z.js} +50 -9
- package/dist/{chunk-RBO4A7TC.js → chunk-2WPUSHB6.js} +15 -15
- package/dist/{chunk-2IO6XH37.js → chunk-3BQDBTQJ.js} +15 -15
- package/dist/{chunk-B3JHERXM.js → chunk-3CMGSQIA.js} +7 -5
- package/dist/{chunk-UFIQ5FWY.js → chunk-3M3MDBOG.js} +1 -1
- package/dist/chunk-3NGHSBVS.js +50 -0
- package/dist/{chunk-DHQXCP2X.js → chunk-3PBIZBWN.js} +1 -1
- package/dist/{chunk-CFK6CFXM.js → chunk-3PG6QOQF.js} +9 -9
- package/dist/chunk-3PN7KJBA.js +48 -0
- package/dist/{chunk-DARX3ATP.js → chunk-3TWERSTY.js} +11 -11
- package/dist/chunk-3XNE6XXF.js +211 -0
- package/dist/chunk-3YL2GZZH.js +55 -0
- package/dist/{chunk-ZGULQAPZ.js → chunk-44SWXDD7.js} +8 -5
- package/dist/{chunk-XI3GPYP4.js → chunk-44XGOSUU.js} +5 -5
- package/dist/{chunk-SAPX3PVK.js → chunk-4BK5EJ2C.js} +11 -11
- package/dist/{chunk-OH2OHNB5.js → chunk-4FLIW5PJ.js} +4 -4
- package/dist/{chunk-EUTZTJIO.js → chunk-4HMOOBIR.js} +19 -15
- package/dist/chunk-4NPWOUI2.js +514 -0
- package/dist/{chunk-RQM5Y3HJ.js → chunk-4UVTNHA6.js} +1 -1
- package/dist/{chunk-KVVNAUIG.js → chunk-4XK3HLOH.js} +1 -0
- package/dist/{chunk-ZQGFZJH5.js → chunk-523NRKHF.js} +4 -4
- package/dist/chunk-5A4FHGTI.js +34 -0
- package/dist/{chunk-SDHGFMES.js → chunk-5CIW5RMP.js} +3 -3
- package/dist/{chunk-GJSLO2E2.js → chunk-5GCCG3GJ.js} +11 -5
- package/dist/{chunk-LCRQPWTC.js → chunk-5KR2DHDW.js} +19 -18
- package/dist/{chunk-UIYPX2BA.js → chunk-5PAIR73N.js} +27 -26
- package/dist/{chunk-K35VNKJH.js → chunk-5YEUAZZE.js} +8 -8
- package/dist/{chunk-DB6TDJ4T.js → chunk-5YX7MJWW.js} +22 -21
- package/dist/{chunk-IH6BYFMH.js → chunk-5ZFLP2IK.js} +6 -6
- package/dist/chunk-66CMRGI2.js +44 -0
- package/dist/{chunk-YWQZ7CCW.js → chunk-6DHGNY3O.js} +18 -17
- package/dist/{chunk-WLA2JZ2K.js → chunk-6ESJWPR3.js} +8 -8
- package/dist/{chunk-2SCZZQNQ.js → chunk-6GX3OFEZ.js} +121 -15
- package/dist/{chunk-2HDNOUJU.js → chunk-6H62UHY5.js} +7065 -3456
- package/dist/{chunk-YYV276DM.js → chunk-6MSACVCY.js} +22 -21
- package/dist/{chunk-GXJ2PSDW.js → chunk-6OTGCKYH.js} +9 -9
- package/dist/{chunk-HSJKYDHI.js → chunk-6TXB2WR6.js} +5 -5
- package/dist/{chunk-KL7UHAOR.js → chunk-6VFR3DYS.js} +36 -21
- package/dist/{chunk-KS2IQYTZ.js → chunk-7BOGXFZ3.js} +11 -11
- package/dist/chunk-7GZ46N4V.js +37 -0
- package/dist/{chunk-KFJMQUSK.js → chunk-7HUCEHUK.js} +16 -15
- package/dist/{chunk-LY7DOYX2.js → chunk-7LOXUBRB.js} +53 -112
- package/dist/{chunk-NQDVD2YR.js → chunk-7SO6CGJH.js} +12 -12
- package/dist/{chunk-LZFKJ2BR.js → chunk-A3LVMCA5.js} +1 -1
- package/dist/{chunk-2XIIUXGX.js → chunk-A3QZZEJA.js} +16 -16
- package/dist/{chunk-PXDAGXQN.js → chunk-AHAEHBH5.js} +11 -11
- package/dist/{chunk-PFWP624T.js → chunk-AKZTCZ6F.js} +4 -4
- package/dist/{chunk-V5ZKGBYL.js → chunk-AOQG37K4.js} +8 -6
- package/dist/chunk-APYIIVBH.js +72 -0
- package/dist/{chunk-HV6PXXK7.js → chunk-AQLDQK2M.js} +3 -3
- package/dist/{chunk-YJBD5NDV.js → chunk-AXJCABA5.js} +6 -6
- package/dist/{chunk-CG6MG7SE.js → chunk-AZBP5DTU.js} +14 -14
- package/dist/chunk-B4WPO6FX.js +58 -0
- package/dist/{chunk-3GEAUW62.js → chunk-BSGOUHL6.js} +16 -15
- package/dist/{chunk-D4TW3PUO.js → chunk-BUBKKEUV.js} +5 -5
- package/dist/chunk-BV7WB32T.js +1068 -0
- package/dist/{chunk-I72PEROE.js → chunk-C5DY4R7R.js} +6 -6
- package/dist/chunk-CBFQO2F2.js +62 -0
- package/dist/{chunk-723OQZ3N.js → chunk-CHS5BJ34.js} +6 -6
- package/dist/{chunk-2FTHLB2H.js → chunk-CLM5Z3R5.js} +5 -5
- package/dist/{chunk-7AEB74KW.js → chunk-CPB4XMFI.js} +9 -9
- package/dist/{chunk-KZH5YV6J.js → chunk-CWJDZ5VP.js} +6 -6
- package/dist/chunk-CWKQRP6Y.js +56 -0
- package/dist/{chunk-PLSCWC2V.js → chunk-D3L5SO27.js} +5 -5
- package/dist/{chunk-OI32KTDM.js → chunk-D566V3T3.js} +13 -13
- package/dist/{chunk-JLTJAOO4.js → chunk-DDRTAEFZ.js} +50 -13
- package/dist/{chunk-TYN5SG5H.js → chunk-DGNTEKF6.js} +403 -148
- package/dist/{chunk-VUSYN4R4.js → chunk-DNDIT3LD.js} +8 -8
- package/dist/{chunk-IERXBWQU.js → chunk-DNKYWTVZ.js} +20 -19
- package/dist/{chunk-KJD4DLRZ.js → chunk-DS2OZXBN.js} +22 -21
- package/dist/{chunk-CSHJZFOE.js → chunk-DTW37FJ6.js} +91 -93
- package/dist/{chunk-KAWWXCPI.js → chunk-DVQCYF3V.js} +3 -3
- package/dist/{chunk-UZBLVNW6.js → chunk-DX7WEXYG.js} +38 -17
- package/dist/{chunk-PZFZPHCT.js → chunk-E7Q52EOO.js} +11 -11
- package/dist/{chunk-R2FUFBHW.js → chunk-EFDUC35B.js} +3 -3
- package/dist/chunk-EHT2KP5A.js +43 -0
- package/dist/{chunk-43OWNS5N.js → chunk-EHXEJFHD.js} +5 -5
- package/dist/{chunk-HQMLY2R6.js → chunk-ELJ5Q4J2.js} +2 -2
- package/dist/{chunk-BD7HBZLP.js → chunk-ELZGWEK4.js} +6 -6
- package/dist/{chunk-F4EGHECF.js → chunk-EM6DKBTJ.js} +3 -3
- package/dist/{chunk-PBDIVTFL.js → chunk-FADIWOA5.js} +3 -3
- package/dist/{chunk-IL7PVMUO.js → chunk-FBG3QHOL.js} +6 -6
- package/dist/{chunk-LHN5UCXD.js → chunk-FBNJZ3VH.js} +3 -3
- package/dist/chunk-FFIHRQ3O.js +67 -0
- package/dist/chunk-FT55WYNB.js +39 -0
- package/dist/{chunk-E5NHFHGC.js → chunk-FVT6LUOC.js} +7 -7
- package/dist/{chunk-KUEG2Y7M.js → chunk-FYRBBFIF.js} +8 -8
- package/dist/chunk-FZ2K3IXP.js +46 -0
- package/dist/{chunk-IBIIKUC7.js → chunk-G33UIUG3.js} +46 -20
- package/dist/chunk-G4TFQ4EG.js +60 -0
- package/dist/{chunk-2GT47PWU.js → chunk-GBJRFFDW.js} +5 -5
- package/dist/{chunk-BIKMME4S.js → chunk-GEHB2LMA.js} +28 -27
- package/dist/{chunk-NMURRF5F.js → chunk-GF6GBHFN.js} +13 -11
- package/dist/{chunk-6SIGGA37.js → chunk-GLNSLQSV.js} +26 -25
- package/dist/{chunk-BABRMZET.js → chunk-GZILYRGC.js} +3 -3
- package/dist/{chunk-5JGRF53S.js → chunk-GZSOZYEP.js} +3 -3
- package/dist/{chunk-Z33UNTHI.js → chunk-HBHPOKL2.js} +7 -7
- package/dist/{chunk-2JT4QV3Q.js → chunk-HDWVR5KD.js} +4 -4
- package/dist/{chunk-UJ5ZJS4B.js → chunk-HNU4AQXB.js} +22 -21
- package/dist/{chunk-IJN5PSDU.js → chunk-HOEZQRZU.js} +57 -27
- package/dist/{chunk-HWPX3T55.js → chunk-HPCGQAYH.js} +31 -24
- package/dist/{chunk-JJEXMHNZ.js → chunk-HUMM4S5I.js} +6 -6
- package/dist/{chunk-BIWNRS5I.js → chunk-I2NGDERG.js} +78 -47
- package/dist/{chunk-IGOE6KPG.js → chunk-I34CXV2C.js} +185 -11
- package/dist/{chunk-DOU52XFZ.js → chunk-I4P72R2F.js} +61 -28
- package/dist/{chunk-6U65YB54.js → chunk-I57IH5X6.js} +360 -271
- package/dist/{chunk-WYO4L4NU.js → chunk-I5X4WU7U.js} +6 -6
- package/dist/{chunk-DXLWZ3BJ.js → chunk-IDFUGYTS.js} +8 -8
- package/dist/{chunk-5A4RHEEL.js → chunk-INCFIDCB.js} +2 -2
- package/dist/{chunk-RTCZKKG7.js → chunk-IPMPLTEG.js} +3 -3
- package/dist/{chunk-QAFQLILX.js → chunk-IPSZDVLI.js} +12 -12
- package/dist/{chunk-ZFLBWL2G.js → chunk-J3ZUKQLV.js} +11 -3
- package/dist/chunk-J4L64TUA.js +58 -0
- package/dist/chunk-JA7AUBHU.js +51 -0
- package/dist/chunk-JD3QDLM2.js +50 -0
- package/dist/{chunk-4DHYXODN.js → chunk-JF2HM2IF.js} +4 -4
- package/dist/{chunk-XEWFVHOT.js → chunk-JGR4X2UA.js} +24 -23
- package/dist/chunk-JOG5O2ZH.js +185 -0
- package/dist/{chunk-ACY3U2RD.js → chunk-JRXFZB6J.js} +8 -8
- package/dist/{chunk-ZWMHL346.js → chunk-JWIAVNEC.js} +20 -19
- package/dist/{chunk-MQ6HP2TU.js → chunk-KMBI6IQD.js} +6 -6
- package/dist/chunk-KOITA526.js +42 -0
- package/dist/chunk-KZ5G3KEN.js +90 -0
- package/dist/{chunk-DPH4BS3F.js → chunk-L3KSU4QU.js} +17 -17
- package/dist/{chunk-4NWE2KY3.js → chunk-L4WFMAHI.js} +15 -14
- package/dist/{chunk-H7CSCA73.js → chunk-LAPVW2F6.js} +5 -5
- package/dist/{chunk-SZDOBIWE.js → chunk-LCQIRCOT.js} +55 -10
- package/dist/{chunk-ZLBUFK7L.js → chunk-LCWC6NDE.js} +7 -7
- package/dist/{chunk-ELR7DEQM.js → chunk-LH52QGNY.js} +34 -9
- package/dist/{chunk-WT6EXYEY.js → chunk-LJEEVZIH.js} +138 -22
- package/dist/{chunk-EVKDWJ5Y.js → chunk-LKLB5IJ7.js} +5 -5
- package/dist/{chunk-VIQHZA53.js → chunk-LP6BFBE5.js} +6 -6
- package/dist/{chunk-FIZ5LYL2.js → chunk-LQEMCF43.js} +16 -15
- package/dist/{chunk-RO6BE7ZS.js → chunk-LTVOQJKT.js} +7 -7
- package/dist/{chunk-C3TBDX7Y.js → chunk-M25UUEKC.js} +26 -25
- package/dist/{chunk-PXMV2LLY.js → chunk-M65AZ4ZE.js} +3 -5
- package/dist/chunk-MA44TMTL.js +190 -0
- package/dist/{chunk-EQMNMG6X.js → chunk-MA73J3E6.js} +13 -13
- package/dist/{chunk-P6EJNPFF.js → chunk-MBIJNU3D.js} +951 -409
- package/dist/chunk-MIKRDA2P.js +68 -0
- package/dist/{chunk-DJBXXYYA.js → chunk-MNOZDE6W.js} +15 -15
- package/dist/{chunk-QQAWI5LD.js → chunk-MP7W6OKP.js} +16 -15
- package/dist/chunk-MSNEGKI3.js +492 -0
- package/dist/{chunk-ZNYSBQIA.js → chunk-MUXYUIBV.js} +6 -6
- package/dist/{chunk-VJO7M34N.js → chunk-MZDHFWTN.js} +2 -2
- package/dist/{chunk-K3QKOVZN.js → chunk-N5DLB74D.js} +367 -71
- package/dist/{chunk-3D74UADA.js → chunk-NGSGJLKW.js} +2 -2
- package/dist/{chunk-3KP7OOJ4.js → chunk-NJ5IEZIG.js} +8 -8
- package/dist/chunk-NK6JCNJX.js +41 -0
- package/dist/{chunk-IYEET4VM.js → chunk-NNRQZUVW.js} +27 -26
- package/dist/{chunk-76AHTJVY.js → chunk-NNURP7VO.js} +15 -15
- package/dist/{chunk-GFFTVQ7R.js → chunk-NV5S63YK.js} +7 -7
- package/dist/{chunk-MKUBDKE2.js → chunk-NWAMUD7B.js} +29 -28
- package/dist/{chunk-CTJHEG6A.js → chunk-NWMFVPEP.js} +2 -0
- package/dist/{chunk-6EMJ4XFC.js → chunk-NWQ76YQ5.js} +31 -20
- package/dist/{chunk-H5BIVULF.js → chunk-O5BUMSB3.js} +10 -10
- package/dist/{chunk-IEIHVMM6.js → chunk-O6UC7ASJ.js} +5 -5
- package/dist/{chunk-Q3RKXK5Z.js → chunk-OBQL7GX4.js} +28 -27
- package/dist/{chunk-NCZS2BN2.js → chunk-OILAH2C7.js} +21 -20
- package/dist/{chunk-U3JXMY56.js → chunk-OOZKLLW7.js} +28 -25
- package/dist/{chunk-UAYU6K24.js → chunk-ORGB6645.js} +16 -15
- package/dist/{chunk-BGOAJFPB.js → chunk-OUALZ5RA.js} +1 -1
- package/dist/{chunk-6TZ4YRGJ.js → chunk-OUDGBJC2.js} +16 -9
- package/dist/{chunk-W4SMKUAK.js → chunk-OUGTAOGA.js} +2 -2
- package/dist/{chunk-7ZBYRMWK.js → chunk-OY2VC2IU.js} +26 -25
- package/dist/{chunk-GHST3KAB.js → chunk-OY6H7JX6.js} +5 -5
- package/dist/{chunk-KZ4I5M2X.js → chunk-P7H5WZH6.js} +37 -19
- package/dist/{chunk-ZA2PWNR3.js → chunk-PCIENCB7.js} +16 -15
- package/dist/{chunk-DXBXZNKV.js → chunk-PGAXZLNF.js} +21 -13
- package/dist/{chunk-UXVKFOMC.js → chunk-PPKH6ULR.js} +152 -20
- package/dist/{chunk-IP6ARMZU.js → chunk-PT77IUYQ.js} +58 -36
- package/dist/chunk-PVJZR4JB.js +653 -0
- package/dist/chunk-Q7EUPQEG.js +5 -0
- package/dist/{chunk-HNNMT5L2.js → chunk-Q7YDUGVZ.js} +1 -1
- package/dist/{chunk-MTIRNHRJ.js → chunk-QK3UFHFC.js} +1 -1
- package/dist/{chunk-VCXFMXMX.js → chunk-QLT3WYTD.js} +6 -6
- package/dist/{chunk-UWBPC5XH.js → chunk-QNXMVJMA.js} +8 -8
- package/dist/{chunk-XDLMQL5A.js → chunk-QPAANKUR.js} +7 -7
- package/dist/chunk-QQUAEM3U.js +57 -0
- package/dist/chunk-QU3ENIJV.js +52 -0
- package/dist/{chunk-TPKJD42W.js → chunk-QUFZDWPC.js} +8 -8
- package/dist/{chunk-DB3NWAU3.js → chunk-QXSYFB5L.js} +4 -4
- package/dist/{chunk-QXCGRQGO.js → chunk-QXXEOH3A.js} +18 -6
- package/dist/{chunk-QA4O2GGC.js → chunk-R4TUWD4C.js} +17 -1
- package/dist/{chunk-CNEOKSTO.js → chunk-R6KZWNZM.js} +34 -31
- package/dist/{chunk-CNT6T2JM.js → chunk-R7NPDUBL.js} +16 -15
- package/dist/{chunk-HVWPN2RY.js → chunk-R7VX5BSP.js} +16 -15
- package/dist/chunk-RCPWEZD7.js +47 -0
- package/dist/{chunk-FOOU5OJE.js → chunk-RDFRB26Z.js} +3 -3
- package/dist/{chunk-ISCX25D7.js → chunk-RTHQIGGY.js} +200 -56
- package/dist/{chunk-FYCN2Y5P.js → chunk-RX2SMQV3.js} +19 -18
- package/dist/{chunk-XIGVTH24.js → chunk-RZEYZOLW.js} +19 -19
- package/dist/{chunk-VTR4AC2U.js → chunk-RZYRUXSU.js} +4 -4
- package/dist/{chunk-YLXPJWNO.js → chunk-S5O57P5P.js} +17 -16
- package/dist/{chunk-CWLXVRFH.js → chunk-S6TLXRBR.js} +7 -7
- package/dist/{chunk-MCORC2LG.js → chunk-SF3HXNXR.js} +6 -6
- package/dist/{chunk-BSZII65X.js → chunk-SFCFL7Y5.js} +1 -1
- package/dist/chunk-SJ2Z3AWF.js +89 -0
- package/dist/{chunk-KFZ5IXEZ.js → chunk-SKVLJL2E.js} +28 -27
- package/dist/chunk-SMFFUFMN.js +1876 -0
- package/dist/{chunk-IDRCBMJF.js → chunk-SP5BWA5H.js} +32 -31
- package/dist/chunk-SRIU7L4Z.js +425 -0
- package/dist/{chunk-CUTMM4NY.js → chunk-SSYD4XIW.js} +154 -25
- package/dist/{chunk-UBEFT3MQ.js → chunk-TFN2N227.js} +6 -6
- package/dist/{chunk-YEHSJY6B.js → chunk-TLSL7OII.js} +13 -13
- package/dist/{chunk-B7KGNEFI.js → chunk-TM2WY65Q.js} +25 -24
- package/dist/{chunk-6P67IUET.js → chunk-TMETWJFO.js} +11 -11
- package/dist/{chunk-SRB54QGX.js → chunk-TMMGQBLO.js} +20 -19
- package/dist/{chunk-VGGSHDQU.js → chunk-TOSHT6NJ.js} +8 -8
- package/dist/{chunk-64LSDT3D.js → chunk-TPKDYSHO.js} +12 -12
- package/dist/{chunk-OXCHO2QS.js → chunk-TQISA4VW.js} +26 -23
- package/dist/{chunk-NVVEVP5O.js → chunk-TRSNIJNM.js} +7 -7
- package/dist/{chunk-TQG2DDWH.js → chunk-TUMHMISE.js} +22 -21
- package/dist/{chunk-WM4EMP7T.js → chunk-U36V664P.js} +283 -61
- package/dist/{chunk-5UIGGXA5.js → chunk-U4K34CXK.js} +21 -20
- package/dist/{chunk-3KIMLBGZ.js → chunk-UDM6HGF4.js} +6 -6
- package/dist/{chunk-NMCPIYTF.js → chunk-UDM7LXNJ.js} +7 -7
- package/dist/{chunk-ZFEOIYK5.js → chunk-UEUPEUZX.js} +3 -3
- package/dist/{chunk-RCLBIJRN.js → chunk-UGJSKAZ2.js} +6 -6
- package/dist/{chunk-DS5M2J2H.js → chunk-UMIZYX3U.js} +16 -15
- package/dist/{chunk-63572EFC.js → chunk-USYDJY63.js} +21 -19
- package/dist/{chunk-V5FT3MZG.js → chunk-UXETN43F.js} +8 -8
- package/dist/{chunk-LBBI5P5G.js → chunk-V6BP4XHZ.js} +25 -24
- package/dist/chunk-V7DGFWDB.js +55 -0
- package/dist/chunk-VGXE7XFO.js +35 -0
- package/dist/{chunk-IZIGZ7KY.js → chunk-VSED7FYC.js} +13 -8
- package/dist/{chunk-HVOE7ZW2.js → chunk-VTQ55N4O.js} +19 -18
- package/dist/{chunk-P6DM2EFI.js → chunk-VVLWEM2Y.js} +6 -6
- package/dist/{chunk-YXKCE5BA.js → chunk-VWCNMDMZ.js} +5 -5
- package/dist/{chunk-EY3OVHNC.js → chunk-VX5CORDG.js} +24 -23
- package/dist/{chunk-XT3ZW7C7.js → chunk-W4SWXJZQ.js} +19 -18
- package/dist/{chunk-BV2BZIUF.js → chunk-W5UMEIYG.js} +25 -24
- package/dist/{chunk-VPQUFIE7.js → chunk-W6OY2PMB.js} +10 -10
- package/dist/chunk-W7NNZFIL.js +52 -0
- package/dist/{chunk-6ZDAEUKB.js → chunk-WJWSB65O.js} +1602 -452
- package/dist/{chunk-IFQJ3YQE.js → chunk-WNPGLGCJ.js} +5 -5
- package/dist/{chunk-MM7JSMLW.js → chunk-WNRIL6JQ.js} +18 -17
- package/dist/{chunk-TLBPTUFU.js → chunk-WPZCSFND.js} +20 -19
- package/dist/chunk-WTGQJXRJ.js +55 -0
- package/dist/{chunk-BEEHCL5O.js → chunk-WTLFRINF.js} +37 -36
- package/dist/{chunk-XIJBQM45.js → chunk-X5B7KYPD.js} +507 -20
- package/dist/{chunk-GNFZ227W.js → chunk-XIIT4PVT.js} +3 -3
- package/dist/{chunk-EECFUQP3.js → chunk-XKWPEY4B.js} +184 -46
- package/dist/{chunk-GAJBMPWC.js → chunk-XRNMQZFC.js} +28 -9
- package/dist/{chunk-BIAQ6NQS.js → chunk-XRTECHVH.js} +7 -7
- package/dist/{chunk-I2EWY3MG.js → chunk-XZY4GTCX.js} +14 -9
- package/dist/{chunk-V3M4VFUB.js → chunk-Y6S7VCYN.js} +6 -6
- package/dist/{chunk-MY3LDBMR.js → chunk-YAPVAYZN.js} +3 -3
- package/dist/{chunk-WH3ZFLXT.js → chunk-YBAJ5SAR.js} +197 -124
- package/dist/{chunk-ET7SPOBA.js → chunk-YHS7TSQS.js} +8 -8
- package/dist/{chunk-RK5P2DWD.js → chunk-YIGSUTW2.js} +1329 -92
- package/dist/{chunk-ANFBBJEV.js → chunk-YPXBGNUV.js} +24 -22
- package/dist/{chunk-MZXDSAKW.js → chunk-YRHKEXTP.js} +11 -11
- package/dist/{chunk-CPE7HLIK.js → chunk-YTPND655.js} +18 -17
- package/dist/{chunk-LTOBNBJ6.js → chunk-YZUOOTC3.js} +27 -26
- package/dist/{chunk-F6GRBF5L.js → chunk-Z245SJ64.js} +25 -24
- package/dist/{chunk-NP3PG6OI.js → chunk-Z5CIRZNO.js} +157 -89
- package/dist/chunk-ZCARJ77R.js +56 -0
- package/dist/{chunk-DASVVML7.js → chunk-ZIAMPN7N.js} +6 -6
- package/dist/chunk-ZNZYMUBK.js +53 -0
- package/dist/{chunk-NECDBPFP.js → chunk-ZOAX7W5S.js} +11 -11
- package/dist/{chunk-7IWMRZRI.js → chunk-ZQZRNVNS.js} +83 -40
- package/dist/{chunk-PGDVJWCI.js → chunk-ZT6GPGZ4.js} +52 -37
- package/dist/{chunk-H26T2LQL.js → chunk-ZW3OEHLT.js} +29 -28
- package/dist/files.json +653 -549
- 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 +3788 -2939
- package/dist/packages/ui/dist/assets/{elk-api-BdXSPeBO.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-3FFIDQQB.js +0 -42
- package/dist/chunk-4N5W7LYW.js +0 -41
- package/dist/chunk-7NVLGPER.js +0 -45
- package/dist/chunk-A6LGX56J.js +0 -52
- package/dist/chunk-AHACUPGL.js +0 -46
- package/dist/chunk-DG7KYZAL.js +0 -40
- package/dist/chunk-DWD6BKHG.js +0 -52
- package/dist/chunk-EEVSFGIU.js +0 -50
- package/dist/chunk-EN3N6LNU.js +0 -52
- package/dist/chunk-FWQDH5NK.js +0 -55
- package/dist/chunk-GHCFWIUW.js +0 -38
- package/dist/chunk-GSIJWDXH.js +0 -43
- package/dist/chunk-HCC5547C.js +0 -232
- package/dist/chunk-HLDUWEO7.js +0 -36
- package/dist/chunk-K2NQTROJ.js +0 -170
- package/dist/chunk-LH4WAJLC.js +0 -45
- package/dist/chunk-M5IQUWJR.js +0 -59
- package/dist/chunk-MEMEO7YO.js +0 -988
- package/dist/chunk-MGNO4Q6V.js +0 -51
- package/dist/chunk-MZ6GOFRF.js +0 -55
- package/dist/chunk-N2AW2DHF.js +0 -51
- package/dist/chunk-N35Y5HZO.js +0 -47
- package/dist/chunk-NHFMLMLN.js +0 -257
- package/dist/chunk-PR6Z5L7W.js +0 -67
- package/dist/chunk-STBJ6SVJ.js +0 -50
- package/dist/chunk-U3RGBYXE.js +0 -62
- package/dist/chunk-URZKIL37.js +0 -42
- package/dist/chunk-W7HNZDHB.js +0 -71
- package/dist/chunk-YYZWSVIS.js +0 -33
- package/dist/chunk-ZAMSF2DF.js +0 -54
- package/dist/packages/ui/dist/assets/index-DRSUhpFi.css +0 -1
- package/dist/packages/ui/dist/assets/index-RZe5iotJ.js +0 -63
package/dist/chunk-MEMEO7YO.js
DELETED
|
@@ -1,988 +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 all = true;
|
|
421
|
-
var only = (...c) => new Set(c);
|
|
422
|
-
var but = (...c) => ({ except: new Set(c) });
|
|
423
|
-
var RECORDED = {
|
|
424
|
-
// The long ones.
|
|
425
|
-
map: all,
|
|
426
|
-
scan: all,
|
|
427
|
-
verify: all,
|
|
428
|
-
upgrade: all,
|
|
429
|
-
reconcile: all,
|
|
430
|
-
"run-ready": all,
|
|
431
|
-
workspace: only("sync", "bring-in", "open", "prune"),
|
|
432
|
-
task: but("context"),
|
|
433
|
-
knowledge: only("scan", "find", "ask", "keep", "verify", "correct", "reject"),
|
|
434
|
-
handoff: only("done"),
|
|
435
|
-
index: only("rebuild", "embed"),
|
|
436
|
-
// A change, from its start to its archive, and what it asks of people.
|
|
437
|
-
change: but("status", "list", "knowledge", "similar", "impact", "conflicts", "estimate", "map"),
|
|
438
|
-
initiative: but("status"),
|
|
439
|
-
questions: but("list", "show", "proposed", "decisions"),
|
|
440
|
-
critic: all,
|
|
441
|
-
finding: all,
|
|
442
|
-
plan: all,
|
|
443
|
-
stories: all,
|
|
444
|
-
needs: only("done", "skip", "reopen"),
|
|
445
|
-
todo: only("done", "run"),
|
|
446
|
-
ado: all,
|
|
447
|
-
release: all,
|
|
448
|
-
outcome: only("record"),
|
|
449
|
-
tests: only("generate"),
|
|
450
|
-
spec: only("draft", "seed", "accept", "hand-down", "hand-up"),
|
|
451
|
-
feature: but("list", "show"),
|
|
452
|
-
triage: only("decide"),
|
|
453
|
-
alias: all,
|
|
454
|
-
// The estate, the org pack and what Atticus learns.
|
|
455
|
-
baseline: all,
|
|
456
|
-
repo: all,
|
|
457
|
-
"repo-type": only("new", "note", "rules"),
|
|
458
|
-
rules: only("add", "activate", "off", "draft", "try", "import"),
|
|
459
|
-
types: only("add"),
|
|
460
|
-
skills: only("import", "write"),
|
|
461
|
-
connect: all,
|
|
462
|
-
join: all,
|
|
463
|
-
estate: only("join", "measure", "shared", "contracts"),
|
|
464
|
-
sources: only("sync", "tag", "refresh"),
|
|
465
|
-
glossary: only("scan", "define", "link", "alias"),
|
|
466
|
-
intake: only("add", "traffic"),
|
|
467
|
-
patterns: only("scan"),
|
|
468
|
-
defences: only("scan"),
|
|
469
|
-
onboard: but("check"),
|
|
470
|
-
frameworks: all,
|
|
471
|
-
dialect: only("new", "kit"),
|
|
472
|
-
plugin: all,
|
|
473
|
-
absorb: all,
|
|
474
|
-
orgpack: only("draft", "accept", "owner"),
|
|
475
|
-
standards: all,
|
|
476
|
-
openspec: only("setup"),
|
|
477
|
-
templates: only("draft"),
|
|
478
|
-
catalog: only("migrate"),
|
|
479
|
-
diagram: all,
|
|
480
|
-
"assistant-files": all,
|
|
481
|
-
site: only("build"),
|
|
482
|
-
secret: only("set", "forget"),
|
|
483
|
-
init: all,
|
|
484
|
-
adopt: all,
|
|
485
|
-
unadopt: all,
|
|
486
|
-
support: only("bundle"),
|
|
487
|
-
probe: all,
|
|
488
|
-
eval: only("run"),
|
|
489
|
-
bench: all
|
|
490
|
-
};
|
|
491
|
-
var NOT_RECORDED_FLAGS = /* @__PURE__ */ new Set(["help", "version", "check", "dry-run"]);
|
|
492
|
-
var QUICK = /* @__PURE__ */ new Set(["map render", "verify audit", "scan review", "critic stats"]);
|
|
493
|
-
function recordedCommand(positionals, flags) {
|
|
494
|
-
const [group, command] = positionals;
|
|
495
|
-
if (!group || flags.some((f) => NOT_RECORDED_FLAGS.has(f)))
|
|
496
|
-
return false;
|
|
497
|
-
if (command && QUICK.has(`${group} ${command}`))
|
|
498
|
-
return false;
|
|
499
|
-
const rule = RECORDED[group];
|
|
500
|
-
if (rule === void 0)
|
|
501
|
-
return false;
|
|
502
|
-
if (rule === true)
|
|
503
|
-
return true;
|
|
504
|
-
if (!command)
|
|
505
|
-
return false;
|
|
506
|
-
return rule instanceof Set ? rule.has(command) : !rule.except.has(command);
|
|
507
|
-
}
|
|
508
|
-
var ID_WORD = /^[A-Za-z0-9][A-Za-z0-9._/-]{0,99}$/;
|
|
509
|
-
var MAX_WORDS = 8;
|
|
510
|
-
var WHERE_FLAGS = /* @__PURE__ */ new Set(["root", "metarepo"]);
|
|
511
|
-
var safeWord = (w) => ID_WORD.test(w) && !w.includes("//") && redactText(w, { home: "", user: "" }) === w ? w : "\u2026";
|
|
512
|
-
function runTitle(positionals, flags) {
|
|
513
|
-
const command = positionals.slice(0, MAX_WORDS).map(safeWord);
|
|
514
|
-
const names = flags.filter((f) => /^[a-z][a-z0-9-]{0,40}$/.test(f) && !WHERE_FLAGS.has(f)).map((f) => `--${f}`);
|
|
515
|
-
return { command, title: ["atticus", ...command, ...names].join(" ") };
|
|
516
|
-
}
|
|
517
|
-
function startedByOf(env = process.env) {
|
|
518
|
-
if (env.ATTICUS_ACP_SESSION)
|
|
519
|
-
return "copilot";
|
|
520
|
-
const said = env.ATTICUS_STARTED_BY;
|
|
521
|
-
if (said === "vscode" || said === "intellij" || said === "terminal")
|
|
522
|
-
return said;
|
|
523
|
-
if (env.TERM_PROGRAM === "vscode")
|
|
524
|
-
return "vscode";
|
|
525
|
-
if ((env.TERMINAL_EMULATOR ?? "").startsWith("JetBrains"))
|
|
526
|
-
return "intellij";
|
|
527
|
-
return "terminal";
|
|
528
|
-
}
|
|
529
|
-
var hostHash = () => {
|
|
530
|
-
try {
|
|
531
|
-
return createHash("sha256").update(hostname2()).digest("hex").slice(0, 12);
|
|
532
|
-
} catch {
|
|
533
|
-
return "unknown";
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
function procStartOf(pid) {
|
|
537
|
-
if (process.platform !== "linux")
|
|
538
|
-
return void 0;
|
|
539
|
-
try {
|
|
540
|
-
const stat2 = readFileSync2(`/proc/${pid}/stat`, "utf8");
|
|
541
|
-
const v = stat2.slice(stat2.lastIndexOf(")") + 2).split(" ")[19];
|
|
542
|
-
return v && /^\d+$/.test(v) ? v : void 0;
|
|
543
|
-
} catch {
|
|
544
|
-
return void 0;
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
var pad = (n, w = 2) => String(n).padStart(w, "0");
|
|
548
|
-
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")}`;
|
|
549
|
-
var ANSI = /\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b\][^\u0007]*\u0007/g;
|
|
550
|
-
function runLogLines(text, o = {}) {
|
|
551
|
-
return text.replace(ANSI, "").split(/\r?\n|\r/).map((l) => {
|
|
552
|
-
const r = redactText(l, o);
|
|
553
|
-
return r.length > RUN_LOG_LINE_MAX ? `${r.slice(0, RUN_LOG_LINE_MAX)}\u2026` : r;
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
var writeJson = (file, v) => {
|
|
557
|
-
const text = `${JSON.stringify(v, null, 2)}
|
|
558
|
-
`;
|
|
559
|
-
const tmp = `${file}.${process.pid}.tmp`;
|
|
560
|
-
try {
|
|
561
|
-
writeFileSync2(tmp, text, "utf8");
|
|
562
|
-
renameSync2(tmp, file);
|
|
563
|
-
} catch {
|
|
564
|
-
rmSync2(tmp, { force: true });
|
|
565
|
-
writeFileSync2(file, text, "utf8");
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
function prune(root, keep, live) {
|
|
569
|
-
let names;
|
|
570
|
-
try {
|
|
571
|
-
names = readdirSync(runningDirOf(root)).filter((n) => n.endsWith(".json") && TERMINAL_RUN_ID.test(n.slice(0, -5))).sort();
|
|
572
|
-
} catch {
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
const removed = /* @__PURE__ */ new Set();
|
|
576
|
-
let over = names.length - keep;
|
|
577
|
-
for (const n of names) {
|
|
578
|
-
if (over <= 0)
|
|
579
|
-
break;
|
|
580
|
-
const id = n.slice(0, -5);
|
|
581
|
-
if (live(id))
|
|
582
|
-
continue;
|
|
583
|
-
rmSync2(join3(runningDirOf(root), n), { force: true });
|
|
584
|
-
rmSync2(join3(runLogsDirOf(root), `${id}.log`), { force: true });
|
|
585
|
-
removed.add(id);
|
|
586
|
-
over--;
|
|
587
|
-
}
|
|
588
|
-
try {
|
|
589
|
-
const kept = new Set(names.map((n) => n.slice(0, -5)).filter((id) => !removed.has(id)));
|
|
590
|
-
for (const n of readdirSync(runLogsDirOf(root)))
|
|
591
|
-
if (n.endsWith(".log") && TERMINAL_RUN_ID.test(n.slice(0, -4)) && !kept.has(n.slice(0, -4)))
|
|
592
|
-
rmSync2(join3(runLogsDirOf(root), n), { force: true });
|
|
593
|
-
} catch {
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
function startTerminalRun(root, o) {
|
|
597
|
-
const now = o.now ?? (() => /* @__PURE__ */ new Date());
|
|
598
|
-
const pid = o.pid ?? process.pid;
|
|
599
|
-
const keep = Math.max(o.keep ?? RUN_LOG_KEEP, 1);
|
|
600
|
-
const maxBytes = Math.max(o.maxBytes ?? RUN_LOG_MAX_BYTES, 256);
|
|
601
|
-
const started = now();
|
|
602
|
-
const runId = idAt(started, pid);
|
|
603
|
-
const heartbeatMs = o.heartbeatMs ?? (o.hookProcess ? RUN_HEARTBEAT_MS : void 0);
|
|
604
|
-
const procStart = o.procStart ? o.procStart() : pid === process.pid ? procStartOf(pid) : void 0;
|
|
605
|
-
const { command, title } = runTitle(o.positionals, o.flags);
|
|
606
|
-
const rec = {
|
|
607
|
-
schemaVersion: 1,
|
|
608
|
-
runId,
|
|
609
|
-
pid,
|
|
610
|
-
host: hostHash(),
|
|
611
|
-
title,
|
|
612
|
-
command,
|
|
613
|
-
flags: o.flags.filter((f) => /^[a-z][a-z0-9-]{0,40}$/.test(f)),
|
|
614
|
-
startedBy: startedByOf(o.env),
|
|
615
|
-
startedAt: started.toISOString(),
|
|
616
|
-
state: "running",
|
|
617
|
-
lines: 0,
|
|
618
|
-
dropped: 0,
|
|
619
|
-
...procStart ? { procStart } : {},
|
|
620
|
-
...heartbeatMs ? { beatAt: started.toISOString() } : {}
|
|
621
|
-
};
|
|
622
|
-
const jsonFile = join3(runningDirOf(root), `${runId}.json`);
|
|
623
|
-
const logFile = join3(runLogsDirOf(root), `${runId}.log`);
|
|
624
|
-
try {
|
|
625
|
-
mkdirSync2(runningDirOf(root), { recursive: true });
|
|
626
|
-
mkdirSync2(runLogsDirOf(root), { recursive: true });
|
|
627
|
-
ignoreLocalSync(root);
|
|
628
|
-
const alive2 = o.alive ?? pidAlive;
|
|
629
|
-
prune(root, keep - 1, (id) => {
|
|
630
|
-
const r = readRecord(root, id);
|
|
631
|
-
return !!r && r.state === "running" && !goneRun(r, rec.host, alive2, now().getTime(), root);
|
|
632
|
-
});
|
|
633
|
-
writeFileSync2(logFile, "", "utf8");
|
|
634
|
-
writeJson(jsonFile, rec);
|
|
635
|
-
} catch {
|
|
636
|
-
return void 0;
|
|
637
|
-
}
|
|
638
|
-
let bytes = 0;
|
|
639
|
-
let inFile = 0;
|
|
640
|
-
let ended = false;
|
|
641
|
-
let broken = false;
|
|
642
|
-
const save = () => {
|
|
643
|
-
try {
|
|
644
|
-
if (heartbeatMs && !ended)
|
|
645
|
-
rec.beatAt = now().toISOString();
|
|
646
|
-
writeJson(jsonFile, { ...rec, lines: rec.dropped + inFile });
|
|
647
|
-
} catch {
|
|
648
|
-
}
|
|
649
|
-
};
|
|
650
|
-
const trim = () => {
|
|
651
|
-
const all2 = readFileSync2(logFile, "utf8").split("\n");
|
|
652
|
-
if (all2.at(-1) === "")
|
|
653
|
-
all2.pop();
|
|
654
|
-
let size = 0;
|
|
655
|
-
let at = all2.length;
|
|
656
|
-
while (at > 0 && size + Buffer.byteLength(all2[at - 1]) + 1 <= maxBytes / 2) {
|
|
657
|
-
size += Buffer.byteLength(all2[at - 1]) + 1;
|
|
658
|
-
at--;
|
|
659
|
-
}
|
|
660
|
-
const kept = all2.slice(at);
|
|
661
|
-
const tmp = `${logFile}.${process.pid}.tmp`;
|
|
662
|
-
const text = kept.length ? `${kept.join("\n")}
|
|
663
|
-
` : "";
|
|
664
|
-
try {
|
|
665
|
-
writeFileSync2(tmp, text, "utf8");
|
|
666
|
-
renameSync2(tmp, logFile);
|
|
667
|
-
} catch {
|
|
668
|
-
rmSync2(tmp, { force: true });
|
|
669
|
-
writeFileSync2(logFile, text, "utf8");
|
|
670
|
-
}
|
|
671
|
-
rec.dropped += at;
|
|
672
|
-
inFile = kept.length;
|
|
673
|
-
bytes = size;
|
|
674
|
-
save();
|
|
675
|
-
};
|
|
676
|
-
const unhook = [];
|
|
677
|
-
if (heartbeatMs) {
|
|
678
|
-
const beat = setInterval(() => {
|
|
679
|
-
if (!ended)
|
|
680
|
-
save();
|
|
681
|
-
}, heartbeatMs);
|
|
682
|
-
beat.unref?.();
|
|
683
|
-
unhook.push(() => clearInterval(beat));
|
|
684
|
-
}
|
|
685
|
-
const recorder = {
|
|
686
|
-
runId,
|
|
687
|
-
line(text) {
|
|
688
|
-
if (ended || broken)
|
|
689
|
-
return;
|
|
690
|
-
try {
|
|
691
|
-
for (const l of runLogLines(text, o.redact)) {
|
|
692
|
-
const s = `${l}
|
|
693
|
-
`;
|
|
694
|
-
const n = Buffer.byteLength(s);
|
|
695
|
-
if (bytes + n > maxBytes)
|
|
696
|
-
trim();
|
|
697
|
-
appendFileSync2(logFile, s, "utf8");
|
|
698
|
-
bytes += n;
|
|
699
|
-
inFile++;
|
|
700
|
-
}
|
|
701
|
-
} catch {
|
|
702
|
-
broken = true;
|
|
703
|
-
}
|
|
704
|
-
},
|
|
705
|
-
end(code, how) {
|
|
706
|
-
if (ended)
|
|
707
|
-
return;
|
|
708
|
-
ended = true;
|
|
709
|
-
for (const u of unhook)
|
|
710
|
-
u();
|
|
711
|
-
rec.state = how === "crash" ? "failed" : code === 0 ? "done" : code === 130 || code === 143 ? "cancelled" : "failed";
|
|
712
|
-
rec.exitCode = code;
|
|
713
|
-
rec.finishedAt = now().toISOString();
|
|
714
|
-
save();
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
if (o.hookProcess) {
|
|
718
|
-
const onExit = (code) => recorder.end(typeof code === "number" ? code : 1);
|
|
719
|
-
process.once("exit", onExit);
|
|
720
|
-
unhook.push(() => process.off("exit", onExit));
|
|
721
|
-
for (const [sig, code] of [
|
|
722
|
-
["SIGINT", 130],
|
|
723
|
-
["SIGTERM", 143]
|
|
724
|
-
]) {
|
|
725
|
-
const on = () => {
|
|
726
|
-
if (process.listenerCount(sig) > 1)
|
|
727
|
-
return;
|
|
728
|
-
recorder.end(code);
|
|
729
|
-
process.exit(code);
|
|
730
|
-
};
|
|
731
|
-
process.on(sig, on);
|
|
732
|
-
unhook.push(() => process.off(sig, on));
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
return recorder;
|
|
736
|
-
}
|
|
737
|
-
function pidAlive(pid) {
|
|
738
|
-
try {
|
|
739
|
-
process.kill(pid, 0);
|
|
740
|
-
return true;
|
|
741
|
-
} catch (e) {
|
|
742
|
-
return e.code === "EPERM";
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
var DAY = 24 * 60 * 60 * 1e3;
|
|
746
|
-
var mtimeOf = (file) => {
|
|
747
|
-
try {
|
|
748
|
-
return statSync2(file).mtimeMs;
|
|
749
|
-
} catch {
|
|
750
|
-
return 0;
|
|
751
|
-
}
|
|
752
|
-
};
|
|
753
|
-
function goneRun(r, here, alive2, now, root, startOf = procStartOf) {
|
|
754
|
-
const age = now - Date.parse(r.startedAt);
|
|
755
|
-
if (r.host !== here)
|
|
756
|
-
return age > 2 * DAY;
|
|
757
|
-
if (!alive2(r.pid) || age > 7 * DAY)
|
|
758
|
-
return true;
|
|
759
|
-
const started = r.procStart ? startOf(r.pid) : void 0;
|
|
760
|
-
if (started !== void 0)
|
|
761
|
-
return started !== r.procStart;
|
|
762
|
-
if (r.beatAt) {
|
|
763
|
-
const last = Math.max(Date.parse(r.beatAt) || 0, mtimeOf(join3(runLogsDirOf(root), `${r.runId}.log`)));
|
|
764
|
-
return now - last > RUN_SILENT_MS;
|
|
765
|
-
}
|
|
766
|
-
return false;
|
|
767
|
-
}
|
|
768
|
-
function readRecord(root, runId) {
|
|
769
|
-
if (!TERMINAL_RUN_ID.test(runId))
|
|
770
|
-
return void 0;
|
|
771
|
-
try {
|
|
772
|
-
const r = JSON.parse(readFileSync2(join3(runningDirOf(root), `${runId}.json`), "utf8"));
|
|
773
|
-
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))
|
|
774
|
-
return void 0;
|
|
775
|
-
return {
|
|
776
|
-
...r,
|
|
777
|
-
command: Array.isArray(r.command) ? r.command.map(String) : [],
|
|
778
|
-
flags: Array.isArray(r.flags) ? r.flags.map(String) : [],
|
|
779
|
-
lines: Number(r.lines) || 0,
|
|
780
|
-
dropped: Number(r.dropped) || 0,
|
|
781
|
-
...typeof r.procStart === "string" ? { procStart: r.procStart } : {},
|
|
782
|
-
...typeof r.beatAt === "string" ? { beatAt: r.beatAt } : {}
|
|
783
|
-
};
|
|
784
|
-
} catch {
|
|
785
|
-
return void 0;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
function readTerminalRuns(root, o = {}) {
|
|
789
|
-
let names;
|
|
790
|
-
try {
|
|
791
|
-
names = readdirSync(runningDirOf(root));
|
|
792
|
-
} catch {
|
|
793
|
-
return [];
|
|
794
|
-
}
|
|
795
|
-
const here = hostHash();
|
|
796
|
-
const alive2 = o.alive ?? pidAlive;
|
|
797
|
-
const now = (o.now ?? (() => /* @__PURE__ */ new Date()))().getTime();
|
|
798
|
-
const out = [];
|
|
799
|
-
for (const n of names.sort().reverse()) {
|
|
800
|
-
if (!n.endsWith(".json"))
|
|
801
|
-
continue;
|
|
802
|
-
const r = readRecord(root, n.slice(0, -5));
|
|
803
|
-
if (!r)
|
|
804
|
-
continue;
|
|
805
|
-
if (r.state === "running") {
|
|
806
|
-
if (goneRun(r, here, alive2, now, root, o.startOf)) {
|
|
807
|
-
out.push({ ...r, stale: true });
|
|
808
|
-
continue;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
out.push(r);
|
|
812
|
-
}
|
|
813
|
-
return out;
|
|
814
|
-
}
|
|
815
|
-
var readTerminalRun = (root, runId, o = {}) => TERMINAL_RUN_ID.test(runId) ? readTerminalRuns(root, o).find((r) => r.runId === runId) : void 0;
|
|
816
|
-
function readTerminalRunLines(root, runId, from, max = RUN_LOG_READ_MAX) {
|
|
817
|
-
const r = readRecord(root, runId);
|
|
818
|
-
if (!r)
|
|
819
|
-
return void 0;
|
|
820
|
-
let text;
|
|
821
|
-
try {
|
|
822
|
-
text = readFileSync2(join3(runLogsDirOf(root), `${runId}.log`), "utf8");
|
|
823
|
-
} catch {
|
|
824
|
-
text = "";
|
|
825
|
-
}
|
|
826
|
-
const all2 = text.split("\n");
|
|
827
|
-
all2.pop();
|
|
828
|
-
const total = r.dropped + all2.length;
|
|
829
|
-
const start = from === void 0 ? Math.max(total - max, r.dropped) : Math.max(Math.min(from, total), r.dropped);
|
|
830
|
-
const lines = all2.slice(start - r.dropped, start - r.dropped + max);
|
|
831
|
-
return { from: start, lines, total };
|
|
832
|
-
}
|
|
833
|
-
function linesIn(buf, skip, max) {
|
|
834
|
-
const lines = [];
|
|
835
|
-
let at = 0;
|
|
836
|
-
let n = 0;
|
|
837
|
-
while (at < buf.length) {
|
|
838
|
-
const nl = buf.indexOf(10, at);
|
|
839
|
-
if (nl < 0)
|
|
840
|
-
break;
|
|
841
|
-
if (n >= skip) {
|
|
842
|
-
if (lines.length >= max)
|
|
843
|
-
return { lines, end: at, more: true };
|
|
844
|
-
lines.push(buf.toString("utf8", at, nl));
|
|
845
|
-
}
|
|
846
|
-
n++;
|
|
847
|
-
at = nl + 1;
|
|
848
|
-
}
|
|
849
|
-
return { lines, end: at, more: false };
|
|
850
|
-
}
|
|
851
|
-
function readFrom(file, from, size) {
|
|
852
|
-
const buf = Buffer.alloc(Math.max(size - from, 0));
|
|
853
|
-
if (!buf.length)
|
|
854
|
-
return buf;
|
|
855
|
-
const fd = openSync(file, "r");
|
|
856
|
-
try {
|
|
857
|
-
let got = 0;
|
|
858
|
-
while (got < buf.length) {
|
|
859
|
-
const n = readSync(fd, buf, got, buf.length - got, from + got);
|
|
860
|
-
if (n <= 0)
|
|
861
|
-
break;
|
|
862
|
-
got += n;
|
|
863
|
-
}
|
|
864
|
-
return got < buf.length ? buf.subarray(0, got) : buf;
|
|
865
|
-
} finally {
|
|
866
|
-
closeSync(fd);
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
function tailTerminalRunLines(root, runId, at, max = RUN_LOG_READ_MAX) {
|
|
870
|
-
const file = join3(runLogsDirOf(root), `${runId}.log`);
|
|
871
|
-
for (let tries = 0; ; tries++) {
|
|
872
|
-
const r = readRecord(root, runId);
|
|
873
|
-
if (!r)
|
|
874
|
-
return void 0;
|
|
875
|
-
let size = 0;
|
|
876
|
-
let ino = 0;
|
|
877
|
-
try {
|
|
878
|
-
const st = statSync2(file);
|
|
879
|
-
size = st.size;
|
|
880
|
-
ino = st.ino;
|
|
881
|
-
} catch {
|
|
882
|
-
}
|
|
883
|
-
if (at && at.dropped === r.dropped && at.ino === ino && size >= at.bytes) {
|
|
884
|
-
let buf2;
|
|
885
|
-
try {
|
|
886
|
-
buf2 = readFrom(file, at.bytes, size);
|
|
887
|
-
} catch {
|
|
888
|
-
buf2 = Buffer.alloc(0);
|
|
889
|
-
}
|
|
890
|
-
const got2 = linesIn(buf2, 0, max);
|
|
891
|
-
return {
|
|
892
|
-
from: at.line,
|
|
893
|
-
lines: got2.lines,
|
|
894
|
-
at: {
|
|
895
|
-
line: at.line + got2.lines.length,
|
|
896
|
-
bytes: at.bytes + got2.end,
|
|
897
|
-
dropped: r.dropped,
|
|
898
|
-
ino
|
|
899
|
-
},
|
|
900
|
-
more: got2.more
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
let buf;
|
|
904
|
-
try {
|
|
905
|
-
buf = readFileSync2(file);
|
|
906
|
-
} catch {
|
|
907
|
-
buf = Buffer.alloc(0);
|
|
908
|
-
}
|
|
909
|
-
const again = readRecord(root, runId);
|
|
910
|
-
if (again && again.dropped !== r.dropped && tries < 1)
|
|
911
|
-
continue;
|
|
912
|
-
let count = 0;
|
|
913
|
-
for (let i = buf.indexOf(10); i >= 0; i = buf.indexOf(10, i + 1))
|
|
914
|
-
count++;
|
|
915
|
-
const total = r.dropped + count;
|
|
916
|
-
const start = at === void 0 ? Math.max(total - max, r.dropped) : Math.max(Math.min(at.line, total), r.dropped);
|
|
917
|
-
const got = linesIn(buf, start - r.dropped, max);
|
|
918
|
-
return {
|
|
919
|
-
from: start,
|
|
920
|
-
lines: got.lines,
|
|
921
|
-
at: { line: start + got.lines.length, bytes: got.end, dropped: r.dropped, ino },
|
|
922
|
-
more: got.more
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
// packages/core/dist/printer.js
|
|
928
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
929
|
-
var printer = new AsyncLocalStorage();
|
|
930
|
-
function withPrinter(print, work) {
|
|
931
|
-
return printer.run(print, work);
|
|
932
|
-
}
|
|
933
|
-
function printToCurrent(line) {
|
|
934
|
-
const p = printer.getStore();
|
|
935
|
-
if (!p)
|
|
936
|
-
return;
|
|
937
|
-
try {
|
|
938
|
-
p(line);
|
|
939
|
-
} catch {
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
export {
|
|
944
|
-
writeFileAtomic,
|
|
945
|
-
FileChangedError,
|
|
946
|
-
writeFileIfUnchanged,
|
|
947
|
-
renameRetrying,
|
|
948
|
-
LockHeldError,
|
|
949
|
-
lockFileOf,
|
|
950
|
-
readLock,
|
|
951
|
-
acquireLock,
|
|
952
|
-
sharedLockFileOf,
|
|
953
|
-
QUICK_WRITE_LOCK,
|
|
954
|
-
withSharedFileLock,
|
|
955
|
-
LOCAL_ONLY,
|
|
956
|
-
ensureLocalIgnore,
|
|
957
|
-
LOG_MAX_BYTES,
|
|
958
|
-
LOG_KEEP,
|
|
959
|
-
logFileOf,
|
|
960
|
-
redactText,
|
|
961
|
-
redact,
|
|
962
|
-
logLevelFrom,
|
|
963
|
-
createLog,
|
|
964
|
-
ignoreLocalSync,
|
|
965
|
-
NO_LOG,
|
|
966
|
-
RUN_LOG_KEEP,
|
|
967
|
-
RUN_LOG_MAX_BYTES,
|
|
968
|
-
RUN_LOG_LINE_MAX,
|
|
969
|
-
RUN_LOG_READ_MAX,
|
|
970
|
-
RUN_HEARTBEAT_MS,
|
|
971
|
-
RUN_SILENT_MS,
|
|
972
|
-
TERMINAL_RUN_ID,
|
|
973
|
-
runLogsDirOf,
|
|
974
|
-
runningDirOf,
|
|
975
|
-
recordedCommand,
|
|
976
|
-
runTitle,
|
|
977
|
-
startedByOf,
|
|
978
|
-
procStartOf,
|
|
979
|
-
runLogLines,
|
|
980
|
-
startTerminalRun,
|
|
981
|
-
pidAlive,
|
|
982
|
-
readTerminalRuns,
|
|
983
|
-
readTerminalRun,
|
|
984
|
-
readTerminalRunLines,
|
|
985
|
-
tailTerminalRunLines,
|
|
986
|
-
withPrinter,
|
|
987
|
-
printToCurrent
|
|
988
|
-
};
|