scip-query 0.22.0 → 0.23.0

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 (386) hide show
  1. package/CHANGELOG.md +257 -0
  2. package/README.md +11 -0
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/by-kind-XI2CSWEY.js +2 -0
  5. package/dist/call-graph-UONR6JR5.js +2 -0
  6. package/dist/{chunk-FGNCOQUX.js → chunk-2E7CX53V.js} +2 -2
  7. package/dist/chunk-2GRUZAQF.js +43 -0
  8. package/dist/{chunk-DPWKKNKI.js → chunk-2LDBDR6J.js} +2 -2
  9. package/dist/{chunk-JHH5SCZ3.js → chunk-2OOY75BW.js} +2 -2
  10. package/dist/{chunk-XGGBK66W.js → chunk-2R3V3PSD.js} +2 -2
  11. package/dist/chunk-2WC2OEDO.js +4 -0
  12. package/dist/{chunk-57N6LN2A.js → chunk-3AF4TUFK.js} +2 -2
  13. package/dist/{chunk-2RE5OCHZ.js → chunk-3D3QG236.js} +2 -2
  14. package/dist/{chunk-D2MVJSP4.js → chunk-3FHOF22C.js} +2 -2
  15. package/dist/{chunk-7XZGZBSQ.js → chunk-3JKSW6LJ.js} +2 -2
  16. package/dist/chunk-3L2ZBPEX.js +133 -0
  17. package/dist/{chunk-NVSZNESQ.js → chunk-3PJABJSU.js} +2 -2
  18. package/dist/{chunk-WOOAY3PA.js → chunk-3SVF22I5.js} +2 -2
  19. package/dist/{chunk-YAGYMBEX.js → chunk-3WR4E3A3.js} +2 -2
  20. package/dist/chunk-4FTZ4P5G.js +2 -0
  21. package/dist/{chunk-F24G5NBE.js → chunk-4ILJCCXV.js} +2 -2
  22. package/dist/chunk-4UX2F3JX.js +2 -0
  23. package/dist/chunk-4WNW27SX.js +2 -0
  24. package/dist/chunk-5ENOG4VP.js +61 -0
  25. package/dist/{chunk-RHHCLWQ6.js → chunk-64BFSI5I.js} +2 -2
  26. package/dist/chunk-66DVSJQG.js +455 -0
  27. package/dist/{chunk-ISWFRGJ6.js → chunk-6HFCYNYE.js} +2 -2
  28. package/dist/{chunk-Y2VM4CJC.js → chunk-6I6L7Z62.js} +2 -2
  29. package/dist/{chunk-CKRWA452.js → chunk-6PQNKL3G.js} +2 -2
  30. package/dist/{chunk-GPGRZJ3R.js → chunk-6V5CNXL6.js} +2 -2
  31. package/dist/chunk-6VVV4WRR.js +4 -0
  32. package/dist/{chunk-BDGTPN27.js → chunk-7BWFZPPZ.js} +2 -2
  33. package/dist/{chunk-25GWKRUZ.js → chunk-7CYG22FH.js} +2 -2
  34. package/dist/chunk-7F45LJKI.js +2 -0
  35. package/dist/{chunk-4TQU4TX2.js → chunk-7IWV2EG3.js} +2 -2
  36. package/dist/{chunk-UDY7MIAW.js → chunk-AFHTBORT.js} +2 -2
  37. package/dist/chunk-AVRYW5OZ.js +2 -0
  38. package/dist/chunk-B3PYOSCX.js +2 -0
  39. package/dist/{chunk-RNKPYYYE.js → chunk-B5D7QPBE.js} +2 -2
  40. package/dist/{chunk-FFJQZG6J.js → chunk-BBCIS4DX.js} +2 -2
  41. package/dist/chunk-BDUVI7TO.js +3 -0
  42. package/dist/{chunk-BVFYEEBH.js → chunk-BE7ZZTMC.js} +2 -2
  43. package/dist/{chunk-NEIQPFBI.js → chunk-BHVUJOCQ.js} +2 -2
  44. package/dist/chunk-BKVWUP7Y.js +2 -0
  45. package/dist/{chunk-IJMD6BRI.js → chunk-BQGB4HBD.js} +2 -2
  46. package/dist/{chunk-ERCYGVAM.js → chunk-BRV7PIFF.js} +2 -2
  47. package/dist/chunk-CEEZJXEF.js +2 -0
  48. package/dist/{chunk-BTVKZGWT.js → chunk-CIYLO6SI.js} +2 -2
  49. package/dist/chunk-CJZXN4NU.js +2 -0
  50. package/dist/{chunk-VXJJTQYE.js → chunk-CNO7TOKL.js} +2 -2
  51. package/dist/{chunk-ZZ3Z7D56.js → chunk-COF23M5F.js} +2 -2
  52. package/dist/{chunk-ZGW4HLPD.js → chunk-CWFP7GM5.js} +2 -2
  53. package/dist/chunk-D2DHWI3D.js +2 -0
  54. package/dist/{chunk-Q55NF3ZG.js → chunk-D4N5SQ2M.js} +2 -2
  55. package/dist/{chunk-LXQUF2RP.js → chunk-DBRSYFXR.js} +2 -2
  56. package/dist/{chunk-PXXYQK55.js → chunk-DHUIOLDT.js} +2 -2
  57. package/dist/{chunk-KZYID5KV.js → chunk-DIRJWYBM.js} +2 -2
  58. package/dist/{chunk-IKVNEGTW.js → chunk-DIUFNHRJ.js} +2 -2
  59. package/dist/{chunk-CLG6DWVS.js → chunk-DTZCKZEU.js} +2 -2
  60. package/dist/{chunk-Z2PZVKPR.js → chunk-DULC3QFP.js} +2 -2
  61. package/dist/{chunk-AYPDH2LU.js → chunk-DYGHBZ2N.js} +2 -2
  62. package/dist/{chunk-JJ62MTQH.js → chunk-E5R6AQ73.js} +2 -2
  63. package/dist/{chunk-BWVQP3LB.js → chunk-E73UNJTF.js} +2 -2
  64. package/dist/{chunk-GVOMSPGL.js → chunk-EG2CPZMJ.js} +2 -2
  65. package/dist/{chunk-56NQAEPJ.js → chunk-EKV5HX33.js} +2 -2
  66. package/dist/{chunk-GDRJB3SB.js → chunk-EQHFIL6T.js} +2 -2
  67. package/dist/{chunk-EWWY2ZFL.js → chunk-ESIQ66Z7.js} +2 -2
  68. package/dist/chunk-EVFUMY4R.js +3 -0
  69. package/dist/{chunk-ZYM4HOFA.js → chunk-F7DY272B.js} +2 -2
  70. package/dist/chunk-FBN2FGXG.js +2 -0
  71. package/dist/{chunk-AZS7YPCB.js → chunk-FDLOBR6P.js} +2 -2
  72. package/dist/chunk-FESCRNVV.js +5 -0
  73. package/dist/{chunk-URSGGIZX.js → chunk-FFRKR4EQ.js} +2 -2
  74. package/dist/chunk-FGA2U4OR.js +8 -0
  75. package/dist/{chunk-7YQOCABQ.js → chunk-FIQRSHVM.js} +2 -2
  76. package/dist/{chunk-KFVSJX25.js → chunk-FPYLNQPT.js} +2 -2
  77. package/dist/{chunk-FELGD32K.js → chunk-FRUSVINH.js} +2 -2
  78. package/dist/chunk-GAS2LJMP.js +3 -0
  79. package/dist/{chunk-OTSPRVNW.js → chunk-GSP44ENC.js} +2 -2
  80. package/dist/{chunk-K3XFWJI2.js → chunk-GUFSG5TX.js} +2 -2
  81. package/dist/chunk-GYIZ4NXB.js +2 -0
  82. package/dist/{chunk-2OXVP5U5.js → chunk-GZIUDL6G.js} +2 -2
  83. package/dist/chunk-HCXEQRFF.js +18 -0
  84. package/dist/{chunk-LO5JSW2C.js → chunk-HEHOQQKH.js} +2 -2
  85. package/dist/{chunk-U2N2KE7A.js → chunk-HKGFPJ4T.js} +2 -2
  86. package/dist/chunk-HLZTEXRA.js +2 -0
  87. package/dist/{chunk-EELPBR7E.js → chunk-HOENASQM.js} +2 -2
  88. package/dist/{chunk-VTCIYFEK.js → chunk-HVF5VBG6.js} +2 -2
  89. package/dist/{chunk-TH6IC56G.js → chunk-HYO3NP5Q.js} +2 -2
  90. package/dist/{chunk-OPSAW5DT.js → chunk-I55I7XXP.js} +2 -2
  91. package/dist/{chunk-DEAB5TGT.js → chunk-IDFEUFKS.js} +2 -2
  92. package/dist/{chunk-DJAO2OZJ.js → chunk-IHGQTTVW.js} +2 -2
  93. package/dist/{chunk-XU75YQN4.js → chunk-IICPE7B2.js} +2 -2
  94. package/dist/{chunk-GY7CCCEZ.js → chunk-IL676XCC.js} +2 -2
  95. package/dist/{chunk-4HE7MVWD.js → chunk-ILTDAWEF.js} +2 -2
  96. package/dist/chunk-IZDPJ2QI.js +2 -0
  97. package/dist/{chunk-5YRQIE2B.js → chunk-J66VOFW6.js} +2 -2
  98. package/dist/{chunk-SB25YMEQ.js → chunk-JFMEXGFE.js} +2 -2
  99. package/dist/{chunk-QLBSG7U5.js → chunk-JGKUET5J.js} +2 -2
  100. package/dist/{chunk-VZ7NXSHV.js → chunk-JS4PGXMV.js} +2 -2
  101. package/dist/{chunk-ZAZGGSM3.js → chunk-JTQVMR42.js} +2 -2
  102. package/dist/chunk-JWTGMPIT.js +80 -0
  103. package/dist/{chunk-5ZMBRQFC.js → chunk-JYR66JN5.js} +2 -2
  104. package/dist/chunk-KLFEXGQA.js +2 -0
  105. package/dist/chunk-KYSDI3GE.js +5 -0
  106. package/dist/{chunk-MSR2QRUE.js → chunk-L6PJPETJ.js} +2 -2
  107. package/dist/{chunk-VU6LIWHT.js → chunk-LDVT66YM.js} +2 -2
  108. package/dist/chunk-LEECKFCJ.js +2 -0
  109. package/dist/{chunk-H7CG6LOE.js → chunk-LMZ5PRUV.js} +2 -2
  110. package/dist/{chunk-ZPASRBLF.js → chunk-LQRQN2XA.js} +2 -2
  111. package/dist/{chunk-HISEUIL2.js → chunk-LXABEJX3.js} +2 -2
  112. package/dist/{chunk-WHADK6OS.js → chunk-M2O5NY6W.js} +2 -2
  113. package/dist/{chunk-Y334QQU5.js → chunk-MNV5FSBW.js} +2 -2
  114. package/dist/{chunk-RYOYJMGF.js → chunk-MPQ4OTBM.js} +2 -2
  115. package/dist/{chunk-6NC3YSPY.js → chunk-MV3CDXPI.js} +2 -2
  116. package/dist/{chunk-NRBNAECH.js → chunk-MWN53KRN.js} +2 -2
  117. package/dist/chunk-N2ZSIIGR.js +117 -0
  118. package/dist/chunk-N5B2NILC.js +5 -0
  119. package/dist/{chunk-Q6T2CAJL.js → chunk-NJITK2GP.js} +2 -2
  120. package/dist/{chunk-ENWQWA2R.js → chunk-NOGJXYFO.js} +2 -2
  121. package/dist/{chunk-V4NG5OMS.js → chunk-NOYBFVJA.js} +106 -106
  122. package/dist/chunk-NWQXSFFU.js +3 -0
  123. package/dist/chunk-ODDUPDP7.js +13 -0
  124. package/dist/{chunk-A77SCPW2.js → chunk-OLIWTZI3.js} +2 -2
  125. package/dist/{chunk-XFMVKFSF.js → chunk-OLNV6I6U.js} +2 -2
  126. package/dist/{chunk-QKT4UI2Y.js → chunk-OR2E3AGZ.js} +2 -2
  127. package/dist/chunk-OSR2GEHQ.js +2 -0
  128. package/dist/{chunk-5H5WTJSD.js → chunk-OSSESPDX.js} +2 -2
  129. package/dist/{chunk-KQHJEU6V.js → chunk-OWOOWNJ5.js} +2 -2
  130. package/dist/{chunk-GRX7JOXQ.js → chunk-P42EIXTA.js} +2 -2
  131. package/dist/{chunk-AQ2PORIO.js → chunk-PJFGPYTU.js} +2 -2
  132. package/dist/{chunk-LRI5OMPE.js → chunk-PP7KNN7L.js} +2 -2
  133. package/dist/{chunk-PLJUQFQN.js → chunk-PU7T5QYQ.js} +2 -2
  134. package/dist/{chunk-JUN5DOAK.js → chunk-PWWAJSKV.js} +2 -2
  135. package/dist/{chunk-7IQXARSQ.js → chunk-PZL5T7SU.js} +2 -2
  136. package/dist/{chunk-UAQ4T73O.js → chunk-QBE3YX64.js} +2 -2
  137. package/dist/{chunk-3TJY6M3B.js → chunk-QGVTFRY2.js} +2 -2
  138. package/dist/chunk-QOJONDS7.js +2 -0
  139. package/dist/chunk-QU5XRYB5.js +4 -0
  140. package/dist/{chunk-2KVU55CW.js → chunk-QUU5OBVK.js} +2 -2
  141. package/dist/{chunk-Q5TA4OY4.js → chunk-RBLQNW26.js} +2 -2
  142. package/dist/chunk-RTQ7NEKG.js +81 -0
  143. package/dist/{chunk-F24QUEQP.js → chunk-SQXRS7BG.js} +2 -2
  144. package/dist/chunk-SSK6LDPC.js +2 -0
  145. package/dist/chunk-SZHGTCPP.js +7 -0
  146. package/dist/chunk-T4N4P2K5.js +16 -0
  147. package/dist/chunk-TA3QKLLU.js +2 -0
  148. package/dist/chunk-TEBQMNVI.js +43 -0
  149. package/dist/{chunk-NK3JMP22.js → chunk-TPFHAQ2G.js} +2 -2
  150. package/dist/chunk-TQPCBMWT.js +5 -0
  151. package/dist/{chunk-HG722PO7.js → chunk-TRNAEQ6P.js} +2 -2
  152. package/dist/chunk-TY7CRN3Z.js +2 -0
  153. package/dist/{chunk-7XA3OM44.js → chunk-UHFYCMZO.js} +2 -2
  154. package/dist/{chunk-ARVO6TTW.js → chunk-UICY4GTQ.js} +2 -2
  155. package/dist/{chunk-SWK4XPUS.js → chunk-UVGEWT4Y.js} +2 -2
  156. package/dist/{chunk-GIQ6CSL4.js → chunk-UXW33INU.js} +2 -2
  157. package/dist/{chunk-RDULNRSJ.js → chunk-VMPRET3I.js} +2 -2
  158. package/dist/{chunk-I6UTXNHU.js → chunk-VNLGKHS6.js} +2 -2
  159. package/dist/{chunk-44T4DUAA.js → chunk-VQILFTEH.js} +2 -2
  160. package/dist/{chunk-N7FP5H5U.js → chunk-VUPHCS7Y.js} +8 -8
  161. package/dist/{chunk-JAT6C3VX.js → chunk-VVZSBTSU.js} +2 -2
  162. package/dist/{chunk-FBCVASUG.js → chunk-VZRNID6A.js} +2 -2
  163. package/dist/{chunk-TUQIPUDS.js → chunk-W5OXRYGE.js} +2 -2
  164. package/dist/chunk-W6STWDQI.js +57 -0
  165. package/dist/chunk-W7CXK74K.js +2 -0
  166. package/dist/chunk-WB3WYIRE.js +4 -0
  167. package/dist/{chunk-C76O5MDS.js → chunk-WDNVY4E7.js} +2 -2
  168. package/dist/{chunk-TAYD3AE7.js → chunk-WIWY3CRX.js} +2 -2
  169. package/dist/chunk-WK46TNUM.js +3 -0
  170. package/dist/chunk-WNTFFKAX.js +12 -0
  171. package/dist/{chunk-JFQBRL3J.js → chunk-WOIKCX6A.js} +2 -2
  172. package/dist/{chunk-PIFTZEEM.js → chunk-WUN6KBHV.js} +2 -2
  173. package/dist/chunk-WYCTJDVR.js +2 -0
  174. package/dist/chunk-WYPL7GF7.js +2 -0
  175. package/dist/{chunk-XN22RGSR.js → chunk-XBGWL66K.js} +2 -2
  176. package/dist/{chunk-R6M456QG.js → chunk-XDQMU3BT.js} +2 -2
  177. package/dist/{chunk-XJX6LGHL.js → chunk-XFA4SSO3.js} +2 -2
  178. package/dist/{chunk-2YC7YNKT.js → chunk-XGZEP6GR.js} +2 -2
  179. package/dist/chunk-XPDPNWTQ.js +368 -0
  180. package/dist/chunk-XRYABF57.js +8 -0
  181. package/dist/{chunk-YIHNPKWD.js → chunk-YBGKCQIS.js} +2 -2
  182. package/dist/{chunk-2XCGSDIT.js → chunk-YEN6CYC7.js} +2 -2
  183. package/dist/{chunk-VMWUV6WB.js → chunk-YF5IB2LF.js} +2 -2
  184. package/dist/{chunk-TNG2FYS5.js → chunk-YI2AWIHC.js} +2 -2
  185. package/dist/{chunk-EELG7D3Q.js → chunk-YPWBKGFU.js} +2 -2
  186. package/dist/{chunk-GQIDEID3.js → chunk-YPWHBBIS.js} +2 -2
  187. package/dist/{chunk-TKDNDQA7.js → chunk-YSH6U3L4.js} +2 -2
  188. package/dist/{chunk-BUTEIZKP.js → chunk-YU5DZUZI.js} +2 -2
  189. package/dist/chunk-YWO5DDRC.js +16 -0
  190. package/dist/{chunk-6HRZQLOI.js → chunk-Z4CDXYNQ.js} +2 -2
  191. package/dist/{chunk-XSWYJCAK.js → chunk-ZF5KHH7C.js} +2 -2
  192. package/dist/chunk-ZOHS7AQV.js +21 -0
  193. package/dist/{chunk-7U2YQSDE.js → chunk-ZTI4SBFV.js} +2 -2
  194. package/dist/cli-main.js +2 -2
  195. package/dist/code-MI6F2TTU.js +2 -0
  196. package/dist/code-result-json-FXALY4HE.js +2 -0
  197. package/dist/{command-descriptors-ORNTVNYV.js → command-descriptors-P34VABY5.js} +136 -135
  198. package/dist/dataflow-4KEMJPC6.js +2 -0
  199. package/dist/dependence-slice-R7FPWD5M.js +2 -0
  200. package/dist/deps-7EMQUYUT.js +2 -0
  201. package/dist/direct-navigation-6YO234F2.js +3 -0
  202. package/dist/entry-map-KOOLR26E.js +2 -0
  203. package/dist/files-OPIPJIGZ.js +2 -0
  204. package/dist/hierarchy-QPD2CAER.js +2 -0
  205. package/dist/imports-M6HUXRXC.js +2 -0
  206. package/dist/index.js +1 -1
  207. package/dist/members-I5MEFOCT.js +2 -0
  208. package/dist/methods-5JYGGHXA.js +2 -0
  209. package/dist/output-continuation-command-UPQAAKBP.js +3 -0
  210. package/dist/postinstall.js +1 -1
  211. package/dist/project-reindex-UKKQ5PLS.js +3 -0
  212. package/dist/queries/affected.js +1 -1
  213. package/dist/queries/anchors.js +1 -1
  214. package/dist/queries/architecture.js +1 -1
  215. package/dist/queries/bottlenecks.js +1 -1
  216. package/dist/queries/by-kind.js +1 -1
  217. package/dist/queries/call-graph.js +1 -1
  218. package/dist/queries/change-surface.js +1 -1
  219. package/dist/queries/cleanup-plan.js +1 -1
  220. package/dist/queries/co-change.js +1 -1
  221. package/dist/queries/code.js +1 -1
  222. package/dist/queries/complexity-hotspots.js +1 -1
  223. package/dist/queries/complexity.js +1 -1
  224. package/dist/queries/context.js +1 -1
  225. package/dist/queries/convergence.js +1 -1
  226. package/dist/queries/coupling.js +1 -1
  227. package/dist/queries/cycles.js +1 -1
  228. package/dist/queries/dataflow.js +1 -1
  229. package/dist/queries/dead.js +1 -1
  230. package/dist/queries/decorative-checkers.js +1 -1
  231. package/dist/queries/deep-chains.js +1 -1
  232. package/dist/queries/dependence-slice.js +1 -1
  233. package/dist/queries/dependency-depth.js +1 -1
  234. package/dist/queries/deps.js +1 -1
  235. package/dist/queries/diff-impact.d.ts +9 -0
  236. package/dist/queries/diff-impact.js +1 -1
  237. package/dist/queries/doc-drift.js +1 -1
  238. package/dist/queries/drift.js +1 -1
  239. package/dist/queries/duplicate-bodies.js +1 -1
  240. package/dist/queries/entry-map.js +1 -1
  241. package/dist/queries/evidence.js +1 -1
  242. package/dist/queries/extract-candidates.js +1 -1
  243. package/dist/queries/fan.js +1 -1
  244. package/dist/queries/files.js +1 -1
  245. package/dist/queries/health.js +1 -1
  246. package/dist/queries/hierarchy.js +1 -1
  247. package/dist/queries/hotspots.js +1 -1
  248. package/dist/queries/imports.js +1 -1
  249. package/dist/queries/incomplete-migration.js +1 -1
  250. package/dist/queries/index.js +1 -1
  251. package/dist/queries/isolated.js +1 -1
  252. package/dist/queries/locality-candidates.js +1 -1
  253. package/dist/queries/members.js +1 -1
  254. package/dist/queries/methods.js +1 -1
  255. package/dist/queries/not-implemented.js +1 -1
  256. package/dist/queries/outline.js +1 -1
  257. package/dist/queries/passthrough-candidates.js +1 -1
  258. package/dist/queries/plan-context.js +1 -1
  259. package/dist/queries/react-component-duplicates.js +1 -1
  260. package/dist/queries/react-hook-candidates.js +1 -1
  261. package/dist/queries/react-large-component-pressure.js +1 -1
  262. package/dist/queries/recent-duplicates.js +1 -1
  263. package/dist/queries/redundant-reexports.js +1 -1
  264. package/dist/queries/reference-neighborhood.js +1 -1
  265. package/dist/queries/reference-reachability.js +1 -1
  266. package/dist/queries/refs.js +1 -1
  267. package/dist/queries/self-audit.js +1 -1
  268. package/dist/queries/similar-chains.js +1 -1
  269. package/dist/queries/similar-files.js +1 -1
  270. package/dist/queries/similar-signatures.js +1 -1
  271. package/dist/queries/similar.js +1 -1
  272. package/dist/queries/slice.js +1 -1
  273. package/dist/queries/source-inspection.js +1 -1
  274. package/dist/queries/source-search.js +1 -1
  275. package/dist/queries/stale-abstractions.js +1 -1
  276. package/dist/queries/surface.js +1 -1
  277. package/dist/queries/symbols.js +1 -1
  278. package/dist/queries/system-map.js +1 -1
  279. package/dist/queries/system.js +1 -1
  280. package/dist/queries/test-quality.js +1 -1
  281. package/dist/queries/trace.js +1 -1
  282. package/dist/queries/twin-ab.js +1 -1
  283. package/dist/queries/twin-drift.js +1 -1
  284. package/dist/queries/unused-imports.js +1 -1
  285. package/dist/queries/unused-params.js +1 -1
  286. package/dist/queries/value-flow.js +1 -1
  287. package/dist/queries/vue-component-duplicates.js +1 -1
  288. package/dist/queries/vue-composable-candidates.js +1 -1
  289. package/dist/queries/vue-large-view-pressure.js +1 -1
  290. package/dist/queries/wrapper-candidates.js +1 -1
  291. package/dist/query-service-server.js +3 -3
  292. package/dist/refs-PSU4JZZW.js +2 -0
  293. package/dist/refs-pagination-JG6CJMRC.js +2 -0
  294. package/dist/reindex-worker.js +25 -25
  295. package/dist/reindex.d.ts +3 -2
  296. package/dist/reindex.js +35 -35
  297. package/dist/runtime.d.ts +34 -2
  298. package/dist/runtime.js +4 -4
  299. package/dist/rust-semantic-session-server.js +1 -1
  300. package/dist/rust-semantic-session-worker.js +1 -1
  301. package/dist/rust-semantic-worker.js +1 -1
  302. package/dist/{scip-cli-H-n59izO.d.ts → scip-cli-DOerTq-R.d.ts} +42 -4
  303. package/dist/slice-HYRATV64.js +2 -0
  304. package/dist/surface-VTGDYWF5.js +2 -0
  305. package/dist/symbol-resolution-WD5EU5JE.js +2 -0
  306. package/dist/system-LRQNFOR2.js +2 -0
  307. package/dist/trace-F4B6OLL4.js +2 -0
  308. package/dist/typescript-mailbox-worker.js +1 -1
  309. package/dist/value-flow-VRPZY72V.js +2 -0
  310. package/dist/watch-server.js +3 -3
  311. package/package.json +1 -1
  312. package/dist/by-kind-4IYG2SKW.js +0 -2
  313. package/dist/call-graph-WQNXMNNN.js +0 -2
  314. package/dist/chunk-2BTJALUS.js +0 -454
  315. package/dist/chunk-3QXC54FQ.js +0 -3
  316. package/dist/chunk-42W3LFUK.js +0 -13
  317. package/dist/chunk-4GAQ6FI4.js +0 -43
  318. package/dist/chunk-6VEFRPTD.js +0 -5
  319. package/dist/chunk-7C26EKLZ.js +0 -4
  320. package/dist/chunk-7JYHQAH2.js +0 -22
  321. package/dist/chunk-7KSO2OAP.js +0 -2
  322. package/dist/chunk-AK3PYTIK.js +0 -5
  323. package/dist/chunk-AMIMMNA4.js +0 -11
  324. package/dist/chunk-AUY5BL74.js +0 -2
  325. package/dist/chunk-BDHFVH2M.js +0 -18
  326. package/dist/chunk-BECZLYNU.js +0 -8
  327. package/dist/chunk-BYDAFMSR.js +0 -57
  328. package/dist/chunk-BZYSGZRK.js +0 -2
  329. package/dist/chunk-C7IJMOFP.js +0 -134
  330. package/dist/chunk-CBBHFNLX.js +0 -2
  331. package/dist/chunk-D35XIZGN.js +0 -2
  332. package/dist/chunk-DKM723YF.js +0 -79
  333. package/dist/chunk-E44IVWIJ.js +0 -367
  334. package/dist/chunk-EDMB6SSO.js +0 -7
  335. package/dist/chunk-EETGXQY7.js +0 -3
  336. package/dist/chunk-FKGQOTKD.js +0 -2
  337. package/dist/chunk-GH5YSGZL.js +0 -5
  338. package/dist/chunk-HCVJR2V4.js +0 -3
  339. package/dist/chunk-HXOU4XNH.js +0 -3
  340. package/dist/chunk-IMKZEXZG.js +0 -2
  341. package/dist/chunk-ISIQLPJ2.js +0 -61
  342. package/dist/chunk-IXESDH3J.js +0 -2
  343. package/dist/chunk-JT6XX7QY.js +0 -8
  344. package/dist/chunk-MHIEP7EG.js +0 -4
  345. package/dist/chunk-OJNK5ALA.js +0 -2
  346. package/dist/chunk-OXYAWIEA.js +0 -2
  347. package/dist/chunk-OZETODHH.js +0 -2
  348. package/dist/chunk-PBUH2P5S.js +0 -3
  349. package/dist/chunk-PLYUVM4F.js +0 -2
  350. package/dist/chunk-Q7GBK5T7.js +0 -81
  351. package/dist/chunk-QWKHW6VZ.js +0 -2
  352. package/dist/chunk-RPL3ARU7.js +0 -16
  353. package/dist/chunk-SVHTMVA4.js +0 -4
  354. package/dist/chunk-T6QD2ZQB.js +0 -43
  355. package/dist/chunk-TD7VKJ2Y.js +0 -117
  356. package/dist/chunk-TUSPIVZ3.js +0 -4
  357. package/dist/chunk-UT7TADJX.js +0 -2
  358. package/dist/chunk-VUSKPCUB.js +0 -2
  359. package/dist/chunk-WN3TCGJ4.js +0 -2
  360. package/dist/chunk-WSLEJSFR.js +0 -2
  361. package/dist/chunk-WYZIHUPZ.js +0 -16
  362. package/dist/chunk-XE33FV5W.js +0 -2
  363. package/dist/chunk-Z2AWCTN6.js +0 -2
  364. package/dist/chunk-ZOXKSQQB.js +0 -2
  365. package/dist/code-EQJFDT6I.js +0 -2
  366. package/dist/code-result-json-7UWIWBOO.js +0 -2
  367. package/dist/dataflow-6VL54GX5.js +0 -2
  368. package/dist/dependence-slice-DT2NUHD2.js +0 -2
  369. package/dist/deps-DB7H5IKC.js +0 -2
  370. package/dist/direct-navigation-O3LUAYWQ.js +0 -3
  371. package/dist/entry-map-6K62RV3D.js +0 -2
  372. package/dist/files-MSLD7MO6.js +0 -2
  373. package/dist/hierarchy-IVBXAKFA.js +0 -2
  374. package/dist/imports-FRAVZ3Y2.js +0 -2
  375. package/dist/members-KJOJDYGO.js +0 -2
  376. package/dist/methods-2AYABBT3.js +0 -2
  377. package/dist/output-continuation-command-JHMPH6NC.js +0 -3
  378. package/dist/project-reindex-HYO4WD7Z.js +0 -3
  379. package/dist/refs-ARMA6XUJ.js +0 -2
  380. package/dist/refs-pagination-VUGIWN6U.js +0 -2
  381. package/dist/slice-YOB5YFAM.js +0 -2
  382. package/dist/surface-VY5EFWTW.js +0 -2
  383. package/dist/symbol-resolution-DGQN4XIV.js +0 -2
  384. package/dist/system-2KQ3QD2P.js +0 -2
  385. package/dist/trace-HTIPTXAE.js +0 -2
  386. package/dist/value-flow-5FV3VQI7.js +0 -2
@@ -1,4 +1,4 @@
1
- import{c as K,d as O,e as Q,f as U,n as Y}from"./chunk-AYPDH2LU.js";import{a as H}from"./chunk-4GAQ6FI4.js";import{d as V,e as Z}from"./chunk-MTDBHTSF.js";import{A as J,e as $,g as B,t as N,u as G,z as W}from"./chunk-TD7VKJ2Y.js";import{s as D,x,z as j}from"./chunk-42W3LFUK.js";import{z as k}from"./chunk-7JYHQAH2.js";import{d as A}from"./chunk-Q7GBK5T7.js";import{d as v}from"./chunk-GH5YSGZL.js";function Ie(o,t,n={}){let i=z(o,[t],{additive:n.additive,semantic:n.semantic,semanticEvidence:n.semanticEvidence}),l=n.callableOnly?(i.get(t.symbolId)??[]).filter(s=>B(s.symbol)||s.source==="ast-callsite"):i.get(t.symbolId)??[];return typeof n.limit=="number"?l.slice(0,n.limit):l}function ve(o,t,n){return te(o,[t],n).get(t.symbolId)??[]}function te(o,t,n){let i=se(o)?ce(o,t,{semantic:n.semantic!==!1,semanticEvidence:n.semanticEvidence}):ae(o,n.semanticEvidence);return typeof n.limit!="number"?new Map(t.map(l=>[l.symbolId,i.get(l.symbolId)??[]])):new Map(t.map(l=>[l.symbolId,(i.get(l.symbolId)??[]).slice(0,n.limit)]))}var oe=A("caller-rows",{clearGroups:["whole-project"]}),ie=A("targeted-caller-strategy",{clearGroups:["whole-project"]}),le=2e4;function se(o){return ie.get(o,()=>(o.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>le)}function ae(o,t){return oe.get(o,()=>{let n=G(o),i=z(o,n,{semanticEvidence:t}),l=new Map;for(let c of n)l.set(c.symbol,c.symbolId);let s=new Map,a=new Map;for(let c of n){let f=i.get(c.symbolId);if(!(!f||f.length===0))for(let b of f){let r=l.get(b.symbol);if(r===void 0||r===c.symbolId)continue;let u=s.get(r);u||(u=[],s.set(r,u),a.set(r,new Set));let h=`${c.symbol}|${c.relativePath}`;a.get(r).has(h)||(a.get(r).add(h),u.push({symbol:c.symbol,file:c.relativePath,source:"caller-map-inversion",callEvidence:b.source}))}}return s})}function ce(o,t,n){let i=n.semantic&&n.semanticEvidence?t.flatMap(e=>{let d=re(o,e);return d?[d]:[]}):[],l=new Map(i.map(e=>[e.symbolId,e])),s=n.semanticEvidence?.referenceMap(o,i)??new Map,a=Y(o,t),c=new Set(t.map(e=>e.symbol)),b=[...new Set(t.flatMap(e=>H(o,"reverse",[e.relativePath])))].flatMap(e=>N(o,e)),r=new Map,u=X(o,b);for(let e of b)for(let d of u.get(e.symbolId)??[]){if(!c.has(d.symbol))continue;let g=r.get(d.symbol)??[];g.push({symbol:e.symbol,file:e.relativePath,source:"caller-map-inversion",callEvidence:d.source}),r.set(d.symbol,g)}let h=new Map;for(let e of t){let d=[],g=new Set,S=m=>{if(m.symbol===e.symbol)return;let E=`${m.symbol}|${m.file}`;g.has(E)||(g.add(E),d.push(m))};for(let m of r.get(e.symbol)??[])S(m);for(let m of a.get(e.symbolId)??[])m.file!==e.relativePath&&S({symbol:m.enclosingSymbol??m.file,file:m.file,source:"resolved-reference"});let L=l.get(e.symbolId);if(L)for(let m of s.get(L.symbolId)??[]){if(m.file===e.relativePath||o.isIgnored(m.file))continue;let E=J(N(o,m.file),m.line);S({symbol:E?.symbol??m.file,file:m.file,source:"semantic-reference"})}h.set(e.symbolId,d)}return h}function re(o,t){let n=V().join(", "),i=Z().join(", ");return o.get(`SELECT
1
+ import{c as K,d as O,e as Q,f as U,n as Y}from"./chunk-DYGHBZ2N.js";import{a as H}from"./chunk-TEBQMNVI.js";import{d as V,e as Z}from"./chunk-MTDBHTSF.js";import{A as J,e as $,g as B,t as N,u as G,z as W}from"./chunk-N2ZSIIGR.js";import{A as j,t as D,y as x}from"./chunk-ODDUPDP7.js";import{z as k}from"./chunk-ZOHS7AQV.js";import{d as A}from"./chunk-JWTGMPIT.js";import{d as v}from"./chunk-N5B2NILC.js";function Ie(o,t,n={}){let i=z(o,[t],{additive:n.additive,semantic:n.semantic,semanticEvidence:n.semanticEvidence}),l=n.callableOnly?(i.get(t.symbolId)??[]).filter(s=>B(s.symbol)||s.source==="ast-callsite"):i.get(t.symbolId)??[];return typeof n.limit=="number"?l.slice(0,n.limit):l}function ve(o,t,n){return te(o,[t],n).get(t.symbolId)??[]}function te(o,t,n){let i=se(o)?ce(o,t,{semantic:n.semantic!==!1,semanticEvidence:n.semanticEvidence}):ae(o,n.semanticEvidence);return typeof n.limit!="number"?new Map(t.map(l=>[l.symbolId,i.get(l.symbolId)??[]])):new Map(t.map(l=>[l.symbolId,(i.get(l.symbolId)??[]).slice(0,n.limit)]))}var oe=A("caller-rows",{clearGroups:["whole-project"]}),ie=A("targeted-caller-strategy",{clearGroups:["whole-project"]}),le=2e4;function se(o){return ie.get(o,()=>(o.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>le)}function ae(o,t){return oe.get(o,()=>{let n=G(o),i=z(o,n,{semanticEvidence:t}),l=new Map;for(let c of n)l.set(c.symbol,c.symbolId);let s=new Map,a=new Map;for(let c of n){let f=i.get(c.symbolId);if(!(!f||f.length===0))for(let b of f){let r=l.get(b.symbol);if(r===void 0||r===c.symbolId)continue;let u=s.get(r);u||(u=[],s.set(r,u),a.set(r,new Set));let h=`${c.symbol}|${c.relativePath}`;a.get(r).has(h)||(a.get(r).add(h),u.push({symbol:c.symbol,file:c.relativePath,source:"caller-map-inversion",callEvidence:b.source}))}}return s})}function ce(o,t,n){let i=n.semantic&&n.semanticEvidence?t.flatMap(e=>{let d=re(o,e);return d?[d]:[]}):[],l=new Map(i.map(e=>[e.symbolId,e])),s=n.semanticEvidence?.referenceMap(o,i)??new Map,a=Y(o,t),c=new Set(t.map(e=>e.symbol)),b=[...new Set(t.flatMap(e=>H(o,"reverse",[e.relativePath])))].flatMap(e=>N(o,e)),r=new Map,u=X(o,b);for(let e of b)for(let d of u.get(e.symbolId)??[]){if(!c.has(d.symbol))continue;let g=r.get(d.symbol)??[];g.push({symbol:e.symbol,file:e.relativePath,source:"caller-map-inversion",callEvidence:d.source}),r.set(d.symbol,g)}let h=new Map;for(let e of t){let d=[],g=new Set,S=m=>{if(m.symbol===e.symbol)return;let E=`${m.symbol}|${m.file}`;g.has(E)||(g.add(E),d.push(m))};for(let m of r.get(e.symbol)??[])S(m);for(let m of a.get(e.symbolId)??[])m.file!==e.relativePath&&S({symbol:m.enclosingSymbol??m.file,file:m.file,source:"resolved-reference"});let L=l.get(e.symbolId);if(L)for(let m of s.get(L.symbolId)??[]){if(m.file===e.relativePath||o.isIgnored(m.file))continue;let E=J(N(o,m.file),m.line);S({symbol:E?.symbol??m.file,file:m.file,source:"semantic-reference"})}h.set(e.symbolId,d)}return h}function re(o,t){let n=V().join(", "),i=Z().join(", ");return o.get(`SELECT
2
2
  d.id AS documentId,
3
3
  gs.id AS symbolId,
4
4
  gs.symbol,
@@ -35,4 +35,4 @@ import{c as K,d as O,e as Q,f as U,n as Y}from"./chunk-AYPDH2LU.js";import{a as
35
35
  ) def_chunk ON def_chunk.symbol_id = gs.id
36
36
  WHERE gs.id IN (${e.map(()=>"?").join(",")})`,...e,...e)),c=T([...t.map(e=>e.documentId),...a.flatMap(e=>e.document_id===null?[]:[e.document_id])]),f=new Map(c.flatMap(e=>o.all(`SELECT id, relative_path FROM documents
37
37
  WHERE id IN (${e.map(()=>"?").join(",")})`,...e).map(d=>[d.id,d.relative_path]))),b=new Map;for(let e of a)b.has(e.symbol_id)||b.set(e.symbol_id,{symbol:e.symbol,file:e.document_id!==null?f.get(e.document_id)??"":""});let r=new Map,u=f,h=be(t);for(let[e,d]of h){let S=[...l.get(e)??[]].sort((y,C)=>y.start_line-C.start_line||y.end_line-C.end_line),L=[...d].sort((y,C)=>y.startLine-C.startLine||y.endLine-C.endLine),m=new Set,E=0;for(let y of L){for(;E<S.length&&S[E].start_line<=y.endLine;)m.add(S[E]),E+=1;for(let p of m)p.end_line<y.startLine&&m.delete(p);let C=new Set,P=[],R=null,ee=()=>{if(R)return R;let p=u.get(y.documentId)??"",_=new Set;if(p){let I=K(o,p),w=Math.max(0,y.startLine),F=Math.min(I.length-1,y.endLine);for(let M=w;M<=F;M+=1)for(let ne of I[M])_.add(ne)}return R=_,_};for(let p of m){if(p.symbol_id===y.symbolId)continue;let _=b.get(p.symbol_id);if(!_)continue;if(!(p.start_line>=y.startLine&&p.end_line<=y.endLine)){if(!(p.start_line<=y.endLine&&p.end_line>=y.startLine))continue;let M=$(_.symbol);if(!M||!ee().has(M))continue}let w=`${_.symbol}|${p.chunk_id}`;C.has(w)||(C.add(w),P.push({..._,chunkId:p.chunk_id,source:"scip-chunk"}))}r.set(y.symbolId,P)}}return r}var q=500;function T(o){let t=[...new Set(o)],n=[];for(let i=0;i<t.length;i+=q)n.push(t.slice(i,i+q));return n}function be(o){let t=new Map;for(let n of o){let i=t.get(n.documentId);i?i.push(n):t.set(n.documentId,[n])}return t}function ye(o){let t=new Map;for(let[n,i]of o){let l=[];for(let s of i)l.push({symbol:s.symbol,file:s.file,chunkId:-1,source:"semantic-callee",...s.callsiteLine===void 0?{}:{callsiteLine:s.callsiteLine}});t.set(n,l)}return t}export{Ie as a,ve as b,te as c,z as d};
38
- //# sourceMappingURL=chunk-BWVQP3LB.js.map
38
+ //# sourceMappingURL=chunk-E73UNJTF.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ERCYGVAM.js";import{a as t}from"./chunk-4GAQ6FI4.js";function a(e,o){let r=i(e,o);return r?t(e,"forward",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}function p(e,o){let r=i(e,o);return r?t(e,"reverse",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}export{a,p as b};
2
- //# sourceMappingURL=chunk-GVOMSPGL.js.map
1
+ import{a as i}from"./chunk-BRV7PIFF.js";import{a as t}from"./chunk-TEBQMNVI.js";function a(e,o){let r=i(e,o);return r?t(e,"forward",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}function p(e,o){let r=i(e,o);return r?t(e,"reverse",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}export{a,p as b};
2
+ //# sourceMappingURL=chunk-EG2CPZMJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-EELPBR7E.js";import{b as i}from"./chunk-YXPUP5G2.js";import{existsSync as h}from"fs";import{isAbsolute as p,join as g}from"path";function D(e,n){let t=l(e,n,{allowMultiple:!1})[0]?.relativePath;return t||d(e,n)}function P(e,n){return l(e,n,{allowMultiple:!0}).map(t=>t.relativePath)}function S(e,n){let t=l(e,n,{allowMultiple:!0});return t.length===1?t[0].relativePath:null}function d(e,n){if(!n)return null;let t=n.replace(/\\/g,"/").replace(/^\.\//,""),r=p(t)&&t.startsWith(e.config.projectRoot)?t.slice(e.config.projectRoot.length).replace(/^\/+/,""):t,o=g(e.config.projectRoot,r);return h(o)?r:null}function l(e,n,t){let r=d(e,n);if(r)return i(e,r,t).filter(a=>a.relativePath===r);let o=n.replace(/\\/g,"/").replace(/^\.\//,""),s=p(o)||o.includes("/"),c=i(e,n,{...t,requirePathMatch:s});if(c.length===0){if(s)return[];let a=u(e,n);return!a||e.isIgnored(a.relativePath)?[]:[{relativePath:a.relativePath,score:700}]}return c}export{D as a,P as b,S as c};
2
- //# sourceMappingURL=chunk-56NQAEPJ.js.map
1
+ import{a as u}from"./chunk-HOENASQM.js";import{b as i}from"./chunk-YXPUP5G2.js";import{existsSync as h}from"fs";import{isAbsolute as p,join as g}from"path";function D(e,n){let t=l(e,n,{allowMultiple:!1})[0]?.relativePath;return t||d(e,n)}function P(e,n){return l(e,n,{allowMultiple:!0}).map(t=>t.relativePath)}function S(e,n){let t=l(e,n,{allowMultiple:!0});return t.length===1?t[0].relativePath:null}function d(e,n){if(!n)return null;let t=n.replace(/\\/g,"/").replace(/^\.\//,""),r=p(t)&&t.startsWith(e.config.projectRoot)?t.slice(e.config.projectRoot.length).replace(/^\/+/,""):t,o=g(e.config.projectRoot,r);return h(o)?r:null}function l(e,n,t){let r=d(e,n);if(r)return i(e,r,t).filter(a=>a.relativePath===r);let o=n.replace(/\\/g,"/").replace(/^\.\//,""),s=p(o)||o.includes("/"),c=i(e,n,{...t,requirePathMatch:s});if(c.length===0){if(s)return[];let a=u(e,n);return!a||e.isIgnored(a.relativePath)?[]:[{relativePath:a.relativePath,score:700}]}return c}export{D as a,P as b,S as c};
2
+ //# sourceMappingURL=chunk-EKV5HX33.js.map
@@ -1,3 +1,3 @@
1
- import{a as R}from"./chunk-IXESDH3J.js";import{p as h}from"./chunk-2XCGSDIT.js";import{a as g}from"./chunk-EELPBR7E.js";import{h as p}from"./chunk-C7IJMOFP.js";import{a as m}from"./chunk-YXPUP5G2.js";import{g as d}from"./chunk-DRENNWRG.js";function D(t,r,n={}){let e=g(t,r);if(!e)return[];let l=!d(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=h(t,e,{semantic:n.semantic,semanticEvidence:R}).map(s=>({relativePath:s.file,line:s.line})),o=b(t,e),f=new Set,a=[];for(let s of[...l,...c,...o]){let u=`${s.relativePath}:${s.line}`;f.has(u)||(f.add(u),a.push(s))}return a}function b(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=S(r.symbol);if(n.length===0)return[];let e=[];for(let i of m(t,{extensions:[".rb"],includeIgnored:!1})){let l=p(t,i);if(!l)continue;let c=l.split(`
1
+ import{a as R}from"./chunk-WYCTJDVR.js";import{p as h}from"./chunk-YEN6CYC7.js";import{a as g}from"./chunk-HOENASQM.js";import{i as p}from"./chunk-3L2ZBPEX.js";import{a as m}from"./chunk-YXPUP5G2.js";import{g as d}from"./chunk-DRENNWRG.js";function D(t,r,n={}){let e=g(t,r);if(!e)return[];let l=!d(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=h(t,e,{semantic:n.semantic,semanticEvidence:R}).map(s=>({relativePath:s.file,line:s.line})),o=b(t,e),f=new Set,a=[];for(let s of[...l,...c,...o]){let u=`${s.relativePath}:${s.line}`;f.has(u)||(f.add(u),a.push(s))}return a}function b(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=S(r.symbol);if(n.length===0)return[];let e=[];for(let i of m(t,{extensions:[".rb"],includeIgnored:!1})){let l=p(t,i);if(!l)continue;let c=l.split(`
2
2
  `);for(let o=0;o<c.length;o++){let f=c[o]??"";n.some(a=>new RegExp(`@${a}\\b|\\b${a}:`).test(f))&&e.push({relativePath:i,line:o})}}return e}function S(t){let n=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),e=n.split("_").filter(Boolean),i=new Set;return n&&i.add(n),e.length>=1&&i.add(e[e.length-1]),e.length>=2&&i.add(e.slice(-2).join("_")),[...i]}export{D as a};
3
- //# sourceMappingURL=chunk-GDRJB3SB.js.map
3
+ //# sourceMappingURL=chunk-EQHFIL6T.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-7KCZELVM.js";import{a as b,b as S}from"./chunk-6NC3YSPY.js";import{a as m}from"./chunk-IXESDH3J.js";import{p as y}from"./chunk-2XCGSDIT.js";import{a as f}from"./chunk-EELPBR7E.js";import{c as r}from"./chunk-DRENNWRG.js";function u(o,l,t={}){let i=f(o,l);if(!i)return null;let g=[{file:i.relativePath,line:i.startLine}],s=y(o,i,{semantic:t.semantic,semanticEvidence:m}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{outgoingCalls:c,incomingCalls:n}=h(o,i,s,{semantic:t.semantic!==!1});return{symbol:i.symbol,shortName:r(i.symbol),relativePath:i.relativePath,definitionSites:g.filter(e=>!o.isIgnored(e.file)),referenceSites:s,outgoingCalls:c.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),incomingCalls:n.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function A(o,l,t={}){let i=u(o,l,t);return i?{symbol:i.symbol,shortName:i.shortName,relativePath:i.relativePath,definitionSites:i.definitionSites,usageSites:i.referenceSites,producers:i.outgoingCalls,consumers:i.incomingCalls}:null}function h(o,l,t,i){let g=a(b(o,l,{limit:30,semantic:i.semantic,semanticEvidence:m}).map(n=>({symbol:n.symbol,file:n.file}))),s=a(S(o,l,{limit:30,semantic:i.semantic,semanticEvidence:m})),c=s.length>0?s:a(t.map(n=>({symbol:n.enclosingSymbol==="(top-level)"?n.file:n.enclosingSymbol,file:n.file})));return{outgoingCalls:g,incomingCalls:c}}export{u as a,A as b};
2
- //# sourceMappingURL=chunk-EWWY2ZFL.js.map
1
+ import{a as m}from"./chunk-7KCZELVM.js";import{a as b,b as S}from"./chunk-MV3CDXPI.js";import{a}from"./chunk-WYCTJDVR.js";import{p as y}from"./chunk-YEN6CYC7.js";import{a as f}from"./chunk-HOENASQM.js";import{c as r}from"./chunk-DRENNWRG.js";function u(o,l,t={}){let i=f(o,l);if(!i)return null;let g=[{file:i.relativePath,line:i.startLine}],s=y(o,i,{semantic:t.semantic,semanticEvidence:a}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{outgoingCalls:c,incomingCalls:n}=h(o,i,s,{semantic:t.semantic!==!1});return{symbol:i.symbol,shortName:r(i.symbol),relativePath:i.relativePath,definitionSites:g.filter(e=>!o.isIgnored(e.file)),referenceSites:s,outgoingCalls:c.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),incomingCalls:n.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function A(o,l,t={}){let i=u(o,l,t);return i?{symbol:i.symbol,shortName:i.shortName,relativePath:i.relativePath,definitionSites:i.definitionSites,usageSites:i.referenceSites,producers:i.outgoingCalls,consumers:i.incomingCalls}:null}function h(o,l,t,i){let g=m(b(o,l,{limit:30,semantic:i.semantic,semanticEvidence:a}).map(n=>({symbol:n.symbol,file:n.file}))),s=m(S(o,l,{limit:30,semantic:i.semantic,semanticEvidence:a})),c=s.length>0?s:m(t.map(n=>({symbol:n.enclosingSymbol==="(top-level)"?n.file:n.enclosingSymbol,file:n.file})));return{outgoingCalls:g,incomingCalls:c}}export{u as a,A as b};
2
+ //# sourceMappingURL=chunk-ESIQ66Z7.js.map
@@ -0,0 +1,3 @@
1
+ import{a as de}from"./chunk-CNO7TOKL.js";import{b as ue}from"./chunk-BOJ5SVE2.js";import{c as N}from"./chunk-CJZXN4NU.js";import{a as P}from"./chunk-W7CXK74K.js";import{j as le}from"./chunk-NWQXSFFU.js";import{b as ae,c as ce}from"./chunk-E73UNJTF.js";import{i as oe}from"./chunk-DYGHBZ2N.js";import{a as ie,b as re,c as se}from"./chunk-KK7GPALL.js";import{e as ee,f as te,h as ne}from"./chunk-XRYABF57.js";import{b as Q}from"./chunk-NJITK2GP.js";import{C as E,d as Z,e as $,g as G,h as J,i as K,j as q,k as V,s as X,x as Y}from"./chunk-N2ZSIIGR.js";import{y as H}from"./chunk-ODDUPDP7.js";import{D as x,a as S,z}from"./chunk-ZOHS7AQV.js";import{c as U,e as j,h as I,k as W}from"./chunk-FESCRNVV.js";import{b as w,i as B,y as b}from"./chunk-JWTGMPIT.js";import{d as L}from"./chunk-N5B2NILC.js";var _=new WeakMap,me=U({kind:"definition-exclusions",invalidation:j("definition-exclusions"),serialize:e=>JSON.stringify(e),deserialize:Ne});function pe(e,t){let n=z(t);if(!(n==="rust"||n==="typescript"||n==="tsx"||n==="javascript"))return[];let i=I(e,t);if(!i)return[];let o=B(e,t,i),c=me.read(e,t,o);if(c)return c;let u=n==="rust"?Ue(e,t):Fe(e,t);return me.write(e,t,o,u),u}function Ne(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=t.map(Te);return n.some(r=>r===null)?null:n}catch{return null}}function Te(e){if(!e||typeof e!="object")return null;let t=e;if(typeof t.startLine!="number"||!Number.isFinite(t.startLine)||typeof t.endLine!="number"||!Number.isFinite(t.endLine)||typeof t.reason!="string"||t.containerName!==void 0&&typeof t.containerName!="string")return null;let n=t.disposition===void 0?Xe(t.reason):t.disposition;return n!=="exclude"&&n!=="implicit-usage"?null:{startLine:t.startLine,endLine:t.endLine,reason:t.reason,disposition:n,...t.containerName?{containerName:t.containerName}:{}}}var ye=new Set(["describe","it","test","fdescribe","fit","xdescribe","xit","beforeEach","afterEach","beforeAll","afterAll","before","after","suite","bench","benchmark"]),ke=/\b(?:describe|it|test|fdescribe|fit|xdescribe|xit|beforeEach|afterEach|beforeAll|afterAll|before|after|suite|bench|benchmark)\s*\(/,Ae=/\b(?:export\s+)?(?:async\s+)?function\s+use[A-Z][A-Za-z0-9_$]*\b|\b(?:const|let|var)\s+use[A-Z][A-Za-z0-9_$]*\s*(?::[^=;]+)?=\s*(?:async\s*)?(?:function\b|(?:<[^=;{]+>\s*)?(?:\([^)]*\)|[A-Za-z_$][\w$]*)\s*=>)/;function Fe(e,t){let n=I(e,t);if(!n||!Me(n))return[];let r=x(e,t);if(!r)return[];let i=_.get(r);if(i)return i;let o=!1,c=r.rootNode;for(let l of c.namedChildren){if(l.type!=="expression_statement")continue;let d=l.namedChild(0);if(!d||d.type!=="call_expression")continue;let s=d.namedChild(0);if(!s)continue;let a=s.type==="member_expression"?s.namedChild(s.namedChildCount-1)?.text:s.text;if(a&&ye.has(a)){o=!0;break}}let u=[];o&&u.push({startLine:0,endLine:c.endPosition.row,reason:"TS/JS test file (describe/it/test at top level)",disposition:"exclude"});for(let l of c.namedChildren){let d=null,s=null;if(l.type==="function_declaration")d=l.namedChild(0)?.text??null,s=l;else if(l.type==="export_statement"){let a=l.namedChild(0);a?.type==="function_declaration"&&(d=a.namedChild(0)?.text??null,s=a)}else if(l.type==="lexical_declaration"){let a=l.namedChild(0);if(a?.type==="variable_declarator"){let p=a.namedChild(0)?.text,f=a.namedChild(1);p&&(f?.type==="arrow_function"||f?.type==="function_expression")&&(d=p,s=a)}}d&&/^use[A-Z]/.test(d)&&s&&u.push({startLine:s.startPosition.row,endLine:s.endPosition.row,reason:"React custom hook (use*)",disposition:"exclude"})}return u.push(...be(r,new Set(["function_declaration","method_definition","class_declaration","interface_declaration","type_alias_declaration","enum_declaration","variable_declarator","export_statement"]),new Set(["comment"]))),_.set(r,u),u}function Me(e){if(e.includes("scip-query"))return!0;let t=!1;for(let n of ye)if(e.includes(n)){t=!0;break}return t&&ke.test(e)?!0:e.includes("use")&&Ae.test(e)}var Oe=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale)?/i;function Be(e){return Oe.test(e)}function be(e,t,n){let r=[],i=o=>{if(t.has(o.type)&&o.parent){let u=o.parent.children,l=-1;for(let d=0;d<u.length;d+=1)if(u[d].startIndex===o.startIndex&&u[d].type===o.type){l=d;break}if(l>0)for(let d=l-1;d>=0;d-=1){let s=u[d];if(n.has(s.type)){if(Be(s.text)){r.push({startLine:o.startPosition.row,endLine:o.endPosition.row,reason:"scip-query suppression comment",disposition:"exclude"});break}continue}if(!(s.type==="attribute_item"||s.type==="inner_attribute_item"))break}}for(let c of o.namedChildren)i(c)};return i(e.rootNode),r}function Ue(e,t){let n=x(e,t);if(!n)return[];let r=_.get(n);if(r)return r;let i=[],o=je(n);return o?(_.set(n,o),o):(ge(n.rootNode,i,!1,!1),i.push(...be(n,new Set(["function_item","function_signature_item","struct_item","enum_item","union_item","impl_item","mod_item","static_item","const_item"]),new Set(["line_comment","block_comment"]))),i.push(...qe(n.rootNode)),_.set(n,i),i)}function je(e){return Ye(e.rootNode)?[{startLine:0,endLine:e.rootNode.endPosition.row,reason:"generated file (@generated header)",disposition:"exclude"}]:null}function ge(e,t,n,r){let i=n,o=r;e.type==="trait_item"&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait declaration body (dynamic dispatch)",disposition:"implicit-usage"}),e.type==="impl_item"&&e.childForFieldName("trait")&&(o=!0,t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl block (dynamic dispatch)",disposition:"implicit-usage"})),e.type==="function_item"||e.type==="function_signature_item"?We(e,t,n,r):r&&Ke(e)?t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl associated item (dynamic dispatch)",disposition:"implicit-usage"}):e.type==="struct_item"||e.type==="enum_item"||e.type==="union_item"?ze(e,t,n):e.type==="mod_item"&&T(e).some(c=>/#\[\s*cfg\s*\(\s*test\s*\)/.test(c))&&(i=!0);for(let c of e.namedChildren)ge(c,t,i,o)}function We(e,t,n,r){let i=T(e),o=null;r?o={reason:"trait impl method (dynamic dispatch)",disposition:"implicit-usage"}:n&&(o={reason:"inside #[cfg(test)] mod",disposition:"exclude"});for(let c of i){if(he(c)){o={reason:"#[allow(dead_code)]",disposition:"exclude"};break}let u=Ge(c);if(u){o=u;break}}o&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:o.reason,disposition:o.disposition})}function ze(e,t,n){let r=T(e),i=e.namedChildren.find(o=>o.type==="type_identifier")?.text;r.some(Je)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[derive(...)] - generated impl may access fields",disposition:"implicit-usage",containerName:i}),r.some(he)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[allow(dead_code)]",disposition:"exclude",containerName:i}),n&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"inside #[cfg(test)] mod",disposition:"exclude",containerName:i})}function T(e){let t=e.parent;if(!t)return[];let n=t.children,r=-1;for(let o=0;o<n.length;o+=1)if(n[o].startIndex===e.startIndex&&n[o].type===e.type){r=o;break}if(r<=0)return[];let i=[];for(let o=r-1;o>=0;o-=1){let c=n[o];if(c.type==="attribute_item"||c.type==="inner_attribute_item")i.push(c.text);else{if(c.type==="line_comment"||c.type==="block_comment")continue;break}}return i}var He=new Set(["test","bench","tokio::test","async_std::test"]),Ze=new Set(["no_mangle","export_name","link_name","used","macro_export","proc_macro","proc_macro_derive","proc_macro_attribute"]),$e=new Set(["allow","warn","deny","forbid","cfg","cfg_attr","doc","inline","cold","must_use","deprecated","repr","derive","automatically_derived","non_exhaustive","path","link","link_section","global_allocator","panic_handler"]);function Ge(e){if(/#\[\s*cfg\s*\(\s*test\s*\)/.test(e))return{reason:"#[cfg(test)]",disposition:"exclude"};let t=Ve(e);return t?He.has(t)?{reason:`#[${t}]`,disposition:"exclude"}:Ze.has(t)?{reason:`Rust ABI/export attribute #[${t}]`,disposition:"implicit-usage"}:$e.has(t)?null:{reason:`Rust attribute macro #[${t}]`,disposition:"implicit-usage"}:null}function Je(e){return/#\[\s*derive\s*\(/.test(e)}function he(e){return/#\[\s*allow\s*\(\s*dead_code\s*\)/.test(e)}function Ke(e){return e.type==="const_item"||e.type==="type_item"||e.type==="static_item"||e.type==="associated_type"}function qe(e){let t=Qe(e);if(t.size===0)return[];let n=[];for(let r of e.descendantsOfType("mod_item")){let i=r.childForFieldName("name")?.text;i&&t.has(i)&&n.push({startLine:r.startPosition.row,endLine:r.endPosition.row,reason:'attribute `with = "..."` module - body may be invoked via reflection',disposition:"implicit-usage",containerName:i})}return n}function Ve(e){let t=/^#!?\[\s*([A-Za-z_][A-Za-z0-9_]*(?:\s*::\s*[A-Za-z_][A-Za-z0-9_]*)*)/.exec(e);return t?t[1].replace(/\s+/g,""):null}function Xe(e){return e==="#[tauri::command]"||e==="#[command]"||e==="#[wasm_bindgen]"||e==="#[no_mangle]"||e==="#[napi]"||e==="#[pyfunction]"||e==="#[pymethod]"||e==="#[pyo3]"||e==="#[doc(hidden)]"||e.startsWith("trait ")||e.startsWith("#[derive(<reflective>)]")||e.startsWith("#[derive(...)]")||e.startsWith('serde `with = "')||e.startsWith('attribute `with = "')||e.startsWith("Rust attribute macro #[")||e.startsWith("Rust ABI/export attribute #[")?"implicit-usage":"exclude"}function Ye(e){for(let t=0;t<Math.min(e.namedChildCount,12);t+=1){let n=e.namedChild(t);if(!n||n.type!=="line_comment"&&n.type!=="block_comment")break;if(/@generated\b/.test(n.text)||/This file is .*generated\b/i.test(n.text)||/Code generated by/i.test(n.text)||/Generated by:\s*https?:\/\/openapi-generator/i.test(n.text)||/openapi-generator/i.test(n.text)&&/Generated by/i.test(n.text))return!0}return!1}var fe=/\bwith\s*=\s*"([^"]+)"/g;function Qe(e){let t=new Set;for(let n of e.descendantsOfType("attribute_item")){fe.lastIndex=0;let r;for(;(r=fe.exec(n.text))!==null;){let i=r[1],o=i.split("::").pop()??i;o&&t.add(o)}}return t}function xe(e){let t=k(e);return(n,r,i,o)=>t(n,r,i,o)?.disposition==="exclude"}function k(e){let t=new Map,n=r=>{let i=t.get(r);if(i)return i;let o=pe(e,r),c=new Map;for(let u of o){if(!u.containerName)continue;let l=c.get(u.containerName)??[];l.push(u),c.set(u.containerName,l)}return i={ranges:o,containers:c},t.set(r,i),i};return(r,i,o,c)=>{let u=n(r),l=[];for(let s of u.ranges)i>=s.startLine&&i<=s.endLine&&l.push(s);let d=new Set;c&&d.add(c);for(let s of E(o))d.add(s);for(let s of d){let a=u.containers.get(s);a&&l.push(...a)}return et(l)}}function et(e){if(e.length===0)return null;let n=e.find(r=>r.disposition==="exclude")??e[0];return{disposition:n.disposition,reason:n.reason}}function Dt(e,t={}){w(e,{groups:t.semanticProvider===!0?["whole-project","semantic-provider"]:["whole-project"]})}function _e(e,t,n={}){w(e,{groups:n.definitions===!0?["source-file","definition-catalog"]:["source-file"],file:t.replace(/\\/g,"/")})}function Se(e,t){if(t.isIgnoredPath(e.relativePath))return y("ignored-file");if(K(e.symbol))return y("module-like-symbol");if(!R(e.symbol))return y("non-value-symbol");if(!e.isFunctionLike&&e.enclosingSymbol&&R(e.enclosingSymbol))return y("nested-non-callable-value");if(!t.includeTests&&!tt(e.relativePath))return y("test-file");if(!t.includeTests&&t.isExcludedRegion(e.relativePath,e.startLine,e.symbol,e.parentTypeName))return y("excluded-file-region");let n=$(e.symbol);if(n==="<constructor>")return y("implicit-constructor");if(e.symbol.startsWith("scip-python ")){if(n==="__all__")return y("python-runtime-metadata");if(/^__[^_].*__$/.test(n))return y("python-protocol-member")}return t.isDeclarationOnlyCallable()?y("declaration-only-callable"):t.isFrameworkContractCallable()?y("framework-contract-member"):q(e.symbol)?y("rust-trait-impl-member"):V(e.symbol)?y("rust-test-module"):!t.includeMembers&&!nt(e)?y("member"):e.endLine-e.startLine+1<t.minLoc?y("below-min-loc"):{accepted:!0}}function tt(e){return Q(e)!=="test"}function y(e){return{accepted:!1,rejectionReason:e}}function R(e){return J(e)||e.endsWith("().")||e.endsWith(".")}function nt(e){return G(e.symbol)||E(e.symbol).length===0}function Ee(){return new Map}function Re(e,t,n){let r=new Map;for(let i of ie(e,n))e.isIgnored(i.relative_path)||t.has(i.relative_path)||v(r,i.symbol_id,i.relative_path,i.ref_count,"scip-mention");return r}function Ce(e,t,n,r={}){let i=new Set;if(r.conservative||n.size===0){for(let o of se(e,t))i.add(o.symbol_id);return i}for(let o of re(e,t))e.isIgnored(o.relative_path)||n.has(o.relative_path)||i.add(o.symbol_id);return i}function A(e,t){let n=e.get(t);if(!n)return!1;for(let r of n.values())if(r.occurrences>0)return!0;return!1}function C(e,t,n){let r=e.get(t);if(!r)return!1;for(let[i,o]of r)if(i!==n&&o.occurrences>0)return!0;return!1}function ve(e){return e?.occurrences??0}function v(e,t,n,r,i="source-fallback"){if(r<=0)return;let o=Le(e,t,n);o.occurrences+=r,o.sources.add(i)}function De(e,t,n,r,i){if(r<=0)return;let o=Le(e,t,n);o.occurrences=Math.max(r,o.occurrences),o.sources.add(i)}function Le(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=r.get(n);return i||(i={occurrences:0,sources:new Set},r.set(n,i)),i}var it=64,rt=300;function en(e,t={}){let{scope:n,minLoc:r=1,includeTests:i=!1,skipBarrels:o=!1,includeMembers:c=!1,deadCodeOnly:u=!1,scanLimit:l,semantic:d=!0}=t,s=0,a=b("dead.candidates",()=>{let m=ue(st(e,{scope:n,minLoc:r,includeTests:i,includeMembers:c}),l);return s=m.length,m},()=>({definitions:s})),p=0,f=o?b("dead.inactive-barrels",()=>{let m=new Set(ee(e));return p=m.size,m},()=>({paths:p})):new Set,F=0,g=u?Ee():b("dead.mention-reference-counts",()=>{let m=Re(e,f,a.map(D=>D.symbolId));return F=m.size,m},()=>({definitions:a.length,symbolsWithReferences:F})),M=0,Ie=u?b("dead.mentioned-symbol-ids",()=>{let m=Ce(e,a.map(D=>D.symbolId),f,{conservative:f.size===0});return M=m.size,m},()=>({definitions:a.length,referencedSymbols:M})):new Set,h=u?a.filter(m=>!Ie.has(m.symbolId)):a.filter(m=>!C(g,m.symbolId,m.relativePath));u?b("dead.source-fallback.dead-code-only",()=>mt(e,h,g,{inactiveBarrelPaths:f}),()=>({definitions:h.length,testReferencesIncluded:!0})):b("dead.source-fallback.ast",()=>dt(e,h,g,{inactiveBarrelPaths:f}),()=>({definitions:h.length,testReferencesIncluded:!0}));let O=u?h.filter(m=>!A(g,m.symbolId)):h.filter(m=>!C(g,m.symbolId,m.relativePath));b("dead.caller-map-supplement",()=>bt(e,O,g,{inactiveBarrelPaths:f,includeSemantic:!u&&d}),()=>({definitions:O.length,semantic:!u&&d}));let Pe=u?h.filter(m=>!A(g,m.symbolId)):a;return ut(e,ct(Pe,g))}function st(e,t){let n=xe(e),r=[];for(let i of Y(e,{scope:t.scope,symbolMatches:R,sqlPrefilter:"function-like"}))Se(i,{minLoc:t.minLoc,includeTests:t.includeTests,includeMembers:t.includeMembers,isIgnoredPath:c=>e.isIgnored(c),isExcludedRegion:n,isDeclarationOnlyCallable:()=>at(e,i),isFrameworkContractCallable:()=>de(e,i)}).accepted&&r.push(i);return r}var ot=["method_signature","abstract_method_signature","call_signature","construct_signature"];function at(e,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let n=x(e,t.relativePath);if(n)return n.rootNode.descendantsOfType([...ot]).some(i=>i.startPosition.row<=t.startLine&&i.endPosition.row>=t.endLine);let r=W(e,t.relativePath).slice(t.startLine,t.endLine+1).join(`
2
+ `).trim();return r.endsWith(";")&&!r.includes("=>")&&!r.includes("{")}function ct(e,t){return e.map(n=>lt(n,t)).filter(n=>n.cross_file_refs===0).sort((n,r)=>r.loc-n.loc||n.relative_path.localeCompare(r.relative_path)||n.start_line-r.start_line)}function lt(e,t){let n=t.get(e.symbolId)??new Map,r=ve(n.get(e.relativePath)),i=0;for(let[o,c]of n)o!==e.relativePath&&(i+=c.occurrences);return{relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine,loc:e.endLine-e.startLine+1,symbol:e.symbol,parent_type_name:e.parentTypeName,same_file_refs:r,cross_file_refs:i}}function ut(e,t){let n=k(e),r=[],i=0,o=0,c=0,u=0,l=0,d=0;for(let s of t){if(e.isIgnored(s.relative_path))continue;if(te(e,s.relative_path)){u++;continue}if(ne(e,s.symbol,s.relative_path)){l++;continue}let a=n(s.relative_path,s.start_line,s.symbol,s.parent_type_name),p=a?.disposition==="implicit-usage"?a.reason:void 0,f=p?"implicit-usage":s.same_file_refs===0?"dead-code":"file-internal";f==="dead-code"?i++:f==="file-internal"?o++:c++,d+=s.loc,r.push({relativePath:s.relative_path,startLine:s.start_line,endLine:s.end_line,loc:s.loc,symbol:s.symbol,shortName:Z(s.symbol),sameFileRefs:s.same_file_refs,kind:f,...p?{implicitUsageReason:p}:{}})}return{symbols:r,counts:{total:r.length,deadCode:i,fileInternal:o,implicitUsage:c,loc:d},applicability:{entrySurfaceExcluded:u,externalRootExcluded:l,implicitUsageSignals:c},totalCount:r.length,deadCodeCount:i,fileInternalCount:o,implicitUsageCount:c,totalLoc:d}}function dt(e,t,n,r){if(t.length===0)return;let i=new N(e),o=new Set(t.map(l=>l.symbolId)),c=new Set(t.map(l=>l.leaf).filter(Boolean)),u=new Set(i.sourceFiles());for(let l of S(e))u.add(l);i.scanSourceReferences({paths:u,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:c,skipPath:l=>r.inactiveBarrelPaths.has(l)},l=>{o.has(l.target.symbolId)&&(pt(e,l)||v(n,l.target.symbolId,l.sourceFile,yt(l),"source-fallback"))})}function mt(e,t,n,r){if(t.length===0)return;let i=new N(e),o=X(t),c=new Set(i.sourceFiles());for(let s of S(e))c.add(s);let u=new Set(o.keys()),l=new Map,d=s=>{let a=l.get(s);return a||(a=oe(e,s),l.set(s,a)),a};i.scanSourceReferences({paths:c,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:u,skipPath:s=>r.inactiveBarrelPaths.has(s),resolveTargets:({sourceFile:s,name:a,kind:p})=>{let f=o.get(a);return f?ft(s,a,f,()=>d(s),{permissive:p!=="cross-language-dispatch"}):[]},afterPath:s=>{l.delete(s),_e(e,s)}},s=>{let a=s.kind==="identifier"&&s.sourceFile===s.target.relativePath?Math.max(0,s.occurrences-1):s.occurrences;s.kind==="identifier"&&we(e,{sourceFile:s.sourceFile,name:s.name,target:s.target,occurrences:a})||v(n,s.target.symbolId,s.sourceFile,a,"source-fallback")})}function ft(e,t,n,r,i){let o=n.filter(d=>d.relativePath===e);if(o.length>0)return o;if(!i.permissive&&n.length===1)return[...n];let c=r(),u=c.get(t);if(u)for(let d of u){let s=n.filter(a=>L(d,a.relativePath));if(s.length>0)return s}let l=new Set;for(let d of c.values())for(let s of d)l.add(s);for(let d of l){let s=n.filter(a=>L(d,a.relativePath));if(s.length>0&&s.length===n.length)return s}return i.permissive?[...n]:[]}function pt(e,t){return t.kind==="cross-language-dispatch"&&t.target.relativePath===t.sourceFile?!0:t.kind==="identifier"&&we(e,t)}function yt(e){return e.kind==="identifier"&&e.target.relativePath===e.sourceFile?Math.max(0,e.occurrences-1):e.occurrences}function we(e,t){return t.occurrences>1?!1:H(e,t.sourceFile).some(n=>n.used||n.sourcePath!==t.target.relativePath?!1:n.importedName===t.name||n.localName===t.name)}function bt(e,t,n,r){let i=r.includeSemantic!==!1,o=i&&t.length>=it&&S(e).length>=rt,c=(s,a)=>{a===s.relativePath||e.isIgnored(a)||r.inactiveBarrelPaths.has(a)||De(n,s.symbolId,a,1,"caller-map")};if(o?b("dead.caller-map.per-symbol-non-semantic",()=>{let s=ce(e,t,{semantic:!1,semanticEvidence:P});for(let a of t){let p=s.get(a.symbolId)??[];for(let f of p)c(a,f.file)}},()=>({definitions:t.length,semantic:!1,batched:!0})):b("dead.caller-map.per-symbol",()=>{for(let s of t){let a=ae(e,s,{semantic:i,semanticEvidence:P});if(a.length!==0)for(let p of a)c(s,p.file)}},()=>({definitions:t.length,semantic:i})),!o)return;let u=0,l=b("dead.caller-map.semantic-candidates",()=>{let s=t.filter(a=>!C(n,a.symbolId,a.relativePath));return u=s.length,s},()=>({definitions:t.length,semanticCandidates:u}));if(l.length===0)return;let d=le(e,l);for(let s of l){let a=d.get(s.symbolId);if(a)for(let p of a)c(s,p)}}export{Dt as a,en as b};
3
+ //# sourceMappingURL=chunk-EVFUMY4R.js.map
@@ -1,2 +1,2 @@
1
- import{a as P,b as y}from"./chunk-FGNCOQUX.js";import{a as C,c as b,e as r,f}from"./chunk-B3X6KU75.js";import{a as g,b as h,c as k}from"./chunk-KMVGRIO2.js";import{P as v}from"./chunk-7JYHQAH2.js";function L(e,i={}){let{minSimilarity:o=.62,minTokens:n=8,limit:c=20,scope:l,scanLimit:u,filePattern:m,focusFiles:d}=i,s=B(e,{scope:l,minTokens:n,scanLimit:u}),p=P(s,t=>t.tokens);return y({profiles:s,limit:c,filePattern:m,focusFiles:d,candidateIndex:p,profile:{name:"vue-component-duplicates"},compare:(t,a)=>V(t,a,o),sort:(t,a)=>a.similarity-t.similarity||t.fileA.localeCompare(a.fileA)||t.fileB.localeCompare(a.fileB)})}function B(e,i){return v(e).vueProfiles({scope:i.scope,minTemplateTokens:i.minTokens,scanLimit:i.scanLimit}).map(o=>({file:o.file,tokens:o.templateTokens,loc:T(o)}))}function T(e){return e.totalLines}function V(e,i,o){let n=g(e.tokens,i.tokens);if(n.size<6||!R(n))return null;let c=k(e.tokens,i.tokens);if(c<o)return null;let l=r(n,"component:"),u=r(n,"prop:"),m=r(n,"event:"),d=r(n,"directive:"),s=r(n,"slot:"),p=r(n,"id:"),t=S({sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p});return{fileA:e.file,fileB:i.file,similarity:c,tokenCountA:e.tokens.size,tokenCountB:i.tokens.size,sharedTokens:f(n),sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p,evidenceClass:t.evidenceClass,actionTier:t.actionTier,evidenceClassReasons:t.reasons,recommendation:t.recommendation,uniqueToA:f(h(e.tokens,i.tokens)).slice(0,25),uniqueToB:f(h(i.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:i.loc}}function R(e){let i=0,o=0;for(let n of e)n.startsWith("component:")&&(i+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("directive:")||n.startsWith("slot:"))&&(o+=1);return b([{name:"component",count:i},{name:"behavior",count:o}],[{min:{component:1},reason:"shared custom component"},{min:{behavior:3},reason:"shared Vue template structure"}]).pass}function S(e){return C({genericWords:x,primitiveGroups:[{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"},{values:e.sharedDirectives,reasonPrefix:"shared directives",bucket:"generic"},{values:e.sharedSlots,reasonPrefix:"shared slots",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedIdentifiers,label:"shared identifier",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific Vue primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var x=new Set(["actions","app","button","card","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{L as a};
2
- //# sourceMappingURL=chunk-ZYM4HOFA.js.map
1
+ import{a as P,b as y}from"./chunk-2E7CX53V.js";import{a as C,c as b,e as r,f}from"./chunk-B3X6KU75.js";import{a as g,b as h,c as k}from"./chunk-KMVGRIO2.js";import{P as v}from"./chunk-ZOHS7AQV.js";function L(e,i={}){let{minSimilarity:o=.62,minTokens:n=8,limit:c=20,scope:l,scanLimit:u,filePattern:m,focusFiles:d}=i,s=B(e,{scope:l,minTokens:n,scanLimit:u}),p=P(s,t=>t.tokens);return y({profiles:s,limit:c,filePattern:m,focusFiles:d,candidateIndex:p,profile:{name:"vue-component-duplicates"},compare:(t,a)=>V(t,a,o),sort:(t,a)=>a.similarity-t.similarity||t.fileA.localeCompare(a.fileA)||t.fileB.localeCompare(a.fileB)})}function B(e,i){return v(e).vueProfiles({scope:i.scope,minTemplateTokens:i.minTokens,scanLimit:i.scanLimit}).map(o=>({file:o.file,tokens:o.templateTokens,loc:T(o)}))}function T(e){return e.totalLines}function V(e,i,o){let n=g(e.tokens,i.tokens);if(n.size<6||!R(n))return null;let c=k(e.tokens,i.tokens);if(c<o)return null;let l=r(n,"component:"),u=r(n,"prop:"),m=r(n,"event:"),d=r(n,"directive:"),s=r(n,"slot:"),p=r(n,"id:"),t=S({sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p});return{fileA:e.file,fileB:i.file,similarity:c,tokenCountA:e.tokens.size,tokenCountB:i.tokens.size,sharedTokens:f(n),sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p,evidenceClass:t.evidenceClass,actionTier:t.actionTier,evidenceClassReasons:t.reasons,recommendation:t.recommendation,uniqueToA:f(h(e.tokens,i.tokens)).slice(0,25),uniqueToB:f(h(i.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:i.loc}}function R(e){let i=0,o=0;for(let n of e)n.startsWith("component:")&&(i+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("directive:")||n.startsWith("slot:"))&&(o+=1);return b([{name:"component",count:i},{name:"behavior",count:o}],[{min:{component:1},reason:"shared custom component"},{min:{behavior:3},reason:"shared Vue template structure"}]).pass}function S(e){return C({genericWords:x,primitiveGroups:[{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"},{values:e.sharedDirectives,reasonPrefix:"shared directives",bucket:"generic"},{values:e.sharedSlots,reasonPrefix:"shared slots",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedIdentifiers,label:"shared identifier",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific Vue primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var x=new Set(["actions","app","button","card","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{L as a};
2
+ //# sourceMappingURL=chunk-F7DY272B.js.map
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-BRV7PIFF.js";import{y as e}from"./chunk-N2ZSIIGR.js";function l(t,s){let o=r(t,s);return e(t,o).map(({relativePath:n,...a})=>a)}export{l as a};
2
+ //# sourceMappingURL=chunk-FBN2FGXG.js.map
@@ -1,4 +1,4 @@
1
- import{b as i}from"./chunk-ERCYGVAM.js";import{a as o}from"./chunk-4GAQ6FI4.js";import{y as l}from"./chunk-TD7VKJ2Y.js";function y(e,r){let s=i(e,r);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let a=s.map(()=>"?").join(", "),n=e.all(`SELECT relative_path FROM documents
1
+ import{b as i}from"./chunk-BRV7PIFF.js";import{a as o}from"./chunk-TEBQMNVI.js";import{y as l}from"./chunk-N2ZSIIGR.js";function y(e,r){let s=i(e,r);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let a=s.map(()=>"?").join(", "),n=e.all(`SELECT relative_path FROM documents
2
2
  WHERE relative_path IN (${a})
3
3
  ORDER BY relative_path`,...s).map(t=>t.relative_path).filter(t=>!e.isIgnored(t)),p=l(e,n,{onlyDocumented:!0,sort:!0}).map(({relativePath:t,...f})=>f),m=o(e,"forward",s).filter(t=>!e.isIgnored(t)),d=o(e,"reverse",s).filter(t=>!e.isIgnored(t));return{files:n,symbols:p,dependsOn:m,dependedOnBy:d}}function g(e,r){return y(e,r)}export{y as a,g as b};
4
- //# sourceMappingURL=chunk-AZS7YPCB.js.map
4
+ //# sourceMappingURL=chunk-FDLOBR6P.js.map
@@ -0,0 +1,5 @@
1
+ import{c as g,j as k,k as E,l as w,m as T,n as j,o as b,p as x,v as h,w as v,y}from"./chunk-JWTGMPIT.js";import{Aa as m,Ba as P}from"./chunk-N5B2NILC.js";function M(e){return typeof e=="object"&&e!==null}function R(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")?e:null}var F=[r("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),r("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),r("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),r("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),r("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),r("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),r("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),r("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),r("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),r("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),r("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),r("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),r("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),r("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),r("runtime-boundary-http-roles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/http-summaries.ts"}),r("runtime-boundary-source-hashes",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),r("runtime-boundary-direct-extraction",{dependsOn:["content-hash","direct-deps-digest","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),p("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),p("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),p("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),p("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"}),p("typescript-hierarchy-targets",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","definitionSet","projectFingerprint","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/typescript/ts-morph-provider.ts"})];function N(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=k(n);if(c){let l=`${c}\0${i}\0${s}`;a=t.get(l),a||(a=v(["evidence-product-file-read-v1",e.kind,c,i,s]),t.set(l,a))}}return y("evidence-product.file.read",()=>{let c=E(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},has(n,i,s){return w(n,e.kind,i,s)},write(n,i,s,o){T(n,e.kind,i,s,e.serialize(o))},writeBatch(n,i){j(n,i.map(s=>({kind:e.kind,relativePath:s.relativePath,contentHash:s.contentHash,payload:e.serialize(s.value)})))}}}function B(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=`${s}\0${i}`;a=t.get(c),a||(a=v(["evidence-product-project-read-v1",e.kind,s,i]),t.set(c,a))}return y("evidence-product.project.read",()=>{let c=b(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},write(n,i,s,o){x(n,e.kind,i,s,e.serialize(o))}}}function U(e){let t=F.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function r(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function p(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}var u=null;function f(e){u?.(e)}function L(e,t){let n=u;u=e;try{return t()}finally{u=n}}var S=g("source-text",{clearGroups:["whole-project","source-file"]}),V=g("source-lines",{clearGroups:["whole-project","source-file"]});function C(e,t){let n=t.replace(/\\/g,"/");return f(n),S.get(e,n,()=>I(e,n))}function I(e,t){let n=t.replace(/\\/g,"/");f(n);try{return m(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(i){if(P(i))return"";throw i}}function Y(e){if(e.length===0)return[];let t=e.split(`
2
+ `);return e.endsWith(`
3
+ `)&&t.pop(),t}function D(e,t){let n=t.replace(/\\/g,"/");return V.get(e,n,()=>{let i=C(e,n);return i?i.split(`
4
+ `):[]})}var H=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function K(e){let t=H.exec(e);return t?t[1]??"":null}function Z(e,t,n){return O(e,t,n).length>0}function ee(e,t,n,i){let s=i.toLowerCase();return O(e,t,n).some(o=>o.toLowerCase()===s)}function O(e,t,n){if(n<=0)return[];let i=D(e,t);if(i.length===0)return[];let s=[];for(let o=n-1;o>=0&&o>=n-5;o-=1){let d=(i[o]??"").trim();if(d==="")continue;let a=K(d);if(a!==null){s.push(a);continue}if(!d.startsWith("//")&&!d.startsWith("*")&&!d.startsWith("/*")&&!d.startsWith("@")&&!d.startsWith("#"))return s}return s}export{M as a,R as b,N as c,B as d,U as e,f,L as g,C as h,I as i,Y as j,D as k,K as l,Z as m,ee as n};
5
+ //# sourceMappingURL=chunk-FESCRNVV.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as P}from"./chunk-FGNCOQUX.js";import{a as C,c as B,e as a,f}from"./chunk-B3X6KU75.js";import{a as v,b as h,c as k}from"./chunk-KMVGRIO2.js";import{P as g}from"./chunk-7JYHQAH2.js";function D(e,o={}){let{minSimilarity:r=.62,minTokens:n=8,limit:l=20,scope:m,scanLimit:d,filePattern:p,focusFiles:u}=o,c=g(e).reactProfiles({scope:m,minJsxTokens:n,scanLimit:d}).filter(t=>t.kind==="component").map(t=>({file:t.file,component:t.name,tokens:t.jsxTokens,profile:t})),s=R(c,t=>t.tokens);return P({profiles:c,limit:l,filePattern:p,focusFiles:u,candidateIndex:s,profile:{name:"react-component-duplicates"},compare:(t,i)=>y(t,i,r),sort:(t,i)=>i.similarity-t.similarity||t.fileA.localeCompare(i.fileA)||t.componentA.localeCompare(i.componentA)||t.fileB.localeCompare(i.fileB)||t.componentB.localeCompare(i.componentB)})}function y(e,o,r){let n=v(e.tokens,o.tokens);if(n.size<6||!T(n))return null;let l=k(e.tokens,o.tokens);if(l<r)return null;let m=a(n,"component:"),d=a(n,"native:"),p=a(n,"prop:"),u=a(n,"event:"),c=a(n,"binding:"),s=b({sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c});return{fileA:e.file,componentA:e.component,fileB:o.file,componentB:o.component,similarity:l,tokenCountA:e.tokens.size,tokenCountB:o.tokens.size,sharedTokens:f(n),sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c,evidenceClass:s.evidenceClass,actionTier:s.actionTier,evidenceClassReasons:s.reasons,recommendation:s.recommendation,uniqueToA:f(h(e.tokens,o.tokens)).slice(0,25),uniqueToB:f(h(o.tokens,e.tokens)).slice(0,25),locA:e.profile.loc,locB:o.profile.loc}}function T(e){let o=0,r=0;for(let n of e)n.startsWith("component:")&&(o+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("native:")||n.startsWith("jsx:"))&&(r+=1);return B([{name:"component",count:o},{name:"shape",count:r}],[{min:{component:1},reason:"shared custom component"},{min:{shape:4},reason:"shared JSX structure"}]).pass}function b(e){return C({genericWords:w,primitiveGroups:[{values:e.sharedNativeTags,reasonPrefix:"shared native tags",bucket:"generic"},{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"}],recommendation:A})}function A(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific UI primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var w=new Set(["actions","app","button","card","children","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{D as a};
2
- //# sourceMappingURL=chunk-URSGGIZX.js.map
1
+ import{a as R,b as P}from"./chunk-2E7CX53V.js";import{a as C,c as B,e as a,f}from"./chunk-B3X6KU75.js";import{a as v,b as h,c as k}from"./chunk-KMVGRIO2.js";import{P as g}from"./chunk-ZOHS7AQV.js";function D(e,o={}){let{minSimilarity:r=.62,minTokens:n=8,limit:l=20,scope:m,scanLimit:d,filePattern:p,focusFiles:u}=o,c=g(e).reactProfiles({scope:m,minJsxTokens:n,scanLimit:d}).filter(t=>t.kind==="component").map(t=>({file:t.file,component:t.name,tokens:t.jsxTokens,profile:t})),s=R(c,t=>t.tokens);return P({profiles:c,limit:l,filePattern:p,focusFiles:u,candidateIndex:s,profile:{name:"react-component-duplicates"},compare:(t,i)=>y(t,i,r),sort:(t,i)=>i.similarity-t.similarity||t.fileA.localeCompare(i.fileA)||t.componentA.localeCompare(i.componentA)||t.fileB.localeCompare(i.fileB)||t.componentB.localeCompare(i.componentB)})}function y(e,o,r){let n=v(e.tokens,o.tokens);if(n.size<6||!T(n))return null;let l=k(e.tokens,o.tokens);if(l<r)return null;let m=a(n,"component:"),d=a(n,"native:"),p=a(n,"prop:"),u=a(n,"event:"),c=a(n,"binding:"),s=b({sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c});return{fileA:e.file,componentA:e.component,fileB:o.file,componentB:o.component,similarity:l,tokenCountA:e.tokens.size,tokenCountB:o.tokens.size,sharedTokens:f(n),sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c,evidenceClass:s.evidenceClass,actionTier:s.actionTier,evidenceClassReasons:s.reasons,recommendation:s.recommendation,uniqueToA:f(h(e.tokens,o.tokens)).slice(0,25),uniqueToB:f(h(o.tokens,e.tokens)).slice(0,25),locA:e.profile.loc,locB:o.profile.loc}}function T(e){let o=0,r=0;for(let n of e)n.startsWith("component:")&&(o+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("native:")||n.startsWith("jsx:"))&&(r+=1);return B([{name:"component",count:o},{name:"shape",count:r}],[{min:{component:1},reason:"shared custom component"},{min:{shape:4},reason:"shared JSX structure"}]).pass}function b(e){return C({genericWords:w,primitiveGroups:[{values:e.sharedNativeTags,reasonPrefix:"shared native tags",bucket:"generic"},{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"}],recommendation:A})}function A(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific UI primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var w=new Set(["actions","app","button","card","children","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{D as a};
2
+ //# sourceMappingURL=chunk-FFRKR4EQ.js.map
@@ -0,0 +1,8 @@
1
+ import{a as ee,b as q,d as v}from"./chunk-JFMEXGFE.js";import{i as te,j as h,k as f,l as p}from"./chunk-KYSDI3GE.js";import{e as Q,g as Z,h as F,n as P}from"./chunk-7F45LJKI.js";import{randomUUID as Le}from"crypto";import{closeSync as Ne,existsSync as Oe,fsyncSync as ke,linkSync as qe,mkdirSync as Pe,openSync as $e,renameSync as Ce,unlinkSync as Te,writeSync as _e}from"fs";import{dirname as ne}from"path";import{chmodSync as Ie,constants as Fe,copyFileSync as Re}from"fs";import{dirname as Ee}from"path";var ie=Object.freeze({...te,copyFile:(e,t)=>Re(e,t,Fe.COPYFILE_FICLONE),chmodFile:(e,t)=>Ie(e,t)});function ve(e,t,i={}){let n=i.runtime??ie,r=Ee(t),o=h(r,n);n.copyFile(e,t),i.mode!==void 0&&n.chmodFile(t,i.mode);let s=n.openFile(t,"r");try{n.syncFile(s)}finally{n.closeFile(s)}return p(o,f(r,n))}var re=Object.freeze({platform:process.platform,randomToken:()=>Le(),pathExists:e=>Oe(e),makeDirectory:e=>Pe(e,{recursive:!0}),openFile:(e,t,i)=>$e(e,t,i),writeFile:(e,t,i,n)=>_e(e,t,i,n),syncFile:e=>ke(e),closeFile:e=>Ne(e),renameFile:(e,t)=>Ce(e,t),linkFile:(e,t)=>qe(e,t),removeFile:e=>Te(e)});function $(e,t,i={}){let n=i.durability??"visibility",r=i.runtime??re,o=ne(e),s=n==="durable"?h(o,r):(r.makeDirectory(o),"not-requested"),a=`${e}.tmp-${r.randomToken()}`,l=typeof t=="string"?Buffer.from(t):t,d,c=!1;try{d=r.openFile(a,"wx",i.mode??384),c=!0,P(d,l,r,"atomic file"),n==="durable"&&r.syncFile(d),r.closeFile(d),d=void 0,r.renameFile(a,e),c=!1;let m=n==="durable"?p(s,f(o,r)):"not-requested";return oe(n,m)}finally{if(d!==void 0)try{r.closeFile(d)}catch{}if(c)try{r.removeFile(a)}catch{}}}function L(e,t,i={}){let n=i.durability??"visibility",r=i.runtime??re;if(!r.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let o=ne(e),s=n==="durable"?h(o,r):(r.makeDirectory(o),"not-requested"),a=`${e}.tmp-${r.randomToken()}`,l=typeof t=="string"?Buffer.from(t):t,d,c=!1;try{d=r.openFile(a,"wx",i.mode??384),c=!0,P(d,l,r,"exclusive atomic file"),n==="durable"&&r.syncFile(d),r.closeFile(d),d=void 0,r.linkFile(a,e);let m=n==="durable"?f(o,r):"not-requested";r.removeFile(a),c=!1;let b=n==="durable"?p(s,m,f(o,r)):"not-requested";return oe(n,b)}finally{if(d!==void 0)try{r.closeFile(d)}catch{}if(c)try{r.removeFile(a)}catch{}}}function oe(e,t){return{requestedDurability:e,achievedDurability:e==="visibility"?"visibility":t==="synced"?"directory-durable":"file-flushed",directorySync:t}}function se(e,t,i={}){$(e,ae(t,i),{durability:"visibility",runtime:i.runtime})}function C(e,t,i={}){return $(e,ae(t,i),{durability:"durable",runtime:i.runtime})}function ae(e,t){let i=JSON.stringify(e,null,t.spacing);return t.trailingNewline?`${i}
2
+ `:i}import{createHash as T,randomUUID as pe}from"crypto";import{closeSync as Ue,existsSync as D,fstatSync as We,lstatSync as B,mkdirSync as Ke,openSync as ze,readdirSync as w,readSync as Xe,renameSync as _,rmSync as g}from"fs";import{basename as S,dirname as J,join as y}from"path";function de(e){return N(e,Je)}function St(e){return N(e,je)}function N(e,t){return Array.isArray(e)?`[${e.map(i=>N(i,t)).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([i],[n])=>t(i,n)).map(([i,n])=>`${JSON.stringify(i)}:${N(n,t)}`).join(",")}}`:JSON.stringify(e)}function Je(e,t){return e.localeCompare(t)}function je(e,t){return e<t?-1:e>t?1:0}var j=1,He=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),x=class extends Error{constructor(i,n,r,o){let s=i==="item-too-large"?`request is ${o} bytes; per-item limit is ${r.maxItemBytes}`:i==="item-capacity"?`mailbox has ${n.totalItems} retained items; limit is ${r.maxItems}`:i==="byte-capacity"?`mailbox retains ${n.totalBytes} bytes and the request adds ${o}; limit is ${r.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=i;this.status=n;this.limits=r;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},ge=".owner.json",U={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function qt(e){return{rootDir:e,pendingDir:y(e,"pending"),inflightDir:y(e,"inflight"),responseDir:y(e,"responses"),deadLetterDir:y(e,"dead-letter"),legacyRequestDir:y(e,"requests")}}function I(e={}){let t={...He,...e};for(let[i,n]of Object.entries(t))if(!Number.isFinite(n)||n<=0||!Number.isInteger(n))throw new Error(`Mailbox limit ${i} must be a positive integer.`);return t}function k(e){let t=[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir].map(i=>h(i));return p(...t)}function Pt(e,t){return T("sha256").update(de({namespace:e,payload:t})).digest("hex")}function xe(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${e}`}function $t(e,t,i={}){let n=I(i.limits),r=i.nowMs??Date.now(),o=k(e);return st(t),K(e,n,i.admissionLockTimeoutMs??2e3,i.monotonicNow??v,i.durability??"durable",()=>{W(e,r,n);let s=y(e.pendingDir,`${t.id}.json`),a=y(e.responseDir,`${t.id}.json`),l=ce(e,t.id);if(l){let b=ue(l,t.operationKey,t.id);return{disposition:"duplicate",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:b.deadlineAtMs??t.deadlineAtMs}}let d=`${JSON.stringify(t)}
3
+ `,c=Buffer.byteLength(d),m=R(e);if(c>n.maxItemBytes)throw new x("item-too-large",m,n,c);if(m.totalItems+1>n.maxItems)throw new x("item-capacity",m,n,c);if(m.totalBytes+c>n.maxBytes)throw new x("byte-capacity",m,n,c);i.onBeforePublish?.();try{let b=i.durability??"durable",u=L(s,d,{durability:b}),M=b==="durable"?p(o,u.directorySync):"not-requested";return{disposition:"accepted",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:t.deadlineAtMs,achievedDurability:u.achievedDurability,directorySync:M}}catch(b){if(b.code!=="EEXIST")throw b;let u=ce(e,t.id);if(!u)throw b;let M=ue(u,t.operationKey,t.id);return{disposition:"duplicate",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:M.deadlineAtMs??t.deadlineAtMs}}})}function Ve(e,t){if(!t.ownerId.trim())throw new Error("Mailbox claim owner identity is required.");if(t.owner&&(!Number.isSafeInteger(t.owner.pid)||t.owner.pid<=0||t.owner.processIdentity!==void 0&&t.owner.processIdentity.pid!==t.owner.pid))throw new Error("Mailbox claim process identity is invalid.");let i=t.nowMs??Date.now(),n=I(t.limits),r=k(e);try{return K(e,n,2e3,t.monotonicNow??v,t.durability??"durable",()=>Ye(e,t.ownerId,i,n,t.liveness??U,t.owner??{pid:process.pid},r,t.durability??"durable",t.onClaimStage))}catch(o){if(o instanceof x&&o.code==="admission-busy")return[];throw o}}function Ct(e,t){return!be(e.pendingDir)&&!be(e.legacyRequestDir)?[]:Ve(e,t)}function Ye(e,t,i,n,r,o,s,a,l){W(e,i,n,r);let d=y(e.inflightDir,O(t)),c=[...me(e.pendingDir,!1),...me(e.legacyRequestDir,!0)].sort((u,M)=>u.orderAtMs-M.orderAtMs||u.header.id.localeCompare(M.header.id)||u.path.localeCompare(M.path)),m=a==="durable"?s:"not-requested";c.length>0&&(a==="durable"?m=p(m,h(d)):Ke(d,{recursive:!0}),l?.("after-owner-directory-durable"),rt(d,t,o,a),l?.("after-owner-record-published"));let b=[];for(let u of c){if(b.length>=n.maxBatch)break;let M=y(e.responseDir,`${u.header.id}.json`);if(D(M)){g(u.path,{force:!0});continue}let H=Math.max(i+n.claimLeaseMs,(u.header.deadlineAtMs??i)+5e3),we=`${O(u.originalFile)}.${H}.claim`,V=y(d,we);try{_(u.path,V)}catch(Y){let G=Y.code;if(G==="ENOENT"||G==="EEXIST")continue;throw Y}l?.("after-claim-renamed");let Ae=a==="durable"?f(J(u.path)):"not-requested";l?.("after-source-directory-synced");let Se=a==="durable"?f(d):"not-requested";l?.("after-destination-directory-synced");let Be=p(m,Ae,Se);b.push({requestId:u.header.id,ownerId:t,path:V,originalFile:u.originalFile,claimedAtMs:i,claimExpiresAtMs:H,byteLength:u.byteLength,...u.header.operationKey?{operationKey:u.header.operationKey}:{},...u.header.clientId?{clientId:u.header.clientId}:{},...u.header.enqueuedAtMs===void 0?{}:{enqueuedAtMs:u.header.enqueuedAtMs},...u.header.deadlineAtMs===void 0?{}:{deadlineAtMs:u.header.deadlineAtMs},legacy:u.legacy,directorySync:Be})}return b}function Tt(e,t={}){let i=I(t);if(e.byteLength>i.maxItemBytes)throw new x("item-too-large",{pending:0,inflight:1,responses:0,deadLetters:0,invalid:0,totalItems:1,totalBytes:e.byteLength},i,e.byteLength);return Z(e.path,{maxBytes:i.maxItemBytes,inputKind:"bounded mailbox item"})}function Ge(e,t,i,n={}){let r=n.nowMs??Date.now(),o=I(n.limits),s=t.deadlineAtMs===void 0?r+o.responseRetentionMs:Math.min(r+o.responseRetentionMs,Math.max(t.deadlineAtMs,r)+Me),a={mailboxVersion:j,operationKey:t.operationKey??`legacy-${t.requestId}`,clientId:t.clientId??"legacy",...t.deadlineAtMs===void 0?{}:{deadlineAtMs:t.deadlineAtMs},completedAtMs:r,expiresAtMs:s},l={...a,...i,...a},d=Buffer.byteLength(`${JSON.stringify(l)}
4
+ `),c=R(e);if(d>o.maxItemBytes)throw new x("item-too-large",c,o,d);let m=Math.max(0,c.totalBytes-t.byteLength)+d;if(m>o.maxBytes&&m>c.totalBytes&&(Ze(e,r).removed>0&&(c=R(e),m=Math.max(0,c.totalBytes-t.byteLength)+d),m>o.maxBytes&&m>c.totalBytes))throw new x("byte-capacity",c,o,d);let b=n.durability??"durable";if(et(e,t,l,b),n.onAfterResponsePublished?.(),g(t.path,{force:!0}),b==="durable"){let u=J(t.path);f(D(u)?u:e.inflightDir)}}var Me=3e4,Qe=4096;function Ze(e,t){let i={removed:0,bytesFreed:0},n;try{n=w(e.responseDir)}catch{return i}for(let r of n){if(!r.endsWith(".json"))continue;let o=y(e.responseDir,r),s,a;try{let m=ze(o,"r");try{a=We(m).size;let b=Buffer.alloc(Math.min(Qe,a));Xe(m,b,0,b.length,0),s=b.toString("utf8")}finally{Ue(m)}}catch{continue}let l=le(s,"expiresAtMs"),d=le(s,"deadlineAtMs");if(l!==null&&l<=t||d!==null&&d+Me<=t)try{g(o,{force:!0}),i.removed+=1,i.bytesFreed+=a}catch{}}return i}function le(e,t){let i=new RegExp(`"${t}":(\\d+)`).exec(e);if(!i)return null;let n=Number(i[1]);return Number.isSafeInteger(n)?n:null}function _t(e,t,i,n,r={}){let o=r.nowMs??Date.now(),s=I(r.limits);if(Ge(e,t,i,{...r,nowMs:o,limits:s}),!D(t.path)){let a=y(e.deadLetterDir,`${lt(t.requestId)}.${o}.${T("sha256").update(n).digest("hex").slice(0,12)}.json`),l={mailboxVersion:j,requestId:t.requestId,ownerId:t.ownerId,rejectedAtMs:o,reason:n,originalFile:t.originalFile},d=Buffer.byteLength(`${JSON.stringify(l,null,2)}
5
+ `),c=R(e);c.totalItems<s.maxItems&&c.totalBytes+d<=s.maxBytes&&C(a,l,{spacing:2,trailingNewline:!0})}}function Jt(e,t={}){let i=t.nowMs??Date.now(),n=I(t.limits);return k(e),K(e,n,2e3,t.monotonicNow??v,"durable",()=>W(e,i,n,t.liveness??U))}function W(e,t,i,n=U){let r={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=i.cleanupBatch;for(let s of X(e.inflightDir)){if(o<=0)break;let a=y(e.responseDir,`${s.requestId}.json`);if(D(a)){g(s.path,{force:!0}),r.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>t||ot(e,s.ownerId,n)!=="dead")continue;let l=y(e.pendingDir,s.originalFile);try{_(s.path,l),r.reclaimed++}catch(d){if(d.code!=="EEXIST")throw d;g(s.path,{force:!0})}f(J(s.path)),f(e.pendingDir),o--}o=ye(e.responseDir,o,(s,a)=>a+i.responseRetentionMs,t,()=>{r.responsesRemoved++}),o=ye(e.deadLetterDir,o,(s,a)=>a+i.deadLetterRetentionMs,t,()=>{r.deadLettersRemoved++});for(let s of[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir]){if(o<=0)break;for(let a of De(s)){if(o<=0)break;if(!S(a).includes(".tmp-"))continue;let l;try{l=B(a).mtimeMs}catch(d){if(d.code==="ENOENT")continue;throw d}l+i.temporaryRetentionMs>t||(g(a,{force:!0}),r.temporaryFilesRemoved++,o--)}}return at(e.inflightDir),r}function R(e){k(e);let t=[...A(e.pendingDir).map(l=>({path:l,pending:!0})),...A(e.legacyRequestDir).map(l=>({path:l,pending:!0}))],i=X(e.inflightDir).map(l=>({path:l.path,pending:!1})),n=A(e.responseDir).map(l=>({path:l,pending:!1})),r=A(e.deadLetterDir).map(l=>({path:l,pending:!1})),o=[...t,...i,...n,...r],s=0,a;for(let l of t){let d=E(l.path);if(!d){s++;continue}let c=d.enqueuedAtMs;if(c===void 0)try{c=B(l.path).mtimeMs}catch(m){if(m.code==="ENOENT")continue;throw m}a=a===void 0?c:Math.min(a,c)}return{pending:t.length,inflight:i.length,responses:n.length,deadLetters:r.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((l,d)=>l+dt(d.path),0),...a===void 0?{}:{oldestPendingAt:new Date(a).toISOString()}}}function et(e,t,i,n){let r=y(e.responseDir,`${t.requestId}.json`),o=`${JSON.stringify(i)}
6
+ `;try{L(r,o,{durability:n})}catch(s){if(s.code!=="EEXIST")throw s;let a=E(r),l=t.operationKey??`legacy-${t.requestId}`;if(a?.operationKey!==l)throw new Error(`Mailbox completion ${t.requestId} conflicts with an existing operation.`,{cause:s})}}function K(e,t,i,n,r,o){let s=y(e.rootDir,".admission.lock"),a=`${process.pid}-${pe()}`,l=n()+Math.max(0,i);for(;!tt(e.rootDir,s,a,r);){if(it(s),n()>=l)throw new x("admission-busy",R(e),t,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return o()}finally{try{z(s).ownerToken===a&&(g(s,{recursive:!0,force:!0}),r==="durable"&&f(e.rootDir))}catch{}}}function tt(e,t,i,n){let r=`${JSON.stringify({ownerToken:i,pid:process.pid,acquiredAtMs:Date.now()})}
7
+ `;try{return L(t,r,{durability:n}),!0}catch(o){if(o.code==="EEXIST")return!1;try{z(t).ownerToken===i&&(g(t,{force:!0}),n==="durable"&&f(e))}catch{}throw o}}function it(e){let t=null;try{let n=z(e);typeof n.ownerToken=="string"&&Number.isSafeInteger(n.pid)&&Number(n.pid)>0&&(t=Number(n.pid))}catch{}if(t===null||nt(t))return;let i=`${e}.stale-${pe()}`;try{_(e,i)}catch(n){let r=n.code;if(r==="ENOENT"||r==="EEXIST")return;throw n}g(i,{recursive:!0,force:!0})}function z(e){try{return JSON.parse(F(e,"mailbox lock record"))}catch(t){if(t.code!=="EISDIR"&&!(t instanceof Q&&t.reason==="not-regular"))throw t;return JSON.parse(F(y(e,"owner.json"),"mailbox lock owner record"))}}function nt(e){try{return process.kill(e,0),!0}catch(t){let i=t.code;return i==="EPERM"||i!=="ESRCH"}}function rt(e,t,i,n){let r=y(e,ge),o=i.processIdentity,s=he(r);if(s&&s.ownerId===t&&s.pid===i.pid&&(!s.processIdentity&&!o||s.processIdentity&&o&&q(s.processIdentity,o)))return;if(A(e).some(l=>l.endsWith(".claim")))throw new Error(`Mailbox owner identity ${t} collides with retained work from another process instance.`);let a={version:1,ownerId:t,pid:i.pid,...o?{processIdentity:o}:{}};n==="durable"?C(r,a):se(r,a)}function ot(e,t,i){let n=he(y(e.inflightDir,O(t),ge));if(!n)return"unknown";if(!i.isProcessAlive(n.pid))return"dead";if(!n.processIdentity)return"live";let r=i.readProcessIdentity(n.pid);return r?q(n.processIdentity,r)?"live":"dead":"unknown"}function he(e){try{let t=JSON.parse(F(e,"mailbox owner record"));if(t.version!==1||typeof t.ownerId!="string"||!t.ownerId||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0)return null;let i=t.processIdentity===void 0?null:ee(t.processIdentity);return t.processIdentity!==void 0&&(!i||i.pid!==t.pid)?null:{version:1,ownerId:t.ownerId,pid:t.pid,...i?{processIdentity:i}:{}}}catch{return null}}function ce(e,t){for(let i of[y(e.pendingDir,`${t}.json`),y(e.legacyRequestDir,`${t}.json`),y(e.responseDir,`${t}.json`)])if(D(i))return i;for(let i of X(e.inflightDir))if(i.requestId===t)return i.path;return null}function ue(e,t,i){let n=E(e);if(n?.operationKey===t)return n;if(S(e)===`${xe(t)}.json`)return{id:i,operationKey:t};throw new Error(`Mailbox operation ${i} conflicts with an existing retained record.`)}function st(e){if(e.mailboxVersion!==j||e.id!==xe(e.operationKey)||!e.clientId.trim()||!Number.isFinite(e.enqueuedAtMs)||!Number.isFinite(e.deadlineAtMs)||e.deadlineAtMs<e.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function me(e,t){return A(e).filter(i=>i.endsWith(".json")).map(i=>{let n=B(i),r=S(i,".json"),o=E(i)??{id:r};return{path:i,originalFile:S(i),header:o,byteLength:n.size,orderAtMs:o.enqueuedAtMs??n.mtimeMs,legacy:t}})}function X(e){if(!D(e))return[];let t=[];for(let i of w(e,{withFileTypes:!0})){if(!i.isDirectory())continue;let n=fe(i.name);if(n===null)continue;let r=y(e,i.name);for(let o of w(r,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let a=fe(s[1]),l=Number(s[2]);if(a===null||S(a)!==a||!a.endsWith(".json")||!Number.isSafeInteger(l))continue;let d=y(r,o.name),c=E(d)??{id:S(a,".json")},m;try{m=B(d)}catch(b){if(b.code==="ENOENT")continue;throw b}t.push({requestId:c.id,ownerId:n,path:d,originalFile:a,claimedAtMs:m.mtimeMs,claimExpiresAtMs:l,byteLength:m.size,...c.operationKey?{operationKey:c.operationKey}:{},...c.clientId?{clientId:c.clientId}:{},...c.enqueuedAtMs===void 0?{}:{enqueuedAtMs:c.enqueuedAtMs},...c.deadlineAtMs===void 0?{}:{deadlineAtMs:c.deadlineAtMs},legacy:c.operationKey===void 0})}}return t.sort((i,n)=>i.claimedAtMs-n.claimedAtMs||i.path.localeCompare(n.path))}function E(e){try{let t=JSON.parse(F(e,"mailbox record"));return typeof t.id!="string"||!t.id?null:{id:t.id,...typeof t.operationKey=="string"?{operationKey:t.operationKey}:{},...typeof t.clientId=="string"?{clientId:t.clientId}:{},...typeof t.enqueuedAtMs=="number"?{enqueuedAtMs:t.enqueuedAtMs}:{},...typeof t.deadlineAtMs=="number"?{deadlineAtMs:t.deadlineAtMs}:{}}}catch{return null}}function ye(e,t,i,n,r){for(let o of A(e)){if(t<=0)break;let s;try{s=B(o)}catch(a){if(a.code==="ENOENT")continue;throw a}i(o,s.mtimeMs)>n||(g(o,{force:!0}),r(),t--)}return t}function A(e){return D(e)?w(e,{withFileTypes:!0}).filter(t=>t.isFile()).map(t=>y(e,t.name)).sort():[]}function be(e){try{return w(e).some(t=>t.endsWith(".json"))}catch{return!1}}function De(e){if(!D(e))return[];let t=[];for(let i of w(e,{withFileTypes:!0})){let n=y(e,i.name);i.isFile()?t.push(n):i.isDirectory()&&t.push(...De(n))}return t.sort()}function at(e){if(D(e))for(let t of w(e,{withFileTypes:!0})){if(!t.isDirectory())continue;let i=y(e,t.name);w(i).some(n=>n.endsWith(".claim"))||g(i,{recursive:!0,force:!0})}}function dt(e){try{return B(e).size}catch{return 0}}function O(e){return Buffer.from(e,"utf8").toString("base64url")}function fe(e){try{let t=Buffer.from(e,"base64url").toString("utf8");return O(t)===e?t:null}catch{return null}}function lt(e){return/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)?e:`invalid-${T("sha256").update(e).digest("hex")}`}export{ve as a,se as b,C as c,de as d,St as e,j as f,x as g,qt as h,k as i,Pt as j,xe as k,$t as l,Ct as m,Tt as n,Ge as o,_t as p,Jt as q,R as r};
8
+ //# sourceMappingURL=chunk-FGA2U4OR.js.map
@@ -1,2 +1,2 @@
1
- import{d as m,f as y}from"./chunk-K3XFWJI2.js";import{g as d,i as x,k as p,l as b}from"./chunk-JT6XX7QY.js";import{h as l}from"./chunk-AK3PYTIK.js";import{createHash as S}from"crypto";import{dirname as R,join as f}from"path";var c=5,T=4,E=2,P="typescript-index";function _(t){let e=f(t,P),n=x(e);return{...n,requestDir:n.legacyRequestDir}}function F(t){let e=JSON.parse(t),n=e.protocolVersion,r=n===E,i=n===T,o=e.request,s=(r||i)&&o&&typeof o=="object"&&!Array.isArray(o)?{...o,removedFiles:o.removedFiles??[]}:o;if(!r&&!i&&n!==c||typeof e.id!="string"||!e.id||typeof e.baseGeneration!="string"||!e.baseGeneration||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||!q(s)||!r&&(e.mailboxVersion!==d||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==b(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript index service received an invalid mailbox request.");if(!r){let a=e,g=p(i?"typescript-index-v4":"typescript-index-v5",{baseGeneration:a.baseGeneration,request:o});if(a.operationKey!==g)throw new Error("TypeScript index service received a mismatched mailbox operation identity.");return{...a,protocolVersion:c,request:s}}let I=p("typescript-index-v2",{id:e.id,baseGeneration:e.baseGeneration,request:o});return{protocolVersion:c,mailboxVersion:d,id:e.id,operationKey:I,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,baseGeneration:e.baseGeneration,request:s}}function D(t){try{let e=y(m(l(f(R(t),"meta.json"),"reindex metadata")));return e?S("sha256").update(e).digest("hex"):null}catch{return null}}function q(t){if(!t||typeof t!="object")return!1;let e=t,n=u(e.modifiedFiles)?e.modifiedFiles:null,r=u(e.removedFiles)?e.removedFiles:null,i=u(e.affectedFiles)?e.affectedFiles:null;return e.kind==="emit-documents"&&typeof e.tsconfigPath=="string"&&!!e.tsconfigPath&&typeof e.projectArgument=="string"&&!!e.projectArgument&&typeof e.projectIdentity=="string"&&!!e.projectIdentity&&typeof e.producerIdentity=="string"&&!!e.producerIdentity&&n!==null&&new Set(n).size===n.length&&r!==null&&new Set(r).size===r.length&&i!==null&&(i.length>0||r.length>0)&&new Set(i).size===i.length}function u(t){return Array.isArray(t)&&t.every(e=>typeof e=="string"&&e.length>0)}export{c as a,_ as b,F as c,D as d};
2
- //# sourceMappingURL=chunk-7YQOCABQ.js.map
1
+ import{d as m,f as y}from"./chunk-GUFSG5TX.js";import{f as d,h as x,j as p,k as b}from"./chunk-FGA2U4OR.js";import{h as l}from"./chunk-7F45LJKI.js";import{createHash as S}from"crypto";import{dirname as R,join as f}from"path";var c=5,T=4,E=2,P="typescript-index";function _(t){let e=f(t,P),n=x(e);return{...n,requestDir:n.legacyRequestDir}}function F(t){let e=JSON.parse(t),n=e.protocolVersion,r=n===E,i=n===T,o=e.request,s=(r||i)&&o&&typeof o=="object"&&!Array.isArray(o)?{...o,removedFiles:o.removedFiles??[]}:o;if(!r&&!i&&n!==c||typeof e.id!="string"||!e.id||typeof e.baseGeneration!="string"||!e.baseGeneration||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||!q(s)||!r&&(e.mailboxVersion!==d||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==b(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript index service received an invalid mailbox request.");if(!r){let a=e,g=p(i?"typescript-index-v4":"typescript-index-v5",{baseGeneration:a.baseGeneration,request:o});if(a.operationKey!==g)throw new Error("TypeScript index service received a mismatched mailbox operation identity.");return{...a,protocolVersion:c,request:s}}let I=p("typescript-index-v2",{id:e.id,baseGeneration:e.baseGeneration,request:o});return{protocolVersion:c,mailboxVersion:d,id:e.id,operationKey:I,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,baseGeneration:e.baseGeneration,request:s}}function D(t){try{let e=y(m(l(f(R(t),"meta.json"),"reindex metadata")));return e?S("sha256").update(e).digest("hex"):null}catch{return null}}function q(t){if(!t||typeof t!="object")return!1;let e=t,n=u(e.modifiedFiles)?e.modifiedFiles:null,r=u(e.removedFiles)?e.removedFiles:null,i=u(e.affectedFiles)?e.affectedFiles:null;return e.kind==="emit-documents"&&typeof e.tsconfigPath=="string"&&!!e.tsconfigPath&&typeof e.projectArgument=="string"&&!!e.projectArgument&&typeof e.projectIdentity=="string"&&!!e.projectIdentity&&typeof e.producerIdentity=="string"&&!!e.producerIdentity&&n!==null&&new Set(n).size===n.length&&r!==null&&new Set(r).size===r.length&&i!==null&&(i.length>0||r.length>0)&&new Set(i).size===i.length}function u(t){return Array.isArray(t)&&t.every(e=>typeof e=="string"&&e.length>0)}export{c as a,_ as b,F as c,D as d};
2
+ //# sourceMappingURL=chunk-FIQRSHVM.js.map
@@ -1,2 +1,2 @@
1
- import{e as M}from"./chunk-QLBSG7U5.js";import{b as $}from"./chunk-BOJ5SVE2.js";import{a as p}from"./chunk-BGBBVSH4.js";import{l as I}from"./chunk-PBUH2P5S.js";import{d as D}from"./chunk-MTDBHTSF.js";import{d as b,j as h,p as x,q as y,u as L}from"./chunk-TD7VKJ2Y.js";import{a as g,e as S}from"./chunk-42W3LFUK.js";import{B as d}from"./chunk-Q7GBK5T7.js";var B=new Set(D());function X(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=w(e,F(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=P(t);return r?m.slice(0,r):m}function F(e,n){let s=L(e,{scope:n.scope}).filter(i=>v(i)&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),$(s,n.scanLimit)}function v(e){return!e.isFunctionLike||h(e.symbol)?!1:e.kind===null||B.has(e.kind)}function w(e,n,s){let i=[];for(let a of n){let o=G(e,a,s);o&&i.push({signature:o,definition:a,fn:z(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=C(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?M(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function z(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function P(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function C(e){return e<=5?"<=5":e<=20?"6-20":">20"}function G(e,n,s){if(s.semantic){let c=I(e,n);if(c)return c}let i=k(n.documentation),r=i?A(i):null;return r||E(N(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function k(e){return x(y(e))}function N(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=O(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,q(u)))return u}if(u&&u.includes("("))return u}return null}function q(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function A(e){if(!e||!e.trim())return null;let n=e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function E(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let o=R(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function R(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function O(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{X as a};
2
- //# sourceMappingURL=chunk-KFVSJX25.js.map
1
+ import{e as M}from"./chunk-JGKUET5J.js";import{b as $}from"./chunk-BOJ5SVE2.js";import{a as p}from"./chunk-BGBBVSH4.js";import{m as I}from"./chunk-NWQXSFFU.js";import{d as D}from"./chunk-MTDBHTSF.js";import{d as b,j as h,p as x,q as y,u as L}from"./chunk-N2ZSIIGR.js";import{a as g,e as S}from"./chunk-ODDUPDP7.js";import{h as d}from"./chunk-FESCRNVV.js";var B=new Set(D());function X(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=w(e,F(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=P(t);return r?m.slice(0,r):m}function F(e,n){let s=L(e,{scope:n.scope}).filter(i=>v(i)&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),$(s,n.scanLimit)}function v(e){return!e.isFunctionLike||h(e.symbol)?!1:e.kind===null||B.has(e.kind)}function w(e,n,s){let i=[];for(let a of n){let o=G(e,a,s);o&&i.push({signature:o,definition:a,fn:z(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=C(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?M(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function z(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function P(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function C(e){return e<=5?"<=5":e<=20?"6-20":">20"}function G(e,n,s){if(s.semantic){let c=I(e,n);if(c)return c}let i=k(n.documentation),r=i?A(i):null;return r||E(N(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function k(e){return x(y(e))}function N(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=O(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,q(u)))return u}if(u&&u.includes("("))return u}return null}function q(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function A(e){if(!e||!e.trim())return null;let n=e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function E(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let o=R(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function R(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function O(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{X as a};
2
+ //# sourceMappingURL=chunk-FPYLNQPT.js.map
@@ -1,2 +1,2 @@
1
- import{C as r}from"./chunk-AK3PYTIK.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
2
- //# sourceMappingURL=chunk-FELGD32K.js.map
1
+ import{o as r}from"./chunk-KYSDI3GE.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
2
+ //# sourceMappingURL=chunk-FRUSVINH.js.map
@@ -0,0 +1,3 @@
1
+ import{b as m}from"./chunk-2OOY75BW.js";import{a as p}from"./chunk-JFMEXGFE.js";import{$ as h,W as d,_ as P}from"./chunk-KYSDI3GE.js";import{g as f}from"./chunk-7F45LJKI.js";import{realpathSync as c}from"fs";import{basename as x,dirname as L,join as T,relative as I,sep as O}from"path";import{fileURLToPath as S,pathToFileURL as y}from"url";function F(n,e){return e==="."||e==="./"?y(c(n)).href:y(d(n,e).absolutePath).href}function b(n,e){let r=S(e);return I(c(n),v(r)).split(O).join("/")}function v(n){try{return c(n)}catch{try{return T(c(L(n)),x(n))}catch{return n}}}function H(n,e,r){return{textDocument:{uri:F(n,e.relativePath)},position:z(n,e),context:{includeDeclaration:r}}}function z(n,e){let r={line:e.startLine,character:e.startChar??0};try{return M(P(n,e.relativePath,{inputKind:"indexed Rust source file"}),e,r)}catch(t){if(!h(t))throw t;return r}}function M(n,e,r={line:e.startLine,character:e.startChar??0}){let t=n.split(/\r?\n/),o=t[e.startLine];if(o===void 0||e.leaf.length===0)return r;let i=Math.max(0,Math.min(r.character,o.length)),s=o.indexOf(e.leaf,i);if(s>=0)return{line:e.startLine,character:u(s,e.leaf)};let a=o.indexOf(e.leaf);if(a>=0)return{line:e.startLine,character:u(a,e.leaf)};let l=D(t,e.startLine,e.leaf);return l||r}function u(n,e){return n+Math.max(0,e.length-2)}function D(n,e,r){for(let t of[-1,1,-2,2]){let o=e+t;if(o<0||o>=n.length)continue;let i=n[o].indexOf(r);if(i>=0)return{line:o,character:u(i,r)}}return null}function K(n,e){return e.map(r=>({file:b(n,r.uri),line:r.range.start.line,column:r.range.start.character}))}function X(n){let e=new Map;for(let r of n)e.set(`${r.file}\0${r.line}\0${r.column}`,r);return[...e.values()].sort((r,t)=>{let o=r.file.localeCompare(t.file);return o!==0?o:r.line!==t.line?r.line-t.line:r.column-t.column})}import{randomUUID as E}from"crypto";import{readdirSync as $,rmSync as j,writeFileSync as A}from"fs";import{join as g}from"path";var R="rust-analyzer-owner-",w=".json",U=16*1024;function Z(n,e){if(!n||!e.rootIdentity)return null;let r=g(n,`${R}${e.rootPid}-${E()}${w}`),t={version:1,rootIdentity:e.rootIdentity,ownsProcessGroup:e.ownsProcessGroup};return A(r,`${JSON.stringify(t)}
2
+ `,{encoding:"utf8",mode:384,flag:"wx"}),r}function ee(n){n&&j(n,{force:!0})}async function re(n,e){if(!n)return[];let r;try{r=$(n)}catch{return[]}let t=r.filter(s=>s.startsWith(R)&&s.endsWith(w)).map(s=>g(n,s)),o=[],i=[];for(let s of t){let a=C(s);a?i.push(a):o.push({reaped:!1,reason:"identity-unavailable",detail:`Rust analyzer ownership record ${s} could not be validated.`})}return o.push(...await Promise.all(i.map(s=>m(s,e)))),o}function C(n){try{let e=f(n,{maxBytes:U,inputKind:"rust-analyzer process ownership record"}),r=JSON.parse(e),t=p(r.rootIdentity);return r.version!==1||!t||typeof r.ownsProcessGroup!="boolean"?null:{rootPid:t.pid,rootIdentity:t,ownsProcessGroup:r.ownsProcessGroup,knownMembers:new Map([[t.pid,t]])}}catch{return null}}export{Z as a,ee as b,re as c,F as d,b as e,H as f,K as g,X as h};
3
+ //# sourceMappingURL=chunk-GAS2LJMP.js.map
@@ -1,2 +1,2 @@
1
- import{a as B}from"./chunk-SV2LEFVM.js";import{a as $}from"./chunk-35NLDRZC.js";import{b as P}from"./chunk-Q6T2CAJL.js";import{b as j}from"./chunk-4GAQ6FI4.js";import{t as q}from"./chunk-TD7VKJ2Y.js";import{x as v}from"./chunk-42W3LFUK.js";import{a as U}from"./chunk-7JYHQAH2.js";import{readdirSync as L}from"fs";import{join as I}from"path";function z(e){return V(e).replace(/\/\*\*?$/,"")}function D(e,r){let t=V(r),o=z(t),c=t.endsWith("/**"),s=[],n=(a,l)=>{let g;try{g=L(a,{withFileTypes:!0})}catch{return}for(let p of g){if(p.name.startsWith("."))continue;let u=l?`${l}/${p.name}`:p.name;B(t,u)&&s.push(u),c&&p.isDirectory()&&n(I(a,p.name),u)}};return n(I(e,o),o),s.sort()}function V(e){return e.replace(/\\/g,"/").replace(/^\.\//,"").replace(/\/+$/,"")}var G=/\.(test|spec)\.(ts|tsx|js|jsx|mts|cts)$/,T=new Map;function k(e,r,t,o){if(!r?.testPaths?.length)return[];let c=H(r),s=[];for(let n of _(e,r.testPaths)){let a=K(e,n,o),l=a?t(a):null;if(l)for(let g of v(e,n)){let p=g.sourcePath;if(!p)continue;let u=t(p);u&&u!==l&&(c.get(l)?.has(u)||s.push({testFile:n,ownerBoundary:l,importedFile:p,importedBoundary:u,reason:"outside-owner-policy"}))}}return N(s)}function H(e){let r=e.allowedDependencies??{},t=e.boundaries.map(n=>n.name),o=new Map,c=(n,a)=>{for(let l of r[n]??[])a.has(l)||(a.add(l),c(l,a))};for(let n of t){let a=new Set;c(n,a),o.set(n,a)}let s=new Map;for(let n of t){let a=new Set(o.get(n));for(let l of t)l!==n&&o.get(l)?.has(n)&&a.add(l);s.set(n,a)}return s}function _(e,r){let t=`${e.config.projectRoot}\0${r.join("\0")}`,o=T.get(t);if(o)return o;let c=new Set;for(let n of r)for(let a of D(e.config.projectRoot,n))G.test(a)&&c.add(a);let s=[...c].sort();return T.set(t,s),s}function K(e,r,t){let o=r.replace(/^tests\//,"src/").replace(/\.(test|spec)\.(\w+)$/,".$2");if(o!==r&&t(o))return o;let c=r.split("/").pop().replace(/\.(test|spec)\.(\w+)$/,".$2"),s=v(e,r).map(n=>n.sourcePath).filter(n=>!!n&&t(n)&&n.split("/").pop()===c);return s.length===1?s[0]:null}function N(e){let r=new Map;for(let t of e){let o=`${t.testFile}\0${t.importedBoundary}`;r.has(o)||r.set(o,t)}return[...r.values()].sort((t,o)=>t.testFile.localeCompare(o.testFile)||t.importedBoundary.localeCompare(o.importedBoundary))}function O(e,r){let t=(e?.boundaries??[]).filter(o=>o.paths.some(c=>B(c,r)));return t.length===1?t[0].name:null}var C="architecture:";function W(e,r,t,o={}){let c=J(e,r);if(!t||t.boundaries.length===0)return{configured:!1,boundaries:[],edges:[],forbiddenEdges:[],reciprocalPairs:[],cycles:[],coarseBoundaries:[],staleAllowances:[],boundaryLimits:[],fragileEdges:[],testBoundaryViolations:[],coverage:{totalFiles:c.length,mappedFiles:0,unmappedFiles:[],ambiguousFiles:[]},policyCoverage:{declaredRows:0,totalBoundaries:0,missingRows:[],requiresCompletePolicy:!1,requiresCompleteCoverage:!1,requiresMinimalPolicy:!1}};let s=new Map,n=new Map(t.boundaries.map(i=>[i.name,new Set])),a=[],l=[];for(let i of c){let f=t.boundaries.filter(y=>y.paths.some(S=>B(S,i))).map(y=>y.name).sort();if(f.length===0)a.push(i);else if(f.length>1)l.push({file:i,boundaries:f});else{let y=f[0];s.set(i,y),n.get(y).add(i)}}let g=new Map;for(let[i,f]of e){let y=s.get(i);if(y)for(let S of f){let x=s.get(S);if(!x||y===x)continue;let M=F(y,x),w=g.get(M);w||(w={from:y,to:x,fileEdges:[],importers:new Set,importedFiles:new Set},g.set(M,w)),w.fileEdges.push({fromFile:i,toFile:S}),w.importers.add(i),w.importedFiles.add(S)}}let p=[...g.values()].map(i=>Q(i,t)).sort(ie),u=p,E=new Map(u.map(i=>[F(i.from,i.to),i])),R=new Map(t.boundaries.map(i=>[i.name,new Set]));for(let i of u)R.get(i.from).add(i.to);let m=[];for(let i of u){if(i.from>=i.to)continue;let f=E.get(F(i.to,i.from));f&&m.push({boundaries:[i.from,i.to],forward:i,reverse:f})}let{components:A}=$(R),h=A.filter(i=>i.length>1).map(i=>Z(i,u,t.requireAcyclic===!0)).sort((i,f)=>f.boundaries.length-i.boundaries.length||i.boundaries.join("/").localeCompare(f.boundaries.join("/"))),b=t.allowedDependencies??{},d=t.boundaries.map(i=>i.name).filter(i=>!Object.hasOwn(b,i)).sort();return{configured:!0,boundaries:t.boundaries.map(i=>({name:i.name,paths:[...i.paths],fileCount:n.get(i.name).size,dependencyPolicyDeclared:Object.hasOwn(b,i.name)})).sort((i,f)=>i.name.localeCompare(f.name)),edges:p,forbiddenEdges:u.filter(i=>i.policyStatus==="forbidden"),reciprocalPairs:m,cycles:h,staleAllowances:te(t,u),boundaryLimits:oe(t,u,n),fragileEdges:u.filter(i=>i.fragile),testBoundaryViolations:o.testBoundaryViolations??[],coarseBoundaries:ee(e,n,o.isModuleHierarchyFile,t.requireResolvedBoundaries===!0,i=>t.boundaries.find(f=>f.name===i)?.subUnits??"directory"),coverage:{totalFiles:c.length,mappedFiles:s.size,unmappedFiles:a,ambiguousFiles:l},policyCoverage:{declaredRows:t.boundaries.length-d.length,totalBoundaries:t.boundaries.length,missingRows:d,requiresCompletePolicy:t.requireCompletePolicy===!0,requiresCompleteCoverage:t.requireCompleteCoverage===!0,requiresMinimalPolicy:t.requireMinimalPolicy===!0}}}function Fe(e,r={}){let t=j(e,r.scope,{scipEdges:"imports-only",sourceEdges:"imports-and-reexports"}),o=U(e,{includeIgnored:!1}).filter(s=>!r.scope||s.includes(r.scope)),c=new Set(o);return W(t,o,e.config.architecture,{isModuleHierarchyFile:s=>X(e,s),testBoundaryViolations:k(e,e.config.architecture,s=>O(e.config.architecture,s),s=>c.has(s))})}function X(e,r){let t=P(r);return t==="test"||t==="entry"?!0:t!=="barrel"?!1:q(e,r).length===0}function Ee(e){let r=e.forbiddenEdges.map(o=>`${C}forbidden-edge:${encodeURIComponent(o.from)}:${encodeURIComponent(o.to)}`);if(e.policyCoverage.requiresCompletePolicy)for(let o of e.policyCoverage.missingRows)r.push(`${C}missing-policy-row:${encodeURIComponent(o)}`);if(e.policyCoverage.requiresCompleteCoverage){for(let o of e.coverage.unmappedFiles)r.push(`${C}unmapped-file:${encodeURIComponent(o)}`);for(let o of e.coverage.ambiguousFiles)r.push(`${C}ambiguous-file:${encodeURIComponent(o.file)}:${o.boundaries.map(c=>encodeURIComponent(c)).sort().join("|")}`)}if(e.policyCoverage.requiresMinimalPolicy)for(let o of e.staleAllowances)r.push(`${C}stale-allowance:${encodeURIComponent(o.from)}:${encodeURIComponent(o.to)}`);for(let o of e.testBoundaryViolations)r.push(`${C}test-boundary:${encodeURIComponent(o.testFile)}:${encodeURIComponent(o.importedBoundary)}`);for(let o of e.boundaryLimits)r.push(`${C}boundary-limit:${o.kind}:${encodeURIComponent(o.boundary)}`);let t=new Map;for(let o of e.coarseBoundaries)o.violatesPolicy&&t.set(o.boundary,(t.get(o.boundary)??0)+1);for(let[o,c]of t){let s=`${C}coarse-boundary:${encodeURIComponent(o)}`;r.push(s);for(let n=2;n<=c;n+=1)r.push(`${s}:component:${n}`)}for(let o of e.cycles)o.violatesPolicy&&r.push(`${C}cycle:${o.boundaries.map(c=>encodeURIComponent(c)).sort().join("|")}`);return[...new Set(r)].sort()}function Se(e){return!!e&&(Object.keys(e.allowedDependencies??{}).length>0||e.requireCompletePolicy===!0||e.requireCompleteCoverage===!0||e.requireAcyclic===!0||e.requireResolvedBoundaries===!0||e.requireMinimalPolicy===!0||e.maxBoundaryFanOut!==void 0||e.maxBoundaryFiles!==void 0||e.boundaries.some(r=>r.maxFiles!==void 0)||(e.testPaths?.length??0)>0)}function J(e,r){let t=new Set(r);for(let[o,c]of e){t.add(o);for(let s of c)t.add(s)}return[...t].sort()}function Q(e,r){let t=[...e.fileEdges].sort((o,c)=>o.fromFile.localeCompare(c.fromFile)||o.toFile.localeCompare(c.toFile));return{from:e.from,to:e.to,policyStatus:Y(r,e.from,e.to),fileEdgeCount:t.length,importerCount:e.importers.size,importedFileCount:e.importedFiles.size,examples:t.slice(0,5),fragile:t.length===1}}function Y(e,r,t){return!e.allowedDependencies||!Object.hasOwn(e.allowedDependencies,r)?"undeclared":e.allowedDependencies[r].includes(t)?"allowed":"forbidden"}function Z(e,r,t){let o=[...e].sort(),c=new Set(o),s=r.filter(a=>c.has(a.from)&&c.has(a.to)),n=Math.min(...s.map(a=>a.fileEdgeCount));return{boundaries:o,internalEdges:s,narrowestEdges:s.filter(a=>a.fileEdgeCount===n),violatesPolicy:t}}function ee(e,r,t=re,o=!1,c=()=>"directory"){let s=[];for(let[n,a]of r){let l=c(n)==="file"?m=>m:ne,g=[...a].filter(m=>!t(m));if(g.length<2)continue;let p=new Set(g),u=new Map,E=new Map;for(let m of g)E.set(l(m),new Set);for(let m of g)for(let A of e.get(m)??[]){if(!p.has(A))continue;let h=l(m),b=l(A);if(h===b)continue;let d=F(h,b),i=u.get(d);i||(i={from:h,to:b,fileEdges:[]},u.set(d,i)),i.fileEdges.push({fromFile:m,toFile:A}),E.get(h).add(b)}let{components:R}=$(E);for(let m of R){if(m.length<2)continue;let A=new Set(m),h=[...u.values()].filter(d=>A.has(d.from)&&A.has(d.to)).map(d=>({from:d.from,to:d.to,fileEdgeCount:d.fileEdges.length,examples:d.fileEdges.slice(0,5)})).sort((d,i)=>d.from.localeCompare(i.from)||d.to.localeCompare(i.to)),b=Math.min(...h.map(d=>d.fileEdgeCount));s.push({boundary:n,violatesPolicy:o,subUnits:[...m].sort(),internalEdges:h,narrowestEdges:h.filter(d=>d.fileEdgeCount===b)})}}return s.sort((n,a)=>a.subUnits.length-n.subUnits.length||n.boundary.localeCompare(a.boundary))}function te(e,r){let t=new Set(r.map(n=>F(n.from,n.to))),o=e.allowedDependencies??{},c=new Set(e.boundaries.map(n=>n.name)),s=[];for(let[n,a]of Object.entries(o))if(c.has(n))for(let l of a)!c.has(l)||t.has(F(n,l))||s.push({from:n,to:l});return s.sort((n,a)=>n.from.localeCompare(a.from)||n.to.localeCompare(a.to))}function oe(e,r,t){let o=[],c=new Map;for(let s of r)c.set(s.from,(c.get(s.from)??0)+1);for(let s of e.boundaries){if(e.maxBoundaryFanOut!==void 0){let a=c.get(s.name)??0;a>e.maxBoundaryFanOut&&o.push({boundary:s.name,kind:"fan-out",observed:a,limit:e.maxBoundaryFanOut})}let n=s.maxFiles??e.maxBoundaryFiles;if(n!==void 0){let a=t.get(s.name)?.size??0;a>n&&o.push({boundary:s.name,kind:"files",observed:a,limit:n})}}return o.sort((s,n)=>s.boundary.localeCompare(n.boundary)||s.kind.localeCompare(n.kind))}function re(e){let r=P(e);return r==="test"||r==="entry"}function ne(e){let r=e.lastIndexOf("/");return r===-1?".":e.slice(0,r)}function F(e,r){return`${e}\0${r}`}function ie(e,r){return e.from.localeCompare(r.from)||e.to.localeCompare(r.to)}export{D as a,C as b,W as c,Fe as d,Ee as e,Se as f,ee as g};
2
- //# sourceMappingURL=chunk-OTSPRVNW.js.map
1
+ import{a as B}from"./chunk-SV2LEFVM.js";import{a as $}from"./chunk-35NLDRZC.js";import{b as P}from"./chunk-NJITK2GP.js";import{b as j}from"./chunk-TEBQMNVI.js";import{t as q}from"./chunk-N2ZSIIGR.js";import{y as v}from"./chunk-ODDUPDP7.js";import{a as U}from"./chunk-ZOHS7AQV.js";import{readdirSync as L}from"fs";import{join as I}from"path";function z(e){return V(e).replace(/\/\*\*?$/,"")}function D(e,r){let t=V(r),o=z(t),c=t.endsWith("/**"),s=[],n=(a,l)=>{let g;try{g=L(a,{withFileTypes:!0})}catch{return}for(let p of g){if(p.name.startsWith("."))continue;let u=l?`${l}/${p.name}`:p.name;B(t,u)&&s.push(u),c&&p.isDirectory()&&n(I(a,p.name),u)}};return n(I(e,o),o),s.sort()}function V(e){return e.replace(/\\/g,"/").replace(/^\.\//,"").replace(/\/+$/,"")}var G=/\.(test|spec)\.(ts|tsx|js|jsx|mts|cts)$/,T=new Map;function k(e,r,t,o){if(!r?.testPaths?.length)return[];let c=H(r),s=[];for(let n of _(e,r.testPaths)){let a=K(e,n,o),l=a?t(a):null;if(l)for(let g of v(e,n)){let p=g.sourcePath;if(!p)continue;let u=t(p);u&&u!==l&&(c.get(l)?.has(u)||s.push({testFile:n,ownerBoundary:l,importedFile:p,importedBoundary:u,reason:"outside-owner-policy"}))}}return N(s)}function H(e){let r=e.allowedDependencies??{},t=e.boundaries.map(n=>n.name),o=new Map,c=(n,a)=>{for(let l of r[n]??[])a.has(l)||(a.add(l),c(l,a))};for(let n of t){let a=new Set;c(n,a),o.set(n,a)}let s=new Map;for(let n of t){let a=new Set(o.get(n));for(let l of t)l!==n&&o.get(l)?.has(n)&&a.add(l);s.set(n,a)}return s}function _(e,r){let t=`${e.config.projectRoot}\0${r.join("\0")}`,o=T.get(t);if(o)return o;let c=new Set;for(let n of r)for(let a of D(e.config.projectRoot,n))G.test(a)&&c.add(a);let s=[...c].sort();return T.set(t,s),s}function K(e,r,t){let o=r.replace(/^tests\//,"src/").replace(/\.(test|spec)\.(\w+)$/,".$2");if(o!==r&&t(o))return o;let c=r.split("/").pop().replace(/\.(test|spec)\.(\w+)$/,".$2"),s=v(e,r).map(n=>n.sourcePath).filter(n=>!!n&&t(n)&&n.split("/").pop()===c);return s.length===1?s[0]:null}function N(e){let r=new Map;for(let t of e){let o=`${t.testFile}\0${t.importedBoundary}`;r.has(o)||r.set(o,t)}return[...r.values()].sort((t,o)=>t.testFile.localeCompare(o.testFile)||t.importedBoundary.localeCompare(o.importedBoundary))}function O(e,r){let t=(e?.boundaries??[]).filter(o=>o.paths.some(c=>B(c,r)));return t.length===1?t[0].name:null}var C="architecture:";function W(e,r,t,o={}){let c=J(e,r);if(!t||t.boundaries.length===0)return{configured:!1,boundaries:[],edges:[],forbiddenEdges:[],reciprocalPairs:[],cycles:[],coarseBoundaries:[],staleAllowances:[],boundaryLimits:[],fragileEdges:[],testBoundaryViolations:[],coverage:{totalFiles:c.length,mappedFiles:0,unmappedFiles:[],ambiguousFiles:[]},policyCoverage:{declaredRows:0,totalBoundaries:0,missingRows:[],requiresCompletePolicy:!1,requiresCompleteCoverage:!1,requiresMinimalPolicy:!1}};let s=new Map,n=new Map(t.boundaries.map(i=>[i.name,new Set])),a=[],l=[];for(let i of c){let f=t.boundaries.filter(y=>y.paths.some(S=>B(S,i))).map(y=>y.name).sort();if(f.length===0)a.push(i);else if(f.length>1)l.push({file:i,boundaries:f});else{let y=f[0];s.set(i,y),n.get(y).add(i)}}let g=new Map;for(let[i,f]of e){let y=s.get(i);if(y)for(let S of f){let x=s.get(S);if(!x||y===x)continue;let M=F(y,x),w=g.get(M);w||(w={from:y,to:x,fileEdges:[],importers:new Set,importedFiles:new Set},g.set(M,w)),w.fileEdges.push({fromFile:i,toFile:S}),w.importers.add(i),w.importedFiles.add(S)}}let p=[...g.values()].map(i=>Q(i,t)).sort(ie),u=p,E=new Map(u.map(i=>[F(i.from,i.to),i])),R=new Map(t.boundaries.map(i=>[i.name,new Set]));for(let i of u)R.get(i.from).add(i.to);let m=[];for(let i of u){if(i.from>=i.to)continue;let f=E.get(F(i.to,i.from));f&&m.push({boundaries:[i.from,i.to],forward:i,reverse:f})}let{components:A}=$(R),h=A.filter(i=>i.length>1).map(i=>Z(i,u,t.requireAcyclic===!0)).sort((i,f)=>f.boundaries.length-i.boundaries.length||i.boundaries.join("/").localeCompare(f.boundaries.join("/"))),b=t.allowedDependencies??{},d=t.boundaries.map(i=>i.name).filter(i=>!Object.hasOwn(b,i)).sort();return{configured:!0,boundaries:t.boundaries.map(i=>({name:i.name,paths:[...i.paths],fileCount:n.get(i.name).size,dependencyPolicyDeclared:Object.hasOwn(b,i.name)})).sort((i,f)=>i.name.localeCompare(f.name)),edges:p,forbiddenEdges:u.filter(i=>i.policyStatus==="forbidden"),reciprocalPairs:m,cycles:h,staleAllowances:te(t,u),boundaryLimits:oe(t,u,n),fragileEdges:u.filter(i=>i.fragile),testBoundaryViolations:o.testBoundaryViolations??[],coarseBoundaries:ee(e,n,o.isModuleHierarchyFile,t.requireResolvedBoundaries===!0,i=>t.boundaries.find(f=>f.name===i)?.subUnits??"directory"),coverage:{totalFiles:c.length,mappedFiles:s.size,unmappedFiles:a,ambiguousFiles:l},policyCoverage:{declaredRows:t.boundaries.length-d.length,totalBoundaries:t.boundaries.length,missingRows:d,requiresCompletePolicy:t.requireCompletePolicy===!0,requiresCompleteCoverage:t.requireCompleteCoverage===!0,requiresMinimalPolicy:t.requireMinimalPolicy===!0}}}function Fe(e,r={}){let t=j(e,r.scope,{scipEdges:"imports-only",sourceEdges:"imports-and-reexports"}),o=U(e,{includeIgnored:!1}).filter(s=>!r.scope||s.includes(r.scope)),c=new Set(o);return W(t,o,e.config.architecture,{isModuleHierarchyFile:s=>X(e,s),testBoundaryViolations:k(e,e.config.architecture,s=>O(e.config.architecture,s),s=>c.has(s))})}function X(e,r){let t=P(r);return t==="test"||t==="entry"?!0:t!=="barrel"?!1:q(e,r).length===0}function Ee(e){let r=e.forbiddenEdges.map(o=>`${C}forbidden-edge:${encodeURIComponent(o.from)}:${encodeURIComponent(o.to)}`);if(e.policyCoverage.requiresCompletePolicy)for(let o of e.policyCoverage.missingRows)r.push(`${C}missing-policy-row:${encodeURIComponent(o)}`);if(e.policyCoverage.requiresCompleteCoverage){for(let o of e.coverage.unmappedFiles)r.push(`${C}unmapped-file:${encodeURIComponent(o)}`);for(let o of e.coverage.ambiguousFiles)r.push(`${C}ambiguous-file:${encodeURIComponent(o.file)}:${o.boundaries.map(c=>encodeURIComponent(c)).sort().join("|")}`)}if(e.policyCoverage.requiresMinimalPolicy)for(let o of e.staleAllowances)r.push(`${C}stale-allowance:${encodeURIComponent(o.from)}:${encodeURIComponent(o.to)}`);for(let o of e.testBoundaryViolations)r.push(`${C}test-boundary:${encodeURIComponent(o.testFile)}:${encodeURIComponent(o.importedBoundary)}`);for(let o of e.boundaryLimits)r.push(`${C}boundary-limit:${o.kind}:${encodeURIComponent(o.boundary)}`);let t=new Map;for(let o of e.coarseBoundaries)o.violatesPolicy&&t.set(o.boundary,(t.get(o.boundary)??0)+1);for(let[o,c]of t){let s=`${C}coarse-boundary:${encodeURIComponent(o)}`;r.push(s);for(let n=2;n<=c;n+=1)r.push(`${s}:component:${n}`)}for(let o of e.cycles)o.violatesPolicy&&r.push(`${C}cycle:${o.boundaries.map(c=>encodeURIComponent(c)).sort().join("|")}`);return[...new Set(r)].sort()}function Se(e){return!!e&&(Object.keys(e.allowedDependencies??{}).length>0||e.requireCompletePolicy===!0||e.requireCompleteCoverage===!0||e.requireAcyclic===!0||e.requireResolvedBoundaries===!0||e.requireMinimalPolicy===!0||e.maxBoundaryFanOut!==void 0||e.maxBoundaryFiles!==void 0||e.boundaries.some(r=>r.maxFiles!==void 0)||(e.testPaths?.length??0)>0)}function J(e,r){let t=new Set(r);for(let[o,c]of e){t.add(o);for(let s of c)t.add(s)}return[...t].sort()}function Q(e,r){let t=[...e.fileEdges].sort((o,c)=>o.fromFile.localeCompare(c.fromFile)||o.toFile.localeCompare(c.toFile));return{from:e.from,to:e.to,policyStatus:Y(r,e.from,e.to),fileEdgeCount:t.length,importerCount:e.importers.size,importedFileCount:e.importedFiles.size,examples:t.slice(0,5),fragile:t.length===1}}function Y(e,r,t){return!e.allowedDependencies||!Object.hasOwn(e.allowedDependencies,r)?"undeclared":e.allowedDependencies[r].includes(t)?"allowed":"forbidden"}function Z(e,r,t){let o=[...e].sort(),c=new Set(o),s=r.filter(a=>c.has(a.from)&&c.has(a.to)),n=Math.min(...s.map(a=>a.fileEdgeCount));return{boundaries:o,internalEdges:s,narrowestEdges:s.filter(a=>a.fileEdgeCount===n),violatesPolicy:t}}function ee(e,r,t=re,o=!1,c=()=>"directory"){let s=[];for(let[n,a]of r){let l=c(n)==="file"?m=>m:ne,g=[...a].filter(m=>!t(m));if(g.length<2)continue;let p=new Set(g),u=new Map,E=new Map;for(let m of g)E.set(l(m),new Set);for(let m of g)for(let A of e.get(m)??[]){if(!p.has(A))continue;let h=l(m),b=l(A);if(h===b)continue;let d=F(h,b),i=u.get(d);i||(i={from:h,to:b,fileEdges:[]},u.set(d,i)),i.fileEdges.push({fromFile:m,toFile:A}),E.get(h).add(b)}let{components:R}=$(E);for(let m of R){if(m.length<2)continue;let A=new Set(m),h=[...u.values()].filter(d=>A.has(d.from)&&A.has(d.to)).map(d=>({from:d.from,to:d.to,fileEdgeCount:d.fileEdges.length,examples:d.fileEdges.slice(0,5)})).sort((d,i)=>d.from.localeCompare(i.from)||d.to.localeCompare(i.to)),b=Math.min(...h.map(d=>d.fileEdgeCount));s.push({boundary:n,violatesPolicy:o,subUnits:[...m].sort(),internalEdges:h,narrowestEdges:h.filter(d=>d.fileEdgeCount===b)})}}return s.sort((n,a)=>a.subUnits.length-n.subUnits.length||n.boundary.localeCompare(a.boundary))}function te(e,r){let t=new Set(r.map(n=>F(n.from,n.to))),o=e.allowedDependencies??{},c=new Set(e.boundaries.map(n=>n.name)),s=[];for(let[n,a]of Object.entries(o))if(c.has(n))for(let l of a)!c.has(l)||t.has(F(n,l))||s.push({from:n,to:l});return s.sort((n,a)=>n.from.localeCompare(a.from)||n.to.localeCompare(a.to))}function oe(e,r,t){let o=[],c=new Map;for(let s of r)c.set(s.from,(c.get(s.from)??0)+1);for(let s of e.boundaries){if(e.maxBoundaryFanOut!==void 0){let a=c.get(s.name)??0;a>e.maxBoundaryFanOut&&o.push({boundary:s.name,kind:"fan-out",observed:a,limit:e.maxBoundaryFanOut})}let n=s.maxFiles??e.maxBoundaryFiles;if(n!==void 0){let a=t.get(s.name)?.size??0;a>n&&o.push({boundary:s.name,kind:"files",observed:a,limit:n})}}return o.sort((s,n)=>s.boundary.localeCompare(n.boundary)||s.kind.localeCompare(n.kind))}function re(e){let r=P(e);return r==="test"||r==="entry"}function ne(e){let r=e.lastIndexOf("/");return r===-1?".":e.slice(0,r)}function F(e,r){return`${e}\0${r}`}function ie(e,r){return e.from.localeCompare(r.from)||e.to.localeCompare(r.to)}export{D as a,C as b,W as c,Fe as d,Ee as e,Se as f,ee as g};
2
+ //# sourceMappingURL=chunk-GSP44ENC.js.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as u}from"./chunk-H5EXS3HM.js";import{s as c}from"./chunk-AK3PYTIK.js";var g=["typescript","javascript","java","scala","kotlin","rust","python","ruby","go","cpp","c","csharp","vb","dart","php","clojure"],R=["entry-surface","generated-code","compatibility-shim","reflection-or-registration","test-fixture","intentional-twin","historical-coupling-ended","detector-counterexample"];var p=2,a=3;var d=new Set(g);function P(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch(l){return{kind:"malformed",reason:`invalid JSON: ${C(l)}`}}if(!r(t))return{kind:"malformed",reason:"metadata must be a JSON object"};let n=t.version;if(!Number.isInteger(n))return{kind:"malformed",reason:"version must be an integer"};if(n!==p&&n!==a)return{kind:"unsupported",version:n,direction:n<p?"older":"future"};let o=m(t,n);if(o)return{kind:"malformed",reason:o};let i=t,s={metadata:i,capabilities:f(i)};return n===p?{kind:"legacy",...s,metadata:i}:{kind:"supported",...s,metadata:i}}function L(e){return e.kind==="legacy"||e.kind==="supported"?e.metadata:null}function j(e){if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.stableGenerationIdentity)return null;let t=e.metadata;return JSON.stringify({version:t.version,status:t.status,updatedAt:t.updatedAt,fingerprint:t.fingerprint,indexedLanguages:t.indexedLanguages,scipCompanion:t.scipCompanion,sqliteLayoutVersion:t.version===a?t.sqliteLayoutVersion:void 0})}function f(e){let t=e.fingerprint!==void 0,n=r(e.fingerprint),o=e.indexedLanguages!==void 0,i=e.status==="complete",s=e.version===a?e:null;return{usableForQuery:o,usableForEvidenceCache:t,publishableGeneration:i&&n&&o,stableGenerationIdentity:i&&t&&typeof e.updatedAt=="string",languageShardReuse:!!s?.languageFingerprints,typescriptProjectShardReuse:!!s?.typescriptProjectShards}}function m(e,t){if(e.status!=="complete"&&e.status!=="partial")return"status must be complete or partial";if(e.updatedAt!==void 0&&!u(e.updatedAt))return"updatedAt must be a valid timestamp";for(let n of["requestedLanguages","indexedLanguages"])if(e[n]!==void 0&&!y(e[n]))return`${n} must contain unique supported languages`;return e.skipped!==void 0&&!b(e.skipped)?"skipped must contain supported language/reason pairs":e.scipCompanion!==void 0&&e.scipCompanion!=="current"&&e.scipCompanion!=="deferred"?"scipCompanion must be current or deferred":t===a&&e.sqliteLayoutVersion!==void 0&&(!Number.isSafeInteger(e.sqliteLayoutVersion)||e.sqliteLayoutVersion<1)?"sqliteLayoutVersion must be a positive safe integer":t===a&&e.languageFingerprints!==void 0&&!x(e.languageFingerprints)?"languageFingerprints must map supported languages to fingerprint objects":t===a&&e.typescriptProjectShards!==void 0&&!S(e.typescriptProjectShards)?"typescriptProjectShards must map project names to file fingerprints":null}function v(e){return e.version===a&&e.sqliteLayoutVersion===1}function y(e){return!Array.isArray(e)||!e.every(t=>typeof t=="string"&&d.has(t))?!1:new Set(e).size===e.length}function b(e){return Array.isArray(e)&&e.every(t=>r(t)&&typeof t.language=="string"&&d.has(t.language)&&typeof t.reason=="string")}function x(e){return r(e)&&Object.entries(e).every(([t,n])=>d.has(t)&&r(n))}function S(e){return r(e)&&Object.values(e).every(t=>r(t)&&Array.isArray(t.files)&&t.files.every(c))}function C(e){return e instanceof Error?e.message:String(e)}export{g as a,R as b,a as c,P as d,L as e,j as f,f as g,v as h};
2
- //# sourceMappingURL=chunk-K3XFWJI2.js.map
1
+ import{a as r,b as u}from"./chunk-H5EXS3HM.js";import{g as c}from"./chunk-KYSDI3GE.js";var g=["typescript","javascript","java","scala","kotlin","rust","python","ruby","go","cpp","c","csharp","vb","dart","php","clojure"],R=["entry-surface","generated-code","compatibility-shim","reflection-or-registration","test-fixture","intentional-twin","historical-coupling-ended","detector-counterexample"];var p=2,a=3;var d=new Set(g);function P(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch(l){return{kind:"malformed",reason:`invalid JSON: ${C(l)}`}}if(!r(t))return{kind:"malformed",reason:"metadata must be a JSON object"};let n=t.version;if(!Number.isInteger(n))return{kind:"malformed",reason:"version must be an integer"};if(n!==p&&n!==a)return{kind:"unsupported",version:n,direction:n<p?"older":"future"};let o=m(t,n);if(o)return{kind:"malformed",reason:o};let i=t,s={metadata:i,capabilities:f(i)};return n===p?{kind:"legacy",...s,metadata:i}:{kind:"supported",...s,metadata:i}}function L(e){return e.kind==="legacy"||e.kind==="supported"?e.metadata:null}function j(e){if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.stableGenerationIdentity)return null;let t=e.metadata;return JSON.stringify({version:t.version,status:t.status,updatedAt:t.updatedAt,fingerprint:t.fingerprint,indexedLanguages:t.indexedLanguages,scipCompanion:t.scipCompanion,sqliteLayoutVersion:t.version===a?t.sqliteLayoutVersion:void 0})}function f(e){let t=e.fingerprint!==void 0,n=r(e.fingerprint),o=e.indexedLanguages!==void 0,i=e.status==="complete",s=e.version===a?e:null;return{usableForQuery:o,usableForEvidenceCache:t,publishableGeneration:i&&n&&o,stableGenerationIdentity:i&&t&&typeof e.updatedAt=="string",languageShardReuse:!!s?.languageFingerprints,typescriptProjectShardReuse:!!s?.typescriptProjectShards}}function m(e,t){if(e.status!=="complete"&&e.status!=="partial")return"status must be complete or partial";if(e.updatedAt!==void 0&&!u(e.updatedAt))return"updatedAt must be a valid timestamp";for(let n of["requestedLanguages","indexedLanguages"])if(e[n]!==void 0&&!y(e[n]))return`${n} must contain unique supported languages`;return e.skipped!==void 0&&!b(e.skipped)?"skipped must contain supported language/reason pairs":e.scipCompanion!==void 0&&e.scipCompanion!=="current"&&e.scipCompanion!=="deferred"?"scipCompanion must be current or deferred":t===a&&e.sqliteLayoutVersion!==void 0&&(!Number.isSafeInteger(e.sqliteLayoutVersion)||e.sqliteLayoutVersion<1)?"sqliteLayoutVersion must be a positive safe integer":t===a&&e.languageFingerprints!==void 0&&!x(e.languageFingerprints)?"languageFingerprints must map supported languages to fingerprint objects":t===a&&e.typescriptProjectShards!==void 0&&!S(e.typescriptProjectShards)?"typescriptProjectShards must map project names to file fingerprints":null}function v(e){return e.version===a&&e.sqliteLayoutVersion===1}function y(e){return!Array.isArray(e)||!e.every(t=>typeof t=="string"&&d.has(t))?!1:new Set(e).size===e.length}function b(e){return Array.isArray(e)&&e.every(t=>r(t)&&typeof t.language=="string"&&d.has(t.language)&&typeof t.reason=="string")}function x(e){return r(e)&&Object.entries(e).every(([t,n])=>d.has(t)&&r(n))}function S(e){return r(e)&&Object.values(e).every(t=>r(t)&&Array.isArray(t.files)&&t.files.every(c))}function C(e){return e instanceof Error?e.message:String(e)}export{g as a,R as b,a as c,P as d,L as e,j as f,f as g,v as h};
2
+ //# sourceMappingURL=chunk-GUFSG5TX.js.map
@@ -0,0 +1,2 @@
1
+ import{c as z,d as B,e as E}from"./chunk-BE7ZZTMC.js";import{a as O,b as G,c as M,d as J}from"./chunk-3AF4TUFK.js";import{b as Y,c as k}from"./chunk-FGA2U4OR.js";import{a as x}from"./chunk-B3PYOSCX.js";import{b as g}from"./chunk-H5EXS3HM.js";import{a as U,b as w,c as C,d as T}from"./chunk-JFMEXGFE.js";import{I as Q,M as D,j as _,k as m,l as K}from"./chunk-KYSDI3GE.js";import{h as I}from"./chunk-7F45LJKI.js";import{statSync as ve,watch as ge}from"fs";function He(e){let t=!1,r=!1,i,n=[],s=[...new Set(e)],c=new Map,a=u=>{try{return ve(u).mtimeMs}catch{return null}},o=()=>{for(let u of s)c.set(u,a(u))},d=()=>s.some(u=>a(u)!==c.get(u));o();let p=()=>{r=!0;let u=i;i=void 0,u?.()};for(let u of s)try{let v=ge(u,{persistent:!1},p);v.on("error",()=>{}),n.push(v)}catch{}return{wait(u){return t||u<=0?(r=!1,Promise.resolve()):new Promise(v=>{let Se=setTimeout(()=>{i===W&&(i=void 0),v()},u),W=()=>{clearTimeout(Se),i===W&&(i=void 0),v()};i=W,(r||t||d())&&(r=!1,o(),W())})},close(){if(!t){t=!0;for(let u of n)try{u.close()}catch{}n.length=0}p()}}}import{spawn as xe}from"child_process";import{existsSync as Oe,rmSync as ae}from"fs";import{dirname as at,resolve as V}from"path";import{fileURLToPath as ut}from"url";import{createHash as ye,randomUUID as L}from"crypto";import{existsSync as Re,linkSync as We,readdirSync as Ie,rmSync as S}from"fs";import{basename as we,dirname as ke,join as l}from"path";var h=1,Ee=10*6e4,be=10080*6e4,A="requests",y="claims",b="completions",Z="staging";function ze(e,t,r={}){let i=r.now?.()??new Date,n=qe(r.ttlMs),s=Ce(r.idempotencyKey),c=s?`key-${ye("sha256").update(s).digest("hex")}`:`request-${(r.randomId??L)()}`,a={version:h,requestId:c,...s?{idempotencyKey:s}:{},createdAt:i.toISOString(),deadlineAt:new Date(i.getTime()+n).toISOString(),detail:t.trim().slice(0,2048)||"stale index observed by a command"},o=se(e,c),d=$(e,o,a,r.onStage);if(d.published)return{disposition:"accepted",request:a,achievedDurability:d.achievedDurability,directorySync:d.directorySync};let p=N(o);if(!p)throw new Error(`Watch refresh request identity ${c} exists but is malformed.`);return{disposition:"duplicate",request:p}}function Be(e,t={}){let r=t.now?.()??new Date,i=`claim-${(t.randomId??L)()}`,n=Math.max(1,Math.floor(t.limit??64)),s=re(e).sort(Te),c=[];for(let a of s){if(c.length>=n)break;if(X(e,a.requestId))continue;if(Date.parse(a.deadlineAt)<=r.getTime()){te(e,{version:h,requestId:a.requestId,outcome:"expired",completedAt:r.toISOString()});continue}let o={version:h,requestId:a.requestId,claimId:i,claimedAt:r.toISOString()};if($(e,oe(e,a.requestId),o).published){if(X(e,a.requestId)){ie(e,a.requestId,i);continue}c.push(a)}}return{claimId:i,requests:c}}function Xe(e,t,r=()=>new Date,i){let n=r().toISOString();for(let s of t.requests)te(e,{version:h,requestId:s.requestId,claimId:t.claimId,outcome:"completed",completedAt:n});i?.("after-completion"),Ae(e,t),i?.("after-claim-release")}function Ae(e,t){for(let r of t.requests)ie(e,r.requestId,t.claimId)}function Ze(e){let t=0;for(let r of f(l(e,y)))S(r,{force:!0}),t++;return t>0&&m(l(e,y)),ne(e),t}function et(e){let t=re(e),r=new Map,i=Pe(l(e,A),N);for(let o of f(l(e,b))){let d=P(o);if(!d){i++;continue}r.set(d.requestId,d)}let n=new Set;for(let o of f(l(e,y))){let d=ee(o);if(!d){i++;continue}n.add(d.requestId)}let s=t.filter(o=>!r.has(o.requestId)&&!n.has(o.requestId)),c=[...r.values()].filter(o=>o.outcome==="completed").length,a=[...r.values()].filter(o=>o.outcome==="expired").length;return{pending:s.length,claimed:t.filter(o=>!r.has(o.requestId)&&n.has(o.requestId)).length,completed:c,expired:a,invalid:i,...s.length>0?{oldestPendingAt:s.map(o=>o.createdAt).reduce((o,d)=>_e(o,d))}:{}}}function tt(e,t={}){let r=(t.now?.()??new Date).getTime(),i=Math.max(0,t.retentionMs??be),n=0;for(let s of f(l(e,b))){let c=P(s);!c||r-Date.parse(c.completedAt)<i||(S(s,{force:!0}),S(se(e,c.requestId),{force:!0}),n++)}return n>0&&(m(l(e,b)),m(l(e,A))),ne(e),n}function N(e){return F(e,t=>{let r=t;return r.version===h&&R(r.requestId)&&(r.idempotencyKey===void 0||typeof r.idempotencyKey=="string")&&g(r.createdAt)&&g(r.deadlineAt)&&Date.parse(r.deadlineAt)>=Date.parse(r.createdAt)&&typeof r.detail=="string"&&r.detail.length>0})}function ee(e){return F(e,t=>{let r=t;return r.version===h&&R(r.requestId)&&R(r.claimId)&&g(r.claimedAt)})}function P(e){return F(e,t=>{let r=t;return r.version===h&&R(r.requestId)&&(r.claimId===void 0||R(r.claimId))&&(r.outcome==="completed"||r.outcome==="expired")&&g(r.completedAt)})}function te(e,t){let r=ce(e,t.requestId);if($(e,r,t).published)return;let i=P(r);if(!i||i.requestId!==t.requestId||i.outcome!==t.outcome)throw new Error(`Watch refresh completion ${t.requestId} conflicts with an existing record.`)}function $(e,t,r,i){let n=l(e,Z),s=ke(t),c=_(n),a=_(s),o=l(n,`${we(t)}.${process.pid}.${L()}.tmp`);try{let d=k(o,r,{spacing:2,trailingNewline:!0});i?.("after-staged");try{We(o,t)}catch(u){if(u.code==="EEXIST")return{published:!1};throw u}let p=K(c,a,d.directorySync,m(s));return i?.("after-published"),{published:!0,achievedDurability:p==="synced"?"directory-durable":"file-flushed",directorySync:p}}finally{S(o,{force:!0})}}function re(e){let t=[];for(let r of f(l(e,A))){let i=N(r);i&&t.push(i)}return t}function ie(e,t,r){let i=oe(e,t),n=ee(i);!n||n.claimId!==r||(S(i,{force:!0}),m(l(e,y)))}function ne(e){for(let t of f(l(e,Z),".tmp"))S(t,{force:!0})}function Pe(e,t){return f(e).filter(r=>!t(r)).length}function f(e,t=".json"){return Re(e)?Ie(e,{withFileTypes:!0}).filter(r=>r.isFile()&&r.name.endsWith(t)).map(r=>l(e,r.name)).sort():[]}function F(e,t){try{let r=JSON.parse(I(e,"watch refresh request record"));return t(r)?r:null}catch{return null}}function se(e,t){return l(e,A,`${t}.json`)}function oe(e,t){return l(e,y,`${t}.json`)}function ce(e,t){return l(e,b,`${t}.json`)}function X(e,t){return P(ce(e,t))!==null}function qe(e){if(e===void 0)return Ee;if(!Number.isFinite(e)||e<=0)throw new Error("Watch refresh request ttlMs must be positive.");return Math.floor(e)}function Ce(e){let t=e?.trim();return t?t.slice(0,512):void 0}function R(e){return typeof e=="string"&&/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)}function Te(e,t){return Date.parse(e.createdAt)-Date.parse(t.createdAt)||e.requestId.localeCompare(t.requestId)}function _e(e,t){return Date.parse(t)<Date.parse(e)?t:e}var Me=6e3,De=1e3,de=10;function yt(e,t,r){let i=D(V(e));if(r&&D(r.projectRoot)===i)return{projectRoot:i,worktreeKind:"git",worktreeId:r.worktreeId,cliVersion:t};let n=Q(i);if(n.kind==="error")throw new Error(`Could not establish Git worktree identity for ${i}: ${n.message}`);return n.kind==="non-git"?{projectRoot:i,worktreeKind:"non-git",cliVersion:t}:{projectRoot:i,worktreeKind:"git",worktreeId:n.identity.worktreeId,cliVersion:t}}function Rt(e){let t=e.runtime??$e,r=z(e.cacheDir),i=B(r.statePath),n=i?le(i,t)?{kind:"live",state:i}:{kind:"stale",state:i,reason:"dead-process"}:{kind:"stopped"},s=Le("stop",n);if(s.kind==="signal-stop")return ue(s.state,e,t),H(r,s.state.pid,t),{disposition:"stopped",pid:s.state.pid};if(s.kind==="clean-stale")return H(r,s.state.pid,t),{disposition:"stopped",pid:s.state.pid};let c=he(r.lockPath);return s.kind==="already-stopped"&&c?(le(c,t)&&ue(c,e,t),H(r,c.pid,t),{disposition:"stopped",pid:c.pid}):{disposition:"already-stopped"}}function Wt(e,t,r={}){let{durability:i="durable",...n}=r;i==="durable"?k(e,t,n):Y(e,t,n)}function It(e){try{let t=JSON.parse(I(e,"watch activity record"));return t.version!==1||!E(t.at)||t.refreshRequestedAt!==void 0&&!E(t.refreshRequestedAt)||t.refreshDetail!==void 0&&typeof t.refreshDetail!="string"?null:{atMs:Date.parse(t.at),...t.refreshRequestedAt===void 0?{}:{refreshRequestedAtMs:Date.parse(t.refreshRequestedAt)},...t.refreshDetail===void 0?{}:{refreshDetail:t.refreshDetail}}}catch{return null}}function wt(e,t,r={}){let i=r.pid??process.pid,n=r.isProcessAlive??x,s=()=>{},c=r.readProcessIdentity??C,a=r.now??(()=>new Date),o={...O,wallNow:()=>a().getTime(),isProcessAlive:n,readProcessIdentity:c},d=G(e,{kind:"watch",pid:i,processIdentity:c(i),detail:{projectRoot:V(t)},parseLegacy:q,runtime:o});if(d.kind==="contended"){let p=fe(d.observation);return{acquired:!1,lockPath:e,message:Ne(e,t,p),release:s}}return{acquired:!0,lockPath:e,message:"",release:()=>{d.lock.release()}}}function he(e){return fe(M(e,{parseLegacy:q}))}var q=e=>{let t=me(e);return t?{pid:t.pid,...t.processIdentity?{processIdentity:t.processIdentity}:{}}:null};function fe(e){if(e.state==="valid"&&e.record?.kind==="watch"){let t=e.record.detail?.projectRoot;return typeof t!="string"?null:{version:1,pid:e.record.pid,...e.record.processIdentity?{processIdentity:e.record.processIdentity}:{},projectRoot:t,startedAt:e.record.startedAt}}return me(e.parsed)}function me(e){try{let t=e;if(t.version!==1||typeof t.pid!="number"||!Number.isInteger(t.pid)||t.pid<=0||typeof t.projectRoot!="string"||!E(t.startedAt))return null;let r=t.processIdentity===void 0?null:U(t.processIdentity);return t.processIdentity!==void 0&&(!r||r.pid!==t.pid)?null:{version:1,pid:t.pid,...r?{processIdentity:r}:{},projectRoot:t.projectRoot,startedAt:t.startedAt}}catch{return null}}function Le(e,t){switch(e){case"status":return{kind:"report",classification:t};case"ensure":switch(t.kind){case"stopped":return{kind:"start"};case"stale":return t.reason==="old-heartbeat"?{kind:"refuse-replace",state:t.state,reason:"old-heartbeat"}:{kind:"start"};case"live":return{kind:"reuse",state:t.state};case"incompatible":return{kind:"replace",state:t.state};default:return j(t)}case"stop":switch(t.kind){case"stopped":return{kind:"already-stopped"};case"stale":return t.reason==="old-heartbeat"?{kind:"signal-stop",state:t.state}:{kind:"clean-stale",state:t.state};case"live":case"incompatible":return{kind:"signal-stop",state:t.state};default:return j(t)}default:return j(e)}}function kt(e){return e.idleTimeoutMs===0||e.watcher.state!=="idle"?!1:e.nowMs-e.lastActivityAtMs>=e.idleTimeoutMs}function ue(e,t,r){let{pid:i}=e;if(!r.isProcessAlive(i))return;pe(e,r),r.signalProcess(i);let n=t.stopTimeoutMs??Me,s=r.monotonicNow??T,c=s()+n;for(;s()<=c;){if(!r.isProcessAlive(i))return;r.sleep(de)}if(!r.forceSignalProcess)throw new Error(`scip-query watch service pid ${i} did not stop within ${n}ms and forced termination is unavailable.`);pe(e,r),r.forceSignalProcess(i);let a=t.forceStopTimeoutMs??De,o=s()+a;for(;s()<=o;){if(!r.isProcessAlive(i))return;let d=r.readProcessIdentity(i);if(e.processIdentity&&d&&!w(e.processIdentity,d))return;r.sleep(de)}throw new Error(`scip-query watch service pid ${i} remained alive ${a}ms after forced termination.`)}function H(e,t,r){if(ae(e.statePath,{force:!0}),ae(e.activityPath,{force:!0}),he(e.lockPath)?.pid===t){let n={...O,wallNow:r.now,isProcessAlive:r.isProcessAlive,readProcessIdentity:r.readProcessIdentity},s=M(e.lockPath,{parseLegacy:q,runtime:n});J(e.lockPath,s,{parseLegacy:q,runtime:n})}}function le(e,t){if(!t.isProcessAlive(e.pid))return!1;if(!e.processIdentity)return!0;let r=t.readProcessIdentity(e.pid);return r===null||w(e.processIdentity,r)}function Ne(e,t,r){return`error: scip-query watch is already running for ${V(t)}${r?` (pid ${r.pid}, started ${r.startedAt}; lock: ${e})`:` (lock: ${e})`}. Stop that watcher before starting another.`}var $e={now:Date.now,monotonicNow:T,isProcessAlive:x,readProcessIdentity:C,spawnServer(e,t,r,i){if(!Oe(e))throw new Error(`Watch service helper was not found at ${e}. Run npm run build first.`);xe(process.execPath,[e,t,r,JSON.stringify(i)],{detached:!0,stdio:"ignore",env:{...process.env,SCIP_QUERY_SKIP_WATCH_SERVICE:"1"}}).unref()},signalProcess(e){process.kill(e,"SIGTERM")},forceSignalProcess(e){process.kill(e,"SIGKILL")},sleep(e){let t=new Int32Array(new SharedArrayBuffer(4));Atomics.wait(t,0,0,e)}};function pe(e,t){if(!e.processIdentity)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its ownership record has no process identity.`);let r=t.readProcessIdentity(e.pid);if(!r)throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity is unavailable.`);if(!w(e.processIdentity,r))throw new Error(`Refusing to signal scip-query watch pid ${e.pid}: its process identity does not match the ownership record.`)}function j(e){throw new Error(`Unhandled watch service value: ${JSON.stringify(e)}`)}export{He as a,ze as b,Be as c,Xe as d,Ae as e,Ze as f,et as g,tt as h,yt as i,Rt as j,Wt as k,It as l,wt as m,kt as n};
2
+ //# sourceMappingURL=chunk-GYIZ4NXB.js.map
@@ -1,2 +1,2 @@
1
- import{a as T,b as $}from"./chunk-XDAUYDFT.js";import{b as k}from"./chunk-WYZIHUPZ.js";import{d as f}from"./chunk-BOJ5SVE2.js";import{d as j}from"./chunk-TD7VKJ2Y.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as Y}from"crypto";var Ce=["causal","structure","complete"],Q={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},Z=2,ee=48,H=64,ne=5e4;function Fe(e,n,t={}){let a=f([...n.symbols??[],...n.locations??[]]),o=f(n.searches??[]);if(a.length===0&&o.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let r=t.view??"causal",i=te(t.families,r),s=t.direction??"both",g=f(t.subtypes??[]),l=t.connecting??!1,c=t.inventoryOnly??!1,p=f(t.foldIds??[]),u=t.maxDepth??Z,m=t.maxEdges??ee;if(!Number.isSafeInteger(u)||u<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${u}.`);if(!Number.isSafeInteger(m)||m<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${m}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let h=k(e,{symbols:a,searches:o,maxDepth:u,maxTopologyCharacters:ne,relations:oe(i)}),w=new Map(h.nodes.map(d=>[d.id,d])),v=h.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>re(d,w)),E=v.filter(d=>i.includes(d.family)).filter(d=>g.length===0||g.includes(d.subtype)),b=new Set(h.anchors.flatMap(d=>d.nodeIds));if(l&&b.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(E.map(d=>d.id)),P=F(v,b,"incoming").filter(d=>S.has(d.id)),_=F(v,b,"outgoing").filter(d=>S.has(d.id)),O=F(v,b,"both").filter(d=>S.has(d.id)),U=de(i,g,P,_,O),A=s==="incoming"?P:s==="outgoing"?_:O,N=l?Ee(A,[...b],s):A,K=ye(N,b,s),G=[...N].sort((d,X)=>ve(d,X,K)),D=le(G,m),z=ge(D,p),x=c?[]:p.length>0?G.filter(d=>z.has(d.id)):G,I=p.length>0?x:x.slice(0,m),B=p.length>0||c?[]:D,R=Math.max(0,x.length-I.length),J=h.frontiers.filter(d=>d.disposition==="unsupported").length,C=h.coverage.status==="incomplete"?"incomplete":R>0?"bounded":"accounted";return{kind:"graph",view:t.families&&t.families.length>0?"custom":r,families:i,selection:{direction:s,subtypes:g,connecting:l,inventoryOnly:c,foldIds:p},targets:h.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:U,edges:I,folds:B,coverage:{status:C,topologyStatus:h.coverage.status,scope:h.coverage.scope,maxDepth:u,maxEdges:m,matchedEdges:G.length,eligibleEdges:x.length,returnedEdges:I.length,omittedEdges:R,frontierGroups:h.frontiers.length,unsupportedFrontiers:J,blindSpots:f([...h.coverage.blindSpots,...T(i)]),explanation:c?`${G.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:C==="accounted"?"Every selected relationship in the bounded topology was emitted.":C==="bounded"?`${R} selected relationship(s) were withheld by the explicit edge budget.`:h.coverage.explanation}}}function te(e,n){let t=e&&e.length>0?e:Q[n],a=t.filter(o=>!y.includes(o));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return f(t)}function oe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function re(e,n){let t=n.get(e.fromNodeId),a=n.get(e.toNodeId);return!t||!a?[]:(e.semantics??[]).flatMap((o,r)=>{let i=se(o);if(!i)return[];let s=$(i,o.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${o.subtype}.`);let g=ce(e);return s.relation.evidenceStrengths.includes(g)?[{id:`${e.id}:${r}:${i}`,family:i,semanticFamily:o.family,subtype:o.subtype,from:V(t),to:V(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:g,evidenceMethods:f(e.evidence.map(l=>l.method)),evidenceConstituents:ie(e.evidence),context:o.context?{...o.context}:null,attributes:o.attributes?{...o.attributes}:null}]:[]})}function ie(e){let n=new Map;for(let t of e)n.set(`${t.method}\0${t.strength}`,t);return[...n.values()].map(({method:t,strength:a})=>({method:t,strength:a}))}function se(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function V(e){let n=ae(e);return{id:e.id,kind:e.kind,label:n?j(n):e.label,symbol:n,location:e.location?{...e.location}:null}}function ae(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function ce(e){let n=f(e.evidence.map(t=>t.strength));return n.length===1?n[0]:n.includes("exact")&&n.every(t=>t==="exact"||t==="derived")?"mixed":n.includes("candidate")?"candidate":n.includes("unknown")||n.length===0?"unknown":"mixed"}function F(e,n,t){let a=M(e,t),o=new Map,r=new Map,i=[...n].sort();for(let s of i)r.set(s,0);for(let s=0;s<i.length;s+=1){let g=i[s],l=r.get(g);for(let c of a.get(g)??[])o.set(c.edge.id,c.edge),!r.has(c.next)&&(r.set(c.next,l+1),i.push(c.next))}return[...o.values()]}function M(e,n){let t=new Map,a=(o,r,i)=>{let s=t.get(o)??[];s.push({edge:i,next:r}),t.set(o,s)};for(let o of e)n!=="incoming"&&a(o.from.id,o.to.id,o),n!=="outgoing"&&a(o.to.id,o.from.id,o);for(let o of t.values())o.sort((r,i)=>r.edge.id.localeCompare(i.edge.id)||r.next.localeCompare(i.next));return t}function de(e,n,t,a,o){let r=new Set;for(let c of[...t,...a,...o])r.add(`${c.family}\0${c.subtype}`);if(n.length>0)for(let c of e)for(let p of n)r.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let u of c){let m=`${u.family}\0${u.subtype}`;p.set(m,(p.get(m)??0)+1)}return p},s=i(t),g=i(a),l=i(o);return[...r].map(c=>{let[p,u]=c.split("\0");return{family:p,subtype:u,incoming:s.get(c)??0,outgoing:g.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function le(e,n){let t=e.slice(n),a=new Map;for(let i of t){let s=pe(i),g=`${i.family}\0${s}`,l=a.get(g)??[];l.push(i),a.set(g,l)}let o=new Map(e.map((i,s)=>[i.id,s+1])),r=[];for(let[i,s]of[...a].sort(([g],[l])=>g.localeCompare(l))){let[g,l]=i.split("\0"),c=[...s].sort((p,u)=>p.id.localeCompare(u.id));for(let p=0;p<c.length;p+=H){let u=c.slice(p,p+H),m=u.map(E=>E.id),h=f(u.map(E=>E.subtype)).sort(),w=h.length===1?h[0]:"mixed",v=[...new Set(u.flatMap(E=>[E.from.id,E.to.id]))].sort();r.push({id:me(g,h.join("\0"),m),mode:ue(u),family:g,subtype:w,subtypes:h,region:l,edgeCount:m.length,edgeIds:m,nodeIds:v,minimumMaxEdges:Math.max(...m.map(E=>o.get(E)??e.length))})}}return r.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function pe(e){let n=e.from.location?.file??`kind:${e.from.kind}`,t=e.to.location?.file??`kind:${e.to.kind}`;return n===t?n:`${n} -> ${t}`}function ge(e,n){if(n.length===0)return new Set;let t=new Map(e.map(o=>[o.id,o])),a=n.filter(o=>!t.has(o));if(a.length>0){let o=e.map(r=>r.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${o.join(", ")||"(none)"}.`)}return new Set(n.flatMap(o=>t.get(o).edgeIds))}function ue(e){let n=new Map,t=new Map,a=new Set;for(let r of e){a.add(r.from.id),a.add(r.to.id);let i=n.get(r.from.id)??new Set;i.add(r.to.id),n.set(r.from.id,i);let s=t.get(r.to.id)??new Set;s.add(r.from.id),t.set(r.to.id,s)}return he(a,n)?"scc":[...a].every(r=>(t.get(r)?.size??0)<=1&&(n.get(r)?.size??0)<=1)?"linear":"topology"}function he(e,n){let t=new Set,a=new Set,o=r=>{if(t.has(r))return!0;if(a.has(r))return!1;t.add(r);for(let i of n.get(r)??[])if(o(i))return!0;return t.delete(r),a.add(r),!1};return[...e].some(o)}function me(e,n,t){return`fold:${Y("sha256").update([e,n,...t].join("\0")).digest("hex").slice(0,16)}`}function Ee(e,n,t){let a=new Map,o=[...new Set(n)].sort();for(let r=0;r<o.length;r+=1)for(let i=r+1;i<o.length;i+=1)for(let s of fe(e,o[r],o[i],t))a.set(s.id,s);return[...a.values()]}function fe(e,n,t,a){let o=M(e,a),r=new Map([[n,0]]),i=new Map,s=[n];for(let l=0;l<s.length;l+=1){let c=s[l],p=r.get(c);if(c!==t)for(let u of o.get(c)??[])r.has(u.next)||(r.set(u.next,p+1),i.set(u.next,{node:c,edge:u.edge}),s.push(u.next))}if(!r.has(t))return[];let g=[];for(let l=t;l!==n;){let c=i.get(l);if(!c)return[];g.push(c.edge),l=c.node}return g.reverse()}function ye(e,n,t){let a=M(e,t),o=new Map,r=[...n];for(let i of n)o.set(i,0);for(let i=0;i<r.length;i+=1){let s=r[i],g=o.get(s);for(let{next:l}of a.get(s)??[])o.has(l)||(o.set(l,g+1),r.push(l))}return o}function ve(e,n,t){return L(e,t)-L(n,t)||q(e)-q(n)||W(e.evidenceStrength)-W(n.evidenceStrength)||y.indexOf(e.family)-y.indexOf(n.family)||e.from.label.localeCompare(n.from.label)||e.to.label.localeCompare(n.to.label)||e.subtype.localeCompare(n.subtype)||e.id.localeCompare(n.id)}function L(e,n){return Math.min(n.get(e.from.id)??Number.MAX_SAFE_INTEGER,n.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function q(e){let n=[e.from,e.to].filter(t=>t.kind==="structural-region").length;return n===2?2:n}function W(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}export{y as a,Ce as b,Fe as c};
2
- //# sourceMappingURL=chunk-2OXVP5U5.js.map
1
+ import{a as T,b as $}from"./chunk-XDAUYDFT.js";import{b as k}from"./chunk-YWO5DDRC.js";import{d as f}from"./chunk-BOJ5SVE2.js";import{d as j}from"./chunk-N2ZSIIGR.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as Y}from"crypto";var Ce=["causal","structure","complete"],Q={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},Z=2,ee=48,H=64,ne=5e4;function Fe(e,n,t={}){let a=f([...n.symbols??[],...n.locations??[]]),o=f(n.searches??[]);if(a.length===0&&o.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let r=t.view??"causal",i=te(t.families,r),s=t.direction??"both",g=f(t.subtypes??[]),l=t.connecting??!1,c=t.inventoryOnly??!1,p=f(t.foldIds??[]),u=t.maxDepth??Z,m=t.maxEdges??ee;if(!Number.isSafeInteger(u)||u<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${u}.`);if(!Number.isSafeInteger(m)||m<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${m}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let h=k(e,{symbols:a,searches:o,maxDepth:u,maxTopologyCharacters:ne,relations:oe(i)}),w=new Map(h.nodes.map(d=>[d.id,d])),v=h.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>re(d,w)),E=v.filter(d=>i.includes(d.family)).filter(d=>g.length===0||g.includes(d.subtype)),b=new Set(h.anchors.flatMap(d=>d.nodeIds));if(l&&b.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(E.map(d=>d.id)),P=F(v,b,"incoming").filter(d=>S.has(d.id)),_=F(v,b,"outgoing").filter(d=>S.has(d.id)),O=F(v,b,"both").filter(d=>S.has(d.id)),U=de(i,g,P,_,O),A=s==="incoming"?P:s==="outgoing"?_:O,N=l?Ee(A,[...b],s):A,K=ye(N,b,s),G=[...N].sort((d,X)=>ve(d,X,K)),D=le(G,m),z=ge(D,p),x=c?[]:p.length>0?G.filter(d=>z.has(d.id)):G,I=p.length>0?x:x.slice(0,m),B=p.length>0||c?[]:D,R=Math.max(0,x.length-I.length),J=h.frontiers.filter(d=>d.disposition==="unsupported").length,C=h.coverage.status==="incomplete"?"incomplete":R>0?"bounded":"accounted";return{kind:"graph",view:t.families&&t.families.length>0?"custom":r,families:i,selection:{direction:s,subtypes:g,connecting:l,inventoryOnly:c,foldIds:p},targets:h.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:U,edges:I,folds:B,coverage:{status:C,topologyStatus:h.coverage.status,scope:h.coverage.scope,maxDepth:u,maxEdges:m,matchedEdges:G.length,eligibleEdges:x.length,returnedEdges:I.length,omittedEdges:R,frontierGroups:h.frontiers.length,unsupportedFrontiers:J,blindSpots:f([...h.coverage.blindSpots,...T(i)]),explanation:c?`${G.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:C==="accounted"?"Every selected relationship in the bounded topology was emitted.":C==="bounded"?`${R} selected relationship(s) were withheld by the explicit edge budget.`:h.coverage.explanation}}}function te(e,n){let t=e&&e.length>0?e:Q[n],a=t.filter(o=>!y.includes(o));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return f(t)}function oe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function re(e,n){let t=n.get(e.fromNodeId),a=n.get(e.toNodeId);return!t||!a?[]:(e.semantics??[]).flatMap((o,r)=>{let i=se(o);if(!i)return[];let s=$(i,o.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${o.subtype}.`);let g=ce(e);return s.relation.evidenceStrengths.includes(g)?[{id:`${e.id}:${r}:${i}`,family:i,semanticFamily:o.family,subtype:o.subtype,from:V(t),to:V(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:g,evidenceMethods:f(e.evidence.map(l=>l.method)),evidenceConstituents:ie(e.evidence),context:o.context?{...o.context}:null,attributes:o.attributes?{...o.attributes}:null}]:[]})}function ie(e){let n=new Map;for(let t of e)n.set(`${t.method}\0${t.strength}`,t);return[...n.values()].map(({method:t,strength:a})=>({method:t,strength:a}))}function se(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function V(e){let n=ae(e);return{id:e.id,kind:e.kind,label:n?j(n):e.label,symbol:n,location:e.location?{...e.location}:null}}function ae(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function ce(e){let n=f(e.evidence.map(t=>t.strength));return n.length===1?n[0]:n.includes("exact")&&n.every(t=>t==="exact"||t==="derived")?"mixed":n.includes("candidate")?"candidate":n.includes("unknown")||n.length===0?"unknown":"mixed"}function F(e,n,t){let a=M(e,t),o=new Map,r=new Map,i=[...n].sort();for(let s of i)r.set(s,0);for(let s=0;s<i.length;s+=1){let g=i[s],l=r.get(g);for(let c of a.get(g)??[])o.set(c.edge.id,c.edge),!r.has(c.next)&&(r.set(c.next,l+1),i.push(c.next))}return[...o.values()]}function M(e,n){let t=new Map,a=(o,r,i)=>{let s=t.get(o)??[];s.push({edge:i,next:r}),t.set(o,s)};for(let o of e)n!=="incoming"&&a(o.from.id,o.to.id,o),n!=="outgoing"&&a(o.to.id,o.from.id,o);for(let o of t.values())o.sort((r,i)=>r.edge.id.localeCompare(i.edge.id)||r.next.localeCompare(i.next));return t}function de(e,n,t,a,o){let r=new Set;for(let c of[...t,...a,...o])r.add(`${c.family}\0${c.subtype}`);if(n.length>0)for(let c of e)for(let p of n)r.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let u of c){let m=`${u.family}\0${u.subtype}`;p.set(m,(p.get(m)??0)+1)}return p},s=i(t),g=i(a),l=i(o);return[...r].map(c=>{let[p,u]=c.split("\0");return{family:p,subtype:u,incoming:s.get(c)??0,outgoing:g.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function le(e,n){let t=e.slice(n),a=new Map;for(let i of t){let s=pe(i),g=`${i.family}\0${s}`,l=a.get(g)??[];l.push(i),a.set(g,l)}let o=new Map(e.map((i,s)=>[i.id,s+1])),r=[];for(let[i,s]of[...a].sort(([g],[l])=>g.localeCompare(l))){let[g,l]=i.split("\0"),c=[...s].sort((p,u)=>p.id.localeCompare(u.id));for(let p=0;p<c.length;p+=H){let u=c.slice(p,p+H),m=u.map(E=>E.id),h=f(u.map(E=>E.subtype)).sort(),w=h.length===1?h[0]:"mixed",v=[...new Set(u.flatMap(E=>[E.from.id,E.to.id]))].sort();r.push({id:me(g,h.join("\0"),m),mode:ue(u),family:g,subtype:w,subtypes:h,region:l,edgeCount:m.length,edgeIds:m,nodeIds:v,minimumMaxEdges:Math.max(...m.map(E=>o.get(E)??e.length))})}}return r.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function pe(e){let n=e.from.location?.file??`kind:${e.from.kind}`,t=e.to.location?.file??`kind:${e.to.kind}`;return n===t?n:`${n} -> ${t}`}function ge(e,n){if(n.length===0)return new Set;let t=new Map(e.map(o=>[o.id,o])),a=n.filter(o=>!t.has(o));if(a.length>0){let o=e.map(r=>r.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${o.join(", ")||"(none)"}.`)}return new Set(n.flatMap(o=>t.get(o).edgeIds))}function ue(e){let n=new Map,t=new Map,a=new Set;for(let r of e){a.add(r.from.id),a.add(r.to.id);let i=n.get(r.from.id)??new Set;i.add(r.to.id),n.set(r.from.id,i);let s=t.get(r.to.id)??new Set;s.add(r.from.id),t.set(r.to.id,s)}return he(a,n)?"scc":[...a].every(r=>(t.get(r)?.size??0)<=1&&(n.get(r)?.size??0)<=1)?"linear":"topology"}function he(e,n){let t=new Set,a=new Set,o=r=>{if(t.has(r))return!0;if(a.has(r))return!1;t.add(r);for(let i of n.get(r)??[])if(o(i))return!0;return t.delete(r),a.add(r),!1};return[...e].some(o)}function me(e,n,t){return`fold:${Y("sha256").update([e,n,...t].join("\0")).digest("hex").slice(0,16)}`}function Ee(e,n,t){let a=new Map,o=[...new Set(n)].sort();for(let r=0;r<o.length;r+=1)for(let i=r+1;i<o.length;i+=1)for(let s of fe(e,o[r],o[i],t))a.set(s.id,s);return[...a.values()]}function fe(e,n,t,a){let o=M(e,a),r=new Map([[n,0]]),i=new Map,s=[n];for(let l=0;l<s.length;l+=1){let c=s[l],p=r.get(c);if(c!==t)for(let u of o.get(c)??[])r.has(u.next)||(r.set(u.next,p+1),i.set(u.next,{node:c,edge:u.edge}),s.push(u.next))}if(!r.has(t))return[];let g=[];for(let l=t;l!==n;){let c=i.get(l);if(!c)return[];g.push(c.edge),l=c.node}return g.reverse()}function ye(e,n,t){let a=M(e,t),o=new Map,r=[...n];for(let i of n)o.set(i,0);for(let i=0;i<r.length;i+=1){let s=r[i],g=o.get(s);for(let{next:l}of a.get(s)??[])o.has(l)||(o.set(l,g+1),r.push(l))}return o}function ve(e,n,t){return L(e,t)-L(n,t)||q(e)-q(n)||W(e.evidenceStrength)-W(n.evidenceStrength)||y.indexOf(e.family)-y.indexOf(n.family)||e.from.label.localeCompare(n.from.label)||e.to.label.localeCompare(n.to.label)||e.subtype.localeCompare(n.subtype)||e.id.localeCompare(n.id)}function L(e,n){return Math.min(n.get(e.from.id)??Number.MAX_SAFE_INTEGER,n.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function q(e){let n=[e.from,e.to].filter(t=>t.kind==="structural-region").length;return n===2?2:n}function W(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}export{y as a,Ce as b,Fe as c};
2
+ //# sourceMappingURL=chunk-GZIUDL6G.js.map