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{c as a}from"./chunk-BOJ5SVE2.js";import{a as m}from"./chunk-W7CXK74K.js";import{a as b,b as S}from"./chunk-E73UNJTF.js";import{o as y}from"./chunk-DYGHBZ2N.js";import{a as f}from"./chunk-OSSESPDX.js";import{d as r}from"./chunk-N2ZSIIGR.js";function u(o,l,t={}){let i=f(o,l);if(!i)return null;let g=[{file:i.relativePath,line:i.startLine}],s=y(o,i,{semantic:t.semantic,semanticEvidence:m}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{outgoingCalls:c,incomingCalls:n}=h(o,i,s,{semantic:t.semantic!==!1});return{symbol:i.symbol,shortName:r(i.symbol),relativePath:i.relativePath,definitionSites:g.filter(e=>!o.isIgnored(e.file)),referenceSites:s,outgoingCalls:c.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),incomingCalls:n.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function A(o,l,t={}){let i=u(o,l,t);return i?{symbol:i.symbol,shortName:i.shortName,relativePath:i.relativePath,definitionSites:i.definitionSites,usageSites:i.referenceSites,producers:i.outgoingCalls,consumers:i.incomingCalls}:null}function h(o,l,t,i){let g=a(b(o,l,{limit:30,semantic:i.semantic,semanticEvidence:m}).map(n=>({symbol:n.symbol,file:n.file}))),s=a(S(o,l,{limit:30,semantic:i.semantic,semanticEvidence:m})),c=s.length>0?s:a(t.map(n=>({symbol:n.enclosingSymbol==="(top-level)"?n.file:n.enclosingSymbol,file:n.file})));return{outgoingCalls:g,incomingCalls:c}}export{u as a,A as b};
2
- //# sourceMappingURL=chunk-CWFP7GM5.js.map
@@ -1,2 +0,0 @@
1
- import{N as c}from"./chunk-ZOHS7AQV.js";import{h as u,l as p}from"./chunk-FESCRNVV.js";import{d as a}from"./chunk-JWTGMPIT.js";var g=a("suppression-inventory",{clearGroups:["whole-project"]});function C(t){return g.get(t,()=>y(t))}function y(t){let e={dead:0,stale:0,wrapper:0,passthrough:0,drift:0,extract:0,similar:0,twin:0,uncategorized:0},n=new Map,i=0;for(let r of c(t)){let o=u(t,r);if(!(!o||!o.includes("scip-query")))for(let f of o.split(/\r?\n/)){let s=p(f);if(s===null)continue;i+=1,n.set(r,(n.get(r)??0)+1);let d=l(s);e[d]+=1}}for(let r of t.config.suppressions??[])r.expiresAt&&Date.parse(r.expiresAt)<=Date.now()||(i+=1,r.file&&n.set(r.file,(n.get(r.file)??0)+1),e[l(r.check)]+=1);return{total:i,byCategory:e,byFile:n}}function l(t){if(!t)return"uncategorized";let e=t.toLowerCase();return e==="dead-code"||e==="new-dead"?"dead":e.includes("twin")?"twin":e.includes("similar")||e.includes("duplicate")?"similar":e.includes("wrapper")?"wrapper":e.includes("passthrough")?"passthrough":e.includes("drift")?"drift":e.includes("extract")?"extract":e.includes("stale")?"stale":"uncategorized"}export{C as a};
2
- //# sourceMappingURL=chunk-D2DHWI3D.js.map
@@ -1,4 +0,0 @@
1
- import{a as y}from"./chunk-J66VOFW6.js";import{a as v}from"./chunk-WYCTJDVR.js";import{q as S}from"./chunk-YEN6CYC7.js";import{a as b}from"./chunk-HOENASQM.js";import{Q as p,R as g,i as d}from"./chunk-3L2ZBPEX.js";import{c as u,d as f,g as m}from"./chunk-DRENNWRG.js";function q(e,t,i={}){let n=T(e,t,i);return{definitions:n.definitions,referencedBy:n.referencedBy.map(r=>({relativePath:r.relativePath,line:r.line,enclosingSymbol:r.enclosingSymbol,enclosingShort:r.enclosingShort}))}}function T(e,t,i={}){let n=R(e,t,i);return{definitions:n.definitions,referencedBy:n.referencedBy}}function R(e,t,i={}){let n=b(e,t);if(!n)return{definitions:[],referencedBy:[],referenceEvidence:[],claimSupport:null};let r=e.get("SELECT display_name, documentation FROM global_symbols WHERE id = ?",n.symbolId),c=g(r?.documentation??null),o=e.isIgnored(n.relativePath)?[]:[{relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,signature:K(c,r?.display_name??null,n.symbol),source:B(e,n.relativePath,n.startLine,n.endLine)}],h=i.referenceContext??2,s=S(e,n,{semantic:i.semantic,semanticEvidence:v}).map(l=>{let a=y(e,l.file,l.line,h,f(n.symbol));return{relativePath:l.file,line:l.line,enclosingSymbol:l.enclosingSymbol,enclosingShort:l.enclosingSymbol?u(l.enclosingSymbol):"(top-level)",provenance:l.provenance,sourceStartLine:a?.startLine??null,sourceEndLine:a?.endLine??null,source:a?.source??null,sourceKind:a?.kind??"unavailable"}}),E=s.map(x);return{definitions:o,referencedBy:E,referenceEvidence:s.map(l=>({relativePath:l.relativePath,line:l.line,provenance:l.provenance,sourceKind:l.sourceKind})),claimSupport:P(s)}}function x(e){return{relativePath:e.relativePath,line:e.line,enclosingSymbol:e.enclosingSymbol,enclosingShort:e.enclosingShort,sourceStartLine:e.sourceStartLine,sourceEndLine:e.sourceEndLine,source:e.source}}function P(e){let t="resolved source-attributed or SCIP-indexed references to this exact symbol",i=["Dynamic dispatch, reflection, generated calls, and unindexed source are outside this scope."],n=e.filter(c=>c.sourceKind!=="complete-call-expression"&&c.sourceKind!=="non-call-reference"),r="direct, statically visible call expressions among the resolved reference sites";return{referenceAbsence:{status:"eligible",scope:t,limitations:i},callsitePredicates:n.length===0?{status:"eligible",scope:r,limitations:i}:{status:"ineligible",scope:r,reason:`${n.length} reference site(s) lack one unambiguous complete call expression.`,followup:L(n)}}}function L(e){let t=[...new Set(e.map(i=>`${i.relativePath}:${i.line+1}`))];return t.length===0||t.length>24?null:`scip-query inspect ${t.map(i=>`--at ${C(i)}`).join(" ")} --view behavior`}function C(e){return`'${e.replaceAll("'","'\\''")}'`}function B(e,t,i,n){let r=d(e,t);if(!r)return null;let o=r.split(`
2
- `).slice(i,n+1).join(`
3
- `).trimEnd();return o.length>0?o:null}function K(e,t,i){let n=p(e);if(n&&!A(n))return n;let r=(t??"").trim();return r?m(i)&&!r.endsWith("()")?`${r}()`:r:u(i)}function A(e){return e.startsWith("undefined")||e.includes("|")||e.includes("```")}export{q as a,T as b,R as c};
4
- //# sourceMappingURL=chunk-D4N5SQ2M.js.map
@@ -1,2 +0,0 @@
1
- import{a as D}from"./chunk-35NLDRZC.js";import{b as C}from"./chunk-TEBQMNVI.js";function v(t,n={}){let{limit:o=10,scope:s,minDepth:h=3,edgeBasis:c="symbol-references"}=n,u=C(t,s,c==="imports"?{scipEdges:"imports-only",sourceEdges:"imports-only"}:void 0),{components:p,componentOf:y}=D(u),m=new Map;for(let e=0;e<p.length;e++)m.set(e,new Set);for(let[e,a]of u){let i=y.get(e);for(let l of a){let r=y.get(l);r!==i&&m.get(i).add(r)}}let f=new Array(p.length),b=new Array(p.length);for(let e=0;e<p.length;e++){let a=[],i=0;for(let l of[...m.get(e)].sort((r,d)=>r-d)){let r=b[l];(r>i||r===i&&I(f[l],a,p)<0)&&(i=r,a=f[l])}f[e]=[e,...a],b[e]=1+i}function R(e){return f[e]}let w=p.map(e=>[...e].sort()),S=new Set,g=[];for(let e=0;e<p.length;e++){let i=R(e).map(d=>w[d]),l=i.map(d=>d[0]);if(i.length<h)continue;let r=l.join(" ");S.has(r)||(S.add(r),g.push(j(l,i,c)))}return g.sort((e,a)=>a.depth-e.depth||e.chain.join("\0").localeCompare(a.chain.join("\0"))),B(g).slice(0,o)}function K(t,n={}){return v(t,n)}function I(t,n,o){if(n.length===0)return-1;let s=t.map(c=>[...o[c]].sort()[0]??"").join("\0"),h=n.map(c=>[...o[c]].sort()[0]??"").join("\0");return s.localeCompare(h)}function j(t,n,o){let s=n.reduce((c,u)=>c+u.length,0),h=n.filter(c=>c.length>1).length;return{chain:t,components:n,depth:n.length,fileCount:s,edgeBasis:o,actionTier:"signal",chainKind:"transitive-dependency-depth",evidenceReasons:[`${n.length} condensed dependency component(s) form the representative transitive path`,`${s} file(s) are represented; ${h} component(s) contain a dependency cycle`,`edge basis: ${o==="imports"?"resolved file imports":"cross-file symbol references plus resolved source imports"}`,"cycles count once toward depth and retain their full membership separately"],recommendation:"Review whether the chain crosses ownership or layer boundaries; shorten it only when the dependency direction is accidental."}}function B(t){let n=[];for(let o of t)n.some(s=>E(o.chain,s.chain))||n.push(o);return n}function E(t,n){if(t.length>=n.length)return!1;let o=n.length-t.length;for(let s=0;s<t.length;s++)if(t[s]!==n[o+s])return!1;return!0}export{v as a,K as b};
2
- //# sourceMappingURL=chunk-DBRSYFXR.js.map
@@ -1,2 +0,0 @@
1
- import{a as x}from"./chunk-6HFCYNYE.js";import{b as u}from"./chunk-NJITK2GP.js";import{b as p}from"./chunk-TEBQMNVI.js";import{Ca as y}from"./chunk-N5B2NILC.js";function ee(e){return b.test(e)}var b=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|uv\.lock|poetry\.lock|Pipfile\.lock|bun\.lockb?|\.SRCINFO|CHANGELOG(?:\.[a-z]+)?|.*\.(?:map|tsbuildinfo))$|(?:^|\/)(?:dist|build|out|node_modules|docs\/plans)\//i;function te(e,t,n={}){let{minTogether:s=4,minConfidence:i=.6,limit:a=30,maxFilesPerCommit:l=20}=n,g=x(e,{historyMode:n.historyMode,...n.head?{head:n.head}:{}}),r=g.commitHistory(),c=t!==void 0,d=g.coChangePairs({minTogether:c?Math.min(s,2):s,minConfidence:c?0:i,maxFilesPerCommit:l});if(!r||!d)return{available:!1,commitsAnalyzed:0,findings:[]};let f=typeof n.scanLimit=="number"?d.slice(0,n.scanLimit):d,R=p(e),j=E(e),L=F(e,R,j),v=n.includeLinked===!0||c,h=[];for(let o of f){if(b.test(o.fileA)||b.test(o.fileB)||!P(e,o.fileA)||!P(e,o.fileB)||c&&!o.fileA.includes(t)&&!o.fileB.includes(t)||!c&&(u(o.fileA)==="test"||u(o.fileB)==="test"||O(o.fileA,o.fileB)||I(o.fileA,o.fileB)))continue;let m=L(o.fileA,o.fileB);if(!v&&m)continue;let C=w(o.fileA,o.fileB),S=$(o,C,m);if(h.push({...o,structurallyLinked:m,partnerClass:C.partnerClass,partnerClassReasons:C.reasons,...S?{declaredCouplingSuggestion:S}:{}}),h.length>=a)break}return{available:!0,commitsAnalyzed:r.commits.length,findings:h}}function P(e,t){return y(e.config.projectRoot,t)}function w(e,t){let n=A(e),s=A(t),i=[],a=r=>{i.includes(r)||i.push(r)},l=(r,c)=>n.tags.has(r)&&s.tags.has(c)||n.tags.has(c)&&s.tags.has(r);if(l("doc","code"))return a("one side is documentation and the other is executable source"),{partnerClass:"doc-code",reasons:i};if(n.tags.has("test")||s.tags.has("test"))return a("one side is classified as a test file"),{partnerClass:"test-code",reasons:i};if(l("schema","script"))return a("schema or contract file changes with a script or generated-code path"),{partnerClass:"schema-script",reasons:i};if(l("model","view"))return a("model or state path changes with a view or component path"),{partnerClass:"model-view",reasons:i};if(l("config","code"))return a("configuration file changes with executable source"),{partnerClass:"config-code",reasons:i};let g=K(n.tokens,s.tokens).filter(r=>!Z.has(r));return k(e,t)||g.length>=2?(a(k(e,t)?"both files live in the same directory":`files share feature tokens: ${g.slice(0,4).join(", ")}`),{partnerClass:"same-feature",reasons:i}):(a("no specific relationship pattern matched"),{partnerClass:"unknown",reasons:i})}function $(e,t,n){if(n||e.together<4||e.confidence<.75||e.commitScope==="broad-sweep"||e.recency==="stale"||!W.has(t.partnerClass))return;let s=[e.fileA,e.fileB].sort();return{name:`co-change ${t.partnerClass}: ${U(s)}`,files:s,reason:`${t.partnerClass} pair changed together ${e.together}x with ${Math.round(e.confidence*100)}% confidence; declare it if future edits should require both sides.`}}function F(e,t=p(e),n=E(e)){return(s,i)=>D(t,n,s,i)}var _=/(?:^|\/)(?:locales|i18n)\//i;function T(e){return _.test(e)}function I(e,t){return T(e)&&T(t)?!0:N(e,t)}function N(e,t){if(!e.endsWith(".json")||!t.endsWith(".json"))return!1;let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(n<0||s<0)return!1;let i=e.slice(0,n),a=t.slice(0,s);if(i===a)return!1;let l=e.slice(n+1),g=t.slice(s+1);if(l!==g)return!1;let r=i.lastIndexOf("/"),c=a.lastIndexOf("/"),d=r>=0?i.slice(0,r):"",f=c>=0?a.slice(0,c):"";return d===f}function O(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(e.slice(0,n)!==t.slice(0,s))return!1;let i=e.slice(n+1).split(".")[0],a=t.slice(s+1).split(".")[0];return i!==""&&i===a}function E(e){return(e.config.declaredCouplings??[]).filter(t=>Array.isArray(t.files)&&t.files.length>=2).map(t=>new Set(t.files))}function D(e,t,n,s){return e.get(n)?.has(s)===!0||e.get(s)?.has(n)===!0?!0:t.some(i=>i.has(n)&&i.has(s))}var B=/(?:^|\/)(?:readme|docs?|guides?|adr|architecture|design)(?:\/|$)|\.(?:md|mdx|rst|adoc|txt)$/i,M=/(?:^|\/)(?:\.[a-z0-9-]+rc|config|configs|settings|\.github)(?:\/|$)|(?:^|\/)(?:package\.json|tsconfig(?:\.[^.]+)?\.json|vite\.config\.[cm]?[jt]s|rollup\.config\.[cm]?[jt]s|eslint\.config\.[cm]?[jt]s)$|\.(?:json|ya?ml|toml|ini|env)$/i,z=/(?:^|\/)(?:schemas?|contracts?|migrations?|models?|types?)(?:\/|$)|(?:^|\/)[^/]*(?:schema|contract|migration|model|types?)[^/]*|(?:\.schema)?\.(?:graphql|gql|proto|prisma)$/i,G=/(?:^|\/)(?:scripts?|bin|tools?|tasks?|generators?|codegen|migrations?|seeds?)(?:\/|$)|(?:^|\/)[^/]*(?:generate|codegen|migrate|seed|script)[^/]*\.[cm]?[jt]s$/i,H=/(?:^|\/)(?:models?|entities|domain|state|stores?|reducers?)(?:\/|$)|(?:^|\/)[^/]*(?:model|entity|state|store|reducer|viewmodel)[^/]*\.[^.]+$/i,q=/(?:^|\/)(?:views?|pages?|components?|screens?|routes?|templates?)(?:\/|$)|(?:^|\/)[^/]*(?:view|page|component|screen|template)[^/]*\.[^.]+$|\.(?:vue|svelte|tsx|jsx)$/i,W=new Set(["doc-code","config-code","schema-script","model-view","test-code"]),Z=new Set(["src","lib","app","apps","packages","frontend","backend","examples","python","typescript","javascript","test","tests","spec","index","main","utils","util","types","type","config","docs","doc","package","requirements","ts","tsx","js","jsx","mjs","cjs","vue","py","md","mdx","json","yaml","yml","toml","txt"]);function A(e){let t=e.replace(/\\/g,"/"),n=new Set;return B.test(t)&&n.add("doc"),M.test(t)&&n.add("config"),z.test(t)&&n.add("schema"),G.test(t)&&n.add("script"),H.test(t)&&n.add("model"),q.test(t)&&n.add("view"),u(t)==="test"&&n.add("test"),!n.has("doc")&&!n.has("config")&&n.add("code"),{tags:n,tokens:J(t)}}function k(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/"),i=n>=0?e.slice(0,n):"",a=s>=0?t.slice(0,s):"";return i!==""&&i===a}function J(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).map(t=>t.toLowerCase()).filter(t=>t.length>=2)}function K(e,t){let n=new Set(t);return[...new Set(e.filter(s=>n.has(s)))].sort()}function U(e){return e.map(t=>t.split("/").pop()?.replace(/\.[^.]+$/,"")||t).join(" + ")}export{ee as a,te as b,w as c,$ as d,F as e};
2
- //# sourceMappingURL=chunk-DHUIOLDT.js.map
@@ -1,6 +0,0 @@
1
- import{d as ee,f as ne}from"./chunk-TPFHAQ2G.js";import{a as J,b as se,d as W,e as Z,f as H}from"./chunk-6VVV4WRR.js";import{h as re}from"./chunk-VUPHCS7Y.js";import{a as G}from"./chunk-DYGHBZ2N.js";import{n as Y}from"./chunk-ODDUPDP7.js";import{D as ae}from"./chunk-ZOHS7AQV.js";import{k as X}from"./chunk-FESCRNVV.js";var he=16,Se=4,Le=3e3,be=800,ve=new Set(["assignment","const_declaration","const_item","field_declaration","lexical_declaration","local_declaration_statement","local_variable_declaration","static_item","variable_declaration"]);function Xe(t,n,r={}){let c=r.maxSteps??he;if(!Number.isSafeInteger(c)||c<=0)throw new RangeError(`maxSteps must be a positive safe integer; received ${c}`);let g=new Map(n.nodes.map(e=>[e.id,e])),f=we(r.focusLocations??[]),s=new Set,d=new Map(n.edges.map(e=>[e.id,e])),u=O(n.paths.flatMap(e=>e.nodeIds)),h=O(n.anchors.filter(e=>e.status==="matched").flatMap(e=>e.nodeIds)),v=n.nodes.filter(e=>e.disposition==="emitted"&&e.attributes.upstreamCausalPath===!0).sort((e,L)=>Number(L.attributes.upstreamCausalDistance??0)-Number(e.attributes.upstreamCausalDistance??0)||e.id.localeCompare(L.id)).map(e=>e.id),a=new Set(v),y=Math.max(0,c-h.length),w=Ne(n,h,f,y).slice(0,y),k=new Set(w),P=new Set(w),b=new Set([...u,...v,...h]),l=n.edges.filter(e=>e.disposition==="emitted"&&e.kind!=="structural-membership"),p=n.edges.filter(e=>e.disposition!=="excluded"&&e.disposition!=="unsupported"&&e.kind!=="structural-membership"),x=new Set([...n.paths.flatMap(e=>e.edgeIds),...l.filter(e=>a.has(e.fromNodeId)&&a.has(e.toNodeId)).map(e=>e.id)]),C=n.paths.some(e=>e.edgeIds.length>0),N=new Set(h);for(let e of w)N.add(e);for(let e of n.paths){let L=e.nodeIds[0],I=d.get(e.edgeIds[0]??""),$=e.nodeIds[1];L&&$&&I?.fromNodeId===L&&I.toNodeId===$&&N.add(L)}if(n.paths.every(e=>e.nodeIds.length===0))for(let e of n.anchors)for(let L of e.nodeIds)N.add(L);let R=ke(h,p,g,Se),E=O(l.filter(e=>e.kind==="call"&&h.includes(e.fromNodeId)).map(e=>e.toNodeId)),S=new Set(O([...R,...C?[]:E]));for(let e of S)N.add(e);let T=O(l.flatMap(e=>b.has(e.fromNodeId)||b.has(e.toNodeId)?[e.fromNodeId,e.toNodeId]:[])),_=n.nodes.filter(e=>e.disposition==="emitted"&&e.kind!=="structural-region"&&l.some(L=>L.fromNodeId===e.id||L.toNodeId===e.id)).map(e=>e.id),A=O([...v,...u,...h,...w,...S,...T,..._]).filter(e=>g.has(e)),F=[];for(let e of A)C&&!b.has(e)&&!k.has(e)&&!S.has(e)||F.length>=c&&!b.has(e)||F.push(e);let o=new Set(F),i=new Map(F.map(e=>[e,Pe(e)])),m=new Set([...u,...v]),j=new Set(n.anchors.flatMap(e=>e.nodeIds)),D=F.map((e,L)=>{let I=g.get(e),$=Ee(I,f);for(let z of $)s.add(V(I.location.file,z));return{id:i.get(e),nodeId:e,order:L,role:j.has(e)?"anchor":m.has(e)?"connector":"junction",kind:I.kind,label:I.label,location:I.location,behavior:Ie(t,I,j.has(e),[...new Set([...$,...Ce(t,I,p,g,x,N)])],$,N.has(I.id)&&($.length===0||j.has(I.id)),S.has(I.id),P.has(I.id)&&$.length===0)}}),U=new Map;for(let e of n.paths)for(let L=0;L<e.edgeIds.length;L+=1){let I=d.get(e.edgeIds[L]),$=e.nodeIds[L],z=e.nodeIds[L+1];!I||!$||!z||U.set(I.id,I.fromNodeId===$&&I.toNodeId===z?"forward":"reverse")}let B=p.filter(e=>o.has(e.fromNodeId)&&o.has(e.toNodeId)).sort((e,L)=>_e(e,L,n)).map((e,L)=>({id:Ae(e.id),edgeId:e.id,order:L,kind:e.kind,fromStepId:i.get(e.fromNodeId),toStepId:i.get(e.toNodeId),directed:!0,pathTraversal:U.get(e.id)??"adjacent",evidence:e.evidence})),q=new Map(B.map(e=>[e.edgeId,e.id])),K=n.paths.map(e=>({id:e.id,status:e.status,stepIds:e.nodeIds.flatMap(L=>{let I=i.get(L);return I?[I]:[]}),transitionIds:e.edgeIds.flatMap(L=>{let I=q.get(L);return I?[I]:[]})})),oe=D.flatMap(e=>e.location?[`${e.location.file}:${e.location.line+1}`]:[]),me=n.anchors.some(e=>e.status==="ambiguous"),ge=K.some(e=>e.status==="connected"||e.status==="candidate"),ie=K.some(e=>e.status==="partial");return{status:D.length===0?"unavailable":me?"ambiguous":ge&&!ie?"connected":ie?"partial":"connected",steps:D,transitions:B,paths:K,coverage:{candidateNodes:A.length,returnedNodes:F.length,omittedNodeIds:A.filter(e=>!o.has(e)),returnedTransitions:B.length,withheldStatements:D.reduce((e,L)=>e+(L.behavior?.coverage.omittedStatements??0),0),requestedFocusLocations:f,matchedFocusLocations:f.filter(e=>s.has(V(e.file,e.line))),unmatchedFocusLocations:f.filter(e=>!s.has(V(e.file,e.line)))},behaviorCommand:pe(oe,"behavior"),exactSourceCommand:pe(oe,"source")}}function Ne(t,n,r,c){if(c<=0||r.length===0)return[];let g=new Set(n),f=new Set(r.map(s=>V(s.file,s.line)));return O(t.edges.filter(s=>s.disposition!=="excluded"&&s.disposition!=="unsupported"&&["call","runtime-boundary"].includes(s.kind)&&g.has(s.fromNodeId)&&s.evidence.some(d=>!["candidate","unknown"].includes(d.strength)&&d.location&&f.has(V(d.location.file,d.location.line)))).sort((s,d)=>{let u=s.evidence.find(v=>v.location)?.location,h=d.evidence.find(v=>v.location)?.location;return(u?.file??"").localeCompare(h?.file??"")||(u?.line??Number.MAX_SAFE_INTEGER)-(h?.line??Number.MAX_SAFE_INTEGER)||s.id.localeCompare(d.id)}).map(s=>s.toNodeId)).slice(0,c)}function Ie(t,n,r,c,g,f,s,d){if(!n.location||!["symbol","source-construct","runtime-boundary-participant"].includes(n.kind))return null;let u=n.location.endLine??n.location.line,h=X(t,n.location.file),v=c.length>0?c:[n.location.line],a=n.kind==="runtime-boundary-participant"?W(t,n.location.file,0,Math.max(0,h.length-1),[n.location.line]):W(t,n.location.file,n.location.line,u,v),y=c.filter(S=>S>=a.startLine&&S<=a.endLine),M=J(t,n.location.file,a.startLine,a.endLine,y),w=M??(y.length>0?J(t,n.location.file,a.startLine,a.endLine,y,{requireSavings:!1}):null),k=y.length>0?Te(t,n,a.startLine,a.endLine,y,w,f):null,P=h.slice(a.startLine,a.endLine+1).join(`
2
- `).length,b=H(t,n.location.file,a.startLine,a.endLine),l=h.slice(a.startLine,a.endLine+1).some((S,T)=>S.length>be&&(b.get(a.startLine+T)??[]).some(_=>["binding","branch","loop","call","return","throw","mutation"].includes(_))),p=S=>ye(t,n,a.startLine,a.endLine,g.filter(T=>T>=a.startLine&&T<=a.endLine),S),x=(s||n.kind==="runtime-boundary-participant"||n.anchorIds.length>0)&&P<=Le,C=r&&(y.length===0||x);if(M&&(d||C))return p(ce(M));if(!d&&!C&&k&&!l&&!x&&k.renderedCharacters<(w?.outlineCharacters??P))return p(k);if(M)return p(ce(M));let N=h.slice(a.startLine,a.endLine+1),R=N.join(`
3
- `),E=H(t,n.location.file,a.startLine,a.endLine);return p({kind:"source",constructKind:"source construct",signature:N.find(S=>S.trim().length>0)?.trim()??n.label,lines:N.map((S,T)=>({line:a.startLine+T,endLine:a.startLine+T,depth:0,signals:E.get(a.startLine+T)??[],text:S,copied:!0})),coverage:{sourceStatements:N.length,representedStatements:N.length,copiedStatements:N.length,omittedStatements:0},rawCharacters:R.length,renderedCharacters:R.length})}function ye(t,n,r,c,g,f){if(!n.location)return f;let s=ee(t,n.location.file,r,c);if(!s.available)return f;let d=H(t,n.location.file,r,c),u=X(t,n.location.file),h=new Set(g);for(let l of g){let p=Q(u[l]??"");if(!p)continue;let x=G(t,n.location.file,p).find(C=>C>l&&C<=c);x!==void 0&&h.add(x)}let v=[...new Map(s.targets.flatMap(l=>{let p=l.definition,x=p.relativePath===n.location.file&&p.startLine<=c&&p.endLine>=r;if(p.isTypeLike||x)return[];let C=ne(t,p),N=g.length>0&&C&&d.get(l.sourceLine)?.includes("return"),R=C&&h.has(l.sourceLine);return C&&!N&&!R?[]:[[p.symbol,{definition:p,kind:N?"return-value-transformer":R?"focused-causal-target":"compiler-referenced-declaration"}]]})).values()].sort((l,p)=>l.definition.relativePath.localeCompare(p.definition.relativePath)||l.definition.startLine-p.definition.startLine||l.definition.symbol.localeCompare(p.definition.symbol)),a=[],y=v.filter(({kind:l})=>l!=="compiler-referenced-declaration").map(({definition:l})=>({owner:l,depth:1})),M=new Set,w=new Set(v.map(({definition:l})=>l.symbol));for(;y.length>0;){let l=y.shift();if(!l||M.has(l.owner.symbol))continue;M.add(l.owner.symbol);let{owner:p,depth:x}=l,C=ee(t,p.relativePath,p.startLine,p.endLine);if(!C.available)continue;let N=H(t,p.relativePath,p.startLine,p.endLine),R=X(t,p.relativePath);for(let E of C.targets){let S=E.definition,T=S.relativePath===p.relativePath&&S.startLine<=p.endLine&&S.endLine>=p.startLine;if(S.isTypeLike||T)continue;let _=ne(t,S),A=Q(R[E.sourceLine]??""),F=_&&A!==null&&G(t,p.relativePath,A).some(i=>i>E.sourceLine&&i<=p.endLine&&(N.get(i)??[]).some(m=>["branch","return","throw"].includes(m))),o=_&&((N.get(E.sourceLine)??[]).some(i=>["branch","return","throw"].includes(i))||F);_&&!o||(w.has(S.symbol)||(w.add(S.symbol),a.push({definition:S,kind:_?"focused-causal-target":"compiler-referenced-declaration"})),_&&x<2&&y.push({owner:S,depth:x+1}))}}let k=[...new Map([...v,...a].map(l=>[l.definition.symbol,l])).values()].sort((l,p)=>l.definition.relativePath.localeCompare(p.definition.relativePath)||l.definition.startLine-p.definition.startLine||l.definition.symbol.localeCompare(p.definition.symbol)),P=[],b=[];for(let{definition:l,kind:p}of k){let x=p==="compiler-referenced-declaration"?xe(t,l.relativePath,l.startLine,l.endLine):{startLine:l.startLine,endLine:l.endLine},C=X(t,l.relativePath).slice(x.startLine,x.endLine+1).join(`
4
- `),N=p==="compiler-referenced-declaration"?null:J(t,l.relativePath,l.startLine,l.endLine,[]),R=N?[N.signature,...N.lines.map(A=>`${A.line+1}${A.signals.length>0?`[${A.signals.join(",")}]`:""} ${A.text}`)].join(" | "):null,E=R&&R.length<C.length?R:C,S={symbol:l.symbol,label:l.leaf,file:l.relativePath,line:x.startLine,endLine:x.endLine},T=p==="compiler-referenced-declaration"?1e3:8e3,_=p==="compiler-referenced-declaration"?12:120;if(E.length>T||x.endLine-x.startLine>_){b.push({...S,reason:"source-too-large"});continue}P.push({kind:p,...S,text:E})}return{...f,...P.length===0?{}:{supportingDeclarations:P},...b.length===0?{}:{omittedSupportingDeclarations:b}}}function xe(t,n,r,c){let g=ae(t,n);if(!g)return{startLine:r,endLine:c};let f=[];fe(g.rootNode,d=>{ve.has(d.type)&&d.startPosition.row<=r&&d.endPosition.row>=c&&f.push(d)});let s=f.sort((d,u)=>d.endPosition.row-d.startPosition.row-(u.endPosition.row-u.startPosition.row)||d.endIndex-d.startIndex-(u.endIndex-u.startIndex))[0];return s?{startLine:s.startPosition.row,endLine:s.endPosition.row}:{startLine:r,endLine:c}}function fe(t,n){n(t);for(let r of t.namedChildren)fe(r,n)}function ce(t){return{kind:"outline",constructKind:t.constructKind,signature:t.signature,lines:t.lines,coverage:t.coverage,rawCharacters:t.rawCharacters,renderedCharacters:t.outlineCharacters}}function Ce(t,n,r,c,g,f){if(!n.location||!["symbol","source-construct","runtime-boundary-participant"].includes(n.kind))return[];let s=new Set,d=new Set(Y(t,n.location.file)?.callSites.map(u=>u.line)??[]);if(n.kind==="runtime-boundary-participant"&&s.add(n.location.line),f.has(n.id))for(let u of re(t,{files:[n.location.file]}))u.source.startLine>=n.location.line&&u.source.startLine<=(n.location.endLine??n.location.line)&&s.add(u.source.startLine);for(let u of r){if(u.fromNodeId!==n.id&&u.toNodeId!==n.id)continue;let h=c.get(u.fromNodeId===n.id?u.toNodeId:u.fromNodeId),v=f.has(n.id)&&["call","reference","runtime-boundary"].includes(u.kind)&&u.fromNodeId===n.id,a=(h?.anchorIds.length??0)>0;if(!g.has(u.id)&&!v&&!a)continue;let y=u.evidence.flatMap(b=>b.location?.file===n.location.file?[b.location.line]:[]),M=y.filter(b=>d.has(b));for(let b of M.length>0?M:y)s.add(b);let w=h?.attributes.leaf;if(typeof w!="string"||w.length===0)continue;let k=G(t,n.location.file,w).filter(b=>b>=n.location.line&&b<=(n.location.endLine??n.location.line)),P=k.find(b=>d.has(b))??k[0];P!==void 0&&s.add(P)}return[...s].sort((u,h)=>u-h)}function Ee(t,n){if(!t.location)return[];let r=t.location.endLine??t.location.line;return n.filter(c=>c.file===t.location.file&&c.line>=t.location.line&&c.line<=r).map(c=>c.line)}function we(t){let n=new Map;for(let r of t){if(!r.file||!Number.isSafeInteger(r.line)||r.line<0)throw new RangeError(`Behavior focus locations require a repository file and non-negative line; received ${JSON.stringify(r)}.`);n.set(V(r.file,r.line),{file:r.file,line:r.line})}return[...n.values()].sort((r,c)=>r.file.localeCompare(c.file)||r.line-c.line)}function V(t,n){return`${t}\0${n}`}function Te(t,n,r,c,g,f,s){if(!n.location)return null;let d=X(t,n.location.file),u=H(t,n.location.file,r,c),h=[...u].filter(([,o])=>o.length>0).map(([o])=>o).sort((o,i)=>o-i),v=g.map(o=>(u.get(o)??[]).length>0?o:h.find(i=>i>o&&i-o<=8)??o),a=new Set([...g,...v]),y=s?Z(t,n.location.file,r,c,{minimumBodyLines:0}):null,M=f?[...new Map(v.flatMap(o=>f.lines.filter(i=>i.text.length<=500&&i.signals.some(m=>["branch","loop","catch","finally"].includes(m))&&o>=i.line&&o<=i.endLine).sort((i,m)=>i.endLine-i.line-(m.endLine-m.line)||i.line-m.line).slice(0,2).map(i=>[`${i.line}\0${i.endLine}`,i]))).values()]:se(t,n.location.file,r,c,v);for(let o of y?.lines??[])a.add(o.line);for(let o of M)a.add(o.line);for(let[o,i]of u)i.includes("call")&&i.includes("shape")&&a.add(o);let w=[];for(let o of v){let i=Q(d[o]??"");if(!i)continue;let m=G(t,n.location.file,i).filter(B=>B>o&&B<=c),j=m[0];j!==void 0&&a.add(j);let D=m.find(B=>(u.get(B)??[]).some(q=>q==="branch"||q==="loop"));if(D===void 0)continue;a.add(D);let U=(f?.lines??[]).find(B=>B.line===D)??{line:D,endLine:Math.min(c,D+40),depth:0,signals:u.get(D)??[],text:(d[D]??"").trim(),copied:!0},te=f?.lines??d.slice(U.line,U.endLine+1).map((B,q)=>{let K=U.line+q;return{line:K,endLine:K,depth:0,signals:u.get(K)??[],text:B.trim(),copied:!0}});w.push({focusLine:o,governingUse:D,lines:te.filter(B=>B.line>=U.line&&B.line<=U.endLine&&B.text.length<=500&&B.signals.some(q=>["binding","branch","call","mutation"].includes(q)))})}for(let o of w.sort((i,m)=>m.governingUse-m.focusLine-(i.governingUse-i.focusLine)||i.focusLine-m.focusLine).slice(0,2))for(let i of o.lines.slice(0,14))a.add(i.line);let k=new Set(["binding","branch","loop","call","return","throw","mutation"]);for(let o of M)for(let i of f?.lines??[])i.line<o.line||i.line>o.endLine||i.signals.some(m=>k.has(m))&&a.add(i.line);let P=d.slice(r,c+1).flatMap((o,i)=>{let m=Q(o);return m?[{name:m,line:r+i}]:[]}),b=!0;for(;b;){b=!1;for(let o of P)if([...a].some(m=>Me(d[m]??"",o.name))){a.has(o.line)||(a.add(o.line),b=!0);for(let m of G(t,n.location.file,o.name))m<r||m>c||a.has(m)||(u.get(m)??[]).some(j=>k.has(j))&&(a.add(m),b=!0)}}for(let o of f?.lines??[])if(o.signals.some(i=>["branch","loop","catch","finally"].includes(i))&&a.has(o.line))for(let i of f?.lines??[])i.line<o.line||i.line>o.endLine||i.signals.some(m=>k.has(m))&&a.add(i.line);let l=Y(t,n.location.file),p=new Set(l?.callSites.map(o=>o.line)??[]),x=u,C=new Map([...f?.lines??[],...M].filter(o=>o.signals.some(i=>["branch","loop","catch","finally"].includes(i))).map(o=>[o.line,o])),N=new Map((f?.lines??[]).filter(o=>o.text.length<=500&&o.signals.includes("shape")&&(o.signals.includes("call")||o.signals.includes("mutation")||o.signals.includes("return"))).sort((o,i)=>o.endLine-o.line-(i.endLine-i.line)||o.line-i.line).map(o=>[o.line,o])),R=new Map((y?.lines??[]).map(o=>[o.line,o.signals.filter(i=>i!=="lifecycle")])),E=[...a].filter(o=>o>=r&&o<=c).sort((o,i)=>o-i).map(o=>{let i=C.get(o)??N.get(o);return{line:o,endLine:i?.endLine??o,depth:i?.depth??0,signals:Be([...x.get(o)??[],...f?.lines.filter(m=>o>=m.line&&o<=m.endLine).flatMap(m=>m.signals)??[],...R.get(o)??[],...g.includes(o)?["anchor"]:[],...p.has(o)?["call"]:[]]),text:i?.text??(d[o]??"").trim(),copied:i?.copied??!0}}).filter(o=>o.text.length>0);if(E.length===0)return null;let S=y?.candidateLines??Z(t,n.location.file,r,c,{minimumBodyLines:0})?.candidateLines??0,T=Math.max(f?.coverage.sourceStatements??0,S,E.length),_=f?.signature??(d[r]??n.label).trim(),A=_.length+E.reduce((o,i)=>o+i.text.length+i.signals.join(",").length+12,0),F=d.slice(r,c+1).join(`
5
- `).length;return{kind:"connector-slice",constructKind:f?.constructKind??"source construct",signature:_,lines:E,coverage:{sourceStatements:T,representedStatements:E.length,copiedStatements:E.length,omittedStatements:Math.max(0,T-E.length)},rawCharacters:F,renderedCharacters:A}}function Be(t){let n=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],r=new Set(t);return n.filter(c=>r.has(c))}function Q(t){return/\b(?:const|let|var)\s+([\p{L}_$][\p{L}\p{N}_$]*)\s*(?:=|\bof\b|\bin\b)/u.exec(t)?.[1]??null}function Me(t,n){let r=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`(?:^|[^\\p{L}\\p{N}_$])${r}(?:$|[^\\p{L}\\p{N}_$])`,"u").test(t)}function Re(t,n,r){return O(t.flatMap(c=>{let g=r.get(c),f=n.filter(s=>s.kind==="call"&&s.toNodeId===c).map(s=>({edge:s,node:r.get(s.fromNodeId)})).filter(s=>s.node!==void 0&&["symbol","source-construct","runtime-boundary-participant"].includes(s.node.kind)&&s.node.location!==null).sort((s,d)=>{let u=le(d.edge)-le(s.edge);if(u!==0)return u;let h=de(s.node,g)?0:1,v=de(d.node,g)?0:1,a=(s.node.location?.endLine??s.node.location?.line??0)-(s.node.location?.line??0),y=(d.node.location?.endLine??d.node.location?.line??0)-(d.node.location?.line??0);return h-v||a-y||s.node.label.localeCompare(d.node.label)});return f[0]?[f[0].node.id]:[]}))}function le(t){let n={exact:4,mixed:3,derived:2,candidate:1,unknown:0};return Math.max(0,...t.evidence.map(r=>n[r.strength]))}function de(t,n){return!t.location||!n?.location?!1:ue(t.location.file)===ue(n.location.file)}function ue(t){return t.split("/").filter(Boolean).slice(0,2).join("/")}function ke(t,n,r,c){let g=new Set(t),f=new Set,s=[],d=O(t);for(let u=0;u<c&&d.length>0;u+=1){let h=d.filter(a=>!f.has(a));for(let a of h)f.add(a);let v=Re(h,n,r);d=[];for(let a of v)!g.has(a)&&!s.includes(a)&&s.push(a),f.has(a)||d.push(a)}return s}function _e(t,n,r){let c=new Map(r.paths.flatMap(g=>g.edgeIds).map((g,f)=>[g,f]));return(c.get(t.id)??Number.MAX_SAFE_INTEGER)-(c.get(n.id)??Number.MAX_SAFE_INTEGER)||t.id.localeCompare(n.id)}function Pe(t){return`step:${t}`}function Ae(t){return`transition:${t}`}function pe(t,n){return t.length===0?null:`scip-query inspect ${t.map(r=>`--at ${De(r)}`).join(" ")} --view ${n}`}function De(t){return`'${t.replace(/'/gu,`'"'"'`)}'`}function O(t){return[...new Set(t)]}export{Le as a,Xe as b};
6
- //# sourceMappingURL=chunk-DIRJWYBM.js.map
@@ -1,35 +0,0 @@
1
- import{a as p}from"./chunk-EKV5HX33.js";import{f as g}from"./chunk-CEEZJXEF.js";import{a as f}from"./chunk-HOENASQM.js";import{K as d,i as b,p as l}from"./chunk-3L2ZBPEX.js";import{a as I}from"./chunk-YXPUP5G2.js";import{c as u,d as _,h as N}from"./chunk-DRENNWRG.js";import{o as c}from"./chunk-KYSDI3GE.js";function Y(e,t,r={}){return T(e,t,r)?.map(s=>({symbol:s.symbol,shortName:s.shortName,fromFile:s.fromFile}))??[]}function Z(e,t){let r=f(e,t),s=O(e,t);if(s.length>0&&!x(r))return s;let o=k(e,t,r);return h(t)&&o.length>0?o:D([...s,...o])}function G(e,t,r={}){let s=p(e,t);if(!s)return[];let o=S(e,s),n=r.semantic===!1?null:E(e,s);return(n?R(n,o):o).filter(m=>!m.used).map(m=>({symbol:m.symbol,shortName:m.shortName,importedIn:m.importer}))}function R(e,t){let r=new Map;for(let o of t){let n=r.get(o.shortName);n?n.push(o):r.set(o.shortName,[o])}let s=e.map(o=>{let n=r.get(o.shortName),i=n?.shift();return n?.length===0&&r.delete(o.shortName),i?{...o,used:o.used||i.used}:o});return s.push(...[...r.values()].flat()),s}function O(e,t){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
2
- FROM mentions m
3
- JOIN chunks c ON m.chunk_id = c.id
4
- JOIN documents d ON c.document_id = d.id
5
- JOIN global_symbols gs ON m.symbol_id = gs.id
6
- WHERE gs.symbol LIKE ?
7
- AND m.role = 2
8
- ORDER BY d.relative_path`,`%${t}%`).filter(s=>!e.isIgnored(s.importer)).map(s=>({symbol:s.symbol,shortName:u(s.symbol),fromFile:s.importer}))}function k(e,t,r=f(e,t)){let s=r?.relativePath??null,o=r?_(r.symbol):t.replace(/\(\)$/,""),n=r?N(r.symbol):!1,i=new Set;for(let a of I(e,{includeIgnored:!1}))for(let F of d(e,a))M(F,a,{targetFile:s,targetLeaf:o,targetIsModule:n,targetPattern:t})&&i.add(a);let m=h(t)?t.trim():null;return[...i].sort().map(a=>({symbol:m??r?.symbol??o,shortName:m??(r?u(r.symbol):o),fromFile:a}))}function x(e){return!!(e&&(e.symbol.startsWith("scip-clojure ")||l(e.relativePath)==="clojure"))}function D(e){let t=new Set,r=[];for(let s of e){let o=`${s.symbol}|${s.fromFile}`;t.has(o)||(t.add(o),r.push(s))}return r.sort((s,o)=>s.fromFile.localeCompare(o.fromFile)||s.shortName.localeCompare(o.shortName))}function M(e,t,r){return!e.sourcePath||r.targetFile&&c(e.sourcePath)!==c(r.targetFile)?!1:e.kind==="side-effect"||r.targetFile&&$(t)||e.kind==="namespace"&&P(e,r.targetPattern)||r.targetIsModule||e.kind==="named"&&e.importedName===r.targetLeaf?!0:e.kind==="namespace"&&e.usedMembers.includes(r.targetLeaf)}function P(e,t){let r=t.trim().replace(/\(\)$/,"");return h(r)?e.importedName===r||e.localName===r:!1}function h(e){let t=e.trim().replace(/\(\)$/,"");return t.includes(".")&&!t.includes("/")&&!t.includes(":")}function T(e,t,r={}){let s=p(e,t);return s?L(e,s,r)??(r.semantic===!1?null:E(e,s))??S(e,s):null}function L(e,t,r){let o=e.all(`SELECT DISTINCT
9
- gs.symbol,
10
- def_d.relative_path AS from_file,
11
- imp_d.relative_path AS importer,
12
- EXISTS (
13
- SELECT 1
14
- FROM mentions ref_m
15
- JOIN chunks ref_c ON ref_m.chunk_id = ref_c.id
16
- WHERE ref_m.symbol_id = gs.id
17
- AND ref_m.role != 1
18
- AND ref_c.document_id = imp_d.id
19
- ) AS used
20
- FROM mentions m
21
- JOIN chunks c ON m.chunk_id = c.id
22
- JOIN documents imp_d ON c.document_id = imp_d.id
23
- JOIN global_symbols gs ON m.symbol_id = gs.id
24
- LEFT JOIN (
25
- SELECT m2.symbol_id, c2.document_id
26
- FROM mentions m2
27
- JOIN chunks c2 ON m2.chunk_id = c2.id
28
- WHERE m2.role = 1
29
- GROUP BY m2.symbol_id
30
- ) sym_def ON sym_def.symbol_id = gs.id
31
- LEFT JOIN documents def_d ON sym_def.document_id = def_d.id
32
- WHERE imp_d.relative_path = ?
33
- AND m.role = 2
34
- ORDER BY def_d.relative_path, gs.symbol`,t).filter(n=>!e.isIgnored(n.importer));if(o.length>0){let n=r.semantic===!1?[]:g(e,t);return o.map(i=>({symbol:i.symbol,shortName:u(i.symbol),fromFile:i.from_file??"(external)",importer:i.importer,used:i.used!==0||n.some(m=>m.isUsed&&m.sourcePath===i.from_file)}))}return null}function E(e,t){let r=g(e,t);return r.length>0?r.map(s=>{let o=y(s.importedName,s.localName,s.kind);return{symbol:o,shortName:o,fromFile:s.sourcePath??"(external)",importer:t,used:s.kind==="side-effect"?!0:s.isUsed}}):null}function S(e,t){let r=A(t,b(e,t));return d(e,t).map(s=>{let o=y(s.importedName,s.localName,s.kind),n=s.kind==="side-effect"||v(t,s)||r.has(s.localName??s.importedName)?!0:s.used;return{symbol:o,shortName:o,fromFile:s.sourcePath??"(external)",importer:t,used:n}})}function A(e,t){let r=new Set;if(l(e)!=="python")return r;let s=/(?:^|\n)\s*__all__\s*(?:\+?=)\s*[[(]([\s\S]*?)[\])]/g;for(let o of t.matchAll(s)){let n=o[1]??"";for(let i of n.matchAll(/(['"])([A-Za-z_]\w*)\1/g))r.add(i[2])}return r}function v(e,t){if(l(e)!=="rust"||t.used||t.kind==="side-effect")return!1;let r=t.localName??t.importedName;return r==="_"||/^[A-Z]/.test(r)}function y(e,t,r){return r==="namespace"&&e==="*"&&t?`* as ${t}`:r==="default"&&t?`default as ${t}`:r==="side-effect"?"(side effect import)":t&&t!==e?`${e} as ${t}`:e}function $(e){return/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx)$/i.test(e)}export{Y as a,Z as b,G as c};
35
- //# sourceMappingURL=chunk-DIUFNHRJ.js.map
@@ -1,2 +0,0 @@
1
- var d={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function l(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let t=e.split(" ");if(t.length<4)return{scheme:t[0]??"",manager:t[1]??"",packageName:t[2]??"",version:"",descriptors:[],raw:e};let s=t[0],i=t[1],n=e.slice(s.length+1+i.length+1),r;if(n.startsWith("`")){let f=n.indexOf("`",1);f===-1?(r=n.slice(1),n=""):(r=n.slice(1,f),n=n.slice(f+2))}else{let f=n.indexOf(" ");f===-1?(r=n,n=""):(r=n.slice(0,f),n=n.slice(f+1))}let o,c=n.indexOf(" ");c===-1?(o=n,n=""):(o=n.slice(0,c),n=n.slice(c+1));let a=m(n);return{scheme:s,manager:i,packageName:r,version:o,descriptors:a,raw:e}}function b(e){let t=l(e);if("kind"in t)return null;for(let s=t.descriptors.length-2;s>=0;s--){let i=t.descriptors[s];if(i?.suffix==="type")return i.name}return null}function m(e){let t=[],s=0;for(;s<e.length;){if(e[s]==="["){let r=e.indexOf("]",s+1);if(r===-1){t.push({name:e.slice(s+1),suffix:"type-param"});break}t.push({name:e.slice(s+1,r),suffix:"type-param"}),s=r+1;continue}if(e[s]==="("&&(t.length===0||s===0||u(e[s-1]))){let r=e.indexOf(")",s+1);if(r!==-1&&e[r+1]!=="."){t.push({name:e.slice(s+1,r),suffix:"parameter"}),s=r+1;continue}}let i;if(e[s]==="`"){let r=e.indexOf("`",s+1);if(r===-1){i=e.slice(s+1),t.push({name:i,suffix:"term"});break}i=e.slice(s+1,r),s=r+1}else{let r=s;for(;s<e.length&&!u(e[s]);)s++;i=e.slice(r,s)}if(s>=e.length){i&&t.push({name:i,suffix:"term"});break}let n=e[s];if(n==="("){let r=e.indexOf(")",s+1);r!==-1&&e[r+1]==="."?(t.push({name:i,suffix:"method"}),s=r+2):r!==-1?(t.push({name:i,suffix:"method"}),s=r+1):(t.push({name:i,suffix:"term"}),s++)}else{let r=d[n];r&&t.push({name:i,suffix:r}),s+=1}}return t}function u(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function y(e){let t=l(e);if("kind"in t&&t.kind==="local")return`local:${t.id}`;let s=t;if(s.descriptors.length===0)return s.raw;let i=[];for(let n of s.descriptors){let r=g(n);r&&i.push(r)}return i.join(":")}function g(e){let t=e.suffix==="namespace"?h(e.name):e.name;return t?e.suffix==="method"?`${t}()`:t:""}function h(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 k(e){let t=l(e);if("kind"in t&&t.kind==="local")return t.id;let s=t;return s.descriptors.length===0?"":s.descriptors[s.descriptors.length-1].name}function p(e){let t=l(e);if("kind"in t&&t.kind==="local")return null;let s=t;return s.descriptors[s.descriptors.length-1]?.suffix??null}function D(e){return e.endsWith("().")||p(e)==="method"}function $(e){let t=p(e);return t==="method"?!0:t!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function T(e){return p(e)==="namespace"}var x=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function M(e){return x.test(e)}var S=new Set(["test","tests","_tests"]);function O(e){let t=l(e);if("kind"in t)return!1;for(let s=0;s<t.descriptors.length-1;s+=1){let i=t.descriptors[s];if(i?.suffix==="namespace"&&i.name&&S.has(i.name))return!0}return!1}function _(e,t){let s=l(e),i=l(t);if("kind"in s||"kind"in i)return!1;let n=s.descriptors,r=i.descriptors;if(r.length!==n.length+1)return!1;for(let o=0;o<n.length;o++){let c=n[o],a=r[o];if(c.name!==a.name||c.suffix!==a.suffix)return!1}return!0}function j(e,t){let s=l(e),i=l(t);if("kind"in s||"kind"in i)return!1;let n=s.descriptors,r=i.descriptors;if(r.length<=n.length)return!1;for(let o=0;o<n.length;o++){let c=n[o],a=r[o];if(c.name!==a.name||c.suffix!==a.suffix)return!1}return!0}export{l as a,b,y as c,k as d,p as e,D as f,$ as g,T as h,M as i,O as j,_ as k,j as l};
2
- //# sourceMappingURL=chunk-DRENNWRG.js.map
@@ -1,4 +0,0 @@
1
- import{b as l,e as m}from"./chunk-HOENASQM.js";import{c as r}from"./chunk-DRENNWRG.js";function d(s,e){let t=l(s,e);return t.match?{matched:!0,resolved:{symbol:t.match.symbol,shortName:r(t.match.symbol),relativePath:t.match.relativePath},otherMatches:t.candidates.map(n=>({shortName:n.shortName,relativePath:n.relativePath,startLine:n.startLine})),totalMatches:t.total}:{matched:!1,suggestions:m(s,e,5)}}function g(s){let e=s.entries[0];return s.requested===1&&e?.status==="matched"&&e.kind==="source"&&(!e.rangeCoverage||e.rangeCoverage.referencedDefinitions===0)&&e.results.length===1?e.results[0]:null}function u(s,e,t){if(!t)return d(s,e);let n={file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:o(t.startLine),endLine:o(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
2
- `).map((h,c)=>({line:o(t.startLine+c),text:h}))},a=d(s,e),i=a.totalMatches??0;return!a.matched||!a.resolved||i<=1?n:{...n,resolution:{selected:a.resolved,alternatives:a.otherMatches??[],totalMatches:i}}}function f(s){return{requested:s.requested,matched:s.matched,ambiguous:s.ambiguous,missing:s.missing,entries:s.entries.map(e=>({selector:e.selector,status:e.status,kind:e.kind,totalCandidates:e.totalCandidates,sources:e.results.map(t=>({file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:o(t.startLine),endLine:o(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
3
- `).map((n,a)=>({line:o(t.startLine+a),text:n}))})),definitions:e.definitions,...e.fileCoverage?{fileCoverage:e.fileCoverage}:{},...e.rangeCoverage?{rangeCoverage:e.rangeCoverage}:{},candidates:e.candidates,omittedCandidates:e.omittedCandidates,suggestions:e.suggestions,...e.reason?{reason:e.reason}:{}})),literalValues:s.bindingClosure.inline}}function v(s,e,t){let n=g(t);return n?u(s,e[0],n):f(t)}function o(s){return s+1}export{d as a,g as b,u as c,f as d,v as e};
4
- //# sourceMappingURL=chunk-DTZCKZEU.js.map
@@ -1,5 +0,0 @@
1
- import{a as ee,b as ne,c as te}from"./chunk-VMPRET3I.js";import{a as Q}from"./chunk-3WR4E3A3.js";import{c as Z}from"./chunk-MNV5FSBW.js";import{a as z,b as W,c as J}from"./chunk-CIYLO6SI.js";import{a as Y,d as w}from"./chunk-M2O5NY6W.js";import{d as K}from"./chunk-BRV7PIFF.js";import{a as V,d as X}from"./chunk-6VVV4WRR.js";import{h as H}from"./chunk-VUPHCS7Y.js";import{d as E}from"./chunk-BOJ5SVE2.js";import{a as F,b as x}from"./chunk-NJITK2GP.js";import{y as G}from"./chunk-ODDUPDP7.js";import{k as U}from"./chunk-FESCRNVV.js";import{createHash as ue}from"crypto";var le=6,ve=12,be=48,Ce=2e4,ie=12,L=Number.MAX_SAFE_INTEGER,ye=["definition","callers","callees"],N={search:12,"exact-source":24,definition:24,caller:8,callee:8,"production-reference":6,"test-reference":2,dependency:6,consumer:6};function rn(e,t){if(t.cursor)throw new Error("Inspect no longer accepts semantic packet cursors. Run the original inspect selectors again.");let n=xe(t),r=Ee(e,n),i=r.candidates.sort((c,h)=>O(c,h));n.view==="behavior"&&Re(e,i),ke(e,i),n.view==="behavior"&&we(e,i);let o=ee(i.map(c=>T(c,n.view)),n.evidenceBudgets,(c,h)=>O(c.candidate,h.candidate)),{selected:u,omitted:a}=ne(o.selected,n.maxUnits,n.maxCharacters,(c,h)=>O(c.candidate,h.candidate),n.view==="source"),l=u.map(c=>c.candidate),s=[...o.omitted,...a].map(c=>c.candidate),d=l.map(Ae),m=W(l.map(c=>c.kind==="source"?c.bindingClosure:void 0),l.filter(c=>c.kind==="source").map(c=>({relativePath:c.relativePath,startLine:c.startLine,endLine:c.endLine}))),p=d.reduce((c,h)=>c+(h.kind==="source"?qe(h.source):0),0),g=d.reduce((c,h)=>c+(h.kind==="source"?h.source.length:0),0),y=d.reduce((c,h)=>c+pe(h,n.view),0),v=d.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).map(De),b=i.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).length,fe=d.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).length,k=r.searches.map(c=>Me(c,i,l)),ge=Fe(s),A=r.locations.every(c=>c.matched)&&r.evidence.every(c=>c.kind==="matched")&&r.searches.every(c=>Te(c.textCoverage))&&s.every(c=>!c.roles.some(h=>h==="location"||h==="definition")),D=k.reduce((c,h)=>c+h.omittedMatches,0),$=s.length===0&&D===0,B=$?void 0:me(n,!0),j=$e(n,s),Se=Le($,A,s.length+D,j,k,B),q=i.filter(c=>n.view==="behavior"&&c.kind==="source"&&c.roles.some(h=>h==="location"||h==="definition"||h==="search")).map(c=>({id:`inspect:${c.relativePath}:${c.startLine}-${c.endLine}`,label:c.ownerShort??`${c.relativePath}:${c.startLine+1}`,file:c.relativePath,startLine:c.startLine,endLine:c.endLine})),M=q.length>0?Z(e,q):void 0;return{searches:k,evidence:r.evidence,locations:r.locations,slices:v,candidateSlices:b,omittedSlices:b-fe,maxSlices:b,maxTotalLines:p,units:d,candidateUnits:i.length,omittedUnits:s.length,maxUnits:n.maxUnits,maxCharacters:n.maxCharacters,returnedLines:p,returnedCharacters:g,returnedViewCharacters:y,view:n.view,omissionGroups:j,packetCoverage:{mode:$?"complete":"bounded",candidateUnits:i.length,returnedUnits:d.length,omittedUnits:s.length,omittedByRole:ge,exactSelectorsComplete:A,maxUnits:n.maxUnits,maxCharacters:n.maxCharacters,channels:Oe(i,l,n.evidenceBudgets,n.view),...B?{expansionCommand:B}:{}},stoppingSummary:Se,...M&&M.candidateAnchors>0?{causalFrontier:M}:{},bindingClosure:m,continuation:null}}function Le(e,t,n,r,i,o){let u=f([...r.map(a=>a.drillCommand),...i.flatMap(a=>a.exactFollowup?[a.exactFollowup]:[]),...o?[o]:[]]);return e&&t?{queryStatus:"selection-complete",status:"stop-ready",openEvidence:0,guidance:"All evidence requested by this inspect query was materialized.",drillCommands:[]}:t?{queryStatus:"frontier-accounted",status:"relevance-check-required",openEvidence:n,guidance:"Withheld evidence is accounted for by recoverable groups; drill the groups relevant to the current decision.",drillCommands:u}:{queryStatus:"coverage-incomplete",status:"exact-evidence-withheld",openEvidence:n,guidance:"A requested identity, exact source unit, or current-text coverage requirement is unresolved; drill before relying on it.",drillCommands:u}}function xe(e){let t=E(e.searches),n=E(e.symbols),r=E(e.locations),i=t.length+n.length+r.length;if(i===0)throw new Error("inspect requires at least one --search, --symbol, or --at selector.");if(i>24)throw new RangeError(`inspect accepts at most ${24} selectors; received ${i}.`);let o=e.evidence??{};if(e.unitLines!==void 0&&C(e.unitLines,"unitLines"),e.totalLines!==void 0&&C(e.totalLines,"totalLines"),e.sliceLimit!==void 0&&C(e.sliceLimit,"sliceLimit"),e.maxCharacters!==void 0&&C(e.maxCharacters,"maxCharacters"),e.maxUnits!==void 0&&C(e.maxUnits,"maxUnits"),e.view!==void 0&&e.view!=="source"&&e.view!=="behavior")throw new Error(`Unknown inspect view: ${String(e.view)}. Use source or behavior.`);if(e.full&&(e.searchLimit!==void 0||e.maxUnits!==void 0||e.maxCharacters!==void 0||e.evidenceBudgets!==void 0))throw new Error("full inspect cannot be combined with searchLimit, maxUnits, maxCharacters, or evidenceBudgets.");let u=e.full??!1;return{searches:t,symbols:n,locations:r,...e.scope?.trim()?{scope:e.scope.trim()}:{},context:ae(e.context??le,"context"),searchLimit:C(e.searchLimit??(u?L:ve),"searchLimit"),maxUnits:C(u?L:e.maxUnits??be,"maxUnits"),maxCharacters:C(u?L:e.maxCharacters??Ce,"maxCharacters"),evidenceBudgets:u?Ue():Ie(e.evidenceBudgets??N),view:e.view??"source",evidence:{...o.parts?{parts:[...o.parts]}:n.length>0?{parts:[...ye]}:{},...o.referenceContext!==void 0?{referenceContext:ae(o.referenceContext,"referenceContext")}:{},relatedSourceLines:o.relatedSourceLines??60,...o.semantic!==void 0?{semantic:o.semantic}:{}}}}function Ie(e){let t={...N};for(let[n,r]of Object.entries(e)){if(!(n in t))throw new Error(`Unknown inspect evidence channel: ${n}.`);if(!Number.isSafeInteger(r)||(r??-1)<0)throw new RangeError(`Evidence budget ${n} must be a non-negative safe integer; received ${r}.`);t[n]=r}return t}function Ue(){return Object.fromEntries(Object.keys(N).map(e=>[e,L]))}function Ee(e,t){let n=[],r=0,i=te(e,t.searches,{scope:t.scope,context:0,limit:t.searchLimit,ranking:"structural"}).map((s,d)=>({pattern:t.searches[d],result:s,matches:s.matches})),o=Math.max(0,...i.map(s=>s.matches.length));for(let s=0;s<o;s+=1)for(let d of i){let m=d.matches[s];if(!m)continue;let p=w(e,m.relativePath,m.focusLine,L,t.context);p&&I(e,n,p,"search",`search:${d.pattern}`,m.ownerSymbol,m.ownerShort,1,r++)}let u=i.map(({pattern:s,result:d})=>{let m=d.omittedMatches>0?de(s,t.scope):void 0,p=d.fileCoverage??[],g=_e(s,p,t.scope);return{pattern:s,matchingLines:d.matchingLines,returnedMatches:d.matches.length,omittedMatches:d.omittedMatches,matchingFiles:p.length,returnedFiles:p.filter(y=>y.returnedMatches>0).length,omittedFiles:p.filter(y=>y.returnedMatches===0).length,candidateUnits:0,selectedUnits:0,omittedUnits:0,scopeHints:g.slice(0,ie),omittedScopeHints:Math.max(0,g.length-ie),textCoverage:d.textCoverage,...m?{exactFollowup:m}:{}}}),a=t.locations.map(s=>{let d=je(s),m=d?K(e,d.path):null,p=m?w(e,m,d.line-1,L,t.context):null;return p&&I(e,n,p,"location",`at:${s}`,null,null,0,r++),{target:s,matched:p!==null}}),l=t.symbols.map(s=>Q(e,s,t.evidence));for(let s of l)if(s.kind==="matched"){if(s.definition){let d=w(e,s.definition.relativePath,s.definition.startLine,L,t.context);d&&I(e,n,d,"definition",`definition:${s.shortName}`,s.symbol,s.shortName,0,r++)}for(let d of s.referenceWindows){let m=d.references[0];I(e,n,{...d,focusLine:m?.line??d.startLine,unitType:null,unitStartLine:d.startLine,unitEndLine:d.endLine,omittedLines:0},"reference",`reference:${s.shortName}`,m?.enclosingSymbol??null,m?.enclosingShort??null,x(d.relativePath)==="test"?5:4,r++,d.references.map(p=>p.line),s.symbol)}for(let d of s.callers)re(e,n,d,"caller",s,2,r++);for(let d of s.callees)re(e,n,d,"callee",s,3,r++);for(let d of s.dependencies)oe(e,n,"dependency",s.file,d.relativePath,s.symbol,t.context,6,r++);for(let d of s.consumers)oe(e,n,"consumer",d.relativePath,s.file,s.symbol,t.context,7,r++)}return{searches:u,evidence:l,locations:a,candidates:n}}function O(e,t){return e.priority-t.priority||t.roles.length-e.roles.length||t.reasons.length-e.reasons.length||F(x(e.relativePath))-F(x(t.relativePath))||e.sequence-t.sequence}function T(e,t){return{candidate:e,priority:e.priority,sequence:e.sequence,relativePath:e.relativePath,fileKind:x(e.relativePath),evidenceCharacters:pe(e,t),roles:e.roles,reasons:e.reasons,symbols:e.symbols,behaviorSignals:e.kind==="source"?e.behavior?.signals??[]:[],channel:_(e)}}function _(e){let t=e.roles;return t.includes("location")?"exact-source":t.includes("definition")?"definition":t.includes("caller")?"caller":t.includes("callee")?"callee":t.includes("reference")?x(e.relativePath)==="test"?"test-reference":"production-reference":t.includes("dependency")?"dependency":t.includes("consumer")?"consumer":"search"}function we(e,t){let n=t.filter(i=>i.kind==="source"),r=H(e,{files:f(n.map(i=>i.relativePath))});for(let i of n){i.behavior=V(e,i.relativePath,i.startLine,i.endLine,i.focusLines)??void 0;let o=r.filter(a=>a.source.file===i.relativePath&&a.source.startLine<=i.endLine&&a.source.endLine>=i.startLine),u=o.filter(a=>!Pe(a,o)).map(a=>({observationId:a.id,protocol:a.protocol,action:a.action,role:a.role,strength:a.strength,resolution:a.resolution,line:a.source.startLine,endLine:a.source.endLine,keyParts:a.keyParts.map(l=>({name:l.name,value:l.value,evidence:l.evidence})),derivation:{kind:a.derivation.kind,rule:a.derivation.rule,sourceSpans:a.derivation.sourceSpans.length}}));i.runtimeFacts=u.length>0?u:void 0}}function Pe(e,t){if(e.strength!=="candidate"||e.protocol!=="http")return!1;let n=e.keyParts.find(i=>i.name==="path")?.value,r=e.keyParts.find(i=>i.name==="method")?.value;return n?t.some(i=>{if(i===e||i.action!==e.action||i.role!==e.role||i.source.startLine!==e.source.startLine||i.derivation.rule!=="http.mount-prefix")return!1;let o=i.keyParts.find(a=>a.name==="path")?.value,u=i.keyParts.find(a=>a.name==="method")?.value;return!!(o&&o!==n&&o.endsWith(n)&&(!r||r===u))}):!1}function Re(e,t){for(let n of t){if(n.kind!=="source")continue;let r=X(e,n.relativePath,n.startLine,n.endLine,n.focusLines);r.startLine===n.startLine&&r.endLine===n.endLine||(n.startLine=r.startLine,n.endLine=r.endLine,n.source=U(e,n.relativePath).slice(r.startLine,r.endLine+1).join(`
2
- `),n.unitStartLine=r.startLine,n.unitEndLine=r.endLine,n.omittedLines=0)}}function ke(e,t){for(let n of t)n.kind==="source"&&(n.bindingClosure=z(e,n.relativePath,n.startLine,n.endLine))}function $e(e,t){let n=new Map;for(let r of t){let i=R(r.relativePath),o=_(r),u=[...r.roles].sort().join(","),a=r.kind==="path"?r.relationship:"",l=`${i}|${o}|${u}|${a}`,s=n.get(l)??[];s.push(r),n.set(l,s)}return[...n.entries()].map(([r,i])=>{let o=i[0],u=f(i.flatMap(l=>[...l.roles])).sort(),a=f(i.flatMap(l=>l.kind==="source"?l.behavior?.signals??[]:[])).sort();return{id:`g-${ue("sha256").update(r).digest("hex").slice(0,8)}`,scope:R(o.relativePath),channel:_(o),roles:u,behaviorSignals:a,candidateUnits:i.length,sourceCharacters:i.reduce((l,s)=>l+(s.kind==="source"?s.source.length:0),0),anchors:i.map(l=>({relativePath:l.relativePath,line:l.kind==="source"?l.focusLine:0,ownerShort:l.kind==="source"?l.ownerShort:null,roles:[...l.roles],behaviorSignals:l.kind==="source"?[...l.behavior?.signals??[]]:[]})),drillCommand:Be(e,i)}}).sort((r,i)=>i.candidateUnits-r.candidateUnits||i.sourceCharacters-r.sourceCharacters||r.scope.localeCompare(i.scope)||r.id.localeCompare(i.id))}function Be(e,t){let n=f(t.flatMap(o=>o.reasons.filter(u=>u.startsWith("search:")).map(u=>u.slice(7)))),r=R(t[0].relativePath);if(n.length>0&&t.every(o=>o.kind==="source"&&o.roles.includes("search"))){let o=["scip-query inspect"];for(let u of n)o.push(`--search ${S(u)}`);return o.push(`--scope ${S(r)}`,"--full"),e.view==="behavior"&&o.push("--view behavior"),o.join(" ")}let i=t.filter(o=>o.kind==="source");if(i.length>0&&i.length<=24){let o=["scip-query inspect"];for(let u of i)o.push(`--at ${S(`${u.relativePath}:${u.focusLine+1}`)}`);return e.view==="behavior"&&o.push("--view behavior"),o.join(" ")}return t.length===1&&t[0].kind==="path"?t[0].exactFollowup:me(e,!0)}function Me(e,t,n){let r=`search:${e.pattern}`,i=t.filter(a=>a.reasons.includes(r)).length,o=new Set(n),u=t.filter(a=>a.reasons.includes(r)&&o.has(a)).length;return{...e,candidateUnits:i,selectedUnits:u,omittedUnits:i-u}}function Fe(e){let t={};for(let n of e)for(let r of n.roles)t[r]=(t[r]??0)+1;return t}function Oe(e,t,n,r){let i=e.map(u=>T(u,r).channel),o=t.map(u=>T(u,r).channel);return Object.fromEntries(Object.keys(n).map(u=>{let a=i.filter(s=>s===u).length,l=o.filter(s=>s===u).length;return[u,{candidateUnits:a,returnedUnits:l,omittedUnits:a-l,maxUnits:n[u]}]}))}function Te(e){return!!(e&&e.skippedUnreadablePaths.length===0&&e.skippedOversizedPaths.length===0)}function _e(e,t,n){let r=new Map;for(let i of t){let o=R(i.relativePath),u=r.get(o)??{matchingLines:0,returnedMatches:0};u.matchingLines+=i.matchingLines,u.returnedMatches+=i.returnedMatches,r.set(o,u)}return[...r.entries()].map(([i,o])=>({scope:i,...o,exactFollowup:de(e,i||n)})).sort((i,o)=>o.matchingLines-i.matchingLines||o.returnedMatches-i.returnedMatches||i.scope.localeCompare(o.scope))}function R(e){let t=e.lastIndexOf("/");return t<0?e:e.slice(0,t)}function de(e,t){return`scip-query inspect --search ${S(e)}${t?` --scope ${S(t)}`:""} --full`}function me(e,t){let n=["scip-query inspect"];for(let r of e.searches)n.push(`--search ${S(r)}`);for(let r of e.symbols)n.push(`--symbol ${S(r)}`);for(let r of e.locations)n.push(`--at ${S(r)}`);return e.scope&&n.push(`--scope ${S(e.scope)}`),e.context!==le&&n.push(`--context ${e.context}`),e.evidence.parts&&n.push(`--include ${S(e.evidence.parts.join(","))}`),t&&n.push("--full"),e.view==="behavior"&&n.push("--view behavior"),n.join(" ")}function re(e,t,n,r,i,o,u){I(e,t,{...n,unitType:null,unitStartLine:n.startLine,unitEndLine:n.endLine+n.omittedLines},r,`${r}:${i.shortName}`,n.symbol,n.shortName,o,u,[n.focusLine],i.symbol)}function oe(e,t,n,r,i,o,u,a,l){let s=`${r} -> ${i}`,d=G(e,r).filter(b=>b.sourcePath===i),m=U(e,r),p=Ne(m,d,i),g=p===null?null:Y(e,r,p,Math.min(u,4));if(g){I(e,t,{...g,unitType:null,unitStartLine:g.startLine,unitEndLine:g.endLine,omittedLines:0},n,`${n}:${s}`,null,null,a,l,[g.focusLine],o);return}let y=`scip-query inspect --search ${S(he(i))} --scope ${S(r)}`,v=t.find(b=>b.kind==="path"&&b.relativePath===r&&b.relationship===s);if(v){v.roles=f([...v.roles,n]),v.reasons=f([...v.reasons,`${n}:${s}`]),v.symbols=f([...v.symbols,o]),v.priority=Math.min(v.priority,a);return}t.push({kind:"path",roles:[n],relativePath:r,relationship:s,reasons:[`${n}:${s}`],symbols:[o],exactFollowup:y,priority:a,sequence:l})}function Ne(e,t,n){let r=f(t.flatMap(l=>[l.importedName,l.localName??""]).filter(l=>l.length>1)),i=he(n).replace(/\.[^.]+$/u,""),o=f([...r,i]).filter(Boolean),u=/\b(?:from|import|include|require|use)\b/u,a=e.findIndex(l=>u.test(l)&&o.some(s=>l.includes(s)));return a>=0?a:null}function I(e,t,n,r,i,o,u,a,l,s=[n.focusLine],d){let m=t.find(p=>p.kind==="source"&&p.relativePath===n.relativePath&&p.startLine<=n.endLine&&n.startLine<=p.endLine);if(m){let p=Math.min(m.startLine,n.startLine),g=Math.max(m.endLine,n.endLine);m.startLine=p,m.endLine=g,m.source=U(e,n.relativePath).slice(p,g+1).join(`
3
- `),m.focusLine=Math.min(m.focusLine,n.focusLine),m.focusLines=ce([...m.focusLines,...s]),m.unitStartLine=Math.min(m.unitStartLine,n.unitStartLine),m.unitEndLine=Math.max(m.unitEndLine,n.unitEndLine),m.omittedLines=Math.max(m.omittedLines,n.omittedLines),m.reasons=f([...m.reasons,i]),m.roles=f([...m.roles,r]),m.symbols=f([...m.symbols,...d?[d]:[]]),!m.ownerSymbol&&o&&(m.ownerSymbol=o),!m.ownerShort&&u&&(m.ownerShort=u),m.priority=Math.min(m.priority,a);return}t.push({kind:"source",...n,reasons:[i],focusLines:ce(s),ownerSymbol:o,ownerShort:u,roles:[r],symbols:d?[d]:[],priority:a,sequence:l})}function Ae(e){if(e.kind==="path"){let{priority:o,sequence:u,...a}=e;return{...a,id:se(a)}}let{priority:t,sequence:n,bindingClosure:r,...i}=e;return{...i,id:se(i),omittedCharacters:0}}function De(e){let{kind:t,id:n,roles:r,symbols:i,omittedCharacters:o,behavior:u,runtimeFacts:a,...l}=e;return l}function se(e){return ue("sha256").update(JSON.stringify(e)).digest("hex").slice(0,16)}function je(e){let t=e.match(/^(.+\.\w+):(\d+)$/u);if(!t)return null;let n=Number(t[2]);return Number.isSafeInteger(n)&&n>0?{path:t[1],line:n}:null}function f(e){return[...new Set(e)]}function ce(e){return f(e).sort((t,n)=>t-n)}function qe(e){return e.length===0?0:e.split(`
4
- `).length}function pe(e,t){if(e.kind==="path")return e.relationship.length+e.exactFollowup.length;let n="bindingClosure"in e?J(e.bindingClosure):0,r=(e.runtimeFacts??[]).reduce((i,o)=>i+o.action.length+o.derivation.rule.length+o.keyParts.reduce((u,a)=>u+a.name.length+a.value.length+4,0)+24,0);return t!=="behavior"?e.source.length+n:e.behavior?e.behavior.lines.reduce((i,o)=>i+o.text.length+o.signals.join(",").length+12,0)+e.behavior.testCases.reduce((i,o)=>i+o.length+2,0)+r+n:e.source.length+n+r}function he(e){return e.split("/").at(-1)??e}function S(e){return`'${e.replaceAll("'","'\\''")}'`}function C(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new RangeError(`${t} must be a positive safe integer; received ${e}`);return e}function ae(e,t){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer; received ${e}`);return e}export{rn as a};
5
- //# sourceMappingURL=chunk-DULC3QFP.js.map
@@ -1,16 +0,0 @@
1
- import{d as z}from"./chunk-KK7GPALL.js";import{d as y}from"./chunk-OSSESPDX.js";import{A as $,c as E,e as b,t as O}from"./chunk-N2ZSIIGR.js";import{a as A,b as F,n as L,y as R}from"./chunk-ODDUPDP7.js";import{N as v,z as T}from"./chunk-ZOHS7AQV.js";import{h as p}from"./chunk-FESCRNVV.js";import{c as h,d as k}from"./chunk-JWTGMPIT.js";import{b as P,d as g}from"./chunk-N5B2NILC.js";function _(e,n,t,r={}){if(!t)return[];let i=p(e,n);return i?i.indexOf(t)===-1?[]:(N(e,n).get(t)??[]).filter(s=>!X(s,r)):[]}function X(e,n){return typeof n.excludeStartLine=="number"&&typeof n.excludeEndLine=="number"&&e>=n.excludeStartLine&&e<=n.excludeEndLine}var q=h("file-identifiers",{clearGroups:["whole-project","source-file"]});function B(e,n){let t=L(e,n);return t?t.fileIdentifiers:q.get(e,n,()=>new Set(N(e,n).keys()))}var K=h("file-ident-lines",{clearGroups:["whole-project","source-file"]});function N(e,n){let t=L(e,n);return t?t.identifierLineMap:K.get(e,n,()=>ee(e,n))}var Q=h("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function Re(e,n){let t=L(e,n);return t?t.identifiersByLine:Q.get(e,n,()=>{let r=N(e,n),i=0;for(let s of r.values()){let c=s[s.length-1];c!==void 0&&c>i&&(i=c)}let o=new Array(i+1);for(let s=0;s<=i;s+=1)o[s]=new Set;for(let[s,c]of r)for(let a of c)o[a].add(s);return o})}function ee(e,n){let t=new Map,r=(c,a)=>{let l=t.get(c);if(!l){t.set(c,[a]);return}l[l.length-1]!==a&&l.push(a)},i=p(e,n);if(!i)return t;let o=F(i).split(/\r?\n/),s=/\b([A-Za-z_$][\w$]*)\b/g;for(let c=0;c<o.length;c+=1){let a=o[c]??"";for(let l of a.matchAll(s))l[1]&&r(l[1],c)}return t}function we(e,n){let t=j(e);return t?n.filter(r=>j(r.file)===t):n}function De(e,n,t,r,i){let o=R(e,n);if(r){let f=i?.match(/^[A-Za-z_$][\w$]*/u)?.[0];if(!f)return null;let d=new Set(o.filter(u=>u.localName===f||u.importedName===f).map(u=>u.sourcePath).filter(u=>!!u));for(let u of t)for(let S of d)if(g(S,u.file))return u;if(f==="this"||f==="self"||f==="cls"){let u=t.filter(S=>S.file===n&&E(S.symbol)!==null);if(u.length===1)return u[0]}let m=te(p(e,n)??"",f);if(m.size===0)return null;let V=new Set(o.filter(u=>m.has(u.localName??u.importedName)).map(u=>u.sourcePath).filter(u=>!!u)),D=t.filter(u=>m.has(E(u.symbol)??"")&&(u.file===n||[...V].some(S=>g(S,u.file))));return D.length===1?D[0]:null}let s=t.filter(f=>E(f.symbol)===null),c=s.find(f=>f.file===n);if(c)return c;let a=b(t[0].symbol),l=o.filter(f=>f.kind!=="namespace"&&f.kind!=="side-effect"&&(f.localName===a||f.localName===null&&f.importedName===a));if(l.length>0){let f=s.filter(d=>l.some(m=>m.sourcePath!==null&&g(m.sourcePath,d.file)));return f.length===1?f[0]:null}return s.length===1?s[0]:null}function te(e,n){let t=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),r=new Set,i=[new RegExp(`\\b${t}\\s*:\\s*([A-Za-z_$][\\w$]*)`,"gu"),new RegExp(`\\b${t}\\s*=\\s*(?:new\\s+)?([A-Za-z_$][\\w$]*)\\s*\\(`,"gu")];for(let o of i)for(let s of e.matchAll(o))r.add(s[1]);return r.size===1?r:new Set}function j(e){let n=T(e);return n?n==="typescript"||n==="tsx"||n==="javascript"?"javascript-family":n:null}var ne=k("global-leaf-index",{clearGroups:["whole-project"]});function M(e){return ne.get(e,()=>{let n=e.all(`SELECT gs.id, gs.symbol,
2
- COALESCE(der_doc.relative_path, mention_doc.relative_path) AS relative_path
3
- FROM global_symbols gs
4
- LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
5
- LEFT JOIN documents der_doc ON der_doc.id = der.document_id
6
- LEFT JOIN (
7
- SELECT m.symbol_id, MIN(d.relative_path) AS relative_path
8
- FROM mentions m
9
- JOIN chunks c ON m.chunk_id = c.id
10
- JOIN documents d ON c.document_id = d.id
11
- WHERE m.role = 1
12
- GROUP BY m.symbol_id
13
- ) mention_doc ON mention_doc.symbol_id = gs.id
14
- WHERE 1 = 1
15
- ${e.symbolNoiseFor("gs")}`),t=new Map;for(let r of n){if(!r.relative_path||e.isIgnored(r.relative_path))continue;let i=b(r.symbol);if(!i)continue;let o=t.get(i);o||(o=[],t.set(i,o)),o.some(s=>s.symbolId===r.id)||o.push({symbol:r.symbol,symbolId:r.id,file:r.relative_path})}return t})}var re=h("source-import-paths-by-local-name",{clearGroups:["whole-project","source-file"]});function Z(e,n){let t=P(n);return re.get(e,t,()=>ie(e,t))}function ie(e,n){let t=new Map;for(let r of R(e,n)){if(!r.sourcePath)continue;let i=r.localName??r.importedName;if(i&&G(t,i,r.sourcePath),r.kind==="namespace")for(let o of r.usedMembers)G(t,o,r.sourcePath)}return t}function G(e,n,t){let r=e.get(n);r||(r=new Set,e.set(n,r)),r.add(t)}var H=/[A-Za-z_$][A-Za-z0-9_$]*/g,U=/^[A-Za-z_$][A-Za-z0-9_$]*$/,oe=512;function C(e){let n=[],t=!1;for(let r of e)r&&(t=!0,U.test(r)||n.push(r));return{candidateNames:e,hasUsableCandidate:t,nonIdentifierNames:n}}function J(e,n){let t=se(n)?n:C(n);if(t.candidateNames.size===0||!t.hasUsableCandidate)return!0;if(t.candidateNames.size<=oe){for(let i of t.candidateNames)if(i){if(U.test(i)){if(ae(i).test(e))return!0;continue}if(e.includes(i))return!0}return!1}H.lastIndex=0;let r;for(;(r=H.exec(e))!==null;)if(t.candidateNames.has(r[0]))return!0;for(let i of t.nonIdentifierNames)if(e.includes(i))return!0;return!1}function se(e){return"candidateNames"in e}function ae(e){return new RegExp(`(?<![A-Za-z_$0-9])${A(e)}(?![A-Za-z_$0-9])`)}function w(e,n,t){let r=M(e).get(t);if(!r||r.length===0)return[];if(r.length===1)return[I(r[0])];let i=r.filter(a=>a.file===n);if(i.length>0)return i.map(I);let o=Z(e,n),s=o.get(t);if(s)for(let a of s){let l=r.filter(f=>g(a,f.file));if(l.length>0)return l.map(I)}let c=new Set;for(let a of o.values())for(let l of a)c.add(l);for(let a of c){let l=r.filter(f=>g(a,f.file));if(l.length>0&&l.length===r.length)return l.map(I)}return[]}function Ve(e,n,t){let r=w(e,n,t);if(r.length>0)return r;let i=M(e).get(t);return!i||i.length===0?[]:i.map(I)}function Y(e,n,t={}){let r=ce(e,n);if(!r)return[];let i=y(e,n);if(t.semantic!==!1&&t.semanticEvidence){let s=t.semanticEvidence.references(e,{...i,leaf:r.identifier,parentTypeName:null,isFunctionLike:!1,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null});if(s.length>0){let c=new Map;for(let a of s){let l=c.get(a.file)??[];l.push(a.line),c.set(a.file,l)}return x(e,c)}}let o=new Map;for(let s of v(e)){let c=le(e,r,s);c.length>0&&o.set(s,c)}return x(e,o)}function ce(e,n){let t=y(e,n);if(!t)return null;let r=b(t.symbol);return r?{symbolId:t.symbolId,relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,identifier:r}:null}function le(e,n,t){let r=p(e,t);return!r||r.indexOf(n.identifier)===-1?[]:t!==n.relativePath&&!w(e,t,n.identifier).some(o=>o.symbolId===n.symbolId)?[]:_(e,t,n.identifier,t===n.relativePath?{excludeStartLine:n.startLine,excludeEndLine:n.endLine}:{})}function Xe(e,n,t={}){let r=new Map;for(let a of n){if(!a.leaf)continue;let l=r.get(a.leaf)??[];l.push(a),r.set(a.leaf,l)}if(r.size===0)return new Map;let i=new Set(n.map(a=>a.symbolId)),o=new Set(r.keys()),s=C(o),c=new Map;for(let a of v(e)){if(t.skipPath?.(a)||!J(p(e,a),s))continue;let l=B(e,a);if(l.size!==0){for(let f of l)if(r.has(f))for(let d of w(e,a,f)){if(!i.has(d.symbolId)||a===d.relativePath)continue;let m=c.get(d.symbolId);m||(m=new Set,c.set(d.symbolId,m)),m.add(a)}}}return c}function I(e){return{symbolId:e.symbolId,symbol:e.symbol,relativePath:e.file}}function x(e,n){let t=[],r=new Set;for(let[i,o]of n){let s=O(e,i);for(let c of o){let a=$(s,c),l=`${i}|${c}|${a?.symbol??""}`;r.has(l)||(r.add(l),t.push({file:i,line:c,enclosingSymbol:a?.symbol??null}))}}return t}function fe(e,n){return ue(e,[n]).get(n.symbolId)??[]}function ue(e,n){let t=n.map(o=>({symbolId:o.symbolId,prelude:Se(e,o)})).filter(o=>o.prelude!==null),r=pe(e,t.map(o=>o.symbolId)),i=new Map;for(let{symbolId:o,prelude:s}of t){let c=de(e,r.get(o)??new Map,s.match,s.identifier);i.set(o,x(e,c))}return i}function rt(e,n,t={}){return me(e,n,t).map(r=>({file:r.file,line:r.line,enclosingSymbol:r.enclosingSymbol}))}function me(e,n,t={}){let r=Y(e,n,{semantic:t.semantic,semanticEvidence:t.semanticEvidence}),i=r.length>0?W(r,"source-attribution"):W(fe(e,n),"scip-reference-chunk");return t.includeIgnored===!0?i:i.filter(o=>!e.isIgnored(o.file))}function W(e,n){return e.map(t=>({...t,provenance:n}))}function de(e,n,t,r){let i=new Map;for(let[o,s]of n)i.set(o,ge(e,o,s,t,r));return i}function pe(e,n){let t=new Map;for(let r of z(e,n)){if(e.isIgnored(r.relative_path))continue;let i=t.get(r.symbol_id);i||(i=new Map,t.set(r.symbol_id,i));let o=i.get(r.relative_path);o||(o=[],i.set(r.relative_path,o)),o.push({start_line:r.chunk_start,end_line:r.chunk_end})}return t}function ge(e,n,t,r,i){let o=n===r.relativePath?{excludeStartLine:r.startLine,excludeEndLine:r.endLine}:{},s=i?_(e,n,i,o):[];return t.flatMap(c=>be(s,c))}function be(e,n){let t=e.filter(r=>r>=n.start_line&&r<=n.end_line);return t.length>0?t:[n.start_line]}function Se(e,n){let t=y(e,n);return t?{match:t,identifier:b(t.symbol)||null}:null}export{_ as a,N as b,Re as c,we as d,De as e,M as f,C as g,J as h,Z as i,w as j,Ve as k,Xe as l,fe as m,ue as n,rt as o,me as p};
16
- //# sourceMappingURL=chunk-DYGHBZ2N.js.map
@@ -1,40 +0,0 @@
1
- import{a as y}from"./chunk-WIWY3CRX.js";import{b as f}from"./chunk-OSSESPDX.js";import{c as h,d as w}from"./chunk-MTDBHTSF.js";import{d as u,e as m,h as b,p,q as g}from"./chunk-N2ZSIIGR.js";import{dirname as $,isAbsolute as k,relative as x,resolve as v}from"path";var C=new Set(w());function R(t,e){return`tests/generated/twin-ab/${d(t)}-vs-${d(e)}.test.ts`}function d(t){return(t.split(/[/#]/).pop()||t).replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"symbol"}function P(t,e,a,n){let{refA:l,refB:s,outFile:r}=typeof e=="string"?{refA:e,refB:a,outFile:n}:e;if(typeof l!="string"||typeof s!="string"||typeof r!="string")throw new TypeError("twinAb requires refA, refB, and outFile.");if(!k(r))throw new TypeError("twinAb outFile must be an absolute path.");let i=A(t,l);if(!i.ok)return i;let o=A(t,s);if(!o.ok)return o;let c=i.symbol.paramCount===null||o.symbol.paramCount===null?null:i.symbol.paramCount===o.symbol.paramCount,S=N(i.symbol,o.symbol,t.config.projectRoot,r,c);return{ok:!0,a:i.symbol,b:o.symbol,signatureCompatible:c,testSource:S}}function A(t,e){let n=f(t,e).match;if(!n)return{ok:!1,reason:`${e} does not resolve to an indexed symbol.`};let s=t.get("SELECT kind FROM global_symbols WHERE id = ?",n.symbolId)?.kind??null;if(!(s!==null?C.has(s):b(n.symbol)))return{ok:!1,reason:`${e} resolves to ${u(n.symbol)}${s!==null?` with SCIP kind ${h(s)}`:""} \u2014 twin-ab compares call outputs, so both referents must be functions or methods.`};if(!y(t,n))return{ok:!1,reason:`${e} (${u(n.symbol)} at ${n.relativePath}:${n.startLine+1}) is not exported \u2014 twin-ab needs an importable named binding for both twins.`};let i=t.get("SELECT documentation FROM global_symbols WHERE id = ?",n.symbolId),o=p(g(i?.documentation??null));return{ok:!0,symbol:{ref:e,symbol:n.symbol,shortName:m(n.symbol)||u(n.symbol),file:n.relativePath,startLine:n.startLine,signature:o,paramCount:o?E(o):null}}}function E(t){let e=t.indexOf("(");if(e===-1)return null;let a=0,n=-1;for(let i=e;i<t.length;i+=1){let o=t[i];if(o==="(")a+=1;else if(o===")"&&(a-=1,a===0)){n=i;break}}if(n===-1)return null;let l=t.slice(e+1,n).trim();if(!l)return 0;let s=1,r=0;for(let i of l)i==="("||i==="["||i==="{"?r+=1:i===")"||i==="]"||i==="}"?r=Math.max(0,r-1):i===","&&r===0&&(s+=1);return s}function T(t,e,a){let n=$(e),l=v(t,a),r=x(n,l).replace(/\\/g,"/").replace(/\.tsx?$/,".js");return r.startsWith(".")?r:`./${r}`}function N(t,e,a,n,l){let s=T(a,n,t.file),r=T(a,n,e.file),i=l===null?"Signature comparison: unknown (one or both signatures unavailable in the index) \u2014 check by hand.":l?"Signature comparison: param counts match.":"Signature comparison: param counts DIFFER \u2014 twins may not be directly comparable; check by hand.";return`/**
2
- * Generated by 'scip-query twin-ab'. Cleanup integrity scenario.
3
- * ("cross-examine same-concept twins"): where one concept is computed in
4
- * more than one place, feed both the same input and require the same
5
- * answer. Disagreement between twins means at least one is wrong \u2014
6
- * determine which before consolidating.
7
- *
8
- * Twin A: ${t.shortName} (${t.file}:${t.startLine+1})
9
- * ${t.signature??"(signature unavailable)"}
10
- * Twin B: ${e.shortName} (${e.file}:${e.startLine+1})
11
- * ${e.signature??"(signature unavailable)"}
12
- * ${i}
13
- *
14
- * Fill in the TODO input table below with inputs both twins should agree
15
- * on, then run this file with vitest.
16
- */
17
- import { describe, expect, it } from 'vitest';
18
- import { ${t.shortName} as twinA } from '${s}';
19
- import { ${e.shortName} as twinB } from '${r}';
20
-
21
- // TODO: fill in shared inputs both twins should agree on \u2014 one arg array per call.
22
- const inputs: any[][] = [
23
- // [/* arg1, arg2, ... */],
24
- ];
25
-
26
- // Cast to a variadic signature so the input table can hold any arg shape \u2014
27
- // the real twins have fixed, non-rest parameter lists, and TS rejects
28
- // spreading a generic args array into those (TS2556) even when the array
29
- // itself is 'any'; casting the callee's signature, not the args, satisfies
30
- // the checker without weakening the twins' real exported types elsewhere.
31
- const callA = twinA as (...callArgs: any[]) => any;
32
- const callB = twinB as (...callArgs: any[]) => any;
33
-
34
- describe.skipIf(inputs.length === 0)('twin-ab: ${t.shortName} vs ${e.shortName}', () => {
35
- it.each(inputs)('agrees on input %#', (...args) => {
36
- expect(callA(...args)).toEqual(callB(...args));
37
- });
38
- });
39
- `}export{R as a,P as b};
40
- //# sourceMappingURL=chunk-E5R6AQ73.js.map
@@ -1,38 +0,0 @@
1
- import{c as K,d as O,e as Q,f as U,n as Y}from"./chunk-DYGHBZ2N.js";import{a as H}from"./chunk-TEBQMNVI.js";import{d as V,e as Z}from"./chunk-MTDBHTSF.js";import{A as J,e as $,g as B,t as N,u as G,z as W}from"./chunk-N2ZSIIGR.js";import{A as j,t as D,y as x}from"./chunk-ODDUPDP7.js";import{z as k}from"./chunk-ZOHS7AQV.js";import{d as A}from"./chunk-JWTGMPIT.js";import{d as v}from"./chunk-N5B2NILC.js";function Ie(o,t,n={}){let i=z(o,[t],{additive:n.additive,semantic:n.semantic,semanticEvidence:n.semanticEvidence}),l=n.callableOnly?(i.get(t.symbolId)??[]).filter(s=>B(s.symbol)||s.source==="ast-callsite"):i.get(t.symbolId)??[];return typeof n.limit=="number"?l.slice(0,n.limit):l}function ve(o,t,n){return te(o,[t],n).get(t.symbolId)??[]}function te(o,t,n){let i=se(o)?ce(o,t,{semantic:n.semantic!==!1,semanticEvidence:n.semanticEvidence}):ae(o,n.semanticEvidence);return typeof n.limit!="number"?new Map(t.map(l=>[l.symbolId,i.get(l.symbolId)??[]])):new Map(t.map(l=>[l.symbolId,(i.get(l.symbolId)??[]).slice(0,n.limit)]))}var oe=A("caller-rows",{clearGroups:["whole-project"]}),ie=A("targeted-caller-strategy",{clearGroups:["whole-project"]}),le=2e4;function se(o){return ie.get(o,()=>(o.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>le)}function ae(o,t){return oe.get(o,()=>{let n=G(o),i=z(o,n,{semanticEvidence:t}),l=new Map;for(let c of n)l.set(c.symbol,c.symbolId);let s=new Map,a=new Map;for(let c of n){let f=i.get(c.symbolId);if(!(!f||f.length===0))for(let b of f){let r=l.get(b.symbol);if(r===void 0||r===c.symbolId)continue;let u=s.get(r);u||(u=[],s.set(r,u),a.set(r,new Set));let h=`${c.symbol}|${c.relativePath}`;a.get(r).has(h)||(a.get(r).add(h),u.push({symbol:c.symbol,file:c.relativePath,source:"caller-map-inversion",callEvidence:b.source}))}}return s})}function ce(o,t,n){let i=n.semantic&&n.semanticEvidence?t.flatMap(e=>{let d=re(o,e);return d?[d]:[]}):[],l=new Map(i.map(e=>[e.symbolId,e])),s=n.semanticEvidence?.referenceMap(o,i)??new Map,a=Y(o,t),c=new Set(t.map(e=>e.symbol)),b=[...new Set(t.flatMap(e=>H(o,"reverse",[e.relativePath])))].flatMap(e=>N(o,e)),r=new Map,u=X(o,b);for(let e of b)for(let d of u.get(e.symbolId)??[]){if(!c.has(d.symbol))continue;let g=r.get(d.symbol)??[];g.push({symbol:e.symbol,file:e.relativePath,source:"caller-map-inversion",callEvidence:d.source}),r.set(d.symbol,g)}let h=new Map;for(let e of t){let d=[],g=new Set,S=m=>{if(m.symbol===e.symbol)return;let E=`${m.symbol}|${m.file}`;g.has(E)||(g.add(E),d.push(m))};for(let m of r.get(e.symbol)??[])S(m);for(let m of a.get(e.symbolId)??[])m.file!==e.relativePath&&S({symbol:m.enclosingSymbol??m.file,file:m.file,source:"resolved-reference"});let L=l.get(e.symbolId);if(L)for(let m of s.get(L.symbolId)??[]){if(m.file===e.relativePath||o.isIgnored(m.file))continue;let E=J(N(o,m.file),m.line);S({symbol:E?.symbol??m.file,file:m.file,source:"semantic-reference"})}h.set(e.symbolId,d)}return h}function re(o,t){let n=V().join(", "),i=Z().join(", ");return o.get(`SELECT
2
- 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-E73UNJTF.js.map
@@ -1,2 +0,0 @@
1
- import{a as u}from"./chunk-HOENASQM.js";import{b as i}from"./chunk-YXPUP5G2.js";import{existsSync as h}from"fs";import{isAbsolute as p,join as g}from"path";function D(e,n){let t=l(e,n,{allowMultiple:!1})[0]?.relativePath;return t||d(e,n)}function P(e,n){return l(e,n,{allowMultiple:!0}).map(t=>t.relativePath)}function S(e,n){let t=l(e,n,{allowMultiple:!0});return t.length===1?t[0].relativePath:null}function d(e,n){if(!n)return null;let t=n.replace(/\\/g,"/").replace(/^\.\//,""),r=p(t)&&t.startsWith(e.config.projectRoot)?t.slice(e.config.projectRoot.length).replace(/^\/+/,""):t,o=g(e.config.projectRoot,r);return h(o)?r:null}function l(e,n,t){let r=d(e,n);if(r)return i(e,r,t).filter(a=>a.relativePath===r);let o=n.replace(/\\/g,"/").replace(/^\.\//,""),s=p(o)||o.includes("/"),c=i(e,n,{...t,requirePathMatch:s});if(c.length===0){if(s)return[];let a=u(e,n);return!a||e.isIgnored(a.relativePath)?[]:[{relativePath:a.relativePath,score:700}]}return c}export{D as a,P as b,S as c};
2
- //# sourceMappingURL=chunk-EKV5HX33.js.map
@@ -1,3 +0,0 @@
1
- import{a as R}from"./chunk-WYCTJDVR.js";import{p as h}from"./chunk-YEN6CYC7.js";import{a as g}from"./chunk-HOENASQM.js";import{i as p}from"./chunk-3L2ZBPEX.js";import{a as m}from"./chunk-YXPUP5G2.js";import{g as d}from"./chunk-DRENNWRG.js";function D(t,r,n={}){let e=g(t,r);if(!e)return[];let l=!d(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=h(t,e,{semantic:n.semantic,semanticEvidence:R}).map(s=>({relativePath:s.file,line:s.line})),o=b(t,e),f=new Set,a=[];for(let s of[...l,...c,...o]){let u=`${s.relativePath}:${s.line}`;f.has(u)||(f.add(u),a.push(s))}return a}function b(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=S(r.symbol);if(n.length===0)return[];let e=[];for(let i of m(t,{extensions:[".rb"],includeIgnored:!1})){let l=p(t,i);if(!l)continue;let c=l.split(`
2
- `);for(let o=0;o<c.length;o++){let f=c[o]??"";n.some(a=>new RegExp(`@${a}\\b|\\b${a}:`).test(f))&&e.push({relativePath:i,line:o})}}return e}function S(t){let n=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),e=n.split("_").filter(Boolean),i=new Set;return n&&i.add(n),e.length>=1&&i.add(e[e.length-1]),e.length>=2&&i.add(e.slice(-2).join("_")),[...i]}export{D as a};
3
- //# sourceMappingURL=chunk-EQHFIL6T.js.map
@@ -1,2 +0,0 @@
1
- import{a as m}from"./chunk-7KCZELVM.js";import{a as b,b as S}from"./chunk-MV3CDXPI.js";import{a}from"./chunk-WYCTJDVR.js";import{p as y}from"./chunk-YEN6CYC7.js";import{a as f}from"./chunk-HOENASQM.js";import{c as r}from"./chunk-DRENNWRG.js";function u(o,l,t={}){let i=f(o,l);if(!i)return null;let g=[{file:i.relativePath,line:i.startLine}],s=y(o,i,{semantic:t.semantic,semanticEvidence:a}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{outgoingCalls:c,incomingCalls:n}=h(o,i,s,{semantic:t.semantic!==!1});return{symbol:i.symbol,shortName:r(i.symbol),relativePath:i.relativePath,definitionSites:g.filter(e=>!o.isIgnored(e.file)),referenceSites:s,outgoingCalls:c.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),incomingCalls:n.filter(e=>!o.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function A(o,l,t={}){let i=u(o,l,t);return i?{symbol:i.symbol,shortName:i.shortName,relativePath:i.relativePath,definitionSites:i.definitionSites,usageSites:i.referenceSites,producers:i.outgoingCalls,consumers:i.incomingCalls}:null}function h(o,l,t,i){let g=m(b(o,l,{limit:30,semantic:i.semantic,semanticEvidence:a}).map(n=>({symbol:n.symbol,file:n.file}))),s=m(S(o,l,{limit:30,semantic:i.semantic,semanticEvidence:a})),c=s.length>0?s:m(t.map(n=>({symbol:n.enclosingSymbol==="(top-level)"?n.file:n.enclosingSymbol,file:n.file})));return{outgoingCalls:g,incomingCalls:c}}export{u as a,A as b};
2
- //# sourceMappingURL=chunk-ESIQ66Z7.js.map
@@ -1,3 +0,0 @@
1
- import{a as de}from"./chunk-CNO7TOKL.js";import{b as ue}from"./chunk-BOJ5SVE2.js";import{c as N}from"./chunk-CJZXN4NU.js";import{a as P}from"./chunk-W7CXK74K.js";import{j as le}from"./chunk-NWQXSFFU.js";import{b as ae,c as ce}from"./chunk-E73UNJTF.js";import{i as oe}from"./chunk-DYGHBZ2N.js";import{a as ie,b as re,c as se}from"./chunk-KK7GPALL.js";import{e as ee,f as te,h as ne}from"./chunk-XRYABF57.js";import{b as Q}from"./chunk-NJITK2GP.js";import{C as E,d as Z,e as $,g as G,h as J,i as K,j as q,k as V,s as X,x as Y}from"./chunk-N2ZSIIGR.js";import{y as H}from"./chunk-ODDUPDP7.js";import{D as x,a as S,z}from"./chunk-ZOHS7AQV.js";import{c as U,e as j,h as I,k as W}from"./chunk-FESCRNVV.js";import{b as w,i as B,y as b}from"./chunk-JWTGMPIT.js";import{d as L}from"./chunk-N5B2NILC.js";var _=new WeakMap,me=U({kind:"definition-exclusions",invalidation:j("definition-exclusions"),serialize:e=>JSON.stringify(e),deserialize:Ne});function pe(e,t){let n=z(t);if(!(n==="rust"||n==="typescript"||n==="tsx"||n==="javascript"))return[];let i=I(e,t);if(!i)return[];let o=B(e,t,i),c=me.read(e,t,o);if(c)return c;let u=n==="rust"?Ue(e,t):Fe(e,t);return me.write(e,t,o,u),u}function Ne(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=t.map(Te);return n.some(r=>r===null)?null:n}catch{return null}}function Te(e){if(!e||typeof e!="object")return null;let t=e;if(typeof t.startLine!="number"||!Number.isFinite(t.startLine)||typeof t.endLine!="number"||!Number.isFinite(t.endLine)||typeof t.reason!="string"||t.containerName!==void 0&&typeof t.containerName!="string")return null;let n=t.disposition===void 0?Xe(t.reason):t.disposition;return n!=="exclude"&&n!=="implicit-usage"?null:{startLine:t.startLine,endLine:t.endLine,reason:t.reason,disposition:n,...t.containerName?{containerName:t.containerName}:{}}}var ye=new Set(["describe","it","test","fdescribe","fit","xdescribe","xit","beforeEach","afterEach","beforeAll","afterAll","before","after","suite","bench","benchmark"]),ke=/\b(?:describe|it|test|fdescribe|fit|xdescribe|xit|beforeEach|afterEach|beforeAll|afterAll|before|after|suite|bench|benchmark)\s*\(/,Ae=/\b(?:export\s+)?(?:async\s+)?function\s+use[A-Z][A-Za-z0-9_$]*\b|\b(?:const|let|var)\s+use[A-Z][A-Za-z0-9_$]*\s*(?::[^=;]+)?=\s*(?:async\s*)?(?:function\b|(?:<[^=;{]+>\s*)?(?:\([^)]*\)|[A-Za-z_$][\w$]*)\s*=>)/;function Fe(e,t){let n=I(e,t);if(!n||!Me(n))return[];let r=x(e,t);if(!r)return[];let i=_.get(r);if(i)return i;let o=!1,c=r.rootNode;for(let l of c.namedChildren){if(l.type!=="expression_statement")continue;let d=l.namedChild(0);if(!d||d.type!=="call_expression")continue;let s=d.namedChild(0);if(!s)continue;let a=s.type==="member_expression"?s.namedChild(s.namedChildCount-1)?.text:s.text;if(a&&ye.has(a)){o=!0;break}}let u=[];o&&u.push({startLine:0,endLine:c.endPosition.row,reason:"TS/JS test file (describe/it/test at top level)",disposition:"exclude"});for(let l of c.namedChildren){let d=null,s=null;if(l.type==="function_declaration")d=l.namedChild(0)?.text??null,s=l;else if(l.type==="export_statement"){let a=l.namedChild(0);a?.type==="function_declaration"&&(d=a.namedChild(0)?.text??null,s=a)}else if(l.type==="lexical_declaration"){let a=l.namedChild(0);if(a?.type==="variable_declarator"){let p=a.namedChild(0)?.text,f=a.namedChild(1);p&&(f?.type==="arrow_function"||f?.type==="function_expression")&&(d=p,s=a)}}d&&/^use[A-Z]/.test(d)&&s&&u.push({startLine:s.startPosition.row,endLine:s.endPosition.row,reason:"React custom hook (use*)",disposition:"exclude"})}return u.push(...be(r,new Set(["function_declaration","method_definition","class_declaration","interface_declaration","type_alias_declaration","enum_declaration","variable_declarator","export_statement"]),new Set(["comment"]))),_.set(r,u),u}function Me(e){if(e.includes("scip-query"))return!0;let t=!1;for(let n of ye)if(e.includes(n)){t=!0;break}return t&&ke.test(e)?!0:e.includes("use")&&Ae.test(e)}var Oe=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale)?/i;function Be(e){return Oe.test(e)}function be(e,t,n){let r=[],i=o=>{if(t.has(o.type)&&o.parent){let u=o.parent.children,l=-1;for(let d=0;d<u.length;d+=1)if(u[d].startIndex===o.startIndex&&u[d].type===o.type){l=d;break}if(l>0)for(let d=l-1;d>=0;d-=1){let s=u[d];if(n.has(s.type)){if(Be(s.text)){r.push({startLine:o.startPosition.row,endLine:o.endPosition.row,reason:"scip-query suppression comment",disposition:"exclude"});break}continue}if(!(s.type==="attribute_item"||s.type==="inner_attribute_item"))break}}for(let c of o.namedChildren)i(c)};return i(e.rootNode),r}function Ue(e,t){let n=x(e,t);if(!n)return[];let r=_.get(n);if(r)return r;let i=[],o=je(n);return o?(_.set(n,o),o):(ge(n.rootNode,i,!1,!1),i.push(...be(n,new Set(["function_item","function_signature_item","struct_item","enum_item","union_item","impl_item","mod_item","static_item","const_item"]),new Set(["line_comment","block_comment"]))),i.push(...qe(n.rootNode)),_.set(n,i),i)}function je(e){return Ye(e.rootNode)?[{startLine:0,endLine:e.rootNode.endPosition.row,reason:"generated file (@generated header)",disposition:"exclude"}]:null}function ge(e,t,n,r){let i=n,o=r;e.type==="trait_item"&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait declaration body (dynamic dispatch)",disposition:"implicit-usage"}),e.type==="impl_item"&&e.childForFieldName("trait")&&(o=!0,t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl block (dynamic dispatch)",disposition:"implicit-usage"})),e.type==="function_item"||e.type==="function_signature_item"?We(e,t,n,r):r&&Ke(e)?t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl associated item (dynamic dispatch)",disposition:"implicit-usage"}):e.type==="struct_item"||e.type==="enum_item"||e.type==="union_item"?ze(e,t,n):e.type==="mod_item"&&T(e).some(c=>/#\[\s*cfg\s*\(\s*test\s*\)/.test(c))&&(i=!0);for(let c of e.namedChildren)ge(c,t,i,o)}function We(e,t,n,r){let i=T(e),o=null;r?o={reason:"trait impl method (dynamic dispatch)",disposition:"implicit-usage"}:n&&(o={reason:"inside #[cfg(test)] mod",disposition:"exclude"});for(let c of i){if(he(c)){o={reason:"#[allow(dead_code)]",disposition:"exclude"};break}let u=Ge(c);if(u){o=u;break}}o&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:o.reason,disposition:o.disposition})}function ze(e,t,n){let r=T(e),i=e.namedChildren.find(o=>o.type==="type_identifier")?.text;r.some(Je)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[derive(...)] - generated impl may access fields",disposition:"implicit-usage",containerName:i}),r.some(he)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[allow(dead_code)]",disposition:"exclude",containerName:i}),n&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"inside #[cfg(test)] mod",disposition:"exclude",containerName:i})}function T(e){let t=e.parent;if(!t)return[];let n=t.children,r=-1;for(let o=0;o<n.length;o+=1)if(n[o].startIndex===e.startIndex&&n[o].type===e.type){r=o;break}if(r<=0)return[];let i=[];for(let o=r-1;o>=0;o-=1){let c=n[o];if(c.type==="attribute_item"||c.type==="inner_attribute_item")i.push(c.text);else{if(c.type==="line_comment"||c.type==="block_comment")continue;break}}return i}var He=new Set(["test","bench","tokio::test","async_std::test"]),Ze=new Set(["no_mangle","export_name","link_name","used","macro_export","proc_macro","proc_macro_derive","proc_macro_attribute"]),$e=new Set(["allow","warn","deny","forbid","cfg","cfg_attr","doc","inline","cold","must_use","deprecated","repr","derive","automatically_derived","non_exhaustive","path","link","link_section","global_allocator","panic_handler"]);function Ge(e){if(/#\[\s*cfg\s*\(\s*test\s*\)/.test(e))return{reason:"#[cfg(test)]",disposition:"exclude"};let t=Ve(e);return t?He.has(t)?{reason:`#[${t}]`,disposition:"exclude"}:Ze.has(t)?{reason:`Rust ABI/export attribute #[${t}]`,disposition:"implicit-usage"}:$e.has(t)?null:{reason:`Rust attribute macro #[${t}]`,disposition:"implicit-usage"}:null}function Je(e){return/#\[\s*derive\s*\(/.test(e)}function he(e){return/#\[\s*allow\s*\(\s*dead_code\s*\)/.test(e)}function Ke(e){return e.type==="const_item"||e.type==="type_item"||e.type==="static_item"||e.type==="associated_type"}function qe(e){let t=Qe(e);if(t.size===0)return[];let n=[];for(let r of e.descendantsOfType("mod_item")){let i=r.childForFieldName("name")?.text;i&&t.has(i)&&n.push({startLine:r.startPosition.row,endLine:r.endPosition.row,reason:'attribute `with = "..."` module - body may be invoked via reflection',disposition:"implicit-usage",containerName:i})}return n}function Ve(e){let t=/^#!?\[\s*([A-Za-z_][A-Za-z0-9_]*(?:\s*::\s*[A-Za-z_][A-Za-z0-9_]*)*)/.exec(e);return t?t[1].replace(/\s+/g,""):null}function Xe(e){return e==="#[tauri::command]"||e==="#[command]"||e==="#[wasm_bindgen]"||e==="#[no_mangle]"||e==="#[napi]"||e==="#[pyfunction]"||e==="#[pymethod]"||e==="#[pyo3]"||e==="#[doc(hidden)]"||e.startsWith("trait ")||e.startsWith("#[derive(<reflective>)]")||e.startsWith("#[derive(...)]")||e.startsWith('serde `with = "')||e.startsWith('attribute `with = "')||e.startsWith("Rust attribute macro #[")||e.startsWith("Rust ABI/export attribute #[")?"implicit-usage":"exclude"}function Ye(e){for(let t=0;t<Math.min(e.namedChildCount,12);t+=1){let n=e.namedChild(t);if(!n||n.type!=="line_comment"&&n.type!=="block_comment")break;if(/@generated\b/.test(n.text)||/This file is .*generated\b/i.test(n.text)||/Code generated by/i.test(n.text)||/Generated by:\s*https?:\/\/openapi-generator/i.test(n.text)||/openapi-generator/i.test(n.text)&&/Generated by/i.test(n.text))return!0}return!1}var fe=/\bwith\s*=\s*"([^"]+)"/g;function Qe(e){let t=new Set;for(let n of e.descendantsOfType("attribute_item")){fe.lastIndex=0;let r;for(;(r=fe.exec(n.text))!==null;){let i=r[1],o=i.split("::").pop()??i;o&&t.add(o)}}return t}function xe(e){let t=k(e);return(n,r,i,o)=>t(n,r,i,o)?.disposition==="exclude"}function k(e){let t=new Map,n=r=>{let i=t.get(r);if(i)return i;let o=pe(e,r),c=new Map;for(let u of o){if(!u.containerName)continue;let l=c.get(u.containerName)??[];l.push(u),c.set(u.containerName,l)}return i={ranges:o,containers:c},t.set(r,i),i};return(r,i,o,c)=>{let u=n(r),l=[];for(let s of u.ranges)i>=s.startLine&&i<=s.endLine&&l.push(s);let d=new Set;c&&d.add(c);for(let s of E(o))d.add(s);for(let s of d){let a=u.containers.get(s);a&&l.push(...a)}return et(l)}}function et(e){if(e.length===0)return null;let n=e.find(r=>r.disposition==="exclude")??e[0];return{disposition:n.disposition,reason:n.reason}}function Dt(e,t={}){w(e,{groups:t.semanticProvider===!0?["whole-project","semantic-provider"]:["whole-project"]})}function _e(e,t,n={}){w(e,{groups:n.definitions===!0?["source-file","definition-catalog"]:["source-file"],file:t.replace(/\\/g,"/")})}function Se(e,t){if(t.isIgnoredPath(e.relativePath))return y("ignored-file");if(K(e.symbol))return y("module-like-symbol");if(!R(e.symbol))return y("non-value-symbol");if(!e.isFunctionLike&&e.enclosingSymbol&&R(e.enclosingSymbol))return y("nested-non-callable-value");if(!t.includeTests&&!tt(e.relativePath))return y("test-file");if(!t.includeTests&&t.isExcludedRegion(e.relativePath,e.startLine,e.symbol,e.parentTypeName))return y("excluded-file-region");let n=$(e.symbol);if(n==="<constructor>")return y("implicit-constructor");if(e.symbol.startsWith("scip-python ")){if(n==="__all__")return y("python-runtime-metadata");if(/^__[^_].*__$/.test(n))return y("python-protocol-member")}return t.isDeclarationOnlyCallable()?y("declaration-only-callable"):t.isFrameworkContractCallable()?y("framework-contract-member"):q(e.symbol)?y("rust-trait-impl-member"):V(e.symbol)?y("rust-test-module"):!t.includeMembers&&!nt(e)?y("member"):e.endLine-e.startLine+1<t.minLoc?y("below-min-loc"):{accepted:!0}}function tt(e){return Q(e)!=="test"}function y(e){return{accepted:!1,rejectionReason:e}}function R(e){return J(e)||e.endsWith("().")||e.endsWith(".")}function nt(e){return G(e.symbol)||E(e.symbol).length===0}function Ee(){return new Map}function Re(e,t,n){let r=new Map;for(let i of ie(e,n))e.isIgnored(i.relative_path)||t.has(i.relative_path)||v(r,i.symbol_id,i.relative_path,i.ref_count,"scip-mention");return r}function Ce(e,t,n,r={}){let i=new Set;if(r.conservative||n.size===0){for(let o of se(e,t))i.add(o.symbol_id);return i}for(let o of re(e,t))e.isIgnored(o.relative_path)||n.has(o.relative_path)||i.add(o.symbol_id);return i}function A(e,t){let n=e.get(t);if(!n)return!1;for(let r of n.values())if(r.occurrences>0)return!0;return!1}function C(e,t,n){let r=e.get(t);if(!r)return!1;for(let[i,o]of r)if(i!==n&&o.occurrences>0)return!0;return!1}function ve(e){return e?.occurrences??0}function v(e,t,n,r,i="source-fallback"){if(r<=0)return;let o=Le(e,t,n);o.occurrences+=r,o.sources.add(i)}function De(e,t,n,r,i){if(r<=0)return;let o=Le(e,t,n);o.occurrences=Math.max(r,o.occurrences),o.sources.add(i)}function Le(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=r.get(n);return i||(i={occurrences:0,sources:new Set},r.set(n,i)),i}var it=64,rt=300;function en(e,t={}){let{scope:n,minLoc:r=1,includeTests:i=!1,skipBarrels:o=!1,includeMembers:c=!1,deadCodeOnly:u=!1,scanLimit:l,semantic:d=!0}=t,s=0,a=b("dead.candidates",()=>{let m=ue(st(e,{scope:n,minLoc:r,includeTests:i,includeMembers:c}),l);return s=m.length,m},()=>({definitions:s})),p=0,f=o?b("dead.inactive-barrels",()=>{let m=new Set(ee(e));return p=m.size,m},()=>({paths:p})):new Set,F=0,g=u?Ee():b("dead.mention-reference-counts",()=>{let m=Re(e,f,a.map(D=>D.symbolId));return F=m.size,m},()=>({definitions:a.length,symbolsWithReferences:F})),M=0,Ie=u?b("dead.mentioned-symbol-ids",()=>{let m=Ce(e,a.map(D=>D.symbolId),f,{conservative:f.size===0});return M=m.size,m},()=>({definitions:a.length,referencedSymbols:M})):new Set,h=u?a.filter(m=>!Ie.has(m.symbolId)):a.filter(m=>!C(g,m.symbolId,m.relativePath));u?b("dead.source-fallback.dead-code-only",()=>mt(e,h,g,{inactiveBarrelPaths:f}),()=>({definitions:h.length,testReferencesIncluded:!0})):b("dead.source-fallback.ast",()=>dt(e,h,g,{inactiveBarrelPaths:f}),()=>({definitions:h.length,testReferencesIncluded:!0}));let O=u?h.filter(m=>!A(g,m.symbolId)):h.filter(m=>!C(g,m.symbolId,m.relativePath));b("dead.caller-map-supplement",()=>bt(e,O,g,{inactiveBarrelPaths:f,includeSemantic:!u&&d}),()=>({definitions:O.length,semantic:!u&&d}));let Pe=u?h.filter(m=>!A(g,m.symbolId)):a;return ut(e,ct(Pe,g))}function st(e,t){let n=xe(e),r=[];for(let i of Y(e,{scope:t.scope,symbolMatches:R,sqlPrefilter:"function-like"}))Se(i,{minLoc:t.minLoc,includeTests:t.includeTests,includeMembers:t.includeMembers,isIgnoredPath:c=>e.isIgnored(c),isExcludedRegion:n,isDeclarationOnlyCallable:()=>at(e,i),isFrameworkContractCallable:()=>de(e,i)}).accepted&&r.push(i);return r}var ot=["method_signature","abstract_method_signature","call_signature","construct_signature"];function at(e,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let n=x(e,t.relativePath);if(n)return n.rootNode.descendantsOfType([...ot]).some(i=>i.startPosition.row<=t.startLine&&i.endPosition.row>=t.endLine);let r=W(e,t.relativePath).slice(t.startLine,t.endLine+1).join(`
2
- `).trim();return r.endsWith(";")&&!r.includes("=>")&&!r.includes("{")}function ct(e,t){return e.map(n=>lt(n,t)).filter(n=>n.cross_file_refs===0).sort((n,r)=>r.loc-n.loc||n.relative_path.localeCompare(r.relative_path)||n.start_line-r.start_line)}function lt(e,t){let n=t.get(e.symbolId)??new Map,r=ve(n.get(e.relativePath)),i=0;for(let[o,c]of n)o!==e.relativePath&&(i+=c.occurrences);return{relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine,loc:e.endLine-e.startLine+1,symbol:e.symbol,parent_type_name:e.parentTypeName,same_file_refs:r,cross_file_refs:i}}function ut(e,t){let n=k(e),r=[],i=0,o=0,c=0,u=0,l=0,d=0;for(let s of t){if(e.isIgnored(s.relative_path))continue;if(te(e,s.relative_path)){u++;continue}if(ne(e,s.symbol,s.relative_path)){l++;continue}let a=n(s.relative_path,s.start_line,s.symbol,s.parent_type_name),p=a?.disposition==="implicit-usage"?a.reason:void 0,f=p?"implicit-usage":s.same_file_refs===0?"dead-code":"file-internal";f==="dead-code"?i++:f==="file-internal"?o++:c++,d+=s.loc,r.push({relativePath:s.relative_path,startLine:s.start_line,endLine:s.end_line,loc:s.loc,symbol:s.symbol,shortName:Z(s.symbol),sameFileRefs:s.same_file_refs,kind:f,...p?{implicitUsageReason:p}:{}})}return{symbols:r,counts:{total:r.length,deadCode:i,fileInternal:o,implicitUsage:c,loc:d},applicability:{entrySurfaceExcluded:u,externalRootExcluded:l,implicitUsageSignals:c},totalCount:r.length,deadCodeCount:i,fileInternalCount:o,implicitUsageCount:c,totalLoc:d}}function dt(e,t,n,r){if(t.length===0)return;let i=new N(e),o=new Set(t.map(l=>l.symbolId)),c=new Set(t.map(l=>l.leaf).filter(Boolean)),u=new Set(i.sourceFiles());for(let l of S(e))u.add(l);i.scanSourceReferences({paths:u,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:c,skipPath:l=>r.inactiveBarrelPaths.has(l)},l=>{o.has(l.target.symbolId)&&(pt(e,l)||v(n,l.target.symbolId,l.sourceFile,yt(l),"source-fallback"))})}function mt(e,t,n,r){if(t.length===0)return;let i=new N(e),o=X(t),c=new Set(i.sourceFiles());for(let s of S(e))c.add(s);let u=new Set(o.keys()),l=new Map,d=s=>{let a=l.get(s);return a||(a=oe(e,s),l.set(s,a)),a};i.scanSourceReferences({paths:c,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:u,skipPath:s=>r.inactiveBarrelPaths.has(s),resolveTargets:({sourceFile:s,name:a,kind:p})=>{let f=o.get(a);return f?ft(s,a,f,()=>d(s),{permissive:p!=="cross-language-dispatch"}):[]},afterPath:s=>{l.delete(s),_e(e,s)}},s=>{let a=s.kind==="identifier"&&s.sourceFile===s.target.relativePath?Math.max(0,s.occurrences-1):s.occurrences;s.kind==="identifier"&&we(e,{sourceFile:s.sourceFile,name:s.name,target:s.target,occurrences:a})||v(n,s.target.symbolId,s.sourceFile,a,"source-fallback")})}function ft(e,t,n,r,i){let o=n.filter(d=>d.relativePath===e);if(o.length>0)return o;if(!i.permissive&&n.length===1)return[...n];let c=r(),u=c.get(t);if(u)for(let d of u){let s=n.filter(a=>L(d,a.relativePath));if(s.length>0)return s}let l=new Set;for(let d of c.values())for(let s of d)l.add(s);for(let d of l){let s=n.filter(a=>L(d,a.relativePath));if(s.length>0&&s.length===n.length)return s}return i.permissive?[...n]:[]}function pt(e,t){return t.kind==="cross-language-dispatch"&&t.target.relativePath===t.sourceFile?!0:t.kind==="identifier"&&we(e,t)}function yt(e){return e.kind==="identifier"&&e.target.relativePath===e.sourceFile?Math.max(0,e.occurrences-1):e.occurrences}function we(e,t){return t.occurrences>1?!1:H(e,t.sourceFile).some(n=>n.used||n.sourcePath!==t.target.relativePath?!1:n.importedName===t.name||n.localName===t.name)}function bt(e,t,n,r){let i=r.includeSemantic!==!1,o=i&&t.length>=it&&S(e).length>=rt,c=(s,a)=>{a===s.relativePath||e.isIgnored(a)||r.inactiveBarrelPaths.has(a)||De(n,s.symbolId,a,1,"caller-map")};if(o?b("dead.caller-map.per-symbol-non-semantic",()=>{let s=ce(e,t,{semantic:!1,semanticEvidence:P});for(let a of t){let p=s.get(a.symbolId)??[];for(let f of p)c(a,f.file)}},()=>({definitions:t.length,semantic:!1,batched:!0})):b("dead.caller-map.per-symbol",()=>{for(let s of t){let a=ae(e,s,{semantic:i,semanticEvidence:P});if(a.length!==0)for(let p of a)c(s,p.file)}},()=>({definitions:t.length,semantic:i})),!o)return;let u=0,l=b("dead.caller-map.semantic-candidates",()=>{let s=t.filter(a=>!C(n,a.symbolId,a.relativePath));return u=s.length,s},()=>({definitions:t.length,semanticCandidates:u}));if(l.length===0)return;let d=le(e,l);for(let s of l){let a=d.get(s.symbolId);if(a)for(let p of a)c(s,p)}}export{Dt as a,en as b};
3
- //# sourceMappingURL=chunk-EVFUMY4R.js.map
@@ -1,2 +0,0 @@
1
- import{a as P,b as y}from"./chunk-2E7CX53V.js";import{a as C,c as b,e as r,f}from"./chunk-B3X6KU75.js";import{a as g,b as h,c as k}from"./chunk-KMVGRIO2.js";import{P as v}from"./chunk-ZOHS7AQV.js";function L(e,i={}){let{minSimilarity:o=.62,minTokens:n=8,limit:c=20,scope:l,scanLimit:u,filePattern:m,focusFiles:d}=i,s=B(e,{scope:l,minTokens:n,scanLimit:u}),p=P(s,t=>t.tokens);return y({profiles:s,limit:c,filePattern:m,focusFiles:d,candidateIndex:p,profile:{name:"vue-component-duplicates"},compare:(t,a)=>V(t,a,o),sort:(t,a)=>a.similarity-t.similarity||t.fileA.localeCompare(a.fileA)||t.fileB.localeCompare(a.fileB)})}function B(e,i){return v(e).vueProfiles({scope:i.scope,minTemplateTokens:i.minTokens,scanLimit:i.scanLimit}).map(o=>({file:o.file,tokens:o.templateTokens,loc:T(o)}))}function T(e){return e.totalLines}function V(e,i,o){let n=g(e.tokens,i.tokens);if(n.size<6||!R(n))return null;let c=k(e.tokens,i.tokens);if(c<o)return null;let l=r(n,"component:"),u=r(n,"prop:"),m=r(n,"event:"),d=r(n,"directive:"),s=r(n,"slot:"),p=r(n,"id:"),t=S({sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p});return{fileA:e.file,fileB:i.file,similarity:c,tokenCountA:e.tokens.size,tokenCountB:i.tokens.size,sharedTokens:f(n),sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p,evidenceClass:t.evidenceClass,actionTier:t.actionTier,evidenceClassReasons:t.reasons,recommendation:t.recommendation,uniqueToA:f(h(e.tokens,i.tokens)).slice(0,25),uniqueToB:f(h(i.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:i.loc}}function R(e){let i=0,o=0;for(let n of e)n.startsWith("component:")&&(i+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("directive:")||n.startsWith("slot:"))&&(o+=1);return b([{name:"component",count:i},{name:"behavior",count:o}],[{min:{component:1},reason:"shared custom component"},{min:{behavior:3},reason:"shared Vue template structure"}]).pass}function S(e){return C({genericWords:x,primitiveGroups:[{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"},{values:e.sharedDirectives,reasonPrefix:"shared directives",bucket:"generic"},{values:e.sharedSlots,reasonPrefix:"shared slots",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedIdentifiers,label:"shared identifier",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific Vue primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var x=new Set(["actions","app","button","card","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{L as a};
2
- //# sourceMappingURL=chunk-F7DY272B.js.map
@@ -1,2 +0,0 @@
1
- import{b as r}from"./chunk-BRV7PIFF.js";import{y as e}from"./chunk-N2ZSIIGR.js";function l(t,s){let o=r(t,s);return e(t,o).map(({relativePath:n,...a})=>a)}export{l as a};
2
- //# sourceMappingURL=chunk-FBN2FGXG.js.map
@@ -1,4 +0,0 @@
1
- import{b as i}from"./chunk-BRV7PIFF.js";import{a as o}from"./chunk-TEBQMNVI.js";import{y as l}from"./chunk-N2ZSIIGR.js";function y(e,r){let s=i(e,r);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let a=s.map(()=>"?").join(", "),n=e.all(`SELECT relative_path FROM documents
2
- WHERE relative_path IN (${a})
3
- ORDER BY relative_path`,...s).map(t=>t.relative_path).filter(t=>!e.isIgnored(t)),p=l(e,n,{onlyDocumented:!0,sort:!0}).map(({relativePath:t,...f})=>f),m=o(e,"forward",s).filter(t=>!e.isIgnored(t)),d=o(e,"reverse",s).filter(t=>!e.isIgnored(t));return{files:n,symbols:p,dependsOn:m,dependedOnBy:d}}function g(e,r){return y(e,r)}export{y as a,g as b};
4
- //# sourceMappingURL=chunk-FDLOBR6P.js.map
@@ -1,5 +0,0 @@
1
- import{c as g,j as k,k as E,l as w,m as T,n as j,o as b,p as x,v as h,w as v,y}from"./chunk-JWTGMPIT.js";import{Aa as m,Ba as P}from"./chunk-N5B2NILC.js";function M(e){return typeof e=="object"&&e!==null}function R(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")?e:null}var F=[r("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),r("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),r("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),r("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),r("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),r("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),r("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),r("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),r("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),r("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),r("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),r("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),r("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),r("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),r("runtime-boundary-http-roles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/http-summaries.ts"}),r("runtime-boundary-source-hashes",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),r("runtime-boundary-direct-extraction",{dependsOn:["content-hash","direct-deps-digest","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),p("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),p("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),p("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),p("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"}),p("typescript-hierarchy-targets",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","definitionSet","projectFingerprint","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/typescript/ts-morph-provider.ts"})];function N(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=k(n);if(c){let l=`${c}\0${i}\0${s}`;a=t.get(l),a||(a=v(["evidence-product-file-read-v1",e.kind,c,i,s]),t.set(l,a))}}return y("evidence-product.file.read",()=>{let c=E(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},has(n,i,s){return w(n,e.kind,i,s)},write(n,i,s,o){T(n,e.kind,i,s,e.serialize(o))},writeBatch(n,i){j(n,i.map(s=>({kind:e.kind,relativePath:s.relativePath,contentHash:s.contentHash,payload:e.serialize(s.value)})))}}}function B(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=`${s}\0${i}`;a=t.get(c),a||(a=v(["evidence-product-project-read-v1",e.kind,s,i]),t.set(c,a))}return y("evidence-product.project.read",()=>{let c=b(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},write(n,i,s,o){x(n,e.kind,i,s,e.serialize(o))}}}function U(e){let t=F.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function r(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function p(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}var u=null;function f(e){u?.(e)}function L(e,t){let n=u;u=e;try{return t()}finally{u=n}}var S=g("source-text",{clearGroups:["whole-project","source-file"]}),V=g("source-lines",{clearGroups:["whole-project","source-file"]});function C(e,t){let n=t.replace(/\\/g,"/");return f(n),S.get(e,n,()=>I(e,n))}function I(e,t){let n=t.replace(/\\/g,"/");f(n);try{return m(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(i){if(P(i))return"";throw i}}function Y(e){if(e.length===0)return[];let t=e.split(`
2
- `);return e.endsWith(`
3
- `)&&t.pop(),t}function D(e,t){let n=t.replace(/\\/g,"/");return V.get(e,n,()=>{let i=C(e,n);return i?i.split(`
4
- `):[]})}var H=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function K(e){let t=H.exec(e);return t?t[1]??"":null}function Z(e,t,n){return O(e,t,n).length>0}function ee(e,t,n,i){let s=i.toLowerCase();return O(e,t,n).some(o=>o.toLowerCase()===s)}function O(e,t,n){if(n<=0)return[];let i=D(e,t);if(i.length===0)return[];let s=[];for(let o=n-1;o>=0&&o>=n-5;o-=1){let d=(i[o]??"").trim();if(d==="")continue;let a=K(d);if(a!==null){s.push(a);continue}if(!d.startsWith("//")&&!d.startsWith("*")&&!d.startsWith("/*")&&!d.startsWith("@")&&!d.startsWith("#"))return s}return s}export{M as a,R as b,N as c,B as d,U as e,f,L as g,C as h,I as i,Y as j,D as k,K as l,Z as m,ee as n};
5
- //# sourceMappingURL=chunk-FESCRNVV.js.map
@@ -1,2 +0,0 @@
1
- import{a as R,b as P}from"./chunk-2E7CX53V.js";import{a as C,c as B,e as a,f}from"./chunk-B3X6KU75.js";import{a as v,b as h,c as k}from"./chunk-KMVGRIO2.js";import{P as g}from"./chunk-ZOHS7AQV.js";function D(e,o={}){let{minSimilarity:r=.62,minTokens:n=8,limit:l=20,scope:m,scanLimit:d,filePattern:p,focusFiles:u}=o,c=g(e).reactProfiles({scope:m,minJsxTokens:n,scanLimit:d}).filter(t=>t.kind==="component").map(t=>({file:t.file,component:t.name,tokens:t.jsxTokens,profile:t})),s=R(c,t=>t.tokens);return P({profiles:c,limit:l,filePattern:p,focusFiles:u,candidateIndex:s,profile:{name:"react-component-duplicates"},compare:(t,i)=>y(t,i,r),sort:(t,i)=>i.similarity-t.similarity||t.fileA.localeCompare(i.fileA)||t.componentA.localeCompare(i.componentA)||t.fileB.localeCompare(i.fileB)||t.componentB.localeCompare(i.componentB)})}function y(e,o,r){let n=v(e.tokens,o.tokens);if(n.size<6||!T(n))return null;let l=k(e.tokens,o.tokens);if(l<r)return null;let m=a(n,"component:"),d=a(n,"native:"),p=a(n,"prop:"),u=a(n,"event:"),c=a(n,"binding:"),s=b({sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c});return{fileA:e.file,componentA:e.component,fileB:o.file,componentB:o.component,similarity:l,tokenCountA:e.tokens.size,tokenCountB:o.tokens.size,sharedTokens:f(n),sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c,evidenceClass:s.evidenceClass,actionTier:s.actionTier,evidenceClassReasons:s.reasons,recommendation:s.recommendation,uniqueToA:f(h(e.tokens,o.tokens)).slice(0,25),uniqueToB:f(h(o.tokens,e.tokens)).slice(0,25),locA:e.profile.loc,locB:o.profile.loc}}function T(e){let o=0,r=0;for(let n of e)n.startsWith("component:")&&(o+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("native:")||n.startsWith("jsx:"))&&(r+=1);return B([{name:"component",count:o},{name:"shape",count:r}],[{min:{component:1},reason:"shared custom component"},{min:{shape:4},reason:"shared JSX structure"}]).pass}function b(e){return C({genericWords:w,primitiveGroups:[{values:e.sharedNativeTags,reasonPrefix:"shared native tags",bucket:"generic"},{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"}],recommendation:A})}function A(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific UI primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var w=new Set(["actions","app","button","card","children","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{D as a};
2
- //# sourceMappingURL=chunk-FFRKR4EQ.js.map
@@ -1,8 +0,0 @@
1
- import{a as ee,b as q,d as v}from"./chunk-JFMEXGFE.js";import{i as te,j as h,k as f,l as p}from"./chunk-KYSDI3GE.js";import{e as Q,g as Z,h as F,n as P}from"./chunk-7F45LJKI.js";import{randomUUID as Le}from"crypto";import{closeSync as Ne,existsSync as Oe,fsyncSync as ke,linkSync as qe,mkdirSync as Pe,openSync as $e,renameSync as Ce,unlinkSync as Te,writeSync as _e}from"fs";import{dirname as ne}from"path";import{chmodSync as Ie,constants as Fe,copyFileSync as Re}from"fs";import{dirname as Ee}from"path";var ie=Object.freeze({...te,copyFile:(e,t)=>Re(e,t,Fe.COPYFILE_FICLONE),chmodFile:(e,t)=>Ie(e,t)});function ve(e,t,i={}){let n=i.runtime??ie,r=Ee(t),o=h(r,n);n.copyFile(e,t),i.mode!==void 0&&n.chmodFile(t,i.mode);let s=n.openFile(t,"r");try{n.syncFile(s)}finally{n.closeFile(s)}return p(o,f(r,n))}var re=Object.freeze({platform:process.platform,randomToken:()=>Le(),pathExists:e=>Oe(e),makeDirectory:e=>Pe(e,{recursive:!0}),openFile:(e,t,i)=>$e(e,t,i),writeFile:(e,t,i,n)=>_e(e,t,i,n),syncFile:e=>ke(e),closeFile:e=>Ne(e),renameFile:(e,t)=>Ce(e,t),linkFile:(e,t)=>qe(e,t),removeFile:e=>Te(e)});function $(e,t,i={}){let n=i.durability??"visibility",r=i.runtime??re,o=ne(e),s=n==="durable"?h(o,r):(r.makeDirectory(o),"not-requested"),a=`${e}.tmp-${r.randomToken()}`,l=typeof t=="string"?Buffer.from(t):t,d,c=!1;try{d=r.openFile(a,"wx",i.mode??384),c=!0,P(d,l,r,"atomic file"),n==="durable"&&r.syncFile(d),r.closeFile(d),d=void 0,r.renameFile(a,e),c=!1;let m=n==="durable"?p(s,f(o,r)):"not-requested";return oe(n,m)}finally{if(d!==void 0)try{r.closeFile(d)}catch{}if(c)try{r.removeFile(a)}catch{}}}function L(e,t,i={}){let n=i.durability??"visibility",r=i.runtime??re;if(!r.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let o=ne(e),s=n==="durable"?h(o,r):(r.makeDirectory(o),"not-requested"),a=`${e}.tmp-${r.randomToken()}`,l=typeof t=="string"?Buffer.from(t):t,d,c=!1;try{d=r.openFile(a,"wx",i.mode??384),c=!0,P(d,l,r,"exclusive atomic file"),n==="durable"&&r.syncFile(d),r.closeFile(d),d=void 0,r.linkFile(a,e);let m=n==="durable"?f(o,r):"not-requested";r.removeFile(a),c=!1;let b=n==="durable"?p(s,m,f(o,r)):"not-requested";return oe(n,b)}finally{if(d!==void 0)try{r.closeFile(d)}catch{}if(c)try{r.removeFile(a)}catch{}}}function oe(e,t){return{requestedDurability:e,achievedDurability:e==="visibility"?"visibility":t==="synced"?"directory-durable":"file-flushed",directorySync:t}}function se(e,t,i={}){$(e,ae(t,i),{durability:"visibility",runtime:i.runtime})}function C(e,t,i={}){return $(e,ae(t,i),{durability:"durable",runtime:i.runtime})}function ae(e,t){let i=JSON.stringify(e,null,t.spacing);return t.trailingNewline?`${i}
2
- `:i}import{createHash as T,randomUUID as pe}from"crypto";import{closeSync as Ue,existsSync as D,fstatSync as We,lstatSync as B,mkdirSync as Ke,openSync as ze,readdirSync as w,readSync as Xe,renameSync as _,rmSync as g}from"fs";import{basename as S,dirname as J,join as y}from"path";function de(e){return N(e,Je)}function St(e){return N(e,je)}function N(e,t){return Array.isArray(e)?`[${e.map(i=>N(i,t)).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([i],[n])=>t(i,n)).map(([i,n])=>`${JSON.stringify(i)}:${N(n,t)}`).join(",")}}`:JSON.stringify(e)}function Je(e,t){return e.localeCompare(t)}function je(e,t){return e<t?-1:e>t?1:0}var j=1,He=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),x=class extends Error{constructor(i,n,r,o){let s=i==="item-too-large"?`request is ${o} bytes; per-item limit is ${r.maxItemBytes}`:i==="item-capacity"?`mailbox has ${n.totalItems} retained items; limit is ${r.maxItems}`:i==="byte-capacity"?`mailbox retains ${n.totalBytes} bytes and the request adds ${o}; limit is ${r.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=i;this.status=n;this.limits=r;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},ge=".owner.json",U={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function qt(e){return{rootDir:e,pendingDir:y(e,"pending"),inflightDir:y(e,"inflight"),responseDir:y(e,"responses"),deadLetterDir:y(e,"dead-letter"),legacyRequestDir:y(e,"requests")}}function I(e={}){let t={...He,...e};for(let[i,n]of Object.entries(t))if(!Number.isFinite(n)||n<=0||!Number.isInteger(n))throw new Error(`Mailbox limit ${i} must be a positive integer.`);return t}function k(e){let t=[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir].map(i=>h(i));return p(...t)}function Pt(e,t){return T("sha256").update(de({namespace:e,payload:t})).digest("hex")}function xe(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${e}`}function $t(e,t,i={}){let n=I(i.limits),r=i.nowMs??Date.now(),o=k(e);return st(t),K(e,n,i.admissionLockTimeoutMs??2e3,i.monotonicNow??v,i.durability??"durable",()=>{W(e,r,n);let s=y(e.pendingDir,`${t.id}.json`),a=y(e.responseDir,`${t.id}.json`),l=ce(e,t.id);if(l){let b=ue(l,t.operationKey,t.id);return{disposition:"duplicate",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:b.deadlineAtMs??t.deadlineAtMs}}let d=`${JSON.stringify(t)}
3
- `,c=Buffer.byteLength(d),m=R(e);if(c>n.maxItemBytes)throw new x("item-too-large",m,n,c);if(m.totalItems+1>n.maxItems)throw new x("item-capacity",m,n,c);if(m.totalBytes+c>n.maxBytes)throw new x("byte-capacity",m,n,c);i.onBeforePublish?.();try{let b=i.durability??"durable",u=L(s,d,{durability:b}),M=b==="durable"?p(o,u.directorySync):"not-requested";return{disposition:"accepted",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:t.deadlineAtMs,achievedDurability:u.achievedDurability,directorySync:M}}catch(b){if(b.code!=="EEXIST")throw b;let u=ce(e,t.id);if(!u)throw b;let M=ue(u,t.operationKey,t.id);return{disposition:"duplicate",requestId:t.id,responsePath:a,authoritativeDeadlineAtMs:M.deadlineAtMs??t.deadlineAtMs}}})}function Ve(e,t){if(!t.ownerId.trim())throw new Error("Mailbox claim owner identity is required.");if(t.owner&&(!Number.isSafeInteger(t.owner.pid)||t.owner.pid<=0||t.owner.processIdentity!==void 0&&t.owner.processIdentity.pid!==t.owner.pid))throw new Error("Mailbox claim process identity is invalid.");let i=t.nowMs??Date.now(),n=I(t.limits),r=k(e);try{return K(e,n,2e3,t.monotonicNow??v,t.durability??"durable",()=>Ye(e,t.ownerId,i,n,t.liveness??U,t.owner??{pid:process.pid},r,t.durability??"durable",t.onClaimStage))}catch(o){if(o instanceof x&&o.code==="admission-busy")return[];throw o}}function Ct(e,t){return!be(e.pendingDir)&&!be(e.legacyRequestDir)?[]:Ve(e,t)}function Ye(e,t,i,n,r,o,s,a,l){W(e,i,n,r);let d=y(e.inflightDir,O(t)),c=[...me(e.pendingDir,!1),...me(e.legacyRequestDir,!0)].sort((u,M)=>u.orderAtMs-M.orderAtMs||u.header.id.localeCompare(M.header.id)||u.path.localeCompare(M.path)),m=a==="durable"?s:"not-requested";c.length>0&&(a==="durable"?m=p(m,h(d)):Ke(d,{recursive:!0}),l?.("after-owner-directory-durable"),rt(d,t,o,a),l?.("after-owner-record-published"));let b=[];for(let u of c){if(b.length>=n.maxBatch)break;let M=y(e.responseDir,`${u.header.id}.json`);if(D(M)){g(u.path,{force:!0});continue}let H=Math.max(i+n.claimLeaseMs,(u.header.deadlineAtMs??i)+5e3),we=`${O(u.originalFile)}.${H}.claim`,V=y(d,we);try{_(u.path,V)}catch(Y){let G=Y.code;if(G==="ENOENT"||G==="EEXIST")continue;throw Y}l?.("after-claim-renamed");let Ae=a==="durable"?f(J(u.path)):"not-requested";l?.("after-source-directory-synced");let Se=a==="durable"?f(d):"not-requested";l?.("after-destination-directory-synced");let Be=p(m,Ae,Se);b.push({requestId:u.header.id,ownerId:t,path:V,originalFile:u.originalFile,claimedAtMs:i,claimExpiresAtMs:H,byteLength:u.byteLength,...u.header.operationKey?{operationKey:u.header.operationKey}:{},...u.header.clientId?{clientId:u.header.clientId}:{},...u.header.enqueuedAtMs===void 0?{}:{enqueuedAtMs:u.header.enqueuedAtMs},...u.header.deadlineAtMs===void 0?{}:{deadlineAtMs:u.header.deadlineAtMs},legacy:u.legacy,directorySync:Be})}return b}function Tt(e,t={}){let i=I(t);if(e.byteLength>i.maxItemBytes)throw new x("item-too-large",{pending:0,inflight:1,responses:0,deadLetters:0,invalid:0,totalItems:1,totalBytes:e.byteLength},i,e.byteLength);return Z(e.path,{maxBytes:i.maxItemBytes,inputKind:"bounded mailbox item"})}function Ge(e,t,i,n={}){let r=n.nowMs??Date.now(),o=I(n.limits),s=t.deadlineAtMs===void 0?r+o.responseRetentionMs:Math.min(r+o.responseRetentionMs,Math.max(t.deadlineAtMs,r)+Me),a={mailboxVersion:j,operationKey:t.operationKey??`legacy-${t.requestId}`,clientId:t.clientId??"legacy",...t.deadlineAtMs===void 0?{}:{deadlineAtMs:t.deadlineAtMs},completedAtMs:r,expiresAtMs:s},l={...a,...i,...a},d=Buffer.byteLength(`${JSON.stringify(l)}
4
- `),c=R(e);if(d>o.maxItemBytes)throw new x("item-too-large",c,o,d);let m=Math.max(0,c.totalBytes-t.byteLength)+d;if(m>o.maxBytes&&m>c.totalBytes&&(Ze(e,r).removed>0&&(c=R(e),m=Math.max(0,c.totalBytes-t.byteLength)+d),m>o.maxBytes&&m>c.totalBytes))throw new x("byte-capacity",c,o,d);let b=n.durability??"durable";if(et(e,t,l,b),n.onAfterResponsePublished?.(),g(t.path,{force:!0}),b==="durable"){let u=J(t.path);f(D(u)?u:e.inflightDir)}}var Me=3e4,Qe=4096;function Ze(e,t){let i={removed:0,bytesFreed:0},n;try{n=w(e.responseDir)}catch{return i}for(let r of n){if(!r.endsWith(".json"))continue;let o=y(e.responseDir,r),s,a;try{let m=ze(o,"r");try{a=We(m).size;let b=Buffer.alloc(Math.min(Qe,a));Xe(m,b,0,b.length,0),s=b.toString("utf8")}finally{Ue(m)}}catch{continue}let l=le(s,"expiresAtMs"),d=le(s,"deadlineAtMs");if(l!==null&&l<=t||d!==null&&d+Me<=t)try{g(o,{force:!0}),i.removed+=1,i.bytesFreed+=a}catch{}}return i}function le(e,t){let i=new RegExp(`"${t}":(\\d+)`).exec(e);if(!i)return null;let n=Number(i[1]);return Number.isSafeInteger(n)?n:null}function _t(e,t,i,n,r={}){let o=r.nowMs??Date.now(),s=I(r.limits);if(Ge(e,t,i,{...r,nowMs:o,limits:s}),!D(t.path)){let a=y(e.deadLetterDir,`${lt(t.requestId)}.${o}.${T("sha256").update(n).digest("hex").slice(0,12)}.json`),l={mailboxVersion:j,requestId:t.requestId,ownerId:t.ownerId,rejectedAtMs:o,reason:n,originalFile:t.originalFile},d=Buffer.byteLength(`${JSON.stringify(l,null,2)}
5
- `),c=R(e);c.totalItems<s.maxItems&&c.totalBytes+d<=s.maxBytes&&C(a,l,{spacing:2,trailingNewline:!0})}}function Jt(e,t={}){let i=t.nowMs??Date.now(),n=I(t.limits);return k(e),K(e,n,2e3,t.monotonicNow??v,"durable",()=>W(e,i,n,t.liveness??U))}function W(e,t,i,n=U){let r={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=i.cleanupBatch;for(let s of X(e.inflightDir)){if(o<=0)break;let a=y(e.responseDir,`${s.requestId}.json`);if(D(a)){g(s.path,{force:!0}),r.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>t||ot(e,s.ownerId,n)!=="dead")continue;let l=y(e.pendingDir,s.originalFile);try{_(s.path,l),r.reclaimed++}catch(d){if(d.code!=="EEXIST")throw d;g(s.path,{force:!0})}f(J(s.path)),f(e.pendingDir),o--}o=ye(e.responseDir,o,(s,a)=>a+i.responseRetentionMs,t,()=>{r.responsesRemoved++}),o=ye(e.deadLetterDir,o,(s,a)=>a+i.deadLetterRetentionMs,t,()=>{r.deadLettersRemoved++});for(let s of[e.pendingDir,e.inflightDir,e.responseDir,e.deadLetterDir,e.legacyRequestDir]){if(o<=0)break;for(let a of De(s)){if(o<=0)break;if(!S(a).includes(".tmp-"))continue;let l;try{l=B(a).mtimeMs}catch(d){if(d.code==="ENOENT")continue;throw d}l+i.temporaryRetentionMs>t||(g(a,{force:!0}),r.temporaryFilesRemoved++,o--)}}return at(e.inflightDir),r}function R(e){k(e);let t=[...A(e.pendingDir).map(l=>({path:l,pending:!0})),...A(e.legacyRequestDir).map(l=>({path:l,pending:!0}))],i=X(e.inflightDir).map(l=>({path:l.path,pending:!1})),n=A(e.responseDir).map(l=>({path:l,pending:!1})),r=A(e.deadLetterDir).map(l=>({path:l,pending:!1})),o=[...t,...i,...n,...r],s=0,a;for(let l of t){let d=E(l.path);if(!d){s++;continue}let c=d.enqueuedAtMs;if(c===void 0)try{c=B(l.path).mtimeMs}catch(m){if(m.code==="ENOENT")continue;throw m}a=a===void 0?c:Math.min(a,c)}return{pending:t.length,inflight:i.length,responses:n.length,deadLetters:r.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((l,d)=>l+dt(d.path),0),...a===void 0?{}:{oldestPendingAt:new Date(a).toISOString()}}}function et(e,t,i,n){let r=y(e.responseDir,`${t.requestId}.json`),o=`${JSON.stringify(i)}
6
- `;try{L(r,o,{durability:n})}catch(s){if(s.code!=="EEXIST")throw s;let a=E(r),l=t.operationKey??`legacy-${t.requestId}`;if(a?.operationKey!==l)throw new Error(`Mailbox completion ${t.requestId} conflicts with an existing operation.`,{cause:s})}}function K(e,t,i,n,r,o){let s=y(e.rootDir,".admission.lock"),a=`${process.pid}-${pe()}`,l=n()+Math.max(0,i);for(;!tt(e.rootDir,s,a,r);){if(it(s),n()>=l)throw new x("admission-busy",R(e),t,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return o()}finally{try{z(s).ownerToken===a&&(g(s,{recursive:!0,force:!0}),r==="durable"&&f(e.rootDir))}catch{}}}function tt(e,t,i,n){let r=`${JSON.stringify({ownerToken:i,pid:process.pid,acquiredAtMs:Date.now()})}
7
- `;try{return L(t,r,{durability:n}),!0}catch(o){if(o.code==="EEXIST")return!1;try{z(t).ownerToken===i&&(g(t,{force:!0}),n==="durable"&&f(e))}catch{}throw o}}function it(e){let t=null;try{let n=z(e);typeof n.ownerToken=="string"&&Number.isSafeInteger(n.pid)&&Number(n.pid)>0&&(t=Number(n.pid))}catch{}if(t===null||nt(t))return;let i=`${e}.stale-${pe()}`;try{_(e,i)}catch(n){let r=n.code;if(r==="ENOENT"||r==="EEXIST")return;throw n}g(i,{recursive:!0,force:!0})}function z(e){try{return JSON.parse(F(e,"mailbox lock record"))}catch(t){if(t.code!=="EISDIR"&&!(t instanceof Q&&t.reason==="not-regular"))throw t;return JSON.parse(F(y(e,"owner.json"),"mailbox lock owner record"))}}function nt(e){try{return process.kill(e,0),!0}catch(t){let i=t.code;return i==="EPERM"||i!=="ESRCH"}}function rt(e,t,i,n){let r=y(e,ge),o=i.processIdentity,s=he(r);if(s&&s.ownerId===t&&s.pid===i.pid&&(!s.processIdentity&&!o||s.processIdentity&&o&&q(s.processIdentity,o)))return;if(A(e).some(l=>l.endsWith(".claim")))throw new Error(`Mailbox owner identity ${t} collides with retained work from another process instance.`);let a={version:1,ownerId:t,pid:i.pid,...o?{processIdentity:o}:{}};n==="durable"?C(r,a):se(r,a)}function ot(e,t,i){let n=he(y(e.inflightDir,O(t),ge));if(!n)return"unknown";if(!i.isProcessAlive(n.pid))return"dead";if(!n.processIdentity)return"live";let r=i.readProcessIdentity(n.pid);return r?q(n.processIdentity,r)?"live":"dead":"unknown"}function he(e){try{let t=JSON.parse(F(e,"mailbox owner record"));if(t.version!==1||typeof t.ownerId!="string"||!t.ownerId||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0)return null;let i=t.processIdentity===void 0?null:ee(t.processIdentity);return t.processIdentity!==void 0&&(!i||i.pid!==t.pid)?null:{version:1,ownerId:t.ownerId,pid:t.pid,...i?{processIdentity:i}:{}}}catch{return null}}function ce(e,t){for(let i of[y(e.pendingDir,`${t}.json`),y(e.legacyRequestDir,`${t}.json`),y(e.responseDir,`${t}.json`)])if(D(i))return i;for(let i of X(e.inflightDir))if(i.requestId===t)return i.path;return null}function ue(e,t,i){let n=E(e);if(n?.operationKey===t)return n;if(S(e)===`${xe(t)}.json`)return{id:i,operationKey:t};throw new Error(`Mailbox operation ${i} conflicts with an existing retained record.`)}function st(e){if(e.mailboxVersion!==j||e.id!==xe(e.operationKey)||!e.clientId.trim()||!Number.isFinite(e.enqueuedAtMs)||!Number.isFinite(e.deadlineAtMs)||e.deadlineAtMs<e.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function me(e,t){return A(e).filter(i=>i.endsWith(".json")).map(i=>{let n=B(i),r=S(i,".json"),o=E(i)??{id:r};return{path:i,originalFile:S(i),header:o,byteLength:n.size,orderAtMs:o.enqueuedAtMs??n.mtimeMs,legacy:t}})}function X(e){if(!D(e))return[];let t=[];for(let i of w(e,{withFileTypes:!0})){if(!i.isDirectory())continue;let n=fe(i.name);if(n===null)continue;let r=y(e,i.name);for(let o of w(r,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let a=fe(s[1]),l=Number(s[2]);if(a===null||S(a)!==a||!a.endsWith(".json")||!Number.isSafeInteger(l))continue;let d=y(r,o.name),c=E(d)??{id:S(a,".json")},m;try{m=B(d)}catch(b){if(b.code==="ENOENT")continue;throw b}t.push({requestId:c.id,ownerId:n,path:d,originalFile:a,claimedAtMs:m.mtimeMs,claimExpiresAtMs:l,byteLength:m.size,...c.operationKey?{operationKey:c.operationKey}:{},...c.clientId?{clientId:c.clientId}:{},...c.enqueuedAtMs===void 0?{}:{enqueuedAtMs:c.enqueuedAtMs},...c.deadlineAtMs===void 0?{}:{deadlineAtMs:c.deadlineAtMs},legacy:c.operationKey===void 0})}}return t.sort((i,n)=>i.claimedAtMs-n.claimedAtMs||i.path.localeCompare(n.path))}function E(e){try{let t=JSON.parse(F(e,"mailbox record"));return typeof t.id!="string"||!t.id?null:{id:t.id,...typeof t.operationKey=="string"?{operationKey:t.operationKey}:{},...typeof t.clientId=="string"?{clientId:t.clientId}:{},...typeof t.enqueuedAtMs=="number"?{enqueuedAtMs:t.enqueuedAtMs}:{},...typeof t.deadlineAtMs=="number"?{deadlineAtMs:t.deadlineAtMs}:{}}}catch{return null}}function ye(e,t,i,n,r){for(let o of A(e)){if(t<=0)break;let s;try{s=B(o)}catch(a){if(a.code==="ENOENT")continue;throw a}i(o,s.mtimeMs)>n||(g(o,{force:!0}),r(),t--)}return t}function A(e){return D(e)?w(e,{withFileTypes:!0}).filter(t=>t.isFile()).map(t=>y(e,t.name)).sort():[]}function be(e){try{return w(e).some(t=>t.endsWith(".json"))}catch{return!1}}function De(e){if(!D(e))return[];let t=[];for(let i of w(e,{withFileTypes:!0})){let n=y(e,i.name);i.isFile()?t.push(n):i.isDirectory()&&t.push(...De(n))}return t.sort()}function at(e){if(D(e))for(let t of w(e,{withFileTypes:!0})){if(!t.isDirectory())continue;let i=y(e,t.name);w(i).some(n=>n.endsWith(".claim"))||g(i,{recursive:!0,force:!0})}}function dt(e){try{return B(e).size}catch{return 0}}function O(e){return Buffer.from(e,"utf8").toString("base64url")}function fe(e){try{let t=Buffer.from(e,"base64url").toString("utf8");return O(t)===e?t:null}catch{return null}}function lt(e){return/^[a-z0-9][a-z0-9-]{0,127}$/i.test(e)?e:`invalid-${T("sha256").update(e).digest("hex")}`}export{ve as a,se as b,C as c,de as d,St as e,j as f,x as g,qt as h,k as i,Pt as j,xe as k,$t as l,Ct as m,Tt as n,Ge as o,_t as p,Jt as q,R as r};
8
- //# sourceMappingURL=chunk-FGA2U4OR.js.map
@@ -1,2 +0,0 @@
1
- import{d as m,f as y}from"./chunk-GUFSG5TX.js";import{f as d,h as x,j as p,k as b}from"./chunk-FGA2U4OR.js";import{h as l}from"./chunk-7F45LJKI.js";import{createHash as S}from"crypto";import{dirname as R,join as f}from"path";var c=5,T=4,E=2,P="typescript-index";function _(t){let e=f(t,P),n=x(e);return{...n,requestDir:n.legacyRequestDir}}function F(t){let e=JSON.parse(t),n=e.protocolVersion,r=n===E,i=n===T,o=e.request,s=(r||i)&&o&&typeof o=="object"&&!Array.isArray(o)?{...o,removedFiles:o.removedFiles??[]}:o;if(!r&&!i&&n!==c||typeof e.id!="string"||!e.id||typeof e.baseGeneration!="string"||!e.baseGeneration||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||!q(s)||!r&&(e.mailboxVersion!==d||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==b(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript index service received an invalid mailbox request.");if(!r){let a=e,g=p(i?"typescript-index-v4":"typescript-index-v5",{baseGeneration:a.baseGeneration,request:o});if(a.operationKey!==g)throw new Error("TypeScript index service received a mismatched mailbox operation identity.");return{...a,protocolVersion:c,request:s}}let I=p("typescript-index-v2",{id:e.id,baseGeneration:e.baseGeneration,request:o});return{protocolVersion:c,mailboxVersion:d,id:e.id,operationKey:I,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,baseGeneration:e.baseGeneration,request:s}}function D(t){try{let e=y(m(l(f(R(t),"meta.json"),"reindex metadata")));return e?S("sha256").update(e).digest("hex"):null}catch{return null}}function q(t){if(!t||typeof t!="object")return!1;let e=t,n=u(e.modifiedFiles)?e.modifiedFiles:null,r=u(e.removedFiles)?e.removedFiles:null,i=u(e.affectedFiles)?e.affectedFiles:null;return e.kind==="emit-documents"&&typeof e.tsconfigPath=="string"&&!!e.tsconfigPath&&typeof e.projectArgument=="string"&&!!e.projectArgument&&typeof e.projectIdentity=="string"&&!!e.projectIdentity&&typeof e.producerIdentity=="string"&&!!e.producerIdentity&&n!==null&&new Set(n).size===n.length&&r!==null&&new Set(r).size===r.length&&i!==null&&(i.length>0||r.length>0)&&new Set(i).size===i.length}function u(t){return Array.isArray(t)&&t.every(e=>typeof e=="string"&&e.length>0)}export{c as a,_ as b,F as c,D as d};
2
- //# sourceMappingURL=chunk-FIQRSHVM.js.map