@maycombhq/atticus 2.0.0-beta.11 → 2.0.0-beta.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/bin.js +3 -3
  2. package/dist/{chunk-4UZJOQYK.js → chunk-2A24BNRZ.js} +7 -7
  3. package/dist/{chunk-C2YGYTU6.js → chunk-2DJUQ6CO.js} +22 -22
  4. package/dist/{chunk-BQNEHB5U.js → chunk-2OWSG6BK.js} +11 -11
  5. package/dist/{chunk-23VFQHFQ.js → chunk-2QT6WVAK.js} +31 -21
  6. package/dist/chunk-2RMWW6G3.js +41 -0
  7. package/dist/{chunk-SILY6ZEZ.js → chunk-3256EDLL.js} +3 -3
  8. package/dist/{chunk-YLAM4HZH.js → chunk-34BCKMBS.js} +3 -3
  9. package/dist/{chunk-GVFUEGGM.js → chunk-34NWVIBC.js} +2 -2
  10. package/dist/{chunk-UABFFMWH.js → chunk-36CTZGPH.js} +7 -7
  11. package/dist/{chunk-77RSRG3A.js → chunk-3JLTN3Y7.js} +7 -7
  12. package/dist/{chunk-QWHTTA2X.js → chunk-3M7QBKKG.js} +8 -6
  13. package/dist/chunk-3PLE3ZQ5.js +34 -0
  14. package/dist/{chunk-LUPW4WLK.js → chunk-3W5R5J65.js} +8 -8
  15. package/dist/{chunk-EBWIOODZ.js → chunk-42L2WHP6.js} +4 -4
  16. package/dist/{chunk-KU4T2CXJ.js → chunk-4GNKICU5.js} +18 -18
  17. package/dist/{chunk-2K2ZEJVR.js → chunk-4HTILEXW.js} +2 -2
  18. package/dist/{chunk-HR4DVO6X.js → chunk-4JLB5ISS.js} +3 -3
  19. package/dist/{chunk-XOVLGBKI.js → chunk-5C24MOXU.js} +17 -17
  20. package/dist/{chunk-EHUYLNLC.js → chunk-5G5GD5HF.js} +14 -14
  21. package/dist/{chunk-HGQZTUAC.js → chunk-5I5JDJ3R.js} +4 -4
  22. package/dist/{chunk-KIWEBM6G.js → chunk-5IMZYLDW.js} +11 -11
  23. package/dist/{chunk-XJAJQGXJ.js → chunk-5ION6STH.js} +2 -2
  24. package/dist/{chunk-5ICB2BXH.js → chunk-5R2EWR47.js} +7 -7
  25. package/dist/{chunk-HOUUBE74.js → chunk-65XZSK6S.js} +4 -4
  26. package/dist/{chunk-LVBPY2M6.js → chunk-6AYUBYK6.js} +348 -15
  27. package/dist/{chunk-IY4PHPHT.js → chunk-6HSRGY4B.js} +7 -5
  28. package/dist/{chunk-Y5AYBGLB.js → chunk-6IKYFARG.js} +22 -13
  29. package/dist/{chunk-7KXYMC2P.js → chunk-6R2OM6Y3.js} +15 -15
  30. package/dist/{chunk-GWSWS264.js → chunk-6ROZRBWH.js} +4 -4
  31. package/dist/{chunk-TZXHUDI6.js → chunk-72DY5NCN.js} +2 -2
  32. package/dist/{chunk-XNRPCI23.js → chunk-77UOXZVM.js} +5 -5
  33. package/dist/{chunk-LS3WR2RF.js → chunk-7C7PTJM2.js} +256 -73
  34. package/dist/{chunk-VYNZED7B.js → chunk-7FPTI62T.js} +20 -20
  35. package/dist/{chunk-Z2EYRUOH.js → chunk-7H5HYERS.js} +19 -19
  36. package/dist/{chunk-4YWRU7JK.js → chunk-7MASAGFE.js} +15 -15
  37. package/dist/{chunk-7SZPENUP.js → chunk-7UKETVPW.js} +1 -1
  38. package/dist/{chunk-55TBYJF2.js → chunk-7UXSS23C.js} +18 -16
  39. package/dist/{chunk-XPWSNKF3.js → chunk-7VAMO66T.js} +398 -111
  40. package/dist/{chunk-LDIARP6F.js → chunk-7VNEDDCC.js} +2 -2
  41. package/dist/{chunk-TGEOLIAK.js → chunk-7XWCTVJS.js} +3 -3
  42. package/dist/{chunk-RJDP642F.js → chunk-ARLH2ZMD.js} +1 -1
  43. package/dist/{chunk-IRW64JFF.js → chunk-AUSC47BK.js} +4 -4
  44. package/dist/{chunk-JUZ75OG4.js → chunk-AY7Y3WPD.js} +15 -15
  45. package/dist/{chunk-4URR24DD.js → chunk-BFZSO2TP.js} +6 -6
  46. package/dist/{chunk-MYKQVS5W.js → chunk-BHHIHENP.js} +10 -6
  47. package/dist/{chunk-6V3DTQWK.js → chunk-BUD6JILH.js} +21 -21
  48. package/dist/{chunk-MKC7P5LD.js → chunk-CCXEXCRO.js} +14 -14
  49. package/dist/{chunk-52WCHTVZ.js → chunk-CGF4LKXR.js} +3 -3
  50. package/dist/{chunk-5ACUW753.js → chunk-CH6LUQLD.js} +1 -1
  51. package/dist/{chunk-7VFVQX5K.js → chunk-CIIRPLI6.js} +4 -4
  52. package/dist/{chunk-JEUXCIRD.js → chunk-CJ5FQHST.js} +5 -5
  53. package/dist/{chunk-U6YKL7SI.js → chunk-CKI4VG2I.js} +22 -22
  54. package/dist/{chunk-BKFGGJKA.js → chunk-CQD26SMZ.js} +3 -1
  55. package/dist/chunk-CU35HXQ7.js +48 -0
  56. package/dist/{chunk-KLKENMWQ.js → chunk-CUD4I2U6.js} +58 -43
  57. package/dist/{chunk-5TY4DTHQ.js → chunk-CUX4GRTB.js} +3 -3
  58. package/dist/{chunk-5NZSJ5ZG.js → chunk-CXY4YDXS.js} +2 -2
  59. package/dist/{chunk-XR5DD5DQ.js → chunk-CYDJK34J.js} +12 -7
  60. package/dist/{chunk-WKXOEIOY.js → chunk-DBVU45FY.js} +14 -14
  61. package/dist/{chunk-IILZ7J3L.js → chunk-DBZNQAMN.js} +171 -62
  62. package/dist/{chunk-D7MWYJZF.js → chunk-DDOLWHIM.js} +17 -17
  63. package/dist/{chunk-EW7MRMD5.js → chunk-DIAYQLEY.js} +16 -7
  64. package/dist/{chunk-OFWYZH6B.js → chunk-DKGWE5ZL.js} +21 -21
  65. package/dist/{chunk-27EDZN52.js → chunk-DLX2R3MI.js} +31 -31
  66. package/dist/{chunk-TCADP67G.js → chunk-DONCF2XC.js} +3 -3
  67. package/dist/{chunk-ORZSD2KD.js → chunk-DQKNOHUZ.js} +1 -1
  68. package/dist/{chunk-EAQFRD2B.js → chunk-DREIS5Z5.js} +6 -6
  69. package/dist/{chunk-CAN3EBE5.js → chunk-DW4BM73R.js} +1 -1
  70. package/dist/{chunk-C5JFMAXX.js → chunk-DX5H5YKM.js} +11 -11
  71. package/dist/{chunk-LZWVK4YY.js → chunk-EE3UNC44.js} +3 -3
  72. package/dist/{chunk-Z46OXTBE.js → chunk-EOCZDNWU.js} +5 -5
  73. package/dist/chunk-EOWO4YPF.js +43 -0
  74. package/dist/{chunk-NBGBMRIS.js → chunk-EREL3TQG.js} +1 -1
  75. package/dist/{chunk-NH5QH3WS.js → chunk-ESGIBN3S.js} +1 -1
  76. package/dist/chunk-EZ3FDHW3.js +41 -0
  77. package/dist/chunk-F5L23NGR.js +45 -0
  78. package/dist/{chunk-MQNBEO3N.js → chunk-FF5Q7ONT.js} +118 -104
  79. package/dist/{chunk-TC3KTG33.js → chunk-FLROTO6F.js} +3 -3
  80. package/dist/{chunk-YWOMGMZB.js → chunk-FNVY656P.js} +22 -22
  81. package/dist/{chunk-MCWWMMLN.js → chunk-FP6GJJY7.js} +22 -22
  82. package/dist/{chunk-SIUDWWKS.js → chunk-FSR7OUVJ.js} +23 -23
  83. package/dist/{chunk-GPLFYLGH.js → chunk-FT3RXIN4.js} +10 -10
  84. package/dist/{chunk-SH7AZZDA.js → chunk-FYWA2CPF.js} +17 -17
  85. package/dist/{chunk-5BJFMAQU.js → chunk-G2K2D6XS.js} +12 -12
  86. package/dist/{chunk-3LU6YCSQ.js → chunk-G5SKNMPC.js} +5 -5
  87. package/dist/{chunk-RB2VSED2.js → chunk-GIPQHVJF.js} +11 -11
  88. package/dist/{chunk-NELU7LSL.js → chunk-GJ4B2FYS.js} +10 -10
  89. package/dist/{chunk-KQRYW7OS.js → chunk-GRZGEMO5.js} +109 -108
  90. package/dist/{chunk-OR5VRULZ.js → chunk-GU7PEYRC.js} +10 -10
  91. package/dist/{chunk-MKIULIUQ.js → chunk-GUNBOZ75.js} +3 -3
  92. package/dist/{chunk-Q32Y5T2U.js → chunk-GX3Q5PRC.js} +11 -11
  93. package/dist/{chunk-ANCI3LFS.js → chunk-HIQWJ6JZ.js} +4 -4
  94. package/dist/{chunk-JBSD57N7.js → chunk-HK2CF6KQ.js} +23 -23
  95. package/dist/{chunk-ZKUDS7JG.js → chunk-HMQXIFOL.js} +4 -4
  96. package/dist/{chunk-WIMOJMAK.js → chunk-HY2VVVFZ.js} +168 -14
  97. package/dist/{chunk-BX52REMA.js → chunk-IDLO7UCZ.js} +5 -5
  98. package/dist/{chunk-CE4S5ZY3.js → chunk-IJ7TPOXQ.js} +11 -11
  99. package/dist/{chunk-6N2GUZMZ.js → chunk-ISXNWUG7.js} +1 -1
  100. package/dist/{chunk-DYWTQXP4.js → chunk-IZF2VJU5.js} +22 -22
  101. package/dist/{chunk-6RGIM2ZH.js → chunk-J22RSFKY.js} +79 -9
  102. package/dist/{chunk-WFYHOXTB.js → chunk-J3DTLYER.js} +15 -15
  103. package/dist/{chunk-LEHZTKB3.js → chunk-JC3BMRB5.js} +11 -11
  104. package/dist/{chunk-7RGCQ4VZ.js → chunk-JLIEAQP4.js} +4 -4
  105. package/dist/chunk-JOG6LBOP.js +38 -0
  106. package/dist/{chunk-L7I5PKGD.js → chunk-JQG4VO47.js} +1 -1
  107. package/dist/{chunk-RIEFYHXI.js → chunk-JS3DJH3Q.js} +4 -4
  108. package/dist/{chunk-DGKNOPSE.js → chunk-JWQMD54C.js} +7 -7
  109. package/dist/{chunk-XKJRPVJO.js → chunk-KJ6IH2D5.js} +5 -5
  110. package/dist/{chunk-T6ESD5KM.js → chunk-KPHPVOME.js} +4 -4
  111. package/dist/{chunk-YWZDAZMA.js → chunk-KY2ZHTBJ.js} +6 -6
  112. package/dist/{chunk-7HWXYP4H.js → chunk-LAOZB5YC.js} +11 -11
  113. package/dist/chunk-LRCWWMHH.js +54 -0
  114. package/dist/chunk-LVQMS54L.js +54 -0
  115. package/dist/{chunk-NG5R2WIY.js → chunk-M3BJTXLR.js} +9 -9
  116. package/dist/{chunk-7RUMD56V.js → chunk-M4D3VKAS.js} +1 -1
  117. package/dist/{chunk-UTR67XU2.js → chunk-MFRPLAOH.js} +2 -2
  118. package/dist/{chunk-HZYFLEWO.js → chunk-MI3GGF7V.js} +17 -17
  119. package/dist/{chunk-BA5DTXHQ.js → chunk-MIOY6EXD.js} +4 -4
  120. package/dist/{chunk-BUWSOQLU.js → chunk-ML3HOWPI.js} +4 -4
  121. package/dist/{chunk-SINJKQSI.js → chunk-MOY52LHS.js} +13 -13
  122. package/dist/{chunk-FMRMTI7W.js → chunk-MRLCNXXR.js} +1 -1
  123. package/dist/{chunk-5P5BGG5L.js → chunk-N2FA53DA.js} +6 -6
  124. package/dist/{chunk-ATNG5VOZ.js → chunk-N6YELFHL.js} +2 -2
  125. package/dist/{chunk-MYOW3RPC.js → chunk-N7HG4UP7.js} +6 -6
  126. package/dist/{chunk-7LCQ7JAM.js → chunk-NAKVQU6F.js} +1 -1
  127. package/dist/{chunk-3DDJLI7N.js → chunk-NTNJNRHW.js} +4 -4
  128. package/dist/{chunk-OHXTB6CO.js → chunk-NZY72PGJ.js} +13 -8
  129. package/dist/{chunk-4ONORLK5.js → chunk-O62VA6MH.js} +13 -13
  130. package/dist/{chunk-IVHN2VYG.js → chunk-OJAJXU65.js} +3 -1
  131. package/dist/{chunk-CZI2ACNT.js → chunk-OKUYBXXI.js} +16 -16
  132. package/dist/{chunk-EZSZFI54.js → chunk-OMH3I5BH.js} +2 -2
  133. package/dist/{chunk-5RUMHLIS.js → chunk-P3VBYYAS.js} +24 -3
  134. package/dist/{chunk-WUE6HKIU.js → chunk-P7SONIEO.js} +165 -46
  135. package/dist/{chunk-6E2GJANQ.js → chunk-PAOIMLTK.js} +19 -19
  136. package/dist/{chunk-B3QOYE74.js → chunk-PAQDPB6T.js} +4 -4
  137. package/dist/{chunk-DS3ZEJVN.js → chunk-PGFRXGHA.js} +2 -2
  138. package/dist/{chunk-5V5BJACL.js → chunk-PJRMMWU4.js} +2 -2
  139. package/dist/{chunk-S7ZWCMDO.js → chunk-PKCYRG6G.js} +57 -18
  140. package/dist/{chunk-26DBAGOP.js → chunk-PUGPT4Y6.js} +17 -17
  141. package/dist/{chunk-PQW7PYUR.js → chunk-PVMGHQWB.js} +7 -7
  142. package/dist/{chunk-MSL3CLHX.js → chunk-Q4AWUD6C.js} +16 -16
  143. package/dist/{chunk-JQX6BSE4.js → chunk-QC24Z5JU.js} +10 -10
  144. package/dist/{chunk-WCLAOKCH.js → chunk-QKSWQBWD.js} +8 -8
  145. package/dist/{chunk-GMJXC5AL.js → chunk-QL4VNY4U.js} +1 -1
  146. package/dist/chunk-QOF7U6BI.js +363 -0
  147. package/dist/{chunk-JRPQX2EK.js → chunk-QOPX5M7Y.js} +4 -4
  148. package/dist/{chunk-TEBBD4XH.js → chunk-QR65C3DV.js} +4 -4
  149. package/dist/{chunk-SG5KY4VB.js → chunk-QXGOEP44.js} +3 -3
  150. package/dist/{chunk-XZJE6WIT.js → chunk-RA64IK43.js} +1 -1
  151. package/dist/{chunk-3WU7LVTL.js → chunk-RMNYY5IE.js} +5 -5
  152. package/dist/chunk-S3QCJWCF.js +34 -0
  153. package/dist/{chunk-C75W7VXX.js → chunk-S4USA5WC.js} +20 -18
  154. package/dist/{chunk-FOQXYMOR.js → chunk-S5X7BVWP.js} +19 -19
  155. package/dist/{chunk-EV4TEFOD.js → chunk-SR2M7DWL.js} +13 -13
  156. package/dist/{chunk-R6UTCLH5.js → chunk-T4TMX54Q.js} +16 -16
  157. package/dist/{chunk-OXVVRJDQ.js → chunk-T72K4PLH.js} +11 -11
  158. package/dist/{chunk-SKMHS4CL.js → chunk-TA2ZNDYD.js} +1 -1
  159. package/dist/{chunk-CRQ73DIF.js → chunk-TBKJPKDN.js} +11 -11
  160. package/dist/{chunk-YVCOQ5TZ.js → chunk-TEHH47TG.js} +3 -3
  161. package/dist/{chunk-EATSD7YD.js → chunk-TEZSZ24W.js} +4 -4
  162. package/dist/{chunk-WUP77GG2.js → chunk-TIAPEYWI.js} +3 -3
  163. package/dist/{chunk-J27QGXO4.js → chunk-TIUBGJG3.js} +9 -9
  164. package/dist/{chunk-RWMSJP7H.js → chunk-TJHDFS33.js} +29 -26
  165. package/dist/chunk-TJP2KLZI.js +41 -0
  166. package/dist/{chunk-ZJQUIG3A.js → chunk-TV6ECMN3.js} +15 -14
  167. package/dist/{chunk-JMOLB347.js → chunk-U25OX22K.js} +64 -8
  168. package/dist/{chunk-UNFCFJMF.js → chunk-U2SGLXFR.js} +17 -17
  169. package/dist/{chunk-MV4637YA.js → chunk-U3JGJ3BO.js} +24 -24
  170. package/dist/{chunk-XF3DATVU.js → chunk-U43G5EUN.js} +17 -17
  171. package/dist/{chunk-SNHOLLGN.js → chunk-UQUDITWL.js} +84 -25
  172. package/dist/{chunk-EQOSXLK3.js → chunk-UYKKTEWB.js} +14 -14
  173. package/dist/{chunk-NX6QEEOA.js → chunk-VAL7HAIR.js} +3 -3
  174. package/dist/{chunk-JUQHYTXN.js → chunk-VC4JMXM5.js} +19 -17
  175. package/dist/{chunk-NIYB5K5B.js → chunk-VRH6ITQH.js} +9 -9
  176. package/dist/{chunk-U5PDQTLA.js → chunk-VTMIRRIZ.js} +2 -2
  177. package/dist/{chunk-H4VJO3M2.js → chunk-VUBVBFJW.js} +5 -5
  178. package/dist/{chunk-G7WZH54P.js → chunk-W3ZWS3B3.js} +20 -10
  179. package/dist/{chunk-GG6HIU74.js → chunk-WBOVB3XR.js} +24 -24
  180. package/dist/{chunk-IA2RKC6I.js → chunk-WFJMKUTR.js} +52 -11
  181. package/dist/{chunk-KXZR2BLL.js → chunk-WM4N2L4T.js} +1 -1
  182. package/dist/{chunk-7S3XFWOU.js → chunk-WRLEYM3T.js} +4 -4
  183. package/dist/{chunk-REWZE2XI.js → chunk-WSFPKNKT.js} +23 -23
  184. package/dist/{chunk-SUQZGPVG.js → chunk-XB64FJLU.js} +24 -24
  185. package/dist/{chunk-4AYZQ3SY.js → chunk-XBNKOARP.js} +4 -4
  186. package/dist/chunk-XDTD55UU.js +89 -0
  187. package/dist/{chunk-DQNKG4HY.js → chunk-XMYGEZQ7.js} +17 -17
  188. package/dist/{chunk-R3VFLYZZ.js → chunk-XP3KLC4S.js} +6 -6
  189. package/dist/{chunk-S2FDPN32.js → chunk-XRDYEEDE.js} +1 -1
  190. package/dist/{chunk-7HQOZALR.js → chunk-XSNIHYO6.js} +10 -10
  191. package/dist/chunk-XVQGT4SL.js +37 -0
  192. package/dist/{chunk-ZTNS3L5Z.js → chunk-XZLSKGJX.js} +5 -5
  193. package/dist/{chunk-NR5T46ZY.js → chunk-Y2FMWQQB.js} +16 -16
  194. package/dist/{chunk-7A7IG7OA.js → chunk-Y6LFFSRV.js} +10 -10
  195. package/dist/{chunk-V4XKYGLK.js → chunk-YISWYR3Q.js} +4 -4
  196. package/dist/{chunk-EI4KQYJ3.js → chunk-YSFIQGDK.js} +8 -8
  197. package/dist/{chunk-XPJR74MA.js → chunk-YVQWJDVN.js} +37 -25
  198. package/dist/{chunk-R3RVFCJ2.js → chunk-YY2WGL6S.js} +2 -2
  199. package/dist/{chunk-HQMCHHY5.js → chunk-Z2BA4NNR.js} +2 -2
  200. package/dist/{chunk-G3PBLW4K.js → chunk-ZDZCUZ4N.js} +34 -9
  201. package/dist/{chunk-UFBKJOWB.js → chunk-ZPPLFE4N.js} +14 -14
  202. package/dist/{chunk-WGU6NIUV.js → chunk-ZRP6ZXOF.js} +12 -12
  203. package/dist/{chunk-7J7UY46S.js → chunk-ZTIMXVV5.js} +2 -2
  204. package/dist/{chunk-IWZPGIGT.js → chunk-ZWGU46YO.js} +23 -23
  205. package/dist/files.json +441 -433
  206. package/dist/packages/sdk/npm/index.js +9 -0
  207. package/dist/packages/ui/dist/assets/{elk-api-DDup23Us.js → elk-api-D2NcYpUJ.js} +2 -2
  208. package/dist/packages/ui/dist/assets/index-CT7skl01.js +29 -0
  209. package/dist/packages/ui/dist/index.html +1 -1
  210. package/package.json +5 -5
  211. package/dist/chunk-4Y4FY34K.js +0 -34
  212. package/dist/chunk-ACWQDL6T.js +0 -37
  213. package/dist/chunk-ASKDCMW5.js +0 -275
  214. package/dist/chunk-B3UHYXHU.js +0 -41
  215. package/dist/chunk-DDAEAZEV.js +0 -54
  216. package/dist/chunk-E25G46RW.js +0 -54
  217. package/dist/chunk-KQK6SQPE.js +0 -48
  218. package/dist/chunk-NCR24CPV.js +0 -41
  219. package/dist/chunk-NDW4ROST.js +0 -38
  220. package/dist/chunk-OJN7WME4.js +0 -34
  221. package/dist/chunk-UFTQIK2J.js +0 -43
  222. package/dist/chunk-ZHWSL6SR.js +0 -45
  223. package/dist/packages/ui/dist/assets/index-mTOWhQZm.js +0 -29
@@ -3,35 +3,35 @@ 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 "./chunk-NIYB5K5B.js";
6
+ import "./chunk-VRH6ITQH.js";
7
7
  import {
8
8
  loadCatalog
9
- } from "./chunk-BUWSOQLU.js";
9
+ } from "./chunk-ML3HOWPI.js";
10
10
  import {
11
11
  repoFor
12
- } from "./chunk-LDIARP6F.js";
12
+ } from "./chunk-7VNEDDCC.js";
13
13
  import {
14
14
  askHosts
15
- } from "./chunk-XR5DD5DQ.js";
16
- import "./chunk-XKJRPVJO.js";
15
+ } from "./chunk-CYDJK34J.js";
16
+ import "./chunk-KJ6IH2D5.js";
17
17
  import {
18
18
  estateFlow,
19
19
  estateStepKey,
20
20
  fieldLineage,
21
21
  joinEstate
22
- } from "./chunk-IILZ7J3L.js";
23
- import "./chunk-TEBBD4XH.js";
24
- import "./chunk-XPWSNKF3.js";
25
- import "./chunk-WIMOJMAK.js";
26
- import "./chunk-5V5BJACL.js";
27
- import "./chunk-GVFUEGGM.js";
28
- import "./chunk-YVCOQ5TZ.js";
29
- import "./chunk-XNRPCI23.js";
30
- import "./chunk-XZJE6WIT.js";
22
+ } from "./chunk-DBZNQAMN.js";
23
+ import "./chunk-QR65C3DV.js";
24
+ import "./chunk-7VAMO66T.js";
25
+ import "./chunk-HY2VVVFZ.js";
26
+ import "./chunk-PJRMMWU4.js";
27
+ import "./chunk-34NWVIBC.js";
28
+ import "./chunk-TEHH47TG.js";
29
+ import "./chunk-77UOXZVM.js";
30
+ import "./chunk-RA64IK43.js";
31
31
  import {
32
32
  fsRepo
33
- } from "./chunk-FMRMTI7W.js";
34
- import "./chunk-BKFGGJKA.js";
33
+ } from "./chunk-MRLCNXXR.js";
34
+ import "./chunk-CQD26SMZ.js";
35
35
  import {
36
36
  listQuestions,
37
37
  loadOrgPack,
@@ -45,7 +45,7 @@ import {
45
45
  specsRelOf,
46
46
  templateRef,
47
47
  writeEstateJoins
48
- } from "./chunk-JMOLB347.js";
48
+ } from "./chunk-U25OX22K.js";
49
49
  import "./chunk-MMB2OHUY.js";
50
50
  import "./chunk-TV45EUGM.js";
51
51
 
@@ -7,11 +7,11 @@ import {
7
7
  buildStub,
8
8
  generate,
9
9
  parseSpec
10
- } from "./chunk-SKMHS4CL.js";
10
+ } from "./chunk-TA2ZNDYD.js";
11
11
  import {
12
12
  loadPlanContext,
13
13
  parseStory
14
- } from "./chunk-EV4TEFOD.js";
14
+ } from "./chunk-SR2M7DWL.js";
15
15
  import {
16
16
  docOf,
17
17
  fingerprint,
@@ -20,20 +20,20 @@ import {
20
20
  roundsOf,
21
21
  sectionLines,
22
22
  writeFinding
23
- } from "./chunk-T6ESD5KM.js";
23
+ } from "./chunk-KPHPVOME.js";
24
24
  import {
25
25
  changeFolder
26
- } from "./chunk-3LU6YCSQ.js";
26
+ } from "./chunk-G5SKNMPC.js";
27
27
  import {
28
28
  baseClonePath,
29
29
  changeWorktreesDir,
30
30
  readChangeRepos,
31
31
  worktreePath
32
- } from "./chunk-XZJE6WIT.js";
32
+ } from "./chunk-RA64IK43.js";
33
33
  import {
34
34
  buildContextPack,
35
35
  toRunSummary
36
- } from "./chunk-BKFGGJKA.js";
36
+ } from "./chunk-CQD26SMZ.js";
37
37
  import {
38
38
  AgentDefinition,
39
39
  ChecklistPack,
@@ -45,7 +45,7 @@ import {
45
45
  require_dist,
46
46
  taskBranch,
47
47
  toCanonicalYaml
48
- } from "./chunk-JMOLB347.js";
48
+ } from "./chunk-U25OX22K.js";
49
49
  import {
50
50
  writeFileAtomic
51
51
  } from "./chunk-MMB2OHUY.js";
@@ -5,10 +5,10 @@ var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
5
5
  var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
6
  import {
7
7
  storeChangeRows
8
- } from "./chunk-7LCQ7JAM.js";
8
+ } from "./chunk-NAKVQU6F.js";
9
9
  import {
10
10
  metarepoOpenSpec
11
- } from "./chunk-EV4TEFOD.js";
11
+ } from "./chunk-SR2M7DWL.js";
12
12
  import {
13
13
  table
14
14
  } from "./chunk-VOGCSYOI.js";
@@ -16,7 +16,7 @@ import {
16
16
  gateStatus,
17
17
  ownerWaitsLine,
18
18
  reviewedGates
19
- } from "./chunk-T6ESD5KM.js";
19
+ } from "./chunk-KPHPVOME.js";
20
20
  import {
21
21
  ChangeError,
22
22
  archiveChange,
@@ -32,23 +32,23 @@ import {
32
32
  newChange,
33
33
  returnToPo,
34
34
  syncHandoff
35
- } from "./chunk-3LU6YCSQ.js";
35
+ } from "./chunk-G5SKNMPC.js";
36
36
  import {
37
37
  createAdapters,
38
38
  fileStepStore
39
- } from "./chunk-CAN3EBE5.js";
39
+ } from "./chunk-DW4BM73R.js";
40
40
  import {
41
41
  baseClonePath,
42
42
  createWorkspace,
43
43
  isInPlace,
44
44
  loadRepos
45
- } from "./chunk-XZJE6WIT.js";
45
+ } from "./chunk-RA64IK43.js";
46
46
  import {
47
47
  changesRelOf,
48
48
  handoffBranch,
49
49
  loadOrgPack,
50
50
  orgPackDirOf
51
- } from "./chunk-JMOLB347.js";
51
+ } from "./chunk-U25OX22K.js";
52
52
 
53
53
  // packages/cli/dist/change-commands.js
54
54
  import { existsSync } from "node:fs";
@@ -116,7 +116,7 @@ async function changeNew(root, o, io, deps = {}) {
116
116
  }
117
117
  let like;
118
118
  if (o.like) {
119
- const { findPastChange } = await import("./chunk-RIEFYHXI.js");
119
+ const { findPastChange } = await import("./chunk-JS3DJH3Q.js");
120
120
  like = await findPastChange(root, o.like);
121
121
  if (!like) {
122
122
  io.err(`There is no archived change ${o.like}: atticus change similar "<what it is about>" lists them.`);
@@ -125,7 +125,7 @@ async function changeNew(root, o, io, deps = {}) {
125
125
  }
126
126
  let impact;
127
127
  if (o.impact) {
128
- const { loadVendorImpact } = await import("./chunk-RB2VSED2.js");
128
+ const { loadVendorImpact } = await import("./chunk-GIPQHVJF.js");
129
129
  const got = await loadVendorImpact(root, o.impact, io);
130
130
  if ("error" in got) {
131
131
  io.err(got.error);
@@ -155,16 +155,16 @@ async function changeNew(root, o, io, deps = {}) {
155
155
  });
156
156
  io.out(`Created ${c.id} (${c.type}, from the ${c.template} template). It is in ${c.state}.`);
157
157
  if (impact) {
158
- const { attachToChange } = await import("./chunk-QWHTTA2X.js");
159
- const { changeFolder } = await import("./chunk-4ONORLK5.js");
160
- const { impactDocument, IMPACT_WORDS } = await import("./chunk-RB2VSED2.js");
158
+ const { attachToChange } = await import("./chunk-3M7QBKKG.js");
159
+ const { changeFolder } = await import("./chunk-O62VA6MH.js");
160
+ const { impactDocument, IMPACT_WORDS } = await import("./chunk-GIPQHVJF.js");
161
161
  const doc = impactDocument(impact);
162
162
  const attached = await attachToChange(changeFolder(root, c.id), [{ name: doc.name, bytes: new TextEncoder().encode(doc.text) }], { by: o.by, at: deps.now ?? (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z") });
163
163
  const path = attached.added[0]?.path ?? `inputs/${doc.name}`;
164
164
  io.out(IMPACT_WORDS.started(impact.name, impact.impact.newer.version ?? impact.impact.newer.id, impact.impact, path));
165
165
  }
166
166
  if (like) {
167
- const { attachPastChange } = await import("./chunk-RIEFYHXI.js");
167
+ const { attachPastChange } = await import("./chunk-JS3DJH3Q.js");
168
168
  const name = await attachPastChange(root, c.id, like, o.by, deps.now ? new Date(deps.now) : /* @__PURE__ */ new Date());
169
169
  io.out(`It starts from ${like}: attached as inputs/${name}, which its steps read as an example.`);
170
170
  }
@@ -235,7 +235,7 @@ async function usedUpGates(root, id) {
235
235
  for (const g of await reviewedGates(root, id).catch(() => [])) {
236
236
  const s = await gateStatus(root, id, g).catch(() => void 0);
237
237
  if (s && (s.humanDecides || s.checkRound || ownerWaitsLine(s, id)))
238
- out.push((await import("./chunk-7KXYMC2P.js")).statusLine(s, id));
238
+ out.push((await import("./chunk-6R2OM6Y3.js")).statusLine(s, id));
239
239
  }
240
240
  return out;
241
241
  }
@@ -263,7 +263,7 @@ async function changeHandoff(root, id, o, io, deps = {}) {
263
263
  ...o.base ? { base: o.base } : {},
264
264
  ...deps.publisher ? { publisher: deps.publisher } : {},
265
265
  // WP7.4: the PR reviews itself: the change as a picture, its estimate, its open findings.
266
- review: await (await import("./chunk-SUQZGPVG.js")).handoffReview(root, id),
266
+ review: await (await import("./chunk-XB64FJLU.js")).handoffReview(root, id),
267
267
  ...metarepoOpenSpec(root) ? { openspec: metarepoOpenSpec(root) } : {}
268
268
  });
269
269
  io.out(`Hand-off PR #${h.pr.number} (${h.branch}) is open: ${h.pr.url}`);
@@ -437,7 +437,7 @@ async function rescanAfterArchive(root, id, io, deps) {
437
437
  io.out(`Couldn't update the base clone of ${s.id} (${s.reason ?? s.action}); scanning what is there.`);
438
438
  }
439
439
  io.out(`Rescanning for ${id}'s repos: ${here.join(", ")}.`);
440
- const code = await (await import("./chunk-4Y4FY34K.js")).scanCommand(root, {}, io);
440
+ const code = await (await import("./chunk-S3QCJWCF.js")).scanCommand(root, {}, io);
441
441
  if (away.length)
442
442
  io.out(`Not in a base clone here: ${away.join(", ")}. To add them, run: ${command(away)}`);
443
443
  return code;
@@ -7,19 +7,19 @@ import {
7
7
  estateFacts,
8
8
  measureLinks,
9
9
  parseLinkReference
10
- } from "./chunk-IILZ7J3L.js";
11
- import "./chunk-TEBBD4XH.js";
12
- import "./chunk-XPWSNKF3.js";
13
- import "./chunk-WIMOJMAK.js";
14
- import "./chunk-5V5BJACL.js";
15
- import "./chunk-GVFUEGGM.js";
16
- import "./chunk-XZJE6WIT.js";
17
- import "./chunk-FMRMTI7W.js";
18
- import "./chunk-BKFGGJKA.js";
10
+ } from "./chunk-DBZNQAMN.js";
11
+ import "./chunk-QR65C3DV.js";
12
+ import "./chunk-7VAMO66T.js";
13
+ import "./chunk-HY2VVVFZ.js";
14
+ import "./chunk-PJRMMWU4.js";
15
+ import "./chunk-34NWVIBC.js";
16
+ import "./chunk-RA64IK43.js";
17
+ import "./chunk-MRLCNXXR.js";
18
+ import "./chunk-CQD26SMZ.js";
19
19
  import {
20
20
  loadOrgPack,
21
21
  orgPackDirOf
22
- } from "./chunk-JMOLB347.js";
22
+ } from "./chunk-U25OX22K.js";
23
23
  import "./chunk-MMB2OHUY.js";
24
24
  import "./chunk-TV45EUGM.js";
25
25
 
@@ -9,14 +9,14 @@ import {
9
9
  } from "./chunk-3G4YI4ZU.js";
10
10
  import {
11
11
  upgradeCheck
12
- } from "./chunk-LUPW4WLK.js";
12
+ } from "./chunk-3W5R5J65.js";
13
13
  import {
14
14
  ASSISTANT_FORMATS,
15
15
  assistantTier,
16
16
  generateAssistantFiles,
17
17
  readProbes,
18
18
  tierLine
19
- } from "./chunk-6RGIM2ZH.js";
19
+ } from "./chunk-J22RSFKY.js";
20
20
  import {
21
21
  BETA_FEATURES,
22
22
  OPENSPEC_PINNED,
@@ -26,22 +26,22 @@ import {
26
26
  openspecFeatures,
27
27
  openspecHasStores,
28
28
  readStoreMarker
29
- } from "./chunk-L7I5PKGD.js";
29
+ } from "./chunk-JQG4VO47.js";
30
30
  import {
31
31
  versionAtLeast
32
- } from "./chunk-7RUMD56V.js";
32
+ } from "./chunk-M4D3VKAS.js";
33
33
  import {
34
34
  baseClonePath,
35
35
  createGit,
36
36
  isInPlace,
37
37
  loadRepos,
38
38
  remoteDefaultBranch
39
- } from "./chunk-XZJE6WIT.js";
39
+ } from "./chunk-RA64IK43.js";
40
40
  import {
41
41
  modelEnvOf,
42
42
  modelSourceWords,
43
43
  modelsByClass
44
- } from "./chunk-BKFGGJKA.js";
44
+ } from "./chunk-CQD26SMZ.js";
45
45
  import {
46
46
  DEFAULT_PORT,
47
47
  STEP_CLASSES,
@@ -52,7 +52,7 @@ import {
52
52
  require_dist,
53
53
  retrievalOf,
54
54
  stepModelsOf
55
- } from "./chunk-JMOLB347.js";
55
+ } from "./chunk-U25OX22K.js";
56
56
  import {
57
57
  readLock
58
58
  } from "./chunk-MMB2OHUY.js";
@@ -459,7 +459,7 @@ async function doctorChecks(root, deps = {}) {
459
459
  });
460
460
  }
461
461
  const lexical = "the context engine searches by words and names only";
462
- const embed = await (deps.embed ?? (() => import("./chunk-EZSZFI54.js")))().catch((e) => e);
462
+ const embed = await (deps.embed ?? (() => import("./chunk-OMH3I5BH.js")))().catch((e) => e);
463
463
  if (embed instanceof Error) {
464
464
  const model2 = retrievalOf(rt).embeddings.model;
465
465
  const off = process.env.ATTICUS_EMBEDDINGS === "off" || model2 === "off";
@@ -8,7 +8,7 @@ import {
8
8
  RuntimeError,
9
9
  estimateTokens,
10
10
  registerModelProvider
11
- } from "./chunk-BKFGGJKA.js";
11
+ } from "./chunk-CQD26SMZ.js";
12
12
  import {
13
13
  redactText
14
14
  } from "./chunk-MMB2OHUY.js";
@@ -0,0 +1,363 @@
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-XDTD55UU.js";
10
+ import {
11
+ loadReadPlan,
12
+ modelsModeOf,
13
+ recordNotReached,
14
+ saveReadPlan
15
+ } from "./chunk-6AYUBYK6.js";
16
+ import {
17
+ FACT_RULES_HASH,
18
+ MODELS_RULE,
19
+ RULE_SETS,
20
+ factRulesFor,
21
+ factsReference,
22
+ ruleSetKinds,
23
+ rulesLacking,
24
+ rulesNow,
25
+ topUpWords
26
+ } from "./chunk-J22RSFKY.js";
27
+ import {
28
+ fileKinds,
29
+ kindsOf,
30
+ lineRangeOf,
31
+ planBatches,
32
+ readingRank,
33
+ sameCommit
34
+ } from "./chunk-7VAMO66T.js";
35
+ import {
36
+ DATA_RULE,
37
+ neutralise,
38
+ wrapData
39
+ } from "./chunk-CQD26SMZ.js";
40
+ import {
41
+ citedFiles,
42
+ factsDirOf,
43
+ factsRelOf,
44
+ parseFacts
45
+ } from "./chunk-U25OX22K.js";
46
+ import {
47
+ writeFileAtomic
48
+ } from "./chunk-MMB2OHUY.js";
49
+
50
+ // packages/cli/dist/map-rules.js
51
+ import { readFile } from "node:fs/promises";
52
+ import { join } from "node:path";
53
+ var has = (a, b) => a.some((x) => b.includes(x));
54
+ function applies(set, f) {
55
+ switch (set) {
56
+ case "field-types":
57
+ case "message-types":
58
+ 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");
59
+ case "mappings":
60
+ return f.kinds.includes("gateway");
61
+ case "terms":
62
+ return !f.code && has(f.kinds, ["config", "deploy", "gateway"]);
63
+ case "call-auth":
64
+ return f.code ? f.rank === 1 || f.rank === 3 || f.cited.has("call") : has(f.kinds, ["config", "gateway"]);
65
+ }
66
+ }
67
+ function topUpFiles(o) {
68
+ const whole = planBatches(o.source, {
69
+ room: Number.MAX_SAFE_INTEGER,
70
+ exclude: o.exclude,
71
+ ...o.conventions ? { conventions: o.conventions } : {},
72
+ ...o.reach?.reach.rooted && o.reach.reach.models ? { reach: { first: o.reach.first, leaveOut: o.reach.leaveOut } } : {}
73
+ });
74
+ const cites = /* @__PURE__ */ new Map();
75
+ for (const f of o.facts)
76
+ for (const p of citedFiles(f)) {
77
+ const k = cites.get(p) ?? /* @__PURE__ */ new Set();
78
+ k.add(f.kind);
79
+ cites.set(p, k);
80
+ }
81
+ const out = [];
82
+ for (const slice of whole.batches.flat()) {
83
+ const path = slice.path;
84
+ const rank = readingRank(path);
85
+ if (rank === 5)
86
+ continue;
87
+ const kinds = fileKinds(path);
88
+ const of = {
89
+ kinds,
90
+ rank,
91
+ code: kinds.includes("backend") || kinds.includes("frontend"),
92
+ cited: cites.get(path) ?? /* @__PURE__ */ new Set()
93
+ };
94
+ const sets = o.sets.filter((s) => has(kinds, ruleSetKinds(s)) && applies(s, of));
95
+ if (sets.length)
96
+ out.push({ path, tokens: slice.tokens, lines: slice.of, sets });
97
+ }
98
+ return out;
99
+ }
100
+ function ruleSetsOfFiles(files) {
101
+ const all = new Set(files.flatMap((f) => f.sets));
102
+ return RULE_SETS.filter((x) => all.has(x));
103
+ }
104
+ function topUpSessions(files, room) {
105
+ const reads = [];
106
+ for (const f of files) {
107
+ if (f.tokens <= room || f.lines <= 1) {
108
+ reads.push({ path: f.path, file: f.path, tokens: f.tokens, sets: f.sets });
109
+ continue;
110
+ }
111
+ const per = Math.max(1, Math.floor(f.lines * room / f.tokens));
112
+ for (let from = 1; from <= f.lines; from += per) {
113
+ const to = Math.min(f.lines, from + per - 1);
114
+ reads.push({
115
+ path: `${f.path}#L${from}-L${to}`,
116
+ file: f.path,
117
+ tokens: Math.ceil(f.tokens * (to - from + 1) / f.lines),
118
+ sets: f.sets
119
+ });
120
+ }
121
+ }
122
+ const sessions = [];
123
+ for (const r of reads) {
124
+ const last = sessions.at(-1);
125
+ if (last && last.tokens + r.tokens <= room) {
126
+ last.reads.push(r);
127
+ last.tokens += r.tokens;
128
+ } else
129
+ sessions.push({ reads: [r], tokens: r.tokens });
130
+ }
131
+ return sessions.map((s) => ({
132
+ paths: s.reads.map((r) => r.path),
133
+ sets: ruleSetsOfFiles(s.reads),
134
+ files: new Set(s.reads.map((r) => r.file)).size,
135
+ tokens: s.tokens
136
+ }));
137
+ }
138
+ var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z");
139
+ async function factsOf(root, repo) {
140
+ const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => "");
141
+ if (!text.trim())
142
+ return `${repo} isn't read yet: atticus map ${repo} reads it, under every rule.`;
143
+ const p = parseFacts(text);
144
+ return p.ok ? p.facts : `${factsRelOf(root)}/${repo}.jsonl does not read as facts (${p.issues[0]?.message ?? "?"}).`;
145
+ }
146
+ async function topUpOf(root, repo, o) {
147
+ const plan = await loadReadPlan(root, repo);
148
+ const lacking = rulesLacking(plan?.rules);
149
+ if (!lacking.length)
150
+ return { lacking, files: [], ...plan ? { plan } : {} };
151
+ const facts = o.facts?.length ? [...o.facts] : await factsOf(root, repo);
152
+ if (typeof facts === "string")
153
+ return { error: facts };
154
+ if (!facts.length)
155
+ return { error: `${repo} isn't read yet: atticus map ${repo} reads it.` };
156
+ if (!facts.every((f) => sameCommit(f.commit, o.commit)))
157
+ return {
158
+ error: `${repo}'s clone moved past its facts' commit: read what changed first (atticus map ${repo}), then top it up.`
159
+ };
160
+ const all = planBatches(o.source, {
161
+ room: Number.MAX_SAFE_INTEGER,
162
+ exclude: o.exclude,
163
+ ...o.conventions ? { conventions: o.conventions } : {}
164
+ });
165
+ const reach = reachPlanOf({
166
+ paths: all.batches.flat().map((x) => x.path),
167
+ source: o.source,
168
+ facts,
169
+ mode: await modelsModeOf(root, repo, o.models)
170
+ });
171
+ const files = topUpFiles({
172
+ facts,
173
+ source: o.source,
174
+ exclude: o.exclude,
175
+ sets: lacking,
176
+ ...o.conventions ? { conventions: o.conventions } : {},
177
+ reach
178
+ });
179
+ return { lacking, files, reach, ...plan ? { plan } : {} };
180
+ }
181
+ var planOr = (plan, repo, commit, session) => plan ?? { schemaVersion: 2, repo, commit, session, plannedAt: stamp(), parts: [] };
182
+ async function recordRulesNow(root, repo, commit) {
183
+ const plan = await loadReadPlan(root, repo);
184
+ const { topUp: _t, ...rest } = planOr(plan, repo, commit, 15e4);
185
+ if (plan?.rules?.hash === FACT_RULES_HASH && !plan.topUp)
186
+ return;
187
+ await saveReadPlan(root, { ...rest, rules: rulesNow() });
188
+ }
189
+ async function recordTopUpVerified(root, repo, o) {
190
+ const plan = await loadReadPlan(root, repo);
191
+ const t = plan?.topUp;
192
+ if (!plan || !t || !o.commit || !sameCommit(t.commit, o.commit))
193
+ return;
194
+ const given = t.sessions.filter((s) => s.given && !s.done);
195
+ if (!given.length)
196
+ return;
197
+ const at = o.now ?? stamp();
198
+ const sessions = t.sessions.map((s) => s.given && !s.done ? { ...s, done: { at, commit: o.commit } } : s);
199
+ if (sessions.every((s) => s.done)) {
200
+ const { topUp: _t, ...rest } = plan;
201
+ const sets = [.../* @__PURE__ */ new Set([...plan.rules?.sets ?? [], ...t.sets])];
202
+ await saveReadPlan(root, {
203
+ ...rest,
204
+ rules: t.hash === FACT_RULES_HASH ? rulesNow() : { hash: t.hash, sets }
205
+ });
206
+ return;
207
+ }
208
+ await saveReadPlan(root, { ...plan, topUp: { ...t, sessions } });
209
+ }
210
+ var rulesRelOf = (root, repo) => `${factsRelOf(root)}/${repo}.rules.md`;
211
+ var sameSets = (a, b) => a.length === b.length && a.every((x) => b.includes(x));
212
+ async function plannedTopUp(root, repo, o) {
213
+ const t = await topUpOf(root, repo, o);
214
+ if ("error" in t)
215
+ return t;
216
+ if (!t.lacking.length)
217
+ return { lacking: [], facts: [] };
218
+ const facts = await factsOf(root, repo);
219
+ if (typeof facts === "string")
220
+ return { error: facts };
221
+ if (!o.dryRun && t.reach)
222
+ await recordNotReached(root, repo, {
223
+ commit: o.commit,
224
+ session: o.session,
225
+ models: t.reach.mode,
226
+ ...t.reach.notReached ? { notReached: t.reach.notReached } : {}
227
+ });
228
+ const reach = t.reach ? { reach: t.reach } : {};
229
+ const on = (await loadReadPlan(root, repo))?.topUp;
230
+ if (on && sameCommit(on.commit, o.commit) && on.hash === FACT_RULES_HASH && sameSets(on.sets, t.lacking))
231
+ return { lacking: t.lacking, topUp: on, facts, ...reach };
232
+ const topUp = {
233
+ commit: o.commit,
234
+ hash: FACT_RULES_HASH,
235
+ sets: t.lacking,
236
+ session: o.session,
237
+ plannedAt: stamp(),
238
+ sessions: topUpSessions(t.files, o.session)
239
+ };
240
+ if (!o.dryRun && topUp.sessions.length)
241
+ await saveReadPlan(root, {
242
+ ...planOr(await loadReadPlan(root, repo), repo, o.commit, o.session),
243
+ topUp
244
+ });
245
+ return { lacking: t.lacking, topUp, facts, ...reach };
246
+ }
247
+ async function mapRules(root, repo, o, io) {
248
+ const p = await plannedTopUp(root, repo, o);
249
+ if ("error" in p) {
250
+ io.err(p.error);
251
+ return 2;
252
+ }
253
+ if (!p.lacking.length || !p.topUp) {
254
+ if (o.json)
255
+ io.out(JSON.stringify({ repo, commit: o.commit, sets: [], sessions: 0 }, null, 2));
256
+ else
257
+ io.out(`${repo} was read under the reading rules there are now: nothing to top up.`);
258
+ return 0;
259
+ }
260
+ const t = p.topUp;
261
+ if (!t.sessions.length) {
262
+ await recordRulesNow(root, repo, o.commit);
263
+ if (o.json)
264
+ io.out(JSON.stringify({ repo, commit: o.commit, sets: t.sets, sessions: 0 }, null, 2));
265
+ else
266
+ 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.`);
267
+ return 0;
268
+ }
269
+ const n = t.sessions.findIndex((s) => !s.done);
270
+ const next = t.sessions[n];
271
+ const sessions = t.sessions.map((s, i) => i === n ? { ...s, given: stamp() } : s);
272
+ const plan = await loadReadPlan(root, repo);
273
+ await saveReadPlan(root, { ...plan, topUp: { ...t, sessions } });
274
+ const rel = rulesRelOf(root, repo);
275
+ await writeFileAtomic(join(factsDirOf(root), `${repo}.rules.md`), rulesPrompt(repo, o.commit, {
276
+ rel: factsRelOf(root),
277
+ session: next,
278
+ n: n + 1,
279
+ of: t.sessions.length,
280
+ facts: p.facts,
281
+ notes: o.notes,
282
+ ...p.reach ? { reach: p.reach } : {}
283
+ }));
284
+ if (o.json) {
285
+ io.out(JSON.stringify({
286
+ repo,
287
+ commit: o.commit,
288
+ sets: t.sets,
289
+ session: n + 1,
290
+ sessions: t.sessions.length,
291
+ paths: next.paths,
292
+ tokens: next.tokens,
293
+ prompt: rel
294
+ }, null, 2));
295
+ return 0;
296
+ }
297
+ const files = new Set(t.sessions.flatMap((s) => s.paths.map((x) => lineRangeOf(x)?.file ?? x)));
298
+ const tokens = t.sessions.reduce((x, s) => x + s.tokens, 0);
299
+ 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.`);
300
+ 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.`);
301
+ 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`}.`);
302
+ return 0;
303
+ }
304
+ var factLine = (f) => `- ${f.id} (${f.kind}, ${f.cite.file}:${f.cite.line})`;
305
+ function rulesPrompt(repo, commit, c) {
306
+ const s = c.session;
307
+ const sets = s.sets;
308
+ const files = s.paths.map((x) => lineRangeOf(x)?.file ?? x);
309
+ const list = s.paths.map((x) => `- \`${x}\``).join("\n");
310
+ const kept = c.facts.filter((f) => citedFiles(f).some((p) => files.includes(p)));
311
+ const block = (id, kind, origin, text) => wrapData({ id, kind, origin }, neutralise(text, void 0, { mark: true }).text);
312
+ return [
313
+ `# Top-up of ${repo} at ${commit}`,
314
+ "",
315
+ `Session ${c.n} of ${c.of}, about ${s.tokens.toLocaleString("en-US")} tokens of source. ${topUpWords(sets)} Open each path below and nothing else: a path ending \`#L<from>-L<to>\` by those lines only, never the whole file.`,
316
+ "",
317
+ `- 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.`,
318
+ `- 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"}.`,
319
+ "",
320
+ "## The rules",
321
+ "",
322
+ "Each fact has this shape:",
323
+ "",
324
+ factsReference(),
325
+ "",
326
+ factRulesFor(kindsOf(files), void 0, sets),
327
+ "",
328
+ "## Read",
329
+ "",
330
+ `The paths to open are in the data block below. ${DATA_RULE}`,
331
+ "",
332
+ block(`${repo}.rules`, "rules", `${c.rel}/${repo}.read-plan.yaml`, list),
333
+ "",
334
+ "## Facts already kept (by id; don't write them again)",
335
+ "",
336
+ kept.length ? block(`${repo}.kept`, "facts", `${c.rel}/${repo}.jsonl`, kept.map(factLine).join("\n")) : "None cite these files.",
337
+ ...c.notes ? [
338
+ "",
339
+ "## The organisation's notes for this repo",
340
+ "",
341
+ block(`${repo}.notes`, "notes", "org-pack", c.notes)
342
+ ] : [],
343
+ "",
344
+ ...modelsPart(repo, c.reach, new Set(files))
345
+ ].join("\n");
346
+ }
347
+ function modelsPart(repo, r, files) {
348
+ const data = r ? modelsData(repo, r, { only: files }) : void 0;
349
+ return data ? ["## Model classes", "", MODELS_RULE, "", data, ""] : [];
350
+ }
351
+
352
+ export {
353
+ topUpFiles,
354
+ ruleSetsOfFiles,
355
+ topUpSessions,
356
+ topUpOf,
357
+ recordRulesNow,
358
+ recordTopUpVerified,
359
+ rulesRelOf,
360
+ plannedTopUp,
361
+ mapRules,
362
+ rulesPrompt
363
+ };