@maycombhq/atticus 2.0.0-beta.23 → 2.0.0-beta.25

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 (281) hide show
  1. package/dist/bin.js +3 -3
  2. package/dist/{chunk-S7GUZ45I.js → chunk-23QHP4JJ.js} +5 -3
  3. package/dist/{chunk-73V2OONC.js → chunk-2RABF6RT.js} +17 -15
  4. package/dist/{chunk-ENH6Z4TY.js → chunk-2ULVUSIP.js} +17 -17
  5. package/dist/{chunk-G6EFXTUO.js → chunk-2VN4TLGI.js} +7 -5
  6. package/dist/{chunk-ZSNOILL5.js → chunk-2Y5FJQSF.js} +1 -1
  7. package/dist/{chunk-YDCOZOER.js → chunk-334N6EI2.js} +20 -18
  8. package/dist/chunk-3D74UADA.js +22 -0
  9. package/dist/{chunk-63NFFAGI.js → chunk-3NA2VE45.js} +14 -12
  10. package/dist/{chunk-CJEBRJBS.js → chunk-3VC2XJ53.js} +6 -4
  11. package/dist/{chunk-7NQAGYK4.js → chunk-3WO7ASU7.js} +8 -8
  12. package/dist/{chunk-GM4EFHUX.js → chunk-4GWQVT2C.js} +19 -16
  13. package/dist/{chunk-SVGGMBJI.js → chunk-4PW5SRKJ.js} +15 -13
  14. package/dist/{chunk-27AJAKX7.js → chunk-4SS5ZK47.js} +3 -3
  15. package/dist/{chunk-PQQKZPBU.js → chunk-4U3JLIRC.js} +1 -1
  16. package/dist/{chunk-Z3H27OMV.js → chunk-4WIVTPGE.js} +6 -4
  17. package/dist/{chunk-XF6TSZW2.js → chunk-5267F4BS.js} +6 -4
  18. package/dist/chunk-5CPZIWIN.js +38 -0
  19. package/dist/{chunk-PWXB5GBB.js → chunk-5GLGLWAJ.js} +18 -16
  20. package/dist/{chunk-2QPJ4E4Z.js → chunk-5K6ZKHZR.js} +4 -2
  21. package/dist/{chunk-QZWRPQTI.js → chunk-5OVSDV77.js} +8 -6
  22. package/dist/{chunk-FJVUHQPS.js → chunk-5P4PNGPL.js} +26 -23
  23. package/dist/{chunk-M3EOFSPY.js → chunk-5R3FRI6H.js} +33 -29
  24. package/dist/{chunk-PNSSE7JM.js → chunk-5RDKQOY3.js} +25 -23
  25. package/dist/{chunk-KDJ2YKAZ.js → chunk-5RKN5QIX.js} +9 -7
  26. package/dist/{chunk-3EX5HCZD.js → chunk-5UJ7C7IH.js} +16 -14
  27. package/dist/{chunk-ZLQEQR3D.js → chunk-5WZV37WS.js} +8 -6
  28. package/dist/{chunk-OBUB3H72.js → chunk-62FMA437.js} +14 -12
  29. package/dist/{chunk-UALE35WK.js → chunk-6576X5BJ.js} +5 -3
  30. package/dist/{chunk-TXNSQ24G.js → chunk-6WYOJCB4.js} +3 -3
  31. package/dist/{chunk-TV56QLLV.js → chunk-77REYYY5.js} +5 -3
  32. package/dist/{chunk-QLQIFJP3.js → chunk-7AKJ2XTW.js} +19 -16
  33. package/dist/{chunk-2WUTCPPJ.js → chunk-7E3G5NCH.js} +17 -13
  34. package/dist/{chunk-FVYZ4Y52.js → chunk-7EAH2MFY.js} +5 -3
  35. package/dist/{chunk-PXW2RZGQ.js → chunk-7F4GZ7U2.js} +3 -3
  36. package/dist/{chunk-6RQOINER.js → chunk-7FUQAT2R.js} +6 -4
  37. package/dist/{chunk-AQRUQNFB.js → chunk-7HW2CMIN.js} +10 -8
  38. package/dist/{chunk-AGOLEMHK.js → chunk-7NLYSTEK.js} +10 -8
  39. package/dist/{chunk-YHMPDIRG.js → chunk-7QZDGM5V.js} +6 -4
  40. package/dist/{chunk-MEJ63LDG.js → chunk-7U6PBBXG.js} +11 -9
  41. package/dist/{chunk-UTPIFH4I.js → chunk-7UYRN4ON.js} +5 -3
  42. package/dist/{chunk-5OXKCH4Z.js → chunk-7X3WLAKP.js} +93 -40
  43. package/dist/{chunk-7IFTSAHP.js → chunk-7YFUNWFM.js} +10 -8
  44. package/dist/chunk-7YSMZEO3.js +55 -0
  45. package/dist/{chunk-RPQITJNX.js → chunk-A3AADMM2.js} +10 -8
  46. package/dist/{chunk-VK7WYA64.js → chunk-A3J75BO2.js} +14 -12
  47. package/dist/chunk-AENMOZMM.js +42 -0
  48. package/dist/{chunk-7K5OH45X.js → chunk-AGAFNUYZ.js} +87 -10
  49. package/dist/{chunk-VKTXFFOZ.js → chunk-AYWJMHSX.js} +5 -3
  50. package/dist/{chunk-3UHV76UD.js → chunk-B2U4AOZ5.js} +41 -38
  51. package/dist/chunk-BDKYHCGI.js +71 -0
  52. package/dist/{chunk-RQQYEDAC.js → chunk-BEDZNT62.js} +12 -9
  53. package/dist/{chunk-PGAMTKBI.js → chunk-BIQNPWGX.js} +6 -4
  54. package/dist/{chunk-LSHSDC6S.js → chunk-BJDVI5W6.js} +19 -17
  55. package/dist/{chunk-PFULMC2D.js → chunk-BMMTWRWE.js} +22 -20
  56. package/dist/{chunk-KT6Q44CA.js → chunk-BPDS7KUR.js} +27 -25
  57. package/dist/{chunk-7XYLNQFO.js → chunk-BS52P2CM.js} +13 -5
  58. package/dist/{chunk-TABH4RBZ.js → chunk-C5LX54QK.js} +16 -14
  59. package/dist/{chunk-NCLZJCXA.js → chunk-CB6H7MH2.js} +23 -21
  60. package/dist/{chunk-CZ2ZS7AT.js → chunk-CGVRLQAY.js} +2166 -326
  61. package/dist/{chunk-HJQVUOUL.js → chunk-CMUJSPP4.js} +13 -11
  62. package/dist/{chunk-CT6NINGR.js → chunk-CNF7D3A7.js} +3 -3
  63. package/dist/{chunk-BP33TBLI.js → chunk-CPFAWYVC.js} +9 -7
  64. package/dist/chunk-CQRFCWQV.js +45 -0
  65. package/dist/chunk-CTJHEG6A.js +97 -0
  66. package/dist/{chunk-SCT4CEF7.js → chunk-CVWKS6GO.js} +22 -20
  67. package/dist/chunk-D2CGJ7RR.js +46 -0
  68. package/dist/{chunk-K757G7AD.js → chunk-D45K3XKK.js} +19 -16
  69. package/dist/chunk-D7QIZLWB.js +38 -0
  70. package/dist/{chunk-YERAAEO4.js → chunk-DAHKLVHU.js} +15 -13
  71. package/dist/{chunk-OPWGPQ2N.js → chunk-DBVQEPZB.js} +8 -6
  72. package/dist/{chunk-T33TPFGI.js → chunk-DCPI3ETH.js} +24 -22
  73. package/dist/{chunk-RRQUQAXP.js → chunk-DJ4C5ELF.js} +5 -2
  74. package/dist/{chunk-RCG5IAAT.js → chunk-DLNQ3HUM.js} +12 -10
  75. package/dist/chunk-DM3H4V2G.js +62 -0
  76. package/dist/{chunk-EVTI22PQ.js → chunk-DMQJDHXG.js} +7 -4
  77. package/dist/{chunk-5VTIWEWP.js → chunk-DPZD7WVX.js} +4 -2
  78. package/dist/{chunk-WF3RCZNO.js → chunk-DYVUNT4O.js} +9 -7
  79. package/dist/{chunk-2UMSHYCB.js → chunk-E2OP6JNF.js} +26 -24
  80. package/dist/{chunk-6Y4FXOMI.js → chunk-E7PR4WMM.js} +24 -22
  81. package/dist/{chunk-TNCF26JK.js → chunk-EAGSM3XY.js} +14 -12
  82. package/dist/{chunk-X5ZHDSLU.js → chunk-EJGUEUXG.js} +25 -23
  83. package/dist/chunk-ELKTDXV3.js +67 -0
  84. package/dist/{chunk-T3FNG2H2.js → chunk-ELNIQYLR.js} +14 -12
  85. package/dist/{chunk-DHKDH464.js → chunk-ELNLHU7Y.js} +6 -4
  86. package/dist/{chunk-CA3DKO4D.js → chunk-EM7F6XEU.js} +4 -2
  87. package/dist/{chunk-K4OXYSGS.js → chunk-EP7ZBZLT.js} +7 -5
  88. package/dist/chunk-EPXYFJTY.js +278 -0
  89. package/dist/{chunk-MBYYQHPM.js → chunk-EUCATH2U.js} +6 -4
  90. package/dist/{chunk-73CC73I4.js → chunk-EXCXNDTQ.js} +1 -1
  91. package/dist/{chunk-SRTUETF5.js → chunk-EXGXCVWC.js} +24 -22
  92. package/dist/{chunk-BYBU2EIB.js → chunk-F36DIKJ3.js} +23 -21
  93. package/dist/{chunk-P22EPEBR.js → chunk-F4WKGX7K.js} +18 -16
  94. package/dist/{chunk-ZJGCGKA4.js → chunk-F56DNMDD.js} +5 -3
  95. package/dist/chunk-FJS2FZFZ.js +41 -0
  96. package/dist/{chunk-2YSD6E6V.js → chunk-FNP4M4VL.js} +42 -33
  97. package/dist/{chunk-B4AEL3RF.js → chunk-G3ZFEHCX.js} +21 -107
  98. package/dist/{chunk-XOMEQVLK.js → chunk-G5P7F6RQ.js} +5 -3
  99. package/dist/chunk-GAU2IFIC.js +33 -0
  100. package/dist/{chunk-XNFM6WUK.js → chunk-GAVEIYKH.js} +21 -18
  101. package/dist/{chunk-TUM52SOE.js → chunk-GD6FXN6R.js} +17 -15
  102. package/dist/{chunk-D6BVLTDV.js → chunk-GDGE7ZHC.js} +28 -26
  103. package/dist/{chunk-SYP56T2D.js → chunk-GIOOA2ZO.js} +7 -4
  104. package/dist/chunk-GLISHJ4G.js +21345 -0
  105. package/dist/chunk-GPOL5H3B.js +55 -0
  106. package/dist/{chunk-ZFHFC74B.js → chunk-GVOQJPKA.js} +20 -18
  107. package/dist/{chunk-G7VBMOZH.js → chunk-GX67TNFA.js} +3 -3
  108. package/dist/{chunk-VNIN7Q6Q.js → chunk-H75SPCAW.js} +18 -16
  109. package/dist/{chunk-J4CPHJUL.js → chunk-H7GAPNGQ.js} +29 -18
  110. package/dist/{chunk-X7ZKNSK4.js → chunk-HD72AL3L.js} +20 -18
  111. package/dist/{chunk-FBCVC2GJ.js → chunk-HHZ2ZKUD.js} +16 -13
  112. package/dist/{chunk-K4RNVDR4.js → chunk-HHZEXF7V.js} +8 -6
  113. package/dist/{chunk-OK6JGLE7.js → chunk-HR34F2AJ.js} +14 -12
  114. package/dist/{chunk-3MYBT62N.js → chunk-HU7VXMFV.js} +9 -7
  115. package/dist/{chunk-LPDTDFKA.js → chunk-HV3KPEFH.js} +18 -16
  116. package/dist/{chunk-4ETO2FXE.js → chunk-I2M7MXSV.js} +14 -12
  117. package/dist/{chunk-W3AZE7LN.js → chunk-IDTVBZQI.js} +3 -3
  118. package/dist/{chunk-BFL4PO64.js → chunk-IFDCCCEN.js} +6 -4
  119. package/dist/{chunk-3ZA3AK2D.js → chunk-IKRM64KR.js} +12 -10
  120. package/dist/{chunk-JMEWJPF2.js → chunk-IMTAHDME.js} +7 -7
  121. package/dist/{chunk-DCRYOMTM.js → chunk-IP6TSICI.js} +14 -12
  122. package/dist/{chunk-PT4USJNN.js → chunk-IW3QMW3X.js} +10 -8
  123. package/dist/{chunk-MLGWSBF4.js → chunk-IWQEZFVV.js} +261 -62
  124. package/dist/{chunk-C6ORPLCN.js → chunk-J65TN6QU.js} +7 -5
  125. package/dist/{chunk-QBMLBCQH.js → chunk-JCKKAELC.js} +16 -13
  126. package/dist/{chunk-XGO74QWR.js → chunk-JJEPU4VS.js} +7 -5
  127. package/dist/{chunk-BFMTGNAQ.js → chunk-JKEUPSCE.js} +5 -3
  128. package/dist/{chunk-HMZ2DRBC.js → chunk-JMOZ6K5A.js} +16 -5
  129. package/dist/{chunk-WZYM5M4U.js → chunk-JQGWP3SC.js} +19 -17
  130. package/dist/{chunk-ZR6J4QFQ.js → chunk-JWLABUXL.js} +13 -11
  131. package/dist/{chunk-EXJZBL5N.js → chunk-JXLUHMTC.js} +23 -21
  132. package/dist/{chunk-DSHRA72L.js → chunk-K373N5U6.js} +13 -11
  133. package/dist/{chunk-WYGTSZHR.js → chunk-K3OIBTCV.js} +16 -14
  134. package/dist/{chunk-BAY4K55I.js → chunk-K4C2DWOZ.js} +16 -13
  135. package/dist/{chunk-GOZLTLRY.js → chunk-K77ILFUQ.js} +4 -4
  136. package/dist/{chunk-4R3TO4VL.js → chunk-KFDOL2Y4.js} +19 -17
  137. package/dist/{chunk-T6MX7WXM.js → chunk-KGT5RIGE.js} +30 -13
  138. package/dist/{chunk-SWNKO4C4.js → chunk-KJPKIU2R.js} +29 -26
  139. package/dist/{chunk-T7IIEDA3.js → chunk-KN4UQJ7R.js} +6 -4
  140. package/dist/{chunk-AVMWESFZ.js → chunk-KW4DIXUL.js} +6 -3
  141. package/dist/{chunk-FRAEQVYN.js → chunk-KY3BUZYI.js} +24 -22
  142. package/dist/{chunk-FMJYKLDY.js → chunk-LGE6H4UP.js} +15 -8
  143. package/dist/{chunk-XAPXKFIS.js → chunk-LKRMVWXB.js} +33 -24
  144. package/dist/{chunk-BUUJ7N4O.js → chunk-LMNCRSER.js} +31 -11
  145. package/dist/{chunk-TMFMXQEN.js → chunk-LNGFTPU7.js} +22 -19
  146. package/dist/{chunk-N2YX6JMY.js → chunk-LOJGNSPA.js} +28 -23
  147. package/dist/{chunk-6ZSYLZ7O.js → chunk-LP5QGTCR.js} +3 -3
  148. package/dist/{chunk-S35DIFJH.js → chunk-LPXH2DA4.js} +19 -17
  149. package/dist/{chunk-FRCOKUU4.js → chunk-LQD3R6NZ.js} +9 -7
  150. package/dist/{chunk-FPBUTZI5.js → chunk-LZFKJ2BR.js} +3233 -22921
  151. package/dist/{chunk-TDSCKP3V.js → chunk-M6HI36T3.js} +2 -2
  152. package/dist/{chunk-SK5RVP7X.js → chunk-M7XNX5IC.js} +11 -9
  153. package/dist/{chunk-RGZFOKVO.js → chunk-MELS6T5J.js} +6 -4
  154. package/dist/{chunk-6NN36LVK.js → chunk-MJAIBPI5.js} +3 -3
  155. package/dist/{chunk-Y2H7X3VI.js → chunk-MJMEF7SD.js} +10 -8
  156. package/dist/{chunk-FTLYXMHA.js → chunk-MJOIMGS4.js} +7 -5
  157. package/dist/chunk-MLUHBVCI.js +45 -0
  158. package/dist/{chunk-JXAKYP45.js → chunk-MM5OAVSW.js} +27 -25
  159. package/dist/{chunk-6ZFF7XSL.js → chunk-MM7YWUBB.js} +6 -6
  160. package/dist/{chunk-S5GSQPIN.js → chunk-MN2XDLDM.js} +18 -16
  161. package/dist/{chunk-MNIPPBCT.js → chunk-MWOPED6I.js} +7 -5
  162. package/dist/{chunk-JFFKHIM6.js → chunk-MXPKXCGP.js} +1 -1
  163. package/dist/{chunk-IYNCSYU4.js → chunk-MZTU5L6S.js} +6 -4
  164. package/dist/{chunk-NAPHHWW2.js → chunk-N3OEBQTA.js} +3 -3
  165. package/dist/{chunk-PCCLVIDP.js → chunk-N6SSI6XO.js} +25 -22
  166. package/dist/{chunk-POSDBRKV.js → chunk-NB664KWQ.js} +28 -25
  167. package/dist/{chunk-Z3RAFU5B.js → chunk-NL6GIEJU.js} +17 -15
  168. package/dist/{chunk-ISG547IS.js → chunk-NMBHFSJQ.js} +24 -22
  169. package/dist/{chunk-CFUDAW3R.js → chunk-NMGFXT4S.js} +17 -15
  170. package/dist/{chunk-ZENHDXRZ.js → chunk-NPZ4KXIV.js} +20 -18
  171. package/dist/{chunk-CQ7RF4QN.js → chunk-NQLTWGF4.js} +6 -4
  172. package/dist/{chunk-KTNOBTV5.js → chunk-O6DJMDBR.js} +6 -4
  173. package/dist/{chunk-MH2ZK67S.js → chunk-OEUTV6EL.js} +15 -12
  174. package/dist/{chunk-CKVBDVIW.js → chunk-OMSH46JK.js} +6 -4
  175. package/dist/chunk-ONB7M2AF.js +52 -0
  176. package/dist/{chunk-QX4MAMUG.js → chunk-OOU4N2JQ.js} +136 -30
  177. package/dist/{chunk-4MYHETJ3.js → chunk-OW53P52N.js} +20 -18
  178. package/dist/{chunk-APDN6UOR.js → chunk-P4QTTCVK.js} +20 -18
  179. package/dist/{chunk-JSP73CDW.js → chunk-P56N3NPT.js} +8 -5
  180. package/dist/{chunk-CS4BMJLL.js → chunk-PCZ4C2V7.js} +7 -5
  181. package/dist/{chunk-A4JXVO5O.js → chunk-PGKCRK77.js} +10 -8
  182. package/dist/{chunk-RLZFL76D.js → chunk-PYVFLITV.js} +15 -13
  183. package/dist/{chunk-Z2D4P3R3.js → chunk-Q52KWTG5.js} +14 -12
  184. package/dist/{chunk-YD3KTW4H.js → chunk-Q6UYUCNS.js} +14 -12
  185. package/dist/chunk-QBK33722.js +51 -0
  186. package/dist/{chunk-L3RCQWVQ.js → chunk-QE444DZ2.js} +53 -26
  187. package/dist/{chunk-Y5IE6YKD.js → chunk-QEP4HTJE.js} +6 -4
  188. package/dist/{chunk-FSN6JFXB.js → chunk-QFOJ3UPU.js} +25 -19
  189. package/dist/{chunk-3424TLIJ.js → chunk-QQD25YNF.js} +12 -10
  190. package/dist/{chunk-HRS5O7VV.js → chunk-QSKY7FE3.js} +21 -17
  191. package/dist/{chunk-LO6Y7OTG.js → chunk-R6HJ4SDB.js} +10 -7
  192. package/dist/{chunk-QLWDIKO4.js → chunk-RFQW7XT3.js} +20 -17
  193. package/dist/{chunk-4GAB5ZOZ.js → chunk-RL7PETU6.js} +30 -26
  194. package/dist/{chunk-66AQ2JIU.js → chunk-ROVOAF2O.js} +13 -11
  195. package/dist/{chunk-UJF7PIMP.js → chunk-RSA5JJMN.js} +58 -34
  196. package/dist/{chunk-J32IPTVQ.js → chunk-RX56MZLX.js} +22 -20
  197. package/dist/chunk-S7I7SLZN.js +59 -0
  198. package/dist/{chunk-S6W3D5GS.js → chunk-S7UQFI4B.js} +29 -26
  199. package/dist/{chunk-TVQSXWWV.js → chunk-SBNBVUOF.js} +35 -33
  200. package/dist/{chunk-POEMZECG.js → chunk-SD3PGZSR.js} +1 -1
  201. package/dist/{chunk-EMVZIOOD.js → chunk-SEBBJQWK.js} +17 -15
  202. package/dist/{chunk-MWF4PXQR.js → chunk-SGTAQNOP.js} +37 -34
  203. package/dist/{chunk-HUGQZQ2K.js → chunk-SHWHRCMU.js} +9 -7
  204. package/dist/{chunk-POSZFDSQ.js → chunk-SRLUADSY.js} +6 -4
  205. package/dist/{chunk-J25YOUIZ.js → chunk-SXF66YNZ.js} +6 -4
  206. package/dist/{chunk-PRMUQUWN.js → chunk-T5QYYB5L.js} +16 -14
  207. package/dist/{chunk-OSYHGGL3.js → chunk-TAIYQDIV.js} +20 -18
  208. package/dist/{chunk-NROSSWMS.js → chunk-TIOYZDRB.js} +8 -6
  209. package/dist/{chunk-S6LW2RRC.js → chunk-TKCNJJ2S.js} +10 -8
  210. package/dist/{chunk-T6MAWL5P.js → chunk-TVFADTAT.js} +6 -4
  211. package/dist/{chunk-FMR2D3AZ.js → chunk-U4HZ5CXL.js} +8 -6
  212. package/dist/{chunk-XMUWPA56.js → chunk-U7F6E5M3.js} +27 -24
  213. package/dist/{chunk-FL344WQD.js → chunk-U7YZ3IRI.js} +6 -4
  214. package/dist/{chunk-OCQWSFJD.js → chunk-UCKG6UE7.js} +14 -12
  215. package/dist/{chunk-LM45GMMB.js → chunk-UCQB6NKS.js} +7 -7
  216. package/dist/{chunk-6SNTHK43.js → chunk-UI7ID4HG.js} +24 -19
  217. package/dist/{chunk-S5XFO4GY.js → chunk-UJ535VWR.js} +6 -4
  218. package/dist/chunk-UKMA5JFE.js +52 -0
  219. package/dist/{chunk-E3PDCQRH.js → chunk-UR6JGVX2.js} +299 -247
  220. package/dist/{chunk-IMZFOMVX.js → chunk-USH4VU5D.js} +5 -3
  221. package/dist/{chunk-V7PEHQZU.js → chunk-UTYL4XVA.js} +21 -19
  222. package/dist/{chunk-NC755EKE.js → chunk-UTZMF5CV.js} +1 -1
  223. package/dist/{chunk-FQVSLBTV.js → chunk-UVKJVTKX.js} +3 -3
  224. package/dist/{chunk-Q367UGYN.js → chunk-V7T6URII.js} +10 -8
  225. package/dist/{chunk-6RYB3EET.js → chunk-VAZYNF6I.js} +14 -12
  226. package/dist/{chunk-J2H7YG3K.js → chunk-VBJHIRKV.js} +5 -3
  227. package/dist/{chunk-QVVGJVVX.js → chunk-VOBG7BLB.js} +18 -16
  228. package/dist/{chunk-7XWJ6ED2.js → chunk-W2W7YCFL.js} +16 -13
  229. package/dist/{chunk-XFDDJQT7.js → chunk-WA644MUQ.js} +15 -13
  230. package/dist/{chunk-6NCPLIIP.js → chunk-WDJGJ3HV.js} +441 -365
  231. package/dist/chunk-WGOQZ4PQ.js +488 -0
  232. package/dist/{chunk-3EWKO457.js → chunk-WS7KBKP4.js} +8 -6
  233. package/dist/chunk-X7QLAUNS.js +47 -0
  234. package/dist/{chunk-4FLNCK6Q.js → chunk-XC5ZDFW7.js} +13 -11
  235. package/dist/{chunk-VRO7KSGL.js → chunk-XF5UMMQL.js} +23 -21
  236. package/dist/{chunk-WOMQQWTO.js → chunk-XM3JE4QY.js} +7 -5
  237. package/dist/{chunk-73GFVW2L.js → chunk-XP5DF5MC.js} +51 -14
  238. package/dist/{chunk-W5VYJWOG.js → chunk-XUCHGEF5.js} +25 -23
  239. package/dist/{chunk-AFBCNZRZ.js → chunk-XVQQ3BQS.js} +26 -24
  240. package/dist/{chunk-VJFXQISZ.js → chunk-XXJSGCDO.js} +13 -9
  241. package/dist/{chunk-WXVTYLVH.js → chunk-XY6FVBBV.js} +4 -4
  242. package/dist/{chunk-QAVRDONY.js → chunk-XZQBFF65.js} +121 -119
  243. package/dist/{chunk-LZVHP7CT.js → chunk-Y3J365UC.js} +7 -5
  244. package/dist/{chunk-GUGQSIQM.js → chunk-Y6KPWRZJ.js} +11 -9
  245. package/dist/{chunk-ZNHQGG7J.js → chunk-YAUMNRCB.js} +4 -4
  246. package/dist/{chunk-6R5VHR3N.js → chunk-YEGGQG5E.js} +9 -7
  247. package/dist/{chunk-LHH5KG5A.js → chunk-YGNQUFVZ.js} +3 -3
  248. package/dist/{chunk-CMB7FXHJ.js → chunk-YGS2YVF2.js} +16 -14
  249. package/dist/{chunk-IKAW2KJU.js → chunk-YRKAJ42V.js} +525 -287
  250. package/dist/{chunk-7YQBDE5W.js → chunk-Z3KEX7ON.js} +6 -4
  251. package/dist/{chunk-ZNTTW4IT.js → chunk-Z4N7BKLN.js} +7 -5
  252. package/dist/{chunk-75OMRKY2.js → chunk-ZD64ZR64.js} +7 -5
  253. package/dist/{chunk-3ASYYMOX.js → chunk-ZJQ64T6M.js} +10 -8
  254. package/dist/files.json +563 -547
  255. package/dist/packages/sdk/npm/index.js +5530 -4902
  256. package/dist/packages/ui/dist/assets/{elk-api-DxfAMOJq.js → elk-api-ts8TigYQ.js} +2 -2
  257. package/dist/packages/ui/dist/assets/index-CIfmX7DJ.css +1 -0
  258. package/dist/packages/ui/dist/assets/index-DNtpSfZS.js +63 -0
  259. package/dist/packages/ui/dist/index.html +2 -2
  260. package/package.json +3 -3
  261. package/dist/chunk-5MYE42AP.js +0 -43
  262. package/dist/chunk-5O7U67UA.js +0 -57
  263. package/dist/chunk-6JVPBGQG.js +0 -50
  264. package/dist/chunk-AHFQHPFF.js +0 -49
  265. package/dist/chunk-CXTG6AWM.js +0 -40
  266. package/dist/chunk-GPNMSX5H.js +0 -36
  267. package/dist/chunk-HMWJWYE2.js +0 -31
  268. package/dist/chunk-ICBGVVRI.js +0 -317
  269. package/dist/chunk-J2CDBSFP.js +0 -69
  270. package/dist/chunk-NKJDO4UC.js +0 -39
  271. package/dist/chunk-NOYOFYAJ.js +0 -59
  272. package/dist/chunk-OXXZZ7HQ.js +0 -50
  273. package/dist/chunk-P4YUT7W7.js +0 -45
  274. package/dist/chunk-RQSLHZ7T.js +0 -36
  275. package/dist/chunk-RYQ4JCFT.js +0 -65
  276. package/dist/chunk-UMCDODBX.js +0 -53
  277. package/dist/chunk-VJZI6KFP.js +0 -47
  278. package/dist/chunk-W4TNCEI4.js +0 -44
  279. package/dist/chunk-XLZAAAPX.js +0 -43
  280. package/dist/packages/ui/dist/assets/index-Buit9TfP.js +0 -62
  281. package/dist/packages/ui/dist/assets/index-Jyc9dFeZ.css +0 -1
@@ -8,18 +8,18 @@ import {
8
8
  rereadPlan,
9
9
  sameCommit,
10
10
  verifyFacts
11
- } from "./chunk-CZ2ZS7AT.js";
11
+ } from "./chunk-CGVRLQAY.js";
12
12
  import {
13
13
  featuresForScan,
14
14
  namingHint,
15
15
  syncSources
16
- } from "./chunk-4GAB5ZOZ.js";
16
+ } from "./chunk-RL7PETU6.js";
17
17
  import {
18
18
  scanInputs
19
- } from "./chunk-A4JXVO5O.js";
19
+ } from "./chunk-PGKCRK77.js";
20
20
  import {
21
21
  listIngestors
22
- } from "./chunk-TDSCKP3V.js";
22
+ } from "./chunk-M6HI36T3.js";
23
23
  import {
24
24
  BUILT_IN_EXTRACTORS,
25
25
  MODEL_READERS,
@@ -34,7 +34,7 @@ import {
34
34
  runDialectTests,
35
35
  runFrameworkTests,
36
36
  unmodelledFrameworks
37
- } from "./chunk-G6EFXTUO.js";
37
+ } from "./chunk-2VN4TLGI.js";
38
38
  import {
39
39
  DEFAULT_IGNORES,
40
40
  configHash,
@@ -46,31 +46,24 @@ import {
46
46
  sandboxedExtractor,
47
47
  scanRepo,
48
48
  withParseCache
49
- } from "./chunk-PQQKZPBU.js";
49
+ } from "./chunk-4U3JLIRC.js";
50
+ import {
51
+ buildContextPack,
52
+ toRunSummary
53
+ } from "./chunk-QQD25YNF.js";
50
54
  import {
51
55
  baseClonePath,
52
56
  changesSince,
53
57
  checkoutState,
54
58
  inPlaceDir
55
- } from "./chunk-3EWKO457.js";
56
- import {
57
- buildContextPack,
58
- toRunSummary
59
- } from "./chunk-3424TLIJ.js";
59
+ } from "./chunk-WS7KBKP4.js";
60
60
  import {
61
- AgentDefinition,
62
61
  DECLARED_CALLER,
63
- DEFAULT_SPEC_TEMPLATE,
64
62
  HOSTS_NONE,
65
63
  HOSTS_OUTSIDE_INTERNAL,
66
64
  HOSTS_OUTSIDE_VENDOR,
67
- IsoDateTime,
68
- NEVER_CHECKED_STEPS,
65
+ HOSTS_STEP,
69
66
  NO_TARGET,
70
- PluginExpected,
71
- REPO_TYPE_SCHEMA_VERSION,
72
- RecordId,
73
- SCAN_SETTINGS_SCHEMA_VERSION,
74
67
  TARGETS_ANOTHER_LABEL,
75
68
  TARGETS_SPLIT_LABEL,
76
69
  TARGETS_STEP_ID,
@@ -83,31 +76,26 @@ import {
83
76
  callTargetQuestion,
84
77
  callerRecords,
85
78
  catalogDirOf,
86
- cmpNatural,
87
- cmpText,
88
- conventionsOf,
89
79
  declaredCallsOf,
90
80
  deserializeRecord,
91
- effectiveComponentTypes,
92
- external_exports,
93
81
  factIdPart,
94
82
  factsDirOf,
95
83
  factsRelOf,
96
84
  fieldKey,
97
85
  flowFiles,
98
86
  helperOn,
99
- hostMatches,
87
+ hostOfQuestion,
100
88
  hostQuestionText,
101
89
  identifierWords,
102
- isAiBy,
90
+ ignoreOption,
91
+ ignoredAnswer,
103
92
  isGuessedJoin,
104
- isPathMatch,
105
93
  isPrototypeType,
106
94
  joinCallers,
107
- joinConventions,
108
95
  joinFacts,
109
96
  joinFlagsOf,
110
97
  joinGuessesOf,
98
+ joinHostOfQuestion,
111
99
  joinRecords,
112
100
  joinSharedMaps,
113
101
  joinTerms,
@@ -116,15 +104,16 @@ import {
116
104
  lineNamesWord,
117
105
  linkEvidenceOf,
118
106
  listQuestions,
119
- loadOrgPack,
120
107
  mergeCatalog,
121
- normalizePath,
122
108
  orgPackDirOf,
109
+ outsideBoundaryOf,
123
110
  outsideSystemOf,
111
+ outsideSystemOfJoinHost,
124
112
  pairsFromCorrections,
125
113
  parseCorrections,
126
114
  parseFacts,
127
115
  parseRecord,
116
+ placeholderIn,
128
117
  projectFacts,
129
118
  questionId,
130
119
  readParsedFiles,
@@ -132,7 +121,6 @@ import {
132
121
  serializeRecord,
133
122
  sharedJoinAbout,
134
123
  singularNoun,
135
- slugify,
136
124
  specFileHash,
137
125
  specFindingFingerprint,
138
126
  stackHelpersOff,
@@ -142,14 +130,38 @@ import {
142
130
  throwIfCancelled,
143
131
  toCanonicalYaml,
144
132
  topicOfQuestion,
145
- topicQuestionText,
133
+ topicQuestionText
134
+ } from "./chunk-GLISHJ4G.js";
135
+ import {
136
+ writeFileAtomic
137
+ } from "./chunk-G3ZFEHCX.js";
138
+ import {
139
+ AgentDefinition,
140
+ DEFAULT_SPEC_TEMPLATE,
141
+ IsoDateTime,
142
+ NEVER_CHECKED_STEPS,
143
+ PluginExpected,
144
+ REPO_TYPE_SCHEMA_VERSION,
145
+ RecordId,
146
+ SCAN_SETTINGS_SCHEMA_VERSION,
147
+ cmpNatural,
148
+ cmpText,
149
+ conventionsOf,
150
+ effectiveComponentTypes,
151
+ external_exports,
152
+ hostMatches,
153
+ isAiBy,
154
+ isPathMatch,
155
+ joinConventions,
156
+ loadOrgPack,
157
+ normalizePath,
158
+ slugify,
146
159
  urlHostPort
147
- } from "./chunk-FPBUTZI5.js";
160
+ } from "./chunk-LZFKJ2BR.js";
148
161
  import {
149
162
  SCHEMA_VERSION,
150
- keptParse,
151
- writeFileAtomic
152
- } from "./chunk-B4AEL3RF.js";
163
+ keptParse
164
+ } from "./chunk-CTJHEG6A.js";
153
165
  import {
154
166
  require_dist
155
167
  } from "./chunk-BQGDB6ZL.js";
@@ -1482,17 +1494,404 @@ function estateMergeInput(op, repos, records, modulesOf = (id) => repos.find((r)
1482
1494
  function mergeEstate(op, repos, records, modulesOf, read) {
1483
1495
  return mergeCatalog(estateMergeInput(op, repos, records, modulesOf, read));
1484
1496
  }
1485
- function curatedDirOf(root, op) {
1486
- return join5(root, ...op.sources.layout.catalog.split("/"), "curated");
1497
+ function curatedDirOf(root, op) {
1498
+ return join5(root, ...op.sources.layout.catalog.split("/"), "curated");
1499
+ }
1500
+
1501
+ // packages/scanner/dist/facts-scan.js
1502
+ import { readFile as readFile4 } from "node:fs/promises";
1503
+ import { join as join6 } from "node:path";
1504
+
1505
+ // packages/scanner/dist/facts-catalog.js
1506
+ import { createHash as createHash2 } from "node:crypto";
1507
+
1508
+ // packages/scanner/dist/hosts-asked.js
1509
+ var segs = (p) => p.split(/[?#]/)[0].split("/").filter(Boolean).map((x) => /^[{:<$]/.test(x) ? "{}" : x);
1510
+ var underPath = (path, base2) => {
1511
+ const b = segs(base2);
1512
+ const c = segs(path);
1513
+ return b.length > 0 && b.length <= c.length && b.every((x, i) => x === c[i]);
1514
+ };
1515
+ var servesPath = (entry, path) => {
1516
+ const e = segs(entry);
1517
+ const c = segs(path);
1518
+ return e.length === c.length && e.every((x, i) => x === "{}" || c[i] === "{}" || x === c[i]);
1519
+ };
1520
+ var HTTP_TYPES = /* @__PURE__ */ new Set(["rest", "graphql", "soap", "websocket", "sse", "webhook"]);
1521
+ var CONFIG_FILES = [
1522
+ "**/application*.properties",
1523
+ "**/application*.yml",
1524
+ "**/application*.yaml",
1525
+ "**/bootstrap*.properties",
1526
+ "**/bootstrap*.yml",
1527
+ "**/bootstrap*.yaml",
1528
+ "**/.env",
1529
+ "**/.env.*",
1530
+ "**/Dockerfile",
1531
+ "**/docker-compose*.yml",
1532
+ "**/docker-compose*.yaml",
1533
+ "**/compose*.yml",
1534
+ "**/compose*.yaml",
1535
+ "**/package.json"
1536
+ ];
1537
+ function lineSetsPort(line, port) {
1538
+ const p = String(port);
1539
+ const end = "(?![0-9])";
1540
+ return [
1541
+ new RegExp(`port["']?\\s*[:=]\\s*["']?${p}${end}`, "i"),
1542
+ new RegExp(`^\\s*EXPOSE\\s+(?:[0-9]+(?:/[a-z]+)?\\s+)*${p}${end}`, "i"),
1543
+ new RegExp(`--port[=\\s]+${p}${end}`, "i"),
1544
+ new RegExp(`(?:^|[\\s"'-])${p}:[0-9]+`)
1545
+ ].some((re) => re.test(line));
1546
+ }
1547
+ function callHost(url) {
1548
+ if (url.includes("${"))
1549
+ return void 0;
1550
+ if (tokenHost(url))
1551
+ return void 0;
1552
+ const hp = urlHostPort(url);
1553
+ if (!hp || !hp.host)
1554
+ return void 0;
1555
+ const explicit = /^[a-z][a-z0-9+.-]*:\/\/(?:[^/@?#]*@)?[^/:?#]+:(\d+)/i.exec(url);
1556
+ return {
1557
+ label: explicit ? `${hp.host}:${explicit[1]}` : hp.host,
1558
+ host: hp.host,
1559
+ ...hp.port !== void 0 ? { port: hp.port } : {}
1560
+ };
1561
+ }
1562
+ function tokenHost(url) {
1563
+ const authority = /^[a-z][a-z0-9+.-]*:\/\/([^/?#]*)/i.exec(url)?.[1] ?? url;
1564
+ return !!placeholderIn(authority);
1565
+ }
1566
+ var callHostLabel = (url) => callHost(url)?.label;
1567
+ async function unknownHosts(o) {
1568
+ const patterns = o.repos.flatMap((r) => [
1569
+ ...r.hosts,
1570
+ ...(r.modules ?? []).flatMap((m) => m.hosts)
1571
+ ]);
1572
+ const byHost = /* @__PURE__ */ new Map();
1573
+ for (const r of o.records) {
1574
+ if (r.kind !== "Unresolved" || r.unresolvedKind !== "http-call")
1575
+ continue;
1576
+ const url = r.raw.slice(r.raw.indexOf(" ") + 1);
1577
+ const h = callHost(url);
1578
+ if (!h)
1579
+ continue;
1580
+ if (patterns.some((p) => hostMatches(p, h.host, h.port)))
1581
+ continue;
1582
+ const e = r.evidence[0];
1583
+ const repo = e?.repo ?? r.owner;
1584
+ if (!e?.path || e.line === void 0 || !repo)
1585
+ continue;
1586
+ const entry = byHost.get(h.label) ?? {
1587
+ ...h.port !== void 0 ? { port: h.port } : {},
1588
+ explicit: h.label !== h.host,
1589
+ calls: [],
1590
+ paths: /* @__PURE__ */ new Set()
1591
+ };
1592
+ const path = /^[a-z][a-z0-9+.-]*:\/\/[^/?#]*(\/[^?#]*)?/i.exec(url)?.[1];
1593
+ if (path)
1594
+ entry.paths.add(path);
1595
+ const at3 = `${e.path}:${e.line}`;
1596
+ if (!entry.calls.some((c) => c.repo === repo && c.at === at3))
1597
+ entry.calls.push({ repo, at: at3 });
1598
+ byHost.set(h.label, entry);
1599
+ }
1600
+ if (byHost.size === 0)
1601
+ return [];
1602
+ const compRepo = /* @__PURE__ */ new Map();
1603
+ for (const r of o.repos) {
1604
+ compRepo.set(r.component ?? r.id, r.id);
1605
+ for (const m of r.modules ?? [])
1606
+ compRepo.set(m.component, r.id);
1607
+ }
1608
+ const serving = /* @__PURE__ */ new Set();
1609
+ for (const r of o.records)
1610
+ if (r.kind === "Endpoint" && HTTP_TYPES.has(r.endpointType)) {
1611
+ const repo = compRepo.get(r.component);
1612
+ if (repo)
1613
+ serving.add(repo);
1614
+ }
1615
+ const servers = [...serving].sort();
1616
+ const configs = /* @__PURE__ */ new Map();
1617
+ const configOf = async (repo) => {
1618
+ if (configs.has(repo))
1619
+ return configs.get(repo);
1620
+ const h = o.handle(repo);
1621
+ const out = [];
1622
+ if (h)
1623
+ for await (const path of h.listFiles(CONFIG_FILES)) {
1624
+ const t = await h.readText(path).catch(() => void 0);
1625
+ if (t !== void 0)
1626
+ out.push({ path, lines: t.replace(/\r\n?/g, "\n").split("\n") });
1627
+ }
1628
+ configs.set(repo, out);
1629
+ return out;
1630
+ };
1631
+ const asks = [];
1632
+ for (const [host, entry] of [...byHost.entries()].sort(([a], [b]) => cmpText(a, b))) {
1633
+ if (servers.length === 0)
1634
+ continue;
1635
+ const hits = [];
1636
+ if (entry.explicit && entry.port !== void 0)
1637
+ for (const repo of servers) {
1638
+ hit: for (const f of await configOf(repo))
1639
+ for (const [i, l] of f.lines.entries())
1640
+ if (lineSetsPort(l, entry.port)) {
1641
+ hits.push({ repo, at: `${f.path}:${i + 1}`, line: l.trim() });
1642
+ break hit;
1643
+ }
1644
+ }
1645
+ const suggest = hits.length === 1 ? hits[0] : void 0;
1646
+ const calls = entry.calls.sort((a, b) => cmpText(a.repo, b.repo) || cmpNatural(a.at, b.at));
1647
+ const byPath = [];
1648
+ for (const g of o.records) {
1649
+ if (g.kind !== "GatewayRoute")
1650
+ continue;
1651
+ const repo = g.evidence.find((e) => e.repo)?.repo;
1652
+ if (!repo || byPath.some((b) => b.repo === repo))
1653
+ continue;
1654
+ const under2 = [...entry.paths].filter((p) => underPath(p, g.basepath));
1655
+ if (!under2.length)
1656
+ continue;
1657
+ const comps = new Set([...compRepo].filter(([, r]) => r === repo).map(([c]) => c));
1658
+ const hit = o.records.find((r) => r.kind === "Endpoint" && comps.has(r.component) && under2.some((p) => servesPath(r.pathOrTopic, p)));
1659
+ byPath.push({
1660
+ repo,
1661
+ serves: hit ? [hit.method?.toUpperCase(), hit.pathOrTopic].filter(Boolean).join(" ") : `the routes under ${g.basepath}`
1662
+ });
1663
+ }
1664
+ byPath.sort((a, b) => cmpText(a.repo, b.repo));
1665
+ const first = suggest ? [suggest.repo] : byPath.map((b) => b.repo).filter((x) => servers.includes(x));
1666
+ const about = Object.fromEntries(servers.flatMap((s) => {
1667
+ const d = o.repos.find((r) => r.id === s)?.description;
1668
+ return d ? [[s, { text: d.text, trust: d.trust }]] : [];
1669
+ }));
1670
+ asks.push({
1671
+ host,
1672
+ calls,
1673
+ servers: [...first, ...servers.filter((s) => !first.includes(s))],
1674
+ ...suggest ? { suggest } : {},
1675
+ ...Object.keys(about).length ? { about } : {},
1676
+ ...byPath.length ? { byPath } : {}
1677
+ });
1678
+ }
1679
+ return asks;
1680
+ }
1681
+ function aboutOf(a, repo) {
1682
+ const d = a.about?.[repo];
1683
+ if (!d)
1684
+ return "";
1685
+ return d.trust === "suggested" ? `. What it is, as your assistant drafted it (unconfirmed): ${d.text}` : `. What it is: ${d.text}`;
1686
+ }
1687
+ function gatewayHostFix(host, byPath) {
1688
+ const repos = byPath.map((b) => b.repo);
1689
+ return `${repos.length === 1 ? `${repos[0]}'s routes serve` : `The routes of ${repos.join(", ")} serve`} the paths the calls to ${host} make, and no repo lists ${host}: it looks like a shared gateway's host. Once, not per call: list ${host} under hosts: on each proxy repo in repos.manifest.yaml (${repos.join(", ")}, and any other proxy on it); the path then picks the proxy, and this question retires itself`;
1690
+ }
1691
+ function hostQuestionDrafts(asks) {
1692
+ return asks.map((a) => {
1693
+ const repo = a.calls[0].repo;
1694
+ const byPath = new Map((a.byPath ?? []).map((b) => [b.repo, b.serves]));
1695
+ return {
1696
+ repo,
1697
+ ...a.byPath?.length ? { byPath: a.byPath } : {},
1698
+ draft: {
1699
+ question: hostQuestionText(a.host),
1700
+ options: [
1701
+ ...a.servers.map((s) => ({
1702
+ label: s,
1703
+ means: (a.suggest?.repo === s ? `${s} serves HTTP, and its ${a.suggest.at} sets the port ${a.host.split(":").pop()} (${a.suggest.line})` : byPath.has(s) ? `${s} serves ${byPath.get(s)}, a path the calls to ${a.host} make` : `${s} serves HTTP`) + aboutOf(a, s),
1704
+ changes: byPath.has(s) ? `${a.host} goes under hosts for ${s} in repos.manifest.yaml, and the calls to it join ${s} on the next scan; on a shared gateway host, list it on each proxy repo instead (${[...byPath.keys()].join(", ")}, and any other proxy on it), and the path picks the proxy` : `${a.host} goes under hosts for ${s} in repos.manifest.yaml, and the calls to it join ${s} on the next scan`
1705
+ })),
1706
+ // O1: a system outside the estate, declared in the profile with the host as its alias.
1707
+ ...[
1708
+ [HOSTS_OUTSIDE_INTERNAL, "internal", "another team's system"],
1709
+ [HOSTS_OUTSIDE_VENDOR, "vendor", "a vendor's system"]
1710
+ ].map(([label2, boundary, what2]) => ({
1711
+ label: label2,
1712
+ means: `${a.host} is ${what2}, outside this estate, that the org pack doesn't name yet`,
1713
+ changes: `A system ${outsideSystemOf(a.host).id} (boundary ${boundary}, alias ${a.host}) goes into the profile, and the calls to ${a.host} go to it on the next scan`
1714
+ })),
1715
+ {
1716
+ label: HOSTS_NONE,
1717
+ means: `Neither a repo of this estate nor a system to add to the org pack answers on ${a.host}`,
1718
+ changes: "Nothing is added to the manifest or the profile; the calls stay loose ends, and this isn't asked again"
1719
+ },
1720
+ // Beta.24 review: every join question offers Ignore from the start.
1721
+ ignoreOption()
1722
+ ],
1723
+ evidence: a.calls.filter((c) => c.repo === repo).slice(0, 3).map((c) => c.at),
1724
+ scope: "repo"
1725
+ }
1726
+ };
1727
+ });
1728
+ }
1729
+
1730
+ // packages/scanner/dist/join-host-questions.js
1731
+ var HTTP_TYPES2 = /* @__PURE__ */ new Set(["rest", "graphql", "soap", "websocket", "sse", "webhook"]);
1732
+ var segs2 = (p) => p.split(/[?#]/)[0].split("/").filter(Boolean).map((x) => /^[{:<$*]/.test(x) ? "{}" : x);
1733
+ var servesPath2 = (entry, path) => {
1734
+ const e = segs2(entry);
1735
+ const c = segs2(path);
1736
+ if (!c.length || c.length > e.length)
1737
+ return false;
1738
+ const tail = e.slice(e.length - c.length);
1739
+ return tail.every((x, i) => x === "{}" || c[i] === "{}" || x === c[i]);
1740
+ };
1741
+ var isTokenHost = (host) => !!placeholderIn(host);
1742
+ function joinHostQuestionDrafts(input) {
1743
+ const byHost = /* @__PURE__ */ new Map();
1744
+ for (const a of input.asks) {
1745
+ if (a.reason !== "unknown-host" || !a.host || a.call.repo !== input.repo)
1746
+ continue;
1747
+ if (input.skip?.has(a.call.fact))
1748
+ continue;
1749
+ if (!isTokenHost(a.host) && input.hostsAsked?.has(a.host))
1750
+ continue;
1751
+ byHost.set(a.host, [...byHost.get(a.host) ?? [], a]);
1752
+ }
1753
+ if (!byHost.size)
1754
+ return [];
1755
+ const compRepo = /* @__PURE__ */ new Map();
1756
+ for (const r of input.repos) {
1757
+ compRepo.set(r.component ?? r.id, r.id);
1758
+ for (const m of r.modules ?? [])
1759
+ compRepo.set(m.component, r.id);
1760
+ }
1761
+ const endpoints = input.records.filter((r) => r.kind === "Endpoint" && HTTP_TYPES2.has(r.endpointType));
1762
+ const servers = [
1763
+ ...new Set(endpoints.flatMap((e) => compRepo.has(e.component) ? [compRepo.get(e.component)] : []))
1764
+ ].filter((r) => r !== input.repo).sort(cmpText);
1765
+ const factOf = new Map(input.facts.map((f) => [f.id, f]));
1766
+ const out = [];
1767
+ for (const [host, asks] of [...byHost].sort(([a], [b]) => cmpText(a, b))) {
1768
+ const calls = asks.map((a) => ({ id: a.call.fact, at: a.call.at, f: factOf.get(a.call.fact) })).sort((a, b) => cmpNatural(a.at, b.at) || cmpText(a.id, b.id));
1769
+ const paths = calls.flatMap((c) => c.f?.kind === "call" ? [c.f.path] : []);
1770
+ const byPath = [];
1771
+ for (const r of servers) {
1772
+ const hit = endpoints.find((e) => compRepo.get(e.component) === r && paths.some((p) => servesPath2(e.pathOrTopic, p)));
1773
+ if (hit)
1774
+ byPath.push({
1775
+ repo: r,
1776
+ serves: [hit.method?.toUpperCase(), hit.pathOrTopic].filter(Boolean).join(" ")
1777
+ });
1778
+ }
1779
+ const evidence = [...new Set(calls.map((c) => c.at))].sort(cmpNatural);
1780
+ const factIds = [...new Set(calls.map((c) => c.id))].sort(cmpText);
1781
+ if (!isTokenHost(host)) {
1782
+ const first = byPath.map((b) => b.repo);
1783
+ const ask = {
1784
+ host,
1785
+ calls: evidence.map((at3) => ({ repo: input.repo, at: at3 })),
1786
+ servers: [...first, ...servers.filter((s) => !first.includes(s))],
1787
+ ...byPath.length ? { byPath } : {}
1788
+ };
1789
+ const [d] = hostQuestionDrafts([ask]);
1790
+ if (d)
1791
+ out.push({ step: HOSTS_STEP, host, factIds, draft: d.draft });
1792
+ continue;
1793
+ }
1794
+ const n = factIds.length;
1795
+ const them = n === 1 ? "The call" : `The ${n} calls`;
1796
+ const system = outsideSystemOfJoinHost(host);
1797
+ const rerun = `atticus verify ${input.repo} --write`;
1798
+ const serves2 = new Map(byPath.map((b) => [b.repo, b.serves]));
1799
+ const ranked = [...byPath.map((b) => b.repo), ...servers.filter((s) => !serves2.has(s))];
1800
+ out.push({
1801
+ step: TARGETS_STEP_ID,
1802
+ host,
1803
+ factIds,
1804
+ draft: {
1805
+ // The join's words: for a gateway's token, what to read again (forwardHostQuestion).
1806
+ question: asks[0].question,
1807
+ options: [
1808
+ ...ranked.map((r) => ({
1809
+ label: r,
1810
+ means: serves2.has(r) ? `${r} serves ${serves2.get(r)}, a path the calls on ${host} make` : `${r} serves HTTP`,
1811
+ changes: `${them} on ${host} ${n === 1 ? "joins" : "join"} ${r} when the facts are next written (${rerun})`
1812
+ })),
1813
+ ...[
1814
+ [HOSTS_OUTSIDE_INTERNAL, "internal", "another team's system"],
1815
+ [HOSTS_OUTSIDE_VENDOR, "vendor", "a vendor's system"]
1816
+ ].map(([label2, boundary, what2]) => ({
1817
+ label: label2,
1818
+ means: `${host} stands for ${what2}, outside this estate, that the org pack doesn't name yet`,
1819
+ changes: `A system ${system.id} (${system.name}, boundary ${boundary}) goes into the profile, and ${them.toLowerCase()} on ${host} ${n === 1 ? "goes" : "go"} to it when the facts are next written (${rerun})`
1820
+ })),
1821
+ {
1822
+ label: HOSTS_NONE,
1823
+ means: `Neither a repo of this estate nor a system of the org pack answers on ${host}`,
1824
+ changes: `${them} on ${host} ${n === 1 ? "stays a loose end" : "stay loose ends"}, and this isn't asked again`
1825
+ },
1826
+ ignoreOption()
1827
+ ],
1828
+ evidence,
1829
+ scope: "repo"
1830
+ }
1831
+ });
1832
+ }
1833
+ return out;
1834
+ }
1835
+ var isJoinHostQuestion = (q) => q.askedBy?.step === TARGETS_STEP_ID && joinHostOfQuestion(q) !== void 0;
1836
+ function joinHostTarget(q) {
1837
+ if (!isJoinHostQuestion(q) || q.state !== "answered" || !q.answer)
1838
+ return void 0;
1839
+ if (ignoredAnswer(q))
1840
+ return HOSTS_NONE;
1841
+ const label2 = q.answer.option !== void 0 ? q.options[q.answer.option - 1]?.label : q.answer.text;
1842
+ if (!label2)
1843
+ return void 0;
1844
+ if (outsideBoundaryOf(label2))
1845
+ return outsideSystemOfJoinHost(joinHostOfQuestion(q)).id;
1846
+ return label2;
1847
+ }
1848
+ function hostsIgnoreCovers(q, call) {
1849
+ if (q.askedBy?.step !== HOSTS_STEP || q.state !== "answered" || !ignoredAnswer(q))
1850
+ return false;
1851
+ return q.repo === call.repo && q.evidence.includes(call.at) || !!call.hostLabel && hostOfQuestion(q) === call.hostLabel;
1852
+ }
1853
+ function staleJoinHostQuestions(input) {
1854
+ const drafted = new Set(input.drafted.map((d) => d.id));
1855
+ const out = [];
1856
+ const joinAsks = new Set((input.join?.asks ?? []).flatMap((a) => a.reason === "unknown-host" && a.host ? [a.host] : []));
1857
+ const hostsStep = (input.join ? input.hostsOpen ?? [] : []).filter((q) => q.state === "open" && q.repo === input.repo && q.askedBy?.step === HOSTS_STEP && !input.stillAsked?.has(q.id) && !!hostOfQuestion(q) && !joinAsks.has(hostOfQuestion(q)));
1858
+ for (const q of [...input.open, ...hostsStep]) {
1859
+ const isHostsStep = q.askedBy?.step === HOSTS_STEP;
1860
+ if (!isHostsStep && (q.state !== "open" || q.repo !== input.repo || !isJoinHostQuestion(q)))
1861
+ continue;
1862
+ if (drafted.has(q.id))
1863
+ continue;
1864
+ const host = isHostsStep ? hostOfQuestion(q) : joinHostOfQuestion(q);
1865
+ const by = input.drafted.filter((d) => d.host === host).map((d) => d.id);
1866
+ if (by.length) {
1867
+ out.push({
1868
+ id: q.id,
1869
+ why: `the calls on ${host} are asked now in ${by.join(", ")}`,
1870
+ replacedBy: by
1871
+ });
1872
+ continue;
1873
+ }
1874
+ const at3 = new Set(q.evidence);
1875
+ const joined = (input.join?.joins ?? []).filter((j) => j.call.repo === input.repo && at3.has(j.call.at));
1876
+ const outside = (input.join?.outside ?? []).filter((o) => o.call.repo === input.repo && at3.has(o.call.at));
1877
+ const how = [
1878
+ .../* @__PURE__ */ new Set([
1879
+ ...joined.map((j) => `joins ${j.entry.component} in ${j.entry.repo}`),
1880
+ ...outside.map((o) => `goes to ${o.target}, outside the estate`)
1881
+ ])
1882
+ ].sort(cmpText);
1883
+ out.push({
1884
+ id: q.id,
1885
+ why: how.length ? `the join no longer asks about ${host}: the call ${how.join("; ")}` : `the join no longer asks about ${host}: no call of ${input.repo} goes there now`
1886
+ });
1887
+ }
1888
+ return out.sort((a, b) => cmpText(a.id, b.id));
1889
+ }
1890
+ async function joinAnswerQuestions(root) {
1891
+ const of = (step) => listQuestions(root, { step }).then((r) => r.questions, () => []);
1892
+ return [...await of(TARGETS_STEP_ID), ...await of(HOSTS_STEP)];
1487
1893
  }
1488
1894
 
1489
- // packages/scanner/dist/facts-scan.js
1490
- import { readFile as readFile4 } from "node:fs/promises";
1491
- import { join as join6 } from "node:path";
1492
-
1493
- // packages/scanner/dist/facts-catalog.js
1494
- import { createHash as createHash2 } from "node:crypto";
1495
-
1496
1895
  // packages/scanner/dist/target-suggest.js
1497
1896
  var TARGETS_MAX_SUGGESTED = 5;
1498
1897
  var TARGETS_ANOTHER = TARGETS_ANOTHER_LABEL;
@@ -1505,18 +1904,18 @@ function nameWords(s) {
1505
1904
  ...new Set(s.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter((w) => w.length >= 3 && !STOP.has(w) && !/^v?\d+$/.test(w)).map((w) => w.length > 4 && w.endsWith("s") && !w.endsWith("ss") ? w.slice(0, -1) : w))
1506
1905
  ];
1507
1906
  }
1508
- var segs = (p) => p.split(/[?#]/)[0].split("/").filter(Boolean).map((x) => /^[{:<$]/.test(x) ? "{}" : x);
1907
+ var segs3 = (p) => p.split(/[?#]/)[0].split("/").filter(Boolean).map((x) => /^[{:<$]/.test(x) ? "{}" : x);
1509
1908
  var sameSeg = (a, b) => a === "{}" || b === "{}" || a === b;
1510
1909
  var under = (path, prefix) => {
1511
- const a = segs(prefix);
1512
- const b = segs(path);
1910
+ const a = segs3(prefix);
1911
+ const b = segs3(path);
1513
1912
  return a.length > 0 && a.length <= b.length && a.every((x, i) => x === b[i]);
1514
1913
  };
1515
1914
  function serves(entry, call, bases) {
1516
- const e = segs(entry);
1915
+ const e = segs3(entry);
1517
1916
  const tries = [
1518
- segs(call),
1519
- ...bases.filter((b) => under(call, b)).map((b) => segs(call).slice(segs(b).length))
1917
+ segs3(call),
1918
+ ...bases.filter((b) => under(call, b)).map((b) => segs3(call).slice(segs3(b).length))
1520
1919
  ];
1521
1920
  return tries.some((c) => c.length === e.length && c.every((x, i) => sameSeg(x, e[i])));
1522
1921
  }
@@ -1540,7 +1939,10 @@ function hostOf(f, facts) {
1540
1939
  }
1541
1940
  return void 0;
1542
1941
  }
1543
- var answerLabel = (q) => q.answer?.option !== void 0 ? q.options[q.answer.option - 1]?.label : q.answer?.text;
1942
+ var answerLabel = (q) => (
1943
+ // Beta.24 review: Ignore names no target, so it is never suggested again.
1944
+ ignoredAnswer(q) ? void 0 : q.answer?.option !== void 0 ? q.options[q.answer.option - 1]?.label : q.answer?.text
1945
+ );
1544
1946
  var NOT_A_TARGET = /* @__PURE__ */ new Set(["None of these", TARGETS_SPLIT_LABEL, TARGETS_ANOTHER_LABEL]);
1545
1947
  function candidates(callerRepo, ctx) {
1546
1948
  const manifest = estateRepos(ctx.op).filter((r) => r.id !== callerRepo || !!ctx.only);
@@ -1678,7 +2080,7 @@ function targetSuggestions(f, ctx) {
1678
2080
  },
1679
2081
  {
1680
2082
  from: `the path ${f.path}`,
1681
- words: nameWords(segs(f.path).filter((x) => x !== "{}").join(" ")),
2083
+ words: nameWords(segs3(f.path).filter((x) => x !== "{}").join(" ")),
1682
2084
  weight: 2
1683
2085
  }
1684
2086
  ].filter((x) => x.from && x.words.length);
@@ -1694,8 +2096,10 @@ function targetSuggestions(f, ctx) {
1694
2096
  s.score += n;
1695
2097
  s.why.push(why);
1696
2098
  };
1697
- if (only?.has(c.s.label))
1698
- add(6, "the join found an entry of it that serves the call");
2099
+ if (only?.has(c.s.label)) {
2100
+ const at3 = ctx.onlyAt?.[c.s.label] ?? [];
2101
+ add(6, `the join found an entry of it that serves the call${at3.length ? ` (${at3.join(", ")})` : ""}`);
2102
+ }
1699
2103
  const hit = c.entries.find((e) => (!method || !e.method || e.method === method || e.method === "ANY") && serves(e.path, f.path, c.bases.map((b) => b.path)));
1700
2104
  if (hit && !only) {
1701
2105
  const what2 = [hit.method, hit.path].filter(Boolean).join(" ");
@@ -1952,14 +2356,17 @@ var anotherOption = (op) => {
1952
2356
  function offered(members, facts, records, op, asks, ctx) {
1953
2357
  const merged = /* @__PURE__ */ new Map();
1954
2358
  for (const m of members) {
1955
- const ambiguous = asks?.some((a) => a.reason === "ambiguous" && a.call.repo === m.f.repo && a.call.fact === m.f.id);
2359
+ const ambiguous = asks?.find((a) => a.reason === "ambiguous" && a.call.repo === m.f.repo && a.call.fact === m.f.id);
2360
+ const onlyAt = {};
2361
+ for (const c of ambiguous?.candidates ?? [])
2362
+ (onlyAt[c.component] ??= []).push(c.at);
1956
2363
  for (const s of targetSuggestions(m.f, {
1957
2364
  op,
1958
2365
  records,
1959
2366
  facts,
1960
2367
  ...ctx.estate ? { estate: ctx.estate } : {},
1961
2368
  ...ctx.questions ? { questions: ctx.questions } : {},
1962
- ...ambiguous ? { only: m.servers } : {}
2369
+ ...ambiguous ? { only: m.servers, onlyAt } : {}
1963
2370
  })) {
1964
2371
  const x = merged.get(s.label);
1965
2372
  if (!x)
@@ -1995,7 +2402,9 @@ function targetQuestionDrafts(facts, records, op, asks, ctx = {}) {
1995
2402
  label: TARGETS_NONE,
1996
2403
  means: "Nothing in the estate or the org pack's systems answers it",
1997
2404
  changes: "The call stays a loose end, and this isn't asked again"
1998
- }
2405
+ },
2406
+ // Beta.24 review: every join question offers Ignore from the start.
2407
+ ignoreOption()
1999
2408
  ],
2000
2409
  evidence: q.evidence,
2001
2410
  scope: "repo"
@@ -2059,7 +2468,7 @@ function targetGroupWordings(repo, f, facts) {
2059
2468
  }
2060
2469
  var repo0 = (members) => members[0].f.repo;
2061
2470
  var byLine = (a, b) => cmpNatural(a, b);
2062
- var answerLabel2 = (q) => q.answer?.option !== void 0 ? q.options[q.answer.option - 1]?.label : q.answer?.text;
2471
+ var answerLabel2 = (q) => ignoredAnswer(q) ? TARGETS_NONE : q.answer?.option !== void 0 ? q.options[q.answer.option - 1]?.label : q.answer?.text;
2063
2472
  function splitTargetGroups(questions) {
2064
2473
  return new Set(questions.filter((q) => q.askedBy?.step === TARGETS_STEP && q.state === "answered" && answerLabel2(q) === TARGETS_SPLIT).map((q) => q.question.trim()));
2065
2474
  }
@@ -2104,7 +2513,8 @@ function groupedTargetDrafts(facts, records, op, asks, o) {
2104
2513
  label: TARGETS_NONE,
2105
2514
  means: "Nothing in the estate or the org pack's systems answers any of them",
2106
2515
  changes: "The calls stay loose ends, and this isn't asked again"
2107
- }
2516
+ },
2517
+ ignoreOption()
2108
2518
  ],
2109
2519
  evidence,
2110
2520
  scope: "repo"
@@ -2185,6 +2595,8 @@ function targetsFromAnswers(repo, facts, questions, o = {}) {
2185
2595
  for (const q of [...questions].filter((x) => x.askedBy?.step === TARGETS_STEP && x.state === "answered" && !!x.answer && typeof x.question === "string").sort((a, b) => cmpText(a.answer.at, b.answer.at) || cmpText(a.id, b.id)))
2186
2596
  groups.set(q.question.trim(), q);
2187
2597
  const ruled = ruledTargets(repo, facts, questions, o);
2598
+ const joinHosts = questions.filter((x) => x.repo === repo && isJoinHostQuestion(x) && x.state === "answered").sort((a, b) => cmpText(b.answer.at, a.answer.at) || cmpText(a.id, b.id));
2599
+ const ignoredHosts = questions.filter((x) => x.askedBy?.step === HOSTS_STEP && x.state === "answered" && !!ignoredAnswer(x));
2188
2600
  const out = {};
2189
2601
  for (const f of [...facts].sort((a, b) => cmpText(a.id, b.id))) {
2190
2602
  if (f.kind !== "call")
@@ -2199,6 +2611,26 @@ function targetsFromAnswers(repo, facts, questions, o = {}) {
2199
2611
  }
2200
2612
  let label2 = asked && asked.state === "answered" && asked.answer ? answerLabel2(asked) : void 0;
2201
2613
  let byAi = label2 && asked?.answer && isAiBy(asked.answer.by) ? asked.answer.by : void 0;
2614
+ const at3 = q.evidence[0];
2615
+ if (!label2 || label2 === TARGETS_SPLIT || label2 === TARGETS_ANOTHER) {
2616
+ const named2 = (f.host ?? f.base)?.trim();
2617
+ const asks = named2 ? hostQuestionText(named2) : void 0;
2618
+ const jh = asks ? joinHosts.find((x) => {
2619
+ const t = x.question.trim();
2620
+ return t.startsWith(asks) && /^(?:\s|$)/.test(t.slice(asks.length)) && !!joinHostTarget(x);
2621
+ }) : void 0;
2622
+ if (jh) {
2623
+ label2 = joinHostTarget(jh);
2624
+ byAi = jh.answer && isAiBy(jh.answer.by) ? jh.answer.by : void 0;
2625
+ } else if (ignoredHosts.length) {
2626
+ const url = urlOf(f, facts);
2627
+ const hostLabel = url ? callHostLabel(url) : void 0;
2628
+ if (ignoredHosts.some((x) => hostsIgnoreCovers(x, { repo, at: at3, hostLabel }))) {
2629
+ label2 = TARGETS_NONE;
2630
+ byAi = void 0;
2631
+ }
2632
+ }
2633
+ }
2202
2634
  if (!label2 || label2 === TARGETS_SPLIT || label2 === TARGETS_ANOTHER) {
2203
2635
  label2 = ruled.get(f.id)?.label;
2204
2636
  byAi = void 0;
@@ -2315,7 +2747,7 @@ function componentRenames(repos, op, taken = []) {
2315
2747
  const use = (id, repo) => users.set(id, (users.get(id) ?? /* @__PURE__ */ new Set()).add(repo));
2316
2748
  for (const { repo, facts } of repos) {
2317
2749
  const fallback = manifests.find((r) => r.id === repo)?.component;
2318
- for (const f of facts)
2750
+ for (const f of placedFacts(repo, facts, op))
2319
2751
  if (f.kind !== "field")
2320
2752
  use(factIdPart(f.component ?? fallback ?? repo), repo);
2321
2753
  }
@@ -2334,10 +2766,13 @@ function componentRenames(repos, op, taken = []) {
2334
2766
  }
2335
2767
  return out;
2336
2768
  }
2769
+ function placedFacts(_repo, facts, _op) {
2770
+ return facts;
2771
+ }
2337
2772
  function withComponents(repo, facts, op, renames) {
2338
2773
  const fallback = estateRepos(op).find((r) => r.id === repo)?.component;
2339
2774
  const mine = renames?.[repo] ?? {};
2340
- return facts.map((f) => {
2775
+ return placedFacts(repo, facts, op).map((f) => {
2341
2776
  const c = f.component ?? fallback;
2342
2777
  if (!c)
2343
2778
  return f;
@@ -2425,6 +2860,13 @@ function joinReposOf(op, list, renames) {
2425
2860
  ...x.basePath ? { basePath: x.basePath } : {}
2426
2861
  }))
2427
2862
  } : {},
2863
+ // ADR 0192 addendum: every module by its folder, so a build fact is its module's.
2864
+ ...m?.modules?.length ? {
2865
+ moduleDirs: m.modules.map((x) => ({
2866
+ path: x.path,
2867
+ component: renames?.[repo]?.[factIdPart(x.component)] ?? x.component
2868
+ }))
2869
+ } : {},
2428
2870
  // An API gateway's entries are routes the join follows through (ADR 0124 addendum A-gateway).
2429
2871
  // A type that says which side it faces (`gateway-external`, `gateway-internal`) marks each
2430
2872
  // hop through it (A-gateway2); a plain `gateway` leaves that to the proxy's virtual host.
@@ -2872,7 +3314,7 @@ async function factsForScan(root, op, repo, commit, readerRecords, at3 = {}) {
2872
3314
  const left = report.rejected.length;
2873
3315
  carriedSaid = `; ${report.carried.length} carried from commit ${from} to ${commit.slice(0, 7)} (the files they cite are unchanged, their lines checked again)${left ? `, ${left} left out until read again (they cite a file changed since, or name a fact that does: /atticus-map ${repo}, then atticus verify ${repo} --write)` : ""}`;
2874
3316
  }
2875
- const questions = (await listQuestions(root, { step: TARGETS_STEP }).catch(() => ({ questions: [] }))).questions;
3317
+ const questions = await joinAnswerQuestions(root);
2876
3318
  const targets = targetsFromAnswers(repo, facts, questions, {
2877
3319
  repoType: estateRepos(op).find((r) => r.id === repo)?.type
2878
3320
  });
@@ -2923,7 +3365,7 @@ async function estateFacts(root, op, except) {
2923
3365
  const pairs = {};
2924
3366
  const notes = [];
2925
3367
  const unverified = [];
2926
- const questions = (await listQuestions(root, { step: TARGETS_STEP }).catch(() => ({ questions: [] }))).questions;
3368
+ const questions = await joinAnswerQuestions(root);
2927
3369
  for (const r of productionRepos(op)) {
2928
3370
  if (r.id === except)
2929
3371
  continue;
@@ -4661,7 +5103,7 @@ function parseEntry(s) {
4661
5103
  const m = /^([A-Za-z]+)\s+(\S+)$/.exec(s.trim());
4662
5104
  return m ? { method: m[1].toUpperCase(), path: m[2] } : { path: s.trim() };
4663
5105
  }
4664
- var segs2 = (p) => normalizePath(p).toLowerCase().split("/").filter(Boolean);
5106
+ var segs4 = (p) => normalizePath(p).toLowerCase().split("/").filter(Boolean);
4665
5107
  var sameMethod = (a, b) => !a || !b || a.toUpperCase() === b.toUpperCase();
4666
5108
  async function joinEstate(o) {
4667
5109
  const byId = new Map(o.records.map((r) => [r.id, r]));
@@ -4673,8 +5115,8 @@ async function joinEstate(o) {
4673
5115
  const out = [i.normalizedPath];
4674
5116
  const route = i.route ? byId.get(i.route) : void 0;
4675
5117
  if (route?.kind === "GatewayRoute") {
4676
- const base2 = segs2(route.basepath);
4677
- const p = segs2(i.normalizedPath);
5118
+ const base2 = segs4(route.basepath);
5119
+ const p = segs4(i.normalizedPath);
4678
5120
  if (base2.length && base2.every((s, k) => p[k] === s))
4679
5121
  out.push(`/${p.slice(base2.length).join("/")}`);
4680
5122
  }
@@ -5036,219 +5478,6 @@ function fieldLineage(f, field) {
5036
5478
  return out;
5037
5479
  }
5038
5480
 
5039
- // packages/scanner/dist/hosts-asked.js
5040
- var segs3 = (p) => p.split(/[?#]/)[0].split("/").filter(Boolean).map((x) => /^[{:<$]/.test(x) ? "{}" : x);
5041
- var underPath = (path, base2) => {
5042
- const b = segs3(base2);
5043
- const c = segs3(path);
5044
- return b.length > 0 && b.length <= c.length && b.every((x, i) => x === c[i]);
5045
- };
5046
- var servesPath = (entry, path) => {
5047
- const e = segs3(entry);
5048
- const c = segs3(path);
5049
- return e.length === c.length && e.every((x, i) => x === "{}" || c[i] === "{}" || x === c[i]);
5050
- };
5051
- var HTTP_TYPES = /* @__PURE__ */ new Set(["rest", "graphql", "soap", "websocket", "sse", "webhook"]);
5052
- var CONFIG_FILES = [
5053
- "**/application*.properties",
5054
- "**/application*.yml",
5055
- "**/application*.yaml",
5056
- "**/bootstrap*.properties",
5057
- "**/bootstrap*.yml",
5058
- "**/bootstrap*.yaml",
5059
- "**/.env",
5060
- "**/.env.*",
5061
- "**/Dockerfile",
5062
- "**/docker-compose*.yml",
5063
- "**/docker-compose*.yaml",
5064
- "**/compose*.yml",
5065
- "**/compose*.yaml",
5066
- "**/package.json"
5067
- ];
5068
- function lineSetsPort(line, port) {
5069
- const p = String(port);
5070
- const end = "(?![0-9])";
5071
- return [
5072
- new RegExp(`port["']?\\s*[:=]\\s*["']?${p}${end}`, "i"),
5073
- new RegExp(`^\\s*EXPOSE\\s+(?:[0-9]+(?:/[a-z]+)?\\s+)*${p}${end}`, "i"),
5074
- new RegExp(`--port[=\\s]+${p}${end}`, "i"),
5075
- new RegExp(`(?:^|[\\s"'-])${p}:[0-9]+`)
5076
- ].some((re) => re.test(line));
5077
- }
5078
- function callHost(url) {
5079
- if (url.includes("${"))
5080
- return void 0;
5081
- const hp = urlHostPort(url);
5082
- if (!hp || !hp.host)
5083
- return void 0;
5084
- const explicit = /^[a-z][a-z0-9+.-]*:\/\/(?:[^/@?#]*@)?[^/:?#]+:(\d+)/i.exec(url);
5085
- return {
5086
- label: explicit ? `${hp.host}:${explicit[1]}` : hp.host,
5087
- host: hp.host,
5088
- ...hp.port !== void 0 ? { port: hp.port } : {}
5089
- };
5090
- }
5091
- async function unknownHosts(o) {
5092
- const patterns = o.repos.flatMap((r) => [
5093
- ...r.hosts,
5094
- ...(r.modules ?? []).flatMap((m) => m.hosts)
5095
- ]);
5096
- const byHost = /* @__PURE__ */ new Map();
5097
- for (const r of o.records) {
5098
- if (r.kind !== "Unresolved" || r.unresolvedKind !== "http-call")
5099
- continue;
5100
- const url = r.raw.slice(r.raw.indexOf(" ") + 1);
5101
- const h = callHost(url);
5102
- if (!h)
5103
- continue;
5104
- if (patterns.some((p) => hostMatches(p, h.host, h.port)))
5105
- continue;
5106
- const e = r.evidence[0];
5107
- const repo = e?.repo ?? r.owner;
5108
- if (!e?.path || e.line === void 0 || !repo)
5109
- continue;
5110
- const entry = byHost.get(h.label) ?? {
5111
- ...h.port !== void 0 ? { port: h.port } : {},
5112
- explicit: h.label !== h.host,
5113
- calls: [],
5114
- paths: /* @__PURE__ */ new Set()
5115
- };
5116
- const path = /^[a-z][a-z0-9+.-]*:\/\/[^/?#]*(\/[^?#]*)?/i.exec(url)?.[1];
5117
- if (path)
5118
- entry.paths.add(path);
5119
- const at3 = `${e.path}:${e.line}`;
5120
- if (!entry.calls.some((c) => c.repo === repo && c.at === at3))
5121
- entry.calls.push({ repo, at: at3 });
5122
- byHost.set(h.label, entry);
5123
- }
5124
- if (byHost.size === 0)
5125
- return [];
5126
- const compRepo = /* @__PURE__ */ new Map();
5127
- for (const r of o.repos) {
5128
- compRepo.set(r.component ?? r.id, r.id);
5129
- for (const m of r.modules ?? [])
5130
- compRepo.set(m.component, r.id);
5131
- }
5132
- const serving = /* @__PURE__ */ new Set();
5133
- for (const r of o.records)
5134
- if (r.kind === "Endpoint" && HTTP_TYPES.has(r.endpointType)) {
5135
- const repo = compRepo.get(r.component);
5136
- if (repo)
5137
- serving.add(repo);
5138
- }
5139
- const servers = [...serving].sort();
5140
- const configs = /* @__PURE__ */ new Map();
5141
- const configOf = async (repo) => {
5142
- if (configs.has(repo))
5143
- return configs.get(repo);
5144
- const h = o.handle(repo);
5145
- const out = [];
5146
- if (h)
5147
- for await (const path of h.listFiles(CONFIG_FILES)) {
5148
- const t = await h.readText(path).catch(() => void 0);
5149
- if (t !== void 0)
5150
- out.push({ path, lines: t.replace(/\r\n?/g, "\n").split("\n") });
5151
- }
5152
- configs.set(repo, out);
5153
- return out;
5154
- };
5155
- const asks = [];
5156
- for (const [host, entry] of [...byHost.entries()].sort(([a], [b]) => cmpText(a, b))) {
5157
- if (servers.length === 0)
5158
- continue;
5159
- const hits = [];
5160
- if (entry.explicit && entry.port !== void 0)
5161
- for (const repo of servers) {
5162
- hit: for (const f of await configOf(repo))
5163
- for (const [i, l] of f.lines.entries())
5164
- if (lineSetsPort(l, entry.port)) {
5165
- hits.push({ repo, at: `${f.path}:${i + 1}`, line: l.trim() });
5166
- break hit;
5167
- }
5168
- }
5169
- const suggest = hits.length === 1 ? hits[0] : void 0;
5170
- const calls = entry.calls.sort((a, b) => cmpText(a.repo, b.repo) || cmpNatural(a.at, b.at));
5171
- const byPath = [];
5172
- for (const g of o.records) {
5173
- if (g.kind !== "GatewayRoute")
5174
- continue;
5175
- const repo = g.evidence.find((e) => e.repo)?.repo;
5176
- if (!repo || byPath.some((b) => b.repo === repo))
5177
- continue;
5178
- const under2 = [...entry.paths].filter((p) => underPath(p, g.basepath));
5179
- if (!under2.length)
5180
- continue;
5181
- const comps = new Set([...compRepo].filter(([, r]) => r === repo).map(([c]) => c));
5182
- const hit = o.records.find((r) => r.kind === "Endpoint" && comps.has(r.component) && under2.some((p) => servesPath(r.pathOrTopic, p)));
5183
- byPath.push({
5184
- repo,
5185
- serves: hit ? [hit.method?.toUpperCase(), hit.pathOrTopic].filter(Boolean).join(" ") : `the routes under ${g.basepath}`
5186
- });
5187
- }
5188
- byPath.sort((a, b) => cmpText(a.repo, b.repo));
5189
- const first = suggest ? [suggest.repo] : byPath.map((b) => b.repo).filter((x) => servers.includes(x));
5190
- const about = Object.fromEntries(servers.flatMap((s) => {
5191
- const d = o.repos.find((r) => r.id === s)?.description;
5192
- return d ? [[s, { text: d.text, trust: d.trust }]] : [];
5193
- }));
5194
- asks.push({
5195
- host,
5196
- calls,
5197
- servers: [...first, ...servers.filter((s) => !first.includes(s))],
5198
- ...suggest ? { suggest } : {},
5199
- ...Object.keys(about).length ? { about } : {},
5200
- ...byPath.length ? { byPath } : {}
5201
- });
5202
- }
5203
- return asks;
5204
- }
5205
- function aboutOf(a, repo) {
5206
- const d = a.about?.[repo];
5207
- if (!d)
5208
- return "";
5209
- return d.trust === "suggested" ? `. What it is, as your assistant drafted it (unconfirmed): ${d.text}` : `. What it is: ${d.text}`;
5210
- }
5211
- function gatewayHostFix(host, byPath) {
5212
- const repos = byPath.map((b) => b.repo);
5213
- return `${repos.length === 1 ? `${repos[0]}'s routes serve` : `The routes of ${repos.join(", ")} serve`} the paths the calls to ${host} make, and no repo lists ${host}: it looks like a shared gateway's host. Once, not per call: list ${host} under hosts: on each proxy repo in repos.manifest.yaml (${repos.join(", ")}, and any other proxy on it); the path then picks the proxy, and this question retires itself`;
5214
- }
5215
- function hostQuestionDrafts(asks) {
5216
- return asks.map((a) => {
5217
- const repo = a.calls[0].repo;
5218
- const byPath = new Map((a.byPath ?? []).map((b) => [b.repo, b.serves]));
5219
- return {
5220
- repo,
5221
- ...a.byPath?.length ? { byPath: a.byPath } : {},
5222
- draft: {
5223
- question: hostQuestionText(a.host),
5224
- options: [
5225
- ...a.servers.map((s) => ({
5226
- label: s,
5227
- means: (a.suggest?.repo === s ? `${s} serves HTTP, and its ${a.suggest.at} sets the port ${a.host.split(":").pop()} (${a.suggest.line})` : byPath.has(s) ? `${s} serves ${byPath.get(s)}, a path the calls to ${a.host} make` : `${s} serves HTTP`) + aboutOf(a, s),
5228
- changes: byPath.has(s) ? `${a.host} goes under hosts for ${s} in repos.manifest.yaml, and the calls to it join ${s} on the next scan; on a shared gateway host, list it on each proxy repo instead (${[...byPath.keys()].join(", ")}, and any other proxy on it), and the path picks the proxy` : `${a.host} goes under hosts for ${s} in repos.manifest.yaml, and the calls to it join ${s} on the next scan`
5229
- })),
5230
- // O1: a system outside the estate, declared in the profile with the host as its alias.
5231
- ...[
5232
- [HOSTS_OUTSIDE_INTERNAL, "internal", "another team's system"],
5233
- [HOSTS_OUTSIDE_VENDOR, "vendor", "a vendor's system"]
5234
- ].map(([label2, boundary, what2]) => ({
5235
- label: label2,
5236
- means: `${a.host} is ${what2}, outside this estate, that the org pack doesn't name yet`,
5237
- changes: `A system ${outsideSystemOf(a.host).id} (boundary ${boundary}, alias ${a.host}) goes into the profile, and the calls to ${a.host} go to it on the next scan`
5238
- })),
5239
- {
5240
- label: HOSTS_NONE,
5241
- means: `Neither a repo of this estate nor a system to add to the org pack answers on ${a.host}`,
5242
- changes: "Nothing is added to the manifest or the profile; the calls stay loose ends, and this isn't asked again"
5243
- }
5244
- ],
5245
- evidence: a.calls.filter((c) => c.repo === repo).slice(0, 3).map((c) => c.at),
5246
- scope: "repo"
5247
- }
5248
- };
5249
- });
5250
- }
5251
-
5252
5481
  // packages/scanner/dist/measure-links.js
5253
5482
  var import_yaml4 = __toESM(require_dist(), 1);
5254
5483
  var METHODS = /^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|TRACE|ANY)\s+(\S.*)$/i;
@@ -5344,12 +5573,12 @@ function parseLinkReference(source) {
5344
5573
  return { ok: true, reference: { ...estate ? { estate } : {}, repos } };
5345
5574
  }
5346
5575
  var stripped = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0));
5347
- function segs4(path) {
5576
+ function segs5(path) {
5348
5577
  return path.split(/[?#]/)[0].split("/").filter(Boolean).map((s) => /^(\{[^}]*\}|:\w+|\*)$/.test(s) ? "{}" : s.toLowerCase());
5349
5578
  }
5350
5579
  function pathMatch(a, b) {
5351
- const x = segs4(a);
5352
- const y = segs4(b);
5580
+ const x = segs5(a);
5581
+ const y = segs5(b);
5353
5582
  if (x.length === y.length && x.every((s, i) => s === y[i]))
5354
5583
  return 2;
5355
5584
  const [short, long] = x.length < y.length ? [x, y] : [y, x];
@@ -5646,6 +5875,19 @@ export {
5646
5875
  estateMergeInput,
5647
5876
  mergeEstate,
5648
5877
  curatedDirOf,
5878
+ lineSetsPort,
5879
+ tokenHost,
5880
+ callHostLabel,
5881
+ unknownHosts,
5882
+ gatewayHostFix,
5883
+ hostQuestionDrafts,
5884
+ isTokenHost,
5885
+ joinHostQuestionDrafts,
5886
+ isJoinHostQuestion,
5887
+ joinHostTarget,
5888
+ hostsIgnoreCovers,
5889
+ staleJoinHostQuestions,
5890
+ joinAnswerQuestions,
5649
5891
  TARGETS_MAX_SUGGESTED,
5650
5892
  TARGETS_ANOTHER,
5651
5893
  TARGETS_NO_EVIDENCE,
@@ -5728,10 +5970,6 @@ export {
5728
5970
  estateFlow,
5729
5971
  flattenEstateFlow,
5730
5972
  fieldLineage,
5731
- lineSetsPort,
5732
- unknownHosts,
5733
- gatewayHostFix,
5734
- hostQuestionDrafts,
5735
5973
  parseLinkReference,
5736
5974
  measureLinks,
5737
5975
  estateJoinOf,