scip-query 0.21.0 → 0.22.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 (496) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/augment-vue-worker.js +1 -1
  3. package/dist/by-kind-4IYG2SKW.js +2 -0
  4. package/dist/call-graph-WQNXMNNN.js +2 -0
  5. package/dist/{chunk-AQDWTCDC.js → chunk-25GWKRUZ.js} +2 -2
  6. package/dist/chunk-2BTJALUS.js +454 -0
  7. package/dist/chunk-2KVU55CW.js +11 -0
  8. package/dist/{chunk-BBWPOMGU.js → chunk-2OXVP5U5.js} +2 -2
  9. package/dist/{chunk-D5W4UZY5.js → chunk-2RE5OCHZ.js} +2 -2
  10. package/dist/{chunk-2I3RSUWX.js → chunk-2XCGSDIT.js} +2 -2
  11. package/dist/{chunk-V7LQZTTZ.js → chunk-2YC7YNKT.js} +2 -2
  12. package/dist/chunk-3QXC54FQ.js +3 -0
  13. package/dist/{chunk-32A42O5B.js → chunk-3TJY6M3B.js} +2 -2
  14. package/dist/chunk-42W3LFUK.js +13 -0
  15. package/dist/chunk-44T4DUAA.js +2 -0
  16. package/dist/chunk-4GAQ6FI4.js +43 -0
  17. package/dist/{chunk-4S4DF62J.js → chunk-4HE7MVWD.js} +2 -2
  18. package/dist/{chunk-TGWNNMPF.js → chunk-4TQU4TX2.js} +2 -2
  19. package/dist/{chunk-SKUMCCC5.js → chunk-56NQAEPJ.js} +2 -2
  20. package/dist/chunk-57N6LN2A.js +3 -0
  21. package/dist/{chunk-LPGDO2XA.js → chunk-5H5WTJSD.js} +2 -2
  22. package/dist/{chunk-EA4SH4U5.js → chunk-5YRQIE2B.js} +2 -2
  23. package/dist/{chunk-O2RM7E7L.js → chunk-5ZMBRQFC.js} +4 -4
  24. package/dist/{chunk-ICHBVITH.js → chunk-6HRZQLOI.js} +2 -2
  25. package/dist/{chunk-WULAPQUD.js → chunk-6NC3YSPY.js} +2 -2
  26. package/dist/{chunk-IDPLC3FI.js → chunk-6VEFRPTD.js} +2 -2
  27. package/dist/{chunk-IOKWFRFQ.js → chunk-7C26EKLZ.js} +2 -2
  28. package/dist/{chunk-S3RTPPLQ.js → chunk-7IQXARSQ.js} +2 -2
  29. package/dist/chunk-7JYHQAH2.js +22 -0
  30. package/dist/chunk-7KSO2OAP.js +2 -0
  31. package/dist/{chunk-2ZBMOQGG.js → chunk-7U2YQSDE.js} +2 -2
  32. package/dist/{chunk-EKZRF57O.js → chunk-7XA3OM44.js} +2 -2
  33. package/dist/{chunk-4EXFZP6H.js → chunk-7XZGZBSQ.js} +2 -2
  34. package/dist/chunk-7YQOCABQ.js +2 -0
  35. package/dist/chunk-A77SCPW2.js +3 -0
  36. package/dist/chunk-AK3PYTIK.js +5 -0
  37. package/dist/chunk-AMIMMNA4.js +11 -0
  38. package/dist/{chunk-MOBF2GH6.js → chunk-AQ2PORIO.js} +2 -2
  39. package/dist/{chunk-YUFWLWIC.js → chunk-ARVO6TTW.js} +2 -2
  40. package/dist/chunk-AUY5BL74.js +2 -0
  41. package/dist/{chunk-RGCJ4646.js → chunk-AYPDH2LU.js} +2 -2
  42. package/dist/{chunk-73Z33VFI.js → chunk-AZS7YPCB.js} +2 -2
  43. package/dist/{chunk-SYUNTKO2.js → chunk-BDGTPN27.js} +2 -2
  44. package/dist/{chunk-BATIVRU2.js → chunk-BDHFVH2M.js} +2 -2
  45. package/dist/chunk-BECZLYNU.js +8 -0
  46. package/dist/chunk-BJT7LSPK.js +3 -0
  47. package/dist/{chunk-6SWA6B24.js → chunk-BTVKZGWT.js} +2 -2
  48. package/dist/{chunk-QD7IFBCR.js → chunk-BUTEIZKP.js} +2 -2
  49. package/dist/{chunk-UZFCZ7SJ.js → chunk-BVFYEEBH.js} +2 -2
  50. package/dist/{chunk-ICUQONOG.js → chunk-BWVQP3LB.js} +2 -2
  51. package/dist/chunk-BYDAFMSR.js +57 -0
  52. package/dist/{chunk-BHE44MHT.js → chunk-C76O5MDS.js} +2 -2
  53. package/dist/chunk-C7IJMOFP.js +134 -0
  54. package/dist/{chunk-CN2WGM7D.js → chunk-CBBHFNLX.js} +2 -2
  55. package/dist/{chunk-COTMS5KM.js → chunk-CKRWA452.js} +2 -2
  56. package/dist/{chunk-ANWGXPPN.js → chunk-CLG6DWVS.js} +2 -2
  57. package/dist/chunk-D2MVJSP4.js +21 -0
  58. package/dist/chunk-D35XIZGN.js +2 -0
  59. package/dist/{chunk-U7DR7MJD.js → chunk-DEAB5TGT.js} +2 -2
  60. package/dist/{chunk-6GJAP4OE.js → chunk-DJAO2OZJ.js} +2 -2
  61. package/dist/chunk-DKM723YF.js +79 -0
  62. package/dist/{chunk-4IIMPWMR.js → chunk-DPWKKNKI.js} +2 -2
  63. package/dist/chunk-E44IVWIJ.js +367 -0
  64. package/dist/chunk-EDMB6SSO.js +7 -0
  65. package/dist/{chunk-KWARB5FZ.js → chunk-EELG7D3Q.js} +2 -2
  66. package/dist/chunk-EELPBR7E.js +3 -0
  67. package/dist/chunk-EETGXQY7.js +3 -0
  68. package/dist/chunk-ENWQWA2R.js +2 -0
  69. package/dist/{chunk-HUZNZ3H2.js → chunk-ERCYGVAM.js} +2 -2
  70. package/dist/{chunk-WSG3DK5H.js → chunk-EWWY2ZFL.js} +2 -2
  71. package/dist/chunk-F24G5NBE.js +3 -0
  72. package/dist/{chunk-XRXCANFQ.js → chunk-F24QUEQP.js} +2 -2
  73. package/dist/{chunk-KFK7GF5C.js → chunk-FBCVASUG.js} +2 -2
  74. package/dist/{chunk-35IW3P4H.js → chunk-FELGD32K.js} +2 -2
  75. package/dist/{chunk-UNORWZIJ.js → chunk-FFJQZG6J.js} +5 -5
  76. package/dist/{chunk-5SE323LF.js → chunk-FGNCOQUX.js} +2 -2
  77. package/dist/chunk-FKGQOTKD.js +2 -0
  78. package/dist/chunk-GDRJB3SB.js +3 -0
  79. package/dist/chunk-GH5YSGZL.js +5 -0
  80. package/dist/{chunk-X7PJJYKX.js → chunk-GIQ6CSL4.js} +2 -2
  81. package/dist/{chunk-2RP27XLR.js → chunk-GPGRZJ3R.js} +2 -2
  82. package/dist/{chunk-IYV2YBHM.js → chunk-GQIDEID3.js} +2 -2
  83. package/dist/chunk-GRX7JOXQ.js +2 -0
  84. package/dist/{chunk-H46QMB7E.js → chunk-GVOMSPGL.js} +2 -2
  85. package/dist/{chunk-KTRGJLY7.js → chunk-GY7CCCEZ.js} +2 -2
  86. package/dist/{chunk-VNKYRJKN.js → chunk-H7CG6LOE.js} +2 -2
  87. package/dist/chunk-HCVJR2V4.js +3 -0
  88. package/dist/chunk-HG722PO7.js +3 -0
  89. package/dist/{chunk-LHTT5C3Z.js → chunk-HISEUIL2.js} +2 -2
  90. package/dist/{chunk-K5MZYZV7.js → chunk-HXOU4XNH.js} +2 -2
  91. package/dist/chunk-I6UTXNHU.js +6 -0
  92. package/dist/{chunk-I7PFL5P3.js → chunk-IJMD6BRI.js} +2 -2
  93. package/dist/{chunk-XXJ7WL3F.js → chunk-IKVNEGTW.js} +2 -2
  94. package/dist/chunk-IMKZEXZG.js +2 -0
  95. package/dist/chunk-ISIQLPJ2.js +61 -0
  96. package/dist/{chunk-DEUGHURX.js → chunk-ISWFRGJ6.js} +2 -2
  97. package/dist/chunk-IW5XQG5G.js +2 -0
  98. package/dist/chunk-IXESDH3J.js +2 -0
  99. package/dist/{chunk-FGB567HK.js → chunk-JAT6C3VX.js} +2 -2
  100. package/dist/{chunk-7TWP3MCP.js → chunk-JFQBRL3J.js} +2 -2
  101. package/dist/{chunk-Q7HB7BFJ.js → chunk-JHH5SCZ3.js} +2 -2
  102. package/dist/{chunk-ZHSARYVS.js → chunk-JJ62MTQH.js} +2 -2
  103. package/dist/chunk-JT6XX7QY.js +8 -0
  104. package/dist/{chunk-5H7IWVXJ.js → chunk-JUN5DOAK.js} +2 -2
  105. package/dist/{chunk-DOPCR5BY.js → chunk-K3XFWJI2.js} +2 -2
  106. package/dist/{chunk-Y4XQ7LES.js → chunk-KFOYCQAJ.js} +1 -1
  107. package/dist/{chunk-N5C65OFK.js → chunk-KFVSJX25.js} +2 -2
  108. package/dist/chunk-KK7GPALL.js +28 -0
  109. package/dist/{chunk-DHKBIOXF.js → chunk-KQHJEU6V.js} +2 -2
  110. package/dist/{chunk-WB6LGCFB.js → chunk-KZYID5KV.js} +2 -2
  111. package/dist/{chunk-KW6B5OL4.js → chunk-LO5JSW2C.js} +2 -2
  112. package/dist/{chunk-ZW44MCJM.js → chunk-LRI5OMPE.js} +2 -2
  113. package/dist/{chunk-HG5YI7PV.js → chunk-LXQUF2RP.js} +2 -2
  114. package/dist/{chunk-TM5XEDDR.js → chunk-MHIEP7EG.js} +2 -2
  115. package/dist/{chunk-FHV7NMFU.js → chunk-MSR2QRUE.js} +2 -2
  116. package/dist/chunk-N7FP5H5U.js +57 -0
  117. package/dist/{chunk-3653GTR7.js → chunk-NEIQPFBI.js} +2 -2
  118. package/dist/chunk-NK3JMP22.js +2 -0
  119. package/dist/{chunk-7IOAZRVL.js → chunk-NRBNAECH.js} +2 -2
  120. package/dist/{chunk-HGKEAP7F.js → chunk-NVSZNESQ.js} +2 -2
  121. package/dist/{chunk-R2MOKIVO.js → chunk-OJNK5ALA.js} +2 -2
  122. package/dist/{chunk-RFWAUHVW.js → chunk-OPSAW5DT.js} +2 -2
  123. package/dist/chunk-OTSPRVNW.js +2 -0
  124. package/dist/chunk-OXYAWIEA.js +2 -0
  125. package/dist/chunk-OZETODHH.js +2 -0
  126. package/dist/chunk-PBUH2P5S.js +3 -0
  127. package/dist/{chunk-QBANU5BQ.js → chunk-PIFTZEEM.js} +2 -2
  128. package/dist/{chunk-CKDOY6JA.js → chunk-PLJUQFQN.js} +2 -2
  129. package/dist/{chunk-JVZNWJBH.js → chunk-PLYUVM4F.js} +2 -2
  130. package/dist/chunk-PXXYQK55.js +2 -0
  131. package/dist/{chunk-WZQFY5S7.js → chunk-Q55NF3ZG.js} +2 -2
  132. package/dist/{chunk-OVPS2ILI.js → chunk-Q5TA4OY4.js} +2 -2
  133. package/dist/{chunk-OUB4J26T.js → chunk-Q6T2CAJL.js} +2 -2
  134. package/dist/chunk-Q7GBK5T7.js +81 -0
  135. package/dist/chunk-QKT4UI2Y.js +2 -0
  136. package/dist/{chunk-PIZY2GX6.js → chunk-QLBSG7U5.js} +2 -2
  137. package/dist/chunk-QWKHW6VZ.js +2 -0
  138. package/dist/{chunk-E7BJXRNV.js → chunk-R6M456QG.js} +2 -2
  139. package/dist/{chunk-MJNV7OCG.js → chunk-RDULNRSJ.js} +2 -2
  140. package/dist/{chunk-SSSJO4RG.js → chunk-RHHCLWQ6.js} +2 -2
  141. package/dist/chunk-RNKPYYYE.js +4 -0
  142. package/dist/{chunk-IXJ26KJJ.js → chunk-RPL3ARU7.js} +2 -2
  143. package/dist/{chunk-3EX7DNBC.js → chunk-RYOYJMGF.js} +2 -2
  144. package/dist/chunk-SB25YMEQ.js +2 -0
  145. package/dist/chunk-SV2LEFVM.js +2 -0
  146. package/dist/{chunk-ZBNL3QCY.js → chunk-SVHTMVA4.js} +3 -3
  147. package/dist/{chunk-6IEVHGWG.js → chunk-SWK4XPUS.js} +2 -2
  148. package/dist/chunk-T6QD2ZQB.js +43 -0
  149. package/dist/{chunk-VETXXOYU.js → chunk-TAYD3AE7.js} +2 -2
  150. package/dist/chunk-TD7VKJ2Y.js +117 -0
  151. package/dist/{chunk-UQ7XPRWU.js → chunk-TH6IC56G.js} +2 -2
  152. package/dist/{chunk-XVDMJMES.js → chunk-TKDNDQA7.js} +2 -2
  153. package/dist/{chunk-CSDDOUA4.js → chunk-TNG2FYS5.js} +2 -2
  154. package/dist/chunk-TQZV7KV4.js +2 -0
  155. package/dist/{chunk-AJVMVE7X.js → chunk-TUQIPUDS.js} +2 -2
  156. package/dist/chunk-TUSPIVZ3.js +4 -0
  157. package/dist/{chunk-ORBKAUCH.js → chunk-U2N2KE7A.js} +2 -2
  158. package/dist/{chunk-3PII3JI5.js → chunk-UAQ4T73O.js} +2 -2
  159. package/dist/{chunk-OFY4HTMI.js → chunk-UDY7MIAW.js} +2 -2
  160. package/dist/{chunk-WKPZCQLI.js → chunk-URSGGIZX.js} +2 -2
  161. package/dist/{chunk-UL4VJUMD.js → chunk-UT7TADJX.js} +2 -2
  162. package/dist/chunk-V4NG5OMS.js +554 -0
  163. package/dist/{chunk-2H4IAJHO.js → chunk-VMWUV6WB.js} +2 -2
  164. package/dist/{chunk-46JLFIGA.js → chunk-VTCIYFEK.js} +2 -2
  165. package/dist/chunk-VU6LIWHT.js +2 -0
  166. package/dist/chunk-VUSKPCUB.js +2 -0
  167. package/dist/{chunk-URMZLV2N.js → chunk-VXJJTQYE.js} +2 -2
  168. package/dist/{chunk-IPAL6DP2.js → chunk-VZ7NXSHV.js} +2 -2
  169. package/dist/{chunk-FUG6RPYY.js → chunk-WHADK6OS.js} +2 -2
  170. package/dist/chunk-WN3TCGJ4.js +2 -0
  171. package/dist/{chunk-B7ECWJAZ.js → chunk-WOOAY3PA.js} +2 -2
  172. package/dist/chunk-WRQXLNYE.js +9 -0
  173. package/dist/chunk-WSLEJSFR.js +2 -0
  174. package/dist/chunk-WYZIHUPZ.js +16 -0
  175. package/dist/{chunk-ZYREOING.js → chunk-XE33FV5W.js} +2 -2
  176. package/dist/chunk-XFMVKFSF.js +2 -0
  177. package/dist/{chunk-BBEDPVPB.js → chunk-XGGBK66W.js} +2 -2
  178. package/dist/{chunk-OFUBXBYX.js → chunk-XJX6LGHL.js} +2 -2
  179. package/dist/{chunk-Z3GCK3PD.js → chunk-XN22RGSR.js} +2 -2
  180. package/dist/{chunk-HWLCBKFE.js → chunk-XSWYJCAK.js} +2 -2
  181. package/dist/{chunk-IGKKTHJR.js → chunk-XU75YQN4.js} +2 -2
  182. package/dist/{chunk-E4EJBGDZ.js → chunk-Y2VM4CJC.js} +2 -2
  183. package/dist/{chunk-U7LRSQG6.js → chunk-Y334QQU5.js} +2 -2
  184. package/dist/{chunk-APLKXICZ.js → chunk-YAGYMBEX.js} +2 -2
  185. package/dist/{chunk-XITQLISP.js → chunk-YIHNPKWD.js} +2 -2
  186. package/dist/chunk-YXPUP5G2.js +11 -0
  187. package/dist/{chunk-6BJ7SOY7.js → chunk-Z2AWCTN6.js} +2 -2
  188. package/dist/{chunk-PHSPBQM6.js → chunk-Z2PZVKPR.js} +2 -2
  189. package/dist/{chunk-QXR5QPSF.js → chunk-ZAZGGSM3.js} +2 -2
  190. package/dist/{chunk-5236NQV3.js → chunk-ZGW4HLPD.js} +2 -2
  191. package/dist/chunk-ZOXKSQQB.js +2 -0
  192. package/dist/{chunk-BD6CV7PN.js → chunk-ZPASRBLF.js} +2 -2
  193. package/dist/{chunk-DMUGTKMD.js → chunk-ZYM4HOFA.js} +2 -2
  194. package/dist/{chunk-4ILHWBYF.js → chunk-ZZ3Z7D56.js} +2 -2
  195. package/dist/cli-main.js +4 -4
  196. package/dist/{code-CczEvHui.d.ts → code-B17qEMbt.d.ts} +1 -1
  197. package/dist/code-EQJFDT6I.js +2 -0
  198. package/dist/code-result-json-7UWIWBOO.js +2 -0
  199. package/dist/command-descriptors-ORNTVNYV.js +342 -0
  200. package/dist/{config-types-Cm-VSEBb.d.ts → config-types-B9B60MiR.d.ts} +10 -0
  201. package/dist/dataflow-6VL54GX5.js +2 -0
  202. package/dist/{db-LKJXAlNS.d.ts → db-BwIVAYNB.d.ts} +1 -1
  203. package/dist/dependence-slice-DT2NUHD2.js +2 -0
  204. package/dist/deps-DB7H5IKC.js +2 -0
  205. package/dist/direct-navigation-O3LUAYWQ.js +3 -0
  206. package/dist/entry-map-6K62RV3D.js +2 -0
  207. package/dist/files-MSLD7MO6.js +2 -0
  208. package/dist/{graph-evidence-CbUPCSKV.d.ts → graph-evidence-Bjyky2V4.d.ts} +1 -1
  209. package/dist/{health-Wl5G_LRt.d.ts → health-CPp2Jf1Z.d.ts} +1 -1
  210. package/dist/hierarchy-IVBXAKFA.js +2 -0
  211. package/dist/imports-FRAVZ3Y2.js +2 -0
  212. package/dist/index.d.ts +2 -2
  213. package/dist/index.js +1 -1
  214. package/dist/members-KJOJDYGO.js +2 -0
  215. package/dist/methods-2AYABBT3.js +2 -0
  216. package/dist/output-continuation-command-JHMPH6NC.js +3 -0
  217. package/dist/{output-pagination-VAWOGX4R.js → output-pagination-3OFL2MJV.js} +2 -2
  218. package/dist/project-reindex-HYO4WD7Z.js +3 -0
  219. package/dist/queries/affected.d.ts +2 -2
  220. package/dist/queries/affected.js +1 -1
  221. package/dist/queries/anchors.d.ts +2 -2
  222. package/dist/queries/anchors.js +1 -1
  223. package/dist/queries/architecture.d.ts +2 -2
  224. package/dist/queries/architecture.js +1 -1
  225. package/dist/queries/bottlenecks.d.ts +2 -2
  226. package/dist/queries/bottlenecks.js +1 -1
  227. package/dist/queries/by-kind.d.ts +2 -2
  228. package/dist/queries/by-kind.js +1 -1
  229. package/dist/queries/call-graph.d.ts +2 -2
  230. package/dist/queries/call-graph.js +1 -1
  231. package/dist/queries/change-surface.d.ts +2 -2
  232. package/dist/queries/change-surface.js +1 -1
  233. package/dist/queries/cleanup-plan.d.ts +2 -2
  234. package/dist/queries/cleanup-plan.js +1 -1
  235. package/dist/queries/co-change.d.ts +2 -2
  236. package/dist/queries/co-change.js +1 -1
  237. package/dist/queries/code.d.ts +3 -3
  238. package/dist/queries/code.js +1 -1
  239. package/dist/queries/complexity-hotspots.d.ts +2 -2
  240. package/dist/queries/complexity-hotspots.js +1 -1
  241. package/dist/queries/complexity.d.ts +13 -2
  242. package/dist/queries/complexity.js +1 -1
  243. package/dist/queries/context.d.ts +2 -2
  244. package/dist/queries/context.js +1 -1
  245. package/dist/queries/convergence.d.ts +2 -2
  246. package/dist/queries/convergence.js +1 -1
  247. package/dist/queries/coupling.d.ts +2 -2
  248. package/dist/queries/coupling.js +1 -1
  249. package/dist/queries/cycles.d.ts +2 -2
  250. package/dist/queries/cycles.js +1 -1
  251. package/dist/queries/dataflow.d.ts +2 -2
  252. package/dist/queries/dataflow.js +1 -1
  253. package/dist/queries/dead.d.ts +2 -2
  254. package/dist/queries/dead.js +1 -1
  255. package/dist/queries/decorative-checkers.d.ts +2 -2
  256. package/dist/queries/decorative-checkers.js +1 -1
  257. package/dist/queries/deep-chains.d.ts +2 -2
  258. package/dist/queries/deep-chains.js +1 -1
  259. package/dist/queries/dependence-slice.d.ts +3 -3
  260. package/dist/queries/dependence-slice.js +1 -1
  261. package/dist/queries/dependency-depth.d.ts +2 -2
  262. package/dist/queries/dependency-depth.js +1 -1
  263. package/dist/queries/deps.d.ts +2 -2
  264. package/dist/queries/deps.js +1 -1
  265. package/dist/queries/diff-impact.d.ts +2 -2
  266. package/dist/queries/diff-impact.js +1 -1
  267. package/dist/queries/doc-drift.d.ts +2 -2
  268. package/dist/queries/doc-drift.js +1 -1
  269. package/dist/queries/drift.d.ts +2 -2
  270. package/dist/queries/drift.js +1 -1
  271. package/dist/queries/duplicate-bodies.d.ts +2 -2
  272. package/dist/queries/duplicate-bodies.js +1 -1
  273. package/dist/queries/entry-map.d.ts +2 -2
  274. package/dist/queries/entry-map.js +1 -1
  275. package/dist/queries/evidence.d.ts +3 -3
  276. package/dist/queries/evidence.js +1 -1
  277. package/dist/queries/extract-candidates.d.ts +2 -2
  278. package/dist/queries/extract-candidates.js +1 -1
  279. package/dist/queries/fan.d.ts +2 -2
  280. package/dist/queries/fan.js +1 -1
  281. package/dist/queries/files.d.ts +2 -2
  282. package/dist/queries/files.js +1 -1
  283. package/dist/queries/health.d.ts +3 -3
  284. package/dist/queries/health.js +1 -1
  285. package/dist/queries/hierarchy.d.ts +2 -2
  286. package/dist/queries/hierarchy.js +1 -1
  287. package/dist/queries/hotspots.d.ts +2 -2
  288. package/dist/queries/hotspots.js +1 -1
  289. package/dist/queries/imports.d.ts +2 -2
  290. package/dist/queries/imports.js +1 -1
  291. package/dist/queries/incomplete-migration.d.ts +2 -2
  292. package/dist/queries/incomplete-migration.js +1 -1
  293. package/dist/queries/index.d.ts +5 -5
  294. package/dist/queries/index.js +1 -1
  295. package/dist/queries/isolated.d.ts +2 -2
  296. package/dist/queries/isolated.js +1 -1
  297. package/dist/queries/locality-candidates.d.ts +2 -2
  298. package/dist/queries/locality-candidates.js +1 -1
  299. package/dist/queries/members.d.ts +2 -2
  300. package/dist/queries/members.js +1 -1
  301. package/dist/queries/methods.d.ts +2 -2
  302. package/dist/queries/methods.js +1 -1
  303. package/dist/queries/not-implemented.d.ts +2 -2
  304. package/dist/queries/not-implemented.js +1 -1
  305. package/dist/queries/outline.d.ts +2 -2
  306. package/dist/queries/outline.js +1 -1
  307. package/dist/queries/passthrough-candidates.d.ts +2 -2
  308. package/dist/queries/passthrough-candidates.js +1 -1
  309. package/dist/queries/plan-context.d.ts +2 -2
  310. package/dist/queries/plan-context.js +1 -1
  311. package/dist/queries/react-component-duplicates.d.ts +2 -2
  312. package/dist/queries/react-component-duplicates.js +1 -1
  313. package/dist/queries/react-hook-candidates.d.ts +2 -2
  314. package/dist/queries/react-hook-candidates.js +1 -1
  315. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  316. package/dist/queries/react-large-component-pressure.js +1 -1
  317. package/dist/queries/recent-duplicates.d.ts +2 -2
  318. package/dist/queries/recent-duplicates.js +1 -1
  319. package/dist/queries/redundant-reexports.d.ts +2 -2
  320. package/dist/queries/redundant-reexports.js +1 -1
  321. package/dist/queries/reference-neighborhood.d.ts +2 -2
  322. package/dist/queries/reference-neighborhood.js +1 -1
  323. package/dist/queries/reference-reachability.d.ts +2 -2
  324. package/dist/queries/reference-reachability.js +1 -1
  325. package/dist/queries/refs.d.ts +2 -2
  326. package/dist/queries/refs.js +1 -1
  327. package/dist/queries/self-audit.d.ts +2 -2
  328. package/dist/queries/self-audit.js +1 -1
  329. package/dist/queries/similar-chains.d.ts +2 -2
  330. package/dist/queries/similar-chains.js +1 -1
  331. package/dist/queries/similar-files.d.ts +2 -2
  332. package/dist/queries/similar-files.js +1 -1
  333. package/dist/queries/similar-signatures.d.ts +2 -2
  334. package/dist/queries/similar-signatures.js +1 -1
  335. package/dist/queries/similar.d.ts +2 -2
  336. package/dist/queries/similar.js +1 -1
  337. package/dist/queries/slice.d.ts +2 -2
  338. package/dist/queries/slice.js +1 -1
  339. package/dist/queries/source-inspection.d.ts +4 -4
  340. package/dist/queries/source-inspection.js +1 -1
  341. package/dist/queries/source-search.d.ts +2 -2
  342. package/dist/queries/source-search.js +1 -1
  343. package/dist/queries/stale-abstractions.d.ts +2 -2
  344. package/dist/queries/stale-abstractions.js +1 -1
  345. package/dist/queries/stats.d.ts +2 -2
  346. package/dist/queries/surface.d.ts +2 -2
  347. package/dist/queries/surface.js +1 -1
  348. package/dist/queries/symbols.d.ts +2 -2
  349. package/dist/queries/symbols.js +1 -1
  350. package/dist/queries/system-map.d.ts +2 -2
  351. package/dist/queries/system-map.js +1 -1
  352. package/dist/queries/system.d.ts +2 -2
  353. package/dist/queries/system.js +1 -1
  354. package/dist/queries/test-quality.d.ts +2 -2
  355. package/dist/queries/test-quality.js +1 -1
  356. package/dist/queries/trace.d.ts +2 -2
  357. package/dist/queries/trace.js +1 -1
  358. package/dist/queries/twin-ab.d.ts +2 -2
  359. package/dist/queries/twin-ab.js +1 -1
  360. package/dist/queries/twin-drift.d.ts +2 -2
  361. package/dist/queries/twin-drift.js +1 -1
  362. package/dist/queries/unused-imports.d.ts +2 -2
  363. package/dist/queries/unused-imports.js +1 -1
  364. package/dist/queries/unused-params.d.ts +2 -2
  365. package/dist/queries/unused-params.js +1 -1
  366. package/dist/queries/value-flow.d.ts +3 -3
  367. package/dist/queries/value-flow.js +1 -1
  368. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  369. package/dist/queries/vue-component-duplicates.js +1 -1
  370. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  371. package/dist/queries/vue-composable-candidates.js +1 -1
  372. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  373. package/dist/queries/vue-large-view-pressure.js +1 -1
  374. package/dist/queries/wrapper-candidates.d.ts +2 -2
  375. package/dist/queries/wrapper-candidates.js +1 -1
  376. package/dist/query-service-fastpath.js +5 -5
  377. package/dist/query-service-server.js +2 -2
  378. package/dist/refs-ARMA6XUJ.js +2 -0
  379. package/dist/refs-pagination-VUGIWN6U.js +2 -0
  380. package/dist/reindex-worker.js +125 -66
  381. package/dist/reindex.d.ts +5 -3
  382. package/dist/reindex.js +135 -76
  383. package/dist/runtime.d.ts +5 -5
  384. package/dist/runtime.js +4 -4
  385. package/dist/rust-semantic-session-server.js +1 -1
  386. package/dist/rust-semantic-session-worker.js +1 -1
  387. package/dist/rust-semantic-worker.js +1 -1
  388. package/dist/{scip-cli-CppzF5MK.d.ts → scip-cli-H-n59izO.d.ts} +1 -1
  389. package/dist/slice-YOB5YFAM.js +2 -0
  390. package/dist/surface-VY5EFWTW.js +2 -0
  391. package/dist/symbol-resolution-DGQN4XIV.js +2 -0
  392. package/dist/system-2KQ3QD2P.js +2 -0
  393. package/dist/trace-HTIPTXAE.js +2 -0
  394. package/dist/typescript-mailbox-worker.js +1 -1
  395. package/dist/value-flow-5FV3VQI7.js +2 -0
  396. package/dist/watch-server.js +3 -3
  397. package/docs/CLI_JSON_OUTPUT.md +2 -2
  398. package/docs/COMMAND_REFERENCE.md +2 -2
  399. package/docs/schemas/project-config.schema.json +11 -1
  400. package/package.json +6 -5
  401. package/skills/scip-explore/SKILL.md +73 -3
  402. package/skills/scip-explore/agents/openai.yaml +3 -3
  403. package/skills/scip-explore/references/delegated-exploration.md +51 -0
  404. package/skills/scip-explore/references/external-evidence.md +72 -0
  405. package/skills/scip-explore/references/information-model.md +51 -0
  406. package/skills/scip-explore/scripts/capture-evidence.mjs +666 -0
  407. package/skills/scip-query/SKILL.md +22 -1
  408. package/dist/by-kind-CI3O6PQG.js +0 -2
  409. package/dist/call-graph-6QTUTXH7.js +0 -2
  410. package/dist/chunk-2COFMIVK.js +0 -60
  411. package/dist/chunk-35ELD3RM.js +0 -2
  412. package/dist/chunk-3FQ3KMCD.js +0 -2
  413. package/dist/chunk-3VLJ2DCA.js +0 -2
  414. package/dist/chunk-4DCKBY6T.js +0 -5
  415. package/dist/chunk-4N6QSEMZ.js +0 -10
  416. package/dist/chunk-4OE2JO6I.js +0 -2
  417. package/dist/chunk-4UUCUASK.js +0 -554
  418. package/dist/chunk-54EOGFBR.js +0 -2
  419. package/dist/chunk-5IZTXSOL.js +0 -117
  420. package/dist/chunk-5ZJH6DDE.js +0 -2
  421. package/dist/chunk-63MBA7EG.js +0 -3
  422. package/dist/chunk-6T7H2AFY.js +0 -3
  423. package/dist/chunk-7COHFNJK.js +0 -38
  424. package/dist/chunk-7HU2IJ2T.js +0 -3
  425. package/dist/chunk-7PPYXENX.js +0 -2
  426. package/dist/chunk-AA7K3XLM.js +0 -21
  427. package/dist/chunk-AUP6YI5M.js +0 -2
  428. package/dist/chunk-CA5RE6H7.js +0 -2
  429. package/dist/chunk-CT5SI2I4.js +0 -2
  430. package/dist/chunk-D5EKVZPI.js +0 -2
  431. package/dist/chunk-DMQ7ZKJG.js +0 -81
  432. package/dist/chunk-ELNRLMC5.js +0 -29
  433. package/dist/chunk-F7WQ337U.js +0 -308
  434. package/dist/chunk-FEQIQ26E.js +0 -2
  435. package/dist/chunk-FN6EJM6Q.js +0 -2
  436. package/dist/chunk-FTSQNONX.js +0 -2
  437. package/dist/chunk-G2F6T5BV.js +0 -2
  438. package/dist/chunk-G6OGPXJW.js +0 -9
  439. package/dist/chunk-GFLTPNWV.js +0 -3
  440. package/dist/chunk-GTDP2SKQ.js +0 -2
  441. package/dist/chunk-HEOMG7IM.js +0 -8
  442. package/dist/chunk-I3U2FN2T.js +0 -13
  443. package/dist/chunk-IUJ3ZFEE.js +0 -7
  444. package/dist/chunk-LXLD46LH.js +0 -21
  445. package/dist/chunk-MEI3PTUK.js +0 -2
  446. package/dist/chunk-MO226P4Q.js +0 -4
  447. package/dist/chunk-MYUKI5VN.js +0 -4
  448. package/dist/chunk-OIRWZIYL.js +0 -38
  449. package/dist/chunk-OIVZ7PW6.js +0 -438
  450. package/dist/chunk-PNISDVYC.js +0 -3
  451. package/dist/chunk-PQOL42AW.js +0 -2
  452. package/dist/chunk-PUVZNFVY.js +0 -11
  453. package/dist/chunk-PZEI2TVL.js +0 -4
  454. package/dist/chunk-Q2J2VZZT.js +0 -2
  455. package/dist/chunk-QDCCHMVZ.js +0 -2
  456. package/dist/chunk-QLQBZOJH.js +0 -3
  457. package/dist/chunk-S73HBCGI.js +0 -11
  458. package/dist/chunk-SDPA5DKN.js +0 -210
  459. package/dist/chunk-SEUJVWT2.js +0 -3
  460. package/dist/chunk-SF7X6QNW.js +0 -2
  461. package/dist/chunk-SWFAFA4G.js +0 -49
  462. package/dist/chunk-T6FRID7Y.js +0 -3
  463. package/dist/chunk-TNOHGHZQ.js +0 -2
  464. package/dist/chunk-U2GPTA5U.js +0 -3
  465. package/dist/chunk-URTX2BEA.js +0 -6
  466. package/dist/chunk-VGRUM7JI.js +0 -3
  467. package/dist/chunk-VWLIOEEF.js +0 -11
  468. package/dist/chunk-WK4FD4PG.js +0 -2
  469. package/dist/chunk-X434XZAI.js +0 -2
  470. package/dist/chunk-YIEFEPG6.js +0 -16
  471. package/dist/chunk-YRVERHJR.js +0 -49
  472. package/dist/chunk-ZD3Z54IW.js +0 -2
  473. package/dist/chunk-ZDVDSDFG.js +0 -4
  474. package/dist/code-EQL6ZBLH.js +0 -2
  475. package/dist/code-result-json-6E4J6LGZ.js +0 -2
  476. package/dist/command-descriptors-QH3G2OVD.js +0 -346
  477. package/dist/dataflow-2BLMUZBP.js +0 -2
  478. package/dist/dependence-slice-MGAJDZXB.js +0 -2
  479. package/dist/deps-GQMUYVKW.js +0 -2
  480. package/dist/direct-navigation-6RUJKLAV.js +0 -3
  481. package/dist/entry-map-V2NQP5JU.js +0 -2
  482. package/dist/files-VM53I4IU.js +0 -2
  483. package/dist/hierarchy-D553WRSZ.js +0 -2
  484. package/dist/imports-DOZAJWLW.js +0 -2
  485. package/dist/members-HE67475K.js +0 -2
  486. package/dist/methods-K5JK4PPH.js +0 -2
  487. package/dist/output-continuation-command-LKBUTNRL.js +0 -3
  488. package/dist/project-reindex-4ARU6QCM.js +0 -3
  489. package/dist/refs-NBHKL4UQ.js +0 -2
  490. package/dist/refs-pagination-BBVTIHMH.js +0 -2
  491. package/dist/slice-U6S6LBSB.js +0 -2
  492. package/dist/surface-C7SS5CDQ.js +0 -2
  493. package/dist/symbol-resolution-3FVEKDTJ.js +0 -2
  494. package/dist/system-6K2NOO5C.js +0 -2
  495. package/dist/trace-II5K2TMH.js +0 -2
  496. package/dist/value-flow-MKFUUE5B.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{a as k}from"./chunk-7YQOCABQ.js";import{c as R,d as E}from"./chunk-SB25YMEQ.js";import{h as S}from"./chunk-AK3PYTIK.js";import{randomUUID as q}from"crypto";import{getHeapStatistics as V}from"v8";import{resolve as H}from"path";import{createRequire as L}from"module";import{dirname as I,isAbsolute as j,relative as P,resolve as m,sep as b}from"path";var u=L(import.meta.url),_=1,D="0.4.0";function z(){try{let t=M();if(!t.available)return t;let{packageRoot:e}=t,r=u.resolve("typescript",{paths:[e]}),i=u(r),{FileIndexer:n}=u(m(e,"dist/src/FileIndexer.js")),{Input:s}=u(m(e,"dist/src/Input.js")),{Packages:o}=u(m(e,"dist/src/Packages.js")),c=u(m(e,"dist/src/scip.js"));if(!n||!s||!o||!c.scip?.Document||!c.scip.Index)return{available:!1,reason:"scip-typescript document runtime has an unsupported module shape"};let a={packageVersion:t.packageVersion,typescript:i,Document:c.scip.Document,Index:c.scip.Index,FileIndexer:n,Input:s,Packages:o};return{available:!0,runtime:a,producerIdentity:x(a)}}catch(t){return{available:!1,reason:`scip-typescript document runtime unavailable: ${t instanceof Error?t.message:String(t)}`}}}function J(){let t=M();return t.available?{available:!0,packageVersion:t.packageVersion,typescriptVersion:t.typescriptVersion,producerIdentity:t.producerIdentity}:t}function M(){try{let t=u.resolve("@sourcegraph/scip-typescript/package.json"),e=JSON.parse(S(t,"scip-typescript package manifest"));if(e.version!==D)return{available:!1,reason:`unsupported scip-typescript version ${String(e.version??"unknown")}; expected ${D}`};let r=I(t),i=u.resolve("typescript/package.json",{paths:[r]}),n=JSON.parse(S(i,"TypeScript package manifest"));return typeof n.version!="string"||!n.version?{available:!1,reason:"scip-typescript TypeScript compiler version is unavailable"}:{available:!0,packageRoot:r,packageVersion:e.version,typescriptVersion:n.version,producerIdentity:C(e.version,n.version)}}catch(t){return{available:!1,reason:`scip-typescript document producer unavailable: ${t instanceof Error?t.message:String(t)}`}}}function A(t){let e=t.runtime===void 0?z():t.runtime===null?{available:!1,reason:"scip-typescript document runtime unavailable"}:{available:!0,runtime:t.runtime,producerIdentity:x(t.runtime)};return e.available?{available:!0,emitter:new T(t,e.runtime)}:e}var T=class{producerIdentity;workspaceRoot;tsconfigPath;projectRoot;maxFileByteSize;runtime;host;config=null;includedFiles=new Set;program=null;checker=null;symbolTable=new Map;constructorTable=new Map;packages;fragments=new Map;stats={initializations:0,programUpdates:0,documentsEmitted:0,documentsRemoved:0,sourceNodesReused:0,sourceNodesReplaced:0,symbolEntriesPruned:0};constructor(e,r){this.workspaceRoot=m(e.workspaceRoot),this.tsconfigPath=m(this.workspaceRoot,e.tsconfigPath),this.projectRoot=e.projectRoot??O(this.workspaceRoot,I(this.tsconfigPath)),this.maxFileByteSize=e.maxFileByteSize??1024*1024,this.runtime=r,this.producerIdentity=x(r);let i=v(r.typescript,this.tsconfigPath);this.config=i,this.host=new w(r.typescript,i.options,this.workspaceRoot),this.packages=new r.Packages(this.projectRoot)}initialize(){let e=performance.now();this.initializeProgram();let r=[];for(let i of this.program.getSourceFiles())this.includedFiles.has(f(i.fileName))&&r.push(this.emitSourceFile(i));return this.result(r,e)}advance(e){if(!this.program||!this.checker||!this.config)return this.initializeAndAdvance(e);let r=performance.now(),i=h(e.modifiedFiles),n=h(e.removedFiles??[]),s=h(e.affectedFiles);if(this.fragments.clear(),i.length===0&&n.length===0)return this.validateAffectedPaths(s),this.result(this.emitAffectedFiles(s),r);let o=v(this.runtime.typescript,this.tsconfigPath);this.config=o,this.includedFiles=new Set(o.fileNames.map(f));let c=this.program,a=new Map;for(let d of[...i,...n]){let p=y(this.workspaceRoot,d),l=c.getSourceFile(p);l&&(a.set(d,l),this.stats.symbolEntriesPruned+=F(this.symbolTable,l),this.stats.symbolEntriesPruned+=F(this.constructorTable,l)),this.host.invalidate(p)}this.program=this.runtime.typescript.createProgram(o.fileNames,o.options,this.host.compilerHost,c),this.checker=this.program.getTypeChecker(),this.stats.programUpdates+=1,this.validateIncrementalPaths(i,n,s),this.stats.documentsRemoved+=n.length;for(let[d,p]of a)this.program.getSourceFile(y(this.workspaceRoot,d))===p?this.stats.sourceNodesReused+=1:this.stats.sourceNodesReplaced+=1;return this.result(this.emitAffectedFiles(s),r)}fragment(e){return this.fragments.get(g(e))??null}snapshotStats(){return{...this.stats}}initializeAndAdvance(e){let r=performance.now();this.initializeProgram();let i=h(e.modifiedFiles),n=h(e.removedFiles??[]),s=h(e.affectedFiles);return this.fragments.clear(),this.validateIncrementalPaths(i,n,s,!0),this.stats.documentsRemoved+=n.length,this.result(this.emitAffectedFiles(s),r)}initializeProgram(){let e=this.config??v(this.runtime.typescript,this.tsconfigPath);this.includedFiles=new Set(e.fileNames.map(f)),this.program=this.runtime.typescript.createProgram(e.fileNames,e.options,this.host.compilerHost),this.checker=this.program.getTypeChecker(),this.stats.initializations+=1}validateIncrementalPaths(e,r,i,n=!1){if(!n&&e.length===0&&r.length===0)throw new Error("incremental TypeScript document update requires a modified or removed file");if(i.length===0&&r.length===0)throw new Error("incremental TypeScript document update requires an affected or removed file");for(let s of e){let o=y(this.workspaceRoot,s);if(!this.program?.getSourceFile(o))throw new Error(`modified TypeScript dependency is unavailable to the configured project: ${s}`)}for(let s of r){let o=y(this.workspaceRoot,s);if(this.program?.getSourceFile(o))throw new Error(`removed TypeScript source is still present in the configured project: ${s}`)}this.validateAffectedPaths(i)}validateAffectedPaths(e){for(let r of e){let i=y(this.workspaceRoot,r);if(!this.includedFiles.has(f(i)))throw new Error(`affected TypeScript file is outside the configured project: ${r}`)}}emitAffectedFiles(e){return e.map(r=>{let i=this.program.getSourceFile(y(this.workspaceRoot,r));if(!i)throw new Error(`affected TypeScript source is unavailable: ${r}`);return this.emitSourceFile(i)})}emitSourceFile(e){if(!this.checker)throw new Error("TypeScript document emitter is not initialized");let r=g(P(this.workspaceRoot,e.fileName)),i=new this.runtime.Document({relative_path:r,occurrences:[]});if(new this.runtime.FileIndexer(this.checker,{cwd:this.workspaceRoot,projectRoot:this.projectRoot,projectDisplayName:this.projectRoot,maxFileByteSizeNumber:this.maxFileByteSize},new this.runtime.Input(e.fileName,e.getText()),i,this.symbolTable,this.constructorTable,this.packages,e).index(),this.stats.documentsEmitted+=1,i.occurrences.length===0)return this.fragments.delete(r),this.stats.documentsRemoved+=1,{relativePath:r,bytes:null,occurrences:0,symbols:i.symbols.length,referenceFragments:[]};let s=i.serializeBinary();return this.fragments.set(r,s),{relativePath:r,bytes:s,occurrences:i.occurrences.length,symbols:i.symbols.length,referenceFragments:U(r,i)}}result(e,r){return{producerIdentity:this.producerIdentity,fragments:e,durationMs:performance.now()-r,stats:this.snapshotStats()}}};function U(t,e){let r=new Map;for(let i of e.occurrences){if(!i.symbol||(i.symbol_roles&1)!==0||i.range.length<3)continue;let n=i.range[0],s=i.range[1];if(!Number.isInteger(n)||!Number.isInteger(s))continue;let o={targetSymbol:i.symbol,location:{file:t,line:n,column:s}};r.set(`${i.symbol}\0${n}\0${s}`,o)}return[...r.values()].sort((i,n)=>i.targetSymbol.localeCompare(n.targetSymbol)||i.location.line-n.location.line||i.location.column-n.location.column)}var w=class{compilerHost;sourceFiles=new Map;constructor(e,r,i){let n=e.createCompilerHost(r),s=n.getSourceFile.bind(n);this.compilerHost={...n,getCurrentDirectory:()=>i,getSourceFile:(o,c,a,d)=>{let p=f(o);if(this.sourceFiles.has(p))return this.sourceFiles.get(p);let l=s(o,c,a,d);return this.sourceFiles.set(p,l),l}}}invalidate(e){this.sourceFiles.delete(f(e))}};function v(t,e){let r=t.readConfigFile(e,t.sys.readFile);if(r.error)throw new Error(t.formatDiagnostics([r.error],t.createCompilerHost({})));let i=t.parseJsonConfigFileContent(r.config,t.sys,I(e)),n=i.errors.filter(s=>s.code!==18003);if(n.length>0)throw new Error(t.formatDiagnostics(n,t.createCompilerHost({})));return i}function x(t){return C(t.packageVersion,t.typescript.version)}function C(t,e){return`scip-typescript:${t}:typescript:${e}:document-adapter:${_}`}function O(t,e){return g(P(t,e))||"."}function y(t,e){if(j(e))throw new Error(`expected a project-relative path: ${e}`);let r=m(t,e),i=t.endsWith(b)?t:`${t}${b}`;if(r!==t&&!r.startsWith(i))throw new Error(`path escapes the project root: ${e}`);return r}function h(t){return[...new Set(t.map(g))].sort()}function g(t){return t.split(b).join("/").replace(/^\.\//,"")}function f(t){return m(t)}function F(t,e){let r=0;for(let i of t.keys())if($(i)){try{if(i.getSourceFile()!==e)continue}catch{continue}t.delete(i),r+=1}return r}function $(t){return!!(t&&typeof t=="object"&&"kind"in t&&"getSourceFile"in t)}var N=class{projectRoot;currentGeneration;createEmitter;wallNow;monotonicNow;maxActiveSessions;softMemoryLimitBytes;memoryUsage;active=new Map;requests=0;sessionsCreated=0;sessionsReplaced=0;sessionsEvicted=0;lastRequestAtMs=null;lastDurationMs=null;lastError=null;unavailable=!1;constructor(e){if(this.projectRoot=H(e.projectRoot),this.currentGeneration=e.currentGeneration,this.createEmitter=e.createEmitter??A,this.wallNow=e.wallNow??e.now??Date.now,this.monotonicNow=e.monotonicNow??e.now??E,e.maxActiveSessions!==void 0&&(!Number.isInteger(e.maxActiveSessions)||e.maxActiveSessions<1))throw new Error("TypeScript index maxActiveSessions must be a positive integer.");if(this.maxActiveSessions=e.maxActiveSessions??8,e.softMemoryLimitMb!==void 0&&(!Number.isInteger(e.softMemoryLimitMb)||e.softMemoryLimitMb<1))throw new Error("TypeScript index softMemoryLimitMb must be a positive integer.");this.softMemoryLimitBytes=e.softMemoryLimitMb===void 0?null:e.softMemoryLimitMb*1024*1024,this.memoryUsage=e.memoryUsage??(()=>({heapUsedBytes:process.memoryUsage().heapUsed,heapLimitBytes:V().heap_size_limit}))}handle(e,r){let i=this.monotonicNow();try{if(this.currentGeneration()!==e)throw new Error("TypeScript index request does not match the currently published generation.");let n=this.emitterFor(r);if(n.emitter.producerIdentity!==r.producerIdentity)throw new Error("TypeScript index producer identity changed.");let s=n.emitter.snapshotStats(),o=n.emitter.advance({modifiedFiles:r.modifiedFiles,removedFiles:r.removedFiles,affectedFiles:r.affectedFiles}),c=this.monotonicNow()-i;return this.requests+=1,this.lastRequestAtMs=this.wallNow(),this.lastDurationMs=c,this.lastError=null,this.unavailable=!1,{producerIdentity:o.producerIdentity,cold:o.stats.initializations>s.initializations,durationMs:c,fragments:o.fragments.map(a=>({relativePath:a.relativePath,bytesBase64:a.bytes===null?null:Buffer.from(a.bytes).toString("base64"),occurrences:a.occurrences,symbols:a.symbols,referenceFragments:a.referenceFragments}))}}catch(n){throw this.lastError=n instanceof Error?n.message:String(n),n}}status(e){let r=[...this.active.values()].map(o=>o.emitter.snapshotStats()),i=o=>r.reduce((c,a)=>c+a[o],0),n=this.memoryUsage(),s=this.softMemoryLimitBytes!==null&&n.heapUsedBytes>=this.softMemoryLimitBytes;return{protocolVersion:k,state:this.unavailable?"unavailable":this.lastError?"error":this.active.size>0?"ready":"idle",requests:this.requests,sessionsCreated:this.sessionsCreated,sessionsReplaced:this.sessionsReplaced,sessionsEvicted:this.sessionsEvicted,activeSessions:this.active.size,maxActiveSessions:this.maxActiveSessions,heapUsedBytes:n.heapUsedBytes,heapLimitBytes:n.heapLimitBytes,...this.softMemoryLimitBytes===null?{}:{softMemoryLimitBytes:this.softMemoryLimitBytes},retireRequested:s,initializations:i("initializations"),programUpdates:i("programUpdates"),documentsEmitted:i("documentsEmitted"),documentsRemoved:i("documentsRemoved"),...this.lastRequestAtMs===null?{}:{lastRequestAt:new Date(this.lastRequestAtMs).toISOString()},...this.lastDurationMs===null?{}:{lastDurationMs:this.lastDurationMs},...this.lastError?{lastError:this.lastError}:{},...e?{mailbox:e}:{}}}close(){this.active.clear()}emitterFor(e){let r=`${e.tsconfigPath}\0${e.projectArgument}`,i=this.active.get(r);if(i?.projectIdentity===e.projectIdentity)return this.active.delete(r),this.active.set(r,i),i;if(i)this.active.delete(r);else if(this.active.size>=this.maxActiveSessions){let o=this.active.keys().next().value;o!==void 0&&(this.active.delete(o),this.sessionsEvicted+=1)}let n=this.createEmitter({workspaceRoot:this.projectRoot,tsconfigPath:e.tsconfigPath,projectRoot:e.projectArgument});if(!n.available)throw this.unavailable=!0,new Error(n.reason);i&&(this.sessionsReplaced+=1);let s={projectIdentity:e.projectIdentity,emitter:n.emitter};return this.active.set(r,s),this.sessionsCreated+=1,s}};var se=`typescript-index-${process.pid}-${q()}`,B=R(process.pid),oe={pid:process.pid,...B?{processIdentity:B}:{}};export{J as a,N as b};
2
+ //# sourceMappingURL=chunk-GRX7JOXQ.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-SKUMCCC5.js";import{a as t}from"./chunk-OIRWZIYL.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-H46QMB7E.js.map
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,4 +1,4 @@
1
- import{c as S}from"./chunk-D5EKVZPI.js";import{c as m}from"./chunk-JVZNWJBH.js";import{f as y}from"./chunk-63MBA7EG.js";import{b as h}from"./chunk-35IW3P4H.js";import{w as p}from"./chunk-I3U2FN2T.js";import{a as g}from"./chunk-AA7K3XLM.js";import f from"path";function W(e,t){let{scope:i,minDeviation:r=5,limit:n=50}=t??{},a=t?.semantic!==!1,u=t?.includePatternDeviations===!0,o=new m(e).fileDependencyGraph(i),l=S(e,{scope:i}),c=x([...D(e,o,{scope:i,semantic:a}),...R(l.forbiddenEdges),...u?E(o,r):[]]);return t?.includeArchitecture===!0&&(c.architecture=l),n<=0||c.results.length<=n?c:{...c,results:c.results.slice(0,n),totalResults:c.results.length}}function D(e,t,i){let r=_(e,i.scope),n=[],a=new Set;for(let[s,o]of t){if(d(s))continue;let l=r.get(s)??new Set;for(let c of o)d(c)||l.has(c)||v(e,s,c,i)||(n.push({file:s,dep:c}),a.add(s))}a.size>0&&w(e,r,{paths:[...a]});let u=[];for(let{file:s,dep:o}of n)(r.get(s)??new Set).has(o)||u.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o,actionTier:"direct",evidenceReasons:[`dependency edge exists from ${s} to ${o}`,"no semantic, source, type-only, side-effect, or Vue-template usage survived the conservative skip gates"],recommendation:"Remove the unused import or dependency edge after running the project checks."});return u}function v(e,t,i,r){return C(e,t,i)||M(e,t,i)||O(i)||P(e,t,i)||N(i)?!0:r.semantic&&A(e,t,i)}function R(e){return e.flatMap(t=>{let i=t.examples[0];return i?[{file:i.fromFile,kind:"architecture-violation",description:`${t.from} depends on forbidden boundary ${t.to} through ${t.fileEdgeCount} file edge(s)`,dep:i.toFile,detail:`${t.from} may not depend on ${t.to}`,actionTier:"direct",policyBasis:"explicit",architecture:{fromBoundary:t.from,toBoundary:t.to,fileEdgeCount:t.fileEdgeCount,importerCount:t.importerCount,importedFileCount:t.importedFileCount,examples:t.examples},evidenceReasons:[`configured dependency row for ${t.from} does not allow ${t.to}`,`${t.fileEdgeCount} file edge(s) connect ${t.importerCount} importer(s) to ${t.importedFileCount} imported file(s)`,...t.examples.map(r=>`${r.fromFile} imports ${r.toFile}`)],recommendation:"Move the dependency behind an allowed boundary, reverse the dependency through an owned interface, or deliberately update the project architecture rule."}]:[]})}function E(e,t){let i=[];for(let[r,n]of k(e)){let a=n.filter(s=>!d(s));if(a.length<t)continue;let u=I(e,a);for(let s of a)for(let o of e.get(s)??[])d(o)||(u.get(o)??0)===1&&f.dirname(o)!==r&&f.dirname(o)!==f.dirname(r)&&i.push({file:s,kind:"pattern-deviation",description:`Only file in ${r}/ that depends on ${o}`,dep:o,actionTier:"signal",evidenceReasons:[`${a.length} sibling file(s) in ${r}/ were compared`,`${s} is the only non-skipped sibling depending on ${o}`],recommendation:"Review sibling ownership before changing this import; unique dependency shape can be intentional specialization."})}return i}function x(e){let t=e.filter(i=>i.kind==="architecture-violation").length;return{results:e,unusedImports:e.filter(i=>i.kind==="unused-import").length,architectureViolations:t,layerViolations:t,patternDeviations:e.filter(i=>i.kind==="pattern-deviation").length}}function k(e){let t=new Map;for(let i of e.keys()){let r=f.dirname(i),n=t.get(r);n||(n=[],t.set(r,n)),n.push(i)}return t}function I(e,t){let i=new Map;for(let r of t)for(let n of e.get(r)??[])d(n)||i.set(n,(i.get(n)??0)+1);return i}function _(e,t){let i=new Map;return $(e,i,t),i}function $(e,t,i){for(let r of F(e,i))b(e,t,r.from_file,r.to_file)}function F(e,t){let i=t?"AND d1.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
1
+ import{d as S}from"./chunk-OTSPRVNW.js";import{c as m}from"./chunk-PLYUVM4F.js";import{f as y}from"./chunk-PBUH2P5S.js";import{b as h}from"./chunk-Q6T2CAJL.js";import{x as p}from"./chunk-42W3LFUK.js";import{a as g}from"./chunk-7JYHQAH2.js";import f from"path";function W(e,t){let{scope:i,minDeviation:r=5,limit:n=50}=t??{},a=t?.semantic!==!1,u=t?.includePatternDeviations===!0,o=new m(e).fileDependencyGraph(i),l=S(e,{scope:i}),c=x([...D(e,o,{scope:i,semantic:a}),...R(l.forbiddenEdges),...u?E(o,r):[]]);return t?.includeArchitecture===!0&&(c.architecture=l),n<=0||c.results.length<=n?c:{...c,results:c.results.slice(0,n),totalResults:c.results.length}}function D(e,t,i){let r=_(e,i.scope),n=[],a=new Set;for(let[s,o]of t){if(d(s))continue;let l=r.get(s)??new Set;for(let c of o)d(c)||l.has(c)||v(e,s,c,i)||(n.push({file:s,dep:c}),a.add(s))}a.size>0&&w(e,r,{paths:[...a]});let u=[];for(let{file:s,dep:o}of n)(r.get(s)??new Set).has(o)||u.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o,actionTier:"direct",evidenceReasons:[`dependency edge exists from ${s} to ${o}`,"no semantic, source, type-only, side-effect, or Vue-template usage survived the conservative skip gates"],recommendation:"Remove the unused import or dependency edge after running the project checks."});return u}function v(e,t,i,r){return C(e,t,i)||M(e,t,i)||O(i)||P(e,t,i)||N(i)?!0:r.semantic&&A(e,t,i)}function R(e){return e.flatMap(t=>{let i=t.examples[0];return i?[{file:i.fromFile,kind:"architecture-violation",description:`${t.from} depends on forbidden boundary ${t.to} through ${t.fileEdgeCount} file edge(s)`,dep:i.toFile,detail:`${t.from} may not depend on ${t.to}`,actionTier:"direct",policyBasis:"explicit",architecture:{fromBoundary:t.from,toBoundary:t.to,fileEdgeCount:t.fileEdgeCount,importerCount:t.importerCount,importedFileCount:t.importedFileCount,examples:t.examples},evidenceReasons:[`configured dependency row for ${t.from} does not allow ${t.to}`,`${t.fileEdgeCount} file edge(s) connect ${t.importerCount} importer(s) to ${t.importedFileCount} imported file(s)`,...t.examples.map(r=>`${r.fromFile} imports ${r.toFile}`)],recommendation:"Move the dependency behind an allowed boundary, reverse the dependency through an owned interface, or deliberately update the project architecture rule."}]:[]})}function E(e,t){let i=[];for(let[r,n]of k(e)){let a=n.filter(s=>!d(s));if(a.length<t)continue;let u=I(e,a);for(let s of a)for(let o of e.get(s)??[])d(o)||(u.get(o)??0)===1&&f.dirname(o)!==r&&f.dirname(o)!==f.dirname(r)&&i.push({file:s,kind:"pattern-deviation",description:`Only file in ${r}/ that depends on ${o}`,dep:o,actionTier:"signal",evidenceReasons:[`${a.length} sibling file(s) in ${r}/ were compared`,`${s} is the only non-skipped sibling depending on ${o}`],recommendation:"Review sibling ownership before changing this import; unique dependency shape can be intentional specialization."})}return i}function x(e){let t=e.filter(i=>i.kind==="architecture-violation").length;return{results:e,unusedImports:e.filter(i=>i.kind==="unused-import").length,architectureViolations:t,layerViolations:t,patternDeviations:e.filter(i=>i.kind==="pattern-deviation").length}}function k(e){let t=new Map;for(let i of e.keys()){let r=f.dirname(i),n=t.get(r);n||(n=[],t.set(r,n)),n.push(i)}return t}function I(e,t){let i=new Map;for(let r of t)for(let n of e.get(r)??[])d(n)||i.set(n,(i.get(n)??0)+1);return i}function _(e,t){let i=new Map;return $(e,i,t),i}function $(e,t,i){for(let r of F(e,i))b(e,t,r.from_file,r.to_file)}function F(e,t){let i=t?"AND d1.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d1 ON c.document_id = d1.id
@@ -15,4 +15,4 @@ import{c as S}from"./chunk-D5EKVZPI.js";import{c as m}from"./chunk-JVZNWJBH.js";
15
15
  AND m.role != 1
16
16
  ${e.pathExclusionsFor("d1","d2")}
17
17
  ${i}`,...r)}function w(e,t,i={}){new m(e).scanSourceReferences({paths:i.paths??g(e,{includeIgnored:!1}),includeRustAttributeNames:!0,identifierResolution:"permissive"},n=>{n.target.relativePath!==n.sourceFile&&(e.isIgnored(n.target.relativePath)||b(e,t,n.sourceFile,n.target.relativePath))})}function b(e,t,i,r){if(e.isIgnored(i)||e.isIgnored(r))return;let n=t.get(i);n||(n=new Set,t.set(i,n)),n.add(r)}function O(e){return e.includes("types")||e.endsWith(".d.ts")}function A(e,t,i){return y(e,t).filter(n=>n.sourcePath===i).some(n=>n.isUsed)}function C(e,t,i){return p(e,t).filter(n=>n.sourcePath===i).some(n=>n.used)}function M(e,t,i){let r=p(e,t).filter(n=>n.sourcePath===i);return r.length>0&&r.every(n=>n.isTypeOnly===!0)}function N(e){return e.endsWith(".vue")}function P(e,t,i){let r=p(e,t).filter(n=>n.sourcePath===i);return r.length===0?!1:r.every(n=>n.kind==="side-effect"||n.kind==="namespace"&&n.usedMembers.length===0&&!n.used)}function d(e){let t=h(e);return!!(t==="entry"||t==="barrel"||t==="test"||t==="worker"||T(f.basename(e)))}function T(e){return!!(e==="index.ts"||e==="index.js"||e==="cli.ts"||e==="main.ts"||e==="main.rs"||e.includes("worker.")||e.includes("postinstall.")||e==="health.ts"||e==="health.js")}export{W as a};
18
- //# sourceMappingURL=chunk-KTRGJLY7.js.map
18
+ //# sourceMappingURL=chunk-GY7CCCEZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as F}from"./chunk-5SE323LF.js";import{a as k,b as C,c as V,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{O as y}from"./chunk-AA7K3XLM.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=R(u,r=>r.tokens);return F({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=C(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return k({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return V([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
2
- //# sourceMappingURL=chunk-VNKYRJKN.js.map
1
+ import{a as R,b as F}from"./chunk-FGNCOQUX.js";import{a as k,b as C,c as V,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{P as y}from"./chunk-7JYHQAH2.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=R(u,r=>r.tokens);return F({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=C(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return k({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return V([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
2
+ //# sourceMappingURL=chunk-H7CG6LOE.js.map
@@ -0,0 +1,3 @@
1
+ import{b as m}from"./chunk-JHH5SCZ3.js";import{a as p}from"./chunk-SB25YMEQ.js";import{g as f,ia as d,ma as P,na as h}from"./chunk-AK3PYTIK.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-HCVJR2V4.js.map
@@ -0,0 +1,3 @@
1
+ import{M as T,P as g,R as h,S as m,T as d,U as p}from"./chunk-GH5YSGZL.js";var G=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function j(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let r=e;return r.version!==1||typeof r.pid!="number"||!Number.isSafeInteger(r.pid)||r.pid<=0||typeof r.platform!="string"||!G.has(r.platform)||typeof r.startToken!="string"||r.startToken.trim()===""?null:{version:1,pid:r.pid,platform:r.platform,startToken:r.startToken}}function f(e,r){return e.version===r.version&&e.pid===r.pid&&e.platform===r.platform&&e.startToken===r.startToken}import{execFileSync as K}from"child_process";import{platform as Y}from"os";var q=1e3,x=16*1024,P;function D(e,r=F){if(!Number.isSafeInteger(e)||e<=0)return null;let t=e===process.pid&&r===F;if(t&&P)return{...P};try{let i=z(e,r);if(!i)return null;let n={version:1,pid:e,platform:r.platform,startToken:i};return t&&(P=n),{...n}}catch{return null}}function z(e,r){if(r.platform==="linux"||r.platform==="android")return H(r.readFile(`/proc/${e}/stat`));if(r.platform==="win32"){let t=`([DateTimeOffset](Get-Process -Id ${e} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return I(r.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",t]))}return r.platform==="darwin"||r.platform==="freebsd"||r.platform==="openbsd"||r.platform==="netbsd"?I(r.run("ps",["-p",String(e),"-o","lstart="])):null}function H(e){let r=e.lastIndexOf(")");if(r<0)return null;let i=e.slice(r+1).trim().split(/\s+/)[19];return i&&/^\d+$/.test(i)?i:null}function I(e){let r=e.trim();return r===""?null:r}var F={platform:Y(),readFile(e){return T(e,{maxBytes:x,inputKind:"process identity pseudo-file"})},run(e,r){return K(e,[...r],{encoding:"utf8",timeout:q,maxBuffer:x,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function De(e){try{return process.kill(e,0),!0}catch(r){return typeof r=="object"&&r!==null&&"code"in r&&r.code==="EPERM"}}function Ee(){return performance.now()}import{randomUUID as re}from"crypto";import{closeSync as te,existsSync as ne,fsyncSync as ie,linkSync as oe,mkdirSync as se,openSync as ae,renameSync as le,unlinkSync as ce,writeSync as ue}from"fs";import{dirname as E}from"path";import{chmodSync as X,constants as V,copyFileSync as Q}from"fs";import{dirname as Z}from"path";var R=Object.freeze({...h,copyFile:(e,r)=>Q(e,r,V.COPYFILE_FICLONE),chmodFile:(e,r)=>X(e,r)});function ee(e,r,t={}){let i=t.runtime??R,n=Z(r),s=m(n,i);i.copyFile(e,r),t.mode!==void 0&&i.chmodFile(r,t.mode);let o=i.openFile(r,"r");try{i.syncFile(o)}finally{i.closeFile(o)}return p(s,d(n,i))}var M=Object.freeze({platform:process.platform,randomToken:()=>re(),pathExists:e=>ne(e),makeDirectory:e=>se(e,{recursive:!0}),openFile:(e,r,t)=>ae(e,r,t),writeFile:(e,r,t,i)=>ue(e,r,t,i),syncFile:e=>ie(e),closeFile:e=>te(e),renameFile:(e,r)=>le(e,r),linkFile:(e,r)=>oe(e,r),removeFile:e=>ce(e)});function S(e,r,t={}){let i=t.durability??"visibility",n=t.runtime??M,s=E(e),o=i==="durable"?m(s,n):(n.makeDirectory(s),"not-requested"),l=`${e}.tmp-${n.randomToken()}`,u=typeof r=="string"?Buffer.from(r):r,a,c=!1;try{a=n.openFile(l,"wx",t.mode??384),c=!0,g(a,u,n,"atomic file"),i==="durable"&&n.syncFile(a),n.closeFile(a),a=void 0,n.renameFile(l,e),c=!1;let b=i==="durable"?p(o,d(s,n)):"not-requested";return A(i,b)}finally{if(a!==void 0)try{n.closeFile(a)}catch{}if(c)try{n.removeFile(l)}catch{}}}function We(e,r,t={}){let i=t.durability??"visibility",n=t.runtime??M;if(!n.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let s=E(e),o=i==="durable"?m(s,n):(n.makeDirectory(s),"not-requested"),l=`${e}.tmp-${n.randomToken()}`,u=typeof r=="string"?Buffer.from(r):r,a,c=!1;try{a=n.openFile(l,"wx",t.mode??384),c=!0,g(a,u,n,"exclusive atomic file"),i==="durable"&&n.syncFile(a),n.closeFile(a),a=void 0,n.linkFile(l,e);let b=i==="durable"?d(s,n):"not-requested";n.removeFile(l),c=!1;let $=i==="durable"?p(o,b,d(s,n)):"not-requested";return A(i,$)}finally{if(a!==void 0)try{n.closeFile(a)}catch{}if(c)try{n.removeFile(l)}catch{}}}function A(e,r){return{requestedDurability:e,achievedDurability:e==="visibility"?"visibility":r==="synced"?"directory-durable":"file-flushed",directorySync:r}}function je(e,r,t={}){S(e,v(r,t),{durability:"visibility",runtime:t.runtime})}function Ke(e,r,t={}){return S(e,v(r,t),{durability:"durable",runtime:t.runtime})}function v(e,r){let t=JSON.stringify(e,null,r.spacing);return r.trailingNewline?`${t}
2
+ `:t}import{execFileSync as O,spawnSync as ze}from"child_process";import{platform as de}from"os";import{resolve as me}from"path";var k=de()==="win32";function Ve(e){let r=k?"where":"which";try{return O(r,[e],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}),!0}catch{return!1}}var pe=/\.(?:c|m)?js$/i,fe=/\.(?:exe|com)$/i;function Qe(e,r){return pe.test(e)?{binary:process.execPath,args:[e,...r]}:{binary:e,args:[...r]}}function ye(e,r){return O(e,r,{stdio:["ignore","pipe","ignore"],encoding:"utf8",timeout:1e4,killSignal:"SIGKILL"})}function Ze(e,r={}){let t=r.isWindows??k,i=r.lookup??ye,n;try{n=i(t?"where":"which",[e])}catch{return null}let s=n.split(/\r?\n/).map(o=>o.trim()).filter(Boolean);if(!t){let o=s[0];return o?me(o):null}return s.find(o=>fe.test(o))??null}import{execFileSync as C}from"child_process";import{platform as be}from"os";var L=1e3,B=2*1024*1024,ge=25;function ir(e,r,t=U){let i=t.readIdentity(e),n=new Map;return i&&n.set(e,i),{rootPid:e,rootIdentity:i,ownsProcessGroup:r,knownMembers:n}}async function or(e,r,t=U){if(!e.rootIdentity){let u=await y(e,r.gracefulMs+r.forceMs,t);return{reaped:u,reason:u?"terminated":"identity-unavailable",detail:u?void 0:`Could not establish the birth identity of process ${e.rootPid}.`}}let i=W(e,t);if(i==="mismatch")return{reaped:!1,reason:"identity-mismatch",detail:`Process ${e.rootPid} no longer has the identity owned by this runner.`};if(i==="exited"&&!J(e,t))return{reaped:!0,reason:"terminated"};if(t.platform==="win32"){try{t.terminateWindowsTree(e.rootPid)}catch(a){let c=await y(e,r.forceMs,t);return{reaped:c,reason:c?"terminated":"signal-failed",detail:c?void 0:w(a)}}let u=await y(e,r.forceMs,t);return{reaped:u,reason:u?"terminated":"deadline"}}let n=N(e,"SIGTERM",t);if(await y(e,r.gracefulMs,t))return{reaped:!0,reason:"terminated"};let o=N(e,"SIGKILL",t);return await y(e,r.forceMs,t)?{reaped:!0,reason:"terminated"}:o?{reaped:!1,reason:o.reason,detail:o.detail}:n?{reaped:!1,reason:n.reason,detail:n.detail}:{reaped:!1,reason:"deadline",detail:`Process tree ${e.rootPid} did not exit before its termination deadline.`}}function W(e,r){let t=r.readIdentity(e.rootPid);if(!t)return"exited";if(!e.rootIdentity||!f(e.rootIdentity,t))return"mismatch";e.knownMembers.set(e.rootPid,t);for(let i of r.listDescendantPids(e.rootPid)){let n=r.readIdentity(i);n&&e.knownMembers.set(i,n)}return"owned"}function N(e,r,t){let i=W(e,t);if(i==="mismatch")return{reason:"identity-mismatch",detail:`Process ${e.rootPid} changed identity before ${r}.`};if(i==="owned"&&e.ownsProcessGroup)try{return t.signal(-e.rootPid,r),null}catch(s){if(!_(s))return{reason:"signal-failed",detail:w(s)}}let n=null;for(let s of e.knownMembers.values()){let o=t.readIdentity(s.pid);if(!(!o||!f(s,o)))try{t.signal(s.pid,r)}catch(l){!_(l)&&n===null&&(n=w(l))}}return n===null?null:{reason:"signal-failed",detail:n}}async function y(e,r,t){let i=t.now()+r;for(;J(e,t);){if(t.now()>=i)return!1;await t.sleep(Math.min(ge,Math.max(1,i-t.now())))}return!0}function J(e,r){if(!e.rootIdentity&&r.isProcessAlive(e.rootPid))return!0;for(let t of e.knownMembers.values()){let i=r.readIdentity(t.pid);if(i&&f(t,i))return!0}return!!(e.ownsProcessGroup&&r.isProcessGroupAlive(e.rootPid))}function Pe(e){let r=Se(!1),t=new Map;for(let o of r.split(/\r?\n/)){let l=/^\s*(\d+)\s+(\d+)\s*$/.exec(o);if(!l)continue;let u=Number(l[1]),a=Number(l[2]),c=t.get(a)??[];c.push(u),t.set(a,c)}let i=[],n=[...t.get(e)??[]],s=new Set;for(;n.length>0;){let o=n.pop();s.has(o)||(s.add(o),i.push(o),n.push(...t.get(o)??[]))}return i}function Se(e){return C("ps",["-axo",e?"pid=,ppid=,rss=":"pid=,ppid="],{encoding:"utf8",timeout:L,maxBuffer:B,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}function _(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ESRCH"}function w(e){return e instanceof Error?e.message:String(e)}var U={platform:be(),now:Date.now,readIdentity:D,isProcessAlive(e){try{return process.kill(e,0),!0}catch(r){return typeof r=="object"&&r!==null&&"code"in r&&r.code==="EPERM"}},isProcessGroupAlive(e){if(this.platform==="win32")return!1;try{return process.kill(-e,0),!0}catch(r){return typeof r=="object"&&r!==null&&"code"in r&&r.code==="EPERM"}},listDescendantPids(e){if(this.platform==="win32")return[];try{return Pe(e)}catch{return[]}},signal(e,r){process.kill(e,r)},terminateWindowsTree(e){C("taskkill.exe",["/PID",String(e),"/T","/F"],{timeout:L,maxBuffer:B,stdio:"ignore",windowsHide:!0})},async sleep(e){await new Promise(r=>setTimeout(r,e))}};export{j as a,f as b,D as c,De as d,Ee as e,ee as f,S as g,We as h,je as i,Ke as j,Ve as k,Qe as l,Ze as m,ir as n,or as o};
3
+ //# sourceMappingURL=chunk-HG722PO7.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-LXLD46LH.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
- //# sourceMappingURL=chunk-LHTT5C3Z.js.map
1
+ import{c as t}from"./chunk-2OXVP5U5.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
+ //# sourceMappingURL=chunk-HISEUIL2.js.map
@@ -1,3 +1,3 @@
1
- import{a as d}from"./chunk-ILMHV3KM.js";import{a as A,b as T,c as v,g as P,j as R}from"./chunk-DHKBIOXF.js";import{d as g,e as L,f as p,g as M,h as k}from"./chunk-T6FRID7Y.js";import{da as I,ea as z}from"./chunk-4DCKBY6T.js";import c from"process";import{existsSync as _}from"fs";import{dirname as h,join as J,resolve as b,sep as N}from"path";import{fileURLToPath as K}from"url";async function G(e){let n=e.includeReferences!==!1,r=e.includeCallees===!0,t=e.includeSignatures===!0,s={timeoutMs:e.requestTimeoutMs},o=Q(e),a=W(e),l=H(e),f=j(e),C=re(e.projectRoot,o),x=te(e.projectRoot,C),w=ne(C),u=new T(v(e.rustAnalyzerBinary,x),{requestTimeoutMs:e.requestTimeoutMs,configuration:w});try{let y=await u.initialize({processId:c.pid,rootUri:g(x,"."),capabilities:{textDocument:{references:{dynamicRegistration:!1},callHierarchy:{dynamicRegistration:!1},hover:{dynamicRegistration:!1}}},initializationOptions:w});if(n&&!y.capabilities.referencesProvider)return{available:!1,reason:"rust-analyzer initialized without textDocument/references support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{}};if(r&&!y.capabilities.callHierarchyProvider)return{available:!1,reason:"rust-analyzer initialized without call hierarchy support.",references:a.map(i=>[i.symbolId,[]]),callees:l.map(i=>[i.symbolId,[]]),...t?{signatures:f.map(i=>[i.symbolId,null])}:{}};if(t&&!y.capabilities.hoverProvider)return{available:!1,reason:"rust-analyzer initialized without hover support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{},signatures:f.map(i=>[i.symbolId,null])};let $=ie(u,e.projectRoot,o);await se(u,$,e.diagnosticsTimeoutMs??1e4),await R(e.settleDelayMs??5e3);let S=n?await d(a,e.concurrency??8,async i=>{let D=await E(u,p(e.projectRoot,i,!1),{requestTimeoutMs:e.requestTimeoutMs,retryTimeoutMs:e.referenceRetryTimeoutMs});return{symbolId:i.symbolId,references:k(M(e.projectRoot,D.locations)),complete:D.complete}}):a.map(i=>({symbolId:i.symbolId,references:[],complete:!0})),B=r?await d(l,e.concurrency??8,async i=>({symbolId:i.symbolId,callees:await ae(u,e.projectRoot,i,s)})):[],U=t?await d(f,e.concurrency??8,async i=>({symbolId:i.symbolId,signature:await V(u,e.projectRoot,i,s)})):[];return{available:!0,references:S.filter(i=>i.complete).map(i=>[i.symbolId,i.references]),incompleteReferenceSymbolIds:S.filter(i=>!i.complete).map(i=>i.symbolId),...r?{callees:B.map(i=>[i.symbolId,i.callees])}:{},...t?{signatures:U.map(i=>[i.symbolId,i.signature])}:{}}}finally{await u.shutdown().catch(()=>{})}}function W(e){return e.referenceDefinitions??e.definitions}function H(e){return e.calleeDefinitions??e.definitions}function j(e){return e.signatureDefinitions??e.definitions}function Q(e){return[...e.includeReferences!==!1?W(e):[],...e.includeCallees===!0?H(e):[],...e.includeSignatures===!0?j(e):[]]}async function V(e,n,r,t={}){let s=p(n,r,!1),o=await X(e,{textDocument:s.textDocument,position:s.position},t);return Y(o)}async function X(e,n,r={}){try{return await e.hover(n,r)}catch(t){if(m(t),!(t instanceof Error?t.message:String(t)).includes("content modified"))return null;await F(r.deadlineMs);try{return await e.hover(n,r)}catch(o){return m(o),null}}}function Y(e){if(!e)return null;let n=Z(e.contents),r=/```(?:rust)?\s*([\s\S]*?)```/i.exec(n),t=r?r[1]:n;for(let s of t.split(/\r?\n/)){let o=s.replace(/^`+|`+$/g,"").trim();if(o&&ee(o))return o}return null}function Z(e){return typeof e=="string"?e:Array.isArray(e)?e.map(q).join(`
1
+ import{a as d}from"./chunk-ILMHV3KM.js";import{a as A,b as T,c as v,g as P,j as R}from"./chunk-KQHJEU6V.js";import{d as g,e as L,f as p,g as M,h as k}from"./chunk-HCVJR2V4.js";import{ma as I,na as z}from"./chunk-AK3PYTIK.js";import c from"process";import{existsSync as _}from"fs";import{dirname as h,join as J,resolve as b,sep as N}from"path";import{fileURLToPath as K}from"url";async function G(e){let n=e.includeReferences!==!1,r=e.includeCallees===!0,t=e.includeSignatures===!0,s={timeoutMs:e.requestTimeoutMs},o=Q(e),a=W(e),l=H(e),f=j(e),C=re(e.projectRoot,o),x=te(e.projectRoot,C),w=ne(C),u=new T(v(e.rustAnalyzerBinary,x),{requestTimeoutMs:e.requestTimeoutMs,configuration:w});try{let y=await u.initialize({processId:c.pid,rootUri:g(x,"."),capabilities:{textDocument:{references:{dynamicRegistration:!1},callHierarchy:{dynamicRegistration:!1},hover:{dynamicRegistration:!1}}},initializationOptions:w});if(n&&!y.capabilities.referencesProvider)return{available:!1,reason:"rust-analyzer initialized without textDocument/references support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{}};if(r&&!y.capabilities.callHierarchyProvider)return{available:!1,reason:"rust-analyzer initialized without call hierarchy support.",references:a.map(i=>[i.symbolId,[]]),callees:l.map(i=>[i.symbolId,[]]),...t?{signatures:f.map(i=>[i.symbolId,null])}:{}};if(t&&!y.capabilities.hoverProvider)return{available:!1,reason:"rust-analyzer initialized without hover support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{},signatures:f.map(i=>[i.symbolId,null])};let $=ie(u,e.projectRoot,o);await se(u,$,e.diagnosticsTimeoutMs??1e4),await R(e.settleDelayMs??5e3);let S=n?await d(a,e.concurrency??8,async i=>{let D=await E(u,p(e.projectRoot,i,!1),{requestTimeoutMs:e.requestTimeoutMs,retryTimeoutMs:e.referenceRetryTimeoutMs});return{symbolId:i.symbolId,references:k(M(e.projectRoot,D.locations)),complete:D.complete}}):a.map(i=>({symbolId:i.symbolId,references:[],complete:!0})),B=r?await d(l,e.concurrency??8,async i=>({symbolId:i.symbolId,callees:await ae(u,e.projectRoot,i,s)})):[],U=t?await d(f,e.concurrency??8,async i=>({symbolId:i.symbolId,signature:await V(u,e.projectRoot,i,s)})):[];return{available:!0,references:S.filter(i=>i.complete).map(i=>[i.symbolId,i.references]),incompleteReferenceSymbolIds:S.filter(i=>!i.complete).map(i=>i.symbolId),...r?{callees:B.map(i=>[i.symbolId,i.callees])}:{},...t?{signatures:U.map(i=>[i.symbolId,i.signature])}:{}}}finally{await u.shutdown().catch(()=>{})}}function W(e){return e.referenceDefinitions??e.definitions}function H(e){return e.calleeDefinitions??e.definitions}function j(e){return e.signatureDefinitions??e.definitions}function Q(e){return[...e.includeReferences!==!1?W(e):[],...e.includeCallees===!0?H(e):[],...e.includeSignatures===!0?j(e):[]]}async function V(e,n,r,t={}){let s=p(n,r,!1),o=await X(e,{textDocument:s.textDocument,position:s.position},t);return Y(o)}async function X(e,n,r={}){try{return await e.hover(n,r)}catch(t){if(m(t),!(t instanceof Error?t.message:String(t)).includes("content modified"))return null;await F(r.deadlineMs);try{return await e.hover(n,r)}catch(o){return m(o),null}}}function Y(e){if(!e)return null;let n=Z(e.contents),r=/```(?:rust)?\s*([\s\S]*?)```/i.exec(n),t=r?r[1]:n;for(let s of t.split(/\r?\n/)){let o=s.replace(/^`+|`+$/g,"").trim();if(o&&ee(o))return o}return null}function Z(e){return typeof e=="string"?e:Array.isArray(e)?e.map(q).join(`
2
2
  `):"value"in e?e.value:""}function q(e){return typeof e=="string"?e:e.value}function ee(e){return/^(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?(?:const\s+)?(?:unsafe\s+)?(?:extern\s+(?:"[^"]+"\s+)?)?(?:fn|struct|enum|trait|type|const|static|mod)\b/.test(e)}function ne(e){return{...e.length>0?{linkedProjects:e}:{},references:{excludeImports:!1,excludeTests:!1}}}function te(e,n){return n.length===1?h(n[0]):b(e)}function re(e,n){let r=b(e),t=[],s=new Set;for(let o of n){let a=h(b(r,o.relativePath));for(;me(r,a);){let l=J(a,"Cargo.toml");if(_(l)){s.has(l)||(s.add(l),t.push(l));break}let f=h(a);if(f===a)break;a=f}}return t}function ie(e,n,r){let t=new Set,s=[];for(let o of r)if(!t.has(o.relativePath)){t.add(o.relativePath);try{let a=g(n,o.relativePath);e.didOpenTextDocument({uri:a,languageId:"rust",version:1,text:I(n,o.relativePath,{inputKind:"indexed Rust source file"})}),s.push(a)}catch(a){if(!z(a))throw a}}return s}async function se(e,n,r){await Promise.all(n.map(t=>e.waitForDiagnostics(t,r).catch(()=>!1)))}async function De(e,n){return(await E(e,n)).locations}async function E(e,n,r={}){try{return{locations:await e.references(n,{timeoutMs:r.requestTimeoutMs,deadlineMs:r.deadlineMs}),complete:!0}}catch(t){m(t);let s=t instanceof Error?t.message:String(t);if(O(t))return{locations:[],complete:!1};if(!s.includes("content modified"))return{locations:[],complete:!0};await F(r.deadlineMs);try{return{locations:await e.references(n,oe(r)),complete:!0}}catch(o){return m(o),{locations:[],complete:!O(o)}}}}function oe(e){return{...e.retryTimeoutMs&&e.retryTimeoutMs>0?{timeoutMs:e.retryTimeoutMs}:{},...e.deadlineMs!==void 0?{deadlineMs:e.deadlineMs}:{}}}function O(e){let n=e instanceof Error?e.message:String(e);return n.includes("rust-analyzer LSP request")&&n.includes("timed out after")}async function ae(e,n,r,t={}){let s=p(n,r,!1),o=await le(e,{textDocument:s.textDocument,position:s.position},t),a=(await Promise.all(o.map(l=>ce(e,l,t)))).flat();return fe(ue(n,a))}async function le(e,n,r={}){try{return await e.prepareCallHierarchy(n,r)}catch(t){return m(t),[]}}async function ce(e,n,r={}){try{return await e.outgoingCalls(n,r)}catch(t){return m(t),[]}}async function F(e){if(e===void 0){await R(1e3);return}await P(1e3,e)}function m(e){if(e instanceof A)throw e}function ue(e,n){return n.map(r=>({symbol:r.to.name,file:L(e,r.to.uri),line:r.to.selectionRange.start.line,...r.fromRanges[0]===void 0?{}:{callsiteLine:r.fromRanges[0].start.line}}))}function fe(e){let n=new Set,r=[];for(let t of e){let s=`${t.symbol}\0${t.file}\0${t.line}\0${t.callsiteLine??""}`;n.has(s)||(n.add(s),r.push(t))}return r.sort((t,s)=>t.file.localeCompare(s.file)||t.line-s.line||t.symbol.localeCompare(s.symbol))}function me(e,n){return n===e||n.startsWith(`${e}${N}`)}async function de(){return new Promise((e,n)=>{let r=[];c.stdin.on("data",t=>r.push(t)),c.stdin.on("error",n),c.stdin.on("end",()=>e(Buffer.concat(r).toString("utf8")))})}async function pe(){try{let e=JSON.parse(await de()),n=await G(e);c.stdout.write(JSON.stringify(n))}catch(e){let n={available:!1,reason:e instanceof Error?e.message:String(e),references:[]};c.stdout.write(JSON.stringify(n)),c.exitCode=1}}c.argv[1]&&K(import.meta.url)===c.argv[1]&&pe();export{G as a,W as b,H as c,j as d,Q as e,V as f,X as g,Y as h,ne as i,te as j,re as k,ie as l,se as m,De as n,E as o,ae as p};
3
- //# sourceMappingURL=chunk-K5MZYZV7.js.map
3
+ //# sourceMappingURL=chunk-HXOU4XNH.js.map
@@ -0,0 +1,6 @@
1
+ import{a as ie}from"./chunk-GIQ6CSL4.js";import{a as oe}from"./chunk-AZS7YPCB.js";import{b as D}from"./chunk-BDGTPN27.js";import{a as te}from"./chunk-UT7TADJX.js";import{b as ne}from"./chunk-XGGBK66W.js";import{a as W,b as ee}from"./chunk-GVOMSPGL.js";import{b as Q}from"./chunk-ZGW4HLPD.js";import{f as V}from"./chunk-QLBSG7U5.js";import{a as H}from"./chunk-XSWYJCAK.js";import{a as q}from"./chunk-2KVU55CW.js";import{b as Y}from"./chunk-PXXYQK55.js";import{a as X}from"./chunk-ISWFRGJ6.js";import{d as Z}from"./chunk-WHADK6OS.js";import{b as K}from"./chunk-ERCYGVAM.js";import{a as J}from"./chunk-RPL3ARU7.js";import{a as w}from"./chunk-6VEFRPTD.js";import{a as G}from"./chunk-BUTEIZKP.js";import{a as j,c as z}from"./chunk-5H5WTJSD.js";import{b as $}from"./chunk-Q6T2CAJL.js";import{e as P,t as A}from"./chunk-TD7VKJ2Y.js";import{t as U}from"./chunk-Q7GBK5T7.js";function se(n){let e=new Set(n.filter(o=>o.definition?.isFunctionLike).map(o=>`${o.role}:${o.definition.relativePath}`));return n.flatMap(o=>o.definition?!o.definition.isFunctionLike&&e.has(`${o.role}:${o.definition.relativePath}`)?[]:[{definition:o.definition,role:o.role}]:[])}var me=6,I=10,M=3,T=8,de=.7,re=24,_=200,fe=12,le=80,ce=600;function Ze(n,e,o={}){let l=o.impactDepth??3,a=o.sliceDepth??3,u=o.semantic,c=Ee(e)?Ce(n,e):null,S=c?c.primary?.symbol??null:e,{traceResult:r,callGraphResult:C,complexityResult:R,dataflowResult:t,backwardSliceResult:d,forwardSliceResult:s,affectedResults:p,reuseCandidates:b,targetSymbol:i,affectedConsumerReuse:y}=ye(n,S,o,l,a),h=f("change-surface",e,()=>q(n,e,{semantic:u}),m=>({symbols:m?.symbols.length??0,externalConsumers:m?.totalExternalConsumers??0})),x=f("system",e,()=>oe(n,e),m=>({files:m.files.length,symbols:m.symbols.length})),L=x.files.length===1,B=f("deps",e,()=>L?x.dependsOn.map(m=>({relativePath:m,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):W(n,e),m=>({files:m.length,reusedSystem:L})),k=f("rdeps",e,()=>L?x.dependedOnBy.map(m=>({relativePath:m,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):ee(n,e),m=>({files:m.length,reusedSystem:L})),N=f("surface",e,()=>ie(n,e),m=>({consumers:m.length})),g={symbol:r.definitions.length>0||r.referencedBy.length>0||C!==null||R!==null||t!==null||d!==null||s!==null||p.length>0,file:h!==null||B.length>0||k.length>0,module:x.files.length>0||x.symbols.length>0||N.length>0},E=[];c&&!c.primary&&c.callableCount>1&&E.push(`File target has ${c.callableCount} callable symbols; use one callable name for compiler-resolved flow.`);let F=[...new Set(r.referencedBy.map(m=>m.relativePath))];F.length>0&&F.every(m=>$(m)==="test")&&E.push("Only test references were found for this target. For replacement or retirement work, map the currently wired owner or one production entry point before planning; this target does not describe the live affected surface."),!g.symbol&&!g.file&&!g.module&&E.push("No symbol, file, or module matched target.");let O=h?.file??r.definitions[0]?.relativePath??null;return{target:e,...c?.primary?{primaryCallable:{symbol:c.primary.symbol,shortName:P(c.primary.symbol),file:c.primary.relativePath}}:{},matched:g,history:f("history",O??e,()=>ge(n,O,o.gitHead)),trace:pe(r),callGraph:C,complexity:R,dataflow:t,backwardSlice:d,forwardSlice:s,affected:p,changeSurface:h,deps:B,rdeps:k,system:x,surface:N,reuseCandidates:b,affectedConsumerReuse:y,sourcePacket:be(n,i,r,y,b),warnings:E}}function ye(n,e,o,l,a){let u=o.semantic,c=e?f("trace",e,()=>ne(n,e,{semantic:u,referenceContext:fe}),i=>({definitions:i.definitions.length,references:i.referencedBy.length})):{definitions:[],referencedBy:[],claimSupport:null},S=e?f("call-graph",e,()=>H(n,e,{semantic:u}),i=>({callers:i?.callers.length??0,callees:i?.callees.length??0})):null,r=e?f("complexity",e,()=>J(n,e,{semantic:u}),i=>({callees:i?.calleeCount??0})):null,C=e?f("dataflow",e,()=>Q(n,e,{semantic:u}),i=>({references:i?.usageSites.length??0,producers:i?.producers.length??0,consumers:i?.consumers.length??0})):null,R=e?f("backward-slice",e,()=>D(n,e,{direction:"backward",maxDepth:a,semantic:u}),i=>({maxDepth:a,connectedSymbols:i?.connectedSymbols.length??0})):null,t=e?f("forward-slice",e,()=>D(n,e,{direction:"forward",maxDepth:a,semantic:u}),i=>({maxDepth:a,connectedSymbols:i?.connectedSymbols.length??0})):null,d=e?f("affected",e,()=>G(n,e,{maxDepth:l,scope:o.scope}),i=>({maxDepth:l,affectedSymbols:i.length})):[],s=e?f("reuse-candidates",e,()=>w(n,e,{minSimilarity:.4,limit:5,semantic:u,sourceCandidateMode:"target-pruned"}),i=>({candidates:i.length,direct:i.filter(y=>y.actionTier==="direct").length})):[],p=e?j(n,e)?.symbol??null:null,b=e?f("affected-consumer-reuse",e,()=>Se(c,p,i=>w(n,i,{minSimilarity:.4,limit:I,semantic:u,sourceCandidateMode:"target-pruned"}),{consumerLimit:me,perConsumerSearchLimit:I,perConsumerCandidateLimit:M,candidateLimit:T}),i=>({totalConsumers:i.coverage.totalConsumers,analyzedConsumers:i.coverage.analyzedConsumers,candidates:i.candidates.length})):Le();return{traceResult:c,callGraphResult:S,complexityResult:r,dataflowResult:C,backwardSliceResult:R,forwardSliceResult:t,affectedResults:d,reuseCandidates:s,targetSymbol:p,affectedConsumerReuse:b}}function pe(n){return{definitions:n.definitions,referencedBy:n.referencedBy.map(e=>({relativePath:e.relativePath,line:e.line,enclosingSymbol:e.enclosingSymbol,enclosingShort:e.enclosingShort}))}}function Ce(n,e){let o=K(n,e);if(o.length!==1)return{primary:null,callableCount:0};let l=A(n,o[0]).filter(c=>c.isFunctionLike),a=l.filter(c=>c.enclosingSymbol===null),u=a.length>0?a:l;return{primary:u.length===1?u[0]:null,callableCount:u.length}}function be(n,e,o,l,a){let u=[...e?[{definition:ae(n,e),role:"target"}]:[],...[...l.candidates.map(t=>t.candidate),...a].map(t=>({definition:ae(n,t.symbolB),role:"reuse-candidate"}))],c=new Map;for(let t of se(u)){if(c.has(t.definition.symbol))continue;let d=t.role==="target"?_:le,s=t.definition.endLine<=t.definition.startLine?Z(n,t.definition.relativePath,t.definition.startLine,d):null,p=s?.unitType?s.source:V(n,t.definition);if(!p)continue;let b=p.split(`
2
+ `),i=Math.min(b.length,d),y=s?.unitType?s.startLine:t.definition.startLine;c.set(t.definition.symbol,{role:t.role,symbol:t.definition.symbol,shortName:P(t.definition.symbol),file:t.definition.relativePath,startLine:y,endLine:y+i-1,source:b.slice(0,i).join(`
3
+ `),omittedLines:(s?.unitType?s.omittedLines:0)+Math.max(0,b.length-i)})}let S=new Map;for(let t of o.referencedBy){if(t.source===void 0||t.source===null||t.sourceStartLine===void 0||t.sourceStartLine===null||t.sourceEndLine===void 0||t.sourceEndLine===null)continue;let d=`${t.relativePath}:${t.sourceStartLine}-${t.sourceEndLine}`,s=S.get(d);if(s){s.focusLines=[...new Set([...s.focusLines??[],t.line])].sort((p,b)=>p-b);continue}S.set(d,{role:"consumer",symbol:t.enclosingSymbol??`${t.relativePath}:${t.line}`,shortName:t.enclosingShort,file:t.relativePath,startLine:t.sourceStartLine,endLine:t.sourceEndLine,source:t.source,omittedLines:0,focusLines:[t.line]})}let r=[...[...c.values()].filter(t=>t.role==="target"),...S.values(),...[...c.values()].filter(t=>t.role==="reuse-candidate")],C=[],R=ce;for(let t of r){if(C.length>=re||R<=0)break;let d=t.source.split(`
4
+ `),s=Math.min(d.length,R);C.push({...t,endLine:t.startLine+s-1,source:d.slice(0,s).join(`
5
+ `),omittedLines:t.omittedLines+Math.max(0,d.length-s),...t.focusLines?{focusLines:t.focusLines.filter(p=>p<=t.startLine+s-1)}:{}}),R-=s}return{slices:C,candidateSlices:r.length,omittedSlices:Math.max(0,r.length-C.length),maxSlices:re,maxLinesPerSlice:_,maxTotalLines:ce,targetLineLimit:_,consumerContextLines:fe,reuseLineLimit:le}}function ae(n,e){let o=z(n,e);return o?A(n,o.relativePath).find(l=>l.symbol===e)??null:null}function Se(n,e,o,l={}){let a=v(l.consumerLimit,me),u=v(l.perConsumerSearchLimit,I),c=v(l.perConsumerCandidateLimit,M),S=v(l.candidateLimit,T),r=Re(n),C=r.slice(0,a),R=new Set(r.map(s=>s.symbol));e&&R.add(e);let t=new Map;for(let s of C){let p=o(s.symbol).slice(0,u),b=0;for(let i of p){let y=he(i,s.symbol);if(!y||R.has(y.symbolB))continue;let h=t.get(y.symbolB);if(h?(h.consumers.some(x=>x.symbol===s.symbol)||h.consumers.push(s),y.similarity>h.candidate.similarity&&(h.candidate=y)):t.set(y.symbolB,{candidate:y,consumers:[s]}),b+=1,b>=c)break}}let d=[...t.values()].filter(s=>s.candidate.actionTier==="direct"||s.candidate.similarity>=de||s.consumers.length>1).sort(xe).slice(0,S);return{candidates:d,coverage:{totalConsumers:r.length,analyzedConsumers:C.length,omittedConsumers:Math.max(0,r.length-C.length),perConsumerSearchLimit:u,perConsumerCandidateLimit:c,candidateLimit:S,returnedCandidates:d.length}}}function Re(n){let e=new Map;for(let o of n.referencedBy){if(!o.enclosingSymbol)continue;let l=e.get(o.enclosingSymbol);if(l){l.referenceCount+=1;continue}e.set(o.enclosingSymbol,{symbol:o.enclosingSymbol,shortName:P(o.enclosingSymbol)||o.enclosingShort,file:o.relativePath,referenceCount:1})}return[...e.values()].sort((o,l)=>l.referenceCount-o.referenceCount||o.symbol.localeCompare(l.symbol))}function he(n,e){return n.symbolA===e?n:n.symbolB!==e?null:{...n,symbolA:n.symbolB,shortNameA:n.shortNameB,fileA:n.fileB,symbolB:n.symbolA,shortNameB:n.shortNameA,fileB:n.fileA,uniqueToA:n.uniqueToB,uniqueToB:n.uniqueToA}}function xe(n,e){let o=ue(e.candidate.actionTier)-ue(n.candidate.actionTier);if(o!==0)return o;let l=e.consumers.length-n.consumers.length;if(l!==0)return l;let a=e.candidate.similarity-n.candidate.similarity;return a!==0?a:n.candidate.symbolB.localeCompare(e.candidate.symbolB)}function ue(n){return n==="direct"?1:0}function v(n,e){return typeof n=="number"&&Number.isFinite(n)?Math.max(1,Math.floor(n)):e}function Le(){return{candidates:[],coverage:{totalConsumers:0,analyzedConsumers:0,omittedConsumers:0,perConsumerSearchLimit:I,perConsumerCandidateLimit:M,candidateLimit:T,returnedCandidates:0}}}function f(n,e,o,l=()=>({})){let a;return U(`context.${n}`,()=>(a=o(),a),()=>({target:e,...l(a)}))}function ge(n,e,o){let l={available:!1,file:e,churn:null,coChangePartners:[],suppressionsInFile:0};if(!e)return l;let a=X(n,o?{head:o}:{}),u=f("history.churn",e,()=>a.fileChurn(),r=>({files:r?.size??0}));if(!u)return l;let c=f("history.co-change",e,()=>Y(n,e,{limit:5,...o?{head:o}:{}}),r=>({commits:r.commitsAnalyzed,partners:r.findings.length})),S=f("history.suppressions",e,()=>te(n).byFile.get(e)??0,r=>({suppressions:r}));return{available:!0,file:e,churn:u.get(e)??{changes:0,fixChanges:0,lastChangedAt:0},coChangePartners:c.findings.map(r=>({file:r.fileA===e?r.fileB:r.fileA,together:r.together,confidence:r.confidence,subjectContext:r.subjectContext})),suppressionsInFile:S}}function Ee(n){return n.includes("/")||n.includes("\\")||/\.[A-Za-z0-9]+(?::\d+(?:-\d+)?)?$/.test(n)}export{Ze as a,Se as b};
6
+ //# sourceMappingURL=chunk-I6UTXNHU.js.map
@@ -1,2 +1,2 @@
1
- import{a as F,b as A}from"./chunk-CA5RE6H7.js";import{c as C}from"./chunk-JVZNWJBH.js";import{a as k}from"./chunk-LPGDO2XA.js";import{d as S}from"./chunk-5IZTXSOL.js";import{a as y}from"./chunk-AA7K3XLM.js";import{b as p}from"./chunk-MO226P4Q.js";import{posix as h}from"path";var _=20,G=1,O=new Map([["app","app"],["apps","app"],["component","component"],["components","component"],["composable","composable"],["composables","composable"],["contract","contract"],["contracts","contract"],["domain","domain"],["domains","domain"],["feature","feature"],["features","feature"],["hook","hook"],["hooks","hook"],["lib","library"],["module","module"],["modules","module"],["package","package"],["packages","package"],["page","page"],["pages","page"],["route","route"],["routes","route"],["screen","screen"],["screens","screen"],["service","service"],["services","service"],["shared","shared"],["src","source-root"],["store","state"],["stores","state"],["test","test"],["tests","test"],["util","utility"],["utils","utility"],["view","view"],["views","view"]]),q=new Set(["components","contracts","hooks","lib","services","shared","stores","utils"]),Y=new Set(["access","api","auth","config","db","effect","errors","hooks","lib","middleware","permissions","routes","schemas","servicetasks","services","startup","store","stores","test-utils","repository","repositories","tests","types","ui","utils","workflow","workflows"]);function Ce(e,n={}){let t=L(n.limit,_),i=L(n.minConsumers,G),r=new C(e),s=r.fileDependencyGraph(n.scope),o=ge(y(e,{includeIgnored:!1})),a=pe(e.config.locality?.architecturalBoundarySegments,n.architecturalBoundarySegments);return(n.target?K(e,r,n.target):J(e,n.scope,n.scanLimit)).map(c=>Q(e,r,s,c,n,o,a)).filter(c=>c.consumerFiles.length>=i||n.target).sort(me).slice(0,t)}function K(e,n,t){let i=Z(e,t);if(i)return[I(i)];let r=k(e,t);if(!r)return[];let s=n.definitionsForFile(r.relativePath).find(o=>o.symbolId===r.symbolId);return s?[ee(s)]:[{unit:{kind:"symbol",file:r.relativePath,shortName:S(r.symbol),symbol:r.symbol,startLine:r.startLine,endLine:r.endLine}}]}function J(e,n,t){let i=y(e,{scope:n,includeIgnored:!1}),r=L(t,i.length);return i.slice(0,r).map(s=>I(s))}function Q(e,n,t,i,r,s,o){let a=i.definition?V(e,n,i.definition,r.semantic):X(t,i.unit.file),d=i.definition?a.length>0?"exact":"none":a.length>0?"file-level":"none",f=i.unit.file,c=l(h.dirname(f)),u=te(a),B=ne(c),W=w([...T(c),...u?T(u):[]]),b=ie(i.unit,c,u,a),g=re(b,i.unit,c,u,a,s,o),j=le(i.unit,d,u,a,c,g.whyNoSuggestedHome),z=ue(i.unit,c,u,a,g.suggestedHome,g.whyNoSuggestedHome);return{actionTier:"signal",sourceUnit:i.unit,candidatePath:f,currentDirectory:c,directoryAncestry:B,consumerFiles:a,consumerCoverage:d,nearestCommonOwner:u,boundaryMarkers:W,recommendedTier:b,suggestedHome:g.suggestedHome,destinationConfidence:g.confidence,whyNoSuggestedHome:g.whyNoSuggestedHome,counterevidence:j,reasons:z,recommendation:de(b,g.suggestedHome,d)}}function V(e,n,t,i){let r=A(F(e,n).forDefinitions([t],{semantic:i!==!1,sourceFallback:!0}));return E(r.get(t.symbolId)??[])}function X(e,n){let t=[];for(let[i,r]of e.entries())i!==n&&r.has(n)&&t.push(i);return E(t)}function Z(e,n){let t=p(n),i=y(e,{includeIgnored:!1}),r=i.find(o=>o===t);if(r)return r;let s=i.find(o=>o.endsWith(`/${t}`));return s||(i.find(o=>o.includes(t))??null)}function ee(e){return{definition:e,unit:{kind:"symbol",file:e.relativePath,shortName:S(e.symbol),symbol:e.symbol,startLine:e.startLine,endLine:e.endLine}}}function I(e){return{unit:{kind:"file",file:e,shortName:h.basename(e)}}}function ne(e){if(e===".")return[{path:".",depth:0,markers:[]}];let n=[],t=e.split("/").filter(Boolean);for(let i=0;i<t.length;i+=1){let r=t.slice(0,i+1).join("/");n.push({path:r,depth:i,markers:D(r)})}return n}function T(e){return e==="."?[]:$(e).map(({marker:n,prefix:t})=>`${n}: ${t}`)}function D(e){return w($(e).map(({marker:n})=>n))}function $(e){let n=e.split("/").filter(Boolean),t=[];for(let i=0;i<n.length;i+=1){let r=O.get(n[i]);r&&t.push({marker:r,prefix:n.slice(0,i+1).join("/")})}return t}function te(e){if(e.length===0)return null;let n=e.map(i=>l(h.dirname(i))),t=n[0].split("/").filter(Boolean);for(let i of n.slice(1)){let r=i.split("/").filter(Boolean),s=[],o=Math.min(t.length,r.length);for(let a=0;a<o&&t[a]===r[a];a+=1)s.push(t[a]);t=s}return t.length===0?".":t.join("/")}function ie(e,n,t,i){return t?e.kind==="symbol"&&i.length===1?i[0]===e.file?"same-file":"sibling-folder":t==="."||t==="src"?"repository-level-review":U(t,"package")?"package-level-shared":U(t,"app")?"app-level-shared":N(t,["feature","domain","module"])||N(n,["feature","domain","module"])?"feature-local-shared":"sibling-folder":"no-exact-consumers"}function re(e,n,t,i,r,s,o){let a=oe(e,i);if(a)return m(a);let d=fe(n.file),f=se(e,t,d,r,o);if(f)return f;let c=i;if(l(t)===l(c))return m(`${t} is already the nearest common owner for its consumers.`);let u=ae(c,t,d,o);return u||ce(c,t,d,s,o)}function oe(e,n){return n?e==="no-exact-consumers"||e==="repository-level-review"?"The inferred owner is too broad or unsupported for an exact destination.":null:"No consumer owner could be inferred from the current index."}function se(e,n,t,i,r){if(e==="same-file"){let s=i[0]??null;return s?v(s):m("No same-file consumer path was available.")}if(e==="sibling-folder"&&i.length===1){let s=l(h.dirname(i[0])),o=H(n,t,s,r);return o?m(o):v(s)}return null}function ae(e,n,t,i){return be(e)?P(e,n,t,i,`Nearest shared owner ${e} is outside source root ${t}.`):null}function ce(e,n,t,i,r){if(e===".")return m("The nearest common owner is the repository root.");let s=`${e}/shared`,o=P(s,n,t,r,`Proposed home ${s} is outside source root ${t}.`);return o.confidence==="withheld"||i.has(s)?o:m(`${s} does not exist in the indexed project.`)}function P(e,n,t,i,r){if(!M(e,t))return m(r);let s=H(n,t,e,i);return s?m(s):v(e)}function v(e){return{suggestedHome:e,confidence:"exact",whyNoSuggestedHome:null}}function m(e){return{suggestedHome:null,confidence:"withheld",whyNoSuggestedHome:e}}function le(e,n,t,i,r,s){let o=["Report-only signal; review ownership before moving files."];return n==="none"&&o.push("No consumers were found in the current index."),n==="file-level"&&o.push("File-level import evidence can hide which exported unit is actually used."),(t==="."||t==="src")&&o.push("Nearest common owner is broad, so this is not enough evidence for automatic placement."),i.length===1&&o.push("Only one consumer was found; inlining or same-folder placement may be better than shared extraction."),e.kind==="file"&&o.push("File targets describe module locality, not symbol-level usage."),t&&r.startsWith(`${t}/`)&&o.push("Candidate already lives under the nearest common owner."),s&&o.push(`No exact suggested home: ${s}`),o}function ue(e,n,t,i,r,s){let o=[];return o.push(`${e.shortName} currently lives in ${n}.`),t?o.push(`${i.length} consumer file(s) share ${t} as their nearest common owner.`):o.push("No consumer owner could be inferred from the current index."),r?o.push(`Suggested home is ${r}.`):s&&o.push(`No exact suggested home: ${s}`),o}function de(e,n,t){return e==="no-exact-consumers"?"Review references before moving; no consumers were found.":e==="repository-level-review"?"Keep this as a broad locality signal; the inferred owner is too general for automatic relocation.":n?`Review whether ${t==="exact"?"symbol usage":"module import"} supports moving or extracting toward ${n}.`:"Review ownership manually before changing structure."}function me(e,n){return R(n)-R(e)||e.candidatePath.localeCompare(n.candidatePath)}function R(e){let n=e.consumerFiles.length*10;return e.consumerCoverage==="exact"&&(n+=5),e.suggestedHome&&(n+=3),e.recommendedTier==="repository-level-review"&&(n*=.1),e.recommendedTier==="no-exact-consumers"&&(n*=.05),n}function ge(e){let n=new Set(["."]);for(let t of e){let i=l(h.dirname(t));for(;!n.has(i)&&(n.add(i),i!==".");)i=l(h.dirname(i))}return n}function fe(e){let n=x(e),t=n.indexOf("src");return t>=0?n.slice(0,t+1).join("/"):n.length<=1?".":n[0]}function M(e,n){let t=l(e),i=l(n);return i==="."||t===i||t.startsWith(`${i}/`)}function he(e,n,t){let i=x(e),r=x(n);return(M(e,n)?i.slice(r.length):i).some(o=>t.has(o.toLowerCase()))}function H(e,n,t,i){return l(e)===l(t)||!he(e,n,i)?null:`${e} is a named architectural boundary; an exact move to ${t} needs human design.`}function pe(...e){let n=new Set(Y);for(let t of e)for(let i of t??[]){let r=ye(i);r&&n.add(r)}return n}function ye(e){let n=e.trim().toLowerCase();return n===""?null:n}function U(e,n){return D(e).includes(n)}function N(e,n){let t=D(e);return n.some(i=>t.includes(i))}function be(e){let n=e.split("/").filter(Boolean),t=n[n.length-1];return t?q.has(t):!1}function l(e){let n=p(e);return n===""?".":n}function x(e){let n=p(e);return n==="."?[]:n.split("/").filter(Boolean)}function L(e,n){return!Number.isFinite(e)||e===void 0||e<1?n:Math.floor(e)}function E(e){return w([...e]).sort((n,t)=>n.localeCompare(t))}function w(e){return[...new Set(e)]}export{Ce as a};
2
- //# sourceMappingURL=chunk-I7PFL5P3.js.map
1
+ import{a as F,b as A}from"./chunk-ZOXKSQQB.js";import{c as C}from"./chunk-PLYUVM4F.js";import{a as k}from"./chunk-5H5WTJSD.js";import{d as S}from"./chunk-TD7VKJ2Y.js";import{a as y}from"./chunk-7JYHQAH2.js";import{b as p}from"./chunk-GH5YSGZL.js";import{posix as h}from"path";var _=20,G=1,O=new Map([["app","app"],["apps","app"],["component","component"],["components","component"],["composable","composable"],["composables","composable"],["contract","contract"],["contracts","contract"],["domain","domain"],["domains","domain"],["feature","feature"],["features","feature"],["hook","hook"],["hooks","hook"],["lib","library"],["module","module"],["modules","module"],["package","package"],["packages","package"],["page","page"],["pages","page"],["route","route"],["routes","route"],["screen","screen"],["screens","screen"],["service","service"],["services","service"],["shared","shared"],["src","source-root"],["store","state"],["stores","state"],["test","test"],["tests","test"],["util","utility"],["utils","utility"],["view","view"],["views","view"]]),q=new Set(["components","contracts","hooks","lib","services","shared","stores","utils"]),Y=new Set(["access","api","auth","config","db","effect","errors","hooks","lib","middleware","permissions","routes","schemas","servicetasks","services","startup","store","stores","test-utils","repository","repositories","tests","types","ui","utils","workflow","workflows"]);function Ce(e,n={}){let t=L(n.limit,_),i=L(n.minConsumers,G),r=new C(e),s=r.fileDependencyGraph(n.scope),o=ge(y(e,{includeIgnored:!1})),a=pe(e.config.locality?.architecturalBoundarySegments,n.architecturalBoundarySegments);return(n.target?K(e,r,n.target):J(e,n.scope,n.scanLimit)).map(c=>Q(e,r,s,c,n,o,a)).filter(c=>c.consumerFiles.length>=i||n.target).sort(me).slice(0,t)}function K(e,n,t){let i=Z(e,t);if(i)return[I(i)];let r=k(e,t);if(!r)return[];let s=n.definitionsForFile(r.relativePath).find(o=>o.symbolId===r.symbolId);return s?[ee(s)]:[{unit:{kind:"symbol",file:r.relativePath,shortName:S(r.symbol),symbol:r.symbol,startLine:r.startLine,endLine:r.endLine}}]}function J(e,n,t){let i=y(e,{scope:n,includeIgnored:!1}),r=L(t,i.length);return i.slice(0,r).map(s=>I(s))}function Q(e,n,t,i,r,s,o){let a=i.definition?V(e,n,i.definition,r.semantic):X(t,i.unit.file),d=i.definition?a.length>0?"exact":"none":a.length>0?"file-level":"none",f=i.unit.file,c=l(h.dirname(f)),u=te(a),B=ne(c),W=w([...T(c),...u?T(u):[]]),b=ie(i.unit,c,u,a),g=re(b,i.unit,c,u,a,s,o),j=le(i.unit,d,u,a,c,g.whyNoSuggestedHome),z=ue(i.unit,c,u,a,g.suggestedHome,g.whyNoSuggestedHome);return{actionTier:"signal",sourceUnit:i.unit,candidatePath:f,currentDirectory:c,directoryAncestry:B,consumerFiles:a,consumerCoverage:d,nearestCommonOwner:u,boundaryMarkers:W,recommendedTier:b,suggestedHome:g.suggestedHome,destinationConfidence:g.confidence,whyNoSuggestedHome:g.whyNoSuggestedHome,counterevidence:j,reasons:z,recommendation:de(b,g.suggestedHome,d)}}function V(e,n,t,i){let r=A(F(e,n).forDefinitions([t],{semantic:i!==!1,sourceFallback:!0}));return E(r.get(t.symbolId)??[])}function X(e,n){let t=[];for(let[i,r]of e.entries())i!==n&&r.has(n)&&t.push(i);return E(t)}function Z(e,n){let t=p(n),i=y(e,{includeIgnored:!1}),r=i.find(o=>o===t);if(r)return r;let s=i.find(o=>o.endsWith(`/${t}`));return s||(i.find(o=>o.includes(t))??null)}function ee(e){return{definition:e,unit:{kind:"symbol",file:e.relativePath,shortName:S(e.symbol),symbol:e.symbol,startLine:e.startLine,endLine:e.endLine}}}function I(e){return{unit:{kind:"file",file:e,shortName:h.basename(e)}}}function ne(e){if(e===".")return[{path:".",depth:0,markers:[]}];let n=[],t=e.split("/").filter(Boolean);for(let i=0;i<t.length;i+=1){let r=t.slice(0,i+1).join("/");n.push({path:r,depth:i,markers:D(r)})}return n}function T(e){return e==="."?[]:$(e).map(({marker:n,prefix:t})=>`${n}: ${t}`)}function D(e){return w($(e).map(({marker:n})=>n))}function $(e){let n=e.split("/").filter(Boolean),t=[];for(let i=0;i<n.length;i+=1){let r=O.get(n[i]);r&&t.push({marker:r,prefix:n.slice(0,i+1).join("/")})}return t}function te(e){if(e.length===0)return null;let n=e.map(i=>l(h.dirname(i))),t=n[0].split("/").filter(Boolean);for(let i of n.slice(1)){let r=i.split("/").filter(Boolean),s=[],o=Math.min(t.length,r.length);for(let a=0;a<o&&t[a]===r[a];a+=1)s.push(t[a]);t=s}return t.length===0?".":t.join("/")}function ie(e,n,t,i){return t?e.kind==="symbol"&&i.length===1?i[0]===e.file?"same-file":"sibling-folder":t==="."||t==="src"?"repository-level-review":U(t,"package")?"package-level-shared":U(t,"app")?"app-level-shared":N(t,["feature","domain","module"])||N(n,["feature","domain","module"])?"feature-local-shared":"sibling-folder":"no-exact-consumers"}function re(e,n,t,i,r,s,o){let a=oe(e,i);if(a)return m(a);let d=fe(n.file),f=se(e,t,d,r,o);if(f)return f;let c=i;if(l(t)===l(c))return m(`${t} is already the nearest common owner for its consumers.`);let u=ae(c,t,d,o);return u||ce(c,t,d,s,o)}function oe(e,n){return n?e==="no-exact-consumers"||e==="repository-level-review"?"The inferred owner is too broad or unsupported for an exact destination.":null:"No consumer owner could be inferred from the current index."}function se(e,n,t,i,r){if(e==="same-file"){let s=i[0]??null;return s?v(s):m("No same-file consumer path was available.")}if(e==="sibling-folder"&&i.length===1){let s=l(h.dirname(i[0])),o=H(n,t,s,r);return o?m(o):v(s)}return null}function ae(e,n,t,i){return be(e)?P(e,n,t,i,`Nearest shared owner ${e} is outside source root ${t}.`):null}function ce(e,n,t,i,r){if(e===".")return m("The nearest common owner is the repository root.");let s=`${e}/shared`,o=P(s,n,t,r,`Proposed home ${s} is outside source root ${t}.`);return o.confidence==="withheld"||i.has(s)?o:m(`${s} does not exist in the indexed project.`)}function P(e,n,t,i,r){if(!M(e,t))return m(r);let s=H(n,t,e,i);return s?m(s):v(e)}function v(e){return{suggestedHome:e,confidence:"exact",whyNoSuggestedHome:null}}function m(e){return{suggestedHome:null,confidence:"withheld",whyNoSuggestedHome:e}}function le(e,n,t,i,r,s){let o=["Report-only signal; review ownership before moving files."];return n==="none"&&o.push("No consumers were found in the current index."),n==="file-level"&&o.push("File-level import evidence can hide which exported unit is actually used."),(t==="."||t==="src")&&o.push("Nearest common owner is broad, so this is not enough evidence for automatic placement."),i.length===1&&o.push("Only one consumer was found; inlining or same-folder placement may be better than shared extraction."),e.kind==="file"&&o.push("File targets describe module locality, not symbol-level usage."),t&&r.startsWith(`${t}/`)&&o.push("Candidate already lives under the nearest common owner."),s&&o.push(`No exact suggested home: ${s}`),o}function ue(e,n,t,i,r,s){let o=[];return o.push(`${e.shortName} currently lives in ${n}.`),t?o.push(`${i.length} consumer file(s) share ${t} as their nearest common owner.`):o.push("No consumer owner could be inferred from the current index."),r?o.push(`Suggested home is ${r}.`):s&&o.push(`No exact suggested home: ${s}`),o}function de(e,n,t){return e==="no-exact-consumers"?"Review references before moving; no consumers were found.":e==="repository-level-review"?"Keep this as a broad locality signal; the inferred owner is too general for automatic relocation.":n?`Review whether ${t==="exact"?"symbol usage":"module import"} supports moving or extracting toward ${n}.`:"Review ownership manually before changing structure."}function me(e,n){return R(n)-R(e)||e.candidatePath.localeCompare(n.candidatePath)}function R(e){let n=e.consumerFiles.length*10;return e.consumerCoverage==="exact"&&(n+=5),e.suggestedHome&&(n+=3),e.recommendedTier==="repository-level-review"&&(n*=.1),e.recommendedTier==="no-exact-consumers"&&(n*=.05),n}function ge(e){let n=new Set(["."]);for(let t of e){let i=l(h.dirname(t));for(;!n.has(i)&&(n.add(i),i!==".");)i=l(h.dirname(i))}return n}function fe(e){let n=x(e),t=n.indexOf("src");return t>=0?n.slice(0,t+1).join("/"):n.length<=1?".":n[0]}function M(e,n){let t=l(e),i=l(n);return i==="."||t===i||t.startsWith(`${i}/`)}function he(e,n,t){let i=x(e),r=x(n);return(M(e,n)?i.slice(r.length):i).some(o=>t.has(o.toLowerCase()))}function H(e,n,t,i){return l(e)===l(t)||!he(e,n,i)?null:`${e} is a named architectural boundary; an exact move to ${t} needs human design.`}function pe(...e){let n=new Set(Y);for(let t of e)for(let i of t??[]){let r=ye(i);r&&n.add(r)}return n}function ye(e){let n=e.trim().toLowerCase();return n===""?null:n}function U(e,n){return D(e).includes(n)}function N(e,n){let t=D(e);return n.some(i=>t.includes(i))}function be(e){let n=e.split("/").filter(Boolean),t=n[n.length-1];return t?q.has(t):!1}function l(e){let n=p(e);return n===""?".":n}function x(e){let n=p(e);return n==="."?[]:n.split("/").filter(Boolean)}function L(e,n){return!Number.isFinite(e)||e===void 0||e<1?n:Math.floor(e)}function E(e){return w([...e]).sort((n,t)=>n.localeCompare(t))}function w(e){return[...new Set(e)]}export{Ce as a};
2
+ //# sourceMappingURL=chunk-IJMD6BRI.js.map
@@ -1,4 +1,4 @@
1
- import{a as p}from"./chunk-SKUMCCC5.js";import{e as g}from"./chunk-35ELD3RM.js";import{a as f}from"./chunk-VGRUM7JI.js";import{N as d,p as b,v as l}from"./chunk-SDPA5DKN.js";import{f as I}from"./chunk-VWLIOEEF.js";import{c as u,d as _,h as N}from"./chunk-DRENNWRG.js";import{z as c}from"./chunk-4DCKBY6T.js";function Y(e,t,r={}){return T(e,t,r)?.map(s=>({symbol:s.symbol,shortName:s.shortName,fromFile:s.fromFile}))??[]}function Z(e,t){let r=f(e,t),s=O(e,t);if(s.length>0&&!x(r))return s;let o=k(e,t,r);return h(t)&&o.length>0?o:D([...s,...o])}function G(e,t,r={}){let s=p(e,t);if(!s)return[];let o=S(e,s),n=r.semantic===!1?null:E(e,s);return(n?R(n,o):o).filter(m=>!m.used).map(m=>({symbol:m.symbol,shortName:m.shortName,importedIn:m.importer}))}function R(e,t){let r=new Map;for(let o of t){let n=r.get(o.shortName);n?n.push(o):r.set(o.shortName,[o])}let s=e.map(o=>{let n=r.get(o.shortName),i=n?.shift();return n?.length===0&&r.delete(o.shortName),i?{...o,used:o.used||i.used}:o});return s.push(...[...r.values()].flat()),s}function O(e,t){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
1
+ import{a as p}from"./chunk-56NQAEPJ.js";import{e as g}from"./chunk-OXYAWIEA.js";import{a as f}from"./chunk-EELPBR7E.js";import{I as d,h as b,o as l}from"./chunk-C7IJMOFP.js";import{a as I}from"./chunk-YXPUP5G2.js";import{c as u,d as _,h as N}from"./chunk-DRENNWRG.js";import{C as c}from"./chunk-AK3PYTIK.js";function Y(e,t,r={}){return T(e,t,r)?.map(s=>({symbol:s.symbol,shortName:s.shortName,fromFile:s.fromFile}))??[]}function Z(e,t){let r=f(e,t),s=O(e,t);if(s.length>0&&!x(r))return s;let o=k(e,t,r);return h(t)&&o.length>0?o:D([...s,...o])}function G(e,t,r={}){let s=p(e,t);if(!s)return[];let o=S(e,s),n=r.semantic===!1?null:E(e,s);return(n?R(n,o):o).filter(m=>!m.used).map(m=>({symbol:m.symbol,shortName:m.shortName,importedIn:m.importer}))}function R(e,t){let r=new Map;for(let o of t){let n=r.get(o.shortName);n?n.push(o):r.set(o.shortName,[o])}let s=e.map(o=>{let n=r.get(o.shortName),i=n?.shift();return n?.length===0&&r.delete(o.shortName),i?{...o,used:o.used||i.used}:o});return s.push(...[...r.values()].flat()),s}function O(e,t){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d ON c.document_id = d.id
@@ -32,4 +32,4 @@ import{a as p}from"./chunk-SKUMCCC5.js";import{e as g}from"./chunk-35ELD3RM.js";
32
32
  WHERE imp_d.relative_path = ?
33
33
  AND m.role = 2
34
34
  ORDER BY def_d.relative_path, gs.symbol`,t).filter(n=>!e.isIgnored(n.importer));if(o.length>0){let n=r.semantic===!1?[]:g(e,t);return o.map(i=>({symbol:i.symbol,shortName:u(i.symbol),fromFile:i.from_file??"(external)",importer:i.importer,used:i.used!==0||n.some(m=>m.isUsed&&m.sourcePath===i.from_file)}))}return null}function E(e,t){let r=g(e,t);return r.length>0?r.map(s=>{let o=y(s.importedName,s.localName,s.kind);return{symbol:o,shortName:o,fromFile:s.sourcePath??"(external)",importer:t,used:s.kind==="side-effect"?!0:s.isUsed}}):null}function S(e,t){let r=A(t,b(e,t));return d(e,t).map(s=>{let o=y(s.importedName,s.localName,s.kind),n=s.kind==="side-effect"||v(t,s)||r.has(s.localName??s.importedName)?!0:s.used;return{symbol:o,shortName:o,fromFile:s.sourcePath??"(external)",importer:t,used:n}})}function A(e,t){let r=new Set;if(l(e)!=="python")return r;let s=/(?:^|\n)\s*__all__\s*(?:\+?=)\s*[[(]([\s\S]*?)[\])]/g;for(let o of t.matchAll(s)){let n=o[1]??"";for(let i of n.matchAll(/(['"])([A-Za-z_]\w*)\1/g))r.add(i[2])}return r}function v(e,t){if(l(e)!=="rust"||t.used||t.kind==="side-effect")return!1;let r=t.localName??t.importedName;return r==="_"||/^[A-Z]/.test(r)}function y(e,t,r){return r==="namespace"&&e==="*"&&t?`* as ${t}`:r==="default"&&t?`default as ${t}`:r==="side-effect"?"(side effect import)":t&&t!==e?`${e} as ${t}`:e}function $(e){return/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx)$/i.test(e)}export{Y as a,Z as b,G as c};
35
- //# sourceMappingURL=chunk-XXJ7WL3F.js.map
35
+ //# sourceMappingURL=chunk-IKVNEGTW.js.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-I6UTXNHU.js";var e=t;export{e as a};
2
+ //# sourceMappingURL=chunk-IMKZEXZG.js.map
@@ -0,0 +1,61 @@
1
+ import{a as S,b as k,c as P,d as I,e as j,i as J}from"./chunk-HG722PO7.js";import{C as z,I as Q,J as f,O as B,P as W,Q as h,x as C,z as $}from"./chunk-GH5YSGZL.js";function de(t,e){return t.reason instanceof Error?t.reason:new Error(e)}function dt(t,e){if(t?.aborted)throw de(t,e)}import{randomUUID as le}from"crypto";import{closeSync as ue,fsyncSync as fe,linkSync as ye,mkdirSync as pe,openSync as me,statSync as ge,unlinkSync as be,writeSync as ke}from"fs";import{dirname as x}from"path";var E="scip-query-process-lock",G=1,F=Object.freeze({wallNow:()=>Date.now(),isProcessAlive:I,readProcessIdentity:P,randomToken:()=>le(),makeDirectory:t=>pe(t,{recursive:!0}),openFile:(t,e,r)=>me(t,e,r),writeFile:(t,e,r,n)=>ke(t,e,r,n),syncFile:t=>fe(t),closeFile:t=>ue(t),linkFile:(t,e)=>ye(t,e),readFile:t=>f(t,"process lock record"),statFile:t=>{let e=ge(t);return{dev:e.dev,ino:e.ino,size:e.size,mtimeMs:e.mtimeMs}},removeFile:t=>be(t)});function K(t,e){let r=e.runtime??F;r.makeDirectory(x(t));let n;for(let i=0;i<2;i+=1)try{return{kind:"acquired",lock:H(t,e,r),...n?{reclaimed:n}:{}}}catch(o){if(o.code!=="EEXIST")throw o;let s=m(t,{parseLegacy:e.parseLegacy,runtime:r});if(i===0&&Se(t,s,{creationGraceMs:e.creationGraceMs,parseLegacy:e.parseLegacy,runtime:r})){n=s;continue}return{kind:"contended",observation:s}}return{kind:"contended",observation:m(t,{parseLegacy:e.parseLegacy,runtime:r})}}function m(t,e={}){let r=e.runtime??F,n,i;try{n=r.statFile(t),i=r.readFile(t)}catch(c){return c.code==="ENOENT"?{state:"missing"}:{state:"malformed"}}let o;try{o=JSON.parse(i)}catch{return{state:"malformed",raw:i,identity:n}}let s=Le(o);if(s)return{state:"valid",raw:i,identity:n,record:s,owner:Fe(s),parsed:o};let a=e.parseLegacy?.(o)??null;return a?{state:"legacy",raw:i,identity:n,owner:a,parsed:o}:{state:"malformed",raw:i,identity:n,parsed:o}}function Le(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t;if(e.protocol!==E||e.version!==G||typeof e.kind!="string"||e.kind.trim()===""||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0||typeof e.token!="string"||e.token.trim()===""||typeof e.startedAt!="string"||!Number.isFinite(Date.parse(e.startedAt))||e.detail!==void 0&&(typeof e.detail!="object"||e.detail===null||Array.isArray(e.detail)))return null;let r=e.processIdentity===void 0?null:S(e.processIdentity);return e.processIdentity!==void 0&&(!r||r.pid!==e.pid)?null:{protocol:E,version:G,kind:e.kind,pid:e.pid,token:e.token,...r?{processIdentity:r}:{},startedAt:e.startedAt,...e.detail?{detail:e.detail}:{}}}function Se(t,e,r={}){let n=r.runtime??F;if(!A(e,n))return!1;let i=Ie(`${t}.reclaim`,n);if(!i)return!1;try{let o=m(t,{parseLegacy:r.parseLegacy,runtime:n});return!V(e,o)||!A(o,n)?!1:q(t,n)}finally{i.release()}}function H(t,e,r){let n=e.directoryDurability??"durable",i=e.pid??process.pid,o=r.randomToken(),s=e.processIdentity===void 0?r.readProcessIdentity(i):e.processIdentity,a={protocol:E,version:G,kind:e.kind,pid:i,token:o,...s?{processIdentity:s}:{},startedAt:new Date(r.wallNow()).toISOString(),...e.detail?{detail:e.detail}:{}},c=`${t}.${o}.candidate`,y=r.openFile(c,"wx",384),l;try{W(y,Buffer.from(`${JSON.stringify(a)}
2
+ `),r,"process lock"),r.syncFile(y)}catch(u){l=u}try{r.closeFile(y)}catch(u){l??=u}if(l!==void 0)throw v(c,r),l;try{r.linkFile(c,t)}catch(u){throw v(c,r),u}if(v(c,r),n==="durable")try{X(x(t),r)}catch(u){throw Pe(t,a,r),u}let p=!1;return{path:t,record:a,release:()=>p?!1:(p=!0,U(t,a,r,n))}}function Pe(t,e,r=F){return U(t,e,r,"durable")}function U(t,e,r,n){let i=m(t,{runtime:r});return i.state!=="valid"||!i.record||i.record.pid!==e.pid||i.record.token!==e.token||e.processIdentity&&(!i.record.processIdentity||!k(e.processIdentity,i.record.processIdentity))?!1:q(t,r,n)}function Ie(t,e){for(let r=0;r<2;r+=1)try{return H(t,{kind:"reclaim-guard",runtime:e},e)}catch(n){if(n.code!=="EEXIST")return null;let i=m(t,{runtime:e});if(r>0||!A(i,e))return null;let o=m(t,{runtime:e});if(!V(i,o)||!q(t,e))return null}return null}function A(t,e){if(t.state==="missing")return!1;if(t.owner){if(!e.isProcessAlive(t.owner.pid))return!0;if(!t.owner.processIdentity)return!1;let r=e.readProcessIdentity(t.owner.pid);return r!==null&&!k(t.owner.processIdentity,r)}return!1}function V(t,e){return t.state===e.state&&t.raw===e.raw&&t.identity!==void 0&&e.identity!==void 0&&t.identity.dev===e.identity.dev&&t.identity.ino===e.identity.ino&&t.identity.size===e.identity.size&&t.identity.mtimeMs===e.identity.mtimeMs}function Fe(t){return{pid:t.pid,...t.processIdentity?{processIdentity:t.processIdentity}:{}}}function X(t,e){let r;try{r=e.openFile(t,"r")}catch(n){if(h(n,process.platform))return;throw n}try{e.syncFile(r)}catch(n){if(!h(n,process.platform))throw n}finally{e.closeFile(r)}}function q(t,e,r="durable"){try{return e.removeFile(t),r==="durable"&&X(x(t),e),!0}catch{return!1}}function v(t,e){try{e.removeFile(t)}catch{}}import{join as we}from"path";var Re=t=>{if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.pid;return typeof e=="number"&&Number.isSafeInteger(e)&&e>0?{pid:e}:null};function It(t,e={}){return O(we(t,"gc.lock"),e)}function O(t,e={}){let r=e.waitMs??0,n=e.pollMs??10,i=e.now??j,o=i()+r;do{let s=he(t,e.directoryDurability);if(s)return ve(s);let a=o-i();if(a<=0)return null;Ee(Math.min(n,a))}while(i()<=o);return null}function he(t,e){let r=K(t,{kind:"generic",parseLegacy:Re,...e?{directoryDurability:e}:{}});return r.kind==="acquired"?r.lock:null}function ve(t){return{release:()=>{t.release()}}}function Ee(t){let e=new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));Atomics.wait(e,0,0,t)}import{createHash as Ge,randomUUID as Ae}from"crypto";import{existsSync as g,mkdirSync as xe,readdirSync as qe,rmSync as Z,statSync as ee}from"fs";import{basename as Oe,dirname as w,join as d}from"path";var De=1,Me=1,Te=".scipquery-generations",Ne="manifest.json",te="readers",_e="gc.lock",Ce=128,L=new Map,re={pid:process.pid,now:()=>new Date,randomToken:()=>Ae(),isProcessAlive:I,readProcessIdentity:P};function b(t){return d(w(t),Te)}function $e(t){return d(b(t),_e)}function Dt(t,e=re){let r=O($e(t.dbPath),{waitMs:5e3,directoryDurability:"recoverable"});if(!r)throw new Error("SQLite generation retention is busy; retry opening the index.");let n;try{let i=We(t);if(i.source!=="immutable")return{generation:i,release(){}};let o=e.randomToken();if(!/^[A-Za-z0-9._-]+$/.test(o))throw new Error("SQLite generation reader token is unsafe.");let s=d(b(t.dbPath),te);xe(s,{recursive:!0}),n=d(s,`${e.pid}-${o}.json`);let a=e.readProcessIdentity(e.pid);J(n,{version:1,token:o,generationIdentity:i.identity,pid:e.pid,...a?{processIdentity:a}:{},acquiredAt:e.now().toISOString()},{spacing:2,trailingNewline:!0});let c=!1;return{generation:i,release(){c||!n||(c=!0,Z(n,{force:!0}))}}}finally{r.release()}}function Mt(t,e,r=re,n={}){let i=d(b(t),te);if(!g(i))return{protectedGenerations:new Set,activeLeases:0,staleLeasesRemoved:0,malformedLeases:0};let o=new Set,s=0,a=0,c=0;for(let y of qe(i,{withFileTypes:!0})){if(!y.isFile()||!y.name.endsWith(".json"))continue;let l=d(i,y.name),p;try{p=ze(JSON.parse(f(l,"SQLite generation reader lease")))}catch{p=null}if(!p){c+=1;for(let u of e)o.add(u);continue}if(!Qe(p,r)){n.removeStale!==!1&&(Z(l,{force:!0}),a+=1);continue}s+=1,o.add(p.generationIdentity)}return{protectedGenerations:o,activeLeases:s,staleLeasesRemoved:a,malformedLeases:c}}function ze(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,r=e.processIdentity===void 0?null:S(e.processIdentity);return e.version!==1||typeof e.token!="string"||e.token.trim()===""||typeof e.generationIdentity!="string"||!/^[a-f0-9]{64}$/.test(e.generationIdentity)||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0||typeof e.acquiredAt!="string"||!Number.isFinite(Date.parse(e.acquiredAt))||e.processIdentity!==void 0&&(!r||r.pid!==e.pid)?null:{version:1,token:e.token,generationIdentity:e.generationIdentity,pid:e.pid,...r?{processIdentity:r}:{},acquiredAt:e.acquiredAt}}function Qe(t,e){if(!e.isProcessAlive(t.pid))return!1;if(!t.processIdentity)return!0;let r=e.readProcessIdentity(t.pid);return r===null||k(t.processIdentity,r)}function ne(t){try{let e=JSON.parse(f(d(b(t),"state.json"),"SQLite generation state"));return Ve(e)?e:null}catch{return null}}function Be(t,e){return je(b(t),e)}function je(t,e){try{let r=JSON.parse(f(d(t,e,Ne),"SQLite generation manifest"));return Ue(r,e)?r:null}catch{return null}}function We(t){let e=ne(t.dbPath);if(e){let r=Ke(t,e.currentGeneration);if(r)return r;if(e.artifactSet==="immutable-v1")throw new Error(`Published SQLite generation ${e.currentGeneration} is missing or invalid.`)}if(g(d(w(t.dbPath),"index.lock")))throw new Error("Legacy SQLite publication is in progress; retry after the reindex lock is released.");return He(t,e?.currentGeneration)}function Tt(t){let e=ne(t);if(e)return e.currentGeneration;try{let r=d(w(t),"meta.json"),n=g(r)?f(r,"reindex metadata"):void 0;return ie(t,n)}catch{return null}}function Je(t){return $(C(t))??t}function Ke(t,e){try{let r=d(b(t.dbPath),e),n=Be(t.dbPath,e);if(!n)return null;let i=D(r,n.database),o=n.index?D(r,n.index):void 0,s=n.metadata?D(r,n.metadata):void 0;return!M(i,n.database)||n.index&&(!o||!M(o,n.index))||n.metadata&&(!s||!M(s,n.metadata))?null:{identity:e,databasePath:i,...o?{indexPath:o}:{},...s?{metadataPath:s,metadataRaw:f(s,"reindex metadata")}:{},source:"immutable"}}catch{return null}}function He(t,e){let r=oe(t.dbPath),n=d(w(t.dbPath),"meta.json"),i=g(n)?f(n,"reindex metadata"):void 0,o=g(t.indexPath)?t.indexPath:void 0;return{identity:e??ie(t.dbPath,i),databasePath:t.dbPath,...o?{indexPath:o}:{},...i===void 0?{}:{metadataPath:n,metadataRaw:i},source:"legacy",databaseFileIdentity:r}}function ie(t,e){let r=Ge("sha256").update("sqlite-generation-legacy-v1\0");return e!==void 0&&r.update(Je(e)),r.update(`\0${oe(t)}`),r.digest("hex")}function oe(t){let e=ee(t);return`${e.dev}:${e.ino}:${e.size}:${e.mtimeMs}`}function D(t,e){if(Oe(e.file)!==e.file||e.file==="."||e.file==="..")throw new Error("SQLite generation manifest contains an unsafe artifact path");return d(t,e.file)}function M(t,e){if(!g(t))return!1;let r=Y(t);if(!r||r.size!==e.size)return!1;let n=`${t}\0${e.sha256}\0${r.identity}`;if(L.has(n))return!0;let i=B(t,{inputKind:"immutable SQLite generation artifact",maxBytes:e.size}),o=Y(t);if(!o||o.identity!==r.identity||i!==e.sha256)return!1;for(L.set(n,!0);L.size>Ce;){let s=L.keys().next().value;if(s===void 0)break;L.delete(s)}return!0}function Y(t){let e=ee(t,{bigint:!0});return e.isFile()?{identity:`${e.dev}:${e.ino}:${e.size}:${e.mtimeNs}:${e.ctimeNs}`,size:Number(e.size)}:null}function Ue(t,e){return t.version===Me&&t.identity===e&&T(t.database)&&(t.index===void 0||T(t.index))&&(t.metadata===void 0||T(t.metadata))}function T(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.file=="string"&&!!e.file&&Number.isSafeInteger(e.size)&&(e.size??-1)>=0&&typeof e.sha256=="string"&&/^[a-f0-9]{64}$/.test(e.sha256)}function Ve(t){return t.version===De&&typeof t.currentGeneration=="string"&&!!t.currentGeneration&&typeof t.publishedAt=="string"&&Number.isFinite(Date.parse(t.publishedAt))&&(t.artifactSet===void 0||t.artifactSet==="immutable-v1")&&Xe(t.stableMirrors)&&Ye(t.previousGeneration)&&Ze(t.publication)}function Xe(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t;return typeof e.databaseFileIdentity=="string"&&!!e.databaseFileIdentity&&(e.indexFileIdentity===void 0||typeof e.indexFileIdentity=="string"&&!!e.indexFileIdentity)}function Ye(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t;return typeof e.generationIdentity=="string"&&!!e.generationIdentity&&typeof e.databasePath=="string"&&!!e.databasePath&&(e.metadataPath===void 0||typeof e.metadataPath=="string"&&!!e.metadataPath)}function Ze(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t,r=[e.converterDurationMs,e.affectedDocumentCount,e.changedDocumentCount,e.producerDurationMs,e.materializationDurationMs,e.patchDurationMs].filter(n=>n!==void 0);return(e.mode==="incremental"||e.mode==="full")&&e.validation==="passed"&&e.converterDurationMs!==void 0&&r.every(n=>typeof n=="number"&&Number.isFinite(n)&&n>=0)&&(e.scipCompanion===void 0||e.scipCompanion==="current"||e.scipCompanion==="deferred")&&(e.typescriptOverlayGeneration===void 0||typeof e.typescriptOverlayGeneration=="string"&&!!e.typescriptOverlayGeneration)&&(e.scipCompanion!=="deferred"||!!e.typescriptOverlayGeneration)&&(e.fallbackReason===void 0||typeof e.fallbackReason=="string")}import et from"ignore";import{existsSync as se,readdirSync as tt}from"fs";import{dirname as N,isAbsolute as ae,join as R,relative as rt,resolve as nt}from"path";function Qt(t){let e=et();return it(t,e)||e.add(at),{isIgnored:n=>_(e,t,n),filter:n=>n.filter(i=>!_(e,t,i))}}function it(t,e){let r=new Set,n=(s,a)=>{if(!(r.has(s)||!se(s)))try{let c=Q(s,{maxBytes:z,inputKind:"gitignore file"});e.add(a?ot(c,a):c),r.add(s)}catch{}},i=N(t),o=0;for(;i!==N(i)&&o<5&&(n(R(i,".gitignore"),""),!se(R(i,".git")));)i=N(i),o++;return ce(t,"",e,n),r.size>0}function ce(t,e,r,n){let i=e?R(t,e):t;n(R(i,".gitignore"),e);let o;try{o=tt(i,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let a=e?`${e}/${s.name}`:s.name;_(r,t,`${a}/`)||ce(t,a,r,n)}}function ot(t,e){let r=e.replaceAll("\\","/").replace(/\/+$/,"");return t.split(/\r?\n/).map(n=>st(n,r)).join(`
3
+ `)}function st(t,e){let r=t.trimStart();if(!r||r.startsWith("#"))return t;let n=t.slice(0,t.length-r.length),i=r.startsWith("!"),o=i?r.slice(1):r;if(!o||o.startsWith("#"))return t;let s=o.startsWith("/"),a=s?o.slice(1):o,l=(a.endsWith("/")?a.slice(0,-1):a).includes("/")||s?`${e}/${a}`:`${e}/**/${a}`;return`${n}${i?"!":""}${l}`}var at=`
4
+ # Dependencies
5
+ node_modules/
6
+ vendor/
7
+ .bundle/
8
+
9
+ # Build output
10
+ dist/
11
+ build/
12
+ out/
13
+ target/
14
+ bin/
15
+ obj/
16
+
17
+ # Python
18
+ __pycache__/
19
+ *.pyc
20
+ *.pyo
21
+ .venv/
22
+ venv/
23
+ .env/
24
+ env/
25
+ *.egg-info/
26
+
27
+ # Rust
28
+ target/
29
+
30
+ # Java / Kotlin / Scala
31
+ *.class
32
+ .gradle/
33
+ .mvn/
34
+
35
+ # C# / .NET
36
+ bin/
37
+ obj/
38
+ packages/
39
+
40
+ # Go
41
+ vendor/
42
+
43
+ # Dart
44
+ .dart_tool/
45
+ build/
46
+
47
+ # PHP
48
+ vendor/
49
+
50
+ # IDE / OS
51
+ .idea/
52
+ .vscode/
53
+ *.swp
54
+ *.swo
55
+ .DS_Store
56
+ Thumbs.db
57
+
58
+ # Type definitions (often noise in queries)
59
+ *.d.ts
60
+ `;function _(t,e,r){let n=ct(e,r);if(!n)return!1;try{return t.ignores(n)}catch{return!1}}function ct(t,e){if(!e||e===".")return null;if(!ae(e)&&!e.startsWith(".."))return e.replaceAll("\\","/");let r=ae(e)?e:nt(t,e),n=rt(t,r).replaceAll("\\","/");return!n||n==="."||n.startsWith("..")?null:n}export{de as a,dt as b,K as c,m as d,Se as e,It as f,O as g,De as h,Me as i,Te as j,Ne as k,b as l,$e as m,Dt as n,Mt as o,ne as p,Be as q,je as r,We as s,Tt as t,Je as u,oe as v,Qt as w};
61
+ //# sourceMappingURL=chunk-ISIQLPJ2.js.map
@@ -1,4 +1,4 @@
1
- import{a as _}from"./chunk-P5XHIJHI.js";import{d as P,u as E,w as M}from"./chunk-DMQ7ZKJG.js";import{execFileSync as U}from"child_process";var L=2e3,S=50,J=64,Y=8,V=3,W=2160*60*60,X=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i,Z=3,Q=/#\d+|\b[A-Z][A-Z0-9]+-\d+\b/g,q=/^([a-z][a-z0-9-]+)(?:\([^)]+\))?!?:/i;function tt(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r)=>{let o=r??H(i.config.projectRoot);if(!o)return null;let s=e.has(i)?e.get(i,()=>({head:"",value:null})):null;return s&&s.head===o?s.value:(e.invalidate(i),e.get(i,()=>({head:o,value:n(i.config.projectRoot,o)})).value)}}function F(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r,o)=>{let s=o??H(i.config.projectRoot);if(!s)return null;let c=e.has(i)?e.get(i,()=>({head:"",values:new Map})):null;(!c||c.head!==s)&&e.invalidate(i);let l=e.get(i,()=>({head:s,values:new Map}));if(l.values.has(n))return l.values.get(n)??null;let d=r(i.config.projectRoot,s);return l.values.set(n,d),d}}var et=F("git-commit-history");function nt(t,e={}){let i=e.historyMode??"bounded",n=e.head;return{capability:r=>it(t,r,n),commitHistory:()=>x(t,i,n),fileChurn:()=>st(t,i,n),changeAmplification:()=>at(t,i,n),trackedFiles:()=>lt(t,n),fileAddRecords:()=>dt(t,i,n),coChangePairs:(r={})=>bt(t,r,i,n),coChangePairsForFiles:(r,o={})=>z(t,r,o,i,n),directionalCoChangePairsForFiles:(r,o={})=>yt(t,r,o,i,n)}}function x(t,e="bounded",i){return et(t,y(e),(n,r)=>rt(n,r,e),i)}function it(t,e,i){let n=i??H(t.config.projectRoot);return n?{slot:e,available:!0,head:n}:{slot:e,available:!1,head:null,reason:"git history is unavailable for this project"}}function H(t){try{return C(t,["rev-parse","HEAD"]).trim()||null}catch{return null}}function C(t,e){return U("git",["-C",t,...e],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"})}function rt(t,e,i){let n;try{n=C(t,["log","--no-merges","--name-only",...R(i),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}return{head:e,...w(n,S)}}function ot(t){return X.test(t.subject)}function st(t,e,i){let n=x(t,e,i);if(!n)return null;let r=new Map;for(let o of n.commits){let s=ot(o);for(let c of o.files){let l=r.get(c)??{changes:0,fixChanges:0,lastChangedAt:0};l.changes+=1,s&&(l.fixChanges+=1),o.timestamp>l.lastChangedAt&&(l.lastChangedAt=o.timestamp),r.set(c,l)}}return r}function at(t,e,i){let n=x(t,e,i);if(!n||n.commits.length===0)return null;let r=n.commits.map(o=>o.files.length).filter(o=>o>0).sort((o,s)=>o-s);return r.length===0?null:{medianFilesPerCommit:O(r,.5),p90FilesPerCommit:O(r,.9),commitsAnalyzed:r.length}}function O(t,e){let i=Math.min(t.length-1,Math.floor(t.length*e));return t[i]}var ct=tt("git-tracked-files");function lt(t,e){return ct(t,i=>{try{let n=C(i,["ls-files"]);return new Set(n.split(`
1
+ import{a as _}from"./chunk-P5XHIJHI.js";import{d as P,w as E,y as M}from"./chunk-Q7GBK5T7.js";import{execFileSync as U}from"child_process";var L=2e3,S=50,J=64,Y=8,V=3,W=2160*60*60,X=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i,Z=3,Q=/#\d+|\b[A-Z][A-Z0-9]+-\d+\b/g,q=/^([a-z][a-z0-9-]+)(?:\([^)]+\))?!?:/i;function tt(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r)=>{let o=r??H(i.config.projectRoot);if(!o)return null;let s=e.has(i)?e.get(i,()=>({head:"",value:null})):null;return s&&s.head===o?s.value:(e.invalidate(i),e.get(i,()=>({head:o,value:n(i.config.projectRoot,o)})).value)}}function F(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r,o)=>{let s=o??H(i.config.projectRoot);if(!s)return null;let c=e.has(i)?e.get(i,()=>({head:"",values:new Map})):null;(!c||c.head!==s)&&e.invalidate(i);let l=e.get(i,()=>({head:s,values:new Map}));if(l.values.has(n))return l.values.get(n)??null;let d=r(i.config.projectRoot,s);return l.values.set(n,d),d}}var et=F("git-commit-history");function nt(t,e={}){let i=e.historyMode??"bounded",n=e.head;return{capability:r=>it(t,r,n),commitHistory:()=>x(t,i,n),fileChurn:()=>st(t,i,n),changeAmplification:()=>at(t,i,n),trackedFiles:()=>lt(t,n),fileAddRecords:()=>dt(t,i,n),coChangePairs:(r={})=>bt(t,r,i,n),coChangePairsForFiles:(r,o={})=>z(t,r,o,i,n),directionalCoChangePairsForFiles:(r,o={})=>yt(t,r,o,i,n)}}function x(t,e="bounded",i){return et(t,y(e),(n,r)=>rt(n,r,e),i)}function it(t,e,i){let n=i??H(t.config.projectRoot);return n?{slot:e,available:!0,head:n}:{slot:e,available:!1,head:null,reason:"git history is unavailable for this project"}}function H(t){try{return C(t,["rev-parse","HEAD"]).trim()||null}catch{return null}}function C(t,e){return U("git",["-C",t,...e],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"})}function rt(t,e,i){let n;try{n=C(t,["log","--no-merges","--name-only",...R(i),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}return{head:e,...w(n,S)}}function ot(t){return X.test(t.subject)}function st(t,e,i){let n=x(t,e,i);if(!n)return null;let r=new Map;for(let o of n.commits){let s=ot(o);for(let c of o.files){let l=r.get(c)??{changes:0,fixChanges:0,lastChangedAt:0};l.changes+=1,s&&(l.fixChanges+=1),o.timestamp>l.lastChangedAt&&(l.lastChangedAt=o.timestamp),r.set(c,l)}}return r}function at(t,e,i){let n=x(t,e,i);if(!n||n.commits.length===0)return null;let r=n.commits.map(o=>o.files.length).filter(o=>o>0).sort((o,s)=>o-s);return r.length===0?null:{medianFilesPerCommit:O(r,.5),p90FilesPerCommit:O(r,.9),commitsAnalyzed:r.length}}function O(t,e){let i=Math.min(t.length-1,Math.floor(t.length*e));return t[i]}var ct=tt("git-tracked-files");function lt(t,e){return ct(t,i=>{try{let n=C(i,["ls-files"]);return new Set(n.split(`
2
2
  `).map(r=>r.trim()).filter(r=>r!==""))}catch{return null}},e)}var ut=F("git-file-adds"),D="__git__/file-adds",k=E({kind:"git-file-adds",invalidation:M("git-file-adds"),serialize:gt,deserialize:ft});function _t(t){return nt(t).fileAddRecords()}function dt(t,e,i){let n=y(e);return ut(t,n,(r,o)=>mt(t,r,o,e),i)}function mt(t,e,i,n){let r=k.read(t,I(n),i);if(r)return r;let o=ht(e,n);return o&&k.write(t,I(n),i,o),o}function gt(t){return JSON.stringify([...t.entries()])}function ft(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let i=new Map;for(let n of e){if(!Array.isArray(n)||n.length!==2||typeof n[0]!="string")return null;let r=n[1];if(!r||typeof r.commitsAgo!="number"||!Number.isFinite(r.commitsAgo)||typeof r.addedAt!="number"||!Number.isFinite(r.addedAt))return null;i.set(n[0],{commitsAgo:r.commitsAgo,addedAt:r.addedAt})}return i}catch{return null}}function ht(t,e){let i;try{i=C(t,["log","--no-merges","--find-renames","--name-status",...R(e),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}let n=new Map,r=new Map,o=-1;for(let s of i.split("")){if(s.trim()==="")continue;o+=1;let c=s.indexOf(`
3
3
  `),l=c>=0?s.slice(0,c):s,[,d]=l.split("\0"),f=Number(d)||0;if(!(c<0))for(let u of s.slice(c+1).split(`
4
4
  `)){let a=pt(u);if(!a)continue;if(a.status==="R"&&a.from&&a.to){let p=r.get(a.to)??new Set([a.to]);r.set(a.from,p);continue}if(a.status!=="A"||!a.to)continue;let m={commitsAgo:o,addedAt:f};n.set(a.to,m);for(let p of r.get(a.to)??[])n.set(p,m)}}return n}function pt(t){let e=t.trim().split(" "),i=e[0]??"";if(!i)return null;let n=i[0]??"";if(n==="R"){let o=e[1],s=e[2];return o&&s?{status:n,from:o,to:s}:null}let r=e[1];return r?{status:n,to:r}:null}var j=F("git-co-change-pairs"),Ct=F("git-directional-co-change-pairs");function bt(t,e,i,n){let r=`all\0${y(i)}\0${T(e)}`,o=j(t,r,()=>{let s=x(t,i,n);return s?G(s,e):null},n);return o&&[...o]}function z(t,e,i,n,r){if(e.size===0)return[];let o=`files\0${y(n)}\0${N(e)}\0${T(i)}`,s=j(t,o,()=>{let c=x(t,n,r);return c?G(c,i,e):null},r);return s&&[...s]}function yt(t,e,i,n,r){if(e.size===0)return[];let o=i.maxFilesPerCommit??S;if(e.size>J)return z(t,e,i,n,r);let s=`directional\0${y(n)}\0${N(e)}\0${T({...i,maxFilesPerCommit:o})}`,c=Ct(t,s,(l,d)=>{let f=At(l,d,e,o,n);return f?G(f,i,e):null},r);return c&&[...c]}function T(t){let e=t.minTogether??4,i=t.minConfidence??.6,n=t.maxFilesPerCommit??S;return`${e}\0${i}\0${n}`}function N(t){return[...t].sort().join("\0")}function G(t,e,i){let{minTogether:n=4,minConfidence:r=.6,maxFilesPerCommit:o=S}=e,s=new Map,c=new Map,l=t.newestAnalyzedAt??0;for(let u of t.commits){let a=[...new Set(u.files)].sort();if(a.length>o)continue;t.newestAnalyzedAt===void 0&&u.timestamp>l&&(l=u.timestamp);let m=Ft(a),p=i===void 0||a.some(g=>i.has(g));for(let g of a)s.set(g,(s.get(g)??0)+1);if(p)for(let g=0;g<a.length;g++)for(let b=g+1;b<a.length;b++){if(i&&!i.has(a[g])&&!i.has(a[b]))continue;let A=`${a[g]}\0${a[b]}`,h=c.get(A)??{together:0,focusedTogether:0,broadTogether:0,lastTogetherAt:0,timestamps:[],subjects:[]};h.together+=1,m?h.broadTogether+=1:h.focusedTogether+=1,u.timestamp>h.lastTogetherAt&&(h.lastTogetherAt=u.timestamp),h.timestamps.push(u.timestamp),h.subjects.push(u.subject),c.set(A,h)}}let d=[],f=l-W;for(let[u,a]of c){let m=a.together;if(m<n)continue;let[p,g]=u.split("\0"),b=s.get(p)??m,A=s.get(g)??m,h=Math.max(m/b,m/A);if(h<r)continue;let $=a.broadTogether/m,v=a.timestamps.filter(K=>K>=f).length;d.push({fileA:p,fileB:g,together:m,confidence:h,changesA:b,changesB:A,focusedTogether:a.focusedTogether,broadTogether:a.broadTogether,broadCommitRatio:$,lastTogetherAt:a.lastTogetherAt,recentTogether:v,commitScope:Pt(a.broadTogether,m),recency:v>0?"recent":"stale",subjectContext:Ht(a.subjects)})}return d.sort((u,a)=>a.together-u.together||a.confidence-u.confidence||u.fileA.localeCompare(a.fileA)),d}function At(t,e,i,n,r){let o;try{o=xt(t,r)}catch{return null}if(o.length===0)return{head:e,commits:[],skippedBulkCommits:0,newestAnalyzedAt:0};let s;try{s=C(t,["log","--no-merges","--format=%H",...R(r),"--",...[...i].sort()])}catch{return null}let c=new Set(o.map(a=>a.hash)),l=s.split(`
@@ -6,4 +6,4 @@ import{a as _}from"./chunk-P5XHIJHI.js";import{d as P,u as E,w as M}from"./chunk
6
6
  `).map(n=>n.trim()).filter(n=>n!=="").map(n=>{let[r,o]=n.split("\0");return{hash:r??"",timestamp:Number(o)||0}}).filter(n=>n.hash!=="")}function R(t){return t==="full"?[]:["-n",String(B())]}function B(){return _(process.env.SCIP_QUERY_GIT_HISTORY_MAX_COMMITS)??L}function y(t){return t==="full"?"full":`bounded:${B()}`}function I(t){let e=y(t);return e===`bounded:${L}`?D:`${D}:${e}`}function St(t,e,i){for(let r=0;r<e.length;r+=20){let o=e.slice(r,r+20),s;try{s=C(t,["show","--no-walk=unsorted","--name-only","--pretty=format:%x01%H%x00%ct%x00%s",...o.map(l=>l.hash)])}catch{return e[0]?.timestamp??0}let c=w(s,i);if(c.commits.length>0)return c.commits[0].timestamp}return 0}function w(t,e){let i=[],n=0;for(let r of t.split("")){if(r.trim()==="")continue;let o=r.indexOf(`
7
7
  `),s=o>=0?r.slice(0,o):r,[c,l,d]=s.split("\0");if(!c||!l)continue;let f=o>=0?r.slice(o+1).split(`
8
8
  `).map(u=>u.trim()).filter(u=>u!==""):[];if(f.length>e){n+=1;continue}i.push({hash:c,timestamp:Number(l)||0,subject:d??"",files:f})}return{commits:i,skippedBulkCommits:n}}function Ft(t){return t.length>=Y?!0:Rt(t).size>=V}function Rt(t){let e=new Set;for(let i of t){let n=i.indexOf("/");e.add(n>=0?i.slice(0,n):".")}return e}function Pt(t,e){return t===0?"focused":t/e>=.5?"broad-sweep":"mixed"}function Ht(t){let e=new Set,i=[],n=[];for(let r of t){!n.includes(r)&&n.length<Z&&n.push(r);for(let o of Tt(r))e.add(o);for(let o of r.match(Q)??[])i.includes(o)||i.push(o)}return{subjectLabels:[...e].sort(),issueRefs:i,sampleSubjects:n,externalIssueLabelStatus:"unavailable"}}function Tt(t){let e=new Set,i=q.exec(t)?.[1]?.toLowerCase();return i&&e.add(Gt(i)),/\b(?:feat|feature)\b/i.test(t)&&e.add("feature"),/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i.test(t)&&e.add("fix"),/\b(?:docs?|documentation|guide|readme)\b/i.test(t)&&e.add("docs"),/\brefactor(?:ing|ed)?\b/i.test(t)&&e.add("refactor"),/\btests?\b/i.test(t)&&e.add("test"),/\b(?:release|version|v\d+\.\d+)\b/i.test(t)&&e.add("release"),/\bchore\b/i.test(t)&&e.add("chore"),/\bbuild\b/i.test(t)&&e.add("build"),/\bci\b/i.test(t)&&e.add("ci"),/\bperf(?:ormance)?\b/i.test(t)&&e.add("perf"),[...e]}function Gt(t){return t==="feat"?"feature":t}export{nt as a,C as b,_t as c};
9
- //# sourceMappingURL=chunk-DEUGHURX.js.map
9
+ //# sourceMappingURL=chunk-ISWFRGJ6.js.map
@@ -0,0 +1,2 @@
1
+ var f=[];function d(e){e.groups.length>0&&f.push(e)}function m(e,a){let t=new Set(a.groups);for(let c of f)c.groups.some(n=>t.has(n))&&(a.file!==void 0&&c.clearFile?c.clearFile(e,a.file):c.clearAll(e))}var h=256;function g(e){let a=e.maxEntries;if(a!==void 0){if(!Number.isSafeInteger(a)||a<1)throw new Error(`Per-database cache maxEntries must be a positive safe integer; received ${a}.`);return a}return e.clearGroups.includes("source-file")?h:void 0}function C(e,a,t){e.delete(a),e.set(a,t)}function v(e,a){if(a!==void 0)for(;e.size>a;){let t=e.keys().next().value;if(t===void 0)return;e.delete(t)}}function D(){let e=new WeakMap;return{cache:e,ensure(a){let t=e.get(a);return t||(t=new Map,e.set(a,t)),t}}}function x(e,a){let{cache:t,ensure:c}=D(),n=g(a),s={get(r,i,p){let o=c(r);if(o.has(i)){let u=o.get(i);return C(o,i,u),u}let l=p();return o.set(i,l),v(o,n),l},has(r,i){return t.get(r)?.has(i)??!1},invalidate(r,i){t.get(r)?.delete(i)},invalidateAll(r){t.delete(r)},size(r){return t.get(r)?.size??0}};return d({name:e,groups:a.clearGroups,clearAll:r=>s.invalidateAll(r),clearFile:(r,i)=>s.invalidate(r,i)}),s}function E(e,a){let t=new WeakMap,c={get(n,s){let r=t.get(n);if(r)return r.value;let i=s();return t.set(n,{value:i}),i},invalidate(n){t.delete(n)},has(n){return t.has(n)}};return d({name:e,groups:a.clearGroups,clearAll:n=>c.invalidate(n)}),c}var V={clearGroups:["whole-project","source-file"],maxEntries:h};function A(e){return S(e,V)}function S(e,a){let{cache:t,ensure:c}=D(),n=g(a),s={get(r,i,p,o){let l=c(r),u=l.get(i);if(u&&u.source===p)return C(l,i,u),u.value;let b=o();return l.set(i,{source:p,value:b}),v(l,n),b},invalidate(r,i){t.get(r)?.delete(i)},invalidateAll(r){t.delete(r)}};return d({name:e,groups:a.clearGroups,clearAll:r=>s.invalidateAll(r),clearFile:(r,i)=>s.invalidate(r,i)}),s}export{d as a,m as b,x as c,E as d,A as e,S as f};
2
+ //# sourceMappingURL=chunk-IW5XQG5G.js.map
@@ -0,0 +1,2 @@
1
+ import{a as O,b as y,c as b,d as T,f as _,g as z,h as G}from"./chunk-OXYAWIEA.js";import{a as J}from"./chunk-FKGQOTKD.js";import{b as B}from"./chunk-T6QD2ZQB.js";import{d as N}from"./chunk-WSLEJSFR.js";import{h as d}from"./chunk-C7IJMOFP.js";import{b as v,c as g,l as U,n as P}from"./chunk-DKM723YF.js";import{c as A}from"./chunk-IW5XQG5G.js";import{a as j,e as m}from"./chunk-HGFDYOVB.js";var ce={references:_,referenceMap:z,callerMap:(e,s)=>b(e).callerMap(s),calleeMap:q};function q(e,s){let a=j(),i=new Map,o=T(e,s),l=[],n=[],h=0,c=0,p=0,f=0,E=0,H=0,I=0;for(let{definition:t,callees:r}of o.hits)E+=1,r.length>0&&(H+=1,I+=r.length,i.set(t.symbolId,r));let u=K(e,o.hits);if(u.entries.length>0&&m("semantic.callees.prefetch-cache-write",()=>P(e,u.entries),()=>({entries:u.entries.length,sourceMissing:u.sourceMissing,skippedUnsupportedLanguage:u.skippedUnsupportedLanguage})),m("semantic.callees.cache-scan",()=>{for(let[t,r]of O(o.misses)){if(!y(t)){a&&(h+=r.length);continue}let R=d(e,t);if(!R){a&&(c+=r.length),n.push(...r);continue}let x=g(e,t,R),C=$(e,t);if(!C){n.push(...r);continue}let Y=U(e,t,x,C);for(let D of r){let L=Y.get(D.symbol)??null;if(L!==null){let M=V(L);if(M){a&&(p+=1),M.length>0&&i.set(D.symbolId,M);continue}a&&(f+=1)}l.push({def:D,contentHash:x,depsDigest:C})}}},()=>({definitions:s.length,skippedUnsupportedLanguage:h,sourceMissing:c,cacheHits:p,parseFailures:f,misses:l.length,unkeyed:n.length,inMemoryHits:E,inMemoryRows:H,inMemoryCalleeCount:I,resultRows:i.size})),l.length===0&&n.length===0)return i;let k=[...n,...l.map(t=>t.def)],w=0,F=m("semantic.callees.compute-misses",()=>{let t=G(e,k);return w=t.size,t},()=>({definitions:k.length,misses:l.length,unkeyed:n.length,rows:w}));for(let[t,r]of F)i.set(t,r);let S=l.filter(t=>b(e).capability("semantic-callees",t.def.relativePath).available).map(t=>({relativePath:t.def.relativePath,symbol:t.def.symbol,contentHash:t.contentHash,depsDigest:t.depsDigest,payload:JSON.stringify(F.get(t.def.symbolId)??[])}));return S.length>0?m("semantic.callees.cache-write",()=>P(e,S),()=>({entries:S.length})):m("semantic.callees.cache-write-skip",()=>{},()=>({reason:"provider-unavailable",misses:l.length})),i}function K(e,s){let a=[],i=new Map,o=0,l=0;for(let{definition:n,callees:h}of s){if(!y(n.relativePath)){l+=1;continue}if(!i.has(n.relativePath)){let p=d(e,n.relativePath),f=p?$(e,n.relativePath):null;i.set(n.relativePath,p&&f?{contentHash:g(e,n.relativePath,p),depsDigest:f}:null)}let c=i.get(n.relativePath);if(!c){o+=1;continue}a.push({relativePath:n.relativePath,symbol:n.symbol,contentHash:c.contentHash,depsDigest:c.depsDigest,payload:JSON.stringify(h)})}return{entries:a,sourceMissing:o,skippedUnsupportedLanguage:l}}var Q="typescript-callees-v2-callsite-line";function $(e,s){let a=y(s);if(a==="typescript")return J(e,s,Q)?.key??null;let i=X(e,s);return a==="rust"?v(JSON.stringify({kind:"semantic-callees",language:a,engine:N(e.config.projectRoot),positionMapping:"nearby-leaf-v2-callsite-line",depsDigest:i})):i}function V(e){try{return JSON.parse(e)}catch{return null}}var W=A("semantic-deps-digest",{clearGroups:["whole-project","source-file"]});function X(e,s){return W.get(e,s,()=>{let i=[...B(e).get(s)??[]].sort().map(o=>`${o}:${g(e,o,d(e,o))}`);return v(i.join("|"))})}export{ce as a,q as b};
2
+ //# sourceMappingURL=chunk-IXESDH3J.js.map
@@ -1,4 +1,4 @@
1
- import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{W as p}from"./chunk-SDPA5DKN.js";import{f as c}from"./chunk-VWLIOEEF.js";import{a as f,c as g,e as d}from"./chunk-DRENNWRG.js";import{SymbolInformation_Kind as o}from"@c4312/scip";var _=500;function K(n){let s=parseInt(n,10);if(!isNaN(s))return s;let t=n.toLowerCase(),e=y.get(t);if(e!==void 0)return e;for(let[i,l]of b)if(l.toLowerCase().includes(t))return i;return null}function v(n,s,t={}){let{scope:e,limit:i=100}=t,l=K(s);return l===null?[]:h(n,e).map(r=>({row:r,resolvedKind:k(r)})).filter(r=>r.resolvedKind===l).slice(0,i).map(({row:r,resolvedKind:a})=>({symbol:r.symbol,shortName:g(r.symbol),kind:a,kindName:m(a),relativePath:r.relative_path,startLine:r.start_line,endLine:r.end_line}))}function T(n,s={}){let t=I(n,s.scope);for(let e of S(n,s.scope)){let i=k(e);i===null||i===0||t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((e,i)=>i[1]-e[1]||e[0]-i[0]).map(([e,i])=>({kind:e,kindName:m(e),count:i}))}function h(n,s){return p(n,{scope:s}).map(R)}function I(n,s){let t=new Map;for(let e of N(c(n,{scope:s,includeIgnored:!1}))){let i=e.map(()=>"?").join(", "),l=n.all(`SELECT gs.kind AS kind, COUNT(*) AS count
1
+ import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{S as p}from"./chunk-C7IJMOFP.js";import{a as c}from"./chunk-YXPUP5G2.js";import{a as f,c as g,e as d}from"./chunk-DRENNWRG.js";import{SymbolInformation_Kind as o}from"@c4312/scip";var _=500;function K(n){let s=parseInt(n,10);if(!isNaN(s))return s;let t=n.toLowerCase(),e=y.get(t);if(e!==void 0)return e;for(let[i,l]of b)if(l.toLowerCase().includes(t))return i;return null}function v(n,s,t={}){let{scope:e,limit:i=100}=t,l=K(s);return l===null?[]:h(n,e).map(r=>({row:r,resolvedKind:k(r)})).filter(r=>r.resolvedKind===l).slice(0,i).map(({row:r,resolvedKind:a})=>({symbol:r.symbol,shortName:g(r.symbol),kind:a,kindName:m(a),relativePath:r.relative_path,startLine:r.start_line,endLine:r.end_line}))}function T(n,s={}){let t=I(n,s.scope);for(let e of S(n,s.scope)){let i=k(e);i===null||i===0||t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((e,i)=>i[1]-e[1]||e[0]-i[0]).map(([e,i])=>({kind:e,kindName:m(e),count:i}))}function h(n,s){return p(n,{scope:s}).map(R)}function I(n,s){let t=new Map;for(let e of N(c(n,{scope:s,includeIgnored:!1}))){let i=e.map(()=>"?").join(", "),l=n.all(`SELECT gs.kind AS kind, COUNT(*) AS count
2
2
  FROM defn_enclosing_ranges der
3
3
  JOIN global_symbols gs ON der.symbol_id = gs.id
4
4
  JOIN documents d ON der.document_id = d.id
@@ -20,4 +20,4 @@ import{a as b,b as y,c as m}from"./chunk-MTDBHTSF.js";import{W as p}from"./chunk
20
20
  ${n.symbolNoiseFor("gs")}
21
21
  AND d.relative_path IN (${i})
22
22
  ORDER BY d.relative_path, der.start_line, der.end_line, gs.symbol`,...e))}return t}function N(n){let s=[];for(let t=0;t<n.length;t+=_)s.push(n.slice(t,t+_));return s}function R(n){return{symbol:n.symbol,kind:n.kind,documentation:n.documentation,enclosing_symbol:n.enclosingSymbol,relative_path:n.relativePath,start_line:n.startLine,end_line:n.endLine}}function k(n){return n.kind!==null&&n.kind!==0?D(n.kind,n.symbol,n.documentation):C(n.symbol,n.documentation,n.enclosing_symbol)}function D(n,s,t){let e=(t??"").toLowerCase();if(d(s)==="type"){if(e.includes("type "))return o.TypeAlias;if(e.includes("interface "))return o.Interface;if(e.includes("struct "))return o.Struct;if(e.includes("trait "))return o.Trait;if(e.includes("class "))return o.Class}return n}function C(n,s,t){let e=f(n);if("kind"in e)return null;let i=e.descriptors,l=i[i.length-2]??null,u=d(n),r=(s??"").toLowerCase();return u==="type"?r.includes("type ")?o.TypeAlias:r.includes("interface ")?o.Interface:r.includes("struct ")?o.Struct:r.includes("trait ")?o.Trait:r.includes("class ")?o.Class:o.Class:u==="method"?l?.suffix==="type"?o.Method:o.Function:u==="namespace"?o.Module:u!=="term"?null:r.includes("async def ")||r.includes("def ")?o.Function:(t?d(t):l?.suffix??null)==="type"?o.Field:o.Variable}export{v as a,T as b};
23
- //# sourceMappingURL=chunk-FGB567HK.js.map
23
+ //# sourceMappingURL=chunk-JAT6C3VX.js.map
@@ -1,2 +1,2 @@
1
- import{t as c}from"./chunk-5IZTXSOL.js";import{v as a}from"./chunk-I3U2FN2T.js";var D=4;function m(e,i,t,r={}){return p(e,i,t,r.maxReexportDepth??D,0,new Set)}function p(e,i,t,r,s,o){let f=`${i}\0${t}`;if(o.has(f)||s>r)return[];o.add(f);let u=c(e,i).filter(n=>n.leaf===t);return u.length>0?u:a(e,i).flatMap(n=>n.sourcePath?n.kind==="named"&&!n.names.includes(t)?[]:p(e,n.sourcePath,t,r,s+1,new Set(o)):[])}export{m as a};
2
- //# sourceMappingURL=chunk-7TWP3MCP.js.map
1
+ import{t as c}from"./chunk-TD7VKJ2Y.js";import{w as a}from"./chunk-42W3LFUK.js";var D=4;function m(e,i,t,r={}){return p(e,i,t,r.maxReexportDepth??D,0,new Set)}function p(e,i,t,r,s,o){let f=`${i}\0${t}`;if(o.has(f)||s>r)return[];o.add(f);let u=c(e,i).filter(n=>n.leaf===t);return u.length>0?u:a(e,i).flatMap(n=>n.sourcePath?n.kind==="named"&&!n.names.includes(t)?[]:p(e,n.sourcePath,t,r,s+1,new Set(o)):[])}export{m as a};
2
+ //# sourceMappingURL=chunk-JFQBRL3J.js.map
@@ -1,2 +1,2 @@
1
- import{b as f,c as m}from"./chunk-3VLJ2DCA.js";import{execFileSync as b}from"child_process";import{platform as S}from"os";var w=1e3,T=2*1024*1024,I=25;function N(e,n,r=M){let t=r.readIdentity(e),o=new Map;return t&&o.set(e,t),{rootPid:e,rootIdentity:t,ownsProcessGroup:n,knownMembers:o}}async function k(e,n,r=M){if(!e.rootIdentity){let a=await l(e,n.gracefulMs+n.forceMs,r);return{reaped:a,reason:a?"terminated":"identity-unavailable",detail:a?void 0:`Could not establish the birth identity of process ${e.rootPid}.`}}let t=h(e,r);if(t==="mismatch")return{reaped:!1,reason:"identity-mismatch",detail:`Process ${e.rootPid} no longer has the identity owned by this runner.`};if(t==="exited"&&!g(e,r))return{reaped:!0,reason:"terminated"};if(r.platform==="win32"){try{r.terminateWindowsTree(e.rootPid)}catch(u){let c=await l(e,n.forceMs,r);return{reaped:c,reason:c?"terminated":"signal-failed",detail:c?void 0:p(u)}}let a=await l(e,n.forceMs,r);return{reaped:a,reason:a?"terminated":"deadline"}}let o=P(e,"SIGTERM",r);if(await l(e,n.gracefulMs,r))return{reaped:!0,reason:"terminated"};let s=P(e,"SIGKILL",r);return await l(e,n.forceMs,r)?{reaped:!0,reason:"terminated"}:s?{reaped:!1,reason:s.reason,detail:s.detail}:o?{reaped:!1,reason:o.reason,detail:o.detail}:{reaped:!1,reason:"deadline",detail:`Process tree ${e.rootPid} did not exit before its termination deadline.`}}function h(e,n){let r=n.readIdentity(e.rootPid);if(!r)return"exited";if(!e.rootIdentity||!f(e.rootIdentity,r))return"mismatch";e.knownMembers.set(e.rootPid,r);for(let t of n.listDescendantPids(e.rootPid)){let o=n.readIdentity(t);o&&e.knownMembers.set(t,o)}return"owned"}function P(e,n,r){let t=h(e,r);if(t==="mismatch")return{reason:"identity-mismatch",detail:`Process ${e.rootPid} changed identity before ${n}.`};if(t==="owned"&&e.ownsProcessGroup)try{return r.signal(-e.rootPid,n),null}catch(i){if(!y(i))return{reason:"signal-failed",detail:p(i)}}let o=null;for(let i of e.knownMembers.values()){let s=r.readIdentity(i.pid);if(!(!s||!f(i,s)))try{r.signal(i.pid,n)}catch(d){!y(d)&&o===null&&(o=p(d))}}return o===null?null:{reason:"signal-failed",detail:o}}async function l(e,n,r){let t=r.now()+n;for(;g(e,r);){if(r.now()>=t)return!1;await r.sleep(Math.min(I,Math.max(1,t-r.now())))}return!0}function g(e,n){if(!e.rootIdentity&&n.isProcessAlive(e.rootPid))return!0;for(let r of e.knownMembers.values()){let t=n.readIdentity(r.pid);if(t&&f(r,t))return!0}return!!(e.ownsProcessGroup&&n.isProcessGroupAlive(e.rootPid))}function x(e){let n=R(!1),r=new Map;for(let s of n.split(/\r?\n/)){let d=/^\s*(\d+)\s+(\d+)\s*$/.exec(s);if(!d)continue;let a=Number(d[1]),u=Number(d[2]),c=r.get(u)??[];c.push(a),r.set(u,c)}let t=[],o=[...r.get(e)??[]],i=new Set;for(;o.length>0;){let s=o.pop();i.has(s)||(i.add(s),t.push(s),o.push(...r.get(s)??[]))}return t}function R(e){return b("ps",["-axo",e?"pid=,ppid=,rss=":"pid=,ppid="],{encoding:"utf8",timeout:w,maxBuffer:T,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}function y(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ESRCH"}function p(e){return e instanceof Error?e.message:String(e)}var M={platform:S(),now:Date.now,readIdentity:m,isProcessAlive(e){try{return process.kill(e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},isProcessGroupAlive(e){if(this.platform==="win32")return!1;try{return process.kill(-e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},listDescendantPids(e){if(this.platform==="win32")return[];try{return x(e)}catch{return[]}},signal(e,n){process.kill(e,n)},terminateWindowsTree(e){b("taskkill.exe",["/PID",String(e),"/T","/F"],{timeout:w,maxBuffer:T,stdio:"ignore",windowsHide:!0})},async sleep(e){await new Promise(n=>setTimeout(n,e))}};export{N as a,k as b};
2
- //# sourceMappingURL=chunk-Q7HB7BFJ.js.map
1
+ import{b as f,c as m}from"./chunk-SB25YMEQ.js";import{execFileSync as b}from"child_process";import{platform as S}from"os";var w=1e3,T=2*1024*1024,I=25;function N(e,n,r=M){let t=r.readIdentity(e),o=new Map;return t&&o.set(e,t),{rootPid:e,rootIdentity:t,ownsProcessGroup:n,knownMembers:o}}async function k(e,n,r=M){if(!e.rootIdentity){let a=await l(e,n.gracefulMs+n.forceMs,r);return{reaped:a,reason:a?"terminated":"identity-unavailable",detail:a?void 0:`Could not establish the birth identity of process ${e.rootPid}.`}}let t=h(e,r);if(t==="mismatch")return{reaped:!1,reason:"identity-mismatch",detail:`Process ${e.rootPid} no longer has the identity owned by this runner.`};if(t==="exited"&&!g(e,r))return{reaped:!0,reason:"terminated"};if(r.platform==="win32"){try{r.terminateWindowsTree(e.rootPid)}catch(u){let c=await l(e,n.forceMs,r);return{reaped:c,reason:c?"terminated":"signal-failed",detail:c?void 0:p(u)}}let a=await l(e,n.forceMs,r);return{reaped:a,reason:a?"terminated":"deadline"}}let o=P(e,"SIGTERM",r);if(await l(e,n.gracefulMs,r))return{reaped:!0,reason:"terminated"};let s=P(e,"SIGKILL",r);return await l(e,n.forceMs,r)?{reaped:!0,reason:"terminated"}:s?{reaped:!1,reason:s.reason,detail:s.detail}:o?{reaped:!1,reason:o.reason,detail:o.detail}:{reaped:!1,reason:"deadline",detail:`Process tree ${e.rootPid} did not exit before its termination deadline.`}}function h(e,n){let r=n.readIdentity(e.rootPid);if(!r)return"exited";if(!e.rootIdentity||!f(e.rootIdentity,r))return"mismatch";e.knownMembers.set(e.rootPid,r);for(let t of n.listDescendantPids(e.rootPid)){let o=n.readIdentity(t);o&&e.knownMembers.set(t,o)}return"owned"}function P(e,n,r){let t=h(e,r);if(t==="mismatch")return{reason:"identity-mismatch",detail:`Process ${e.rootPid} changed identity before ${n}.`};if(t==="owned"&&e.ownsProcessGroup)try{return r.signal(-e.rootPid,n),null}catch(i){if(!y(i))return{reason:"signal-failed",detail:p(i)}}let o=null;for(let i of e.knownMembers.values()){let s=r.readIdentity(i.pid);if(!(!s||!f(i,s)))try{r.signal(i.pid,n)}catch(d){!y(d)&&o===null&&(o=p(d))}}return o===null?null:{reason:"signal-failed",detail:o}}async function l(e,n,r){let t=r.now()+n;for(;g(e,r);){if(r.now()>=t)return!1;await r.sleep(Math.min(I,Math.max(1,t-r.now())))}return!0}function g(e,n){if(!e.rootIdentity&&n.isProcessAlive(e.rootPid))return!0;for(let r of e.knownMembers.values()){let t=n.readIdentity(r.pid);if(t&&f(r,t))return!0}return!!(e.ownsProcessGroup&&n.isProcessGroupAlive(e.rootPid))}function x(e){let n=R(!1),r=new Map;for(let s of n.split(/\r?\n/)){let d=/^\s*(\d+)\s+(\d+)\s*$/.exec(s);if(!d)continue;let a=Number(d[1]),u=Number(d[2]),c=r.get(u)??[];c.push(a),r.set(u,c)}let t=[],o=[...r.get(e)??[]],i=new Set;for(;o.length>0;){let s=o.pop();i.has(s)||(i.add(s),t.push(s),o.push(...r.get(s)??[]))}return t}function R(e){return b("ps",["-axo",e?"pid=,ppid=,rss=":"pid=,ppid="],{encoding:"utf8",timeout:w,maxBuffer:T,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}function y(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ESRCH"}function p(e){return e instanceof Error?e.message:String(e)}var M={platform:S(),now:Date.now,readIdentity:m,isProcessAlive(e){try{return process.kill(e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},isProcessGroupAlive(e){if(this.platform==="win32")return!1;try{return process.kill(-e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},listDescendantPids(e){if(this.platform==="win32")return[];try{return x(e)}catch{return[]}},signal(e,n){process.kill(e,n)},terminateWindowsTree(e){b("taskkill.exe",["/PID",String(e),"/T","/F"],{timeout:w,maxBuffer:T,stdio:"ignore",windowsHide:!0})},async sleep(e){await new Promise(n=>setTimeout(n,e))}};export{N as a,k as b};
2
+ //# sourceMappingURL=chunk-JHH5SCZ3.js.map
@@ -1,4 +1,4 @@
1
- import{a as y}from"./chunk-VETXXOYU.js";import{b as f}from"./chunk-LPGDO2XA.js";import{c as h,d as w}from"./chunk-MTDBHTSF.js";import{d as u,e as m,h as b,p,q as g}from"./chunk-5IZTXSOL.js";import{dirname as $,isAbsolute as k,relative as x,resolve as v}from"path";var C=new Set(w());function R(t,e){return`tests/generated/twin-ab/${d(t)}-vs-${d(e)}.test.ts`}function d(t){return(t.split(/[/#]/).pop()||t).replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"symbol"}function P(t,e,a,n){let{refA:l,refB:s,outFile:r}=typeof e=="string"?{refA:e,refB:a,outFile:n}:e;if(typeof l!="string"||typeof s!="string"||typeof r!="string")throw new TypeError("twinAb requires refA, refB, and outFile.");if(!k(r))throw new TypeError("twinAb outFile must be an absolute path.");let i=A(t,l);if(!i.ok)return i;let o=A(t,s);if(!o.ok)return o;let c=i.symbol.paramCount===null||o.symbol.paramCount===null?null:i.symbol.paramCount===o.symbol.paramCount,S=N(i.symbol,o.symbol,t.config.projectRoot,r,c);return{ok:!0,a:i.symbol,b:o.symbol,signatureCompatible:c,testSource:S}}function A(t,e){let n=f(t,e).match;if(!n)return{ok:!1,reason:`${e} does not resolve to an indexed symbol.`};let s=t.get("SELECT kind FROM global_symbols WHERE id = ?",n.symbolId)?.kind??null;if(!(s!==null?C.has(s):b(n.symbol)))return{ok:!1,reason:`${e} resolves to ${u(n.symbol)}${s!==null?` with SCIP kind ${h(s)}`:""} \u2014 twin-ab compares call outputs, so both referents must be functions or methods.`};if(!y(t,n))return{ok:!1,reason:`${e} (${u(n.symbol)} at ${n.relativePath}:${n.startLine+1}) is not exported \u2014 twin-ab needs an importable named binding for both twins.`};let i=t.get("SELECT documentation FROM global_symbols WHERE id = ?",n.symbolId),o=p(g(i?.documentation??null));return{ok:!0,symbol:{ref:e,symbol:n.symbol,shortName:m(n.symbol)||u(n.symbol),file:n.relativePath,startLine:n.startLine,signature:o,paramCount:o?E(o):null}}}function E(t){let e=t.indexOf("(");if(e===-1)return null;let a=0,n=-1;for(let i=e;i<t.length;i+=1){let o=t[i];if(o==="(")a+=1;else if(o===")"&&(a-=1,a===0)){n=i;break}}if(n===-1)return null;let l=t.slice(e+1,n).trim();if(!l)return 0;let s=1,r=0;for(let i of l)i==="("||i==="["||i==="{"?r+=1:i===")"||i==="]"||i==="}"?r=Math.max(0,r-1):i===","&&r===0&&(s+=1);return s}function T(t,e,a){let n=$(e),l=v(t,a),r=x(n,l).replace(/\\/g,"/").replace(/\.tsx?$/,".js");return r.startsWith(".")?r:`./${r}`}function N(t,e,a,n,l){let s=T(a,n,t.file),r=T(a,n,e.file),i=l===null?"Signature comparison: unknown (one or both signatures unavailable in the index) \u2014 check by hand.":l?"Signature comparison: param counts match.":"Signature comparison: param counts DIFFER \u2014 twins may not be directly comparable; check by hand.";return`/**
1
+ import{a as y}from"./chunk-TAYD3AE7.js";import{b as f}from"./chunk-5H5WTJSD.js";import{c as h,d as w}from"./chunk-MTDBHTSF.js";import{d as u,e as m,h as b,p,q as g}from"./chunk-TD7VKJ2Y.js";import{dirname as $,isAbsolute as k,relative as x,resolve as v}from"path";var C=new Set(w());function R(t,e){return`tests/generated/twin-ab/${d(t)}-vs-${d(e)}.test.ts`}function d(t){return(t.split(/[/#]/).pop()||t).replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"symbol"}function P(t,e,a,n){let{refA:l,refB:s,outFile:r}=typeof e=="string"?{refA:e,refB:a,outFile:n}:e;if(typeof l!="string"||typeof s!="string"||typeof r!="string")throw new TypeError("twinAb requires refA, refB, and outFile.");if(!k(r))throw new TypeError("twinAb outFile must be an absolute path.");let i=A(t,l);if(!i.ok)return i;let o=A(t,s);if(!o.ok)return o;let c=i.symbol.paramCount===null||o.symbol.paramCount===null?null:i.symbol.paramCount===o.symbol.paramCount,S=N(i.symbol,o.symbol,t.config.projectRoot,r,c);return{ok:!0,a:i.symbol,b:o.symbol,signatureCompatible:c,testSource:S}}function A(t,e){let n=f(t,e).match;if(!n)return{ok:!1,reason:`${e} does not resolve to an indexed symbol.`};let s=t.get("SELECT kind FROM global_symbols WHERE id = ?",n.symbolId)?.kind??null;if(!(s!==null?C.has(s):b(n.symbol)))return{ok:!1,reason:`${e} resolves to ${u(n.symbol)}${s!==null?` with SCIP kind ${h(s)}`:""} \u2014 twin-ab compares call outputs, so both referents must be functions or methods.`};if(!y(t,n))return{ok:!1,reason:`${e} (${u(n.symbol)} at ${n.relativePath}:${n.startLine+1}) is not exported \u2014 twin-ab needs an importable named binding for both twins.`};let i=t.get("SELECT documentation FROM global_symbols WHERE id = ?",n.symbolId),o=p(g(i?.documentation??null));return{ok:!0,symbol:{ref:e,symbol:n.symbol,shortName:m(n.symbol)||u(n.symbol),file:n.relativePath,startLine:n.startLine,signature:o,paramCount:o?E(o):null}}}function E(t){let e=t.indexOf("(");if(e===-1)return null;let a=0,n=-1;for(let i=e;i<t.length;i+=1){let o=t[i];if(o==="(")a+=1;else if(o===")"&&(a-=1,a===0)){n=i;break}}if(n===-1)return null;let l=t.slice(e+1,n).trim();if(!l)return 0;let s=1,r=0;for(let i of l)i==="("||i==="["||i==="{"?r+=1:i===")"||i==="]"||i==="}"?r=Math.max(0,r-1):i===","&&r===0&&(s+=1);return s}function T(t,e,a){let n=$(e),l=v(t,a),r=x(n,l).replace(/\\/g,"/").replace(/\.tsx?$/,".js");return r.startsWith(".")?r:`./${r}`}function N(t,e,a,n,l){let s=T(a,n,t.file),r=T(a,n,e.file),i=l===null?"Signature comparison: unknown (one or both signatures unavailable in the index) \u2014 check by hand.":l?"Signature comparison: param counts match.":"Signature comparison: param counts DIFFER \u2014 twins may not be directly comparable; check by hand.";return`/**
2
2
  * Generated by 'scip-query twin-ab'. Cleanup integrity scenario.
3
3
  * ("cross-examine same-concept twins"): where one concept is computed in
4
4
  * more than one place, feed both the same input and require the same
@@ -37,4 +37,4 @@ describe.skipIf(inputs.length === 0)('twin-ab: ${t.shortName} vs ${e.shortName}'
37
37
  });
38
38
  });
39
39
  `}export{R as a,P as b};
40
- //# sourceMappingURL=chunk-ZHSARYVS.js.map
40
+ //# sourceMappingURL=chunk-JJ62MTQH.js.map