@maycombhq/atticus 2.0.0-beta.2 → 2.0.0-beta.21
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 +8 -4
- package/dist/chunk-265LWMOA.js +91 -0
- package/dist/chunk-26WBY34Y.js +37 -0
- package/dist/{chunk-UBBC2XSG.js → chunk-26Z7OGQW.js} +518 -93
- package/dist/chunk-2D7PWSOK.js +172 -0
- package/dist/{chunk-JCZIKA4C.js → chunk-2HH3UCZM.js} +4 -4
- package/dist/{chunk-GDLULHTC.js → chunk-2HTEMYTB.js} +12 -26
- package/dist/chunk-2UCRFXFZ.js +130 -0
- package/dist/{chunk-MVZVGYXH.js → chunk-2V2ZPQQU.js} +81 -13
- package/dist/{chunk-BOHJZTEQ.js → chunk-36RY7ZXM.js} +130 -71
- package/dist/{chunk-I3E7CX4H.js → chunk-37WE3LS2.js} +3 -3
- package/dist/{chunk-IPKHE5D6.js → chunk-3AQ2R5NL.js} +1520 -871
- package/dist/chunk-3G6S7LAA.js +43 -0
- package/dist/chunk-3J5I7ZOU.js +58 -0
- package/dist/{chunk-65NYPGRC.js → chunk-3LZ6P5EP.js} +1 -1
- package/dist/chunk-3SSTNB4E.js +191 -0
- package/dist/chunk-3TD6S4TC.js +49 -0
- package/dist/{chunk-3C7EYRFZ.js → chunk-3UTYPHN3.js} +1 -1
- package/dist/{chunk-G2B4ZQGH.js → chunk-3WON4G3M.js} +2 -2
- package/dist/{chunk-S3QNRWYR.js → chunk-42EPP7OB.js} +12 -12
- package/dist/chunk-455SYIIE.js +113 -0
- package/dist/{chunk-YISXLPHN.js → chunk-4B6BT75O.js} +166 -23
- package/dist/{chunk-C6EKFH7J.js → chunk-4CLK2RJO.js} +7 -7
- package/dist/chunk-4CYTJ5TZ.js +38 -0
- package/dist/{chunk-EYWIDJFU.js → chunk-4D62IZII.js} +5 -5
- package/dist/chunk-4FOAYLI4.js +328 -0
- package/dist/{chunk-7JUKDRSZ.js → chunk-4KNOJC6J.js} +294 -215
- package/dist/{chunk-YMZ3TNYB.js → chunk-4PYC2UGC.js} +2 -2
- package/dist/{chunk-27NKUS3X.js → chunk-4SLBCEPD.js} +2104 -726
- package/dist/chunk-4TKVU2I2.js +122 -0
- package/dist/{chunk-RUVFXE2L.js → chunk-4WXRPQDE.js} +448 -47
- package/dist/{chunk-7ZUIMTOU.js → chunk-5CMPVC3N.js} +24 -24
- package/dist/chunk-5G7ILBUG.js +66 -0
- package/dist/{chunk-HFQCFSJR.js → chunk-5PV7S2ZP.js} +3 -3
- package/dist/{chunk-FITWGOJ2.js → chunk-5QUOPNLN.js} +4 -4
- package/dist/{chunk-Z6LF7HQN.js → chunk-5TDRBOAV.js} +5 -5
- package/dist/{chunk-T6AIP7H5.js → chunk-5WERBKLE.js} +199 -63
- package/dist/{chunk-XPCM366L.js → chunk-62DLJSLV.js} +8 -8
- package/dist/{chunk-L24C55VN.js → chunk-64AADMTW.js} +99 -25
- package/dist/{chunk-K65BJIMT.js → chunk-67BP7HXL.js} +17 -17
- package/dist/chunk-6DQYZU2W.js +379 -0
- package/dist/{chunk-EDS2L2LD.js → chunk-6EXDI5GI.js} +52 -26
- package/dist/chunk-6FNAKCET.js +38 -0
- package/dist/{chunk-6IU67AEK.js → chunk-75ASLHBT.js} +21 -15
- package/dist/{chunk-A3GY6SOA.js → chunk-75ZOZFGH.js} +18 -18
- package/dist/{chunk-MGYZM27B.js → chunk-77O633L5.js} +49 -23
- package/dist/{chunk-GQ4N4WKF.js → chunk-7AB6OWTV.js} +3 -3
- package/dist/{chunk-M766ZJ6W.js → chunk-7CZHUZBL.js} +25 -25
- package/dist/{chunk-A7UPUQFY.js → chunk-7FHNFCHK.js} +643 -124
- package/dist/chunk-7FUIVIBG.js +415 -0
- package/dist/{chunk-6QSERWXH.js → chunk-7QPCGTPS.js} +21 -21
- package/dist/{chunk-LR3R6Z2A.js → chunk-A2G72UI4.js} +7 -7
- package/dist/{chunk-I4JRCD6M.js → chunk-AE4P57KK.js} +23 -17
- package/dist/{chunk-AVJDSJ2F.js → chunk-AHW3RY3X.js} +7 -7
- package/dist/chunk-AM6FP6JW.js +43 -0
- package/dist/{chunk-CSZ4C5N6.js → chunk-AOCWFA7T.js} +93 -10
- package/dist/{chunk-EPTBZ3GP.js → chunk-API5TOUB.js} +1 -1
- package/dist/{chunk-652QWTLZ.js → chunk-AZDITBCT.js} +3 -3
- package/dist/{chunk-DPUYDDQG.js → chunk-BA2HUMDN.js} +25 -3
- package/dist/chunk-BA3U7ALS.js +99 -0
- package/dist/{chunk-HVUPKCGJ.js → chunk-BC6KKZ67.js} +5 -5
- package/dist/{chunk-CKSITVS4.js → chunk-BEPCKDCP.js} +2554 -722
- package/dist/{chunk-3ALD2W2A.js → chunk-BPPU3PW7.js} +4 -4
- package/dist/{chunk-QRAOANID.js → chunk-BVWWPBKD.js} +21 -21
- package/dist/{chunk-ZDPAS56H.js → chunk-BXBCMGIQ.js} +7 -1
- package/dist/chunk-BXZ4PKIT.js +233 -0
- package/dist/chunk-C7CEK3KW.js +247 -0
- package/dist/chunk-CFH3QH26.js +29 -0
- package/dist/chunk-CG6CULP6.js +170 -0
- package/dist/chunk-CLD4RVTA.js +45 -0
- package/dist/{chunk-DKJA76CJ.js → chunk-CNPY4NTZ.js} +13 -13
- package/dist/chunk-CNU5Q2D5.js +575 -0
- package/dist/{chunk-T2UYZSCQ.js → chunk-COYN3UAN.js} +126 -23
- package/dist/{chunk-23W7VWKR.js → chunk-CPK7QSBG.js} +1360 -113
- package/dist/{chunk-4AK7IBVP.js → chunk-D2WSW4GU.js} +1 -1
- package/dist/{chunk-ABWHYWNI.js → chunk-D57MFJPP.js} +3 -3
- package/dist/chunk-D5KV5PSK.js +45 -0
- package/dist/chunk-D5MASS4I.js +48 -0
- package/dist/{chunk-7EOBHUMC.js → chunk-DCWN3HFV.js} +2 -2
- package/dist/{chunk-QSXK2RGH.js → chunk-DDJPM5YX.js} +2 -2
- package/dist/chunk-DN4A2Q2O.js +57 -0
- package/dist/{chunk-IHMLFRVV.js → chunk-DUPZPDCJ.js} +58 -16
- package/dist/{chunk-PRPPGYZG.js → chunk-E2VXBSIR.js} +4 -4
- package/dist/chunk-E57AOFYN.js +32 -0
- package/dist/{chunk-UGLN7QHV.js → chunk-ECLXZWAG.js} +12 -12
- package/dist/{chunk-5WG5YP4T.js → chunk-EDZ45WIR.js} +14 -14
- package/dist/chunk-EFCQSMXB.js +37 -0
- package/dist/{chunk-2ANOROX3.js → chunk-EZIN5E5B.js} +8 -8
- package/dist/{chunk-BWZ77RQT.js → chunk-F6H2RJ3N.js} +1 -1
- package/dist/{chunk-OLQJTJJU.js → chunk-FAJDKNSD.js} +7 -3
- package/dist/chunk-FGAGWYZB.js +47 -0
- package/dist/{chunk-4WBVUHXN.js → chunk-FLVZFTLQ.js} +18 -18
- package/dist/chunk-FQ6WH6PB.js +140 -0
- package/dist/{chunk-T6XQL73F.js → chunk-FRHD22WM.js} +61 -23
- package/dist/{chunk-XAKWMCXI.js → chunk-FVMPFCDS.js} +4 -4
- package/dist/{chunk-B2WLAWNJ.js → chunk-FY3QIRTL.js} +3 -3
- package/dist/{chunk-CPA6HPVR.js → chunk-FYBF5MB2.js} +15 -11
- package/dist/{chunk-V2YTAIQO.js → chunk-G5YJBNDZ.js} +21 -6
- package/dist/chunk-G6IQYM25.js +339 -0
- package/dist/chunk-G6X4YL4D.js +161 -0
- package/dist/{chunk-SJRGMG6A.js → chunk-GC2VK3JT.js} +25 -25
- package/dist/{chunk-SP2I63OO.js → chunk-GCS3FZOB.js} +77 -3
- package/dist/{chunk-6TACQN3N.js → chunk-GDZB57IU.js} +5 -5
- package/dist/chunk-GIFMBCTW.js +221 -0
- package/dist/{chunk-YY6ZQQBP.js → chunk-GK4PYVEC.js} +18 -8
- package/dist/{chunk-TDD55CJH.js → chunk-GNWAOVFQ.js} +6 -5
- package/dist/chunk-GS76RXQE.js +226 -0
- package/dist/{chunk-YYQN46FY.js → chunk-GSGIZ2OO.js} +23 -23
- package/dist/chunk-GUYL7RMK.js +60 -0
- package/dist/chunk-GX74YWR7.js +321 -0
- package/dist/chunk-HE3HRDNZ.js +122 -0
- package/dist/{chunk-AIOQPLA5.js → chunk-HGHRSF3E.js} +30 -12
- package/dist/{chunk-2RMYG36Q.js → chunk-HK3VOHIE.js} +198 -336
- package/dist/{chunk-QZSX3F7C.js → chunk-HS4BGB4G.js} +24 -22
- package/dist/{chunk-XY3P7JW7.js → chunk-HSZMPH5T.js} +834 -149
- package/dist/{chunk-L6SGQIR3.js → chunk-HWD4JPU7.js} +4 -2
- package/dist/{chunk-PCVDV3UZ.js → chunk-HXXP2NTE.js} +6 -6
- package/dist/{chunk-AA6YULYB.js → chunk-I2A3Z5AK.js} +7 -7
- package/dist/{chunk-N7IXEHK3.js → chunk-ICHDSWEY.js} +7 -7
- package/dist/chunk-IFFRGC3N.js +31 -0
- package/dist/{chunk-4BN53TG3.js → chunk-IFHDV6KQ.js} +31 -23
- package/dist/chunk-J2O4LFVI.js +80 -0
- package/dist/chunk-J5AAZ6OJ.js +161 -0
- package/dist/{chunk-ZMFPW66A.js → chunk-JAABT3DA.js} +3 -3
- package/dist/chunk-JITJP64K.js +34 -0
- package/dist/chunk-JKIGL3XQ.js +162 -0
- package/dist/chunk-JRVNXLZP.js +615 -0
- package/dist/chunk-JRXHON4E.js +41 -0
- package/dist/{chunk-DHPACDG7.js → chunk-JS6WMC3J.js} +8 -8
- package/dist/chunk-JU4QNJSR.js +62 -0
- package/dist/{chunk-PAMPPUR6.js → chunk-JYMIB5XY.js} +1697 -172
- package/dist/{chunk-RRTKKSLQ.js → chunk-JYTIHTIK.js} +8 -6
- package/dist/{chunk-3HI6Z55Y.js → chunk-K332XW7K.js} +324 -39
- package/dist/{chunk-GLUX4EEP.js → chunk-K6JB6XTX.js} +9 -9
- package/dist/chunk-KDAHXQIE.js +294 -0
- package/dist/chunk-KYZMRSPS.js +93 -0
- package/dist/chunk-L4CESDPB.js +22 -0
- package/dist/{chunk-NXFPS2LR.js → chunk-LEBR5NHW.js} +14 -14
- package/dist/chunk-LIJJCBQI.js +223 -0
- package/dist/{chunk-DE76JROX.js → chunk-LIRVU3HW.js} +16 -16
- package/dist/{chunk-JMSCMUCA.js → chunk-LN77DXBM.js} +145 -21
- package/dist/{chunk-JIITQXFB.js → chunk-LNWEWYCM.js} +2969 -788
- package/dist/{chunk-TANFV3MZ.js → chunk-LO3BLMVG.js} +3 -3
- package/dist/chunk-LPV6T362.js +250 -0
- package/dist/{chunk-2VHF7OXM.js → chunk-LQH4P45K.js} +1 -1
- package/dist/chunk-LU4MQVAL.js +41 -0
- package/dist/chunk-LWDNKE4X.js +273 -0
- package/dist/chunk-M4H2UG4R.js +218 -0
- package/dist/{chunk-6BVONWJ7.js → chunk-M6D2U3YM.js} +3 -3
- package/dist/chunk-MD7KUEJ3.js +514 -0
- package/dist/{chunk-66YVAGGM.js → chunk-MMZUN7ZO.js} +20 -20
- package/dist/chunk-MZGRDONP.js +916 -0
- package/dist/chunk-N3RUGTGV.js +39 -0
- package/dist/{chunk-JGZCG5VM.js → chunk-NCB6656Z.js} +7 -7
- package/dist/{chunk-4NDAAFQT.js → chunk-NRQ65LTQ.js} +7 -5
- package/dist/{chunk-UNM6ZOKP.js → chunk-NTAVOWYD.js} +145 -18
- package/dist/{chunk-3USYZGRF.js → chunk-NYOABJNK.js} +36 -27
- package/dist/{chunk-WVPJSRRJ.js → chunk-O4IKAIZ2.js} +24 -20
- package/dist/{chunk-D3PO4DOZ.js → chunk-ODMBPDDV.js} +51 -14
- package/dist/chunk-OKUB6RJA.js +533 -0
- package/dist/chunk-OMPENNWY.js +39 -0
- package/dist/chunk-OPQZISG3.js +25 -0
- package/dist/{chunk-5GGOLAKC.js → chunk-OV57AHCG.js} +26 -26
- package/dist/chunk-OZJ3JLYI.js +58 -0
- package/dist/{chunk-KEM4SDDP.js → chunk-P2VBXX7N.js} +11 -10
- package/dist/{chunk-S2A7YC3Q.js → chunk-PAINMSID.js} +10150 -1720
- package/dist/chunk-PKJAV25S.js +43 -0
- package/dist/{chunk-EBEW3XXQ.js → chunk-PNQLCRSS.js} +4 -4
- package/dist/{chunk-WY6PP6AA.js → chunk-PQH56YF6.js} +37 -5
- package/dist/chunk-PRTBPXYA.js +50 -0
- package/dist/{chunk-YEDDOYSC.js → chunk-PRW3HXM3.js} +2 -2
- package/dist/chunk-PRZ7KMWL.js +42 -0
- package/dist/{chunk-6M5NK3K3.js → chunk-PTQ3ZALZ.js} +42 -4
- package/dist/{chunk-5GDRCDQB.js → chunk-PUEWDYGP.js} +2 -2
- package/dist/chunk-Q26LDIUV.js +236 -0
- package/dist/{chunk-CR3MTH32.js → chunk-Q46QDDMF.js} +77 -7
- package/dist/chunk-QBNWF5ZU.js +19 -0
- package/dist/chunk-QE527XRY.js +342 -0
- package/dist/{chunk-CNUKCS2T.js → chunk-QHJJMZLX.js} +1518 -54
- package/dist/chunk-QJCJOMW3.js +425 -0
- package/dist/{chunk-VYDBJ73M.js → chunk-QKMRFNMA.js} +15 -15
- package/dist/chunk-QOOEYDNJ.js +317 -0
- package/dist/chunk-QSIDVFB7.js +45 -0
- package/dist/{chunk-R77KLRB3.js → chunk-RA33EYS4.js} +19 -18
- package/dist/{chunk-DFBCSHVT.js → chunk-RALY3E5U.js} +4 -4
- package/dist/{chunk-ZCJDOK2S.js → chunk-S2RY3BOD.js} +35 -21
- package/dist/chunk-S5LSDXV4.js +40 -0
- package/dist/chunk-SB5GRUFM.js +54 -0
- package/dist/chunk-SH27FYPF.js +150 -0
- package/dist/chunk-T74WQQGS.js +40 -0
- package/dist/{chunk-O3WI5KWW.js → chunk-TGVVUKTG.js} +2 -2
- package/dist/chunk-THN26IEF.js +48 -0
- package/dist/chunk-TJH2EUAZ.js +47 -0
- package/dist/{chunk-ZNCEKR4J.js → chunk-TQ4TG57V.js} +12 -8
- package/dist/{chunk-7FBGJFEE.js → chunk-TQTRWENN.js} +12 -12
- package/dist/{chunk-TYAID7B7.js → chunk-TSM6T6GQ.js} +23 -23
- package/dist/{chunk-DPZHZQKE.js → chunk-TW3KOSQK.js} +43 -10
- package/dist/{chunk-MC3H7736.js → chunk-TWQRPM76.js} +37 -4
- package/dist/chunk-TYD6I4CZ.js +109 -0
- package/dist/chunk-U3NBK4EU.js +420 -0
- package/dist/{chunk-6JCPI55B.js → chunk-UDXWIPCB.js} +47 -7
- package/dist/{chunk-MMOSZPWJ.js → chunk-UEVZZZU2.js} +4 -4
- package/dist/{chunk-JBTK5OP2.js → chunk-UF4UHCIG.js} +2 -2
- package/dist/{chunk-6JUBZBMW.js → chunk-UFE36WJH.js} +4 -4
- package/dist/{chunk-ONLS5QA5.js → chunk-URIKUID7.js} +12 -12
- package/dist/chunk-UYLBRRFK.js +1106 -0
- package/dist/chunk-UZACEG2C.js +515 -0
- package/dist/{chunk-7SW2QWLU.js → chunk-VAMHOHUU.js} +12 -12
- package/dist/{chunk-RZPYKDWS.js → chunk-VUVGX5L2.js} +1 -1
- package/dist/{chunk-Q4D5X7QB.js → chunk-VYOCPTUB.js} +44 -24
- package/dist/{chunk-CAQZUNOH.js → chunk-WAZEXEJH.js} +567 -3
- package/dist/chunk-WCEF7H6L.js +221 -0
- package/dist/{chunk-2DIQQJCB.js → chunk-WEOMJHPV.js} +12 -12
- package/dist/{chunk-FHH4I4ZV.js → chunk-WFU77T3A.js} +12 -6
- package/dist/chunk-WIWTJMMR.js +292 -0
- package/dist/{chunk-2BFCZ3RK.js → chunk-WNTIOBOG.js} +18 -18
- package/dist/{chunk-7WD63HU2.js → chunk-X2CUXTWU.js} +6 -6
- package/dist/chunk-X7EMBM5X.js +34 -0
- package/dist/chunk-XEQCQO66.js +33 -0
- package/dist/{chunk-F7HYOUFF.js → chunk-XG4WJHLQ.js} +20 -4
- package/dist/{chunk-EFHQ3TWP.js → chunk-XOL3GFW2.js} +171 -31
- package/dist/{chunk-NE2W3OO7.js → chunk-XQ3YZ4QW.js} +22 -22
- package/dist/{chunk-CEXSU4S6.js → chunk-Y6K3CJBU.js} +723 -85
- package/dist/{chunk-4RS5KZQD.js → chunk-YAH5IQAL.js} +5 -5
- package/dist/{chunk-64EQYWCA.js → chunk-YBOVNMHC.js} +51 -14
- package/dist/chunk-YF5DZCPN.js +1212 -0
- package/dist/chunk-YIGBJNH4.js +37 -0
- package/dist/{chunk-BKVWTZ6A.js → chunk-YJ3TBOTK.js} +25 -25
- package/dist/{chunk-Q5AMFEWD.js → chunk-YKTE2RU3.js} +2 -2
- package/dist/{chunk-7EKXJZ2Y.js → chunk-YO2PKTXT.js} +296 -37
- package/dist/{chunk-6J5OKA4Y.js → chunk-YTTNTQOX.js} +15 -15
- package/dist/{chunk-OT2O76OS.js → chunk-YWAKDNMH.js} +183 -33
- package/dist/{chunk-R6XF6UR3.js → chunk-YZDZOEV4.js} +4 -4
- package/dist/chunk-Z3QFH7YG.js +17 -0
- package/dist/{chunk-W5BVQF44.js → chunk-Z6VLC5X4.js} +17 -17
- package/dist/{chunk-HLJAXMM4.js → chunk-ZFQMMU5Y.js} +2 -2
- package/dist/{chunk-W3BQAZ3Q.js → chunk-ZKYRDV7A.js} +12 -12
- package/dist/{chunk-ZMAINWBW.js → chunk-ZLS6PU2O.js} +3 -3
- package/dist/{chunk-ZVM6AKKM.js → chunk-ZOSD4FXV.js} +3 -3
- package/dist/chunk-ZPDDEVQX.js +47 -0
- package/dist/{chunk-TXLH6WHQ.js → chunk-ZQLRCA2V.js} +11 -11
- package/dist/{chunk-HITVBIJS.js → chunk-ZX7235KR.js} +128 -54
- package/dist/{chunk-GT4I4ZWM.js → chunk-ZZFHLRQW.js} +18 -16
- package/dist/files.json +636 -364
- package/dist/packages/naysayer/constitution/constitution.yaml +19 -0
- package/dist/packages/sdk/npm/index.js +5614 -2343
- package/dist/packages/ui/dist/assets/{elk-api-tma0MCuh.js → elk-api-CowTnhEJ.js} +2 -2
- package/dist/packages/ui/dist/assets/index-Dw20IRhQ.css +1 -0
- package/dist/packages/ui/dist/assets/index-z2wv0d5d.js +47 -0
- package/dist/packages/ui/dist/index.html +2 -2
- package/package.json +4 -4
- package/dist/chunk-2BF2EYJV.js +0 -174
- package/dist/chunk-42EVSKME.js +0 -37
- package/dist/chunk-4BKGMUIK.js +0 -53
- package/dist/chunk-5KLGBXG5.js +0 -48
- package/dist/chunk-6BNC6EQ4.js +0 -41
- package/dist/chunk-6D2CQ5II.js +0 -41
- package/dist/chunk-7AVHLZGD.js +0 -45
- package/dist/chunk-D46WUV3T.js +0 -33
- package/dist/chunk-E36QOJMD.js +0 -47
- package/dist/chunk-FQXYPF7E.js +0 -147
- package/dist/chunk-GBRFVT63.js +0 -45
- package/dist/chunk-ICY36XCH.js +0 -34
- package/dist/chunk-J4K3KVLD.js +0 -131
- package/dist/chunk-JZU3H6UQ.js +0 -54
- package/dist/chunk-NN2ZQEB4.js +0 -38
- package/dist/chunk-PCOCACY3.js +0 -385
- package/dist/chunk-RTEYOSJY.js +0 -29
- package/dist/chunk-RVH5SUW5.js +0 -69
- package/dist/chunk-VN3DP4LQ.js +0 -43
- package/dist/chunk-XPTOBS2D.js +0 -48
- package/dist/packages/ui/dist/assets/index-B54fm9FQ.js +0 -29
- package/dist/packages/ui/dist/assets/index-DD_hufQz.css +0 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
globToRegExp,
|
|
11
11
|
memoryRepo,
|
|
12
12
|
scanRepo
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7AB6OWTV.js";
|
|
14
14
|
import {
|
|
15
15
|
Dialect,
|
|
16
16
|
FrameworkModel,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
renderExpr,
|
|
27
27
|
renderTemplate,
|
|
28
28
|
require_dist
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PAINMSID.js";
|
|
30
30
|
import {
|
|
31
31
|
__commonJS,
|
|
32
32
|
__require,
|
|
@@ -18702,6 +18702,8 @@ function clientOf(type, method, names, source) {
|
|
|
18702
18702
|
};
|
|
18703
18703
|
}
|
|
18704
18704
|
function addConstant(c, owner, name2, value2, source) {
|
|
18705
|
+
if (name2 === "serialVersionUID")
|
|
18706
|
+
return;
|
|
18705
18707
|
c.constants[`${owner}.${name2}`] = { value: value2, source };
|
|
18706
18708
|
if (/service/i.test(owner))
|
|
18707
18709
|
c.serviceIds.push(`${owner}.${name2}`);
|
|
@@ -18752,7 +18754,7 @@ function assemble(c, o) {
|
|
|
18752
18754
|
const model = FrameworkModel.parse({
|
|
18753
18755
|
schemaVersion: 1,
|
|
18754
18756
|
name: o.name,
|
|
18755
|
-
packages: o.packages ??
|
|
18757
|
+
packages: o.packages ?? packagesOf(c),
|
|
18756
18758
|
artifacts: [...new Set(c.artifacts)],
|
|
18757
18759
|
annotations,
|
|
18758
18760
|
clients: c.clients,
|
|
@@ -18765,7 +18767,7 @@ async function learnFramework(repo, o) {
|
|
|
18765
18767
|
const src = (path) => ({ kind: "code", ref: `${repo.name}:${path}` });
|
|
18766
18768
|
const c = collected();
|
|
18767
18769
|
for await (const path of repo.listFiles(["**/*.java", "**/pom.xml"])) {
|
|
18768
|
-
if (/(^|\/)src\/test\//.test(path))
|
|
18770
|
+
if (/(^|\/)src\/test\//.test(path) || isBuildOutput(path))
|
|
18769
18771
|
continue;
|
|
18770
18772
|
const text2 = await repo.readText(path);
|
|
18771
18773
|
if (path.endsWith("pom.xml")) {
|
|
@@ -18878,6 +18880,25 @@ function learnFrameworkFromJar(jar, o) {
|
|
|
18878
18880
|
}
|
|
18879
18881
|
return assemble(c, o);
|
|
18880
18882
|
}
|
|
18883
|
+
function isBuildOutput(path) {
|
|
18884
|
+
const m = /(^|\/)(target|build)\//.exec(path);
|
|
18885
|
+
return !!m && !path.slice(0, m.index).split("/").includes("src");
|
|
18886
|
+
}
|
|
18887
|
+
function packagesOf(c) {
|
|
18888
|
+
const names = [...c.packages].sort();
|
|
18889
|
+
if (names.length === 0)
|
|
18890
|
+
throw new Error("no Java source with a package declaration was found (tests, target/ and build/ are left out). Point --from at the framework's own source, its JAR or its .tgz, or name its package with --package <base package>.");
|
|
18891
|
+
const p = commonPrefix(names);
|
|
18892
|
+
if (p)
|
|
18893
|
+
return [p];
|
|
18894
|
+
const count = /* @__PURE__ */ new Map();
|
|
18895
|
+
for (const n of names) {
|
|
18896
|
+
const r = n.split(".").slice(0, 2).join(".");
|
|
18897
|
+
count.set(r, (count.get(r) ?? 0) + 1);
|
|
18898
|
+
}
|
|
18899
|
+
const roots = [...count.keys()].sort((a, b) => count.get(b) - count.get(a) || (a < b ? -1 : 1));
|
|
18900
|
+
throw new Error(`its Java packages share no common package (${roots.slice(0, 6).join(", ")}${roots.length > 6 ? ", ..." : ""}), so the framework's can't be told. Name it with --package <base package>, e.g. --package ${roots[0]}.`);
|
|
18901
|
+
}
|
|
18881
18902
|
function commonPrefix(names) {
|
|
18882
18903
|
if (names.length === 0)
|
|
18883
18904
|
return "";
|
|
@@ -19410,6 +19431,18 @@ async function houseDependencies(repo, groups) {
|
|
|
19410
19431
|
for (const block of select(pom, "project/properties"))
|
|
19411
19432
|
for (const p of block.children)
|
|
19412
19433
|
props.set(p.name, p.text.trim());
|
|
19434
|
+
const parentVersion = selectText(pom, "project/parent/version")?.text.trim();
|
|
19435
|
+
const ownVersion = selectText(pom, "project/version")?.text.trim() || parentVersion;
|
|
19436
|
+
const builtIn = {
|
|
19437
|
+
"project.parent.version": parentVersion,
|
|
19438
|
+
"parent.version": parentVersion,
|
|
19439
|
+
"project.version": ownVersion,
|
|
19440
|
+
version: ownVersion,
|
|
19441
|
+
"pom.version": ownVersion
|
|
19442
|
+
};
|
|
19443
|
+
for (const [k, v] of Object.entries(builtIn))
|
|
19444
|
+
if (v && !props.has(k))
|
|
19445
|
+
props.set(k, v);
|
|
19413
19446
|
const fill = (v) => v.replace(/\$\{([\w.-]+)\}/g, (s, k) => props.get(k) ?? s);
|
|
19414
19447
|
for (const d of select(pom, "//dependency")) {
|
|
19415
19448
|
const group = selectText(d, "groupId")?.text;
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
gatewayHostFix,
|
|
8
|
+
hostQuestionDrafts,
|
|
9
|
+
unknownHosts
|
|
10
|
+
} from "./chunk-4SLBCEPD.js";
|
|
11
|
+
import {
|
|
12
|
+
baseClonePath,
|
|
13
|
+
loadRepos
|
|
14
|
+
} from "./chunk-XOL3GFW2.js";
|
|
15
|
+
import {
|
|
16
|
+
fsRepo
|
|
17
|
+
} from "./chunk-7AB6OWTV.js";
|
|
18
|
+
import {
|
|
19
|
+
HOSTS_NONE,
|
|
20
|
+
HOSTS_OUTSIDE_INTERNAL,
|
|
21
|
+
HOSTS_OUTSIDE_VENDOR,
|
|
22
|
+
HOSTS_STEP,
|
|
23
|
+
hostMatches,
|
|
24
|
+
hostOfQuestion,
|
|
25
|
+
listQuestions,
|
|
26
|
+
raiseQuestions,
|
|
27
|
+
retireQuestion,
|
|
28
|
+
writeQuestion
|
|
29
|
+
} from "./chunk-PAINMSID.js";
|
|
30
|
+
|
|
31
|
+
// packages/cli/dist/host-questions.js
|
|
32
|
+
import { stat } from "node:fs/promises";
|
|
33
|
+
var HOSTS_RERUN = "atticus scan";
|
|
34
|
+
var isDir = (p) => stat(p).then((s) => s.isDirectory(), () => false);
|
|
35
|
+
async function askHosts(root, records, o) {
|
|
36
|
+
const repos = await loadRepos(root).catch(() => []);
|
|
37
|
+
const dirs = /* @__PURE__ */ new Map();
|
|
38
|
+
for (const r of repos) {
|
|
39
|
+
const dir = baseClonePath(root, r.id);
|
|
40
|
+
if (await isDir(dir))
|
|
41
|
+
dirs.set(r.id, dir);
|
|
42
|
+
}
|
|
43
|
+
const asks = await unknownHosts({
|
|
44
|
+
records,
|
|
45
|
+
repos,
|
|
46
|
+
handle: (id) => dirs.has(id) ? fsRepo(id, dirs.get(id), "0".repeat(40)) : void 0
|
|
47
|
+
});
|
|
48
|
+
const before = (await listQuestions(root, { step: HOSTS_STEP })).questions;
|
|
49
|
+
const asked = new Set(before.map((q) => hostOfQuestion(q)));
|
|
50
|
+
const raised = [];
|
|
51
|
+
const at = (o.now ?? /* @__PURE__ */ new Date()).toISOString();
|
|
52
|
+
const reasked = [];
|
|
53
|
+
const OUTSIDE = /* @__PURE__ */ new Set([HOSTS_OUTSIDE_INTERNAL, HOSTS_OUTSIDE_VENDOR]);
|
|
54
|
+
const gateway = /* @__PURE__ */ new Map();
|
|
55
|
+
for (const { repo, draft, byPath } of hostQuestionDrafts(asks)) {
|
|
56
|
+
const host = hostOfQuestion(draft);
|
|
57
|
+
if (byPath?.length && host)
|
|
58
|
+
gateway.set(host, gatewayHostFix(host, byPath));
|
|
59
|
+
if (asked.has(hostOfQuestion(draft))) {
|
|
60
|
+
const old = before.find((q) => hostOfQuestion(q) === hostOfQuestion(draft));
|
|
61
|
+
if (!old || old.state !== "open" || old.options.some((x) => OUTSIDE.has(x.label)))
|
|
62
|
+
continue;
|
|
63
|
+
const add = draft.options.filter((x) => OUTSIDE.has(x.label));
|
|
64
|
+
const none = old.options.findIndex((x) => x.label === HOSTS_NONE);
|
|
65
|
+
const at2 = none < 0 ? old.options.length : none;
|
|
66
|
+
const next = {
|
|
67
|
+
...old,
|
|
68
|
+
options: [...old.options.slice(0, at2), ...add, ...old.options.slice(at2)]
|
|
69
|
+
};
|
|
70
|
+
await writeQuestion(root, next);
|
|
71
|
+
reasked.push(next);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const r = await raiseQuestions(root, [draft], {
|
|
75
|
+
step: HOSTS_STEP,
|
|
76
|
+
repo,
|
|
77
|
+
command: o.command,
|
|
78
|
+
rerun: o.rerun ?? HOSTS_RERUN,
|
|
79
|
+
at
|
|
80
|
+
});
|
|
81
|
+
raised.push(...r.raised);
|
|
82
|
+
}
|
|
83
|
+
const hosts = new Set(asks.map((a) => a.host));
|
|
84
|
+
const open = before.map((q) => reasked.find((x) => x.id === q.id) ?? q).filter((q) => q.state === "open" && hosts.has(hostOfQuestion(q)));
|
|
85
|
+
const lines = [];
|
|
86
|
+
for (const q of before) {
|
|
87
|
+
const host = hostOfQuestion(q);
|
|
88
|
+
if (q.state !== "open" || !host || hosts.has(host))
|
|
89
|
+
continue;
|
|
90
|
+
const [name, port] = host.split(/:(?=\d+$)/);
|
|
91
|
+
const listing = repos.filter((r) => [...r.hosts, ...r.modules.flatMap((m) => m.hosts)].some((p) => hostMatches(p, name, port ? Number(port) : void 0))).map((r) => r.id);
|
|
92
|
+
if (!listing.length)
|
|
93
|
+
continue;
|
|
94
|
+
const why = `${listing.join(", ")} ${listing.length === 1 ? "lists" : "list"} ${host} under hosts in repos.manifest.yaml`;
|
|
95
|
+
await retireQuestion(root, q.id, { why, at });
|
|
96
|
+
lines.push(`Retired ${q.id} (${q.question}): ${why}.`);
|
|
97
|
+
}
|
|
98
|
+
for (const q of raised)
|
|
99
|
+
lines.push(gateway.has(hostOfQuestion(q)) ? `Calls to ${hostOfQuestion(q)} join no repo: no repo lists it under hosts. Asked ${q.id}: ${q.question} ${gateway.get(hostOfQuestion(q))}. If one repo alone answers on it, answer: atticus questions answer ${q.id} --option <n> (1 is ${q.options[0].label}).` : `Calls to ${hostOfQuestion(q)} join no repo: no repo lists it under hosts. Asked ${q.id}: ${q.question} Answer it: atticus questions answer ${q.id} --option <n> (1 is ${q.options[0].label}). If several repos answer on it (a shared gateway or platform host), don't pick one: list it under hosts on each of them in repos.manifest.yaml (with each one's basePath where the path tells them apart), and the question retires itself. If a system outside the estate answers on it, pick an outside system (another team's or a vendor's): it goes into the profile with the host as its alias.`);
|
|
100
|
+
for (const q of reasked)
|
|
101
|
+
lines.push(`Re-asked ${q.id} (${q.question}): it now offers an outside system, another team's or a vendor's, for a host no repo of the estate answers on.`);
|
|
102
|
+
for (const q of open)
|
|
103
|
+
lines.push(`Still open: ${q.question}${gateway.has(hostOfQuestion(q)) ? ` ${gateway.get(hostOfQuestion(q))}.` : ""} Answer it: atticus questions answer ${q.id} --option <n>, then ${o.rerun ?? HOSTS_RERUN}.`);
|
|
104
|
+
return { raised, reasked, open, lines };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
askHosts
|
|
109
|
+
};
|
|
@@ -0,0 +1,420 @@
|
|
|
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
|
+
modelsData,
|
|
8
|
+
reachPlanOf
|
|
9
|
+
} from "./chunk-455SYIIE.js";
|
|
10
|
+
import {
|
|
11
|
+
effectiveRules,
|
|
12
|
+
orgRulesLacking,
|
|
13
|
+
readingRulesText,
|
|
14
|
+
ruleIds,
|
|
15
|
+
ruleMatches
|
|
16
|
+
} from "./chunk-GIFMBCTW.js";
|
|
17
|
+
import {
|
|
18
|
+
loadReadPlan,
|
|
19
|
+
modelsModeOf,
|
|
20
|
+
recordNotReached,
|
|
21
|
+
saveReadPlan
|
|
22
|
+
} from "./chunk-MD7KUEJ3.js";
|
|
23
|
+
import {
|
|
24
|
+
FACT_RULES_HASH,
|
|
25
|
+
MODELS_RULE,
|
|
26
|
+
RULE_SETS,
|
|
27
|
+
factRulesFor,
|
|
28
|
+
factsReference,
|
|
29
|
+
ruleSetKinds,
|
|
30
|
+
rulesLacking,
|
|
31
|
+
rulesNow,
|
|
32
|
+
topUpWords
|
|
33
|
+
} from "./chunk-3AQ2R5NL.js";
|
|
34
|
+
import {
|
|
35
|
+
fileKinds,
|
|
36
|
+
kindsOf,
|
|
37
|
+
lineRangeOf,
|
|
38
|
+
planBatches,
|
|
39
|
+
readingRank,
|
|
40
|
+
sameCommit
|
|
41
|
+
} from "./chunk-JYMIB5XY.js";
|
|
42
|
+
import {
|
|
43
|
+
DATA_RULE,
|
|
44
|
+
neutralise,
|
|
45
|
+
wrapData
|
|
46
|
+
} from "./chunk-QHJJMZLX.js";
|
|
47
|
+
import {
|
|
48
|
+
citedFiles,
|
|
49
|
+
factsDirOf,
|
|
50
|
+
factsRelOf,
|
|
51
|
+
parseFacts
|
|
52
|
+
} from "./chunk-PAINMSID.js";
|
|
53
|
+
import {
|
|
54
|
+
writeFileAtomic
|
|
55
|
+
} from "./chunk-ODMBPDDV.js";
|
|
56
|
+
|
|
57
|
+
// packages/cli/dist/map-rules.js
|
|
58
|
+
import { createHash } from "node:crypto";
|
|
59
|
+
import { readFile } from "node:fs/promises";
|
|
60
|
+
import { join } from "node:path";
|
|
61
|
+
var has = (a, b) => a.some((x) => b.includes(x));
|
|
62
|
+
function applies(set, f) {
|
|
63
|
+
switch (set) {
|
|
64
|
+
case "field-types":
|
|
65
|
+
case "message-types":
|
|
66
|
+
return f.code ? f.rank === 2 || f.rank === 3 || f.cited.has("entry") || f.cited.has("call") || f.cited.has("field") : f.rank === 3 && f.kinds.includes("protocols");
|
|
67
|
+
case "mappings":
|
|
68
|
+
return f.kinds.includes("gateway");
|
|
69
|
+
case "terms":
|
|
70
|
+
return !f.code && has(f.kinds, ["config", "deploy", "gateway"]);
|
|
71
|
+
case "call-auth":
|
|
72
|
+
return f.code ? f.rank === 1 || f.rank === 3 || f.cited.has("call") : has(f.kinds, ["config", "gateway"]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function topUpFiles(o) {
|
|
76
|
+
const whole = planBatches(o.source, {
|
|
77
|
+
room: Number.MAX_SAFE_INTEGER,
|
|
78
|
+
exclude: o.exclude,
|
|
79
|
+
...o.conventions ? { conventions: o.conventions } : {},
|
|
80
|
+
...o.reach?.reach.rooted && o.reach.reach.models ? { reach: { first: o.reach.first, leaveOut: o.reach.leaveOut } } : {}
|
|
81
|
+
});
|
|
82
|
+
const cites = /* @__PURE__ */ new Map();
|
|
83
|
+
for (const f of o.facts)
|
|
84
|
+
for (const p of citedFiles(f)) {
|
|
85
|
+
const k = cites.get(p) ?? /* @__PURE__ */ new Set();
|
|
86
|
+
k.add(f.kind);
|
|
87
|
+
cites.set(p, k);
|
|
88
|
+
}
|
|
89
|
+
const out = [];
|
|
90
|
+
for (const slice of whole.batches.flat()) {
|
|
91
|
+
const path = slice.path;
|
|
92
|
+
const rank = readingRank(path);
|
|
93
|
+
if (rank === 5)
|
|
94
|
+
continue;
|
|
95
|
+
const kinds = fileKinds(path);
|
|
96
|
+
const of = {
|
|
97
|
+
kinds,
|
|
98
|
+
rank,
|
|
99
|
+
code: kinds.includes("backend") || kinds.includes("frontend"),
|
|
100
|
+
cited: cites.get(path) ?? /* @__PURE__ */ new Set()
|
|
101
|
+
};
|
|
102
|
+
const sets = o.sets.filter((s) => has(kinds, ruleSetKinds(s)) && applies(s, of));
|
|
103
|
+
if (sets.length)
|
|
104
|
+
out.push({ path, tokens: slice.tokens, lines: slice.of, sets });
|
|
105
|
+
}
|
|
106
|
+
return out;
|
|
107
|
+
}
|
|
108
|
+
function ruleSetsOfFiles(files) {
|
|
109
|
+
const all = new Set(files.flatMap((f) => f.sets));
|
|
110
|
+
return [
|
|
111
|
+
...RULE_SETS.filter((x) => all.has(x)),
|
|
112
|
+
...[...all].filter((x) => x.startsWith("org:")).sort()
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
function topUpSessions(files, room) {
|
|
116
|
+
const reads = [];
|
|
117
|
+
for (const f of files) {
|
|
118
|
+
if (f.tokens <= room || f.lines <= 1) {
|
|
119
|
+
reads.push({ path: f.path, file: f.path, tokens: f.tokens, sets: f.sets });
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const per = Math.max(1, Math.floor(f.lines * room / f.tokens));
|
|
123
|
+
for (let from = 1; from <= f.lines; from += per) {
|
|
124
|
+
const to = Math.min(f.lines, from + per - 1);
|
|
125
|
+
reads.push({
|
|
126
|
+
path: `${f.path}#L${from}-L${to}`,
|
|
127
|
+
file: f.path,
|
|
128
|
+
tokens: Math.ceil(f.tokens * (to - from + 1) / f.lines),
|
|
129
|
+
sets: f.sets
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const sessions = [];
|
|
134
|
+
for (const r of reads) {
|
|
135
|
+
const last = sessions.at(-1);
|
|
136
|
+
if (last && last.tokens + r.tokens <= room) {
|
|
137
|
+
last.reads.push(r);
|
|
138
|
+
last.tokens += r.tokens;
|
|
139
|
+
} else
|
|
140
|
+
sessions.push({ reads: [r], tokens: r.tokens });
|
|
141
|
+
}
|
|
142
|
+
return sessions.map((s) => ({
|
|
143
|
+
paths: s.reads.map((r) => r.path),
|
|
144
|
+
sets: ruleSetsOfFiles(s.reads),
|
|
145
|
+
files: new Set(s.reads.map((r) => r.file)).size,
|
|
146
|
+
tokens: s.tokens
|
|
147
|
+
}));
|
|
148
|
+
}
|
|
149
|
+
var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
150
|
+
async function factsOf(root, repo) {
|
|
151
|
+
const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => "");
|
|
152
|
+
if (!text.trim())
|
|
153
|
+
return `${repo} isn't read yet: atticus map ${repo} reads it, under every rule.`;
|
|
154
|
+
const p = parseFacts(text);
|
|
155
|
+
return p.ok ? p.facts : `${factsRelOf(root)}/${repo}.jsonl does not read as facts (${p.issues[0]?.message ?? "?"}).`;
|
|
156
|
+
}
|
|
157
|
+
async function topUpOf(root, repo, o) {
|
|
158
|
+
const plan = await loadReadPlan(root, repo);
|
|
159
|
+
const builtin = rulesLacking(plan?.rules);
|
|
160
|
+
const org = orgRulesLacking(plan?.rules, await effectiveRules(root, repo)).filter((r) => r.files?.length);
|
|
161
|
+
const lacking = [...builtin, ...org.map((r) => r.id)];
|
|
162
|
+
if (!lacking.length)
|
|
163
|
+
return { lacking, files: [], ...plan ? { plan } : {} };
|
|
164
|
+
const facts = o.facts?.length ? [...o.facts] : await factsOf(root, repo);
|
|
165
|
+
if (typeof facts === "string")
|
|
166
|
+
return { error: facts };
|
|
167
|
+
if (!facts.length)
|
|
168
|
+
return { error: `${repo} isn't read yet: atticus map ${repo} reads it.` };
|
|
169
|
+
if (!facts.every((f) => sameCommit(f.commit, o.commit)))
|
|
170
|
+
return {
|
|
171
|
+
error: `${repo}'s clone moved past its facts' commit: read what changed first (atticus map ${repo}), then top it up.`
|
|
172
|
+
};
|
|
173
|
+
const all = planBatches(o.source, {
|
|
174
|
+
room: Number.MAX_SAFE_INTEGER,
|
|
175
|
+
exclude: o.exclude,
|
|
176
|
+
...o.conventions ? { conventions: o.conventions } : {}
|
|
177
|
+
});
|
|
178
|
+
const reach = reachPlanOf({
|
|
179
|
+
paths: all.batches.flat().map((x) => x.path),
|
|
180
|
+
source: o.source,
|
|
181
|
+
facts,
|
|
182
|
+
mode: await modelsModeOf(root, repo, o.models)
|
|
183
|
+
});
|
|
184
|
+
const files = topUpFiles({
|
|
185
|
+
facts,
|
|
186
|
+
source: o.source,
|
|
187
|
+
exclude: o.exclude,
|
|
188
|
+
sets: builtin,
|
|
189
|
+
...o.conventions ? { conventions: o.conventions } : {},
|
|
190
|
+
reach
|
|
191
|
+
});
|
|
192
|
+
if (org.length) {
|
|
193
|
+
const byPath = new Map(files.map((f) => [f.path, f]));
|
|
194
|
+
for (const slice of all.batches.flat()) {
|
|
195
|
+
if (readingRank(slice.path) === 5)
|
|
196
|
+
continue;
|
|
197
|
+
const ids = org.filter((r) => r.files?.length && ruleMatches(r, slice.path)).map((r) => r.id);
|
|
198
|
+
if (!ids.length)
|
|
199
|
+
continue;
|
|
200
|
+
const f = byPath.get(slice.path);
|
|
201
|
+
if (f)
|
|
202
|
+
f.sets.push(...ids);
|
|
203
|
+
else {
|
|
204
|
+
const add = { path: slice.path, tokens: slice.tokens, lines: slice.of, sets: ids };
|
|
205
|
+
byPath.set(slice.path, add);
|
|
206
|
+
files.push(add);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return { lacking, files, reach, ...plan ? { plan } : {} };
|
|
211
|
+
}
|
|
212
|
+
var planOr = (plan, repo, commit, session) => plan ?? { schemaVersion: 2, repo, commit, session, plannedAt: stamp(), parts: [] };
|
|
213
|
+
async function recordRulesNow(root, repo, commit, given) {
|
|
214
|
+
const plan = await loadReadPlan(root, repo);
|
|
215
|
+
const { topUp: _t, ...rest } = planOr(plan, repo, commit, 15e4);
|
|
216
|
+
const org = given ? [...plan?.rules?.sets ?? [], ...given] : ruleIds(await effectiveRules(root, repo));
|
|
217
|
+
const rules = withOrgIds(rulesNow(), org);
|
|
218
|
+
if (plan?.rules?.hash === FACT_RULES_HASH && !plan.topUp && rules.sets.every((x) => plan.rules.sets.includes(x)))
|
|
219
|
+
return;
|
|
220
|
+
await saveReadPlan(root, { ...rest, rules });
|
|
221
|
+
}
|
|
222
|
+
async function writtenHash(root, repo) {
|
|
223
|
+
const h = createHash("sha256");
|
|
224
|
+
for (const f of [`${repo}.jsonl`, `${repo}.reviewed.jsonl`])
|
|
225
|
+
h.update(await readFile(join(factsDirOf(root), f), "utf8").catch(() => "")).update("\0");
|
|
226
|
+
return h.digest("hex").slice(0, 16);
|
|
227
|
+
}
|
|
228
|
+
async function recordTopUpVerified(root, repo, o) {
|
|
229
|
+
const plan = await loadReadPlan(root, repo);
|
|
230
|
+
const t = plan?.topUp;
|
|
231
|
+
if (!plan || !t || !o.commit || !sameCommit(t.commit, o.commit))
|
|
232
|
+
return;
|
|
233
|
+
const now = await writtenHash(root, repo);
|
|
234
|
+
const doneNow = (s) => !!s.given && !s.done && (s.before === void 0 || s.before !== now);
|
|
235
|
+
if (!t.sessions.some(doneNow))
|
|
236
|
+
return;
|
|
237
|
+
const at = o.now ?? stamp();
|
|
238
|
+
const sessions = t.sessions.map((s) => doneNow(s) ? { ...s, done: { at, commit: o.commit } } : s);
|
|
239
|
+
if (sessions.every((s) => s.done)) {
|
|
240
|
+
const { topUp: _t, ...rest } = plan;
|
|
241
|
+
const sets = [.../* @__PURE__ */ new Set([...plan.rules?.sets ?? [], ...t.sets])];
|
|
242
|
+
await saveReadPlan(root, {
|
|
243
|
+
...rest,
|
|
244
|
+
rules: t.hash === FACT_RULES_HASH ? withOrgIds(rulesNow(), sets) : { hash: t.hash, sets }
|
|
245
|
+
});
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
await saveReadPlan(root, { ...plan, topUp: { ...t, sessions } });
|
|
249
|
+
}
|
|
250
|
+
var withOrgIds = (r, had) => ({
|
|
251
|
+
hash: r.hash,
|
|
252
|
+
sets: [...r.sets, ...[...new Set(had.filter((x) => x.startsWith("org:")))].sort()]
|
|
253
|
+
});
|
|
254
|
+
var rulesRelOf = (root, repo) => `${factsRelOf(root)}/${repo}.rules.md`;
|
|
255
|
+
var sameSets = (a, b) => a.length === b.length && a.every((x) => b.includes(x));
|
|
256
|
+
async function plannedTopUp(root, repo, o) {
|
|
257
|
+
const t = await topUpOf(root, repo, o);
|
|
258
|
+
if ("error" in t)
|
|
259
|
+
return t;
|
|
260
|
+
if (!t.lacking.length)
|
|
261
|
+
return { lacking: [], facts: [] };
|
|
262
|
+
const facts = await factsOf(root, repo);
|
|
263
|
+
if (typeof facts === "string")
|
|
264
|
+
return { error: facts };
|
|
265
|
+
if (!o.dryRun && t.reach)
|
|
266
|
+
await recordNotReached(root, repo, {
|
|
267
|
+
commit: o.commit,
|
|
268
|
+
session: o.session,
|
|
269
|
+
models: t.reach.mode,
|
|
270
|
+
...t.reach.notReached ? { notReached: t.reach.notReached } : {}
|
|
271
|
+
});
|
|
272
|
+
const reach = t.reach ? { reach: t.reach } : {};
|
|
273
|
+
const on = (await loadReadPlan(root, repo))?.topUp;
|
|
274
|
+
const same = on && sameCommit(on.commit, o.commit) && on.hash === FACT_RULES_HASH && sameSets(on.sets, t.lacking);
|
|
275
|
+
if (same && (!o.models || on.models === o.models))
|
|
276
|
+
return { lacking: t.lacking, topUp: on, facts, ...reach };
|
|
277
|
+
const doneSessions = same ? on.sessions.filter((s) => s.done) : [];
|
|
278
|
+
const read = new Set(doneSessions.flatMap((s) => s.paths));
|
|
279
|
+
const topUp = {
|
|
280
|
+
commit: o.commit,
|
|
281
|
+
hash: FACT_RULES_HASH,
|
|
282
|
+
sets: t.lacking,
|
|
283
|
+
session: o.session,
|
|
284
|
+
plannedAt: stamp(),
|
|
285
|
+
...o.models ? { models: o.models } : {},
|
|
286
|
+
sessions: [
|
|
287
|
+
...doneSessions,
|
|
288
|
+
...topUpSessions(t.files.filter((f) => !read.has(f.path)), o.session)
|
|
289
|
+
]
|
|
290
|
+
};
|
|
291
|
+
if (!o.dryRun && topUp.sessions.length)
|
|
292
|
+
await saveReadPlan(root, {
|
|
293
|
+
...planOr(await loadReadPlan(root, repo), repo, o.commit, o.session),
|
|
294
|
+
topUp
|
|
295
|
+
});
|
|
296
|
+
return { lacking: t.lacking, topUp, facts, ...reach };
|
|
297
|
+
}
|
|
298
|
+
async function mapRules(root, repo, o, io) {
|
|
299
|
+
const p = await plannedTopUp(root, repo, o);
|
|
300
|
+
if ("error" in p) {
|
|
301
|
+
io.err(p.error);
|
|
302
|
+
return 2;
|
|
303
|
+
}
|
|
304
|
+
if (!p.lacking.length || !p.topUp) {
|
|
305
|
+
if (o.json)
|
|
306
|
+
io.out(JSON.stringify({ repo, commit: o.commit, sets: [], sessions: 0 }, null, 2));
|
|
307
|
+
else
|
|
308
|
+
io.out(`${repo} was read under the reading rules there are now: nothing to top up.`);
|
|
309
|
+
return 0;
|
|
310
|
+
}
|
|
311
|
+
const t = p.topUp;
|
|
312
|
+
if (!t.sessions.length) {
|
|
313
|
+
await recordRulesNow(root, repo, o.commit, t.sets);
|
|
314
|
+
if (o.json)
|
|
315
|
+
io.out(JSON.stringify({ repo, commit: o.commit, sets: t.sets, sessions: 0 }, null, 2));
|
|
316
|
+
else
|
|
317
|
+
io.out(`No file of ${repo} is one the reading rules added since it was read apply to (${t.sets.join(", ")}): its read is recorded as under the rules there are now.`);
|
|
318
|
+
return 0;
|
|
319
|
+
}
|
|
320
|
+
const n = t.sessions.findIndex((s) => !s.done);
|
|
321
|
+
const next = t.sessions[n];
|
|
322
|
+
const before = await writtenHash(root, repo);
|
|
323
|
+
const sessions = t.sessions.map((s, i) => i === n ? { ...s, given: stamp(), ...s.given && s.before ? {} : { before } } : s);
|
|
324
|
+
const plan = await loadReadPlan(root, repo);
|
|
325
|
+
await saveReadPlan(root, { ...plan, topUp: { ...t, sessions } });
|
|
326
|
+
const rel = rulesRelOf(root, repo);
|
|
327
|
+
await writeFileAtomic(join(factsDirOf(root), `${repo}.rules.md`), rulesPrompt(repo, o.commit, {
|
|
328
|
+
orgRules: await effectiveRules(root, repo),
|
|
329
|
+
rel: factsRelOf(root),
|
|
330
|
+
session: next,
|
|
331
|
+
n: n + 1,
|
|
332
|
+
of: t.sessions.length,
|
|
333
|
+
facts: p.facts,
|
|
334
|
+
notes: o.notes,
|
|
335
|
+
...o.checkout ? { checkout: o.checkout } : {},
|
|
336
|
+
...p.reach ? { reach: p.reach } : {}
|
|
337
|
+
}));
|
|
338
|
+
if (o.json) {
|
|
339
|
+
io.out(JSON.stringify({
|
|
340
|
+
repo,
|
|
341
|
+
commit: o.commit,
|
|
342
|
+
sets: t.sets,
|
|
343
|
+
session: n + 1,
|
|
344
|
+
sessions: t.sessions.length,
|
|
345
|
+
paths: next.paths,
|
|
346
|
+
tokens: next.tokens,
|
|
347
|
+
prompt: rel
|
|
348
|
+
}, null, 2));
|
|
349
|
+
return 0;
|
|
350
|
+
}
|
|
351
|
+
const files = new Set(t.sessions.flatMap((s) => s.paths.map((x) => lineRangeOf(x)?.file ?? x)));
|
|
352
|
+
const tokens = t.sessions.reduce((x, s) => x + s.tokens, 0);
|
|
353
|
+
io.out(`Top-up of ${repo} for the reading rules added since it was read (${t.sets.join(", ")}): ${files.size} ${files.size === 1 ? "file" : "files"}, about ${tokens.toLocaleString("en-US")} tokens, in ${t.sessions.length} ${t.sessions.length === 1 ? "session" : "sessions"} of ${o.session.toLocaleString("en-US")} at most.`);
|
|
354
|
+
io.out(`Wrote ${rel}: session ${n + 1} of ${t.sessions.length}, ${next.paths.length} ${next.paths.length === 1 ? "read" : "reads"} (${next.sets.join(", ")}), about ${next.tokens.toLocaleString("en-US")} tokens.`);
|
|
355
|
+
io.out(`Start a new chat, so the session holds only these files, and run /atticus-map ${repo} --rules there (or paste ${rel}). When atticus verify ${repo} passes after it, the session is done${t.sessions.length > n + 1 ? `; the next is for another new chat` : ` and the read records the rules there are now`}.`);
|
|
356
|
+
return 0;
|
|
357
|
+
}
|
|
358
|
+
var factLine = (f) => `- ${f.id} (${f.kind}, ${f.cite.file}:${f.cite.line})`;
|
|
359
|
+
function rulesPrompt(repo, commit, c) {
|
|
360
|
+
const s = c.session;
|
|
361
|
+
const sets = s.sets.filter((x) => RULE_SETS.includes(x));
|
|
362
|
+
const orgIds = new Set(s.sets.filter((x) => x.startsWith("org:")));
|
|
363
|
+
const files = s.paths.map((x) => lineRangeOf(x)?.file ?? x);
|
|
364
|
+
const list = s.paths.map((x) => `- \`${x}\``).join("\n");
|
|
365
|
+
const kept = c.facts.filter((f) => citedFiles(f).some((p) => files.includes(p)));
|
|
366
|
+
const block = (id, kind, origin, text) => wrapData({ id, kind, origin }, neutralise(text, void 0, { mark: true }).text);
|
|
367
|
+
return [
|
|
368
|
+
`# Top-up of ${repo} at ${commit}`,
|
|
369
|
+
"",
|
|
370
|
+
`Session ${c.n} of ${c.of}, about ${s.tokens.toLocaleString("en-US")} tokens of source. ${topUpWords(s.sets.map((x) => x.startsWith("org:") ? x.slice(4).split("@")[0] : x))} Open each path below and nothing else: a path ending \`#L<from>-L<to>\` by those lines only, never the whole file.${c.checkout ? ` The paths are in the repo's checkout, \`${c.checkout}\` in this metarepo: open \`${c.checkout}/<path>\` with your file tools; there is no need to look for it or to run a command.` : ""}`,
|
|
371
|
+
"",
|
|
372
|
+
`- Write each fact to \`${c.rel}/${repo}.jsonl\`, appended, with \`commit\` ${commit}. A kept fact you add to is written again whole, under its id.`,
|
|
373
|
+
`- A path that has nothing to add under these rules: a line in \`${c.rel}/${repo}.reviewed.jsonl\`, \`{"path": "<the path>", "why": "..."}\`. Every path below ends with a fact written or a line there.`,
|
|
374
|
+
`- Then run \`atticus verify ${repo}\` and fix what it rejects until it exits 0: that records this session done${c.of > c.n ? `. The next session is for a new chat: \`/atticus-map ${repo} --rules\` there` : ", and the read as under the rules there are now"}.`,
|
|
375
|
+
"",
|
|
376
|
+
"## The rules",
|
|
377
|
+
"",
|
|
378
|
+
"Each fact has this shape:",
|
|
379
|
+
"",
|
|
380
|
+
factsReference(),
|
|
381
|
+
"",
|
|
382
|
+
factRulesFor(kindsOf(files), void 0, sets),
|
|
383
|
+
"",
|
|
384
|
+
...orgIds.size && c.orgRules ? [readingRulesText({ rules: c.orgRules.rules, builtinOff: [] }, orgIds), ""] : [],
|
|
385
|
+
"## Read",
|
|
386
|
+
"",
|
|
387
|
+
`The paths to open are in the data block below. ${DATA_RULE}`,
|
|
388
|
+
"",
|
|
389
|
+
block(`${repo}.rules`, "rules", `${c.rel}/${repo}.read-plan.yaml`, list),
|
|
390
|
+
"",
|
|
391
|
+
"## Facts already kept (by id; don't write them again)",
|
|
392
|
+
"",
|
|
393
|
+
kept.length ? block(`${repo}.kept`, "facts", `${c.rel}/${repo}.jsonl`, kept.map(factLine).join("\n")) : "None cite these files.",
|
|
394
|
+
...c.notes ? [
|
|
395
|
+
"",
|
|
396
|
+
"## The organisation's notes for this repo",
|
|
397
|
+
"",
|
|
398
|
+
block(`${repo}.notes`, "notes", "org-pack", c.notes)
|
|
399
|
+
] : [],
|
|
400
|
+
"",
|
|
401
|
+
...modelsPart(repo, c.reach, new Set(files))
|
|
402
|
+
].join("\n");
|
|
403
|
+
}
|
|
404
|
+
function modelsPart(repo, r, files) {
|
|
405
|
+
const data = r ? modelsData(repo, r, { only: files }) : void 0;
|
|
406
|
+
return data ? ["## Model classes", "", MODELS_RULE, "", data, ""] : [];
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export {
|
|
410
|
+
topUpFiles,
|
|
411
|
+
ruleSetsOfFiles,
|
|
412
|
+
topUpSessions,
|
|
413
|
+
topUpOf,
|
|
414
|
+
recordRulesNow,
|
|
415
|
+
recordTopUpVerified,
|
|
416
|
+
rulesRelOf,
|
|
417
|
+
plannedTopUp,
|
|
418
|
+
mapRules,
|
|
419
|
+
rulesPrompt
|
|
420
|
+
};
|