scip-query 0.19.8 → 0.20.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 (366) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +158 -48
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/chunk-26QA6FAI.js +8 -0
  5. package/dist/{chunk-KJ2IIBZN.js → chunk-2HPVVXM5.js} +2 -2
  6. package/dist/chunk-2KAZEZ6M.js +2 -0
  7. package/dist/chunk-32LVLCLN.js +40 -0
  8. package/dist/{chunk-24GTWJ3N.js → chunk-3CLX5EOX.js} +2 -2
  9. package/dist/{chunk-QGGLL3UH.js → chunk-3G66UZBH.js} +2 -2
  10. package/dist/{chunk-AA4UWRNL.js → chunk-3ORVDL3H.js} +2 -2
  11. package/dist/chunk-4MAK2HOY.js +6 -0
  12. package/dist/{chunk-QIQ63BHW.js → chunk-4TURLRL5.js} +2 -2
  13. package/dist/chunk-4UQVNCQE.js +2 -0
  14. package/dist/chunk-55Q3WLZX.js +2 -0
  15. package/dist/{chunk-CTF2GDEX.js → chunk-5E4WNAVD.js} +2 -2
  16. package/dist/{chunk-ZCEJ63SP.js → chunk-5I5G2QOX.js} +2 -2
  17. package/dist/chunk-6LDJQXAH.js +2 -0
  18. package/dist/{chunk-3EDFLQ6A.js → chunk-6O5TICIZ.js} +2 -2
  19. package/dist/{chunk-ACAM6O5R.js → chunk-6SHPK5ZE.js} +2 -2
  20. package/dist/chunk-7BAVHKMJ.js +49 -0
  21. package/dist/chunk-7O5IKBTZ.js +16 -0
  22. package/dist/{chunk-WJL2L6MV.js → chunk-7PIO7NKH.js} +2 -2
  23. package/dist/chunk-7S5E7KWT.js +2 -0
  24. package/dist/{chunk-YLFORA5G.js → chunk-7SQQWSY3.js} +2 -2
  25. package/dist/chunk-7WPLAODU.js +5 -0
  26. package/dist/chunk-A73XVBCR.js +20 -0
  27. package/dist/chunk-AFHORGLH.js +42 -0
  28. package/dist/chunk-AIE7TFJW.js +9 -0
  29. package/dist/{chunk-TWMJ3Y3G.js → chunk-AZJQQKDD.js} +2 -2
  30. package/dist/{chunk-BDOIKGDI.js → chunk-B2PX5I6M.js} +2 -2
  31. package/dist/{chunk-DQBCO2UY.js → chunk-B7PBSLZN.js} +2 -2
  32. package/dist/chunk-BBW6JFHN.js +2 -0
  33. package/dist/{chunk-YTVWB7YJ.js → chunk-BDCC2NPY.js} +2 -2
  34. package/dist/{chunk-O23I56NA.js → chunk-BNXCIFVY.js} +2 -2
  35. package/dist/{chunk-MLFZP76A.js → chunk-BPAPWKP6.js} +2 -2
  36. package/dist/chunk-BS2NMXQZ.js +4 -0
  37. package/dist/chunk-C3KV2II6.js +2 -0
  38. package/dist/chunk-C43RDDP4.js +20 -0
  39. package/dist/{chunk-K2WO7XY7.js → chunk-CJST5ETY.js} +2 -2
  40. package/dist/chunk-DAFAHMNB.js +42 -0
  41. package/dist/{chunk-KKME5ZAI.js → chunk-DQGFVPUV.js} +2 -2
  42. package/dist/chunk-DQLPXMH6.js +8 -0
  43. package/dist/chunk-EKZTZXHZ.js +117 -0
  44. package/dist/{chunk-FJ5UDTQF.js → chunk-EN3O7VJA.js} +2 -2
  45. package/dist/{chunk-HZYDQPNY.js → chunk-EW2NTSFA.js} +2 -2
  46. package/dist/chunk-F3Z4OUDS.js +8 -0
  47. package/dist/chunk-FJH2NW7J.js +66 -0
  48. package/dist/{chunk-MSBDMFER.js → chunk-FKSELJQF.js} +2 -2
  49. package/dist/chunk-FTFP6O3L.js +11 -0
  50. package/dist/chunk-FYLK2DEJ.js +2 -0
  51. package/dist/{chunk-WUW7YUAH.js → chunk-GH74ASD6.js} +2 -2
  52. package/dist/{chunk-464PLI5O.js → chunk-GMXWZP2B.js} +2 -2
  53. package/dist/chunk-GOUBFH5O.js +3 -0
  54. package/dist/{chunk-FIJCV235.js → chunk-HLF2TX6R.js} +2 -2
  55. package/dist/{chunk-WWKWUPSU.js → chunk-HX4GQPZP.js} +2 -2
  56. package/dist/chunk-HX7M4BDI.js +30 -0
  57. package/dist/chunk-HZ72SESS.js +128 -0
  58. package/dist/{chunk-SERUIGV5.js → chunk-IB2N4FIY.js} +2 -2
  59. package/dist/chunk-ILMHV3KM.js +2 -0
  60. package/dist/chunk-IZYYAFN5.js +2 -0
  61. package/dist/{chunk-GNC4JVAN.js → chunk-JAYYFEQY.js} +2 -2
  62. package/dist/{chunk-QJIVBYEK.js → chunk-JDOEX4E6.js} +2 -2
  63. package/dist/chunk-JFGGXWQF.js +947 -0
  64. package/dist/chunk-JN4NMBEX.js +8 -0
  65. package/dist/{chunk-6M7RONVB.js → chunk-JVYA47YU.js} +2 -2
  66. package/dist/{chunk-7KYNAMMH.js → chunk-JW56N3KI.js} +2 -2
  67. package/dist/{chunk-OUBAF226.js → chunk-JZ2OXNWB.js} +2 -2
  68. package/dist/chunk-KMKTIO2G.js +8 -0
  69. package/dist/chunk-L5GJNV2T.js +8 -0
  70. package/dist/{chunk-MNSTUIDD.js → chunk-L7AW2QB5.js} +2 -2
  71. package/dist/chunk-L7JDSCDF.js +4 -0
  72. package/dist/chunk-LU47HG23.js +14 -0
  73. package/dist/chunk-LVY7NPF7.js +2 -0
  74. package/dist/chunk-LY4WC4AD.js +74 -0
  75. package/dist/{chunk-7FT5Y65S.js → chunk-MKCDWWGV.js} +2 -2
  76. package/dist/chunk-MNE7YG56.js +2 -0
  77. package/dist/{chunk-7QHY3H7P.js → chunk-MRXBEXSY.js} +2 -2
  78. package/dist/chunk-MV7OWDUX.js +2 -0
  79. package/dist/{chunk-ZJ5CBXK3.js → chunk-N5W4YZMK.js} +2 -2
  80. package/dist/chunk-NGEXCJJW.js +11 -0
  81. package/dist/{chunk-7SWJEWJF.js → chunk-NIW6JDC5.js} +2 -2
  82. package/dist/{chunk-O3O4XXO6.js → chunk-O64IZ6UX.js} +2 -2
  83. package/dist/{chunk-3ZSJ3PWF.js → chunk-PBUQFCNB.js} +2 -2
  84. package/dist/{chunk-7RAG65VK.js → chunk-POAVPHH7.js} +2 -2
  85. package/dist/{chunk-A3QXWFBK.js → chunk-PQCI4SQX.js} +2 -2
  86. package/dist/{chunk-4BV4QAZJ.js → chunk-PXY7F6Y4.js} +2 -2
  87. package/dist/chunk-RDO52JGY.js +2 -0
  88. package/dist/chunk-RJT3TUUZ.js +2 -0
  89. package/dist/{chunk-S4S2WOIX.js → chunk-RUJURYSV.js} +2 -2
  90. package/dist/{chunk-JAY7YWS3.js → chunk-RVLDN63O.js} +2 -2
  91. package/dist/chunk-RXOXSKY3.js +2 -0
  92. package/dist/chunk-S7OYBOCK.js +2 -0
  93. package/dist/chunk-SMNXQT5Z.js +3 -0
  94. package/dist/{chunk-NE3TZUCI.js → chunk-SRAFT254.js} +2 -2
  95. package/dist/{chunk-ELLMY7XJ.js → chunk-SXP2MBJH.js} +2 -2
  96. package/dist/chunk-T7YQSHPQ.js +3 -0
  97. package/dist/{chunk-WY45BHKQ.js → chunk-TFRAYKN6.js} +2 -2
  98. package/dist/{chunk-2SNGN6U4.js → chunk-UJCOIXDY.js} +2 -2
  99. package/dist/{chunk-MZZBAITE.js → chunk-UJPRPGCO.js} +2 -2
  100. package/dist/chunk-W4ETQAXM.js +2 -0
  101. package/dist/chunk-WCCFZ7V7.js +113 -0
  102. package/dist/chunk-WUPW3UN3.js +3 -0
  103. package/dist/{chunk-7LSVMFX7.js → chunk-WXZLAAWK.js} +2 -2
  104. package/dist/{chunk-5ML2BNRH.js → chunk-X54AGLVX.js} +2 -2
  105. package/dist/chunk-XKWKXZKW.js +20 -0
  106. package/dist/{chunk-5YLUDDAF.js → chunk-XSRF6Q77.js} +2 -2
  107. package/dist/chunk-Y2MVPNKY.js +5 -0
  108. package/dist/{chunk-JHF3E4YM.js → chunk-YKUU5AIC.js} +2 -2
  109. package/dist/{chunk-E3HYEQO7.js → chunk-YLCJLTPL.js} +2 -2
  110. package/dist/{chunk-7VCOXZH3.js → chunk-YTQVETEO.js} +2 -2
  111. package/dist/chunk-Z4N3MZYA.js +38 -0
  112. package/dist/chunk-ZHXX42OH.js +18 -0
  113. package/dist/chunk-ZJOOT3BG.js +2 -0
  114. package/dist/{chunk-P3UO3EH3.js → chunk-ZK26BAQL.js} +2 -2
  115. package/dist/{chunk-33KUO7CG.js → chunk-ZTETIQ35.js} +2 -2
  116. package/dist/cli.js +3 -8
  117. package/dist/command-descriptors-DSS46KXI.js +642 -0
  118. package/dist/{config-types-B6MEoRNy.d.ts → config-types-jVM3D7MA.d.ts} +68 -2
  119. package/dist/{db-DYLKr9Wn.d.ts → db-B5PM5yNk.d.ts} +20 -2
  120. package/dist/{diff-gate-types-C9BoYwYD.d.ts → diff-gate-types-B0QYpDv1.d.ts} +2 -1
  121. package/dist/direct-navigation-6YHV6IB5.js +3 -0
  122. package/dist/{health-DgxIDXJC.d.ts → health-Do5TKSJI.d.ts} +1 -1
  123. package/dist/index.d.ts +3 -3
  124. package/dist/index.js +1 -1
  125. package/dist/postinstall.js +1 -1
  126. package/dist/queries/affected.d.ts +2 -2
  127. package/dist/queries/affected.js +1 -1
  128. package/dist/queries/architecture.d.ts +2 -2
  129. package/dist/queries/architecture.js +1 -1
  130. package/dist/queries/bottlenecks.d.ts +2 -2
  131. package/dist/queries/bottlenecks.js +1 -1
  132. package/dist/queries/by-kind.d.ts +2 -2
  133. package/dist/queries/by-kind.js +1 -1
  134. package/dist/queries/call-graph.d.ts +2 -2
  135. package/dist/queries/call-graph.js +1 -1
  136. package/dist/queries/change-surface.d.ts +22 -3
  137. package/dist/queries/change-surface.js +1 -1
  138. package/dist/queries/cleanup-plan.d.ts +2 -2
  139. package/dist/queries/cleanup-plan.js +1 -1
  140. package/dist/queries/co-change.d.ts +2 -2
  141. package/dist/queries/co-change.js +1 -1
  142. package/dist/queries/code.d.ts +2 -2
  143. package/dist/queries/code.js +1 -1
  144. package/dist/queries/complexity-hotspots.d.ts +3 -3
  145. package/dist/queries/complexity-hotspots.js +1 -1
  146. package/dist/queries/complexity.d.ts +3 -3
  147. package/dist/queries/complexity.js +1 -1
  148. package/dist/queries/convergence.d.ts +2 -2
  149. package/dist/queries/convergence.js +1 -1
  150. package/dist/queries/coupling.d.ts +2 -2
  151. package/dist/queries/coupling.js +1 -1
  152. package/dist/queries/cycles.d.ts +2 -2
  153. package/dist/queries/cycles.js +1 -1
  154. package/dist/queries/dataflow.d.ts +2 -2
  155. package/dist/queries/dataflow.js +1 -1
  156. package/dist/queries/dead.d.ts +2 -2
  157. package/dist/queries/dead.js +1 -1
  158. package/dist/queries/decorative-checkers.d.ts +2 -2
  159. package/dist/queries/decorative-checkers.js +1 -1
  160. package/dist/queries/deep-chains.d.ts +2 -2
  161. package/dist/queries/deep-chains.js +1 -1
  162. package/dist/queries/deps.d.ts +2 -2
  163. package/dist/queries/deps.js +1 -1
  164. package/dist/queries/diff-gate.d.ts +40 -7
  165. package/dist/queries/diff-gate.js +1 -1
  166. package/dist/queries/diff-impact.d.ts +84 -6
  167. package/dist/queries/diff-impact.js +1 -1
  168. package/dist/queries/doc-drift.d.ts +3 -3
  169. package/dist/queries/doc-drift.js +1 -1
  170. package/dist/queries/drift.d.ts +2 -2
  171. package/dist/queries/drift.js +1 -1
  172. package/dist/queries/duplicate-bodies.d.ts +3 -3
  173. package/dist/queries/duplicate-bodies.js +1 -1
  174. package/dist/queries/extract-candidates.d.ts +2 -2
  175. package/dist/queries/extract-candidates.js +1 -1
  176. package/dist/queries/fan.d.ts +2 -2
  177. package/dist/queries/fan.js +1 -1
  178. package/dist/queries/files.d.ts +12 -3
  179. package/dist/queries/files.js +1 -1
  180. package/dist/queries/health.d.ts +3 -3
  181. package/dist/queries/health.js +1 -1
  182. package/dist/queries/hierarchy.d.ts +2 -2
  183. package/dist/queries/hierarchy.js +1 -1
  184. package/dist/queries/hotspots.d.ts +2 -2
  185. package/dist/queries/hotspots.js +1 -1
  186. package/dist/queries/imports.d.ts +2 -2
  187. package/dist/queries/imports.js +1 -1
  188. package/dist/queries/incomplete-migration.d.ts +8 -6
  189. package/dist/queries/incomplete-migration.js +1 -1
  190. package/dist/queries/index.d.ts +141 -10
  191. package/dist/queries/index.js +1 -1
  192. package/dist/queries/isolated.d.ts +2 -2
  193. package/dist/queries/isolated.js +1 -1
  194. package/dist/queries/locality-candidates.d.ts +2 -2
  195. package/dist/queries/locality-candidates.js +1 -1
  196. package/dist/queries/members.d.ts +2 -2
  197. package/dist/queries/members.js +1 -1
  198. package/dist/queries/methods.d.ts +34 -3
  199. package/dist/queries/methods.js +1 -1
  200. package/dist/queries/not-implemented.d.ts +2 -2
  201. package/dist/queries/not-implemented.js +1 -1
  202. package/dist/queries/outline.d.ts +2 -2
  203. package/dist/queries/outline.js +1 -1
  204. package/dist/queries/passthrough-candidates.d.ts +3 -3
  205. package/dist/queries/passthrough-candidates.js +1 -1
  206. package/dist/queries/plan-context.d.ts +3 -3
  207. package/dist/queries/plan-context.js +1 -1
  208. package/dist/queries/react-component-duplicates.d.ts +2 -2
  209. package/dist/queries/react-component-duplicates.js +1 -1
  210. package/dist/queries/react-hook-candidates.d.ts +2 -2
  211. package/dist/queries/react-hook-candidates.js +1 -1
  212. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  213. package/dist/queries/react-large-component-pressure.js +1 -1
  214. package/dist/queries/recent-duplicates.d.ts +2 -2
  215. package/dist/queries/recent-duplicates.js +1 -1
  216. package/dist/queries/redundant-reexports.d.ts +2 -2
  217. package/dist/queries/redundant-reexports.js +1 -1
  218. package/dist/queries/refs.d.ts +2 -2
  219. package/dist/queries/refs.js +1 -1
  220. package/dist/queries/self-audit.d.ts +2 -2
  221. package/dist/queries/self-audit.js +1 -1
  222. package/dist/queries/similar-chains.d.ts +2 -2
  223. package/dist/queries/similar-chains.js +1 -1
  224. package/dist/queries/similar-files.d.ts +2 -2
  225. package/dist/queries/similar-files.js +1 -1
  226. package/dist/queries/similar-signatures.d.ts +2 -2
  227. package/dist/queries/similar-signatures.js +1 -1
  228. package/dist/queries/similar.d.ts +2 -2
  229. package/dist/queries/similar.js +1 -1
  230. package/dist/queries/slice.d.ts +2 -2
  231. package/dist/queries/slice.js +1 -1
  232. package/dist/queries/stale-abstractions.d.ts +2 -2
  233. package/dist/queries/stale-abstractions.js +1 -1
  234. package/dist/queries/stats.d.ts +2 -2
  235. package/dist/queries/surface.d.ts +2 -2
  236. package/dist/queries/surface.js +1 -1
  237. package/dist/queries/symbols.d.ts +2 -2
  238. package/dist/queries/symbols.js +1 -1
  239. package/dist/queries/system.d.ts +2 -2
  240. package/dist/queries/system.js +1 -1
  241. package/dist/queries/test-quality.d.ts +2 -2
  242. package/dist/queries/test-quality.js +1 -1
  243. package/dist/queries/trace.d.ts +2 -2
  244. package/dist/queries/trace.js +1 -1
  245. package/dist/queries/twin-ab.d.ts +14 -3
  246. package/dist/queries/twin-ab.js +1 -1
  247. package/dist/queries/twin-drift.d.ts +2 -2
  248. package/dist/queries/twin-drift.js +1 -1
  249. package/dist/queries/unused-imports.d.ts +2 -2
  250. package/dist/queries/unused-imports.js +1 -1
  251. package/dist/queries/unused-params.d.ts +2 -2
  252. package/dist/queries/unused-params.js +1 -1
  253. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  254. package/dist/queries/vue-component-duplicates.js +1 -1
  255. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  256. package/dist/queries/vue-composable-candidates.js +1 -1
  257. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  258. package/dist/queries/vue-large-view-pressure.js +1 -1
  259. package/dist/queries/wrapper-candidates.d.ts +2 -2
  260. package/dist/queries/wrapper-candidates.js +1 -1
  261. package/dist/reindex-worker.js +21 -21
  262. package/dist/reindex.d.ts +3 -3
  263. package/dist/reindex.js +33 -33
  264. package/dist/runtime.d.ts +5 -3
  265. package/dist/runtime.js +3 -3
  266. package/dist/rust-semantic-session-server.js +1 -1
  267. package/dist/rust-semantic-session-worker.js +1 -1
  268. package/dist/rust-semantic-worker.js +1 -1
  269. package/dist/{scip-cli-Cc6c00-a.d.ts → scip-cli-BnEwZRLJ.d.ts} +1 -1
  270. package/dist/{symbol-types-BgWU6lhL.d.ts → symbol-types-BIQwfoAx.d.ts} +7 -1
  271. package/dist/typescript-mailbox-worker.js +2 -0
  272. package/dist/watch-server.js +2 -42
  273. package/docs/AGENT_GUIDE.md +13 -6
  274. package/docs/CLI_JSON_OUTPUT.md +110 -22
  275. package/docs/COMMAND_REFERENCE.md +88 -88
  276. package/docs/COMMITTED_RECORD_COMPATIBILITY.md +55 -18
  277. package/docs/DURABILITY.md +88 -38
  278. package/docs/INDEX_GENERATIONS.md +65 -19
  279. package/docs/MAILBOX_LIFECYCLE.md +28 -1
  280. package/docs/REINDEX_METADATA_COMPATIBILITY.md +18 -8
  281. package/docs/SECURITY_MODEL.md +31 -14
  282. package/docs/TELEMETRY_RETENTION.md +11 -4
  283. package/docs/WATCH_REFRESH_REQUESTS.md +34 -21
  284. package/docs/WINDOWS_SIDECAR_RELEASE.md +9 -4
  285. package/docs/analyzer-inventory.md +31 -22
  286. package/docs/analyzer-validation-ledger.md +8 -0
  287. package/docs/schemas/outcome-event-record.schema.json +57 -1
  288. package/docs/schemas/project-config.schema.json +82 -1
  289. package/docs/schemas/suppression-record.schema.json +84 -3
  290. package/package.json +5 -5
  291. package/skills/_shared/SKILL.md +2 -2
  292. package/skills/_shared/references/agent-contract-catalog.md +1 -1
  293. package/skills/_shared/references/detector-precision-and-diffgate.md +1 -1
  294. package/skills/scip-audit/SKILL.md +6 -6
  295. package/skills/scip-audit/references/claims.md +1 -1
  296. package/skills/scip-audit/references/cleanup.md +19 -20
  297. package/skills/scip-audit/references/directory.md +4 -4
  298. package/skills/scip-audit/references/frontend.md +10 -10
  299. package/skills/scip-audit/references/twin-drift.md +2 -2
  300. package/skills/scip-diagnose/references/debug.md +8 -8
  301. package/skills/scip-diagnose/references/root-cause.md +3 -3
  302. package/skills/scip-diagnose/references/triage.md +10 -10
  303. package/skills/scip-explore/SKILL.md +3 -3
  304. package/skills/scip-improve/SKILL.md +10 -10
  305. package/skills/scip-improve/references/cleanup-batches.md +3 -3
  306. package/skills/scip-improve/references/directory-moves.md +3 -3
  307. package/skills/scip-improve/references/doc-reconcile.md +1 -1
  308. package/skills/scip-improve/references/frontend-extraction.md +2 -2
  309. package/skills/scip-improve/references/twin-drift.md +3 -3
  310. package/skills/scip-plan/SKILL.md +2 -2
  311. package/skills/scip-plan/references/api-impact.md +5 -5
  312. package/skills/scip-plan/references/conductor.md +2 -2
  313. package/skills/scip-plan/references/hyper-optimization.md +1 -1
  314. package/skills/scip-query/SKILL.md +15 -5
  315. package/skills/scip-setup/references/bootstrap-workflow.md +7 -8
  316. package/skills/scip-setup/references/language-verification.md +2 -2
  317. package/skills/scip-setup/references/per-repo-triage.md +1 -1
  318. package/skills/scip-verify/SKILL.md +10 -10
  319. package/skills/scip-verify/references/calibrate-detectors.md +7 -7
  320. package/dist/chunk-2465DLHK.js +0 -3
  321. package/dist/chunk-2U3OLUNJ.js +0 -61
  322. package/dist/chunk-33XTHFKR.js +0 -2
  323. package/dist/chunk-43KC6EQZ.js +0 -2
  324. package/dist/chunk-47BU5Z4T.js +0 -8
  325. package/dist/chunk-4YTUWQ6M.js +0 -18
  326. package/dist/chunk-64MNV6AB.js +0 -8
  327. package/dist/chunk-67QRR5YC.js +0 -6
  328. package/dist/chunk-6GXYN7YA.js +0 -40
  329. package/dist/chunk-A2TNXAXO.js +0 -8
  330. package/dist/chunk-APMMR5Y2.js +0 -2
  331. package/dist/chunk-AZFUMCQB.js +0 -2
  332. package/dist/chunk-BNXICU42.js +0 -33
  333. package/dist/chunk-C5Q44Q5D.js +0 -3
  334. package/dist/chunk-DQGSM7RZ.js +0 -20
  335. package/dist/chunk-E2LAW7SL.js +0 -30
  336. package/dist/chunk-E4NFOAD4.js +0 -6
  337. package/dist/chunk-E5HNT4X2.js +0 -3
  338. package/dist/chunk-FD3HFKXR.js +0 -5
  339. package/dist/chunk-GHKEJTCE.js +0 -35
  340. package/dist/chunk-GLZTVKAB.js +0 -16
  341. package/dist/chunk-HIB452NU.js +0 -949
  342. package/dist/chunk-IF6FP6B2.js +0 -66
  343. package/dist/chunk-JORHF5AL.js +0 -108
  344. package/dist/chunk-KSGTULOS.js +0 -9
  345. package/dist/chunk-KXDJAG4N.js +0 -38
  346. package/dist/chunk-L4S2A7BV.js +0 -2
  347. package/dist/chunk-LP3ARJKF.js +0 -8
  348. package/dist/chunk-LSOR3LQG.js +0 -3
  349. package/dist/chunk-NTUMF2X3.js +0 -56
  350. package/dist/chunk-QOXBSI6G.js +0 -20
  351. package/dist/chunk-QXK6UUSM.js +0 -2
  352. package/dist/chunk-RA3AYNWP.js +0 -112
  353. package/dist/chunk-RJMDJR3A.js +0 -2
  354. package/dist/chunk-RLH5VUMG.js +0 -2
  355. package/dist/chunk-SMQWE25B.js +0 -3
  356. package/dist/chunk-TAVELHYR.js +0 -2
  357. package/dist/chunk-VAXNI5NE.js +0 -146
  358. package/dist/chunk-VVY2G5ET.js +0 -2
  359. package/dist/chunk-W3DBTGL4.js +0 -11
  360. package/dist/chunk-WANA4KAQ.js +0 -5
  361. package/dist/chunk-X4FR5BZF.js +0 -9
  362. package/dist/chunk-X6RKPDY7.js +0 -2
  363. package/dist/chunk-YCPASUCX.js +0 -2
  364. package/dist/chunk-ZL2OGDCD.js +0 -2
  365. package/dist/command-descriptors-ZW5J4ZEM.js +0 -631
  366. package/dist/direct-navigation-42YHQPOI.js +0 -3
@@ -1,112 +0,0 @@
1
- import{a as _,g as O,j as C,o as $,p as T}from"./chunk-MZZBAITE.js";import{A as N}from"./chunk-WUW7YUAH.js";import{D as R,F as E,O as k,P as M,k as y,p as S,q as x,w as D}from"./chunk-JORHF5AL.js";import{a as h}from"./chunk-64MNV6AB.js";var V={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function u(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let n=e.split(" ");if(n.length<4)return{scheme:n[0]??"",manager:n[1]??"",packageName:n[2]??"",version:"",descriptors:[],raw:e};let t=n[0],i=n[1],r=e.slice(t.length+1+i.length+1),s;if(r.startsWith("`")){let l=r.indexOf("`",1);l===-1?(s=r.slice(1),r=""):(s=r.slice(1,l),r=r.slice(l+2))}else{let l=r.indexOf(" ");l===-1?(s=r,r=""):(s=r.slice(0,l),r=r.slice(l+1))}let o,a=r.indexOf(" ");a===-1?(o=r,r=""):(o=r.slice(0,a),r=r.slice(a+1));let c=ee(r);return{scheme:t,manager:i,packageName:s,version:o,descriptors:c,raw:e}}function m(e){let n=u(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let i=n.descriptors[t];if(i?.suffix==="type")return i.name}return null}function ee(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let s=e.indexOf("]",t+1);if(s===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,s),suffix:"type-param"}),t=s+1;continue}if(e[t]==="("&&(n.length===0||t===0||w(e[t-1]))){let s=e.indexOf(")",t+1);if(s!==-1&&e[s+1]!=="."){n.push({name:e.slice(t+1,s),suffix:"parameter"}),t=s+1;continue}}let i;if(e[t]==="`"){let s=e.indexOf("`",t+1);if(s===-1){i=e.slice(t+1),n.push({name:i,suffix:"term"});break}i=e.slice(t+1,s),t=s+1}else{let s=t;for(;t<e.length&&!w(e[t]);)t++;i=e.slice(s,t)}if(t>=e.length){i&&n.push({name:i,suffix:"term"});break}let r=e[t];if(r==="("){let s=e.indexOf(")",t+1);s!==-1&&e[s+1]==="."?(n.push({name:i,suffix:"method"}),t=s+2):s!==-1?(n.push({name:i,suffix:"method"}),t=s+1):(n.push({name:i,suffix:"term"}),t++)}else{let s=V[r];s&&n.push({name:i,suffix:s}),t+=1}}return n}function w(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function A(e){let n=u(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let i=[];for(let r of t.descriptors){let s=ne(r);s&&i.push(s)}return i.join(":")}function ne(e){let n=e.suffix==="namespace"?te(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function te(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function v(e){let n=u(e);if("kind"in n&&n.kind==="local")return n.id;let t=n;return t.descriptors.length===0?"":t.descriptors[t.descriptors.length-1].name}function p(e){let n=u(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function Ae(e){return e.endsWith("().")||p(e)==="method"}function P(e){let n=p(e);return n==="method"?!0:n!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function ve(e){return p(e)==="namespace"}var ie=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function Pe(e){return ie.test(e)}var re=new Set(["test","tests","_tests"]);function Qe(e){let n=u(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let i=n.descriptors[t];if(i?.suffix==="namespace"&&i.name&&re.has(i.name))return!0}return!1}function je(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length!==r.length+1)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Be(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length<=r.length)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Je(e,n){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
2
- FROM global_symbols gs
3
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
4
- JOIN documents d ON der.document_id = d.id
5
- WHERE ${n.where}
6
- ${e.pathExclusionsFor("d")}
7
- ${j(n.orderBy)}
8
- ${B(n.limit)}`,...n.params??[])}function We(e,n){return e.all(`SELECT
9
- gs.id,
10
- gs.symbol,
11
- c.document_id,
12
- MIN(c.start_line) AS start_line,
13
- 0 AS start_char,
14
- MAX(c.end_line) AS end_line,
15
- 0 AS end_char,
16
- d.relative_path,
17
- gs.display_name,
18
- gs.documentation
19
- FROM global_symbols gs
20
- JOIN mentions m ON m.symbol_id = gs.id
21
- JOIN chunks c ON m.chunk_id = c.id
22
- JOIN documents d ON c.document_id = d.id
23
- WHERE m.role = 1
24
- AND ${n.where}
25
- ${e.pathExclusionsFor("d")}
26
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
27
- ${j(n.orderBy)}
28
- ${B(n.limit)}`,...n.params??[])}function j(e){return e?`ORDER BY ${e}`:""}function B(e){return typeof e=="number"?`LIMIT ${e}`:""}function z(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function J(e){if(!e)return null;let n=Q(e);if(n)return n.replace(/\n/g," ");let t=e.indexOf("|");if(t===-1)return e.replace(/\n/g," ");let i=e.slice(t+1);return(Q(i)??i).replace(/\n/g," ")}function Q(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function g(e){return{forFile(n,t){return W(e,n,t)},forFiles(n,t){let i=new Map;for(let r of n)i.set(r,W(e,r,t));return i}}}function W(e,n,t){let i={file:n},r=t.facts||t.identifiers;if(t.text&&(i.text=k(e,n)),t.lines&&(i.lines=M(e,n)),t.ast&&(i.ast=N(e,n)),t.imports&&(i.imports=T(e,n)),t.reexports&&(i.reexports=$(e,n)),r){let s=O(e,n),o=s.facts;t.facts&&(i.facts=o),s.unavailable&&(i.sourceFactsUnavailable=s.unavailable),t.identifiers&&o&&(i.identifiers=o.fileIdentifiers,i.identifierLineMap=o.identifierLineMap)}return i}function se(e,n={}){if(m(e.symbol)!==null)return n.includeClassMemberFallbacks===!0;let r=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(r)}function I(e,n,t={}){let i=new Map;for(let s of n)e.length>0&&!se(s,{includeClassMemberFallbacks:t.includeClassMemberFallbacks})||i.set(s.id,s);for(let s of e)i.set(s.id,s);let r=[...i.values()];return t.sort?r.sort((s,o)=>s.start_line-o.start_line||s.end_line-o.end_line||s.symbol.localeCompare(o.symbol)):r}var oe=y("file-definitions",{clearGroups:["definition-catalog"]}),ae=y("file-function-like-definitions",{clearGroups:["definition-catalog"]}),H=new WeakMap;function F(e,n,t={}){return t.includeClassMemberFallbacks?L(e,n,void 0,{includeClassMemberFallbacks:!0}):oe.get(e,n,()=>{let i=K(e,n);if(i)return i;let r=L(e,n),s=x(e),o=g(e).forFile(n,{text:!0}).text;return s&&o&&Y.write(e,n,S(e,n,o),{projectFingerprint:s,definitions:r.map(a=>({...a}))}),r})}function le(e,n){return ae.get(e,n,()=>{let t=K(e,n);return t?t.filter(i=>i.isFunctionLike):L(e,n,i=>i.isFunctionLike)})}var Y=R({kind:"file-definitions",invalidation:E("file-definitions"),serialize:ce,deserialize:de});function K(e,n){let t=x(e);if(!t)return null;let i=g(e).forFile(n,{text:!0}).text;if(!i)return null;let r=Y.read(e,n,S(e,n,i));return r?ue(r,t,n):null}function ce(e){return JSON.stringify(e)}function de(e){try{let n=JSON.parse(e);return!D(n)||typeof n.projectFingerprint!="string"||!Array.isArray(n.definitions)?null:{projectFingerprint:n.projectFingerprint,definitions:n.definitions}}catch{return null}}function ue(e,n,t){if(e.projectFingerprint!==n)return null;let i=[];for(let r of e.definitions){let s=fe(r,t);if(!s)return null;i.push(s)}return i}function fe(e,n){return!D(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==n||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function L(e,n,t,i={}){let r=I(me(e,n),pe(e,n),{sort:!0,includeClassMemberFallbacks:i.includeClassMemberFallbacks}).map(X);return t&&(r=r.filter(t)),q(e,n,r)}function me(e,n){return e.all(`SELECT
29
- gs.id,
30
- gs.symbol,
31
- der.document_id,
32
- der.start_line,
33
- der.start_char,
34
- der.end_line,
35
- der.end_char,
36
- d.relative_path,
37
- gs.display_name,
38
- gs.kind,
39
- gs.documentation,
40
- gs.enclosing_symbol
41
- FROM global_symbols gs
42
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
43
- JOIN documents d ON der.document_id = d.id
44
- WHERE d.relative_path = ?
45
- ${e.symbolNoiseFor("gs")}
46
- ORDER BY der.start_line, der.end_line`,n)}function pe(e,n){return e.all(`SELECT
47
- gs.id,
48
- gs.symbol,
49
- c.document_id,
50
- MIN(c.start_line) AS start_line,
51
- 0 AS start_char,
52
- MAX(c.end_line) AS end_line,
53
- 0 AS end_char,
54
- d.relative_path,
55
- gs.display_name,
56
- gs.kind,
57
- gs.documentation,
58
- gs.enclosing_symbol
59
- FROM global_symbols gs
60
- JOIN mentions m ON m.symbol_id = gs.id
61
- JOIN chunks c ON m.chunk_id = c.id
62
- JOIN documents d ON c.document_id = d.id
63
- WHERE d.relative_path = ?
64
- AND m.role = 1
65
- ${e.symbolNoiseFor("gs")}
66
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
67
- ORDER BY start_line, end_line`,n)}function X(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:v(e.symbol),parentTypeName:m(e.symbol),isFunctionLike:P(e.symbol),isTypeLike:p(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function un(e,n={}){return ge(e,n.scope)}function ge(e,n){return h(e,{scope:n,includeIgnored:!1}).flatMap(t=>F(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function fn(e,n){return h(e,{scope:n,includeIgnored:!1}).flatMap(t=>le(e,t)).filter(t=>!e.isIgnored(t.relativePath))}function mn(e,n){let t=U(be(e,n.scope,n.sqlPrefilter)),i=U(ye(e,n.scope,n.sqlPrefilter)),r=new Set([...t.keys(),...i.keys()]),s=[];for(let o of[...r].sort()){if(e.isIgnored(o))continue;let a=I(t.get(o)??[],i.get(o)??[],{sort:!0}).filter(c=>n.symbolMatches(c.symbol));a.length!==0&&s.push(...q(e,o,a.map(X)))}return s}function be(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${Z("gs",t)}`:"",s=n?[`%${n}%`]:[];return e.all(`SELECT
68
- gs.id,
69
- gs.symbol,
70
- der.document_id,
71
- der.start_line,
72
- der.start_char,
73
- der.end_line,
74
- der.end_char,
75
- d.relative_path,
76
- gs.display_name,
77
- gs.kind,
78
- gs.documentation,
79
- gs.enclosing_symbol
80
- FROM global_symbols gs
81
- JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
82
- JOIN documents d ON der.document_id = d.id
83
- WHERE 1 = 1
84
- ${e.pathExclusionsFor("d")}
85
- ${i}
86
- ${r}
87
- ${e.symbolNoiseFor("gs")}
88
- ORDER BY d.relative_path, der.start_line, der.end_line`,...s)}function ye(e,n,t){let i=n?"AND d.relative_path LIKE ?":"",r=t?`AND ${Z("gs",t)}`:"",s=n?[`%${n}%`]:[];return e.all(`SELECT
89
- gs.id,
90
- gs.symbol,
91
- c.document_id,
92
- MIN(c.start_line) AS start_line,
93
- 0 AS start_char,
94
- MAX(c.end_line) AS end_line,
95
- 0 AS end_char,
96
- d.relative_path,
97
- gs.display_name,
98
- gs.kind,
99
- gs.documentation,
100
- gs.enclosing_symbol
101
- FROM global_symbols gs
102
- JOIN mentions m ON m.symbol_id = gs.id
103
- JOIN chunks c ON m.chunk_id = c.id
104
- JOIN documents d ON c.document_id = d.id
105
- WHERE m.role = 1
106
- ${e.pathExclusionsFor("d")}
107
- ${i}
108
- ${r}
109
- ${e.symbolNoiseFor("gs")}
110
- GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
111
- ORDER BY d.relative_path, start_line, end_line`,...s)}function Se(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function Z(e,n){return n==="callable"?Se(e):xe(e)}function xe(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function U(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function pn(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(r=>F(e,r)).filter(r=>!e.isIgnored(r.relativePath));return t.onlyDocumented&&(i=i.filter(r=>r.documentation!==null&&r.documentation!=="")),t.sort&&(i=i.sort((r,s)=>r.relativePath.localeCompare(s.relativePath)||r.startLine-s.startLine||r.endLine-s.endLine)),i.map(r=>({startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,shortName:A(r.symbol),signature:z(J(r.documentation)),relativePath:r.relativePath,enclosingSymbol:r.enclosingSymbol}))}function he(e){let n=new Map,t=e.map((i,r)=>({definition:i,index:r,span:i.endLine-i.startLine})).sort((i,r)=>i.span-r.span||i.index-r.index);for(let{definition:i}of t)for(let r=i.startLine;r<=i.endLine;r+=1)n.has(r)||n.set(r,i);return n}function gn(e,n){let t=H.get(e);return t||(t=he(e),H.set(e,t)),t.get(n)??null}function bn(e,n){let t=F(e,n.relative_path).find(i=>i.symbolId===n.id);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,startChar:t.startChar,endLine:t.endLine,endChar:t.endChar,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,startChar:n.start_char??0,endLine:n.end_line,endChar:n.end_char??0,relativePath:n.relative_path}}function q(e,n,t){let i=g(e).forFile(n,{text:!0}).text,r=C(e,n);return r?Re(t,r,i):i?De(t,i):t}function De(e,n){let t=n.split(/\r?\n/),i=_e(e,t),r=Ie(e,i),s=Le(r,t);return Fe(e,s)}function _e(e,n){let t=e.some(r=>b(r.symbol))?$e(n):null,i=new Map;for(let r of e)i.set(r.symbolId,Ce(n,t,r));return i}function Ie(e,n){return e.filter(t=>b(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function Le(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let r=e[i],s=e[i+1],o=s?Math.max(r.startLine,s.startLine-1):n.length-1;t.set(r.definition.symbolId,{startLine:r.startLine,endLine:Te(n,r.definition,r.startLine,o)})}return t}function Fe(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function Re(e,n,t=null){let i=new Map;for(let r of n){let s=i.get(r.name);s?s.push(r):i.set(r.name,[r])}return e.map(r=>{if(!Oe(r)||!r.leaf)return G(r,t);let s=i.get(r.leaf);if(!s||s.length===0)return G(r,t);let o=t?Ee(r,s,t):null;if(o)return{...r,startLine:o.startLine,endLine:o.endLine};let a=s[0],c=Math.abs(a.startLine-r.startLine);for(let l=1;l<s.length;l+=1){let d=s[l],f=Math.abs(d.startLine-r.startLine);f<c&&(a=d,c=f)}return{...r,startLine:a.startLine,endLine:a.endLine}})}function Ee(e,n,t){let i=ke(e.symbol);if(!i)return null;let r=t.split(/\r?\n/),s=new RegExp(`\\b${_(i)}\\b`);for(let o of n){let a=Me(r,o.startLine);if(a&&s.test(a))return o}return null}function ke(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function Me(e,n){for(let t=n;t>=0;t-=1){let i=e[t]?.trim()??"";if(i){if(/^impl\b/.test(i))return Ne(e,t,n);if(/^(?:struct|enum|trait|mod)\b/.test(i))return null}}return null}function Ne(e,n,t){let i=[];for(let r=n;r<=t;r+=1){let s=e[r]??"";if(i.push(s),s.includes("{"))break}return i.join(" ")}function Oe(e){return b(e.symbol)?!0:p(e.symbol)==="term"&&m(e.symbol)===null}function G(e,n){if(!n||!e.leaf||p(e.symbol)!=="term"||m(e.symbol)!==null)return e;let t=_(e.leaf),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),s=n.split(/\r?\n/).findIndex(o=>i.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function Ce(e,n,t){if(!b(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let r=n.get(t.leaf);if(!r||r.length===0)return i;let s=null;for(let o of r){let a=Math.abs(o-t.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??i}function $e(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,r=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let d of c.matchAll(n))d[1]&&o(d[1],a);for(let d of c.matchAll(t))d[1]&&o(d[1],a);let l=c.match(i);l?.[1]&&o(l[1],a);for(let d of c.matchAll(r))d[1]&&o(d[1],a)}return s}function Te(e,n,t,i){let r=Math.max(t,Math.min(e.length-1,i)),s=Math.max(t,Math.min(r,n.endLine)),o=0,a=0,c=!1;for(let l=t;l<=r;l+=1){let d=we(e[l]??"");for(let f of d)f==="{"?(o+=1,c=!0):f==="}"?o=Math.max(0,o-1):f==="("?a+=1:f===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function we(e){let n="",t=null,i=!1;for(let r=0;r<e.length;r+=1){let s=e[r],o=e[r+1];if(!t&&s==="/"&&o==="/"){n+=" ".repeat(e.length-r);break}if(t){if(i){i=!1,n+=" ";continue}if(s==="\\"){i=!0,n+=" ";continue}s===t&&(t=null),n+=" ";continue}if(s==='"'||s==="'"||s==="`"){t=s,n+=" ";continue}n+=s}return n}function b(e){return e.includes("().")}function yn(e){let n=u(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let r=n.descriptors[i];r?.suffix==="type"&&r.name&&t.push(r.name)}return t}export{g as a,u as b,m as c,A as d,v as e,p as f,Ae as g,P as h,ve as i,Pe as j,Qe as k,je as l,Be as m,Je as n,We as o,z as p,J as q,I as r,F as s,un as t,ge as u,fn as v,mn as w,pn as x,he as y,gn as z,bn as A,yn as B};
112
- //# sourceMappingURL=chunk-RA3AYNWP.js.map
@@ -1,2 +0,0 @@
1
- import{a as je}from"./chunk-MSBDMFER.js";import{a as Ne}from"./chunk-47BU5Z4T.js";import{a as me,b as D,e as he}from"./chunk-4BV4QAZJ.js";import{a as Se,c as Ce,d as $e,e as F}from"./chunk-E3HYEQO7.js";import{a as Ge}from"./chunk-WWKWUPSU.js";import{a as Ie}from"./chunk-7FT5Y65S.js";import{a as Ee}from"./chunk-6YTSKJJ3.js";import{a as Ae}from"./chunk-3EDFLQ6A.js";import{a as ve}from"./chunk-FJ5UDTQF.js";import{a as Re}from"./chunk-HZYDQPNY.js";import{a as De}from"./chunk-YLFORA5G.js";import{a as ke}from"./chunk-RLH5VUMG.js";import{b as be}from"./chunk-BDOIKGDI.js";import{a as ge,b as ye}from"./chunk-6M7RONVB.js";import{a as fe,b as ue,c as pe,g as V,h as U}from"./chunk-4YTUWQ6M.js";import{b as Fe}from"./chunk-E5HNT4X2.js";import{a as z,c as ce,d as le,e as de}from"./chunk-P3UO3EH3.js";import{a as ae}from"./chunk-S4S2WOIX.js";import{a as xe,e as Te}from"./chunk-WANA4KAQ.js";import{a as j,c as B,d as P,e as we}from"./chunk-7VCOXZH3.js";import{c as se}from"./chunk-2SNGN6U4.js";import{f as E,g as G}from"./chunk-LP3ARJKF.js";import{e as re}from"./chunk-GLZTVKAB.js";import{w as oe}from"./chunk-FD3HFKXR.js";import{d as O,e as v,f as ne,g as H}from"./chunk-RA3AYNWP.js";import{a as ie}from"./chunk-MZZBAITE.js";import{a as ee}from"./chunk-WUW7YUAH.js";import{A as te}from"./chunk-JORHF5AL.js";import{r as I}from"./chunk-VVY2G5ET.js";import{createHash as bt}from"crypto";import{existsSync as _}from"fs";function q(e){let[i,t]=A(e,":"),r=i||"unknown",n=(s={})=>{let a=s.actionTier??Qe(r);return{sourceAnalyzer:r,actionTier:a,rootCauseKey:s.rootCauseKey??(t||e),label:s.label??`${r} finding`,relatedFiles:s.relatedFiles??[],why:s.why??[],remediation:s.remediation??et(a,r),file:s.file}};if(!t)return n({rootCauseKey:e,why:["Baseline identity did not include analyzer payload."]});if(["dead","isolated","extract","wrapper","passthrough","stale"].includes(r)){let[s,a]=A(t,":");return n({file:s,relatedFiles:s?[s]:[],rootCauseKey:a?`${s}:${a}`:t,label:`${r} finding`,why:a?[`Baseline subject: ${a}.`]:[]})}if(r==="cycle"){let s=t.split(">").filter(Boolean);return n({relatedFiles:s,rootCauseKey:t,label:"cycle finding",why:s.length>0?[`Cycle path: ${s.join(" > ")}.`]:[]})}if(r==="similar"){let s=t.split("|").filter(Boolean);return n({relatedFiles:[],rootCauseKey:t,label:"similarity finding",why:s.length>0?[`Similar symbols: ${s.join(" | ")}.`]:[]})}if(r==="architecture"){let[s,a]=A(t,":");if(s==="forbidden-edge"){let[c,l]=A(a,":"),o=K(c),f=K(l);return n({actionTier:"direct",rootCauseKey:t,label:"architecture boundary violation",why:[`Declared boundary rule rejects ${o} -> ${f}.`],remediation:`Move the dependency behind an allowed boundary, or deliberately update the ${o} dependency rule and baseline.`})}if(s==="cycle"){let c=a.split("|").filter(Boolean).map(K);return n({actionTier:"direct",rootCauseKey:t,label:"forbidden architecture cycle",why:[`requireAcyclic rejects the connected boundary group: ${c.join(", ")}.`],remediation:"Break the boundary cycle, or deliberately revise the acyclicity rule and baseline."})}if(s==="missing-policy-row"){let c=K(a);return n({actionTier:"direct",rootCauseKey:t,label:"incomplete architecture policy",why:[`requireCompletePolicy rejects the missing outgoing dependency row for ${c}.`],remediation:`Declare the allowed outgoing dependencies for ${c}, including an empty row when it must depend on nothing.`})}}if(r==="drift"){let[s,a]=A(t,":"),[c,l]=A(a,":");return n({actionTier:s==="unused-import"?"direct":"signal",file:c,relatedFiles:[...new Set([c,l].filter(Boolean))],rootCauseKey:t,label:`${s||"drift"} finding`,why:[...s?[`Drift kind: ${s}.`]:[],...l?[`Related dependency: ${l}.`]:[]]})}return n({why:["Baseline analyzer prefix is not recognized by this diff-gate version."]})}function Qe(e){switch(e){case"dead":case"isolated":case"cycle":case"passthrough":case"architecture":return"direct";case"similar":case"extract":case"wrapper":case"stale":return"signal";default:return"signal"}}function et(e,i){return e==="direct"?`Fix the new ${i} baseline finding, or knowingly accept it via health --write-baseline.`:`Review the new ${i} baseline signal; fix it if it reflects real debt, or knowingly accept it via health --write-baseline.`}function A(e,i){let t=e.indexOf(i);return t<0?[e,""]:[e.slice(0,t),e.slice(t+i.length)]}function K(e){try{return decodeURIComponent(e)}catch{return e}}import{existsSync as tt}from"fs";import{isAbsolute as it,join as nt}from"path";var rt=".scipquery-baseline.json";function W(e){if(e.startsWith("similar:")){let i=e.slice(8).split("|");return i.length!==2?e:`similar:${i.map(O).sort().join("|")}`}if(e.startsWith("duplicate-bodies:")){let i=e.slice(17),t=i.indexOf(":");if(t<0)return e;let r=i.slice(0,t),n=i.slice(t+1).split("|");return n.length<2?e:`duplicate-bodies:${r}:${n.map(O).sort().join("|")}`}return e}function x(e,i){return i&&it(i)?i:nt(e.config.projectRoot,i??rt)}function M(e,i,t={}){let r=x(e,t.path);if(!tt(r))throw new Error(`No baseline found at ${r}. Create one with: scip-query health --write-baseline`);let s=(JSON.parse(I(r,"health baseline")).findings??[]).map(W),a=new Set(t.accept?s.filter(t.accept):s),c=new Set(i);return{baselinePath:r,baselineCount:a.size,current:[...i],newFindings:i.filter(l=>!a.has(l)),fixedFindings:[...a].filter(l=>!c.has(l))}}var ot=25e3,st=2500,at=2500;function ct(e){let i=Ee(e);return i.symbols>=ot||i.documents>=st?at:void 0}function Be(e,i={}){let{scope:t}=i,r=ct(e),n=[],s=Fe(e,{scope:t,...F.dead,scanLimit:r});for(let a of s.symbols)E(e,a.relativePath)||G(e,a.symbol,a.relativePath)||a.kind==="dead-code"&&n.push(`dead:${a.relativePath}:${a.shortName}`);for(let a of ve(e,{scope:t,...F.isolated,scanLimit:r}))E(e,a.relativePath)||G(e,a.symbol,a.relativePath)||n.push(`isolated:${a.relativePath}:${a.shortName}`);for(let a of ke(e,{scope:t}))a.kind==="real"&&n.push(`cycle:${lt(a.path)}`);for(let a of Te(e,{scope:t,...F.similar,scanLimit:r}))n.push(`similar:${[a.symbolA,a.symbolB].sort().join("|")}`);for(let a of ge(e,{scope:t,...F.duplicateBodies,scanLimit:r}))n.push(`duplicate-bodies:${a.hash}:${a.functions.map(c=>c.symbol).sort().join("|")}`);for(let a of De(e,{scope:t,...F.extract,scanLimit:r}))n.push(`extract:${a.relativePath}:${a.shortName}`);for(let a of Ge(e,{scope:t,...F.wrappers,scanLimit:r}))n.push(`wrapper:${a.file}:${a.shortName}`);for(let a of Ae(e,{scope:t,...F.passthroughs,scanLimit:r}))n.push(`passthrough:${a.file}:${a.shortName}`);for(let a of Ie(e,{scope:t,...F.stale,scanLimit:r}))n.push(`stale:${a.file}:${a.shortName}`);for(let a of Re(e,{scope:t,...F.drift,includePatternDeviations:!1,limit:Number.POSITIVE_INFINITY}).results)a.kind!=="architecture-violation"&&n.push(`drift:${a.kind}:${a.file}:${a.dep}`);return n.push(...P(B(e,{scope:t}))),[...new Set(n.map(W))].sort()}function lt(e){if(e.length===0)return"";let i=0;for(let t=1;t<e.length;t++)e[t]<e[i]&&(i=t);return[...e.slice(i),...e.slice(0,i)].join(">")}function Si(e,i={}){let t=Be(e,{scope:i.scope}),r=x(e,i.path);return oe(r,{version:1,findings:t},{spacing:2,trailingNewline:!0}),{path:r,findingCount:t.length}}function Pe(e,i={}){return M(e,Be(e,{scope:i.scope}),{path:i.path})}function Ke(e,i={}){let t=P(B(e,{scope:i.scope}));return M(e,t,{path:i.path,accept:r=>r.startsWith(j)})}import{existsSync as dt,readdirSync as ft}from"fs";import{createHash as ut}from"crypto";import{join as Z}from"path";function Y(e){let i=0,t=0,r=0,n=0,s=0,a=[];for(let o of e)switch(o.state){case"legacy":i+=1;break;case"current":t+=1;break;case"unsupported-older":r+=1,a.push(J(o));break;case"unsupported-future":n+=1,a.push(J(o));break;case"malformed":s+=1,a.push(J(o));break}let c=i+t,l=r+n+s;return{complete:l===0,total:e.length,accepted:c,legacy:i,current:t,unsupportedOlder:r,unsupportedFuture:n,malformed:s,omitted:l,issues:a}}function J(e){if(e.state==="legacy"||e.state==="current")throw new Error(`accepted record ${e.path} cannot become a compatibility issue`);return{path:e.path,state:e.state,reason:e.reason??e.state}}var Le=Z(".scipquery","suppressions"),Me="scip-query-suppression",X=1;function pt(e){return Z(e,Le)}function mt(e){if(e.id&&e.id.trim()!=="")return`${e.id.trim()}.json`;let i=`${e.check??""}\0${e.file??""}`;return`CHECK-${ut("sha256").update(i).digest("hex").slice(0,12).toUpperCase()}.json`}function ht(e){return mt(e).slice(0,-5)}function gt(e,i){if(typeof e!="object"||e===null||Array.isArray(e))return{state:"malformed",error:"not a suppression object"};let t=e;if(t.schemaVersion===void 0&&(t.kind!==void 0||t.suppressionIdentity!==void 0||t.writer!==void 0))return{state:"malformed",error:"suppression envelope metadata requires schemaVersion"};if(t.schemaVersion!==void 0){if(!Number.isSafeInteger(t.schemaVersion))return{state:"malformed",error:"schemaVersion must be a positive safe integer"};if(t.schemaVersion!==X)return{state:t.schemaVersion>X?"unsupported-future":"unsupported-older",error:`unsupported schemaVersion ${String(t.schemaVersion)}`};if(t.kind!==void 0&&t.kind!==Me)return{state:"malformed",error:`kind must be ${Me}`}}if(typeof t.reason!="string"||t.reason.trim()==="")return{state:"malformed",error:"missing reason"};if(!t.id&&!t.check)return{state:"malformed",error:"needs an id or a check"};let r=yt(t);if(t.schemaVersion===void 0)return{state:"legacy",suppression:r,record:t,schemaVersion:0};let n=ht(r);return t.suppressionIdentity!==n||i!==void 0&&t.suppressionIdentity!==i?{state:"malformed",error:"suppressionIdentity does not match the suppression target or filename"}:!t.writer||t.writer.tool!=="scip-query"||typeof t.writer.version!="string"||t.writer.version.trim()===""?{state:"malformed",error:"missing valid writer metadata"}:typeof t.createdAt!="string"||!Number.isFinite(Date.parse(t.createdAt))?{state:"malformed",error:"missing valid createdAt timestamp"}:t.updatedAt!==void 0&&(typeof t.updatedAt!="string"||!Number.isFinite(Date.parse(t.updatedAt)))?{state:"malformed",error:"invalid updatedAt timestamp"}:{state:"current",suppression:r,record:t,schemaVersion:X}}function _e(e){let i=pt(e);if(!dt(i))return{suppressions:[],compatibility:Y([]),warnings:[]};let t=[],r=[];for(let s of ft(i).sort()){if(!s.endsWith(".json"))continue;let a=Z(i,s),c=`${Le}/${s}`,l;try{l=JSON.parse(I(a,"suppression record"))}catch{r.push({path:c,state:"malformed",reason:"malformed JSON"});continue}let o=gt(l,s.slice(0,-5));if("error"in o){r.push({path:c,state:o.state,reason:o.error});continue}r.push({path:c,state:o.state}),t.push(o.suppression)}let n=Y(r);return{suppressions:t,compatibility:n,warnings:n.issues.map(s=>`${s.path}: ${s.reason} \u2014 ignored`)}}function yt(e){return{...typeof e.id=="string"?{id:e.id}:{},...typeof e.check=="string"?{check:e.check}:{},...typeof e.file=="string"?{file:e.file}:{},reason:e.reason,...typeof e.expiresAt=="string"?{expiresAt:e.expiresAt}:{},...typeof e.createdAt=="string"?{createdAt:e.createdAt}:{}}}var rn=["echo","incomplete-migration","co-change-partner","twin-partner","coverage-contract","architecture","doc-reference","unused-params","new-dead","baseline"];function on(e,i={}){let t=i.base??"HEAD",{minTogether:r=6,minConfidence:n=.6,maxEchoChecks:s=Number.POSITIVE_INFINITY,maxHelpers:a=Number.POSITIVE_INFINITY,minSimilarity:c=.8,includeBaseline:l=!1,scanLimit:o}=i,f=i.semantic!==!1,m=i.historyMode??"bounded",u=new Set(i.skip??[]),p=_e(e.config.projectRoot),h=pe(e,{base:t}),y=ue(e,{base:t,plan:h}),S=y.changedFiles,d=new Set(S),w=new Set(h.changedFileLines),$=new Set([...d,...w]),C=V(e.config.projectRoot,t,U(h,S)),T=Vt(e.config.projectRoot,t,h,C),g={base:t,changedFiles:S,changedSymbols:y.changedSymbols.length,checksRun:[],skipped:[],suppressed:[],findings:[],attributionNotes:y.attributionNotes,rootCauseGroups:[],recordCompatibility:{suppressions:p.compatibility},note:y.summary.note};if(S.length===0)return g;let k=(N,Je)=>{if(u.has(N)){g.skipped.push({check:N,reason:"skipped via --skip"});return}let Ye=g.findings.length,Xe=g.skipped.length,Ze=g.checksRun.length;te(`diff-gate.check.${N}`,Je,()=>({check:N,changedFiles:S.length,changedSymbols:y.changedSymbols.length,findingsAdded:g.findings.length-Ye,skippedAdded:g.skipped.length-Xe,checksRunAdded:g.checksRun.length-Ze}))};return k("echo",()=>wt(e,y.changedSymbols,d,T,s,c,o,f,g)),k("incomplete-migration",()=>At(e,t,h,a,o,f,C,g)),k("co-change-partner",()=>xt(e,$,r,n,m,g)),k("twin-partner",()=>Tt(e,y.changedSymbols,d,o,g)),k("coverage-contract",()=>It(e,$,g)),k("architecture",()=>Wt(e,g)),k("doc-reference",()=>Bt(e,d,w,h.changedRanges,h.renamedFiles,g)),k("unused-params",()=>Lt(e,S,g)),k("new-dead",()=>_t(e,y.changedSymbols,T,g)),l&&k("baseline",()=>qt(e,g)),Ct(g,[...e.config.suppressions??[],...p.suppressions]),g.rootCauseGroups=St(g.findings),g}function sn(e){return e.checksRun.length===0&&e.note===fe}function an(e){return e.filter(i=>!i.advisory)}function St(e){let i=new Map;for(let t of e){let r=t.groupKey??`${t.check}:${t.id}`,n=i.get(r);n||(n={groupKey:r,check:t.check,severity:t.severity,actionTier:t.actionTier,sourceAnalyzer:t.sourceAnalyzer,rootCauseKey:t.rootCauseKey,count:0,findingIds:[],files:new Set,relatedFiles:new Set,message:t.message,remediation:t.remediation},i.set(r,n)),n.count+=1,n.findingIds.push(t.id),n.severity=qe(n.severity,t.severity),n.actionTier=We(n.actionTier,t.actionTier),t.file&&n.files.add(t.file);for(let s of t.relatedFiles??[])n.relatedFiles.add(s)}return[...i.values()].map(t=>({...t,files:[...t.files].sort(),relatedFiles:[...t.relatedFiles].sort()})).sort((t,r)=>r.count-t.count||L(r.severity)-L(t.severity)||t.groupKey.localeCompare(r.groupKey))}function qe(e,i){return L(i)>L(e)?i:e}function L(e){return e==="error"?2:e==="warning"?1:0}function We(e,i){return e?i&&Oe(i)>Oe(e)?i:e:i}function Oe(e){return e==="direct"?2:e==="signal"?1:0}function Ct(e,i){if(i.length===0||e.findings.length===0)return;let t=[];for(let r of e.findings){let n=i.find(s=>$t(s,r));n?e.suppressed.push({finding:r,suppression:n}):t.push(r)}e.findings=t}function $t(e,i){return!e.reason||e.reason.trim()===""||e.expiresAt&&Date.parse(e.expiresAt)<=Date.now()||e.id&&e.id!==i.id&&!i.legacySuppressionIds?.includes(e.id)||e.check&&e.check!==i.check||e.file&&e.file!==i.file?!1:!!(e.id||e.check)}function R(e,i){e.findings.push({...i,suppressionHint:`scip-query: ignore ${i.check} ${i.id} -- <reason>`})}function wt(e,i,t,r,n,s,a,c,l){l.checksRun.push("echo");for(let o of i.slice(0,n)){if(!H(o.symbol)||r(o))continue;let f=ye(e,o.symbol,{maxLoc:15,scanLimit:a}).filter(d=>!t.has(d.file)).slice(0,5).map(d=>({otherFile:d.file,otherShort:d.shortName,otherSymbol:d.symbol,similarity:1,similarityBasis:"exact-body",sharedEvidence:[`exact normalized body (${d.loc} LOC)`]}));if(f.length>0){let d=b("echo",o.symbol,o.file),w=b("echo",o.symbol,o.file,...f.map(C=>`${C.otherSymbol}|${C.otherFile}`).sort()),$=f[0];R(l,{id:d,legacySuppressionIds:w===d?void 0:[w],groupKey:d,actionTier:"direct",check:"echo",severity:"warning",evidence:"heuristic",confidence:1,file:o.file,symbol:o.symbol,relatedFiles:[...new Set(f.map(C=>C.otherFile))].sort(),sourceAnalyzer:"duplicate-bodies",rootCauseKey:`${o.symbol}:${$.otherSymbol}`,message:ze(o,f),why:Ve(o,f),remediation:Ue("direct",o.shortName,$.otherShort)});continue}let m=xe(e,o.symbol,{minSimilarity:s,limit:5,scanLimit:a,semantic:c,sourceCandidateMode:"target-pruned"}),u=[];for(let d of m){let w=d.fileA===o.file?d.fileB:d.fileA,$=d.fileA===o.file?d.shortNameB:d.shortNameA,C=d.fileA===o.file?d.symbolB:d.symbolA;t.has(w)||u.push({otherFile:w,otherShort:$,otherSymbol:C,similarity:d.similarity,similarityBasis:d.similarityBasis??"callees",sharedEvidence:d.sharedCallees})}if(u.length===0)continue;let p=u[0],h=b("echo",o.symbol,o.file,...u.map(d=>`${d.otherSymbol}|${d.otherFile}`).sort()),y=b("echo",o.symbol,o.file),S=kt(o,u);R(l,{id:y,legacySuppressionIds:h===y?void 0:[h],groupKey:y,actionTier:S,check:"echo",severity:"warning",evidence:"heuristic",confidence:p.similarity,file:o.file,symbol:o.symbol,relatedFiles:[...new Set(u.map(d=>d.otherFile))].sort(),message:ze(o,u),why:Ve(o,u),remediation:Ue(S,o.shortName,p.otherShort)})}i.length>n&&l.skipped.push({check:"echo",reason:`echo check capped at ${n} of ${i.length} changed symbols`})}function kt(e,i){return i.some(r=>Ft(e.symbol,r))?"direct":"signal"}function Ft(e,i){if(i.similarityBasis==="exact-body")return!0;if(i.similarityBasis!=="source-tokens"||i.similarity<.98||i.sharedEvidence.length>8)return!1;let t=v(e),r=v(i.otherSymbol);return!t||!r?!1:t===r?!0:vt(i.sharedEvidence)?!1:Rt(t,r)}function Rt(e,i){let t=He(e),r=He(i);if(t.length===0||r.length===0)return!1;let n=new Set(r),s=t.filter(a=>n.has(a)).length;return s>=2&&s/Math.min(t.length,r.length)>=.5}function He(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).map(i=>i.toLowerCase()).filter(i=>i.length>=2)}var Dt=new Set(["bytes","crypto","hex","num","random","secret","to","token"]);function vt(e){return e.length>=3&&e.every(i=>Dt.has(i.toLowerCase()))}function ze(e,i){let t=i[0],r=Math.round(t.similarity*100);return i.length===1?`${e.shortName} (${e.file}) is ${r}% similar to established ${t.otherShort} (${t.otherFile})`:`${e.shortName} (${e.file}) resembles ${i.length} established symbol(s); strongest is ${r}% similar to ${t.otherShort} (${t.otherFile})`}function Ve(e,i){let t=[`${e.shortName} was changed in this diff.`];for(let r of i.slice(0,3))t.push(`${r.otherShort} is outside this diff and scored ${Math.round(r.similarity*100)}% similar by ${r.similarityBasis} evidence.`),t.push(`Shared evidence: ${r.sharedEvidence.slice(0,5).join(", ")||"(none listed)"}.`);return i.length>3&&t.push(`${i.length-3} additional similar match(es) grouped into this finding.`),t}function Ue(e,i,t){return e==="direct"?`Extract or reuse the shared behavior with ${t}, or keep the duplicate with a suppression reason.`:`Review whether ${i} is intentionally parallel to the established implementation(s); extract shared behavior only if the product semantics match.`}function At(e,i,t,r,n,s,a,c){let l=Ne(e,{base:i,maxHelpers:r,diffPlan:t,scanLimit:n,semantic:s,baseContentAt:a});if(!l.available){c.skipped.push({check:"incomplete-migration",reason:"no git history"});return}c.checksRun.push("incomplete-migration"),l.note&&c.skipped.push({check:"incomplete-migration",reason:l.note});for(let o of l.findings){let f=o.leftovers.map(d=>`${d.shortName} (${d.file}, ${Math.round(d.containment*100)}% helper / ${Math.round(d.siteCoverage*100)}% site, ${d.migrationScope})`).join(", "),m=o.leftovers.map(d=>`${d.shortName}: ${d.migrationScope} (${d.migrationScopeReasons[0]})`).join("; "),u=[...o.migratedFiles,...o.leftovers.map(d=>d.file)],p=o.leftovers.length===0?void 0:Math.max(...o.leftovers.map(d=>Math.min(d.containment,d.siteCoverage))),h=o.leftovers.some(d=>d.migrationScope==="possible-subtype"),y=b("incomplete-migration",o.helperSymbol,o.helperFile,u.join("|")),S=b("incomplete-migration",o.helperSymbol,o.helperFile);R(c,{id:S,legacySuppressionIds:y===S?void 0:[y],check:"incomplete-migration",severity:"warning",evidence:"heuristic",confidence:p,file:o.helperFile,symbol:o.helperSymbol,relatedFiles:u,message:`new helper ${o.helperShortName} (${o.helperFile}) is wired into ${o.migratedFiles.length} file(s), but ${o.leftovers.length} similar un-migrated site(s) remain: ${f}`,why:[`${o.helperShortName} is new in this diff and already referenced by ${o.migratedFiles.join(", ")}.`,`Helper shape: ${o.helperShape}; ${o.specificHelperCalleeCount}/${o.helperCalleeCount} helper callees are specific enough to score.`,`Unchanged site(s) still contain the helper's callee pattern: ${f}.`,`Migration scope hints: ${m}.`],remediation:h?`Migrate same-scope sites to ${o.helperShortName}; review possible subtype/variant sites before applying the helper.`:`Migrate the remaining sites to ${o.helperShortName}, or confirm they are intentionally different.`})}}function xt(e,i,t,r,n,s){let a=ae(e,{historyMode:n}).directionalCoChangePairsForFiles(i,{minTogether:t,minConfidence:0,maxFilesPerCommit:20});if(!a){s.skipped.push({check:"co-change-partner",reason:"no git history"});return}s.checksRun.push("co-change-partner");let c=new Set,l;for(let o of a){let f=i.has(o.fileA),m=i.has(o.fileB);if(f===m)continue;let u=f?o.fileA:o.fileB,p=f?o.fileB:o.fileA,h=f?o.changesA:o.changesB,y=h>0?o.together/h:0;if(y<r||z(p)||z(u)||!_(`${e.config.projectRoot}/${p}`))continue;let S=`${u}|${p}`;if(c.has(S))continue;c.add(S);let d=b("co-change-partner",u,p,String(o.together)),w=b("co-change-partner",u,p),$=ce(u,p),C=le({fileA:u,fileB:p,together:o.together,confidence:y,commitScope:o.commitScope,recency:o.recency,subjectContext:o.subjectContext},$,(l??=de(e))(u,p)),T=[u,p].sort().join("|");s.findings.push({id:w,legacySuppressionIds:d===w?void 0:[d],check:"co-change-partner",severity:"warning",evidence:"change-graph",actionTier:"signal",groupKey:`co-change-partner:${T}`,confidence:y,file:u,relatedFiles:[p],sourceAnalyzer:"co-change",rootCauseKey:T,partnerClass:$.partnerClass,partnerClassReasons:$.reasons,commitScope:o.commitScope,recency:o.recency,focusedTogether:o.focusedTogether,broadTogether:o.broadTogether,broadCommitRatio:o.broadCommitRatio,lastTogetherAt:o.lastTogetherAt,recentTogether:o.recentTogether,subjectContext:o.subjectContext,...C?{declaredCouplingSuggestion:C}:{},message:`${u} changed, but ${p} did not \u2014 they change together ${o.together}x (${Math.round(y*100)}% of the time)`,why:[`${u} is in this diff and ${p} is not.`,`Git history shows ${o.together} co-change(s), which is ${Math.round(y*100)}% of changes to the edited side.`,`History context: ${Et(o)}.`,`Subject context: ${Gt(o.subjectContext)}.`,...Nt(o),`Partner class: ${$.partnerClass} (${$.reasons.join("; ")}).`],remediation:C?`Update ${p} alongside this change, declare the coupling "${C.name}", or confirm the coupling no longer holds.`:`Update ${p} alongside this change, or confirm the coupling no longer holds.`})}}function Tt(e,i,t,r,n){n.checksRun.push("twin-partner");let s=be(e,{scanLimit:r}).filter(l=>l.relationship==="divergent"||l.relationship==="identical");if(s.length===0)return;let a=new Map;for(let l of s)for(let o of l.members)a.set(o.symbol,l);let c=new Set;for(let l of i){if(!H(l.symbol))continue;let o=a.get(l.symbol);if(!o)continue;let f=o.members.filter(h=>h.symbol!==l.symbol&&!t.has(h.file));if(f.length===0)continue;let m=[l.symbol,...f.map(h=>h.symbol)].sort().join("|");if(c.has(m))continue;c.add(m);let u=f[0],p=b("twin-partner",l.symbol,l.file,u.symbol);R(n,{id:p,groupKey:`twin-partner:${m}`,check:"twin-partner",severity:"warning",evidence:"heuristic",actionTier:"signal",advisory:!0,confidence:o.relationship==="identical"?1:Math.max(0,1-o.maxDivergence),file:l.file,symbol:l.symbol,relatedFiles:f.map(h=>h.file).sort(),sourceAnalyzer:"twin-drift",rootCauseKey:m,message:`${l.shortName} (${l.file}) changed but its same-name twin ${u.shortName} (${u.file}) did not \u2014 verify the change shouldn't apply to both, or consolidate them.`,why:[`${l.symbol} is in this diff.`,`${u.symbol} shares its (near-)name and is classified '${o.relationship}' with it, but ${u.file} is not in this diff.`,o.relationship==="divergent"?`The two bodies already diverge (~${Math.round(o.maxDivergence*100)}% token difference) \u2014 this diff may widen or narrow that drift.`:"The two bodies were byte-identical before this diff.","Advisory: twin-partner never fails the gate by itself \u2014 see the twin-partner entry in the diff-gate checks table."],remediation:`Update ${u.file} alongside this change, consolidate ${l.shortName}/${u.shortName} into one helper, or confirm the twin should diverge on purpose.`})}}function It(e,i,t){t.checksRun.push("coverage-contract");let r=e.config.coverageContracts??[];for(let n of r){if(!Ce(n,i))continue;let s=Se(e,n);if(s.status==="ok")continue;let a=b("coverage-contract",n.name,n.file);R(t,{id:a,groupKey:`coverage-contract:${n.name}`,check:"coverage-contract",severity:s.status==="unavailable"?"warning":"error",evidence:"graph-fact",actionTier:"direct",file:n.file,sourceAnalyzer:"coverage-contracts",rootCauseKey:n.name,message:$e(s),why:[`Contract "${n.name}" declares that ${n.file} (${n.keys.type}) must track ${n.mustEqual.type}.`,s.status==="unavailable"?`The declared side could not be evaluated: ${s.unavailableReason}.`:`Missing: ${s.missing.join(", ")||"none"}. Extra: ${s.extra.join(", ")||"none"}.`,"Either side of this contract changed in this diff."],remediation:s.status==="unavailable"?"Investigate why the declared key set could not be parsed (see the reason above) \u2014 do not treat this as a pass.":`Update ${n.file} so its ${n.keys.type==="object-literal-keys"||n.keys.type==="string-array"?n.keys.identifier:n.keys.marker} matches ${n.mustEqual.type}, or fix the ground-truth source if the declared set is right.`})}}function Et(e){return`${e.commitScope}/${e.recency}; ${e.focusedTogether} focused, ${e.broadTogether} broad-sweep (${Math.round(e.broadCommitRatio*100)}% broad), ${e.recentTogether} recent, last ${jt(e.lastTogetherAt)}`}function Gt(e){let i=e.subjectLabels.length>0?e.subjectLabels.slice(0,5).join(", "):"none inferred",t=e.issueRefs.length>0?e.issueRefs.slice(0,5).join(", "):"none",r=e.sampleSubjects.length>0?e.sampleSubjects.slice(0,3).map(n=>`"${n}"`).join("; "):"none";return`labels ${i}; refs ${t}; samples ${r}; external issue/PR labels ${e.externalIssueLabelStatus}`}function Nt(e){let i=[];return e.commitScope==="broad-sweep"&&i.push("Broad-sweep history is weaker than focused co-edits; confirm this is a real coordination contract."),e.recency==="stale"&&i.push("The pair has no co-change in the recent history window; confirm the coupling still holds."),i}function jt(e){return e<=0?"unknown":new Date(e*1e3).toISOString().slice(0,10)}var Q=3;function Bt(e,i,t,r,n,s){s.checksRun.push("doc-reference");let a=D.referenceTargets(e,i,r);if(a.size===0)return;let c=new Set(n.map(o=>o.from)),l=[];for(let o of he(e,a))t.has(o.doc)||me(e,o.doc)||l.push(Pt(e,o,c));for(let o of Kt(l))R(s,o)}function Pt(e,i,t){let r=i.citedClaims.length>0?i.citedClaims:D.citationContexts(e,i.doc,i.cited),n=D.classifyCitation(r),s=D.hasLineAnchoredCitation(i.citations),a=i.cited.some(m=>t.has(m)||!_(`${e.config.projectRoot}/${m}`)),c=!(s||a),l=i.cited[0]??"",o=b("doc-reference",i.doc,i.cited.join("|")),f=b("doc-reference",i.doc,l);return{id:f,legacySuppressionIds:o===f?void 0:[o],check:"doc-reference",severity:"warning",evidence:"change-graph",actionTier:n.actionTier,groupKey:`doc-reference:${l}`,rootCauseKey:l,confidence:1,file:i.doc,relatedFiles:i.cited,citationKind:n.citationKind,citationKindReasons:n.reasons,citedClaims:r,...c?{advisory:!0}:{},message:`${i.doc} cites ${i.cited.join(", ")} as ${D.citationKindLabel(n.citationKind)} \u2014 changed in this diff, doc untouched`,why:[`${i.cited.join(", ")} changed in this diff.`,`${i.doc} cites the changed file(s) but was not updated in the same diff.`,...n.reasons.map(m=>`Citation kind evidence: ${m}`),c?"Advisory: bare file-mention citation (no line anchor, cited file still present under the same path) \u2014 21.2 calibration found this citation shape low-precision; verify at your leisure.":s?"Blocking: citation includes a line anchor that may now point at the wrong lines.":"Blocking: the cited file was deleted or renamed in this diff \u2014 the citation almost certainly needs an update."],remediation:D.citationRemediation(n.citationKind,i.doc)}}function Kt(e){let i=new Map;for(let r of e){let n=r.rootCauseKey??"",s=i.get(n);s?s.push(r):i.set(n,[r])}let t=[];for(let[r,n]of i)n.length<=Q?t.push(...n):t.push(Mt(r,n));return t}function Mt(e,i){let t=[...i].sort((f,m)=>(f.file??"").localeCompare(m.file??"")),r=t.slice(0,Q).map(f=>({doc:f.file??"",citedClaims:f.citedClaims??[]})),n=t.length-r.length,s=t.every(f=>f.advisory===!0),a=t.reduce((f,m)=>qe(f,m.severity),"info"),c=t.reduce((f,m)=>We(f,m.actionTier),void 0),l=t.map(f=>f.file??"").filter(f=>f.length>0),o=[...new Set(t.flatMap(f=>[f.id,...f.legacySuppressionIds??[]]))];return{id:b("doc-reference","hub-cluster",e),memberFindingIds:o,check:"doc-reference",severity:a,evidence:"change-graph",actionTier:c,groupKey:`doc-reference:${e}`,rootCauseKey:e,confidence:1,file:r[0]?.doc,relatedFiles:[e],citationCount:t.length,citationExemplars:r,suppressedCount:n,...s?{advisory:!0}:{},message:`${e} is cited by ${t.length} doc(s) changed in this diff, doc(s) untouched \u2014 showing ${r.length} example(s), ${n} more damped`,why:[`${e} changed in this diff.`,`${t.length} doc(s) cite it but were not updated in the same diff: ${l.join(", ")}.`,...r.map(f=>`Example \u2014 ${f.doc}: ${f.citedClaims[0]??"(no captured citation text)"}`),`${n} additional doc(s) also cite this file, past the per-hub-file cascade cap (${Q}) \u2014 not silently dropped: counted in citationCount/suppressedCount and individually addressable via memberFindingIds.`,s?"Advisory: every citation in this cluster is a bare file-mention (no line anchor, cited file still present).":"Blocking: at least one citation in this cluster is line-anchored or cites a deleted/renamed file."],remediation:`Review the ${r.length} example doc(s) above; ${t.length} total doc(s) cite ${e} the same way \u2014 see citationExemplars and memberFindingIds in --json for the complete list.`}}function Lt(e,i,t){t.checksRun.push("unused-params");for(let r of je(e,{files:i,limit:50})){let n=b("unused-params",r.symbol,r.file,r.unusedTrailing.join("|")),s=b("unused-params",r.symbol,r.file);R(t,{id:s,legacySuppressionIds:n===s?void 0:[n],check:"unused-params",severity:"warning",evidence:"heuristic",confidence:.85,file:r.file,startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,message:`${r.shortName} (${r.file}) has trailing unused parameter(s): ${r.unusedTrailing.join(", ")}`,why:[`${r.shortName} is in a changed file.`,`The trailing parameter(s) ${r.unusedTrailing.join(", ")} are not referenced in the function body.`],remediation:"Drop the unused trailing parameters and their call-site arguments."})}}function _t(e,i,t,r){r.checksRun.push("new-dead");let n=new se(e),s=ee(e.config.projectRoot),a=s.length>1;for(let c of i){if(t(c)||c.fanIn>0||n.fileKind(c.file)==="test"||E(e,c.file)||G(e,c.symbol,c.file)||zt(c.symbol))continue;let l=b("new-dead",c.symbol,c.file),o=a&&Ot(s,c.file)&&Ht(e,c.symbol);R(r,{id:l,check:"new-dead",severity:"warning",evidence:o?"heuristic":"graph-fact",confidence:o?.4:.9,file:c.file,symbol:c.symbol,message:o?`${c.shortName} (${c.file}) unconfirmed (cross-package ambiguous-name resolution gap): zero indexed consumers found, but this name is ambiguous project-wide and lives in a workspace package \u2014 verify manually before treating as dead`:`${c.shortName} (${c.file}) was changed but has zero indexed consumers`,why:o?[`${c.shortName} is a changed production symbol in a workspace package.`,"The index, semantic, and source-fallback layers all report zero consumers for this symbol.","Its leaf name is ambiguous project-wide (a same-named definition exists elsewhere), and cross-package consumers reached only through a re-exporting barrel are a known unresolvable shape for this tool \u2014 see docs/plans/2026-07-02-followups.md item 2."]:[`${c.shortName} is a changed production symbol.`,"The index reports zero consumers for this symbol.","The symbol is not in a detected entry surface or configured live root."],remediation:o?"Verify with a direct code search before deleting; this tool cannot confidently resolve this symbol.":"Wire it up, or remove it before it becomes permanent dead code."})}}function Ot(e,i){return e.some(t=>i===t.relativeDir||i.startsWith(`${t.relativeDir}/`))}function Ht(e,i){let t=v(i);return t?(re(e).get(t)?.length??0)>1:!1}function zt(e){if(ne(e)!=="type")return!1;let i=v(e);return i.startsWith("_Assert")||i.startsWith("Assert")}function Vt(e,i,t,r){let n=new Map(t.renamedFiles.map(a=>[a.to,a.from])),s=r??V(e,i,U(t));return a=>{let c=n.get(a.file)??a.file,l=v(a.symbol);if(!l)return!1;let o=s(c);return o!==null&&Ut(o,l)}}function Ut(e,i){return new RegExp(`\\b${ie(i)}\\b`).test(e)}function qt(e,i){if(!_(x(e))){i.skipped.push({check:"baseline",reason:"no .scipquery-baseline.json \u2014 run health --write-baseline to enable"});return}i.checksRun.push("baseline");let t=Pe(e);for(let r of t.newFindings.filter(n=>!n.startsWith(j))){let n=q(r),s=b("baseline",r);R(i,{id:s,groupKey:`baseline:${n.sourceAnalyzer}:${n.rootCauseKey}`,check:"baseline",severity:"error",evidence:"baseline",actionTier:n.actionTier,confidence:1,file:n.file,relatedFiles:n.relatedFiles.length>0?n.relatedFiles:void 0,sourceAnalyzer:n.sourceAnalyzer,rootCauseKey:n.rootCauseKey,message:`new ${n.label} vs committed baseline: ${r}`,why:["A committed health baseline exists.","The current health result contains a finding not present in that baseline.",`Underlying analyzer: ${n.sourceAnalyzer}.`,`Inherited action tier: ${n.actionTier}.`,`Root cause key: ${n.rootCauseKey}.`,...n.why],remediation:n.remediation})}}function Wt(e,i){if(!we(e.config.architecture)){i.skipped.push({check:"architecture",reason:"no closed architecture dependency rows, requireCompletePolicy rule, or requireAcyclic rule configured"});return}if(!_(x(e))){i.skipped.push({check:"architecture",reason:"no .scipquery-baseline.json \u2014 run health --write-baseline to enable"});return}i.checksRun.push("architecture");let t=Ke(e);for(let r of t.newFindings){let n=q(r),s=b("architecture",r);R(i,{id:s,groupKey:`architecture:${n.rootCauseKey}`,check:"architecture",severity:"error",evidence:"baseline",actionTier:"direct",confidence:1,sourceAnalyzer:"architecture",rootCauseKey:n.rootCauseKey,message:`new ${n.label} vs committed baseline: ${r}`,why:["The project declares an enforceable architecture rule.","The current boundary graph contains a violation not present in the committed baseline.",...n.why],remediation:n.remediation})}}function b(e,...i){return`SQ${bt("sha256").update([e,...i].join("\0")).digest("hex").slice(0,12).toUpperCase()}`}export{Be as a,Si as b,Pe as c,Ke as d,rn as e,on as f,sn as g,an as h,Vt as i};
2
- //# sourceMappingURL=chunk-RJMDJR3A.js.map
@@ -1,2 +0,0 @@
1
- import{b as m,c as d}from"./chunk-LP3ARJKF.js";import{a as $}from"./chunk-DQGSM7RZ.js";function v(r,e={}){return P(r,e).cycles}function P(r,e={}){let{scope:s,maxDepth:i=10}=e,n=$(r,s,{scipEdges:"imports-only"}),c=[],a=new Set,l=new Set,f=[],g=!1;function b(t,o){if(o>i){g=!0;return}if(l.has(t)){let h=f.indexOf(t);if(h!==-1){let u=f.slice(h).concat(t),y=u.indexOf(u.reduce((C,D)=>C<D?C:D)),p=[...u.slice(y,-1),...u.slice(0,y),u[y]],k=p.join(" -> ");S.has(k)||(S.add(k),c.push({path:p,kind:w(p)}))}return}if(a.has(t))return;a.add(t),l.add(t),f.push(t);let x=n.get(t);if(x)for(let h of x)b(h,o+1);f.pop(),l.delete(t)}let S=new Set;for(let t of n.keys())a.has(t)||b(t,0);return c.sort((t,o)=>t.kind!==o.kind?t.kind==="real"?-1:1:t.path.length-o.path.length),{cycles:c,truncated:g,maxDepth:i}}function w(r){for(let i of r){let n=m(i);if(n==="test"||n==="barrel"||n==="entry")return"module-hierarchy"}if(r.length!==3)return"real";let[e,s]=r;return!e||!s?"real":d(e)||d(s)||B(e,s)||B(s,e)||R(e,s)||R(s,e)||m(e)==="entry"||m(s)==="entry"?"module-hierarchy":"real"}function B(r,e){if(!/\.rs$/.test(r)||!/\.rs$/.test(e))return!1;let s=e.replace(/\.rs$/,"/");return r.startsWith(s)?!r.slice(s.length).includes("/"):!1}function R(r,e){if(!/\.rs$/.test(r)||!/\.rs$/.test(e))return!1;let s=r.replace(/\.rs$/,""),i=e.replace(/\.rs$/,"");if(s===i+"_tests"||s===i+"/tests")return!0;let n=r.split("/"),c=e.split("/");if(n.length===c.length&&n.includes("tests")&&c.includes("src")){let a=n[n.length-1],l=c[c.length-1];if(a&&a===l)return!0}return!1}export{v as a,P as b};
2
- //# sourceMappingURL=chunk-RLH5VUMG.js.map
@@ -1,3 +0,0 @@
1
- import{A as C,c as M,d as L,e as Q,g as I,h as K,i as O,n as y,o as d,r as b}from"./chunk-RA3AYNWP.js";import{k as E}from"./chunk-JORHF5AL.js";var W=E("symbol-resolution",{clearGroups:[]});function ue(e,n){return j(e,n).match}function j(e,n){return W.get(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=Y(e,n);if(o&&!e.isIgnored(o.relative_path))return S(e,[o]);let i=q(e,n);return i.length>0?S(e,i):U(e,n)})}function q(e,n){let t=N(n),o=x(t);if(!o)return[];let i=`%${o.path}%`,r=o.leaf;return T(e,i,r,t)}function T(e,n,t,o){let i=b([],[...G(e,n,t),...H(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 G(e,n,t){return y(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function H(e,n,t){return d(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function U(e,n){let t=N(n),o=te(n),i=P(e,o),r=ne(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=ee(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?X(t,o):[],total:t.length}}function X(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 Y(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 Z(e,o,a,s)??J(e,o,a,s)}function Z(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 me(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 pe(e,n){if("symbol"in n&&"relativePath"in n)return n;let t=V(e,n.symbolId)[0];return t?C(e,t):null}function V(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 P(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 ee(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??"",_=e.symbol.toLowerCase(),u=v.toLowerCase(),m=g.toLowerCase(),D=A.toLowerCase(),p=e.relative_path.toLowerCase(),B=/[/:.]/.test(t),$=x(t),w=$?.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),(_===s||_===c)&&(l+=1e3),(u===s||u===c)&&(l+=950),(p===s||p===c)&&(l+=925),(p.endsWith(`/${c}`)||p.endsWith(`/${s}`))&&(l+=875),D===h&&(l+=850),m===h&&(l+=825),(`${m}()`===s||`${m}()`===c)&&(l+=820),(u.endsWith(`:${c}`)||u.endsWith(`:${h}`)||u.endsWith(`:${h}()`))&&(l+=800),_.includes(c)&&(l+=120),u.includes(c)&&(l+=140),p.includes(c)&&(l+=140),D.includes(c)&&(l+=110),o.every(F=>{let R=F.toLowerCase();return _.includes(R)||u.includes(R)||p.includes(R)||D.includes(R)})&&(l+=100+o.length*15),$&&p.includes($.path.toLowerCase())&&(l+=360,w&&(m===w||`${m}()`===w||`${m}()`==`${w}()`)&&(l+=700),I(e.symbol)&&(l+=180)),K(e.symbol)&&m===h&&(l+=60),!B&&O(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 te(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 ne(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{ue as a,j as b,me as c,pe as d};
3
- //# sourceMappingURL=chunk-SMQWE25B.js.map
@@ -1,2 +0,0 @@
1
- import{c as f}from"./chunk-2SNGN6U4.js";import{a as h}from"./chunk-SMQWE25B.js";import{e as s,g as u}from"./chunk-RA3AYNWP.js";import{f as d}from"./chunk-MZZBAITE.js";import{x as c}from"./chunk-WUW7YUAH.js";import{basename as p}from"path";function N(r,o){let t=h(r,o);if(!t)return[];let e=s(t.symbol),a=new f(r).definitionsForFile(t.relativePath).filter(n=>u(n.symbol)),l=a.filter(n=>n.parentTypeName===e||n.symbol.includes(e)),m=(l.length>0?l:L(p(t.relativePath))===e?a.filter(n=>n.symbol.includes("<invalid-global-code>")):[]).map(n=>({startLine:n.startLine,endLine:n.endLine,name:s(n.symbol)}));return c(t.relativePath)!=="clojure"?m:b(m,M(r,t))}function L(r){return r.replace(/\.[^.]+$/,"")}function M(r,o){let t=s(o.symbol);return t?(d(r,o.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===t).map(e=>({startLine:e.startLine,endLine:e.endLine,name:e.memberName})):[]}function b(r,o){let t=new Map;for(let e of[...r,...o])t.set(`${e.name}:${e.startLine}:${e.endLine}`,e);return[...t.values()].sort((e,i)=>e.startLine-i.startLine||e.endLine-i.endLine)}export{N as a};
2
- //# sourceMappingURL=chunk-TAVELHYR.js.map