scip-query 0.23.0 → 0.26.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 (650) hide show
  1. package/CHANGELOG.md +491 -2
  2. package/README.md +111 -122
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/by-kind-PRVFAGTQ.js +2 -0
  5. package/dist/call-graph-DVPAQV2F.js +2 -0
  6. package/dist/call-graph-evidence-CUtj8V2I.d.ts +19 -0
  7. package/dist/chunk-2FSBGL5P.js +2 -0
  8. package/dist/chunk-2HLAFUCY.js +2 -0
  9. package/dist/chunk-2IWUT6CJ.js +3 -0
  10. package/dist/chunk-2KNN7GTQ.js +2 -0
  11. package/dist/chunk-2LHXRE2B.js +8 -0
  12. package/dist/{chunk-EG2CPZMJ.js → chunk-2YXE77TJ.js} +2 -2
  13. package/dist/chunk-36SGVCGX.js +2 -0
  14. package/dist/chunk-3ABBFPTP.js +2 -0
  15. package/dist/chunk-3IVFU4FD.js +3 -0
  16. package/dist/chunk-3JIQS44J.js +7 -0
  17. package/dist/chunk-3ZRB6DNK.js +7 -0
  18. package/dist/{chunk-6YTSKJJ3.js → chunk-42EOW5VI.js} +1 -1
  19. package/dist/{chunk-6I6L7Z62.js → chunk-4BHGBMNO.js} +2 -2
  20. package/dist/chunk-4BP3UBDG.js +2 -0
  21. package/dist/chunk-4D6RO7G4.js +2 -0
  22. package/dist/chunk-4FEWQ6RH.js +2 -0
  23. package/dist/chunk-4IGEOBG7.js +2 -0
  24. package/dist/chunk-4QZXBUKC.js +2 -0
  25. package/dist/chunk-4WBDEVX2.js +4 -0
  26. package/dist/chunk-4WCUBZU3.js +8 -0
  27. package/dist/chunk-4WTUBQ36.js +40 -0
  28. package/dist/chunk-4XQ4O6IM.js +3 -0
  29. package/dist/chunk-55UQAMZO.js +4 -0
  30. package/dist/chunk-5D2LVK7O.js +125 -0
  31. package/dist/chunk-5IYJ56TT.js +2 -0
  32. package/dist/chunk-5PLMJC7Q.js +2 -0
  33. package/dist/chunk-5TNQJUR2.js +5 -0
  34. package/dist/chunk-62BDNPMI.js +2 -0
  35. package/dist/chunk-64DZ5TXR.js +7 -0
  36. package/dist/chunk-65245JCM.js +2 -0
  37. package/dist/chunk-6FFVZZL4.js +2 -0
  38. package/dist/chunk-6KO5JHAR.js +2 -0
  39. package/dist/chunk-6LRXOOSX.js +2 -0
  40. package/dist/chunk-6LSEIIF7.js +2 -0
  41. package/dist/chunk-6YMNWD3H.js +6 -0
  42. package/dist/chunk-72AD6ZRR.js +5 -0
  43. package/dist/chunk-73AAKPUC.js +4 -0
  44. package/dist/chunk-76CZ77DF.js +2 -0
  45. package/dist/chunk-7VPEEAAG.js +2 -0
  46. package/dist/chunk-7WTPQ4NX.js +14 -0
  47. package/dist/chunk-7Y5T6XDP.js +2 -0
  48. package/dist/chunk-A2IIGFMJ.js +5 -0
  49. package/dist/chunk-AB5KCTEV.js +2 -0
  50. package/dist/chunk-AC566WBP.js +6 -0
  51. package/dist/chunk-AGWFSTXC.js +3 -0
  52. package/dist/chunk-AOSIYPTA.js +2 -0
  53. package/dist/chunk-AUVEWPIF.js +2 -0
  54. package/dist/chunk-B56T42J3.js +25 -0
  55. package/dist/chunk-BIQEF5NE.js +2 -0
  56. package/dist/chunk-BL6XJKTA.js +3 -0
  57. package/dist/chunk-BMKOQJRI.js +2 -0
  58. package/dist/chunk-BOZ4EXBB.js +3 -0
  59. package/dist/chunk-BUTWYEPH.js +2 -0
  60. package/dist/chunk-BZB4QPIP.js +2 -0
  61. package/dist/{chunk-ILTDAWEF.js → chunk-CE357GEE.js} +4 -4
  62. package/dist/chunk-CFN45HFP.js +2 -0
  63. package/dist/chunk-CFYMZFXT.js +368 -0
  64. package/dist/chunk-CN5EH7O3.js +2 -0
  65. package/dist/chunk-D254DNNQ.js +4 -0
  66. package/dist/chunk-D3FDISIC.js +2 -0
  67. package/dist/chunk-D3NX5XIE.js +3 -0
  68. package/dist/chunk-DA7RPPDF.js +3 -0
  69. package/dist/chunk-DDMC3FON.js +3 -0
  70. package/dist/chunk-DIO3FUSG.js +2 -0
  71. package/dist/chunk-DJ2NNSUK.js +3 -0
  72. package/dist/chunk-DKYQIM3C.js +18 -0
  73. package/dist/{chunk-JTQVMR42.js → chunk-DOOEL2IV.js} +2 -2
  74. package/dist/chunk-DVFP6PZI.js +2 -0
  75. package/dist/chunk-E3FDPXZK.js +2 -0
  76. package/dist/chunk-E7YNJLCB.js +2 -0
  77. package/dist/chunk-EFGW5JPH.js +2 -0
  78. package/dist/chunk-EJVTR244.js +13 -0
  79. package/dist/chunk-EOV7RTRZ.js +2 -0
  80. package/dist/chunk-ETOIKRHO.js +2 -0
  81. package/dist/chunk-EYK3ZAO2.js +3 -0
  82. package/dist/chunk-F2V2LPET.js +52 -0
  83. package/dist/chunk-F4LUHJTF.js +2 -0
  84. package/dist/chunk-F4PUT6IT.js +2 -0
  85. package/dist/chunk-F56GCXXS.js +5 -0
  86. package/dist/chunk-FC2EVQRM.js +2 -0
  87. package/dist/chunk-FL7NBMHP.js +3 -0
  88. package/dist/chunk-FMRN2TRL.js +3 -0
  89. package/dist/chunk-FVULPZDF.js +20 -0
  90. package/dist/chunk-GCKCF5FL.js +43 -0
  91. package/dist/chunk-GH2PYF46.js +2 -0
  92. package/dist/chunk-GHJAGXIP.js +2 -0
  93. package/dist/{chunk-WIWY3CRX.js → chunk-GMVSHUKZ.js} +2 -2
  94. package/dist/chunk-GS6KDO4R.js +2 -0
  95. package/dist/chunk-GUUBXNN7.js +2 -0
  96. package/dist/chunk-GVWX5T43.js +80 -0
  97. package/dist/chunk-GZKFETP5.js +2 -0
  98. package/dist/chunk-H4EQHO6J.js +9 -0
  99. package/dist/chunk-H73WY2RM.js +2 -0
  100. package/dist/chunk-H75GSPRV.js +60 -0
  101. package/dist/chunk-HDR3AHSV.js +61 -0
  102. package/dist/chunk-HQBSL74Y.js +2 -0
  103. package/dist/chunk-HRRFKWPZ.js +2 -0
  104. package/dist/chunk-HXENDJC6.js +2 -0
  105. package/dist/chunk-IIBAZNSW.js +21 -0
  106. package/dist/chunk-INLMWEUU.js +12 -0
  107. package/dist/chunk-IWQPAF4F.js +2 -0
  108. package/dist/chunk-IZJ6YUKP.js +35 -0
  109. package/dist/chunk-J2TMAIN5.js +60 -0
  110. package/dist/chunk-J5FJMODQ.js +142 -0
  111. package/dist/chunk-J7HZPIO3.js +2 -0
  112. package/dist/chunk-JEVRKFRL.js +2 -0
  113. package/dist/chunk-JFXSGAEB.js +30 -0
  114. package/dist/chunk-JVRTHGFS.js +3 -0
  115. package/dist/chunk-JYWEX7RR.js +360 -0
  116. package/dist/chunk-K3YL22N6.js +2 -0
  117. package/dist/chunk-K4CN7GXK.js +12 -0
  118. package/dist/chunk-K5TBVXU4.js +30 -0
  119. package/dist/chunk-KDDIE2DP.js +9 -0
  120. package/dist/chunk-KHWRRPV4.js +2 -0
  121. package/dist/chunk-KI6NBKDY.js +14 -0
  122. package/dist/chunk-KU3QRSTH.js +2 -0
  123. package/dist/chunk-KZBJWZJB.js +2 -0
  124. package/dist/chunk-L7GFM3NP.js +3 -0
  125. package/dist/chunk-LMO6PK3V.js +35 -0
  126. package/dist/chunk-LN4YXJJU.js +2 -0
  127. package/dist/chunk-LOVIZBJ4.js +43 -0
  128. package/dist/chunk-LPCRK4A2.js +11 -0
  129. package/dist/chunk-MMHZKBFA.js +2 -0
  130. package/dist/{chunk-M2O5NY6W.js → chunk-MOQQBQRD.js} +2 -2
  131. package/dist/chunk-N2WN6I3L.js +2 -0
  132. package/dist/chunk-N3ORQT7L.js +2 -0
  133. package/dist/chunk-NAZ3RAIW.js +2 -0
  134. package/dist/chunk-NDUNO5JQ.js +2 -0
  135. package/dist/chunk-NEIWRNAZ.js +4 -0
  136. package/dist/chunk-NJJMVD65.js +2 -0
  137. package/dist/chunk-NLOQOBXI.js +20 -0
  138. package/dist/chunk-NOLZOVCU.js +2 -0
  139. package/dist/chunk-NOWINRRN.js +2 -0
  140. package/dist/chunk-NZAXKGRL.js +16 -0
  141. package/dist/chunk-O2C4UILI.js +2 -0
  142. package/dist/chunk-O3RHA6ZT.js +3 -0
  143. package/dist/chunk-O4UZSPPI.js +3 -0
  144. package/dist/chunk-OGFV2BUX.js +2 -0
  145. package/dist/chunk-OZCJXZK6.js +499 -0
  146. package/dist/chunk-P6ODM7BY.js +2 -0
  147. package/dist/{chunk-XBGWL66K.js → chunk-PAVGPRHJ.js} +2 -2
  148. package/dist/chunk-PH52RA7D.js +2 -0
  149. package/dist/chunk-PKN354TH.js +3 -0
  150. package/dist/chunk-PWOASWEG.js +11 -0
  151. package/dist/chunk-QIWXRW72.js +2 -0
  152. package/dist/chunk-QJRMOK5N.js +2 -0
  153. package/dist/{chunk-YXPUP5G2.js → chunk-QOIXNWQR.js} +2 -2
  154. package/dist/chunk-QXEUDXBT.js +3 -0
  155. package/dist/chunk-QYUVVBMR.js +6 -0
  156. package/dist/chunk-QZ7KQZRN.js +2 -0
  157. package/dist/chunk-R6LQBUDH.js +2 -0
  158. package/dist/chunk-RBS42E55.js +20 -0
  159. package/dist/chunk-RSJKPCFX.js +26 -0
  160. package/dist/chunk-S6CZA3MV.js +2 -0
  161. package/dist/chunk-STMVAHJP.js +2 -0
  162. package/dist/chunk-SYVPTTVW.js +2 -0
  163. package/dist/chunk-T3I6NHBH.js +2 -0
  164. package/dist/chunk-T6DK3ZP7.js +2 -0
  165. package/dist/chunk-TKD34PHN.js +4 -0
  166. package/dist/chunk-TNNQFH7W.js +2 -0
  167. package/dist/chunk-TNV7SSUF.js +2 -0
  168. package/dist/chunk-TO7ZR3EH.js +8 -0
  169. package/dist/chunk-TOU3CHK4.js +2 -0
  170. package/dist/chunk-TRBI4UKT.js +2 -0
  171. package/dist/chunk-TZCVNCAN.js +4 -0
  172. package/dist/chunk-U4LZA5LL.js +3 -0
  173. package/dist/chunk-U5RIG3JP.js +3 -0
  174. package/dist/chunk-UP5KXN2I.js +2 -0
  175. package/dist/chunk-UQFR3NDH.js +5 -0
  176. package/dist/chunk-UXYXF7GV.js +2 -0
  177. package/dist/chunk-VB3GOKOS.js +2 -0
  178. package/dist/chunk-VF5JZICY.js +2 -0
  179. package/dist/chunk-VTY3VK6E.js +2 -0
  180. package/dist/chunk-VX2O4RIS.js +2 -0
  181. package/dist/chunk-WKPV2TDZ.js +2 -0
  182. package/dist/chunk-WOFQ5DTB.js +2 -0
  183. package/dist/chunk-WS4C6TCK.js +2 -0
  184. package/dist/chunk-WXU3DGPU.js +2 -0
  185. package/dist/chunk-X6RMKHJQ.js +81 -0
  186. package/dist/{chunk-4ILJCCXV.js → chunk-XHMN6ZX7.js} +2 -2
  187. package/dist/chunk-XHTVFLWW.js +2 -0
  188. package/dist/chunk-XKIDJCIK.js +2 -0
  189. package/dist/chunk-XTYTYZPT.js +2 -0
  190. package/dist/chunk-Y2JHHTTA.js +2 -0
  191. package/dist/chunk-YGVRMGYN.js +4 -0
  192. package/dist/chunk-YNQCGEQE.js +2 -0
  193. package/dist/chunk-YOQVEXVE.js +14 -0
  194. package/dist/chunk-YRT2WLYY.js +2 -0
  195. package/dist/chunk-YTAP5Y2G.js +2 -0
  196. package/dist/chunk-YTYWI7VB.js +2 -0
  197. package/dist/chunk-YULZRALL.js +2 -0
  198. package/dist/chunk-Z33WQG4Q.js +2 -0
  199. package/dist/chunk-ZGTYGDMF.js +16 -0
  200. package/dist/chunk-ZHMRSZFD.js +43 -0
  201. package/dist/chunk-ZHSP366W.js +10 -0
  202. package/dist/chunk-ZIBYCYKK.js +7 -0
  203. package/dist/{chunk-GAS2LJMP.js → chunk-ZLADLUE6.js} +3 -3
  204. package/dist/chunk-ZO4YXUT6.js +4 -0
  205. package/dist/{chunk-HYO3NP5Q.js → chunk-ZR4HBC2H.js} +2 -2
  206. package/dist/cli-main.js +6 -6
  207. package/dist/cli.js +1 -1
  208. package/dist/{code-B17qEMbt.d.ts → code-BNyrCF3_.d.ts} +3 -2
  209. package/dist/code-IL5WH3NZ.js +2 -0
  210. package/dist/code-result-json-ANTBEDFP.js +4 -0
  211. package/dist/command-descriptors-HEEMDHTU.js +222 -0
  212. package/dist/deps-EOWFC6FD.js +2 -0
  213. package/dist/direct-navigation-Y5B6OSIQ.js +3 -0
  214. package/dist/{exploration-topology-BG4v30HZ.d.ts → exploration-topology-CSgEyAz-.d.ts} +3 -1
  215. package/dist/files-K4AI3JUM.js +2 -0
  216. package/dist/frontend-profile-roles-D7eCum8P.d.ts +10 -0
  217. package/dist/{health-CPp2Jf1Z.d.ts → health-BtfmNrfa.d.ts} +58 -74
  218. package/dist/hierarchy-6W5NDIFI.js +2 -0
  219. package/dist/imports-WH365QY4.js +2 -0
  220. package/dist/index.d.ts +13 -1
  221. package/dist/index.js +1 -1
  222. package/dist/members-K3PHMF5S.js +2 -0
  223. package/dist/methods-E7KVMBX4.js +2 -0
  224. package/dist/output-continuation-command-BJSY67SN.js +3 -0
  225. package/dist/output-pagination-UZJ5ACIX.js +24 -0
  226. package/dist/postinstall.js +1 -1
  227. package/dist/project-reindex-EP24WT4X.js +3 -0
  228. package/dist/queries/affected.js +1 -1
  229. package/dist/queries/architecture.d.ts +15 -4
  230. package/dist/queries/architecture.js +1 -1
  231. package/dist/queries/bottlenecks.js +1 -1
  232. package/dist/queries/by-kind.js +1 -1
  233. package/dist/queries/call-graph.d.ts +3 -1
  234. package/dist/queries/call-graph.js +1 -1
  235. package/dist/queries/change-surface.d.ts +1 -0
  236. package/dist/queries/change-surface.js +1 -1
  237. package/dist/queries/cleanup-plan.d.ts +3 -3
  238. package/dist/queries/cleanup-plan.js +1 -1
  239. package/dist/queries/co-change.d.ts +20 -2
  240. package/dist/queries/co-change.js +1 -1
  241. package/dist/queries/code.d.ts +1 -1
  242. package/dist/queries/code.js +1 -1
  243. package/dist/queries/complexity.d.ts +6 -3
  244. package/dist/queries/complexity.js +1 -1
  245. package/dist/queries/context.d.ts +1 -7
  246. package/dist/queries/context.js +1 -1
  247. package/dist/queries/coupling.js +1 -1
  248. package/dist/queries/cycles.js +1 -1
  249. package/dist/queries/dead.d.ts +2 -0
  250. package/dist/queries/dead.js +1 -1
  251. package/dist/queries/decorative-checkers.js +1 -1
  252. package/dist/queries/dependence-slice.d.ts +46 -22
  253. package/dist/queries/dependence-slice.js +1 -1
  254. package/dist/queries/dependency-depth.d.ts +1 -7
  255. package/dist/queries/dependency-depth.js +1 -1
  256. package/dist/queries/deps.js +1 -1
  257. package/dist/queries/diff-impact.d.ts +3 -1
  258. package/dist/queries/diff-impact.js +1 -1
  259. package/dist/queries/doc-drift.js +1 -1
  260. package/dist/queries/drift.d.ts +1 -1
  261. package/dist/queries/drift.js +1 -1
  262. package/dist/queries/duplicate-bodies.d.ts +29 -2
  263. package/dist/queries/duplicate-bodies.js +1 -1
  264. package/dist/queries/entry-map.d.ts +2 -4
  265. package/dist/queries/entry-map.js +1 -1
  266. package/dist/queries/evidence.d.ts +121 -61
  267. package/dist/queries/evidence.js +1 -1
  268. package/dist/queries/fan.js +1 -1
  269. package/dist/queries/files.js +1 -1
  270. package/dist/queries/health.d.ts +1 -1
  271. package/dist/queries/health.js +1 -1
  272. package/dist/queries/hierarchy.d.ts +2 -2
  273. package/dist/queries/hierarchy.js +1 -1
  274. package/dist/queries/hotspots.d.ts +1 -1
  275. package/dist/queries/hotspots.js +1 -1
  276. package/dist/queries/imports.d.ts +1 -0
  277. package/dist/queries/imports.js +1 -1
  278. package/dist/queries/incomplete-migration.d.ts +3 -3
  279. package/dist/queries/incomplete-migration.js +1 -1
  280. package/dist/queries/index.d.ts +17 -65
  281. package/dist/queries/index.js +1 -1
  282. package/dist/queries/locality-candidates.d.ts +4 -4
  283. package/dist/queries/locality-candidates.js +1 -1
  284. package/dist/queries/members.d.ts +2 -2
  285. package/dist/queries/members.js +1 -1
  286. package/dist/queries/methods.js +1 -1
  287. package/dist/queries/not-implemented.d.ts +2 -6
  288. package/dist/queries/not-implemented.js +1 -1
  289. package/dist/queries/outline.js +1 -1
  290. package/dist/queries/passthrough-candidates.d.ts +9 -1
  291. package/dist/queries/passthrough-candidates.js +1 -1
  292. package/dist/queries/react-component-duplicates.d.ts +19 -3
  293. package/dist/queries/react-component-duplicates.js +1 -1
  294. package/dist/queries/react-hook-candidates.d.ts +22 -3
  295. package/dist/queries/react-hook-candidates.js +1 -1
  296. package/dist/queries/react-large-component-pressure.d.ts +17 -3
  297. package/dist/queries/react-large-component-pressure.js +1 -1
  298. package/dist/queries/recent-duplicates.js +1 -1
  299. package/dist/queries/redundant-reexports.d.ts +4 -14
  300. package/dist/queries/redundant-reexports.js +1 -1
  301. package/dist/queries/refs.d.ts +4 -1
  302. package/dist/queries/refs.js +1 -1
  303. package/dist/queries/review.d.ts +188 -0
  304. package/dist/queries/review.js +2 -0
  305. package/dist/queries/similar-files.d.ts +7 -10
  306. package/dist/queries/similar-files.js +1 -1
  307. package/dist/queries/similar-signatures.js +1 -1
  308. package/dist/queries/similar.d.ts +19 -1
  309. package/dist/queries/similar.js +1 -1
  310. package/dist/queries/slice-cohesion.d.ts +205 -0
  311. package/dist/queries/slice-cohesion.js +2 -0
  312. package/dist/queries/source-inspection.d.ts +6 -202
  313. package/dist/queries/source-inspection.js +1 -1
  314. package/dist/queries/source-search.d.ts +2 -3
  315. package/dist/queries/source-search.js +1 -1
  316. package/dist/queries/stats.d.ts +1 -0
  317. package/dist/queries/stats.js +1 -1
  318. package/dist/queries/surface.js +1 -1
  319. package/dist/queries/symbols.js +1 -1
  320. package/dist/queries/system.d.ts +4 -2
  321. package/dist/queries/system.js +1 -1
  322. package/dist/queries/test-quality.d.ts +1 -1
  323. package/dist/queries/test-quality.js +1 -1
  324. package/dist/queries/twin-drift.d.ts +23 -7
  325. package/dist/queries/twin-drift.js +1 -1
  326. package/dist/queries/unused-imports.js +1 -1
  327. package/dist/queries/unused-params.d.ts +3 -15
  328. package/dist/queries/unused-params.js +1 -1
  329. package/dist/queries/vue-component-duplicates.js +1 -1
  330. package/dist/queries/vue-composable-candidates.js +1 -1
  331. package/dist/queries/vue-large-view-pressure.js +1 -1
  332. package/dist/query-service-fastpath.js +5 -5
  333. package/dist/query-service-server.js +4 -4
  334. package/dist/refs-CCBJG7WK.js +2 -0
  335. package/dist/refs-pagination-DRNLVU4S.js +2 -0
  336. package/dist/reindex-worker.js +79 -29
  337. package/dist/reindex.js +45 -45
  338. package/dist/repository-cache-worker.js +2 -0
  339. package/dist/runtime.d.ts +8 -8
  340. package/dist/runtime.js +3 -4
  341. package/dist/rust-semantic-session-server.js +1 -1
  342. package/dist/rust-semantic-session-worker.js +1 -1
  343. package/dist/rust-semantic-worker.js +1 -1
  344. package/dist/service-queries-2WAJI7R6.js +6 -0
  345. package/dist/source-inspection-91U9zdO3.d.ts +341 -0
  346. package/dist/{source-search-types-Dwz8KeuW.d.ts → source-search-types-DWGYNg8M.d.ts} +15 -2
  347. package/dist/stats-G7DIV6VU.js +2 -0
  348. package/dist/surface-IO55UALI.js +2 -0
  349. package/dist/system-ZBMSHJXU.js +2 -0
  350. package/dist/{queries/trace.d.ts → trace-BMjw3prn.d.ts} +1 -18
  351. package/dist/typescript-indexer.js +2 -0
  352. package/dist/typescript-mailbox-worker.js +1 -1
  353. package/dist/watch-server.js +3 -3
  354. package/docs/AGENT_GUIDE.md +19 -128
  355. package/docs/CLI_JSON_OUTPUT.md +21 -17
  356. package/docs/COMMAND_REFERENCE.md +34 -49
  357. package/docs/CURRENT_COMMANDS.md +123 -0
  358. package/docs/DETECTOR_EVIDENCE_CONTRACTS.md +0 -40
  359. package/docs/DETECTOR_GUIDE.md +55 -12
  360. package/docs/PRODUCT_VISION.md +135 -0
  361. package/docs/PROPERTY_TESTING.md +73 -0
  362. package/docs/REVIEW.md +76 -0
  363. package/docs/SKILLS.md +51 -0
  364. package/docs/WINDOWS_SIDECAR_RELEASE.md +12 -3
  365. package/docs/accuracy-audit-checklist.md +70 -13
  366. package/docs/analyzer-inventory.md +2 -2
  367. package/docs/locality-analyzer-design.md +9 -9
  368. package/package.json +18 -80
  369. package/scripts/evidence-product-contract.mjs +7 -3
  370. package/scripts/record-review-coverage.mjs +118 -0
  371. package/scripts/scip-windows-provenance.mjs +29 -19
  372. package/skills/scip-architecture-review/SKILL.md +57 -0
  373. package/skills/scip-architecture-review/agents/openai.yaml +4 -0
  374. package/skills/scip-architecture-review/references/design-checks.md +17 -0
  375. package/skills/scip-explore/SKILL.md +15 -59
  376. package/skills/scip-explore/agents/openai.yaml +3 -3
  377. package/skills/scip-explore/references/external-evidence.md +2 -2
  378. package/skills/scip-explore/references/information-model.md +26 -29
  379. package/skills/scip-explore/scripts/capture-evidence.mjs +68 -34
  380. package/skills/scip-integrity-audit/SKILL.md +53 -181
  381. package/skills/scip-integrity-audit/agents/openai.yaml +3 -3
  382. package/skills/scip-integrity-audit/references/integrity-probes.md +27 -0
  383. package/skills/scip-plan/SKILL.md +39 -65
  384. package/skills/scip-plan/agents/openai.yaml +2 -2
  385. package/skills/scip-query/SKILL.md +28 -81
  386. package/skills/scip-query/agents/openai.yaml +2 -2
  387. package/skills/scip-query/references/command-guide.md +169 -0
  388. package/skills/scip-setup/SKILL.md +4 -2
  389. package/skills/scip-setup/agents/openai.yaml +3 -3
  390. package/dist/by-kind-XI2CSWEY.js +0 -2
  391. package/dist/call-graph-UONR6JR5.js +0 -2
  392. package/dist/call-graph-evidence-lZa2dwQA.d.ts +0 -11
  393. package/dist/chunk-26CT72HM.js +0 -2
  394. package/dist/chunk-2E7CX53V.js +0 -2
  395. package/dist/chunk-2GRUZAQF.js +0 -43
  396. package/dist/chunk-2LDBDR6J.js +0 -29
  397. package/dist/chunk-2OOY75BW.js +0 -2
  398. package/dist/chunk-2R3V3PSD.js +0 -4
  399. package/dist/chunk-2WC2OEDO.js +0 -4
  400. package/dist/chunk-35NLDRZC.js +0 -2
  401. package/dist/chunk-3AF4TUFK.js +0 -3
  402. package/dist/chunk-3D3QG236.js +0 -2
  403. package/dist/chunk-3FHOF22C.js +0 -21
  404. package/dist/chunk-3JKSW6LJ.js +0 -2
  405. package/dist/chunk-3L2ZBPEX.js +0 -133
  406. package/dist/chunk-3PJABJSU.js +0 -2
  407. package/dist/chunk-3SVF22I5.js +0 -2
  408. package/dist/chunk-3WR4E3A3.js +0 -3
  409. package/dist/chunk-4FTZ4P5G.js +0 -2
  410. package/dist/chunk-4UX2F3JX.js +0 -2
  411. package/dist/chunk-4WNW27SX.js +0 -2
  412. package/dist/chunk-5ENOG4VP.js +0 -61
  413. package/dist/chunk-64BFSI5I.js +0 -2
  414. package/dist/chunk-66DVSJQG.js +0 -455
  415. package/dist/chunk-6HFCYNYE.js +0 -9
  416. package/dist/chunk-6PQNKL3G.js +0 -3
  417. package/dist/chunk-6V5CNXL6.js +0 -2
  418. package/dist/chunk-6VVV4WRR.js +0 -4
  419. package/dist/chunk-7BWFZPPZ.js +0 -2
  420. package/dist/chunk-7CYG22FH.js +0 -2
  421. package/dist/chunk-7F45LJKI.js +0 -2
  422. package/dist/chunk-7IWV2EG3.js +0 -3
  423. package/dist/chunk-7KCZELVM.js +0 -2
  424. package/dist/chunk-AFHTBORT.js +0 -2
  425. package/dist/chunk-AVRYW5OZ.js +0 -2
  426. package/dist/chunk-B3X6KU75.js +0 -2
  427. package/dist/chunk-B5D7QPBE.js +0 -4
  428. package/dist/chunk-BBCIS4DX.js +0 -16
  429. package/dist/chunk-BDUVI7TO.js +0 -3
  430. package/dist/chunk-BE7ZZTMC.js +0 -2
  431. package/dist/chunk-BHVUJOCQ.js +0 -3
  432. package/dist/chunk-BJT7LSPK.js +0 -3
  433. package/dist/chunk-BKVWUP7Y.js +0 -2
  434. package/dist/chunk-BQGB4HBD.js +0 -2
  435. package/dist/chunk-BRV7PIFF.js +0 -2
  436. package/dist/chunk-CEEZJXEF.js +0 -2
  437. package/dist/chunk-CIYLO6SI.js +0 -7
  438. package/dist/chunk-CJZXN4NU.js +0 -2
  439. package/dist/chunk-CNO7TOKL.js +0 -2
  440. package/dist/chunk-COF23M5F.js +0 -2
  441. package/dist/chunk-CWFP7GM5.js +0 -2
  442. package/dist/chunk-D2DHWI3D.js +0 -2
  443. package/dist/chunk-D4N5SQ2M.js +0 -4
  444. package/dist/chunk-DBRSYFXR.js +0 -2
  445. package/dist/chunk-DHUIOLDT.js +0 -2
  446. package/dist/chunk-DIRJWYBM.js +0 -6
  447. package/dist/chunk-DIUFNHRJ.js +0 -35
  448. package/dist/chunk-DRENNWRG.js +0 -2
  449. package/dist/chunk-DTZCKZEU.js +0 -4
  450. package/dist/chunk-DULC3QFP.js +0 -5
  451. package/dist/chunk-DYGHBZ2N.js +0 -16
  452. package/dist/chunk-E5R6AQ73.js +0 -40
  453. package/dist/chunk-E73UNJTF.js +0 -38
  454. package/dist/chunk-EKV5HX33.js +0 -2
  455. package/dist/chunk-EQHFIL6T.js +0 -3
  456. package/dist/chunk-ESIQ66Z7.js +0 -2
  457. package/dist/chunk-EVFUMY4R.js +0 -3
  458. package/dist/chunk-F7DY272B.js +0 -2
  459. package/dist/chunk-FBN2FGXG.js +0 -2
  460. package/dist/chunk-FDLOBR6P.js +0 -4
  461. package/dist/chunk-FESCRNVV.js +0 -5
  462. package/dist/chunk-FFRKR4EQ.js +0 -2
  463. package/dist/chunk-FGA2U4OR.js +0 -8
  464. package/dist/chunk-FIQRSHVM.js +0 -2
  465. package/dist/chunk-FPYLNQPT.js +0 -2
  466. package/dist/chunk-FRUSVINH.js +0 -2
  467. package/dist/chunk-GSP44ENC.js +0 -2
  468. package/dist/chunk-GUFSG5TX.js +0 -2
  469. package/dist/chunk-GYIZ4NXB.js +0 -2
  470. package/dist/chunk-GZIUDL6G.js +0 -2
  471. package/dist/chunk-H5EXS3HM.js +0 -2
  472. package/dist/chunk-HCXEQRFF.js +0 -18
  473. package/dist/chunk-HEHOQQKH.js +0 -2
  474. package/dist/chunk-HKGFPJ4T.js +0 -4
  475. package/dist/chunk-HLZTEXRA.js +0 -2
  476. package/dist/chunk-HOENASQM.js +0 -3
  477. package/dist/chunk-HVF5VBG6.js +0 -2
  478. package/dist/chunk-I55I7XXP.js +0 -2
  479. package/dist/chunk-IDFEUFKS.js +0 -2
  480. package/dist/chunk-IHGQTTVW.js +0 -2
  481. package/dist/chunk-IICPE7B2.js +0 -20
  482. package/dist/chunk-IL676XCC.js +0 -18
  483. package/dist/chunk-IW5XQG5G.js +0 -2
  484. package/dist/chunk-IZDPJ2QI.js +0 -2
  485. package/dist/chunk-J66VOFW6.js +0 -5
  486. package/dist/chunk-JFMEXGFE.js +0 -2
  487. package/dist/chunk-JGKUET5J.js +0 -3
  488. package/dist/chunk-JS4PGXMV.js +0 -3
  489. package/dist/chunk-JWTGMPIT.js +0 -80
  490. package/dist/chunk-JYR66JN5.js +0 -5
  491. package/dist/chunk-KFOYCQAJ.js +0 -9
  492. package/dist/chunk-KLFEXGQA.js +0 -2
  493. package/dist/chunk-KMVGRIO2.js +0 -2
  494. package/dist/chunk-KYSDI3GE.js +0 -5
  495. package/dist/chunk-L6PJPETJ.js +0 -29
  496. package/dist/chunk-LDVT66YM.js +0 -2
  497. package/dist/chunk-LEECKFCJ.js +0 -2
  498. package/dist/chunk-LMZ5PRUV.js +0 -2
  499. package/dist/chunk-LQRQN2XA.js +0 -2
  500. package/dist/chunk-LXABEJX3.js +0 -2
  501. package/dist/chunk-MNV5FSBW.js +0 -3
  502. package/dist/chunk-MPQ4OTBM.js +0 -2
  503. package/dist/chunk-MTDBHTSF.js +0 -2
  504. package/dist/chunk-MV3CDXPI.js +0 -38
  505. package/dist/chunk-MWN53KRN.js +0 -60
  506. package/dist/chunk-MXNGIEPU.js +0 -3
  507. package/dist/chunk-N2ZSIIGR.js +0 -117
  508. package/dist/chunk-N5B2NILC.js +0 -5
  509. package/dist/chunk-NJITK2GP.js +0 -2
  510. package/dist/chunk-NOGJXYFO.js +0 -2
  511. package/dist/chunk-NOYBFVJA.js +0 -554
  512. package/dist/chunk-NWQXSFFU.js +0 -3
  513. package/dist/chunk-ODDUPDP7.js +0 -13
  514. package/dist/chunk-OLIWTZI3.js +0 -3
  515. package/dist/chunk-OLNV6I6U.js +0 -2
  516. package/dist/chunk-OR2E3AGZ.js +0 -2
  517. package/dist/chunk-OSR2GEHQ.js +0 -2
  518. package/dist/chunk-OSSESPDX.js +0 -3
  519. package/dist/chunk-OWOOWNJ5.js +0 -7
  520. package/dist/chunk-P42EIXTA.js +0 -2
  521. package/dist/chunk-PJFGPYTU.js +0 -2
  522. package/dist/chunk-PP7KNN7L.js +0 -2
  523. package/dist/chunk-PU7T5QYQ.js +0 -2
  524. package/dist/chunk-PWWAJSKV.js +0 -74
  525. package/dist/chunk-PZL5T7SU.js +0 -73
  526. package/dist/chunk-QBE3YX64.js +0 -23
  527. package/dist/chunk-QGVTFRY2.js +0 -7
  528. package/dist/chunk-QOJONDS7.js +0 -2
  529. package/dist/chunk-QU5XRYB5.js +0 -4
  530. package/dist/chunk-QUU5OBVK.js +0 -11
  531. package/dist/chunk-RBLQNW26.js +0 -20
  532. package/dist/chunk-RTQ7NEKG.js +0 -81
  533. package/dist/chunk-SQXRS7BG.js +0 -4
  534. package/dist/chunk-SSK6LDPC.js +0 -2
  535. package/dist/chunk-SZHGTCPP.js +0 -7
  536. package/dist/chunk-T4N4P2K5.js +0 -16
  537. package/dist/chunk-TA3QKLLU.js +0 -2
  538. package/dist/chunk-TEBQMNVI.js +0 -43
  539. package/dist/chunk-TPFHAQ2G.js +0 -2
  540. package/dist/chunk-TQPCBMWT.js +0 -5
  541. package/dist/chunk-TQZV7KV4.js +0 -2
  542. package/dist/chunk-TRNAEQ6P.js +0 -3
  543. package/dist/chunk-TY7CRN3Z.js +0 -2
  544. package/dist/chunk-UHFYCMZO.js +0 -35
  545. package/dist/chunk-UICY4GTQ.js +0 -7
  546. package/dist/chunk-UVGEWT4Y.js +0 -26
  547. package/dist/chunk-UXW33INU.js +0 -29
  548. package/dist/chunk-VMPRET3I.js +0 -5
  549. package/dist/chunk-VNLGKHS6.js +0 -6
  550. package/dist/chunk-VQILFTEH.js +0 -2
  551. package/dist/chunk-VUPHCS7Y.js +0 -57
  552. package/dist/chunk-VVZSBTSU.js +0 -23
  553. package/dist/chunk-VZRNID6A.js +0 -2
  554. package/dist/chunk-W5OXRYGE.js +0 -7
  555. package/dist/chunk-W6STWDQI.js +0 -57
  556. package/dist/chunk-W7CXK74K.js +0 -2
  557. package/dist/chunk-WB3WYIRE.js +0 -4
  558. package/dist/chunk-WDNVY4E7.js +0 -20
  559. package/dist/chunk-WK46TNUM.js +0 -3
  560. package/dist/chunk-WNTFFKAX.js +0 -12
  561. package/dist/chunk-WOIKCX6A.js +0 -2
  562. package/dist/chunk-WUN6KBHV.js +0 -2
  563. package/dist/chunk-WYCTJDVR.js +0 -2
  564. package/dist/chunk-WYPL7GF7.js +0 -2
  565. package/dist/chunk-XDAUYDFT.js +0 -2
  566. package/dist/chunk-XDQMU3BT.js +0 -2
  567. package/dist/chunk-XFA4SSO3.js +0 -3
  568. package/dist/chunk-XGZEP6GR.js +0 -8
  569. package/dist/chunk-XPDPNWTQ.js +0 -368
  570. package/dist/chunk-XRYABF57.js +0 -8
  571. package/dist/chunk-YBGKCQIS.js +0 -2
  572. package/dist/chunk-YEN6CYC7.js +0 -16
  573. package/dist/chunk-YF5IB2LF.js +0 -2
  574. package/dist/chunk-YI2AWIHC.js +0 -3
  575. package/dist/chunk-YPWBKGFU.js +0 -2
  576. package/dist/chunk-YPWHBBIS.js +0 -2
  577. package/dist/chunk-YSH6U3L4.js +0 -3
  578. package/dist/chunk-YU5DZUZI.js +0 -10
  579. package/dist/chunk-YWO5DDRC.js +0 -16
  580. package/dist/chunk-Z4CDXYNQ.js +0 -2
  581. package/dist/chunk-ZF5KHH7C.js +0 -2
  582. package/dist/chunk-ZOHS7AQV.js +0 -21
  583. package/dist/chunk-ZTI4SBFV.js +0 -3
  584. package/dist/code-MI6F2TTU.js +0 -2
  585. package/dist/code-result-json-FXALY4HE.js +0 -2
  586. package/dist/command-descriptors-P34VABY5.js +0 -343
  587. package/dist/dataflow-4KEMJPC6.js +0 -2
  588. package/dist/dependence-slice-R7FPWD5M.js +0 -2
  589. package/dist/deps-7EMQUYUT.js +0 -2
  590. package/dist/direct-navigation-6YO234F2.js +0 -3
  591. package/dist/entry-map-KOOLR26E.js +0 -2
  592. package/dist/files-OPIPJIGZ.js +0 -2
  593. package/dist/graph-evidence-Bjyky2V4.d.ts +0 -126
  594. package/dist/hierarchy-QPD2CAER.js +0 -2
  595. package/dist/imports-M6HUXRXC.js +0 -2
  596. package/dist/members-I5MEFOCT.js +0 -2
  597. package/dist/methods-5JYGGHXA.js +0 -2
  598. package/dist/next-anchor-candidates-BwMczMvX.d.ts +0 -90
  599. package/dist/output-continuation-command-UPQAAKBP.js +0 -3
  600. package/dist/output-pagination-3OFL2MJV.js +0 -19
  601. package/dist/project-reindex-UKKQ5PLS.js +0 -3
  602. package/dist/queries/anchors.d.ts +0 -123
  603. package/dist/queries/anchors.js +0 -2
  604. package/dist/queries/complexity-hotspots.d.ts +0 -40
  605. package/dist/queries/complexity-hotspots.js +0 -2
  606. package/dist/queries/convergence.d.ts +0 -33
  607. package/dist/queries/convergence.js +0 -2
  608. package/dist/queries/dataflow.d.ts +0 -77
  609. package/dist/queries/dataflow.js +0 -2
  610. package/dist/queries/deep-chains.d.ts +0 -5
  611. package/dist/queries/deep-chains.js +0 -2
  612. package/dist/queries/extract-candidates.d.ts +0 -52
  613. package/dist/queries/extract-candidates.js +0 -2
  614. package/dist/queries/isolated.d.ts +0 -24
  615. package/dist/queries/isolated.js +0 -2
  616. package/dist/queries/plan-context.d.ts +0 -33
  617. package/dist/queries/plan-context.js +0 -2
  618. package/dist/queries/reference-neighborhood.d.ts +0 -4
  619. package/dist/queries/reference-neighborhood.js +0 -2
  620. package/dist/queries/reference-reachability.d.ts +0 -48
  621. package/dist/queries/reference-reachability.js +0 -2
  622. package/dist/queries/self-audit.d.ts +0 -63
  623. package/dist/queries/self-audit.js +0 -2
  624. package/dist/queries/similar-chains.d.ts +0 -48
  625. package/dist/queries/similar-chains.js +0 -2
  626. package/dist/queries/slice.d.ts +0 -4
  627. package/dist/queries/slice.js +0 -2
  628. package/dist/queries/stale-abstractions.d.ts +0 -72
  629. package/dist/queries/stale-abstractions.js +0 -2
  630. package/dist/queries/system-map.d.ts +0 -449
  631. package/dist/queries/system-map.js +0 -2
  632. package/dist/queries/trace.js +0 -2
  633. package/dist/queries/twin-ab.d.ts +0 -66
  634. package/dist/queries/twin-ab.js +0 -2
  635. package/dist/queries/value-flow.d.ts +0 -43
  636. package/dist/queries/value-flow.js +0 -2
  637. package/dist/queries/wrapper-candidates.d.ts +0 -34
  638. package/dist/queries/wrapper-candidates.js +0 -2
  639. package/dist/refs-PSU4JZZW.js +0 -2
  640. package/dist/refs-pagination-JG6CJMRC.js +0 -2
  641. package/dist/slice-HYRATV64.js +0 -2
  642. package/dist/source-snippet-_wrcgmZc.d.ts +0 -15
  643. package/dist/stats-OOJ74B32.js +0 -2
  644. package/dist/surface-VTGDYWF5.js +0 -2
  645. package/dist/symbol-resolution-WD5EU5JE.js +0 -2
  646. package/dist/system-LRQNFOR2.js +0 -2
  647. package/dist/trace-F4B6OLL4.js +0 -2
  648. package/dist/value-flow-VRPZY72V.js +0 -2
  649. package/skills/concrete-plan/SKILL.md +0 -8
  650. package/skills/concrete-plan/agents/openai.yaml +0 -4
@@ -0,0 +1,43 @@
1
+ import{r as _,t as C}from"./chunk-7WTPQ4NX.js";import{M as A,a as y}from"./chunk-FVULPZDF.js";import{h as M,i as x}from"./chunk-D3FDISIC.js";import{c as b,e as F,t as p}from"./chunk-GVWX5T43.js";import{Ba as O}from"./chunk-5TNQJUR2.js";var P=M({kind:"file-dependency-graph",invalidation:x("file-dependency-graph"),serialize:e=>JSON.stringify(e),deserialize:W}),T=O("file-dep-graph",{clearGroups:["whole-project"]});function ae(e,n,r){if(r.length===0)return[];let t=new Set(r),o=I(e),i=new Set;return n==="forward"?$(o,t,i):j(o,t,i),[...i].sort()}function $(e,n,r){for(let t of n)for(let o of e.get(t)??[])n.has(o)||r.add(o)}function j(e,n,r){for(let[t,o]of e)if(!n.has(t))for(let i of n)o.has(i)&&r.add(t)}function I(e,n,r={}){let t=r.scipEdges??"all-references",o=r.sourceEdges??"imports-and-reexports",i=m(n,t,o);return T.get(e,i,()=>{let s=new Set(y(e,{includeIgnored:!1})),c=F(e),d=0,u=0,l=null,D=!1,g=0,G=0,N=null;return p("file-dep-graph.product",()=>{if(c){let a=P.read(e,i,c);if(a){D=!0,N=a.construction;let E=k(a);return d=a.sourceFileCount,u=a.sourceEdgeCount,g=a.scipEdgeCount,G=E.size,l=a.sourceDependencyFingerprint,E}}let S=o==="none"?{files:[],edges:[],fingerprint:b("no-source-dependency-fallback")}:p("file-dep-graph.source-imports",()=>{let a=K(e,s,n,o);return d=a.files.length,u=a.edges.length,l=a.fingerprint,a},()=>({scope:n??null,sourceEdges:o,files:d,edges:u})),f=new Map,R=(a,E)=>h(e,f,s,a,E);p("file-dep-graph.scip-edges",()=>{for(let a of q(e,n,t))g=(g??0)+1,R(a.from_file,a.to_file)},()=>({scope:n??null,edges:g}));for(let a of S.edges)R(a.fromFile,a.toFile);return G=f.size,c&&(N="full",P.write(e,i,c,{version:2,construction:"full",sourceDependencyFingerprint:S.fingerprint,sourceFileCount:S.files.length,sourceEdgeCount:S.edges.length,scipEdgeCount:g,edgeCount:J(f),graph:v(f)})),f},()=>({scope:n??null,available:c!==null,hit:D,construction:N,files:d,sourceEdges:u,sourceEdgeMode:o,scipEdges:g,graphFiles:G,sourceDependencyFingerprint:l}))})}function de(e){return z(e,"none")}function le(e,n="imports-and-reexports"){let r=m(void 0,"all-references",n),t=F(e);if(!t)return null;let o=P.read(e,r,t);return o?{cacheKey:r,sourceEdges:n,graph:k(o)}:null}function z(e,n){let r=m(void 0,"all-references",n),t=I(e,void 0,{sourceEdges:n});return{cacheKey:r,sourceEdges:n,graph:t}}function pe(e,n,r,t){let o=n.sourceEdges??"imports-only",i=F(e);if(!i)return!1;let s=t??H(e,n,r);if(!s)return!1;let c=new Set(y(e,{includeIgnored:!1})),d=m(void 0,"all-references",o);return P.write(e,d,i,{version:2,construction:"carried",sourceDependencyFingerprint:null,sourceFileCount:c.size,sourceEdgeCount:null,scipEdgeCount:null,edgeCount:J(s),graph:v(s)}),!0}function H(e,n,r,t=[]){let o=n.sourceEdges??"imports-only",i=m(void 0,"all-references",o);if(n.cacheKey!==i)return null;let s=p("file-dep-graph.carry.indexed-files",()=>new Set(y(e,{includeIgnored:!1}))),c=new Set(r),d=new Map;p("file-dep-graph.carry.reuse",()=>{if(t.length===0)for(let[l,D]of n.graph)c.has(l)||d.set(l,D);else Z(e,d,s,n.graph,c)});let u=p("file-dep-graph.carry.scip-edges",()=>Q(e,c,"all-references"));for(let l of u)h(e,d,s,l.from_file,l.to_file);return p("file-dep-graph.carry.source-edges",()=>{for(let l of c)s.has(l)&&X(e,d,s,l,o)}),d}async function ue(e,n={}){let r=y(e,{includeIgnored:!1}),t=Math.max(1,Math.floor(n.batchSize??64)),o=n.collectGarbage??A,i=0;for(let s=0;s<r.length;s+=t){for(let c of r.slice(s,s+t))C(e,c),_(e,c),i+=1;n.onBatch?.({files:i,total:r.length}),o(),await n.yieldToEventLoop?.()}return{files:i}}function K(e,n,r,t){let o=[],i=[];for(let s of n)r&&!s.includes(r)||(o.push(s),ee(e,s,t,i));return{files:o,edges:i,fingerprint:L(o,i)}}function L(e,n){let r=n.map(t=>`${t.fromFile}\0${t.toFile}`).sort();return b(JSON.stringify({files:e,edges:r}))}function m(e,n,r){return`edge-mode-v4:${n}:${r}:${e??"<all>"}`}function v(e){return[...e].map(([n,r])=>[n,[...r].sort()]).sort(([n],[r])=>n.localeCompare(r))}function k(e){return new Map(e.graph.map(([n,r])=>[n,new Set(r)]))}function W(e){let n=JSON.parse(e);return B(n)?n:null}function B(e){return U(e)?Array.isArray(e.graph)&&e.graph.every(V):!1}function U(e){if(!e||typeof e!="object")return!1;let n=e;return n.version===2&&(n.construction==="full"||n.construction==="carried")&&Y(n.sourceDependencyFingerprint)&&typeof n.sourceFileCount=="number"&&w(n.sourceEdgeCount)&&w(n.scipEdgeCount)&&typeof n.edgeCount=="number"}function Y(e){return e===null||typeof e=="string"}function w(e){return e===null||typeof e=="number"}function J(e){let n=0;for(let r of e.values())n+=r.size;return n}function V(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&Array.isArray(e[1])&&e[1].every(n=>typeof n=="string")}function q(e,n,r){let t=n?"AND d1.relative_path LIKE ?":"",o=n?[`%${n}%`]:[],i=r==="imports-only"?"AND m.role = 2":"AND m.role != 1";return e.all(`SELECT DISTINCT
2
+ d1.relative_path AS from_file,
3
+ d2.relative_path AS to_file
4
+ FROM mentions m
5
+ JOIN chunks c ON m.chunk_id = c.id
6
+ JOIN documents d1 ON c.document_id = d1.id
7
+ JOIN global_symbols gs ON m.symbol_id = gs.id
8
+ JOIN (
9
+ SELECT m2.symbol_id, c2.document_id
10
+ FROM mentions m2
11
+ JOIN chunks c2 ON m2.chunk_id = c2.id
12
+ WHERE m2.role = 1
13
+ GROUP BY m2.symbol_id
14
+ ) sym_def ON sym_def.symbol_id = gs.id
15
+ JOIN documents d2 ON sym_def.document_id = d2.id
16
+ WHERE d1.id != d2.id
17
+ ${i}
18
+ ${e.pathExclusionsFor("d1","d2")}
19
+ ${t}`,...o)}function Q(e,n,r){let t=[...n].sort();if(t.length===0)return[];let o=r==="imports-only"?"AND m.role = 2":"AND m.role != 1",i=[];for(let s=0;s<t.length;s+=500){let c=t.slice(s,s+500),d=c.map(()=>"?").join(", ");i.push(...e.all(`SELECT DISTINCT
20
+ d1.relative_path AS from_file,
21
+ d2.relative_path AS to_file
22
+ FROM documents d1
23
+ CROSS JOIN chunks c
24
+ CROSS JOIN mentions m
25
+ CROSS JOIN global_symbols gs
26
+ CROSS JOIN chunks c2
27
+ CROSS JOIN documents d2
28
+ WHERE d1.relative_path IN (${d})
29
+ AND c.document_id = d1.id
30
+ AND m.chunk_id = c.id
31
+ AND gs.id = m.symbol_id
32
+ AND c2.id = (
33
+ SELECT m2.chunk_id
34
+ FROM mentions m2
35
+ WHERE m2.symbol_id = gs.id AND m2.role = 1
36
+ ORDER BY m2.chunk_id
37
+ LIMIT 1
38
+ )
39
+ AND d2.id = c2.document_id
40
+ AND d1.id != d2.id
41
+ ${o}
42
+ ${e.pathExclusionsFor("d1","d2")}`,...c))}return i}function h(e,n,r,t,o){if(t===o||e.isIgnored(t)||e.isIgnored(o)||!r.has(o))return;let i=n.get(t);i||(i=new Set,n.set(t,i)),i.add(o)}function X(e,n,r,t,o){if(o!=="none")for(let i of C(e,t))i.sourcePath&&h(e,n,r,t,i.sourcePath);if(o==="imports-and-reexports")for(let i of _(e,t))i.sourcePath&&h(e,n,r,t,i.sourcePath)}function Z(e,n,r,t,o){for(let[i,s]of t)if(!(o.has(i)||!r.has(i)))for(let c of s)h(e,n,r,i,c)}function ee(e,n,r,t){for(let o of C(e,n))o.sourcePath&&t.push({fromFile:n,toFile:o.sourcePath});if(r==="imports-and-reexports")for(let o of _(e,n))o.sourcePath&&t.push({fromFile:n,toFile:o.sourcePath})}export{ae as a,I as b,de as c,le as d,pe as e,H as f,ue as g};
43
+ //# sourceMappingURL=chunk-GCKCF5FL.js.map
@@ -0,0 +1,2 @@
1
+ import{a as C}from"./chunk-6LRXOOSX.js";import{c as q}from"./chunk-ZO4YXUT6.js";import{d as x,e as P,f as T,p as j,r as D}from"./chunk-BIQEF5NE.js";import{b as v}from"./chunk-NDUNO5JQ.js";import{d as b,e as S,f as g}from"./chunk-JEVRKFRL.js";import{c as E,d as R}from"./chunk-QZ7KQZRN.js";import{n as I,r as w,z as M}from"./chunk-TKD34PHN.js";import{F as f,a as y,c as h}from"./chunk-U5RIG3JP.js";import B from"better-sqlite3";import{createHash as A}from"crypto";import{dirname as u,join as _}from"path";function L(t){if(!t.request.modifiedFiles.length||t.request.removedFiles.length)return null;let e;try{e=P({projectRoot:t.projectRoot,dbPath:t.dbPath,indexPath:_(u(t.dbPath),"index.scip")});let r=U(t,e.generation);if(!r||!z(t,r.snapshot))return null;let n=H(e.generation.databasePath,r.snapshot,t.request.modifiedFiles);if(!n)return null;let i=new v,o=new Set(r.snapshot.files.map(s=>s.path)),a=u(t.dbPath);for(let s of r.overlay.overlays)s.blobHash===null||!o.has(s.relativePath)||i.setReference({...s,blobHash:s.blobHash},()=>j(a,s));return{sources:n,documents:i}}catch{return null}finally{e?.release()}}function U(t,e){let r=T(t.dbPath);if(e.source!=="immutable"||r?.currentGeneration!==e.identity)return null;let n=b(e.metadataRaw),i=g(n);if(!i||N(i)!==t.baseGeneration)return null;let o=h(S(n)?.fingerprint);if(!o||!G(t,o))return null;let a=r.publication?.typescriptOverlayGeneration??x(o,t.request.producerIdentity),s=D(u(t.dbPath),a);return s?.producerIdentity!==t.request.producerIdentity||s.projectIdentity!==t.request.projectIdentity?null:{snapshot:o,overlay:s}}function G(t,e){if(e.typescriptProjectMode!=="single"&&e.typescriptProjectMode!=="workspace")return!1;let r=e.typescriptProjectMode==="workspace"?f(t.projectRoot,e.typescriptProjects):["."];return r.length!==1||r[0]!==t.request.projectArgument?!1:t.request.tsconfigPath===(r[0]==="."?"tsconfig.json":`${r[0]}/tsconfig.json`)}function z(t,e){let r=I(t.projectRoot,u(t.dbPath),()=>M(t.projectRoot,e.languages,{...e,typescriptProjectMode:e.typescriptProjectMode})),n=new Map(e.files.map(o=>[o.path,o])),i=new Set(t.request.modifiedFiles);if(n.size!==r.files.length||i.size!==t.request.modifiedFiles.length)return!1;for(let o of i)if(!n.has(o)||y(o,e.languages)!=="source")return!1;return r.files.every(o=>{let a=n.get(o.path);return!!a&&(i.has(o.path)||o.hash===a.hash&&o.size===a.size)})}function H(t,e,r){let n=new Map(e.files.map(o=>[o.path,o])),i=new B(t,{readonly:!0,fileMustExist:!0});try{let o=new Map,a=i.prepare("SELECT text FROM documents WHERE relative_path = ?");for(let s of r){let p=a.get(s),l=n.get(s);if(typeof p?.text!="string"||Buffer.byteLength(p.text)!==l.size||N(p.text)!==l.hash)return null;o.set(s,p.text)}return o}finally{i.close()}}function N(t){return A("sha256").update(t).digest("hex")}function se(t){let e=h(t.fingerprint);if(!e)return 0;let r=new Map(e.files.map(i=>[i.path,i])),n=new B(t.dbPath);try{let i=n.prepare("SELECT relative_path FROM documents WHERE text IS NULL").all(),o=new Set([...i.map(s=>s.relative_path),...t.changedFiles??[]]),a=n.prepare("UPDATE documents SET text = ? WHERE relative_path = ? AND (text IS NULL OR text != ?)");return n.transaction(()=>{let s=0;for(let p of o){let l=r.get(p);if(!l||!/\.[cm]?[jt]sx?$/.test(p))continue;let d;try{d=w(t.projectRoot,p)}catch{continue}let c=d.toString("utf8");!Buffer.from(c,"utf8").equals(d)||d.length!==l.size||A("sha256").update(d).digest("hex")!==l.hash||(s+=a.run(c,p,c).changes)}return s})()}finally{n.close()}}import{randomUUID as X}from"crypto";import{getHeapStatistics as $}from"v8";import{resolve as Y}from"path";var k=class{projectRoot;dbPath;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){this.projectRoot=Y(e.projectRoot),this.dbPath=e.dbPath,this.currentGeneration=e.currentGeneration,this.createEmitter=e.createEmitter??q,this.wallNow=e.wallNow??e.now??Date.now,this.monotonicNow=e.monotonicNow??e.now??R,O(e.maxActiveSessions,"maxActiveSessions"),this.maxActiveSessions=e.maxActiveSessions??8,O(e.softMemoryLimitMb,"softMemoryLimitMb"),this.softMemoryLimitBytes=e.softMemoryLimitMb===void 0?null:e.softMemoryLimitMb*1024*1024,this.memoryUsage=e.memoryUsage??(()=>({heapUsedBytes:process.memoryUsage().heapUsed,heapLimitBytes:$().heap_size_limit}))}handle(e,r){let n=this.monotonicNow();try{if(this.currentGeneration()!==e)throw new Error("TypeScript index request does not match the currently published generation.");let i=this.emitterFor(r);if(i.emitter.producerIdentity!==r.producerIdentity)throw new Error("TypeScript index producer identity changed.");let o=i.emitter.snapshotStats();if(this.dbPath&&o.initializations===0){let c=L({projectRoot:this.projectRoot,dbPath:this.dbPath,baseGeneration:e,request:r});c&&i.emitter.restoreCheckpoint(c)}let a=i.emitter.advance({modifiedFiles:r.modifiedFiles,removedFiles:r.removedFiles,affectedFiles:r.affectedFiles}),s=this.monotonicNow()-n;this.requests+=1,this.lastRequestAtMs=this.wallNow(),this.lastDurationMs=s,this.lastError=null,this.unavailable=!1;let p=new Map(r.knownDocuments?.map(c=>[c.relativePath,c])),l=[],d=a.fragments.filter(c=>{let m=p.get(c.relativePath);return!m||c.blobHash!==m.blobHash||c.byteLength!==m.byteLength?!0:(l.push(m),!1)});return{producerIdentity:a.producerIdentity,cold:a.stats.initializations>o.initializations,durationMs:s,...l.length?{retainedDocuments:l}:{},fragments:d.map(c=>({relativePath:c.relativePath,bytesBase64:c.bytes===null?null:Buffer.from(c.bytes).toString("base64"),occurrences:c.occurrences,symbols:c.symbols,referenceFragments:c.referenceFragments}))}}catch(i){throw this.lastError=i instanceof Error?i.message:String(i),i}}status(e){let r=[...this.active.values()].map(a=>a.emitter.snapshotStats()),n=a=>r.reduce((s,p)=>s+p[a],0),i=this.memoryUsage(),o=this.softMemoryLimitBytes!==null&&i.heapUsedBytes>=this.softMemoryLimitBytes;return{protocolVersion:C,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:i.heapUsedBytes,heapLimitBytes:i.heapLimitBytes,...this.softMemoryLimitBytes===null?{}:{softMemoryLimitBytes:this.softMemoryLimitBytes},retireRequested:o,initializations:n("initializations"),programUpdates:n("programUpdates"),documentsEmitted:n("documentsEmitted"),documentsRemoved:n("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}`,n=this.active.get(r);if(n?.projectIdentity===e.projectIdentity)return this.active.delete(r),this.active.set(r,n),n;if(n)this.active.delete(r);else if(this.active.size>=this.maxActiveSessions){let a=this.active.keys().next().value;a!==void 0&&(this.active.delete(a),this.sessionsEvicted+=1)}let i=this.createEmitter({workspaceRoot:this.projectRoot,tsconfigPath:e.tsconfigPath,projectRoot:e.projectArgument});if(!i.available)throw this.unavailable=!0,new Error(i.reason);n&&(this.sessionsReplaced+=1);let o={projectIdentity:e.projectIdentity,emitter:i.emitter};return this.active.set(r,o),this.sessionsCreated+=1,o}};var be=`typescript-index-${process.pid}-${X()}`,F=E(process.pid),Se={pid:process.pid,...F?{processIdentity:F}:{}};function O(t,e){if(t!==void 0&&(!Number.isInteger(t)||t<1))throw new Error(`TypeScript index ${e} must be a positive integer.`)}export{se as a,k as b};
2
+ //# sourceMappingURL=chunk-GH2PYF46.js.map
@@ -0,0 +1,2 @@
1
+ import{a as F}from"./chunk-NOWINRRN.js";import{b as L}from"./chunk-6LSEIIF7.js";import{d as b}from"./chunk-72AD6ZRR.js";import{d as h}from"./chunk-5D2LVK7O.js";import{A as y}from"./chunk-FVULPZDF.js";import{qa as p}from"./chunk-5TNQJUR2.js";import{ts as a}from"@ts-morph/common";function j(i,r={}){let{scope:o,limit:l=30,scanLimit:u}=r,c=new L(i),t=new Map;return F({candidates:()=>c.productionCallableDefinitions({scope:o,files:r.files,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}),filterCandidate:e=>S(e.relativePath),scanLimit:u,profile:{name:"unused-params"},evaluate:e=>{let n=t.get(e.relativePath);if(n||(n=b(e.relativePath,p(i.config.projectRoot,e.relativePath)),t.set(e.relativePath,n)),n.errors.length>0)return null;let m=[],g=s=>{if(a.isFunctionLike(s)&&"body"in s&&s.body&&n.sourceFile.getLineAndCharacterOfPosition(s.getStart(n.sourceFile)).line>=e.startLine&&n.sourceFile.getLineAndCharacterOfPosition(s.end).line<=e.endLine){m.push(s);return}a.forEachChild(s,g)};if(g(n.sourceFile),m.length!==1)return null;let d=m[0],f=P(d,n.checker);return f.length===0?null:{symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:d.parameters.length,unusedTrailing:f}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:l})}function S(i){let r=y(i);return r==="typescript"||r==="tsx"||r==="javascript"}function P(i,r){if(!i.body||i.parameters.some(t=>!a.isIdentifier(t.name)||t.initializer||t.dotDotDotToken||t.modifiers?.length))return[];let o=new Set,l=!1,u=t=>{if(a.isIdentifier(t)){(t.text==="arguments"||t.text==="eval")&&(l=!0);let e=a.isShorthandPropertyAssignment(t.parent)?r.getShorthandAssignmentValueSymbol(t.parent):r.getSymbolAtLocation(t);e&&o.add(e)}a.forEachChild(t,u)};if(u(i.body),l)return[];let c=[];for(let t of[...i.parameters].reverse()){let e=t.name.text,n=r.getSymbolAtLocation(t.name);if(e.startsWith("_")||!n||o.has(n))break;c.unshift(e)}return c}export{j as a};
2
+ //# sourceMappingURL=chunk-GHJAGXIP.js.map
@@ -1,3 +1,3 @@
1
- import{e as i}from"./chunk-N2ZSIIGR.js";import{a as o}from"./chunk-ODDUPDP7.js";import{k as s}from"./chunk-FESCRNVV.js";function u(r,e){let t=s(r,e.relativePath);if(t.length===0)return!1;let n=i(e.symbol);if(!n)return!1;let c=t.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
1
+ import{e as i}from"./chunk-5D2LVK7O.js";import{a as o}from"./chunk-7WTPQ4NX.js";import{d as s}from"./chunk-A2IIGFMJ.js";function u(r,e){let t=s(r,e.relativePath);if(t.length===0)return!1;let n=i(e.symbol);if(!n)return!1;let c=t.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
2
2
  `),a=o(n);return new RegExp(`^\\s*export\\s+(?:default\\s+)?(?:(?:async\\s+)?function\\s+${a}\\b|(?:abstract\\s+)?class\\s+${a}\\b|(?:interface|type|enum|namespace|module)\\s+${a}\\b|(?:const|let|var)\\s+${a}\\b)`,"m").test(c)?!0:p(t,n)}function p(r,e){if(!e)return!1;let t=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${o(e)}\\b`);return r.some(n=>t.test(n))}export{u as a};
3
- //# sourceMappingURL=chunk-WIWY3CRX.js.map
3
+ //# sourceMappingURL=chunk-GMVSHUKZ.js.map
@@ -0,0 +1,2 @@
1
+ import{a as C}from"./chunk-HXENDJC6.js";import{b}from"./chunk-GCKCF5FL.js";function x(o,e={}){let{limit:n=10,scope:t,minDepth:r=3,edgeBasis:s="symbol-references"}=e,i=b(o,t,s==="imports"?{scipEdges:"imports-only",sourceEdges:"imports-and-reexports"}:void 0),{components:c,componentOf:a}=C(i),p=w(i,c.length,a),S=v(p,c);function D(l){return S[l]}let R=c.map(l=>[...l].sort()),g=new Set,d=[];for(let l=0;l<c.length;l++){let u=D(l).map(m=>R[m]),f=u.map(m=>m[0]);if(u.length<r)continue;let y=f.join(" ");g.has(y)||(g.add(y),d.push(B(f,u,s)))}return d.sort((l,h)=>h.depth-l.depth||l.chain.join("\0").localeCompare(h.chain.join("\0"))),E(d).slice(0,n)}function w(o,e,n){let t=new Map;for(let r=0;r<e;r++)t.set(r,new Set);for(let[r,s]of o){let i=n.get(r);for(let c of s){let a=n.get(c);a!==i&&t.get(i).add(a)}}return t}function v(o,e){let n=new Array(e.length),t=new Array(e.length);for(let r=0;r<e.length;r++){let s=[],i=0;for(let c of[...o.get(r)].sort((a,p)=>a-p)){let a=t[c];(a>i||a===i&&j(n[c],s,e)<0)&&(i=a,s=n[c])}n[r]=[r,...s],t[r]=1+i}return n}function j(o,e,n){if(e.length===0)return-1;let t=o.map(s=>[...n[s]].sort()[0]??"").join("\0"),r=e.map(s=>[...n[s]].sort()[0]??"").join("\0");return t.localeCompare(r)}function B(o,e,n){let t=e.reduce((s,i)=>s+i.length,0),r=e.filter(s=>s.length>1).length;return{chain:o,components:e,depth:e.length,fileCount:t,edgeBasis:n,actionTier:"signal",chainKind:"transitive-dependency-depth",evidenceReasons:[`${e.length} condensed dependency component(s) form the representative transitive path`,`${t} file(s) are represented; ${r} component(s) contain a dependency cycle`,`edge basis: ${n==="imports"?"resolved file imports":"cross-file symbol references plus resolved source imports"}`,"cycles count once toward depth and retain their full membership separately"],recommendation:"Review whether the chain crosses ownership or layer boundaries; shorten it only when the dependency direction is accidental."}}function E(o){let e=[];for(let n of o)e.some(t=>P(n.chain,t.chain))||e.push(n);return e}function P(o,e){if(o.length>=e.length)return!1;let n=e.length-o.length;for(let t=0;t<o.length;t++)if(o[t]!==e[n+t])return!1;return!0}export{x as a};
2
+ //# sourceMappingURL=chunk-GS6KDO4R.js.map
@@ -0,0 +1,2 @@
1
+ import{O as a}from"./chunk-FVULPZDF.js";var s=new Set(["componentDidCatch","componentDidMount","componentDidUpdate","componentWillUnmount","getDerivedStateFromError","getDerivedStateFromProps","getSnapshotBeforeUpdate","render","shouldComponentUpdate","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate"]);function m(o,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let e=a(o,t.relativePath);if(!e)return!1;let n=e.rootNode.descendantsOfType("method_definition").find(r=>r.startPosition.row<=t.startLine&&r.endPosition.row>=t.endLine);return n?/\boverride\b/.test(n.text.slice(0,Math.max(0,n.text.indexOf("{"))))?!0:i(n,t.leaf):!1}function i(o,t){let e=o.parent;for(;e&&e.type!=="class_declaration"&&e.type!=="class";)e=e.parent;if(!e)return!1;let n=e.text.slice(0,Math.max(0,e.text.indexOf("{")));return/\bimplements\b/.test(n)||/\bextends\b/.test(n)?!0:s.has(t)&&/\bextends\s+(?:React\.)?(?:Component|PureComponent)\b/.test(n)}export{m as a};
2
+ //# sourceMappingURL=chunk-GUUBXNN7.js.map
@@ -0,0 +1,80 @@
1
+ import{m as D}from"./chunk-T6DK3ZP7.js";import{Ba as R,Ca as L,aa as S}from"./chunk-5TNQJUR2.js";import{createHash as Y}from"crypto";import{existsSync as pe,mkdirSync as B}from"fs";import{dirname as F,join as $}from"path";import A from"better-sqlite3";var Q="evidence.db";var G=["source-facts","definition-exclusions","doc-path-tokens","react-component-behavior-profiles"],_=new Set(G);var he=512*1024*1024,J=6e4,v=new WeakMap,z=L("evidence-content-hash",{clearGroups:["whole-project","source-file"]}),q=R("evidence-project-fingerprint",{clearGroups:["whole-project"]}),u="evidence-v1",l="version NOT LIKE 'evidence-%'",C=null;function c(){return C??=`${u}+${S()}`,C}function I(t){return Y("sha256").update(t).digest("hex")}function ge(t,n,e){return z.get(t,n,()=>I(e))}function ye(t){return q.get(t,"current",()=>{try{if(!t.generation.metadataRaw)return null;let n=D(t.generation.metadataRaw);if(n.kind!=="legacy"&&n.kind!=="supported"||!n.capabilities.usableForEvidenceCache)return null;let e=n.metadata,a=[...e.indexedLanguages??[]].sort();return I(JSON.stringify({fingerprint:e.fingerprint,indexedLanguages:a,status:e.status}))}catch(n){return p("project fingerprint unavailable",n),null}})}function p(t,n){process.env.SCIP_QUERY_DEBUG&&console.error(`evidence-cache: ${t}: ${n instanceof Error?n.message:String(n)}`)}function s(t){if(v.has(t))return v.get(t)??null;let n=null;try{let e=new A(t.config.evidenceDbPath??$(F(t.config.dbPath),Q));e.pragma("journal_mode = WAL"),e.pragma("busy_timeout = 5000"),e.pragma("synchronous = NORMAL"),e.exec(`
2
+ CREATE TABLE IF NOT EXISTS file_evidence (
3
+ kind TEXT NOT NULL,
4
+ relative_path TEXT NOT NULL,
5
+ content_hash TEXT NOT NULL,
6
+ version TEXT NOT NULL,
7
+ payload TEXT NOT NULL,
8
+ PRIMARY KEY (kind, relative_path)
9
+ );
10
+ CREATE TABLE IF NOT EXISTS project_evidence (
11
+ kind TEXT NOT NULL,
12
+ cache_key TEXT NOT NULL,
13
+ project_fingerprint TEXT NOT NULL,
14
+ version TEXT NOT NULL,
15
+ payload TEXT NOT NULL,
16
+ PRIMARY KEY (kind, cache_key)
17
+ );
18
+ CREATE TABLE IF NOT EXISTS semantic_callees (
19
+ relative_path TEXT NOT NULL,
20
+ symbol TEXT NOT NULL,
21
+ content_hash TEXT NOT NULL,
22
+ deps_digest TEXT NOT NULL,
23
+ version TEXT NOT NULL,
24
+ payload TEXT NOT NULL,
25
+ PRIMARY KEY (relative_path, symbol)
26
+ );
27
+ CREATE TABLE IF NOT EXISTS semantic_references (
28
+ relative_path TEXT NOT NULL,
29
+ symbol TEXT NOT NULL,
30
+ project_fingerprint TEXT NOT NULL,
31
+ version TEXT NOT NULL,
32
+ payload TEXT NOT NULL,
33
+ PRIMARY KEY (relative_path, symbol)
34
+ );
35
+ `);for(let a of["file_evidence","project_evidence"])e.prepare(`DELETE FROM ${a} WHERE version LIKE 'evidence-%' AND version != ?`).run(c());n={evidence:e,shared:Z(t.config.sharedEvidenceDbPath),readFileEvidence:e.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),readLegacyFileEvidence:e.prepare(`SELECT payload FROM file_evidence
36
+ WHERE kind = ? AND relative_path = ? AND content_hash = ? AND ${l}
37
+ ORDER BY version DESC
38
+ LIMIT 1`),existsFileEvidence:e.prepare("SELECT 1 AS present FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),existsLegacyFileEvidence:e.prepare(`SELECT 1 AS present FROM file_evidence
39
+ WHERE kind = ? AND relative_path = ? AND content_hash = ? AND ${l}
40
+ LIMIT 1`),writeFileEvidence:e.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),rekeyFileEvidence:e.prepare("UPDATE file_evidence SET content_hash = ?, version = ? WHERE kind = ? AND relative_path = ? AND content_hash = ?"),readProjectEvidence:e.prepare("SELECT payload FROM project_evidence WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND version = ?"),readLegacyProjectEvidence:e.prepare(`SELECT payload FROM project_evidence
41
+ WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND ${l}
42
+ ORDER BY version DESC
43
+ LIMIT 1`),writeProjectEvidence:e.prepare("INSERT OR REPLACE INTO project_evidence (kind, cache_key, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)"),rekeyProjectEvidenceKind:e.prepare("UPDATE project_evidence SET project_fingerprint = ?, version = ? WHERE kind = ? AND project_fingerprint = ?"),readCallees:e.prepare(`SELECT payload FROM semantic_callees
44
+ WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCallees:e.prepare(`SELECT payload FROM semantic_callees
45
+ WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND ${l}
46
+ ORDER BY version DESC
47
+ LIMIT 1`),readCalleesForFile:e.prepare(`SELECT symbol, payload FROM semantic_callees
48
+ WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCalleesForFile:e.prepare(`SELECT symbol, payload FROM semantic_callees
49
+ WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND ${l}
50
+ ORDER BY symbol, version DESC`),writeCallees:e.prepare(`INSERT OR REPLACE INTO semantic_callees
51
+ (relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:e.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?"),readReferences:e.prepare(`SELECT payload FROM semantic_references
52
+ WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferences:e.prepare(`SELECT payload FROM semantic_references
53
+ WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND ${l}
54
+ ORDER BY version DESC
55
+ LIMIT 1`),readReferencesForFile:e.prepare(`SELECT symbol, payload FROM semantic_references
56
+ WHERE relative_path = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferencesForFile:e.prepare(`SELECT symbol, payload FROM semantic_references
57
+ WHERE relative_path = ? AND project_fingerprint = ? AND ${l}
58
+ ORDER BY symbol, version DESC`),writeReferences:e.prepare(`INSERT OR REPLACE INTO semantic_references
59
+ (relative_path, symbol, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)`),dropStaleReferences:e.prepare("DELETE FROM semantic_references WHERE relative_path = ? AND project_fingerprint != ?")}}catch(e){p("disabled (open failed)",e)}return v.set(t,n),n}function d(t,n,e){p(`disabled (${n})`,e),v.set(t,null)}function Z(t){if(!t)return null;try{B(F(t),{recursive:!0});let n=new A(t);return n.pragma("journal_mode = WAL"),n.pragma("busy_timeout = 250"),n.pragma("synchronous = NORMAL"),n.exec(`
60
+ CREATE TABLE IF NOT EXISTS file_evidence (
61
+ kind TEXT NOT NULL,
62
+ relative_path TEXT NOT NULL,
63
+ content_hash TEXT NOT NULL,
64
+ version TEXT NOT NULL,
65
+ payload TEXT NOT NULL,
66
+ last_accessed_at INTEGER NOT NULL,
67
+ PRIMARY KEY (kind, relative_path, content_hash, version)
68
+ );
69
+ CREATE INDEX IF NOT EXISTS idx_file_evidence_lru
70
+ ON file_evidence(last_accessed_at, kind, relative_path, content_hash, version);
71
+ `),{evidence:n,readFileEvidence:n.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),existsFileEvidence:n.prepare("SELECT 1 AS present FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),writeFileEvidence:n.prepare(`INSERT INTO file_evidence (kind, relative_path, content_hash, version, payload, last_accessed_at)
72
+ VALUES (?, ?, ?, ?, ?, ?)
73
+ ON CONFLICT(kind, relative_path, content_hash, version)
74
+ DO UPDATE SET payload = excluded.payload, last_accessed_at = excluded.last_accessed_at`),touchFileEvidence:n.prepare(`UPDATE file_evidence
75
+ SET last_accessed_at = ?
76
+ WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?
77
+ AND last_accessed_at < ?`)}}catch(n){return p("shared cache disabled (open failed)",n),null}}function h(t,n,e){p(`shared cache disabled (${n})`,e);try{t.shared?.evidence.close()}catch{}t.shared=null}function me(t,n,e,a){let r=s(t);if(!r)return null;try{let i=r.readFileEvidence.get(n,e,a,c())??r.readLegacyFileEvidence.get(n,e,a);if(i?.payload!==void 0)return i.payload;if(!_.has(n)||!r.shared)return null;try{let o=r.shared.readFileEvidence.get(n,e,a,c());return o?.payload!==void 0&&O(r.shared,n,e,a),o?.payload??null}catch(o){return h(r,"file_evidence read",o),null}}catch(i){return d(t,"file_evidence read",i),null}}function Ne(t,n,e,a){let r=s(t);if(!r)return!1;try{if((r.existsFileEvidence.get(n,e,a,c())??r.existsLegacyFileEvidence.get(n,e,a))?.present!==void 0)return!0;if(!_.has(n)||!r.shared)return!1;try{return r.shared.existsFileEvidence.get(n,e,a,c())?.present===void 0?!1:(O(r.shared,n,e,a),!0)}catch(o){return h(r,"file_evidence exists",o),!1}}catch(i){return d(t,"file_evidence exists",i),!1}}function O(t,n,e,a){let r=Date.now();try{t.touchFileEvidence.run(r,n,e,a,c(),r-J)}catch(i){p("shared file_evidence recency touch skipped",i)}}function Te(t,n,e,a,r){let i=s(t);if(i)try{if(i.writeFileEvidence.run(n,e,a,c(),r),_.has(n)&&i.shared)try{i.shared.writeFileEvidence.run(n,e,a,c(),r,Date.now())}catch(o){h(i,"file_evidence write",o)}}catch(o){d(t,"file_evidence write",o)}}function De(t,n){if(n.length===0)return;let e=s(t);if(e)try{e.evidence.transaction(()=>{for(let r of n)e.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,c(),r.payload)})();try{e.evidence.pragma("wal_checkpoint(TRUNCATE)")}catch{}let a=n.filter(r=>_.has(r.kind));if(a.length>0&&e.shared)try{e.shared.evidence.transaction(()=>{for(let r of a)e.shared.writeFileEvidence.run(r.kind,r.relativePath,r.contentHash,c(),r.payload,Date.now())})()}catch(r){h(e,"file_evidence batch write",r)}}catch(a){d(t,"file_evidence batch write",a)}}function Se(t,n,e,a){let r=s(t);if(!r)return null;try{return(r.readProjectEvidence.get(n,e,a,c())??r.readLegacyProjectEvidence.get(n,e,a))?.payload??null}catch(i){return d(t,"project_evidence read",i),null}}function Re(t,n,e,a,r){let i=s(t);if(i)try{i.writeProjectEvidence.run(n,e,a,c(),r)}catch(o){d(t,"project_evidence write",o)}}function Le(t,n,e,a){if(e===a)return 0;let r=s(t);if(!r)return 0;try{return r.rekeyProjectEvidenceKind.run(a,c(),n,e).changes}catch(i){return d(t,"project_evidence kind rekey",i),0}}function Ce(t,n,e,a){let r=s(t);if(!r)return new Map;try{let i=r.readCalleesForFile.all(n,e,a,u),o=r.readLegacyCalleesForFile.all(n,e,a);return b([...o,...i])}catch(i){return d(t,"semantic_callees bulk read",i),new Map}}function Fe(t,n,e){let a=s(t);if(!a)return new Map;try{let r=a.readReferencesForFile.all(n,e,u),i=a.readLegacyReferencesForFile.all(n,e);return b([...i,...r])}catch(r){return d(t,"semantic_references bulk read",r),new Map}}function b(t){let n=new Map;for(let e of t)n.set(e.symbol,e.payload);return n}function Ae(t,n){if(n.length===0)return;let e=s(t);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of n){let i=`${r.relativePath}\0${r.contentHash}`;a.has(i)||(a.add(i),e.dropStaleCallees.run(r.relativePath,r.contentHash)),e.writeCallees.run(r.relativePath,r.symbol,r.contentHash,r.depsDigest,u,r.payload)}})()}catch(a){d(t,"semantic_callees write",a)}}function Ie(t,n){if(n.length===0)return;let e=s(t);if(e)try{e.evidence.transaction(()=>{let a=new Set;for(let r of n){let i=`${r.relativePath}\0${r.projectFingerprint}`;a.has(i)||(a.add(i),e.dropStaleReferences.run(r.relativePath,r.projectFingerprint)),e.writeReferences.run(r.relativePath,r.symbol,r.projectFingerprint,u,r.payload)}})()}catch(a){d(t,"semantic_references write",a)}}import{appendFileSync as ee,mkdirSync as ne}from"fs";import{createHash as te,randomUUID as re}from"crypto";import{dirname as ae}from"path";import{performance as E}from"perf_hooks";var M="SCIP_QUERY_PROFILE",k="SCIP_QUERY_PROFILE_OUT",U="SCIP_QUERY_PROFILE_COMMAND",j="SCIP_QUERY_PROFILE_CACHE_STATE",m="SCIP_QUERY_PROFILE_RUN_ID",N="SCIP_QUERY_PROFILE_WORKLOAD_IDENTITY",T="SCIP_QUERY_PROFILE_WORKLOAD_IDENTITY_KIND",K=[M,k,U,j,m,N,T],Me=new Set(K),w=new Set,P=new Map,x=!1;function f(){let t=process.env[M];return t==="1"||t==="true"}function ie(){return process.env[k]}function H(){return process.env[U]}function oe(){return process.env[j]}function W(){let t=process.env[m];if(t)return t;if(!f())return;let n=re();return process.env[m]=n,n}function X(){return process.env[N]}function ce(t){let n=X();if(n)return n;if(!f())return;let e=W();if(!e)return;let a=t.projectFingerprint?"published-project":"run-only",r=V(["profile-workload-v1",t.toolVersion,t.command,t.projectFingerprint??e]);return process.env[N]=r,process.env[T]=a,r}function V(t){return te("sha256").update(JSON.stringify(t)).digest("hex").slice(0,24)}function ke(){return Object.fromEntries(K.flatMap(t=>{let n=process.env[t];return n===void 0?[]:[[t,n]]}))}function Ue(t,n,e){if(!f())return n();let a=E.now();try{let r=n();return g({type:"span",name:t,durationMs:Math.round(E.now()-a),ok:!0,...y(e)??{}}),r}catch(r){throw g({type:"span",name:t,durationMs:Math.round(E.now()-a),ok:!1,error:r instanceof Error?r.message:String(r),...y(e)??{}}),r}}async function je(t,n,e){if(!f())return n();let a=E.now();try{let r=await n();return g({type:"span",name:t,durationMs:Math.round(E.now()-a),ok:!0,...y(e)??{}}),r}catch(r){throw g({type:"span",name:t,durationMs:Math.round(E.now()-a),ok:!1,error:r instanceof Error?r.message:String(r),...y(e)??{}}),r}}function g(t,n=ie()){let e=se(t),a={timestamp:new Date().toISOString(),pid:process.pid,runId:W(),command:H(),cacheState:oe(),...e,...t},r=`${JSON.stringify(a)}
78
+ `;if(n)try{let i=ae(n);w.has(i)||(ne(i,{recursive:!0}),w.add(i)),ee(n,r);return}catch(i){x||(x=!0,process.stderr.write(`[profile] failed to write ${n}: ${i instanceof Error?i.message:String(i)}
79
+ `));return}f()&&process.stderr.write(r)}function se(t){let n=X()??ce({command:H()??"unknown",toolVersion:"unknown",projectFingerprint:null});if(!n)return{};let e=process.env[T],a=typeof t.name=="string"?t.name:void 0;if(!a)return{workloadIdentity:n,workloadIdentityKind:e};let r=a.split(/[.:]/,1)[0]??a,i=`${n}\0${a}`,o=P.get(i);return o||(o=V(["profile-subsystem-v1",n,a]),P.set(i,o)),{workloadIdentity:n,workloadIdentityKind:e,subsystem:r,subsystemWorkIdentity:o}}function y(t){return typeof t=="function"?t():t}export{Q as a,c as b,I as c,ge as d,ye as e,me as f,Ne as g,Te as h,De as i,Se as j,Re as k,Le as l,Ce as m,Fe as n,Ae as o,Ie as p,f as q,V as r,ke as s,Ue as t,je as u,g as v};
80
+ //# sourceMappingURL=chunk-GVWX5T43.js.map
@@ -0,0 +1,2 @@
1
+ var h=[];function p(e){e.groups.length>0&&h.push(e)}function P(e,t){let a=new Set(t.groups);for(let s of h)s.groups.some(n=>a.has(n))&&(t.file!==void 0&&s.clearFile?s.clearFile(e,t.file):s.clearAll(e))}var f=256;function b(e){let t=e.maxEntries;if(t!==void 0){if(!Number.isSafeInteger(t)||t<1)throw new Error(`Per-database cache maxEntries must be a positive safe integer; received ${t}.`);return t}return e.clearGroups.includes("source-file")?f:void 0}function C(e,t,a){e.delete(t),e.set(t,a)}function v(e,t){if(t!==void 0)for(;e.size>t;){let a=e.keys().next().value;if(a===void 0)return;e.delete(a)}}function D(){let e=new WeakMap;return{cache:e,ensure(t){let a=e.get(t);return a||(a=new Map,e.set(t,a)),a}}}function V(e,t){let{cache:a,ensure:s}=D(),n=b(t),c={get(r,i,d){let o=s(r);if(o.has(i)){let u=o.get(i);return C(o,i,u),u}let l=d();return o.set(i,l),v(o,n),l},has(r,i){return a.get(r)?.has(i)??!1},invalidate(r,i){a.get(r)?.delete(i)},invalidateAll(r){a.delete(r)},size(r){return a.get(r)?.size??0}};return p({name:e,groups:t.clearGroups,clearAll:r=>c.invalidateAll(r)}),c}function K(e,t){let a=V(e,{clearGroups:[],maxEntries:b(t)}),s=c=>c.replace(/\\/g,"/"),n={get:(c,r,i)=>a.get(c,s(r),i),has:(c,r)=>a.has(c,s(r)),invalidate:(c,r)=>a.invalidate(c,s(r)),invalidateAll:a.invalidateAll,size:a.size};return p({name:e,groups:t.clearGroups,clearAll:n.invalidateAll,clearFile:n.invalidate}),n}function A(e,t){let a=new WeakMap,s={get(n,c){let r=a.get(n);if(r)return r.value;let i=c();return a.set(n,{value:i}),i},invalidate(n){a.delete(n)},has(n){return a.has(n)}};return p({name:e,groups:t.clearGroups,clearAll:n=>s.invalidate(n)}),s}var S={clearGroups:["whole-project","source-file"],maxEntries:f};function G(e){return m(e,S)}function m(e,t){let{cache:a,ensure:s}=D(),n=b(t),c={get(r,i,d,o){i=i.replace(/\\/g,"/");let l=s(r),u=l.get(i);if(u&&u.source===d)return C(l,i,u),u.value;let g=o();return l.set(i,{source:d,value:g}),v(l,n),g},invalidate(r,i){a.get(r)?.delete(i.replace(/\\/g,"/"))},invalidateAll(r){a.delete(r)}};return p({name:e,groups:t.clearGroups,clearAll:r=>c.invalidateAll(r),clearFile:(r,i)=>c.invalidate(r,i)}),c}export{p as a,P as b,V as c,K as d,A as e,G as f,m as g};
2
+ //# sourceMappingURL=chunk-GZKFETP5.js.map
@@ -0,0 +1,9 @@
1
+ import{a as K}from"./chunk-PAVGPRHJ.js";import{c as H}from"./chunk-OGFV2BUX.js";import{g as Y,z as D}from"./chunk-ZHMRSZFD.js";import{b}from"./chunk-QIWXRW72.js";import{b as E,d as z}from"./chunk-QXEUDXBT.js";import{C as L,H as C,P as k,Y as y,ca as U,k as x,m as A,n as p,w as R}from"./chunk-J5FJMODQ.js";import{f as T}from"./chunk-GZKFETP5.js";import{c as B,d as $,l as j}from"./chunk-YULZRALL.js";import{j as I}from"./chunk-U5RIG3JP.js";import{basename as He,extname as ie}from"path";var ge=12,be=280;function N(e,n,t,r){let i=ye(e,n,t,r);if(i.size===0)return xe();let o=[],s=new Set,a=(l,c,d,f)=>{if(c===n&&d<=r&&f>=t)return;let m=`${c}:${d}:${f}:${l}`;s.has(m)||(s.add(m),o.push({name:l,relativePath:c,startLine:d,endLine:f}))};for(let l of y(e,n))i.has(l.leaf)&&a(l.leaf,l.relativePath,l.startLine,l.endLine);Le(e,n,i,a),o.sort(G);let u=o.map(l=>{let c=Se(e,l);return c?{...l,source:c}:null}).filter(l=>l!==null).slice(0,ge);return F(u)}function W(e,n=[]){return F(Ce(e.flatMap(t=>t?.inline??[]),n))}function ye(e,n,t,r){let i=C(e,n),o=new Set;if(!i)return o;for(let s=t;s<=r;s+=1)for(let a of i.identifiersByLine[s]??[])o.add(a);return o}function Se(e,n){if(n.startLine!==n.endLine)return null;let t=(p(e,n.relativePath)[n.startLine]??"").trim();if(!t||t.length>be)return null;let r=t.indexOf("=");if(r<0||t[r+1]===">")return null;let i=t.slice(r+1).replace(/(?:\/\/|#).*$/u,"").trim();return Ne(i)?t:null}function Ce(e,n){let t=new Map;for(let r of e){if(ve(r,n))continue;let i=`${r.relativePath}:${r.startLine}:${r.endLine}:${r.name}`;t.has(i)||t.set(i,{...r})}return[...t.values()].sort(G)}function ve(e,n){return n.some(t=>t.relativePath===e.relativePath&&t.startLine<=e.startLine&&t.endLine>=e.endLine)}function G(e,n){return e.relativePath.localeCompare(n.relativePath)||e.startLine-n.startLine||e.name.localeCompare(n.name)}function F(e){return{coverage:"indexed-project-literal-values",inline:e}}function xe(){return F([])}function Le(e,n,t,r){for(let i of k(e,n)){let o=i.localName;if(!o||!t.has(o)||!i.sourcePath||i.kind==="namespace")continue;let s=i.importedName==="default"?o:i.importedName;for(let a of Y(e,i.sourcePath,s,{maxReexportDepth:3}))r(o,a.relativePath,a.startLine,a.endLine)}}function Ne(e){if(!e||e.includes("${")||/\b(?:function|class|struct|interface|trait|enum|lambda)\b/u.test(e))return!1;let t=e.replace(/(['"`])(?:\\.|(?!\1).)*\1/gu,"").replace(/\b(?:0[xX][\dA-Fa-f_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?)n?\b/gu,""),r=new Set(["true","false","null","undefined","None","True","False"]);return!(t.match(/[A-Za-z_][A-Za-z0-9_]*/gu)??[]).some(o=>!r.has(o))}function q(e,n){let t=H(e,n);if(!t)return[];if(b(e,t)?.freshness.semantic.state==="stale")throw new Error(`Compiler ownership is stale for ${t}. Reindex or read the current file with code.`);let i=U(e,[t],{sort:!0});if(i.length===0)return[];let o=Math.max(0,A(x(e,t)).length-1),s=i.map(c=>({symbol:c.symbol,shortName:c.shortName,startLine:c.startLine,endLine:Math.min(c.endLine,o),signature:c.signature,children:[]})),a=new Map;for(let c of s)a.set(c.symbol,c);let u=[],l=new Map;for(let c=0;c<i.length;c++){let d=i[c],f=s[c];if(d.enclosingSymbol&&a.has(d.enclosingSymbol)){let g=a.get(d.enclosingSymbol);g.children.push(f),l.set(f,g);continue}let m=_e(f,s);m?(m.children.push(f),l.set(f,m)):u.push(f)}return we(t,s,l),u}function _e(e,n){let t=null,r=1/0;for(let i of n)if(i!==e&&i.startLine<=e.startLine&&i.endLine>=e.endLine){if(i.startLine===e.startLine&&i.endLine===e.endLine&&!j(i.symbol,e.symbol))continue;let s=i.endLine-i.startLine;s<r&&(r=s,t=i)}return t}function we(e,n,t){let r=new Set;for(let i of n){let o=new Set,s=i;for(;s&&!r.has(s);){if(o.has(s))throw new Error(`Cyclic compiler ownership in ${e}. Reindex before using this outline.`);o.add(s),s=t.get(s)}for(let a of o)r.add(a)}}var Re=64,Be=T("behavior-construct-ranges");var Ee=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],Bn=[...Ee,"lifecycle"];function V(e,n,t,r,i=[]){let o=i.filter(c=>c>=t&&c<=r),s=Be.get(e,n,x(e,n)??"",()=>new Map),a=`${t}:${r}:${o.join(",")}`,u=s.get(a);if(u)return s.delete(a),s.set(a,u),{startLine:u[0],endLine:u[1]};let l=Fe(e,n,t,r,o);if(s.set(a,[l.startLine,l.endLine]),s.size>Re){let c=s.keys().next().value;c!==void 0&&s.delete(c)}return l}function De(e,n,t,r,i){let o=[],s=r[0],a=s;for(let l of r)s=Math.min(s,l),a=Math.max(a,l);return Z(e,s,a,l=>{Ae(l)&&l.startPosition.row>=n&&l.endPosition.row<=t&&r.every(c=>l.startPosition.row<=c&&l.endPosition.row>=c)&&o.push(l),R.has(l.type)&&l.startPosition.row>=n&&l.endPosition.row<=t&&r.every(c=>l.startPosition.row<=c&&l.endPosition.row>=c)&&i.push(l)}),o.sort((l,c)=>l.endPosition.row-l.startPosition.row-(c.endPosition.row-c.startPosition.row)||l.startPosition.row-c.startPosition.row)[0]}function Fe(e,n,t,r,i){let o=L(e,n),s=[];if(i.length>0&&o){let c=De(o.rootNode,t,r,i,s);if(c)return{startLine:c.startPosition.row,endLine:c.endPosition.row}}let a=ke(e,n,t,r);if(a)return{startLine:a.startLine,endLine:a.endLine};if(i.length===0)return{startLine:t,endLine:r};let u=(C(e,n)?.callables??[]).filter(c=>c.startLine>=t&&c.endLine<=r&&i.every(d=>c.startLine<=d&&c.endLine>=d)).sort((c,d)=>c.endLine-c.startLine-(d.endLine-d.startLine)||c.startLine-d.startLine)[0];if(!o)return X(u,t,r);let l=s.sort((c,d)=>c.endPosition.row-c.startPosition.row-(d.endPosition.row-d.startPosition.row)||c.startPosition.row-d.startPosition.row)[0];return l?{startLine:l.startPosition.row,endLine:l.endPosition.row}:X(u,t,r)}var Pe=new Set(["do_statement","enhanced_for_statement","for_expression","for_in_statement","for_of_statement","for_statement","loop_expression","while_statement"]),Me=new Set(["match_expression","match_statement","switch_expression","switch_statement"]);var Oe=new Set(["try_expression","try_statement"]),Ie=new Set(["catch_clause","except_clause","rescue"]),Te=new Set(["ensure","finally_clause"]);function Ae(e){return R.has(e.type)||Pe.has(e.type)||Me.has(e.type)||Oe.has(e.type)||Ie.has(e.type)||Te.has(e.type)}function ke(e,n,t,r){return C(e,n)?.callables.filter(i=>i.startLine<=t&&i.endLine>=r).sort((i,o)=>i.endLine-i.startLine-(o.endLine-o.startLine)||i.startLine-o.startLine)[0]}function Z(e,n,t,r){r(e);for(let i of e.namedChildren)i.startPosition.row>n||i.endPosition.row<t||Z(i,n,t,r)}function X(e,n,t){return e?{startLine:e.startLine,endLine:e.endLine}:{startLine:n,endLine:t}}var $e=new Set(["arrow_function","class_declaration","constructor_declaration","field_definition","function_declaration","function_definition","function_expression","function_item","generator_function_declaration","generator_function","lexical_declaration","method","method_declaration","method_definition","object_method","variable_declaration"]);function P(e,n,t){let r=L(e,n)?.rootNode??null,i=je(r,t);if(!i)return null;let o=p(e,n);if(o.length===0)return null;let s=Math.max(0,i.startPosition.row),a=i.endPosition.column===0?i.endPosition.row-1:i.endPosition.row;return{type:i.type,startLine:s,endLine:Math.min(o.length-1,Math.max(s,a))}}function Mn(e,n,t,r,i){let o=V(e,n,r,i,[t]),s=Ue(e,n,o);if(!s&&(o.startLine>r||o.endLine<i))return o;let a=P(e,n,t);return s&&a?{startLine:a.startLine,endLine:a.endLine}:a&&a.startLine>=r&&a.endLine<=i?{startLine:a.startLine,endLine:a.endLine}:{startLine:r,endLine:i}}function je(e,n){if(!e||!ee(e,n))return null;let t=Q(e,n);for(;t;){if($e.has(t.type))return t;t=t.parent}return null}function Q(e,n){let t=e.namedChildren.filter(r=>ee(r,n)).sort((r,i)=>J(r)-J(i));return t.length>0?Q(t[0],n):e}function ee(e,n){return e.startPosition.row<=n&&e.endPosition.row>=n}function J(e){return e.endIndex-e.startIndex}function Ue(e,n,t){return t.startLine===t.endLine&&/(?:=>|\(|\{|\[|,)\s*$/u.test(p(e,n)[t.startLine]??"")}function Ye(e,n,t,r){if(!Number.isSafeInteger(t)||t<0)return null;if(!Number.isSafeInteger(r)||r<0)throw new RangeError(`contextLines must be a non-negative safe integer; received ${r}`);let i=p(e,n);if(i.length===0||t>=i.length)return null;let o=Math.max(0,t-r),s=Math.min(i.length-1,t+r);return{relativePath:n,startLine:o,endLine:s,focusLine:t,source:i.slice(o,s+1).join(`
2
+ `)}}function ne(e,n,t,r,i=6){if(!Number.isSafeInteger(r)||r<=0)throw new RangeError(`maxLines must be a positive safe integer; received ${r}`);let o=p(e,n);if(o.length===0||t<0||t>=o.length)return null;let s=P(e,n,t);if(!s){let h=Ye(e,n,t,i);return h?{...h,unitType:null,unitStartLine:h.startLine,unitEndLine:h.endLine,omittedLines:0}:null}let a=s.startLine,u=s.endLine,l=u-a+1,c=Math.min(l,r),d=t-a-Math.floor(c/2),f=Math.max(0,Math.min(l-c,d)),m=a+f,g=m+c-1;return{relativePath:n,startLine:m,endLine:g,focusLine:t,source:o.slice(m,g+1).join(`
3
+ `),unitType:s.type,unitStartLine:a,unitEndLine:u,omittedLines:l-c}}function Xn(e,n,t={}){let{context:r=0}=t,i=he(n);if(i)return pe(e,i.filePath,i.startLine,i.endLine,r);let o=fe(e,n);if(o)return le(e,o);if(de(n))return null;let s=E(e,n);if(s.candidates.length>0)throw new Error(`Ambiguous symbol: ${n}. Use an exact selector or codeBatch.`);return s.match?v(e,s.match,r):null}function Vn(e,n,t={}){if(n.length===0)throw new RangeError("code requires at least one selector.");if(n.length>24)throw new RangeError(`code accepts at most ${24} selectors per complete packet; received ${n.length}.`);let r=t.context??0,i=t.members??"exported",o=n.map(u=>Ke(e,u,r,i,t.localCalls??!1)),s=o.flatMap(u=>u.results),a=s.map(u=>({relativePath:u.relativePath,startLine:u.startLine,endLine:u.endLine}));return{requested:n.length,matched:o.filter(u=>u.status==="matched").length,ambiguous:o.filter(u=>u.status==="ambiguous").length,missing:o.filter(u=>u.status==="missing").length,entries:o,bindingClosure:W(s.map(u=>u.bindingClosure),a)}}function Ke(e,n,t,r,i){let o=he(n);if(o){let l=pe(e,o.filePath,o.startLine,o.endLine,t);return l?i?Ge(e,n,l,t):te(n,l):_(e,n,"definition-source-unreadable")}let s=fe(e,n);if(s)return Ze(e,n,s,t,r);if(de(n))return _(e,n,"definition-not-found");let a=E(e,n);if(!a.match)return _(e,n,"definition-not-found");if(a.total>1)return We(e,n,a,t);let u=v(e,a.match,t);return u?te(n,u):_(e,n,b(e,a.match.relativePath)?.freshness.semantic.state==="stale"?"definition-index-stale":"definition-source-unreadable")}function We(e,n,t,r){let i=sn(e,t),o=i.map(me),s=t.total<=4&&i.length===t.total;return{selector:n,status:"ambiguous",kind:"source",totalCandidates:t.total,results:s?i.flatMap(a=>{let u=v(e,a,r);return u?[u]:[]}):[],definitions:[],candidates:o,omittedCandidates:Math.max(0,t.total-o.length),suggestions:[]}}function Ge(e,n,t,r){let i=y(e,t.relativePath).filter(l=>!re(l,t.relativePath)),o=qe(e,t,i),s=ae(o.map(l=>v(e,l,r)).filter(l=>l!==null)).filter(l=>!ue(t,l)),a=new Set(s.map(l=>l.symbol)),u=o.filter(l=>!a.has(l.symbol)&&!(t.startLine<=l.startLine&&t.endLine>=l.endLine)).map(me);return{selector:n,status:"matched",kind:"source",totalCandidates:1,results:[t,...s],definitions:[],candidates:[],omittedCandidates:0,suggestions:[],rangeCoverage:{basis:"requested-range-and-same-file-call-closure",referencedDefinitions:o.length,returnedDefinitions:o.length-u.length,returnedBodies:s.length,omittedDefinitions:u.length,omittedLedger:u}}}function qe(e,n,t){if(!S(n.freshness))return[];if(t.length===0)return[];let r=D(e,t,{additive:!1,semantic:!1}),i=new Map;for(let s of t){let a=i.get(s.symbol)??[];a.push(s),i.set(s.symbol,a)}let o=Xe(n,t,r,i);return se(e,[...o.values()],t)}function Xe(e,n,t,r){let i=new Map;for(let o of n)if(!(o.endLine<e.startLine||o.startLine>e.endLine)){for(let s of t.get(o.symbolId)??[])if(Ve(s,e))for(let a of r.get(s.symbol)??[])i.set(a.symbolId,a)}return i}function Ve(e,n){return e.file!==n.relativePath?!1:e.source!=="ast-callsite"&&e.source!=="scip-occurrence"?!0:!(e.chunkId<n.startLine||e.chunkId>n.endLine)}function Ze(e,n,t,r,i){let o=t.relativePath,s=S(t.freshness)?Qe(e,o):[],a=S(t.freshness)?y(e,o).filter(h=>!re(h,o)):[],u=a.filter(h=>K(e,h)),l=u.length>0?u:Je(s,a),c=i==="all"?[]:se(e,l,a),d=i==="all"||a.length===0?[le(e,t)]:ae(c.map(h=>v(e,h,r)).filter(h=>h!==null)),f=nn(s,d),m=tn(o,s,d),g=rn(s);return{selector:n,status:"matched",kind:"file-source",totalCandidates:1,results:d,definitions:[],candidates:[],omittedCandidates:0,suggestions:[],fileCoverage:{members:i,basis:i==="all"||a.length===0?"complete-file-source":u.length>0?"explicit-exports-and-same-file-reference-closure":"top-level-and-same-file-reference-closure",totalDefinitions:g,returnedDefinitions:f,returnedBodies:d.length,omittedDefinitions:Math.max(0,g-f),omittedLedger:m}}}function Je(e,n){let t=new Set(e.map(r=>r.symbol));return n.filter(r=>t.has(r.symbol))}function Qe(e,n){return q(e,n).flatMap(t=>en(t,n)?t.children:[t])}function re(e,n){return oe(n).has(e.leaf)}function en(e,n){return oe(n).has($(e.symbol))}function oe(e){let n=He(e);return new Set([n,n.slice(0,Math.max(0,n.length-ie(n).length))])}function se(e,n,t){if(n.length===0)return[];let r=D(e,t,{additive:!0,semantic:!1}),i=ln(t),o=new Map,s=[...n];for(;s.length>0;){let a=s.shift();if(!o.has(a.symbolId)){o.set(a.symbolId,a);for(let u of r.get(a.symbolId)??[])for(let l of i.get(u.symbol)??[])o.has(l.symbolId)||s.push(l)}}return[...o.values()].sort(on)}function ae(e){let n=[...e].sort((r,i)=>r.relativePath.localeCompare(i.relativePath)||r.startLine-i.startLine||i.endLine-r.endLine),t=[];for(let r of n)t.some(i=>ue(i,r))||t.push(r);return t}function le(e,n){let t=n.text.split(`
4
+ `);return{symbol:n.relativePath,shortName:n.relativePath,relativePath:n.relativePath,startLine:0,endLine:Math.max(0,t.length-1),language:e.get("SELECT language FROM documents WHERE relative_path = ?",n.relativePath)?.language??O(n.relativePath),source:n.text,freshness:n.freshness,...S(n.freshness)?{bindingClosure:N(e,n.relativePath,0,Math.max(0,t.length-1))}:{}}}function nn(e,n){return w(e).filter(t=>n.some(r=>M(t,r))).length}function tn(e,n,t){let r=[];return ce(r,e,n,t,0),r}function ce(e,n,t,r,i){for(let o of t){if(r.some(a=>M(o,a)))continue;let s=w(o.children).filter(a=>!r.some(u=>M(a,u))).length;e.push({symbol:o.symbol,shortName:o.shortName,relativePath:n,startLine:o.startLine,endLine:o.endLine,signature:o.signature,depth:i,nestedDefinitions:s}),ce(e,n,o.children,r,i+1)}}function w(e){return e.flatMap(n=>[n,...w(n.children)])}function rn(e){return w(e).length}function M(e,n){return n.startLine<=e.startLine&&n.endLine>=e.endLine}function ue(e,n){return e.relativePath===n.relativePath&&e.startLine<=n.startLine&&e.endLine>=n.endLine}function on(e,n){return e.startLine-n.startLine||n.endLine-e.endLine||e.symbol.localeCompare(n.symbol)}function te(e,n){return{selector:e,status:"matched",kind:"source",totalCandidates:1,results:[n],definitions:[],candidates:[],omittedCandidates:0,suggestions:[]}}function _(e,n,t){return{selector:n,status:"missing",kind:"source",totalCandidates:0,results:[],definitions:[],candidates:[],omittedCandidates:0,suggestions:z(e,n,5),reason:t}}function de(e){return/^\S+ \S+ \S+ \S+ /.test(e)?!1:/^(?:\.{1,2}[/\\]|[/\\]|[A-Za-z]:[/\\])/.test(e)?!0:e.includes(":")?!1:/[/\\]/.test(e)?!0:/\.(?:[cm]?[jt]sx?|jsonc?|mdx?|ya?ml|toml|xml|html|css|scss|sql|py|rs|go|java|kt|clj[cs]?|txt|sh)$/i.test(e)}function fe(e,n){try{return b(e,n)}catch(t){if(t instanceof I)return null;throw t}}function sn(e,n){if(!n.match)return[];let t=[n.match];for(let i of n.candidates){let o=y(e,i.relativePath).find(s=>s.symbol===i.symbol&&s.startLine===i.startLine);o&&t.push(o)}let r=new Set;return t.filter(i=>{let o=`${i.relativePath}:${i.startLine}:${i.endLine}:${i.symbol}`;return r.has(o)?!1:(r.add(o),!0)})}function me(e){return{symbol:e.symbol,shortName:B(e.symbol),relativePath:e.relativePath,startLine:e.startLine,endLine:e.endLine}}function he(e){let n=e.match(/^(.+):(\d+)-(\d+)$/);if(!n)return null;let t=Number(n[2]),r=Number(n[3]);if(!Number.isSafeInteger(t)||t<1)throw new RangeError(`Source range start line must be a positive integer, got "${n[2]}".`);if(!Number.isSafeInteger(r)||r<t)throw new RangeError(`Source range end line must be an integer at or after ${t}, got "${n[3]}".`);return{filePath:n[1],startLine:t,endLine:r}}function v(e,n,t){let r=e.get("SELECT language FROM documents WHERE relative_path = ?",n.relativePath),i=b(e,n.relativePath);if(!i||i.freshness.semantic.state==="stale")return null;let s=i.text.split(`
5
+ `),a=n.endLine<=n.startLine?ne(e,n.relativePath,n.startLine,Number.MAX_SAFE_INTEGER):null,[u,l]=a?.unitType?[a.unitStartLine,a.unitEndLine]:[n.startLine,n.endLine];if(u<0||u>=s.length||l<u)return null;let c=Math.max(0,u-t),d=Math.min(s.length-1,l+t),f=s.slice(c,d+1).join(`
6
+ `);return{symbol:n.symbol,shortName:B(n.symbol),relativePath:n.relativePath,startLine:c,endLine:d,language:r?.language??O(n.relativePath),source:f,freshness:i.freshness,...S(i.freshness)?{bindingClosure:N(e,n.relativePath,c,d)}:{}}}function pe(e,n,t,r,i){let o=b(e,n);if(!o)return null;let s=e.get("SELECT language FROM documents WHERE relative_path = ?",o.relativePath),u=o.text.split(`
7
+ `);if(t>u.length)return null;let l=Math.max(0,t-1-i),c=Math.min(u.length-1,r-1+i),d=u.slice(l,c+1).join(`
8
+ `);return{symbol:`${o.relativePath}:${t}-${r}`,shortName:`${o.relativePath}:${t}-${r}`,relativePath:o.relativePath,startLine:l,endLine:c,language:s?.language??O(o.relativePath),source:d,freshness:o.freshness,...S(o.freshness)?{bindingClosure:N(e,o.relativePath,l,c)}:{}}}function S(e){return!!(e&&e.semantic.state!=="stale"&&e.semantic.basis!=="no-compiler-document")}var an=new Map([[".ts","typescript"],[".tsx","typescript"],[".mts","typescript"],[".cts","typescript"],[".js","javascript"],[".jsx","javascript"],[".mjs","javascript"],[".cjs","javascript"],[".py","python"],[".pyi","python"],[".rs","rust"],[".go","go"],[".java","java"],[".kt","kotlin"],[".kts","kotlin"],[".scala","scala"],[".rb","ruby"],[".php","php"],[".cs","csharp"],[".vb","vb"],[".dart","dart"],[".c","c"],[".h","c"],[".cc","cpp"],[".cpp","cpp"],[".cxx","cpp"],[".hpp","cpp"],[".hh","cpp"],[".hxx","cpp"],[".vue","vue"]]);function O(e){return an.get(ie(e).toLowerCase())??null}function ln(e){let n=new Map;for(let t of e){let r=n.get(t.symbol)??[];r.push(t),n.set(t.symbol,r)}return n}export{q as a,Mn as b,Xn as c,Vn as d};
9
+ //# sourceMappingURL=chunk-H4EQHO6J.js.map
@@ -0,0 +1,2 @@
1
+ import{l as r}from"./chunk-U5RIG3JP.js";function l(t){return/(^|\/)(node_modules|dist|build|coverage|\.git|\.scipquery|\.next|\.nuxt|\.turbo|\.cache)(\/|$)/.test(t)}function p(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function f(t){let e=r(t);return i(e)?"test":u(e)?"worker":o(e)?"entry":c(e)?"barrel":"source"}var n=[/(?:^|\/)(?:e2e|cypress|playwright)\//i,/\.(?:test|spec)\.[a-z0-9]+$/i,/(?:^|\/)(?:_)?test_[^/]+$/i,/(?:^|\/)spec_[^/]+$/i,/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i,/(?:^|\/)[^/]+_tests\.rs$/i,/(?:^|\/)tests\.rs$/i,/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i,/(?:^|\/)__tests__\//i,/(?:^|\/)test\//i,/(?:^|\/)tests\//i,/(?:^|\/)__fixtures__\//i,/(?:^|\/)__mocks__\//i,/(?:^|\/)test-support\//i,/(?:^|\/)test-utils\//i,/(?:^|\/)testing\//i];function i(t){return n.some(e=>e.test(t))}function u(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}var a=new Set(["cli.ts","cli.js","postinstall.ts","postinstall.js","main.ts","main.js","main.rs","main.go","main.py","build.rs","lib.rs"]);function o(t){let e=t.split("/"),s=e[e.length-1]??t;return a.has(s)||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:s==="index.ts"||s==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:e.length<=2:!1}function c(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{l as a,p as b,f as c};
2
+ //# sourceMappingURL=chunk-H73WY2RM.js.map
@@ -0,0 +1,60 @@
1
+ import{a as f,h as u}from"./chunk-62BDNPMI.js";import h from"ignore";import{existsSync as y,readdirSync as b}from"fs";import{dirname as a,isAbsolute as m,join as c,relative as v,resolve as T}from"path";function B(n){let t=h();return x(n,t)||t.add($),{isIgnored:e=>d(t,n,e),filter:e=>e.filter(r=>!d(t,n,r))}}function x(n,t){let i=new Set,e=(s,l)=>{if(!(i.has(s)||!y(s)))try{let g=u(s,{maxBytes:f,inputKind:"gitignore file"});t.add(l?S(g,l):g),i.add(s)}catch{}},r=a(n),o=0;for(;r!==a(r)&&o<5&&(e(c(r,".gitignore"),""),!y(c(r,".git")));)r=a(r),o++;return p(n,"",t,e),i.size>0}function p(n,t,i,e){let r=t?c(n,t):n;e(c(r,".gitignore"),t);let o;try{o=b(r,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let l=t?`${t}/${s.name}`:s.name;d(i,n,`${l}/`)||p(n,l,i,e)}}function S(n,t){let i=t.replaceAll("\\","/").replace(/\/+$/,"");return n.split(/\r?\n/).map(e=>_(e,i)).join(`
2
+ `)}function _(n,t){let i=n.trimStart();if(!i||i.startsWith("#"))return n;let e=n.slice(0,n.length-i.length),r=i.startsWith("!"),o=r?i.slice(1):i;if(!o||o.startsWith("#"))return n;let s=F(o,t);return`${e}${r?"!":""}${s}`}var $=`
3
+ # Dependencies
4
+ node_modules/
5
+ vendor/
6
+ .bundle/
7
+
8
+ # Build output
9
+ dist/
10
+ build/
11
+ out/
12
+ target/
13
+ bin/
14
+ obj/
15
+
16
+ # Python
17
+ __pycache__/
18
+ *.pyc
19
+ *.pyo
20
+ .venv/
21
+ venv/
22
+ .env/
23
+ env/
24
+ *.egg-info/
25
+
26
+ # Rust
27
+ target/
28
+
29
+ # Java / Kotlin / Scala
30
+ *.class
31
+ .gradle/
32
+ .mvn/
33
+
34
+ # C# / .NET
35
+ bin/
36
+ obj/
37
+ packages/
38
+
39
+ # Go
40
+ vendor/
41
+
42
+ # Dart
43
+ .dart_tool/
44
+ build/
45
+
46
+ # PHP
47
+ vendor/
48
+
49
+ # IDE / OS
50
+ .idea/
51
+ .vscode/
52
+ *.swp
53
+ *.swo
54
+ .DS_Store
55
+ Thumbs.db
56
+
57
+ # Type definitions (often noise in queries)
58
+ *.d.ts
59
+ `;function d(n,t,i){let e=A(t,i);if(!e)return!1;try{return n.ignores(e)}catch{return!1}}function A(n,t){if(!t||t===".")return null;if(!m(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let i=m(t)?t:T(n,t),e=v(n,i).replaceAll("\\","/");return!e||e==="."||e.startsWith("..")?null:e}function F(n,t){let i=n.startsWith("/"),e=i?n.slice(1):n;return(e.endsWith("/")?e.slice(0,-1):e).includes("/")||i?`${t}/${e}`:`${t}/**/${e}`}export{B as a};
60
+ //# sourceMappingURL=chunk-H75GSPRV.js.map
@@ -0,0 +1,61 @@
1
+ import{a}from"./chunk-KI6NBKDY.js";import{a as l}from"./chunk-AOSIYPTA.js";import{b as c}from"./chunk-FMRN2TRL.js";import{b as r}from"./chunk-GCKCF5FL.js";import{d as m}from"./chunk-5D2LVK7O.js";function I(e,t){let n=c(e,t);if(n.candidates.length>0)throw new Error(`Ambiguous symbol: ${t}. Use an exact SCIP symbol or file:line.`);let s=n.match;return s?[{name:m(s.symbol),count:a(e,s.symbolId),symbol:s.symbol,definedIn:s.relativePath}]:[]}function u(e,t){let n=l(e,t);return n?e.all(`SELECT d.relative_path, COUNT(DISTINCT gs.id) AS symbol_count
2
+ FROM mentions m
3
+ JOIN chunks c ON m.chunk_id = c.id
4
+ JOIN documents d ON c.document_id = d.id
5
+ JOIN global_symbols gs ON m.symbol_id = gs.id
6
+ JOIN (
7
+ SELECT m2.symbol_id, c2.document_id
8
+ FROM mentions m2
9
+ JOIN chunks c2 ON m2.chunk_id = c2.id
10
+ WHERE m2.role = 1
11
+ GROUP BY m2.symbol_id
12
+ ) sym_def ON sym_def.symbol_id = gs.id
13
+ JOIN documents def_d ON sym_def.document_id = def_d.id
14
+ WHERE d.relative_path = ?
15
+ AND m.role != 1
16
+ AND def_d.id != d.id
17
+ GROUP BY d.id
18
+ ORDER BY symbol_count DESC, d.relative_path`,n).filter(i=>!e.isIgnored(i.relative_path)).map(i=>({name:i.relative_path,count:i.symbol_count,file:i.relative_path,basis:"external-symbol-references"})):[]}function _(e,t){let n=l(e,t);if(!n)return[];let o=r(e).get(n);return!o||o.size===0?[]:[{name:n,count:o.size,file:n,basis:"file-dependency-edges"}]}function R(e,t){let n=u(e,t);return n.length>0?n:_(e,t)}function h(e,t={}){return f(e,t).map(n=>({name:m(n.symbol),count:n.file_count,symbol:n.symbol,definedIn:n.defined_in}))}function f(e,t){let{limit:n=30,scope:s}=t,o=s?"AND instr(def_d.relative_path, ?) > 0":"",i=s?[s]:[];return e.all(`SELECT gs.symbol,
19
+ COUNT(DISTINCT c.document_id) AS file_count,
20
+ def_d.relative_path AS defined_in
21
+ FROM mentions m
22
+ JOIN chunks c ON m.chunk_id = c.id
23
+ JOIN global_symbols gs ON m.symbol_id = gs.id
24
+ JOIN (
25
+ SELECT m2.symbol_id, c2.document_id
26
+ FROM mentions m2
27
+ JOIN chunks c2 ON m2.chunk_id = c2.id
28
+ WHERE m2.role = 1
29
+ GROUP BY m2.symbol_id
30
+ ) sym_def ON sym_def.symbol_id = gs.id
31
+ JOIN documents def_d ON sym_def.document_id = def_d.id
32
+ WHERE m.role != 1
33
+ AND def_d.id != c.document_id
34
+ ${e.pathExclusionsFor("def_d")}
35
+ ${e.symbolNoiseFor("gs")}
36
+ ${o}
37
+ GROUP BY gs.id
38
+ HAVING file_count > 0
39
+ ORDER BY file_count DESC, gs.symbol
40
+ LIMIT ?`,...i,n)}function E(e,t={}){let{limit:n=30,scope:s}=t,o=s?"AND instr(d.relative_path, ?) > 0":"",i=s?[s]:[];return e.all(`SELECT d.relative_path, COUNT(DISTINCT gs.id) AS symbol_count
41
+ FROM mentions m
42
+ JOIN chunks c ON m.chunk_id = c.id
43
+ JOIN documents d ON c.document_id = d.id
44
+ JOIN global_symbols gs ON m.symbol_id = gs.id
45
+ JOIN (
46
+ SELECT m2.symbol_id, c2.document_id
47
+ FROM mentions m2
48
+ JOIN chunks c2 ON m2.chunk_id = c2.id
49
+ WHERE m2.role = 1
50
+ GROUP BY m2.symbol_id
51
+ ) sym_def ON sym_def.symbol_id = gs.id
52
+ JOIN documents def_d ON sym_def.document_id = def_d.id
53
+ WHERE m.role != 1
54
+ AND def_d.id != d.id
55
+ ${e.pathExclusionsFor("d")}
56
+ ${e.symbolNoiseFor("gs")}
57
+ ${o}
58
+ GROUP BY d.id
59
+ ORDER BY symbol_count DESC, d.relative_path
60
+ LIMIT ?`,...i,n).filter(d=>!e.isIgnored(d.relative_path)).map(d=>({name:d.relative_path,count:d.symbol_count}))}export{I as a,u as b,_ as c,R as d,h as e,E as f};
61
+ //# sourceMappingURL=chunk-HDR3AHSV.js.map
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-YNQCGEQE.js";import{f as o,sa as s}from"./chunk-5TNQJUR2.js";function P(e,r){return l(e).filter(t=>f({pattern:r,relativePath:t})).filter(t=>s(e.config.projectRoot,t)).map(t=>({relativePath:t}))}function f(e,r){let t=typeof e=="string"?{pattern:e,relativePath:r}:e;if(typeof t.pattern!="string"||typeof t.relativePath!="string")throw new TypeError("pathMatchesGlob requires pattern and relativePath.");let i=o(t.pattern),a=o(t.relativePath);if(!/[*?]/.test(i))return a.includes(i);let c=i.includes("/")?i:`**/${i}`;return n(c.split("/"),a.split("/"))}function n(e,r){if(e.length===0)return r.length===0;let[t,...i]=e;return t==="**"?n(i,r)||r.length>0&&n(e,r.slice(1)):r.length===0||!p(t??"",r[0]??"")?!1:n(i,r.slice(1))}function p(e,r){let t="^";for(let i of e)i==="*"?t+="[^/]*":i==="?"?t+="[^/]":t+=h(i);return t+="$",new RegExp(t).test(r)}function h(e){return/[\\^$.*+?()[\]{}|]/.test(e)?`\\${e}`:e}export{P as a,f as b};
2
+ //# sourceMappingURL=chunk-HQBSL74Y.js.map
@@ -0,0 +1,2 @@
1
+ function e(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function i(n){return typeof n=="string"&&Number.isFinite(Date.parse(n))}function o(n){return e(n)&&Object.values(n).every(r=>typeof r=="string"||r===null)}function s(n){return typeof n=="string"&&n.length>0}function u(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>=0}function g(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>0}var t=/^[a-f0-9]{64}$/u;function p(n){return typeof n=="string"&&t.test(n)}function c(n){return typeof n=="string"&&n.length>0&&n.length<=256&&!/[\0\r\n]/u.test(n)}function f(n){return typeof n=="number"&&Number.isFinite(n)&&n>=0}export{e as a,i as b,o as c,s as d,u as e,g as f,p as g,c as h,f as i};
2
+ //# sourceMappingURL=chunk-HRRFKWPZ.js.map
@@ -0,0 +1,2 @@
1
+ function f(l){let p=new Map,s=[],d=new Map,o=new Map,r=new Set,a=[],c=0,m=e=>(l.get(e)??[]).values();function u(e,n){d.set(e,c),o.set(e,c),c+=1,a.push(e),r.add(e),n.push({node:e,iter:m(e),pendingChild:null})}function h(e){if(o.get(e)!==d.get(e))return;let n=[];for(;;){let t=a.pop();if(r.delete(t),n.push(t),p.set(t,s.length),t===e)break}s.push(n)}function N(e){let n=e[e.length-1];if(n.pendingChild!==null){let g=n.pendingChild;n.pendingChild=null,o.set(n.node,Math.min(o.get(n.node),o.get(g)))}let t=n.iter.next();if(t.done){h(n.node),e.pop();return}let i=t.value;d.has(i)?r.has(i)&&o.set(n.node,Math.min(o.get(n.node),d.get(i))):(n.pendingChild=i,u(i,e))}for(let e of l.keys()){if(d.has(e))continue;let n=[];for(u(e,n);n.length>0;)N(n)}return{components:s,componentOf:p}}export{f as a};
2
+ //# sourceMappingURL=chunk-HXENDJC6.js.map