@maycombhq/atticus 2.0.0-beta.10 → 2.0.0-beta.12

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 (235) hide show
  1. package/dist/bin.js +3 -3
  2. package/dist/{chunk-AY2IUF4K.js → chunk-22GLUHGE.js} +659 -73
  3. package/dist/{chunk-CIUHAHM6.js → chunk-2A24BNRZ.js} +8 -8
  4. package/dist/{chunk-2RX7PI2Y.js → chunk-2ELFEKOO.js} +4 -4
  5. package/dist/{chunk-QKEFZRHS.js → chunk-2P6IHSRO.js} +17 -17
  6. package/dist/chunk-2Q2YBAR5.js +40 -0
  7. package/dist/{chunk-7DUDLVFJ.js → chunk-2VQLFNBO.js} +20 -20
  8. package/dist/{chunk-E3Z67HRK.js → chunk-3256EDLL.js} +4 -4
  9. package/dist/{chunk-OIU657QQ.js → chunk-34BCKMBS.js} +4 -4
  10. package/dist/{chunk-UR7RMZ3R.js → chunk-34NWVIBC.js} +2 -2
  11. package/dist/{chunk-6VBXAGJX.js → chunk-36KD4OGC.js} +14 -14
  12. package/dist/{chunk-I7IWQIEB.js → chunk-3CFBU2O6.js} +4 -4
  13. package/dist/{chunk-OSGQW2Z6.js → chunk-3JLTN3Y7.js} +8 -8
  14. package/dist/{chunk-FOGG4AUR.js → chunk-3M7QBKKG.js} +25 -7
  15. package/dist/{chunk-UF7TAFJM.js → chunk-3RP34PYV.js} +18 -18
  16. package/dist/{chunk-YLAJAI2W.js → chunk-3ZKLWM5Y.js} +11 -11
  17. package/dist/{chunk-LTQANUDH.js → chunk-47HPZ34V.js} +25 -25
  18. package/dist/chunk-4BPROPGG.js +45 -0
  19. package/dist/{chunk-Y4BRGOJR.js → chunk-4G56W6H7.js} +13 -10
  20. package/dist/{chunk-YXJ4XOHF.js → chunk-4HIQ2FTI.js} +4 -4
  21. package/dist/{chunk-AJJK7GLO.js → chunk-4HTILEXW.js} +3 -3
  22. package/dist/{chunk-OJLRFGBP.js → chunk-4Q2PGM5T.js} +78 -15
  23. package/dist/{chunk-GR6YKM55.js → chunk-4RDW2X43.js} +108 -14
  24. package/dist/{chunk-23M2LUYM.js → chunk-4VOG5H2K.js} +1 -1
  25. package/dist/chunk-5CSZTVXH.js +34 -0
  26. package/dist/{chunk-65C57N7P.js → chunk-5FFMJMVH.js} +19 -19
  27. package/dist/{chunk-XNYNEEBR.js → chunk-5GGGAI5C.js} +18 -18
  28. package/dist/{chunk-IUD3ME4E.js → chunk-5H46QFSL.js} +4 -4
  29. package/dist/{chunk-KIHOIVST.js → chunk-5ION6STH.js} +3 -3
  30. package/dist/chunk-5M3CLAOV.js +39 -0
  31. package/dist/chunk-5OACMWWI.js +886 -0
  32. package/dist/{chunk-2HMWX4T6.js → chunk-6ENDKY52.js} +11 -11
  33. package/dist/{chunk-OS7PQ35Z.js → chunk-6FG7QKJC.js} +22 -22
  34. package/dist/{chunk-FEZE6NIA.js → chunk-6JV3YHRR.js} +18 -18
  35. package/dist/{chunk-WGZWR4RF.js → chunk-6ROZRBWH.js} +5 -5
  36. package/dist/{chunk-WARBF2KY.js → chunk-6S27MUQQ.js} +10 -6
  37. package/dist/{chunk-TZDSDDSV.js → chunk-72DY5NCN.js} +2 -2
  38. package/dist/chunk-76QVBNEM.js +37 -0
  39. package/dist/{chunk-N4QZJJVB.js → chunk-77UOXZVM.js} +5 -5
  40. package/dist/{chunk-LVGBKKSM.js → chunk-7AXMUE2U.js} +15 -15
  41. package/dist/{chunk-FJCFYKVO.js → chunk-7TEQF64E.js} +196 -76
  42. package/dist/{chunk-IDGSU7JF.js → chunk-7TH6I6TL.js} +9 -9
  43. package/dist/{chunk-ZONE6E3Z.js → chunk-7UKETVPW.js} +2 -2
  44. package/dist/{chunk-XKS6THI5.js → chunk-7VNEDDCC.js} +2 -2
  45. package/dist/{chunk-BMHGA7WD.js → chunk-A5GY2EWH.js} +12 -12
  46. package/dist/{chunk-E3JYO547.js → chunk-AEZ3EICK.js} +20 -20
  47. package/dist/{chunk-7F2RUWPU.js → chunk-ARLH2ZMD.js} +1 -1
  48. package/dist/{chunk-VKMTFIWS.js → chunk-AYVLEB55.js} +18 -18
  49. package/dist/chunk-B6X5PJSA.js +320 -0
  50. package/dist/{chunk-JMSEEBN4.js → chunk-BRCDEGNE.js} +1 -1
  51. package/dist/{chunk-67J3VZBA.js → chunk-BSVTNNUK.js} +5 -5
  52. package/dist/{chunk-3GTZ2OON.js → chunk-BTOGAUWX.js} +20 -11
  53. package/dist/{chunk-4SVJNVEE.js → chunk-BXBCMGIQ.js} +2 -0
  54. package/dist/chunk-BXP2Q4TD.js +48 -0
  55. package/dist/{chunk-XPEEICAO.js → chunk-BZRWJUB4.js} +15 -15
  56. package/dist/{chunk-MH5OCRUM.js → chunk-CH6LUQLD.js} +2 -2
  57. package/dist/{chunk-T6USVBEJ.js → chunk-CIIRPLI6.js} +5 -5
  58. package/dist/chunk-CJXM6SG4.js +339 -0
  59. package/dist/{chunk-5XDNUJ4P.js → chunk-CQD26SMZ.js} +4 -2
  60. package/dist/{chunk-7TGYNOXD.js → chunk-CW5SEPUT.js} +7 -7
  61. package/dist/{chunk-5KTOPOEP.js → chunk-CWSZP2LU.js} +25 -25
  62. package/dist/chunk-CXK27ZUY.js +32 -0
  63. package/dist/{chunk-YGKYFMSL.js → chunk-CXY4YDXS.js} +3 -3
  64. package/dist/{chunk-R64GLVBO.js → chunk-DDZZXVQ5.js} +10 -10
  65. package/dist/{chunk-7YYEKTYF.js → chunk-DGZXJO5I.js} +8 -8
  66. package/dist/{chunk-IV7BCWWN.js → chunk-DONCF2XC.js} +3 -3
  67. package/dist/{chunk-RRVT4MPS.js → chunk-DPNCAFMB.js} +18 -18
  68. package/dist/{chunk-UBWCUP3G.js → chunk-DQKNOHUZ.js} +2 -2
  69. package/dist/{chunk-NGPU2ARF.js → chunk-DW4BM73R.js} +1 -1
  70. package/dist/{chunk-PEF5OEMB.js → chunk-DWN7RSNQ.js} +4 -4
  71. package/dist/{chunk-KC5DROFC.js → chunk-DWYPYVPJ.js} +14 -14
  72. package/dist/{chunk-B7434AE2.js → chunk-E73QLYK7.js} +24 -3
  73. package/dist/{chunk-EX6ZXS5K.js → chunk-EE3UNC44.js} +4 -4
  74. package/dist/chunk-EJDZEK22.js +53 -0
  75. package/dist/{chunk-ISNZYKAS.js → chunk-ENZWVTTN.js} +21 -21
  76. package/dist/{chunk-ROTY5J2L.js → chunk-EREL3TQG.js} +1 -1
  77. package/dist/{chunk-ZZXF6OOJ.js → chunk-ESGIBN3S.js} +2 -2
  78. package/dist/{chunk-YGR6OCHQ.js → chunk-EU7VTBAI.js} +8 -14
  79. package/dist/chunk-F5GA6G3U.js +48 -0
  80. package/dist/{chunk-JAA53T23.js → chunk-F6FGIYPT.js} +20 -20
  81. package/dist/{chunk-NPCD54I7.js → chunk-FAET4BB6.js} +8 -5
  82. package/dist/{chunk-YPBQNJHA.js → chunk-FBFSTYAB.js} +8 -8
  83. package/dist/{chunk-OEI7LVRP.js → chunk-FEBYMFZA.js} +24 -24
  84. package/dist/chunk-FMV6IZ3P.js +54 -0
  85. package/dist/{chunk-F7UQR4ZX.js → chunk-FQ6IBYFC.js} +3 -3
  86. package/dist/{chunk-J5LHDJU4.js → chunk-FSJMFPA3.js} +7 -7
  87. package/dist/chunk-GFZ5MIQG.js +47 -0
  88. package/dist/{chunk-LK44ULGI.js → chunk-GHSVJNVL.js} +104 -11
  89. package/dist/{chunk-LRS573EX.js → chunk-GKPOCUQR.js} +12 -7
  90. package/dist/{chunk-LDKUC2QJ.js → chunk-GLSNVC67.js} +17 -17
  91. package/dist/{chunk-47QE246J.js → chunk-GMDOXWIS.js} +5 -5
  92. package/dist/{chunk-5MI2SEV5.js → chunk-GN5ZLSLD.js} +3 -3
  93. package/dist/{chunk-JQ7XQPQS.js → chunk-GUNBOZ75.js} +4 -4
  94. package/dist/{chunk-HHUFVJF7.js → chunk-GYS64N6F.js} +6 -6
  95. package/dist/{chunk-AKJTKMXU.js → chunk-HIQWJ6JZ.js} +5 -5
  96. package/dist/{chunk-6GNS32SI.js → chunk-HJ52XDST.js} +4 -4
  97. package/dist/{chunk-2KDSXJFJ.js → chunk-HJUEQERG.js} +34 -7
  98. package/dist/chunk-HKGQUOQ3.js +88 -0
  99. package/dist/chunk-HP32HUWR.js +41 -0
  100. package/dist/{chunk-R4TBNKKC.js → chunk-HY2VVVFZ.js} +1249 -610
  101. package/dist/{chunk-G5SFOH7P.js → chunk-I2PNEG3M.js} +38 -23
  102. package/dist/{chunk-Y5PZHS4K.js → chunk-INCECZ2E.js} +5 -5
  103. package/dist/{chunk-RK6MKKKP.js → chunk-ISXNWUG7.js} +1 -1
  104. package/dist/{chunk-73VPWF5R.js → chunk-ITJ7ST5E.js} +4 -4
  105. package/dist/{chunk-5IALSMZ2.js → chunk-J3VAFDEX.js} +14 -14
  106. package/dist/chunk-JGLZUQVN.js +29 -0
  107. package/dist/{chunk-5XN76FTF.js → chunk-JLIEAQP4.js} +5 -5
  108. package/dist/{chunk-MGVYVW7Q.js → chunk-JQG4VO47.js} +1 -1
  109. package/dist/chunk-JXXQHETS.js +130 -0
  110. package/dist/{chunk-APSVL2AI.js → chunk-KNGESBFW.js} +15 -15
  111. package/dist/{chunk-7UKVYFQ2.js → chunk-KUYA2E7M.js} +8 -8
  112. package/dist/{chunk-WLIIQ2A4.js → chunk-KY2ZHTBJ.js} +7 -7
  113. package/dist/{chunk-YPIEYQF4.js → chunk-L4UIKAWD.js} +6 -6
  114. package/dist/chunk-LDUJ6NIT.js +247 -0
  115. package/dist/{chunk-5YIBJXGB.js → chunk-LTLR4JZJ.js} +10 -10
  116. package/dist/{chunk-IZNSAEBX.js → chunk-MFRPLAOH.js} +2 -2
  117. package/dist/{chunk-6GWHKMQR.js → chunk-MH7UBG47.js} +4 -4
  118. package/dist/{chunk-4GZXS6S2.js → chunk-MLAACAES.js} +278 -17
  119. package/dist/{chunk-D3PO4DOZ.js → chunk-MMB2OHUY.js} +4 -2
  120. package/dist/{chunk-DDAHCPGA.js → chunk-MNCQ2GL7.js} +12 -12
  121. package/dist/{chunk-UYYN2IUZ.js → chunk-MNUZX67F.js} +6 -6
  122. package/dist/{chunk-YFSSNGLR.js → chunk-MQHYCS6A.js} +32 -29
  123. package/dist/{chunk-MKRBG5EF.js → chunk-MRLCNXXR.js} +1 -1
  124. package/dist/{chunk-BUYJL3GJ.js → chunk-NBQO75XT.js} +1 -1
  125. package/dist/{chunk-GXJVY6WT.js → chunk-NCONDPHH.js} +5 -5
  126. package/dist/{chunk-ZP4FJHR4.js → chunk-NHS55U7T.js} +18 -18
  127. package/dist/{chunk-CRE4BJHM.js → chunk-NL6XQZSV.js} +23 -23
  128. package/dist/{chunk-YVLMBAYE.js → chunk-NSJ6ZR2A.js} +3 -3
  129. package/dist/{chunk-XRO65C7V.js → chunk-NTNJNRHW.js} +8 -6
  130. package/dist/{chunk-FTV6I76U.js → chunk-NTTXTLCQ.js} +25 -25
  131. package/dist/chunk-NWL7XEQ4.js +37 -0
  132. package/dist/{chunk-CNKGYDMG.js → chunk-NWXY3B4R.js} +23 -23
  133. package/dist/{chunk-52R2YXP5.js → chunk-O5W4ECUY.js} +16 -16
  134. package/dist/{chunk-OGRWQ562.js → chunk-O6ILVBYB.js} +2 -2
  135. package/dist/{chunk-BJPMKJTL.js → chunk-OJAJXU65.js} +102 -2
  136. package/dist/{chunk-FZL2HNWP.js → chunk-OMH3I5BH.js} +3 -3
  137. package/dist/{chunk-MF7QH4AX.js → chunk-P6UJ22XR.js} +5 -5
  138. package/dist/{chunk-HE4ZQXZM.js → chunk-P76AW3PA.js} +309 -15
  139. package/dist/{chunk-GZ4TKR3Q.js → chunk-PCCPXWJC.js} +48 -139
  140. package/dist/{chunk-6TJCUYC5.js → chunk-PGFRXGHA.js} +3 -3
  141. package/dist/{chunk-NIXVDQVO.js → chunk-PJRMMWU4.js} +2 -2
  142. package/dist/{chunk-X4W4XXWP.js → chunk-PKJ3K3GM.js} +5 -5
  143. package/dist/{chunk-KM2FBM3T.js → chunk-PVW2N63M.js} +302 -55
  144. package/dist/{chunk-Y7KBQ4BD.js → chunk-Q55UP5EZ.js} +22 -22
  145. package/dist/{chunk-7URGP4DD.js → chunk-QAFMLBPF.js} +12 -12
  146. package/dist/{chunk-KIAI6PWL.js → chunk-QEZSA2O7.js} +17 -17
  147. package/dist/{chunk-PKCMRPPB.js → chunk-QJ3OX7OC.js} +33 -27
  148. package/dist/{chunk-6EDQE7GO.js → chunk-QL4VNY4U.js} +2 -2
  149. package/dist/{chunk-6JLPXDWN.js → chunk-QR65C3DV.js} +5 -5
  150. package/dist/{chunk-ILFKECGI.js → chunk-QXGOEP44.js} +4 -4
  151. package/dist/chunk-QY7RGTUP.js +326 -0
  152. package/dist/{chunk-PGKHJYOB.js → chunk-RA64IK43.js} +1 -1
  153. package/dist/{chunk-XB5RFZHH.js → chunk-RLJDYLID.js} +12 -12
  154. package/dist/{chunk-AWECWW5Y.js → chunk-RMLUZYEA.js} +13 -11
  155. package/dist/chunk-RSVBX6A3.js +54 -0
  156. package/dist/chunk-RZWZO2JQ.js +42 -0
  157. package/dist/chunk-S5LSDXV4.js +40 -0
  158. package/dist/{chunk-TM7LC37P.js → chunk-SAC6FNKR.js} +181 -117
  159. package/dist/{chunk-DPHCFZ7W.js → chunk-SCBU46AJ.js} +3 -3
  160. package/dist/{chunk-EZIUFEN6.js → chunk-SGNHNN3G.js} +12 -12
  161. package/dist/{chunk-XKZHAD6Y.js → chunk-SHAAGH3T.js} +15 -15
  162. package/dist/chunk-SK5OYWIY.js +122 -0
  163. package/dist/{chunk-FR7JPYBD.js → chunk-SNSFQ47W.js} +12 -12
  164. package/dist/{chunk-FV5YFR6I.js → chunk-SSL6JMPA.js} +9 -9
  165. package/dist/{chunk-XEG3FE2R.js → chunk-TA2ZNDYD.js} +1 -1
  166. package/dist/{chunk-JF2NSTFO.js → chunk-TEHH47TG.js} +3 -3
  167. package/dist/{chunk-W5OYJMBT.js → chunk-TEZSZ24W.js} +5 -5
  168. package/dist/{chunk-SS66Q4VE.js → chunk-TH526O6E.js} +12 -12
  169. package/dist/{chunk-R6B6XAKK.js → chunk-TIAPEYWI.js} +4 -4
  170. package/dist/chunk-TLCRIAU3.js +44 -0
  171. package/dist/{chunk-FMKKVWZD.js → chunk-TQYBXDVH.js} +2 -2
  172. package/dist/chunk-TV4CGNEY.js +43 -0
  173. package/dist/{chunk-QICFHVRW.js → chunk-TVSNWIAM.js} +8 -6
  174. package/dist/{chunk-CHC5FKTU.js → chunk-TWHZU36X.js} +1 -1
  175. package/dist/{chunk-BMCKL3VQ.js → chunk-TXV2AYZB.js} +24 -24
  176. package/dist/{chunk-577AJVRS.js → chunk-U25OX22K.js} +2039 -289
  177. package/dist/{chunk-7EKESFWV.js → chunk-U4NNG3ES.js} +11 -11
  178. package/dist/{chunk-XQ3YIV5R.js → chunk-U5T4A2QV.js} +6 -6
  179. package/dist/{chunk-2XM6PYQQ.js → chunk-UT5OA7KA.js} +43 -11
  180. package/dist/{chunk-BXIX7S7O.js → chunk-V3VCUSQ6.js} +15 -15
  181. package/dist/{chunk-4QUQEBFT.js → chunk-V5XV3JSP.js} +6 -6
  182. package/dist/{chunk-F7YL2RZ4.js → chunk-VF4VOPMB.js} +23 -23
  183. package/dist/{chunk-3QAKDIEU.js → chunk-VLDM4QZM.js} +23 -23
  184. package/dist/chunk-VP5H6DII.js +34 -0
  185. package/dist/{chunk-N3NBWIYQ.js → chunk-VRYQJZFL.js} +10 -9
  186. package/dist/{chunk-FQSRHTTC.js → chunk-VS6FS472.js} +15 -15
  187. package/dist/{chunk-YMOJD5BO.js → chunk-VTMIRRIZ.js} +3 -3
  188. package/dist/{chunk-4PJADZRR.js → chunk-VXSJKWB7.js} +16 -16
  189. package/dist/{chunk-MTAUZW2Z.js → chunk-WE5VMPUP.js} +216 -106
  190. package/dist/{chunk-ZE3P35DA.js → chunk-WEG7DY5K.js} +9 -9
  191. package/dist/{chunk-V2TH46ZY.js → chunk-WIF7A6JU.js} +12 -12
  192. package/dist/{chunk-GFXLPJWY.js → chunk-WM4N2L4T.js} +2 -2
  193. package/dist/{chunk-XIWYUQZQ.js → chunk-X64BFQ3R.js} +9 -9
  194. package/dist/{chunk-QWVBEK4P.js → chunk-XJRC3ZDI.js} +13 -13
  195. package/dist/{chunk-F2FOQLJ7.js → chunk-XVIVWG7B.js} +6 -6
  196. package/dist/{chunk-XTVDAHH2.js → chunk-Y3ZKT6IF.js} +5 -5
  197. package/dist/{chunk-62YMDXY6.js → chunk-YURIUFKF.js} +16 -16
  198. package/dist/{chunk-HKTUIMH4.js → chunk-YY2WGL6S.js} +3 -3
  199. package/dist/{chunk-BDEKREZH.js → chunk-Z2BA4NNR.js} +3 -3
  200. package/dist/{chunk-MTEBM4Y4.js → chunk-Z47YGBUY.js} +19 -12
  201. package/dist/chunk-Z4JSRKNR.js +41 -0
  202. package/dist/{chunk-G2E5MNYP.js → chunk-Z53ZB34U.js} +7 -7
  203. package/dist/{chunk-NNUASOAA.js → chunk-ZBOPIYOY.js} +12 -12
  204. package/dist/{chunk-7GB4ZRE2.js → chunk-ZBQCLKTH.js} +12 -12
  205. package/dist/chunk-ZGI7DNJ6.js +38 -0
  206. package/dist/{chunk-P3TKKBAH.js → chunk-ZPT4QX3J.js} +4 -4
  207. package/dist/chunk-ZS47PQ3O.js +41 -0
  208. package/dist/{chunk-PIVKU64W.js → chunk-ZTIMXVV5.js} +2 -2
  209. package/dist/{chunk-T4RTWMJD.js → chunk-ZYASEL7K.js} +5 -5
  210. package/dist/files.json +469 -417
  211. package/dist/packages/sdk/npm/index.js +2309 -1983
  212. package/dist/packages/ui/dist/assets/{elk-api-Mo5w5xCa.js → elk-api-D2NcYpUJ.js} +2 -2
  213. package/dist/packages/ui/dist/assets/{index-Bp3XhPHX.css → index-C0JEkXyN.css} +1 -1
  214. package/dist/packages/ui/dist/assets/index-CT7skl01.js +29 -0
  215. package/dist/packages/ui/dist/index.html +2 -2
  216. package/package.json +4 -4
  217. package/dist/chunk-26PLPSQW.js +0 -48
  218. package/dist/chunk-2G4DFUWJ.js +0 -43
  219. package/dist/chunk-2M6WXO73.js +0 -38
  220. package/dist/chunk-5F3RJCHB.js +0 -45
  221. package/dist/chunk-B2VSVN4P.js +0 -34
  222. package/dist/chunk-B3O52AUQ.js +0 -275
  223. package/dist/chunk-CITDNDIZ.js +0 -53
  224. package/dist/chunk-DAQBIK5G.js +0 -47
  225. package/dist/chunk-DZRQDNPT.js +0 -34
  226. package/dist/chunk-FLOEZA6K.js +0 -29
  227. package/dist/chunk-FNHSVBRA.js +0 -48
  228. package/dist/chunk-FPGVOSOG.js +0 -41
  229. package/dist/chunk-FZ2E5LGK.js +0 -54
  230. package/dist/chunk-HB6XSGI6.js +0 -131
  231. package/dist/chunk-HUZQDKQK.js +0 -48
  232. package/dist/chunk-L4VJ4ETL.js +0 -41
  233. package/dist/chunk-XPCWQXTY.js +0 -37
  234. package/dist/chunk-YIEOFHOL.js +0 -30
  235. package/dist/packages/ui/dist/assets/index-DM212ZbV.js +0 -29
@@ -4,30 +4,275 @@ 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
6
  import {
7
- readReviewed
8
- } from "./chunk-B3O52AUQ.js";
7
+ repoFor
8
+ } from "./chunk-7VNEDDCC.js";
9
9
  import {
10
- lineRangeOf
11
- } from "./chunk-4GZXS6S2.js";
10
+ frameworkFacts,
11
+ insideRepo,
12
+ lineRangeOf,
13
+ parseReviewed
14
+ } from "./chunk-MLAACAES.js";
12
15
  import {
16
+ changesSince,
17
+ createGit
18
+ } from "./chunk-RA64IK43.js";
19
+ import {
20
+ Conventions,
21
+ DEFAULT_CONVENTIONS,
22
+ QuestionDraft,
13
23
  citedFiles,
14
24
  external_exports,
15
25
  factsDirOf,
16
26
  factsRelOf,
27
+ isAdopted,
28
+ isSecretPath,
29
+ loadOrgPack,
30
+ orgPackDirOf,
31
+ parseCorrections,
17
32
  parseFacts,
18
- require_dist
19
- } from "./chunk-577AJVRS.js";
33
+ parseFactsLines,
34
+ raiseQuestions,
35
+ require_dist,
36
+ serializeFacts
37
+ } from "./chunk-U25OX22K.js";
20
38
  import {
21
39
  writeFileAtomic
22
- } from "./chunk-D3PO4DOZ.js";
40
+ } from "./chunk-MMB2OHUY.js";
23
41
  import {
24
42
  __toESM
25
43
  } from "./chunk-TV45EUGM.js";
26
44
 
27
45
  // packages/cli/dist/map-parts.js
46
+ var import_yaml2 = __toESM(require_dist(), 1);
47
+ import { readFile as readFile2 } from "node:fs/promises";
48
+ import { join as join2 } from "node:path";
49
+
50
+ // packages/cli/dist/facts-files.js
28
51
  var import_yaml = __toESM(require_dist(), 1);
29
- import { readFile } from "node:fs/promises";
52
+ import { existsSync } from "node:fs";
53
+ import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
30
54
  import { join } from "node:path";
55
+ async function checkoutOf(root, repo, dir) {
56
+ return dir ?? (isAdopted(root) ? root : (await repoFor(root, repo))?.dir ?? void 0);
57
+ }
58
+ async function headOf(dir) {
59
+ try {
60
+ const r = await createGit({ timeoutMs: 3e4 })(["rev-parse", "HEAD"], dir);
61
+ return r.stdout.trim() || void 0;
62
+ } catch {
63
+ return void 0;
64
+ }
65
+ }
66
+ async function carryOf(dir, facts, commit, git) {
67
+ if (!commit)
68
+ return { carry: {}, missing: [] };
69
+ const r = await changesSince(dir, facts.map((f) => f.commit), commit, git);
70
+ return { carry: r.changes, missing: r.missing };
71
+ }
72
+ async function conventionsAt(root) {
73
+ const file = join(orgPackDirOf(root), "conventions.yaml");
74
+ if (!existsSync(file))
75
+ return DEFAULT_CONVENTIONS;
76
+ try {
77
+ const r = Conventions.safeParse((0, import_yaml.parse)(await readFile(file, "utf8")));
78
+ return r.success ? r.data : DEFAULT_CONVENTIONS;
79
+ } catch {
80
+ return DEFAULT_CONVENTIONS;
81
+ }
82
+ }
83
+ async function excludesOf(root, repo) {
84
+ const file = join(orgPackDirOf(root), "scan", `${repo}.yaml`);
85
+ if (!existsSync(file))
86
+ return [];
87
+ try {
88
+ const doc = (0, import_yaml.parse)(await readFile(file, "utf8"));
89
+ return (doc?.exclude ?? []).map((e) => e.path).filter((p) => !!p);
90
+ } catch {
91
+ return [];
92
+ }
93
+ }
94
+ async function raiseReadQuestions(root, repo, lines, source, by) {
95
+ const drafts = [];
96
+ const problems = [];
97
+ for (const raw of lines) {
98
+ const line = JSON.stringify(raw);
99
+ const r2 = QuestionDraft.safeParse(raw);
100
+ if (!r2.success) {
101
+ problems.push({
102
+ line,
103
+ message: `not a question: ${r2.error.issues.map((i) => `${i.path.join(".") || "(root)"}: ${i.message}`).join("; ")}`
104
+ });
105
+ continue;
106
+ }
107
+ const bad = r2.data.evidence.find((e) => {
108
+ const file = e.slice(0, e.lastIndexOf(":"));
109
+ const n = Number(e.slice(e.lastIndexOf(":") + 1));
110
+ if (!insideRepo(file) || isSecretPath(file))
111
+ return true;
112
+ const text = source.read(file);
113
+ return text === void 0 || n < 1 || n > text.split(/\r?\n/).length;
114
+ });
115
+ if (bad) {
116
+ problems.push({ line, message: `its evidence ${bad} is no line of the repo` });
117
+ continue;
118
+ }
119
+ drafts.push(r2.data);
120
+ }
121
+ if (!drafts.length)
122
+ return { raised: [], known: [], problems };
123
+ const r = await raiseQuestions(root, drafts, {
124
+ step: "map",
125
+ repo,
126
+ command: by.command,
127
+ rerun: `atticus map ${repo}`,
128
+ ...by.run ? { run: by.run } : {},
129
+ at: by.at
130
+ });
131
+ return { raised: r.raised, known: [...r.known, ...r.reused], problems };
132
+ }
133
+ async function estateComponentsOf(root) {
134
+ const op = await loadOrgPack(orgPackDirOf(root)).catch(() => void 0);
135
+ const repos = (op?.profiles ?? []).flatMap((p) => p.repos?.repos ?? []);
136
+ if (!repos.length)
137
+ return void 0;
138
+ const components = repos.flatMap((r) => [
139
+ r.id,
140
+ ...r.component ? [r.component] : [],
141
+ ...(r.modules ?? []).map((m) => m.component)
142
+ ]);
143
+ const repoComponents = {};
144
+ for (const r of repos) {
145
+ const text = await readFile(join(factsDirOf(root), `${r.id}.jsonl`), "utf8").catch(() => void 0);
146
+ if (text === void 0)
147
+ continue;
148
+ const named = parseFactsLines(text).facts.flatMap((f) => f.component ? [f.component] : []);
149
+ repoComponents[r.id] = [
150
+ .../* @__PURE__ */ new Set([r.component ?? r.id, ...(r.modules ?? []).map((m) => m.component), ...named])
151
+ ].sort();
152
+ }
153
+ return { components: [...new Set(components)].sort(), repoComponents };
154
+ }
155
+ var SKIPPED_LISTED = 100;
156
+ function slipNoteLines(slips, verifyYaml, shown = 5) {
157
+ if (!slips.length)
158
+ return [];
159
+ return [
160
+ `${slips.length} ${slips.length === 1 ? "slip" : "slips"} of form fixed in the facts (a note, not a rejection; under slips in ${verifyYaml}):`,
161
+ ...slips.slice(0, shown).map((x) => ` ${x.message}`),
162
+ ...slips.length > shown ? [` ... and ${slips.length - shown} more (slips in ${verifyYaml})`] : []
163
+ ];
164
+ }
165
+ async function writeVerifyFiles(root, repo, report, commit, questionProblems = [], badLines = [], reviewedProblems = [], slips = []) {
166
+ const dir = factsDirOf(root);
167
+ await mkdir(dir, { recursive: true });
168
+ await writeFile(join(dir, `${repo}.jsonl`), serializeFacts(report.accepted), "utf8");
169
+ const rejectedFile = join(dir, `${repo}.rejected.jsonl`);
170
+ const lines = [
171
+ ...report.rejected.map((r) => JSON.stringify({ code: r.code, message: r.message, fact: r.fact })),
172
+ ...questionProblems.map((q) => JSON.stringify({ code: "bad-question", message: q.message, question: JSON.parse(q.line) })),
173
+ ...badLines.map((b) => JSON.stringify({ code: "schema", message: b.message, raw: b.raw })),
174
+ ...reviewedProblems.map((r) => JSON.stringify({ code: "bad-reviewed", message: r.message, reviewed: r.raw }))
175
+ ];
176
+ if (lines.length)
177
+ await writeFile(rejectedFile, lines.join("\n") + "\n", "utf8");
178
+ else
179
+ await rm(rejectedFile, { force: true });
180
+ const summary = {
181
+ repo,
182
+ ...commit ? { commit } : {},
183
+ accepted: report.accepted.length,
184
+ rejected: report.rejected.length,
185
+ redacted: report.redacted,
186
+ ...report.quotesDropped ? { quotesDropped: report.quotesDropped } : {},
187
+ coverage: {
188
+ ratio: report.coverage.ratio,
189
+ read: report.coverage.read.length,
190
+ ...report.coverage.reviewed.length ? { reviewed: report.coverage.reviewed.length } : {},
191
+ unknown: report.coverage.unknown,
192
+ excluded: report.coverage.excluded
193
+ },
194
+ rejections: report.rejected.map((r) => ({ id: r.fact.id, code: r.code, message: r.message })),
195
+ // ADR 0124 addendum D-app: a person's corrections, said only when there are some.
196
+ ...report.corrections.applied.length || report.corrections.stale.length ? {
197
+ corrections: {
198
+ applied: report.corrections.applied,
199
+ stale: report.corrections.stale.map((s) => ({
200
+ fact: s.correction.fact,
201
+ why: s.why,
202
+ message: s.message
203
+ }))
204
+ }
205
+ } : {}
206
+ };
207
+ if (report.carried.length) {
208
+ const by = /* @__PURE__ */ new Map();
209
+ for (const c of report.carried)
210
+ by.set(c.from, [...by.get(c.from) ?? [], c.id]);
211
+ summary.carried = [...by.entries()].sort((a, b) => a[0] < b[0] ? -1 : 1).map(([from, facts]) => ({ from, facts: facts.sort() }));
212
+ }
213
+ if (report.entriesNoFlowFollows.length)
214
+ summary.entriesNoFlowFollows = report.entriesNoFlowFollows;
215
+ if (report.reviewed.length)
216
+ summary.reviewed = report.reviewed;
217
+ if (report.reviewedDropped.length)
218
+ summary.reviewedDropped = report.reviewedDropped;
219
+ if (report.methodUnseen.length) {
220
+ summary.methodUnseenCount = report.methodUnseen.length;
221
+ summary.methodUnseen = report.methodUnseen;
222
+ }
223
+ if (report.skipped.length) {
224
+ summary.skippedCount = report.skipped.length;
225
+ summary.skipped = report.skipped.slice(0, SKIPPED_LISTED);
226
+ }
227
+ if (report.reviewedHolds.length)
228
+ summary.reviewedHolds = report.reviewedHolds;
229
+ if (report.specOpsUncovered.length) {
230
+ summary.specOpsUncoveredCount = report.specOpsUncovered.length;
231
+ summary.specOpsUncovered = report.specOpsUncovered.slice(0, SKIPPED_LISTED);
232
+ }
233
+ if (slips.length)
234
+ summary.slips = [...slips];
235
+ if (report.authUncited.length)
236
+ summary.authUncited = report.authUncited;
237
+ const fws = frameworkFacts(report.accepted);
238
+ if (fws.length)
239
+ summary.frameworks = fws.map((f) => ({
240
+ name: f.name,
241
+ ...f.version ? { version: f.version } : {},
242
+ cite: `${f.cite.file}:${f.cite.line}`,
243
+ ...f.component ? { component: f.component } : {}
244
+ }));
245
+ if (report.frameworkGaps.length)
246
+ summary.frameworkGaps = report.frameworkGaps;
247
+ await writeFile(join(dir, `${repo}.verify.yaml`), (0, import_yaml.stringify)(summary), "utf8");
248
+ return summary;
249
+ }
250
+ async function readCorrections(root, repo) {
251
+ const text = await readFile(join(factsDirOf(root), `${repo}.corrections.jsonl`), "utf8").catch(() => void 0);
252
+ return text === void 0 ? { corrections: [], bad: [] } : parseCorrections(text);
253
+ }
254
+ async function readReviewed(root, repo) {
255
+ const text = await readFile(join(factsDirOf(root), `${repo}.reviewed.jsonl`), "utf8").catch(() => void 0);
256
+ if (text === void 0)
257
+ return { entries: [], bad: [] };
258
+ const r = parseReviewed(text);
259
+ return {
260
+ entries: r.entries,
261
+ bad: r.bad.map((b) => ({ line: b.line, raw: b.raw, message: b.message }))
262
+ };
263
+ }
264
+ function reviewedProblemsOf(bad, report) {
265
+ return [
266
+ ...bad,
267
+ ...report.reviewedProblems.map((p) => ({
268
+ ...p.line !== void 0 ? { line: p.line } : {},
269
+ raw: { path: p.path, why: p.why },
270
+ message: p.message
271
+ }))
272
+ ].sort((a, b) => (a.line ?? 0) - (b.line ?? 0));
273
+ }
274
+
275
+ // packages/cli/dist/map-parts.js
31
276
  var ReadStamp = external_exports.strictObject({ at: external_exports.string().min(1), commit: external_exports.string().min(1) });
32
277
  var Part = external_exports.strictObject({
33
278
  part: external_exports.number().int().positive(),
@@ -57,6 +302,28 @@ var Reported = external_exports.strictObject({
57
302
  /** Who reported it (--by), when given. */
58
303
  by: external_exports.string().min(1).optional()
59
304
  });
305
+ var RulesRecord = external_exports.strictObject({
306
+ hash: external_exports.string().min(1),
307
+ sets: external_exports.array(external_exports.string().min(1))
308
+ });
309
+ var TopUpSession = external_exports.strictObject({
310
+ paths: external_exports.array(external_exports.string().min(1)).min(1),
311
+ sets: external_exports.array(external_exports.string().min(1)).min(1),
312
+ files: external_exports.number().int().nonnegative(),
313
+ tokens: external_exports.number().int().nonnegative(),
314
+ /** When `atticus map <repo> --rules` last gave it to a reader. */
315
+ given: external_exports.string().min(1).optional(),
316
+ /** When a verify that passed after it was given found it done. */
317
+ done: ReadStamp.optional()
318
+ });
319
+ var TopUp = external_exports.strictObject({
320
+ commit: external_exports.string().min(1),
321
+ hash: external_exports.string().min(1),
322
+ sets: external_exports.array(external_exports.string().min(1)),
323
+ session: external_exports.number().int().positive(),
324
+ plannedAt: external_exports.string().min(1),
325
+ sessions: external_exports.array(TopUpSession)
326
+ });
60
327
  var ReadPlanFile = external_exports.strictObject({
61
328
  /** 2 since ADR 0141 (a v1 file reads as v2: `migrateReadPlan`). */
62
329
  schemaVersion: external_exports.literal(2),
@@ -82,7 +349,11 @@ var ReadPlanFile = external_exports.strictObject({
82
349
  /** ADR 0141: when `atticus verify` first found the whole plan in the facts. */
83
350
  read: ReadStamp.extend({ sessions: external_exports.number().int().positive() }).optional(),
84
351
  /** ADR 0141: what the reader reported the read took (`atticus map <repo> --spent`). */
85
- reported: external_exports.array(Reported).optional()
352
+ reported: external_exports.array(Reported).optional(),
353
+ /** ADR 0167: the reading rules the read was given; none when read before they were recorded. */
354
+ rules: RulesRecord.optional(),
355
+ /** ADR 0167: a top-up for the rule sets the read lacked, under way. */
356
+ topUp: TopUp.optional()
86
357
  });
87
358
  function migrateReadPlan(raw) {
88
359
  const v2 = ReadPlanFile.safeParse(raw);
@@ -94,7 +365,7 @@ function migrateReadPlan(raw) {
94
365
  return { ...v1.data, schemaVersion: 2 };
95
366
  }
96
367
  var readPlanRelOf = (root, repo) => `${factsRelOf(root)}/${repo}.read-plan.yaml`;
97
- var readPlanPath = (root, repo) => join(factsDirOf(root), `${repo}.read-plan.yaml`);
368
+ var readPlanPath = (root, repo) => join2(factsDirOf(root), `${repo}.read-plan.yaml`);
98
369
  function unitOf(glob) {
99
370
  const range = lineRangeOf(glob);
100
371
  if (range)
@@ -116,9 +387,18 @@ function folderOf(path) {
116
387
  return { dir: path.slice(0, star).replace(/\/$/, ""), deep: true };
117
388
  }
118
389
  var under = (dir, of) => of === "" || dir === of || dir.startsWith(`${of}/`);
390
+ function globHolds(glob, file) {
391
+ const u = unitOf(glob);
392
+ if (u.range)
393
+ return u.range.file === file;
394
+ if (!/[*]/.test(glob))
395
+ return glob === file;
396
+ const dir = file.replace(/\/?[^/]*$/, "");
397
+ return u.deep ? under(dir, u.dir) : dir === u.dir;
398
+ }
119
399
  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";
120
400
  async function saveReadPlan(root, plan) {
121
- await writeFileAtomic(readPlanPath(root, plan.repo), `${HEADER}${(0, import_yaml.stringify)(ReadPlanFile.parse(plan), { lineWidth: 0 })}`);
401
+ await writeFileAtomic(readPlanPath(root, plan.repo), `${HEADER}${(0, import_yaml2.stringify)(ReadPlanFile.parse(plan), { lineWidth: 0 })}`);
122
402
  }
123
403
  async function writeReadPlan(root, repo, o) {
124
404
  const plan = {
@@ -134,18 +414,19 @@ async function writeReadPlan(root, repo, o) {
134
414
  files: p.files,
135
415
  tokens: p.tokens
136
416
  })),
137
- ...o.reported?.length ? { reported: [...o.reported] } : {}
417
+ ...o.reported?.length ? { reported: [...o.reported] } : {},
418
+ ...o.rules ? { rules: { hash: o.rules.hash, sets: [...o.rules.sets] } } : {}
138
419
  };
139
420
  await saveReadPlan(root, plan);
140
421
  return plan;
141
422
  }
142
423
  var stamp = () => (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z");
143
424
  async function loadReadPlan(root, repo) {
144
- const text = await readFile(readPlanPath(root, repo), "utf8").catch(() => void 0);
425
+ const text = await readFile2(readPlanPath(root, repo), "utf8").catch(() => void 0);
145
426
  if (text === void 0)
146
427
  return void 0;
147
428
  try {
148
- return migrateReadPlan((0, import_yaml.parse)(text));
429
+ return migrateReadPlan((0, import_yaml2.parse)(text));
149
430
  } catch {
150
431
  return void 0;
151
432
  }
@@ -169,7 +450,7 @@ async function coveredOf(root, repo) {
169
450
  const reviewed = /* @__PURE__ */ new Set();
170
451
  const lines = [];
171
452
  const ranges = /* @__PURE__ */ new Set();
172
- const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => void 0);
453
+ const text = await readFile2(join2(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => void 0);
173
454
  if (text !== void 0) {
174
455
  const parsed = parseFacts(text);
175
456
  const facts = parsed.ok ? parsed.facts : [];
@@ -378,9 +659,22 @@ async function mapSpent(root, repo, o, io) {
378
659
  }
379
660
 
380
661
  export {
662
+ checkoutOf,
663
+ headOf,
664
+ carryOf,
665
+ conventionsAt,
666
+ excludesOf,
667
+ raiseReadQuestions,
668
+ estateComponentsOf,
669
+ slipNoteLines,
670
+ writeVerifyFiles,
671
+ readCorrections,
672
+ readReviewed,
673
+ reviewedProblemsOf,
381
674
  ReadPlanFile,
382
675
  migrateReadPlan,
383
676
  readPlanRelOf,
677
+ globHolds,
384
678
  saveReadPlan,
385
679
  writeReadPlan,
386
680
  loadReadPlan,