@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
@@ -0,0 +1,916 @@
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
+ estateFreshness
8
+ } from "./chunk-LWDNKE4X.js";
9
+ import "./chunk-4FOAYLI4.js";
10
+ import {
11
+ writeRepoSpecs
12
+ } from "./chunk-GX74YWR7.js";
13
+ import "./chunk-G6IQYM25.js";
14
+ import {
15
+ linkEvidenceAbout,
16
+ linkEvidenceLines,
17
+ loadLinkEvidence,
18
+ writeRepoContracts
19
+ } from "./chunk-LPV6T362.js";
20
+ import {
21
+ repoTypeOf
22
+ } from "./chunk-GIFMBCTW.js";
23
+ import {
24
+ readPlanProgress
25
+ } from "./chunk-MD7KUEJ3.js";
26
+ import {
27
+ checkoutOf
28
+ } from "./chunk-Q46QDDMF.js";
29
+ import "./chunk-TGVVUKTG.js";
30
+ import "./chunk-TQ4TG57V.js";
31
+ import {
32
+ diffLines
33
+ } from "./chunk-NCB6656Z.js";
34
+ import {
35
+ askHosts
36
+ } from "./chunk-TYD6I4CZ.js";
37
+ import "./chunk-YWAKDNMH.js";
38
+ import "./chunk-3G4YI4ZU.js";
39
+ import "./chunk-3AQ2R5NL.js";
40
+ import "./chunk-VOGCSYOI.js";
41
+ import "./chunk-K332XW7K.js";
42
+ import "./chunk-HSZMPH5T.js";
43
+ import "./chunk-D2WSW4GU.js";
44
+ import "./chunk-4KNOJC6J.js";
45
+ import {
46
+ TARGETS_STEP,
47
+ answerReconfirmed,
48
+ answerRuleOffers,
49
+ answeredQuestionOfCall,
50
+ catalogWithFacts,
51
+ diffCatalogs,
52
+ diffIsEmpty,
53
+ estateFacts,
54
+ estateRepos,
55
+ groupedTargetDrafts,
56
+ isPrototypeRepo,
57
+ pairsOfRepo,
58
+ prototypeLeftOut,
59
+ readCatalog,
60
+ ruledTargets,
61
+ splitTargetGroups,
62
+ staleTargetQuestions,
63
+ targetQuestionFor,
64
+ targetsFromAnswers,
65
+ topicQuestionDrafts,
66
+ writeCatalog
67
+ } from "./chunk-4SLBCEPD.js";
68
+ import "./chunk-64AADMTW.js";
69
+ import {
70
+ codeLinkerFor,
71
+ frameworkFacts,
72
+ frameworkGaps,
73
+ renderMap,
74
+ trustOf
75
+ } from "./chunk-JYMIB5XY.js";
76
+ import "./chunk-CPK7QSBG.js";
77
+ import "./chunk-YO2PKTXT.js";
78
+ import "./chunk-TWQRPM76.js";
79
+ import "./chunk-VUVGX5L2.js";
80
+ import {
81
+ baseClonePath,
82
+ isInPlace,
83
+ loadRepos
84
+ } from "./chunk-XOL3GFW2.js";
85
+ import "./chunk-QHJJMZLX.js";
86
+ import "./chunk-7AB6OWTV.js";
87
+ import {
88
+ CALL_SECURITY_CHECK,
89
+ SPEC_HEADER_SCHEMA_VERSION,
90
+ TERM_STEP,
91
+ TOPICS_STEP_ID,
92
+ callSecurityParams,
93
+ catalogDirOf,
94
+ checkCallSecurity,
95
+ factIdPart,
96
+ factsDirOf,
97
+ factsRelOf,
98
+ flowFiles,
99
+ isAdopted,
100
+ isGuessedJoin,
101
+ joinFlagsOf,
102
+ listQuestions,
103
+ loadOrgPack,
104
+ mapDirOf,
105
+ mapRelOf,
106
+ orgPackDirOf,
107
+ parseFacts,
108
+ parseRecord,
109
+ questionId,
110
+ questionsRelOf,
111
+ raiseQuestions,
112
+ readRepoSpec,
113
+ readSharedMaps,
114
+ removeFlow,
115
+ reopenQuestion,
116
+ require_dist,
117
+ retireQuestion,
118
+ specFileHash,
119
+ specRelOf,
120
+ termOfQuestion,
121
+ termQuestionDrafts,
122
+ writeFlow,
123
+ writeSpecHeader
124
+ } from "./chunk-PAINMSID.js";
125
+ import {
126
+ LockHeldError,
127
+ acquireLock,
128
+ writeFileAtomic
129
+ } from "./chunk-ODMBPDDV.js";
130
+ import {
131
+ __toESM
132
+ } from "./chunk-TV45EUGM.js";
133
+
134
+ // packages/cli/dist/map-render-commands.js
135
+ var import_yaml = __toESM(require_dist(), 1);
136
+ import { existsSync } from "node:fs";
137
+ import { readFile, readdir, rm } from "node:fs/promises";
138
+ import { join as join2, relative, sep } from "node:path";
139
+
140
+ // packages/cli/dist/answer-reopen.js
141
+ import { stat } from "node:fs/promises";
142
+ import { join } from "node:path";
143
+ function repoOfTarget(op, target) {
144
+ const t = factIdPart(target);
145
+ const r = estateRepos(op).find((x) => factIdPart(x.id) === t || x.component !== void 0 && factIdPart(x.component) === t || (x.modules ?? []).some((m) => factIdPart(m.component) === t));
146
+ return r?.id ?? target;
147
+ }
148
+ var mtimeOf = async (path) => (await stat(path).catch(() => void 0))?.mtimeMs;
149
+ async function readNotSettled(root, repo, o = {}) {
150
+ const plan = await readPlanProgress(root, repo);
151
+ if (plan && (plan.stale || plan.done < plan.total))
152
+ return plan.stale ? `its read plan is of another commit (${plan.commit})` : `${plan.total - plan.done} of the ${plan.total} parts of its read plan are not read yet`;
153
+ const dir = factsDirOf(root);
154
+ const gaps = await mtimeOf(join(dir, `${repo}.gaps.md`));
155
+ const facts = await mtimeOf(join(dir, `${repo}.jsonl`));
156
+ if (gaps !== void 0 && (facts === void 0 || gaps >= facts))
157
+ return `its second pass (atticus map ${repo} --gaps) is planned and not read yet`;
158
+ const fresh = (await estateFreshness(root, { repos: [repo], ...o.git ? { git: o.git } : {} })).repos[0];
159
+ if (!fresh || fresh.state !== "fresh" && fresh.state !== "rules-changed")
160
+ return `its facts aren't fresh (atticus estate fresh says ${fresh?.state ?? "not-read"})`;
161
+ return void 0;
162
+ }
163
+
164
+ // packages/cli/dist/term-lines.js
165
+ async function termsWrite(root, repo, o) {
166
+ const lines = [];
167
+ const raised = [];
168
+ const t = o.terms;
169
+ if (t) {
170
+ for (const a of t.access) {
171
+ const mine = a.repo === repo || (a.reason === "listed-no-call" ? a.owner.repo : a.call.repo) === repo;
172
+ if (!mine)
173
+ continue;
174
+ lines.push(a.reason === "caller-not-listed" ? `Access: ${a.message}. Add it to the list, or say why it calls (a finding for ${ownerOf(o.op, a.call.repo)}).` : a.reason === "caller-no-id" ? `Access (a note): ${a.message}; whether it is listed is unknown until a fact of ${a.call.repo} names its own id.` : `Access (a note): ${a.message}.`);
175
+ }
176
+ for (const p of t.possible) {
177
+ if (!p.seen.some((s) => s.repo === repo))
178
+ continue;
179
+ lines.push(`Possible link (a guess, ${p.flag}): ${p.value} is written in ${[...new Set(p.seen.map((s) => `${s.repo} (${s.at})`))].join(", ")}; a note on the repo type saying what it means links them.`);
180
+ }
181
+ const types = /* @__PURE__ */ new Map();
182
+ for (const r of new Set(t.terms.map((x) => x.repo)))
183
+ types.set(r, (await repoTypeOf(o.op, r, await o.dirOf(r)))?.id);
184
+ const all = termQuestionDrafts(t, (r) => types.get(r));
185
+ const drafts = all.filter((d) => d.terms.some((x) => x.repo === repo));
186
+ const asked = /* @__PURE__ */ new Map();
187
+ for (const d of drafts) {
188
+ const r = await raiseQuestions(root, [d.draft], {
189
+ step: TERM_STEP,
190
+ repo: d.repo,
191
+ command: o.command,
192
+ rerun: o.rerun,
193
+ at: o.at
194
+ });
195
+ const q0 = r.of[0];
196
+ if (q0)
197
+ asked.set(`${d.repo}\0${d.term}\0${d.file}`, q0.id);
198
+ for (const q of r.raised) {
199
+ raised.push(q);
200
+ lines.push(`A term nothing says the meaning of: asked ${q.id}: ${q.question} Answer it: atticus questions answer ${q.id} --option <n>${d.repoType ? `, and save the answer as a note on ${d.repoType} with atticus repo-type note ${d.repoType} --add "..."` : ""}; then ${o.rerun}.`);
201
+ }
202
+ }
203
+ for (const q of (await listQuestions(root, { step: TERM_STEP })).questions) {
204
+ if (q.state !== "open")
205
+ continue;
206
+ const about = termOfQuestion(q.question);
207
+ if (!about)
208
+ continue;
209
+ const k = `${q.repo}\0${about.term}\0${about.file}`;
210
+ const now = asked.get(k);
211
+ if (now === q.id)
212
+ continue;
213
+ const inGroup = all.find((d) => d.repo === q.repo && d.term === about.term && d.file === about.file);
214
+ if (q.repo !== repo && !(inGroup && inGroup.terms.some((x) => x.repo === repo)))
215
+ continue;
216
+ const why = now ? "the same term is asked across a changed set of repos" : "the facts now give every value it asked about a role";
217
+ await retireQuestion(root, q.id, { why, at: o.at, ...now ? { replacedBy: [now] } : {} });
218
+ lines.push(`Retired ${q.id}: ${why}.`);
219
+ }
220
+ }
221
+ if (o.join)
222
+ for (const pack of o.op.checklists)
223
+ for (const rule of pack.rules) {
224
+ if (rule.status !== "active")
225
+ continue;
226
+ if (rule.check.type !== "deterministic" || rule.check.check !== CALL_SECURITY_CHECK)
227
+ continue;
228
+ const params = callSecurityParams(rule.check.params);
229
+ if ("problem" in params) {
230
+ lines.push(`Rule ${rule.id} (${pack.name}) can't be checked: ${params.problem}.`);
231
+ continue;
232
+ }
233
+ for (const r of checkCallSecurity(params, {
234
+ repos: o.repos,
235
+ join: o.join,
236
+ systems: o.op.profiles.flatMap((p) => p.profile?.systems ?? [])
237
+ }))
238
+ if (r.call.repo === repo || r.callers.some((c) => c.repo === repo))
239
+ lines.push(ruleLine(rule.id, r, o.op));
240
+ }
241
+ return { lines, raised };
242
+ }
243
+ function ownerOf(op, repo) {
244
+ const owner = estateRepos(op).find((r) => r.id === repo)?.owner;
245
+ return owner ? `${repo}'s owner, ${owner}` : `${repo}'s owner`;
246
+ }
247
+ function ruleLine(rule, r, op) {
248
+ switch (r.outcome) {
249
+ case "pass":
250
+ return `Rule ${rule}: passes, ${r.message}.`;
251
+ case "declared":
252
+ return `Rule ${rule}: declared, ${r.message}.`;
253
+ case "finding":
254
+ return `Rule ${rule}: a finding for ${ownerOf(op, r.call.repo)}: ${r.message}.`;
255
+ }
256
+ }
257
+
258
+ // packages/cli/dist/map-render-commands.js
259
+ var FACTS_TEMPLATE = "facts@1";
260
+ var posix = (p) => p.split(sep).join("/");
261
+ var HOW_WORDS = {
262
+ answer: "a person's answer",
263
+ named: "name",
264
+ repo: "the repo's name",
265
+ host: "host",
266
+ path: "path",
267
+ topic: "topic"
268
+ };
269
+ function linkChanges(repo, join3, before, after) {
270
+ const mine = (xs) => (xs ?? []).filter((x) => x.call.repo === repo);
271
+ const joined = mine(join3?.joins);
272
+ const joinsOf = /* @__PURE__ */ new Map();
273
+ for (const j of [...joined, ...(join3?.joins ?? []).filter((x) => !joined.includes(x))])
274
+ joinsOf.set(j.interface, [...joinsOf.get(j.interface) ?? [], j]);
275
+ const howOf = (r) => {
276
+ const all = joinsOf.get(r.id) ?? [];
277
+ const own = all.filter((j) => joined.includes(j));
278
+ const best = own.find((j) => !isGuessedJoin(j)) ?? own[0] ?? all[0];
279
+ if (!best)
280
+ return void 0;
281
+ const byOther = r.confidence === "verified" && own.length > 0 && isGuessedJoin(best);
282
+ return { how: best.how, ...byOther ? { byOther, guesses: joinFlagsOf(best) } : {} };
283
+ };
284
+ const ifaces = (rs) => new Map(rs.filter((r) => r.kind === "Interface").map((r) => [r.id, r]));
285
+ const was = ifaces(before);
286
+ const now = ifaces(after);
287
+ const linked = new Set([...now.values()].flatMap((r) => r.evidence.filter((e) => e.side !== "callee").map((e) => `${e.repo}|${e.path}:${e.line}`)));
288
+ const line = (r, found) => {
289
+ const h = found ? howOf(r) : void 0;
290
+ return {
291
+ id: r.id,
292
+ from: r.from,
293
+ to: r.to,
294
+ ...r.method ? { method: r.method } : {},
295
+ path: r.normalizedPath,
296
+ confidence: r.confidence,
297
+ ...h ? { how: h.how } : {},
298
+ ...r.flags?.length ? { flags: [...r.flags] } : {},
299
+ ...h?.byOther ? { byOther: true, guesses: h.guesses } : {}
300
+ };
301
+ };
302
+ const byId = (a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
303
+ const flagsOf = (r) => [...r.flags ?? []].sort().join(",");
304
+ const changed = [];
305
+ for (const [id, r] of now) {
306
+ const old = was.get(id);
307
+ if (!old || old.confidence === r.confidence && flagsOf(old) === flagsOf(r))
308
+ continue;
309
+ changed.push({
310
+ ...line(r, true),
311
+ was: {
312
+ confidence: old.confidence,
313
+ ...old.flags?.length ? { flags: [...old.flags] } : {}
314
+ }
315
+ });
316
+ }
317
+ return {
318
+ calls: {
319
+ joined: joined.length,
320
+ inferred: joined.filter(isGuessedJoin).length,
321
+ asked: mine(join3?.asks).filter((a) => !linked.has(`${a.call.repo}|${a.call.at}`)).length,
322
+ outside: mine(join3?.outside).length,
323
+ missed: mine(join3?.misses).length
324
+ },
325
+ added: [...now.values()].filter((r) => !was.has(r.id)).map((r) => line(r, true)).sort(byId),
326
+ removed: [...was.values()].filter((r) => !now.has(r.id)).map((r) => line(r, false)).sort(byId),
327
+ changed: changed.sort(byId)
328
+ };
329
+ }
330
+ var LINKS_SHOWN = 5;
331
+ function linkLines(l, report, o = {}) {
332
+ const c = l.calls;
333
+ const calls = `${c.joined} call${c.joined === 1 ? "" : "s"} joined${c.inferred ? ` (${c.inferred} inferred)` : ""}, ${c.asked} asked, ${c.outside} outside the estate, ${c.missed} not joined`;
334
+ const counts = [
335
+ l.added.length ? `+${l.added.length}` : "",
336
+ l.removed.length ? `-${l.removed.length}` : "",
337
+ l.changed.length ? `~${l.changed.length}` : ""
338
+ ].filter(Boolean);
339
+ if (!counts.length)
340
+ return [` Links: ${calls}; no Interface added or removed.`];
341
+ const out = [` Links: ${calls}; Interfaces ${counts.join(" ")} (all under links in ${report}).`];
342
+ const text = (sign, x) => {
343
+ const what = [x.method, x.path].filter(Boolean).join(" ");
344
+ const conf = x.was ? `${x.confidence}, was ${x.was.confidence}` : x.confidence;
345
+ if (x.byOther && x.how) {
346
+ const g = x.guesses?.join(", ");
347
+ const was = x.was ? `, was ${x.was.confidence}` : "";
348
+ return ` ${sign} ${x.from} \u2192 ${x.to} ${what} (${x.confidence} by another call${was}; this one by ${HOW_WORDS[x.how]}${g ? `: ${g}` : ""})`;
349
+ }
350
+ const flags = x.flags?.join(", ");
351
+ const found = x.how ? `found by ${HOW_WORDS[x.how]}${flags ? `: ${flags}` : ""}` : flags ?? "";
352
+ return ` ${sign} ${x.from} \u2192 ${x.to} ${what} (${conf}${found ? `; ${found}` : ""})`;
353
+ };
354
+ const all = [
355
+ ...l.added.map((x) => text("+", x)),
356
+ ...l.removed.map((x) => text("-", x)),
357
+ ...l.changed.map((x) => text("~", x))
358
+ ];
359
+ const shown = o.verbose ? all : all.slice(0, LINKS_SHOWN);
360
+ out.push(...shown);
361
+ if (shown.length < all.length)
362
+ out.push(` ... and ${all.length - shown.length} more (links in ${report})`);
363
+ return out;
364
+ }
365
+ async function writeLinksIntoReport(root, repo, links, exposure = [], evidence, shared) {
366
+ const file = join2(factsDirOf(root), `${repo}.verify.yaml`);
367
+ const text = await readFile(file, "utf8").catch(() => void 0);
368
+ if (text === void 0)
369
+ return;
370
+ let report;
371
+ try {
372
+ report = (0, import_yaml.parse)(text);
373
+ } catch {
374
+ return;
375
+ }
376
+ if (!report || typeof report !== "object" || Array.isArray(report))
377
+ return;
378
+ const { exposure: _old, contracts: _c, traffic: _t, shared: _s, ...rest } = report;
379
+ const c = evidence?.contracts;
380
+ const t = evidence?.traffic;
381
+ await writeFileAtomic(file, (0, import_yaml.stringify)({
382
+ ...rest,
383
+ links,
384
+ ...exposure.length ? {
385
+ exposure: exposure.map((x) => ({
386
+ reason: x.reason,
387
+ fact: x.exposure.fact,
388
+ at: x.exposure.at,
389
+ message: x.message
390
+ }))
391
+ } : {},
392
+ ...c && (c.confirmed.length || c.findings.length) ? { contracts: c } : {},
393
+ ...t && (t.seen.length || t.findings.length || t.unknownApps.length) ? { traffic: t } : {},
394
+ ...shared && (shared.joined.length || shared.unmatched.length || shared.asked.length) ? { shared } : {}
395
+ }));
396
+ }
397
+ function sharedReport(r, maps) {
398
+ const commit = (team) => maps.find((m) => m.team === team)?.commit ?? "";
399
+ return {
400
+ joined: r.matches.map((m) => ({
401
+ call: m.call.fact,
402
+ at: m.call.at,
403
+ team: m.team,
404
+ commit: commit(m.team),
405
+ repo: m.entry.repo,
406
+ entry: m.entry.fact,
407
+ entryAt: m.entry.at
408
+ })),
409
+ unmatched: r.gaps.map((g) => ({
410
+ call: g.call.fact,
411
+ at: g.call.at,
412
+ team: g.team,
413
+ commit: commit(g.team),
414
+ message: g.message
415
+ })),
416
+ asked: r.asks.map((a) => ({
417
+ call: a.call.fact,
418
+ at: a.call.at,
419
+ team: a.team,
420
+ question: a.question
421
+ }))
422
+ };
423
+ }
424
+ function sharedLines(repo, s, verbose) {
425
+ const out = [];
426
+ const teams = [...new Set([...s.joined, ...s.unmatched, ...s.asked].map((x) => x.team))].sort();
427
+ for (const team of teams) {
428
+ const j = s.joined.filter((x) => x.team === team);
429
+ const u = s.unmatched.filter((x) => x.team === team);
430
+ const a = s.asked.filter((x) => x.team === team);
431
+ const c = (j[0] ?? u[0])?.commit.slice(0, 7);
432
+ out.push(`Shared map: ${j.length} of ${repo}'s calls joined to ${team}'s map${c ? ` (their commit ${c})` : ""}, each citing their entry; ${u.length} it has no entry for${a.length ? `; ${a.length} two of its entries answer` : ""}. Their entries are theirs: a wrong one is theirs to correct.`);
433
+ for (const x of verbose ? j : [])
434
+ out.push(` ${x.at} \u2192 ${x.repo} ${x.entryAt} (${x.entry})`);
435
+ for (const x of verbose ? u : u.slice(0, 5))
436
+ out.push(` ${x.at}: ${x.message}`);
437
+ for (const x of a)
438
+ out.push(` ${x.at}: ${x.question}`);
439
+ }
440
+ return out;
441
+ }
442
+ function countByKind(d) {
443
+ const out = {};
444
+ const of = (k) => out[k] ??= { added: 0, changed: 0, removed: 0 };
445
+ for (const r of d.added)
446
+ of(r.kind).added++;
447
+ for (const r of [...d.changed, ...d.evidenceOnly])
448
+ of(r.kind).changed++;
449
+ for (const r of d.removed)
450
+ of(r.kind).removed++;
451
+ return Object.fromEntries(Object.entries(out).sort(([a], [b]) => a < b ? -1 : 1));
452
+ }
453
+ function kindLine(byKind) {
454
+ const parts = Object.entries(byKind).map(([kind, c]) => [
455
+ kind,
456
+ c.added ? `+${c.added}` : "",
457
+ c.changed ? `~${c.changed}` : "",
458
+ c.removed ? `-${c.removed}` : ""
459
+ ].filter(Boolean).join(" "));
460
+ return parts.join(", ");
461
+ }
462
+ async function projectFactsIntoCatalog(root, repo, facts, given = {}) {
463
+ const op = given.op ?? await loadOrgPack(orgPackDirOf(root));
464
+ const cacheOpts = given.cache === false ? {} : { cacheRoot: root };
465
+ const existing = given.existing ?? (await readCatalog(join2(catalogDirOf(root), "generated"), cacheOpts)).records;
466
+ const curated = await readCatalog(join2(catalogDirOf(root), "curated"), cacheOpts);
467
+ const everyTarget = (await listQuestions(root, { step: TARGETS_STEP })).questions;
468
+ const answered = everyTarget.filter((q) => q.repo === repo);
469
+ const repoType = estateRepos(op).find((r) => r.id === repo)?.type;
470
+ const targetsOpts = repoType ? { repoType } : {};
471
+ const aiTargets = {};
472
+ const targets = targetsFromAnswers(repo, facts, everyTarget, { ...targetsOpts, ai: aiTargets });
473
+ const ruled = ruledTargets(repo, facts, everyTarget, targetsOpts);
474
+ const estate = await estateFacts(root, op, repo);
475
+ const onFile = await loadLinkEvidence(root);
476
+ const evidence = given.contracts ? {
477
+ ...onFile,
478
+ contracts: [
479
+ ...onFile.contracts.filter((c) => c.repo !== repo),
480
+ ...given.contracts.entries.length ? [given.contracts] : []
481
+ // In the companions' file order, as `loadLinkEvidence` reads them.
482
+ ].sort((a, b) => {
483
+ const [x, y] = [`${a.repo}.contracts.yaml`, `${b.repo}.contracts.yaml`];
484
+ return x < y ? -1 : x > y ? 1 : 0;
485
+ })
486
+ } : onFile;
487
+ const shared = await readSharedMaps(root);
488
+ const result = catalogWithFacts({
489
+ repo,
490
+ facts,
491
+ existing: [...existing],
492
+ op,
493
+ decisions: curated.records,
494
+ targets,
495
+ estate: estate.repos,
496
+ estateTargets: estate.targets,
497
+ // G1 (ADR 0174): the pairings people made on the canvas, this repo's and the others'.
498
+ pairs: { ...await pairsOfRepo(root, repo, facts), ...given.extraPairs },
499
+ estatePairs: estate.pairs,
500
+ aiTargets,
501
+ estateAiTargets: estate.aiTargets,
502
+ linkEvidence: { contracts: evidence.contracts, traffic: evidence.traffic },
503
+ ...shared.maps.length ? { shared: shared.maps } : {}
504
+ });
505
+ const diff = diffCatalogs([...existing], result.records);
506
+ const links = linkChanges(repo, result.join, existing, result.records);
507
+ return {
508
+ op,
509
+ existing,
510
+ answered,
511
+ everyTarget,
512
+ targets,
513
+ ruled,
514
+ estate,
515
+ result,
516
+ diff,
517
+ links,
518
+ evidenceProblems: [...evidence.problems, ...shared.problems.map((p) => p.message)],
519
+ sharedMaps: shared.maps
520
+ };
521
+ }
522
+ async function writeFactsIntoCatalog(root, repo, facts, o, io) {
523
+ let lock;
524
+ try {
525
+ lock = await acquireLock(root, "scan", o.command);
526
+ } catch (e) {
527
+ if (e instanceof LockHeldError) {
528
+ io.err(e.message);
529
+ return void 0;
530
+ }
531
+ throw e;
532
+ }
533
+ try {
534
+ const op = await loadOrgPack(orgPackDirOf(root));
535
+ const generated = join2(catalogDirOf(root), "generated");
536
+ const existing = await readCatalog(generated, { cacheRoot: root });
537
+ if (isPrototypeRepo(op, repo)) {
538
+ for (const n of prototypeLeftOut({ repo, facts, existing: [], op, decisions: [] }).notes)
539
+ io.out(n);
540
+ const none = diffCatalogs(existing.records, existing.records);
541
+ return {
542
+ written: { written: 0, unchanged: 0, removed: 0 },
543
+ flows: [],
544
+ questions: [],
545
+ map: [],
546
+ changes: { ...none, byKind: {} },
547
+ links: {
548
+ calls: { joined: 0, inferred: 0, asked: 0, outside: 0, missed: 0 },
549
+ added: [],
550
+ removed: [],
551
+ changed: []
552
+ }
553
+ };
554
+ }
555
+ const rerun = `atticus verify ${repo} --write`;
556
+ await writeRepoContracts(root, repo, o.dir, facts, (n) => io.err(n));
557
+ await writeRepoSpecs(root, repo, o.dir, facts, (n) => io.err(n));
558
+ const { answered, everyTarget, targets, ruled, estate, result, diff, links, evidenceProblems, sharedMaps } = await projectFactsIntoCatalog(root, repo, facts, { op, existing: existing.records });
559
+ for (const p of evidenceProblems)
560
+ io.err(p);
561
+ for (const i of result.invalid)
562
+ io.err(`A merged record isn't valid C1 (a bug): ${i.issues.map((x) => `${x.path}: ${x.message}`).join("; ")}`);
563
+ const written = await writeCatalog(generated, result.records);
564
+ const flows = result.flows.filter((f) => {
565
+ const p = parseRecord(f);
566
+ if (p.ok)
567
+ return true;
568
+ io.err(`The flow ${f.id} isn't written to ${specRelOf(root, repo)}/: ${p.issues.map((i) => `${i.path}: ${i.message}`).join("; ")}. Have your assistant fix its flow fact (each call-out step's ref names the call it makes), then run ${rerun}.`);
569
+ return false;
570
+ });
571
+ const spec = await readRepoSpec(root, repo, { cacheRoot: root });
572
+ const ids = new Set(flows.map((f) => f.id));
573
+ for (const f of spec.flows)
574
+ if (f.template === FACTS_TEMPLATE && !ids.has(f.id))
575
+ await removeFlow(root, repo, f.id);
576
+ const flowPaths = [];
577
+ for (const f of flows)
578
+ flowPaths.push(await writeFlow(root, repo, f));
579
+ const files = {};
580
+ for (const f of flows)
581
+ for (const p of flowFiles(f)) {
582
+ const text = await readFile(join2(o.dir, ...p.split("/")), "utf8").catch(() => void 0);
583
+ if (text !== void 0)
584
+ files[p] = specFileHash(text);
585
+ }
586
+ const commit = facts.map((f) => f.commit).sort()[0];
587
+ const kept = spec.flows.filter((f) => f.template !== FACTS_TEMPLATE).map((f) => f.id);
588
+ const header = spec.header;
589
+ await writeSpecHeader(root, {
590
+ schemaVersion: SPEC_HEADER_SCHEMA_VERSION,
591
+ repo,
592
+ template: header?.template ?? FACTS_TEMPLATE,
593
+ templateReviewed: header?.templateReviewed ?? false,
594
+ ...commit ? { commit } : {},
595
+ ...header?.drafted ? { drafted: header.drafted } : {},
596
+ flows: [.../* @__PURE__ */ new Set([...kept, ...ids])].sort(),
597
+ files: Object.fromEntries(Object.entries({ ...header?.files ?? {}, ...files }).sort(([a], [b]) => a < b ? -1 : 1)),
598
+ questions: header?.questions ?? []
599
+ });
600
+ const at = (o.now ?? /* @__PURE__ */ new Date()).toISOString();
601
+ const hosts = await askHosts(root, result.records, { command: o.command, rerun, now: o.now });
602
+ const loose = new Set(result.unresolved.map((u) => u.factId));
603
+ const ambiguous = new Set((result.join?.asks ?? []).filter((a) => a.reason === "ambiguous" && a.call.repo === repo).map((a) => a.call.fact));
604
+ const named = new Set(facts.filter((f) => f.kind === "call" && f.to).map((f) => f.id));
605
+ const raised = [...hosts.raised];
606
+ const lines = [...hosts.lines];
607
+ const asked = new Set([...loose, ...ambiguous].filter((id) => targets[id] === void 0 && !answered.some((q) => q.state === "answered" && q.id === targetId(facts, repo, id))));
608
+ const drafted = groupedTargetDrafts(facts, result.records, op, result.join?.asks, {
609
+ ask: asked,
610
+ split: splitTargetGroups(answered),
611
+ // ADR 0162 (F8): the suggestions read the estate's facts and the earlier answers.
612
+ estate: estate.repos,
613
+ questions: everyTarget
614
+ });
615
+ const refreshed = [];
616
+ for (const t of drafted) {
617
+ const r = await raiseQuestions(root, [t.draft], { step: TARGETS_STEP, repo, command: o.command, rerun, at }, { refresh: true });
618
+ refreshed.push(...r.refreshed);
619
+ for (const q of r.raised) {
620
+ raised.push(q);
621
+ lines.push(t.factIds.length > 1 ? `${t.factIds.length} calls go the same way and name no target the estate has: asked once, ${q.id}: ${q.question} One answer names the target of all of them. Answer it: atticus questions answer ${q.id} --option <n>, then ${rerun}.` : named.has(t.factId) ? `A call names a target the estate doesn't have, and more than one entry serves it: asked ${q.id}: ${q.question} Answer it: atticus questions answer ${q.id} --option <n>, then ${rerun}.` : `A call names no target: asked ${q.id}: ${q.question} Answer it: atticus questions answer ${q.id} --option <n>, then ${rerun}.`);
622
+ }
623
+ }
624
+ if (refreshed.length)
625
+ lines.push(`Refreshed ${refreshed.length === 1 ? "1 open question" : `${refreshed.length} open questions`} asked before (${refreshed.map((q) => q.id).join(", ")}): the same id, with today's options, ranked by the estate as read now, each saying why it is suggested.`);
626
+ for (const t of topicQuestionDrafts(repo, result.records)) {
627
+ const r = await raiseQuestions(root, [t.draft], {
628
+ step: TOPICS_STEP_ID,
629
+ repo,
630
+ command: o.command,
631
+ rerun,
632
+ at
633
+ });
634
+ for (const q of r.raised) {
635
+ raised.push(q);
636
+ lines.push(`No repo of the estate serves the other side of ${t.topic}: asked ${q.id}: ${q.question} If another team or a vendor owns it, name them: atticus questions answer ${q.id} --target <system or team id> (it goes under the system's topics in the profile, for review), then ${rerun}.`);
637
+ }
638
+ }
639
+ for (const s of staleTargetQuestions({
640
+ repo,
641
+ facts,
642
+ open: answered.filter((q) => q.state === "open"),
643
+ drafted,
644
+ asked,
645
+ ruled,
646
+ ...result.join ? { join: result.join } : {}
647
+ })) {
648
+ await retireQuestion(root, s.id, {
649
+ why: s.why,
650
+ at,
651
+ ...s.replacedBy ? { replacedBy: s.replacedBy } : {}
652
+ });
653
+ lines.push(`Retired ${s.id}: ${s.why}.`);
654
+ }
655
+ const reopened = /* @__PURE__ */ new Set();
656
+ const unsettled = /* @__PURE__ */ new Map();
657
+ for (const m of result.answerMisses ?? []) {
658
+ const callerFacts = m.call.repo === repo ? facts : estate.repos.find((x) => x.repo === m.call.repo)?.facts;
659
+ const q = callerFacts ? answeredQuestionOfCall(m.call.repo, callerFacts, everyTarget, m.call.fact) : void 0;
660
+ if (!q || reopened.has(q.id))
661
+ continue;
662
+ if (answerReconfirmed(q))
663
+ continue;
664
+ const named2 = repoOfTarget(op, m.target);
665
+ if (!unsettled.has(named2))
666
+ unsettled.set(named2, await readNotSettled(root, named2));
667
+ const notYet = unsettled.get(named2);
668
+ if (notYet) {
669
+ lines.push(`${m.target} is read, but ${notYet}: ${q.id}'s answer is checked against it once the read is whole and fresh.`);
670
+ continue;
671
+ }
672
+ reopened.add(q.id);
673
+ const why = `${m.target} is read now, and no route of it serves the call: ${m.message} (${m.call.at})`;
674
+ await reopenQuestion(root, q.id, { why, at });
675
+ lines.push(`Asked again ${q.id}: ${why}. Answer it again: atticus questions answer ${q.id} --option <n> | --target <id>, then atticus verify ${m.call.repo} --write.`);
676
+ }
677
+ const typeOf = new Map(estateRepos(op).map((r) => [r.id, r.type]));
678
+ for (const offer of answerRuleOffers({
679
+ repos: [{ repo, facts }, ...estate.repos].map((r) => ({
680
+ ...r,
681
+ ...typeOf.get(r.repo) ? { type: typeOf.get(r.repo) } : {}
682
+ })),
683
+ questions: everyTarget.filter((q) => !reopened.has(q.id))
684
+ }))
685
+ if (offer.repos.includes(repo))
686
+ lines.push(offer.line);
687
+ const termed = await termsWrite(root, repo, {
688
+ op,
689
+ terms: result.terms,
690
+ repos: [{ repo, facts }, ...estate.repos],
691
+ join: result.join,
692
+ command: o.command,
693
+ rerun,
694
+ at,
695
+ dirOf: (r) => r === repo ? Promise.resolve(o.dir) : checkoutOf(root, r)
696
+ });
697
+ raised.push(...termed.raised);
698
+ lines.push(...termed.lines);
699
+ const byKind = countByKind(diff);
700
+ io.out(`Wrote the catalog for ${repo}: ${written.written} files written, ${written.removed} removed, ${written.unchanged} unchanged.`);
701
+ io.out(diffIsEmpty(diff) ? " No catalog changes." : ` Records: ${kindLine(byKind)}.`);
702
+ if (o.verbose)
703
+ for (const l of diffLines(diff).slice(1))
704
+ io.out(` ${l}`);
705
+ const specsRel = specRelOf(root, repo);
706
+ io.out(` Flows: ${flowPaths.length} in ${specsRel}/.`);
707
+ if (o.verbose)
708
+ for (const p of flowPaths)
709
+ io.out(` ${p}`);
710
+ else if (!diffIsEmpty(diff) || flowPaths.length)
711
+ io.out(` atticus verify ${repo} --write --verbose lists each record and flow.`);
712
+ for (const p of result.curated.problems)
713
+ io.out(`Curated decision ${p.decision} no longer applies: ${p.message}`);
714
+ for (const p of result.projectionIssues)
715
+ io.out(` ${p.code}: ${p.message}`);
716
+ for (const l of joinLines(repo, result.join, estate.notes, { verbose: o.verbose === true }))
717
+ io.out(l);
718
+ for (const l of linkLines(links, `${factsRelOf(root)}/${repo}.verify.yaml`, {
719
+ verbose: o.verbose === true
720
+ }))
721
+ io.out(l);
722
+ const about = result.linkEvidence ? linkEvidenceAbout(repo, result.linkEvidence, result.join) : void 0;
723
+ if (about)
724
+ for (const l of linkEvidenceLines(about, `${factsRelOf(root)}/${repo}.verify.yaml`, {
725
+ verbose: o.verbose === true
726
+ }))
727
+ io.out(l);
728
+ const sharedAbout = result.shared ? sharedReport(result.shared, sharedMaps) : void 0;
729
+ if (sharedAbout)
730
+ for (const l of sharedLines(repo, sharedAbout, o.verbose === true))
731
+ io.out(l);
732
+ await writeLinksIntoReport(root, repo, links, result.join?.exposure, about, sharedAbout);
733
+ for (const l of lines)
734
+ io.out(l);
735
+ const map = await renderRepoMap(root, repo, io);
736
+ return {
737
+ written,
738
+ flows: flowPaths,
739
+ questions: raised.map((q) => q.id),
740
+ map: map ?? [],
741
+ changes: { ...diff, byKind },
742
+ links
743
+ };
744
+ } finally {
745
+ await lock.release();
746
+ }
747
+ }
748
+ function targetId(facts, repo, id) {
749
+ const f = facts.find((x) => x.id === id);
750
+ const q = f ? targetQuestionFor(f) : void 0;
751
+ return q ? questionId({ step: TARGETS_STEP, repo, ...q }) : void 0;
752
+ }
753
+ function joinLines(repo, join3, notes = [], o = {}) {
754
+ if (!join3)
755
+ return [...notes];
756
+ const out = [...notes];
757
+ const mine = join3.joins.filter((j) => j.call.repo === repo && j.call.repo !== j.entry.repo);
758
+ const into = join3.joins.filter((j) => j.entry.repo === repo && j.call.repo !== repo);
759
+ if (mine.length || into.length)
760
+ out.push(`Joined across repos: ${mine.length} of ${repo}'s calls to the entries that serve them, ${into.length} calls of other repos into ${repo}, each citing both ends.`);
761
+ const guessed = join3.joins.filter((j) => j.call.repo === repo && j.inferred);
762
+ if (guessed.length) {
763
+ const own = guessed.filter((j) => j.inferred.within === "repo").length;
764
+ const where = [
765
+ own ? `${own} in ${repo} itself` : "",
766
+ guessed.length - own ? `${guessed.length - own} in another repo${guessed.length - own === 1 ? "" : "s"}` : ""
767
+ ].filter(Boolean).join(", ");
768
+ out.push(`Joined by method and path, inferred: ${guessed.length} of ${repo}'s calls name no target the estate has, so each joined the one entry that serves it (${where}).`);
769
+ if (o.verbose)
770
+ for (const j of guessed) {
771
+ const what = j.method ? `${j.method} ${j.path}` : j.path;
772
+ const named = j.inferred.named ? ` (named ${j.inferred.named})` : "";
773
+ const there = j.entry.repo === repo ? "" : ` (${j.entry.repo})`;
774
+ out.push(` ${j.call.at} ${what}${named} \u2192 ${j.entry.component}${there}`);
775
+ }
776
+ }
777
+ for (const m of join3.misses)
778
+ out.push(`Not joined: ${m.message} (${m.call.at}).`);
779
+ for (const x of join3.exposure ?? [])
780
+ out.push(`Exposure: ${x.message}.`);
781
+ for (const g of join3.gaps.slice(0, 10))
782
+ out.push(`Field gap: ${g.message}.`);
783
+ return out;
784
+ }
785
+ async function renderRepoMap(root, repo, io) {
786
+ const records = (await readCatalog(join2(catalogDirOf(root), "generated"), { cacheRoot: root })).records;
787
+ const spec = await readRepoSpec(root, repo, { cacheRoot: root });
788
+ const ofRepo = records.some((r) => r.kind === "Component" && r.repo === repo);
789
+ if (!ofRepo && spec.flows.length === 0) {
790
+ io.err(`Nothing of ${repo} is in the catalog yet. Have your assistant read it (/atticus map), then run atticus verify ${repo} --write.`);
791
+ return void 0;
792
+ }
793
+ let trust;
794
+ const report = join2(factsDirOf(root), `${repo}.verify.yaml`);
795
+ if (existsSync(report)) {
796
+ try {
797
+ trust = trustOf((0, import_yaml.parse)(await readFile(report, "utf8")));
798
+ } catch {
799
+ trust = void 0;
800
+ }
801
+ }
802
+ const open = (await listQuestions(root, { state: "open", repo })).questions;
803
+ const manifest = (await loadRepos(root).catch(() => [])).find((r) => r.id === repo);
804
+ const adopted = isAdopted(root);
805
+ const url = manifest?.url && !isInPlace(manifest.url) ? manifest.url : void 0;
806
+ const codeLink = codeLinkerFor(url ? { url } : { dir: adopted ? "" : posix(relative(root, baseClonePath(root, repo))) });
807
+ const rel = `${mapRelOf(root)}/${repo}`;
808
+ const kept = await factsOf(root, repo);
809
+ const files = renderMap({
810
+ repo,
811
+ records,
812
+ flows: spec.flows,
813
+ ...trust ? { trust } : {},
814
+ // What a person says the repo is (ADR 0128), above the trust line.
815
+ ...manifest?.description ? {
816
+ about: {
817
+ text: manifest.description.text,
818
+ trust: manifest.description.trust,
819
+ ...manifest.description.by ? { by: manifest.description.by } : {}
820
+ }
821
+ } : {},
822
+ // What the repo is built on (ADR 0124 addendum A-framework): read from the facts, since no
823
+ // catalog record holds a framework.
824
+ ...builtOnOf(kept),
825
+ // ADR 0163: the organisation's terms it writes, read from the facts as the frameworks are.
826
+ ...termsOfFacts(kept),
827
+ questions: open.map((q) => ({ id: q.id, question: q.question, evidence: q.evidence })),
828
+ paths: { map: rel, questions: questionsRelOf(root), specs: specRelOf(root, repo) },
829
+ codeLink
830
+ });
831
+ const dir = join2(mapDirOf(root), repo);
832
+ for (const old of await listFiles(dir))
833
+ if (!(old in files))
834
+ await rm(join2(dir, ...old.split("/")), { force: true });
835
+ for (const [path, text] of Object.entries(files)) {
836
+ const full = join2(dir, ...path.split("/"));
837
+ const now = await readFile(full, "utf8").catch(() => void 0);
838
+ if (now !== text)
839
+ await writeFileAtomic(full, text);
840
+ }
841
+ const paths = Object.keys(files).map((p) => `${rel}/${p}`);
842
+ io.out(`Map: ${rel}/map.md (${Object.keys(files).length} files; review them in the PR).`);
843
+ return paths;
844
+ }
845
+ async function factsOf(root, repo) {
846
+ const text = await readFile(join2(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => void 0);
847
+ if (text === void 0)
848
+ return [];
849
+ const p = parseFacts(text);
850
+ return p.ok ? p.facts : [];
851
+ }
852
+ function builtOnOf(facts) {
853
+ const built = frameworkFacts(facts).map((f) => ({
854
+ name: f.name,
855
+ ...f.version ? { version: f.version } : {},
856
+ ...f.component ? { component: f.component } : {},
857
+ cite: { path: f.cite.file, line: f.cite.line, commit: f.commit }
858
+ }));
859
+ if (!built.length)
860
+ return {};
861
+ const gaps = frameworkGaps(facts).map((g) => ({ framework: g.framework, question: g.question }));
862
+ return { frameworks: { built, ...gaps.length ? { gaps } : {} } };
863
+ }
864
+ function termsOfFacts(facts) {
865
+ const terms = facts.flatMap((f) => f.kind === "term" ? [
866
+ {
867
+ term: f.term,
868
+ value: f.value,
869
+ role: f.role,
870
+ cite: { path: f.cite.file, line: f.cite.line, commit: f.commit },
871
+ ...f.meaning ? { meaning: { path: f.meaning.file, line: f.meaning.line, commit: f.commit } } : {}
872
+ }
873
+ ] : []);
874
+ return terms.length ? { terms } : {};
875
+ }
876
+ async function listFiles(dir) {
877
+ const out = [];
878
+ const walk = async (d, prefix) => {
879
+ let entries;
880
+ try {
881
+ entries = await readdir(d, { withFileTypes: true });
882
+ } catch {
883
+ return;
884
+ }
885
+ for (const e of entries)
886
+ if (e.isDirectory())
887
+ await walk(join2(d, e.name), `${prefix}${e.name}/`);
888
+ else
889
+ out.push(`${prefix}${e.name}`);
890
+ };
891
+ await walk(dir, "");
892
+ return out.sort();
893
+ }
894
+ async function mapRenderCommand(root, repo, o, io) {
895
+ const quiet = o.json ? { ...io, out: () => void 0 } : io;
896
+ const written = await renderRepoMap(root, repo, quiet);
897
+ if (!written)
898
+ return 2;
899
+ if (o.json)
900
+ io.out(JSON.stringify({ repo, files: written }, null, 2));
901
+ return 0;
902
+ }
903
+ export {
904
+ builtOnOf,
905
+ countByKind,
906
+ joinLines,
907
+ kindLine,
908
+ linkChanges,
909
+ linkLines,
910
+ mapRenderCommand,
911
+ projectFactsIntoCatalog,
912
+ sharedLines,
913
+ sharedReport,
914
+ termsOfFacts,
915
+ writeFactsIntoCatalog
916
+ };