@maycombhq/atticus 2.0.0-beta.22 → 2.0.0-beta.24
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 +12 -7
- package/dist/{chunk-J2JAKCIW.js → chunk-25CUJJTP.js} +511 -291
- package/dist/chunk-26AB2WNW.js +62 -0
- package/dist/{chunk-VBTP56CE.js → chunk-2ITYURTR.js} +9 -8
- package/dist/{chunk-6ZJ5A7AF.js → chunk-2JHE75RW.js} +13 -11
- package/dist/{chunk-QFWA2DPH.js → chunk-37UTWGU4.js} +8 -6
- package/dist/{chunk-VW62D6QE.js → chunk-3BEGKSDW.js} +14 -12
- package/dist/{chunk-3RM4UK6W.js → chunk-3FGQFDS4.js} +20 -18
- package/dist/{chunk-23XVSEV5.js → chunk-3NS4RS3C.js} +20 -18
- package/dist/{chunk-FSMSFDLD.js → chunk-3TGX4SJ3.js} +10 -7
- package/dist/{chunk-7JITZFJC.js → chunk-3UMKLB6P.js} +7 -5
- package/dist/chunk-3VS7RNEB.js +96 -0
- package/dist/{chunk-AJYXNTNZ.js → chunk-3XCCT2GR.js} +167 -42
- package/dist/{chunk-XERYFDB5.js → chunk-3XZRYQWU.js} +38 -34
- package/dist/{chunk-FUJM6RTF.js → chunk-432FGEVB.js} +9 -7
- package/dist/{chunk-SFUP7TTO.js → chunk-44QUCNPH.js} +7 -5
- package/dist/{chunk-O5PXQR67.js → chunk-4CS3PMIM.js} +15 -13
- package/dist/{chunk-RGERPOIV.js → chunk-4DCIUKIE.js} +22 -12
- package/dist/{chunk-RLDGWLQ7.js → chunk-4DX4DIND.js} +9 -7
- package/dist/chunk-4MNMOUU7.js +108 -0
- package/dist/{chunk-SLXZOMA6.js → chunk-4RKIOUPA.js} +9 -7
- package/dist/{chunk-AJQ72EBM.js → chunk-532HDXMM.js} +9 -7
- package/dist/{chunk-CADWLE2T.js → chunk-5EIKOU7L.js} +6 -4
- package/dist/{chunk-CQDGOPGH.js → chunk-5FPAKAGE.js} +7 -5
- package/dist/{chunk-IVBOQAGB.js → chunk-5FUFVNXB.js} +27 -3
- package/dist/{chunk-UUU4CLJG.js → chunk-5MKV4TV6.js} +5 -1
- package/dist/{chunk-ZQXZ2SES.js → chunk-5ORLKITZ.js} +23 -21
- package/dist/{chunk-OHVTTOPS.js → chunk-5PSKLTBR.js} +3 -3
- package/dist/{chunk-RUGXBPWI.js → chunk-5QF5W5P2.js} +10 -10
- package/dist/{chunk-BPK5P77O.js → chunk-5Z7L2TSR.js} +3 -3
- package/dist/{chunk-L27SV425.js → chunk-66DWUSNY.js} +22 -20
- package/dist/{chunk-JAVI7JSP.js → chunk-6FIYEB7M.js} +25 -22
- package/dist/{chunk-VY72R2XZ.js → chunk-6OZAQPU5.js} +532 -358
- package/dist/{chunk-AFWUDXEM.js → chunk-6TNQO76I.js} +34 -17
- package/dist/{chunk-WF7B67YE.js → chunk-6UTD5RQH.js} +18 -16
- package/dist/{chunk-HNM2YQT2.js → chunk-775FMPUB.js} +7 -7
- package/dist/{chunk-7ASNL4Q4.js → chunk-77AZRGWE.js} +19 -16
- package/dist/{chunk-WKUJ3KPV.js → chunk-7HWCEDPX.js} +7 -5
- package/dist/{chunk-G6X77UJZ.js → chunk-7U46TCRZ.js} +25 -22
- package/dist/{chunk-O45HFTFS.js → chunk-A3NUZJFI.js} +4 -2
- package/dist/{chunk-UPOY4YSQ.js → chunk-A4VDFIMR.js} +14 -12
- package/dist/{chunk-EMRIQUND.js → chunk-A53IYUCR.js} +87 -29
- package/dist/{chunk-S4PMJU6H.js → chunk-A6ZG3UOS.js} +108 -50
- package/dist/{chunk-PMUAJGLI.js → chunk-AAY6VPPO.js} +18 -16
- package/dist/{chunk-MG4ZL5RW.js → chunk-ABDE5IRC.js} +18 -16
- package/dist/{chunk-T6DQR5TV.js → chunk-AM7PYKVP.js} +15 -13
- package/dist/{chunk-SFSPGFCV.js → chunk-ANUMIPF6.js} +22 -20
- package/dist/{chunk-VTZMAJ3W.js → chunk-ASFRT33J.js} +11 -9
- package/dist/{chunk-7FTTA3HD.js → chunk-AWDCVZYO.js} +9 -7
- package/dist/{chunk-KFAVQZSX.js → chunk-B63NWU3P.js} +14 -12
- package/dist/{chunk-YYY3AZFE.js → chunk-BBZ6UKN3.js} +16 -5
- package/dist/{chunk-Q4K5WB2W.js → chunk-BFQ5IKQA.js} +12 -10
- package/dist/{chunk-ZFL7NY4F.js → chunk-BLVFHN3C.js} +73 -42
- package/dist/{chunk-MO6P2JZH.js → chunk-BQXAHIZ6.js} +10 -8
- package/dist/{chunk-Y2EQNWKV.js → chunk-BTS56NV7.js} +91 -41
- package/dist/{chunk-UGUP3ZM6.js → chunk-BWYW533C.js} +18 -16
- package/dist/{chunk-O7FDLW7L.js → chunk-BYKWWSXL.js} +14 -12
- package/dist/chunk-C7BB6IQT.js +147 -0
- package/dist/{chunk-JLUCKAEL.js → chunk-CCQWQFOT.js} +19 -17
- package/dist/{chunk-SYV5LHML.js → chunk-CCQZN6W3.js} +35 -33
- package/dist/{chunk-UCROWG2D.js → chunk-CFSBBLDD.js} +28 -25
- package/dist/{chunk-EIPTLPFC.js → chunk-CFSHLQPK.js} +26 -24
- package/dist/{chunk-2IIMFOPM.js → chunk-CI4D6VSU.js} +20 -18
- package/dist/{chunk-66PPNOON.js → chunk-CKRPMRFQ.js} +28 -25
- package/dist/{chunk-IUPG3UKI.js → chunk-CNF2EZ6S.js} +191 -125
- package/dist/chunk-CTJHEG6A.js +97 -0
- package/dist/{chunk-DOBQKHIF.js → chunk-CU7ZK7KP.js} +30 -29
- package/dist/{chunk-745DAZ4L.js → chunk-CZ75S2EZ.js} +886 -313
- package/dist/{chunk-LGFL54FP.js → chunk-D5CJEKZI.js} +11 -4
- package/dist/{chunk-PBPBMP2B.js → chunk-D5ZC7IMC.js} +5 -3
- package/dist/{chunk-LZ7NUC62.js → chunk-D63NU53X.js} +20 -18
- package/dist/{chunk-BO4KX37X.js → chunk-DCQSPSXU.js} +28 -23
- package/dist/{chunk-WXFLMQSR.js → chunk-DCRZ3OQ7.js} +8 -6
- package/dist/chunk-DD2AXECF.js +41 -0
- package/dist/{chunk-4EURQWQD.js → chunk-DF6DPCW2.js} +16 -14
- package/dist/{chunk-53T4O55J.js → chunk-DH3EQMIA.js} +5 -3
- package/dist/{chunk-ZX57KSEQ.js → chunk-DIXA74N7.js} +5 -3
- package/dist/{chunk-6ZGLAACW.js → chunk-DIYNRYXW.js} +2 -2
- package/dist/chunk-DYDNW4O6.js +52 -0
- package/dist/{chunk-P2V7QW4D.js → chunk-E7YDJH6B.js} +16 -14
- package/dist/chunk-EEKQI3U4.js +45 -0
- package/dist/{chunk-GZY6RUZ6.js → chunk-EHF2MBGR.js} +9 -4
- package/dist/chunk-EHXDB3SA.js +25 -0
- package/dist/{chunk-PJSJPMJI.js → chunk-ENZ3PI7L.js} +3 -3
- package/dist/{chunk-E3ISYXO3.js → chunk-EPQQ2XVM.js} +16 -14
- package/dist/{chunk-7IGKHZ4Z.js → chunk-ESJALLOK.js} +222 -213
- package/dist/chunk-ETQSQ2EC.js +33 -0
- package/dist/{chunk-MFR5OPBD.js → chunk-EUMXLSW5.js} +14 -6
- package/dist/{chunk-BTY3HZBO.js → chunk-F63F4NKT.js} +18 -16
- package/dist/{chunk-ZFFYNRIO.js → chunk-FDL2JOLB.js} +26 -22
- package/dist/{chunk-5SJZW52K.js → chunk-FFDVAV56.js} +24 -22
- package/dist/chunk-FFYOZ7PF.js +27 -0
- package/dist/{chunk-RXPJMEOW.js → chunk-FGW5TLGM.js} +24 -19
- package/dist/{chunk-UPS2DGFC.js → chunk-FL53R4SW.js} +1 -1
- package/dist/chunk-FYWLB7PO.js +38 -0
- package/dist/{chunk-FFLNS6VP.js → chunk-G3W7GNEP.js} +24 -18
- package/dist/chunk-G3ZFEHCX.js +925 -0
- package/dist/{chunk-YHCMZC2J.js → chunk-G67GOK4S.js} +10 -8
- package/dist/{chunk-2F4CYZKJ.js → chunk-GCMDDVIE.js} +14 -9
- package/dist/{chunk-QKUJMING.js → chunk-GFYVVTKH.js} +10 -8
- package/dist/chunk-GJVCBTSO.js +20722 -0
- package/dist/{chunk-VCTWPLAO.js → chunk-GKZDHXC2.js} +8 -8
- package/dist/{chunk-5BD2KYLE.js → chunk-GQFUEUC7.js} +18 -16
- package/dist/chunk-GQPP4P2E.js +33 -0
- package/dist/{chunk-42SIDKEU.js → chunk-GS7N3RFG.js} +51 -32
- package/dist/{chunk-LJXMYKZJ.js → chunk-GXQYEIYM.js} +7 -5
- package/dist/{chunk-VNU26RCO.js → chunk-H5EQOSTC.js} +43 -33
- package/dist/{chunk-W7VWI2YH.js → chunk-H7KERB6Q.js} +7 -5
- package/dist/{chunk-OUBGGKDU.js → chunk-HGDBM3A5.js} +5 -3
- package/dist/{chunk-JENSEMXF.js → chunk-HI7ADE4E.js} +1 -1
- package/dist/{chunk-CXJ6FUKN.js → chunk-HNPKCRCE.js} +1010 -330
- package/dist/{chunk-FPJPLKDW.js → chunk-HRHXTLUM.js} +40 -16
- package/dist/{chunk-57TDNMI3.js → chunk-HRYI22QU.js} +17 -15
- package/dist/{chunk-LO6P2VYG.js → chunk-HWNFFCGB.js} +5 -3
- package/dist/{chunk-XI2LCCYQ.js → chunk-HXFZX2BI.js} +12 -8
- package/dist/{chunk-H7KM7LZE.js → chunk-HYHV2P3G.js} +16 -13
- package/dist/{chunk-X3WY6MN3.js → chunk-IB66ZLDN.js} +10 -8
- package/dist/{chunk-3NFFJL5D.js → chunk-IJQHBK76.js} +1 -1
- package/dist/{chunk-LQJPN536.js → chunk-IK6LHW3E.js} +6 -4
- package/dist/{chunk-DCZWQLYT.js → chunk-IOHRX4KF.js} +26 -21
- package/dist/{chunk-2GF7OLF3.js → chunk-IRXZKKCG.js} +21 -15
- package/dist/{chunk-Z5IA3WDR.js → chunk-IUBBEU6O.js} +160 -81
- package/dist/{chunk-W62H2XSO.js → chunk-IWPO5AUT.js} +29 -26
- package/dist/{chunk-BEVTIBRH.js → chunk-J4K4C4T5.js} +31 -15
- package/dist/{chunk-WERM6KPJ.js → chunk-JCEYOSST.js} +14 -6
- package/dist/{chunk-HYU5VLGA.js → chunk-JCG2EBNB.js} +1 -1
- package/dist/{chunk-UNAGJYET.js → chunk-JFBVIMGY.js} +14 -12
- package/dist/chunk-JJ4SCGRJ.js +43 -0
- package/dist/{chunk-2Q5EDGEO.js → chunk-JLYH2QOE.js} +7 -5
- package/dist/{chunk-X4CXA2IL.js → chunk-JMH6TCZJ.js} +23 -21
- package/dist/{chunk-6PPOWY5E.js → chunk-JUHZBZPZ.js} +17 -13
- package/dist/{chunk-GUX3PTYM.js → chunk-JVMNEI7B.js} +3 -3
- package/dist/chunk-JYJMIAFS.js +44 -0
- package/dist/{chunk-34S2WGOB.js → chunk-KIY2WCN7.js} +7 -3
- package/dist/chunk-KVVNAUIG.js +66 -0
- package/dist/{chunk-M32BLWDH.js → chunk-KYO5HT4G.js} +14 -12
- package/dist/chunk-L27KUL5B.js +38 -0
- package/dist/chunk-L3PIN47C.js +18 -0
- package/dist/{chunk-IH2XURVQ.js → chunk-L6Z6TMIK.js} +5 -5
- package/dist/{chunk-E6ZIEVOI.js → chunk-LAGZBQHK.js} +16 -13
- package/dist/chunk-LBG4GMOR.js +68 -0
- package/dist/{chunk-UF4GLFBX.js → chunk-LDKP7OWQ.js} +33 -24
- package/dist/{chunk-ZQ7SKESZ.js → chunk-LELM7X5H.js} +13 -11
- package/dist/{chunk-INQHESFB.js → chunk-LIB6AUZS.js} +6 -4
- package/dist/{chunk-H5HBGNXU.js → chunk-LIQWFDOZ.js} +6 -4
- package/dist/{chunk-TYQBFTBR.js → chunk-LKUTBQ2Y.js} +8 -6
- package/dist/{chunk-7BR7IPOH.js → chunk-LOCJHNZI.js} +10 -8
- package/dist/{chunk-SQV37XO2.js → chunk-LTIXFLYE.js} +6 -6
- package/dist/{chunk-3NWDLGG6.js → chunk-M3RWF7MC.js} +33 -29
- package/dist/chunk-MA6UK7GX.js +42 -0
- package/dist/{chunk-ISUAAMGS.js → chunk-MCE74XMF.js} +25 -16
- package/dist/{chunk-EGQRREQH.js → chunk-MDTAZ6NE.js} +37 -24
- package/dist/{chunk-ZZK56BLP.js → chunk-MMOMKHAX.js} +6 -4
- package/dist/{chunk-P32RUW3B.js → chunk-MOWUP33K.js} +49 -15
- package/dist/{chunk-UOR2DTHH.js → chunk-MPATOMY5.js} +18 -14
- package/dist/{chunk-LNBQOP7D.js → chunk-MQFSEGTU.js} +23 -21
- package/dist/{chunk-2Q56PQPS.js → chunk-MT3FNSXO.js} +4 -4
- package/dist/{chunk-FZOJFH7Q.js → chunk-MUY5MAGM.js} +15 -12
- package/dist/{chunk-7DOR27HL.js → chunk-MVXMISNA.js} +9 -7
- package/dist/{chunk-CX4RZ2KS.js → chunk-MWN7CBVL.js} +5 -3
- package/dist/{chunk-BXYMYEJ4.js → chunk-MZWM73S2.js} +18 -17
- package/dist/chunk-NBZ7RKX3.js +46 -0
- package/dist/{chunk-EPCJQQWD.js → chunk-NC56V6KQ.js} +6 -4
- package/dist/{chunk-7UOMVMFG.js → chunk-NN6AXKFX.js} +17 -15
- package/dist/{chunk-BIGDQDHD.js → chunk-NOU5IBLM.js} +6 -4
- package/dist/{chunk-LFGTYX5U.js → chunk-NQDHRT2H.js} +20 -18
- package/dist/{chunk-KDNTAPLX.js → chunk-NTEPBOAF.js} +6 -4
- package/dist/{chunk-LYBNHMVZ.js → chunk-NTOPAOBY.js} +3 -3
- package/dist/{chunk-R44CYFPV.js → chunk-NX5IPHI3.js} +19 -16
- package/dist/{chunk-GCWRWSU7.js → chunk-O4ZWZZZT.js} +6 -4
- package/dist/chunk-OCU5S2XG.js +36 -0
- package/dist/{chunk-SU74NDMQ.js → chunk-OKSRK2LJ.js} +19 -17
- package/dist/{chunk-XD75VZIH.js → chunk-OSWOIFRQ.js} +9 -7
- package/dist/{chunk-PKBHS4AA.js → chunk-OSZTENIA.js} +54 -21
- package/dist/{chunk-NDCF4R6S.js → chunk-OTUBMKSG.js} +10 -8
- package/dist/{chunk-THDMSZ3R.js → chunk-OYKNPZCV.js} +2837 -693
- package/dist/{chunk-ZQ3ON2VQ.js → chunk-OYTSRNSZ.js} +8 -6
- package/dist/chunk-OYZ64UMQ.js +67 -0
- package/dist/{chunk-UF4AZOZB.js → chunk-PB3NCPRF.js} +10 -8
- package/dist/chunk-PIPJZIJE.js +47 -0
- package/dist/{chunk-2RLKFUUL.js → chunk-PIPYJTIL.js} +27 -24
- package/dist/{chunk-MZCGSXVR.js → chunk-PUMNCWHJ.js} +15 -13
- package/dist/{chunk-X5F3Q5LV.js → chunk-PZBNDFZ7.js} +35 -25
- package/dist/chunk-Q2ULHBCJ.js +59 -0
- package/dist/{chunk-ZJFRMSJT.js → chunk-Q5QSWV2R.js} +14 -12
- package/dist/{chunk-Q2TECDIT.js → chunk-QFDPX6C4.js} +2886 -20703
- package/dist/{chunk-WG5U3F5V.js → chunk-QGBS4GMS.js} +14 -12
- package/dist/{chunk-BTGPE6CR.js → chunk-QIDSEHJA.js} +17 -15
- package/dist/{chunk-Q6DFNVRJ.js → chunk-QJ3AYXVO.js} +14 -12
- package/dist/{chunk-EBL2R3YG.js → chunk-QK6CGRKK.js} +6 -4
- package/dist/{chunk-S7FCV7S5.js → chunk-QOC3Q4UU.js} +1 -1
- package/dist/{chunk-JJF6HALY.js → chunk-QPLNB2BM.js} +5 -3
- package/dist/chunk-QVF4KYIO.js +71 -0
- package/dist/{chunk-6OJQOPUN.js → chunk-QXXEO4TF.js} +5 -3
- package/dist/{chunk-F3P7N7SF.js → chunk-QYFNVQLK.js} +1 -1
- package/dist/{chunk-6MUGR4LS.js → chunk-R6CJOMPC.js} +106 -29
- package/dist/{chunk-BDKC6H5P.js → chunk-ROWZYQOI.js} +9 -7
- package/dist/{chunk-2MMCFP5C.js → chunk-RQAMZVWW.js} +10 -8
- package/dist/chunk-RQSUFGU2.js +55 -0
- package/dist/{chunk-SDKLKB6I.js → chunk-RRKM3GJA.js} +38 -28
- package/dist/{chunk-OHNCWBKF.js → chunk-RSHVSXPJ.js} +7 -5
- package/dist/chunk-RSKMV3VC.js +22 -0
- package/dist/{chunk-U76OWS3Q.js → chunk-RU5W7JJQ.js} +25 -23
- package/dist/{chunk-63YRMR6J.js → chunk-RYY554OA.js} +7 -5
- package/dist/{chunk-5NMKONLP.js → chunk-SGYQORAD.js} +7 -3
- package/dist/{chunk-JA5FI3QV.js → chunk-SLGUSFOD.js} +3 -3
- package/dist/{chunk-M3NANSDZ.js → chunk-SUAHNYNQ.js} +17 -15
- package/dist/{chunk-QAXW2N3B.js → chunk-SUYC5NP6.js} +34 -34
- package/dist/{chunk-FFTRTL6R.js → chunk-SWSGRRNO.js} +6 -4
- package/dist/{chunk-UWOJLHFT.js → chunk-SYLXQNPC.js} +38 -24
- package/dist/chunk-T24TBI7F.js +54 -0
- package/dist/chunk-T2HXLDY3.js +55 -0
- package/dist/{chunk-O4GXGGBX.js → chunk-T5NH5L7A.js} +16 -13
- package/dist/{chunk-KXITGYLF.js → chunk-TAR6T2RE.js} +4 -2
- package/dist/chunk-TBQHBOFF.js +324 -0
- package/dist/{chunk-LKOR5UET.js → chunk-TKE6ZJMM.js} +26 -24
- package/dist/chunk-TKEXS74L.js +52 -0
- package/dist/{chunk-J3IOLXWM.js → chunk-TXYMNKGM.js} +16 -14
- package/dist/{chunk-IDKCWSM5.js → chunk-U2JTTRKS.js} +401 -115
- package/dist/{chunk-TNR75OXT.js → chunk-U37ZOYJJ.js} +11 -8
- package/dist/{chunk-7MJSQTL5.js → chunk-U57VLY6X.js} +23 -21
- package/dist/{chunk-BHT7QK4G.js → chunk-U66RQUFC.js} +6 -4
- package/dist/chunk-UCFNHK5L.js +50 -0
- package/dist/{chunk-IFKEI4SA.js → chunk-UI6KNLSO.js} +31 -11
- package/dist/{chunk-7GJS6DNX.js → chunk-UKRJ2ISN.js} +13 -3
- package/dist/chunk-UWJOM457.js +232 -0
- package/dist/{chunk-D73UEXYW.js → chunk-UXO25YBN.js} +3 -3
- package/dist/chunk-VE2T5URA.js +51 -0
- package/dist/{chunk-C3RY6KU6.js → chunk-W4EG25TI.js} +513 -172
- package/dist/{chunk-O66DM6DJ.js → chunk-WAAPMZWO.js} +6 -4
- package/dist/{chunk-R7NYHMUU.js → chunk-WECCLSYY.js} +4884 -3669
- package/dist/chunk-WQDJGNJQ.js +45 -0
- package/dist/{chunk-UWMJKX5U.js → chunk-WWSCJBF6.js} +14 -12
- package/dist/{chunk-N3XIYPU3.js → chunk-X7HFXXTZ.js} +16 -13
- package/dist/chunk-X7XVMYIL.js +5 -0
- package/dist/{chunk-NR2UJWOC.js → chunk-XERIHPBF.js} +12 -9
- package/dist/{chunk-JRBFANFE.js → chunk-XKNISZ6N.js} +21 -18
- package/dist/{chunk-PPD7HTDP.js → chunk-XNH5ZWIA.js} +20 -18
- package/dist/{chunk-7IOWA5D5.js → chunk-XNW3EDCY.js} +13 -3
- package/dist/{chunk-2LGRMVCA.js → chunk-XPXOKHNZ.js} +13 -11
- package/dist/{chunk-ZJXLNDH4.js → chunk-XXRBAJ36.js} +14 -12
- package/dist/{chunk-EHA7RMZ3.js → chunk-YA2IJJ6N.js} +8 -6
- package/dist/{chunk-LGBMTVNT.js → chunk-YB5AKYVQ.js} +7 -5
- package/dist/{chunk-JB5LINEM.js → chunk-YDDLVBQ4.js} +3 -3
- package/dist/{chunk-PAQ2AS5E.js → chunk-YF6N45QN.js} +1 -1
- package/dist/{chunk-WMTRHUI5.js → chunk-YHWX5LPT.js} +23 -21
- package/dist/{chunk-KQGURXFU.js → chunk-YLZNTVZR.js} +36 -13
- package/dist/{chunk-NY2XSR5K.js → chunk-YUJTOALL.js} +118 -18
- package/dist/{chunk-VZALIKIF.js → chunk-Z5YDTIWQ.js} +19 -16
- package/dist/{chunk-LDLL7LB3.js → chunk-ZCU2UY47.js} +24 -22
- package/dist/{chunk-OWNCM4ZN.js → chunk-ZIAYNHHE.js} +197 -17
- package/dist/{chunk-WJF2CS6M.js → chunk-ZJ2W2RDE.js} +7 -5
- package/dist/{chunk-REWWDVQB.js → chunk-ZRQHSMPK.js} +6 -4
- package/dist/{chunk-O7XLYEFA.js → chunk-ZSD75FYI.js} +57 -23
- package/dist/chunk-ZSNNF26J.js +220 -0
- package/dist/{chunk-BQ4SQQC6.js → chunk-ZX6RAGE6.js} +11 -9
- package/dist/files.json +583 -515
- package/dist/packages/sdk/npm/index.js +6428 -4882
- package/dist/packages/ui/dist/assets/{elk-api-CIf-0gz5.js → elk-api--rH6Kdl4.js} +2 -2
- package/dist/packages/ui/dist/assets/index-Bf2immpE.css +1 -0
- package/dist/packages/ui/dist/assets/index-CH4nGIW3.js +62 -0
- package/dist/packages/ui/dist/index.html +2 -2
- package/package.json +6 -6
- package/dist/chunk-2SKB4O2E.js +0 -59
- package/dist/chunk-4U276ICE.js +0 -39
- package/dist/chunk-6H3Z5JHH.js +0 -64
- package/dist/chunk-AFZ3QA6W.js +0 -47
- package/dist/chunk-AVTBS4OW.js +0 -49
- package/dist/chunk-C4R4JLHE.js +0 -40
- package/dist/chunk-CBGGOQWU.js +0 -82
- package/dist/chunk-CMDXGQTS.js +0 -47
- package/dist/chunk-DLOBCJL6.js +0 -48
- package/dist/chunk-GIW4ZVDB.js +0 -39
- package/dist/chunk-IP74LCOQ.js +0 -57
- package/dist/chunk-IPHHDDC6.js +0 -45
- package/dist/chunk-KJXD4PNL.js +0 -50
- package/dist/chunk-KN5BXMWN.js +0 -44
- package/dist/chunk-MFHL5URL.js +0 -31
- package/dist/chunk-NXJ5URP6.js +0 -51
- package/dist/chunk-OMI6FPPN.js +0 -43
- package/dist/chunk-ONUPY3H6.js +0 -53
- package/dist/chunk-OTLDSZDV.js +0 -69
- package/dist/chunk-PSOFBQWB.js +0 -42
- package/dist/chunk-T4YPZIQN.js +0 -36
- package/dist/chunk-TUULXQRW.js +0 -420
- package/dist/chunk-WNKPRSGI.js +0 -36
- package/dist/packages/ui/dist/assets/index-CoK_Dl0D.js +0 -47
- package/dist/packages/ui/dist/assets/index-Dw20IRhQ.css +0 -1
- package/dist/{chunk-24XLDU72.js → chunk-PXMV2LLY.js} +3 -3
|
@@ -3,56 +3,65 @@ import { fileURLToPath as __atticusFileURLToPath } from "node:url";
|
|
|
3
3
|
var require = __atticusCreateRequire(import.meta.url);
|
|
4
4
|
var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
|
|
5
5
|
var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
|
|
6
|
-
import {
|
|
7
|
-
QueryError,
|
|
8
|
-
askLookup,
|
|
9
|
-
graph,
|
|
10
|
-
impact,
|
|
11
|
-
openIndex,
|
|
12
|
-
translate
|
|
13
|
-
} from "./chunk-ISUAAMGS.js";
|
|
14
6
|
import {
|
|
15
7
|
readRound,
|
|
16
8
|
reviewedGates,
|
|
17
9
|
roundsOf
|
|
18
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A6ZG3UOS.js";
|
|
19
11
|
import {
|
|
20
12
|
changeFolder,
|
|
21
13
|
changeStore
|
|
22
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U2JTTRKS.js";
|
|
15
|
+
import {
|
|
16
|
+
QueryError,
|
|
17
|
+
askLookup,
|
|
18
|
+
graph,
|
|
19
|
+
impact,
|
|
20
|
+
openIndex,
|
|
21
|
+
translate
|
|
22
|
+
} from "./chunk-MCE74XMF.js";
|
|
23
23
|
import {
|
|
24
24
|
baseClonePath,
|
|
25
25
|
gitUser,
|
|
26
26
|
loadRepos
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-OSZTENIA.js";
|
|
28
28
|
import {
|
|
29
29
|
API_VERSION,
|
|
30
30
|
DEFAULT_PORT,
|
|
31
|
-
Lens,
|
|
32
|
-
RECORD_KINDS,
|
|
33
|
-
RecordId,
|
|
34
|
-
Severity,
|
|
35
31
|
api_exports,
|
|
32
|
+
asksOfFinding,
|
|
36
33
|
catalogDirOf,
|
|
34
|
+
catalogMayHaveChangedAt,
|
|
37
35
|
factsDirOf,
|
|
38
|
-
fastPathOf,
|
|
39
36
|
inputsDirOf,
|
|
40
37
|
knowledgeDirOf,
|
|
41
38
|
layoutOf,
|
|
42
|
-
loadOrgPack,
|
|
43
39
|
openspecDirOf,
|
|
44
40
|
orgPackDirOf,
|
|
45
41
|
proposalsDirOf,
|
|
46
|
-
questionOfLens,
|
|
47
42
|
questionsDirOf,
|
|
43
|
+
rolesOfPerson,
|
|
48
44
|
runsDirOf,
|
|
49
45
|
specsDirOf,
|
|
50
46
|
withSignal
|
|
51
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-GJVCBTSO.js";
|
|
52
48
|
import {
|
|
53
49
|
FileChangedError,
|
|
50
|
+
printToCurrent,
|
|
51
|
+
withPrinter
|
|
52
|
+
} from "./chunk-G3ZFEHCX.js";
|
|
53
|
+
import {
|
|
54
|
+
Lens,
|
|
55
|
+
RECORD_KINDS,
|
|
56
|
+
RecordId,
|
|
57
|
+
Severity,
|
|
58
|
+
fastPathOf,
|
|
59
|
+
loadOrgPack,
|
|
60
|
+
questionOfLens
|
|
61
|
+
} from "./chunk-QFDPX6C4.js";
|
|
62
|
+
import {
|
|
54
63
|
SCHEMA_VERSION
|
|
55
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-CTJHEG6A.js";
|
|
56
65
|
|
|
57
66
|
// packages/server/dist/http.js
|
|
58
67
|
var HttpError = class extends Error {
|
|
@@ -136,125 +145,73 @@ function intParam(q, name, min, max) {
|
|
|
136
145
|
}
|
|
137
146
|
var strParam = (q, name) => q.get(name) || void 0;
|
|
138
147
|
|
|
139
|
-
// packages/server/dist/server.js
|
|
140
|
-
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
141
|
-
import { createServer } from "node:http";
|
|
142
|
-
|
|
143
|
-
// packages/server/dist/jobs.js
|
|
144
|
-
var JobManager = class {
|
|
145
|
-
publish;
|
|
146
|
-
now;
|
|
147
|
-
jobs = /* @__PURE__ */ new Map();
|
|
148
|
-
cancelledIds = /* @__PURE__ */ new Set();
|
|
149
|
-
aborts = /* @__PURE__ */ new Map();
|
|
150
|
-
seq = 0;
|
|
151
|
-
/** Round 41: every running job of a kind, in start order (a later one never hides an earlier). */
|
|
152
|
-
running = /* @__PURE__ */ new Map();
|
|
153
|
-
constructor(publish, now = () => /* @__PURE__ */ new Date()) {
|
|
154
|
-
this.publish = publish;
|
|
155
|
-
this.now = now;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* A running job of a kind, if any: the earliest still running (one scan at a time: a second
|
|
159
|
-
* ask gets 409).
|
|
160
|
-
*/
|
|
161
|
-
runningOf(kind) {
|
|
162
|
-
for (const id of this.running.get(kind) ?? []) {
|
|
163
|
-
const j = this.jobs.get(id);
|
|
164
|
-
if (j?.state === "running")
|
|
165
|
-
return j;
|
|
166
|
-
}
|
|
167
|
-
return void 0;
|
|
168
|
-
}
|
|
169
|
-
get(id) {
|
|
170
|
-
return this.jobs.get(id);
|
|
171
|
-
}
|
|
172
|
-
start(kind, work) {
|
|
173
|
-
const id = `job-${++this.seq}`;
|
|
174
|
-
const job = {
|
|
175
|
-
id,
|
|
176
|
-
kind,
|
|
177
|
-
state: "running",
|
|
178
|
-
progress: { done: 0, total: 0, message: "Starting" },
|
|
179
|
-
startedAt: this.now().toISOString(),
|
|
180
|
-
errors: []
|
|
181
|
-
};
|
|
182
|
-
this.jobs.set(id, job);
|
|
183
|
-
const ofKind = this.running.get(kind) ?? /* @__PURE__ */ new Set();
|
|
184
|
-
ofKind.add(id);
|
|
185
|
-
this.running.set(kind, ofKind);
|
|
186
|
-
const abort = new AbortController();
|
|
187
|
-
this.aborts.set(id, abort);
|
|
188
|
-
const cancelled = this.cancelledIds;
|
|
189
|
-
const control = {
|
|
190
|
-
progress: (done, total, message) => {
|
|
191
|
-
job.progress = { done, total, message };
|
|
192
|
-
this.publish({ type: "job.progress", jobId: id, done, total, message });
|
|
193
|
-
},
|
|
194
|
-
get cancelled() {
|
|
195
|
-
return cancelled.has(id);
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
void (async () => {
|
|
199
|
-
try {
|
|
200
|
-
const out = await withSignal(abort.signal, () => work(control));
|
|
201
|
-
if (out?.result)
|
|
202
|
-
job.result = out.result;
|
|
203
|
-
if (out?.errors?.length)
|
|
204
|
-
job.errors.push(...out.errors);
|
|
205
|
-
job.state = this.cancelledIds.has(id) ? "cancelled" : job.errors.length ? "failed" : "done";
|
|
206
|
-
} catch (e) {
|
|
207
|
-
if (this.cancelledIds.has(id))
|
|
208
|
-
job.state = "cancelled";
|
|
209
|
-
else {
|
|
210
|
-
job.errors.push(e instanceof Error ? e.message : String(e));
|
|
211
|
-
job.state = "failed";
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
this.aborts.delete(id);
|
|
215
|
-
job.finishedAt = this.now().toISOString();
|
|
216
|
-
ofKind.delete(id);
|
|
217
|
-
if (!ofKind.size && this.running.get(kind) === ofKind)
|
|
218
|
-
this.running.delete(kind);
|
|
219
|
-
this.publish({ type: "job.done", jobId: id, state: job.state });
|
|
220
|
-
})();
|
|
221
|
-
return job;
|
|
222
|
-
}
|
|
223
|
-
/** Ask a running job to stop; false when it already finished. */
|
|
224
|
-
cancel(id) {
|
|
225
|
-
const j = this.jobs.get(id);
|
|
226
|
-
if (!j || j.state !== "running")
|
|
227
|
-
return false;
|
|
228
|
-
this.cancelledIds.add(id);
|
|
229
|
-
this.aborts.get(id)?.abort();
|
|
230
|
-
return true;
|
|
231
|
-
}
|
|
232
|
-
/** Wait for a job to finish (tests and the CLI). */
|
|
233
|
-
async settle(id, timeoutMs = 6e4) {
|
|
234
|
-
const start = Date.now();
|
|
235
|
-
for (; ; ) {
|
|
236
|
-
const j = this.jobs.get(id);
|
|
237
|
-
if (!j)
|
|
238
|
-
throw new Error(`No job ${id}`);
|
|
239
|
-
if (j.state !== "running" && j.state !== "queued")
|
|
240
|
-
return j;
|
|
241
|
-
if (Date.now() - start > timeoutMs)
|
|
242
|
-
throw new Error(`Job ${id} did not finish`);
|
|
243
|
-
await new Promise((r) => setTimeout(r, 20));
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
|
|
248
148
|
// packages/server/dist/routes.js
|
|
149
|
+
import { existsSync } from "node:fs";
|
|
249
150
|
import { readFile, stat } from "node:fs/promises";
|
|
250
151
|
import { join } from "node:path";
|
|
251
152
|
var queues = /* @__PURE__ */ new Map();
|
|
252
|
-
|
|
153
|
+
var checked = /* @__PURE__ */ new Map();
|
|
154
|
+
var TRUST_MS = 3e4;
|
|
155
|
+
var following = /* @__PURE__ */ new Set();
|
|
156
|
+
var changes = /* @__PURE__ */ new Map();
|
|
157
|
+
function trustIndexBetweenChanges(root, on) {
|
|
158
|
+
if (on)
|
|
159
|
+
following.add(root);
|
|
160
|
+
else {
|
|
161
|
+
following.delete(root);
|
|
162
|
+
checked.delete(root);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function indexFilesChanged(root) {
|
|
166
|
+
for (const r of root ? [root] : [...following, ...checked.keys()]) {
|
|
167
|
+
checked.delete(r);
|
|
168
|
+
changes.set(r, (changes.get(r) ?? 0) + 1);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
var embedding = /* @__PURE__ */ new Map();
|
|
172
|
+
var asked = /* @__PURE__ */ new Map();
|
|
173
|
+
function embedSoon(root) {
|
|
174
|
+
if (embedding.has(root) || process.env.ATTICUS_EMBEDDINGS === "off")
|
|
175
|
+
return;
|
|
176
|
+
const step = () => {
|
|
177
|
+
if (Date.now() - (asked.get(root) ?? 0) < 1500) {
|
|
178
|
+
embedding.set(root, setTimeout(step, 1e3).unref());
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
void withIndex(root, (ix) => ix.embed({ max: 8 }), { meaning: true }).then((n) => n > 0, () => false).then((more) => {
|
|
182
|
+
if (more && embedding.has(root))
|
|
183
|
+
embedding.set(root, setTimeout(step, 50).unref());
|
|
184
|
+
else
|
|
185
|
+
embedding.delete(root);
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
embedding.set(root, setTimeout(step, 2e3).unref());
|
|
189
|
+
}
|
|
190
|
+
function stopEmbedding(root) {
|
|
191
|
+
const t = embedding.get(root);
|
|
192
|
+
if (t)
|
|
193
|
+
clearTimeout(t);
|
|
194
|
+
embedding.delete(root);
|
|
195
|
+
}
|
|
196
|
+
async function withIndex(root, f, o = {}) {
|
|
197
|
+
if (!o.meaning)
|
|
198
|
+
asked.set(root, Date.now());
|
|
253
199
|
const before = queues.get(root) ?? Promise.resolve();
|
|
254
200
|
const mine = before.then(async () => {
|
|
255
|
-
const
|
|
201
|
+
const trusted = following.has(root) && Date.now() - (checked.get(root) ?? -Infinity) < TRUST_MS;
|
|
202
|
+
const at = changes.get(root) ?? 0;
|
|
203
|
+
const ix = await openIndex(root, {
|
|
204
|
+
embedOnOpen: 0,
|
|
205
|
+
// Only search and ask compare by meaning; the counts, lists and graph never need the model.
|
|
206
|
+
...o.meaning ? {} : { embeddings: "off" },
|
|
207
|
+
...trusted ? { trusted: true } : {}
|
|
208
|
+
});
|
|
209
|
+
if (!trusted && following.has(root) && (changes.get(root) ?? 0) === at)
|
|
210
|
+
checked.set(root, Date.now());
|
|
211
|
+
if (!trusted && !o.meaning)
|
|
212
|
+
embedSoon(root);
|
|
256
213
|
try {
|
|
257
|
-
return f(ix);
|
|
214
|
+
return await f(ix);
|
|
258
215
|
} finally {
|
|
259
216
|
ix.close();
|
|
260
217
|
}
|
|
@@ -317,7 +274,9 @@ function apiRoutes(r, ctx) {
|
|
|
317
274
|
root,
|
|
318
275
|
openspec: layoutOf(root).openspec.replace(/\/+$/, ""),
|
|
319
276
|
user: ctx.user,
|
|
320
|
-
full: ctx.full === true
|
|
277
|
+
full: ctx.full === true,
|
|
278
|
+
// ADR 0190: in a folder that isn't a metarepo yet, the app offers to create one.
|
|
279
|
+
metarepo: existsSync(join(root, "org-pack")) || existsSync(join(root, ".atticus", "org-pack"))
|
|
321
280
|
}
|
|
322
281
|
})).add("GET", "/api/catalog/kinds", async () => ({
|
|
323
282
|
status: 200,
|
|
@@ -357,26 +316,25 @@ function apiRoutes(r, ctx) {
|
|
|
357
316
|
const q = strParam(query, "q");
|
|
358
317
|
if (!q)
|
|
359
318
|
throw badRequest("Ask a question: ?q=<plain words>.");
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
};
|
|
319
|
+
const knowledge = ctx.askKnowledge ? await ctx.askKnowledge(q).catch(() => void 0) : void 0;
|
|
320
|
+
const answer = await withIndex(root, (ix) => {
|
|
321
|
+
const asked2 = translate(q, askLookup(ix));
|
|
322
|
+
if (asked2.action === "impact")
|
|
323
|
+
return { question: q, ...asked2, impact: impact(ix, asked2.id, 4) };
|
|
324
|
+
if (asked2.action === "owner") {
|
|
325
|
+
const r2 = ix.find(asked2.id)[0];
|
|
326
|
+
const owner = r2?.owner ?? r2?.ownerComponent ?? (r2 ? ix.find(String(r2.system ?? ""))[0]?.owner : void 0);
|
|
327
|
+
return { question: q, ...asked2, owner: owner ?? null };
|
|
328
|
+
}
|
|
329
|
+
try {
|
|
330
|
+
return { question: q, ...asked2, result: ix.query(asked2.query, { limit: 60 }) };
|
|
331
|
+
} catch (e) {
|
|
332
|
+
if (e instanceof QueryError)
|
|
333
|
+
return { question: q, ...asked2, error: e.message };
|
|
334
|
+
throw e;
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
return { status: 200, body: knowledge ? { ...answer, knowledge } : answer };
|
|
380
338
|
}).add("GET", "/api/graph", async ({ query }) => {
|
|
381
339
|
const depth = intParam(query, "depth", 1, 6);
|
|
382
340
|
const o = {
|
|
@@ -450,7 +408,7 @@ function apiRoutes(r, ctx) {
|
|
|
450
408
|
if (!res)
|
|
451
409
|
throw notFound(`There is no record ${params.id} in the catalog.`);
|
|
452
410
|
const near = /* @__PURE__ */ new Set([...res.systems, params.id, ...res.reach.affected.map((a) => a.id)]);
|
|
453
|
-
const
|
|
411
|
+
const changes2 = (await changeStore(root).list()).filter((c) => c.systems.some((s) => near.has(s)) || [...c.touches.records, ...c.touches.tables, ...c.touches.dataStores].some((x) => near.has(x))).map((c) => ({
|
|
454
412
|
id: c.id,
|
|
455
413
|
title: c.title,
|
|
456
414
|
state: c.state,
|
|
@@ -467,7 +425,7 @@ function apiRoutes(r, ctx) {
|
|
|
467
425
|
call: res.owners,
|
|
468
426
|
ownerUnknown: res.unowned,
|
|
469
427
|
watch: res.watch,
|
|
470
|
-
recentChanges:
|
|
428
|
+
recentChanges: changes2
|
|
471
429
|
}
|
|
472
430
|
};
|
|
473
431
|
}).add("GET", "/api/repos", async () => {
|
|
@@ -480,13 +438,18 @@ function apiRoutes(r, ctx) {
|
|
|
480
438
|
return { status: 200, body };
|
|
481
439
|
}).add("GET", "/api/changes", async ({ query }) => {
|
|
482
440
|
const state = strParam(query, "state");
|
|
483
|
-
const
|
|
441
|
+
const changes2 = (await changeStore(root).list()).filter((c) => !state || c.state === state);
|
|
484
442
|
const body = [];
|
|
485
|
-
const
|
|
486
|
-
|
|
443
|
+
const op = await loadOrgPack(orgPackDirOf(root)).catch(() => void 0);
|
|
444
|
+
const types = op?.changeTypes.types ?? [];
|
|
445
|
+
const custom = op?.roles?.custom ?? [];
|
|
446
|
+
for (const c of changes2.sort((a, b) => a.id.localeCompare(b.id))) {
|
|
487
447
|
const type = types.find((t) => t.id === c.type);
|
|
488
448
|
const fast = !!type && (type.size === "small" || !!type.smallWhenBriefSays) && fastPathOf(type, await readFile(join(changeFolder(root, c.id), "brief.md"), "utf8").catch(() => "")).fast;
|
|
489
|
-
body.push(
|
|
449
|
+
body.push({
|
|
450
|
+
...summary(c, await latestFindings(root, c.id), fast),
|
|
451
|
+
yourRoles: rolesOfPerson(ctx.user, c.owners ?? {}, custom)
|
|
452
|
+
});
|
|
490
453
|
}
|
|
491
454
|
return { status: 200, body };
|
|
492
455
|
}).add("GET", "/api/findings", async ({ query }) => {
|
|
@@ -497,13 +460,16 @@ function apiRoutes(r, ctx) {
|
|
|
497
460
|
const state = strParam(query, "state");
|
|
498
461
|
const lens = enumParam(query, "lens", Lens.options);
|
|
499
462
|
const severity = enumParam(query, "severity", Severity.options);
|
|
463
|
+
const asks = enumParam(query, "asks", ["business", "design", "delivery"]);
|
|
500
464
|
const ids = change ? [change] : (await changeStore(root).list()).map((c) => c.id).sort();
|
|
501
465
|
const body = [];
|
|
502
466
|
for (const id of ids)
|
|
503
|
-
for (const f of await latestFindings(root, id))
|
|
467
|
+
for (const f of await latestFindings(root, id)) {
|
|
468
|
+
const level = asksOfFinding(f);
|
|
504
469
|
if ((!gate || f.gate === gate) && (!state || f.state === state) && // A lens filter asks its question: an old lens name finds what its question raised.
|
|
505
|
-
(!lens || questionOfLens(f.lens) === questionOfLens(lens)) && (!severity || f.severity === severity))
|
|
506
|
-
body.push(f);
|
|
470
|
+
(!lens || questionOfLens(f.lens) === questionOfLens(lens)) && (!severity || f.severity === severity) && (!asks || level === asks))
|
|
471
|
+
body.push({ ...f, asks: level });
|
|
472
|
+
}
|
|
507
473
|
return { status: 200, body };
|
|
508
474
|
}).add("GET", "/api/findings/{changeId}/{findingId}", async ({ params }) => {
|
|
509
475
|
if (!RecordId.safeParse(params.changeId).success)
|
|
@@ -550,6 +516,224 @@ function apiRoutes(r, ctx) {
|
|
|
550
516
|
});
|
|
551
517
|
}
|
|
552
518
|
|
|
519
|
+
// packages/server/dist/server.js
|
|
520
|
+
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
521
|
+
import { createServer } from "node:http";
|
|
522
|
+
|
|
523
|
+
// packages/server/dist/jobs.js
|
|
524
|
+
var JOB_LINES = 5e3;
|
|
525
|
+
var JOBS_KEPT = 100;
|
|
526
|
+
var jobLine = (line) => printToCurrent(line);
|
|
527
|
+
var JobManager = class {
|
|
528
|
+
publish;
|
|
529
|
+
now;
|
|
530
|
+
jobs = /* @__PURE__ */ new Map();
|
|
531
|
+
cancelledIds = /* @__PURE__ */ new Set();
|
|
532
|
+
aborts = /* @__PURE__ */ new Map();
|
|
533
|
+
seq = 0;
|
|
534
|
+
/** Round 41: every running job of a kind, in start order (a later one never hides an earlier). */
|
|
535
|
+
running = /* @__PURE__ */ new Map();
|
|
536
|
+
printed = /* @__PURE__ */ new Map();
|
|
537
|
+
metas = /* @__PURE__ */ new Map();
|
|
538
|
+
listeners = /* @__PURE__ */ new Set();
|
|
539
|
+
ends = /* @__PURE__ */ new Map();
|
|
540
|
+
constructor(publish, now = () => /* @__PURE__ */ new Date()) {
|
|
541
|
+
this.publish = publish;
|
|
542
|
+
this.now = now;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* A running job of a kind, if any: the earliest still running (one scan at a time: a second
|
|
546
|
+
* ask gets 409).
|
|
547
|
+
*/
|
|
548
|
+
runningOf(kind) {
|
|
549
|
+
for (const id of this.running.get(kind) ?? []) {
|
|
550
|
+
const j = this.jobs.get(id);
|
|
551
|
+
if (j?.state === "running")
|
|
552
|
+
return j;
|
|
553
|
+
}
|
|
554
|
+
return void 0;
|
|
555
|
+
}
|
|
556
|
+
get(id) {
|
|
557
|
+
return this.jobs.get(id);
|
|
558
|
+
}
|
|
559
|
+
/** Every job kept, newest first (ADR 0187). */
|
|
560
|
+
list() {
|
|
561
|
+
return [...this.jobs.values()].reverse();
|
|
562
|
+
}
|
|
563
|
+
/** What a job belongs to, as it was started. */
|
|
564
|
+
metaOf(id) {
|
|
565
|
+
return this.metas.get(id);
|
|
566
|
+
}
|
|
567
|
+
/** A job's printed lines from a line on (or its last `max`), and how many it printed. */
|
|
568
|
+
linesOf(id, from, max = JOB_LINES) {
|
|
569
|
+
const p = this.printed.get(id);
|
|
570
|
+
if (!p)
|
|
571
|
+
return void 0;
|
|
572
|
+
const total = p.from + p.lines.length;
|
|
573
|
+
const start = from === void 0 ? Math.max(total - max, p.from) : Math.max(Math.min(from, total), p.from);
|
|
574
|
+
return { from: start, lines: p.lines.slice(start - p.from, start - p.from + max), total };
|
|
575
|
+
}
|
|
576
|
+
/** Hear each job's new lines and changes of state. */
|
|
577
|
+
subscribe(f) {
|
|
578
|
+
this.listeners.add(f);
|
|
579
|
+
return () => this.listeners.delete(f);
|
|
580
|
+
}
|
|
581
|
+
tell(c) {
|
|
582
|
+
for (const f of this.listeners) {
|
|
583
|
+
try {
|
|
584
|
+
f(c);
|
|
585
|
+
} catch {
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
print(job, text) {
|
|
590
|
+
const p = this.printed.get(job.id);
|
|
591
|
+
if (!p)
|
|
592
|
+
return;
|
|
593
|
+
const lines = String(text).split(/\r?\n/);
|
|
594
|
+
const at = p.from + p.lines.length;
|
|
595
|
+
p.lines.push(...lines);
|
|
596
|
+
if (p.lines.length > JOB_LINES) {
|
|
597
|
+
const drop = p.lines.length - JOB_LINES;
|
|
598
|
+
p.lines.splice(0, drop);
|
|
599
|
+
p.from += drop;
|
|
600
|
+
}
|
|
601
|
+
this.tell({ type: "lines", job, at, lines });
|
|
602
|
+
}
|
|
603
|
+
/** Finished jobs past JOBS_KEPT go, oldest first; running ones stay. */
|
|
604
|
+
forget() {
|
|
605
|
+
let over = this.jobs.size - JOBS_KEPT;
|
|
606
|
+
if (over <= 0)
|
|
607
|
+
return;
|
|
608
|
+
for (const [id, j] of this.jobs) {
|
|
609
|
+
if (over <= 0)
|
|
610
|
+
break;
|
|
611
|
+
if (j.state === "running" || j.state === "queued")
|
|
612
|
+
continue;
|
|
613
|
+
this.jobs.delete(id);
|
|
614
|
+
this.printed.delete(id);
|
|
615
|
+
this.metas.delete(id);
|
|
616
|
+
this.cancelledIds.delete(id);
|
|
617
|
+
over--;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
start(kind, work, o = {}) {
|
|
621
|
+
const id = `job-${++this.seq}`;
|
|
622
|
+
const job = {
|
|
623
|
+
id,
|
|
624
|
+
kind,
|
|
625
|
+
state: "running",
|
|
626
|
+
progress: { done: 0, total: 0, message: "Starting" },
|
|
627
|
+
...o.title ? { title: o.title } : {},
|
|
628
|
+
startedAt: this.now().toISOString(),
|
|
629
|
+
errors: []
|
|
630
|
+
};
|
|
631
|
+
this.jobs.set(id, job);
|
|
632
|
+
this.printed.set(id, { from: 0, lines: [] });
|
|
633
|
+
if (o.meta)
|
|
634
|
+
this.metas.set(id, { ...o.meta });
|
|
635
|
+
this.forget();
|
|
636
|
+
const ofKind = this.running.get(kind) ?? /* @__PURE__ */ new Set();
|
|
637
|
+
ofKind.add(id);
|
|
638
|
+
this.running.set(kind, ofKind);
|
|
639
|
+
const abort = new AbortController();
|
|
640
|
+
this.aborts.set(id, abort);
|
|
641
|
+
const cancelled = this.cancelledIds;
|
|
642
|
+
const line = (text) => this.print(job, text);
|
|
643
|
+
const control = {
|
|
644
|
+
progress: (done, total, message) => {
|
|
645
|
+
job.progress = { done, total, message };
|
|
646
|
+
this.publish({ type: "job.progress", jobId: id, done, total, message });
|
|
647
|
+
this.tell({ type: "state", job });
|
|
648
|
+
},
|
|
649
|
+
line,
|
|
650
|
+
get cancelled() {
|
|
651
|
+
return cancelled.has(id);
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
this.tell({ type: "state", job });
|
|
655
|
+
void (async () => {
|
|
656
|
+
try {
|
|
657
|
+
const out = await withPrinter(line, () => withSignal(abort.signal, () => work(control)));
|
|
658
|
+
if (out?.result)
|
|
659
|
+
job.result = out.result;
|
|
660
|
+
if (out?.errors?.length)
|
|
661
|
+
job.errors.push(...out.errors);
|
|
662
|
+
job.state = this.cancelledIds.has(id) ? "cancelled" : job.errors.length ? "failed" : "done";
|
|
663
|
+
} catch (e) {
|
|
664
|
+
if (this.cancelledIds.has(id))
|
|
665
|
+
job.state = "cancelled";
|
|
666
|
+
else {
|
|
667
|
+
job.errors.push(e instanceof Error ? e.message : String(e));
|
|
668
|
+
job.state = "failed";
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
this.aborts.delete(id);
|
|
672
|
+
const p = this.printed.get(id);
|
|
673
|
+
if (p && p.from + p.lines.length === 0) {
|
|
674
|
+
const said = job.result?.lines;
|
|
675
|
+
const end = [
|
|
676
|
+
...Array.isArray(said) ? said.filter((l) => typeof l === "string") : [],
|
|
677
|
+
...job.errors.filter((e) => !(Array.isArray(said) && said.includes(e)))
|
|
678
|
+
];
|
|
679
|
+
if (end.length)
|
|
680
|
+
line(end.join("\n"));
|
|
681
|
+
}
|
|
682
|
+
job.finishedAt = this.now().toISOString();
|
|
683
|
+
ofKind.delete(id);
|
|
684
|
+
if (!ofKind.size && this.running.get(kind) === ofKind)
|
|
685
|
+
this.running.delete(kind);
|
|
686
|
+
this.publish({ type: "job.done", jobId: id, state: job.state });
|
|
687
|
+
this.tell({ type: "state", job });
|
|
688
|
+
this.ends.get(id)?.();
|
|
689
|
+
this.ends.delete(id);
|
|
690
|
+
})();
|
|
691
|
+
return job;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Run work the caller waits for as a job (ADR 0187): the route keeps its answer, and the
|
|
695
|
+
* Console shows what it printed. Resolves with the work's value, or throws its error.
|
|
696
|
+
*/
|
|
697
|
+
track(kind, work, o = {}) {
|
|
698
|
+
return new Promise((resolve2, reject) => {
|
|
699
|
+
let value;
|
|
700
|
+
let failed;
|
|
701
|
+
const job = this.start(kind, async (c) => {
|
|
702
|
+
try {
|
|
703
|
+
value = await work(c);
|
|
704
|
+
} catch (e) {
|
|
705
|
+
failed = { e };
|
|
706
|
+
throw e;
|
|
707
|
+
}
|
|
708
|
+
}, o);
|
|
709
|
+
this.ends.set(job.id, () => failed ? reject(failed.e) : resolve2(value));
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
/** Ask a running job to stop; false when it already finished. */
|
|
713
|
+
cancel(id) {
|
|
714
|
+
const j = this.jobs.get(id);
|
|
715
|
+
if (!j || j.state !== "running")
|
|
716
|
+
return false;
|
|
717
|
+
this.cancelledIds.add(id);
|
|
718
|
+
this.aborts.get(id)?.abort();
|
|
719
|
+
return true;
|
|
720
|
+
}
|
|
721
|
+
/** Wait for a job to finish (tests and the CLI). */
|
|
722
|
+
async settle(id, timeoutMs = 6e4) {
|
|
723
|
+
const start = Date.now();
|
|
724
|
+
for (; ; ) {
|
|
725
|
+
const j = this.jobs.get(id);
|
|
726
|
+
if (!j)
|
|
727
|
+
throw new Error(`No job ${id}`);
|
|
728
|
+
if (j.state !== "running" && j.state !== "queued")
|
|
729
|
+
return j;
|
|
730
|
+
if (Date.now() - start > timeoutMs)
|
|
731
|
+
throw new Error(`Job ${id} did not finish`);
|
|
732
|
+
await new Promise((r) => setTimeout(r, 20));
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
|
|
553
737
|
// packages/server/dist/static.js
|
|
554
738
|
import { readFile as readFile2, stat as stat2 } from "node:fs/promises";
|
|
555
739
|
import { extname, join as join2, normalize, resolve, sep } from "node:path";
|
|
@@ -689,9 +873,20 @@ var WITHOUT_THE_APP = {
|
|
|
689
873
|
what: "Changing where runtime.yaml sends the model's key (its provider, keyEnv or address)",
|
|
690
874
|
cli: "edit runtime.yaml yourself and propose it for review"
|
|
691
875
|
},
|
|
876
|
+
// Review round 50: committing them doesn't stand for the person's yes (the assistant can
|
|
877
|
+
// commit); the address the person last confirmed does (kept outside the metarepo).
|
|
692
878
|
"ai-test": {
|
|
693
|
-
what: "Testing model settings
|
|
694
|
-
cli: "
|
|
879
|
+
what: "Testing the model settings sends the key to an address you haven't confirmed",
|
|
880
|
+
cli: "a step in model mode yourself"
|
|
881
|
+
},
|
|
882
|
+
// ADR 0191: the plan's work items written to a live tracker, and an owner question sent.
|
|
883
|
+
"work-items": {
|
|
884
|
+
what: "Putting the plan's stories and tasks in the work tracker writes work items",
|
|
885
|
+
cli: "atticus ado sync <change> --approve <you>"
|
|
886
|
+
},
|
|
887
|
+
"owner-ask": {
|
|
888
|
+
what: "Sending an owner question posts a message",
|
|
889
|
+
cli: "copy the question and ask the owner yourself"
|
|
695
890
|
}
|
|
696
891
|
};
|
|
697
892
|
function needsConfirmation(write) {
|
|
@@ -707,8 +902,21 @@ function requireConfirmation(c, write, target, given) {
|
|
|
707
902
|
import { statSync, watch } from "node:fs";
|
|
708
903
|
import { join as join3, relative, sep as sep2 } from "node:path";
|
|
709
904
|
var SKIP = /* @__PURE__ */ new Set([".git", "node_modules", ".index", "workspace", "logs", ".vitest-cache"]);
|
|
710
|
-
var TEMP = /(~|\.swp|\.swx|\.tmp|\.crdownload|\.part)$/i;
|
|
905
|
+
var TEMP = /(~|\.swp|\.swx|\.tmp|\.crdownload|\.part|(^|\/)\.doctor-\d+)$/i;
|
|
711
906
|
var posix = (p) => p.split(sep2).join("/");
|
|
907
|
+
function onlyRead(abs, seen, since) {
|
|
908
|
+
let s;
|
|
909
|
+
try {
|
|
910
|
+
s = statSync(abs);
|
|
911
|
+
} catch {
|
|
912
|
+
seen.delete(abs);
|
|
913
|
+
return false;
|
|
914
|
+
}
|
|
915
|
+
const now = `${s.size}:${s.mtimeMs}:${s.ctimeMs}`;
|
|
916
|
+
const was = seen.get(abs);
|
|
917
|
+
seen.set(abs, now);
|
|
918
|
+
return was !== void 0 ? was === now : Math.max(s.mtimeMs, s.ctimeMs) < since;
|
|
919
|
+
}
|
|
712
920
|
var isDir = (p) => {
|
|
713
921
|
try {
|
|
714
922
|
return statSync(p).isDirectory();
|
|
@@ -731,6 +939,8 @@ function watchMetarepo(o) {
|
|
|
731
939
|
};
|
|
732
940
|
const problems = [];
|
|
733
941
|
const pending = /* @__PURE__ */ new Set();
|
|
942
|
+
const stamps = /* @__PURE__ */ new Map();
|
|
943
|
+
const since = Date.now();
|
|
734
944
|
let timer;
|
|
735
945
|
let first = 0;
|
|
736
946
|
let closed = false;
|
|
@@ -776,17 +986,39 @@ function watchMetarepo(o) {
|
|
|
776
986
|
const unique = [...new Set(all)].sort();
|
|
777
987
|
return unique.filter((d) => !unique.some((p) => p !== d && d.startsWith(p + sep2)));
|
|
778
988
|
};
|
|
989
|
+
const logsDir = join3(root, ".atticus", "logs");
|
|
990
|
+
const runLogDirs = [join3(logsDir, "running"), join3(logsDir, "runs")];
|
|
991
|
+
const runLogDelay = o.runLogDelayMs ?? 200;
|
|
992
|
+
let runLogTimer;
|
|
993
|
+
let runLogLast = 0;
|
|
994
|
+
const runLogChanged = () => {
|
|
995
|
+
if (runLogTimer || !o.onRunLog)
|
|
996
|
+
return;
|
|
997
|
+
runLogTimer = setTimeout(() => {
|
|
998
|
+
runLogTimer = void 0;
|
|
999
|
+
runLogLast = Date.now();
|
|
1000
|
+
if (!closed)
|
|
1001
|
+
o.onRunLog?.();
|
|
1002
|
+
}, Math.max(runLogLast + runLogDelay - Date.now(), 0));
|
|
1003
|
+
};
|
|
779
1004
|
const follow = (dir, recursive) => {
|
|
780
1005
|
if (closed || watchers.has(dir) || !isDir(dir))
|
|
781
1006
|
return;
|
|
782
1007
|
try {
|
|
783
|
-
const w = watch(dir, { recursive }, (
|
|
1008
|
+
const w = watch(dir, { recursive }, (event, name) => {
|
|
1009
|
+
if (dir === logsDir)
|
|
1010
|
+
return attach();
|
|
1011
|
+
if (runLogDirs.includes(dir))
|
|
1012
|
+
return runLogChanged();
|
|
784
1013
|
if (!recursive && name) {
|
|
785
1014
|
attach();
|
|
786
1015
|
if (watchers.has(join3(dir, String(name))))
|
|
787
1016
|
return;
|
|
788
1017
|
}
|
|
789
|
-
|
|
1018
|
+
const abs = name ? join3(dir, String(name)) : dir;
|
|
1019
|
+
if (event === "change" && process.platform === "win32" && onlyRead(abs, stamps, since))
|
|
1020
|
+
return;
|
|
1021
|
+
note(abs);
|
|
790
1022
|
});
|
|
791
1023
|
w.on("error", (e) => {
|
|
792
1024
|
w.close();
|
|
@@ -821,16 +1053,22 @@ function watchMetarepo(o) {
|
|
|
821
1053
|
follow(join3(root, ".atticus"), false);
|
|
822
1054
|
for (const d of folders())
|
|
823
1055
|
follow(d, true);
|
|
1056
|
+
if (o.onRunLog) {
|
|
1057
|
+
follow(logsDir, false);
|
|
1058
|
+
for (const d of runLogDirs)
|
|
1059
|
+
follow(d, false);
|
|
1060
|
+
}
|
|
824
1061
|
};
|
|
825
1062
|
attach();
|
|
826
1063
|
return {
|
|
827
1064
|
get following() {
|
|
828
|
-
return [...watchers.keys()].filter((d) => d !== root && d !== join3(root, ".atticus")).map((d) => posix(relative(root, d))).sort();
|
|
1065
|
+
return [...watchers.keys()].filter((d) => d !== root && d !== join3(root, ".atticus") && d !== logsDir && !runLogDirs.includes(d)).map((d) => posix(relative(root, d))).sort();
|
|
829
1066
|
},
|
|
830
1067
|
problems,
|
|
831
1068
|
close() {
|
|
832
1069
|
closed = true;
|
|
833
1070
|
clearTimeout(timer);
|
|
1071
|
+
clearTimeout(runLogTimer);
|
|
834
1072
|
for (const w of watchers.values())
|
|
835
1073
|
w.close();
|
|
836
1074
|
watchers.clear();
|
|
@@ -954,9 +1192,27 @@ function upgrade(req, sock, onClose) {
|
|
|
954
1192
|
}
|
|
955
1193
|
|
|
956
1194
|
// packages/server/dist/server.js
|
|
1195
|
+
var JOB_KINDS = {
|
|
1196
|
+
scan: true,
|
|
1197
|
+
sync: true,
|
|
1198
|
+
reconcile: true,
|
|
1199
|
+
index: true,
|
|
1200
|
+
intake: true,
|
|
1201
|
+
step: true,
|
|
1202
|
+
local: true,
|
|
1203
|
+
work: true
|
|
1204
|
+
};
|
|
957
1205
|
var EventHub = class {
|
|
1206
|
+
root;
|
|
958
1207
|
sockets = /* @__PURE__ */ new Set();
|
|
959
1208
|
listeners = /* @__PURE__ */ new Set();
|
|
1209
|
+
/**
|
|
1210
|
+
* `root`: each file.changed event is published saying whether it can change the catalog
|
|
1211
|
+
* (`catalog`, beta.23 review), by the layout the org pack names, so a page needn't guess it.
|
|
1212
|
+
*/
|
|
1213
|
+
constructor(root) {
|
|
1214
|
+
this.root = root;
|
|
1215
|
+
}
|
|
960
1216
|
/** Hear every event in this process too (ADR 0119: a reader that keeps files in memory). */
|
|
961
1217
|
listen(fn) {
|
|
962
1218
|
this.listeners.add(fn);
|
|
@@ -971,7 +1227,16 @@ var EventHub = class {
|
|
|
971
1227
|
get size() {
|
|
972
1228
|
return this.sockets.size;
|
|
973
1229
|
}
|
|
974
|
-
publish(
|
|
1230
|
+
publish(given) {
|
|
1231
|
+
let e = given;
|
|
1232
|
+
if (this.root !== void 0 && e.type === "file.changed" && typeof e.path === "string" && typeof e.catalog !== "boolean") {
|
|
1233
|
+
let catalog = true;
|
|
1234
|
+
try {
|
|
1235
|
+
catalog = catalogMayHaveChangedAt(this.root, e.path);
|
|
1236
|
+
} catch {
|
|
1237
|
+
}
|
|
1238
|
+
e = { ...e, catalog };
|
|
1239
|
+
}
|
|
975
1240
|
for (const fn of this.listeners)
|
|
976
1241
|
fn(e);
|
|
977
1242
|
const text = JSON.stringify(e);
|
|
@@ -983,6 +1248,21 @@ var EventHub = class {
|
|
|
983
1248
|
s.close();
|
|
984
1249
|
}
|
|
985
1250
|
};
|
|
1251
|
+
var Signal = class {
|
|
1252
|
+
fs = /* @__PURE__ */ new Set();
|
|
1253
|
+
subscribe(f) {
|
|
1254
|
+
this.fs.add(f);
|
|
1255
|
+
return () => this.fs.delete(f);
|
|
1256
|
+
}
|
|
1257
|
+
emit() {
|
|
1258
|
+
for (const f of this.fs) {
|
|
1259
|
+
try {
|
|
1260
|
+
f();
|
|
1261
|
+
} catch {
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
986
1266
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
987
1267
|
var sameToken = sameSecret;
|
|
988
1268
|
var STRONG = /^[A-Za-z0-9_-]{32,}$/;
|
|
@@ -1029,10 +1309,13 @@ async function startServer(o) {
|
|
|
1029
1309
|
throw new Error(`Atticus only listens on 127.0.0.1 (asked for ${host}).`);
|
|
1030
1310
|
const token = o.token && STRONG.test(o.token) ? o.token : randomBytes2(32).toString("base64url");
|
|
1031
1311
|
const pageKey = o.pageKey && STRONG.test(o.pageKey) && o.pageKey !== token ? o.pageKey : randomBytes2(32).toString("base64url");
|
|
1032
|
-
const events = new EventHub();
|
|
1312
|
+
const events = new EventHub(o.root);
|
|
1313
|
+
let writing = 0;
|
|
1033
1314
|
const jobs = new JobManager((e) => events.publish(e));
|
|
1034
1315
|
const confirmations = new Confirmations();
|
|
1035
1316
|
const person = o.user ? { handle: o.user, source: "given" } : await gitUser(o.root);
|
|
1317
|
+
const runLogs = new Signal();
|
|
1318
|
+
const onClose = /* @__PURE__ */ new Set();
|
|
1036
1319
|
const ctx = {
|
|
1037
1320
|
root: o.root,
|
|
1038
1321
|
user: person.handle,
|
|
@@ -1041,7 +1324,9 @@ async function startServer(o) {
|
|
|
1041
1324
|
full: o.full === true,
|
|
1042
1325
|
events,
|
|
1043
1326
|
jobs,
|
|
1044
|
-
confirmations
|
|
1327
|
+
confirmations,
|
|
1328
|
+
runLogs,
|
|
1329
|
+
onClose
|
|
1045
1330
|
};
|
|
1046
1331
|
const router = apiRoutes(new Router(), ctx).add("POST", "/api/confirmations", ({ body }) => {
|
|
1047
1332
|
const b = api_exports.ConfirmationRequest.safeParse(body ?? {});
|
|
@@ -1078,7 +1363,15 @@ async function startServer(o) {
|
|
|
1078
1363
|
};
|
|
1079
1364
|
const server = createServer(async (req, res) => {
|
|
1080
1365
|
const t0 = Date.now();
|
|
1366
|
+
let writes = req.method !== "GET" && req.method !== "HEAD";
|
|
1367
|
+
if (writes)
|
|
1368
|
+
writing++;
|
|
1081
1369
|
const done = (status, error) => {
|
|
1370
|
+
if (writes) {
|
|
1371
|
+
writes = false;
|
|
1372
|
+
writing--;
|
|
1373
|
+
indexFilesChanged(o.root);
|
|
1374
|
+
}
|
|
1082
1375
|
const path = (req.url ?? "/").split("?")[0];
|
|
1083
1376
|
if (path.startsWith("/api/"))
|
|
1084
1377
|
o.onRequest?.({
|
|
@@ -1157,7 +1450,17 @@ Connection: close\r
|
|
|
1157
1450
|
server.listen(o.port ?? DEFAULT_PORT, host, () => resolve2());
|
|
1158
1451
|
});
|
|
1159
1452
|
port = server.address().port;
|
|
1160
|
-
const watcher = o.watch === false ? void 0 : watchMetarepo({
|
|
1453
|
+
const watcher = o.watch === false ? void 0 : watchMetarepo({
|
|
1454
|
+
root: o.root,
|
|
1455
|
+
publish: (e) => events.publish(e),
|
|
1456
|
+
onRunLog: () => runLogs.emit()
|
|
1457
|
+
});
|
|
1458
|
+
const stopHearing = events.listen((e) => {
|
|
1459
|
+
if (e.type === "file.changed" || e.type === "index.rebuilt" || e.type === "job.done")
|
|
1460
|
+
indexFilesChanged(o.root);
|
|
1461
|
+
});
|
|
1462
|
+
if (watcher)
|
|
1463
|
+
trustIndexBetweenChanges(o.root, true);
|
|
1161
1464
|
return {
|
|
1162
1465
|
url: `http://127.0.0.1:${port}`,
|
|
1163
1466
|
port,
|
|
@@ -1170,8 +1473,20 @@ Connection: close\r
|
|
|
1170
1473
|
get following() {
|
|
1171
1474
|
return watcher?.following ?? [];
|
|
1172
1475
|
},
|
|
1476
|
+
get quiet() {
|
|
1477
|
+
return writing === 0 && !Object.keys(JOB_KINDS).some((k) => jobs.runningOf(k));
|
|
1478
|
+
},
|
|
1173
1479
|
close: () => new Promise((resolve2) => {
|
|
1174
1480
|
watcher?.close();
|
|
1481
|
+
for (const f of onClose) {
|
|
1482
|
+
try {
|
|
1483
|
+
f();
|
|
1484
|
+
} catch {
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
stopHearing();
|
|
1488
|
+
trustIndexBetweenChanges(o.root, false);
|
|
1489
|
+
stopEmbedding(o.root);
|
|
1175
1490
|
events.closeAll();
|
|
1176
1491
|
server.closeAllConnections?.();
|
|
1177
1492
|
server.close(() => resolve2());
|
|
@@ -1184,7 +1499,33 @@ export {
|
|
|
1184
1499
|
badRequest,
|
|
1185
1500
|
notFound,
|
|
1186
1501
|
conflict,
|
|
1502
|
+
Router,
|
|
1503
|
+
problem,
|
|
1504
|
+
intParam,
|
|
1187
1505
|
strParam,
|
|
1506
|
+
trustIndexBetweenChanges,
|
|
1507
|
+
indexFilesChanged,
|
|
1508
|
+
stopEmbedding,
|
|
1509
|
+
apiRoutes,
|
|
1510
|
+
JOB_LINES,
|
|
1511
|
+
JOBS_KEPT,
|
|
1512
|
+
jobLine,
|
|
1513
|
+
JobManager,
|
|
1514
|
+
appCsp,
|
|
1515
|
+
staticFile,
|
|
1516
|
+
CONFIRM_TTL_MS,
|
|
1517
|
+
Confirmations,
|
|
1518
|
+
sameSecret,
|
|
1519
|
+
needsConfirmation,
|
|
1188
1520
|
requireConfirmation,
|
|
1521
|
+
onlyRead,
|
|
1522
|
+
watchMetarepo,
|
|
1523
|
+
acceptKey,
|
|
1524
|
+
frame,
|
|
1525
|
+
Socket,
|
|
1526
|
+
upgrade,
|
|
1527
|
+
EventHub,
|
|
1528
|
+
Signal,
|
|
1529
|
+
HARDENING,
|
|
1189
1530
|
startServer
|
|
1190
1531
|
};
|