@maycombhq/atticus 2.0.0-beta.2 → 2.0.0-beta.22

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 (284) hide show
  1. package/dist/bin.js +8 -4
  2. package/dist/chunk-23XVSEV5.js +49 -0
  3. package/dist/{chunk-ZDPAS56H.js → chunk-24OXGB3P.js} +8 -2
  4. package/dist/{chunk-7EOBHUMC.js → chunk-24XLDU72.js} +4 -3
  5. package/dist/{chunk-CR3MTH32.js → chunk-2F4CYZKJ.js} +86 -11
  6. package/dist/{chunk-6IU67AEK.js → chunk-2GF7OLF3.js} +23 -15
  7. package/dist/chunk-2IIMFOPM.js +41 -0
  8. package/dist/chunk-2LGRMVCA.js +617 -0
  9. package/dist/{chunk-XPCM366L.js → chunk-2MMCFP5C.js} +10 -8
  10. package/dist/{chunk-JBTK5OP2.js → chunk-2Q56PQPS.js} +6 -4
  11. package/dist/{chunk-Z6LF7HQN.js → chunk-2Q5EDGEO.js} +7 -5
  12. package/dist/{chunk-3USYZGRF.js → chunk-2RLKFUUL.js} +38 -27
  13. package/dist/chunk-2SKB4O2E.js +59 -0
  14. package/dist/{chunk-SP2I63OO.js → chunk-34S2WGOB.js} +87 -4
  15. package/dist/{chunk-GQ4N4WKF.js → chunk-3NFFJL5D.js} +33 -27
  16. package/dist/{chunk-SJRGMG6A.js → chunk-3NWDLGG6.js} +28 -25
  17. package/dist/{chunk-4WBVUHXN.js → chunk-3RM4UK6W.js} +20 -18
  18. package/dist/chunk-42SIDKEU.js +583 -0
  19. package/dist/{chunk-GLUX4EEP.js → chunk-4EURQWQD.js} +20 -15
  20. package/dist/chunk-4U276ICE.js +39 -0
  21. package/dist/{chunk-ZMFPW66A.js → chunk-53T4O55J.js} +4 -3
  22. package/dist/{chunk-6J5OKA4Y.js → chunk-57TDNMI3.js} +17 -15
  23. package/dist/chunk-5BD2KYLE.js +57 -0
  24. package/dist/{chunk-7EFILTCI.js → chunk-5F7GFN2F.js} +28 -0
  25. package/dist/chunk-5NMKONLP.js +95 -0
  26. package/dist/{chunk-7ZUIMTOU.js → chunk-5SJZW52K.js} +26 -24
  27. package/dist/{chunk-4RS5KZQD.js → chunk-63YRMR6J.js} +6 -5
  28. package/dist/chunk-66PPNOON.js +62 -0
  29. package/dist/chunk-6H3Z5JHH.js +64 -0
  30. package/dist/{chunk-CEXSU4S6.js → chunk-6MUGR4LS.js} +775 -89
  31. package/dist/{chunk-QSXK2RGH.js → chunk-6OJQOPUN.js} +5 -3
  32. package/dist/{chunk-MVZVGYXH.js → chunk-6PPOWY5E.js} +84 -14
  33. package/dist/{chunk-7EKXJZ2Y.js → chunk-6ZGLAACW.js} +299 -38
  34. package/dist/chunk-6ZJ5A7AF.js +222 -0
  35. package/dist/{chunk-L24C55VN.js → chunk-745DAZ4L.js} +142 -30
  36. package/dist/{chunk-Q4D5X7QB.js → chunk-7ASNL4Q4.js} +46 -24
  37. package/dist/chunk-7BR7IPOH.js +35 -0
  38. package/dist/{chunk-7WD63HU2.js → chunk-7DOR27HL.js} +6 -6
  39. package/dist/chunk-7FTTA3HD.js +341 -0
  40. package/dist/{chunk-OLQJTJJU.js → chunk-7GJS6DNX.js} +12 -3
  41. package/dist/{chunk-7JUKDRSZ.js → chunk-7IGKHZ4Z.js} +347 -226
  42. package/dist/{chunk-G2B4ZQGH.js → chunk-7IOWA5D5.js} +11 -6
  43. package/dist/{chunk-EBEW3XXQ.js → chunk-7JITZFJC.js} +7 -5
  44. package/dist/chunk-7MJSQTL5.js +174 -0
  45. package/dist/{chunk-I4JRCD6M.js → chunk-7UOMVMFG.js} +25 -17
  46. package/dist/{chunk-YY6ZQQBP.js → chunk-AFWUDXEM.js} +19 -7
  47. package/dist/chunk-AFZ3QA6W.js +47 -0
  48. package/dist/chunk-AJQ72EBM.js +420 -0
  49. package/dist/chunk-AJYXNTNZ.js +317 -0
  50. package/dist/chunk-AVTBS4OW.js +49 -0
  51. package/dist/{chunk-FHH4I4ZV.js → chunk-BDKC6H5P.js} +12 -6
  52. package/dist/{chunk-IPKHE5D6.js → chunk-BEVTIBRH.js} +1526 -875
  53. package/dist/chunk-BHT7QK4G.js +162 -0
  54. package/dist/{chunk-6JUBZBMW.js → chunk-BIGDQDHD.js} +6 -4
  55. package/dist/{chunk-2BFCZ3RK.js → chunk-BO4KX37X.js} +20 -18
  56. package/dist/chunk-BPK5P77O.js +115 -0
  57. package/dist/chunk-BQ4SQQC6.js +59 -0
  58. package/dist/chunk-BQGDB6ZL.js +7342 -0
  59. package/dist/{chunk-2ANOROX3.js → chunk-BTGPE6CR.js} +11 -9
  60. package/dist/chunk-BTY3HZBO.js +93 -0
  61. package/dist/{chunk-DPZHZQKE.js → chunk-BXYMYEJ4.js} +44 -10
  62. package/dist/{chunk-2RMYG36Q.js → chunk-C3RY6KU6.js} +309 -346
  63. package/dist/chunk-C4R4JLHE.js +40 -0
  64. package/dist/chunk-CADWLE2T.js +18 -0
  65. package/dist/chunk-CBGGOQWU.js +82 -0
  66. package/dist/chunk-CMDXGQTS.js +47 -0
  67. package/dist/{chunk-MC3H7736.js → chunk-CQDGOPGH.js} +58 -18
  68. package/dist/{chunk-HFQCFSJR.js → chunk-CX4RZ2KS.js} +4 -3
  69. package/dist/{chunk-PAMPPUR6.js → chunk-CXJ6FUKN.js} +1852 -207
  70. package/dist/{chunk-ABWHYWNI.js → chunk-D73UEXYW.js} +3 -3
  71. package/dist/chunk-DCZWQLYT.js +1205 -0
  72. package/dist/chunk-DLOBCJL6.js +48 -0
  73. package/dist/{chunk-4BN53TG3.js → chunk-DOBQKHIF.js} +31 -23
  74. package/dist/chunk-E3ISYXO3.js +423 -0
  75. package/dist/{chunk-7SW2QWLU.js → chunk-E6ZIEVOI.js} +16 -13
  76. package/dist/chunk-EBL2R3YG.js +43 -0
  77. package/dist/{chunk-AIOQPLA5.js → chunk-EGQRREQH.js} +41 -15
  78. package/dist/chunk-EHA7RMZ3.js +58 -0
  79. package/dist/{chunk-M766ZJ6W.js → chunk-EIPTLPFC.js} +38 -27
  80. package/dist/chunk-EMRIQUND.js +517 -0
  81. package/dist/{chunk-DFBCSHVT.js → chunk-EPCJQQWD.js} +6 -4
  82. package/dist/{chunk-RZPYKDWS.js → chunk-F3P7N7SF.js} +1 -1
  83. package/dist/{chunk-R77KLRB3.js → chunk-FFLNS6VP.js} +21 -18
  84. package/dist/chunk-FFTRTL6R.js +26 -0
  85. package/dist/{chunk-IHMLFRVV.js → chunk-FPJPLKDW.js} +62 -16
  86. package/dist/{chunk-JCZIKA4C.js → chunk-FSMSFDLD.js} +5 -4
  87. package/dist/{chunk-AVJDSJ2F.js → chunk-FUJM6RTF.js} +8 -7
  88. package/dist/chunk-FZOJFH7Q.js +132 -0
  89. package/dist/{chunk-QRAOANID.js → chunk-G6X77UJZ.js} +23 -21
  90. package/dist/{chunk-3ALD2W2A.js → chunk-GCWRWSU7.js} +10 -4
  91. package/dist/chunk-GIW4ZVDB.js +39 -0
  92. package/dist/{chunk-B2WLAWNJ.js → chunk-GUX3PTYM.js} +3 -3
  93. package/dist/{chunk-DPUYDDQG.js → chunk-GZY6RUZ6.js} +25 -3
  94. package/dist/chunk-H4VO6WG3.js +10 -0
  95. package/dist/{chunk-MMOSZPWJ.js → chunk-H5HBGNXU.js} +5 -4
  96. package/dist/chunk-H7KM7LZE.js +229 -0
  97. package/dist/{chunk-AA6YULYB.js → chunk-HNM2YQT2.js} +7 -7
  98. package/dist/{chunk-3C7EYRFZ.js → chunk-HYU5VLGA.js} +1 -1
  99. package/dist/{chunk-XY3P7JW7.js → chunk-IDKCWSM5.js} +1032 -172
  100. package/dist/chunk-IFKEI4SA.js +237 -0
  101. package/dist/{chunk-F7HYOUFF.js → chunk-IGOE6KPG.js} +67 -22
  102. package/dist/{chunk-TDD55CJH.js → chunk-IH2XURVQ.js} +6 -5
  103. package/dist/chunk-INQHESFB.js +38 -0
  104. package/dist/chunk-IP74LCOQ.js +57 -0
  105. package/dist/chunk-IPHHDDC6.js +45 -0
  106. package/dist/{chunk-T6AIP7H5.js → chunk-ISUAAMGS.js} +110 -153
  107. package/dist/{chunk-A7UPUQFY.js → chunk-IUPG3UKI.js} +624 -319
  108. package/dist/{chunk-L6SGQIR3.js → chunk-IVBOQAGB.js} +7 -3
  109. package/dist/{chunk-27NKUS3X.js → chunk-J2JAKCIW.js} +2205 -796
  110. package/dist/{chunk-V2YTAIQO.js → chunk-J3IOLXWM.js} +24 -7
  111. package/dist/chunk-JA5FI3QV.js +142 -0
  112. package/dist/chunk-JAVI7JSP.js +49 -0
  113. package/dist/{chunk-HLJAXMM4.js → chunk-JB5LINEM.js} +6 -2
  114. package/dist/{chunk-2VHF7OXM.js → chunk-JENSEMXF.js} +1 -1
  115. package/dist/{chunk-6BVONWJ7.js → chunk-JJF6HALY.js} +4 -3
  116. package/dist/chunk-JLUCKAEL.js +38 -0
  117. package/dist/chunk-JRBFANFE.js +221 -0
  118. package/dist/{chunk-R6XF6UR3.js → chunk-KDNTAPLX.js} +4 -4
  119. package/dist/chunk-KFAVQZSX.js +33 -0
  120. package/dist/chunk-KJXD4PNL.js +50 -0
  121. package/dist/chunk-KN5BXMWN.js +44 -0
  122. package/dist/{chunk-PCVDV3UZ.js → chunk-KQGURXFU.js} +9 -7
  123. package/dist/{chunk-WY6PP6AA.js → chunk-KXITGYLF.js} +40 -6
  124. package/dist/{chunk-66YVAGGM.js → chunk-L27SV425.js} +22 -20
  125. package/dist/{chunk-NE2W3OO7.js → chunk-LDLL7LB3.js} +24 -22
  126. package/dist/chunk-LFGTYX5U.js +379 -0
  127. package/dist/{chunk-EYWIDJFU.js → chunk-LGBMTVNT.js} +7 -5
  128. package/dist/{chunk-Q5AMFEWD.js → chunk-LGFL54FP.js} +3 -2
  129. package/dist/{chunk-6TACQN3N.js → chunk-LJXMYKZJ.js} +7 -5
  130. package/dist/{chunk-BKVWTZ6A.js → chunk-LKOR5UET.js} +29 -26
  131. package/dist/chunk-LNBQOP7D.js +294 -0
  132. package/dist/{chunk-O3WI5KWW.js → chunk-LO6P2VYG.js} +2 -2
  133. package/dist/chunk-LQJPN536.js +122 -0
  134. package/dist/{chunk-YEDDOYSC.js → chunk-LYBNHMVZ.js} +29 -5
  135. package/dist/{chunk-A3GY6SOA.js → chunk-LZ7NUC62.js} +20 -18
  136. package/dist/chunk-M32BLWDH.js +37 -0
  137. package/dist/{chunk-VYDBJ73M.js → chunk-M3NANSDZ.js} +17 -15
  138. package/dist/chunk-MFHL5URL.js +31 -0
  139. package/dist/chunk-MFR5OPBD.js +109 -0
  140. package/dist/{chunk-DE76JROX.js → chunk-MG4ZL5RW.js} +32 -20
  141. package/dist/{chunk-N7IXEHK3.js → chunk-MO6P2JZH.js} +10 -8
  142. package/dist/{chunk-65NYPGRC.js → chunk-MUWDB4R4.js} +1 -1
  143. package/dist/chunk-MZCGSXVR.js +34 -0
  144. package/dist/{chunk-MGYZM27B.js → chunk-N3XIYPU3.js} +51 -23
  145. package/dist/chunk-NDCF4R6S.js +172 -0
  146. package/dist/{chunk-DHPACDG7.js → chunk-NR2UJWOC.js} +10 -8
  147. package/dist/chunk-NXJ5URP6.js +51 -0
  148. package/dist/{chunk-UNM6ZOKP.js → chunk-NY2XSR5K.js} +147 -18
  149. package/dist/{chunk-5GDRCDQB.js → chunk-O45HFTFS.js} +3 -2
  150. package/dist/{chunk-ONLS5QA5.js → chunk-O4GXGGBX.js} +14 -12
  151. package/dist/chunk-O5PXQR67.js +249 -0
  152. package/dist/{chunk-PRPPGYZG.js → chunk-O66DM6DJ.js} +6 -4
  153. package/dist/{chunk-KEM4SDDP.js → chunk-O7FDLW7L.js} +11 -8
  154. package/dist/{chunk-T2UYZSCQ.js → chunk-O7XLYEFA.js} +169 -29
  155. package/dist/{chunk-FITWGOJ2.js → chunk-OHNCWBKF.js} +4 -4
  156. package/dist/{chunk-652QWTLZ.js → chunk-OHVTTOPS.js} +3 -3
  157. package/dist/chunk-OMI6FPPN.js +43 -0
  158. package/dist/chunk-ONUPY3H6.js +53 -0
  159. package/dist/chunk-OTLDSZDV.js +69 -0
  160. package/dist/chunk-OUBGGKDU.js +22 -0
  161. package/dist/chunk-OWNCM4ZN.js +330 -0
  162. package/dist/{chunk-YISXLPHN.js → chunk-P2V7QW4D.js} +235 -35
  163. package/dist/{chunk-CNUKCS2T.js → chunk-P32RUW3B.js} +1632 -93
  164. package/dist/{chunk-BWZ77RQT.js → chunk-PAQ2AS5E.js} +1 -1
  165. package/dist/{chunk-ZMAINWBW.js → chunk-PBPBMP2B.js} +4 -3
  166. package/dist/{chunk-ZVM6AKKM.js → chunk-PJSJPMJI.js} +3 -3
  167. package/dist/{chunk-EFHQ3TWP.js → chunk-PKBHS4AA.js} +233 -56
  168. package/dist/{chunk-GT4I4ZWM.js → chunk-PMUAJGLI.js} +20 -16
  169. package/dist/chunk-PPD7HTDP.js +152 -0
  170. package/dist/chunk-PSOFBQWB.js +42 -0
  171. package/dist/{chunk-S2A7YC3Q.js → chunk-Q2TECDIT.js} +10694 -8896
  172. package/dist/chunk-Q4K5WB2W.js +42 -0
  173. package/dist/{chunk-UGLN7QHV.js → chunk-Q6DFNVRJ.js} +14 -12
  174. package/dist/chunk-QA4O2GGC.js +265 -0
  175. package/dist/chunk-QAXW2N3B.js +1216 -0
  176. package/dist/chunk-QBNWF5ZU.js +19 -0
  177. package/dist/chunk-QFWA2DPH.js +224 -0
  178. package/dist/{chunk-23W7VWKR.js → chunk-QKUJMING.js} +1363 -114
  179. package/dist/{chunk-NXFPS2LR.js → chunk-R44CYFPV.js} +16 -13
  180. package/dist/{chunk-CKSITVS4.js → chunk-R7NYHMUU.js} +2687 -786
  181. package/dist/chunk-REWWDVQB.js +162 -0
  182. package/dist/{chunk-JMSCMUCA.js → chunk-RGERPOIV.js} +145 -21
  183. package/dist/{chunk-6JCPI55B.js → chunk-RLDGWLQ7.js} +49 -7
  184. package/dist/chunk-RUGXBPWI.js +384 -0
  185. package/dist/{chunk-CPA6HPVR.js → chunk-RXPJMEOW.js} +18 -12
  186. package/dist/{chunk-3HI6Z55Y.js → chunk-S4PMJU6H.js} +339 -43
  187. package/dist/chunk-S5LSDXV4.js +40 -0
  188. package/dist/chunk-S7FCV7S5.js +51 -0
  189. package/dist/{chunk-5GGOLAKC.js → chunk-SDKLKB6I.js} +28 -26
  190. package/dist/chunk-SFSPGFCV.js +62 -0
  191. package/dist/{chunk-ZNCEKR4J.js → chunk-SFUP7TTO.js} +12 -8
  192. package/dist/{chunk-64EQYWCA.js → chunk-SLXZOMA6.js} +69 -19
  193. package/dist/chunk-SQV37XO2.js +273 -0
  194. package/dist/{chunk-K65BJIMT.js → chunk-SU74NDMQ.js} +19 -17
  195. package/dist/chunk-SYV5LHML.js +165 -0
  196. package/dist/chunk-T4YPZIQN.js +36 -0
  197. package/dist/chunk-T6DQR5TV.js +323 -0
  198. package/dist/{chunk-JIITQXFB.js → chunk-THDMSZ3R.js} +3075 -802
  199. package/dist/{chunk-JGZCG5VM.js → chunk-TNR75OXT.js} +7 -7
  200. package/dist/{chunk-D3PO4DOZ.js → chunk-TUULXQRW.js} +174 -15
  201. package/dist/chunk-TYQBFTBR.js +516 -0
  202. package/dist/chunk-U76OWS3Q.js +49 -0
  203. package/dist/{chunk-YYQN46FY.js → chunk-UCROWG2D.js} +27 -24
  204. package/dist/{chunk-6M5NK3K3.js → chunk-UF4AZOZB.js} +50 -10
  205. package/dist/chunk-UF4GLFBX.js +345 -0
  206. package/dist/{chunk-OT2O76OS.js → chunk-UGUP3ZM6.js} +240 -39
  207. package/dist/chunk-UNAGJYET.js +45 -0
  208. package/dist/{chunk-5WG5YP4T.js → chunk-UOR2DTHH.js} +16 -14
  209. package/dist/{chunk-S3QNRWYR.js → chunk-UPOY4YSQ.js} +14 -12
  210. package/dist/{chunk-EPTBZ3GP.js → chunk-UPS2DGFC.js} +1 -1
  211. package/dist/{chunk-4AK7IBVP.js → chunk-UUU4CLJG.js} +4 -2
  212. package/dist/{chunk-W3BQAZ3Q.js → chunk-UWMJKX5U.js} +14 -12
  213. package/dist/{chunk-QZSX3F7C.js → chunk-UWOJLHFT.js} +27 -23
  214. package/dist/chunk-VBTP56CE.js +535 -0
  215. package/dist/chunk-VCTWPLAO.js +211 -0
  216. package/dist/chunk-VNU26RCO.js +1215 -0
  217. package/dist/{chunk-CSZ4C5N6.js → chunk-VTZMAJ3W.js} +93 -10
  218. package/dist/{chunk-TXLH6WHQ.js → chunk-VW62D6QE.js} +14 -12
  219. package/dist/{chunk-CAQZUNOH.js → chunk-VY72R2XZ.js} +610 -3
  220. package/dist/{chunk-2DIQQJCB.js → chunk-VZALIKIF.js} +18 -15
  221. package/dist/{chunk-TYAID7B7.js → chunk-W62H2XSO.js} +25 -23
  222. package/dist/{chunk-HVUPKCGJ.js → chunk-W7VWI2YH.js} +9 -6
  223. package/dist/{chunk-TANFV3MZ.js → chunk-WERM6KPJ.js} +7 -4
  224. package/dist/{chunk-BOHJZTEQ.js → chunk-WF7B67YE.js} +208 -87
  225. package/dist/{chunk-7FBGJFEE.js → chunk-WG5U3F5V.js} +14 -12
  226. package/dist/{chunk-4NDAAFQT.js → chunk-WJF2CS6M.js} +8 -5
  227. package/dist/{chunk-XAKWMCXI.js → chunk-WKUJ3KPV.js} +4 -4
  228. package/dist/chunk-WMTRHUI5.js +103 -0
  229. package/dist/chunk-WNKPRSGI.js +36 -0
  230. package/dist/chunk-WXFLMQSR.js +223 -0
  231. package/dist/{chunk-RRTKKSLQ.js → chunk-X3WY6MN3.js} +8 -6
  232. package/dist/{chunk-ZCJDOK2S.js → chunk-X4CXA2IL.js} +47 -23
  233. package/dist/{chunk-UBBC2XSG.js → chunk-X5F3Q5LV.js} +560 -105
  234. package/dist/{chunk-C6EKFH7J.js → chunk-XD75VZIH.js} +9 -7
  235. package/dist/chunk-XERYFDB5.js +297 -0
  236. package/dist/chunk-XI2LCCYQ.js +420 -0
  237. package/dist/chunk-Y2EQNWKV.js +933 -0
  238. package/dist/{chunk-LR3R6Z2A.js → chunk-YHCMZC2J.js} +7 -7
  239. package/dist/chunk-YYY3AZFE.js +122 -0
  240. package/dist/{chunk-GDLULHTC.js → chunk-Z5IA3WDR.js} +19 -31
  241. package/dist/{chunk-T6XQL73F.js → chunk-ZFFYNRIO.js} +63 -23
  242. package/dist/{chunk-EDS2L2LD.js → chunk-ZFL7NY4F.js} +56 -27
  243. package/dist/{chunk-YMZ3TNYB.js → chunk-ZGULQAPZ.js} +7 -4
  244. package/dist/{chunk-4SKZDI62.js → chunk-ZIUFM5HT.js} +3 -1
  245. package/dist/{chunk-DKJA76CJ.js → chunk-ZJFRMSJT.js} +15 -13
  246. package/dist/chunk-ZJXLNDH4.js +239 -0
  247. package/dist/chunk-ZQ3ON2VQ.js +252 -0
  248. package/dist/{chunk-HITVBIJS.js → chunk-ZQ7SKESZ.js} +150 -415
  249. package/dist/{chunk-6QSERWXH.js → chunk-ZQXZ2SES.js} +24 -21
  250. package/dist/chunk-ZX57KSEQ.js +39 -0
  251. package/dist/{chunk-I3E7CX4H.js → chunk-ZZK56BLP.js} +5 -3
  252. package/dist/files.json +664 -368
  253. package/dist/packages/naysayer/constitution/constitution.yaml +19 -0
  254. package/dist/packages/sdk/npm/index.js +6194 -2542
  255. package/dist/packages/ui/dist/assets/{elk-api-tma0MCuh.js → elk-api-CIf-0gz5.js} +2 -2
  256. package/dist/packages/ui/dist/assets/index-CoK_Dl0D.js +47 -0
  257. package/dist/packages/ui/dist/assets/index-Dw20IRhQ.css +1 -0
  258. package/dist/packages/ui/dist/index.html +3 -2
  259. package/package.json +5 -5
  260. package/dist/chunk-2BF2EYJV.js +0 -174
  261. package/dist/chunk-42EVSKME.js +0 -37
  262. package/dist/chunk-4BKGMUIK.js +0 -53
  263. package/dist/chunk-5KLGBXG5.js +0 -48
  264. package/dist/chunk-6BNC6EQ4.js +0 -41
  265. package/dist/chunk-6D2CQ5II.js +0 -41
  266. package/dist/chunk-7AVHLZGD.js +0 -45
  267. package/dist/chunk-D46WUV3T.js +0 -33
  268. package/dist/chunk-E36QOJMD.js +0 -47
  269. package/dist/chunk-FQXYPF7E.js +0 -147
  270. package/dist/chunk-GBRFVT63.js +0 -45
  271. package/dist/chunk-ICY36XCH.js +0 -34
  272. package/dist/chunk-J4K3KVLD.js +0 -131
  273. package/dist/chunk-JZU3H6UQ.js +0 -54
  274. package/dist/chunk-NN2ZQEB4.js +0 -38
  275. package/dist/chunk-PCOCACY3.js +0 -385
  276. package/dist/chunk-RTEYOSJY.js +0 -29
  277. package/dist/chunk-RUVFXE2L.js +0 -666
  278. package/dist/chunk-RVH5SUW5.js +0 -69
  279. package/dist/chunk-VN3DP4LQ.js +0 -43
  280. package/dist/chunk-W5BVQF44.js +0 -36
  281. package/dist/chunk-WVPJSRRJ.js +0 -52
  282. package/dist/chunk-XPTOBS2D.js +0 -48
  283. package/dist/packages/ui/dist/assets/index-B54fm9FQ.js +0 -29
  284. package/dist/packages/ui/dist/assets/index-DD_hufQz.css +0 -1
@@ -0,0 +1,933 @@
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-SQV37XO2.js";
9
+ import "./chunk-OWNCM4ZN.js";
10
+ import {
11
+ writeRepoSpecs
12
+ } from "./chunk-T6DQR5TV.js";
13
+ import {
14
+ repoTypeOf
15
+ } from "./chunk-WXFLMQSR.js";
16
+ import {
17
+ readPlanProgress
18
+ } from "./chunk-TYQBFTBR.js";
19
+ import {
20
+ checkoutOf
21
+ } from "./chunk-2F4CYZKJ.js";
22
+ import "./chunk-LO6P2VYG.js";
23
+ import "./chunk-SFUP7TTO.js";
24
+ import "./chunk-7FTTA3HD.js";
25
+ import {
26
+ linkEvidenceAbout,
27
+ linkEvidenceLines,
28
+ loadLinkEvidence,
29
+ writeRepoContracts
30
+ } from "./chunk-ZQ3ON2VQ.js";
31
+ import "./chunk-3G4YI4ZU.js";
32
+ import {
33
+ diffLines
34
+ } from "./chunk-TNR75OXT.js";
35
+ import {
36
+ askHosts
37
+ } from "./chunk-MFR5OPBD.js";
38
+ import "./chunk-UGUP3ZM6.js";
39
+ import "./chunk-BEVTIBRH.js";
40
+ import "./chunk-VOGCSYOI.js";
41
+ import "./chunk-S4PMJU6H.js";
42
+ import "./chunk-IDKCWSM5.js";
43
+ import "./chunk-UUU4CLJG.js";
44
+ import "./chunk-7IGKHZ4Z.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
+ staleTopicQuestions,
64
+ targetQuestionFor,
65
+ targetsFromAnswers,
66
+ topicQuestionDrafts,
67
+ writeCatalog
68
+ } from "./chunk-J2JAKCIW.js";
69
+ import "./chunk-745DAZ4L.js";
70
+ import {
71
+ codeLinkerFor,
72
+ frameworkFacts,
73
+ frameworkGaps,
74
+ renderMap,
75
+ trustOf
76
+ } from "./chunk-CXJ6FUKN.js";
77
+ import "./chunk-QKUJMING.js";
78
+ import "./chunk-6ZGLAACW.js";
79
+ import "./chunk-CQDGOPGH.js";
80
+ import "./chunk-3NFFJL5D.js";
81
+ import "./chunk-F3P7N7SF.js";
82
+ import {
83
+ baseClonePath,
84
+ isInPlace,
85
+ loadRepos
86
+ } from "./chunk-PKBHS4AA.js";
87
+ import "./chunk-P32RUW3B.js";
88
+ import "./chunk-QA4O2GGC.js";
89
+ import {
90
+ CALL_SECURITY_CHECK,
91
+ SPEC_HEADER_SCHEMA_VERSION,
92
+ TERM_STEP,
93
+ TOPICS_STEP_ID,
94
+ callSecurityParams,
95
+ catalogDirOf,
96
+ checkCallSecurity,
97
+ factIdPart,
98
+ factsDirOf,
99
+ factsRelOf,
100
+ flowFiles,
101
+ isAdopted,
102
+ isGuessedJoin,
103
+ joinFlagsOf,
104
+ listQuestions,
105
+ loadOrgPack,
106
+ mapDirOf,
107
+ mapRelOf,
108
+ orgPackDirOf,
109
+ parseFacts,
110
+ parseRecord,
111
+ questionId,
112
+ questionsRelOf,
113
+ raiseQuestions,
114
+ readRepoSpec,
115
+ readSharedMaps,
116
+ removeFlow,
117
+ reopenQuestion,
118
+ retireQuestion,
119
+ specFileHash,
120
+ specRelOf,
121
+ termOfQuestion,
122
+ termQuestionDrafts,
123
+ writeFlow,
124
+ writeSpecHeader
125
+ } from "./chunk-Q2TECDIT.js";
126
+ import {
127
+ LockHeldError,
128
+ acquireLock,
129
+ writeFileAtomic
130
+ } from "./chunk-TUULXQRW.js";
131
+ import {
132
+ require_dist
133
+ } from "./chunk-BQGDB6ZL.js";
134
+ import {
135
+ __toESM
136
+ } from "./chunk-TV45EUGM.js";
137
+
138
+ // packages/cli/dist/map-render-commands.js
139
+ var import_yaml = __toESM(require_dist(), 1);
140
+ import { existsSync } from "node:fs";
141
+ import { readFile, readdir, rm } from "node:fs/promises";
142
+ import { join as join2, relative, sep } from "node:path";
143
+
144
+ // packages/cli/dist/answer-reopen.js
145
+ import { stat } from "node:fs/promises";
146
+ import { join } from "node:path";
147
+ function repoOfTarget(op, target) {
148
+ const t = factIdPart(target);
149
+ 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));
150
+ return r?.id ?? target;
151
+ }
152
+ var mtimeOf = async (path) => (await stat(path).catch(() => void 0))?.mtimeMs;
153
+ async function readNotSettled(root, repo, o = {}) {
154
+ const plan = await readPlanProgress(root, repo);
155
+ if (plan && (plan.stale || plan.done < plan.total))
156
+ 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`;
157
+ const dir = factsDirOf(root);
158
+ const gaps = await mtimeOf(join(dir, `${repo}.gaps.md`));
159
+ const facts = await mtimeOf(join(dir, `${repo}.jsonl`));
160
+ if (gaps !== void 0 && (facts === void 0 || gaps >= facts))
161
+ return `its second pass (atticus map ${repo} --gaps) is planned and not read yet`;
162
+ const fresh = (await estateFreshness(root, { repos: [repo], ...o.git ? { git: o.git } : {} })).repos[0];
163
+ if (!fresh || fresh.state !== "fresh" && fresh.state !== "rules-changed")
164
+ return `its facts aren't fresh (atticus estate fresh says ${fresh?.state ?? "not-read"})`;
165
+ return void 0;
166
+ }
167
+
168
+ // packages/cli/dist/term-lines.js
169
+ async function termsWrite(root, repo, o) {
170
+ const lines = [];
171
+ const raised = [];
172
+ const t = o.terms;
173
+ if (t) {
174
+ for (const a of t.access) {
175
+ const mine = a.repo === repo || (a.reason === "listed-no-call" ? a.owner.repo : a.call.repo) === repo;
176
+ if (!mine)
177
+ continue;
178
+ 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}.`);
179
+ }
180
+ for (const p of t.possible) {
181
+ if (!p.seen.some((s) => s.repo === repo))
182
+ continue;
183
+ 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.`);
184
+ }
185
+ const types = /* @__PURE__ */ new Map();
186
+ for (const r of new Set(t.terms.map((x) => x.repo)))
187
+ types.set(r, (await repoTypeOf(o.op, r, await o.dirOf(r)))?.id);
188
+ const all = termQuestionDrafts(t, (r) => types.get(r));
189
+ const drafts = all.filter((d) => d.terms.some((x) => x.repo === repo));
190
+ const asked = /* @__PURE__ */ new Map();
191
+ for (const d of drafts) {
192
+ const r = await raiseQuestions(root, [d.draft], {
193
+ step: TERM_STEP,
194
+ repo: d.repo,
195
+ command: o.command,
196
+ rerun: o.rerun,
197
+ at: o.at
198
+ });
199
+ const q0 = r.of[0];
200
+ if (q0)
201
+ asked.set(`${d.repo}\0${d.term}\0${d.file}`, q0.id);
202
+ for (const q of r.raised) {
203
+ raised.push(q);
204
+ 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}.`);
205
+ }
206
+ }
207
+ for (const q of (await listQuestions(root, { step: TERM_STEP })).questions) {
208
+ if (q.state !== "open")
209
+ continue;
210
+ const about = termOfQuestion(q.question);
211
+ if (!about)
212
+ continue;
213
+ const k = `${q.repo}\0${about.term}\0${about.file}`;
214
+ const now = asked.get(k);
215
+ if (now === q.id)
216
+ continue;
217
+ const inGroup = all.find((d) => d.repo === q.repo && d.term === about.term && d.file === about.file);
218
+ if (q.repo !== repo && !(inGroup && inGroup.terms.some((x) => x.repo === repo)))
219
+ continue;
220
+ 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";
221
+ await retireQuestion(root, q.id, { why, at: o.at, ...now ? { replacedBy: [now] } : {} });
222
+ lines.push(`Retired ${q.id}: ${why}.`);
223
+ }
224
+ }
225
+ if (o.join)
226
+ for (const pack of o.op.checklists)
227
+ for (const rule of pack.rules) {
228
+ if (rule.status !== "active")
229
+ continue;
230
+ if (rule.check.type !== "deterministic" || rule.check.check !== CALL_SECURITY_CHECK)
231
+ continue;
232
+ const params = callSecurityParams(rule.check.params);
233
+ if ("problem" in params) {
234
+ lines.push(`Rule ${rule.id} (${pack.name}) can't be checked: ${params.problem}.`);
235
+ continue;
236
+ }
237
+ for (const r of checkCallSecurity(params, {
238
+ repos: o.repos,
239
+ join: o.join,
240
+ systems: o.op.profiles.flatMap((p) => p.profile?.systems ?? [])
241
+ }))
242
+ if (r.call.repo === repo || r.callers.some((c) => c.repo === repo))
243
+ lines.push(ruleLine(rule.id, r, o.op));
244
+ }
245
+ return { lines, raised };
246
+ }
247
+ function ownerOf(op, repo) {
248
+ const owner = estateRepos(op).find((r) => r.id === repo)?.owner;
249
+ return owner ? `${repo}'s owner, ${owner}` : `${repo}'s owner`;
250
+ }
251
+ function ruleLine(rule, r, op) {
252
+ switch (r.outcome) {
253
+ case "pass":
254
+ return `Rule ${rule}: passes, ${r.message}.`;
255
+ case "declared":
256
+ return `Rule ${rule}: declared, ${r.message}.`;
257
+ case "finding":
258
+ return `Rule ${rule}: a finding for ${ownerOf(op, r.call.repo)}: ${r.message}.`;
259
+ }
260
+ }
261
+
262
+ // packages/cli/dist/map-render-commands.js
263
+ var FACTS_TEMPLATE = "facts@1";
264
+ var posix = (p) => p.split(sep).join("/");
265
+ var HOW_WORDS = {
266
+ answer: "a person's answer",
267
+ named: "name",
268
+ repo: "the repo's name",
269
+ host: "host",
270
+ path: "path",
271
+ topic: "topic"
272
+ };
273
+ function linkChanges(repo, join3, before, after) {
274
+ const mine = (xs) => (xs ?? []).filter((x) => x.call.repo === repo);
275
+ const joined = mine(join3?.joins);
276
+ const joinsOf = /* @__PURE__ */ new Map();
277
+ for (const j of [...joined, ...(join3?.joins ?? []).filter((x) => !joined.includes(x))])
278
+ joinsOf.set(j.interface, [...joinsOf.get(j.interface) ?? [], j]);
279
+ const howOf = (r) => {
280
+ const all = joinsOf.get(r.id) ?? [];
281
+ const own = all.filter((j) => joined.includes(j));
282
+ const best = own.find((j) => !isGuessedJoin(j)) ?? own[0] ?? all[0];
283
+ if (!best)
284
+ return void 0;
285
+ const byOther = r.confidence === "verified" && own.length > 0 && isGuessedJoin(best);
286
+ return { how: best.how, ...byOther ? { byOther, guesses: joinFlagsOf(best) } : {} };
287
+ };
288
+ const ifaces = (rs) => new Map(rs.filter((r) => r.kind === "Interface").map((r) => [r.id, r]));
289
+ const was = ifaces(before);
290
+ const now = ifaces(after);
291
+ const linked = new Set([...now.values()].flatMap((r) => r.evidence.filter((e) => e.side !== "callee").map((e) => `${e.repo}|${e.path}:${e.line}`)));
292
+ const line = (r, found) => {
293
+ const h = found ? howOf(r) : void 0;
294
+ return {
295
+ id: r.id,
296
+ from: r.from,
297
+ to: r.to,
298
+ ...r.method ? { method: r.method } : {},
299
+ path: r.normalizedPath,
300
+ confidence: r.confidence,
301
+ ...h ? { how: h.how } : {},
302
+ ...r.flags?.length ? { flags: [...r.flags] } : {},
303
+ ...h?.byOther ? { byOther: true, guesses: h.guesses } : {}
304
+ };
305
+ };
306
+ const byId = (a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
307
+ const flagsOf = (r) => [...r.flags ?? []].sort().join(",");
308
+ const changed = [];
309
+ for (const [id, r] of now) {
310
+ const old = was.get(id);
311
+ if (!old || old.confidence === r.confidence && flagsOf(old) === flagsOf(r))
312
+ continue;
313
+ changed.push({
314
+ ...line(r, true),
315
+ was: {
316
+ confidence: old.confidence,
317
+ ...old.flags?.length ? { flags: [...old.flags] } : {}
318
+ }
319
+ });
320
+ }
321
+ return {
322
+ calls: {
323
+ joined: joined.length,
324
+ inferred: joined.filter(isGuessedJoin).length,
325
+ asked: mine(join3?.asks).filter((a) => !linked.has(`${a.call.repo}|${a.call.at}`)).length,
326
+ outside: mine(join3?.outside).length,
327
+ missed: mine(join3?.misses).length
328
+ },
329
+ added: [...now.values()].filter((r) => !was.has(r.id)).map((r) => line(r, true)).sort(byId),
330
+ removed: [...was.values()].filter((r) => !now.has(r.id)).map((r) => line(r, false)).sort(byId),
331
+ changed: changed.sort(byId)
332
+ };
333
+ }
334
+ var LINKS_SHOWN = 5;
335
+ function linkLines(l, report, o = {}) {
336
+ const c = l.calls;
337
+ 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`;
338
+ const counts = [
339
+ l.added.length ? `+${l.added.length}` : "",
340
+ l.removed.length ? `-${l.removed.length}` : "",
341
+ l.changed.length ? `~${l.changed.length}` : ""
342
+ ].filter(Boolean);
343
+ if (!counts.length)
344
+ return [` Links: ${calls}; no Interface added or removed.`];
345
+ const out = [` Links: ${calls}; Interfaces ${counts.join(" ")} (all under links in ${report}).`];
346
+ const text = (sign, x) => {
347
+ const what = [x.method, x.path].filter(Boolean).join(" ");
348
+ const conf = x.was ? `${x.confidence}, was ${x.was.confidence}` : x.confidence;
349
+ if (x.byOther && x.how) {
350
+ const g = x.guesses?.join(", ");
351
+ const was = x.was ? `, was ${x.was.confidence}` : "";
352
+ return ` ${sign} ${x.from} \u2192 ${x.to} ${what} (${x.confidence} by another call${was}; this one by ${HOW_WORDS[x.how]}${g ? `: ${g}` : ""})`;
353
+ }
354
+ const flags = x.flags?.join(", ");
355
+ const found = x.how ? `found by ${HOW_WORDS[x.how]}${flags ? `: ${flags}` : ""}` : flags ?? "";
356
+ return ` ${sign} ${x.from} \u2192 ${x.to} ${what} (${conf}${found ? `; ${found}` : ""})`;
357
+ };
358
+ const all = [
359
+ ...l.added.map((x) => text("+", x)),
360
+ ...l.removed.map((x) => text("-", x)),
361
+ ...l.changed.map((x) => text("~", x))
362
+ ];
363
+ const shown = o.verbose ? all : all.slice(0, LINKS_SHOWN);
364
+ out.push(...shown);
365
+ if (shown.length < all.length)
366
+ out.push(` ... and ${all.length - shown.length} more (links in ${report})`);
367
+ return out;
368
+ }
369
+ async function writeLinksIntoReport(root, repo, links, exposure = [], evidence, shared) {
370
+ const file = join2(factsDirOf(root), `${repo}.verify.yaml`);
371
+ const text = await readFile(file, "utf8").catch(() => void 0);
372
+ if (text === void 0)
373
+ return;
374
+ let report;
375
+ try {
376
+ report = (0, import_yaml.parse)(text);
377
+ } catch {
378
+ return;
379
+ }
380
+ if (!report || typeof report !== "object" || Array.isArray(report))
381
+ return;
382
+ const { exposure: _old, contracts: _c, traffic: _t, shared: _s, ...rest } = report;
383
+ const c = evidence?.contracts;
384
+ const t = evidence?.traffic;
385
+ await writeFileAtomic(file, (0, import_yaml.stringify)({
386
+ ...rest,
387
+ links,
388
+ ...exposure.length ? {
389
+ exposure: exposure.map((x) => ({
390
+ reason: x.reason,
391
+ fact: x.exposure.fact,
392
+ at: x.exposure.at,
393
+ message: x.message
394
+ }))
395
+ } : {},
396
+ ...c && (c.confirmed.length || c.findings.length) ? { contracts: c } : {},
397
+ ...t && (t.seen.length || t.findings.length || t.unknownApps.length) ? { traffic: t } : {},
398
+ ...shared && (shared.joined.length || shared.unmatched.length || shared.asked.length) ? { shared } : {}
399
+ }));
400
+ }
401
+ function sharedReport(r, maps) {
402
+ const commit = (team) => maps.find((m) => m.team === team)?.commit ?? "";
403
+ return {
404
+ joined: r.matches.map((m) => ({
405
+ call: m.call.fact,
406
+ at: m.call.at,
407
+ team: m.team,
408
+ commit: commit(m.team),
409
+ repo: m.entry.repo,
410
+ entry: m.entry.fact,
411
+ entryAt: m.entry.at
412
+ })),
413
+ unmatched: r.gaps.map((g) => ({
414
+ call: g.call.fact,
415
+ at: g.call.at,
416
+ team: g.team,
417
+ commit: commit(g.team),
418
+ message: g.message
419
+ })),
420
+ asked: r.asks.map((a) => ({
421
+ call: a.call.fact,
422
+ at: a.call.at,
423
+ team: a.team,
424
+ question: a.question
425
+ }))
426
+ };
427
+ }
428
+ function sharedLines(repo, s, verbose) {
429
+ const out = [];
430
+ const teams = [...new Set([...s.joined, ...s.unmatched, ...s.asked].map((x) => x.team))].sort();
431
+ for (const team of teams) {
432
+ const j = s.joined.filter((x) => x.team === team);
433
+ const u = s.unmatched.filter((x) => x.team === team);
434
+ const a = s.asked.filter((x) => x.team === team);
435
+ const c = (j[0] ?? u[0])?.commit.slice(0, 7);
436
+ 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.`);
437
+ for (const x of verbose ? j : [])
438
+ out.push(` ${x.at} \u2192 ${x.repo} ${x.entryAt} (${x.entry})`);
439
+ for (const x of verbose ? u : u.slice(0, 5))
440
+ out.push(` ${x.at}: ${x.message}`);
441
+ for (const x of a)
442
+ out.push(` ${x.at}: ${x.question}`);
443
+ }
444
+ return out;
445
+ }
446
+ function countByKind(d) {
447
+ const out = {};
448
+ const of = (k) => out[k] ??= { added: 0, changed: 0, removed: 0 };
449
+ for (const r of d.added)
450
+ of(r.kind).added++;
451
+ for (const r of [...d.changed, ...d.evidenceOnly])
452
+ of(r.kind).changed++;
453
+ for (const r of d.removed)
454
+ of(r.kind).removed++;
455
+ return Object.fromEntries(Object.entries(out).sort(([a], [b]) => a < b ? -1 : 1));
456
+ }
457
+ function kindLine(byKind) {
458
+ const parts = Object.entries(byKind).map(([kind, c]) => [
459
+ kind,
460
+ c.added ? `+${c.added}` : "",
461
+ c.changed ? `~${c.changed}` : "",
462
+ c.removed ? `-${c.removed}` : ""
463
+ ].filter(Boolean).join(" "));
464
+ return parts.join(", ");
465
+ }
466
+ async function projectFactsIntoCatalog(root, repo, facts, given = {}) {
467
+ const op = given.op ?? await loadOrgPack(orgPackDirOf(root));
468
+ const cacheOpts = given.cache === false ? {} : { cacheRoot: root };
469
+ const existing = given.existing ?? (await readCatalog(join2(catalogDirOf(root), "generated"), cacheOpts)).records;
470
+ const curated = await readCatalog(join2(catalogDirOf(root), "curated"), cacheOpts);
471
+ const everyTarget = (await listQuestions(root, { step: TARGETS_STEP })).questions;
472
+ const answered = everyTarget.filter((q) => q.repo === repo);
473
+ const repoType = estateRepos(op).find((r) => r.id === repo)?.type;
474
+ const targetsOpts = repoType ? { repoType } : {};
475
+ const aiTargets = {};
476
+ const targets = targetsFromAnswers(repo, facts, everyTarget, { ...targetsOpts, ai: aiTargets });
477
+ const ruled = ruledTargets(repo, facts, everyTarget, targetsOpts);
478
+ const estate = await estateFacts(root, op, repo);
479
+ const onFile = await loadLinkEvidence(root);
480
+ const evidence = given.contracts ? {
481
+ ...onFile,
482
+ contracts: [
483
+ ...onFile.contracts.filter((c) => c.repo !== repo),
484
+ ...given.contracts.entries.length ? [given.contracts] : []
485
+ // In the companions' file order, as `loadLinkEvidence` reads them.
486
+ ].sort((a, b) => {
487
+ const [x, y] = [`${a.repo}.contracts.yaml`, `${b.repo}.contracts.yaml`];
488
+ return x < y ? -1 : x > y ? 1 : 0;
489
+ })
490
+ } : onFile;
491
+ const shared = await readSharedMaps(root);
492
+ const result = catalogWithFacts({
493
+ repo,
494
+ facts,
495
+ existing: [...existing],
496
+ op,
497
+ decisions: curated.records,
498
+ targets,
499
+ estate: estate.repos,
500
+ estateTargets: estate.targets,
501
+ // G1 (ADR 0174): the pairings people made on the canvas, this repo's and the others'.
502
+ pairs: { ...await pairsOfRepo(root, repo, facts), ...given.extraPairs },
503
+ estatePairs: estate.pairs,
504
+ aiTargets,
505
+ estateAiTargets: estate.aiTargets,
506
+ linkEvidence: { contracts: evidence.contracts, traffic: evidence.traffic },
507
+ ...shared.maps.length ? { shared: shared.maps } : {}
508
+ });
509
+ const diff = diffCatalogs([...existing], result.records);
510
+ const links = linkChanges(repo, result.join, existing, result.records);
511
+ return {
512
+ op,
513
+ existing,
514
+ answered,
515
+ everyTarget,
516
+ targets,
517
+ ruled,
518
+ estate,
519
+ result,
520
+ diff,
521
+ links,
522
+ evidenceProblems: [...evidence.problems, ...shared.problems.map((p) => p.message)],
523
+ sharedMaps: shared.maps
524
+ };
525
+ }
526
+ async function writeFactsIntoCatalog(root, repo, facts, o, io) {
527
+ let lock;
528
+ try {
529
+ lock = await acquireLock(root, "scan", o.command);
530
+ } catch (e) {
531
+ if (e instanceof LockHeldError) {
532
+ io.err(e.message);
533
+ return void 0;
534
+ }
535
+ throw e;
536
+ }
537
+ try {
538
+ const op = await loadOrgPack(orgPackDirOf(root));
539
+ const generated = join2(catalogDirOf(root), "generated");
540
+ const existing = await readCatalog(generated, { cacheRoot: root });
541
+ if (isPrototypeRepo(op, repo)) {
542
+ for (const n of prototypeLeftOut({ repo, facts, existing: [], op, decisions: [] }).notes)
543
+ io.out(n);
544
+ const none = diffCatalogs(existing.records, existing.records);
545
+ return {
546
+ written: { written: 0, unchanged: 0, removed: 0 },
547
+ flows: [],
548
+ questions: [],
549
+ map: [],
550
+ changes: { ...none, byKind: {} },
551
+ links: {
552
+ calls: { joined: 0, inferred: 0, asked: 0, outside: 0, missed: 0 },
553
+ added: [],
554
+ removed: [],
555
+ changed: []
556
+ }
557
+ };
558
+ }
559
+ const rerun = `atticus verify ${repo} --write`;
560
+ await writeRepoContracts(root, repo, o.dir, facts, (n) => io.err(n));
561
+ await writeRepoSpecs(root, repo, o.dir, facts, (n) => io.err(n));
562
+ const { answered, everyTarget, targets, ruled, estate, result, diff, links, evidenceProblems, sharedMaps } = await projectFactsIntoCatalog(root, repo, facts, { op, existing: existing.records });
563
+ for (const p of evidenceProblems)
564
+ io.err(p);
565
+ for (const i of result.invalid)
566
+ io.err(`A merged record isn't valid C1 (a bug): ${i.issues.map((x) => `${x.path}: ${x.message}`).join("; ")}`);
567
+ const written = await writeCatalog(generated, result.records);
568
+ const flows = result.flows.filter((f) => {
569
+ const p = parseRecord(f);
570
+ if (p.ok)
571
+ return true;
572
+ 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}.`);
573
+ return false;
574
+ });
575
+ const spec = await readRepoSpec(root, repo, { cacheRoot: root });
576
+ const ids = new Set(flows.map((f) => f.id));
577
+ for (const f of spec.flows)
578
+ if (f.template === FACTS_TEMPLATE && !ids.has(f.id))
579
+ await removeFlow(root, repo, f.id);
580
+ const flowPaths = [];
581
+ for (const f of flows)
582
+ flowPaths.push(await writeFlow(root, repo, f));
583
+ const files = {};
584
+ for (const f of flows)
585
+ for (const p of flowFiles(f)) {
586
+ const text = await readFile(join2(o.dir, ...p.split("/")), "utf8").catch(() => void 0);
587
+ if (text !== void 0)
588
+ files[p] = specFileHash(text);
589
+ }
590
+ const commit = facts.map((f) => f.commit).sort()[0];
591
+ const kept = spec.flows.filter((f) => f.template !== FACTS_TEMPLATE).map((f) => f.id);
592
+ const header = spec.header;
593
+ await writeSpecHeader(root, {
594
+ schemaVersion: SPEC_HEADER_SCHEMA_VERSION,
595
+ repo,
596
+ template: header?.template ?? FACTS_TEMPLATE,
597
+ templateReviewed: header?.templateReviewed ?? false,
598
+ ...commit ? { commit } : {},
599
+ ...header?.drafted ? { drafted: header.drafted } : {},
600
+ flows: [.../* @__PURE__ */ new Set([...kept, ...ids])].sort(),
601
+ files: Object.fromEntries(Object.entries({ ...header?.files ?? {}, ...files }).sort(([a], [b]) => a < b ? -1 : 1)),
602
+ questions: header?.questions ?? []
603
+ });
604
+ const at = (o.now ?? /* @__PURE__ */ new Date()).toISOString();
605
+ const hosts = await askHosts(root, result.records, { command: o.command, rerun, now: o.now });
606
+ const loose = new Set(result.unresolved.map((u) => u.factId));
607
+ const ambiguous = new Set((result.join?.asks ?? []).filter((a) => a.reason === "ambiguous" && a.call.repo === repo).map((a) => a.call.fact));
608
+ const named = new Set(facts.filter((f) => f.kind === "call" && f.to).map((f) => f.id));
609
+ const raised = [...hosts.raised];
610
+ const lines = [...hosts.lines];
611
+ const asked = new Set([...loose, ...ambiguous].filter((id) => targets[id] === void 0 && !answered.some((q) => q.state === "answered" && q.id === targetId(facts, repo, id))));
612
+ const drafted = groupedTargetDrafts(facts, result.records, op, result.join?.asks, {
613
+ ask: asked,
614
+ split: splitTargetGroups(answered),
615
+ // ADR 0162 (F8): the suggestions read the estate's facts and the earlier answers.
616
+ estate: estate.repos,
617
+ questions: everyTarget
618
+ });
619
+ const refreshed = [];
620
+ for (const t of drafted) {
621
+ const r = await raiseQuestions(root, [t.draft], { step: TARGETS_STEP, repo, command: o.command, rerun, at }, { refresh: true });
622
+ refreshed.push(...r.refreshed);
623
+ for (const q of r.raised) {
624
+ raised.push(q);
625
+ 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}.`);
626
+ }
627
+ }
628
+ if (refreshed.length)
629
+ 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.`);
630
+ const topicDrafts = topicQuestionDrafts(repo, result.records);
631
+ for (const t of topicDrafts) {
632
+ const r = await raiseQuestions(root, [t.draft], {
633
+ step: TOPICS_STEP_ID,
634
+ repo,
635
+ command: o.command,
636
+ rerun,
637
+ at
638
+ });
639
+ for (const q of r.raised) {
640
+ raised.push(q);
641
+ 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}.`);
642
+ }
643
+ }
644
+ for (const s of staleTopicQuestions({
645
+ repo,
646
+ open: (await listQuestions(root, { step: TOPICS_STEP_ID, state: "open", repo })).questions,
647
+ drafted: topicDrafts
648
+ })) {
649
+ await retireQuestion(root, s.id, {
650
+ why: s.why,
651
+ at,
652
+ ...s.replacedBy ? { replacedBy: s.replacedBy } : {}
653
+ });
654
+ lines.push(`Retired ${s.id}: ${s.why}.`);
655
+ }
656
+ for (const s of staleTargetQuestions({
657
+ repo,
658
+ facts,
659
+ open: answered.filter((q) => q.state === "open"),
660
+ drafted,
661
+ asked,
662
+ ruled,
663
+ ...result.join ? { join: result.join } : {}
664
+ })) {
665
+ await retireQuestion(root, s.id, {
666
+ why: s.why,
667
+ at,
668
+ ...s.replacedBy ? { replacedBy: s.replacedBy } : {}
669
+ });
670
+ lines.push(`Retired ${s.id}: ${s.why}.`);
671
+ }
672
+ const reopened = /* @__PURE__ */ new Set();
673
+ const unsettled = /* @__PURE__ */ new Map();
674
+ for (const m of result.answerMisses ?? []) {
675
+ const callerFacts = m.call.repo === repo ? facts : estate.repos.find((x) => x.repo === m.call.repo)?.facts;
676
+ const q = callerFacts ? answeredQuestionOfCall(m.call.repo, callerFacts, everyTarget, m.call.fact) : void 0;
677
+ if (!q || reopened.has(q.id))
678
+ continue;
679
+ if (answerReconfirmed(q))
680
+ continue;
681
+ const named2 = repoOfTarget(op, m.target);
682
+ if (!unsettled.has(named2))
683
+ unsettled.set(named2, await readNotSettled(root, named2));
684
+ const notYet = unsettled.get(named2);
685
+ if (notYet) {
686
+ lines.push(`${m.target} is read, but ${notYet}: ${q.id}'s answer is checked against it once the read is whole and fresh.`);
687
+ continue;
688
+ }
689
+ reopened.add(q.id);
690
+ const why = `${m.target} is read now, and no route of it serves the call: ${m.message} (${m.call.at})`;
691
+ await reopenQuestion(root, q.id, { why, at });
692
+ 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.`);
693
+ }
694
+ const typeOf = new Map(estateRepos(op).map((r) => [r.id, r.type]));
695
+ for (const offer of answerRuleOffers({
696
+ repos: [{ repo, facts }, ...estate.repos].map((r) => ({
697
+ ...r,
698
+ ...typeOf.get(r.repo) ? { type: typeOf.get(r.repo) } : {}
699
+ })),
700
+ questions: everyTarget.filter((q) => !reopened.has(q.id))
701
+ }))
702
+ if (offer.repos.includes(repo))
703
+ lines.push(offer.line);
704
+ const termed = await termsWrite(root, repo, {
705
+ op,
706
+ terms: result.terms,
707
+ repos: [{ repo, facts }, ...estate.repos],
708
+ join: result.join,
709
+ command: o.command,
710
+ rerun,
711
+ at,
712
+ dirOf: (r) => r === repo ? Promise.resolve(o.dir) : checkoutOf(root, r)
713
+ });
714
+ raised.push(...termed.raised);
715
+ lines.push(...termed.lines);
716
+ const byKind = countByKind(diff);
717
+ io.out(`Wrote the catalog for ${repo}: ${written.written} files written, ${written.removed} removed, ${written.unchanged} unchanged.`);
718
+ io.out(diffIsEmpty(diff) ? " No catalog changes." : ` Records: ${kindLine(byKind)}.`);
719
+ if (o.verbose)
720
+ for (const l of diffLines(diff).slice(1))
721
+ io.out(` ${l}`);
722
+ const specsRel = specRelOf(root, repo);
723
+ io.out(` Flows: ${flowPaths.length} in ${specsRel}/.`);
724
+ if (o.verbose)
725
+ for (const p of flowPaths)
726
+ io.out(` ${p}`);
727
+ else if (!diffIsEmpty(diff) || flowPaths.length)
728
+ io.out(` atticus verify ${repo} --write --verbose lists each record and flow.`);
729
+ for (const p of result.curated.problems)
730
+ io.out(`Curated decision ${p.decision} no longer applies: ${p.message}`);
731
+ for (const p of result.projectionIssues)
732
+ io.out(` ${p.code}: ${p.message}`);
733
+ for (const l of joinLines(repo, result.join, estate.notes, { verbose: o.verbose === true }))
734
+ io.out(l);
735
+ for (const l of linkLines(links, `${factsRelOf(root)}/${repo}.verify.yaml`, {
736
+ verbose: o.verbose === true
737
+ }))
738
+ io.out(l);
739
+ const about = result.linkEvidence ? linkEvidenceAbout(repo, result.linkEvidence, result.join) : void 0;
740
+ if (about)
741
+ for (const l of linkEvidenceLines(about, `${factsRelOf(root)}/${repo}.verify.yaml`, {
742
+ verbose: o.verbose === true
743
+ }))
744
+ io.out(l);
745
+ const sharedAbout = result.shared ? sharedReport(result.shared, sharedMaps) : void 0;
746
+ if (sharedAbout)
747
+ for (const l of sharedLines(repo, sharedAbout, o.verbose === true))
748
+ io.out(l);
749
+ await writeLinksIntoReport(root, repo, links, result.join?.exposure, about, sharedAbout);
750
+ for (const l of lines)
751
+ io.out(l);
752
+ const map = await renderRepoMap(root, repo, io);
753
+ return {
754
+ written,
755
+ flows: flowPaths,
756
+ questions: raised.map((q) => q.id),
757
+ map: map ?? [],
758
+ changes: { ...diff, byKind },
759
+ links
760
+ };
761
+ } finally {
762
+ await lock.release();
763
+ }
764
+ }
765
+ function targetId(facts, repo, id) {
766
+ const f = facts.find((x) => x.id === id);
767
+ const q = f ? targetQuestionFor(f) : void 0;
768
+ return q ? questionId({ step: TARGETS_STEP, repo, ...q }) : void 0;
769
+ }
770
+ function joinLines(repo, join3, notes = [], o = {}) {
771
+ if (!join3)
772
+ return [...notes];
773
+ const out = [...notes];
774
+ const mine = join3.joins.filter((j) => j.call.repo === repo && j.call.repo !== j.entry.repo);
775
+ const into = join3.joins.filter((j) => j.entry.repo === repo && j.call.repo !== repo);
776
+ if (mine.length || into.length)
777
+ 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.`);
778
+ const guessed = join3.joins.filter((j) => j.call.repo === repo && j.inferred);
779
+ if (guessed.length) {
780
+ const own = guessed.filter((j) => j.inferred.within === "repo").length;
781
+ const where = [
782
+ own ? `${own} in ${repo} itself` : "",
783
+ guessed.length - own ? `${guessed.length - own} in another repo${guessed.length - own === 1 ? "" : "s"}` : ""
784
+ ].filter(Boolean).join(", ");
785
+ 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}).`);
786
+ if (o.verbose)
787
+ for (const j of guessed) {
788
+ const what = j.method ? `${j.method} ${j.path}` : j.path;
789
+ const named = j.inferred.named ? ` (named ${j.inferred.named})` : "";
790
+ const there = j.entry.repo === repo ? "" : ` (${j.entry.repo})`;
791
+ out.push(` ${j.call.at} ${what}${named} \u2192 ${j.entry.component}${there}`);
792
+ }
793
+ }
794
+ for (const m of join3.misses)
795
+ out.push(`Not joined: ${m.message} (${m.call.at}).`);
796
+ for (const x of join3.exposure ?? [])
797
+ out.push(`Exposure: ${x.message}.`);
798
+ for (const g of join3.gaps.slice(0, 10))
799
+ out.push(`Field gap: ${g.message}.`);
800
+ return out;
801
+ }
802
+ async function renderRepoMap(root, repo, io) {
803
+ const records = (await readCatalog(join2(catalogDirOf(root), "generated"), { cacheRoot: root })).records;
804
+ const spec = await readRepoSpec(root, repo, { cacheRoot: root });
805
+ const ofRepo = records.some((r) => r.kind === "Component" && r.repo === repo);
806
+ if (!ofRepo && spec.flows.length === 0) {
807
+ io.err(`Nothing of ${repo} is in the catalog yet. Have your assistant read it (/atticus map), then run atticus verify ${repo} --write.`);
808
+ return void 0;
809
+ }
810
+ let trust;
811
+ const report = join2(factsDirOf(root), `${repo}.verify.yaml`);
812
+ if (existsSync(report)) {
813
+ try {
814
+ trust = trustOf((0, import_yaml.parse)(await readFile(report, "utf8")));
815
+ } catch {
816
+ trust = void 0;
817
+ }
818
+ }
819
+ const open = (await listQuestions(root, { state: "open", repo })).questions;
820
+ const manifest = (await loadRepos(root).catch(() => [])).find((r) => r.id === repo);
821
+ const adopted = isAdopted(root);
822
+ const url = manifest?.url && !isInPlace(manifest.url) ? manifest.url : void 0;
823
+ const codeLink = codeLinkerFor(url ? { url } : { dir: adopted ? "" : posix(relative(root, baseClonePath(root, repo))) });
824
+ const rel = `${mapRelOf(root)}/${repo}`;
825
+ const kept = await factsOf(root, repo);
826
+ const files = renderMap({
827
+ repo,
828
+ records,
829
+ flows: spec.flows,
830
+ ...trust ? { trust } : {},
831
+ // What a person says the repo is (ADR 0128), above the trust line.
832
+ ...manifest?.description ? {
833
+ about: {
834
+ text: manifest.description.text,
835
+ trust: manifest.description.trust,
836
+ ...manifest.description.by ? { by: manifest.description.by } : {}
837
+ }
838
+ } : {},
839
+ // What the repo is built on (ADR 0124 addendum A-framework): read from the facts, since no
840
+ // catalog record holds a framework.
841
+ ...builtOnOf(kept),
842
+ // ADR 0163: the organisation's terms it writes, read from the facts as the frameworks are.
843
+ ...termsOfFacts(kept),
844
+ questions: open.map((q) => ({ id: q.id, question: q.question, evidence: q.evidence })),
845
+ paths: { map: rel, questions: questionsRelOf(root), specs: specRelOf(root, repo) },
846
+ codeLink
847
+ });
848
+ const dir = join2(mapDirOf(root), repo);
849
+ for (const old of await listFiles(dir))
850
+ if (!(old in files))
851
+ await rm(join2(dir, ...old.split("/")), { force: true });
852
+ for (const [path, text] of Object.entries(files)) {
853
+ const full = join2(dir, ...path.split("/"));
854
+ const now = await readFile(full, "utf8").catch(() => void 0);
855
+ if (now !== text)
856
+ await writeFileAtomic(full, text);
857
+ }
858
+ const paths = Object.keys(files).map((p) => `${rel}/${p}`);
859
+ io.out(`Map: ${rel}/map.md (${Object.keys(files).length} files; review them in the PR).`);
860
+ return paths;
861
+ }
862
+ async function factsOf(root, repo) {
863
+ const text = await readFile(join2(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => void 0);
864
+ if (text === void 0)
865
+ return [];
866
+ const p = parseFacts(text);
867
+ return p.ok ? p.facts : [];
868
+ }
869
+ function builtOnOf(facts) {
870
+ const built = frameworkFacts(facts).map((f) => ({
871
+ name: f.name,
872
+ ...f.version ? { version: f.version } : {},
873
+ ...f.component ? { component: f.component } : {},
874
+ cite: { path: f.cite.file, line: f.cite.line, commit: f.commit }
875
+ }));
876
+ if (!built.length)
877
+ return {};
878
+ const gaps = frameworkGaps(facts).map((g) => ({ framework: g.framework, question: g.question }));
879
+ return { frameworks: { built, ...gaps.length ? { gaps } : {} } };
880
+ }
881
+ function termsOfFacts(facts) {
882
+ const terms = facts.flatMap((f) => f.kind === "term" ? [
883
+ {
884
+ term: f.term,
885
+ value: f.value,
886
+ role: f.role,
887
+ cite: { path: f.cite.file, line: f.cite.line, commit: f.commit },
888
+ ...f.meaning ? { meaning: { path: f.meaning.file, line: f.meaning.line, commit: f.commit } } : {}
889
+ }
890
+ ] : []);
891
+ return terms.length ? { terms } : {};
892
+ }
893
+ async function listFiles(dir) {
894
+ const out = [];
895
+ const walk = async (d, prefix) => {
896
+ let entries;
897
+ try {
898
+ entries = await readdir(d, { withFileTypes: true });
899
+ } catch {
900
+ return;
901
+ }
902
+ for (const e of entries)
903
+ if (e.isDirectory())
904
+ await walk(join2(d, e.name), `${prefix}${e.name}/`);
905
+ else
906
+ out.push(`${prefix}${e.name}`);
907
+ };
908
+ await walk(dir, "");
909
+ return out.sort();
910
+ }
911
+ async function mapRenderCommand(root, repo, o, io) {
912
+ const quiet = o.json ? { ...io, out: () => void 0 } : io;
913
+ const written = await renderRepoMap(root, repo, quiet);
914
+ if (!written)
915
+ return 2;
916
+ if (o.json)
917
+ io.out(JSON.stringify({ repo, files: written }, null, 2));
918
+ return 0;
919
+ }
920
+ export {
921
+ builtOnOf,
922
+ countByKind,
923
+ joinLines,
924
+ kindLine,
925
+ linkChanges,
926
+ linkLines,
927
+ mapRenderCommand,
928
+ projectFactsIntoCatalog,
929
+ sharedLines,
930
+ sharedReport,
931
+ termsOfFacts,
932
+ writeFactsIntoCatalog
933
+ };