scip-query 0.10.12 → 0.12.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 (354) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/{vendor/scip/LICENSE.scip → LICENSE} +1 -0
  3. package/README.md +164 -49
  4. package/dist/augment-vue-worker.js +1 -1
  5. package/dist/{chunk-RUV5IY25.js → chunk-2LQWMYG4.js} +2 -2
  6. package/dist/{chunk-KZ4MG5NY.js → chunk-2QGE5AEP.js} +2 -2
  7. package/dist/chunk-4D54JIU3.js +2 -0
  8. package/dist/{chunk-2GLNBCHB.js → chunk-52Q4JFDW.js} +2 -2
  9. package/dist/chunk-5AAAEZ2Z.js +2 -0
  10. package/dist/chunk-64PRNLKP.js +2 -0
  11. package/dist/chunk-6XA4LDHY.js +2 -0
  12. package/dist/chunk-72MFTCU5.js +38 -0
  13. package/dist/chunk-75X52JTA.js +2 -0
  14. package/dist/{chunk-LEHVP4DY.js → chunk-7ITCOJGD.js} +2 -2
  15. package/dist/chunk-7JZRFDCU.js +2 -0
  16. package/dist/{chunk-XRUGSM76.js → chunk-AZLKLZ5S.js} +2 -2
  17. package/dist/chunk-B4VYXRCQ.js +26 -0
  18. package/dist/chunk-BCNT6ODA.js +5 -0
  19. package/dist/chunk-BP2NAIAZ.js +2 -0
  20. package/dist/chunk-BVNO67DB.js +2 -0
  21. package/dist/{chunk-XHMVZFA6.js → chunk-CW3KZ7UF.js} +2 -2
  22. package/dist/{chunk-6BN3EHQE.js → chunk-D64L53WX.js} +2 -2
  23. package/dist/{chunk-T3AEVJBG.js → chunk-D7J6GZAG.js} +2 -2
  24. package/dist/chunk-ECVXWZ4Q.js +3 -0
  25. package/dist/chunk-EDB7Y442.js +2 -0
  26. package/dist/{chunk-4ISHQ7UW.js → chunk-ETU2I5JM.js} +4 -4
  27. package/dist/chunk-EXKLAEB4.js +18 -0
  28. package/dist/chunk-EZ5WDZ2Q.js +3 -0
  29. package/dist/{chunk-S2MRVIJ5.js → chunk-F5BJSNU5.js} +6 -6
  30. package/dist/chunk-FBCOFKEC.js +2 -0
  31. package/dist/chunk-FERAXG6Y.js +72 -0
  32. package/dist/chunk-FXG3PHVW.js +9 -0
  33. package/dist/{chunk-XUCZ3RQ5.js → chunk-G2UBOONK.js} +4 -4
  34. package/dist/chunk-GNG622H3.js +3 -0
  35. package/dist/{chunk-JS6B76AQ.js → chunk-H2NMIZFD.js} +2 -2
  36. package/dist/chunk-H7NSJ7L2.js +5 -0
  37. package/dist/chunk-HSU3M25J.js +21 -0
  38. package/dist/chunk-HXXMPYEF.js +2 -0
  39. package/dist/chunk-IRJDYTNZ.js +3 -0
  40. package/dist/chunk-ISLWJ4PY.js +10 -0
  41. package/dist/chunk-J5WVNZ6O.js +2 -0
  42. package/dist/{chunk-UVPY3RUZ.js → chunk-K6UI6EBZ.js} +2 -2
  43. package/dist/{chunk-MNCQPMCH.js → chunk-KJCDEDQW.js} +2 -2
  44. package/dist/{chunk-ELC77ZDE.js → chunk-KMVGRIO2.js} +2 -2
  45. package/dist/chunk-KSUZS77X.js +16 -0
  46. package/dist/{chunk-A4UTLKHU.js → chunk-L2CX5GHZ.js} +2 -2
  47. package/dist/chunk-LFM3O5KX.js +2 -0
  48. package/dist/{chunk-ZUUNREKS.js → chunk-M72ZFN6E.js} +5 -5
  49. package/dist/chunk-MBKJ7GHT.js +102 -0
  50. package/dist/chunk-MJKJMWIM.js +2 -0
  51. package/dist/chunk-MKM7NBZK.js +43 -0
  52. package/dist/chunk-MTDBHTSF.js +2 -0
  53. package/dist/chunk-NAH5EAZS.js +6 -0
  54. package/dist/chunk-NJJ7AS4F.js +2 -0
  55. package/dist/{chunk-EOLGSSDR.js → chunk-NKT5EMEX.js} +2 -2
  56. package/dist/{chunk-ANUEY5WV.js → chunk-NLMRJ7SI.js} +2 -2
  57. package/dist/chunk-NQ75OVUU.js +40 -0
  58. package/dist/{chunk-TBCHRDAC.js → chunk-O3WDE26W.js} +2 -2
  59. package/dist/{chunk-VB2EZZPA.js → chunk-OPE5YXFE.js} +2 -2
  60. package/dist/chunk-ORBRX2QJ.js +2 -0
  61. package/dist/{chunk-OFXN2BCT.js → chunk-OSWF3HSF.js} +2 -2
  62. package/dist/{chunk-JJ5SAWBT.js → chunk-OVMUVXKQ.js} +2 -2
  63. package/dist/{chunk-NTSR6SRP.js → chunk-PH7ZFK6L.js} +2 -2
  64. package/dist/chunk-PXHPCWX5.js +2 -0
  65. package/dist/chunk-Q3B3FNCU.js +3 -0
  66. package/dist/{chunk-SQNHOOJ5.js → chunk-Q7S2DADC.js} +2 -2
  67. package/dist/{chunk-3XSNW5XB.js → chunk-QARYU7R3.js} +2 -2
  68. package/dist/chunk-QZ4JVECJ.js +2 -0
  69. package/dist/{chunk-FX6ULETZ.js → chunk-R5336VHZ.js} +2 -2
  70. package/dist/chunk-RA5MTIOO.js +2 -0
  71. package/dist/{chunk-RXINFVBN.js → chunk-RIQED5OU.js} +2 -2
  72. package/dist/chunk-T2FQ4GHD.js +9 -0
  73. package/dist/chunk-T6NGEV5I.js +2 -0
  74. package/dist/chunk-T7VQG55Q.js +2 -0
  75. package/dist/chunk-TFWDJDGO.js +2 -0
  76. package/dist/chunk-TG7QSYCJ.js +2 -0
  77. package/dist/{chunk-DQ6433ZG.js → chunk-TTMKELT7.js} +17 -8
  78. package/dist/{chunk-DDQONX6B.js → chunk-U7I373V4.js} +2 -2
  79. package/dist/chunk-UAHZ57BR.js +2 -0
  80. package/dist/chunk-URSSPS5H.js +2 -0
  81. package/dist/chunk-V3Z3IOWO.js +2 -0
  82. package/dist/{chunk-7C6JBBE4.js → chunk-V7CVBPWX.js} +2 -2
  83. package/dist/{chunk-PWAK75BU.js → chunk-VYF5HA76.js} +2 -2
  84. package/dist/chunk-WIBFXSYB.js +6 -0
  85. package/dist/chunk-WS3Z6W3M.js +65 -0
  86. package/dist/chunk-WXVGNFAO.js +2 -0
  87. package/dist/chunk-XEMQUN3Z.js +20 -0
  88. package/dist/chunk-YCPASUCX.js +2 -0
  89. package/dist/chunk-YDDGCJJG.js +3 -0
  90. package/dist/{chunk-2UVCH7CQ.js → chunk-YPKBZ77R.js} +2 -2
  91. package/dist/chunk-YZXV3CU3.js +60 -0
  92. package/dist/chunk-Z3IPJKJP.js +4 -0
  93. package/dist/chunk-ZMGBWSFZ.js +2 -0
  94. package/dist/{chunk-GKB4JJDU.js → chunk-ZOIPAYRP.js} +2 -2
  95. package/dist/chunk-ZRIOGL7F.js +8 -0
  96. package/dist/cli.js +446 -280
  97. package/dist/{config-types-dvHOz0zU.d.ts → config-types-BrHl3Bge.d.ts} +57 -0
  98. package/dist/{db-rMZO5JFK.d.ts → db-_Bdx0E1W.d.ts} +1 -1
  99. package/dist/diff-gate-types-CG2YQ_ei.d.ts +4 -0
  100. package/dist/{frontend-behavior-evidence-BxKpKWUu.d.ts → frontend-behavior-evidence-EfM4_9bc.d.ts} +1 -1
  101. package/dist/{health-CtTIGh6H.d.ts → health-BEZ1Rt0S.d.ts} +54 -2
  102. package/dist/index.d.ts +4 -68
  103. package/dist/index.js +1 -1
  104. package/dist/postinstall.js +1 -4
  105. package/dist/queries/affected.d.ts +2 -2
  106. package/dist/queries/affected.js +1 -1
  107. package/dist/queries/bottlenecks.d.ts +2 -2
  108. package/dist/queries/bottlenecks.js +1 -1
  109. package/dist/queries/by-kind.d.ts +2 -2
  110. package/dist/queries/by-kind.js +1 -1
  111. package/dist/queries/call-graph.d.ts +2 -2
  112. package/dist/queries/call-graph.js +1 -1
  113. package/dist/queries/change-surface.d.ts +2 -2
  114. package/dist/queries/change-surface.js +1 -1
  115. package/dist/queries/cleanup-plan.d.ts +2 -2
  116. package/dist/queries/cleanup-plan.js +1 -1
  117. package/dist/queries/co-change.d.ts +12 -2
  118. package/dist/queries/co-change.js +1 -1
  119. package/dist/queries/code.d.ts +2 -2
  120. package/dist/queries/code.js +1 -1
  121. package/dist/queries/complexity-hotspots.d.ts +7 -3
  122. package/dist/queries/complexity-hotspots.js +1 -1
  123. package/dist/queries/complexity.d.ts +42 -4
  124. package/dist/queries/complexity.js +1 -1
  125. package/dist/queries/convergence.d.ts +2 -2
  126. package/dist/queries/convergence.js +1 -1
  127. package/dist/queries/coupling.d.ts +2 -2
  128. package/dist/queries/coupling.js +1 -1
  129. package/dist/queries/cycles.d.ts +12 -3
  130. package/dist/queries/cycles.js +1 -1
  131. package/dist/queries/dataflow.d.ts +2 -2
  132. package/dist/queries/dataflow.js +1 -1
  133. package/dist/queries/dead.d.ts +3 -3
  134. package/dist/queries/dead.js +1 -1
  135. package/dist/queries/deep-chains.d.ts +2 -2
  136. package/dist/queries/deep-chains.js +1 -1
  137. package/dist/queries/deps.d.ts +2 -2
  138. package/dist/queries/deps.js +1 -1
  139. package/dist/queries/diff-gate.d.ts +65 -8
  140. package/dist/queries/diff-gate.js +1 -1
  141. package/dist/queries/diff-impact.d.ts +21 -3
  142. package/dist/queries/diff-impact.js +1 -1
  143. package/dist/queries/doc-drift.d.ts +29 -2
  144. package/dist/queries/doc-drift.js +1 -1
  145. package/dist/queries/drift.d.ts +15 -3
  146. package/dist/queries/drift.js +1 -1
  147. package/dist/queries/duplicate-bodies.d.ts +55 -0
  148. package/dist/queries/duplicate-bodies.js +2 -0
  149. package/dist/queries/extract-candidates.d.ts +2 -2
  150. package/dist/queries/extract-candidates.js +1 -1
  151. package/dist/queries/fan.d.ts +2 -2
  152. package/dist/queries/fan.js +1 -1
  153. package/dist/queries/files.d.ts +4 -3
  154. package/dist/queries/files.js +1 -1
  155. package/dist/queries/health.d.ts +3 -3
  156. package/dist/queries/health.js +1 -1
  157. package/dist/queries/hierarchy.d.ts +2 -2
  158. package/dist/queries/hierarchy.js +1 -1
  159. package/dist/queries/hotspots.d.ts +2 -2
  160. package/dist/queries/hotspots.js +1 -1
  161. package/dist/queries/imports.d.ts +2 -2
  162. package/dist/queries/imports.js +1 -1
  163. package/dist/queries/incomplete-migration.d.ts +3 -2
  164. package/dist/queries/incomplete-migration.js +1 -1
  165. package/dist/queries/index.d.ts +12 -7
  166. package/dist/queries/index.js +1 -1
  167. package/dist/queries/isolated.d.ts +2 -2
  168. package/dist/queries/isolated.js +1 -1
  169. package/dist/queries/locality-candidates.d.ts +2 -2
  170. package/dist/queries/locality-candidates.js +1 -1
  171. package/dist/queries/members.d.ts +2 -2
  172. package/dist/queries/members.js +1 -1
  173. package/dist/queries/methods.d.ts +2 -2
  174. package/dist/queries/methods.js +1 -1
  175. package/dist/queries/outline.d.ts +2 -2
  176. package/dist/queries/outline.js +1 -1
  177. package/dist/queries/passthrough-candidates.d.ts +11 -3
  178. package/dist/queries/passthrough-candidates.js +1 -1
  179. package/dist/queries/plan-context.d.ts +3 -2
  180. package/dist/queries/plan-context.js +1 -1
  181. package/dist/queries/react-component-duplicates.d.ts +7 -2
  182. package/dist/queries/react-component-duplicates.js +1 -1
  183. package/dist/queries/react-hook-candidates.d.ts +3 -3
  184. package/dist/queries/react-hook-candidates.js +1 -1
  185. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  186. package/dist/queries/react-large-component-pressure.js +1 -1
  187. package/dist/queries/recent-duplicates.d.ts +2 -2
  188. package/dist/queries/recent-duplicates.js +1 -1
  189. package/dist/queries/redundant-reexports.d.ts +2 -2
  190. package/dist/queries/redundant-reexports.js +1 -1
  191. package/dist/queries/refs.d.ts +2 -2
  192. package/dist/queries/refs.js +1 -1
  193. package/dist/queries/self-audit.d.ts +4 -2
  194. package/dist/queries/self-audit.js +1 -1
  195. package/dist/queries/similar-chains.d.ts +2 -2
  196. package/dist/queries/similar-chains.js +1 -1
  197. package/dist/queries/similar-files.d.ts +2 -2
  198. package/dist/queries/similar-files.js +1 -1
  199. package/dist/queries/similar-signatures.d.ts +17 -10
  200. package/dist/queries/similar-signatures.js +1 -1
  201. package/dist/queries/similar.d.ts +42 -3
  202. package/dist/queries/similar.js +1 -1
  203. package/dist/queries/slice.d.ts +2 -2
  204. package/dist/queries/slice.js +1 -1
  205. package/dist/queries/stale-abstractions.d.ts +2 -2
  206. package/dist/queries/stale-abstractions.js +1 -1
  207. package/dist/queries/stats.d.ts +2 -2
  208. package/dist/queries/surface.d.ts +2 -2
  209. package/dist/queries/surface.js +1 -1
  210. package/dist/queries/symbols.d.ts +2 -2
  211. package/dist/queries/symbols.js +1 -1
  212. package/dist/queries/system.d.ts +2 -2
  213. package/dist/queries/system.js +1 -1
  214. package/dist/queries/trace.d.ts +2 -2
  215. package/dist/queries/trace.js +1 -1
  216. package/dist/queries/twin-ab.d.ts +55 -0
  217. package/dist/queries/twin-ab.js +2 -0
  218. package/dist/queries/twin-drift.d.ts +97 -0
  219. package/dist/queries/twin-drift.js +2 -0
  220. package/dist/queries/unused-imports.d.ts +2 -2
  221. package/dist/queries/unused-imports.js +1 -1
  222. package/dist/queries/unused-params.d.ts +2 -2
  223. package/dist/queries/unused-params.js +1 -1
  224. package/dist/queries/vue-component-duplicates.d.ts +7 -2
  225. package/dist/queries/vue-component-duplicates.js +1 -1
  226. package/dist/queries/vue-composable-candidates.d.ts +3 -3
  227. package/dist/queries/vue-composable-candidates.js +1 -1
  228. package/dist/queries/vue-large-view-pressure.d.ts +6 -2
  229. package/dist/queries/vue-large-view-pressure.js +1 -1
  230. package/dist/queries/wrapper-candidates.d.ts +2 -2
  231. package/dist/queries/wrapper-candidates.js +1 -1
  232. package/dist/reindex-worker.js +9 -9
  233. package/dist/reindex.d.ts +23 -4
  234. package/dist/reindex.js +19 -19
  235. package/dist/runtime.d.ts +11 -6
  236. package/dist/runtime.js +2 -2
  237. package/dist/{scip-cli-trnNvymv.d.ts → scip-cli-C7cg4ZHR.d.ts} +1 -1
  238. package/dist/symbol-types-DaoeXKUt.d.ts +66 -0
  239. package/docs/AGENT_GUIDE.md +20 -18
  240. package/docs/AI_FAILURE_MODES.md +36 -13
  241. package/docs/API.md +1 -1
  242. package/docs/COMMAND_REFERENCE.md +57 -14
  243. package/docs/DETECTOR_GUIDE.md +20 -3
  244. package/docs/REGEX_POLICY.md +34 -0
  245. package/docs/analyzer-inventory.md +40 -3
  246. package/docs/analyzer-validation-ledger.md +34 -6
  247. package/package.json +39 -7
  248. package/scripts/build-scip-windows.mjs +10 -7
  249. package/skills/_shared/SKILL.md +243 -0
  250. package/skills/_shared/agents/openai.yaml +4 -0
  251. package/skills/scip-api-impact/SKILL.md +55 -71
  252. package/skills/scip-claim-audit/SKILL.md +105 -0
  253. package/skills/scip-claim-audit/agents/openai.yaml +4 -0
  254. package/skills/scip-cleanup-audit/SKILL.md +122 -0
  255. package/skills/scip-cleanup-audit/agents/openai.yaml +4 -0
  256. package/skills/scip-cleanup-improve/SKILL.md +84 -0
  257. package/skills/scip-cleanup-improve/agents/openai.yaml +4 -0
  258. package/skills/scip-concrete-plan/SKILL.md +181 -0
  259. package/skills/scip-concrete-plan/agents/openai.yaml +4 -0
  260. package/skills/scip-conductor/SKILL.md +133 -0
  261. package/skills/scip-conductor/agents/openai.yaml +4 -0
  262. package/skills/scip-debug/SKILL.md +60 -58
  263. package/skills/scip-diagram/SKILL.md +64 -94
  264. package/skills/scip-directory-architecture/SKILL.md +65 -107
  265. package/skills/scip-doc-reconcile/SKILL.md +56 -67
  266. package/skills/scip-explore/SKILL.md +78 -210
  267. package/skills/scip-hyper-optimization/SKILL.md +124 -198
  268. package/skills/scip-integrity-audit/SKILL.md +103 -0
  269. package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
  270. package/skills/scip-language-playbook/SKILL.md +56 -326
  271. package/skills/scip-maintainability/SKILL.md +80 -219
  272. package/skills/scip-probe-reachability/SKILL.md +92 -0
  273. package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
  274. package/skills/scip-query/SKILL.md +108 -124
  275. package/skills/scip-react-maintainability/SKILL.md +64 -82
  276. package/skills/scip-setup/SKILL.md +121 -0
  277. package/skills/scip-setup/agents/openai.yaml +4 -0
  278. package/skills/scip-tla-model-system/SKILL.md +150 -0
  279. package/skills/scip-tla-model-system/agents/openai.yaml +4 -0
  280. package/skills/scip-triage-issue/SKILL.md +53 -41
  281. package/skills/scip-twin-drift/SKILL.md +107 -0
  282. package/skills/scip-twin-drift/agents/openai.yaml +4 -0
  283. package/skills/scip-verify/SKILL.md +70 -88
  284. package/skills/scip-vue-maintainability/SKILL.md +67 -94
  285. package/dist/chunk-2DOW7QCA.js +0 -71
  286. package/dist/chunk-2FMFF4RI.js +0 -2
  287. package/dist/chunk-5GXTUANY.js +0 -2
  288. package/dist/chunk-5JHEN5VN.js +0 -25
  289. package/dist/chunk-62ULXMQ7.js +0 -18
  290. package/dist/chunk-63CI3IXR.js +0 -102
  291. package/dist/chunk-7EK7OSWS.js +0 -2
  292. package/dist/chunk-7IWIMNHI.js +0 -2
  293. package/dist/chunk-7XTO4YXB.js +0 -8
  294. package/dist/chunk-AOWFUGDL.js +0 -2
  295. package/dist/chunk-AREANYIA.js +0 -3
  296. package/dist/chunk-AZBELWZQ.js +0 -7
  297. package/dist/chunk-B32FX5KB.js +0 -2
  298. package/dist/chunk-B6MJ5VQV.js +0 -2
  299. package/dist/chunk-CXWCLVYL.js +0 -2
  300. package/dist/chunk-CYHIKTJN.js +0 -3
  301. package/dist/chunk-DFSEARAU.js +0 -2
  302. package/dist/chunk-DVFP6PZI.js +0 -2
  303. package/dist/chunk-E3ADDB43.js +0 -2
  304. package/dist/chunk-F6IXELII.js +0 -20
  305. package/dist/chunk-FMGVZBS2.js +0 -2
  306. package/dist/chunk-GG5LHT27.js +0 -2
  307. package/dist/chunk-H7JF2CKK.js +0 -2
  308. package/dist/chunk-HHOMJCP5.js +0 -4
  309. package/dist/chunk-HRDSU5FN.js +0 -9
  310. package/dist/chunk-HWVYTJOV.js +0 -2
  311. package/dist/chunk-JNMLBL36.js +0 -2
  312. package/dist/chunk-L446VQYQ.js +0 -2
  313. package/dist/chunk-LDJUB7XW.js +0 -2
  314. package/dist/chunk-MYTUWXHK.js +0 -4
  315. package/dist/chunk-N25HPUOK.js +0 -2
  316. package/dist/chunk-NABVR6B7.js +0 -2
  317. package/dist/chunk-NBNEVLRC.js +0 -3
  318. package/dist/chunk-ONPCQ2PM.js +0 -6
  319. package/dist/chunk-Q5P7NOVM.js +0 -2
  320. package/dist/chunk-RGKRYO22.js +0 -4
  321. package/dist/chunk-RM2WQ75T.js +0 -2
  322. package/dist/chunk-ROGZXWN2.js +0 -2
  323. package/dist/chunk-RSSXKJ6J.js +0 -38
  324. package/dist/chunk-RVGEZYMQ.js +0 -2
  325. package/dist/chunk-SA3DPTHT.js +0 -7
  326. package/dist/chunk-SGTKURU6.js +0 -52
  327. package/dist/chunk-T4N2ZRVY.js +0 -21
  328. package/dist/chunk-THB6AM3V.js +0 -11
  329. package/dist/chunk-ULHLDOD6.js +0 -4
  330. package/dist/chunk-UQ73QF5D.js +0 -43
  331. package/dist/chunk-UUBMFL3F.js +0 -59
  332. package/dist/chunk-V5FGK3DZ.js +0 -2
  333. package/dist/chunk-WTY5FERW.js +0 -2
  334. package/dist/chunk-WUOB4DHH.js +0 -6
  335. package/dist/chunk-YFQIKYOP.js +0 -2
  336. package/dist/chunk-Z2LDWIJV.js +0 -5
  337. package/dist/chunk-ZNWWVYQL.js +0 -3
  338. package/skills/concrete-plan/SKILL.md +0 -372
  339. package/skills/concrete-plan/agents/openai.yaml +0 -4
  340. package/skills/scip-adoption/SKILL.md +0 -122
  341. package/skills/scip-adoption/agents/openai.yaml +0 -4
  342. package/skills/scip-ai-cleanup/SKILL.md +0 -153
  343. package/skills/scip-ai-cleanup/agents/openai.yaml +0 -4
  344. package/skills/scip-debloat/SKILL.md +0 -439
  345. package/skills/scip-debloat/agents/openai.yaml +0 -4
  346. package/skills/scip-health-audit/SKILL.md +0 -162
  347. package/skills/scip-health-audit/agents/openai.yaml +0 -4
  348. package/skills/scip-health-improve/SKILL.md +0 -155
  349. package/skills/scip-health-improve/agents/openai.yaml +0 -4
  350. package/skills/scip-query-setup/SKILL.md +0 -170
  351. package/skills/scip-query-setup/agents/openai.yaml +0 -3
  352. package/vendor/scip/README.md +0 -6
  353. package/vendor/scip/win32-arm64/scip.exe +0 -0
  354. package/vendor/scip/win32-x64/scip.exe +0 -0
@@ -0,0 +1,2 @@
1
+ import{e as $}from"./chunk-Q3B3FNCU.js";import{b as D}from"./chunk-B75HZHUP.js";import{a as p}from"./chunk-BGBBVSH4.js";import{g as L}from"./chunk-YDDGCJJG.js";import{c as h,d as x,g as y}from"./chunk-MBKJ7GHT.js";import{d as b}from"./chunk-HXXMPYEF.js";import{a as g,c as S}from"./chunk-T2FQ4GHD.js";import{p as d}from"./chunk-WS3Z6W3M.js";function K(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=M(e,B(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=I(t);return r?m.slice(0,r):m}function B(e,n){let s=y(e,{scope:n.scope}).filter(i=>i.isFunctionLike&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),D(s,n.scanLimit)}function M(e,n,s){let i=[];for(let a of n){let o=w(e,a,s);o&&i.push({signature:o,definition:a,fn:v(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=F(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?$(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function v(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function I(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function F(e){return e<=5?"<=5":e<=20?"6-20":">20"}function w(e,n,s){if(s.semantic){let c=L(e,n);if(c)return c}let i=z(n.documentation),r=i?q(i):null;return r||A(G(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function z(e){return h(x(e))}function G(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=k(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,P(u)))return u}if(u&&u.includes("("))return u}return null}function P(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function q(e){if(!e||!e.trim())return null;let n=e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function A(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let o=C(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function C(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function k(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{K as a};
2
+ //# sourceMappingURL=chunk-64PRNLKP.js.map
@@ -0,0 +1,2 @@
1
+ import{a as u,c as g}from"./chunk-KMVGRIO2.js";function v(e){let r=[],i=[],s=[];for(let t of e.primitiveGroups)t.values.length!==0&&f(t.bucket,i,s).push(`${t.reasonPrefix}: ${t.values.join(", ")}`);for(let t of e.nameGroups)p(t.names,t.label,e.genericWords,e.stripPrefixes??[],r,f(t.fallbackBucket,i,s));let l=r.length>0,c=i.length>0,o=s.length>0,a=l?c||o?"mixed":"domain-behavior":o?"shared-abstraction":"generic-workflow-scaffolding";return{actionTier:a==="domain-behavior"||a==="mixed"?"signal":"support",evidenceClass:a,reasons:[...r,...s,...i].slice(0,6),recommendation:e.recommendation(a)}}function x(e,r){if(e.size===0||r.size===0)return 0;let l=u(e,r).size/Math.min(e.size,r.size)*Math.min(1,Math.min(e.size,r.size)/(.35*Math.max(e.size,r.size)));return Math.max(g(e,r),l)}function b(e,r){let i=Object.fromEntries(e.map(s=>[s.name,s.count]));for(let s of r)if(Object.entries(s.min).every(([c,o])=>(i[c]??0)>=o))return{pass:!0,reason:s.reason,counts:i};return{pass:!1,reason:"shared tokens did not meet calibrated overlap thresholds",counts:i}}function P(e,r,i){let s=r.map(n=>{let t=n.value(e),d=n.weightedValue?n.weightedValue(e,t):t;return{axis:n,value:t,weighted:d,qualifies:n.qualifies?n.qualifies(e,t):t>0}}),l=s.filter(n=>n.qualifies&&n.axis.reason).map(n=>n.axis.reason(e,n.value)),c=s.filter(n=>n.axis.dominantEligible!==!1).sort((n,t)=>t.weighted-n.weighted)[0],o=c&&c.weighted>0?c.axis.axis:i,a=[...new Set(s.filter(n=>n.qualifies).map(n=>n.axis.axis).concat(l.length>0?[]:[o]))];return{dominantPressure:o,pressureKinds:a,reasons:l}}function y(e,r){return[...e].filter(i=>i.startsWith(r)).map(i=>i.slice(r.length)).sort()}function A(e){return[...e].sort()}function p(e,r,i,s,l,c){let o=[],a=[];for(let n of e)m(n,s).filter(d=>!i.has(d)).length>0?o.push(n):a.push(n);o.length&&l.push(`${r} has domain term(s): ${o.slice(0,6).join(", ")}`),a.length&&c.push(`${r} is generic workflow: ${a.slice(0,6).join(", ")}`)}function m(e,r){let i=e.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2");for(let s of r)i=i.replace(s,"");return i.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function f(e,r,i){return e==="generic"?r:i}export{v as a,x as b,b as c,P as d,y as e,A as f};
2
+ //# sourceMappingURL=chunk-6XA4LDHY.js.map
@@ -0,0 +1,38 @@
1
+ import{b as oe,f as ie,g as A,h as N,i as x,o as me,p as de}from"./chunk-MKM7NBZK.js";import{a as ae,b as se,d as le,e as re,f as ce}from"./chunk-YDDGCJJG.js";import{a as q}from"./chunk-XEMQUN3Z.js";import{d as ue,e as fe}from"./chunk-MTDBHTSF.js";import{f as ee,g as v,l as ne,m as te}from"./chunk-MBKJ7GHT.js";import{e as E,g as X}from"./chunk-HXXMPYEF.js";import{i as w,k as Y,m as Z}from"./chunk-T2FQ4GHD.js";import{x as I}from"./chunk-ISLWJ4PY.js";import{a as J,b as P,d as W,f as V,k as z,l as L,p as T}from"./chunk-WS3Z6W3M.js";import{c as U}from"./chunk-GNG622H3.js";import{a as Q}from"./chunk-64MNV6AB.js";import{c as K,d as B}from"./chunk-7S5E7KWT.js";function un(e,n,t={}){let o=ye(e,[n],{additive:t.additive,semantic:t.semantic}),i=t.callableOnly?(o.get(n.symbolId)??[]).filter(a=>X(a.symbol)||a.source==="ast-callsite"):o.get(n.symbolId)??[];return typeof t.limit=="number"?i.slice(0,t.limit):i}function be(e,n,t={}){let o=Re(e)?Ie(e,n,{semantic:t.semantic!==!1}):_e(e).get(n.symbolId)??[];return typeof t.limit=="number"?o.slice(0,t.limit):o}var Ce=B("caller-rows",{clearGroups:["whole-project"]}),Me=2e4;function Re(e){return(e.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>Me}function _e(e){return Ce.get(e,()=>{let n=v(e),t=ye(e,n),o=new Map;for(let s of n)o.set(s.symbol,s.symbolId);let i=new Map,a=new Map;for(let s of n){let l=t.get(s.symbolId);if(!(!l||l.length===0))for(let c of l){let m=o.get(c.symbol);if(m===void 0||m===s.symbolId)continue;let d=i.get(m);d||(d=[],i.set(m,d),a.set(m,new Set));let f=`${s.symbol}|${s.relativePath}`;a.get(m).has(f)||(a.get(m).add(f),d.push({symbol:s.symbol,file:s.relativePath,source:"caller-map-inversion"}))}}return i})}function Ie(e,n,t){let o=[],i=new Set,a=l=>{if(l.symbol===n.symbol)return;let c=`${l.symbol}|${l.file}`;i.has(c)||(i.add(c),o.push(l))};for(let l of de(e,n))l.file!==n.relativePath&&a({symbol:l.enclosingSymbol??l.file,file:l.file,source:"resolved-reference"});let s=t.semantic?Le(e,n):null;if(s)for(let l of le(e,s)){if(l.file===n.relativePath||e.isIgnored(l.file))continue;let c=te(ee(e,l.file),l.line);a({symbol:c?.symbol??l.file,file:l.file,source:"semantic-reference"})}return o}function Le(e,n){let t=ue().join(", "),o=fe().join(", ");return e.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 (${t}) OR gs.symbol LIKE '%().' THEN 1 ELSE 0 END AS isFunctionLike,
11
+ CASE WHEN gs.kind IN (${o}) 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`,n.symbolId)??null}function ye(e,n,t={}){if(n.length===0)return new Map;let o=t.additive??!1,i=[],a=[];for(let d of n)I(d.relativePath)&&w(e,d.relativePath)!==null?i.push(d):a.push(d);let s=new Map,l=new Map,c=d=>{for(let[f,R]of d){let r=s.get(f);r||(r=[],s.set(f,r));let u=l.get(f);u||(u=new Set,l.set(f,u));for(let b of R){let g=`${b.symbol}|${b.chunkId}`;u.has(g)||(u.add(g),r.push(b))}}};i.length>0&&c(ve(e,i)),t.semantic!==!1&&c(Pe(we(e,n)));let m=o?n:a;return m.length>0&&c(Fe(e,m)),s}function we(e,n){let t=z(),o=new Map,i=[],a=[],s=0,l=0,c=0,m=0;if(L("semantic.callees.cache-scan",()=>{for(let u of n){if(!ae(u.relativePath)){t&&(s+=1);continue}let b=T(e,u.relativePath);if(!b){t&&(l+=1),a.push(u);continue}let g=P(e,u.relativePath,b),D=Ee(e,u.relativePath),M=W(e,u.relativePath,u.symbol,g,D);if(M!==null){let S=De(M);if(S){t&&(c+=1),S.length>0&&o.set(u.symbolId,S);continue}t&&(m+=1)}i.push({def:u,contentHash:g,depsDigest:D})}},()=>({definitions:n.length,skippedNonTs:s,sourceMissing:l,cacheHits:c,parseFailures:m,misses:i.length,unkeyed:a.length,resultRows:o.size})),i.length===0&&a.length===0)return o;let d=[...a,...i.map(u=>u.def)],f=0,R=L("semantic.callees.compute-misses",()=>{let u=ce(e,d);return f=u.size,u},()=>({definitions:d.length,misses:i.length,unkeyed:a.length,rows:f}));for(let[u,b]of R)o.set(u,b);if(se(e).capability("semantic-callees").available){let u=i.map(b=>({relativePath:b.def.relativePath,symbol:b.def.symbol,contentHash:b.contentHash,depsDigest:b.depsDigest,payload:JSON.stringify(R.get(b.def.symbolId)??[])}));L("semantic.callees.cache-write",()=>V(e,u),()=>({entries:u.length}))}else L("semantic.callees.cache-write-skip",()=>{},()=>({reason:"provider-unavailable",misses:i.length}));return o}function De(e){try{return JSON.parse(e)}catch{return null}}var ke=K("semantic-deps-digest",{clearGroups:["whole-project","source-file"]});function Ee(e,n){return ke.get(e,n,()=>{let o=[...q(e).get(n)??[]].sort().map(i=>`${i}:${P(e,i,T(e,i))}`);return J(o.join("|"))})}function ve(e,n){let t=new Map,o=Ae(n,t),i=x(e);for(let[a,s]of o){let l=w(e,a);if(!l)continue;let c=ne(s);for(let m of l){let d=c.get(m.line);if(!d)continue;let f=Ne(e,a,i,m);f&&f.symbol!==d.symbol&&t.get(d.symbolId).push({symbol:f.symbol,file:f.file,chunkId:m.line,source:"ast-callsite"})}}return t}function Ae(e,n){let t=new Map;for(let o of e){let i=t.get(o.relativePath);i?i.push(o):t.set(o.relativePath,[o]),n.set(o.symbolId,[])}for(let o of t.values())o.sort((i,a)=>i.endLine-i.startLine-(a.endLine-a.startLine));return t}function Ne(e,n,t,o){let i=A(n,t.get(o.calleeLeaf)??[]);if(i.length===0)return null;let a=xe(e,n,i,o.calleeQualifier);return a||N(e,n,i,o.memberAccess)}function xe(e,n,t,o){if(!o||I(n)!=="clojure")return null;let a=Z(e,n).filter(s=>s.kind==="namespace"&&s.localName===o&&s.sourcePath).map(s=>s.sourcePath);for(let s of a){let l=t.find(c=>U(s,c.file));if(l)return l}return t.find(s=>/`([^`]+)`\//.exec(s.symbol)?.[1]===o)??null}function Fe(e,n){if(n.length===0)return new Map;let o=j(n.map(r=>r.documentId)).flatMap(r=>e.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 (${r.map(()=>"?").join(",")})`,...r)),i=new Map;for(let r of o)i.has(r.document_id)||i.set(r.document_id,[]),i.get(r.document_id).push(r);let s=j(o.map(r=>r.symbol_id)).flatMap(r=>e.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 (${r.map(()=>"?").join(",")})
34
+ GROUP BY m.symbol_id
35
+ ) def_chunk ON def_chunk.symbol_id = gs.id
36
+ WHERE gs.id IN (${r.map(()=>"?").join(",")})`,...r,...r)),l=j([...n.map(r=>r.documentId),...s.flatMap(r=>r.document_id===null?[]:[r.document_id])]),c=new Map(l.flatMap(r=>e.all(`SELECT id, relative_path FROM documents
37
+ WHERE id IN (${r.map(()=>"?").join(",")})`,...r).map(u=>[u.id,u.relative_path]))),m=new Map;for(let r of s)m.has(r.symbol_id)||m.set(r.symbol_id,{symbol:r.symbol,file:r.document_id!==null?c.get(r.document_id)??"":""});let d=new Map,f=c,R=Oe(n);for(let[r,u]of R){let g=[...i.get(r)??[]].sort((p,h)=>p.start_line-h.start_line||p.end_line-h.end_line),D=[...u].sort((p,h)=>p.startLine-h.startLine||p.endLine-h.endLine),M=new Set,S=0;for(let p of D){for(;S<g.length&&g[S].start_line<=p.endLine;)M.add(g[S]),S+=1;for(let y of M)y.end_line<p.startLine&&M.delete(y);let h=new Set,$=[],F=null,Se=()=>{if(F)return F;let y=f.get(p.documentId)??"",C=new Set;if(y){let O=oe(e,y),k=Math.max(0,p.startLine),G=Math.min(O.length-1,p.endLine);for(let _=k;_<=G;_+=1)for(let he of O[_])C.add(he)}return F=C,C};for(let y of M){if(y.symbol_id===p.symbolId)continue;let C=m.get(y.symbol_id);if(!C)continue;if(!(y.start_line>=p.startLine&&y.end_line<=p.endLine)){if(!(y.start_line<=p.endLine&&y.end_line>=p.startLine))continue;let _=E(C.symbol);if(!_||!Se().has(_))continue}let k=`${C.symbol}|${y.chunk_id}`;h.has(k)||(h.add(k),$.push({...C,chunkId:y.chunk_id,source:"scip-chunk"}))}d.set(p.symbolId,$)}}return d}var pe=500;function j(e){let n=[...new Set(e)],t=[];for(let o=0;o<n.length;o+=pe)t.push(n.slice(o,o+pe));return t}function Oe(e){let n=new Map;for(let t of e){let o=n.get(t.documentId);o?o.push(t):n.set(t.documentId,[t])}return n}function Pe(e){let n=new Map;for(let[t,o]of e){let i=[];for(let a of o)i.push({symbol:a.symbol,file:a.file,chunkId:-1,source:"semantic-callee"});n.set(t,i)}return n}function ge(e,n,t={}){let o=new Map;if(n&&n.length===0)return o;let i=Q(e,{includeIgnored:!1}),a=x(e),s=n??v(e),l=new Set(s.map(m=>m.symbolId)),c=Be(s);return Te(e,o,i,a,l,c),je(e,o,s,l),Ke(e,o,i,a,l,c),t.semantic!==!1&&We(o,re(e,Je(s))),o}function Te(e,n,t,o,i,a){for(let s of t){if(!I(s))continue;let l=w(e,s);if(l)for(let c of l){if(a&&!a.has(c.calleeLeaf))continue;let m=A(s,o.get(c.calleeLeaf)??[]);if(!m||m.length===0)continue;let d=N(e,s,m,c.memberAccess);d&&i.has(d.symbolId)&&d.file!==s&&H(n,d.symbolId,s)}}}function je(e,n,t,o){let i=$e(t);for(let a of He(e,o))e.isIgnored(a.relative_path)||Ge(a,i.get(a.symbol_id))||H(n,a.symbol_id,a.relative_path)}function He(e,n){return ie(e,n?[...n]:void 0)}function $e(e){let n=new Map;for(let t of e)n.set(t.symbolId,{docId:t.documentId,startLine:t.startLine,endLine:t.endLine});return n}function Ge(e,n){return!!n&&n.docId===e.document_id&&e.chunk_start>=n.startLine&&e.chunk_end<=n.endLine}function Ke(e,n,t,o,i,a){for(let s of t){if(I(s)!=="rust")continue;let l=Y(e,s,{includeRustAttributeNames:!0});if(l.length!==0)for(let{name:c}of l){if(a&&!a.has(c))continue;let m=o.get(c);if(m)for(let d of m)i.has(d.symbolId)&&d.file!==s&&H(n,d.symbolId,s)}}}function H(e,n,t){let o=e.get(n);o||(o=new Set,e.set(n,o)),o.add(t)}function Be(e){let n=new Set;for(let t of e){let o="leaf"in t&&typeof t.leaf=="string"?t.leaf:"symbol"in t&&typeof t.symbol=="string"?E(t.symbol):"";o&&n.add(o)}return n.size>0?n:null}function Je(e){return e.filter(n=>"relativePath"in n&&"symbol"in n&&"leaf"in n)}function We(e,n){for(let[t,o]of n){let i=e.get(t);i||(i=new Set,e.set(t,i));for(let a of o)i.add(a)}}function Ln(e,n,t={}){return be(e,n,t)}function Ve(e,n,t={}){return ge(e,n,t)}function Qe(e,n,t={}){return me(e,n,t)}function wn(e,n,t={}){let o=Ve(e,n,{semantic:t.semantic});return t.sourceFallback===!1?o:Ue(o,Qe(e,n))}function Ue(e,n){let t=new Map;for(let[o,i]of e)t.set(o,new Set(i));for(let[o,i]of n){let a=t.get(o)??new Set;for(let s of i)a.add(s);t.set(o,a)}return t}export{un as a,ye as b,Ln as c,Ve as d,Qe as e,wn as f,Ue as g};
38
+ //# sourceMappingURL=chunk-72MFTCU5.js.map
@@ -0,0 +1,2 @@
1
+ import{a as m,b as d}from"./chunk-QZ4JVECJ.js";import{a as u}from"./chunk-T2FQ4GHD.js";import{A as g,x as f}from"./chunk-ISLWJ4PY.js";import{p as l}from"./chunk-WS3Z6W3M.js";import{readFileSync as E,readdirSync as h}from"fs";import{basename as k,join as c}from"path";function S(t,e,r={}){let a=new Set(t),n=new Set(e),o=[...n].filter(i=>!a.has(i)).sort(),s=r.allowExtra?[]:[...a].filter(i=>!n.has(i)).sort();return{missing:o,extra:s}}function b(t,e){let r=N(t,e.file,e.keys);if(!r.ok)return{name:e.name,file:e.file,status:"unavailable",missing:[],extra:[],unavailableReason:r.reason};let a=L(t.config.projectRoot,e.mustEqual),n=S(r.keys,a,{allowExtra:e.allowExtra??!1}),o=n.missing.length>0||n.extra.length>0?"violated":"ok";return{name:e.name,file:e.file,status:o,missing:n.missing,extra:n.extra}}function O(t,e){return e.map(r=>b(t,r))}function G(t,e){if(e.has(t.file))return!0;let r=t.mustEqual;switch(r.type){case"top-level-dirs":return[...e].some(a=>a===r.path||a.startsWith(`${r.path}/`));case"file-glob":return[...e].some(a=>m(r.pattern,a));case"registered-commands":return e.has("docs/COMMAND_REFERENCE.md");case"builtin-skills":return[...e].some(a=>a.startsWith("skills/"))}}function I(t){if(t.status==="unavailable")return`[coverage-contract] ${t.name}: DISCLOSED \u2014 could not evaluate (${t.unavailableReason})`;let e=[];return t.missing.length>0&&e.push(`missing ${t.missing.join(", ")}`),t.extra.length>0&&e.push(`extra ${t.extra.join(", ")}`),`[coverage-contract] ${t.name}: ${e.join("; ")}`}function N(t,e,r){return r.type==="markdown-list"?T(t,e,r.marker):R(t,e,r)}function R(t,e,r){if(!l(t,e))return{ok:!1,reason:`file not found: ${e}`};let n=f(e);if(!n)return{ok:!1,reason:`unsupported file type for ${r.type} extraction: ${e}`};let o=g(t,e);if(!o)return{ok:!1,reason:`tree-sitter parser unavailable for ${n} (${e}) \u2014 contract skipped, not silently passed`,disclosedUnavailable:{language:n,reason:"parser-unavailable"}};let s=r.type==="object-literal-keys"?D(o,r.identifier):w(o,r.identifier);return s===null?{ok:!1,reason:`no ${r.type==="object-literal-keys"?"object literal":"string array"} named "${r.identifier}" found in ${e}`}:{ok:!0,keys:s}}function y(t){let e=t.childForFieldName("value");return e?e.type==="as_expression"||e.type==="satisfies_expression"?e.namedChild(0):e:null}function D(t,e){for(let r of t.rootNode.descendantsOfType("variable_declarator")){if(r.childForFieldName("name")?.text!==e)continue;let n=y(r);if(n?.type==="object")return $(n)}return null}function $(t){let e=new Set;for(let r of t.namedChildren)if(r.type==="pair"){let a=r.childForFieldName("key");a&&e.add(C(a.text))}else r.type==="shorthand_property_identifier"&&e.add(r.text);return[...e].sort()}function w(t,e){for(let r of t.rootNode.descendantsOfType("variable_declarator")){if(r.childForFieldName("name")?.text!==e)continue;let n=y(r);if(n?.type!=="array")continue;let o=new Set;for(let s of n.namedChildren)s.type==="string"&&o.add(C(s.text));return[...o].sort()}return null}function C(t){return t.length>=2&&(t[0]==="'"&&t.endsWith("'")||t[0]==='"'&&t.endsWith('"'))?t.slice(1,-1):t}function T(t,e,r){let a=l(t,e);if(!a)return{ok:!1,reason:`file not found: ${e}`};let n=v(a,r);return n===null?{ok:!1,reason:`no <!-- BEGIN GENERATED ${r} --> ... <!-- END GENERATED ${r} --> block in ${e}`}:{ok:!0,keys:x(n)}}function v(t,e){let r=u(e),n=new RegExp(`<!--\\s*BEGIN GENERATED ${r}\\s*-->([\\s\\S]*?)<!--\\s*END GENERATED ${r}\\s*-->`).exec(t);return n?n[1]:null}function x(t){let e=new Set;for(let r of t.matchAll(/`([a-z][a-z0-9-]*)`/g))e.add(r[1]);for(let r of t.matchAll(/\[([a-z][a-z0-9-]*)\]\([^)]*\)/g))e.add(r[1]);return[...e].sort()}function L(t,e){switch(e.type){case"top-level-dirs":return p(c(t,e.path));case"file-glob":return[...new Set(d(t,e.pattern).map(r=>k(r)))].sort();case"registered-commands":return A(t);case"builtin-skills":return p(c(t,"skills"))}}function p(t){let e;try{e=h(t,{withFileTypes:!0})}catch{return[]}return e.filter(r=>r.isDirectory()&&!r.name.startsWith(".")).map(r=>r.name).sort()}function A(t){let e;try{e=E(c(t,"docs/COMMAND_REFERENCE.md"),"utf-8")}catch{return[]}let r=v(e,"COMMAND REFERENCE");return r?x(r):[]}var z={dead:{minLoc:3,skipBarrels:!0,deadCodeOnly:!0,semantic:!1},isolated:{minLoc:3,semantic:!1},similar:{minSimilarity:.6,limit:50,minCallees:4,semantic:!1},duplicateBodies:{maxLoc:15,limit:50},extract:{minLoc:15,minCallees:5,limit:50,semantic:!1},wrappers:{maxLoc:15,limit:50,semantic:!1},passthroughs:{maxLoc:15,limit:50,semantic:!1},stale:{minLoc:3,limit:50,semantic:!1},drift:{semantic:!1},twinDrift:{minSimilarity:.3}};export{b as a,O as b,G as c,I as d,z as e};
2
+ //# sourceMappingURL=chunk-75X52JTA.js.map
@@ -1,4 +1,4 @@
1
- import{b as m}from"./chunk-OFXN2BCT.js";import{k as o}from"./chunk-63CI3IXR.js";function h(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
1
+ import{b as m}from"./chunk-OSWF3HSF.js";import{k as o}from"./chunk-MBKJ7GHT.js";function h(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
2
2
  WHERE relative_path IN (${d})
3
3
  ORDER BY relative_path`,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e)),n=o(t,i,{onlyDocumented:!0,sort:!0}).map(({relativePath:e,...c})=>c),a=t.all(`SELECT DISTINCT d2.relative_path
4
4
  FROM mentions m
@@ -32,4 +32,4 @@ import{b as m}from"./chunk-OFXN2BCT.js";import{k as o}from"./chunk-63CI3IXR.js";
32
32
  WHERE d2.relative_path IN (${d})
33
33
  AND d1.relative_path NOT IN (${d})
34
34
  ORDER BY d1.relative_path`,...s,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e));return{files:i,symbols:n,dependsOn:a,dependedOnBy:r}}export{h as a};
35
- //# sourceMappingURL=chunk-LEHVP4DY.js.map
35
+ //# sourceMappingURL=chunk-7ITCOJGD.js.map
@@ -0,0 +1,2 @@
1
+ import{d}from"./chunk-6XA4LDHY.js";import{F as p}from"./chunk-ISLWJ4PY.js";function y(t,e={}){let{minTotalLines:i=800,minTemplateLines:n=300,minScriptLines:r=300,minStyleLines:u=500,limit:o=20,scope:a,scanLimit:l,filePattern:m}=e;return p(t).vueProfiles({scope:a,scanLimit:l}).filter(s=>!m||s.file.includes(m)).map(s=>L(s,{minTotalLines:i,minTemplateLines:n,minScriptLines:r,minStyleLines:u})).filter(s=>s!==null).sort((s,c)=>c.totalLines-s.totalLines||s.file.localeCompare(c.file)).slice(0,o)}function L(t,e){let i=d(t,b(e),"total"),{reasons:n}=i;if(n.length===0)return null;let r=i.dominantPressure,u=i.pressureKinds.includes("total")?[...new Set([...i.pressureKinds,r])]:i.pressureKinds,o=g(t.file),a=x(r,o),l=t.totalLines+t.delegatedComposableLines;return{file:t.file,totalLines:l,sfcLines:t.sfcLines,templateLines:t.templateLines,scriptLines:t.scriptLines,styleLines:t.styleLines,externalScriptLines:t.externalScriptLines,externalScriptPaths:t.externalScriptPaths,customBlockLines:t.customBlockLines,delegatedComposableLines:t.delegatedComposableLines,delegatedComposablePaths:t.delegatedComposablePaths,dominantPressure:r,pressureKinds:u,contextKind:o,recommendationKind:a,recommendation:f(a,o),reasons:n,loc:l}}function b(t){return[{axis:"total",value:e=>e.totalLines+e.delegatedComposableLines,qualifies:(e,i)=>i>=t.minTotalLines,reason:(e,i)=>e.delegatedComposableLines>0?`${i} total line(s) (${e.totalLines} component + ${e.delegatedComposableLines} delegated composable line(s) across ${e.delegatedComposablePaths.length} file(s))`:`${i} total component line(s)`,dominantEligible:!1},{axis:"template",value:e=>e.templateLines,qualifies:(e,i)=>i>=t.minTemplateLines,reason:(e,i)=>`${i} template line(s)`},{axis:"script",value:e=>e.scriptLines-e.externalScriptLines,qualifies:e=>e.scriptLines>=t.minScriptLines,reason:e=>`${e.scriptLines} script line(s)`},{axis:"style",value:e=>e.styleLines,qualifies:(e,i)=>i>=t.minStyleLines,reason:(e,i)=>`${i} style line(s)`},{axis:"external-script",value:e=>e.externalScriptLines,qualifies:(e,i)=>i>=t.minScriptLines},{axis:"custom-block",value:e=>e.customBlockLines,qualifies:()=>!1}]}function g(t){return t.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).some(n=>w.has(n))||/(?:view|page|route)\.vue$/i.test(t)||/(?:^|\/)(views|pages|routes)\//i.test(t)?"route-page":"component"}function x(t,e){return t==="style"?"style-decomposition":t==="template"?"template-decomposition":t==="external-script"?"external-script-boundary":t==="custom-block"?"custom-block-review":e==="route-page"?"route-page-decomposition":t==="script"?"script-behavior-extraction":"total-size-review"}function f(t,e){switch(t){case"template-decomposition":return e==="route-page"?"Split route template sections into named panels before extracting script behavior.":"Split repeated template sections into named presentational components.";case"script-behavior-extraction":return"Extract independent script behavior into composables, controllers, or feature modules.";case"style-decomposition":return"Review UI/style decomposition; move repeated styling to component or style primitives, not composables.";case"external-script-boundary":return"Review the external script boundary and split controller/composable modules by workflow.";case"custom-block-review":return"Review custom block ownership before splitting template or script code.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"total-size-review":return"Review the largest block first, then split by the dominant reason to change."}}var w=new Set(["landing","page","pages","route","routes","view","views"]);export{y as a};
2
+ //# sourceMappingURL=chunk-7JZRFDCU.js.map
@@ -1,4 +1,4 @@
1
- import{a as M}from"./chunk-L446VQYQ.js";import{a as I,b as N}from"./chunk-NBNEVLRC.js";import{f as g,m as S}from"./chunk-63CI3IXR.js";import{d as b,f as p}from"./chunk-NABVR6B7.js";import{e as h}from"./chunk-SA3DPTHT.js";function $(o,s,i={}){let{maxDepth:c=5,scope:a}=i,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let r=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&r.push(n.symbolMatch)}t=r}return u.sort((e,r)=>e.depth-r.depth||e.file.localeCompare(r.file)),u}function D(o,s,i){let c=M(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!i||t.file.includes(i)),a=new Set(c.map(t=>t.file)),l=[];for(let t of _(o,s,i)){if(a.has(t))continue;let e=g(o,t),r=e.length>0?S(e,e[0].startLine):null;l.push({symbol:r?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=N(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:b(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!w(e))continue;let r=`${e.symbolId}|${e.relativePath}`;m.has(r)||(m.add(r),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function _(o,s,i){let c=i?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return i&&a.push(`%${i}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
1
+ import{c as M}from"./chunk-72MFTCU5.js";import{a as I,c as N}from"./chunk-ECVXWZ4Q.js";import{f as g,m as S}from"./chunk-MBKJ7GHT.js";import{d as b,f as p}from"./chunk-HXXMPYEF.js";import{x as h}from"./chunk-ISLWJ4PY.js";function $(o,s,i={}){let{maxDepth:c=5,scope:a}=i,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let r=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&r.push(n.symbolMatch)}t=r}return u.sort((e,r)=>e.depth-r.depth||e.file.localeCompare(r.file)),u}function D(o,s,i){let c=M(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!i||t.file.includes(i)),a=new Set(c.map(t=>t.file)),l=[];for(let t of _(o,s,i)){if(a.has(t))continue;let e=g(o,t),r=e.length>0?S(e,e[0].startLine):null;l.push({symbol:r?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=N(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:b(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!w(e))continue;let r=`${e.symbolId}|${e.relativePath}`;m.has(r)||(m.add(r),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function _(o,s,i){let c=i?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return i&&a.push(`%${i}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents consumer_d ON consumer_d.id = c.document_id
@@ -7,4 +7,4 @@ import{a as M}from"./chunk-L446VQYQ.js";import{a as I,b as N}from"./chunk-NBNEVL
7
7
  AND c.document_id != ?
8
8
  ${o.pathExclusionsFor("consumer_d")}
9
9
  ${c}`,...a).map(l=>l.relative_path).filter(l=>!o.isIgnored(l)))}function w(o){if(o.symbol.startsWith("scip-clojure ")||h(o.relativePath)==="clojure")return!0;let s=p(o.symbol);return s==="method"||s==="type"||o.symbol.endsWith("().")}export{$ as a};
10
- //# sourceMappingURL=chunk-XRUGSM76.js.map
10
+ //# sourceMappingURL=chunk-AZLKLZ5S.js.map
@@ -0,0 +1,26 @@
1
+ import{c as d}from"./chunk-72MFTCU5.js";import{g as m}from"./chunk-MBKJ7GHT.js";import{d as r}from"./chunk-HXXMPYEF.js";function y(o,t={}){let{limit:i=30,scope:e}=t,s=e?"AND def_d.relative_path LIKE ?":"",f=e?[`%${e}%`]:[],l=o.all(`SELECT
2
+ gs.symbol,
3
+ COUNT(*) AS ref_count,
4
+ COUNT(DISTINCT ref_d.id) AS file_count,
5
+ def_d.relative_path AS defined_in
6
+ FROM mentions m
7
+ JOIN chunks c ON m.chunk_id = c.id
8
+ JOIN documents ref_d ON c.document_id = ref_d.id
9
+ JOIN global_symbols gs ON m.symbol_id = gs.id
10
+ JOIN (
11
+ SELECT m2.symbol_id, c2.document_id
12
+ FROM mentions m2
13
+ JOIN chunks c2 ON m2.chunk_id = c2.id
14
+ WHERE m2.role = 1
15
+ GROUP BY m2.symbol_id
16
+ ) sym_def ON sym_def.symbol_id = gs.id
17
+ JOIN documents def_d ON sym_def.document_id = def_d.id
18
+ WHERE m.role != 1
19
+ AND def_d.id != ref_d.id
20
+ ${o.pathExclusionsFor("def_d")}
21
+ ${o.symbolNoiseFor("gs")}
22
+ ${s}
23
+ GROUP BY gs.id
24
+ ORDER BY ref_count DESC
25
+ LIMIT ?`,...f,i).filter(n=>!o.isIgnored(n.defined_in)).map(n=>({symbol:n.symbol,shortName:r(n.symbol),refCount:n.ref_count,fileCount:n.file_count,definedIn:n.defined_in}));return l.length>0?l:c(o,e,i)}function c(o,t,i){return m(o,{scope:t}).filter(e=>!o.isIgnored(e.relativePath)).map(e=>u(o,e)).filter(e=>e.refCount>0).sort((e,s)=>s.refCount-e.refCount||s.fileCount-e.fileCount).slice(0,i)}function u(o,t){let e=d(o,t,{limit:500}).filter(s=>s.file!==t.relativePath);return{symbol:t.symbol,shortName:r(t.symbol),refCount:e.length,fileCount:new Set(e.map(s=>s.file)).size,definedIn:t.relativePath}}export{y as a};
26
+ //# sourceMappingURL=chunk-B4VYXRCQ.js.map
@@ -0,0 +1,5 @@
1
+ import{a as ie,b as N,e as V,f as j,g as E,h as te,i as re}from"./chunk-KMVGRIO2.js";import{b as _}from"./chunk-B75HZHUP.js";import{a as q}from"./chunk-UAHZ57BR.js";import{a as ne}from"./chunk-72MFTCU5.js";import{a as D}from"./chunk-ECVXWZ4Q.js";import{d as I,e as K,h as $}from"./chunk-HXXMPYEF.js";import{a as B}from"./chunk-T2FQ4GHD.js";import{b as J,k as A,l as y,m as Q,o as ee,p as U,q as H}from"./chunk-WS3Z6W3M.js";import{a as Y}from"./chunk-64MNV6AB.js";import{d as z}from"./chunk-7S5E7KWT.js";function Ie(e,n,t={}){let{minSimilarity:i=.4,limit:r=20}=t,s=Ee(e,n,{semantic:t.semantic!==!1});if(!s)return[];if(!$(s.symbol))return[];if(s.callees.size===0)return se(e,n,{minSimilarity:i,limit:r,scanLimit:t.scanLimit,candidateMode:t.sourceCandidateMode??"full"});let a=we(e,s,i,{scanLimit:t.scanLimit,semantic:t.semantic!==!1});return a.length>0?a.slice(0,r):se(e,n,{minSimilarity:i,limit:r,scanLimit:t.scanLimit,candidateMode:t.sourceCandidateMode??"full"})}function vn(e,n,t,i={}){let r=D(e,n),s=D(e,t);if(!r||!s)return null;let a=Ie(e,r.symbol,{minSimilarity:0,limit:Number.POSITIVE_INFINITY,semantic:i.semantic,scanLimit:i.scanLimit}).find(m=>m.symbolB===s.symbol||m.symbolA===s.symbol);if(!a)return null;let l=r.endLine-r.startLine+1,c=s.endLine-s.startLine+1;return{symbolA:{symbol:r.symbol,shortName:I(r.symbol),file:r.relativePath,loc:l},symbolB:{symbol:s.symbol,shortName:I(s.symbol),file:s.relativePath,loc:c},similarity:a.similarity,similarityBasis:a.similarityBasis??"callees",sharedEvidence:a.sharedCallees,uniqueToA:a.uniqueToA,uniqueToB:a.uniqueToB,evidenceClass:a.evidenceClass,actionTier:a.actionTier,recommendation:a.recommendation,consolidationStrategy:ve(a)}}function ve(e){let n=e.similarityBasis==="source-tokens"?"source-token":"tracked callee";return e.sharedCallees.length===0?`No shared ${n} evidence survived similar's weighting. Inspect the source before attempting consolidation.`:e.uniqueToA.length===0&&e.uniqueToB.length===0?`The functions have identical ${n} evidence under similar's weighting. Verify signatures, guards, and return values before consolidating.`:e.uniqueToA.length===0?`A's ${n} evidence is a subset of B's. B may subsume part of A's structure, but verify signatures, guards, and non-call logic first.`:e.uniqueToB.length===0?`B's ${n} evidence is a subset of A's. A may subsume part of B's structure, but verify signatures, guards, and non-call logic first.`:e.uniqueToA.length<=2&&e.uniqueToB.length<=2?`Create a shared helper around the ${e.sharedCallees.length} shared ${n}(s). Pass the ${e.uniqueToA.length+e.uniqueToB.length} divergent point(s) as parameters or callbacks.`:`Extract the ${e.sharedCallees.length} shared ${n}(s) into a common helper. Keep each function's unique logic outside that helper (${e.uniqueToA.length} item(s) in A, ${e.uniqueToB.length} in B).`}function we(e,n,t,i){let r=G(e).calleeIndex({minCallees:3,scanLimit:i.scanLimit,semantic:i.semantic}),s=_e(n,r.corpus),a=Pe(s,r),l=Me(s,r),c=j(l),m=E(s.callees,l),g=[];for(let f of a){if(f.callees.size<3)continue;let o=E(f.callees,l),u=ce(s,f,l,{minSimilarity:t,requireSignificantShared:1,requireSharedCount:0,medianIdf:c,magnitudeA:m,magnitudeB:o});u&&g.push(u)}return g.sort((f,o)=>o.similarity-f.similarity),g}function Me(e,n){let t=new Map(n.docFreq);for(let i of e.callees)t.set(i,(t.get(i)??0)+1);return V(t,n.corpus.length+1)}function ce(e,n,t,i){let r=Le(e,n,t,i);if(!Re(r,i))return null;let{similarity:s,significantShared:a,trivialShared:l}=r,c=a.length>0?a:l,m=pe(c,"callees");return{symbolA:e.symbol,shortNameA:I(e.symbol),fileA:e.file,symbolB:n.symbol,shortNameB:I(n.symbol),fileB:n.file,similarity:s,similarityBasis:"callees",sharedCallees:c.map(I),uniqueToA:[...N(e.callees,n.callees)].map(I),uniqueToB:[...N(n.callees,e.callees)].map(I),...m}}function Te(e,n,t,i){let r=i.magnitudeA??E(e.callees,t),s=i.magnitudeB??E(n.callees,t),a=0,l=0,c=0,m=i.medianIdf??j(t);for(let o of e.callees){if(!n.callees.has(o))continue;let u=t.get(o)??0;a+=u*u,c+=1,u>=m&&(l+=1)}if(c===0)return!1;let g=r*s;return(g>0?a/g:0)<i.minSimilarity?!1:l>=i.requireSignificantShared||c>=i.requireSharedCount}function Le(e,n,t,i){return i.magnitudeA===void 0||i.magnitudeB===void 0?te(e.callees,n.callees,t,{medianIdf:i.medianIdf}):re(e.callees,n.callees,t,{medianIdf:i.medianIdf,magnitudeA:i.magnitudeA,magnitudeB:i.magnitudeB})}function Re(e,n){if(e.similarity<n.minSimilarity)return!1;let t=e.significantShared.length+e.trivialShared.length;return e.significantShared.length>=n.requireSignificantShared||t>=n.requireSharedCount}function wn(e,n={}){let{minSimilarity:t=.5,limit:i=20,scope:r,minCallees:s=4,crossFileOnly:a=!1,scanLimit:l}=n,c=n.semantic!==!1,m=A(),g=0,f=0,o=0,u=0,d=0,p=0,S=0;return y("similar.all",()=>{let b=G(e).calleeIndex({minCallees:s,scope:r,scanLimit:l,semantic:c}),C=b.corpus;g=C.length;let v=n.focusFiles,k=[],P=0;return y("similar.all.pair-scan",()=>{for(let x=0;x<C.length;x+=1){let F=C[x],T=v?.has(F.file)??!1,w=b.weightedMagnitudes[x],M=new Set;for(let O of F.callees){let L=b.candidateIndexesByCallee.get(O);if(L)for(let R of L)R<=x||v&&!T&&!v.has(C[R].file)||M.add(R)}m&&(o+=M.size,M.size>0&&(f+=1));for(let O of M){let L=C[O];if(a&&F.file===L.file){m&&(d+=1);continue}if(ue(F,L)){m&&(p+=1);continue}m&&(u+=1);let R=ce(F,L,b.idfWeights,{minSimilarity:t,requireSignificantShared:2,requireSharedCount:4,medianIdf:b.medianIdf,magnitudeA:w,magnitudeB:b.weightedMagnitudes[O]});R&&(Ae(k,R,i,P),m&&(S+=1),P+=1)}}},()=>({corpusSize:g,candidateSets:f,candidatePairs:o,comparedPairs:u,crossFileSkips:d,signatureSkips:p,insertedResults:S,topResults:k.length})),y("similar.all.sort-project",()=>(k.sort((x,F)=>F.result.similarity-x.result.similarity||x.order-F.order),k.map(x=>x.result)),()=>({topResults:k.length}))},()=>({minSimilarity:t,limit:i,scope:r,minCallees:s,crossFileOnly:a,scanLimit:l,semantic:c,corpusSize:g,candidateSets:f,candidatePairs:o,comparedPairs:u,crossFileSkips:d,signatureSkips:p,insertedResults:S}))}function Mn(e,n={}){let{minSimilarity:t=.5,scope:i,minCallees:r=4,crossFileOnly:s=!1,scanLimit:a}=n,l=n.semantic!==!1,c=A(),m=0,g=0,f=0,o=0,u=0,d=0,p=0;return y("similar.all-count",()=>{let h=G(e).calleeIndex({minCallees:r,scope:i,scanLimit:a,semantic:l}),b=h.corpus;m=b.length;let C=n.focusFiles;return y("similar.all-count.pair-scan",()=>{for(let v=0;v<b.length;v+=1){let k=b[v],P=C?.has(k.file)??!1,x=h.weightedMagnitudes[v],F=new Set;for(let T of k.callees){let w=h.candidateIndexesByCallee.get(T);if(w)for(let M of w)M<=v||C&&!P&&!C.has(b[M].file)||F.add(M)}c&&(f+=F.size,F.size>0&&(g+=1));for(let T of F){let w=b[T];if(s&&k.file===w.file){c&&(u+=1);continue}if(ue(k,w)){c&&(d+=1);continue}c&&(o+=1),Te(k,w,h.idfWeights,{minSimilarity:t,requireSignificantShared:2,requireSharedCount:4,medianIdf:h.medianIdf,magnitudeA:x,magnitudeB:h.weightedMagnitudes[T]})&&(p+=1)}}},()=>({corpusSize:m,candidateSets:g,candidatePairs:f,comparedPairs:o,crossFileSkips:u,signatureSkips:d,insertedResults:p})),p},()=>({minSimilarity:t,scope:i,minCallees:r,crossFileOnly:s,scanLimit:a,semantic:l,corpusSize:m,candidateSets:g,candidatePairs:f,comparedPairs:o,crossFileSkips:u,signatureSkips:d,insertedResults:p}))}function ue(e,n){if(e.paramCount<0||n.paramCount<0)return!1;let t=Math.abs(e.paramCount-n.paramCount),i=Math.max(2,Math.ceil(Math.max(e.paramCount,n.paramCount)*.5));return t>i}var me=Q({kind:"source-fingerprints",invalidation:ee("source-fingerprints"),serialize:ln,deserialize:on});function Ae(e,n,t,i){if(t<=0)return;if(e.length<t){e.push({result:n,order:i});return}let r=0;for(let a=1;a<e.length;a+=1){let l=e[a],c=e[r];(l.result.similarity<c.result.similarity||l.result.similarity===c.result.similarity&&l.order>c.order)&&(r=a)}let s=e[r];n.similarity<=s.result.similarity||(e[r]={result:n,order:i})}var Be=["ScipDatabase#all","ScipDatabase#get","ScipDatabase#prepare","ScipDatabase#pathExclusionsFor","ScipDatabase#isIgnored","ScipDatabase#symbolNoiseFor","PerDbValue#get","PerDbValue#has",":storage:db:ScipDatabase:all",":storage:db:ScipDatabase:get",":storage:db:ScipDatabase:prepare",":storage:db:ScipDatabase:pathExclusionsFor",":storage:db:ScipDatabase:isIgnored",":storage:db:ScipDatabase:symbolNoiseFor",":storage:per-db-cache:PerDbValue:get",":storage:per-db-cache:PerDbValue:has"];function Ee(e,n,t){let i=D(e,n);if(!i||!$(i.symbol))return null;let r=new q(e),s=ne(e,i,{semantic:t.semantic});return{symbol:i.symbol,file:i.relativePath,callees:ge(s.map(a=>a.symbol)),paramCount:r.callableSignature(i)?.paramCount??-1}}var ze=z("callee-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]}),De=z("callee-fingerprint-index",{clearGroups:["whole-project","definition-catalog"]});function de(e,n){let{minCallees:t,scope:i,excludeSymbol:r,scanLimit:s}=n,a=n.semantic!==!1,l=ze.get(e,()=>new Map),c=`${t}|${i??""}|${s??""}|${a}`,m=!0,g=0,f=0;return y("similar.callee-fingerprints.resolve",()=>{let o=l.get(c);if(m=o!==void 0,o||(o=Oe(e,{minCallees:t,scope:i,scanLimit:s,semantic:a}),l.set(c,o)),g=o.length,r===void 0)return o;let u=o.filter(d=>d.symbol!==r);return f=o.length-u.length,u},()=>({minCallees:t,scope:i,scanLimit:s,semantic:a,cacheHit:m,corpusSize:g,excludeSymbol:r!==void 0,excludedSymbols:f}))}function qe(e,n){let{minCallees:t,scope:i,scanLimit:r}=n,s=n.semantic!==!1,a=De.get(e,()=>new Map),l=`${t}|${i??""}|${r??""}|${s}`,c=!0,m=0,g=0,f=0;return y("similar.callee-index.resolve",()=>{let o=a.get(l);return c=o!==void 0,o||(o=Ne(de(e,{minCallees:t,scope:i,scanLimit:r,semantic:s})),a.set(l,o)),m=o.corpus.length,g=o.docFreq.size,f=o.candidateIndexesByCallee.size,o},()=>({minCallees:t,scope:i,scanLimit:r,semantic:s,cacheHit:c,corpusSize:m,indexedCallees:g,candidateBuckets:f}))}function G(e){return{calleeCorpus:n=>de(e,n),calleeIndex:n=>qe(e,n),sourceCorpus:(n={})=>Ce(e,n),sourceIndex:(n={})=>le(e,n),sourceCandidates:(n,t)=>(t.candidateMode??"full")==="target-pruned"?Ye(e,n,{minSimilarity:t.minSimilarity,scanLimit:t.scanLimit}):Je(n,le(e,{scanLimit:t.scanLimit}))}}function Ne(e){let n=A(),t=0,i=y("similar.callee-index.doc-frequency",()=>{let o=new Map;for(let u of e)for(let d of u.callees)o.set(d,(o.get(d)??0)+1);return t=o.size,o},()=>({corpusSize:e.length,uniqueCallees:t})),r=Math.max(8,Math.ceil(Math.sqrt(e.length))),s=y("similar.callee-index.idf-weights",()=>V(i,e.length),()=>({corpusSize:e.length,uniqueCallees:i.size})),a=y("similar.callee-index.weighted-magnitudes",()=>e.map(o=>E(o.callees,s)),()=>({corpusSize:e.length})),l=0,c=0,m=0,g=y("similar.callee-index.candidate-buckets",()=>{let o=new Map;for(let u=0;u<e.length;u+=1){let d=e[u];for(let p of d.callees){if((i.get(p)??0)>r){n&&(c+=1);continue}let S=o.get(p);S||(S=[],o.set(p,S)),S.push(u),n&&(l+=1)}}return n&&(m=o.size),o},()=>({corpusSize:e.length,buckets:m,candidateRefs:l,ubiquitousSkips:c,ubiquityThreshold:r})),f=y("similar.callee-index.median-idf",()=>j(s),()=>({uniqueCallees:s.size}));return{corpus:e,candidateIndexesByCallee:g,docFreq:i,idfWeights:s,weightedMagnitudes:a,medianIdf:f,ubiquityThreshold:r}}function Pe(e,n){let t=new Map;for(let i of e.callees)for(let r of n.candidateIndexesByCallee.get(i)??[]){let s=n.corpus[r];s.symbol!==e.symbol&&t.set(s.symbol,s)}return t.size>0?[...t.values()]:n.corpus.filter(i=>i.symbol!==e.symbol)}function Oe(e,n){let{minCallees:t,scope:i,scanLimit:r,semantic:s}=n,a=A(),l=new q(e),c=0,m=y("similar.callee-fingerprints.candidates",()=>{let p=_(l.productionCallableDefinitions({scope:i,minLoc:5,sortByLocDesc:typeof r=="number"&&r>0}),r);return c=p.length,p},()=>({scope:i,scanLimit:r,candidateCount:c})),g=0,f=y("similar.callee-fingerprints.callee-map",()=>{let p=l.calleeMap(m,{semantic:s});if(a)for(let S of p.values())g+=S.length;return p},()=>({candidateCount:c,semantic:s,calleeEdges:g})),o=0,u=0,d=0;return y("similar.callee-fingerprints.shape",()=>{let p=m.map(b=>({symbol:b.symbol,file:b.relativePath,callees:ge((f.get(b.symbolId)??[]).map(C=>C.symbol)),paramCount:l.callableSignature(b)?.paramCount??-1})),S=$e(p);a&&(d=S.filter((b,C)=>b.callees.size!==p[C].callees.size).length);let h=S.filter(b=>b.callees.size>=t);return o=h.length,a&&(u=h.reduce((b,C)=>b+C.callees.size,0)),h},()=>({candidateCount:c,fingerprintCount:o,retainedCalleeCount:u,minCallees:t,siblingSaturatedFingerprints:d}))}var fe=5;function $e(e){let n=new Map;for(let t of e){let i=n.get(t.file);i||(i=new Map,n.set(t.file,i));for(let r of t.callees)i.set(r,(i.get(r)??0)+1)}return e.map(t=>{let i=n.get(t.file);if(!i)return t;let r=[...t.callees].filter(a=>(i.get(a)??0)>=fe);if(r.length===0)return t;let s=new Set(t.callees);for(let a of r)s.delete(a);return{...t,callees:s}})}function _e(e,n){let t=new Map;for(let s of n)if(!(s.file!==e.file||s.symbol===e.symbol))for(let a of s.callees)t.set(a,(t.get(a)??0)+1);let i=[...e.callees].filter(s=>(t.get(s)??0)+1>=fe);if(i.length===0)return e;let r=new Set(e.callees);for(let s of i)r.delete(s);return{...e,callees:r}}function ge(e){return new Set([...e].filter(n=>!je(n)))}function je(e){return Be.some(n=>e.includes(n))}function se(e,n,t){let i=Ke(e,n);if(!i||i.tokens.size<3)return[];let r=t.minSimilarity>=.5?t.minSimilarity:.3,s=[],a=t.candidateMode??"full",l=0,c=0,m=0,g=0;return y("similar.source-shape",()=>{let o=G(e).sourceCandidates(i,{minSimilarity:r,scanLimit:t.scanLimit,candidateMode:a});l=o.length;for(let u of o){if(u.symbol===i.symbol||u.tokens.size<3)continue;c+=1;let d=ie(i.tokens,u.tokens);if(d.size<2){m+=1;continue}let p=new Set([...i.tokens,...u.tokens]),S=p.size>0?d.size/p.size:0;if(S<r){g+=1;continue}s.push({symbolA:i.symbol,shortNameA:I(i.symbol),fileA:i.file,symbolB:u.symbol,shortNameB:I(u.symbol),fileB:u.file,similarity:S,similarityBasis:"source-tokens",sharedCallees:[...d].sort(),uniqueToA:[...N(i.tokens,u.tokens)].sort(),uniqueToB:[...N(u.tokens,i.tokens)].sort(),...pe([...d],"source-tokens")})}return s.sort((u,d)=>d.similarity-u.similarity||u.shortNameB.localeCompare(d.shortNameB)),s.slice(0,t.limit)},()=>({symbol:i.symbol,file:i.file,targetTokens:i.tokens.size,candidateMode:a,candidates:l,comparedPairs:c,sharedSkips:m,similaritySkips:g,results:s.length}))}function pe(e,n){let t=e.flatMap(W),i=e.flatMap(S=>ae(S,n)),r=Z(t,Se),s=Z(t,be),a=Z(i,X),l=[...new Set(i.filter(oe))],c=e.filter(S=>{let h=ae(S,n);return h.some(b=>X.has(b))&&h.some(oe)}).length,m=[];r.length>0&&m.push(`access/query scaffolding: ${r.slice(0,5).join(", ")}`),s.length>0&&m.push(`framework/generic scaffolding: ${s.slice(0,5).join(", ")}`),a.length>0&&m.push(`domain behavior verbs: ${a.slice(0,5).join(", ")}`),a.length>0&&l.length>0&&m.push(`domain-specific terms: ${l.slice(0,5).join(", ")}`);let g=n==="source-tokens"&&t.length>0&&t.every(S=>ye.has(S));g&&m.push("shared source tokens are generic scaffolding");let f=a.length>0&&l.length>0,o=r.length+s.length>0,u=n==="callees"&&f&&e.length>=4&&l.length>=4&&c>=2,d=u?"domain-behavior":f?o?"mixed":"domain-behavior":r.length>0?"access-query-scaffolding":s.length>0||g?"framework-scaffolding":"structural-overlap";d==="structural-overlap"&&e.length>0&&m.push(`shared ${n} overlap has no recognized domain or scaffolding category`);let p=d==="domain-behavior"&&(e.length>=3||u)?"direct":"signal";return{evidenceClass:d,actionTier:p,evidenceClassReasons:m,recommendation:Ge(d,p)}}function Ge(e,n){return n==="direct"?"Shared domain behavior looks concrete; review for an extract/reuse opportunity.":e==="mixed"?"Shared evidence mixes domain behavior with scaffolding; review semantics before extracting anything.":e==="access-query-scaffolding"?"Shared evidence is mostly access/query scaffolding; compare product semantics before reusing code.":e==="structural-overlap"?"Shared structure has no domain or scaffolding classification; inspect names and behavior before reusing code.":"Shared evidence is mostly framework or generic scaffolding; treat as a contextual signal."}function Z(e,n){return[...new Set(e.filter(t=>n.has(t)))]}function W(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>1)}function ae(e,n){if(n==="source-tokens")return W(e);let t=K(e);return W(t.length>0?t:Ue(e))}function Ue(e){return e.replace(/[()`]/g," ").replace(/\.[a-z][a-z0-9]+(?=\s|$)/gi," ").split(/[:/\\\s]+/).map(i=>i.trim()).filter(i=>/[A-Za-z]/.test(i)).at(-1)?.replace(/\.$/,"")??e}function oe(e){return e.length>3&&!X.has(e)&&!Se.has(e)&&!be.has(e)&&!ye.has(e)&&!He.has(e)}var X=new Set(["archive","assign","book","cancel","create","delete","ensure","export","import","notify","persist","publish","restore","schedule","send","set","submit","sync","update","upload","validate","write"]),Se=new Set(["access","auth","authorize","cache","context","db","find","get","guard","list","permission","permissions","prisma","query","request","response","role","route","session","sql","where"]),be=new Set(["bytes","computed","crypto","describe","effect","expect","fetch","filter","hex","hook","json","map","mounted","on","promise","random","react","reduce","ref","render","state","test","token","trim","uuid","vue","watch"]),ye=new Set(["bytes","crypto","data","false","get","hex","id","key","map","name","num","random","result","secret","set","string","to","token","true","type","value"]),He=new Set(["best","backend","conflict","database","effect","effects","error","errors","frontend","found","helpers","javascript","module","modules","scip","shared","source","typescript","utils","with","workflow","workflows"]);function Ke(e,n){let t=D(e,n);if(!t||!$(t.symbol))return null;let i=Ve(e,t);return i?{symbol:t.symbol,file:t.relativePath,tokens:i}:null}function Ve(e,n){let t=K(n.symbol),i=rn(e,n.relativePath,n.startLine,n.endLine,t),r=ke(i,t);return r.size>0?r:null}var Ze=z("source-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]}),We=z("source-fingerprint-index",{clearGroups:["whole-project","definition-catalog"]});function he(e){return`${e.scanLimit??""}`}function Ce(e,n={}){let t=Ze.get(e,()=>new Map),i=he(n),r=t.get(i);return r||(r=tn(e,n),t.set(i,r)),r}function le(e,n={}){let t=We.get(e,()=>new Map),i=he(n),r=t.get(i);return r||(r=Xe(Ce(e,n)),t.set(i,r)),r}function Xe(e){let n=new Map;for(let r of e)for(let s of r.tokens)n.set(s,(n.get(s)??0)+1);let t=Math.max(8,Math.ceil(Math.sqrt(e.length))),i=new Map;for(let r of e)for(let s of r.tokens){if((n.get(s)??0)>t)continue;let a=i.get(s);a||(a=[],i.set(s,a)),a.push(r)}return{corpus:e,candidateByToken:i,docFreq:n,ubiquityThreshold:t}}function Je(e,n){let t=new Map;for(let i of e.tokens)for(let r of n.candidateByToken.get(i)??[])r.symbol!==e.symbol&&t.set(r.symbol,r);return t.size>0?[...t.values()]:n.corpus.filter(i=>i.symbol!==e.symbol)}function Ye(e,n,t){let i=A(),r=new q(e),s=Qe(n.tokens.size,t.minSimilarity),a=0,l=0,c=0,m=y("similar.source-shape.target-files",()=>{let d=[...n.tokens],p=[];for(let S of Y(e,{includeIgnored:!1})){a+=1;let h=U(e,S);h&&(l+=1,en(h,d,s)&&p.push(S))}return c=p.length,p},()=>({symbol:n.symbol,targetTokens:n.tokens.size,requiredSharedTokens:s,scannedFiles:a,readableFiles:l,candidateFiles:c})),g=0,f=y("similar.source-shape.target-definitions",()=>{let d=_(r.productionCallableDefinitions({files:m,sortByLocDesc:typeof t.scanLimit=="number"&&t.scanLimit>0}),t.scanLimit);return g=d.length,d},()=>({symbol:n.symbol,candidateFiles:c,scanLimit:t.scanLimit,definitionCount:g})),o=0;return y("similar.source-shape.target-fingerprints",()=>{let d=Fe(e,f);return i&&(o=d.length),d},()=>({symbol:n.symbol,definitionCount:g,fingerprintCount:o})).filter(d=>d.symbol!==n.symbol)}function Qe(e,n){return Math.max(2,Math.ceil(e*n))}function en(e,n,t){if(n.length<t)return!1;let i=e.toLowerCase(),r=0;for(let s of n)if(nn(i,s)&&(r+=1,r>=t))return!0;return!1}function nn(e,n){return n==="num"?/\b\d+\b/.test(e):e.includes(n)}function tn(e,n={}){let t=new q(e),{scanLimit:i}=n,r=_(t.productionCallableDefinitions({sortByLocDesc:typeof i=="number"&&i>0}),i);return Fe(e,r)}function Fe(e,n){let t=new Map;for(let r of n){let s=t.get(r.relativePath)??[];s.push(r),t.set(r.relativePath,s)}let i=new Map;for(let[r,s]of t){let a=U(e,r);if(!a)continue;let l=J(e,r,a),c=an(e,r,l),m=!1,g=null;for(let f of s){let o=sn(f),u=c.get(o),d=u?new Set(u.tokens):null;d||(g??=H(e,r),d=ke(xe(g,f.startLine,f.endLine,f.leaf),f.leaf),c.set(o,{key:o,symbol:f.symbol,startLine:f.startLine,endLine:f.endLine,leaf:f.leaf,tokens:[...d].sort()}),m=!0),d.size>0&&i.set(f.symbol,{symbol:f.symbol,file:f.relativePath,tokens:d})}m&&cn(e,r,l,c)}return n.map(r=>i.get(r.symbol)).filter(r=>!!r)}function rn(e,n,t,i,r){let s=H(e,n);return s.length===0?"":xe(s,t,i,r)}function xe(e,n,t,i){if(t>=n&&t-n<=12)return e.slice(n,t+1).join(`
2
+ `);let r=[new RegExp(`\\bdef\\s+${B(i)}\\b`),new RegExp(`\\bfun\\s+${B(i)}\\b`),new RegExp(`\\bfn\\s+${B(i)}\\b`),new RegExp(`\\bfunction\\s+${B(i)}\\b`),new RegExp(`\\b${B(i)}\\s*\\(`)],s=e.findIndex(a=>r.some(l=>l.test(a)));if(s>=0){let a=s;for(let l=s+1;l<e.length&&l<=s+8;l++){let c=e[l]??"";if(l>s&&mn(c)||(a=l,c.trim()===""&&l>s+1))break}return e.slice(s,a+1).join(`
3
+ `)}return e.slice(n,Math.min(e.length,n+8)).join(`
4
+ `)}function sn(e){return`${e.symbol}\0${e.startLine}\0${e.endLine}\0${e.leaf}`}function an(e,n,t){return me.read(e,n,t)??new Map}function on(e){try{let n=JSON.parse(e);if(!Array.isArray(n.entries))return null;let t=new Map;for(let i of n.entries){if(!i||typeof i.key!="string"||typeof i.symbol!="string"||typeof i.startLine!="number"||typeof i.endLine!="number"||typeof i.leaf!="string"||!Array.isArray(i.tokens)||!i.tokens.every(r=>typeof r=="string"))return null;t.set(i.key,i)}return t}catch{return null}}function ln(e){let n={entries:[...e.values()].sort((t,i)=>t.key.localeCompare(i.key))};return JSON.stringify(n)}function cn(e,n,t,i){me.write(e,n,t,new Map(i))}function ke(e,n){if(!e)return new Set;let t=new Set(["public","private","protected","final","static","class","def","fun","fn","function","return","string","bool","boolean","void","unit","self","this","new","const","let","var","end","pub"]),i=un(n),s=e.replace(/["'`]/g," ").replace(/\b\d+\b/g," NUM ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9_]+/g," ").replace(/_/g," ").toLowerCase().split(/\s+/).map(a=>a.trim()).filter(a=>a.length>1).filter(a=>!t.has(a)).filter(a=>!i.has(a));return new Set(s)}function un(e){return new Set(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9_]+|_/).map(n=>n.toLowerCase()).filter(n=>n.length>1))}function mn(e){return/^\s*(?:def|fun|fn|function|class|trait|module|object|enum|interface|public|private|protected)\b/.test(e)}export{Ie as a,vn as b,Me as c,ce as d,wn as e,Mn as f,Ae as g,de as h,qe as i,G as j,Ne as k,Pe as l,fe as m,$e as n,ge as o,pe as p};
5
+ //# sourceMappingURL=chunk-BCNT6ODA.js.map
@@ -0,0 +1,2 @@
1
+ import{a as C}from"./chunk-UAHZ57BR.js";import{q as v}from"./chunk-MKM7NBZK.js";import{b as O,d as x,f as T}from"./chunk-YDDGCJJG.js";import{d as A}from"./chunk-HXXMPYEF.js";import{d as b}from"./chunk-T2FQ4GHD.js";import{x as g}from"./chunk-ISLWJ4PY.js";function H(e,n={}){let{samples:o=50,scope:r,maxDisagreements:u=5}=n,l=new C(e),a=B(l.productionCallableDefinitions({scope:r,minLoc:2,requireFunctionLikeSymbol:!0}),o),c=K(e,a);if(a.length===0||!c)return{available:!1,sampleSize:a.length,oracleCoverage:0,scores:[],topDisagreements:[]};let t={references:P(),callees:P()},i=[],f=0,m=c==="semantic"?T(e,a):new Map,I=c==="source"?E(e,l,a):null;for(let s of a){let p=S(s,c==="semantic"?x(e,s).map(d=>d.file):[...I?.referencesBySymbolId.get(s.symbolId)??[]]),j=S(s,c==="semantic"?(m.get(s.symbolId)??[]).map(d=>d.file):[...I?.calleesBySymbolId.get(s.symbolId)??[]]);f+=1;let L=S(s,v(e,s).map(d=>d.file)),k=S(s,(l.calleeMap([s],{semantic:!1}).get(s.symbolId)??[]).map(d=>d.file)),w=y(c,"references"),R=y(c,"callees");Q(t.references,s,"references",L,p,w,i),Q(t.callees,s,"callees",k,j,R,i)}return i.sort((s,p)=>p.cheapOnly.length+p.oracleOnly.length-(s.cheapOnly.length+s.oracleOnly.length)),{available:!0,sampleSize:a.length,oracleCoverage:a.length>0?D(f/a.length):0,oracleKind:c,scores:["references","callees"].map(s=>F(s,t[s],c)),topDisagreements:i.slice(0,u)}}function P(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0,skippedOraclePartial:0}}function B(e,n){let o=[...e].sort((l,a)=>l.symbolId-a.symbolId);if(o.length<=n)return o;let r=o.length/n,u=[];for(let l=0;l<n;l++)u.push(o[Math.floor(l*r)]);return u}function K(e,n){let o=n[0];if(!o)return null;if(h(e,o))return"source";try{if(O(e).capability("semantic-references",o.relativePath).available)return"semantic"}catch{}return n.some(r=>h(e,r))?"source":null}function S(e,n){let o=new Set;for(let r of n)r!==e.relativePath&&o.add(r);return o}function Q(e,n,o,r,u,l,a){if(!l&&u.size===0){e.skippedOraclePartial+=1;return}e.comparedSymbols+=1,e.cheapTotal+=r.size,e.oracleTotal+=u.size;let c=[],t=[];for(let i of r)u.has(i)?e.agreed+=1:c.push(i);for(let i of u)r.has(i)||t.push(i);(c.length>0||t.length>0)&&a.push({symbol:A(n.symbol),question:o,cheapOnly:c,oracleOnly:t})}var z={references:!0,callees:!1};function F(e,n,o){let r=n.oracleTotal>0?n.agreed/n.oracleTotal:1,u=n.cheapTotal-n.agreed,l=y(o,e);return{question:e,comparedSymbols:n.comparedSymbols,precision:l&&n.cheapTotal>0?D(n.agreed/n.cheapTotal):null,recall:D(r),unverified:u,skippedOraclePartial:n.skippedOraclePartial}}function y(e,n){return e==="semantic"?z[n]:!1}function h(e,n){return g(n.relativePath)==="clojure"&&b(e,n.relativePath)!==null}function E(e,n,o){let r=new Map,u=new Map,l=o.filter(t=>h(e,t)),a=new Map;for(let t of l){let i=a.get(t.leaf)??[];i.push(t),a.set(t.leaf,i)}for(let t of n.sourceFiles()){if(g(t)!=="clojure")continue;let i=b(e,t);if(i)for(let f of i.fileIdentifiers)for(let m of a.get(f)??[])M(r,m.symbolId,t)}let c=new Map;for(let t of n.scopedDefinitions()){if(g(t.relativePath)!=="clojure")continue;let i=c.get(t.leaf)??[];i.push(t),c.set(t.leaf,i)}for(let t of l){let i=b(e,t.relativePath);if(i){for(let f of i.callSites)if(!(f.line<t.startLine||f.line>t.endLine))for(let m of c.get(f.calleeLeaf)??[])M(u,t.symbolId,m.relativePath)}}return{referencesBySymbolId:r,calleesBySymbolId:u}}function M(e,n,o){let r=e.get(n);if(r){r.add(o);return}e.set(n,new Set([o]))}function D(e){return Math.round(e*1e3)/1e3}export{H as a};
2
+ //# sourceMappingURL=chunk-BP2NAIAZ.js.map
@@ -0,0 +1,2 @@
1
+ import{c as m}from"./chunk-B75HZHUP.js";import{a as g,c as b}from"./chunk-72MFTCU5.js";import{q as y}from"./chunk-MKM7NBZK.js";import{a as c}from"./chunk-ECVXWZ4Q.js";import{d as r}from"./chunk-HXXMPYEF.js";function v(l,t,n={}){let o=c(l,t);if(!o)return null;let a=[{file:o.relativePath,line:o.startLine}],s=y(l,o,{semantic:n.semantic}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{producers:f,consumers:i}=S(l,o,s,{semantic:n.semantic!==!1});return{symbol:o.symbol,shortName:r(o.symbol),relativePath:o.relativePath,definitionSites:a.filter(e=>!l.isIgnored(e.file)),usageSites:s,producers:f.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),consumers:i.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function S(l,t,n,o){let a=m(g(l,t,{limit:30,semantic:o.semantic}).map(i=>({symbol:i.symbol,file:i.file}))),s=m(b(l,t,{limit:30,semantic:o.semantic})),f=s.length>0?s:m(n.map(i=>({symbol:i.enclosingSymbol==="(top-level)"?i.file:i.enclosingSymbol,file:i.file})));return{producers:a,consumers:f}}export{v as a};
2
+ //# sourceMappingURL=chunk-BVNO67DB.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-UVPY3RUZ.js";import{a as d}from"./chunk-RM2WQ75T.js";import{a as c}from"./chunk-UQ73QF5D.js";import{d as p}from"./chunk-NABVR6B7.js";import{d as o}from"./chunk-THB6AM3V.js";import{e as u}from"./chunk-SA3DPTHT.js";function F(r,a={}){let{scope:l,limit:s=30,scanLimit:b}=a,f=new d(r);return g({candidates:()=>f.productionCallableDefinitions({scope:l,files:a.files,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}),filterCandidate:e=>y(e.relativePath),scanLimit:b,profile:{name:"unused-params"},evaluate:e=>{let n=o(r,e.relativePath)?.callables.find(t=>t.startLine===e.startLine&&t.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(t=>!t.simple)||n.paramsEndLine>=n.endLine)return null;let L=c(r,e.relativePath),m=[];for(let t=n.params.length-1;t>=0;t--){let i=n.params[t];if(i.name===""||i.name.startsWith("_")||h(L.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function y(r){let a=u(r);return a==="typescript"||a==="tsx"||a==="javascript"}function h(r,a,l){return r?r.some(s=>s>a&&s<=l):!1}export{F as a};
2
- //# sourceMappingURL=chunk-XHMVZFA6.js.map
1
+ import{a as g}from"./chunk-K6UI6EBZ.js";import{a as d}from"./chunk-UAHZ57BR.js";import{a as c}from"./chunk-MKM7NBZK.js";import{d as p}from"./chunk-HXXMPYEF.js";import{d as o}from"./chunk-T2FQ4GHD.js";import{x as u}from"./chunk-ISLWJ4PY.js";function F(r,a={}){let{scope:l,limit:s=30,scanLimit:b}=a,f=new d(r);return g({candidates:()=>f.productionCallableDefinitions({scope:l,files:a.files,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}),filterCandidate:e=>y(e.relativePath),scanLimit:b,profile:{name:"unused-params"},evaluate:e=>{let n=o(r,e.relativePath)?.callables.find(t=>t.startLine===e.startLine&&t.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(t=>!t.simple)||n.paramsEndLine>=n.endLine)return null;let L=c(r,e.relativePath),m=[];for(let t=n.params.length-1;t>=0;t--){let i=n.params[t];if(i.name===""||i.name.startsWith("_")||h(L.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function y(r){let a=u(r);return a==="typescript"||a==="tsx"||a==="javascript"}function h(r,a,l){return r?r.some(s=>s>a&&s<=l):!1}export{F as a};
2
+ //# sourceMappingURL=chunk-CW3KZ7UF.js.map
@@ -1,3 +1,3 @@
1
- import{a as d}from"./chunk-NBNEVLRC.js";import{b as g,d as m}from"./chunk-NABVR6B7.js";function _(n,f){let a=d(n,f);if(!a)return[];let t=n.get(`SELECT symbol, enclosing_symbol FROM global_symbols
1
+ import{a as d}from"./chunk-ECVXWZ4Q.js";import{b as g,d as m}from"./chunk-HXXMPYEF.js";function _(n,f){let a=d(n,f);if(!a)return[];let t=n.get(`SELECT symbol, enclosing_symbol FROM global_symbols
2
2
  WHERE id = ? LIMIT 1`,a.symbolId);if(!t)return[];let o=[{symbol:t.symbol,shortName:m(t.symbol),depth:0}],e=t.enclosing_symbol,r=1,c=new Set([t.symbol]);for(;e&&!c.has(e)&&r<20;){c.add(e);let s=n.get("SELECT symbol, enclosing_symbol FROM global_symbols WHERE symbol = ?",e);if(!s)break;o.push({symbol:s.symbol,shortName:m(s.symbol),depth:r}),e=s.enclosing_symbol,r++}if(o.length>1)return o;let y=g(t.symbol);if("kind"in y)return o;let l=y.descriptors;if(l.length<=1)return o;let b=[o[0]];for(let s=l.length-2,h=1;s>=0;s--,h++){let p=l.slice(0,s+1).map(i=>i.suffix==="method"?`${i.name}()`:i.name.replace(/\.(ts|tsx|js|jsx|mjs|cjs|py|pyi|rs|java|scala|kt|kts|rb|go|cs|vb|dart|php|c|cc|cpp|cxx|h|hpp)$/,"")).join(":");b.push({symbol:p,shortName:p,depth:h})}return b}export{_ as a};
3
- //# sourceMappingURL=chunk-6BN3EHQE.js.map
3
+ //# sourceMappingURL=chunk-D64L53WX.js.map
@@ -1,4 +1,4 @@
1
- import{a as I,b as D,c as $,d as B}from"./chunk-2FMFF4RI.js";import{a as K}from"./chunk-UVPY3RUZ.js";import{a as A}from"./chunk-RM2WQ75T.js";import{b as M,g as R}from"./chunk-WUOB4DHH.js";import{a as b}from"./chunk-BGBBVSH4.js";import{e as x}from"./chunk-L446VQYQ.js";import{b as F,d as w,e as p}from"./chunk-NABVR6B7.js";import{i as k}from"./chunk-THB6AM3V.js";import{a as h}from"./chunk-SA3DPTHT.js";function me(t,e){let{scope:n,minLoc:s=3,maxLoc:i=80,limit:r=30,includeLowConfidence:o=!1,scanLimit:l}=e??{},d=e?.semantic!==!1,a=new A(t),m=a.scopedDefinitions(n),g=Q(a,n),T={high:0,medium:1,low:2};return K({candidates:()=>O(t,a,m,{minLoc:s,maxLoc:i}),orderCandidates:(u,c)=>b(c)-b(u)||u.relativePath.localeCompare(c.relativePath),scanLimit:l,profile:{name:"stale-abstractions"},prepare:u=>{let c=W(u),f=U(t,a,u,c,{semantic:d}),y=u.filter(P=>{let S=C(t,P,f,c);return S.realConsumers.length<=1&&!S.transitivelyReachable&&j(P,S.realConsumers.length,g)});return{consumerFileMap:f,singletonBackedClassIds:H(t,a,m,y,{semantic:d}),candidateIndex:c}},evaluate:(u,c)=>{if(c.singletonBackedClassIds.has(u.symbolId))return null;let f=C(t,u,c.consumerFileMap,c.candidateIndex);if(f.transitivelyReachable||f.realConsumers.length>1||f.realConsumers.length===0&&f.barrelConsumers>0||!j(f.definition,f.realConsumers.length,g))return null;let y=z(t,f);return!o&&y.confidence==="low"?null:y},orderResults:(u,c)=>T[u.confidence]-T[c.confidence]||c.loc-u.loc||u.file.localeCompare(c.file)||u.startLine-c.startLine,limit:r})}function O(t,e,n,s){return n.filter(i=>i.isTypeLike&&b(i)>=s.minLoc).filter(i=>b(i)<=s.maxLoc).filter(i=>!t.isIgnored(i.relativePath)).filter(i=>M(i.relativePath)!=="test").filter(i=>!R(t,i.symbol,i.relativePath)).filter(i=>!X(i.symbol)).filter(i=>!e.hasSuppressionComment(i))}function v(t,e,n,s){return D(I(t,e).forDefinitions(n,{semantic:s.semantic,sourceFallback:s.sourceFallback}))}function U(t,e,n,s,i){let r=v(t,e,n,{semantic:!1,sourceFallback:!1}),o=n.filter(a=>{let m=C(t,a,r,s);return m.realConsumers.length<=1&&!(m.realConsumers.length>0&&L(a.relativePath))}),l=i.semantic&&o.length>0?x(r,v(t,e,o,{semantic:!0,sourceFallback:!1})):r,d=o.filter(a=>C(t,a,l,s).realConsumers.length<=1);return x(l,v(t,e,d,{semantic:!1,sourceFallback:!0}))}function W(t){let e=new Map;for(let n of t){let s=e.get(n.relativePath);s||(s=new Map,e.set(n.relativePath,s));let i=p(n.symbol);i&&s.set(i,n)}return e}function C(t,e,n,s){let r=[...n.get(e.symbolId)??new Set].filter(m=>m!==e.relativePath&&!t.isIgnored(m)),{realConsumers:o,barrelConsumers:l,importOnlyConsumers:d}=$(t,e,r),a=Y(t,e,n,s);return{definition:e,realConsumers:o,barrelConsumers:l+d,transitivelyReachable:a}}function z(t,e){let n=E(t,e.definition.relativePath,e.definition.startLine),s=L(e.definition.relativePath)?!0:ee(t,e.definition),{confidence:i,reason:r}=ne(e.realConsumers.length,n,s),o=V(e.realConsumers.length,n,s);return{symbol:e.definition.symbol,shortName:w(e.definition.symbol),file:e.definition.relativePath,startLine:e.definition.startLine,endLine:e.definition.endLine,loc:b(e.definition),consumers:e.realConsumers.length,barrelConsumers:e.barrelConsumers,kind:n,definerUsesType:s,confidence:i,reason:r,actionTier:o.actionTier,stalenessKind:o.stalenessKind,recommendation:o.recommendation}}function V(t,e,n){return t===0?{actionTier:"direct",stalenessKind:"unused-abstraction",recommendation:"Delete the abstraction or wire the missing consumer after checking public/package surfaces."}:e==="class"?{actionTier:"signal",stalenessKind:"one-to-one-class-encapsulation",recommendation:"Treat as weak signal: a one-consumer class may be intentional encapsulation, so inline only after reviewing ownership and state boundaries."}:n?{actionTier:"signal",stalenessKind:"single-consumer-abstraction",recommendation:"Review whether this single-consumer abstraction earns its name or should be folded into the owning feature."}:{actionTier:"signal",stalenessKind:"misplaced-single-consumer-type",recommendation:"Review moving or co-locating the type with its only real consumer; keep it here only if this file owns the public contract."}}function H(t,e,n,s,i){let r=_(t,Z(n),s),o=r.map(a=>a.singleton);if(r.length===0)return new Set;let l=D(I(t,e).forDefinitions(o,{semantic:i.semantic,sourceFallback:!0})),d=new Set;for(let{singleton:a,classId:m}of r)G(t,a,l)&&d.add(m);return d}function Z(t){let e=new Map;for(let n of t){let s=p(n.symbol);s&&e.set(N(n.relativePath,s),n)}return e}function _(t,e,n){let s=[];for(let i of n){let r=q(t,e,i);r&&s.push({singleton:r,classId:i.symbolId})}return s}function q(t,e,n){if(E(t,n.relativePath,n.startLine)!=="class")return null;let s=p(n.symbol);if(!s)return null;let i=J(t,n.relativePath,s);return i?e.get(N(n.relativePath,i))??null:null}function G(t,e,n){let s=p(e.symbol),i=n.get(e.symbolId);return!s||!i?!1:[...i].some(r=>r!==e.relativePath&&!t.isIgnored(r)&&!B(t,r,s))}function N(t,e){return`${t}\0${e}`}function J(t,e,n){let s=h(t,e);if(!s)return null;let i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\bexport\\s+const\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*new\\s+${i}\\s*\\(`);return s.match(r)?.[1]??null}function Q(t,e){return new Set(t.scopedDefinitions(e).filter(n=>n.isFunctionLike).map(n=>n.relativePath))}function X(t){let e=F(t);if("kind"in e)return!1;let n=e.descriptors;if(n.length<2)return!1;let s=n[n.length-1],i=n[n.length-2];return s?.suffix==="type"&&i?.suffix==="type"}function L(t){let n=(t.split("/").pop()??"").replace(/\.[^.]+$/,"");return!!(n==="types"||n.endsWith("-types")||n==="models"||n==="schema"||n==="common"||n==="protocol"||n==="proto"||n==="dto"||n==="mod"||n==="contracts"||/(^|\/)types(\/|\.)/.test(t)||/(^|\/)models?(\/|\.)/.test(t)||/(^|\/)proto(?:col)?(\/|\.)/.test(t)||/(^|\/)schema(\/|\.)/.test(t)||/(^|\/)contracts?(\/|\.)/.test(t))}function j(t,e,n){return!(L(t.relativePath)&&e>0||e===0&&n.has(t.relativePath))}function Y(t,e,n,s){let i=k(t,e.relativePath),r=p(e.symbol);if(!r)return!1;let o=i.get(r);if(!o||o.size===0)return!1;let l=s.get(e.relativePath);if(!l)return!1;for(let d of o){let a=l.get(d);if(!a)continue;let m=n.get(a.symbolId);if(m){for(let g of m)if(g!==e.relativePath&&!t.isIgnored(g))return!0}}return!1}function E(t,e,n){let s=h(t,e);if(!s)return"other";let i=s.split(`
1
+ import{a as I,b as D,c as $,d as B}from"./chunk-T6NGEV5I.js";import{a as K}from"./chunk-K6UI6EBZ.js";import{a as A}from"./chunk-UAHZ57BR.js";import{b as M,g as R}from"./chunk-NAH5EAZS.js";import{a as b}from"./chunk-BGBBVSH4.js";import{g as x}from"./chunk-72MFTCU5.js";import{b as F,d as w,e as p}from"./chunk-HXXMPYEF.js";import{j as k}from"./chunk-T2FQ4GHD.js";import{p as h}from"./chunk-WS3Z6W3M.js";function me(t,e){let{scope:n,minLoc:s=3,maxLoc:i=80,limit:r=30,includeLowConfidence:o=!1,scanLimit:l}=e??{},d=e?.semantic!==!1,a=new A(t),m=a.scopedDefinitions(n),g=Q(a,n),T={high:0,medium:1,low:2};return K({candidates:()=>O(t,a,m,{minLoc:s,maxLoc:i}),orderCandidates:(u,c)=>b(c)-b(u)||u.relativePath.localeCompare(c.relativePath),scanLimit:l,profile:{name:"stale-abstractions"},prepare:u=>{let c=W(u),f=U(t,a,u,c,{semantic:d}),y=u.filter(P=>{let S=C(t,P,f,c);return S.realConsumers.length<=1&&!S.transitivelyReachable&&j(P,S.realConsumers.length,g)});return{consumerFileMap:f,singletonBackedClassIds:H(t,a,m,y,{semantic:d}),candidateIndex:c}},evaluate:(u,c)=>{if(c.singletonBackedClassIds.has(u.symbolId))return null;let f=C(t,u,c.consumerFileMap,c.candidateIndex);if(f.transitivelyReachable||f.realConsumers.length>1||f.realConsumers.length===0&&f.barrelConsumers>0||!j(f.definition,f.realConsumers.length,g))return null;let y=z(t,f);return!o&&y.confidence==="low"?null:y},orderResults:(u,c)=>T[u.confidence]-T[c.confidence]||c.loc-u.loc||u.file.localeCompare(c.file)||u.startLine-c.startLine,limit:r})}function O(t,e,n,s){return n.filter(i=>i.isTypeLike&&b(i)>=s.minLoc).filter(i=>b(i)<=s.maxLoc).filter(i=>!t.isIgnored(i.relativePath)).filter(i=>M(i.relativePath)!=="test").filter(i=>!R(t,i.symbol,i.relativePath)).filter(i=>!X(i.symbol)).filter(i=>!e.hasSuppressionComment(i))}function v(t,e,n,s){return D(I(t,e).forDefinitions(n,{semantic:s.semantic,sourceFallback:s.sourceFallback}))}function U(t,e,n,s,i){let r=v(t,e,n,{semantic:!1,sourceFallback:!1}),o=n.filter(a=>{let m=C(t,a,r,s);return m.realConsumers.length<=1&&!(m.realConsumers.length>0&&L(a.relativePath))}),l=i.semantic&&o.length>0?x(r,v(t,e,o,{semantic:!0,sourceFallback:!1})):r,d=o.filter(a=>C(t,a,l,s).realConsumers.length<=1);return x(l,v(t,e,d,{semantic:!1,sourceFallback:!0}))}function W(t){let e=new Map;for(let n of t){let s=e.get(n.relativePath);s||(s=new Map,e.set(n.relativePath,s));let i=p(n.symbol);i&&s.set(i,n)}return e}function C(t,e,n,s){let r=[...n.get(e.symbolId)??new Set].filter(m=>m!==e.relativePath&&!t.isIgnored(m)),{realConsumers:o,barrelConsumers:l,importOnlyConsumers:d}=$(t,e,r),a=Y(t,e,n,s);return{definition:e,realConsumers:o,barrelConsumers:l+d,transitivelyReachable:a}}function z(t,e){let n=E(t,e.definition.relativePath,e.definition.startLine),s=L(e.definition.relativePath)?!0:ee(t,e.definition),{confidence:i,reason:r}=ne(e.realConsumers.length,n,s),o=V(e.realConsumers.length,n,s);return{symbol:e.definition.symbol,shortName:w(e.definition.symbol),file:e.definition.relativePath,startLine:e.definition.startLine,endLine:e.definition.endLine,loc:b(e.definition),consumers:e.realConsumers.length,barrelConsumers:e.barrelConsumers,kind:n,definerUsesType:s,confidence:i,reason:r,actionTier:o.actionTier,stalenessKind:o.stalenessKind,recommendation:o.recommendation}}function V(t,e,n){return t===0?{actionTier:"direct",stalenessKind:"unused-abstraction",recommendation:"Delete the abstraction or wire the missing consumer after checking public/package surfaces."}:e==="class"?{actionTier:"signal",stalenessKind:"one-to-one-class-encapsulation",recommendation:"Treat as weak signal: a one-consumer class may be intentional encapsulation, so inline only after reviewing ownership and state boundaries."}:n?{actionTier:"signal",stalenessKind:"single-consumer-abstraction",recommendation:"Review whether this single-consumer abstraction earns its name or should be folded into the owning feature."}:{actionTier:"signal",stalenessKind:"misplaced-single-consumer-type",recommendation:"Review moving or co-locating the type with its only real consumer; keep it here only if this file owns the public contract."}}function H(t,e,n,s,i){let r=_(t,Z(n),s),o=r.map(a=>a.singleton);if(r.length===0)return new Set;let l=D(I(t,e).forDefinitions(o,{semantic:i.semantic,sourceFallback:!0})),d=new Set;for(let{singleton:a,classId:m}of r)G(t,a,l)&&d.add(m);return d}function Z(t){let e=new Map;for(let n of t){let s=p(n.symbol);s&&e.set(N(n.relativePath,s),n)}return e}function _(t,e,n){let s=[];for(let i of n){let r=q(t,e,i);r&&s.push({singleton:r,classId:i.symbolId})}return s}function q(t,e,n){if(E(t,n.relativePath,n.startLine)!=="class")return null;let s=p(n.symbol);if(!s)return null;let i=J(t,n.relativePath,s);return i?e.get(N(n.relativePath,i))??null:null}function G(t,e,n){let s=p(e.symbol),i=n.get(e.symbolId);return!s||!i?!1:[...i].some(r=>r!==e.relativePath&&!t.isIgnored(r)&&!B(t,r,s))}function N(t,e){return`${t}\0${e}`}function J(t,e,n){let s=h(t,e);if(!s)return null;let i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\bexport\\s+const\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*new\\s+${i}\\s*\\(`);return s.match(r)?.[1]??null}function Q(t,e){return new Set(t.scopedDefinitions(e).filter(n=>n.isFunctionLike).map(n=>n.relativePath))}function X(t){let e=F(t);if("kind"in e)return!1;let n=e.descriptors;if(n.length<2)return!1;let s=n[n.length-1],i=n[n.length-2];return s?.suffix==="type"&&i?.suffix==="type"}function L(t){let n=(t.split("/").pop()??"").replace(/\.[^.]+$/,"");return!!(n==="types"||n.endsWith("-types")||n==="models"||n==="schema"||n==="common"||n==="protocol"||n==="proto"||n==="dto"||n==="mod"||n==="contracts"||/(^|\/)types(\/|\.)/.test(t)||/(^|\/)models?(\/|\.)/.test(t)||/(^|\/)proto(?:col)?(\/|\.)/.test(t)||/(^|\/)schema(\/|\.)/.test(t)||/(^|\/)contracts?(\/|\.)/.test(t))}function j(t,e,n){return!(L(t.relativePath)&&e>0||e===0&&n.has(t.relativePath))}function Y(t,e,n,s){let i=k(t,e.relativePath),r=p(e.symbol);if(!r)return!1;let o=i.get(r);if(!o||o.size===0)return!1;let l=s.get(e.relativePath);if(!l)return!1;for(let d of o){let a=l.get(d);if(!a)continue;let m=n.get(a.symbolId);if(m){for(let g of m)if(g!==e.relativePath&&!t.isIgnored(g))return!0}}return!1}function E(t,e,n){let s=h(t,e);if(!s)return"other";let i=s.split(`
2
2
  `),r=Math.max(0,n-2),o=Math.min(i.length-1,n+2);for(let l=r;l<=o;l++){let a=(i[l]??"").replace(/^\s*\/\/.*$/g,"");if(/\b(?:export\s+)?(?:abstract\s+)?class\s+\w/.test(a))return"class";if(/\b(?:export\s+)?interface\s+\w/.test(a))return"interface";if(/\b(?:export\s+)?type\s+\w/.test(a))return"type";if(/\b(?:export\s+)?(?:const\s+)?enum\s+\w/.test(a))return"enum"}return"other"}function ee(t,e){let n=h(t,e.relativePath);if(!n)return!1;let s=p(e.symbol);if(!s)return!1;let i=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`\\b${i}\\b`),o=n.split(`
3
3
  `);for(let l=0;l<o.length;l++)if(!(l>=e.startLine&&l<=e.endLine)&&r.test(o[l]??""))return!0;return!1}function ne(t,e,n){return t===0?{confidence:"high",reason:"unused \u2014 no consumers and defining file has no real usage"}:t===1&&e==="class"?{confidence:"low",reason:"1 consumer + class kind \u2014 likely 1:1 encapsulation, not over-abstraction"}:t===1&&!n?{confidence:"high",reason:"1 consumer + defining file never uses it \u2014 type belongs with its consumer"}:{confidence:"medium",reason:"1 consumer \u2014 single-use abstraction"}}export{me as a};
4
- //# sourceMappingURL=chunk-T3AEVJBG.js.map
4
+ //# sourceMappingURL=chunk-D7J6GZAG.js.map
@@ -0,0 +1,3 @@
1
+ import{a as y,b as d,e as b,n as C}from"./chunk-MBKJ7GHT.js";import{c as M,d as L,e as Q,g as I,h as E,i as K}from"./chunk-HXXMPYEF.js";function se(e,n){return O(e,n).match}function O(e,n){let t=z(e,n.trim()).filter(r=>!e.isIgnored(r.relative_path));if(t.length>0)return S(e,t);let o=G(e,n);if(o&&!e.isIgnored(o.relative_path))return S(e,[o]);let i=W(e,n);return i.length>0?S(e,i):X(e,n)}function W(e,n){let t=N(n),o=x(t);if(!o)return[];let i=`%${o.path}%`,r=o.leaf;return j(e,i,r,t)}function j(e,n,t,o){let i=b([],[...q(e,n,t),...T(e,n,t)]).filter(r=>!e.isIgnored(r.relative_path)).filter(r=>f(r,o)>1);return i.sort((r,a)=>f(a,o)-f(r,o)||r.end_line-r.start_line-(a.end_line-a.start_line)||r.start_line-a.start_line||r.symbol.localeCompare(a.symbol)),i}function q(e,n,t){return y(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function T(e,n,t){return d(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function X(e,n){let t=N(n),o=P(n),i=V(e,o),r=ee(i,n,t).filter(s=>!e.isIgnored(s.relative_path));if(r.length>0)return S(e,r);let a=[];for(let s of i){if(e.isIgnored(s.relative_path))continue;let c=Y(s,n,t,o);c<=0||a.push({row:s,score:c})}return a.sort((s,c)=>c.score-s.score||s.row.end_line-s.row.start_line-(c.row.end_line-c.row.start_line)||s.row.relative_path.localeCompare(c.row.relative_path)||s.row.symbol.localeCompare(c.row.symbol)),S(e,a.map(s=>s.row))}function S(e,n){let t=n.map(i=>C(e,i)),o=t[0]??null;return{match:o,candidates:o?Z(t,o):[],total:t.length}}function Z(e,n){let t=new Set([`${n.symbolId}:${n.relativePath}:${n.startLine}`]),o=[];for(let i of e){let r=`${i.symbolId}:${i.relativePath}:${i.startLine}`;if(!t.has(r)&&(t.add(r),o.push({symbol:i.symbol,shortName:L(i.symbol),relativePath:i.relativePath,startLine:i.startLine}),o.length>=5))break}return o}function G(e,n){let t=n.match(/^(.+):(\d+)-(\d+)$/);if(!t)return;let[,o,i,r]=t,a=Math.max(0,parseInt(i,10)-1),s=Math.max(a,parseInt(r,10)-1);return H(e,o,a,s)??J(e,o,a,s)}function H(e,n,t,o){return y(e,{where:"d.relative_path LIKE ? AND der.start_line <= ? AND der.end_line >= ?",params:[`%${n}%`,t,o],orderBy:"(der.end_line - der.start_line) ASC",limit:1})[0]}function J(e,n,t,o){return d(e,{where:"d.relative_path LIKE ? AND c.start_line <= ? AND c.end_line >= ?",params:[`%${n}%`,t,o],orderBy:"(MAX(c.end_line) - MIN(c.start_line)) ASC",limit:1})[0]}function le(e,n){let t=z(e,n).find(o=>!e.isIgnored(o.relative_path));return t?C(e,t):null}function z(e,n){let t=y(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, der.start_line"}),o=t.length>0?[]:d(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, start_line"});return b(t,o)}function ce(e,n){if("symbol"in n&&"relativePath"in n)return n;let t=U(e,n.symbolId)[0];return t?C(e,t):null}function U(e,n){let t=y(e,{where:"gs.id = ?",params:[n],orderBy:"der.start_line, der.end_line"}),o=d(e,{where:"gs.id = ?",params:[n],orderBy:"start_line, end_line"});return b(t,o)}function V(e,n){let t=n.map(()=>"(gs.symbol LIKE ? OR d.relative_path LIKE ? OR COALESCE(gs.display_name, '') LIKE ?)"),o=n.flatMap(s=>{let c=`%${s}%`;return[c,c,c]}),i=t.join(`
2
+ AND `),r=y(e,{where:i,params:o,limit:200}),a=d(e,{where:i,params:o,limit:200});return b(r,a)}function Y(e,n,t,o){let i=n.trim(),r=t,a=r.replace(/\(\)$/,""),s=n.toLowerCase(),c=t.toLowerCase(),h=c.replace(/\(\)$/,""),k=e.symbol,v=L(e.symbol),g=Q(e.symbol),A=e.display_name??"",w=e.symbol.toLowerCase(),m=v.toLowerCase(),u=g.toLowerCase(),D=A.toLowerCase(),p=e.relative_path.toLowerCase(),F=/[/:.]/.test(t),$=x(t),_=$?.leaf.toLowerCase(),l=0;return(k===i||k===r)&&(l+=1150),(v===i||v===r)&&(l+=1100),A===a&&(l+=1180),g===a&&(l+=1160),(`${g}()`===i||`${g}()`===r)&&(l+=955),(w===s||w===c)&&(l+=1e3),(m===s||m===c)&&(l+=950),(p===s||p===c)&&(l+=925),(p.endsWith(`/${c}`)||p.endsWith(`/${s}`))&&(l+=875),D===h&&(l+=850),u===h&&(l+=825),(`${u}()`===s||`${u}()`===c)&&(l+=820),(m.endsWith(`:${c}`)||m.endsWith(`:${h}`)||m.endsWith(`:${h}()`))&&(l+=800),w.includes(c)&&(l+=120),m.includes(c)&&(l+=140),p.includes(c)&&(l+=140),D.includes(c)&&(l+=110),o.every(B=>{let R=B.toLowerCase();return w.includes(R)||m.includes(R)||p.includes(R)||D.includes(R)})&&(l+=100+o.length*15),$&&p.includes($.path.toLowerCase())&&(l+=360,_&&(u===_||`${u}()`===_||`${u}()`==`${_}()`)&&(l+=700),I(e.symbol)&&(l+=180)),E(e.symbol)&&u===h&&(l+=60),!F&&K(e.symbol)&&(l-=160),l-=Math.min(50,Math.max(0,e.end_line-e.start_line)),l}function x(e){let n=e.trim().replace(/\\/g,"/"),t=n.lastIndexOf("/");if(t<=0||t===n.length-1)return null;let o=n.slice(t+1).replace(/\(\)$/,"");return!o||o.includes(".")?null:{path:n.slice(0,t),leaf:o}}function N(e){return e.trim().replace(/\(\)$/,"").replace(/\(.*$/,"")}function P(e){let n=N(e),t=n.split(/[^A-Za-z0-9_]+/).map(o=>o.trim()).filter(o=>o.length>0);return t.length>0?[...new Set(t)]:[n]}function ee(e,n,t){let o=n.trim(),i=e.filter(r=>{let a=L(r.symbol),s=(r.display_name??"").trim();return r.symbol===o||a===o||a===t||s===o||s===t||`${s}()`===o||f(r,t)>1||r.relative_path===o});return i.length===0?[]:(i.sort((r,a)=>f(a,t)-f(r,t)||r.end_line-r.start_line-(a.end_line-a.start_line)||r.relative_path.localeCompare(a.relative_path)||r.symbol.localeCompare(a.symbol)),i)}function f(e,n){let t=x(n);if(!t)return 0;let o=e.relative_path.toLowerCase(),i=Q(e.symbol).toLowerCase(),r=t.path.toLowerCase(),a=t.leaf.toLowerCase();return o.includes(r)?i!==a?1:I(e.symbol)?M(e.symbol)===null?5:4:M(e.symbol)===null?3:2:0}export{se as a,O as b,le as c,ce as d};
3
+ //# sourceMappingURL=chunk-ECVXWZ4Q.js.map
@@ -0,0 +1,2 @@
1
+ import{c as x,f as C,g as w}from"./chunk-Q3B3FNCU.js";import{b as k}from"./chunk-B75HZHUP.js";import{b as A,c as M}from"./chunk-NAH5EAZS.js";import{a as N}from"./chunk-BGBBVSH4.js";import{g as z}from"./chunk-MBKJ7GHT.js";import{d as v}from"./chunk-HXXMPYEF.js";import{b as h,i as S,m as R}from"./chunk-T2FQ4GHD.js";import{c as p}from"./chunk-GNG622H3.js";function fe(t,e={}){let{includeHomonyms:i=!1,limit:s}=e,r=F(t,e).filter(o=>o.relationship==="divergent"||i&&o.relationship==="homonym");return s?r.slice(0,s):r}function F(t,e={}){let{scope:i,minSimilarity:s=.3,scanLimit:r}=e,o=B(t,{scope:i,scanLimit:r});return $(o,{minSimilarity:s,isDelegatePair:Y(t)})}function $(t,e={}){let i=e.minSimilarity??.3,s=e.isDelegatePair,r=t.filter(n=>!ee(n.leaf)),o=[...new Set(r.map(n=>n.leaf))],a=H(o),l=[];for(let n of a){let c=r.filter(f=>n.has(f.leaf));if(c.length<2||new Set(c.map(f=>f.file)).size<2||c.every(f=>A(f.file)==="test"))continue;let m=null,b=!1,y=!1;for(let f=0;f<c.length;f+=1)for(let u=f+1;u<c.length;u+=1){let g=c[f],d=c[u];if(g.file===d.file||s?.(g,d,c)||s?.(d,g,c))continue;if(b=!0,g.normalizedBody===d.normalizedBody){y=!0;continue}let L=E(g.tokens,d.tokens);(!m||L>m.similarity)&&(m={a:g,b:d,similarity:L})}if(!b)continue;let T=[...c].sort((f,u)=>f.file.localeCompare(u.file)||f.startLine-u.startLine).map(O);if(!m){l.push({leaf:P(n),relationship:y?"identical":"homonym",maxDivergence:0,members:T});continue}let D=m.similarity>=i?"divergent":"homonym";l.push({leaf:P(n),relationship:D,maxDivergence:Math.round((1-m.similarity)*1e3)/1e3,members:T,...D==="divergent"?{firstDivergentTokens:Z(m.a.tokens,m.b.tokens)}:{}})}return l.sort((n,c)=>c.members.length-n.members.length||c.maxDivergence-n.maxDivergence||n.leaf.localeCompare(c.leaf))}function B(t,e){let i=z(t,{scope:e.scope}).filter(o=>o.isFunctionLike&&!t.isIgnored(o.relativePath)).filter(o=>!M(o.relativePath));i.sort((o,a)=>o.relativePath.localeCompare(a.relativePath)||o.startLine-a.startLine);let s=k(i,e.scanLimit),r=[];for(let o of s){let a=I(t,o);a&&r.push(a)}return r}function I(t,e){if(!e.leaf)return null;let i=C(t,e);if(!i)return null;let s=x(i);if(!s||s.length<8)return null;let r=G(i);return r.length===0?null:{leaf:e.leaf,symbol:e.symbol,shortName:v(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:N(e),normalizedBody:s,tokens:r,isThinForwarder:X(i)}}var j=/[A-Za-z_$][A-Za-z0-9_$]*|\d+(?:\.\d+)?|[^\sA-Za-z0-9_$]/g;function G(t){let e=w(t);return h(e).match(j)??[]}function O(t){return{symbol:t.symbol,shortName:t.shortName,file:t.file,startLine:t.startLine,endLine:t.endLine,loc:t.loc}}function E(t,e){let i=new Set(t),s=new Set(e);if(i.size===0&&s.size===0)return 1;if(i.size===0||s.size===0)return 0;let r=0;for(let a of i)s.has(a)&&(r+=1);let o=i.size+s.size-r;return o===0?0:r/o}function Z(t,e){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t[s]===e[s];)s+=1;let r=t.slice(s,s+6).join(" "),o=e.slice(s,s+6).join(" ");return!r&&!o?"(bodies differ only in trailing length)":`A: ${r||"(end)"} | B: ${o||"(end)"}`}function H(t){let e=new Map;for(let a of t)e.set(a,a);let i=a=>{let l=a;for(;e.get(l)!==l;)l=e.get(l);let n=a;for(;e.get(n)!==l;){let c=e.get(n);e.set(n,l),n=c}return l},s=(a,l)=>{let n=i(a),c=i(l);n!==c&&e.set(n,c)},r=new Map;for(let a of t){let l=a.slice(0,1).toLowerCase(),n=r.get(l)??[];n.push(a),r.set(l,n)}for(let a of r.values())for(let l=0;l<a.length;l+=1)for(let n=l+1;n<a.length;n+=1)W(a[l],a[n])&&s(a[l],a[n]);let o=new Map;for(let a of t){let l=i(a),n=o.get(l)??new Set;n.add(a),o.set(l,n)}return[...o.values()]}function W(t,e){return t===e||t.toLowerCase()===e.toLowerCase()?!0:t.length<8||e.length<8||Math.abs(t.length-e.length)>2?!1:K(t.toLowerCase(),e.toLowerCase(),2)}function K(t,e,i){if(Math.abs(t.length-e.length)>i)return!1;let s=Array.from({length:e.length+1},(r,o)=>o);for(let r=1;r<=t.length;r+=1){let o=[r],a=o[0];for(let l=1;l<=e.length;l+=1){let n=t[r-1]===e[l-1]?0:1,c=Math.min(s[l]+1,o[l-1]+1,s[l-1]+n);o.push(c),a=Math.min(a,c)}if(a>i)return!1;s=o}return s[e.length]<=i}function X(t){let e=h(w(t)).trim();if(!e||q.test(e))return!1;let i=U(e);return i.length===0||i.length>2?!1:Q(i[i.length-1])}var q=/\b(?:if|else|for|while|switch|try|catch|do)\b/,J=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^[\]]*\])*\((?:[^()]|\([^()]*\))*\)$/;function Q(t){let e=t.trim().replace(/^return\s+/,"").replace(/^await\s+/,"").replace(/;\s*$/,"").trim();return J.test(e)}function U(t){let e=[],i=0,s="";for(let r of t){if(r==="("||r==="["||r==="{"?i+=1:(r===")"||r==="]"||r==="}")&&(i=Math.max(0,i-1)),r===";"&&i===0){e.push(s),s="";continue}s+=r}return s.trim()&&e.push(s),e.map(r=>r.trim()).filter(r=>r.length>0)}var V=3;function Y(t){let e=new Map;return(i,s,r)=>{if(!i.isThinForwarder)return!1;let o=`${i.symbol}\0${s.symbol}`,a=e.get(o);if(a!==void 0)return a;let l=_(t,i,s,r,V,new Set);return e.set(o,l),l}}function _(t,e,i,s,r,o){if(r<=0||o.has(e.symbol)||(o.add(e.symbol),(S(t,e.file)??[]).filter(n=>n.line>=e.startLine&&n.line<=e.endLine&&n.calleeLeaf===i.leaf).length===0))return!1;let l=new Set(R(t,e.file).filter(n=>n.sourcePath&&(n.kind!=="namespace"||n.usedMembers.includes(i.leaf))).map(n=>n.sourcePath));if([...l].some(n=>p(n,i.file)))return!0;for(let n of s)if(!(n.symbol===e.symbol||n.symbol===i.symbol||!n.isThinForwarder)&&[...l].some(c=>p(c,n.file))&&_(t,n,i,s,r-1,o))return!0;return!1}function ee(t){return t.startsWith("<")&&t.endsWith(">")}function P(t){return[...t].sort()[0]}export{fe as a,F as b,$ as c};
2
+ //# sourceMappingURL=chunk-EDB7Y442.js.map
@@ -1,11 +1,11 @@
1
- import{a as b}from"./chunk-OFXN2BCT.js";import{c as d}from"./chunk-CYHIKTJN.js";import{a as c}from"./chunk-NBNEVLRC.js";import{d as a,e as I,i as h}from"./chunk-NABVR6B7.js";import{l as u}from"./chunk-THB6AM3V.js";import{e as g}from"./chunk-SA3DPTHT.js";import{a as p}from"./chunk-64MNV6AB.js";function U(e,r,t={}){return N(e,r,t)?.map(o=>({symbol:o.symbol,shortName:o.shortName,fromFile:o.fromFile}))??[]}function j(e,r){let t=c(e,r),o=E(e,r);if(o.length>0&&!R(t))return o;let s=y(e,r,t);return f(r)&&s.length>0?s:O([...o,...s])}function B(e,r,t={}){return N(e,r,t)?.filter(o=>!o.used).map(o=>({symbol:o.symbol,shortName:o.shortName,importedIn:o.importer}))??[]}function E(e,r){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
1
+ import{a as _}from"./chunk-OSWF3HSF.js";import{c as f}from"./chunk-YDDGCJJG.js";import{a as d}from"./chunk-ECVXWZ4Q.js";import{d as a,e as I,i as b}from"./chunk-HXXMPYEF.js";import{m as c}from"./chunk-T2FQ4GHD.js";import{x as h}from"./chunk-ISLWJ4PY.js";import{b as u}from"./chunk-GNG622H3.js";import{a as g}from"./chunk-64MNV6AB.js";function j(e,r,t={}){return N(e,r,t)?.map(o=>({symbol:o.symbol,shortName:o.shortName,fromFile:o.fromFile}))??[]}function B(e,r){let t=d(e,r),o=E(e,r);if(o.length>0&&!R(t))return o;let s=y(e,r,t);return p(r)&&s.length>0?s:O([...o,...s])}function W(e,r,t={}){return N(e,r,t)?.filter(o=>!o.used).map(o=>({symbol:o.symbol,shortName:o.shortName,importedIn:o.importer}))??[]}function E(e,r){return e.all(`SELECT DISTINCT gs.symbol, d.relative_path AS importer
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d ON c.document_id = d.id
5
5
  JOIN global_symbols gs ON m.symbol_id = gs.id
6
6
  WHERE gs.symbol LIKE ?
7
7
  AND m.role = 2
8
- ORDER BY d.relative_path`,`%${r}%`).filter(o=>!e.isIgnored(o.importer)).map(o=>({symbol:o.symbol,shortName:a(o.symbol),fromFile:o.importer}))}function y(e,r,t=c(e,r)){let o=t?.relativePath??null,s=t?I(t.symbol):r.replace(/\(\)$/,""),n=t?h(t.symbol):!1,i=new Set;for(let l of p(e,{includeIgnored:!1}))for(let F of u(e,l))k(F,l,{targetFile:o,targetLeaf:s,targetIsModule:n,targetPattern:r})&&i.add(l);let m=f(r)?r.trim():null;return[...i].sort().map(l=>({symbol:m??t?.symbol??s,shortName:m??(t?a(t.symbol):s),fromFile:l}))}function R(e){return!!(e&&(e.symbol.startsWith("scip-clojure ")||g(e.relativePath)==="clojure"))}function O(e){let r=new Set,t=[];for(let o of e){let s=`${o.symbol}|${o.fromFile}`;r.has(s)||(r.add(s),t.push(o))}return t.sort((o,s)=>o.fromFile.localeCompare(s.fromFile)||o.shortName.localeCompare(s.shortName))}function k(e,r,t){return!e.sourcePath||t.targetFile&&_(e.sourcePath)!==_(t.targetFile)?!1:e.kind==="side-effect"||t.targetFile&&M(r)||e.kind==="namespace"&&D(e,t.targetPattern)||t.targetIsModule||e.kind==="named"&&e.importedName===t.targetLeaf?!0:e.kind==="namespace"&&e.usedMembers.includes(t.targetLeaf)}function D(e,r){let t=r.trim().replace(/\(\)$/,"");return f(t)?e.importedName===t||e.localName===t:!1}function f(e){let r=e.trim().replace(/\(\)$/,"");return r.includes(".")&&!r.includes("/")&&!r.includes(":")}function N(e,r,t={}){let o=b(e,r);return o?x(e,o,t)??(t.semantic===!1?null:L(e,o))??T(e,o):null}function x(e,r,t){let s=e.all(`SELECT DISTINCT
8
+ ORDER BY d.relative_path`,`%${r}%`).filter(o=>!e.isIgnored(o.importer)).map(o=>({symbol:o.symbol,shortName:a(o.symbol),fromFile:o.importer}))}function y(e,r,t=d(e,r)){let o=t?.relativePath??null,s=t?I(t.symbol):r.replace(/\(\)$/,""),n=t?b(t.symbol):!1,i=new Set;for(let l of g(e,{includeIgnored:!1}))for(let F of c(e,l))k(F,l,{targetFile:o,targetLeaf:s,targetIsModule:n,targetPattern:r})&&i.add(l);let m=p(r)?r.trim():null;return[...i].sort().map(l=>({symbol:m??t?.symbol??s,shortName:m??(t?a(t.symbol):s),fromFile:l}))}function R(e){return!!(e&&(e.symbol.startsWith("scip-clojure ")||h(e.relativePath)==="clojure"))}function O(e){let r=new Set,t=[];for(let o of e){let s=`${o.symbol}|${o.fromFile}`;r.has(s)||(r.add(s),t.push(o))}return t.sort((o,s)=>o.fromFile.localeCompare(s.fromFile)||o.shortName.localeCompare(s.shortName))}function k(e,r,t){return!e.sourcePath||t.targetFile&&u(e.sourcePath)!==u(t.targetFile)?!1:e.kind==="side-effect"||t.targetFile&&M(r)||e.kind==="namespace"&&D(e,t.targetPattern)||t.targetIsModule||e.kind==="named"&&e.importedName===t.targetLeaf?!0:e.kind==="namespace"&&e.usedMembers.includes(t.targetLeaf)}function D(e,r){let t=r.trim().replace(/\(\)$/,"");return p(t)?e.importedName===t||e.localName===t:!1}function p(e){let r=e.trim().replace(/\(\)$/,"");return r.includes(".")&&!r.includes("/")&&!r.includes(":")}function N(e,r,t={}){let o=_(e,r);return o?x(e,o,t)??(t.semantic===!1?null:L(e,o))??T(e,o):null}function x(e,r,t){let s=e.all(`SELECT DISTINCT
9
9
  gs.symbol,
10
10
  def_d.relative_path AS from_file,
11
11
  imp_d.relative_path AS importer,
@@ -31,5 +31,5 @@ import{a as b}from"./chunk-OFXN2BCT.js";import{c as d}from"./chunk-CYHIKTJN.js";
31
31
  LEFT JOIN documents def_d ON sym_def.document_id = def_d.id
32
32
  WHERE imp_d.relative_path = ?
33
33
  AND m.role = 2
34
- ORDER BY def_d.relative_path, gs.symbol`,r).filter(n=>!e.isIgnored(n.importer));if(s.length>0){let n=t.semantic===!1?[]:d(e,r);return s.map(i=>({symbol:i.symbol,shortName:a(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 L(e,r){let t=d(e,r);return t.length>0?t.map(o=>{let s=S(o.importedName,o.localName,o.kind);return{symbol:s,shortName:s,fromFile:o.sourcePath??"(external)",importer:r,used:o.kind==="side-effect"?!0:o.isUsed}}):null}function T(e,r){return u(e,r).map(t=>{let o=S(t.importedName,t.localName,t.kind),s=t.kind==="side-effect"?!0:t.used;return{symbol:o,shortName:o,fromFile:t.sourcePath??"(external)",importer:r,used:s}})}function S(e,r,t){return t==="namespace"&&e==="*"&&r?`* as ${r}`:t==="default"&&r?`default as ${r}`:t==="side-effect"?"(side effect import)":r&&r!==e?`${e} as ${r}`:e}function _(e){return e.replace(/\\/g,"/")}function M(e){return/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx)$/i.test(e)}export{U as a,j as b,B as c};
35
- //# sourceMappingURL=chunk-4ISHQ7UW.js.map
34
+ ORDER BY def_d.relative_path, gs.symbol`,r).filter(n=>!e.isIgnored(n.importer));if(s.length>0){let n=t.semantic===!1?[]:f(e,r);return s.map(i=>({symbol:i.symbol,shortName:a(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 L(e,r){let t=f(e,r);return t.length>0?t.map(o=>{let s=S(o.importedName,o.localName,o.kind);return{symbol:s,shortName:s,fromFile:o.sourcePath??"(external)",importer:r,used:o.kind==="side-effect"?!0:o.isUsed}}):null}function T(e,r){return c(e,r).map(t=>{let o=S(t.importedName,t.localName,t.kind),s=t.kind==="side-effect"?!0:t.used;return{symbol:o,shortName:o,fromFile:t.sourcePath??"(external)",importer:r,used:s}})}function S(e,r,t){return t==="namespace"&&e==="*"&&r?`* as ${r}`:t==="default"&&r?`default as ${r}`:t==="side-effect"?"(side effect import)":r&&r!==e?`${e} as ${r}`:e}function M(e){return/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx)$/i.test(e)}export{j as a,B as b,W as c};
35
+ //# sourceMappingURL=chunk-ETU2I5JM.js.map
@@ -0,0 +1,18 @@
1
+ import{a as S}from"./chunk-UAHZ57BR.js";import{b as D}from"./chunk-NAH5EAZS.js";import{c as v}from"./chunk-YDDGCJJG.js";import{m as y}from"./chunk-T2FQ4GHD.js";import{a as b}from"./chunk-64MNV6AB.js";import p from"path";var w={analysis:new Set(["domain","source","storage","symbols"]),core:new Set(["analysis","domain","resolution","source","storage","symbols"]),domain:new Set([]),instrumentation:new Set([]),"language-parsers":new Set(["core","domain","resolution","source","storage"]),queries:new Set(["analysis","core","domain","language-parsers","resolution","semantic","source","storage","symbols"]),reindex:new Set(["domain","language-parsers","resolution","runtime","semantic","source","storage","symbols"]),resolution:new Set(["domain","source","storage","symbols"]),runtime:new Set(["core","domain","queries","reindex","resolution","semantic","source","storage","symbols","tla"]),semantic:new Set(["core","domain","resolution","storage","symbols"]),source:new Set(["core","domain","storage"]),storage:new Set(["domain","source"]),symbols:new Set(["analysis","domain","language-parsers","resolution","semantic","source","storage"]),tla:new Set(["core","domain","queries","source","storage","symbols"])};function f(e){let t=e.replace(/\\/g,"/").split("/").filter(Boolean);return t.length<=1?"(root)":t.length>=3&&["src","lib","app","server","client"].includes(t[0])?`${t[0]}/${t[1]}`:t[0]}function h(e,n){if(e===n)return"ok";let t=g(e),i=g(n);return t&&i?!m(t)||!m(i)?null:P(t,i)?"ok":"violation":E(e,n)}function k(e,n){let t=g(f(e)),i=g(f(n));return!!t&&!!i&&m(t)&&m(i)}function R(e,n){let t=g(e),i=g(n);return!!t&&!!i&&(!m(t)||!m(i))}function g(e){return/^src\/([^/]+)$/.exec(e)?.[1]??null}function P(e,n){return n==="instrumentation"||n==="domain"?!0:e==="domain"?!1:w[e]?.has(n)??!1}function m(e){return Object.hasOwn(w,e)}function E(e,n){if(n==="shared")return"ok";let t={app:new Set(["core","shared","ui"]),core:new Set(["shared"]),infra:new Set(["core","shared"]),ui:new Set(["core","shared"])};return t[e]?t[e].has(n)?"ok":"violation":null}function re(e,n){let{scope:t,minDeviation:i=5,limit:r=50}=n??{},a=n?.semantic!==!1,c=n?.includePatternDeviations===!0,s=new S(e).fileDependencyGraph(t),l=F([...I(e,s,{scope:t,semantic:a}),...M(s),...c?N(s,i):[]]);return r<=0||l.results.length<=r?l:{...l,results:l.results.slice(0,r),totalResults:l.results.length}}function I(e,n,t){let i=T(e,t.scope),r=[],a=new Set;for(let[o,s]of n){if(d(o))continue;let l=i.get(o)??new Set;for(let u of s)d(u)||l.has(u)||_(e,o,u,t)||(r.push({file:o,dep:u}),a.add(o))}a.size>0&&U(e,i,{paths:[...a]});let c=[];for(let{file:o,dep:s}of r)(i.get(o)??new Set).has(s)||c.push({file:o,kind:"unused-import",description:`Depends on ${s} but references none of its symbols`,dep:s,actionTier:"direct",evidenceReasons:[`dependency edge exists from ${o} to ${s}`,"no semantic, source, type-only, side-effect, or Vue-template usage survived the conservative skip gates"],recommendation:"Remove the unused import or dependency edge after running the project checks."});return c}function _(e,n,t,i){return J(e,n,t)||z(e,n,t)||q(t)||W(e,n,t)||K(t)?!0:i.semantic&&C(e,n,t)}function M(e){let n=[],t=V(e);for(let[i,r]of e){if(d(i))continue;let a=f(i);for(let c of r){if(d(c))continue;let o=f(c);if(a===o)continue;let s=h(a,o),l=s===null&&R(a,o),u=s?"explicit":l?"unknown-layer":"inferred";if((l?"violation":s??t.get(`${a}->${o}`))==="violation"){let $=u==="explicit"?"direct":"signal";n.push({file:i,kind:"layer-violation",description:`Imports from ${o}/ (${c}) \u2014 may cross architectural boundary`,dep:c,detail:`${a}/ should not depend on ${o}/`,actionTier:$,policyBasis:u,evidenceReasons:[`dependency edge exists from ${i} to ${c}`,O(u,a,o)],recommendation:u==="explicit"?"Move the dependency behind an allowed layer boundary or document a policy change.":u==="unknown-layer"?"Add a layer policy entry before treating this as a boundary violation.":"Review whether this is a real boundary break or an intentional exception before moving code."})}}}return n}function O(e,n,t){return e==="explicit"?`explicit layer policy rejects ${n}/ -> ${t}/`:e==="unknown-layer"?`source layer policy has no entry for ${n}/ -> ${t}/`:`rare cross-layer edge ${n}/ -> ${t}/ is inferred as a violation`}function N(e,n){let t=[];for(let[i,r]of A(e)){let a=r.filter(o=>!d(o));if(a.length<n)continue;let c=L(e,a);for(let o of a)for(let s of e.get(o)??[])d(s)||(c.get(s)??0)===1&&p.dirname(s)!==i&&p.dirname(s)!==p.dirname(i)&&(k(o,s)||t.push({file:o,kind:"pattern-deviation",description:`Only file in ${i}/ that depends on ${s}`,dep:s,actionTier:"signal",evidenceReasons:[`${a.length} sibling file(s) in ${i}/ were compared`,`${o} is the only non-skipped sibling depending on ${s}`],recommendation:"Review sibling ownership before changing this import; unique dependency shape can be intentional specialization."}))}return t}function F(e){return{results:e,unusedImports:e.filter(n=>n.kind==="unused-import").length,layerViolations:e.filter(n=>n.kind==="layer-violation").length,patternDeviations:e.filter(n=>n.kind==="pattern-deviation").length}}function A(e){let n=new Map;for(let t of e.keys()){let i=p.dirname(t),r=n.get(i);r||(r=[],n.set(i,r)),r.push(t)}return n}function L(e,n){let t=new Map;for(let i of n)for(let r of e.get(i)??[])d(r)||t.set(r,(t.get(r)??0)+1);return t}function T(e,n){let t=new Map;return j(e,t,n),t}function j(e,n,t){for(let i of B(e,t))x(e,n,i.from_file,i.to_file)}function B(e,n){let t=n?"AND d1.relative_path LIKE ?":"",i=n?[`%${n}%`]:[];return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
2
+ FROM mentions m
3
+ JOIN chunks c ON m.chunk_id = c.id
4
+ JOIN documents d1 ON c.document_id = d1.id
5
+ JOIN global_symbols gs ON m.symbol_id = gs.id
6
+ JOIN (
7
+ SELECT m2.symbol_id, c2.document_id
8
+ FROM mentions m2
9
+ JOIN chunks c2 ON m2.chunk_id = c2.id
10
+ WHERE m2.role = 1
11
+ GROUP BY m2.symbol_id
12
+ ) sym_def ON sym_def.symbol_id = gs.id
13
+ JOIN documents d2 ON sym_def.document_id = d2.id
14
+ WHERE d1.id != d2.id
15
+ AND m.role != 1
16
+ ${e.pathExclusionsFor("d1","d2")}
17
+ ${t}`,...i)}function U(e,n,t={}){new S(e).scanSourceReferences({paths:t.paths??b(e,{includeIgnored:!1}),includeRustAttributeNames:!0,identifierResolution:"permissive"},r=>{r.target.relativePath!==r.sourceFile&&(e.isIgnored(r.target.relativePath)||x(e,n,r.sourceFile,r.target.relativePath))})}function x(e,n,t,i){if(e.isIgnored(t)||e.isIgnored(i))return;let r=n.get(t);r||(r=new Set,n.set(t,r)),r.add(i)}function V(e){let n=new Map;for(let[i,r]of e){if(d(i))continue;let a=f(i);for(let c of r){if(d(c))continue;let o=f(c);if(a===o||h(a,o))continue;let s=`${a}->${o}`;n.set(s,(n.get(s)??0)+1)}}let t=new Map;for(let[i,r]of n)t.set(i,r<=2?"violation":"ok");return t}function q(e){return e.includes("types")||e.endsWith(".d.ts")}function C(e,n,t){let i=v(e,n).filter(r=>r.sourcePath===t);return i.length>0&&i.some(r=>r.isUsed)}function J(e,n,t){let i=y(e,n).filter(r=>r.sourcePath===t);return i.length>0&&i.some(r=>r.used)}function z(e,n,t){let i=y(e,n).filter(r=>r.sourcePath===t);return i.length>0&&i.every(r=>r.isTypeOnly===!0)}function K(e){return e.endsWith(".vue")}function W(e,n,t){let i=y(e,n).filter(r=>r.sourcePath===t);return i.length===0?!1:i.every(r=>r.kind==="side-effect"||r.kind==="namespace"&&r.usedMembers.length===0&&!r.used)}function d(e){let n=D(e);return!!(n==="entry"||n==="barrel"||n==="test"||n==="worker"||H(p.basename(e)))}function H(e){return!!(e==="index.ts"||e==="index.js"||e==="cli.ts"||e==="main.ts"||e==="main.rs"||e.includes("worker.")||e.includes("postinstall.")||e==="health.ts"||e==="health.js")}export{re as a};
18
+ //# sourceMappingURL=chunk-EXKLAEB4.js.map
@@ -0,0 +1,3 @@
1
+ import{a as S}from"./chunk-QARYU7R3.js";import{a as y}from"./chunk-K6UI6EBZ.js";import{a as P}from"./chunk-B75HZHUP.js";import{a as x}from"./chunk-UAHZ57BR.js";import{a as h,g as b}from"./chunk-NAH5EAZS.js";import{a as v}from"./chunk-BGBBVSH4.js";import{d as l,e as p,h as u}from"./chunk-HXXMPYEF.js";import{a as f,f as m,g}from"./chunk-T2FQ4GHD.js";import{q as d}from"./chunk-WS3Z6W3M.js";import{basename as L,extname as D}from"path";function H(i,e){let{scope:n,maxLoc:t=15,limit:o=30,scanLimit:s}=e??{},a=new x(i);return y({candidates:()=>A(i,a,n,t),orderCandidates:P,scanLimit:s,profile:{name:"passthrough-candidates"},prepare:r=>a.calleeMap(r,{semantic:e?.semantic!==!1}),evaluate:(r,c)=>I(i,r,c.get(r.symbolId)??[]),orderResults:(r,c)=>r.loc-c.loc||r.file.localeCompare(c.file),limit:o})}function I(i,e,n){let t=j(n);if(t.size!==1||!m(i,e.relativePath,e.startLine,e.endLine))return null;let[,o]=[...t.entries()][0],s=T(i,e,o),a=w(i,e),r=s.length>0||a.length>0?"signal":"direct";return{symbol:e.symbol,shortName:l(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:v(e),forwardsTo:o.symbol,forwardsToShort:l(o.symbol),forwardsToFile:o.file,actionTier:r,boundaryEvidence:s,publicFacadeEvidence:a,recommendation:E(r,s,a)}}function T(i,e,n){return S(i,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:l(e.symbol)},{label:"callee name",value:l(n.symbol)},{label:"passthrough module",value:L(e.relativePath,D(e.relativePath))},{label:"callee module",value:L(n.file,D(n.file))}])}function E(i,e,n){if(i==="signal"){if(n.length>0)return`Review the public API before inlining; public-facade evidence: ${n.slice(0,2).join("; ")}.`;let t=e.filter(F);return t.length>0?`Review the public API before inlining; public-surface evidence: ${t.slice(0,2).join("; ")}.`:`Review the boundary before inlining; boundary evidence: ${e.slice(0,2).join("; ")}.`}return"Inline or remove this passthrough unless an external API or runtime registration depends on the forwarding name."}function w(i,e){return C(i,e)?h(i,e.relativePath)?["exported passthrough is declared on the package public surface"]:b(i,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function C(i,e){let n=d(i,e.relativePath);if(n.length===0)return!1;let t=n.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
2
+ `);return M.test(t)?!0:R(n,p(e.symbol))}function R(i,e){if(!e)return!1;let n=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${f(e)}\\b`);return i.some(t=>n.test(t))}function F(i){return i.includes("public surface")}function j(i){let e=i.some(t=>u(t.symbol))?i.filter(t=>u(t.symbol)):i,n=new Map;for(let t of e)n.has(t.symbol)||n.set(t.symbol,t);return n}function A(i,e,n,t){return e.productionCallableDefinitions({scope:n,minLoc:3,maxLoc:t,requireFunctionLikeSymbol:!0,excludeRustTraitImplMembers:!0}).filter(o=>!g(i,o))}var M=/^\s*export\s+(?:default\s+)?(?:(?:async\s+)?function\b|(?:const|let|var)\b)/m;export{H as a,C as b};
3
+ //# sourceMappingURL=chunk-EZ5WDZ2Q.js.map
@@ -1,6 +1,6 @@
1
- import{a as m}from"./chunk-OFXN2BCT.js";import{a as h}from"./chunk-NBNEVLRC.js";import{d as p}from"./chunk-NABVR6B7.js";import{readFileSync as f}from"fs";import{extname as y,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=L(e);if(r)return j(t,r.filePath,r.startLine,r.endLine,s);let l=h(t,e);return l?R(t,l,s):null}function L(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function R(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),l;try{l=f(r,"utf-8")}catch{return null}let n=l.split(`
2
- `),c=Math.max(0,e.startLine-a),i=Math.min(n.length-1,e.endLine+a),u=n.slice(c,i+1).join(`
3
- `);return{symbol:e.symbol,shortName:p(e.symbol),relativePath:e.relativePath,startLine:c,endLine:i,language:s?.language??v(e.relativePath),source:u}}function j(t,e,a,s,r){let l=m(t,e);if(!l)return null;let n=t.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",l);if(!n)return null;let c=d(t.config.projectRoot,n.relative_path),i;try{i=f(c,"utf-8")}catch{return null}let u=i.split(`
4
- `),o=Math.max(0,a-1-r),g=Math.min(u.length-1,s-1+r),b=u.slice(o,g+1).join(`
5
- `);return{symbol:`${n.relative_path}:${a}-${s}`,shortName:`${n.relative_path}:${a}-${s}`,relativePath:n.relative_path,startLine:o,endLine:g,language:n.language??v(n.relative_path),source:b}}function v(t){switch(y(t).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{M as a};
6
- //# sourceMappingURL=chunk-S2MRVIJ5.js.map
1
+ import{a as m}from"./chunk-OSWF3HSF.js";import{a as h}from"./chunk-ECVXWZ4Q.js";import{d as g}from"./chunk-HXXMPYEF.js";import{readFileSync as f}from"fs";import{extname as y,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=L(e);if(r)return j(t,r.filePath,r.startLine,r.endLine,s);let i=h(t,e);return i?R(t,i,s):null}function L(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function R(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),i;try{i=f(r,"utf-8")}catch{return null}let n=i.split(`
2
+ `),c=Math.max(0,e.startLine-a),l=Math.min(n.length-1,e.endLine+a),u=n.slice(c,l+1).join(`
3
+ `);return{symbol:e.symbol,shortName:g(e.symbol),relativePath:e.relativePath,startLine:c,endLine:l,language:s?.language??v(e.relativePath),source:u}}function j(t,e,a,s,r){let i=m(t,e);if(!i)return null;let n=t.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",i);if(!n)return null;let c=d(t.config.projectRoot,n.relative_path),l;try{l=f(c,"utf-8")}catch{return null}let u=l.split(`
4
+ `),o=Math.max(0,a-1-r),p=Math.min(u.length-1,s-1+r),b=u.slice(o,p+1).join(`
5
+ `);return{symbol:`${n.relative_path}:${a}-${s}`,shortName:`${n.relative_path}:${a}-${s}`,relativePath:n.relative_path,startLine:o,endLine:p,language:n.language??v(n.relative_path),source:b}}function v(t){switch(y(t).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{M as a};
6
+ //# sourceMappingURL=chunk-F5BJSNU5.js.map
@@ -0,0 +1,2 @@
1
+ import{b as oe}from"./chunk-B75HZHUP.js";import{a as N}from"./chunk-UAHZ57BR.js";import{b as J,e as $,f as G,g as X}from"./chunk-NAH5EAZS.js";import{c as se}from"./chunk-72MFTCU5.js";import{c as Y,d as ee,e as te,f as ne,l as ie}from"./chunk-MKM7NBZK.js";import{e as re}from"./chunk-YDDGCJJG.js";import{j as Q,o as _}from"./chunk-MBKJ7GHT.js";import{d as U,g as H,h as V,i as K,j as Z,k as q}from"./chunk-HXXMPYEF.js";import{m as W}from"./chunk-T2FQ4GHD.js";import{A as P,x as z}from"./chunk-ISLWJ4PY.js";import{b as O,l as b,m as B,o as j,p as I}from"./chunk-WS3Z6W3M.js";import{c as w}from"./chunk-GNG622H3.js";import{a as R}from"./chunk-64MNV6AB.js";import{b as L}from"./chunk-7S5E7KWT.js";var x=new WeakMap,ae=B({kind:"definition-exclusions",invalidation:j("definition-exclusions"),serialize:e=>JSON.stringify(e),deserialize:De});function le(e,t){let n=z(t);if(!(n==="rust"||n==="typescript"||n==="tsx"||n==="javascript"))return[];let r=I(e,t);if(!r)return[];let s=O(e,t,r),a=ae.read(e,t,s);if(a)return a;let u=n==="rust"?Te(e,t):Pe(e,t);return ae.write(e,t,s,u),u}function De(e){try{let t=JSON.parse(e);return!Array.isArray(t)||!t.every(Le)?null:t}catch{return null}}function Le(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.startLine!="number"||!Number.isFinite(t.startLine)||typeof t.endLine!="number"||!Number.isFinite(t.endLine)||typeof t.reason!="string"?!1:t.containerName===void 0||typeof t.containerName=="string"}var ue=new Set(["describe","it","test","fdescribe","fit","xdescribe","xit","beforeEach","afterEach","beforeAll","afterAll","before","after","suite","bench","benchmark"]),we=/\b(?:describe|it|test|fdescribe|fit|xdescribe|xit|beforeEach|afterEach|beforeAll|afterAll|before|after|suite|bench|benchmark)\s*\(/,Ie=/\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 Pe(e,t){let n=I(e,t);if(!n||!Ne(n))return[];let i=P(e,t);if(!i)return[];let r=x.get(i);if(r)return r;let s=!1,a=i.rootNode;for(let l of a.namedChildren){if(l.type!=="expression_statement")continue;let d=l.namedChild(0);if(!d||d.type!=="call_expression")continue;let o=d.namedChild(0);if(!o)continue;let c=o.type==="member_expression"?o.namedChild(o.namedChildCount-1)?.text:o.text;if(c&&ue.has(c)){s=!0;break}}let u=[];s&&u.push({startLine:0,endLine:a.endPosition.row,reason:"TS/JS test file (describe/it/test at top level)"});for(let l of a.namedChildren){let d=null,o=null;if(l.type==="function_declaration")d=l.namedChild(0)?.text??null,o=l;else if(l.type==="export_statement"){let c=l.namedChild(0);c?.type==="function_declaration"&&(d=c.namedChild(0)?.text??null,o=c)}else if(l.type==="lexical_declaration"){let c=l.namedChild(0);if(c?.type==="variable_declarator"){let p=c.namedChild(0)?.text,m=c.namedChild(1);p&&(m?.type==="arrow_function"||m?.type==="function_expression")&&(d=p,o=c)}}d&&/^use[A-Z]/.test(d)&&o&&u.push({startLine:o.startPosition.row,endLine:o.endPosition.row,reason:"React custom hook (use*)"})}return u.push(...de(i,new Set(["function_declaration","method_definition","class_declaration","interface_declaration","type_alias_declaration","enum_declaration","variable_declarator","export_statement"]),new Set(["comment"]))),x.set(i,u),u}function Ne(e){if(e.includes("scip-query"))return!0;let t=!1;for(let n of ue)if(e.includes(n)){t=!0;break}return t&&we.test(e)?!0:e.includes("use")&&Ie.test(e)}var ke=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale)?/i;function Fe(e){return ke.test(e)}function de(e,t,n){let i=[],r=s=>{if(t.has(s.type)&&s.parent){let u=s.parent.children,l=-1;for(let d=0;d<u.length;d+=1)if(u[d].startIndex===s.startIndex&&u[d].type===s.type){l=d;break}if(l>0)for(let d=l-1;d>=0;d-=1){let o=u[d];if(n.has(o.type)){if(Fe(o.text)){i.push({startLine:s.startPosition.row,endLine:s.endPosition.row,reason:"scip-query suppression comment"});break}continue}if(!(o.type==="attribute_item"||o.type==="inner_attribute_item"))break}}for(let a of s.namedChildren)r(a)};return r(e.rootNode),i}function Te(e,t){let n=P(e,t);if(!n)return[];let i=x.get(n);if(i)return i;let r=[],s=Ae(n);return s?(x.set(n,s),s):(fe(n.rootNode,r,!1,!1),r.push(...de(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"]))),r.push(...He(n.rootNode)),x.set(n,r),r)}function Ae(e){return Ve(e.rootNode)?[{startLine:0,endLine:e.rootNode.endPosition.row,reason:"generated file (@generated header)"}]:null}function fe(e,t,n,i){let r=n,s=i;e.type==="trait_item"&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait declaration body (dynamic dispatch)"}),e.type==="impl_item"&&e.childForFieldName("trait")&&(s=!0,t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl block (dynamic dispatch)"})),e.type==="function_item"||e.type==="function_signature_item"?Me(e,t,n,i):i&&Ue(e)?t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"trait impl associated item (dynamic dispatch)"}):e.type==="struct_item"||e.type==="enum_item"||e.type==="union_item"?Oe(e,t,n):e.type==="mod_item"&&k(e).some(a=>/#\[\s*cfg\s*\(\s*test\s*\)/.test(a))&&(r=!0);for(let a of e.namedChildren)fe(a,t,r,s)}function Me(e,t,n,i){let r=k(e),s=null;i?s="trait impl method (dynamic dispatch)":n&&(s="inside #[cfg(test)] mod");for(let a of r){let u=je(a);if(u){s=u;break}if(me(a)){s="#[allow(dead_code)]";break}}s&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:s})}function Oe(e,t,n){let i=k(e),r=e.namedChildren.find(s=>s.type==="type_identifier")?.text;i.some(We)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[derive(<reflective>)] \u2014 fields accessed via macro/reflection",containerName:r}),i.some(me)&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"#[allow(dead_code)]",containerName:r}),n&&t.push({startLine:e.startPosition.row,endLine:e.endPosition.row,reason:"inside #[cfg(test)] mod",containerName:r})}function k(e){let t=e.parent;if(!t)return[];let n=t.children,i=-1;for(let s=0;s<n.length;s+=1)if(n[s].startIndex===e.startIndex&&n[s].type===e.type){i=s;break}if(i<=0)return[];let r=[];for(let s=i-1;s>=0;s-=1){let a=n[s];if(a.type==="attribute_item"||a.type==="inner_attribute_item")r.push(a.text);else{if(a.type==="line_comment"||a.type==="block_comment")continue;break}}return r}var Be=[{re:/#\[\s*tauri::command\b/,reason:"#[tauri::command]"},{re:/#\[\s*command\b/,reason:"#[command]"},{re:/#\[\s*test\b/,reason:"#[test]"},{re:/#\[\s*bench\b/,reason:"#[bench]"},{re:/#\[\s*tokio::test\b/,reason:"#[tokio::test]"},{re:/#\[\s*async_std::test\b/,reason:"#[async_std::test]"},{re:/#\[\s*wasm_bindgen\b/,reason:"#[wasm_bindgen]"},{re:/#\[\s*no_mangle\b/,reason:"#[no_mangle]"},{re:/#\[\s*napi\b/,reason:"#[napi]"},{re:/#\[\s*pyfunction\b/,reason:"#[pyfunction]"},{re:/#\[\s*pymethod\b/,reason:"#[pymethod]"},{re:/#\[\s*pyo3\b/,reason:"#[pyo3]"},{re:/#\[\s*cfg\s*\(\s*test\s*\)/,reason:"#[cfg(test)]"},{re:/#\[\s*doc\s*\(\s*hidden\s*\)/,reason:"#[doc(hidden)]"}];function je(e){return Be.find(({re:t})=>t.test(e))?.reason??null}var ze=[/\bSerialize\b/,/\bDeserialize\b/,/\bFromRow\b/,/\bsqlx::FromRow\b/,/\bDeriveEntityModel\b/,/\bIntoSchema\b/,/\bToSchema\b/,/\bDeriveValueType\b/,/\bError\b/,/\bthiserror::Error\b/];function We(e){return/#\[\s*derive\s*\(/.test(e)?ze.some(t=>t.test(e)):!1}function me(e){return/#\[\s*allow\s*\(\s*dead_code\s*\)/.test(e)}function Ue(e){return e.type==="const_item"||e.type==="type_item"||e.type==="static_item"||e.type==="associated_type"}function He(e){let t=Ze(e);if(t.size===0)return[];let n=[];for(let i of e.descendantsOfType("mod_item")){let r=i.childForFieldName("name")?.text;r&&t.has(r)&&n.push({startLine:i.startPosition.row,endLine:i.endPosition.row,reason:'serde `with = "..."` module \u2014 body invoked via reflection',containerName:r})}return n}function Ve(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 Ke=/^#!?\[\s*serde\s*\(/,ce=/\bwith\s*=\s*"([^"]+)"/g;function Ze(e){let t=new Set;for(let n of e.descendantsOfType("attribute_item")){if(!Ke.test(n.text))continue;ce.lastIndex=0;let i;for(;(i=ce.exec(n.text))!==null;){let r=i[1],s=r.split("::").pop()??r;s&&t.add(s)}}return t}function pe(e){let t=new Map,n=i=>{let r=t.get(i);if(r)return r;let s=le(e,i);return r={ranges:s.map(a=>({startLine:a.startLine,endLine:a.endLine})),containers:new Set(s.map(a=>a.containerName).filter(a=>!!a))},t.set(i,r),r};return(i,r,s,a)=>{let u=n(i);for(let l of u.ranges)if(r>=l.startLine&&r<=l.endLine)return!0;if(a&&u.containers.has(a))return!0;for(let l of _(s))if(u.containers.has(l))return!0;return!1}}function gt(e,t={}){L(e,{groups:t.semanticProvider===!0?["whole-project","semantic-provider"]:["whole-project"]})}function be(e,t,n={}){L(e,{groups:n.definitions===!0?["source-file","definition-catalog"]:["source-file"],file:t.replace(/\\/g,"/")})}function ye(e,t){return t.isIgnoredPath(e.relativePath)?y("ignored-file"):K(e.symbol)?y("module-like-symbol"):E(e.symbol)?!e.isFunctionLike&&e.enclosingSymbol&&E(e.enclosingSymbol)?y("nested-non-callable-value"):!t.includeTests&&!S(e.relativePath)?y("test-file"):!t.includeTests&&t.isExcludedRegion(e.relativePath,e.startLine,e.symbol,e.parentTypeName)?y("excluded-file-region"):Z(e.symbol)?y("rust-trait-impl-member"):q(e.symbol)?y("rust-test-module"):!t.includeMembers&&!qe(e)?y("member"):e.endLine-e.startLine+1<t.minLoc?y("below-min-loc"):{accepted:!0}:y("non-value-symbol")}function S(e){return J(e)!=="test"}function y(e){return{accepted:!1,rejectionReason:e}}function E(e){return V(e)||e.endsWith("().")||e.endsWith(".")}function qe(e){return H(e.symbol)||_(e.symbol).length===0}function ge(){return new Map}function he(e,t,n){let i=new Map;for(let r of Y(e,n))e.isIgnored(r.relative_path)||t.has(r.relative_path)||v(i,r.symbol_id,r.relative_path,r.ref_count,"scip-mention");return i}function xe(e,t,n,i={}){let r=new Set;if(i.conservative||n.size===0){for(let s of te(e,t))r.add(s.symbol_id);return r}for(let s of ee(e,t))e.isIgnored(s.relative_path)||n.has(s.relative_path)||r.add(s.symbol_id);return r}function F(e,t){let n=e.get(t);if(!n)return!1;for(let i of n.values())if(i.occurrences>0)return!0;return!1}function C(e,t,n){let i=e.get(t);if(!i)return!1;for(let[r,s]of i)if(r!==n&&s.occurrences>0)return!0;return!1}function Se(e){return e?.occurrences??0}function v(e,t,n,i,r="source-fallback"){if(i<=0)return;let s=_e(e,t,n);s.occurrences+=i,s.sources.add(r)}function Re(e,t,n,i,r){if(i<=0)return;let s=_e(e,t,n);s.occurrences=Math.max(i,s.occurrences),s.sources.add(r)}function _e(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));let r=i.get(n);return r||(r={occurrences:0,sources:new Set},i.set(n,r)),r}var Je=3e3,$e=1e3;function Ut(e,t={}){let{scope:n,minLoc:i=1,includeTests:r=!1,skipBarrels:s=!1,includeMembers:a=!1,deadCodeOnly:u=!1,scanLimit:l,semantic:d=!0}=t,o=0,c=b("dead.candidates",()=>{let f=oe(Ge(e,{scope:n,minLoc:i,includeTests:r,includeMembers:a}),l);return o=f.length,f},()=>({definitions:o})),p=0,m=s?b("dead.inactive-barrels",()=>{let f=new Set($(e));return p=f.size,f},()=>({paths:p})):new Set,T=0,g=u?ge():b("dead.mention-reference-counts",()=>{let f=he(e,m,c.map(D=>D.symbolId));return T=f.size,f},()=>({definitions:c.length,symbolsWithReferences:T})),A=0,Ce=u?b("dead.mentioned-symbol-ids",()=>{let f=xe(e,c.map(D=>D.symbolId),m,{conservative:m.size===0});return A=f.size,f},()=>({definitions:c.length,referencedSymbols:A})):new Set,h=u?c.filter(f=>!Ce.has(f.symbolId)):c.filter(f=>!C(g,f.symbolId,f.relativePath));u?b("dead.source-fallback.dead-code-only",()=>tt(e,h,g,{includeTests:r,inactiveBarrelPaths:m}),()=>({definitions:h.length,includeTests:r})):b("dead.source-fallback.ast",()=>et(e,h,g,{includeTests:r,inactiveBarrelPaths:m}),()=>({definitions:h.length,includeTests:r}));let M=u?h.filter(f=>!F(g,f.symbolId)):h.filter(f=>!C(g,f.symbolId,f.relativePath));b("dead.caller-map-supplement",()=>ot(e,M,g,{includeTests:r,inactiveBarrelPaths:m,includeSemantic:!u&&d}),()=>({definitions:M.length,semantic:!u&&d}));let ve=u?h.filter(f=>!F(g,f.symbolId)):c;return Ye(e,Xe(ve,g))}function Ge(e,t){let n=pe(e),i=[];for(let r of Q(e,{scope:t.scope,symbolMatches:E,sqlPrefilter:"function-like"}))ye(r,{minLoc:t.minLoc,includeTests:t.includeTests,includeMembers:t.includeMembers,isIgnoredPath:a=>e.isIgnored(a),isExcludedRegion:n}).accepted&&i.push(r);return i}function Xe(e,t){return e.map(n=>Qe(n,t)).filter(n=>n.cross_file_refs===0).sort((n,i)=>i.loc-n.loc||n.relative_path.localeCompare(i.relative_path)||n.start_line-i.start_line)}function Qe(e,t){let n=t.get(e.symbolId)??new Map,i=Se(n.get(e.relativePath)),r=0;for(let[s,a]of n)s!==e.relativePath&&(r+=a.occurrences);return{relative_path:e.relativePath,start_line:e.startLine,end_line:e.endLine,loc:e.endLine-e.startLine+1,symbol:e.symbol,same_file_refs:i,cross_file_refs:r}}function Ye(e,t){let n=[],i=0,r=0,s=0;for(let a of t){if(e.isIgnored(a.relative_path)||G(e,a.relative_path)||X(e,a.symbol,a.relative_path))continue;let u=a.same_file_refs===0?"dead-code":"file-internal";u==="dead-code"?i++:r++,s+=a.loc,n.push({relativePath:a.relative_path,startLine:a.start_line,endLine:a.end_line,loc:a.loc,symbol:a.symbol,shortName:U(a.symbol),sameFileRefs:a.same_file_refs,kind:u})}return{symbols:n,counts:{total:n.length,deadCode:i,fileInternal:r,loc:s},totalCount:n.length,deadCodeCount:i,fileInternalCount:r,totalLoc:s}}function et(e,t,n,i){if(t.length===0)return;let r=new N(e),s=new Set(t.map(l=>l.symbolId)),a=new Set(t.map(l=>l.leaf).filter(Boolean)),u=new Set(r.sourceFiles());for(let l of R(e))u.add(l);r.scanSourceReferences({paths:u,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:a,skipPath:l=>i.inactiveBarrelPaths.has(l)||!i.includeTests&&!S(l)},l=>{s.has(l.target.symbolId)&&(it(e,l)||v(n,l.target.symbolId,l.sourceFile,st(l),"source-fallback"))})}function tt(e,t,n,i){if(t.length===0)return;let r=new N(e),s=nt(t),a=new Set(r.sourceFiles());for(let o of R(e))a.add(o);let u=new Set(s.keys()),l=new Map,d=o=>{let c=l.get(o);return c||(c=ie(e,o),l.set(o,c)),c};r.scanSourceReferences({paths:a,includeVueSfc:!0,includeCrossLanguageDispatchNames:!0,includeRustAttributeNames:!0,identifierResolution:"permissive",candidateNames:u,skipPath:o=>i.inactiveBarrelPaths.has(o)||!i.includeTests&&!S(o),resolveTargets:({sourceFile:o,name:c,kind:p})=>{let m=s.get(c);return m?rt(o,c,m,()=>d(o),{permissive:p!=="cross-language-dispatch"}):[]},afterPath:o=>{l.delete(o),be(e,o)}},o=>{let c=o.kind==="identifier"&&o.sourceFile===o.target.relativePath?Math.max(0,o.occurrences-1):o.occurrences;o.kind==="identifier"&&Ee(e,{sourceFile:o.sourceFile,name:o.name,target:o.target,occurrences:c})||v(n,o.target.symbolId,o.sourceFile,c,"source-fallback")})}function nt(e){let t=new Map;for(let n of e){if(!n.leaf)continue;let i=t.get(n.leaf)??[];i.push(n),t.set(n.leaf,i)}return t}function rt(e,t,n,i,r){let s=n.filter(d=>d.relativePath===e);if(s.length>0)return s;if(!r.permissive&&n.length===1)return[...n];let a=i(),u=a.get(t);if(u)for(let d of u){let o=n.filter(c=>w(d,c.relativePath));if(o.length>0)return o}let l=new Set;for(let d of a.values())for(let o of d)l.add(o);for(let d of l){let o=n.filter(c=>w(d,c.relativePath));if(o.length>0&&o.length===n.length)return o}return r.permissive?[...n]:[]}function it(e,t){return t.kind==="cross-language-dispatch"&&t.target.relativePath===t.sourceFile?!0:t.kind==="identifier"&&Ee(e,t)}function st(e){return e.kind==="identifier"&&e.target.relativePath===e.sourceFile?Math.max(0,e.occurrences-1):e.occurrences}function Ee(e,t){return t.occurrences>1?!1:W(e,t.sourceFile).some(n=>n.used||n.sourcePath!==t.target.relativePath?!1:n.importedName===t.name||n.localName===t.name)}function ot(e,t,n,i){let r=i.includeSemantic!==!1,s=r&&t.length>=Je&&R(e).length>=$e,a=(o,c)=>{c===o.relativePath||e.isIgnored(c)||i.inactiveBarrelPaths.has(c)||!i.includeTests&&!S(c)||Re(n,o.symbolId,c,1,"caller-map")};if(s?b("dead.caller-map.mention-chunks",()=>at(e,t,a),()=>({definitions:t.length})):b("dead.caller-map.per-symbol",()=>{for(let o of t){let c=se(e,o,{semantic:r});if(c.length!==0)for(let p of c)a(o,p.file)}},()=>({definitions:t.length,semantic:r})),!s)return;let u=0,l=b("dead.caller-map.semantic-candidates",()=>{let o=t.filter(c=>!C(n,c.symbolId,c.relativePath));return u=o.length,o},()=>({definitions:t.length,semanticCandidates:u}));if(l.length===0)return;let d=re(e,l);for(let o of l){let c=d.get(o.symbolId);if(c)for(let p of c)a(o,p)}}function at(e,t,n){let i=new Map(t.map(r=>[r.symbolId,r]));for(let r of ne(e,[...i.keys()])){let s=i.get(r.symbol_id);s&&n(s,r.relative_path)}}export{gt as a,Ut as b};
2
+ //# sourceMappingURL=chunk-FBCOFKEC.js.map