@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.
Files changed (273) hide show
  1. package/dist/bin.js +8 -4
  2. package/dist/chunk-265LWMOA.js +91 -0
  3. package/dist/chunk-26WBY34Y.js +37 -0
  4. package/dist/{chunk-UBBC2XSG.js → chunk-26Z7OGQW.js} +518 -93
  5. package/dist/chunk-2D7PWSOK.js +172 -0
  6. package/dist/{chunk-JCZIKA4C.js → chunk-2HH3UCZM.js} +4 -4
  7. package/dist/{chunk-GDLULHTC.js → chunk-2HTEMYTB.js} +12 -26
  8. package/dist/chunk-2UCRFXFZ.js +130 -0
  9. package/dist/{chunk-MVZVGYXH.js → chunk-2V2ZPQQU.js} +81 -13
  10. package/dist/{chunk-BOHJZTEQ.js → chunk-36RY7ZXM.js} +130 -71
  11. package/dist/{chunk-I3E7CX4H.js → chunk-37WE3LS2.js} +3 -3
  12. package/dist/{chunk-IPKHE5D6.js → chunk-3AQ2R5NL.js} +1520 -871
  13. package/dist/chunk-3G6S7LAA.js +43 -0
  14. package/dist/chunk-3J5I7ZOU.js +58 -0
  15. package/dist/{chunk-65NYPGRC.js → chunk-3LZ6P5EP.js} +1 -1
  16. package/dist/chunk-3SSTNB4E.js +191 -0
  17. package/dist/chunk-3TD6S4TC.js +49 -0
  18. package/dist/{chunk-3C7EYRFZ.js → chunk-3UTYPHN3.js} +1 -1
  19. package/dist/{chunk-G2B4ZQGH.js → chunk-3WON4G3M.js} +2 -2
  20. package/dist/{chunk-S3QNRWYR.js → chunk-42EPP7OB.js} +12 -12
  21. package/dist/chunk-455SYIIE.js +113 -0
  22. package/dist/{chunk-YISXLPHN.js → chunk-4B6BT75O.js} +166 -23
  23. package/dist/{chunk-C6EKFH7J.js → chunk-4CLK2RJO.js} +7 -7
  24. package/dist/chunk-4CYTJ5TZ.js +38 -0
  25. package/dist/{chunk-EYWIDJFU.js → chunk-4D62IZII.js} +5 -5
  26. package/dist/chunk-4FOAYLI4.js +328 -0
  27. package/dist/{chunk-7JUKDRSZ.js → chunk-4KNOJC6J.js} +294 -215
  28. package/dist/{chunk-YMZ3TNYB.js → chunk-4PYC2UGC.js} +2 -2
  29. package/dist/{chunk-27NKUS3X.js → chunk-4SLBCEPD.js} +2104 -726
  30. package/dist/chunk-4TKVU2I2.js +122 -0
  31. package/dist/{chunk-RUVFXE2L.js → chunk-4WXRPQDE.js} +448 -47
  32. package/dist/{chunk-7ZUIMTOU.js → chunk-5CMPVC3N.js} +24 -24
  33. package/dist/chunk-5G7ILBUG.js +66 -0
  34. package/dist/{chunk-HFQCFSJR.js → chunk-5PV7S2ZP.js} +3 -3
  35. package/dist/{chunk-FITWGOJ2.js → chunk-5QUOPNLN.js} +4 -4
  36. package/dist/{chunk-Z6LF7HQN.js → chunk-5TDRBOAV.js} +5 -5
  37. package/dist/{chunk-T6AIP7H5.js → chunk-5WERBKLE.js} +199 -63
  38. package/dist/{chunk-XPCM366L.js → chunk-62DLJSLV.js} +8 -8
  39. package/dist/{chunk-L24C55VN.js → chunk-64AADMTW.js} +99 -25
  40. package/dist/{chunk-K65BJIMT.js → chunk-67BP7HXL.js} +17 -17
  41. package/dist/chunk-6DQYZU2W.js +379 -0
  42. package/dist/{chunk-EDS2L2LD.js → chunk-6EXDI5GI.js} +52 -26
  43. package/dist/chunk-6FNAKCET.js +38 -0
  44. package/dist/{chunk-6IU67AEK.js → chunk-75ASLHBT.js} +21 -15
  45. package/dist/{chunk-A3GY6SOA.js → chunk-75ZOZFGH.js} +18 -18
  46. package/dist/{chunk-MGYZM27B.js → chunk-77O633L5.js} +49 -23
  47. package/dist/{chunk-GQ4N4WKF.js → chunk-7AB6OWTV.js} +3 -3
  48. package/dist/{chunk-M766ZJ6W.js → chunk-7CZHUZBL.js} +25 -25
  49. package/dist/{chunk-A7UPUQFY.js → chunk-7FHNFCHK.js} +643 -124
  50. package/dist/chunk-7FUIVIBG.js +415 -0
  51. package/dist/{chunk-6QSERWXH.js → chunk-7QPCGTPS.js} +21 -21
  52. package/dist/{chunk-LR3R6Z2A.js → chunk-A2G72UI4.js} +7 -7
  53. package/dist/{chunk-I4JRCD6M.js → chunk-AE4P57KK.js} +23 -17
  54. package/dist/{chunk-AVJDSJ2F.js → chunk-AHW3RY3X.js} +7 -7
  55. package/dist/chunk-AM6FP6JW.js +43 -0
  56. package/dist/{chunk-CSZ4C5N6.js → chunk-AOCWFA7T.js} +93 -10
  57. package/dist/{chunk-EPTBZ3GP.js → chunk-API5TOUB.js} +1 -1
  58. package/dist/{chunk-652QWTLZ.js → chunk-AZDITBCT.js} +3 -3
  59. package/dist/{chunk-DPUYDDQG.js → chunk-BA2HUMDN.js} +25 -3
  60. package/dist/chunk-BA3U7ALS.js +99 -0
  61. package/dist/{chunk-HVUPKCGJ.js → chunk-BC6KKZ67.js} +5 -5
  62. package/dist/{chunk-CKSITVS4.js → chunk-BEPCKDCP.js} +2554 -722
  63. package/dist/{chunk-3ALD2W2A.js → chunk-BPPU3PW7.js} +4 -4
  64. package/dist/{chunk-QRAOANID.js → chunk-BVWWPBKD.js} +21 -21
  65. package/dist/{chunk-ZDPAS56H.js → chunk-BXBCMGIQ.js} +7 -1
  66. package/dist/chunk-BXZ4PKIT.js +233 -0
  67. package/dist/chunk-C7CEK3KW.js +247 -0
  68. package/dist/chunk-CFH3QH26.js +29 -0
  69. package/dist/chunk-CG6CULP6.js +170 -0
  70. package/dist/chunk-CLD4RVTA.js +45 -0
  71. package/dist/{chunk-DKJA76CJ.js → chunk-CNPY4NTZ.js} +13 -13
  72. package/dist/chunk-CNU5Q2D5.js +575 -0
  73. package/dist/{chunk-T2UYZSCQ.js → chunk-COYN3UAN.js} +126 -23
  74. package/dist/{chunk-23W7VWKR.js → chunk-CPK7QSBG.js} +1360 -113
  75. package/dist/{chunk-4AK7IBVP.js → chunk-D2WSW4GU.js} +1 -1
  76. package/dist/{chunk-ABWHYWNI.js → chunk-D57MFJPP.js} +3 -3
  77. package/dist/chunk-D5KV5PSK.js +45 -0
  78. package/dist/chunk-D5MASS4I.js +48 -0
  79. package/dist/{chunk-7EOBHUMC.js → chunk-DCWN3HFV.js} +2 -2
  80. package/dist/{chunk-QSXK2RGH.js → chunk-DDJPM5YX.js} +2 -2
  81. package/dist/chunk-DN4A2Q2O.js +57 -0
  82. package/dist/{chunk-IHMLFRVV.js → chunk-DUPZPDCJ.js} +58 -16
  83. package/dist/{chunk-PRPPGYZG.js → chunk-E2VXBSIR.js} +4 -4
  84. package/dist/chunk-E57AOFYN.js +32 -0
  85. package/dist/{chunk-UGLN7QHV.js → chunk-ECLXZWAG.js} +12 -12
  86. package/dist/{chunk-5WG5YP4T.js → chunk-EDZ45WIR.js} +14 -14
  87. package/dist/chunk-EFCQSMXB.js +37 -0
  88. package/dist/{chunk-2ANOROX3.js → chunk-EZIN5E5B.js} +8 -8
  89. package/dist/{chunk-BWZ77RQT.js → chunk-F6H2RJ3N.js} +1 -1
  90. package/dist/{chunk-OLQJTJJU.js → chunk-FAJDKNSD.js} +7 -3
  91. package/dist/chunk-FGAGWYZB.js +47 -0
  92. package/dist/{chunk-4WBVUHXN.js → chunk-FLVZFTLQ.js} +18 -18
  93. package/dist/chunk-FQ6WH6PB.js +140 -0
  94. package/dist/{chunk-T6XQL73F.js → chunk-FRHD22WM.js} +61 -23
  95. package/dist/{chunk-XAKWMCXI.js → chunk-FVMPFCDS.js} +4 -4
  96. package/dist/{chunk-B2WLAWNJ.js → chunk-FY3QIRTL.js} +3 -3
  97. package/dist/{chunk-CPA6HPVR.js → chunk-FYBF5MB2.js} +15 -11
  98. package/dist/{chunk-V2YTAIQO.js → chunk-G5YJBNDZ.js} +21 -6
  99. package/dist/chunk-G6IQYM25.js +339 -0
  100. package/dist/chunk-G6X4YL4D.js +161 -0
  101. package/dist/{chunk-SJRGMG6A.js → chunk-GC2VK3JT.js} +25 -25
  102. package/dist/{chunk-SP2I63OO.js → chunk-GCS3FZOB.js} +77 -3
  103. package/dist/{chunk-6TACQN3N.js → chunk-GDZB57IU.js} +5 -5
  104. package/dist/chunk-GIFMBCTW.js +221 -0
  105. package/dist/{chunk-YY6ZQQBP.js → chunk-GK4PYVEC.js} +18 -8
  106. package/dist/{chunk-TDD55CJH.js → chunk-GNWAOVFQ.js} +6 -5
  107. package/dist/chunk-GS76RXQE.js +226 -0
  108. package/dist/{chunk-YYQN46FY.js → chunk-GSGIZ2OO.js} +23 -23
  109. package/dist/chunk-GUYL7RMK.js +60 -0
  110. package/dist/chunk-GX74YWR7.js +321 -0
  111. package/dist/chunk-HE3HRDNZ.js +122 -0
  112. package/dist/{chunk-AIOQPLA5.js → chunk-HGHRSF3E.js} +30 -12
  113. package/dist/{chunk-2RMYG36Q.js → chunk-HK3VOHIE.js} +198 -336
  114. package/dist/{chunk-QZSX3F7C.js → chunk-HS4BGB4G.js} +24 -22
  115. package/dist/{chunk-XY3P7JW7.js → chunk-HSZMPH5T.js} +834 -149
  116. package/dist/{chunk-L6SGQIR3.js → chunk-HWD4JPU7.js} +4 -2
  117. package/dist/{chunk-PCVDV3UZ.js → chunk-HXXP2NTE.js} +6 -6
  118. package/dist/{chunk-AA6YULYB.js → chunk-I2A3Z5AK.js} +7 -7
  119. package/dist/{chunk-N7IXEHK3.js → chunk-ICHDSWEY.js} +7 -7
  120. package/dist/chunk-IFFRGC3N.js +31 -0
  121. package/dist/{chunk-4BN53TG3.js → chunk-IFHDV6KQ.js} +31 -23
  122. package/dist/chunk-J2O4LFVI.js +80 -0
  123. package/dist/chunk-J5AAZ6OJ.js +161 -0
  124. package/dist/{chunk-ZMFPW66A.js → chunk-JAABT3DA.js} +3 -3
  125. package/dist/chunk-JITJP64K.js +34 -0
  126. package/dist/chunk-JKIGL3XQ.js +162 -0
  127. package/dist/chunk-JRVNXLZP.js +615 -0
  128. package/dist/chunk-JRXHON4E.js +41 -0
  129. package/dist/{chunk-DHPACDG7.js → chunk-JS6WMC3J.js} +8 -8
  130. package/dist/chunk-JU4QNJSR.js +62 -0
  131. package/dist/{chunk-PAMPPUR6.js → chunk-JYMIB5XY.js} +1697 -172
  132. package/dist/{chunk-RRTKKSLQ.js → chunk-JYTIHTIK.js} +8 -6
  133. package/dist/{chunk-3HI6Z55Y.js → chunk-K332XW7K.js} +324 -39
  134. package/dist/{chunk-GLUX4EEP.js → chunk-K6JB6XTX.js} +9 -9
  135. package/dist/chunk-KDAHXQIE.js +294 -0
  136. package/dist/chunk-KYZMRSPS.js +93 -0
  137. package/dist/chunk-L4CESDPB.js +22 -0
  138. package/dist/{chunk-NXFPS2LR.js → chunk-LEBR5NHW.js} +14 -14
  139. package/dist/chunk-LIJJCBQI.js +223 -0
  140. package/dist/{chunk-DE76JROX.js → chunk-LIRVU3HW.js} +16 -16
  141. package/dist/{chunk-JMSCMUCA.js → chunk-LN77DXBM.js} +145 -21
  142. package/dist/{chunk-JIITQXFB.js → chunk-LNWEWYCM.js} +2969 -788
  143. package/dist/{chunk-TANFV3MZ.js → chunk-LO3BLMVG.js} +3 -3
  144. package/dist/chunk-LPV6T362.js +250 -0
  145. package/dist/{chunk-2VHF7OXM.js → chunk-LQH4P45K.js} +1 -1
  146. package/dist/chunk-LU4MQVAL.js +41 -0
  147. package/dist/chunk-LWDNKE4X.js +273 -0
  148. package/dist/chunk-M4H2UG4R.js +218 -0
  149. package/dist/{chunk-6BVONWJ7.js → chunk-M6D2U3YM.js} +3 -3
  150. package/dist/chunk-MD7KUEJ3.js +514 -0
  151. package/dist/{chunk-66YVAGGM.js → chunk-MMZUN7ZO.js} +20 -20
  152. package/dist/chunk-MZGRDONP.js +916 -0
  153. package/dist/chunk-N3RUGTGV.js +39 -0
  154. package/dist/{chunk-JGZCG5VM.js → chunk-NCB6656Z.js} +7 -7
  155. package/dist/{chunk-4NDAAFQT.js → chunk-NRQ65LTQ.js} +7 -5
  156. package/dist/{chunk-UNM6ZOKP.js → chunk-NTAVOWYD.js} +145 -18
  157. package/dist/{chunk-3USYZGRF.js → chunk-NYOABJNK.js} +36 -27
  158. package/dist/{chunk-WVPJSRRJ.js → chunk-O4IKAIZ2.js} +24 -20
  159. package/dist/{chunk-D3PO4DOZ.js → chunk-ODMBPDDV.js} +51 -14
  160. package/dist/chunk-OKUB6RJA.js +533 -0
  161. package/dist/chunk-OMPENNWY.js +39 -0
  162. package/dist/chunk-OPQZISG3.js +25 -0
  163. package/dist/{chunk-5GGOLAKC.js → chunk-OV57AHCG.js} +26 -26
  164. package/dist/chunk-OZJ3JLYI.js +58 -0
  165. package/dist/{chunk-KEM4SDDP.js → chunk-P2VBXX7N.js} +11 -10
  166. package/dist/{chunk-S2A7YC3Q.js → chunk-PAINMSID.js} +10150 -1720
  167. package/dist/chunk-PKJAV25S.js +43 -0
  168. package/dist/{chunk-EBEW3XXQ.js → chunk-PNQLCRSS.js} +4 -4
  169. package/dist/{chunk-WY6PP6AA.js → chunk-PQH56YF6.js} +37 -5
  170. package/dist/chunk-PRTBPXYA.js +50 -0
  171. package/dist/{chunk-YEDDOYSC.js → chunk-PRW3HXM3.js} +2 -2
  172. package/dist/chunk-PRZ7KMWL.js +42 -0
  173. package/dist/{chunk-6M5NK3K3.js → chunk-PTQ3ZALZ.js} +42 -4
  174. package/dist/{chunk-5GDRCDQB.js → chunk-PUEWDYGP.js} +2 -2
  175. package/dist/chunk-Q26LDIUV.js +236 -0
  176. package/dist/{chunk-CR3MTH32.js → chunk-Q46QDDMF.js} +77 -7
  177. package/dist/chunk-QBNWF5ZU.js +19 -0
  178. package/dist/chunk-QE527XRY.js +342 -0
  179. package/dist/{chunk-CNUKCS2T.js → chunk-QHJJMZLX.js} +1518 -54
  180. package/dist/chunk-QJCJOMW3.js +425 -0
  181. package/dist/{chunk-VYDBJ73M.js → chunk-QKMRFNMA.js} +15 -15
  182. package/dist/chunk-QOOEYDNJ.js +317 -0
  183. package/dist/chunk-QSIDVFB7.js +45 -0
  184. package/dist/{chunk-R77KLRB3.js → chunk-RA33EYS4.js} +19 -18
  185. package/dist/{chunk-DFBCSHVT.js → chunk-RALY3E5U.js} +4 -4
  186. package/dist/{chunk-ZCJDOK2S.js → chunk-S2RY3BOD.js} +35 -21
  187. package/dist/chunk-S5LSDXV4.js +40 -0
  188. package/dist/chunk-SB5GRUFM.js +54 -0
  189. package/dist/chunk-SH27FYPF.js +150 -0
  190. package/dist/chunk-T74WQQGS.js +40 -0
  191. package/dist/{chunk-O3WI5KWW.js → chunk-TGVVUKTG.js} +2 -2
  192. package/dist/chunk-THN26IEF.js +48 -0
  193. package/dist/chunk-TJH2EUAZ.js +47 -0
  194. package/dist/{chunk-ZNCEKR4J.js → chunk-TQ4TG57V.js} +12 -8
  195. package/dist/{chunk-7FBGJFEE.js → chunk-TQTRWENN.js} +12 -12
  196. package/dist/{chunk-TYAID7B7.js → chunk-TSM6T6GQ.js} +23 -23
  197. package/dist/{chunk-DPZHZQKE.js → chunk-TW3KOSQK.js} +43 -10
  198. package/dist/{chunk-MC3H7736.js → chunk-TWQRPM76.js} +37 -4
  199. package/dist/chunk-TYD6I4CZ.js +109 -0
  200. package/dist/chunk-U3NBK4EU.js +420 -0
  201. package/dist/{chunk-6JCPI55B.js → chunk-UDXWIPCB.js} +47 -7
  202. package/dist/{chunk-MMOSZPWJ.js → chunk-UEVZZZU2.js} +4 -4
  203. package/dist/{chunk-JBTK5OP2.js → chunk-UF4UHCIG.js} +2 -2
  204. package/dist/{chunk-6JUBZBMW.js → chunk-UFE36WJH.js} +4 -4
  205. package/dist/{chunk-ONLS5QA5.js → chunk-URIKUID7.js} +12 -12
  206. package/dist/chunk-UYLBRRFK.js +1106 -0
  207. package/dist/chunk-UZACEG2C.js +515 -0
  208. package/dist/{chunk-7SW2QWLU.js → chunk-VAMHOHUU.js} +12 -12
  209. package/dist/{chunk-RZPYKDWS.js → chunk-VUVGX5L2.js} +1 -1
  210. package/dist/{chunk-Q4D5X7QB.js → chunk-VYOCPTUB.js} +44 -24
  211. package/dist/{chunk-CAQZUNOH.js → chunk-WAZEXEJH.js} +567 -3
  212. package/dist/chunk-WCEF7H6L.js +221 -0
  213. package/dist/{chunk-2DIQQJCB.js → chunk-WEOMJHPV.js} +12 -12
  214. package/dist/{chunk-FHH4I4ZV.js → chunk-WFU77T3A.js} +12 -6
  215. package/dist/chunk-WIWTJMMR.js +292 -0
  216. package/dist/{chunk-2BFCZ3RK.js → chunk-WNTIOBOG.js} +18 -18
  217. package/dist/{chunk-7WD63HU2.js → chunk-X2CUXTWU.js} +6 -6
  218. package/dist/chunk-X7EMBM5X.js +34 -0
  219. package/dist/chunk-XEQCQO66.js +33 -0
  220. package/dist/{chunk-F7HYOUFF.js → chunk-XG4WJHLQ.js} +20 -4
  221. package/dist/{chunk-EFHQ3TWP.js → chunk-XOL3GFW2.js} +171 -31
  222. package/dist/{chunk-NE2W3OO7.js → chunk-XQ3YZ4QW.js} +22 -22
  223. package/dist/{chunk-CEXSU4S6.js → chunk-Y6K3CJBU.js} +723 -85
  224. package/dist/{chunk-4RS5KZQD.js → chunk-YAH5IQAL.js} +5 -5
  225. package/dist/{chunk-64EQYWCA.js → chunk-YBOVNMHC.js} +51 -14
  226. package/dist/chunk-YF5DZCPN.js +1212 -0
  227. package/dist/chunk-YIGBJNH4.js +37 -0
  228. package/dist/{chunk-BKVWTZ6A.js → chunk-YJ3TBOTK.js} +25 -25
  229. package/dist/{chunk-Q5AMFEWD.js → chunk-YKTE2RU3.js} +2 -2
  230. package/dist/{chunk-7EKXJZ2Y.js → chunk-YO2PKTXT.js} +296 -37
  231. package/dist/{chunk-6J5OKA4Y.js → chunk-YTTNTQOX.js} +15 -15
  232. package/dist/{chunk-OT2O76OS.js → chunk-YWAKDNMH.js} +183 -33
  233. package/dist/{chunk-R6XF6UR3.js → chunk-YZDZOEV4.js} +4 -4
  234. package/dist/chunk-Z3QFH7YG.js +17 -0
  235. package/dist/{chunk-W5BVQF44.js → chunk-Z6VLC5X4.js} +17 -17
  236. package/dist/{chunk-HLJAXMM4.js → chunk-ZFQMMU5Y.js} +2 -2
  237. package/dist/{chunk-W3BQAZ3Q.js → chunk-ZKYRDV7A.js} +12 -12
  238. package/dist/{chunk-ZMAINWBW.js → chunk-ZLS6PU2O.js} +3 -3
  239. package/dist/{chunk-ZVM6AKKM.js → chunk-ZOSD4FXV.js} +3 -3
  240. package/dist/chunk-ZPDDEVQX.js +47 -0
  241. package/dist/{chunk-TXLH6WHQ.js → chunk-ZQLRCA2V.js} +11 -11
  242. package/dist/{chunk-HITVBIJS.js → chunk-ZX7235KR.js} +128 -54
  243. package/dist/{chunk-GT4I4ZWM.js → chunk-ZZFHLRQW.js} +18 -16
  244. package/dist/files.json +636 -364
  245. package/dist/packages/naysayer/constitution/constitution.yaml +19 -0
  246. package/dist/packages/sdk/npm/index.js +5614 -2343
  247. package/dist/packages/ui/dist/assets/{elk-api-tma0MCuh.js → elk-api-CowTnhEJ.js} +2 -2
  248. package/dist/packages/ui/dist/assets/index-Dw20IRhQ.css +1 -0
  249. package/dist/packages/ui/dist/assets/index-z2wv0d5d.js +47 -0
  250. package/dist/packages/ui/dist/index.html +2 -2
  251. package/package.json +4 -4
  252. package/dist/chunk-2BF2EYJV.js +0 -174
  253. package/dist/chunk-42EVSKME.js +0 -37
  254. package/dist/chunk-4BKGMUIK.js +0 -53
  255. package/dist/chunk-5KLGBXG5.js +0 -48
  256. package/dist/chunk-6BNC6EQ4.js +0 -41
  257. package/dist/chunk-6D2CQ5II.js +0 -41
  258. package/dist/chunk-7AVHLZGD.js +0 -45
  259. package/dist/chunk-D46WUV3T.js +0 -33
  260. package/dist/chunk-E36QOJMD.js +0 -47
  261. package/dist/chunk-FQXYPF7E.js +0 -147
  262. package/dist/chunk-GBRFVT63.js +0 -45
  263. package/dist/chunk-ICY36XCH.js +0 -34
  264. package/dist/chunk-J4K3KVLD.js +0 -131
  265. package/dist/chunk-JZU3H6UQ.js +0 -54
  266. package/dist/chunk-NN2ZQEB4.js +0 -38
  267. package/dist/chunk-PCOCACY3.js +0 -385
  268. package/dist/chunk-RTEYOSJY.js +0 -29
  269. package/dist/chunk-RVH5SUW5.js +0 -69
  270. package/dist/chunk-VN3DP4LQ.js +0 -43
  271. package/dist/chunk-XPTOBS2D.js +0 -48
  272. package/dist/packages/ui/dist/assets/index-B54fm9FQ.js +0 -29
  273. package/dist/packages/ui/dist/assets/index-DD_hufQz.css +0 -1
@@ -5,7 +5,7 @@ var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
5
5
  var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
6
  import {
7
7
  quantize
8
- } from "./chunk-CNUKCS2T.js";
8
+ } from "./chunk-QHJJMZLX.js";
9
9
  import {
10
10
  Runtime,
11
11
  external_exports,
@@ -13,8 +13,8 @@ import {
13
13
  readTarGz,
14
14
  require_dist,
15
15
  retrievalOf
16
- } from "./chunk-S2A7YC3Q.js";
17
- import "./chunk-D3PO4DOZ.js";
16
+ } from "./chunk-PAINMSID.js";
17
+ import "./chunk-ODMBPDDV.js";
18
18
  import {
19
19
  __toESM
20
20
  } from "./chunk-TV45EUGM.js";
@@ -0,0 +1,250 @@
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
+ aggregateTraffic,
8
+ readContractFiles
9
+ } from "./chunk-CPK7QSBG.js";
10
+ import {
11
+ TRAFFIC_SOURCES
12
+ } from "./chunk-YO2PKTXT.js";
13
+ import {
14
+ ContractsFile,
15
+ evidenceDirOf,
16
+ evidenceRelOf,
17
+ factsDirOf,
18
+ factsRelOf,
19
+ loadOrgPack,
20
+ orgPackDirOf,
21
+ readTrafficFile,
22
+ require_dist,
23
+ trafficFileName
24
+ } from "./chunk-PAINMSID.js";
25
+ import {
26
+ writeFileAtomic
27
+ } from "./chunk-ODMBPDDV.js";
28
+ import {
29
+ __toESM
30
+ } from "./chunk-TV45EUGM.js";
31
+
32
+ // packages/cli/dist/link-evidence-files.js
33
+ var import_yaml = __toESM(require_dist(), 1);
34
+ import { createHash } from "node:crypto";
35
+ import { existsSync } from "node:fs";
36
+ import { readdir, readFile, rm } from "node:fs/promises";
37
+ import { basename, join, resolve } from "node:path";
38
+ var SHOWN = 5;
39
+ async function repoContractsOf(root, repo, dir, facts, onRefused) {
40
+ const commit = facts.map((f) => f.commit).sort()[0];
41
+ const own = facts.flatMap((f) => f.kind === "entry" && f.entryType === "rest" ? [{ ...f.method ? { method: f.method } : {}, path: f.path }] : []);
42
+ const deny = await denyHashesAt(root);
43
+ return readContractFiles(dir, {
44
+ repo,
45
+ ...commit ? { commit } : {},
46
+ own,
47
+ ...deny.size ? { denyHashes: deny } : {},
48
+ ...onRefused ? { onRefused } : {}
49
+ });
50
+ }
51
+ async function writeRepoContracts(root, repo, dir, facts, onRefused) {
52
+ const file = await repoContractsOf(root, repo, dir, facts, onRefused);
53
+ const path = join(factsDirOf(root), `${repo}.contracts.yaml`);
54
+ if (file.entries.length)
55
+ await writeFileAtomic(path, (0, import_yaml.stringify)(file, { lineWidth: 0 }));
56
+ else
57
+ await rm(path, { force: true });
58
+ return file;
59
+ }
60
+ async function loadLinkEvidence(root) {
61
+ const problems = [];
62
+ const contracts = [];
63
+ const fRel = factsRelOf(root);
64
+ for (const n of (await readdir(factsDirOf(root)).catch(() => [])).sort()) {
65
+ if (!n.endsWith(".contracts.yaml"))
66
+ continue;
67
+ let v;
68
+ try {
69
+ v = (0, import_yaml.parse)(await readFile(join(factsDirOf(root), n), "utf8"));
70
+ } catch (e) {
71
+ problems.push(`${fRel}/${n} isn't YAML (${e.message}); it is left out.`);
72
+ continue;
73
+ }
74
+ const p = ContractsFile.safeParse(v);
75
+ if (p.success)
76
+ contracts.push(p.data);
77
+ else
78
+ problems.push(`${fRel}/${n} isn't a contracts file; it is left out.`);
79
+ }
80
+ const traffic = [];
81
+ const tDir = join(evidenceDirOf(root), "traffic");
82
+ const tRel = `${evidenceRelOf(root)}/traffic`;
83
+ for (const n of (await readdir(tDir).catch(() => [])).sort()) {
84
+ if (!/\.ya?ml$/.test(n))
85
+ continue;
86
+ const r = readTrafficFile(`${tRel}/${n}`, await readFile(join(tDir, n), "utf8"));
87
+ if (r.ok)
88
+ traffic.push(r.traffic);
89
+ else
90
+ problems.push(`${r.message}; it is left out.`);
91
+ }
92
+ return { contracts, traffic, problems };
93
+ }
94
+ function componentsOf(repo, join2) {
95
+ const out = /* @__PURE__ */ new Set([repo]);
96
+ for (const j of join2?.joins ?? []) {
97
+ if (j.call.repo === repo)
98
+ out.add(j.call.component);
99
+ if (j.entry.repo === repo)
100
+ out.add(j.entry.component);
101
+ }
102
+ return out;
103
+ }
104
+ function linkEvidenceAbout(repo, le, join2) {
105
+ const comps = componentsOf(repo, join2);
106
+ const touches = (l) => !!l && (comps.has(l.from) || comps.has(l.to));
107
+ return {
108
+ contracts: {
109
+ confirmed: le.contracts.confirmed.filter(touches),
110
+ findings: le.contracts.findings.filter((f) => f.repo === repo || f.links.some(touches))
111
+ },
112
+ traffic: {
113
+ seen: le.traffic.seen.filter(touches),
114
+ findings: le.traffic.findings.filter((f) => f.component && comps.has(f.component) || touches(f.link)),
115
+ // An app named like no component is the estate's, not one repo's: listed in every report.
116
+ unknownApps: le.traffic.findings.filter((f) => f.reason === "unknown-app")
117
+ }
118
+ };
119
+ }
120
+ function linkEvidenceLines(about, report, o = {}) {
121
+ const out = [];
122
+ const show = (lines) => {
123
+ const shown = o.verbose ? lines : lines.slice(0, SHOWN);
124
+ out.push(...shown.map((l) => ` ${l}`));
125
+ if (shown.length < lines.length)
126
+ out.push(` ... and ${lines.length - shown.length} more (in ${report})`);
127
+ };
128
+ const c = about.contracts;
129
+ if (c.confirmed.length || c.findings.length) {
130
+ out.push(` Contracts: ${c.confirmed.length} link${c.confirmed.length === 1 ? "" : "s"} confirmed by a consumer's contract file, ${c.findings.length} request${c.findings.length === 1 ? "" : "s"} the join doesn't bear out (under contracts in ${report}):`);
131
+ show(c.findings.map((f) => `${f.reason}: ${f.message}`));
132
+ }
133
+ const t = about.traffic;
134
+ const apps = t.unknownApps.length;
135
+ if (t.seen.length || t.findings.length || apps) {
136
+ out.push(` Traffic: ${t.seen.length} link${t.seen.length === 1 ? "" : "s"} seen in imported traffic, ${t.findings.length} finding${t.findings.length === 1 ? "" : "s"}${apps ? `; ${apps} app${apps === 1 ? "" : "s"} in the estate's traffic named like no component (name each in its row)` : ""} (under traffic in ${report}):`);
137
+ show(t.findings.map((f) => `${f.reason}: ${f.message}`));
138
+ }
139
+ return out;
140
+ }
141
+ async function intakeTraffic(root, file, o, io) {
142
+ const sources = Object.keys(TRAFFIC_SOURCES).sort();
143
+ if (!file) {
144
+ io.err(`intake traffic needs an export file: atticus intake traffic <file> --source ${sources.join("|")} [--from YYYY-MM-DD --to YYYY-MM-DD]`);
145
+ return 2;
146
+ }
147
+ const columns = o.source ? TRAFFIC_SOURCES[o.source] : void 0;
148
+ if (!columns) {
149
+ io.err(`${o.source ? `${o.source} is no source Atticus reads` : "Say which source the export is from"}: --source ${sources.join("|")}.`);
150
+ return 2;
151
+ }
152
+ const path = resolve(file);
153
+ if (!existsSync(path)) {
154
+ io.err(`No file at ${file}.`);
155
+ return 2;
156
+ }
157
+ const bytes = new Uint8Array(await readFile(path));
158
+ const { templates, apps } = await estateNames(root);
159
+ const deny = await denyHashesAt(root);
160
+ const r = aggregateTraffic({
161
+ bytes,
162
+ source: o.source,
163
+ columns,
164
+ templates,
165
+ apps,
166
+ ...o.from ? { from: o.from } : {},
167
+ ...o.to ? { to: o.to } : {},
168
+ ...deny.size ? { denyHashes: deny } : {}
169
+ });
170
+ if (!r.ok) {
171
+ io.err(`${basename(path)}: ${r.message}`);
172
+ return 1;
173
+ }
174
+ const rel = `${evidenceRelOf(root)}/traffic/${trafficFileName(r.file)}`;
175
+ await writeFileAtomic(join(evidenceDirOf(root), "traffic", trafficFileName(r.file)), r.text);
176
+ if (o.json) {
177
+ io.out(JSON.stringify({
178
+ written: rel,
179
+ rows: r.file.rows.length,
180
+ read: r.read,
181
+ outOfRange: r.outOfRange,
182
+ skipped: r.skipped,
183
+ dropped: r.dropped,
184
+ from: r.file.from,
185
+ to: r.file.to,
186
+ inputSha256: r.file.inputSha256
187
+ }, null, 2));
188
+ return 0;
189
+ }
190
+ io.out(`Wrote ${rel}: ${r.file.rows.length} aggregate${r.file.rows.length === 1 ? "" : "s"} (caller app, method, path template, proxy and base path) from ${r.read} rows, ${r.file.from} to ${r.file.to}${r.outOfRange ? `; ${r.outOfRange} outside the range` : ""}${r.skipped ? `; ${r.skipped} without a method, path or count` : ""}${r.unmatched ? `; ${r.unmatched} to a path no route template of the estate matches, dropped` : ""}.`);
191
+ if (r.dropped.length)
192
+ io.out(` Dropped before anything was written: the columns ${r.dropped.join(", ")}, every query string and matrix param, any proxy that looked like an IP, an email or a token, and every path but as a route template of the estate. No raw row is kept.`);
193
+ io.out(` Review it in a pull request (an app named like no component is written as an app-<hash> label: give its row a component: line), then atticus verify <repo> --write marks the links it shows used, and lists the traffic no link carries and the links none used.`);
194
+ return 0;
195
+ }
196
+ async function estateNames(root) {
197
+ const { estateFacts, estateRepos } = await import("./chunk-BXZ4PKIT.js");
198
+ const apps = /* @__PURE__ */ new Set();
199
+ const tDir = join(evidenceDirOf(root), "traffic");
200
+ for (const n of (await readdir(tDir).catch(() => [])).sort()) {
201
+ if (!/\.ya?ml$/.test(n))
202
+ continue;
203
+ const r = readTrafficFile(n, await readFile(join(tDir, n), "utf8"));
204
+ if (r.ok) {
205
+ for (const row of r.traffic.file.rows)
206
+ if (row.component)
207
+ apps.add(row.app).add(row.component);
208
+ }
209
+ }
210
+ const op = await loadOrgPack(orgPackDirOf(root)).catch(() => void 0);
211
+ if (!op)
212
+ return { templates: [], apps: [...apps].sort() };
213
+ for (const m of estateRepos(op)) {
214
+ apps.add(m.id);
215
+ if (m.component)
216
+ apps.add(m.component);
217
+ for (const x of m.modules ?? [])
218
+ apps.add(x.component);
219
+ }
220
+ const { repos } = await estateFacts(root, op, "");
221
+ const out = /* @__PURE__ */ new Set();
222
+ for (const r of repos) {
223
+ apps.add(r.repo);
224
+ for (const f of r.facts) {
225
+ if (f.component)
226
+ apps.add(f.component);
227
+ if (f.kind === "entry" && f.entryType === "rest" || f.kind === "call" && f.callType === "rest") {
228
+ if (f.path?.startsWith("/"))
229
+ out.add(f.path);
230
+ }
231
+ }
232
+ }
233
+ return { templates: [...out].sort(), apps: [...apps].sort() };
234
+ }
235
+ async function denyHashesAt(root) {
236
+ const text = await readFile(join(root, ".denylist"), "utf8").catch(() => "");
237
+ return new Set(text.split(/\r?\n/).map((l) => l.trim()).filter((l) => /^[0-9a-f]{64}$/.test(l)));
238
+ }
239
+ var denyHash = (s) => createHash("sha256").update(s.trim().toLowerCase(), "utf8").digest("hex");
240
+
241
+ export {
242
+ repoContractsOf,
243
+ writeRepoContracts,
244
+ loadLinkEvidence,
245
+ linkEvidenceAbout,
246
+ linkEvidenceLines,
247
+ intakeTraffic,
248
+ denyHashesAt,
249
+ denyHash
250
+ };
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-VOGCSYOI.js";
9
9
  import {
10
10
  openspecStores
11
- } from "./chunk-XY3P7JW7.js";
11
+ } from "./chunk-HSZMPH5T.js";
12
12
 
13
13
  // packages/cli/dist/openspec-stores-commands.js
14
14
  var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
@@ -0,0 +1,41 @@
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
+ DecideError,
8
+ aiAuditCandidates,
9
+ correctDecision,
10
+ decideAnswers,
11
+ decideIn,
12
+ decideLinks,
13
+ decideState,
14
+ decisionsView,
15
+ inAcpSession,
16
+ proposalsSnapshot,
17
+ undoBatch
18
+ } from "./chunk-UYLBRRFK.js";
19
+ import "./chunk-THN26IEF.js";
20
+ import "./chunk-Q46QDDMF.js";
21
+ import "./chunk-TGVVUKTG.js";
22
+ import "./chunk-JYMIB5XY.js";
23
+ import "./chunk-TWQRPM76.js";
24
+ import "./chunk-XOL3GFW2.js";
25
+ import "./chunk-7AB6OWTV.js";
26
+ import "./chunk-PAINMSID.js";
27
+ import "./chunk-ODMBPDDV.js";
28
+ import "./chunk-TV45EUGM.js";
29
+ export {
30
+ DecideError,
31
+ aiAuditCandidates,
32
+ correctDecision,
33
+ decideAnswers,
34
+ decideIn,
35
+ decideLinks,
36
+ decideState,
37
+ decisionsView,
38
+ inAcpSession,
39
+ proposalsSnapshot,
40
+ undoBatch
41
+ };
@@ -0,0 +1,273 @@
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
+ rulesLackingAll
8
+ } from "./chunk-GIFMBCTW.js";
9
+ import {
10
+ loadReadPlan
11
+ } from "./chunk-MD7KUEJ3.js";
12
+ import {
13
+ carryOf,
14
+ checkoutOf,
15
+ excludesOf
16
+ } from "./chunk-Q46QDDMF.js";
17
+ import {
18
+ isMetarepo,
19
+ notMetarepo
20
+ } from "./chunk-3G4YI4ZU.js";
21
+ import {
22
+ dirSource,
23
+ rereadPlan,
24
+ sameCommit
25
+ } from "./chunk-JYMIB5XY.js";
26
+ import {
27
+ loadRepos
28
+ } from "./chunk-XOL3GFW2.js";
29
+ import {
30
+ citedFiles,
31
+ factsDirOf,
32
+ factsFileOf,
33
+ factsRelOf,
34
+ headFromFiles,
35
+ parseFacts
36
+ } from "./chunk-PAINMSID.js";
37
+
38
+ // packages/cli/dist/estate-fresh.js
39
+ import { readdir, readFile } from "node:fs/promises";
40
+ import { join } from "node:path";
41
+ var FRESH_STATES = [
42
+ /** Facts cite files that changed, or source files changed: read again. */
43
+ "stale",
44
+ /** The clone doesn't have the commit the facts were read at: they can't be compared. */
45
+ "unknown-commit",
46
+ /** The clone moved, but nothing the facts cite changed and no source file did: carry them. */
47
+ "moved",
48
+ /**
49
+ * ADR 0167: the facts are of the clone's commit, but the read lacked rule sets added since
50
+ * (or recorded none, before 2.0.0-beta.12): a top-up reads the files those sets apply to.
51
+ */
52
+ "rules-changed",
53
+ /** No clone to compare with. */
54
+ "no-checkout",
55
+ /** The facts are of the commit the clone is at. */
56
+ "fresh",
57
+ /** No facts yet: the repo isn't read. */
58
+ "not-read"
59
+ ];
60
+ var RANK = Object.fromEntries(FRESH_STATES.map((s, i) => [s, i]));
61
+ function freshOrder(a, b) {
62
+ return RANK[a.state] - RANK[b.state] || b.reread - a.reread || b.citedChanged - a.citedChanged || b.toRead - a.toRead || b.changed - a.changed || (a.repo < b.repo ? -1 : a.repo > b.repo ? 1 : 0);
63
+ }
64
+ async function pool(xs, n, f) {
65
+ const out = new Array(xs.length);
66
+ let next = 0;
67
+ const worker = async () => {
68
+ for (let i = next++; i < xs.length; i = next++)
69
+ out[i] = await f(xs[i]);
70
+ };
71
+ await Promise.all(Array.from({ length: Math.min(n, xs.length) }, worker));
72
+ return out;
73
+ }
74
+ var firstLine = (e) => String(e?.message ?? e).split("\n")[0];
75
+ async function freshOf(root, repo, o, problems) {
76
+ const factsFile = `${factsRelOf(root)}/${repo}.jsonl`;
77
+ const base = {
78
+ repo,
79
+ factsFile,
80
+ facts: 0,
81
+ factsCommits: [],
82
+ current: 0,
83
+ carried: 0,
84
+ reread: 0,
85
+ citedChanged: 0,
86
+ changed: 0,
87
+ toRead: 0,
88
+ unknown: []
89
+ };
90
+ const read = { command: `atticus map ${repo}`, slash: `/atticus-map ${repo}` };
91
+ const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => void 0);
92
+ if (text === void 0 || !text.trim())
93
+ return { ...base, state: "not-read", ...read };
94
+ const parsed = parseFacts(text);
95
+ if (!parsed.ok) {
96
+ problems.push({
97
+ file: factsFile,
98
+ message: `doesn't read as facts: ${parsed.issues[0]?.message ?? "invalid"}`
99
+ });
100
+ return { ...base, state: "not-read", ...read };
101
+ }
102
+ const facts = parsed.facts;
103
+ const commits = [...new Set(facts.map((f) => f.commit))].sort();
104
+ const counted = { ...base, facts: facts.length, factsCommits: commits };
105
+ const dir = await checkoutOf(root, repo).catch(() => void 0);
106
+ const head = dir ? await headFromFiles(dir) : void 0;
107
+ if (!dir || !head)
108
+ return { ...counted, state: "no-checkout", command: "atticus workspace sync" };
109
+ const at = { ...counted, head };
110
+ if (facts.every((f) => sameCommit(f.commit, head))) {
111
+ const lacking = await rulesLackingAll(root, repo, (await loadReadPlan(root, repo).catch(() => void 0))?.rules, { dir });
112
+ return lacking.length ? {
113
+ ...at,
114
+ state: "rules-changed",
115
+ current: facts.length,
116
+ rulesLacking: lacking,
117
+ command: `atticus map ${repo} --rules`,
118
+ slash: `/atticus-map ${repo} --rules`
119
+ } : { ...at, state: "fresh", current: facts.length };
120
+ }
121
+ let carry;
122
+ try {
123
+ carry = await carryOf(dir, facts, head, o.git);
124
+ } catch (e) {
125
+ problems.push({
126
+ file: factsFile,
127
+ message: `git couldn't compare the commits: ${firstLine(e)}`
128
+ });
129
+ return { ...at, state: "unknown-commit", unknown: commits, reread: facts.length, ...read };
130
+ }
131
+ const plan = rereadPlan({
132
+ facts,
133
+ commit: head,
134
+ carry: carry.carry,
135
+ source: dirSource(dir),
136
+ exclude: await excludesOf(root, repo)
137
+ });
138
+ const unknown = [.../* @__PURE__ */ new Set([...plan.unknown, ...carry.missing])].sort();
139
+ const lost = facts.filter((f) => unknown.some((c) => sameCommit(c, f.commit))).length;
140
+ const changedPaths = /* @__PURE__ */ new Set();
141
+ for (const cs of Object.values(carry.carry))
142
+ for (const c of cs) {
143
+ changedPaths.add(c.path);
144
+ if (c.from)
145
+ changedPaths.add(c.from);
146
+ }
147
+ const cited = /* @__PURE__ */ new Set();
148
+ for (const f of facts) {
149
+ if (sameCommit(f.commit, head) || unknown.some((c) => sameCommit(c, f.commit)))
150
+ continue;
151
+ for (const p of citedFiles(f))
152
+ if (changedPaths.has(p))
153
+ cited.add(p);
154
+ }
155
+ const changed = new Set(Object.values(carry.carry).flatMap((cs) => cs.map((c) => c.path))).size;
156
+ const out = {
157
+ ...at,
158
+ current: plan.current,
159
+ carried: plan.carried,
160
+ reread: plan.reread.length + lost,
161
+ citedChanged: cited.size,
162
+ changed,
163
+ toRead: plan.files.length,
164
+ unknown
165
+ };
166
+ if (unknown.length)
167
+ return { ...out, state: "unknown-commit", command: "atticus workspace sync" };
168
+ if (!out.reread && !out.toRead)
169
+ return { ...out, state: "moved", command: `atticus verify ${repo} --write` };
170
+ return { ...out, state: "stale", ...read };
171
+ }
172
+ async function estateFreshness(root, o = {}) {
173
+ const problems = [];
174
+ const ids = [];
175
+ try {
176
+ for (const r of await loadRepos(root))
177
+ if (!r.archived)
178
+ ids.push(r.id);
179
+ } catch (e) {
180
+ problems.push({ file: "org-pack/profiles", message: firstLine(e) });
181
+ }
182
+ for (const n of (await readdir(factsDirOf(root)).catch(() => [])).sort()) {
183
+ const of = factsFileOf(n);
184
+ if (of?.facts && !ids.includes(of.repo))
185
+ ids.push(of.repo);
186
+ }
187
+ const want = o.repos ? ids.filter((id) => o.repos.includes(id)) : ids;
188
+ const repos = await pool(want, 4, (id) => freshOf(root, id, o, problems));
189
+ return { factsDir: factsRelOf(root), repos: repos.sort(freshOrder), problems };
190
+ }
191
+ var short = (c) => c.slice(0, 12);
192
+ var plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
193
+ var factsCommitWords = (r) => r.factsCommits.length === 0 ? "-" : r.factsCommits.length === 1 ? short(r.factsCommits[0]) : `${short(r.factsCommits[0])} +${r.factsCommits.length - 1}`;
194
+ function freshWhy(r) {
195
+ switch (r.state) {
196
+ case "stale":
197
+ return `${plural(r.reread, "fact")} to read again (${plural(r.citedChanged, "file")} they cite changed), ${r.carried} carried as they are; ${plural(r.toRead, "source file")} to read.`;
198
+ case "unknown-commit":
199
+ return `The clone doesn't have ${r.unknown.map(short).join(", ")}, the commit the facts were read at: sync it, or read the repo again whole.`;
200
+ case "moved":
201
+ return `The clone moved, but nothing the facts cite changed and no source file did: verify carries all ${plural(r.carried + r.current, "fact")}.`;
202
+ case "rules-changed":
203
+ return `Its facts are of the clone's commit, but it was read before these reading rules: ${(r.rulesLacking ?? []).join(", ")}. A top-up reads only the files they apply to.`;
204
+ case "no-checkout":
205
+ return "No clone to compare the facts with.";
206
+ case "fresh":
207
+ return "The facts are of the commit the clone is at.";
208
+ default:
209
+ return "Not read yet.";
210
+ }
211
+ }
212
+ async function estateFresh(root, o, io) {
213
+ if (!isMetarepo(root)) {
214
+ io.err(notMetarepo(root));
215
+ return 2;
216
+ }
217
+ const v = await estateFreshness(root, o.git ? { git: o.git } : {});
218
+ if (o.json) {
219
+ io.out(JSON.stringify(v, null, 2));
220
+ return 0;
221
+ }
222
+ for (const p of v.problems)
223
+ io.err(`Couldn't read ${p.file}: ${p.message}`);
224
+ const read = v.repos.filter((r) => r.state !== "not-read");
225
+ if (!read.length) {
226
+ io.out(v.repos.length ? `No repo is read yet, so none can be stale: atticus next says which to read first.` : "No repo is listed yet: atticus next says how to start.");
227
+ return 0;
228
+ }
229
+ const stale = read.filter((r) => r.state !== "fresh");
230
+ const moved = stale.filter((r) => r.state !== "rules-changed");
231
+ const rules = stale.length - moved.length;
232
+ const facts = moved.reduce((n, r) => n + r.reread, 0);
233
+ if (moved.length || !rules)
234
+ io.out(moved.length ? `${plural(moved.length, "repo")} of ${read.length} read ${moved.length === 1 ? "has" : "have"} moved past ${moved.length === 1 ? "its" : "their"} facts' commit: ${plural(facts, "fact")} to read again. Most stale first:` : `All ${plural(read.length, "repo")} read are fresh: each one's facts are of the commit its clone is at.`);
235
+ if (rules)
236
+ io.out(`${plural(rules, "repo")} of ${read.length} read ${rules === 1 ? "was" : "were"} read before reading rules added since: atticus map --all --stale tops ${rules === 1 ? "it" : "them"} up, reading only the files the new rules apply to.`);
237
+ const shown = o.all ? read : stale;
238
+ if (shown.length) {
239
+ const rows = shown.map((r) => [
240
+ r.repo,
241
+ r.state,
242
+ factsCommitWords(r),
243
+ r.head ? short(r.head) : "-",
244
+ String(r.citedChanged),
245
+ String(r.reread),
246
+ r.command ?? ""
247
+ ]);
248
+ const head = ["repo", "state", "facts at", "clone at", "cited changed", "to read again", "run"];
249
+ const w = head.map((h, i) => Math.max(h.length, ...rows.map((x) => x[i].length)));
250
+ const line = (cells) => cells.map((c, i) => i === cells.length - 1 ? c : c.padEnd(w[i])).join(" ").trimEnd();
251
+ io.out(line(head));
252
+ for (const r of rows)
253
+ io.out(line(r));
254
+ for (const r of shown.filter((x) => x.state !== "fresh"))
255
+ io.out(` ${r.repo}: ${freshWhy(r)}`);
256
+ }
257
+ const fresh = read.length - stale.length;
258
+ if (fresh && !o.all && stale.length)
259
+ io.out(`${plural(fresh, "repo")} fresh (--all lists them too).`);
260
+ const unread = v.repos.length - read.length;
261
+ if (unread)
262
+ io.out(`${plural(unread, "repo")} not read yet: atticus next says which to read first.`);
263
+ return 0;
264
+ }
265
+
266
+ export {
267
+ FRESH_STATES,
268
+ freshOrder,
269
+ estateFreshness,
270
+ factsCommitWords,
271
+ freshWhy,
272
+ estateFresh
273
+ };