@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
|
@@ -0,0 +1,514 @@
|
|
|
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
|
+
readReviewed
|
|
8
|
+
} from "./chunk-Q46QDDMF.js";
|
|
9
|
+
import {
|
|
10
|
+
lineRangeOf
|
|
11
|
+
} from "./chunk-JYMIB5XY.js";
|
|
12
|
+
import {
|
|
13
|
+
globToRegExp
|
|
14
|
+
} from "./chunk-7AB6OWTV.js";
|
|
15
|
+
import {
|
|
16
|
+
citedFiles,
|
|
17
|
+
external_exports,
|
|
18
|
+
factsDirOf,
|
|
19
|
+
factsRelOf,
|
|
20
|
+
parseFacts,
|
|
21
|
+
require_dist
|
|
22
|
+
} from "./chunk-PAINMSID.js";
|
|
23
|
+
import {
|
|
24
|
+
writeFileAtomic
|
|
25
|
+
} from "./chunk-ODMBPDDV.js";
|
|
26
|
+
import {
|
|
27
|
+
__toESM
|
|
28
|
+
} from "./chunk-TV45EUGM.js";
|
|
29
|
+
|
|
30
|
+
// packages/cli/dist/map-parts.js
|
|
31
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
32
|
+
import { readFile } from "node:fs/promises";
|
|
33
|
+
import { join } from "node:path";
|
|
34
|
+
var ReadStamp = external_exports.strictObject({ at: external_exports.string().min(1), commit: external_exports.string().min(1) });
|
|
35
|
+
var Part = external_exports.strictObject({
|
|
36
|
+
part: external_exports.number().int().positive(),
|
|
37
|
+
paths: external_exports.array(external_exports.string().min(1)).min(1),
|
|
38
|
+
files: external_exports.number().int().nonnegative(),
|
|
39
|
+
/** An estimate: the tokens the part's source counts as (`estimateTokens`), not a meter. */
|
|
40
|
+
tokens: external_exports.number().int().nonnegative(),
|
|
41
|
+
/** ADR 0141 (v2): when `atticus verify` first found every unit of the part in the facts. */
|
|
42
|
+
read: ReadStamp.optional()
|
|
43
|
+
});
|
|
44
|
+
var PlanV1 = external_exports.strictObject({
|
|
45
|
+
schemaVersion: external_exports.literal(1),
|
|
46
|
+
repo: external_exports.string().min(1),
|
|
47
|
+
commit: external_exports.string().min(1),
|
|
48
|
+
session: external_exports.number().int().positive(),
|
|
49
|
+
plannedAt: external_exports.string().min(1),
|
|
50
|
+
parts: external_exports.array(Part.omit({ read: true })).min(1)
|
|
51
|
+
});
|
|
52
|
+
var Reported = external_exports.strictObject({
|
|
53
|
+
at: external_exports.string().min(1),
|
|
54
|
+
/** The commit the read was of. */
|
|
55
|
+
commit: external_exports.string().min(1),
|
|
56
|
+
tokens: external_exports.number().int().positive().optional(),
|
|
57
|
+
sessions: external_exports.number().int().positive().optional(),
|
|
58
|
+
/** The part the report is for, when it is for one. */
|
|
59
|
+
part: external_exports.number().int().positive().optional(),
|
|
60
|
+
/** Who reported it (--by), when given. */
|
|
61
|
+
by: external_exports.string().min(1).optional()
|
|
62
|
+
});
|
|
63
|
+
var RulesRecord = external_exports.strictObject({
|
|
64
|
+
hash: external_exports.string().min(1),
|
|
65
|
+
sets: external_exports.array(external_exports.string().min(1))
|
|
66
|
+
});
|
|
67
|
+
var TopUpSession = external_exports.strictObject({
|
|
68
|
+
paths: external_exports.array(external_exports.string().min(1)).min(1),
|
|
69
|
+
sets: external_exports.array(external_exports.string().min(1)).min(1),
|
|
70
|
+
files: external_exports.number().int().nonnegative(),
|
|
71
|
+
tokens: external_exports.number().int().nonnegative(),
|
|
72
|
+
/** When `atticus map <repo> --rules` last gave it to a reader. */
|
|
73
|
+
given: external_exports.string().min(1).optional(),
|
|
74
|
+
/**
|
|
75
|
+
* beta.17: a hash of the repo's facts and reviewed lines when it was given; a verify finds it
|
|
76
|
+
* done only once they differ (something was written for it).
|
|
77
|
+
*/
|
|
78
|
+
before: external_exports.string().min(1).optional(),
|
|
79
|
+
/** When a verify that passed after it was given found it done. */
|
|
80
|
+
done: ReadStamp.optional()
|
|
81
|
+
});
|
|
82
|
+
var TopUp = external_exports.strictObject({
|
|
83
|
+
commit: external_exports.string().min(1),
|
|
84
|
+
hash: external_exports.string().min(1),
|
|
85
|
+
sets: external_exports.array(external_exports.string().min(1)),
|
|
86
|
+
session: external_exports.number().int().positive(),
|
|
87
|
+
plannedAt: external_exports.string().min(1),
|
|
88
|
+
/** beta.15: the model classes it was planned to read (`--models`), when one was asked for. */
|
|
89
|
+
models: external_exports.enum(["entries", "reachable", "all"]).optional(),
|
|
90
|
+
sessions: external_exports.array(TopUpSession)
|
|
91
|
+
});
|
|
92
|
+
var MODELS_MODES = ["entries", "reachable", "all"];
|
|
93
|
+
var NotReached = external_exports.strictObject({
|
|
94
|
+
why: external_exports.string().min(1),
|
|
95
|
+
files: external_exports.array(external_exports.string().min(1)),
|
|
96
|
+
tokens: external_exports.number().int().nonnegative(),
|
|
97
|
+
/**
|
|
98
|
+
* ADR 0170 (`--models entries`): those of `files` an outbound client reaches but no entry point
|
|
99
|
+
* does, with why; `--models reachable` reads them.
|
|
100
|
+
*/
|
|
101
|
+
clientOnly: external_exports.strictObject({ why: external_exports.string().min(1), files: external_exports.array(external_exports.string().min(1)) }).optional()
|
|
102
|
+
});
|
|
103
|
+
var ReadPlanFile = external_exports.strictObject({
|
|
104
|
+
/** 2 since ADR 0141 (a v1 file reads as v2: `migrateReadPlan`). */
|
|
105
|
+
schemaVersion: external_exports.literal(2),
|
|
106
|
+
repo: external_exports.string().min(1),
|
|
107
|
+
/** The commit the plan was made at; the plan is stale at another commit. */
|
|
108
|
+
commit: external_exports.string().min(1),
|
|
109
|
+
/** The session token budget the parts were planned for (`sessionTokensFor`). */
|
|
110
|
+
session: external_exports.number().int().positive(),
|
|
111
|
+
plannedAt: external_exports.string().min(1),
|
|
112
|
+
/**
|
|
113
|
+
* ADR 0141: what `--estimate` counted for the read (an estimate, not a meter): its source files
|
|
114
|
+
* and tokens, and the sessions planned (the parts, or one). `reread` when the read is of the
|
|
115
|
+
* files changed since the facts' commit only (addendum A-incremental).
|
|
116
|
+
*/
|
|
117
|
+
estimate: external_exports.strictObject({
|
|
118
|
+
files: external_exports.number().int().nonnegative(),
|
|
119
|
+
tokens: external_exports.number().int().nonnegative(),
|
|
120
|
+
sessions: external_exports.number().int().positive(),
|
|
121
|
+
reread: external_exports.literal(true).optional()
|
|
122
|
+
}).optional(),
|
|
123
|
+
/** The parts in the order they are read; none for a repo one session reads (ADR 0141). */
|
|
124
|
+
parts: external_exports.array(Part),
|
|
125
|
+
/** ADR 0141: when `atticus verify` first found the whole plan in the facts. */
|
|
126
|
+
read: ReadStamp.extend({ sessions: external_exports.number().int().positive() }).optional(),
|
|
127
|
+
/** ADR 0141: what the reader reported the read took (`atticus map <repo> --spent`). */
|
|
128
|
+
reported: external_exports.array(Reported).optional(),
|
|
129
|
+
/** ADR 0167: the reading rules the read was given; none when read before they were recorded. */
|
|
130
|
+
rules: RulesRecord.optional(),
|
|
131
|
+
/** ADR 0167: a top-up for the rule sets the read lacked, under way. */
|
|
132
|
+
topUp: TopUp.optional(),
|
|
133
|
+
/**
|
|
134
|
+
* ADR 0169: `all` when a person asked for every model class (`--models all`), ADR 0170:
|
|
135
|
+
* `entries` for those the entry points reach; left out, the read takes those its entry points
|
|
136
|
+
* and calls reach.
|
|
137
|
+
*/
|
|
138
|
+
models: external_exports.enum(MODELS_MODES).optional(),
|
|
139
|
+
/** ADR 0169: the model files the read leaves out, nothing reaching them. */
|
|
140
|
+
notReached: NotReached.optional()
|
|
141
|
+
});
|
|
142
|
+
function migrateReadPlan(raw) {
|
|
143
|
+
const v2 = ReadPlanFile.safeParse(raw);
|
|
144
|
+
if (v2.success)
|
|
145
|
+
return v2.data;
|
|
146
|
+
const v1 = PlanV1.safeParse(raw);
|
|
147
|
+
if (!v1.success)
|
|
148
|
+
return void 0;
|
|
149
|
+
return { ...v1.data, schemaVersion: 2 };
|
|
150
|
+
}
|
|
151
|
+
var readPlanRelOf = (root, repo) => `${factsRelOf(root)}/${repo}.read-plan.yaml`;
|
|
152
|
+
var readPlanPath = (root, repo) => join(factsDirOf(root), `${repo}.read-plan.yaml`);
|
|
153
|
+
function unitOf(glob) {
|
|
154
|
+
const range = lineRangeOf(glob);
|
|
155
|
+
if (range)
|
|
156
|
+
return { glob, dir: range.file.replace(/\/?[^/]*$/, ""), deep: false, range };
|
|
157
|
+
if (glob === "**")
|
|
158
|
+
return { glob, dir: "", deep: true };
|
|
159
|
+
if (glob.endsWith("/**"))
|
|
160
|
+
return { glob, dir: glob.slice(0, -3), deep: true };
|
|
161
|
+
if (glob === "*")
|
|
162
|
+
return { glob, dir: "", deep: false };
|
|
163
|
+
if (glob.endsWith("/*"))
|
|
164
|
+
return { glob, dir: glob.slice(0, -2), deep: false };
|
|
165
|
+
return { glob, dir: glob.replace(/\/?[^/]*$/, ""), deep: false, file: glob };
|
|
166
|
+
}
|
|
167
|
+
function folderOf(path) {
|
|
168
|
+
const star = path.search(/[*?]/);
|
|
169
|
+
if (star < 0)
|
|
170
|
+
return { dir: path.replace(/\/?[^/]*$/, ""), deep: false };
|
|
171
|
+
return { dir: path.slice(0, star).replace(/\/$/, ""), deep: true };
|
|
172
|
+
}
|
|
173
|
+
var isGlobPath = (p) => /[*?]/.test(p);
|
|
174
|
+
var under = (dir, of) => of === "" || dir === of || dir.startsWith(`${of}/`);
|
|
175
|
+
function globHolds(glob, file) {
|
|
176
|
+
const u = unitOf(glob);
|
|
177
|
+
if (u.range)
|
|
178
|
+
return u.range.file === file;
|
|
179
|
+
if (!/[*]/.test(glob))
|
|
180
|
+
return glob === file;
|
|
181
|
+
const dir = file.replace(/\/?[^/]*$/, "");
|
|
182
|
+
return u.deep ? under(dir, u.dir) : dir === u.dir;
|
|
183
|
+
}
|
|
184
|
+
var HEADER = "# The parts this repo is read in (ADR 0124 addendum A-ledger), as atticus map --estimate planned them,\n# and what the read cost (ADR 0141): tokens are estimates, reported numbers are the reader's word.\n# Which part is next is read back from the facts; atticus next says it. Atticus writes this file.\n";
|
|
185
|
+
async function saveReadPlan(root, plan) {
|
|
186
|
+
await writeFileAtomic(readPlanPath(root, plan.repo), `${HEADER}${(0, import_yaml.stringify)(ReadPlanFile.parse(plan), { lineWidth: 0 })}`);
|
|
187
|
+
}
|
|
188
|
+
async function writeReadPlan(root, repo, o) {
|
|
189
|
+
const plan = {
|
|
190
|
+
schemaVersion: 2,
|
|
191
|
+
repo,
|
|
192
|
+
commit: o.commit,
|
|
193
|
+
session: o.session,
|
|
194
|
+
plannedAt: o.now ?? stamp(),
|
|
195
|
+
...o.estimate ? { estimate: o.estimate } : {},
|
|
196
|
+
parts: o.parts.map((p, i) => ({
|
|
197
|
+
part: i + 1,
|
|
198
|
+
paths: [...p.paths],
|
|
199
|
+
files: p.files,
|
|
200
|
+
tokens: p.tokens
|
|
201
|
+
})),
|
|
202
|
+
...o.reported?.length ? { reported: [...o.reported] } : {},
|
|
203
|
+
...o.rules ? { rules: { hash: o.rules.hash, sets: [...o.rules.sets] } } : {},
|
|
204
|
+
...o.models && o.models !== "reachable" ? { models: o.models } : {},
|
|
205
|
+
...o.notReached?.files.length ? { notReached: o.notReached } : {}
|
|
206
|
+
};
|
|
207
|
+
await saveReadPlan(root, plan);
|
|
208
|
+
return plan;
|
|
209
|
+
}
|
|
210
|
+
var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
211
|
+
async function recordNotReached(root, repo, o) {
|
|
212
|
+
const plan = await loadReadPlan(root, repo);
|
|
213
|
+
const { notReached: _n, models: _m, ...rest } = plan ?? {
|
|
214
|
+
schemaVersion: 2,
|
|
215
|
+
repo,
|
|
216
|
+
commit: o.commit,
|
|
217
|
+
session: o.session,
|
|
218
|
+
plannedAt: stamp(),
|
|
219
|
+
parts: []
|
|
220
|
+
};
|
|
221
|
+
const next = {
|
|
222
|
+
...rest,
|
|
223
|
+
...o.models !== "reachable" ? { models: o.models } : {},
|
|
224
|
+
...o.notReached?.files.length ? { notReached: o.notReached } : {}
|
|
225
|
+
};
|
|
226
|
+
if (plan && JSON.stringify(plan) === JSON.stringify(next))
|
|
227
|
+
return;
|
|
228
|
+
if (!plan && !next.notReached && !next.models)
|
|
229
|
+
return;
|
|
230
|
+
await saveReadPlan(root, next);
|
|
231
|
+
}
|
|
232
|
+
async function modelsModeOf(root, repo, asked) {
|
|
233
|
+
return asked ?? (await loadReadPlan(root, repo))?.models ?? "reachable";
|
|
234
|
+
}
|
|
235
|
+
async function loadReadPlan(root, repo) {
|
|
236
|
+
const text = await readFile(readPlanPath(root, repo), "utf8").catch(() => void 0);
|
|
237
|
+
if (text === void 0)
|
|
238
|
+
return void 0;
|
|
239
|
+
try {
|
|
240
|
+
return migrateReadPlan((0, import_yaml.parse)(text));
|
|
241
|
+
} catch {
|
|
242
|
+
return void 0;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function citedLines(x, out = []) {
|
|
246
|
+
if (Array.isArray(x))
|
|
247
|
+
for (const v of x)
|
|
248
|
+
citedLines(v, out);
|
|
249
|
+
else if (x && typeof x === "object") {
|
|
250
|
+
const o = x;
|
|
251
|
+
if (typeof o.file === "string" && typeof o.line === "number")
|
|
252
|
+
out.push({ file: o.file, line: o.line });
|
|
253
|
+
for (const v of Object.values(o))
|
|
254
|
+
if (v && typeof v === "object")
|
|
255
|
+
citedLines(v, out);
|
|
256
|
+
}
|
|
257
|
+
return out;
|
|
258
|
+
}
|
|
259
|
+
async function coveredOf(root, repo) {
|
|
260
|
+
const out = /* @__PURE__ */ new Set();
|
|
261
|
+
const reviewed = /* @__PURE__ */ new Set();
|
|
262
|
+
const lines = [];
|
|
263
|
+
const ranges = /* @__PURE__ */ new Set();
|
|
264
|
+
const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => void 0);
|
|
265
|
+
if (text !== void 0) {
|
|
266
|
+
const parsed = parseFacts(text);
|
|
267
|
+
const facts = parsed.ok ? parsed.facts : [];
|
|
268
|
+
for (const f of facts) {
|
|
269
|
+
for (const p of citedFiles(f))
|
|
270
|
+
out.add(p);
|
|
271
|
+
citedLines(f, lines);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
for (const e of (await readReviewed(root, repo)).entries)
|
|
275
|
+
if (lineRangeOf(e.path))
|
|
276
|
+
ranges.add(e.path);
|
|
277
|
+
else {
|
|
278
|
+
out.add(e.path);
|
|
279
|
+
reviewed.add(e.path);
|
|
280
|
+
}
|
|
281
|
+
return { paths: [...out], reviewed, lines, ranges };
|
|
282
|
+
}
|
|
283
|
+
async function readPlanProgress(root, repo, o = {}) {
|
|
284
|
+
const plan = await loadReadPlan(root, repo);
|
|
285
|
+
if (!plan || !plan.parts.length)
|
|
286
|
+
return void 0;
|
|
287
|
+
return progressOf(plan, await coveredOf(root, repo), o);
|
|
288
|
+
}
|
|
289
|
+
function ownStarts(plan) {
|
|
290
|
+
const byFile = /* @__PURE__ */ new Map();
|
|
291
|
+
for (const p of plan.parts)
|
|
292
|
+
for (const glob of p.paths) {
|
|
293
|
+
const r = lineRangeOf(glob);
|
|
294
|
+
if (r)
|
|
295
|
+
byFile.set(r.file, [...byFile.get(r.file) ?? [], { glob, from: r.from, to: r.to }]);
|
|
296
|
+
}
|
|
297
|
+
const out = /* @__PURE__ */ new Map();
|
|
298
|
+
for (const rs of byFile.values()) {
|
|
299
|
+
rs.sort((a, b) => a.from - b.from || a.to - b.to);
|
|
300
|
+
let end = 0;
|
|
301
|
+
for (const r of rs) {
|
|
302
|
+
out.set(r.glob, Math.min(r.to, Math.max(r.from, end + 1)));
|
|
303
|
+
end = Math.max(end, r.to);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return out;
|
|
307
|
+
}
|
|
308
|
+
function progressOf(plan, of, o) {
|
|
309
|
+
const repo = plan.repo;
|
|
310
|
+
const covered = of.paths.map(folderOf);
|
|
311
|
+
const own = ownStarts(plan);
|
|
312
|
+
const parts = plan.parts.map((p) => {
|
|
313
|
+
const units = p.paths.map(unitOf);
|
|
314
|
+
const hit = (u) => {
|
|
315
|
+
if (u.range) {
|
|
316
|
+
const r = u.range;
|
|
317
|
+
const start = own.get(u.glob) ?? r.from;
|
|
318
|
+
return of.ranges.has(u.glob) || of.lines.some((l) => l.file === r.file && l.line >= start && l.line <= r.to) || // The whole file reviewed, or a folder glob reviewed over it.
|
|
319
|
+
of.reviewed.has(r.file) || [...of.reviewed].some((c) => folderOf(c).deep && under(u.dir, folderOf(c).dir));
|
|
320
|
+
}
|
|
321
|
+
if (u.file)
|
|
322
|
+
return of.paths.includes(u.file) || [...of.reviewed].some((c) => isGlobPath(c) && globToRegExp(c).test(u.file));
|
|
323
|
+
return covered.some((c) => u.deep ? under(c.dir, u.dir) : c.dir === u.dir || c.deep && under(u.dir, c.dir));
|
|
324
|
+
};
|
|
325
|
+
if (p.read)
|
|
326
|
+
return { ...p, state: "done", covered: p.paths, left: [] };
|
|
327
|
+
const yes = units.filter(hit).map((u) => u.glob);
|
|
328
|
+
const no = units.filter((u) => !hit(u)).map((u) => u.glob);
|
|
329
|
+
return {
|
|
330
|
+
...p,
|
|
331
|
+
state: no.length === 0 ? "done" : yes.length ? "in-progress" : "to-read",
|
|
332
|
+
covered: yes,
|
|
333
|
+
left: no
|
|
334
|
+
};
|
|
335
|
+
});
|
|
336
|
+
const done = parts.filter((p) => p.state === "done").length;
|
|
337
|
+
const next = parts.find((p) => p.state !== "done");
|
|
338
|
+
return {
|
|
339
|
+
repo,
|
|
340
|
+
commit: plan.commit,
|
|
341
|
+
session: plan.session,
|
|
342
|
+
plannedAt: plan.plannedAt,
|
|
343
|
+
parts,
|
|
344
|
+
total: parts.length,
|
|
345
|
+
done,
|
|
346
|
+
...next ? { next } : {},
|
|
347
|
+
stale: o.commit !== void 0 && o.commit !== plan.commit
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
function partUnaccounted(part, unknown) {
|
|
351
|
+
const out = [];
|
|
352
|
+
for (const glob of part.paths) {
|
|
353
|
+
if (lineRangeOf(glob)) {
|
|
354
|
+
if (part.left.includes(glob))
|
|
355
|
+
out.push({ glob, files: [] });
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
const files = unknown.filter((f) => globHolds(glob, f));
|
|
359
|
+
if (files.length)
|
|
360
|
+
out.push({ glob, files });
|
|
361
|
+
}
|
|
362
|
+
return out;
|
|
363
|
+
}
|
|
364
|
+
var partOfWords = (p) => `part ${p.part} of ${p.total}`;
|
|
365
|
+
var sameCommit = (a, b) => a.startsWith(b) || b.startsWith(a);
|
|
366
|
+
async function recordReadProgress(root, repo, o) {
|
|
367
|
+
const plan = await loadReadPlan(root, repo);
|
|
368
|
+
if (!plan || !o.commit || !sameCommit(plan.commit, o.commit))
|
|
369
|
+
return void 0;
|
|
370
|
+
const at = o.now ?? stamp();
|
|
371
|
+
const read = { at, commit: o.commit };
|
|
372
|
+
let changed = false;
|
|
373
|
+
let parts = plan.parts;
|
|
374
|
+
let whole = plan.parts.length === 0 && o.kept > 0;
|
|
375
|
+
if (plan.parts.length) {
|
|
376
|
+
const progress = progressOf(plan, await coveredOf(root, repo), {});
|
|
377
|
+
parts = plan.parts.map((p, i) => {
|
|
378
|
+
const state = progress.parts[i];
|
|
379
|
+
if (p.read)
|
|
380
|
+
return p;
|
|
381
|
+
if (state.state !== "done" && !(o.unknown && !partUnaccounted(state, o.unknown).length))
|
|
382
|
+
return p;
|
|
383
|
+
changed = true;
|
|
384
|
+
return { ...p, read };
|
|
385
|
+
});
|
|
386
|
+
whole = parts.every((p) => p.read);
|
|
387
|
+
}
|
|
388
|
+
const next = {
|
|
389
|
+
...plan,
|
|
390
|
+
parts,
|
|
391
|
+
...whole && !plan.read ? { read: { ...read, sessions: plan.parts.length || 1 } } : plan.read ? { read: plan.read } : {}
|
|
392
|
+
};
|
|
393
|
+
if (whole && !plan.read)
|
|
394
|
+
changed = true;
|
|
395
|
+
if (!changed)
|
|
396
|
+
return plan;
|
|
397
|
+
await saveReadPlan(root, next);
|
|
398
|
+
return next;
|
|
399
|
+
}
|
|
400
|
+
async function recordReported(root, repo, r) {
|
|
401
|
+
const plan = await loadReadPlan(root, repo);
|
|
402
|
+
if (!plan)
|
|
403
|
+
return void 0;
|
|
404
|
+
const entry = {
|
|
405
|
+
at: r.at ?? stamp(),
|
|
406
|
+
commit: plan.commit,
|
|
407
|
+
...r.tokens ? { tokens: r.tokens } : {},
|
|
408
|
+
...r.sessions ? { sessions: r.sessions } : {},
|
|
409
|
+
...r.part ? { part: r.part } : {},
|
|
410
|
+
...r.by ? { by: r.by } : {}
|
|
411
|
+
};
|
|
412
|
+
const next = { ...plan, reported: [...plan.reported ?? [], entry] };
|
|
413
|
+
await saveReadPlan(root, next);
|
|
414
|
+
return next;
|
|
415
|
+
}
|
|
416
|
+
function readCostOf(plan) {
|
|
417
|
+
const ofCommit = (plan.reported ?? []).filter((r) => sameCommit(r.commit, plan.commit));
|
|
418
|
+
const sum = (k) => ofCommit.some((r) => r[k] !== void 0) ? ofCommit.reduce((n, r) => n + (r[k] ?? 0), 0) : void 0;
|
|
419
|
+
const tokens = sum("tokens");
|
|
420
|
+
const sessions = sum("sessions");
|
|
421
|
+
const of = plan.parts.length || 1;
|
|
422
|
+
return {
|
|
423
|
+
commit: plan.commit,
|
|
424
|
+
session: plan.session,
|
|
425
|
+
...plan.estimate ? { estimated: plan.estimate } : {},
|
|
426
|
+
read: {
|
|
427
|
+
parts: plan.parts.length ? plan.parts.filter((p) => p.read).length : plan.read ? 1 : 0,
|
|
428
|
+
of,
|
|
429
|
+
...plan.read ? { at: plan.read.at } : {}
|
|
430
|
+
},
|
|
431
|
+
...ofCommit.length ? {
|
|
432
|
+
reported: {
|
|
433
|
+
...tokens !== void 0 ? { tokens } : {},
|
|
434
|
+
...sessions !== void 0 ? { sessions } : {},
|
|
435
|
+
reports: ofCommit.length
|
|
436
|
+
}
|
|
437
|
+
} : {}
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
var tokensWords = (n) => n >= 1e6 ? `${(n / 1e6).toFixed(1).replace(/\.0$/, "")}M` : n >= 1e3 ? `${Math.round(n / 1e3)}K` : String(n);
|
|
441
|
+
function readCostWords(c) {
|
|
442
|
+
const out = [];
|
|
443
|
+
if (c.estimated)
|
|
444
|
+
out.push(`estimated about ${tokensWords(c.estimated.tokens)} tokens in ${c.estimated.sessions} session${c.estimated.sessions === 1 ? "" : "s"}${c.estimated.reread ? " (a re-read)" : ""}`);
|
|
445
|
+
if (c.read.of > 1 || c.read.parts)
|
|
446
|
+
out.push(c.read.at ? `read in ${c.read.of} part${c.read.of === 1 ? "" : "s"}` : `${c.read.parts} of ${c.read.of} part${c.read.of === 1 ? "" : "s"} read`);
|
|
447
|
+
if (c.reported)
|
|
448
|
+
out.push(`reported ${[
|
|
449
|
+
c.reported.tokens !== void 0 ? `${tokensWords(c.reported.tokens)} tokens` : "",
|
|
450
|
+
c.reported.sessions !== void 0 ? `${c.reported.sessions} session${c.reported.sessions === 1 ? "" : "s"}` : ""
|
|
451
|
+
].filter(Boolean).join(" in ")}`);
|
|
452
|
+
return out.join("; ");
|
|
453
|
+
}
|
|
454
|
+
async function mapSpent(root, repo, o, io) {
|
|
455
|
+
const count = (v, what) => {
|
|
456
|
+
if (v === void 0)
|
|
457
|
+
return void 0;
|
|
458
|
+
const n = Number(v.replace(/[_,]/g, "").replace(/k$/i, "000"));
|
|
459
|
+
if (Number.isInteger(n) && n > 0)
|
|
460
|
+
return n;
|
|
461
|
+
io.err(`${what} is a whole number above 0 (got ${v}).`);
|
|
462
|
+
return false;
|
|
463
|
+
};
|
|
464
|
+
const tokens = count(o.spent, "--spent");
|
|
465
|
+
const sessions = count(o.sessions, "--sessions");
|
|
466
|
+
const part = count(o.part, "--part");
|
|
467
|
+
if (tokens === false || sessions === false || part === false)
|
|
468
|
+
return 2;
|
|
469
|
+
if (tokens === void 0 && sessions === void 0) {
|
|
470
|
+
io.err("Usage: atticus map <repo> --spent <tokens> [--sessions n] [--part n]");
|
|
471
|
+
return 2;
|
|
472
|
+
}
|
|
473
|
+
const plan = await loadReadPlan(root, repo);
|
|
474
|
+
if (!plan) {
|
|
475
|
+
io.err(`${repo} has no read plan (${readPlanRelOf(root, repo)}) to record it in: run atticus map ${repo} --estimate first; it records the estimate the read is compared with.`);
|
|
476
|
+
return 2;
|
|
477
|
+
}
|
|
478
|
+
if (part !== void 0 && !plan.parts.some((p) => p.part === part)) {
|
|
479
|
+
io.err(`${repo}'s read plan has ${plan.parts.length ? `parts 1 to ${plan.parts.length}` : "no parts (one session reads it)"}: there is no part ${part}.`);
|
|
480
|
+
return 2;
|
|
481
|
+
}
|
|
482
|
+
const next = await recordReported(root, repo, {
|
|
483
|
+
...tokens ? { tokens } : {},
|
|
484
|
+
...sessions ? { sessions } : {},
|
|
485
|
+
...part ? { part } : {},
|
|
486
|
+
...o.by ? { by: o.by } : {}
|
|
487
|
+
});
|
|
488
|
+
const cost = readCostOf(next);
|
|
489
|
+
io.out(`Recorded in ${readPlanRelOf(root, repo)}, as reported (Atticus meters nothing): ${readCostWords(cost)}.`);
|
|
490
|
+
return 0;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export {
|
|
494
|
+
MODELS_MODES,
|
|
495
|
+
ReadPlanFile,
|
|
496
|
+
migrateReadPlan,
|
|
497
|
+
readPlanRelOf,
|
|
498
|
+
globHolds,
|
|
499
|
+
saveReadPlan,
|
|
500
|
+
writeReadPlan,
|
|
501
|
+
recordNotReached,
|
|
502
|
+
modelsModeOf,
|
|
503
|
+
loadReadPlan,
|
|
504
|
+
readPlanProgress,
|
|
505
|
+
ownStarts,
|
|
506
|
+
partUnaccounted,
|
|
507
|
+
partOfWords,
|
|
508
|
+
recordReadProgress,
|
|
509
|
+
recordReported,
|
|
510
|
+
readCostOf,
|
|
511
|
+
tokensWords,
|
|
512
|
+
readCostWords,
|
|
513
|
+
mapSpent
|
|
514
|
+
};
|
|
@@ -12,27 +12,27 @@ import {
|
|
|
12
12
|
snowSubmit,
|
|
13
13
|
storyBarCommand,
|
|
14
14
|
templatesDraft
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-I2A3Z5AK.js";
|
|
16
|
+
import "./chunk-F6H2RJ3N.js";
|
|
17
|
+
import "./chunk-BEPCKDCP.js";
|
|
18
|
+
import "./chunk-HWD4JPU7.js";
|
|
19
|
+
import "./chunk-5WERBKLE.js";
|
|
17
20
|
import "./chunk-VOGCSYOI.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-CNUKCS2T.js";
|
|
34
|
-
import "./chunk-S2A7YC3Q.js";
|
|
35
|
-
import "./chunk-D3PO4DOZ.js";
|
|
21
|
+
import "./chunk-K332XW7K.js";
|
|
22
|
+
import "./chunk-HSZMPH5T.js";
|
|
23
|
+
import "./chunk-D2WSW4GU.js";
|
|
24
|
+
import "./chunk-4KNOJC6J.js";
|
|
25
|
+
import "./chunk-4SLBCEPD.js";
|
|
26
|
+
import "./chunk-64AADMTW.js";
|
|
27
|
+
import "./chunk-JYMIB5XY.js";
|
|
28
|
+
import "./chunk-CPK7QSBG.js";
|
|
29
|
+
import "./chunk-YO2PKTXT.js";
|
|
30
|
+
import "./chunk-TWQRPM76.js";
|
|
31
|
+
import "./chunk-XOL3GFW2.js";
|
|
32
|
+
import "./chunk-QHJJMZLX.js";
|
|
33
|
+
import "./chunk-7AB6OWTV.js";
|
|
34
|
+
import "./chunk-PAINMSID.js";
|
|
35
|
+
import "./chunk-ODMBPDDV.js";
|
|
36
36
|
import "./chunk-TV45EUGM.js";
|
|
37
37
|
export {
|
|
38
38
|
adoSync,
|