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
@@ -1,2 +0,0 @@
1
- import{a as y,c as _}from"./chunk-F4FNK44D.js";import{e as k}from"./chunk-WYPL7GF7.js";import{n as C,o as $}from"./chunk-7F45LJKI.js";import{execFileSync as w}from"child_process";import{createRequire as ce}from"module";import{chmodSync as le,existsSync as O}from"fs";import{platform as g,arch as S}from"os";import{dirname as de,join as q}from"path";import{createHash as N,randomUUID as G}from"crypto";import{closeSync as b,createReadStream as U,existsSync as z,fsyncSync as W,mkdirSync as K,openSync as I,renameSync as Q,unlinkSync as Y,writeSync as j}from"fs";import{homedir as X}from"os";import{dirname as D,join as E}from"path";var Z=3e5,ee=256*1024*1024;function F(e,r=process.env){let t=r.SCIP_QUERY_CACHE_DIR??(r.XDG_CACHE_HOME?E(r.XDG_CACHE_HOME,"scip-query"):E(X(),".cache","scip-query"));return E(t,e)}var s=class extends Error{constructor(t,n,i={}){super(n,i.cause===void 0?void 0:{cause:i.cause});this.kind=t;this.name="VerifiedBinaryFetchError"}kind};async function V(e){let{cachePath:r,url:t,expectedSha256:n}=e,i=e.timeoutMs??Z,o=e.maxBytes??ee,d=e.lockWaitMs??i;re(i,o,d);let a=te(t,i,e.signal);try{let c=await A(r,n,o,a.controller.signal);if(c)return{status:"cached",path:r,sha256:c};K(D(r),{recursive:!0});let l=await k(`${r}.fetch.lock`,{waitMs:d,pollMs:25,signal:a.controller.signal});if(!l)throw new s("lock-timeout",`timed out waiting ${d}ms for verified binary cache ownership at ${r}`);try{let p=await A(r,n,o,a.controller.signal);return p?{status:"cached",path:r,sha256:p}:await ne(e,a.controller,o)}finally{l.release()}}catch(c){throw a.controller.signal.aborted?f(a.controller.signal,t):c instanceof s?c:new s("stream",`failed to download ${t}: ${T(c)}`,{cause:c})}finally{clearTimeout(a.timeout),a.detachExternalAbort(),a.controller.signal.aborted||a.controller.abort()}}function re(e,r,t){if(!Number.isFinite(e)||e<=0)throw new TypeError("timeoutMs must be a positive finite number.");if(!Number.isSafeInteger(r)||r<=0)throw new TypeError("maxBytes must be a positive safe integer.");if(!Number.isFinite(t)||t<0)throw new TypeError("lockWaitMs must be a non-negative finite number.")}function te(e,r,t){let n=new AbortController,i=()=>{n.abort(new s("aborted",`download of ${e} was aborted`,{cause:t?.reason}))};t?.addEventListener("abort",i,{once:!0}),t?.aborted&&i();let o=setTimeout(()=>{n.abort(new s("timeout",`download of ${e} timed out after ${r}ms`))},r);return o.unref(),{controller:n,timeout:o,detachExternalAbort:()=>t?.removeEventListener("abort",i)}}async function A(e,r,t,n){if(!z(e))return null;let i=N("sha256"),o=0;try{for await(let a of U(e,{signal:n})){let c=Buffer.isBuffer(a)?a:Buffer.from(a);if(o+=c.length,o>t)return null;i.update(c)}}catch{if(n.aborted)throw f(n,e);return null}let d=i.digest("hex");return d===r?d:null}async function ne(e,r,t){let n=e.fetchImpl??fetch,i;try{i=await L(n(e.url,{signal:r.signal}),r.signal)}catch(l){throw r.signal.aborted?f(r.signal,e.url):new s("stream",`failed to download ${e.url}: ${T(l)}`,{cause:l})}if(!i.ok){let l=new s("http",`failed to download ${e.url}: HTTP ${i.status}`);throw r.abort(l),l}let o=ie(i,t,e.url);if(!i.body)throw new s("stream",`downloaded ${e.url} response has no readable body`);let d=`${e.cachePath}.tmp-${process.pid}-${G()}`,a,c=!1;try{a=I(d,"wx",384),c=!0;let l=i.body.getReader(),p=N("sha256"),h=0;for(;;){let{done:x,value:m}=await L(l.read(),r.signal);if(x)break;if(!(m instanceof Uint8Array))throw new s("stream",`downloaded ${e.url} produced a non-byte stream chunk`);if(h+=m.byteLength,h>t||o!==void 0&&h>o){let R=new s("length",`downloaded ${e.url} exceeded its ${o??t} byte limit`);throw r.abort(R),R}let B=Buffer.from(m.buffer,m.byteOffset,m.byteLength);p.update(B),C(a,B,{writeFile:e.writeImpl??j},"verified binary staging")}if(o!==void 0&&h!==o)throw new s("length",`downloaded ${e.url} length mismatch: declared ${o} bytes, received ${h}`);let v=p.digest("hex");if(v!==e.expectedSha256)throw new s("checksum",`downloaded ${e.url} checksum mismatch: expected ${e.expectedSha256}, got ${v}`);b(a),a=void 0;try{oe(d,e.cachePath,e.renameImpl??Q,e.syncImpl??W)}catch(x){throw new s("install",`failed to install verified binary at ${e.cachePath}`,{cause:x})}return c=!1,{status:"downloaded",path:e.cachePath,sha256:v}}catch(l){throw r.signal.aborted?f(r.signal,e.url):l instanceof s?l:new s("install",`failed to stage verified binary at ${e.cachePath}`,{cause:l})}finally{if(a!==void 0)try{b(a)}catch{}if(c)try{Y(d)}catch{}}}function ie(e,r,t){let n=e.headers?.get("content-length");if(n==null)return;if(!/^\d+$/.test(n))throw new s("length",`downloaded ${t} has an invalid Content-Length header`);let i=Number(n);if(!Number.isSafeInteger(i)||i<0)throw new s("length",`downloaded ${t} has an invalid Content-Length header`);if(i>r)throw new s("length",`downloaded ${t} declares ${i} bytes, above the ${r} byte limit`);return i}function oe(e,r,t,n){ae(e,n),t(e,r),se(D(r),n)}function ae(e,r){let t=I(e,"r");try{r(t)}finally{b(t)}}function se(e,r){let t;try{t=I(e,"r")}catch(n){if($(n,process.platform))return;throw n}try{r(t)}catch(n){if(!$(n,process.platform))throw n}finally{b(t)}}function L(e,r){return r.aborted?Promise.reject(f(r,"operation")):new Promise((t,n)=>{let i=()=>{r.removeEventListener("abort",i),n(f(r,"operation"))};r.addEventListener("abort",i,{once:!0}),e.then(o=>{r.removeEventListener("abort",i),t(o)},o=>{r.removeEventListener("abort",i),n(o)})})}function f(e,r){return e.reason instanceof Error?e.reason:new s("aborted",`verified binary operation for ${r} was aborted`)}function T(e){return e instanceof Error?e.message:String(e)}var u="v0.8.1",J="https://github.com/sourcegraph/scip",P=`github.com/sourcegraph/scip/cmd/scip@${u}`,ue=ce(import.meta.url),fe={"scip-darwin-amd64.tar.gz":"39f18be957d350bcd9ed5cb12d7781b0e237a5cb2429a107feaf9ce2d1dcd5d5","scip-darwin-arm64.tar.gz":"5b3f4a2fb1dc10c599cb3422ed0406a739060e4ac0b1222c0f43630dd0dd8221","scip-linux-amd64.tar.gz":"16b79ed98f893abd530cfa63f333527f1351008b4a23e02b9e522e34d1da6596","scip-linux-arm64.tar.gz":"876dfb680119dd6e5713077c49b27701102d598bdeba94c809173276d399c7e2"},pe="SCIP_QUERY_SCIP_BIN";function Oe(e=process.env){return e.SCIP_QUERY_SQLITE_CONVERTER==="scip-cli"}function he(e){let r=e.env[pe];if(r&&e.fileExists(r))return{source:"env",path:r};let t=e.resolveCached?.()??null;if(t)return{source:"cache",path:t};if(e.isOnPath("scip"))return{source:"path",path:"scip"};if(e.platform==="win32"){let n=e.resolveSidecar(e.arch);if(n&&e.fileExists(n))return{source:"sidecar",path:n}}return null}function me(e){for(let r of e==="arm64"?["arm64","x64"]:[e])try{return ue.resolve(`scip-query-scip-windows/scip-win32-${r}.exe`)}catch{}return null}function M(e=process.env){return ge(e)?.path??null}function ge(e=process.env){let r=he({platform:g(),arch:S(),env:e,isOnPath:y,fileExists:O,resolveSidecar:me,resolveCached:()=>ye(e)});return r?.source==="path"?{source:"path",path:_("scip")??r.path}:r}function H(e=process.env){return F(q("scip",u,"scip"),e)}function ye(e){let r=H(e);return O(r)?r:null}function be(e){return e!==null&&e.includes(u.replace(/^v/,""))}function we(){let e=M();if(!e)return null;try{return w(e,["--version"],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}).toString().trim()}catch{return null}}function Se(e=g(),r=S()){let t=ve(e,r);if(!t)return null;let n=fe[t.filename];return n?{...t,sha256:n}:null}function ve(e=g(),r=S()){let t,n,i;switch(e){case"darwin":t="darwin",i="tar.gz";break;case"linux":t="linux",i="tar.gz";break;default:return null}switch(r){case"arm64":n="arm64";break;case"x64":n="amd64";break;default:return null}let o=`scip-${t}-${n}.${i}`;return{url:`${J}/releases/download/${u}/${o}`,filename:o}}var xe={fetch:V,extract:(e,r)=>{w("tar",["-xzf",e,"-C",r,"scip"],{stdio:"pipe",timeout:12e4,killSignal:"SIGKILL"})},markExecutable:e=>le(e,493),probeVersion:e=>Ee(e),env:process.env};async function $e(e,r={}){let t={...xe,...r},n=Se();if(!n)return e(`No reviewed scip ${u} release archive is published for ${g()}/${S()}.`),null;let i=H(t.env),o=de(i),d=q(o,n.filename);e(`Downloading reviewed scip ${u} (${n.filename}, sha256 ${n.sha256.slice(0,12)}\u2026).`);try{let c=await t.fetch({cachePath:d,url:n.url,expectedSha256:n.sha256});t.extract(c.path,o),t.markExecutable(i)}catch(c){return e(`Could not install scip ${u}: ${c instanceof Error?c.message:String(c)}`),null}let a=t.probeVersion(i);return be(a)?(e(`Installed reviewed scip ${u} at ${i}.`),i):(e(`Installed scip at ${i} did not report ${u} (reported: ${a??"unavailable"}).`),null)}function Ee(e){try{return w(e,["--version"],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}).toString().trim()}catch{return null}}async function qe(e,r={}){if(g()!=="win32"&&await $e(e,r)!==null)return!0;if(y("go")){e(`Installing immutable ${P} via go install into the Go bin directory (GOBIN or GOPATH/bin); expected executable: scip.`);try{if(w("go",["install",P],{stdio:"inherit",timeout:3e5,env:process.env}),y("scip")){let t=M(),n=we();if(t&&n&&n.includes(u))return e(`Successfully installed ${P}; resolved executable: ${t}; reported version: ${n}.`),!0;e(`go install completed, but the resolved scip executable did not report ${u} (executable: ${t??"unresolved"}; version: ${n??"unavailable"}).`)}}catch(t){let n=t instanceof Error?t.message:String(t);e(`go install failed: ${n}`)}}return e("Could not auto-install scip CLI."),e(`Install manually from: ${J}/releases/tag/${u}`),!1}export{u as a,Oe as b,M as c,ge as d,be as e,we as f,$e as g,qe as h};
2
- //# sourceMappingURL=chunk-LEECKFCJ.js.map
@@ -1,2 +0,0 @@
1
- import{a as R,b as F}from"./chunk-2E7CX53V.js";import{a as k,b as C,c as V,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{P as y}from"./chunk-ZOHS7AQV.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=R(u,r=>r.tokens);return F({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=C(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return k({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return V([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
2
- //# sourceMappingURL=chunk-LMZ5PRUV.js.map
@@ -1,2 +0,0 @@
1
- import{a as g}from"./chunk-35NLDRZC.js";import{c as d}from"./chunk-XRYABF57.js";import{b as u}from"./chunk-NJITK2GP.js";import{b as f}from"./chunk-TEBQMNVI.js";function w(n,e={}){return C(n,e).cycles}function C(n,e={}){return b(n,e)}function W(n,e={}){return b(n,e).cycles}function b(n,e={}){let{scope:t,maxDepth:o=10,edgeBasis:r="symbol-references"}=e,s=f(n,t,r==="imports"?{scipEdges:"imports-only",sourceEdges:"imports-only"}:void 0),{components:a}=g(s),l=a.filter(i=>D(s,i)).map(i=>{let c=[...i].sort(),p=S(s,c),y=x(p);return{path:p,component:c,edgeBasis:r,witness:!0,classification:y==="real"?"dependency-cycle":"module-structure-candidate",kind:y}});return l.sort((i,c)=>i.kind!==c.kind?i.kind==="real"?-1:1:i.path.length-c.path.length),{cycles:l,truncated:!1,edgeBasis:r,maxDepth:o}}function D(n,e){if(e.length>1)return!0;let t=e[0];return t!==void 0&&n.get(t)?.has(t)===!0}function S(n,e){let t=e[0];if(!t)return[];let o=new Set(e);for(let r of[...n.get(t)??[]].filter(s=>o.has(s)).sort()){if(r===t)return[t,t];let s=B(n,r,t,o);if(s)return[t,...s]}throw new Error(`Cyclic component did not contain a witness path from ${t}.`)}function B(n,e,t,o){let r=[e],s=new Map([[e,null]]);for(let a=0;a<r.length;a+=1){let l=r[a];if(l===t){let i=[];for(let c=l;c!==null;c=s.get(c)??null)i.push(c);return i.reverse()}for(let i of[...n.get(l)??[]].filter(c=>o.has(c)).sort())s.has(i)||(s.set(i,l),r.push(i))}return null}function x(n){for(let o of n){let r=u(o);if(r==="test"||r==="barrel"||r==="entry")return"module-hierarchy"}if(n.length!==3)return"real";let[e,t]=n;return!e||!t?"real":d(e)||d(t)||m(e,t)||m(t,e)||h(e,t)||h(t,e)||u(e)==="entry"||u(t)==="entry"?"module-hierarchy":"real"}function m(n,e){if(!n.endsWith(".rs")||!e.endsWith(".rs"))return!1;let t=e.replace(/\.rs$/,"/");return n.startsWith(t)?!n.slice(t.length).includes("/"):!1}function h(n,e){if(!n.endsWith(".rs")||!e.endsWith(".rs"))return!1;let t=n.replace(/\.rs$/,""),o=e.replace(/\.rs$/,"");if(t===o+"_tests"||t===o+"/tests")return!0;let r=n.split("/"),s=e.split("/");if(r.length===s.length&&r.includes("tests")&&s.includes("src")){let a=r[r.length-1],l=s[s.length-1];if(a&&a===l)return!0}return!1}export{w as a,C as b,W as c,b as d};
2
- //# sourceMappingURL=chunk-LQRQN2XA.js.map
@@ -1,2 +0,0 @@
1
- import{c as t}from"./chunk-GZIUDL6G.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
- //# sourceMappingURL=chunk-LXABEJX3.js.map
@@ -1,3 +0,0 @@
1
- import{b as Z,c as q}from"./chunk-TPFHAQ2G.js";import{f as _}from"./chunk-6VVV4WRR.js";import{e as B}from"./chunk-BOJ5SVE2.js";import{c as Y}from"./chunk-CJZXN4NU.js";import{d as Q,f as V}from"./chunk-DYGHBZ2N.js";import{t as T}from"./chunk-N2ZSIIGR.js";import{n as O}from"./chunk-ODDUPDP7.js";import{k as M}from"./chunk-FESCRNVV.js";var ae=6;function ee(e,n,t){return`${e}\0${n}\0${t??n}`}function Ee(e,n,t,a={}){let o=a.limit??ae;if(!Number.isSafeInteger(o)||o<=0)throw new RangeError(`next-anchor limit must be a positive safe integer; received ${o}`);let u=a.sourceAllowed??(()=>!0),d=new Map(n.nodes.map(c=>[c.id,c])),f=new Set(t.steps.map(c=>c.nodeId)),r=new Set(t.steps.flatMap(c=>{let g=z(d.get(c.nodeId));return g?[g]:[]})),h=new Set;for(let c of t.steps)for(let g of c.behavior?.supportingDeclarations??[])r.add(g.symbol),h.add(ee(g.file,g.line,g.endLine));let b=c=>c.symbol!==null&&r.has(c.symbol)||h.has(ee(c.file,c.line,c.endLine)),y=new Map(t.steps.flatMap(c=>{if(!c.location)return[];let g=z(d.get(c.nodeId));if(!g)return[];let w=T(e,c.location.file).find(R=>R.symbol===g);return w?[[c.id,w]]:[]})),x=new Y(e).calleeMap([...y.values()],{additive:!1,semantic:!0}),l=[],i=new Set,C=new Set,m=0,A=0,L=0,S=0,I=0,p=0,s=0,N=0;for(let c of t.steps){if(!c.location||!c.behavior)continue;let g=ce(c,{db:e,topology:n,nodeById:d,returnedNodeIds:f,sourceAllowed:u,alternativeAlreadyReturned:b});l.push(...g.candidates),p+=g.upstreamCandidates,N+=g.runtimeCandidates,s+=g.resultCandidates;let w=de(c,{db:e,topology:n,nodeById:d,returnedNodeIds:f,sourceAllowed:u,alternativeAlreadyReturned:b},i);l.push(...w);let R=ue(c,{db:e,topology:n,nodeById:d,returnedNodeIds:f,sourceAllowed:u,alternativeAlreadyReturned:b},{evidencedCallsiteKeys:i,consideredCandidateKeys:C,calleeMap:x,stepDefinition:y.get(c.id)});l.push(...R.candidates),m+=R.scannedBehaviorSteps,A+=R.visibleCallsites,L+=R.identityCandidateCallsites,S+=R.ambiguousCallsites,I+=R.unresolvedCallsites}return oe(e,l,t.steps,o,{scannedBehaviorSteps:m,visibleCallsites:A,graphEvidencedCallsites:i.size,identityCandidateCallsites:L,ambiguousCallsites:S,unresolvedCallsites:I,upstreamCandidates:p,resultCandidates:s,runtimeCandidates:N},a.selectionTerms)}function ce(e,n){let t=[],a=0,o=0,u=0;if(!e.location||!e.behavior)return{candidates:t,upstreamCandidates:a,resultCandidates:o,runtimeCandidates:u};let d=n.topology.edges.filter(r=>["call","runtime-boundary"].includes(r.kind)&&(r.fromNodeId===e.nodeId||r.toNodeId===e.nodeId)&&r.disposition!=="excluded"&&r.disposition!=="unsupported");for(let r of d){let h=r.toNodeId===e.nodeId,b=h?r.fromNodeId:r.toNodeId;if(n.returnedNodeIds.has(b))continue;let y=n.nodeById.get(b);if(!y?.location||!n.sourceAllowed(y.location.file))continue;let x=r.kind==="call"?G(n.db,y):X(y);if(!x||n.alternativeAlreadyReturned(x))continue;let l=H(r,y.location.file)??y.location,i=M(n.db,l.file)[l.line]?.trim(),C=h?"upstream":"downstream",m=r.kind==="runtime-boundary"?h?"runtime-producer":"runtime-consumer":h?"caller":"callee",A=W(r.evidence),L=K(y);t.push({anchor:{id:E(e.id,l.line,y.id),status:A,source:"graph-relation",direction:C,causalRole:m,relationKind:r.kind,fromStepId:e.id,fromLabel:e.label,callsite:{file:l.file,line:l.line,endLine:l.endLine??l.line,text:i||`${y.label} \u2192 ${e.label}`,signals:["call"],calleeLeaf:L},alternatives:[x],alternativeCount:1,evidence:r.evidence}}),h&&(a+=1),r.kind==="runtime-boundary"&&(u+=1)}let f=n.topology.edges.filter(r=>r.kind==="reference"&&r.fromNodeId===e.nodeId&&r.disposition!=="excluded"&&r.disposition!=="unsupported"&&!n.returnedNodeIds.has(r.toNodeId));for(let r of f){let h=n.nodeById.get(r.toNodeId);if(!h?.location||!n.sourceAllowed(h.location.file))continue;let b=G(n.db,h);if(!b||n.alternativeAlreadyReturned(b))continue;let y=K(h),x=H(r,e.location.file)?.line,l=e.behavior.lines.find(m=>(x===void 0||x>=m.line&&x<=m.endLine)&&m.text.includes(y));if(!l)continue;let i=le(l.signals),C=W(r.evidence);t.push({anchor:{id:E(e.id,l.line,h.id),status:C,source:"graph-relation",direction:"downstream",causalRole:i,relationKind:"reference",fromStepId:e.id,fromLabel:e.label,callsite:{file:e.location.file,line:l.line,endLine:l.endLine,text:l.text,signals:l.signals,calleeLeaf:y},alternatives:[b],alternativeCount:1,evidence:r.evidence}}),i==="result-callback"&&(o+=1)}return{candidates:t,upstreamCandidates:a,resultCandidates:o,runtimeCandidates:u}}function de(e,n,t){let a=[];if(!e.location)return a;let o=q(n.db,e.location.file,e.location.line,e.location.endLine??e.location.line),u=M(n.db,e.location.file),d=_(n.db,e.location.file,e.location.line,e.location.endLine??e.location.line);for(let f of o.targets){if(!n.sourceAllowed(f.definition.relativePath))continue;let r=k(e.location.file,f.sourceLine,f.calleeLeaf);if(t.has(r))continue;t.add(r);let h=U(d.get(f.sourceLine)),b={symbol:f.definition.symbol,label:f.definition.leaf,file:f.definition.relativePath,line:f.definition.startLine,endLine:f.definition.endLine};n.alternativeAlreadyReturned(b)||a.push({anchor:{id:E(e.id,f.sourceLine,f.definition.symbol),status:"exact",source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:e.id,fromLabel:e.label,callsite:{file:e.location.file,line:f.sourceLine,endLine:f.sourceLine,text:u[f.sourceLine]?.trim()||`${f.calleeLeaf}()`,signals:h,calleeLeaf:f.calleeLeaf},alternatives:[b],alternativeCount:1,evidence:[{method:"scip-occurrence-callsite",strength:"exact",identity:f.definition.symbol,location:{file:e.location.file,line:f.sourceLine}}]}})}return a}function ue(e,n,t){let a={candidates:[],scannedBehaviorSteps:0,visibleCallsites:0,identityCandidateCallsites:0,ambiguousCallsites:0,unresolvedCallsites:0};if(!e.location||!e.behavior)return a;let o=e.behavior.lines.filter(i=>i.signals.includes("call"));if(o.length===0)return a;let u=[],d=0,f=0,r=0,h=(O(n.db,e.location.file)?.callSites??[]).filter(i=>o.some(C=>i.line>=C.line&&i.line<=C.endLine)),b=n.topology.edges.filter(i=>i.kind==="call"&&i.fromNodeId===e.nodeId&&i.disposition!=="excluded"&&i.disposition!=="unsupported"),y=new Map;for(let i of b){let C=n.nodeById.get(i.toNodeId);if(!C)continue;let m=K(C);y.set(m,(y.get(m)??0)+1)}let x=me(n.db,t.stepDefinition?t.calleeMap.get(t.stepDefinition.symbolId)??[]:[]),l=he(x);for(let i of x){if(!n.sourceAllowed(i.alternative.file)||n.alternativeAlreadyReturned(i.alternative))continue;let C=B(i.alternative.label),m=te(h,o,C,i.row.callsiteLine,l.get(C)===1);if(!m)continue;let A=$(o,m.line,C);if(!A)continue;let L=k(e.location.file,m.line,C);if(t.evidencedCallsiteKeys.has(L))continue;t.evidencedCallsiteKeys.add(L);let S=se(i.row.source);u.push({anchor:{id:E(e.id,m.line,i.alternative.symbol??i.alternative.file),status:S,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:e.id,fromLabel:e.label,callsite:{file:e.location.file,line:A.line,endLine:A.endLine,text:A.text,signals:A.signals,calleeLeaf:C},alternatives:[i.alternative],alternativeCount:1,evidence:[{method:i.row.source,strength:S,identity:i.row.symbol,location:{file:e.location.file,line:m.line}}]}})}for(let i of b){if(n.returnedNodeIds.has(i.toNodeId))continue;let C=n.nodeById.get(i.toNodeId);if(!C?.location||!n.sourceAllowed(C.location.file))continue;let m=K(C),A=i.evidence.find(N=>{let c=N.location;return c!==null&&c.file===e.location?.file&&c.line>=0})?.location?.line,L=te(h,o,m,A,y.get(m)===1);if(!L)continue;let S=$(o,L.line,m);if(!S)continue;let I=k(e.location.file,L.line,m);if(t.evidencedCallsiteKeys.has(I))continue;t.evidencedCallsiteKeys.add(I);let p=X(C);if(!p||n.alternativeAlreadyReturned(p))continue;let s=W(i.evidence);u.push({anchor:{id:E(e.id,L.line,C.id),status:s,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:e.id,fromLabel:e.label,callsite:{file:e.location.file,line:S.line,endLine:S.endLine,text:S.text,signals:S.signals,calleeLeaf:m},alternatives:[p],alternativeCount:1,evidence:i.evidence}})}for(let i of h){let C=k(e.location.file,i.line,i.calleeLeaf);if(t.evidencedCallsiteKeys.has(C))continue;let m=$(o,i.line,i.calleeLeaf);if(!m)continue;let A=Q(e.location.file,V(n.db).get(i.calleeLeaf)??[]).flatMap(p=>T(n.db,p.file).filter(s=>s.symbol===p.symbol&&s.isFunctionLike)).filter(p=>n.sourceAllowed(p.relativePath)&&!n.alternativeAlreadyReturned({symbol:p.symbol,label:p.leaf,file:p.relativePath,line:p.startLine,endLine:p.endLine})),L=D(A.map(p=>({symbol:p.symbol,label:p.leaf??i.calleeLeaf,file:p.relativePath,line:p.startLine,endLine:p.endLine})));if(L.length===0){r+=1;continue}let S=`${e.id}\0${i.line}\0${i.calleeLeaf}`;if(t.consideredCandidateKeys.has(S))continue;t.consideredCandidateKeys.add(S);let I=L.length>1;I?f+=1:d+=1,u.push({anchor:{id:E(e.id,i.line,i.calleeLeaf),status:I?"ambiguous":"candidate",source:"leaf-identity-candidate",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:e.id,fromLabel:e.label,callsite:{file:e.location.file,line:m.line,endLine:m.endLine,text:m.text,signals:m.signals,calleeLeaf:i.calleeLeaf},alternatives:L.slice(0,3),alternativeCount:L.length,evidence:[]}})}return{candidates:u,scannedBehaviorSteps:1,visibleCallsites:h.length,identityCandidateCallsites:d,ambiguousCallsites:f,unresolvedCallsites:r}}function ke(e,n,t){let a=new Map(n.nodes.map(o=>[o.id,o]));for(let o of t.steps)if(!(!o.behavior||!o.location))for(let u of n.edges){if(u.kind!=="reference"||u.fromNodeId!==o.nodeId||u.disposition==="excluded"||u.disposition==="unsupported")continue;let d=a.get(u.toNodeId);if(!d?.location||!G(e,d))continue;let f=K(d),r=H(u,o.location.file)?.line,h=o.behavior.lines.find(b=>(r===void 0||r>=b.line&&r<=b.endLine)&&b.text.includes(f));!h||le(h.signals)!=="result-callback"||u.semantics?.some(({family:b,subtype:y})=>b==="control"&&y==="result-callback")||(u.semantics=[...u.semantics??[],{family:"control",subtype:"result-callback",attributes:{evidenceRole:"result-producing-callable-reference"}}])}}function le(e){return e.includes("call")&&e.some(n=>["return","mutation","shape","spread","binding"].includes(n))?"result-callback":"callable-reference"}function Me(e,n,t={}){let a=t.limit??ae;if(!Number.isSafeInteger(a)||a<=0)throw new RangeError(`next-anchor limit must be a positive safe integer; received ${a}`);let o=t.sourceAllowed??(()=>!0),u=[],d=n.map((l,i)=>({id:l.id,nodeId:l.id,order:i,role:"anchor",kind:"source-construct",label:l.label,location:{file:l.file,line:l.startLine,endLine:l.endLine},behavior:null})),f=n.map(l=>({file:l.file,startLine:l.startLine,endLine:l.endLine})),r=0,h=0,b=0,y=0,x=0;for(let l of n){let i=M(e,l.file),m=(O(e,l.file)?.callSites??[]).filter(s=>s.line>=l.startLine&&s.line<=l.endLine);r+=m.length;let A=_(e,l.file,l.startLine,l.endLine),L=q(e,l.file,l.startLine,l.endLine),S=new Set;for(let s of L.targets){if(!o(s.definition.relativePath)||f.some(w=>w.file===s.definition.relativePath&&w.startLine<=s.definition.startLine&&w.endLine>=s.definition.endLine))continue;let N=k(l.file,s.sourceLine,s.calleeLeaf);S.add(N);let c=U(A.get(s.sourceLine)),g={symbol:s.definition.symbol,label:s.definition.leaf,file:s.definition.relativePath,line:s.definition.startLine,endLine:s.definition.endLine};u.push({anchor:{id:E(l.id,s.sourceLine,s.definition.symbol),status:"exact",source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:l.id,fromLabel:l.label,callsite:{file:l.file,line:s.sourceLine,endLine:s.sourceLine,text:i[s.sourceLine]?.trim()||`${s.calleeLeaf}()`,signals:c,calleeLeaf:s.calleeLeaf},alternatives:[g],alternativeCount:1,evidence:[{method:"scip-occurrence-callsite",strength:"exact",identity:s.definition.symbol,location:{file:l.file,line:s.sourceLine}}]}})}h+=L.resolvedCallsites;let I=Z(e,l.file,{ranges:[{startLine:l.startLine,endLine:l.endLine}]}),p=new Map;for(let s of I.targets){let N=m.find(w=>w.line===s.line)?.calleeLeaf??s.calleeLeaf,c=k(l.file,s.line,N),g=p.get(c)??[];g.push(s),p.set(c,g)}for(let[s,N]of p){if(S.has(s))continue;S.add(s);let c=N.filter(v=>o(v.targetFile)&&!f.some(j=>j.file===v.targetFile&&j.startLine<=v.targetStartLine&&j.endLine>=v.targetEndLine));if(c.length===0)continue;let g=c[0],w=m.find(v=>v.line===g.line)?.calleeLeaf??g.calleeLeaf,R=U(A.get(g.line)),P=D(c.map(v=>({symbol:v.targetSymbol??null,label:v.calleeLeaf,file:v.targetFile,line:v.targetStartLine,endLine:v.targetEndLine}))),J=c.some(v=>(v.resolutionAlternativeCount??0)>1)?"candidate":c.every(v=>v.strength==="exact")?"exact":"derived";u.push({anchor:{id:E(l.id,g.line,P.map(v=>`${v.file}:${v.line}`).join("|")),status:P.length>1?"ambiguous":J,source:"graph-call",direction:"downstream",causalRole:"callee",relationKind:"call",fromStepId:l.id,fromLabel:l.label,callsite:{file:l.file,line:g.line,endLine:g.line,text:i[g.line]?.trim()||`${g.calleeLeaf}()`,signals:R,calleeLeaf:w},alternatives:P.slice(0,3),alternativeCount:P.length,evidence:c.map(v=>({method:v.resolution==="constructed-member-receiver"?"ast-constructed-member-callsite":v.resolution==="factory-callback-member"?"ast-factory-callback-callsite":v.resolution==="imported-service-object-member"?"ast-service-member-callsite":"ast-import-member-callsite",strength:J,identity:v.targetSymbol??`${v.targetFile}:${v.targetStartLine}-${v.targetEndLine}`,location:{file:l.file,line:g.line}}))}})}h+=p.size;for(let s of m){let N=k(l.file,s.line,s.calleeLeaf);S.has(N)||(x+=1)}}return oe(e,u,d,a,{scannedBehaviorSteps:n.length,visibleCallsites:r,graphEvidencedCallsites:h,identityCandidateCallsites:b,ambiguousCallsites:y,unresolvedCallsites:x,upstreamCandidates:0,resultCandidates:0,runtimeCandidates:0})}function oe(e,n,t,a,o,u=[]){let d=ge(n).sort(re),f=d.filter(i=>fe(e,i)).slice(0,a),r=new Set(f.map(i=>i.anchor.id)),h=d.filter(i=>!r.has(i.anchor.id)),b=f.map(i=>i.anchor),y=h.map(i=>i.anchor),x=D(b.flatMap(i=>i.alternativeCount===1?i.alternatives:[])),l=D(y.flatMap(i=>i.alternativeCount===1?i.alternatives:[]));return{anchors:b,withheldAnchors:y,candidateAnchors:d.length,omittedAnchors:Math.max(0,d.length-b.length),...o,inspectCommand:x.length===0?null:`scip-query inspect ${x.map(ie).join(" ")} --view behavior`,remainingInspectCommands:pe(l,8).map(i=>`scip-query inspect ${i.map(ie).join(" ")} --view behavior`)}}function re(e,n){let t=e.anchor.alternatives[0],a=n.anchor.alternatives[0];return F(e.anchor.status)-F(n.anchor.status)||(e.anchor.direction??"").localeCompare(n.anchor.direction??"")||(e.anchor.relationKind??"").localeCompare(n.anchor.relationKind??"")||(e.anchor.causalRole??"").localeCompare(n.anchor.causalRole??"")||e.anchor.fromStepId.localeCompare(n.anchor.fromStepId)||e.anchor.callsite.file.localeCompare(n.anchor.callsite.file)||e.anchor.callsite.line-n.anchor.callsite.line||(t?.file??"").localeCompare(a?.file??"")||(t?.line??0)-(a?.line??0)||e.anchor.id.localeCompare(n.anchor.id)}function fe(e,n){if(n.anchor.alternativeCount!==1)return!0;let t=n.anchor.alternatives[0],a=t.endLine??t.line;return M(e,t.file).slice(t.line,a+1).join(`
2
- `).length<=2e4}function U(e){return e?.includes("call")?[...e]:["call",...e??[]]}function me(e,n){let t=new Map;for(let a of n){let o=T(e,a.file).find(f=>f.symbol===a.symbol&&f.isFunctionLike);if(!o)continue;let u={symbol:o.symbol,label:o.leaf,file:o.relativePath,line:o.startLine,endLine:o.endLine},d=t.get(o.symbol);!d||ne(a.source)>ne(d.row.source)?t.set(o.symbol,{row:{...a,...a.callsiteLine===void 0&&d?.row.callsiteLine!==void 0?{callsiteLine:d.row.callsiteLine}:{}},alternative:u}):d.row.callsiteLine===void 0&&a.callsiteLine!==void 0&&t.set(o.symbol,{...d,row:{...d.row,callsiteLine:a.callsiteLine}})}return[...t.values()]}function he(e){let n=new Map;for(let t of e){let a=B(t.alternative.label);n.set(a,(n.get(a)??0)+1)}return n}function se(e){return e==="semantic-callee"||e==="scip-chunk"?"exact":"derived"}function ne(e){return se(e)==="exact"?2:1}function $(e,n,t){return e.find(a=>n>=a.line&&n<=a.endLine&&a.text.includes(t))??e.find(a=>n>=a.line&&n<=a.endLine)??null}function te(e,n,t,a,o){if(a!==void 0)return e.find(d=>d.line===a&&d.calleeLeaf===t&&$(n,d.line,t)!==null)??null;let u=e.filter(d=>d.calleeLeaf===t&&$(n,d.line,d.calleeLeaf)!==null);return o&&u.length===1?u[0]:null}function K(e){let n=e.attributes.leaf;if(typeof n=="string"&&n.length>0)return B(n);let t=e.label.slice(e.label.lastIndexOf(":")+1);return B(t)}function z(e){if(e?.kind!=="symbol"||!e.id.startsWith("symbol:"))return null;try{return decodeURIComponent(e.id.slice(7))}catch{return null}}function X(e){return e.location?{symbol:z(e),label:e.label,file:e.location.file,line:e.location.line,endLine:e.location.endLine??null}:null}function G(e,n){let t=X(n);return t?.symbol&&T(e,t.file).some(o=>o.symbol===t.symbol&&o.isFunctionLike)?t:null}function H(e,n){return e.evidence.find(t=>t.location?.file===n)?.location??e.evidence.find(t=>t.location!==null)?.location??null}function W(e){let n={exact:5,derived:4,mixed:3,candidate:2,unknown:1};return e.reduce((t,a)=>n[a.strength]>n[t]?a.strength:t,"unknown")}function ge(e){let n=new Map;for(let t of e){let o=t.anchor.alternatives[0]?.symbol??`${t.anchor.callsite.file}:${t.anchor.callsite.line}:${t.anchor.callsite.calleeLeaf}`,u=n.get(o);(!u||be(t,u)<0)&&n.set(o,t)}return[...n.values()]}function be(e,n){return F(e.anchor.status)-F(n.anchor.status)||e.anchor.alternativeCount-n.anchor.alternativeCount||re(e,n)}function F(e){return{exact:0,derived:1,mixed:2,candidate:3,unknown:4,ambiguous:5}[e]}function D(e){let n=new Map;for(let t of e)n.set(t.symbol??`${t.file}:${t.line}`,t);return[...n.values()].sort((t,a)=>t.file.localeCompare(a.file)||t.line-a.line||t.label.localeCompare(a.label))}function ie(e){return`--at ${ve(`${e.file}:${e.line+1}`)}`}function pe(e,n){let t=[];for(let a=0;a<e.length;a+=n)t.push(e.slice(a,a+n));return t}function ve(e){return`'${e.replaceAll("'","'\\''")}'`}function k(e,n,t){return`${e}\0${n}\0${t}`}function E(e,n,t){return["next-anchor",e,String(n),t].map(encodeURIComponent).join(":")}export{Ee as a,ke as b,Me as c};
3
- //# sourceMappingURL=chunk-MNV5FSBW.js.map
@@ -1,2 +0,0 @@
1
- import{J as a,T as c}from"./chunk-3L2ZBPEX.js";var D=4;function m(e,i,t,r={}){return p(e,i,t,r.maxReexportDepth??D,0,new Set)}function p(e,i,t,r,s,o){let f=`${i}\0${t}`;if(o.has(f)||s>r)return[];o.add(f);let u=c(e,i).filter(n=>n.leaf===t);return u.length>0?u:a(e,i).flatMap(n=>n.sourcePath?n.kind==="named"&&!n.names.includes(t)?[]:p(e,n.sourcePath,t,r,s+1,new Set(o)):[])}export{m as a};
2
- //# sourceMappingURL=chunk-MPQ4OTBM.js.map
@@ -1,2 +0,0 @@
1
- import{SymbolInformation_Kind as e}from"@c4312/scip";var n=new Map(Object.entries(e).filter(([t,r])=>Number.isInteger(Number(t))&&typeof r=="string").map(([t,r])=>[Number(t),r])),i=new Map([...n.entries()].map(([t,r])=>[r.toLowerCase(),t]));function a(t){return n.get(t)??"Unknown"}function u(){return[e.Function,e.Method,e.Macro,e.Constructor,e.Getter,e.Setter,e.StaticMethod,e.SingletonMethod,e.AbstractMethod,e.ProtocolMethod,e.TraitMethod]}function c(){return[e.Class,e.Interface,e.Struct,e.Trait,e.Type,e.TypeAlias,e.Enum,e.Union,e.Protocol]}export{n as a,i as b,a as c,u as d,c as e};
2
- //# sourceMappingURL=chunk-MTDBHTSF.js.map
@@ -1,38 +0,0 @@
1
- import{d as V,e as Z}from"./chunk-MTDBHTSF.js";import{c as K,d as O,e as Q,f as U,o as Y}from"./chunk-YEN6CYC7.js";import{a as H}from"./chunk-2GRUZAQF.js";import{G as D,K as x,M as j,T as N,U as G,Z as W,_ as J,p as k}from"./chunk-3L2ZBPEX.js";import{d as $,f as B}from"./chunk-DRENNWRG.js";import{d as A}from"./chunk-IW5XQG5G.js";import{p as v}from"./chunk-KYSDI3GE.js";function Ie(o,t,n={}){let i=z(o,[t],{additive:n.additive,semantic:n.semantic,semanticEvidence:n.semanticEvidence}),l=n.callableOnly?(i.get(t.symbolId)??[]).filter(s=>B(s.symbol)||s.source==="ast-callsite"):i.get(t.symbolId)??[];return typeof n.limit=="number"?l.slice(0,n.limit):l}function ve(o,t,n){return te(o,[t],n).get(t.symbolId)??[]}function te(o,t,n){let i=se(o)?ce(o,t,{semantic:n.semantic!==!1,semanticEvidence:n.semanticEvidence}):ae(o,n.semanticEvidence);return typeof n.limit!="number"?new Map(t.map(l=>[l.symbolId,i.get(l.symbolId)??[]])):new Map(t.map(l=>[l.symbolId,(i.get(l.symbolId)??[]).slice(0,n.limit)]))}var oe=A("caller-rows",{clearGroups:["whole-project"]}),ie=A("targeted-caller-strategy",{clearGroups:["whole-project"]}),le=2e4;function se(o){return ie.get(o,()=>(o.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>le)}function ae(o,t){return oe.get(o,()=>{let n=G(o),i=z(o,n,{semanticEvidence:t}),l=new Map;for(let c of n)l.set(c.symbol,c.symbolId);let s=new Map,a=new Map;for(let c of n){let f=i.get(c.symbolId);if(!(!f||f.length===0))for(let b of f){let r=l.get(b.symbol);if(r===void 0||r===c.symbolId)continue;let u=s.get(r);u||(u=[],s.set(r,u),a.set(r,new Set));let h=`${c.symbol}|${c.relativePath}`;a.get(r).has(h)||(a.get(r).add(h),u.push({symbol:c.symbol,file:c.relativePath,source:"caller-map-inversion",callEvidence:b.source}))}}return s})}function ce(o,t,n){let i=n.semantic&&n.semanticEvidence?t.flatMap(e=>{let d=re(o,e);return d?[d]:[]}):[],l=new Map(i.map(e=>[e.symbolId,e])),s=n.semanticEvidence?.referenceMap(o,i)??new Map,a=Y(o,t),c=new Set(t.map(e=>e.symbol)),b=[...new Set(t.flatMap(e=>H(o,"reverse",[e.relativePath])))].flatMap(e=>N(o,e)),r=new Map,u=X(o,b);for(let e of b)for(let d of u.get(e.symbolId)??[]){if(!c.has(d.symbol))continue;let g=r.get(d.symbol)??[];g.push({symbol:e.symbol,file:e.relativePath,source:"caller-map-inversion",callEvidence:d.source}),r.set(d.symbol,g)}let h=new Map;for(let e of t){let d=[],g=new Set,S=m=>{if(m.symbol===e.symbol)return;let E=`${m.symbol}|${m.file}`;g.has(E)||(g.add(E),d.push(m))};for(let m of r.get(e.symbol)??[])S(m);for(let m of a.get(e.symbolId)??[])m.file!==e.relativePath&&S({symbol:m.enclosingSymbol??m.file,file:m.file,source:"resolved-reference"});let L=l.get(e.symbolId);if(L)for(let m of s.get(L.symbolId)??[]){if(m.file===e.relativePath||o.isIgnored(m.file))continue;let E=J(N(o,m.file),m.line);S({symbol:E?.symbol??m.file,file:m.file,source:"semantic-reference"})}h.set(e.symbolId,d)}return h}function re(o,t){let n=V().join(", "),i=Z().join(", ");return o.get(`SELECT
2
- d.id AS documentId,
3
- gs.id AS symbolId,
4
- gs.symbol,
5
- d.relative_path AS relativePath,
6
- COALESCE(der.start_line, c.start_line) AS startLine,
7
- COALESCE(der.end_line, c.end_line) AS endLine,
8
- COALESCE(gs.display_name, '') AS leaf,
9
- NULL AS parentTypeName,
10
- CASE WHEN gs.kind IN (${n}) OR gs.symbol LIKE '%().' THEN 1 ELSE 0 END AS isFunctionLike,
11
- CASE WHEN gs.kind IN (${i}) THEN 1 ELSE 0 END AS isTypeLike,
12
- gs.kind AS kind,
13
- gs.documentation AS documentation,
14
- gs.enclosing_symbol AS enclosingSymbol
15
- FROM global_symbols gs
16
- LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
17
- LEFT JOIN chunks c ON c.document_id = der.document_id
18
- JOIN documents d ON d.id = COALESCE(der.document_id, c.document_id)
19
- WHERE gs.id = ?
20
- LIMIT 1`,t.symbolId)??null}function z(o,t,n={}){if(t.length===0)return new Map;let i=n.additive??!1,l=[],s=[];for(let r of t)k(r.relativePath)&&D(o,r.relativePath)!==null?l.push(r):s.push(r);let a=new Map,c=new Map,f=r=>{for(let[u,h]of r){let e=a.get(u);e||(e=[],a.set(u,e));let d=c.get(u);d||(d=new Set,c.set(u,d));for(let g of h){let S=`${g.symbol}|${g.chunkId}`;d.has(S)||(d.add(S),e.push(g))}}};l.length>0&&f(X(o,l)),n.semantic!==!1&&n.semanticEvidence&&f(ye(n.semanticEvidence.calleeMap(o,t)));let b=i?t:s;return b.length>0&&f(fe(o,b)),a}function X(o,t){let n=new Map,i=me(t,n),l=U(o);for(let[s,a]of i){let c=D(o,s);if(!c)continue;let f=W(a);for(let b of c){let r=f.get(b.line);if(!r)continue;let u=de(o,s,l,b);u&&u.symbol!==r.symbol&&n.get(r.symbolId).push({symbol:u.symbol,file:u.file,chunkId:b.line,source:"ast-callsite",callsiteLine:b.line})}}return n}function me(o,t){let n=new Map;for(let i of o){let l=n.get(i.relativePath);l?l.push(i):n.set(i.relativePath,[i]),t.set(i.symbolId,[])}for(let i of n.values())i.sort((l,s)=>l.endLine-l.startLine-(s.endLine-s.startLine));return n}function de(o,t,n,i){let l=j(o,t,i.calleeLeaf);if(l){let c=O(t,n.get(l.importedName)??[]).filter(f=>v(l.sourcePath,f.file));return c.length===1?c[0]:null}let s=O(t,n.get(i.calleeLeaf)??[]);if(s.length===0)return null;let a=ue(o,t,s,i.calleeQualifier);return a||Q(o,t,s,i.memberAccess,i.calleeQualifier)}function ue(o,t,n,i){if(!i||k(t)!=="clojure")return null;let s=x(o,t).filter(a=>a.kind==="namespace"&&a.localName===i&&a.sourcePath).map(a=>a.sourcePath);for(let a of s){let c=n.find(f=>v(a,f.file));if(c)return c}return n.find(a=>/`([^`]+)`\//.exec(a.symbol)?.[1]===i)??null}function fe(o,t){if(t.length===0)return new Map;let i=T(t.map(e=>e.documentId)).flatMap(e=>o.all(`SELECT c.document_id, c.id AS chunk_id, c.start_line, c.end_line, m.symbol_id
21
- FROM mentions m
22
- JOIN chunks c ON m.chunk_id = c.id
23
- WHERE m.role != 1
24
- AND c.document_id IN (${e.map(()=>"?").join(",")})`,...e)),l=new Map;for(let e of i)l.has(e.document_id)||l.set(e.document_id,[]),l.get(e.document_id).push(e);let a=T(i.map(e=>e.symbol_id)).flatMap(e=>o.all(`SELECT gs.id AS symbol_id, gs.symbol,
25
- COALESCE(der.document_id, def_chunk.document_id) AS document_id
26
- FROM global_symbols gs
27
- LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
28
- LEFT JOIN (
29
- SELECT m.symbol_id, MIN(c.document_id) AS document_id
30
- FROM mentions m
31
- JOIN chunks c ON m.chunk_id = c.id
32
- WHERE m.role = 1
33
- AND m.symbol_id IN (${e.map(()=>"?").join(",")})
34
- GROUP BY m.symbol_id
35
- ) def_chunk ON def_chunk.symbol_id = gs.id
36
- WHERE gs.id IN (${e.map(()=>"?").join(",")})`,...e,...e)),c=T([...t.map(e=>e.documentId),...a.flatMap(e=>e.document_id===null?[]:[e.document_id])]),f=new Map(c.flatMap(e=>o.all(`SELECT id, relative_path FROM documents
37
- WHERE id IN (${e.map(()=>"?").join(",")})`,...e).map(d=>[d.id,d.relative_path]))),b=new Map;for(let e of a)b.has(e.symbol_id)||b.set(e.symbol_id,{symbol:e.symbol,file:e.document_id!==null?f.get(e.document_id)??"":""});let r=new Map,u=f,h=be(t);for(let[e,d]of h){let S=[...l.get(e)??[]].sort((y,C)=>y.start_line-C.start_line||y.end_line-C.end_line),L=[...d].sort((y,C)=>y.startLine-C.startLine||y.endLine-C.endLine),m=new Set,E=0;for(let y of L){for(;E<S.length&&S[E].start_line<=y.endLine;)m.add(S[E]),E+=1;for(let p of m)p.end_line<y.startLine&&m.delete(p);let C=new Set,P=[],R=null,ee=()=>{if(R)return R;let p=u.get(y.documentId)??"",_=new Set;if(p){let I=K(o,p),w=Math.max(0,y.startLine),F=Math.min(I.length-1,y.endLine);for(let M=w;M<=F;M+=1)for(let ne of I[M])_.add(ne)}return R=_,_};for(let p of m){if(p.symbol_id===y.symbolId)continue;let _=b.get(p.symbol_id);if(!_)continue;if(!(p.start_line>=y.startLine&&p.end_line<=y.endLine)){if(!(p.start_line<=y.endLine&&p.end_line>=y.startLine))continue;let M=$(_.symbol);if(!M||!ee().has(M))continue}let w=`${_.symbol}|${p.chunk_id}`;C.has(w)||(C.add(w),P.push({..._,chunkId:p.chunk_id,source:"scip-chunk"}))}r.set(y.symbolId,P)}}return r}var q=500;function T(o){let t=[...new Set(o)],n=[];for(let i=0;i<t.length;i+=q)n.push(t.slice(i,i+q));return n}function be(o){let t=new Map;for(let n of o){let i=t.get(n.documentId);i?i.push(n):t.set(n.documentId,[n])}return t}function ye(o){let t=new Map;for(let[n,i]of o){let l=[];for(let s of i)l.push({symbol:s.symbol,file:s.file,chunkId:-1,source:"semantic-callee",...s.callsiteLine===void 0?{}:{callsiteLine:s.callsiteLine}});t.set(n,l)}return t}export{Ie as a,ve as b,te as c,z as d};
38
- //# sourceMappingURL=chunk-MV3CDXPI.js.map
@@ -1,60 +0,0 @@
1
- import{a as f,g as u}from"./chunk-7F45LJKI.js";import b from"ignore";import{existsSync as y,readdirSync as v}from"fs";import{dirname as d,isAbsolute as m,join as l,relative as T,resolve as S}from"path";function E(n){let t=b();return _(n,t)||t.add(F),{isIgnored:e=>g(t,n,e),filter:e=>e.filter(i=>!g(t,n,i))}}function _(n,t){let r=new Set,e=(s,a)=>{if(!(r.has(s)||!y(s)))try{let c=u(s,{maxBytes:f,inputKind:"gitignore file"});t.add(a?$(c,a):c),r.add(s)}catch{}},i=d(n),o=0;for(;i!==d(i)&&o<5&&(e(l(i,".gitignore"),""),!y(l(i,".git")));)i=d(i),o++;return h(n,"",t,e),r.size>0}function h(n,t,r,e){let i=t?l(n,t):n;e(l(i,".gitignore"),t);let o;try{o=v(i,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let a=t?`${t}/${s.name}`:s.name;g(r,n,`${a}/`)||h(n,a,r,e)}}function $(n,t){let r=t.replaceAll("\\","/").replace(/\/+$/,"");return n.split(/\r?\n/).map(e=>A(e,r)).join(`
2
- `)}function A(n,t){let r=n.trimStart();if(!r||r.startsWith("#"))return n;let e=n.slice(0,n.length-r.length),i=r.startsWith("!"),o=i?r.slice(1):r;if(!o||o.startsWith("#"))return n;let s=o.startsWith("/"),a=s?o.slice(1):o,p=(a.endsWith("/")?a.slice(0,-1):a).includes("/")||s?`${t}/${a}`:`${t}/**/${a}`;return`${e}${i?"!":""}${p}`}var F=`
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 g(n,t,r){let e=x(t,r);if(!e)return!1;try{return n.ignores(e)}catch{return!1}}function x(n,t){if(!t||t===".")return null;if(!m(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=m(t)?t:S(n,t),e=T(n,r).replaceAll("\\","/");return!e||e==="."||e.startsWith("..")?null:e}export{E as a};
60
- //# sourceMappingURL=chunk-MWN53KRN.js.map
@@ -1,3 +0,0 @@
1
- var x=new Map([[8,"\u2408"],[9,"\u2409"],[10,"\u2424"],[13,"\u240D"]]);function c(n,e={}){let o=e.allowNewlines??!0,r=e.allowTabs??!0,l="";for(let i=0;i<n.length;){let t=n.charCodeAt(i);if(t===27){i=a(n,i);continue}if(t===155){i=s(n,i+1);continue}if(t===144||t===152||t===157||t===158||t===159){i=u(n,i+1);continue}if(w(t)){t===10&&o?l+=`
2
- `:t===9&&r?l+=" ":l+=x.get(t)??"\uFFFD",i+=1;continue}if(b(t)){l+="\uFFFD",i+=1;continue}l+=n[i],i+=1}return l}function C(n){return c(n,{allowNewlines:!1,allowTabs:!1})}function a(n,e){let o=n.charCodeAt(e+1);if(Number.isNaN(o))return n.length;if(o===91)return s(n,e+2);if(o===80||o===88||o===93||o===94||o===95)return u(n,e+2);let r=e+1;for(;r<n.length&&f(n.charCodeAt(r));)r+=1;return r<n.length&&T(n.charCodeAt(r))?r+1:e+1}function s(n,e){let o=e;for(;o<n.length;){let r=n.charCodeAt(o);if(o+=1,r>=64&&r<=126)return o}return n.length}function u(n,e){let o=e;for(;o<n.length;){let r=n.charCodeAt(o);if(r===7||r===156)return o+1;if(r===27&&n.charCodeAt(o+1)===92)return o+2;o+=1}return n.length}function f(n){return n>=32&&n<=47}function T(n){return n>=48&&n<=126}function w(n){return n<=31||n>=127&&n<=159}function b(n){return n===1564||n===8206||n===8207||n>=8234&&n<=8238||n>=8294&&n<=8297}export{C as a};
3
- //# sourceMappingURL=chunk-MXNGIEPU.js.map
@@ -1,117 +0,0 @@
1
- import{a as I,o as v,r as P,x as Q,y as j}from"./chunk-ODDUPDP7.js";import{D as A,a as D}from"./chunk-ZOHS7AQV.js";import{a as _,c as O,e as C,f as T,h as w,k as $}from"./chunk-FESCRNVV.js";import{c as h,d as N,i as S,j as x}from"./chunk-JWTGMPIT.js";var ie={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function u(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let n=e.split(" ");if(n.length<4)return{scheme:n[0]??"",manager:n[1]??"",packageName:n[2]??"",version:"",descriptors:[],raw:e};let t=n[0],i=n[1],r=e.slice(t.length+1+i.length+1),o;if(r.startsWith("`")){let l=r.indexOf("`",1);l===-1?(o=r.slice(1),r=""):(o=r.slice(1,l),r=r.slice(l+2))}else{let l=r.indexOf(" ");l===-1?(o=r,r=""):(o=r.slice(0,l),r=r.slice(l+1))}let s,a=r.indexOf(" ");a===-1?(s=r,r=""):(s=r.slice(0,a),r=r.slice(a+1));let c=re(r);return{scheme:t,manager:i,packageName:o,version:s,descriptors:c,raw:e}}function p(e){let n=u(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let i=n.descriptors[t];if(i?.suffix==="type")return i.name}return null}function re(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let o=e.indexOf("]",t+1);if(o===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,o),suffix:"type-param"}),t=o+1;continue}if(e[t]==="("&&(n.length===0||t===0||B(e[t-1]))){let o=e.indexOf(")",t+1);if(o!==-1&&e[o+1]!=="."){n.push({name:e.slice(t+1,o),suffix:"parameter"}),t=o+1;continue}}let i;if(e[t]==="`"){let o=e.indexOf("`",t+1);if(o===-1){i=e.slice(t+1),n.push({name:i,suffix:"term"});break}i=e.slice(t+1,o),t=o+1}else{let o=t;for(;t<e.length&&!B(e[t]);)t++;i=e.slice(o,t)}if(t>=e.length){i&&n.push({name:i,suffix:"term"});break}let r=e[t];if(r==="("){let o=e.indexOf(")",t+1);o!==-1&&e[o+1]==="."?(n.push({name:i,suffix:"method"}),t=o+2):o!==-1?(n.push({name:i,suffix:"method"}),t=o+1):(n.push({name:i,suffix:"term"}),t++)}else{let o=ie[r];o&&n.push({name:i,suffix:o}),t+=1}}return n}function B(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function z(e){let n=u(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let i=[];for(let r of t.descriptors){let o=oe(r);o&&i.push(o)}return i.join(":")}function oe(e){let n=e.suffix==="namespace"?se(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function se(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function W(e){let n=u(e);if("kind"in n&&n.kind==="local")return n.id;let t=n;return t.descriptors.length===0?"":t.descriptors[t.descriptors.length-1].name}function g(e){let n=u(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function Be(e){return e.endsWith("().")||g(e)==="method"}function L(e){let n=g(e);return n==="method"?!0:n!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function ze(e){return g(e)==="namespace"}var ae=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function We(e){return ae.test(e)}var le=new Set(["test","tests","_tests"]);function Je(e){let n=u(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let i=n.descriptors[t];if(i?.suffix==="namespace"&&i.name&&le.has(i.name))return!0}return!1}function Ge(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,o=i.descriptors;if(o.length!==r.length+1)return!1;for(let s=0;s<r.length;s++){let a=r[s],c=o[s];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function He(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,o=i.descriptors;if(o.length<=r.length)return!1;for(let s=0;s<r.length;s++){let a=r[s],c=o[s];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Ke(e,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
2
- FROM global_symbols gs
3
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
4
- JOIN documents d ON der.document_id = d.id
5
- WHERE ${n.where}
6
- ${e.pathExclusionsFor("d")}
7
- ${G(n.orderBy)}
8
- ${H(n.limit)}`,...n.params??[])}function Ye(e,n){return e.all(`SELECT
9
- gs.id,
10
- gs.symbol,
11
- c.document_id,
12
- MIN(c.start_line) AS start_line,
13
- 0 AS start_char,
14
- MAX(c.end_line) AS end_line,
15
- 0 AS end_char,
16
- d.relative_path,
17
- gs.display_name,
18
- gs.documentation
19
- FROM global_symbols gs
20
- JOIN mentions m ON m.symbol_id = gs.id
21
- JOIN chunks c ON m.chunk_id = c.id
22
- JOIN documents d ON c.document_id = d.id
23
- WHERE m.role = 1
24
- AND ${n.where}
25
- ${e.pathExclusionsFor("d")}
26
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
27
- ${G(n.orderBy)}
28
- ${H(n.limit)}`,...n.params??[])}function G(e){return e?`ORDER BY ${e}`:""}function H(e){return typeof e=="number"?`LIMIT ${e}`:""}function U(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function K(e){if(!e)return null;let n=J(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let i=e.slice(t+1);return(J(i)??i).replace(/\n/g," ")}function J(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function b(e){return{forFile(n,t){return Y(e,n,t)},forFiles(n,t){let i=new Map;for(let r of n)i.set(r,Y(e,r,t));return i}}}function Y(e,n,t){let i={file:n},r=t.facts||t.identifiers;if(t.text&&(i.text=w(e,n)),t.lines&&(i.lines=$(e,n)),t.ast&&(i.ast=A(e,n)),t.imports&&(i.imports=j(e,n)),t.reexports&&(i.reexports=Q(e,n)),r){let o=v(e,n),s=o.facts;t.facts&&(i.facts=s),o.unavailable&&(i.sourceFactsUnavailable=o.unavailable),t.identifiers&&s&&(i.identifiers=s.fileIdentifiers,i.identifierLineMap=s.identifierLineMap)}return i}function ce(e,n={}){if(p(e.symbol)!==null)return n.includeClassMemberFallbacks===!0;let r=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(r)}function F(e,n,t={}){let i=new Map;for(let o of n)e.length>0&&!ce(o,{includeClassMemberFallbacks:t.includeClassMemberFallbacks})||i.set(o.id,o);for(let o of e)i.set(o.id,o);let r=[...i.values()];return t.sort?r.sort((o,s)=>o.start_line-s.start_line||o.end_line-s.end_line||o.symbol.localeCompare(s.symbol)):r}function yn(e){let n=new Map;for(let t of e){if(!t.leaf)continue;let i=n.get(t.leaf)??[];i.push(t),n.set(t.leaf,i)}return n}var de=h("file-definitions",{clearGroups:["definition-catalog"]}),ue=N("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),fe=h("file-function-like-definitions",{clearGroups:["definition-catalog"]}),X=new WeakMap;function E(e,n,t={},i){return T(n),t.includeClassMemberFallbacks?R(e,n,void 0,{includeClassMemberFallbacks:!0},i):de.get(e,n,()=>{let r=m(i,"evidence-read",()=>ee(e,n));if(r)return r;let o=R(e,n,void 0,t,i);return m(i,"evidence-write",()=>{let s=x(e),a=b(e).forFile(n,{text:!0}).text;s&&a&&V.write(e,n,S(e,n,a),{projectFingerprint:s,definitions:o.map(c=>({...c}))})}),o})}function me(e,n){return fe.get(e,n,()=>{let t=ee(e,n);return t?t.filter(i=>i.isFunctionLike):R(e,n,i=>i.isFunctionLike)})}var V=O({kind:"file-definitions",invalidation:C("file-definitions"),serialize:pe,deserialize:ge});function ee(e,n){let t=x(e);if(!t)return null;let i=b(e).forFile(n,{text:!0}).text;if(!i)return null;let r=V.read(e,n,S(e,n,i));return r?be(r,t,n):null}function pe(e){return JSON.stringify(e)}function ge(e){try{let n=JSON.parse(e);return!_(n)||typeof n.projectFingerprint!="string"||!Array.isArray(n.definitions)?null:{projectFingerprint:n.projectFingerprint,definitions:n.definitions}}catch{return null}}function be(e,n,t){if(e.projectFingerprint!==n)return null;let i=[];for(let r of e.definitions){let o=ye(r,t);if(!o)return null;i.push(o)}return i}function ye(e,n){return!_(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==n||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function R(e,n,t,i={},r){let o=m(r,"primary-rows",()=>he(e,n)),s=m(r,"fallback-rows",()=>Se(e,n)),a=m(r,"merge-rows",()=>F(o,s,{sort:!0,includeClassMemberFallbacks:i.includeClassMemberFallbacks}).map(M));return t&&(a=a.filter(t)),m(r,"range-correction",()=>k(e,n,a,r,i.rangeCorrectionEvidence))}function m(e,n,t){return e?e(n,t):t()}function he(e,n){return e.all(`SELECT
29
- gs.id,
30
- gs.symbol,
31
- der.document_id,
32
- der.start_line,
33
- der.start_char,
34
- der.end_line,
35
- der.end_char,
36
- d.relative_path,
37
- gs.display_name,
38
- gs.kind,
39
- gs.documentation,
40
- gs.enclosing_symbol
41
- FROM global_symbols gs
42
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
43
- JOIN documents d ON der.document_id = d.id
44
- WHERE d.relative_path = ?
45
- ${e.symbolNoiseFor("gs")}
46
- ORDER BY der.start_line, der.end_line`,n)}function Se(e,n){return e.all(`SELECT
47
- gs.id,
48
- gs.symbol,
49
- c.document_id,
50
- MIN(c.start_line) AS start_line,
51
- 0 AS start_char,
52
- MAX(c.end_line) AS end_line,
53
- 0 AS end_char,
54
- d.relative_path,
55
- gs.display_name,
56
- gs.kind,
57
- gs.documentation,
58
- gs.enclosing_symbol
59
- FROM global_symbols gs
60
- JOIN mentions m ON m.symbol_id = gs.id
61
- JOIN chunks c ON m.chunk_id = c.id
62
- JOIN documents d ON c.document_id = d.id
63
- WHERE d.relative_path = ?
64
- AND m.role = 1
65
- ${e.symbolNoiseFor("gs")}
66
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
67
- ORDER BY start_line, end_line`,n)}function M(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:W(e.symbol),parentTypeName:p(e.symbol),isFunctionLike:L(e.symbol),isTypeLike:g(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function hn(e,n={}){return xe(e,n.scope)}function xe(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>E(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function Sn(e,n){return D(e,{scope:n,includeIgnored:!1}).flatMap(t=>me(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function xn(e,n){let t=ue.get(e,()=>new WeakMap),i=t.get(n.symbolMatches);i||(i=new Map,t.set(n.symbolMatches,i));let r=JSON.stringify({scope:n.scope??null,sqlPrefilter:n.sqlPrefilter??null}),o=i.get(r);if(o)return[...o];let s=Z(De(e,n.scope,n.sqlPrefilter)),a=Z(_e(e,n.scope,n.sqlPrefilter)),c=new Set([...s.keys(),...a.keys()]),l=[];for(let d of[...c].sort()){if(e.isIgnored(d))continue;let f=F(s.get(d)??[],a.get(d)??[],{sort:!0}).filter(te=>n.symbolMatches(te.symbol));f.length!==0&&l.push(...k(e,d,f.map(M)))}return i.set(r,l),[...l]}function De(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ne("gs",t)}`:"",o=n?[`%${n}%`]:[];return e.all(`SELECT
68
- gs.id,
69
- gs.symbol,
70
- der.document_id,
71
- der.start_line,
72
- der.start_char,
73
- der.end_line,
74
- der.end_char,
75
- d.relative_path,
76
- gs.display_name,
77
- gs.kind,
78
- gs.documentation,
79
- gs.enclosing_symbol
80
- FROM global_symbols gs
81
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
82
- JOIN documents d ON der.document_id = d.id
83
- WHERE 1 = 1
84
- ${e.pathExclusionsFor("d")}
85
- ${i}
86
- ${r}
87
- ${e.symbolNoiseFor("gs")}
88
- ORDER BY d.relative_path, der.start_line, der.end_line`,...o)}function _e(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${ne("gs",t)}`:"",o=n?[`%${n}%`]:[];return e.all(`SELECT
89
- gs.id,
90
- gs.symbol,
91
- c.document_id,
92
- MIN(c.start_line) AS start_line,
93
- 0 AS start_char,
94
- MAX(c.end_line) AS end_line,
95
- 0 AS end_char,
96
- d.relative_path,
97
- gs.display_name,
98
- gs.kind,
99
- gs.documentation,
100
- gs.enclosing_symbol
101
- FROM global_symbols gs
102
- JOIN mentions m ON m.symbol_id = gs.id
103
- JOIN chunks c ON m.chunk_id = c.id
104
- JOIN documents d ON c.document_id = d.id
105
- WHERE m.role = 1
106
- AND NOT EXISTS (
107
- SELECT 1
108
- FROM defn_enclosing_ranges existing_der
109
- WHERE existing_der.symbol_id = gs.id
110
- )
111
- ${e.pathExclusionsFor("d")}
112
- ${i}
113
- ${r}
114
- ${e.symbolNoiseFor("gs")}
115
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
116
- ORDER BY d.relative_path, start_line, end_line`,...o)}function Ie(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function ne(e,n){return n==="callable"?Ie(e):Le(e)}function Le(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function Z(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function Dn(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(r=>E(e,r)).filter(r=>!e.isIgnored(r.relativePath));return t.onlyDocumented&&(i=i.filter(r=>r.documentation!==null&&r.documentation!=="")),t.sort&&(i=i.sort((r,o)=>r.relativePath.localeCompare(o.relativePath)||r.startLine-o.startLine||r.endLine-o.endLine)),i.map(r=>({startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,shortName:z(r.symbol),signature:U(K(r.documentation)),relativePath:r.relativePath,enclosingSymbol:r.enclosingSymbol}))}function Fe(e){let n=new Map,t=e.map((i,r)=>({definition:i,index:r,span:i.endLine-i.startLine})).sort((i,r)=>i.span-r.span||i.index-r.index);for(let{definition:i}of t)for(let r=i.startLine;r<=i.endLine;r+=1)n.has(r)||n.set(r,i);return n}function _n(e,n){let t=X.get(e);return t||(t=Fe(e),X.set(e,t)),t.get(n)??null}function In(e,n){let t=E(e,n.relative_path).find(i=>i.symbolId===n.id)??(p(n.symbol)===null||!L(n.symbol)?void 0:k(e,n.relative_path,[M(n)])[0]);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,startChar:t.startChar,endLine:t.endLine,endChar:t.endChar,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,startChar:n.start_char??0,endLine:n.end_line,endChar:n.end_char??0,relativePath:n.relative_path}}function k(e,n,t,i,r){let o=m(i,"range-correction.source-text",()=>r?r.source:b(e).forFile(n,{text:!0}).text),s=m(i,"range-correction.callable-sites",()=>r?r.callables:P(e,n));return s?m(i,"range-correction.ast-correction",()=>Oe(t,s,o)):o?m(i,"range-correction.regex-fallback",()=>Re(t,o)):t}function Re(e,n){let t=n.split(/\r?\n/),i=Ee(e,t),r=Me(e,i),o=ke(r,t);return Ne(e,o)}function Ee(e,n){let t=e.some(r=>y(r.symbol))?Pe(n):null,i=new Map;for(let r of e)i.set(r.symbolId,ve(n,t,r));return i}function Me(e,n){return e.filter(t=>y(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function ke(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let r=e[i],o=e[i+1],s=o?Math.max(r.startLine,o.startLine-1):n.length-1;t.set(r.definition.symbolId,{startLine:r.startLine,endLine:Qe(n,r.definition,r.startLine,s)})}return t}function Ne(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function Oe(e,n,t=null){let i=new Map;for(let r of n){let o=i.get(r.name);o?o.push(r):i.set(r.name,[r])}return e.map(r=>{if(!Ae(r)||!r.leaf)return q(r,t);let o=i.get(r.leaf);if(!o||o.length===0)return q(r,t);let s=t?Ce(r,o,t):null;if(s)return{...r,startLine:s.startLine,endLine:s.endLine};let a=o[0],c=Math.abs(a.startLine-r.startLine);for(let l=1;l<o.length;l+=1){let d=o[l],f=Math.abs(d.startLine-r.startLine);f<c&&(a=d,c=f)}return{...r,startLine:a.startLine,endLine:a.endLine}})}function Ce(e,n,t){let i=Te(e.symbol);if(!i)return null;let r=t.split(/\r?\n/),o=new RegExp(`\\b${I(i)}\\b`);for(let s of n){let a=we(r,s.startLine);if(a&&o.test(a))return s}return null}function Te(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function we(e,n){for(let t=n;t>=0;t-=1){let i=e[t]?.trim()??"";if(i){if(/^impl\b/.test(i))return $e(e,t,n);if(/^(?:struct|enum|trait|mod)\b/.test(i))return null}}return null}function $e(e,n,t){let i=[];for(let r=n;r<=t;r+=1){let o=e[r]??"";if(i.push(o),o.includes("{"))break}return i.join(" ")}function Ae(e){return y(e.symbol)?!0:g(e.symbol)==="term"&&p(e.symbol)===null}function q(e,n){if(!n||!e.leaf||g(e.symbol)!=="term"||p(e.symbol)!==null)return e;let t=I(e.leaf),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),o=n.split(/\r?\n/).findIndex(s=>i.test(s));return o>=0?{...e,startLine:o,endLine:o}:e}function ve(e,n,t){if(!y(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let r=n.get(t.leaf);if(!r||r.length===0)return i;let o=null;for(let s of r){let a=Math.abs(s-t.startLine);(!o||a<o.distance)&&(o={line:s,distance:a})}return o?.line??i}function Pe(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,r=/\b([A-Za-z_$][\w$]*)\s*\(/g,o=new Map,s=(a,c)=>{let l=o.get(a);if(!l){o.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let d of c.matchAll(n))d[1]&&s(d[1],a);for(let d of c.matchAll(t))d[1]&&s(d[1],a);let l=c.match(i);l?.[1]&&s(l[1],a);for(let d of c.matchAll(r))d[1]&&s(d[1],a)}return o}function Qe(e,n,t,i){let r=Math.max(t,Math.min(e.length-1,i)),o=Math.max(t,Math.min(r,n.endLine)),s=0,a=0,c=!1;for(let l=t;l<=r;l+=1){let d=je(e[l]??"");for(let f of d)f==="{"?(s+=1,c=!0):f==="}"?s=Math.max(0,s-1):f==="("?a+=1:f===")"&&(a=Math.max(0,a-1));if(c&&s===0||!c&&a===0&&l>=o)return l}return o}function je(e){let n="",t=null,i=!1;for(let r=0;r<e.length;r+=1){let o=e[r],s=e[r+1];if(!t&&o==="/"&&s==="/"){n+=" ".repeat(e.length-r);break}if(t){if(i){i=!1,n+=" ";continue}if(o==="\\"){i=!0,n+=" ";continue}o===t&&(t=null),n+=" ";continue}if(o==='"'||o==="'"||o==="`"){t=o,n+=" ";continue}n+=o}return n}function y(e){return e.includes("().")}function Ln(e){let n=u(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let r=n.descriptors[i];r?.suffix==="type"&&r.name&&t.push(r.name)}return t}export{b as a,u as b,p as c,z as d,W as e,g as f,Be as g,L as h,ze as i,We as j,Je as k,Ge as l,He as m,Ke as n,Ye as o,U as p,K as q,F as r,yn as s,E as t,hn as u,xe as v,Sn as w,xn as x,Dn as y,Fe as z,_n as A,In as B,Ln as C};
117
- //# sourceMappingURL=chunk-N2ZSIIGR.js.map
@@ -1,5 +0,0 @@
1
- import{isAbsolute as it,relative as jn}from"path";var g=class extends Error{constructor(n,r){super(`refusing unsafe project file path ${JSON.stringify(n)} (${r})`);this.relativePath=n;this.reason=r;this.name="UnsafeProjectPathError"}relativePath;reason;code="SCIP_QUERY_UNSAFE_PROJECT_PATH"};function be(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function zi(e){return e.replace(/\\/g,"/")}function Hi(e,t){return be(e)===be(t)}function b(e,t){let n=jn(e,t);return n===""||!n.startsWith("..")&&!it(n)}function w(e){if(!e)throw new g(e,"empty-path");if(e.includes("\0"))throw new g(e,"nul-byte");if(it(e)||/^[A-Za-z]:/.test(e)||e.startsWith("//")||e.startsWith("\\\\"))throw new g(e,"absolute-path");let t=be(e);if(t.split("/").some(r=>r===".."))throw new g(e,"parent-traversal");if(!t||t===".")throw new g(e,"empty-path");return t}function te(e,t,n=[]){let r=Pe(e);if(dt.has(r)||n.some(o=>ee(r,o))||t.some(o=>lt(r,o)))return"config";if(t.some(gt)&&/\.d\.(?:ts|mts|cts)$/.test(r.toLowerCase()))return"ambient";let i=ft(r);return t.some(o=>(ht[o]??[]).includes(i))?"source":"other"}function pt(e,t,n){let r=Pe(e);if(dt.has(r)||n?.some(o=>ee(r,o))||lt(r,t)||gt(t)&&/\.d\.(?:ts|mts|cts)$/.test(r.toLowerCase()))return!0;let i=ft(r);return(ht[t]??[]).includes(i)}function Ui(e){if(typeof e!="object"||e===null)return null;let t=e;return typeof t.version!="number"||!st(t.languages)||typeof t.pnpmWorkspaces!="boolean"||typeof t.typescriptProjectMode!="string"||!st(t.typescriptProjects)||t.clojureConfigPath!==void 0&&typeof t.clojureConfigPath!="string"||!Array.isArray(t.files)||!t.files.every(xe)?null:t}function ot(e){return{...e,files:e.files.map(({semanticHash:t,...n})=>n)}}function qi(e,t){return!e||!t?e===t:JSON.stringify(ot(e))===JSON.stringify(ot(t))}function Ji(e,t){let n=new Map((e?.files??[]).map(a=>[a.path,a])),r=new Map(t.files.map(a=>[a.path,a])),i=new Set([...n.keys(),...r.keys()]),o=[];for(let a of[...i].sort()){let c=n.get(a),u=r.get(a),d=te(a,t.languages);!c&&u?o.push({kind:"added",path:a,inputKind:d,after:u}):c&&!u?o.push({kind:"deleted",path:a,inputKind:d,before:c}):c&&u&&(c.hash!==u.hash||c.size!==u.size)&&o.push({kind:"modified",path:a,inputKind:d,before:c,after:u})}let s=new Set;return e||s.add("prior-snapshot-unavailable"),e&&e.version!==t.version&&s.add("snapshot-version-changed"),(at(e?.files??[])||at(t.files))&&s.add("duplicate-input-path"),[...e?.files??[],...t.files].some(Cn)&&s.add("unreadable-input"),{version:1,changes:o,projectIdentityChanged:e?!Fn(e,t):!0,uncertainty:[...s].sort()}}function st(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function at(e){return new Set(e.map(t=>t.path)).size!==e.length}function xe(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.path=="string"&&typeof t.size=="number"&&Number.isFinite(t.size)&&typeof t.hash=="string"&&(t.semanticHash===void 0||typeof t.semanticHash=="string")}function Cn(e){return e.hash==="unreadable"||e.size<0}function Fn(e,t){return ct(e.languages,t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&ct(e.typescriptProjects,t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function ct(e,t){if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((i,o)=>i===r[o])}var dt=new Set([".scipquery.json"]),kn={typescript:["tsconfig.json"],javascript:["package.json"],java:["pom.xml","build.gradle"],scala:["build.sbt"],kotlin:["build.gradle.kts"],rust:["Cargo.toml"],python:["pyproject.toml","setup.py"],ruby:["Gemfile"],go:["go.mod"],cpp:["CMakeLists.txt","Makefile"],c:["CMakeLists.txt","Makefile"],csharp:["*.csproj","*.sln"],vb:["*.vbproj","*.sln"],dart:["pubspec.yaml"],php:["composer.json"],clojure:["deps.edn","project.clj","bb.edn","shadow-cljs.edn"]},wn={typescript:["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],javascript:["package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.json","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],java:["build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],scala:["plugins.sbt","build.properties"],kotlin:["pom.xml","build.gradle","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],rust:["Cargo.lock","rust-project.json","rust-toolchain","rust-toolchain.toml"],python:["setup.cfg","requirements*.txt","Pipfile","Pipfile.lock","poetry.lock","uv.lock"],ruby:["Gemfile.lock","gems.locked"],go:["go.sum","go.work","go.work.sum"],cpp:["compile_commands.json"],c:["compile_commands.json"],csharp:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],vb:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],dart:["pubspec.lock","analysis_options.yaml"],php:["composer.lock"],clojure:[]},ut=new Map;function lt(e,t){return kn[t].some(n=>ee(e,n))||wn[t].some(n=>ee(e,n))}function ee(e,t){let n=Pe(t).replace(/^\.\//,"");if(!n)return!1;let r=e.split("/").at(-1)??e,i=n.includes("/")?e:r;if(!n.includes("*")&&!n.includes("?"))return i===n;let o=ut.get(n);if(!o){let s=n.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]");o=new RegExp(`^${s}$`),ut.set(n,o)}return o.test(i)}function Pe(e){return e.replaceAll("\\","/").replace(/^\.\//,"")}function ft(e){return e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:""}function gt(e){return e==="typescript"||e==="javascript"}var ht={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs",".vue"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};function R(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function mt(e){return typeof e=="string"&&Number.isFinite(Date.parse(e))}function Ki(e){return typeof e=="string"&&e.length>0}function Yi(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function Xi(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0}var Rn=/^[a-f0-9]{64}$/u;function Qi(e){return typeof e=="string"&&Rn.test(e)}function Zi(e){return typeof e=="string"&&e.length>0&&e.length<=256&&!/[\0\r\n]/u.test(e)}function eo(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0}var yt=["typescript","javascript","java","scala","kotlin","rust","python","ruby","go","cpp","c","csharp","vb","dart","php","clojure"];var je=2,O=3;var Ce=new Set(yt);function ao(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch(s){return{kind:"malformed",reason:`invalid JSON: ${Ln(s)}`}}if(!R(t))return{kind:"malformed",reason:"metadata must be a JSON object"};let n=t.version;if(!Number.isInteger(n))return{kind:"malformed",reason:"version must be an integer"};if(n!==je&&n!==O)return{kind:"unsupported",version:n,direction:n<je?"older":"future"};let r=In(t,n);if(r)return{kind:"malformed",reason:r};let i=t,o={metadata:i,capabilities:En(i)};return n===je?{kind:"legacy",...o,metadata:i}:{kind:"supported",...o,metadata:i}}function co(e){return e.kind==="legacy"||e.kind==="supported"?e.metadata:null}function uo(e){if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.stableGenerationIdentity)return null;let t=e.metadata;return JSON.stringify({version:t.version,status:t.status,updatedAt:t.updatedAt,fingerprint:t.fingerprint,indexedLanguages:t.indexedLanguages,scipCompanion:t.scipCompanion,sqliteLayoutVersion:t.version===O?t.sqliteLayoutVersion:void 0})}function En(e){let t=e.fingerprint!==void 0,n=R(e.fingerprint),r=e.indexedLanguages!==void 0,i=e.status==="complete",o=e.version===O?e:null;return{usableForQuery:r,usableForEvidenceCache:t,publishableGeneration:i&&n&&r,stableGenerationIdentity:i&&t&&typeof e.updatedAt=="string",languageShardReuse:!!o?.languageFingerprints,typescriptProjectShardReuse:!!o?.typescriptProjectShards}}function In(e,t){if(e.status!=="complete"&&e.status!=="partial")return"status must be complete or partial";if(e.updatedAt!==void 0&&!mt(e.updatedAt))return"updatedAt must be a valid timestamp";for(let n of["requestedLanguages","indexedLanguages"])if(e[n]!==void 0&&!vn(e[n]))return`${n} must contain unique supported languages`;return e.skipped!==void 0&&!Tn(e.skipped)?"skipped must contain supported language/reason pairs":e.scipCompanion!==void 0&&e.scipCompanion!=="current"&&e.scipCompanion!=="deferred"?"scipCompanion must be current or deferred":t===O&&e.sqliteLayoutVersion!==void 0&&(!Number.isSafeInteger(e.sqliteLayoutVersion)||e.sqliteLayoutVersion<1)?"sqliteLayoutVersion must be a positive safe integer":t===O&&e.languageFingerprints!==void 0&&!On(e.languageFingerprints)?"languageFingerprints must map supported languages to fingerprint objects":t===O&&e.typescriptProjectShards!==void 0&&!An(e.typescriptProjectShards)?"typescriptProjectShards must map project names to file fingerprints":null}function po(e){return e.version===O&&e.sqliteLayoutVersion===1}function vn(e){return!Array.isArray(e)||!e.every(t=>typeof t=="string"&&Ce.has(t))?!1:new Set(e).size===e.length}function Tn(e){return Array.isArray(e)&&e.every(t=>R(t)&&typeof t.language=="string"&&Ce.has(t.language)&&typeof t.reason=="string")}function On(e){return R(e)&&Object.entries(e).every(([t,n])=>Ce.has(t)&&R(n))}function An(e){return R(e)&&Object.values(e).every(t=>R(t)&&Array.isArray(t.files)&&t.files.every(xe))}function Ln(e){return e instanceof Error?e.message:String(e)}import{closeSync as Fe,fstatSync as ne,openSync as ke,readFileSync as Dn,readSync as St}from"fs";import{createHash as _n}from"crypto";var bt=8*1024*1024,xt=64*1024*1024,Bn=512*1024*1024,Mn=256*1024*1024,E=class extends Error{constructor(n,r,i,o,s){let a=i==="too-large"?`is ${o} bytes; the safety limit is ${s} bytes`:i==="not-regular"?"is not a regular file":"changed while it was being read";super(`${n} ${JSON.stringify(r)} ${a}`);this.inputKind=n;this.inputPath=r;this.reason=i;this.observedBytes=o;this.limitBytes=s;this.name="BoundedFileReadError"}inputKind;inputPath;reason;observedBytes;limitBytes;code="SCIP_QUERY_BOUNDED_FILE_READ"};function re(e,t){A(t.maxBytes);let n=String(e),r=ke(e,"r");try{let i=ne(r);jt(i,t,n);let o=Dn(r),s=ne(r);if(s.dev!==i.dev||s.ino!==i.ino||s.size!==i.size||o.byteLength!==i.size)throw new E(t.inputKind,n,"changed-during-read",s.size,t.maxBytes);return o}finally{Fe(r)}}function we(e,t,n="utf8"){return re(e,t).toString(n)}function $(e,t){return we(e,{maxBytes:bt,inputKind:t})}function Nn(e,t){return we(e,{maxBytes:xt,inputKind:t})}function Re(e,t){A(t.maxBytes);let n=[],r=Buffer.allocUnsafe(64*1024),i=0;for(;;){let o=St(e,r,0,r.length,null);if(o===0)break;if(i+=o,!Number.isSafeInteger(i)||i>t.maxBytes)throw new E(t.inputKind,`file descriptor ${e}`,"too-large",i,t.maxBytes);n.push(Buffer.from(r.subarray(0,o)))}return Buffer.concat(n,i)}function Gn(e,t,n="utf8"){return Re(e,t).toString(n)}function Pt(e,t){let n=ke(e,"r");try{return Re(n,t)}finally{Fe(n)}}function Wn(e,t,n="utf8"){return Pt(e,t).toString(n)}function ie(e,t,n){A(t.maxBytes);let r=String(e),i=ke(e,"r");try{let o=ne(i);jt(o,t,r);let s=Buffer.allocUnsafe(Math.min(1024*1024,Math.max(1,o.size))),a=0;for(;a<o.size;){let u=St(i,s,0,Math.min(s.length,o.size-a),a);if(u===0)break;n(s.subarray(0,u)),a+=u}let c=ne(i);if(c.dev!==o.dev||c.ino!==o.ino||c.size!==o.size||a!==o.size)throw new E(t.inputKind,r,"changed-during-read",c.size,t.maxBytes);return a}finally{Fe(i)}}function zn(e,t){let n=_n("sha256");return ie(e,t,r=>n.update(r)),n.digest("hex")}function jt(e,t,n){if(!e.isFile())throw new E(t.inputKind,n,"not-regular",Number(e.size),t.maxBytes);if(e.size>t.maxBytes)throw new E(t.inputKind,n,"too-large",Number(e.size),t.maxBytes)}function A(e){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${e}`)}import{spawnSync as $n}from"child_process";import{createHash as Un}from"crypto";import{existsSync as qn,lstatSync as Jn,realpathSync as Vn}from"fs";import{dirname as Kn,isAbsolute as Yn,join as Xn,relative as Fo,resolve as ae,sep as ko}from"path";var Ct=Symbol.for("scip-query.project-file-listing-context.v1"),Ft=globalThis,Ee=Ft[Ct],I=Ee&&typeof Ee=="object"?Ee:{};Ft[Ct]=I;function kt(e,t){let n=I.active?I.canonicalProjectRoots:void 0,r=n?.get(e);if(r!==void 0)return r;let i=t();return n?.set(e,i),i}function wt(){return I.sequence??0}function Rt(e,t,n){let r=I.active,i=r?.get(e);if(i&&i.pathBytes<=t)return i;let o=Hn(n(),(I.sequence??0)+1);if(I.sequence=o.sequence,o.pathBytes>t)throw new RangeError(`Git project file listing exceeded ${t} path bytes.`);return r?.set(e,o),o}function Et(e,t){let n=I.active?.get(e);return n&&n.sequence>t?n.indexAllowsTreeFingerprintReuse:void 0}function*It(e){let t=0;for(;t<e.taggedOutput.length;){let n=e.taggedOutput.indexOf("\0",t);if(n<0)return;yield e.taggedOutput.slice(t+2,n),t=n+1}}function Hn(e,t){let n=0,r=0,i=!0;for(;n<e.length;){let o=e.indexOf("\0",n);if(o<0||o<=n+2||e[n+1]!==" ")throw new Error("Git returned a malformed tagged project file listing.");let s=e[n];i&&=s==="H"||s==="?",r+=1,n=o+1}return{taggedOutput:e,pathBytes:Buffer.byteLength(e,"utf8")-r*2,indexAllowsTreeFingerprintReuse:i,sequence:t}}var T={run(e,t){let n=Tt(e,t);return n.kind==="success"?n.output:void 0},runResult:Tt},Qn=["rev-parse","--show-toplevel","--absolute-git-dir","--git-common-dir","HEAD","HEAD^{tree}"],ve=["status","--porcelain=v2","--branch","-z","--untracked-files=all"],oe=/^[0-9a-f]{40,64}$/;function Ro(e,t,n=T){if(!t||t.startsWith("-")||/[\0\r\n]/.test(t))throw new Error(`Invalid Git revision ${JSON.stringify(t)}.`);let r=n.runResult(e,["rev-parse","--verify","--end-of-options",`${t}^{commit}`]);if(r.kind!=="success"||!oe.test(r.output))throw new Error(`Git revision ${JSON.stringify(t)} does not resolve to exactly one commit.`);return r.output}function Eo(e,t=T){return Zn(e,t)?.context}function Zn(e,t=T){let n=t.runResult(e,Qn);if(n.kind==="success"){let i=er(n.output);if(i){let o=tr(i,t);if(o)return vt(o)}}let r=nr(e,t);return r?vt(r):void 0}function Io(e,t=T){if(!e.headCommit)return;let n=t.run(e.projectRoot,ve);if(n===void 0)return;let r=Te(n);if(!(!r?.headCommit||r.headCommit!==e.headCommit))return{...e,clean:r.clean}}function vo(e,t=T,n={}){let r=t===T&&n.cachedInventoryAfterSequence!==void 0?Et(e,n.cachedInventoryAfterSequence):void 0;if(r!==void 0)return r;let i=t.run(e,["ls-files","-v","-z"]);return i===void 0?!1:i.split("\0").filter(Boolean).every(o=>o.startsWith("H "))}function vt(e){return{context:e,projectFileInventorySequence:wt()}}function Te(e){let t=e.split("\0").filter(Boolean),n=t.find(i=>i.startsWith("# branch.oid "))?.slice(13),r=n==="(initial)"?void 0:n;if(!(r!==void 0&&!oe.test(r))&&n!==void 0)return{headCommit:r,clean:t.every(i=>i.startsWith("# "))}}function er(e){let t=e.split(`
2
- `).map(c=>c.trim());if(t.length!==5)return;let[n,r,i,o,s]=t;if(!n||!r||!i||!o||!s||!oe.test(o)||!oe.test(s))return;let a=v(n);return{root:a,gitDir:v(se(a,r)),commonDir:v(se(a,i)),headCommit:o,treeOid:s}}function tr(e,t){let n=t.run(e.root,ve);if(n===void 0)return;let r=Te(n);return r?.headCommit!==e.headCommit?void 0:{...Ot(e.root,e.gitDir),commonDir:e.commonDir,repositoryId:Oe("repository",e.commonDir),headCommit:e.headCommit,treeOid:e.treeOid,clean:r.clean}}function nr(e,t){let n=rr(e,t);if(n.kind!=="worktree")return;let r=n.identity,i=r.projectRoot,o=t.run(i,["rev-parse","--git-common-dir"])?.trim();if(!o)return;let s=v(se(i,o)),a=Ie(t.run(i,["rev-parse","--verify","HEAD"])),c=Ie(t.run(i,["rev-parse","--verify","HEAD^{tree}"])),u=t.run(i,ve);if(u===void 0)return;let d=Te(u);if(!(!d||d.headCommit!==a))return{...r,commonDir:s,repositoryId:Oe("repository",s),headCommit:a,treeOid:c,clean:d.clean}}function rr(e,t=T){let n=t.runResult(e,["rev-parse","--show-toplevel"]);if(n.kind==="not-repository")return{kind:"non-git"};if(n.kind==="error")return n;let r=n.output.trim();if(!r)return{kind:"error",message:"Git returned an empty worktree root."};let i=v(r),o=t.run(i,["rev-parse","--absolute-git-dir"])?.trim();if(!o)return{kind:"error",message:"Git did not return an absolute worktree directory."};let s=v(se(i,o));return{kind:"worktree",identity:Ot(i,s)}}function Ot(e,t){return{projectRoot:e,gitDir:t,worktreeId:Oe("worktree",`${e}\0${t}`)}}function To(e,t,n=T){return Ie(n.run(e,t))}function se(e,t){return Yn(t)?t:ae(e,t)}function v(e){try{return Vn(e)}catch{return ae(e)}}function Oe(e,t){return Un("sha256").update(`${e}\0${t}`).digest("hex").slice(0,24)}function Ie(e){return e?.trim()||void 0}function Tt(e,t){let n=$n("git",["-C",e,...t],{encoding:"utf-8",env:{...process.env,LC_ALL:"C"},maxBuffer:52428800,stdio:["ignore","pipe","pipe"],timeout:3e4,killSignal:"SIGKILL"});if(n.status===0)return{kind:"success",output:n.stdout.trimEnd()};let i=(typeof n.stderr=="string"?n.stderr.trim():"")||n.error?.message||`git exited with status ${n.status??"unknown"}`,o=n.error?.code;return(/not a git repository/i.test(i)||o==="ENOENT"&&qn(ae(e)))&&!ir(e)?{kind:"not-repository"}:{kind:"error",message:i}}function ir(e){if(process.env.GIT_DIR||process.env.GIT_COMMON_DIR)return!0;let t=ae(e);for(;;){try{return Jn(Xn(t,".git")),!0}catch(r){let i=r.code;if(i!=="ENOENT"&&i!=="ENOTDIR")return!0}let n=Kn(t);if(n===t)return!1;t=n}}import{createRequire as ar}from"module";import{existsSync as cr,lstatSync as Lt,readdirSync as ur,statSync as pr}from"fs";import l from"path";import{AsyncLocalStorage as or}from"async_hooks";var sr=new or;function L(e,t){let n=ce(e);if(!n||n.missing.has(t))return;let r=n.files.get(t);if(r)return r;let i=n.readBaseFile?.(t);return i&&n.files.set(t,i),i}function D(e,t){let n=ce(e);if(n)return n.missing.has(t)?"missing":n.paths.includes(t)?"present":"missing"}function At(e,t){return ce(e)?.fingerprints.get(t)}function _(e){return ce(e)?.paths}function ce(e){let t=sr.getStore();if(t)return t.projectRoot===v(e)?t:void 0}var dr=ar(import.meta.url),Dt=new Set([".cache",".git",".next",".nuxt",".turbo",".nx","build","coverage","dist","node_modules","tmp","vendor"]),lr=18003;function ue(e,t=[]){let n=l.resolve(e),r=t.flatMap(c=>hr(n,c));if(r.length>0)return _t(n,Mt(r));let i=gr(n),o=Mt(i),s=mr(n,o)?[n,...o]:o,a=s.length>0?s:[n];return _t(n,a)}function Nt(e){return new Set(e.map(t=>t==="."?"tsconfig.json":`${t.replace(/\/$/u,"")}/tsconfig.json`))}function Gt(e){let t=e.split("/").at(-1)?.toLowerCase();return t?.startsWith("tsconfig")===!0&&t.endsWith(".json")}var fr=/^\.scipquery-compiler-shard-\d+\.tsconfig\.json$/;function zo(e){return`.scipquery-compiler-shard-${e}.tsconfig.json`}function Wt(e){return fr.test(e)}function zt(e,t,n=[]){let r;try{r=dr("@ts-morph/common/dist/typescript.js")}catch{return null}let i=l.resolve(e),o=t==="workspace"?ue(i,n):["."],s=new Set;for(let a of o){let c=a==="."?i:l.join(i,a),u=l.join(c,"tsconfig.json"),d=Sr(r,i);if(!d.fileExists(u))return null;let p=r.readConfigFile(u,d.readFile);if(p.error)return null;let f=r.parseJsonConfigFileContent(p.config,d,c);if(f.errors.some(m=>m.code!==lr))return null;for(let m of f.fileNames){let h=l.resolve(m);b(i,h)&&s.add(l.relative(i,h).split(l.sep).join("/"))}}return s}function Ho(e,t,n,r){let i=l.resolve(e),o=new Set(r);for(let a of n){let c=l.resolve(i,a);if(b(i,c))try{let u=Lt(c);if(u.isSymbolicLink()||u.isFile()&&!o.has(B(i,c)))return!1}catch{}}let s=t==="workspace"?ue(i,n):["."];for(let a of s){let c=a==="."?i:l.join(i,a),u=l.join(c,"tsconfig.json");if(!$t(i,u))continue;let d=B(i,u);if(!o.has(d))return!1;try{if(Lt(u).isSymbolicLink())return!1;let p=Ut(i,u);if(p.includes("extends")||p.includes("\\"))return!1}catch{return!1}}return!0}function _t(e,t){return[...new Set(t.map(n=>B(e,n)))].sort((n,r)=>n.localeCompare(r))}function gr(e){let t=_(e);if(t)return t.flatMap(i=>{if(i.split("/").some(s=>Dt.has(s)))return[];let o=l.join(e,...i.split("/"));return Bt(e,o)?[l.dirname(o)]:[]});let n=[],r=[e];for(;r.length>0;){let i=r.pop(),o;try{o=ur(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=l.join(i,s.name);if(s.isDirectory()){!Dt.has(s.name)&&!s.name.startsWith(".")&&r.push(a);continue}s.isFile()&&Bt(e,a)&&n.push(l.dirname(a))}}return n}function hr(e,t){let n=t.trim();if(!n)return[];let r=l.resolve(e,n);if(!b(e,r))return[];let i=_(e);if(i){let o=B(e,r);if(i.includes(o)&&Ae(l.basename(r)))return[l.dirname(r)];let s=o==="."?"":`${o}/`;return i.some(a=>a.startsWith(s))?[r]:[]}try{let o=pr(r);if(o.isDirectory())return[r];if(o.isFile()&&Ae(l.basename(r)))return[l.dirname(r)]}catch{return[]}return[]}function Bt(e,t){if(!Ae(l.basename(t)))return!1;let n=Ht(e,t);return n?l.basename(t)==="tsconfig.json"||"include"in n||"files"in n||"references"in n:!1}function Ae(e){return e.startsWith("tsconfig")&&e.endsWith(".json")}function Mt(e){let t=[...new Set(e.map(n=>l.resolve(n)))].sort((n,r)=>n.localeCompare(r));return t.length<=1?t:t.filter(n=>!t.some(r=>r!==n&&xr(n,r)))}function mr(e,t){if(t.length===0||t.some(r=>l.resolve(r)===e))return!1;let n=l.join(e,"tsconfig.json");return $t(e,n)&&yr(e,n)}function yr(e,t){let r=Ht(e,t)?.include;return Array.isArray(r)?r.some(i=>typeof i=="string"&&i.trim()!==""&&!i.startsWith("!")&&(i.includes("/")||i.includes("**")||!l.extname(i))):!1}function Ht(e,t){try{let n=JSON.parse(Ut(e,t));return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function $t(e,t){let n=B(e,t),r=D(e,n);return r?r==="present":cr(t)}function Ut(e,t){let n=B(e,t);if(_(e)){let i=L(e,n);if(!i)throw Object.assign(new Error(`Snapshot file ${n} is missing.`),{code:"ENOENT"});return i.content.toString("utf8")}return $(t,"TypeScript project config")}function Sr(e,t){let n=_(t);if(!n)return e.sys;let r=l.resolve(t),i=new Set(n),o=br(r,n),s=e,a=c=>{let u=l.resolve(c);return b(r,u)?B(r,u):null};return{useCaseSensitiveFileNames:e.sys.useCaseSensitiveFileNames,fileExists(c){let u=a(c);return u===null?e.sys.fileExists(c):i.has(u)},readFile(c){let u=a(c);return u===null?e.sys.readFile(c):L(r,u)?.content.toString("utf8")},readDirectory(c,u,d,p,f){let m=l.resolve(c);return b(r,m)?s.matchFiles(m,u,d,p,e.sys.useCaseSensitiveFileNames,r,f,h=>o.get(l.resolve(h))??{files:[],directories:[]},h=>h):e.sys.readDirectory(c,u,d,p,f)}}}function br(e,t){let n=new Map,r=new Map,i=o=>{n.has(o)||n.set(o,new Set),r.has(o)||r.set(o,new Set)};i(e);for(let o of t){let s=o.split("/"),a=e;for(let c=0;c<s.length-1;c+=1){let u=s[c];i(a),r.get(a).add(u),a=l.join(a,u),i(a)}n.get(a).add(s.at(-1))}return new Map([...n].map(([o,s])=>[o,{files:[...s].sort(),directories:[...r.get(o)??[]].sort()}]))}function B(e,t){let n=l.relative(e,t);return n?n.split(l.sep).join("/"):"."}function xr(e,t){let n=l.relative(e,t);return!!n&&!n.startsWith("..")&&!l.isAbsolute(n)}import{createHash as _e}from"crypto";import{execFileSync as qt}from"child_process";import{createRequire as Pr}from"module";var jr=Pr(import.meta.url),Cr=/\.(?:[cm]?[jt]sx?)$/iu,Fr=/\.[jt]sx$/iu,Jt=/(?:^|\/)package\.json$/iu,U,Le=new Map;function Vt(e,t){if(!Be(e))return;let n=kr();if(n)try{let r=typeof t=="string"?t:t.toString("utf8"),i=Fr.test(e)?n.LanguageVariant.JSX:n.LanguageVariant.Standard,o=n.createScanner(n.ScriptTarget.Latest,!1,i,r),s=_e("sha256").update(`typescript-semantic-v1\0${i}\0`),a=!1,c=!1;for(;;){let u=o.scan();if(u===n.SyntaxKind.EndOfFileToken)break;if(u===n.SyntaxKind.WhitespaceTrivia)continue;if(u===n.SyntaxKind.NewLineTrivia){a&&(c=!0);continue}c&&s.update("line-break\0");let d=o.getTokenText();s.update(`${u}\0${Buffer.byteLength(d)}\0`).update(d).update("\0"),a=!0,c=!1}return s.digest("hex")}catch{return}}function Be(e){return Cr.test(e)}function Me(e,t){if(Jt.test(e))try{let n=JSON.parse(typeof t=="string"?t:t.toString("utf8"));if(typeof n!="object"||n===null||Array.isArray(n))return;let{scripts:r,...i}=n;return _e("sha256").update("typescript-package-json-v1\0").update(De(i)).digest("hex")}catch{return}}function Ne(e){return Jt.test(e)}function Vo(e,t,n){if(!Ne(t)||!/^[a-f0-9]{64}$/u.test(n))return;let r=`${e}\0${t}\0${n}`;if(Le.has(r))return Le.get(r);let i;try{let o=qt("git",["-C",e,"log","--all","--format=%H","--max-count=64","--",t],{encoding:"utf8",maxBuffer:1048576,timeout:5e3}).split(/\r?\n/u).filter(Boolean);for(let s of o){let a=qt("git",["-C",e,"show",`${s}:${t}`],{encoding:null,maxBuffer:4194304,timeout:5e3});if(_e("sha256").update(a).digest("hex")===n){i=Me(t,a);break}}}catch{i=void 0}return Le.set(r,i),i}function kr(){if(U!==void 0)return U;try{U=jr("typescript")}catch{U=null}return U}function De(e){return Array.isArray(e)?`[${e.map(De).join(",")}]`:typeof e=="object"&&e!==null?`{${Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>`${JSON.stringify(t)}:${De(n)}`).join(",")}}`:JSON.stringify(e)}import{createHash as en,randomUUID as Lr}from"crypto";import{chmodSync as tn,existsSync as M,linkSync as Dr,lstatSync as ge,readdirSync as ze,realpathSync as C,unlinkSync as _r,writeSync as Br}from"fs";import{homedir as Mr}from"os";import{basename as Nr,dirname as he,isAbsolute as Qt,join as y,resolve as me}from"path";import{closeSync as wr,existsSync as Rr,fsyncSync as Er,mkdirSync as Ir,openSync as vr}from"fs";import{dirname as Kt}from"path";function pe(e,t,n,r){let i=0;for(;i<t.length;){let o=n.writeFile(e,t,i,t.length-i);if(!Number.isSafeInteger(o)||o<=0||o>t.length-i)throw new Error(`${r} write did not make valid forward progress`);i+=o}}function Ge(e,t){if(t!=="win32")return!1;let n=e.code;return n==="EACCES"||n==="EBADF"||n==="EINVAL"||n==="EISDIR"||n==="EPERM"}var q=Object.freeze({platform:process.platform,pathExists:e=>Rr(e),makeDirectory:e=>Ir(e,{recursive:!0}),openFile:(e,t,n)=>vr(e,t,n),syncFile:e=>Er(e),closeFile:e=>wr(e)});function Yt(e,t=q){let n=[],r=e;for(;!t.pathExists(r);){n.push(r);let o=Kt(r);if(o===r)throw new Error(`Cannot establish a durable directory path without an existing ancestor: ${e}`);r=o}let i="synced";for(let o of n.reverse())t.makeDirectory(o),i=le(i,de(Kt(o),t));return i}function de(e,t=q){let n;try{n=t.openFile(e,"r")}catch(r){if(Ge(r,t.platform))return"unsupported";throw r}try{t.syncFile(n)}catch(r){try{t.closeFile(n)}catch{}if(Ge(r,t.platform))return"unsupported";throw r}return t.closeFile(n),"synced"}function le(...e){return e.every(t=>t==="not-requested")?"not-requested":e.includes("unsupported")?"unsupported":"synced"}import{createRequire as Tr}from"module";var Or=Tr(import.meta.url),Xt=Ar().version;function Ar(){for(let e of["../package.json","../../package.json"])try{return Or(e)}catch{}return{version:"0.0.0"}}var nn=1,V=".scip-query-cache-owner.json",Gr=16*1024,rn=Object.freeze({...q,randomToken:()=>Lr(),linkFile:(e,t)=>Dr(e,t),removeFile:e=>_r(e),writeFile:(e,t,n,r)=>Br(e,t,n,r)});function fe(e,t){return Object.assign(new Error(`refusing unsafe project dbPath ${JSON.stringify(e)} (${t}); use a repository-relative directory that remains inside the checkout`),{name:"UnsafeCachePathError",code:"SCIP_QUERY_UNSAFE_CACHE_PATH",configuredPath:e,reason:t})}function F(e,t){return Object.assign(new Error(`refusing unowned cache directory ${JSON.stringify(e)} (${t}); move unrelated data elsewhere or choose a new empty dbPath`),{name:"CacheOwnershipError",code:"SCIP_QUERY_CACHE_OWNERSHIP",cacheDir:e,reason:t})}function Wr(e,t){let n=C(e);return Hr(n,He(n,t))}function He(e,t){let n=C(e),r=process.env.SCIP_QUERY_CACHE_DIR;return r?me(r):t?.dbPath?Ur(n,t.dbPath):zr(n)}function on(){let e=process.env.XDG_CACHE_HOME;return y(e||y(Mr(),".cache"),"scip-query")}function zr(e){let t=me(e);try{t=C(t)}catch{}let n=en("sha256").update(t).digest("hex").slice(0,12);return y(on(),"projects",n)}function ls(e){if(!/^[a-f0-9]{24}$/.test(e))throw new Error(`invalid repository cache identity: ${e}`);let t=y(on(),"repositories",e);return cn(t),C(t)}function fs(e){return process.env.SCIP_QUERY_SHARED_CACHE!=="0"&&!process.env.SCIP_QUERY_CACHE_DIR&&!process.env.SCIP_QUERY_INDEX_DB&&!e?.dbPath}function gs(e,t){let n=Wr(e,t);return{cacheDir:n,dbPath:y(n,"index.db"),indexPath:y(n,"index.scip"),metaPath:y(n,"meta.json")}}function Hr(e,t,n=rn){return $r(e,t,n).cacheDir}function $r(e,t,n=rn){let r=C(e),i=M(t)?"synced":cn(t,n),o=C(t),s=y(o,V);if(M(s))return We(r,o),$e(s),J(o),{kind:"existing",cacheDir:o};Zt(o),Yr(o),Zt(o);let c=`${JSON.stringify({schemaVersion:nn,canonicalProjectRoot:r,canonicalCacheDir:o,creatorVersion:Xt},null,2)}
3
- `;try{let u=Xr(s,c,n),d=le(i,u);return{kind:"published",cacheDir:o,achievedDurability:d==="synced"?"directory-durable":"file-flushed",directorySync:d}}catch(u){if(Zr(u))return We(r,o),{kind:"existing",cacheDir:o};throw u}}function We(e,t){let n=C(e),r=C(t);return Jr(r,n,r)}function hs(e,t){return M(y(t,V))?(We(e,t),sn(t),!0):!1}function Ur(e,t){let n;try{n=w(t)}catch(s){throw s instanceof g?fe(t,s.reason):s}let r=me(e,...n.split("/"));if(r===e||!b(e,r))throw fe(t,"outside-project");let i=qr(r),o=C(i);if(!b(e,o)&&o!==e)throw fe(t,"symlink-escape");return r}function qr(e){let t=e;for(;!M(t);){let n=he(t);if(n===t)throw fe(e,"no-existing-ancestor");t=n}return t}function Jr(e,t,n){let r=y(e,V);if(!M(r)||ge(r).isSymbolicLink())throw F(e,"missing regular ownership record");let i=ge(r);if(!i.isFile()||i.size>Gr)throw F(e,"invalid ownership record file");let o=$(r,"cache ownership record"),s=Vr(o,e);if(t!==void 0&&s.canonicalProjectRoot!==t)throw F(e,"ownership record belongs to a different project");if(s.canonicalCacheDir!==n)throw F(e,"ownership record names a different cache directory");return{record:s,ownerSha256:en("sha256").update(o).digest("hex"),physicalCacheDir:e}}function Vr(e,t){try{let n=JSON.parse(e);if(n.schemaVersion!==nn||typeof n.canonicalProjectRoot!="string"||typeof n.canonicalCacheDir!="string"||typeof n.creatorVersion!="string"||!Qt(n.canonicalProjectRoot)||!Qt(n.canonicalCacheDir))throw new Error("invalid fields");return n}catch(n){throw F(t,`malformed ownership record: ${n instanceof Error?n.message:String(n)}`)}}function Zt(e){let t=ze(e).filter(n=>n!==V&&!Kr(n));if(t.length>0)throw F(e,`unrecognized existing entries: ${t.slice(0,3).join(", ")}`)}function Kr(e){return e.startsWith(`${V}.tmp-`)||e.startsWith("git-worktree-context.json.tmp-")||[".scipquery-generations","affected-shadow-latest.json","affected-shadow.jsonl","agent-hooks","augment-vue-meta.json","cache-lifecycle.lock","evidence.db","evidence.db-shm","evidence.db-wal","health-report-cache.json","git-worktree-context.json","index.db","index.db-shm","index.db-wal","index.lock","index.scip","language-indexes","meta.json","reindex-activity.jsonl","shared-cache.json","typescript-index","typescript-scip-fragments","typescript-scip-overlays","typescript-semantic","typescript-shard-costs.json","watch-activity.json","watch-refresh-requests","watch-state.json","watch.lock"].includes(e)?!0:/^(?:reindex-|rust-|typescript-)/.test(e)}function Yr(e){for(let t of ze(e)){let n=y(e,t);try{let r=ge(n);if(r.isSymbolicLink())throw F(e,`legacy cache entry ${t} is a symlink`);if(r.isDirectory())J(n);else if(r.isFile())$e(n);else throw F(e,`legacy cache entry ${t} is not a file or directory`)}catch(r){if(an(r))continue;throw r}}J(e)}function sn(e,t=!1){try{let n=ge(e);if(n.isSymbolicLink())throw F(e,"managed cache tree contains a symlink");if(n.isFile()){$e(e);return}if(!n.isDirectory())throw F(e,"managed cache tree contains a special file");J(e);for(let r of ze(e))sn(y(e,r),!0)}catch(n){if(t&&an(n))return;throw n}}function an(e){let t=e?.code;return t==="ENOENT"||t==="ENOTDIR"}function cn(e,t=q){let n=Yt(e,t);return J(e),n}function Xr(e,t,n){let r=`${e}.tmp-${process.pid}-${n.randomToken()}`,i,o=!1;try{i=n.openFile(r,"wx",384),o=!0,pe(i,Buffer.from(t),n,"cache ownership record"),n.syncFile(i),n.closeFile(i),i=void 0,n.linkFile(r,e);let s=de(he(e),n);return n.removeFile(r),o=!1,le(s,de(he(e),n))}finally{if(i!==void 0)try{n.closeFile(i)}catch{}if(o)try{n.removeFile(r)}catch{}}}function J(e){process.platform!=="win32"&&tn(e,448)}function $e(e){process.platform!=="win32"&&tn(e,384)}function Qr(e){if(M(e))return C(e);let t=C(he(e));return y(t,Nr(e))}function ms(e){return Qr(me(e))}function Zr(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}import{execFileSync as hi}from"child_process";import{isUtf8 as hn}from"buffer";import{createHash as Ye}from"crypto";import{closeSync as Sn,fstatSync as K,lstatSync as Qe,openSync as bn,readdirSync as mi,readFileSync as yi,readSync as mn,readlinkSync as Si,realpathSync as X}from"fs";import{isAbsolute as bi,join as Ze,relative as xi,resolve as Pi,sep as ji}from"path";import{closeSync as un,existsSync as qe,openSync as ei,realpathSync as ti,renameSync as ni,unlinkSync as pn,writeSync as ri}from"fs";import{dirname as ii,join as oi}from"path";var si="fingerprint-stat-cache.json",dn=1,ai=8*1024*1024,Ue=new Map;function Je(e,t,n,r){let i=ln(e),o=i.files.get(t);if(!(!o||!fn(o,n,r)))return i.hits+=1,{hash:o.hash,size:o.fingerprintSize,...o.semanticHash===void 0?{}:{semanticHash:o.semanticHash}}}function Ve(e,t,n,r,i){if(i.hash==="unreadable"||i.size<0||!Number.isFinite(i.size))return;let o=ln(e),s={kind:n,dev:r.dev,ino:r.ino,mtimeMs:r.mtimeMs,ctimeMs:r.ctimeMs,size:r.size,hash:i.hash,fingerprintSize:i.size,...i.semanticHash===void 0?{}:{semanticHash:i.semanticHash}},a=o.files.get(t);a&&fi(a,s)||(o.files.set(t,s),o.stores+=1,o.dirty=!0)}function Ke(e){let t=Ue.get(gn(e));if(!(!t?.dirty||!t.cachePath))try{let n=ii(t.cachePath);if(!qe(n))return;gi(t.cachePath,pi(t)),t.dirty=!1}catch{}}function ln(e){let t=gn(e),n=Ue.get(t);if(n)return n;let r=ci(t),i=ui(r),o={cachePath:r,files:i,dirty:!1,hits:0,stores:0};return Ue.set(t,o),o}function ci(e){try{let t=He(e);return qe(t)?oi(t,si):null}catch{return null}}function ui(e){let t=new Map;if(!e||!qe(e))return t;try{let n=JSON.parse(re(e,{inputKind:"fingerprint stat cache",maxBytes:ai}).toString("utf8"));if(!di(n))return t;for(let[r,i]of Object.entries(n.files))i&&t.set(r,i)}catch{return t}return t}function pi(e){return{version:dn,files:Object.fromEntries(e.files)}}function di(e){if(typeof e!="object"||e===null)return!1;let t=e;return t.version!==dn||typeof t.files!="object"||t.files===null?!1:Object.values(t.files).every(li)}function li(e){if(typeof e!="object"||e===null)return!1;let t=e;return(t.kind==="file"||t.kind==="symlink")&&Number.isFinite(t.dev)&&Number.isFinite(t.ino)&&Number.isFinite(t.mtimeMs)&&Number.isFinite(t.ctimeMs)&&Number.isFinite(t.size)&&Number.isFinite(t.fingerprintSize)&&typeof t.hash=="string"&&t.hash!=="unreadable"&&(t.semanticHash===void 0||typeof t.semanticHash=="string")}function fn(e,t,n){return e.kind===t&&e.dev===n.dev&&e.ino===n.ino&&e.mtimeMs===n.mtimeMs&&e.ctimeMs===n.ctimeMs&&e.size===n.size}function fi(e,t){return fn(e,t.kind,t)&&e.hash===t.hash&&e.fingerprintSize===t.fingerprintSize&&e.semanticHash===t.semanticHash}function gi(e,t){let n=`${e}.${process.pid}.tmp`;try{pn(n)}catch{}let r=Buffer.from(`${JSON.stringify(t)}
4
- `,"utf8"),i=ei(n,"wx",384);try{pe(i,r,{writeFile:(o,s,a,c)=>ri(o,s,a,c)},"fingerprint stat cache")}catch(o){throw un(i),pn(n),o}un(i),ni(n,e)}function gn(e){return ti(e)}var Q=64*1024*1024,Ci=1024*1024,Fi=1024,N=class extends Error{constructor(n,r,i,o){super(`${n} ${JSON.stringify(r)} is ${i} bytes; the safety limit is ${o} bytes`);this.inputKind=n;this.inputPath=r;this.observedBytes=i;this.limitBytes=o;this.name="InputTooLargeError"}inputKind;inputPath;observedBytes;limitBytes;code="SCIP_QUERY_INPUT_TOO_LARGE"};function ki(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function et(e,t,n={}){let r=w(t),i=kt(e,()=>X(e)),o=Pi(i,...r.split("/"));if(!b(i,o)||o===i)throw new g(t,"outside-project");let s=X(o);if(!b(i,s)||s===i)throw new g(t,"outside-project");let a=Qe(s);if(!a.isFile())throw new g(t,"not-a-file");let c={projectRoot:i,relativePath:r,absolutePath:s,size:a.size,mtimeMs:a.mtimeMs,device:a.dev,inode:a.ino},u=n.maxBytes??Q;if(A(u),c.size>u)throw new N(n.inputKind??"project file",c.relativePath,c.size,u);return c}function wi(e,t,n={}){let r=w(t),i=D(e,r);if(i){if(i==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(r)} does not exist.`),{code:"ENOENT"});let c=L(e,r);if(!c)throw new g(r,"changed-during-read");let u=n.maxBytes??Q;if(A(u),c.size>u)throw new N(n.inputKind??"project file",r,c.size,u);return Buffer.from(c.content)}let o=et(e,t,n),s=n.maxBytes??Q,a=bn(o.absolutePath,"r");try{let c=K(a);if(Y(c,o,t),c.size>s)throw new N(n.inputKind??"project file",o.relativePath,c.size,s);let u=yi(a),d=K(a);if(Y(d,o,t),u.byteLength!==c.size)throw new g(t,"changed-during-read");return u}finally{Sn(a)}}function Bs(e,t,n,r={}){if(n.byteLength===0)throw new Error("Project file probe literal must not be empty.");let{matchedLiteralIndexes:i,...o}=Ri(e,t,[n],r);return{...o,includesLiteral:i.length>0}}function Ri(e,t,n,r={}){if(n.length===0||n.some(c=>c.byteLength===0))throw new Error("Project file probe literals must not be empty.");let i=w(t),o=D(e,i);if(o){if(o==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(i)} does not exist.`),{code:"ENOENT"});let c=L(e,i);if(!c)throw new g(i,"changed-during-read");let u=r.maxBytes??Q;if(A(u),c.size>u)throw new N(r.inputKind??"project file",i,c.size,u);let d=!c.content.includes(0)&&hn(c.content),p=n.map(yn),f=d?Ii(c.content,n,p):[];return{byteLength:c.size,isUtf8Text:d,matchedLiteralIndexes:f,bytes:f.length>0?Buffer.from(c.content):null,...r.computeSha256?{sha256:c.sha256}:{}}}let s=et(e,t,r),a=bn(s.absolutePath,"r");try{let c=K(a);Y(c,s,t);let u=r.computeSha256?Ye("sha256"):null,d=r.scratchBuffer??Buffer.allocUnsafe(Ci);if(d.byteLength===0)throw new Error("Project file probe scratch buffer must not be empty.");let p=0,f=n.map(()=>!1),m=!1,h=!0,x=Buffer.alloc(0),Z=n.map(()=>Buffer.alloc(0)),G=n.map(yn);for(;p<c.size;){let P=mn(a,d,0,Math.min(d.byteLength,c.size-p),p);if(P<=0)throw new g(t,"changed-during-read");let j=d.subarray(0,P);if(u?.update(j),m||=j.includes(0),h){let S=x.byteLength>0?Buffer.concat([x,j]):j,H=Ei(S);h=hn(S.subarray(0,H)),x=Buffer.from(S.subarray(H))}for(let S=0;S<n.length;S+=1){if(f[S])continue;let H=n[S],rt=Z[S];f[S]=vi(j,H,rt,G[S]),Z[S]=Ti(j,H,rt)}p+=P}h&&=x.byteLength===0,Y(K(a),s,t);let W=!m&&h,z=W?f.flatMap((P,j)=>P?[j]:[]):[],k=null;if(z.length>0){k=Buffer.allocUnsafe(c.size);let P=0;for(;P<k.byteLength;){let j=mn(a,k,P,k.byteLength-P,P);if(j<=0)throw new g(t,"changed-during-read");P+=j}Y(K(a),s,t)}return{byteLength:c.size,isUtf8Text:W,matchedLiteralIndexes:z,bytes:k,...u?{sha256:u.digest("hex")}:{}}}finally{Sn(a)}}function Ms(e,t,n={}){return wi(e,t,n).toString("utf8")}function Y(e,t,n){if(!e.isFile()||e.dev!==t.device||e.ino!==t.inode||e.size!==t.size)throw new g(n,"changed-during-read")}function Ei(e){if(e.byteLength===0)return 0;let t=e.byteLength-1,n=0;for(;t>=0&&n<3&&(e[t]&192)===128;)n+=1,t-=1;if(t<0)return e.byteLength;let r=e[t];return((r&128)===0?1:(r&224)===192?2:(r&240)===224?3:(r&248)===240?4:0)>e.byteLength-t?t:e.byteLength}function Ii(e,t,n){return t.flatMap((r,i)=>Xe(e,r,n[i])?[i]:[])}function vi(e,t,n,r){if(Xe(e,t,r))return!0;if(n.byteLength===0||t.byteLength===1)return!1;let i=e.subarray(0,Math.min(e.byteLength,t.byteLength-1));return Xe(Buffer.concat([n,i]),t,r)}function Xe(e,t,n){if(n<0)return e.includes(t);let r=t[n],i=e.indexOf(r),o=0;for(;i>=0;){if(o+=1,o>Fi)return e.includes(t);let s=i-n;if(s>=0&&s+t.byteLength<=e.byteLength&&e.compare(t,0,t.byteLength,s,s+t.byteLength)===0)return!0;i=e.indexOf(r,i+1)}return!1}function yn(e){for(let n=1;n<e.byteLength;n+=1){let r=e[n];if(r>=65&&r<=90)return n}let t=e[0];return t>=65&&t<=90?0:-1}function Ti(e,t,n){let r=t.byteLength-1;if(r===0)return Buffer.alloc(0);if(e.byteLength>=r)return Buffer.from(e.subarray(e.byteLength-r));let i=Buffer.concat([n,e]);return Buffer.from(i.subarray(Math.max(0,i.byteLength-r)))}function tt(e){return typeof e=="object"&&e!==null&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}function Ns(e,t){try{return et(e,t),!0}catch(n){if(tt(n))return!1;throw n}}function Oi(e){let t=_(e);return t?t.filter(n=>n&&!Se(n)).sort():(Mi(e)??Ni(e)).filter(n=>n&&!Se(n)).sort()}function Ai(e,t={}){let n=(t.includePaths??[]).map(w),r=[...new Set([...Oi(e),...n])].filter(s=>!Se(s)).filter(s=>!t.language||pt(s,t.language,t.markerFiles)).filter(s=>!t.includePath||t.includePath(s)).sort((s,a)=>s.localeCompare(a)),i=X(e),o=r.flatMap(s=>xn(e,i,s));return Ke(i),o}function xn(e,t,n){let r=At(e,n);if(r)return[{path:n,size:r.fingerprintSize??r.size,hash:r.sha256}];if(D(e,n)==="present"){let o=L(e,n);if(o)return[{path:n,size:o.fingerprintSize??o.size,hash:o.sha256}]}let i=Ze(e,n);try{let o=Qe(i);if(o.isSymbolicLink()){let x=Je(t,n,"symlink",ye(o));if(x)return[{path:n,size:x.size,hash:x.hash}];let Z=X(i),G=xi(t,Z);if(G===".."||G.startsWith(`..${ji}`)||bi(G))throw new Error("external symlink");let W=Si(i),z=Ye("sha256").update("symlink\0").update(W).digest("hex"),k=Buffer.byteLength(W);return Ve(t,n,"symlink",ye(o),{hash:z,size:k}),[{path:n,size:k,hash:z}]}let s=Be(n)||Ne(n),a=Je(t,n,"file",ye(o));if(a&&(!s||a.semanticHash!==void 0))return[{path:n,size:a.size,hash:a.hash,...a.semanticHash===void 0?{}:{semanticHash:a.semanticHash}}];let c=Ye("sha256"),u=s,d=[],p=ie(i,{inputKind:"project fingerprint input",maxBytes:Q},x=>{c.update(x),u&&d.push(Buffer.from(x))}),f=c.digest("hex"),m=u?Buffer.concat(d,p):void 0,h=m?Vt(n,m)??Me(n,m):void 0;return Ve(t,n,"file",ye(o),{hash:f,size:p,...h===void 0?{}:{semanticHash:h}}),[{path:n,size:p,hash:f,...h===void 0?{}:{semanticHash:h}}]}catch(o){return tt(o)?[]:[{path:n,size:-1,hash:"unreadable"}]}}function ye(e){return{dev:e.dev,ino:e.ino,mtimeMs:e.mtimeMs,ctimeMs:e.ctimeMs,size:e.size}}function Pn(e,t,n){let r=nt(t,n),i=[...r.typescriptProjects.filter(c=>_i(e,c)),...r.clojureConfigPath?[r.clojureConfigPath]:[]],o=r.languages.includes("typescript")?zt(e,r.typescriptProjectMode,r.typescriptProjects):null,s=r.languages.includes("typescript")?r.typescriptProjectMode==="workspace"?ue(e,r.typescriptProjects):["."]:[],a=Nt(s);return{...r,files:Ai(e,{includePath:c=>{if(c===".scipquery.json")return!1;let u=te(c,t,i);return u==="other"||u==="config"&&Gt(c)&&!a.has(c)?!1:u!=="source"||!Di(c)||!o?!0:o.has(c)},includePaths:i})}}function Gs(e,t){let n=new Set(t.files.map(o=>o.path)),r=Pn(e,t.languages,t),i=new Map(r.files.map(o=>[o.path,o]));return{...nt(t.languages,t),files:[...t.files.flatMap(o=>{let s=i.get(o.path);return s?[s]:[]}),...r.files.filter(o=>!n.has(o.path))]}}function Ws(e,t,n,r,i,o){let s=p=>({mode:"full",fingerprint:Pn(e,t,n),reason:p});if(!i)return s("change-journal-unavailable");if(!i.complete)return s(`change-journal-incomplete:${i.incompleteReason??"unknown"}`);if(!o)return s("accepted-generation-unavailable");if(i.baseGeneration!==o)return s("change-journal-base-mismatch");if(!r)return s("prior-project-input-snapshot-unavailable");let a=nt(t,n);if(!Li(r,a))return s("project-input-configuration-changed");if(new Set(r.files.map(p=>p.path)).size!==r.files.length)return s("prior-project-input-snapshot-has-duplicate-paths");if(i.entries.length===0)return{mode:"delta",fingerprint:{...a,files:[...r.files].sort((p,f)=>p.path.localeCompare(f.path))},changedPaths:[]};let c=[...a.typescriptProjects,...a.clojureConfigPath?[a.clojureConfigPath]:[]],u=new Map(r.files.map(p=>[p.path,p]));for(let p of i.entries){let f=u.get(p.path);if(te(p.path,t,c)!=="source")return s("non-source-project-input-changed");if(p.kind==="add"&&f)return s("added-path-already-in-prior-project-input-snapshot");if(p.kind==="delete"&&!f)return s("deleted-path-not-in-prior-project-input-snapshot");if(p.kind==="change"&&!f)return s("changed-path-not-in-prior-project-input-snapshot");if(f&&(f.hash==="unreadable"||f.size<0))return s("changed-path-was-unreadable")}let d=X(e);for(let p of i.entries){let f=xn(e,d,p.path);if(p.kind==="delete"){if(f.length!==0)return s("deleted-source-is-still-readable");u.delete(p.path);continue}if(f.length!==1||f[0].hash==="unreadable"||f[0].size<0)return s(p.kind==="add"?"added-source-is-not-readable":"changed-source-no-longer-readable");u.set(p.path,f[0])}return Ke(d),{mode:"delta",fingerprint:{...a,files:[...u.values()].sort((p,f)=>p.path.localeCompare(f.path))},changedPaths:i.entries.map(p=>p.path).sort()}}function Li(e,t){return e.version===t.version&&JSON.stringify([...e.languages].sort())===JSON.stringify(t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&JSON.stringify([...e.typescriptProjects].sort())===JSON.stringify(t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function Di(e){return/\.(?:[cm]?[jt]sx?|vue)$/iu.test(e)}function _i(e,t){let n;try{n=w(t)}catch{return!1}let r=D(e,n);if(r)return r==="present";try{return Qe(Ze(e,n)).isFile()}catch(i){if(tt(i))return!1;throw i}}function nt(e,t){return{version:3,languages:[...e].sort(),pnpmWorkspaces:t.typescriptProjectMode!=="workspace"&&t.pnpmWorkspaces===!0,typescriptProjectMode:t.typescriptProjectMode??"single",typescriptProjects:ki(t.typescriptProjects),clojureConfigPath:Bi(t.clojureConfigPath)}}function Bi(e){return e?.trim()||void 0}function Mi(e){try{let t=Rt(e,52428800,()=>hi("git",["-C",e,"ls-files","-co","-v","-z","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:104857600,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}));return[...It(t)]}catch{return null}}function Ni(e){let t=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?Ze(e,r):e,o;try{o=mi(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=r?`${r}/${s.name}`:s.name;if(s.isDirectory()){Se(a)||n.push(a);continue}t.push(a)}}return t}function Se(e){let t=e.split("/");return e==="meta.json"||Wt(e)||t[0]===".scipquery"&&(t[1]==="events"||t[1]==="ledger"||t[1]==="releases"||t[1]==="suppressions")||t.some(n=>Gi.has(n))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var Gi=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);export{g as a,be as b,zi as c,Hi as d,b as e,w as f,te as g,pt as h,Ui as i,ot as j,qi as k,Ji as l,kn as m,R as n,mt as o,Ki as p,Yi as q,Xi as r,Qi as s,Zi as t,eo as u,yt as v,O as w,ao as x,co as y,uo as z,En as A,po as B,bt as C,xt as D,Bn as E,Mn as F,E as G,re as H,we as I,$ as J,Nn as K,Gn as L,Wn as M,ie as N,zn as O,pe as P,Ge as Q,q as R,Yt as S,de as T,le as U,Rt as V,It as W,T as X,Ro as Y,Eo as Z,Io as _,vo as $,To as aa,se as ba,v as ca,ue as da,Nt as ea,Gt as fa,zo as ga,Wt as ha,zt as ia,Ho as ja,Vo as ka,Xt as la,He as ma,on as na,zr as oa,ls as pa,fs as qa,gs as ra,hs as sa,ms as ta,N as ua,ki as va,et as wa,wi as xa,Bs as ya,Ri as za,Ms as Aa,tt as Ba,Ns as Ca,Oi as Da,Ai as Ea,Pn as Fa,Gs as Ga,Ws as Ha,nt as Ia};
5
- //# sourceMappingURL=chunk-N5B2NILC.js.map
@@ -1,2 +0,0 @@
1
- import{c as r}from"./chunk-N5B2NILC.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
2
- //# sourceMappingURL=chunk-NJITK2GP.js.map
@@ -1,2 +0,0 @@
1
- import{r as p}from"./chunk-RTQ7NEKG.js";import{f as o,h as d,j as s,k as c}from"./chunk-FGA2U4OR.js";import{c as a}from"./chunk-H5EXS3HM.js";import{join as S}from"path";var u=3,b=2,x="typescript-semantic";function R(n){let e=S(n,x),t=d(e);return{...t,requestDir:t.legacyRequestDir}}function q(n){let e=JSON.parse(n),t=e.protocolVersion,r=t===b;if(!r&&t!==u||typeof e.id!="string"||typeof e.generation!="string"||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||e.profileEnvironment!==void 0&&!a(e.profileEnvironment)||!e.request||!g(e.request)||!r&&(e.mailboxVersion!==o||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==c(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript semantic service received an invalid mailbox request.");if(!r){let i=e,y=s("typescript-semantic-v3",{generation:i.generation,profileEnvironment:i.profileEnvironment,request:i.request});if(i.operationKey!==y)throw new Error("TypeScript semantic service received a mismatched mailbox operation identity.");return i}let m=s("typescript-semantic-v2",{id:e.id,generation:e.generation,request:e.request});return{protocolVersion:u,mailboxVersion:o,id:e.id,operationKey:m,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,generation:e.generation,...e.profileEnvironment?{profileEnvironment:e.profileEnvironment}:{},request:e.request}}function g(n){if(!n||typeof n!="object"||!("kind"in n))return!1;let e=n;switch(e.kind){case"availability":return!0;case"import-usage":return typeof e.file=="string";case"reference-fragments":return p(e.files)!==null;case"references":return l(e.definitions)&&(e.exact===void 0||typeof e.exact=="boolean");case"callees":return l(e.definitions);case"signature":return f(e.definition);default:return!1}}function l(n){return Array.isArray(n)&&n.every(f)}function f(n){if(!n||typeof n!="object")return!1;let e=n;return typeof e.symbolId=="number"&&typeof e.documentId=="number"&&typeof e.symbol=="string"&&typeof e.relativePath=="string"&&typeof e.leaf=="string"&&typeof e.startLine=="number"&&typeof e.endLine=="number"}export{u as a,R as b,q as c};
2
- //# sourceMappingURL=chunk-NOGJXYFO.js.map