scip-query 0.19.4 → 0.19.6

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 (400) hide show
  1. package/CHANGELOG.md +75 -1
  2. package/README.md +242 -49
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/{chunk-2YU7I3QO.js → chunk-24QNP7MN.js} +2 -2
  5. package/dist/{chunk-CNKAGUPL.js → chunk-26X7KCJR.js} +2 -2
  6. package/dist/{chunk-GPBBJ5Y4.js → chunk-273W2U4Y.js} +3 -3
  7. package/dist/{chunk-7GXM52MI.js → chunk-2CVXCGL4.js} +2 -2
  8. package/dist/{chunk-ABMYA4TN.js → chunk-2EZSOTSY.js} +2 -2
  9. package/dist/{chunk-HKEHS2AS.js → chunk-2GSQR6YA.js} +2 -2
  10. package/dist/{chunk-FECYOO5O.js → chunk-2OXVAGGT.js} +2 -2
  11. package/dist/chunk-2ZOCHAL2.js +8 -0
  12. package/dist/{chunk-QGXBRIM5.js → chunk-336DC5NJ.js} +2 -2
  13. package/dist/chunk-35SQLYCQ.js +2 -0
  14. package/dist/{chunk-VXQNNXJE.js → chunk-3OIKRYU5.js} +2 -2
  15. package/dist/{chunk-52ZYCAEO.js → chunk-47X75ZKH.js} +2 -2
  16. package/dist/{chunk-NPKYOIFM.js → chunk-4CGVLUDP.js} +2 -2
  17. package/dist/chunk-4RI4BJGT.js +8 -0
  18. package/dist/{chunk-P2PC2WGR.js → chunk-52HQTTPB.js} +2 -2
  19. package/dist/{chunk-YNRNA5LK.js → chunk-5OC3HWP5.js} +2 -2
  20. package/dist/{chunk-STOL2BTL.js → chunk-6XFC7PQ5.js} +2 -2
  21. package/dist/{chunk-J77UIT3I.js → chunk-6XHTISLI.js} +2 -2
  22. package/dist/chunk-6YTSKJJ3.js +2 -0
  23. package/dist/{chunk-BTEE5NZQ.js → chunk-7E3TH5ZN.js} +2 -2
  24. package/dist/{chunk-X6D5IC6I.js → chunk-7LABSJSR.js} +2 -2
  25. package/dist/chunk-7Q6VYYCH.js +2 -0
  26. package/dist/{chunk-FWUUZTIO.js → chunk-A43URCQ3.js} +2 -2
  27. package/dist/chunk-A63U2W3P.js +3 -0
  28. package/dist/{chunk-3MJ5YA4Y.js → chunk-ADFSIJP2.js} +2 -2
  29. package/dist/chunk-AOLE4DYM.js +6 -0
  30. package/dist/chunk-APMMR5Y2.js +2 -0
  31. package/dist/chunk-B5MHCHP3.js +107 -0
  32. package/dist/{chunk-4RSI5EMG.js → chunk-CSTYYXKC.js} +2 -2
  33. package/dist/{chunk-25LPM4DG.js → chunk-CYJM7CYF.js} +2 -2
  34. package/dist/{chunk-S44IULR6.js → chunk-DD5BOU5I.js} +2 -2
  35. package/dist/{chunk-YGAGTIDK.js → chunk-DGMCFMPG.js} +7 -7
  36. package/dist/{chunk-UOAV44HR.js → chunk-E2ZXPB7J.js} +2 -2
  37. package/dist/{chunk-IZKFSVBV.js → chunk-EVOC5I5I.js} +2 -2
  38. package/dist/{chunk-XTX6QHOF.js → chunk-F42A3AKG.js} +2 -2
  39. package/dist/{chunk-Q4IIEGXJ.js → chunk-FHCTEANE.js} +2 -2
  40. package/dist/{chunk-3SVWW4PN.js → chunk-FKGN4A4E.js} +2 -2
  41. package/dist/{chunk-IG7N5ZIK.js → chunk-FQTPPXNA.js} +2 -2
  42. package/dist/{chunk-F6O7AAC3.js → chunk-G4UQL4CP.js} +2 -2
  43. package/dist/chunk-GA64UPMI.js +6 -0
  44. package/dist/{chunk-ZXJYMGD3.js → chunk-GK3GRUJX.js} +2 -2
  45. package/dist/chunk-HEBAY673.js +2 -0
  46. package/dist/chunk-HELS7KFF.js +2 -0
  47. package/dist/{chunk-B5NLK2B3.js → chunk-IPDCSB6N.js} +2 -2
  48. package/dist/{chunk-M7MTH5NR.js → chunk-IYAOX36F.js} +2 -2
  49. package/dist/{chunk-YVVCVR2L.js → chunk-J7VT2CRB.js} +2 -2
  50. package/dist/{chunk-4333ETTV.js → chunk-JELJLXEE.js} +2 -2
  51. package/dist/{chunk-LBMJEAEW.js → chunk-JERWGHQT.js} +2 -2
  52. package/dist/chunk-JJJCO4QC.js +945 -0
  53. package/dist/{chunk-6E7UTQY7.js → chunk-JZNLMHWY.js} +2 -2
  54. package/dist/{chunk-R4FQGQ4X.js → chunk-K42M2KWT.js} +2 -2
  55. package/dist/{chunk-H7UKLTWJ.js → chunk-KLVJABXA.js} +2 -2
  56. package/dist/chunk-KP4KBDVF.js +3 -0
  57. package/dist/{chunk-RV2FQIX3.js → chunk-LMFVTUW2.js} +2 -2
  58. package/dist/chunk-LRTP3DKL.js +3 -0
  59. package/dist/{chunk-U6WNH5GC.js → chunk-MGBJHRFB.js} +2 -2
  60. package/dist/{chunk-QDV6RDCP.js → chunk-MLGTCX56.js} +2 -2
  61. package/dist/{chunk-54HA4ZXH.js → chunk-N3SE646F.js} +2 -2
  62. package/dist/{chunk-KP6XRY5Z.js → chunk-NBRUH7OE.js} +2 -2
  63. package/dist/{chunk-M7AIS73L.js → chunk-NN4ZIRPK.js} +2 -2
  64. package/dist/{chunk-I5RJM53C.js → chunk-NQLSSVOB.js} +2 -2
  65. package/dist/{chunk-4SALD7RU.js → chunk-OBKDTVZ3.js} +2 -2
  66. package/dist/{chunk-GBQ5NYPR.js → chunk-OHWZKLVA.js} +6 -6
  67. package/dist/{chunk-6NSFJYRC.js → chunk-OP3MTFJR.js} +2 -2
  68. package/dist/{chunk-EOOJGLDU.js → chunk-OQ2A4G2G.js} +2 -2
  69. package/dist/{chunk-DLWR3NUU.js → chunk-P6HBYNBE.js} +2 -2
  70. package/dist/{chunk-QVWS2VWZ.js → chunk-PC44K7RF.js} +2 -2
  71. package/dist/{chunk-A2EZV2UM.js → chunk-QBYYWGAT.js} +2 -2
  72. package/dist/{chunk-QRGV2F7L.js → chunk-QHKUY4FW.js} +2 -2
  73. package/dist/chunk-QHRL4LKM.js +2 -0
  74. package/dist/{chunk-I5AWSI2G.js → chunk-QQWOFXNW.js} +2 -2
  75. package/dist/{chunk-WQTAC523.js → chunk-RBFFD4V2.js} +2 -2
  76. package/dist/{chunk-SOAT6NLA.js → chunk-RJHCPSZ7.js} +2 -2
  77. package/dist/{chunk-VGRICIQI.js → chunk-RWRLUZ6U.js} +2 -2
  78. package/dist/{chunk-4T3LTWUS.js → chunk-S2GP3CU3.js} +2 -2
  79. package/dist/{chunk-HEXVUYFQ.js → chunk-SHKZ7OVJ.js} +2 -2
  80. package/dist/{chunk-NSS46APD.js → chunk-TFUU5MQQ.js} +2 -2
  81. package/dist/{chunk-IUFDSKGG.js → chunk-TYQ76QHQ.js} +2 -2
  82. package/dist/{chunk-NRCXJDHL.js → chunk-U5CNPPTZ.js} +2 -2
  83. package/dist/{chunk-MITTUCEH.js → chunk-UQK5CRUK.js} +2 -2
  84. package/dist/{chunk-XLTP42QA.js → chunk-UUJBLG6J.js} +2 -2
  85. package/dist/chunk-UXP636P5.js +144 -0
  86. package/dist/{chunk-64RFXJT5.js → chunk-VEVBIAOJ.js} +6 -6
  87. package/dist/chunk-VKRQDBW5.js +9 -0
  88. package/dist/{chunk-C7NIYIQ4.js → chunk-VOQFGC2W.js} +4 -4
  89. package/dist/{chunk-DZ74OMG6.js → chunk-VP542C25.js} +2 -2
  90. package/dist/{chunk-Q3AFUTGB.js → chunk-WMXRRBII.js} +2 -2
  91. package/dist/{chunk-ZGZUZ7XE.js → chunk-WXAAURU7.js} +2 -2
  92. package/dist/chunk-X3NLZHPA.js +20 -0
  93. package/dist/{chunk-WER3B7MI.js → chunk-XF3KLXN3.js} +2 -2
  94. package/dist/{chunk-NH5ALKPW.js → chunk-XVJ3V7LM.js} +2 -2
  95. package/dist/{chunk-4XTA5OMB.js → chunk-YGQN3XGZ.js} +2 -2
  96. package/dist/{chunk-CFMXJPHH.js → chunk-YHXBD52M.js} +2 -2
  97. package/dist/{chunk-7B3UPBVA.js → chunk-YLVE3SXZ.js} +2 -2
  98. package/dist/{chunk-YIJ7ZAA4.js → chunk-YTUD45PU.js} +2 -2
  99. package/dist/{chunk-VTKGCT3V.js → chunk-YWB2EBNB.js} +2 -2
  100. package/dist/{chunk-UKZBVX4U.js → chunk-Z2LHPIOM.js} +2 -2
  101. package/dist/chunk-Z5QQPJ3U.js +30 -0
  102. package/dist/{chunk-NZL2DBT7.js → chunk-ZLJLE6LK.js} +2 -2
  103. package/dist/{chunk-XYADIZHU.js → chunk-ZTTISZ7J.js} +2 -2
  104. package/dist/cli.js +3 -3
  105. package/dist/command-descriptors-SJDZ7QGR.js +617 -0
  106. package/dist/{config-types-D20KuvvZ.d.ts → config-types-BWQ5xPGI.d.ts} +4 -0
  107. package/dist/{db-G_II8yXU.d.ts → db-B0r1o7Vt.d.ts} +18 -1
  108. package/dist/direct-navigation-HTKOZEOM.js +3 -0
  109. package/dist/{health-oblXYgkF.d.ts → health-CFnlCiTz.d.ts} +1 -1
  110. package/dist/index.d.ts +2 -2
  111. package/dist/index.js +1 -1
  112. package/dist/postinstall.js +1 -1
  113. package/dist/queries/affected.d.ts +2 -2
  114. package/dist/queries/affected.js +1 -1
  115. package/dist/queries/architecture.d.ts +2 -2
  116. package/dist/queries/architecture.js +1 -1
  117. package/dist/queries/bottlenecks.d.ts +2 -2
  118. package/dist/queries/bottlenecks.js +1 -1
  119. package/dist/queries/by-kind.d.ts +2 -2
  120. package/dist/queries/by-kind.js +1 -1
  121. package/dist/queries/call-graph.d.ts +2 -2
  122. package/dist/queries/call-graph.js +1 -1
  123. package/dist/queries/change-surface.d.ts +2 -2
  124. package/dist/queries/change-surface.js +1 -1
  125. package/dist/queries/cleanup-plan.d.ts +2 -2
  126. package/dist/queries/cleanup-plan.js +1 -1
  127. package/dist/queries/co-change.d.ts +2 -2
  128. package/dist/queries/co-change.js +1 -1
  129. package/dist/queries/code.d.ts +2 -2
  130. package/dist/queries/code.js +1 -1
  131. package/dist/queries/complexity-hotspots.d.ts +2 -2
  132. package/dist/queries/complexity-hotspots.js +1 -1
  133. package/dist/queries/complexity.d.ts +2 -2
  134. package/dist/queries/complexity.js +1 -1
  135. package/dist/queries/convergence.d.ts +2 -2
  136. package/dist/queries/convergence.js +1 -1
  137. package/dist/queries/coupling.d.ts +2 -2
  138. package/dist/queries/coupling.js +1 -1
  139. package/dist/queries/cycles.d.ts +2 -2
  140. package/dist/queries/cycles.js +1 -1
  141. package/dist/queries/dataflow.d.ts +2 -2
  142. package/dist/queries/dataflow.js +1 -1
  143. package/dist/queries/dead.d.ts +2 -2
  144. package/dist/queries/dead.js +1 -1
  145. package/dist/queries/decorative-checkers.d.ts +3 -3
  146. package/dist/queries/decorative-checkers.js +1 -1
  147. package/dist/queries/deep-chains.d.ts +2 -2
  148. package/dist/queries/deep-chains.js +1 -1
  149. package/dist/queries/deps.d.ts +2 -2
  150. package/dist/queries/deps.js +1 -1
  151. package/dist/queries/diff-gate.d.ts +30 -2
  152. package/dist/queries/diff-gate.js +1 -1
  153. package/dist/queries/diff-impact.d.ts +2 -2
  154. package/dist/queries/diff-impact.js +1 -1
  155. package/dist/queries/doc-drift.d.ts +2 -2
  156. package/dist/queries/doc-drift.js +1 -1
  157. package/dist/queries/drift.d.ts +2 -2
  158. package/dist/queries/drift.js +1 -1
  159. package/dist/queries/duplicate-bodies.d.ts +2 -2
  160. package/dist/queries/duplicate-bodies.js +1 -1
  161. package/dist/queries/extract-candidates.d.ts +2 -2
  162. package/dist/queries/extract-candidates.js +1 -1
  163. package/dist/queries/fan.d.ts +2 -2
  164. package/dist/queries/fan.js +1 -1
  165. package/dist/queries/files.d.ts +2 -2
  166. package/dist/queries/health.d.ts +3 -3
  167. package/dist/queries/health.js +1 -1
  168. package/dist/queries/hierarchy.d.ts +2 -2
  169. package/dist/queries/hierarchy.js +1 -1
  170. package/dist/queries/hotspots.d.ts +2 -2
  171. package/dist/queries/hotspots.js +1 -1
  172. package/dist/queries/imports.d.ts +2 -2
  173. package/dist/queries/imports.js +1 -1
  174. package/dist/queries/incomplete-migration.d.ts +2 -2
  175. package/dist/queries/incomplete-migration.js +1 -1
  176. package/dist/queries/index.d.ts +17 -3
  177. package/dist/queries/index.js +1 -1
  178. package/dist/queries/isolated.d.ts +2 -2
  179. package/dist/queries/isolated.js +1 -1
  180. package/dist/queries/locality-candidates.d.ts +2 -2
  181. package/dist/queries/locality-candidates.js +1 -1
  182. package/dist/queries/members.d.ts +2 -2
  183. package/dist/queries/members.js +1 -1
  184. package/dist/queries/methods.d.ts +2 -2
  185. package/dist/queries/methods.js +1 -1
  186. package/dist/queries/not-implemented.d.ts +3 -3
  187. package/dist/queries/not-implemented.js +1 -1
  188. package/dist/queries/outline.d.ts +2 -2
  189. package/dist/queries/outline.js +1 -1
  190. package/dist/queries/passthrough-candidates.d.ts +2 -2
  191. package/dist/queries/passthrough-candidates.js +1 -1
  192. package/dist/queries/plan-context.d.ts +2 -2
  193. package/dist/queries/plan-context.js +1 -1
  194. package/dist/queries/react-component-duplicates.d.ts +2 -2
  195. package/dist/queries/react-component-duplicates.js +1 -1
  196. package/dist/queries/react-hook-candidates.d.ts +2 -2
  197. package/dist/queries/react-hook-candidates.js +1 -1
  198. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  199. package/dist/queries/react-large-component-pressure.js +1 -1
  200. package/dist/queries/recent-duplicates.d.ts +2 -2
  201. package/dist/queries/recent-duplicates.js +1 -1
  202. package/dist/queries/redundant-reexports.d.ts +2 -2
  203. package/dist/queries/redundant-reexports.js +1 -1
  204. package/dist/queries/refs.d.ts +2 -2
  205. package/dist/queries/refs.js +1 -1
  206. package/dist/queries/self-audit.d.ts +2 -2
  207. package/dist/queries/self-audit.js +1 -1
  208. package/dist/queries/similar-chains.d.ts +2 -2
  209. package/dist/queries/similar-chains.js +1 -1
  210. package/dist/queries/similar-files.d.ts +2 -2
  211. package/dist/queries/similar-files.js +1 -1
  212. package/dist/queries/similar-signatures.d.ts +2 -2
  213. package/dist/queries/similar-signatures.js +1 -1
  214. package/dist/queries/similar.d.ts +2 -2
  215. package/dist/queries/similar.js +1 -1
  216. package/dist/queries/slice.d.ts +2 -2
  217. package/dist/queries/slice.js +1 -1
  218. package/dist/queries/stale-abstractions.d.ts +2 -2
  219. package/dist/queries/stale-abstractions.js +1 -1
  220. package/dist/queries/stats.d.ts +2 -2
  221. package/dist/queries/stats.js +1 -1
  222. package/dist/queries/surface.d.ts +2 -2
  223. package/dist/queries/surface.js +1 -1
  224. package/dist/queries/symbols.d.ts +2 -2
  225. package/dist/queries/symbols.js +1 -1
  226. package/dist/queries/system.d.ts +2 -2
  227. package/dist/queries/system.js +1 -1
  228. package/dist/queries/test-quality.d.ts +2 -2
  229. package/dist/queries/test-quality.js +1 -1
  230. package/dist/queries/trace.d.ts +2 -2
  231. package/dist/queries/trace.js +1 -1
  232. package/dist/queries/twin-ab.d.ts +3 -3
  233. package/dist/queries/twin-ab.js +1 -1
  234. package/dist/queries/twin-drift.d.ts +2 -2
  235. package/dist/queries/twin-drift.js +1 -1
  236. package/dist/queries/unused-imports.d.ts +2 -2
  237. package/dist/queries/unused-imports.js +1 -1
  238. package/dist/queries/unused-params.d.ts +2 -2
  239. package/dist/queries/unused-params.js +1 -1
  240. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  241. package/dist/queries/vue-component-duplicates.js +1 -1
  242. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  243. package/dist/queries/vue-composable-candidates.js +1 -1
  244. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  245. package/dist/queries/vue-large-view-pressure.js +1 -1
  246. package/dist/queries/wrapper-candidates.d.ts +2 -2
  247. package/dist/queries/wrapper-candidates.js +1 -1
  248. package/dist/reindex-worker.js +23 -24
  249. package/dist/reindex.d.ts +10 -4
  250. package/dist/reindex.js +33 -38
  251. package/dist/runtime.d.ts +167 -11
  252. package/dist/runtime.js +3 -2
  253. package/dist/rust-semantic-session-server.js +1 -1
  254. package/dist/rust-semantic-session-worker.js +1 -1
  255. package/dist/rust-semantic-worker.js +1 -1
  256. package/dist/{scip-cli-kRpaexVJ.d.ts → scip-cli-DCvnlZCu.d.ts} +5 -1
  257. package/dist/watch-server.js +5 -5
  258. package/docs/AGENT_GUIDE.md +1 -1
  259. package/docs/AI_FAILURE_MODES.md +18 -18
  260. package/docs/API_EVOLUTION.md +71 -0
  261. package/docs/CLI_JSON_OUTPUT.md +83 -0
  262. package/docs/COMMAND_REFERENCE.md +10 -8
  263. package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
  264. package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
  265. package/docs/DETECTOR_GUIDE.md +47 -47
  266. package/docs/DURABILITY.md +103 -0
  267. package/docs/INDEX_GENERATIONS.md +121 -0
  268. package/docs/LOCK_PROTOCOL.md +133 -0
  269. package/docs/MAILBOX_LIFECYCLE.md +197 -0
  270. package/docs/REINDEX_METADATA_COMPATIBILITY.md +84 -0
  271. package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
  272. package/docs/TELEMETRY_RETENTION.md +72 -0
  273. package/docs/TIME_SEMANTICS.md +77 -0
  274. package/docs/WATCH_REFRESH_REQUESTS.md +110 -0
  275. package/docs/WINDOWS_SIDECAR_RELEASE.md +298 -0
  276. package/docs/analyzer-validation-ledger.md +24 -23
  277. package/docs/schemas/cli-json-envelope.schema.json +53 -0
  278. package/docs/schemas/npm-release-state.schema.json +146 -0
  279. package/docs/schemas/outcome-event-record.schema.json +39 -0
  280. package/docs/schemas/project-config.schema.json +247 -0
  281. package/docs/schemas/suppression-record.schema.json +31 -0
  282. package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
  283. package/package.json +15 -5
  284. package/scripts/build-scip-windows.mjs +180 -61
  285. package/scripts/scip-windows-provenance.mjs +364 -0
  286. package/scripts/verify-scip-windows.mjs +29 -0
  287. package/skills/_shared/SKILL.md +91 -242
  288. package/skills/_shared/agents/openai.yaml +1 -1
  289. package/skills/_shared/references/agent-contract-catalog.md +105 -0
  290. package/skills/_shared/references/command-catalog.md +118 -0
  291. package/skills/_shared/references/detector-precision-and-diffgate.md +59 -0
  292. package/skills/_shared/references/evidence-and-dead-code.md +25 -0
  293. package/skills/scip-audit/SKILL.md +76 -0
  294. package/skills/scip-audit/agents/openai.yaml +4 -0
  295. package/skills/scip-audit/references/claims.md +98 -0
  296. package/skills/scip-audit/references/cleanup.md +101 -0
  297. package/skills/scip-audit/references/directory.md +222 -0
  298. package/skills/scip-audit/references/frontend.md +130 -0
  299. package/skills/scip-audit/references/integrity.md +154 -0
  300. package/skills/scip-audit/references/maintainability.md +162 -0
  301. package/skills/scip-audit/references/twin-drift.md +104 -0
  302. package/skills/scip-diagnose/SKILL.md +52 -0
  303. package/skills/scip-diagnose/agents/openai.yaml +4 -0
  304. package/skills/scip-diagnose/references/debug.md +117 -0
  305. package/skills/{scip-probe-reachability/SKILL.md → scip-diagnose/references/probe-reachability.md} +12 -27
  306. package/skills/scip-diagnose/references/root-cause.md +145 -0
  307. package/skills/scip-diagnose/references/triage.md +119 -0
  308. package/skills/scip-explore/SKILL.md +53 -84
  309. package/skills/scip-explore/agents/openai.yaml +2 -2
  310. package/skills/scip-explore/references/diagrams.md +40 -0
  311. package/skills/scip-explore/references/language-playbook.md +49 -0
  312. package/skills/scip-improve/SKILL.md +56 -0
  313. package/skills/scip-improve/agents/openai.yaml +4 -0
  314. package/skills/scip-improve/references/cleanup-batches.md +53 -0
  315. package/skills/scip-improve/references/directory-moves.md +53 -0
  316. package/skills/scip-improve/references/doc-reconcile.md +30 -0
  317. package/skills/scip-improve/references/frontend-extraction.md +39 -0
  318. package/skills/scip-improve/references/maintainability-mechanism.md +43 -0
  319. package/skills/scip-improve/references/twin-drift.md +35 -0
  320. package/skills/scip-plan/SKILL.md +68 -0
  321. package/skills/scip-plan/agents/openai.yaml +4 -0
  322. package/skills/scip-plan/references/api-impact.md +19 -0
  323. package/skills/scip-plan/references/conductor.md +41 -0
  324. package/skills/scip-plan/references/high-assurance.md +43 -0
  325. package/skills/scip-plan/references/hyper-optimization.md +50 -0
  326. package/skills/scip-plan/references/tla-model.md +88 -0
  327. package/skills/scip-query/SKILL.md +52 -97
  328. package/skills/scip-query/agents/openai.yaml +2 -2
  329. package/skills/scip-setup/SKILL.md +65 -176
  330. package/skills/scip-setup/agents/openai.yaml +3 -3
  331. package/skills/scip-setup/references/bootstrap-workflow.md +120 -0
  332. package/skills/scip-setup/references/language-verification.md +61 -0
  333. package/skills/scip-setup/references/lifecycle-commands.md +119 -0
  334. package/skills/scip-setup/references/per-repo-triage.md +24 -0
  335. package/skills/scip-verify/SKILL.md +123 -70
  336. package/skills/scip-verify/agents/openai.yaml +2 -2
  337. package/skills/scip-verify/references/calibrate-detectors.md +170 -0
  338. package/dist/chunk-2CTX5CMX.js +0 -4
  339. package/dist/chunk-2Y373BDD.js +0 -2
  340. package/dist/chunk-C2QSK7E7.js +0 -2
  341. package/dist/chunk-D4U5Q3FT.js +0 -7
  342. package/dist/chunk-K2ERX4UT.js +0 -3
  343. package/dist/chunk-KHE7J5ZN.js +0 -3
  344. package/dist/chunk-L7SPDE73.js +0 -84
  345. package/dist/chunk-LHMNRHGV.js +0 -3
  346. package/dist/chunk-LM72NQ7T.js +0 -3
  347. package/dist/chunk-MSWVMDAH.js +0 -122
  348. package/dist/chunk-NH7WNNQC.js +0 -20
  349. package/dist/chunk-OMPZHGHO.js +0 -2
  350. package/dist/chunk-SVLTAG5O.js +0 -927
  351. package/dist/chunk-U7DSEKOM.js +0 -30
  352. package/dist/chunk-V27BEQJN.js +0 -7
  353. package/dist/chunk-VMNZB6WI.js +0 -4
  354. package/dist/chunk-XBN5VO53.js +0 -2
  355. package/dist/chunk-ZAIILQNP.js +0 -5
  356. package/dist/command-descriptors-MFU4BCJ7.js +0 -612
  357. package/dist/direct-navigation-MRMQFIRB.js +0 -3
  358. package/skills/scip-api-impact/SKILL.md +0 -139
  359. package/skills/scip-api-impact/agents/openai.yaml +0 -4
  360. package/skills/scip-calibrate/SKILL.md +0 -131
  361. package/skills/scip-calibrate/agents/openai.yaml +0 -4
  362. package/skills/scip-claim-audit/SKILL.md +0 -106
  363. package/skills/scip-claim-audit/agents/openai.yaml +0 -4
  364. package/skills/scip-cleanup-audit/SKILL.md +0 -126
  365. package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
  366. package/skills/scip-cleanup-improve/SKILL.md +0 -84
  367. package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
  368. package/skills/scip-concrete-plan/SKILL.md +0 -262
  369. package/skills/scip-concrete-plan/agents/openai.yaml +0 -4
  370. package/skills/scip-conductor/SKILL.md +0 -133
  371. package/skills/scip-conductor/agents/openai.yaml +0 -4
  372. package/skills/scip-debug/SKILL.md +0 -130
  373. package/skills/scip-debug/agents/openai.yaml +0 -4
  374. package/skills/scip-diagram/SKILL.md +0 -110
  375. package/skills/scip-diagram/agents/openai.yaml +0 -4
  376. package/skills/scip-directory-architecture/SKILL.md +0 -254
  377. package/skills/scip-directory-architecture/agents/openai.yaml +0 -4
  378. package/skills/scip-doc-reconcile/SKILL.md +0 -89
  379. package/skills/scip-doc-reconcile/agents/openai.yaml +0 -4
  380. package/skills/scip-hyper-optimization/SKILL.md +0 -156
  381. package/skills/scip-hyper-optimization/agents/openai.yaml +0 -4
  382. package/skills/scip-integrity-audit/SKILL.md +0 -152
  383. package/skills/scip-integrity-audit/agents/openai.yaml +0 -4
  384. package/skills/scip-language-playbook/SKILL.md +0 -106
  385. package/skills/scip-language-playbook/agents/openai.yaml +0 -4
  386. package/skills/scip-maintainability/SKILL.md +0 -158
  387. package/skills/scip-maintainability/agents/openai.yaml +0 -4
  388. package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
  389. package/skills/scip-react-maintainability/SKILL.md +0 -101
  390. package/skills/scip-react-maintainability/agents/openai.yaml +0 -4
  391. package/skills/scip-root-cause/SKILL.md +0 -150
  392. package/skills/scip-root-cause/agents/openai.yaml +0 -4
  393. package/skills/scip-tla-model-system/SKILL.md +0 -148
  394. package/skills/scip-tla-model-system/agents/openai.yaml +0 -4
  395. package/skills/scip-triage-issue/SKILL.md +0 -126
  396. package/skills/scip-triage-issue/agents/openai.yaml +0 -4
  397. package/skills/scip-twin-drift/SKILL.md +0 -107
  398. package/skills/scip-twin-drift/agents/openai.yaml +0 -4
  399. package/skills/scip-vue-maintainability/SKILL.md +0 -107
  400. package/skills/scip-vue-maintainability/agents/openai.yaml +0 -4
@@ -1,6 +1,6 @@
1
- import{h as x,m as k}from"./chunk-C7NIYIQ4.js";import he from"better-sqlite3";import{existsSync as bn}from"fs";import{dirname as yn,join as xn,resolve as ye}from"path";import G from"better-sqlite3";import{execFileSync as K}from"child_process";import{existsSync as X,readdirSync as J,readFileSync as B}from"fs";import{extname as m,join as I}from"path";import{readdirSync as we}from"fs";import{execFileSync as Ae}from"child_process";import{extname as De,join as _e}from"path";var H=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],v=[".vue"],V=[".tsx",".jsx"],E=[".vue"],je=[...V,...E],$e=new Set(V),Ue=new Set(E),W=new Set(H.map(e=>e.toLowerCase())),He=[...W].sort().join(","),C=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);var We=x("source-files",{clearGroups:[]});function ze(e={}){return{id:"auxiliary-documents",facts:["auxiliary-document"],run:n=>q({projectRoot:n.projectRoot,dbPath:n.dbPath,extensions:e.extensions,onStatus:n.onStatus})}}function q(e){let n=new Set((e.extensions??v).map(i=>i.toLowerCase()));if(n.size===0)return{scanned:0,inserted:0,existing:0};if(!X(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let r=k(e.projectRoot),t=Y(e.projectRoot,n).filter(i=>!r.isIgnored(i)),o=new G(e.dbPath);try{let i=Q(o,t),s=o.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
2
- VALUES (?, ?, NULL, ?)`),u=o.transaction(l=>{let d=0;for(let f of l){if(i.has(f))continue;let p=B(I(e.projectRoot,f),"utf-8"),U=s.run(Z(f),f,p);d+=Number(U.changes)}return d})(t),c={scanned:t.length,inserted:u,existing:t.length-u};return e.onStatus?.(`Augmented SQLite documents with ${u} auxiliary source file${u===1?"":"s"} (${c.existing} already present).`),c}finally{o.close()}}function Y(e,n){let r=z(e,n);if(r)return r;let t=[],o=i=>{let s=i?I(e,i):e,a;try{a=J(s,{withFileTypes:!0})}catch{return}for(let u of a){if(C.has(u.name))continue;let c=i?`${i}/${u.name}`:u.name;if(u.isDirectory()){o(c);continue}n.has(m(u.name).toLowerCase())&&t.push(c)}};return o(""),t.sort()}function z(e,n){try{return K("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:26214400,stdio:["ignore","pipe","ignore"]}).split(`
3
- `).filter(t=>t&&n.has(m(t).toLowerCase())).sort()}catch{return null}}function Q(e,n){let r=new Set,t=500;for(let o=0;o<n.length;o+=t){let i=n.slice(o,o+t),s=e.prepare(`SELECT relative_path FROM documents WHERE relative_path IN (${i.map(()=>"?").join(",")})`).all(...i);for(let a of s)r.add(a.relative_path)}return r}function Z(e){return m(e).toLowerCase()===".vue"?"vue":m(e).replace(/^\./,"").toLowerCase()||"source"}import{readFileSync as en,writeFileSync as nn}from"fs";function tn(e,n){let r=Date.now(),t=e.run(n);return{stageId:e.id,facts:e.facts,durationMs:Date.now()-r,result:t}}function ee(){return{"missing-source-file":0,"missing-service-script":0,"no-definition":0,"same-file-definition":0,"unindexed-definition":0}}function S(){return{skippedReferences:0,skippedReferenceReasons:ee(),skippedReferenceSamples:[]}}function T(e,n){e.skippedReferences+=n.skippedReferences;for(let r of Object.keys(e.skippedReferenceReasons)){e.skippedReferenceReasons[r]+=n.skippedReferenceReasons[r];for(let t of n.skippedReferenceSamples.filter(o=>o.reason===r))e.skippedReferenceSamples.filter(i=>i.reason===r&&i.sourceFile===t.sourceFile).length<2&&e.skippedReferenceSamples.push(t)}}import{createRequire as ne}from"module";import{existsSync as te,readFileSync as b}from"fs";import{dirname as L,extname as re,join as F,relative as oe,resolve as cn}from"path";import{pathToFileURL as ie}from"url";function O(e,n){let{vueCore:r,ts:t,volarTs:o}=se(e),{parsed:i,vueOptions:s}=ae(r,t,n),a=L(n),u=r.createVueLanguagePlugin(t,i.options,s,p=>p),c=ue(r,t,u),l=ce(a,i),{languageServiceHost:d}=o.createLanguageServiceHost(t,t.sys,c,p=>p,l),f=t.createLanguageService(d);return{ts:t,language:c,languageService:f,fileNames:i.fileNames,configDir:a}}function se(e){let n=ne(ie(F(e,"package.json")).href);return{vueCore:R(n,"@vue/language-core",e),ts:R(n,"typescript",e),volarTs:R(n,"@volar/typescript",e)}}function ae(e,n,r){let t=n.readConfigFile(r,n.sys.readFile);if(t.error||!t.config)throw new Error(`Failed to read ${r}`);let i=e.createParsedCommandLine(n,n.sys,r).vueOptions;return typeof e.createGlobalTypesWriter=="function"&&(i.globalTypesPath=e.createGlobalTypesWriter(i,n.sys.writeFile)),{parsed:n.parseJsonConfigFileContent(t.config,n.sys,L(r),void 0,r,void 0,e.getAllExtensions(i).map(s=>({extension:s.slice(1),isMixedContent:!0,scriptKind:n.ScriptKind.Deferred}))),vueOptions:i}}function ue(e,n,r){let t={},o=e.createLanguage([r],new Map,i=>{if(!te(i))return;let s=b(i,"utf-8");t.current?.scripts.set(i,n.ScriptSnapshot.fromString(s),r.getLanguageId(i)??fe(i))});return t.current=o,o}function ce(e,n){return{getCurrentDirectory:()=>e,getCompilationSettings:()=>n.options,getScriptFileNames:()=>n.fileNames,getProjectReferences:()=>n.projectReferences,getProjectVersion:()=>"0"}}function R(e,n,r){try{return e(n)}catch(t){throw(typeof t=="object"&&t!==null&&"code"in t?t.code:null)==="MODULE_NOT_FOUND"?new Error(`Vue augmentation requires ${n} to be installed in ${r}. Install Vue/Volar dependencies for that project, then rerun augment-vue.`,{cause:t}):t}}function w(e,n,r){let t=le(e);return o=>{if(!o.name)return null;let i=g(n,o.fileName),s=r.get(o.fileName);if(!s)return null;let a=r.positionAt(s,o.textSpan.start),u=t.get(i);if(!u)return null;let c=u.starts.find(d=>d.line===a.line&&d.displayName===o.name);if(c)return c.symbolId;let l=u.containingByLine.get(a.line);return l&&l.displayName===o.name?l.symbolId:de(u.starts,a.line,2,o.name)}}function le(e){let n=e.prepare(`
1
+ import{i as x,n as v}from"./chunk-VOQFGC2W.js";import be from"better-sqlite3";import{existsSync as hn}from"fs";import{dirname as yn,join as xn,resolve as ye}from"path";import G from"better-sqlite3";import{execFileSync as K}from"child_process";import{existsSync as X,readdirSync as J,readFileSync as B}from"fs";import{extname as m,join as I}from"path";import{readdirSync as we}from"fs";import{execFileSync as Ae}from"child_process";import{extname as De,join as _e}from"path";var U=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],k=[".vue"],V=[".tsx",".jsx"],C=[".vue"],Me=[...V,...C],$e=new Set(V),He=new Set(C),W=new Set(U.map(e=>e.toLowerCase())),Ue=[...W].sort().join(","),E=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);var We=x("source-files",{clearGroups:[]});function ze(e={}){return{id:"auxiliary-documents",facts:["auxiliary-document"],run:n=>q({projectRoot:n.projectRoot,dbPath:n.dbPath,extensions:e.extensions,onStatus:n.onStatus})}}function q(e){let n=new Set((e.extensions??k).map(i=>i.toLowerCase()));if(n.size===0)return{scanned:0,inserted:0,existing:0};if(!X(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let r=v(e.projectRoot),t=Y(e.projectRoot,n).filter(i=>!r.isIgnored(i)),o=new G(e.dbPath);try{let i=Q(o,t),s=o.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
2
+ VALUES (?, ?, NULL, ?)`),u=o.transaction(l=>{let d=0;for(let f of l){if(i.has(f))continue;let p=B(I(e.projectRoot,f),"utf-8"),H=s.run(Z(f),f,p);d+=Number(H.changes)}return d})(t),c={scanned:t.length,inserted:u,existing:t.length-u};return e.onStatus?.(`Augmented SQLite documents with ${u} auxiliary source file${u===1?"":"s"} (${c.existing} already present).`),c}finally{o.close()}}function Y(e,n){let r=z(e,n);if(r)return r;let t=[],o=i=>{let s=i?I(e,i):e,a;try{a=J(s,{withFileTypes:!0})}catch{return}for(let u of a){if(E.has(u.name))continue;let c=i?`${i}/${u.name}`:u.name;if(u.isDirectory()){o(c);continue}n.has(m(u.name).toLowerCase())&&t.push(c)}};return o(""),t.sort()}function z(e,n){try{return K("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:26214400,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}).split(`
3
+ `).filter(t=>t&&n.has(m(t).toLowerCase())).sort()}catch{return null}}function Q(e,n){let r=new Set,t=500;for(let o=0;o<n.length;o+=t){let i=n.slice(o,o+t),s=e.prepare(`SELECT relative_path FROM documents WHERE relative_path IN (${i.map(()=>"?").join(",")})`).all(...i);for(let a of s)r.add(a.relative_path)}return r}function Z(e){return m(e).toLowerCase()===".vue"?"vue":m(e).replace(/^\./,"").toLowerCase()||"source"}import{readFileSync as en,writeFileSync as nn}from"fs";function tn(e,n){let r=performance.now(),t=e.run(n);return{stageId:e.id,facts:e.facts,durationMs:performance.now()-r,result:t}}function ee(){return{"missing-source-file":0,"missing-service-script":0,"no-definition":0,"same-file-definition":0,"unindexed-definition":0}}function R(){return{skippedReferences:0,skippedReferenceReasons:ee(),skippedReferenceSamples:[]}}function F(e,n){e.skippedReferences+=n.skippedReferences;for(let r of Object.keys(e.skippedReferenceReasons)){e.skippedReferenceReasons[r]+=n.skippedReferenceReasons[r];for(let t of n.skippedReferenceSamples.filter(o=>o.reason===r))e.skippedReferenceSamples.filter(i=>i.reason===r&&i.sourceFile===t.sourceFile).length<2&&e.skippedReferenceSamples.push(t)}}import{createRequire as ne}from"module";import{existsSync as te,readFileSync as h}from"fs";import{dirname as T,extname as re,join as L,relative as oe,resolve as cn}from"path";import{pathToFileURL as ie}from"url";function O(e,n){let{vueCore:r,ts:t,volarTs:o}=se(e),{parsed:i,vueOptions:s}=ae(r,t,n),a=T(n),u=r.createVueLanguagePlugin(t,i.options,s,p=>p),c=ue(r,t,u),l=ce(a,i),{languageServiceHost:d}=o.createLanguageServiceHost(t,t.sys,c,p=>p,l),f=t.createLanguageService(d);return{ts:t,language:c,languageService:f,fileNames:i.fileNames,configDir:a}}function se(e){let n=ne(ie(L(e,"package.json")).href);return{vueCore:S(n,"@vue/language-core",e),ts:S(n,"typescript",e),volarTs:S(n,"@volar/typescript",e)}}function ae(e,n,r){let t=n.readConfigFile(r,n.sys.readFile);if(t.error||!t.config)throw new Error(`Failed to read ${r}`);let i=e.createParsedCommandLine(n,n.sys,r).vueOptions;return typeof e.createGlobalTypesWriter=="function"&&(i.globalTypesPath=e.createGlobalTypesWriter(i,n.sys.writeFile)),{parsed:n.parseJsonConfigFileContent(t.config,n.sys,T(r),void 0,r,void 0,e.getAllExtensions(i).map(s=>({extension:s.slice(1),isMixedContent:!0,scriptKind:n.ScriptKind.Deferred}))),vueOptions:i}}function ue(e,n,r){let t={},o=e.createLanguage([r],new Map,i=>{if(!te(i))return;let s=h(i,"utf-8");t.current?.scripts.set(i,n.ScriptSnapshot.fromString(s),r.getLanguageId(i)??fe(i))});return t.current=o,o}function ce(e,n){return{getCurrentDirectory:()=>e,getCompilationSettings:()=>n.options,getScriptFileNames:()=>n.fileNames,getProjectReferences:()=>n.projectReferences,getProjectVersion:()=>"0"}}function S(e,n,r){try{return e(n)}catch(t){throw(typeof t=="object"&&t!==null&&"code"in t?t.code:null)==="MODULE_NOT_FOUND"?new Error(`Vue augmentation requires ${n} to be installed in ${r}. Install Vue/Volar dependencies for that project, then rerun augment-vue.`,{cause:t}):t}}function w(e,n,r){let t=le(e);return o=>{if(!o.name)return null;let i=g(n,o.fileName),s=r.get(o.fileName);if(!s)return null;let a=r.positionAt(s,o.textSpan.start),u=t.get(i);if(!u)return null;let c=u.starts.find(d=>d.line===a.line&&d.displayName===o.name);if(c)return c.symbolId;let l=u.containingByLine.get(a.line);return l&&l.displayName===o.name?l.symbolId:de(u.starts,a.line,2,o.name)}}function le(e){let n=e.prepare(`
4
4
  SELECT
5
5
  d.relative_path AS relativePath,
6
6
  der.start_line AS startLine,
@@ -11,6 +11,6 @@ import{h as x,m as k}from"./chunk-C7NIYIQ4.js";import he from"better-sqlite3";im
11
11
  JOIN documents d ON d.id = der.document_id
12
12
  JOIN global_symbols gs ON gs.id = der.symbol_id
13
13
  ORDER BY d.relative_path, (der.end_line - der.start_line) DESC
14
- `).all(),r=new Map;for(let t of n){let o=r.get(t.relativePath);o||(o={containingByLine:new Map,starts:[]},r.set(t.relativePath,o)),o.starts.push({line:t.startLine,symbolId:t.symbolId,displayName:t.displayName});for(let i=t.startLine;i<=t.endLine;i++)o.containingByLine.set(i,{symbolId:t.symbolId,displayName:t.displayName})}for(let t of r.values())t.starts.sort((o,i)=>o.line-i.line);return r}function de(e,n,r,t){let o=0,i=e.length-1;for(;o<=i;){let a=Math.floor((o+i)/2);e[a].line<n?o=a+1:i=a-1}let s=null;for(let a of[i,o]){let u=e[a];if(!u||u.displayName!==t)continue;let c=Math.abs(u.line-n);c>r||(!s||c<s.distance)&&(s={distance:c,symbolId:u.symbolId})}return s?.symbolId??null}function N(e,n){let r=me(n),t=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),o=new Map;return{get(i){if(o.has(i))return o.get(i)??null;let s=Se(t,r,n,i);return o.set(i,s),s}}}function A(e,n,r,t,o){if(e.fileName.endsWith(".vue")){let i=t.language.scripts.get(e.fileName),s=i?.generated?.languagePlugin.typescript?.getServiceScript(i.generated.root)?.code;if(i&&s){let a=t.language.maps.get(s,i);if(h(a,e.textSpan.start)!==null)return r.get(e.fileName)}return e.fileName.startsWith(o)?r.get(e.fileName):null}return n(e)}function*P(e){let n=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,r=new Set(["script","setup","template","style","lang","scoped","true","false","null","undefined","const","let","var","import","from","export","return","if","else","for","while","function","class","type","interface","as","await","async"]),t;for(;t=n.exec(e);){let o=t[0];r.has(o)||(yield{text:o,start:t.index,end:t.index+o.length})}}function D(e,n){for(let[r]of e.toGeneratedLocation(n,t=>!!t.navigation))return r;return null}function h(e,n){let r=e;for(let[t]of r.toSourceLocation(n,o=>!!o.navigation))return t;return null}function ge(e,n){let r=0,t=e.lineStarts.length-1;for(;r<=t;){let i=Math.floor((r+t)/2);e.lineStarts[i]<=n?r=i+1:t=i-1}let o=Math.max(0,t);return{line:o,character:n-e.lineStarts[o]}}function _(e,n){return g(e,n).startsWith("node_modules/")}function g(e,n){return oe(e,n).replaceAll("\\","/")}function fe(e){switch(re(e)){case".vue":return"vue";case".tsx":return"typescriptreact";case".ts":case".mts":case".cts":return"typescript";case".jsx":return"javascriptreact";case".js":case".mjs":case".cjs":return"javascript";case".json":return"json";default:return"typescript"}}function M(){let e=new Map;return{get(n){if(e.has(n))return e.get(n)??null;try{let r=b(n,"utf-8"),t={text:r,lineStarts:pe(r)};return e.set(n,t),t}catch{return e.set(n,null),null}},positionAt:ge}}function pe(e){let n=[0];for(let r=0;r<e.length;r++)e.charCodeAt(r)===10&&n.push(r+1);return n}function me(e){try{let n=JSON.parse(b(F(e,"package.json"),"utf-8"));return{name:n.name??"workspace",version:n.version??"0.0.0"}}catch{return{name:"workspace",version:"0.0.0"}}}function Se(e,n,r,t){let o=g(r,t),i=Re(n.name,n.version,o);return e.get(i)?.id??null}function Re(e,n,r){let t=r.split("/").map(o=>`\`${o.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${n} ${t}/default.`}function Vn(e){let n=ye(e.projectRoot,e.tsconfig),r=new he(e.dbPath,{readonly:!0});try{let t=xe({db:r,projectRoot:e.projectRoot,configPath:n,vueSymbolLookup:N(r,e.projectRoot)});return ke({vueFiles:e.vueFiles??[],tasks:e.tasks,...t})}finally{r.close()}}function xe(e){let n=M();return{projectRoot:e.projectRoot,context:O(e.projectRoot,e.configPath),symbolLookup:w(e.db,e.projectRoot,n),vueSymbolLookup:e.vueSymbolLookup,sourceReader:n}}function ke(e){let n=[],r=S(),t=e.tasks??e.vueFiles.map(o=>({fileName:o,startOffset:0,endOffset:Number.POSITIVE_INFINITY,countFileSkip:!0}));for(let o of t){let i=ve(e,o);n.push(...i.occurrences),T(r,i)}return{occurrences:n,...r}}function ve(e,n){let r=e.sourceReader.get(n.fileName);if(!r)return j(e.projectRoot,n,"missing-source-file");let t=e.context.language.scripts.get(n.fileName),o=t?.generated?.languagePlugin.typescript?.getServiceScript(t.generated.root)?.code;if(!t||!o)return j(e.projectRoot,n,"missing-service-script");let i=e.context.language.maps.get(o,t),s=g(e.projectRoot,n.fileName),a=[...P(r.text)],u={tokens:a.filter(c=>c.start>=n.startOffset&&c.start<n.endOffset),tokenByStart:new Map(a.map(c=>[c.start,c])),tokenTextCounts:Te(a),processedStarts:new Set};return Ve({...e,fileName:n.fileName,sourceInfo:r,sourceFile:s,map:i,tokenContext:u})}function Ve(e){let n=[],r=S();for(let t of e.tokenContext.tokens){if(e.tokenContext.processedStarts.has(t.start)||Ee(e.sourceInfo.text,t.start))continue;let o=D(e.map,t.start);if(o===null)continue;let s=(e.context.languageService.getDefinitionAtPosition(e.fileName,o+1)??[]).find(l=>!_(e.projectRoot,l.fileName));if(!s){y(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,"no-definition");continue}let a=g(e.projectRoot,s.fileName),u=Ce(e.sourceFile,t.text,a);if(u){y(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,u);continue}let c=A(s,e.symbolLookup,e.vueSymbolLookup,e.context,e.projectRoot);if(c===null){y(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,"unindexed-definition");continue}$(n,e.sourceReader,e.sourceInfo,e.sourceFile,t,a,c),e.tokenContext.processedStarts.add(t.start),Ie(n,e,t,o,a,c)}return{occurrences:n,...r}}function Ee(e,n){let r=e.lastIndexOf(`
15
- `,n-1)+1,t=e.slice(r,n);return/\bfrom\s+['"][^'"]*$/.test(t)||/\bimport\s*\(\s*['"][^'"]*$/.test(t)}function Ce(e,n,r){return r===e?"same-file-definition":r.endsWith(".vue")&&n!==r.split("/").at(-1)?.replace(/\.vue$/,"")?"unindexed-definition":null}function j(e,n,r){let t=S();return n.countFileSkip&&(t.skippedReferences=1,t.skippedReferenceReasons[r]=1,t.skippedReferenceSamples.push({sourceFile:g(e,n.fileName),sourceLine:0,sourceStartChar:0,sourceEndChar:0,token:"",reason:r})),{occurrences:[],...t}}function y(e,n,r,t,o,i){if(e.skippedReferences++,e.skippedReferenceReasons[i]++,e.skippedReferenceSamples.filter(a=>a.reason===i&&a.sourceFile===t).length>=2)return;let s=n.positionAt(r,o.start);e.skippedReferenceSamples.push({sourceFile:t,sourceLine:s.line,sourceStartChar:s.character,sourceEndChar:s.character+o.text.length,token:o.text,reason:i})}function Ie(e,n,r,t,o,i){if(!((n.tokenContext.tokenTextCounts.get(r.text)??0)<=1))for(let s of Le(n.context.languageService,n.fileName,t+1,n.map,r,n.tokenContext.tokenByStart)){if(n.tokenContext.processedStarts.has(s))continue;let a=n.tokenContext.tokenByStart.get(s);a&&($(e,n.sourceReader,n.sourceInfo,n.sourceFile,a,o,i),n.tokenContext.processedStarts.add(s))}}function $(e,n,r,t,o,i,s){let a=n.positionAt(r,o.start);e.push({sourceFile:t,sourceLine:a.line,sourceStartChar:a.character,sourceEndChar:a.character+o.text.length,sourceToken:o.text,definitionFile:i,symbolId:s})}function Te(e){let n=new Map;for(let r of e)n.set(r.text,(n.get(r.text)??0)+1);return n}function Le(e,n,r,t,o,i){let s=e.getDocumentHighlights?.(n,r,[n])??[],a=[];for(let u of s)if(u.fileName===n)for(let c of u.highlightSpans){let l=Fe(t,c.textSpan.start,i,o.text);l!==null&&a.push(l)}return a}function Fe(e,n,r,t){let o=r.get(n);if(o?.text===t)return o.start;let i=h(e,n);if(i===null)return null;let s=r.get(i);return s?.text===t?s.start:null}export{ze as a,tn as b,Vn as c};
16
- //# sourceMappingURL=chunk-64RFXJT5.js.map
14
+ `).all(),r=new Map;for(let t of n){let o=r.get(t.relativePath);o||(o={containingByLine:new Map,starts:[]},r.set(t.relativePath,o)),o.starts.push({line:t.startLine,symbolId:t.symbolId,displayName:t.displayName});for(let i=t.startLine;i<=t.endLine;i++)o.containingByLine.set(i,{symbolId:t.symbolId,displayName:t.displayName})}for(let t of r.values())t.starts.sort((o,i)=>o.line-i.line);return r}function de(e,n,r,t){let o=0,i=e.length-1;for(;o<=i;){let a=Math.floor((o+i)/2);e[a].line<n?o=a+1:i=a-1}let s=null;for(let a of[i,o]){let u=e[a];if(!u||u.displayName!==t)continue;let c=Math.abs(u.line-n);c>r||(!s||c<s.distance)&&(s={distance:c,symbolId:u.symbolId})}return s?.symbolId??null}function P(e,n){let r=me(n),t=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),o=new Map;return{get(i){if(o.has(i))return o.get(i)??null;let s=Re(t,r,n,i);return o.set(i,s),s}}}function A(e,n,r,t,o){if(e.fileName.endsWith(".vue")){let i=t.language.scripts.get(e.fileName),s=i?.generated?.languagePlugin.typescript?.getServiceScript(i.generated.root)?.code;if(i&&s){let a=t.language.maps.get(s,i);if(b(a,e.textSpan.start)!==null)return r.get(e.fileName)}return e.fileName.startsWith(o)?r.get(e.fileName):null}return n(e)}function*N(e){let n=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,r=new Set(["script","setup","template","style","lang","scoped","true","false","null","undefined","const","let","var","import","from","export","return","if","else","for","while","function","class","type","interface","as","await","async"]),t;for(;t=n.exec(e);){let o=t[0];r.has(o)||(yield{text:o,start:t.index,end:t.index+o.length})}}function D(e,n){for(let[r]of e.toGeneratedLocation(n,t=>!!t.navigation))return r;return null}function b(e,n){let r=e;for(let[t]of r.toSourceLocation(n,o=>!!o.navigation))return t;return null}function ge(e,n){let r=0,t=e.lineStarts.length-1;for(;r<=t;){let i=Math.floor((r+t)/2);e.lineStarts[i]<=n?r=i+1:t=i-1}let o=Math.max(0,t);return{line:o,character:n-e.lineStarts[o]}}function _(e,n){return g(e,n).startsWith("node_modules/")}function g(e,n){return oe(e,n).replaceAll("\\","/")}function fe(e){switch(re(e)){case".vue":return"vue";case".tsx":return"typescriptreact";case".ts":case".mts":case".cts":return"typescript";case".jsx":return"javascriptreact";case".js":case".mjs":case".cjs":return"javascript";case".json":return"json";default:return"typescript"}}function j(){let e=new Map;return{get(n){if(e.has(n))return e.get(n)??null;try{let r=h(n,"utf-8"),t={text:r,lineStarts:pe(r)};return e.set(n,t),t}catch{return e.set(n,null),null}},positionAt:ge}}function pe(e){let n=[0];for(let r=0;r<e.length;r++)e.charCodeAt(r)===10&&n.push(r+1);return n}function me(e){try{let n=JSON.parse(h(L(e,"package.json"),"utf-8"));return{name:n.name??"workspace",version:n.version??"0.0.0"}}catch{return{name:"workspace",version:"0.0.0"}}}function Re(e,n,r,t){let o=g(r,t),i=Se(n.name,n.version,o);return e.get(i)?.id??null}function Se(e,n,r){let t=r.split("/").map(o=>`\`${o.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${n} ${t}/default.`}function Vn(e){let n=ye(e.projectRoot,e.tsconfig),r=new be(e.dbPath,{readonly:!0});try{let t=xe({db:r,projectRoot:e.projectRoot,configPath:n,vueSymbolLookup:P(r,e.projectRoot)});return ve({vueFiles:e.vueFiles??[],tasks:e.tasks,...t})}finally{r.close()}}function xe(e){let n=j();return{projectRoot:e.projectRoot,context:O(e.projectRoot,e.configPath),symbolLookup:w(e.db,e.projectRoot,n),vueSymbolLookup:e.vueSymbolLookup,sourceReader:n}}function ve(e){let n=[],r=R(),t=e.tasks??e.vueFiles.map(o=>({fileName:o,startOffset:0,endOffset:Number.POSITIVE_INFINITY,countFileSkip:!0}));for(let o of t){let i=ke(e,o);n.push(...i.occurrences),F(r,i)}return{occurrences:n,...r}}function ke(e,n){let r=e.sourceReader.get(n.fileName);if(!r)return M(e.projectRoot,n,"missing-source-file");let t=e.context.language.scripts.get(n.fileName),o=t?.generated?.languagePlugin.typescript?.getServiceScript(t.generated.root)?.code;if(!t||!o)return M(e.projectRoot,n,"missing-service-script");let i=e.context.language.maps.get(o,t),s=g(e.projectRoot,n.fileName),a=[...N(r.text)],u={tokens:a.filter(c=>c.start>=n.startOffset&&c.start<n.endOffset),tokenByStart:new Map(a.map(c=>[c.start,c])),tokenTextCounts:Fe(a),processedStarts:new Set};return Ve({...e,fileName:n.fileName,sourceInfo:r,sourceFile:s,map:i,tokenContext:u})}function Ve(e){let n=[],r=R();for(let t of e.tokenContext.tokens){if(e.tokenContext.processedStarts.has(t.start)||Ce(e.sourceInfo.text,t.start))continue;let o=D(e.map,t.start);if(o===null)continue;let s=(e.context.languageService.getDefinitionAtPosition(e.fileName,o+1)??[]).find(l=>!_(e.projectRoot,l.fileName));if(!s){y(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,"no-definition");continue}let a=g(e.projectRoot,s.fileName),u=Ee(e.sourceFile,t.text,a);if(u){y(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,u);continue}let c=A(s,e.symbolLookup,e.vueSymbolLookup,e.context,e.projectRoot);if(c===null){y(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,"unindexed-definition");continue}$(n,e.sourceReader,e.sourceInfo,e.sourceFile,t,a,c),e.tokenContext.processedStarts.add(t.start),Ie(n,e,t,o,a,c)}return{occurrences:n,...r}}function Ce(e,n){let r=e.lastIndexOf(`
15
+ `,n-1)+1,t=e.slice(r,n);return/\bfrom\s+['"][^'"]*$/.test(t)||/\bimport\s*\(\s*['"][^'"]*$/.test(t)}function Ee(e,n,r){return r===e?"same-file-definition":r.endsWith(".vue")&&n!==r.split("/").at(-1)?.replace(/\.vue$/,"")?"unindexed-definition":null}function M(e,n,r){let t=R();return n.countFileSkip&&(t.skippedReferences=1,t.skippedReferenceReasons[r]=1,t.skippedReferenceSamples.push({sourceFile:g(e,n.fileName),sourceLine:0,sourceStartChar:0,sourceEndChar:0,token:"",reason:r})),{occurrences:[],...t}}function y(e,n,r,t,o,i){if(e.skippedReferences++,e.skippedReferenceReasons[i]++,e.skippedReferenceSamples.filter(a=>a.reason===i&&a.sourceFile===t).length>=2)return;let s=n.positionAt(r,o.start);e.skippedReferenceSamples.push({sourceFile:t,sourceLine:s.line,sourceStartChar:s.character,sourceEndChar:s.character+o.text.length,token:o.text,reason:i})}function Ie(e,n,r,t,o,i){if(!((n.tokenContext.tokenTextCounts.get(r.text)??0)<=1))for(let s of Te(n.context.languageService,n.fileName,t+1,n.map,r,n.tokenContext.tokenByStart)){if(n.tokenContext.processedStarts.has(s))continue;let a=n.tokenContext.tokenByStart.get(s);a&&($(e,n.sourceReader,n.sourceInfo,n.sourceFile,a,o,i),n.tokenContext.processedStarts.add(s))}}function $(e,n,r,t,o,i,s){let a=n.positionAt(r,o.start);e.push({sourceFile:t,sourceLine:a.line,sourceStartChar:a.character,sourceEndChar:a.character+o.text.length,sourceToken:o.text,definitionFile:i,symbolId:s})}function Fe(e){let n=new Map;for(let r of e)n.set(r.text,(n.get(r.text)??0)+1);return n}function Te(e,n,r,t,o,i){let s=e.getDocumentHighlights?.(n,r,[n])??[],a=[];for(let u of s)if(u.fileName===n)for(let c of u.highlightSpans){let l=Le(t,c.textSpan.start,i,o.text);l!==null&&a.push(l)}return a}function Le(e,n,r,t){let o=r.get(n);if(o?.text===t)return o.start;let i=b(e,n);if(i===null)return null;let s=r.get(i);return s?.text===t?s.start:null}export{ze as a,tn as b,Vn as c};
16
+ //# sourceMappingURL=chunk-VEVBIAOJ.js.map
@@ -0,0 +1,9 @@
1
+ import{a as T}from"./chunk-APMMR5Y2.js";import{execFileSync as he}from"child_process";import{readFileSync as Pe}from"fs";import{platform as Le}from"os";var Fe=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function h(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t;return e.version!==1||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0||typeof e.platform!="string"||!Fe.has(e.platform)||typeof e.startToken!="string"||e.startToken.trim()===""?null:{version:1,pid:e.pid,platform:e.platform,startToken:e.startToken}}function g(t,e){return t.version===e.version&&t.pid===e.pid&&t.platform===e.platform&&t.startToken===e.startToken}var Ae=1e3,Re=16*1024;function ne(t,e=ve){if(!Number.isSafeInteger(t)||t<=0)return null;try{let n=Se(t,e);return n?{version:1,pid:t,platform:e.platform,startToken:n}:null}catch{return null}}function Se(t,e){if(e.platform==="linux"||e.platform==="android")return Ee(e.readFile(`/proc/${t}/stat`));if(e.platform==="win32"){let n=`([DateTimeOffset](Get-Process -Id ${t} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return te(e.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",n]))}return e.platform==="darwin"||e.platform==="freebsd"||e.platform==="openbsd"||e.platform==="netbsd"?te(e.run("ps",["-p",String(t),"-o","lstart="])):null}function Ee(t){let e=t.lastIndexOf(")");if(e<0)return null;let r=t.slice(e+1).trim().split(/\s+/)[19];return r&&/^\d+$/.test(r)?r:null}function te(t){let e=t.trim();return e===""?null:e}var ve={platform:Le(),readFile(t){return Pe(t,"utf8")},run(t,e){return he(t,[...e],{encoding:"utf8",timeout:Ae,maxBuffer:Re,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function re(t){try{return process.kill(t,0),!0}catch(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EPERM"}}import{randomUUID as Be}from"crypto";import{closeSync as De,fsyncSync as Oe,linkSync as Ne,mkdirSync as Te,openSync as Ce,readFileSync as _e,statSync as $e,unlinkSync as qe,writeSync as Je}from"fs";import{dirname as J}from"path";function P(t,e,n,r){let i=0;for(;i<e.length;){let o=n.writeFile(t,e,i,e.length-i);if(!Number.isSafeInteger(o)||o<=0||o>e.length-i)throw new Error(`${r} write did not make valid forward progress`);i+=o}}function w(t,e){if(e!=="win32")return!1;let n=t.code;return n==="EACCES"||n==="EBADF"||n==="EINVAL"||n==="EISDIR"||n==="EPERM"}var _="scip-query-process-lock",$=1;var v=Object.freeze({wallNow:()=>Date.now(),isProcessAlive:re,readProcessIdentity:ne,randomToken:()=>Be(),makeDirectory:t=>Te(t,{recursive:!0}),openFile:(t,e,n)=>Ce(t,e,n),writeFile:(t,e,n,r)=>Je(t,e,n,r),syncFile:t=>Oe(t),closeFile:t=>De(t),linkFile:(t,e)=>Ne(t,e),readFile:t=>_e(t,"utf8"),statFile:t=>{let e=$e(t);return{dev:e.dev,ino:e.ino,size:e.size,mtimeMs:e.mtimeMs}},removeFile:t=>qe(t)});function vt(t,e){let n=e.runtime??v;n.makeDirectory(J(t));let r;for(let i=0;i<2;i+=1)try{return{kind:"acquired",lock:oe(t,e,n),...r?{reclaimed:r}:{}}}catch(o){if(o.code!=="EEXIST")throw o;let s=M(t,{parseLegacy:e.parseLegacy,runtime:n});if(i===0&&Ke(t,s,{creationGraceMs:e.creationGraceMs,parseLegacy:e.parseLegacy,runtime:n})){r=s;continue}return{kind:"contended",observation:s}}return{kind:"contended",observation:M(t,{parseLegacy:e.parseLegacy,runtime:n})}}function M(t,e={}){let n=e.runtime??v,r,i;try{r=n.statFile(t),i=n.readFile(t)}catch(c){return c.code==="ENOENT"?{state:"missing"}:{state:"malformed"}}let o;try{o=JSON.parse(i)}catch{return{state:"malformed",raw:i,identity:r}}let s=je(o);if(s)return{state:"valid",raw:i,identity:r,record:s,owner:ze(s),parsed:o};let d=e.parseLegacy?.(o)??null;return d?{state:"legacy",raw:i,identity:r,owner:d,parsed:o}:{state:"malformed",raw:i,identity:r,parsed:o}}function je(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t;if(e.protocol!==_||e.version!==$||typeof e.kind!="string"||e.kind.trim()===""||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0||typeof e.token!="string"||e.token.trim()===""||typeof e.startedAt!="string"||!Number.isFinite(Date.parse(e.startedAt))||e.detail!==void 0&&(typeof e.detail!="object"||e.detail===null||Array.isArray(e.detail)))return null;let n=e.processIdentity===void 0?null:h(e.processIdentity);return e.processIdentity!==void 0&&(!n||n.pid!==e.pid)?null:{protocol:_,version:$,kind:e.kind,pid:e.pid,token:e.token,...n?{processIdentity:n}:{},startedAt:e.startedAt,...e.detail?{detail:e.detail}:{}}}function Ke(t,e,n={}){let r=n.runtime??v;if(!q(e,r))return!1;let i=Ue(`${t}.reclaim`,r);if(!i)return!1;try{let o=M(t,{parseLegacy:n.parseLegacy,runtime:r});return!se(e,o)||!q(o,r)?!1:j(t,r)}finally{i.release()}}function oe(t,e,n){let r=e.pid??process.pid,i=n.randomToken(),o=e.processIdentity===void 0?n.readProcessIdentity(r):e.processIdentity,s={protocol:_,version:$,kind:e.kind,pid:r,token:i,...o?{processIdentity:o}:{},startedAt:new Date(n.wallNow()).toISOString(),...e.detail?{detail:e.detail}:{}},d=`${t}.${i}.candidate`,c=n.openFile(d,"wx",384),a;try{P(c,Buffer.from(`${JSON.stringify(s)}
2
+ `),n,"process lock"),n.syncFile(c)}catch(m){a=m}try{n.closeFile(c)}catch(m){a??=m}if(a!==void 0)throw C(d,n),a;try{n.linkFile(d,t)}catch(m){throw C(d,n),m}C(d,n);try{ae(J(t),n)}catch(m){throw ie(t,s,n),m}let l=!1;return{path:t,record:s,release:()=>l?!1:(l=!0,ie(t,s,n))}}function ie(t,e,n=v){let r=M(t,{runtime:n});return r.state!=="valid"||!r.record||r.record.pid!==e.pid||r.record.token!==e.token||e.processIdentity&&(!r.record.processIdentity||!g(e.processIdentity,r.record.processIdentity))?!1:j(t,n)}function Ue(t,e){for(let n=0;n<2;n+=1)try{return oe(t,{kind:"reclaim-guard",runtime:e},e)}catch(r){if(r.code!=="EEXIST")return null;let i=M(t,{runtime:e});if(n>0||!q(i,e))return null;let o=M(t,{runtime:e});if(!se(i,o)||!j(t,e))return null}return null}function q(t,e){if(t.state==="missing")return!1;if(t.owner){if(!e.isProcessAlive(t.owner.pid))return!0;if(!t.owner.processIdentity)return!1;let n=e.readProcessIdentity(t.owner.pid);return n!==null&&!g(t.owner.processIdentity,n)}return!1}function se(t,e){return t.state===e.state&&t.raw===e.raw&&t.identity!==void 0&&e.identity!==void 0&&t.identity.dev===e.identity.dev&&t.identity.ino===e.identity.ino&&t.identity.size===e.identity.size&&t.identity.mtimeMs===e.identity.mtimeMs}function ze(t){return{pid:t.pid,...t.processIdentity?{processIdentity:t.processIdentity}:{}}}function ae(t,e){let n;try{n=e.openFile(t,"r")}catch(r){if(w(r,process.platform))return;throw r}try{e.syncFile(n)}catch(r){if(!w(r,process.platform))throw r}finally{e.closeFile(n)}}function j(t,e){try{return e.removeFile(t),ae(J(t),e),!0}catch{return!1}}function C(t,e){try{e.removeFile(t)}catch{}}import{randomUUID as We}from"crypto";import{closeSync as Xe,fsyncSync as Ve,linkSync as Ge,mkdirSync as He,openSync as Ye,renameSync as Qe,unlinkSync as Ze,writeSync as et}from"fs";import{dirname as ce}from"path";var K=Object.freeze({platform:process.platform,randomToken:()=>We(),makeDirectory:t=>He(t,{recursive:!0}),openFile:(t,e,n)=>Ye(t,e,n),writeFile:(t,e,n,r)=>et(t,e,n,r),syncFile:t=>Ve(t),closeFile:t=>Xe(t),renameFile:(t,e)=>Qe(t,e),linkFile:(t,e)=>Ge(t,e),removeFile:t=>Ze(t)});function U(t,e,n={}){let r=n.durability??"visibility",i=n.runtime??K,o=ce(t);i.makeDirectory(o);let s=`${t}.tmp-${i.randomToken()}`,d=typeof e=="string"?Buffer.from(e):e,c,a=!1;try{return c=i.openFile(s,"wx",n.mode??384),a=!0,P(c,d,i,"atomic file"),r==="durable"&&i.syncFile(c),i.closeFile(c),c=void 0,i.renameFile(s,t),a=!1,{durability:r,directorySync:r==="durable"?f(o,i):"not-requested"}}finally{if(c!==void 0)try{i.closeFile(c)}catch{}if(a)try{i.removeFile(s)}catch{}}}function B(t,e,n={}){let r=n.durability??"visibility",i=n.runtime??K;if(!i.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let o=ce(t);i.makeDirectory(o);let s=`${t}.tmp-${i.randomToken()}`,d=typeof e=="string"?Buffer.from(e):e,c,a=!1;try{return c=i.openFile(s,"wx",n.mode??384),a=!0,P(c,d,i,"exclusive atomic file"),r==="durable"&&i.syncFile(c),i.closeFile(c),c=void 0,i.linkFile(s,t),i.removeFile(s),a=!1,{durability:r,directorySync:r==="durable"?f(o,i):"not-requested"}}finally{if(c!==void 0)try{i.closeFile(c)}catch{}if(a)try{i.removeFile(s)}catch{}}}function f(t,e=K){let n;try{n=e.openFile(t,"r")}catch(r){if(w(r,e.platform))return"unsupported";throw r}try{return e.syncFile(n),"synced"}catch(r){if(w(r,e.platform))return"unsupported";throw r}finally{e.closeFile(n)}}function $t(t,e,n={}){U(t,de(e,n),{durability:"visibility",runtime:n.runtime})}function z(t,e,n={}){return U(t,de(e,n),{durability:"durable",runtime:n.runtime})}function de(t,e){let n=JSON.stringify(t,null,e.spacing);return e.trailingNewline?`${n}
3
+ `:n}import{createHash as W,randomUUID as ye}from"crypto";import{existsSync as b,lstatSync as F,mkdirSync as be,readFileSync as I,readdirSync as k,renameSync as X,rmSync as p}from"fs";import{basename as L,dirname as V,join as u}from"path";function D(t){return Array.isArray(t)?`[${t.map(D).join(",")}]`:t&&typeof t=="object"?`{${Object.entries(t).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${JSON.stringify(e)}:${D(n)}`).join(",")}}`:JSON.stringify(t)}var G=1,tt=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),y=class extends Error{constructor(n,r,i,o){let s=n==="item-too-large"?`request is ${o} bytes; per-item limit is ${i.maxItemBytes}`:n==="item-capacity"?`mailbox has ${r.totalItems} retained items; limit is ${i.maxItems}`:n==="byte-capacity"?`mailbox retains ${r.totalBytes} bytes and the request adds ${o}; limit is ${i.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=n;this.status=r;this.limits=i;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},ge=".owner.json",xe={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function Ht(t){return{rootDir:t,pendingDir:u(t,"pending"),inflightDir:u(t,"inflight"),responseDir:u(t,"responses"),deadLetterDir:u(t,"dead-letter"),legacyRequestDir:u(t,"requests")}}function A(t={}){let e={...tt,...t};for(let[n,r]of Object.entries(e))if(!Number.isFinite(r)||r<=0||!Number.isInteger(r))throw new Error(`Mailbox limit ${n} must be a positive integer.`);return e}function H(t){for(let e of[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir])be(e,{recursive:!0})}function Yt(t,e){return W("sha256").update(D({namespace:t,payload:e})).digest("hex")}function nt(t){if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${t}`}function Qt(t,e,n={}){let r=A(n.limits),i=n.nowMs??Date.now();return H(t),ut(e),Me(t,r,n.admissionLockTimeoutMs??2e3,n.monotonicNow??T,()=>{we(t,i,r);let o=u(t.pendingDir,`${e.id}.json`),s=u(t.responseDir,`${e.id}.json`),d=le(t,e.id);if(d){let m=ue(d,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:m.deadlineAtMs??e.deadlineAtMs}}let c=`${JSON.stringify(e)}
4
+ `,a=Buffer.byteLength(c),l=N(t);if(a>r.maxItemBytes)throw new y("item-too-large",l,r,a);if(l.totalItems+1>r.maxItems)throw new y("item-capacity",l,r,a);if(l.totalBytes+a>r.maxBytes)throw new y("byte-capacity",l,r,a);n.onBeforePublish?.();try{return B(o,c,{durability:"durable"}),{disposition:"accepted",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:e.deadlineAtMs}}catch(m){if(m.code!=="EEXIST")throw m;let S=le(t,e.id);if(!S)throw m;let E=ue(S,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:E.deadlineAtMs??e.deadlineAtMs}}})}function Zt(t,e){if(!e.ownerId.trim())throw new Error("Mailbox claim owner identity is required.");if(e.owner&&(!Number.isSafeInteger(e.owner.pid)||e.owner.pid<=0||e.owner.processIdentity!==void 0&&e.owner.processIdentity.pid!==e.owner.pid))throw new Error("Mailbox claim process identity is invalid.");let n=e.nowMs??Date.now(),r=A(e.limits);H(t);try{return Me(t,r,2e3,e.monotonicNow??T,()=>rt(t,e.ownerId,n,r,e.liveness??xe,e.owner??{pid:process.pid}))}catch(i){if(i instanceof y&&i.code==="admission-busy")return[];throw i}}function rt(t,e,n,r,i,o){we(t,n,r,i);let s=u(t.inflightDir,O(e)),d=[...me(t.pendingDir,!1),...me(t.legacyRequestDir,!0)].sort((a,l)=>a.orderAtMs-l.orderAtMs||a.header.id.localeCompare(l.header.id)||a.path.localeCompare(l.path));d.length>0&&(be(s,{recursive:!0}),dt(s,e,o));let c=[];for(let a of d){if(c.length>=r.maxBatch)break;let l=u(t.responseDir,`${a.header.id}.json`);if(b(l)){p(a.path,{force:!0});continue}let m=Math.max(n+r.claimLeaseMs,(a.header.deadlineAtMs??n)+5e3),S=`${O(a.originalFile)}.${m}.claim`,E=u(s,S);try{X(a.path,E)}catch(Z){let ee=Z.code;if(ee==="ENOENT"||ee==="EEXIST")continue;throw Z}f(V(a.path)),f(s),c.push({requestId:a.header.id,ownerId:e,path:E,originalFile:a.originalFile,claimedAtMs:n,claimExpiresAtMs:m,byteLength:a.byteLength,...a.header.operationKey?{operationKey:a.header.operationKey}:{},...a.header.clientId?{clientId:a.header.clientId}:{},...a.header.enqueuedAtMs===void 0?{}:{enqueuedAtMs:a.header.enqueuedAtMs},...a.header.deadlineAtMs===void 0?{}:{deadlineAtMs:a.header.deadlineAtMs},legacy:a.legacy})}return c}function en(t,e={}){let n=A(e);if(t.byteLength>n.maxItemBytes)throw new y("item-too-large",{pending:0,inflight:1,responses:0,deadLetters:0,invalid:0,totalItems:1,totalBytes:t.byteLength},n,t.byteLength);return I(t.path,"utf8")}function it(t,e,n,r={}){let i=r.nowMs??Date.now(),o=A(r.limits),s={...n,mailboxVersion:G,operationKey:e.operationKey??`legacy-${e.requestId}`,clientId:e.clientId??"legacy",...e.deadlineAtMs===void 0?{}:{deadlineAtMs:e.deadlineAtMs},completedAtMs:i,expiresAtMs:i+o.responseRetentionMs},d=Buffer.byteLength(`${JSON.stringify(s)}
5
+ `),c=N(t);if(d>o.maxItemBytes)throw new y("item-too-large",c,o,d);let a=Math.max(0,c.totalBytes-e.byteLength)+d;if(a>o.maxBytes&&a>c.totalBytes)throw new y("byte-capacity",c,o,d);ot(t,e,s),r.onAfterResponsePublished?.(),p(e.path,{force:!0});let l=V(e.path);f(b(l)?l:t.inflightDir)}function tn(t,e,n,r,i={}){let o=i.nowMs??Date.now(),s=A(i.limits);if(it(t,e,n,{...i,nowMs:o,limits:s}),!b(e.path)){let d=u(t.deadLetterDir,`${yt(e.requestId)}.${o}.${W("sha256").update(r).digest("hex").slice(0,12)}.json`),c={mailboxVersion:G,requestId:e.requestId,ownerId:e.ownerId,rejectedAtMs:o,reason:r,originalFile:e.originalFile},a=Buffer.byteLength(`${JSON.stringify(c,null,2)}
6
+ `),l=N(t);l.totalItems<s.maxItems&&l.totalBytes+a<=s.maxBytes&&z(d,c,{spacing:2,trailingNewline:!0})}}function we(t,e,n,r=xe){let i={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=n.cleanupBatch;for(let s of Q(t.inflightDir)){if(o<=0)break;let d=u(t.responseDir,`${s.requestId}.json`);if(b(d)){p(s.path,{force:!0}),i.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>e||lt(t,s.ownerId,r)!=="dead")continue;let c=u(t.pendingDir,s.originalFile);try{X(s.path,c),i.reclaimed++}catch(a){if(a.code!=="EEXIST")throw a;p(s.path,{force:!0})}f(V(s.path)),f(t.pendingDir),o--}o=fe(t.responseDir,o,(s,d)=>mt(s)??d+n.responseRetentionMs,e,()=>{i.responsesRemoved++}),o=fe(t.deadLetterDir,o,(s,d)=>d+n.deadLetterRetentionMs,e,()=>{i.deadLettersRemoved++});for(let s of[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir]){if(o<=0)break;for(let d of ke(s)){if(o<=0)break;L(d).includes(".tmp-")&&(F(d).mtimeMs+n.temporaryRetentionMs>e||(p(d,{force:!0}),i.temporaryFilesRemoved++,o--))}}return ft(t.inflightDir),i}function N(t){H(t);let e=[...x(t.pendingDir).map(c=>({path:c,pending:!0})),...x(t.legacyRequestDir).map(c=>({path:c,pending:!0}))],n=Q(t.inflightDir).map(c=>({path:c.path,pending:!1})),r=x(t.responseDir).map(c=>({path:c,pending:!1})),i=x(t.deadLetterDir).map(c=>({path:c,pending:!1})),o=[...e,...n,...r,...i],s=0,d;for(let c of e){let a=R(c.path);if(!a){s++;continue}let l=a.enqueuedAtMs??F(c.path).mtimeMs;d=d===void 0?l:Math.min(d,l)}return{pending:e.length,inflight:n.length,responses:r.length,deadLetters:i.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((c,a)=>c+pt(a.path),0),...d===void 0?{}:{oldestPendingAt:new Date(d).toISOString()}}}function ot(t,e,n){let r=u(t.responseDir,`${e.requestId}.json`),i=`${JSON.stringify(n)}
7
+ `;try{B(r,i,{durability:"durable"})}catch(o){if(o.code!=="EEXIST")throw o;let s=R(r),d=e.operationKey??`legacy-${e.requestId}`;if(s?.operationKey!==d)throw new Error(`Mailbox completion ${e.requestId} conflicts with an existing operation.`,{cause:o})}}function Me(t,e,n,r,i){let o=u(t.rootDir,".admission.lock"),s=`${process.pid}-${ye()}`,d=r()+Math.max(0,n);for(;!st(t.rootDir,o,s);){if(at(o),r()>=d)throw new y("admission-busy",N(t),e,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return i()}finally{try{Y(o).ownerToken===s&&(p(o,{recursive:!0,force:!0}),f(t.rootDir))}catch{}}}function st(t,e,n){let r=`${JSON.stringify({ownerToken:n,pid:process.pid,acquiredAtMs:Date.now()})}
8
+ `;try{return B(e,r,{durability:"durable"}),!0}catch(i){if(i.code==="EEXIST")return!1;try{Y(e).ownerToken===n&&(p(e,{force:!0}),f(t))}catch{}throw i}}function at(t){let e=null;try{let r=Y(t);typeof r.ownerToken=="string"&&Number.isSafeInteger(r.pid)&&Number(r.pid)>0&&(e=Number(r.pid))}catch{}if(e===null||ct(e))return;let n=`${t}.stale-${ye()}`;try{X(t,n)}catch(r){let i=r.code;if(i==="ENOENT"||i==="EEXIST")return;throw r}p(n,{recursive:!0,force:!0})}function Y(t){try{return JSON.parse(I(t,"utf8"))}catch(e){if(e.code!=="EISDIR")throw e;return JSON.parse(I(u(t,"owner.json"),"utf8"))}}function ct(t){try{return process.kill(t,0),!0}catch(e){let n=e.code;return n==="EPERM"||n!=="ESRCH"}}function dt(t,e,n){let r=u(t,ge),i=n.processIdentity,o=Ie(r);if(!(o&&o.ownerId===e&&o.pid===n.pid&&(!o.processIdentity&&!i||o.processIdentity&&i&&g(o.processIdentity,i)))){if(x(t).some(s=>s.endsWith(".claim")))throw new Error(`Mailbox owner identity ${e} collides with retained work from another process instance.`);z(r,{version:1,ownerId:e,pid:n.pid,...i?{processIdentity:i}:{}})}}function lt(t,e,n){let r=Ie(u(t.inflightDir,O(e),ge));if(!r)return"unknown";if(!n.isProcessAlive(r.pid))return"dead";if(!r.processIdentity)return"live";let i=n.readProcessIdentity(r.pid);return i?g(r.processIdentity,i)?"live":"dead":"unknown"}function Ie(t){try{let e=JSON.parse(I(t,"utf8"));if(e.version!==1||typeof e.ownerId!="string"||!e.ownerId||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0)return null;let n=e.processIdentity===void 0?null:h(e.processIdentity);return e.processIdentity!==void 0&&(!n||n.pid!==e.pid)?null:{version:1,ownerId:e.ownerId,pid:e.pid,...n?{processIdentity:n}:{}}}catch{return null}}function le(t,e){for(let n of[u(t.pendingDir,`${e}.json`),u(t.legacyRequestDir,`${e}.json`),u(t.responseDir,`${e}.json`)])if(b(n))return n;for(let n of Q(t.inflightDir))if(n.requestId===e)return n.path;return null}function ue(t,e,n){let r=R(t);if(!r||r.operationKey!==e)throw new Error(`Mailbox operation ${n} conflicts with an existing retained record.`);return r}function ut(t){if(t.mailboxVersion!==G||t.id!==nt(t.operationKey)||!t.clientId.trim()||!Number.isFinite(t.enqueuedAtMs)||!Number.isFinite(t.deadlineAtMs)||t.deadlineAtMs<t.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function me(t,e){return x(t).filter(n=>n.endsWith(".json")).map(n=>{let r=F(n),i=L(n,".json"),o=R(n)??{id:i};return{path:n,originalFile:L(n),header:o,byteLength:r.size,orderAtMs:o.enqueuedAtMs??r.mtimeMs,legacy:e}})}function Q(t){if(!b(t))return[];let e=[];for(let n of k(t,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=pe(n.name);if(r===null)continue;let i=u(t,n.name);for(let o of k(i,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let d=pe(s[1]),c=Number(s[2]);if(d===null||L(d)!==d||!d.endsWith(".json")||!Number.isSafeInteger(c))continue;let a=u(i,o.name),l=R(a)??{id:L(d,".json")},m=F(a);e.push({requestId:l.id,ownerId:r,path:a,originalFile:d,claimedAtMs:m.mtimeMs,claimExpiresAtMs:c,byteLength:m.size,...l.operationKey?{operationKey:l.operationKey}:{},...l.clientId?{clientId:l.clientId}:{},...l.enqueuedAtMs===void 0?{}:{enqueuedAtMs:l.enqueuedAtMs},...l.deadlineAtMs===void 0?{}:{deadlineAtMs:l.deadlineAtMs},legacy:l.operationKey===void 0})}}return e.sort((n,r)=>n.claimedAtMs-r.claimedAtMs||n.path.localeCompare(r.path))}function R(t){try{let e=JSON.parse(I(t,"utf8"));return typeof e.id!="string"||!e.id?null:{id:e.id,...typeof e.operationKey=="string"?{operationKey:e.operationKey}:{},...typeof e.clientId=="string"?{clientId:e.clientId}:{},...typeof e.enqueuedAtMs=="number"?{enqueuedAtMs:e.enqueuedAtMs}:{},...typeof e.deadlineAtMs=="number"?{deadlineAtMs:e.deadlineAtMs}:{}}}catch{return null}}function mt(t){try{let e=JSON.parse(I(t,"utf8"));return typeof e.expiresAtMs=="number"&&Number.isFinite(e.expiresAtMs)?e.expiresAtMs:null}catch{return null}}function fe(t,e,n,r,i){for(let o of x(t)){if(e<=0)break;let s=F(o);n(o,s.mtimeMs)>r||(p(o,{force:!0}),i(),e--)}return e}function x(t){return b(t)?k(t,{withFileTypes:!0}).filter(e=>e.isFile()).map(e=>u(t,e.name)).sort():[]}function ke(t){if(!b(t))return[];let e=[];for(let n of k(t,{withFileTypes:!0})){let r=u(t,n.name);n.isFile()?e.push(r):n.isDirectory()&&e.push(...ke(r))}return e.sort()}function ft(t){if(b(t))for(let e of k(t,{withFileTypes:!0})){if(!e.isDirectory())continue;let n=u(t,e.name);k(n).some(r=>r.endsWith(".claim"))||p(n,{recursive:!0,force:!0})}}function pt(t){try{return F(t).size}catch{return 0}}function O(t){return Buffer.from(t,"utf8").toString("base64url")}function pe(t){try{let e=Buffer.from(t,"base64url").toString("utf8");return O(e)===t?e:null}catch{return null}}function yt(t){return/^[a-z0-9][a-z0-9-]{0,127}$/i.test(t)?t:`invalid-${W("sha256").update(t).digest("hex")}`}function bt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function rn(t){return typeof t=="string"&&Number.isFinite(Date.parse(t))}function on(t){return bt(t)&&Object.values(t).every(e=>typeof e=="string"||e===null)}function sn(t){return typeof t=="number"&&Number.isSafeInteger(t)&&t>=0}function an(t){return typeof t=="number"&&Number.isSafeInteger(t)&&t>0}function cn(t){return typeof t=="number"&&Number.isFinite(t)&&t>=0}export{bt as a,rn as b,on as c,sn as d,an as e,cn as f,h as g,g as h,ne as i,re as j,v as k,vt as l,M as m,Ke as n,f as o,$t as p,z as q,D as r,G as s,Ht as t,H as u,Yt as v,nt as w,Qt as x,Zt as y,en as z,it as A,tn as B,N as C};
9
+ //# sourceMappingURL=chunk-VKRQDBW5.js.map
@@ -1,5 +1,5 @@
1
- function V(e,t){let n=e.split("/").at(-1)??e;if(P.has(n)||n===".scipquery.json"||/^tsconfig(?:\..+)?\.json$/.test(n))return"config";if(/\.d\.(?:ts|mts|cts)$/.test(e.toLowerCase()))return"ambient";let o=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return t.some(i=>(C[i]??[]).includes(o))?"source":"other"}function j(e,t,n){let o=e.split("/").at(-1)??e;if(n?.includes(e)||n?.includes(o)||P.has(o))return!0;let i=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return(C[t]??[]).includes(i)}function ce(e){if(typeof e!="object"||e===null)return null;let t=e;return typeof t.version!="number"||!y(t.languages)||typeof t.pnpmWorkspaces!="boolean"||typeof t.typescriptProjectMode!="string"||!y(t.typescriptProjects)||t.clojureConfigPath!==void 0&&typeof t.clojureConfigPath!="string"||!Array.isArray(t.files)||!t.files.every(M)?null:t}function le(e,t){let n=new Map((e?.files??[]).map(a=>[a.path,a])),o=new Map(t.files.map(a=>[a.path,a])),i=new Set([...n.keys(),...o.keys()]),r=[];for(let a of[...i].sort()){let c=n.get(a),l=o.get(a),p=V(a,t.languages);!c&&l?r.push({kind:"added",path:a,inputKind:p,after:l}):c&&!l?r.push({kind:"deleted",path:a,inputKind:p,before:c}):c&&l&&(c.hash!==l.hash||c.size!==l.size)&&r.push({kind:"modified",path:a,inputKind:p,before:c,after:l})}let s=new Set;return e||s.add("prior-snapshot-unavailable"),e&&e.version!==t.version&&s.add("snapshot-version-changed"),(b(e?.files??[])||b(t.files))&&s.add("duplicate-input-path"),[...e?.files??[],...t.files].some(A)&&s.add("unreadable-input"),{version:1,changes:r,projectIdentityChanged:e?!L(e,t):!0,uncertainty:[...s].sort()}}function y(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function b(e){return new Set(e.map(t=>t.path)).size!==e.length}function M(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.path=="string"&&typeof t.size=="number"&&typeof t.hash=="string"}function A(e){return e.hash==="unreadable"||e.size<0}function L(e,t){return m(e.languages,t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&m(e.typescriptProjects,t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function m(e,t){if(e.length!==t.length)return!1;let n=[...e].sort(),o=[...t].sort();return n.every((i,r)=>i===o[r])}var P=new Set(["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lockb","tsconfig.json","tsconfig.base.json","pyproject.toml","setup.py","setup.cfg","Cargo.toml","Cargo.lock","go.mod","go.sum","pom.xml","build.gradle","build.gradle.kts","build.sbt","compile_commands.json","CMakeLists.txt","Makefile","Gemfile","Gemfile.lock","composer.json","composer.lock","pubspec.yaml","pubspec.lock","deps.edn","project.clj","bb.edn","shadow-cljs.edn"]),C={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};import{execFileSync as W}from"child_process";import{createHash as S}from"crypto";import{lstatSync as _,readdirSync as O,readFileSync as G,readlinkSync as E,realpathSync as F}from"fs";import{isAbsolute as $,join as x,relative as K,sep as T}from"path";function R(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function z(e){return(U(e)??q(e)).filter(t=>t&&!k(t)).sort()}function B(e,t={}){let n=z(e).filter(i=>!t.language||j(i,t.language,t.markerFiles)).filter(i=>!t.includePath||t.includePath(i)),o=F(e);return n.map(i=>{let r=x(e,i);try{if(_(r).isSymbolicLink()){let a=F(r),c=K(o,a);if(c===".."||c.startsWith(`..${T}`)||$(c))throw new Error("external symlink");let l=E(r);return{path:i,size:Buffer.byteLength(l),hash:S("sha256").update("symlink\0").update(l).digest("hex")}}let s=G(r);return{path:i,size:s.byteLength,hash:S("sha256").update(s).digest("hex")}}catch{return{path:i,size:-1,hash:"unreadable"}}})}function ye(e,t,n){return{version:2,languages:[...t].sort(),pnpmWorkspaces:n.typescriptProjectMode!=="workspace"&&n.pnpmWorkspaces===!0,typescriptProjectMode:n.typescriptProjectMode??"single",typescriptProjects:R(n.typescriptProjects),clojureConfigPath:N(n.clojureConfigPath),files:B(e)}}function N(e){return e?.trim()||void 0}function U(e){try{return W("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"]}).split(`
2
- `).filter(Boolean)}catch{return null}}function q(e){let t=[],n=[""];for(;n.length>0;){let o=n.pop(),i=o?x(e,o):e,r;try{r=O(i,{withFileTypes:!0})}catch{continue}for(let s of r){let a=o?`${o}/${s.name}`:s.name;if(s.isDirectory()){k(a)||n.push(a);continue}t.push(a)}}return t}function k(e){let t=e.split("/");return e==="meta.json"||t.some(n=>H.has(n))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var H=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);import J from"ignore";import{readFileSync as X,existsSync as v,readdirSync as Y}from"fs";import{dirname as g,isAbsolute as D,join as u,relative as Q,resolve as Z}from"path";function Ce(e){let t=J();return ee(e,t)||t.add(re),{isIgnored:o=>f(t,e,o),filter:o=>o.filter(i=>!f(t,e,i))}}function ee(e,t){let n=new Set,o=(s,a)=>{if(!(n.has(s)||!v(s)))try{let c=X(s,"utf-8");t.add(a?te(c,a):c),n.add(s)}catch{}},i=g(e),r=0;for(;i!==g(i)&&r<5&&(o(u(i,".gitignore"),""),!v(u(i,".git")));)i=g(i),r++;return I(e,"",t,o),n.size>0}function I(e,t,n,o){let i=t?u(e,t):e;o(u(i,".gitignore"),t);let r;try{r=Y(i,{withFileTypes:!0})}catch{return}for(let s of r){if(!s.isDirectory()||s.name===".git")continue;let a=t?`${t}/${s.name}`:s.name;f(n,e,`${a}/`)||I(e,a,n,o)}}function te(e,t){let n=t.replaceAll("\\","/").replace(/\/+$/,"");return e.split(/\r?\n/).map(o=>ne(o,n)).join(`
1
+ function V(e,t){let n=e.split("/").at(-1)??e;if(P.has(n)||n===".scipquery.json"||/^tsconfig(?:\..+)?\.json$/.test(n))return"config";if(/\.d\.(?:ts|mts|cts)$/.test(e.toLowerCase()))return"ambient";let o=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return t.some(i=>(S[i]??[]).includes(o))?"source":"other"}function j(e,t,n){let o=e.split("/").at(-1)??e;if(n?.includes(e)||n?.includes(o)||P.has(o))return!0;let i=e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:"";return(S[t]??[]).includes(i)}function ce(e){if(typeof e!="object"||e===null)return null;let t=e;return typeof t.version!="number"||!y(t.languages)||typeof t.pnpmWorkspaces!="boolean"||typeof t.typescriptProjectMode!="string"||!y(t.typescriptProjects)||t.clojureConfigPath!==void 0&&typeof t.clojureConfigPath!="string"||!Array.isArray(t.files)||!t.files.every(M)?null:t}function le(e,t){let n=new Map((e?.files??[]).map(a=>[a.path,a])),o=new Map(t.files.map(a=>[a.path,a])),i=new Set([...n.keys(),...o.keys()]),r=[];for(let a of[...i].sort()){let c=n.get(a),l=o.get(a),p=V(a,t.languages);!c&&l?r.push({kind:"added",path:a,inputKind:p,after:l}):c&&!l?r.push({kind:"deleted",path:a,inputKind:p,before:c}):c&&l&&(c.hash!==l.hash||c.size!==l.size)&&r.push({kind:"modified",path:a,inputKind:p,before:c,after:l})}let s=new Set;return e||s.add("prior-snapshot-unavailable"),e&&e.version!==t.version&&s.add("snapshot-version-changed"),(b(e?.files??[])||b(t.files))&&s.add("duplicate-input-path"),[...e?.files??[],...t.files].some(A)&&s.add("unreadable-input"),{version:1,changes:r,projectIdentityChanged:e?!L(e,t):!0,uncertainty:[...s].sort()}}function y(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function b(e){return new Set(e.map(t=>t.path)).size!==e.length}function M(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.path=="string"&&typeof t.size=="number"&&Number.isFinite(t.size)&&typeof t.hash=="string"}function A(e){return e.hash==="unreadable"||e.size<0}function L(e,t){return m(e.languages,t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&m(e.typescriptProjects,t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function m(e,t){if(e.length!==t.length)return!1;let n=[...e].sort(),o=[...t].sort();return n.every((i,r)=>i===o[r])}var P=new Set(["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lockb","tsconfig.json","tsconfig.base.json","pyproject.toml","setup.py","setup.cfg","Cargo.toml","Cargo.lock","go.mod","go.sum","pom.xml","build.gradle","build.gradle.kts","build.sbt","compile_commands.json","CMakeLists.txt","Makefile","Gemfile","Gemfile.lock","composer.json","composer.lock","pubspec.yaml","pubspec.lock","deps.edn","project.clj","bb.edn","shadow-cljs.edn"]),S={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};import{execFileSync as _}from"child_process";import{createHash as C}from"crypto";import{lstatSync as W,readdirSync as G,readFileSync as O,readlinkSync as E,realpathSync as F}from"fs";import{isAbsolute as K,join as x,relative as $,sep as T}from"path";function z(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function R(e){return(U(e)??q(e)).filter(t=>t&&!k(t)).sort()}function N(e,t={}){let n=R(e).filter(i=>!t.language||j(i,t.language,t.markerFiles)).filter(i=>!t.includePath||t.includePath(i)),o=F(e);return n.map(i=>{let r=x(e,i);try{if(W(r).isSymbolicLink()){let a=F(r),c=$(o,a);if(c===".."||c.startsWith(`..${T}`)||K(c))throw new Error("external symlink");let l=E(r);return{path:i,size:Buffer.byteLength(l),hash:C("sha256").update("symlink\0").update(l).digest("hex")}}let s=O(r);return{path:i,size:s.byteLength,hash:C("sha256").update(s).digest("hex")}}catch{return{path:i,size:-1,hash:"unreadable"}}})}function ye(e,t,n){return{version:2,languages:[...t].sort(),pnpmWorkspaces:n.typescriptProjectMode!=="workspace"&&n.pnpmWorkspaces===!0,typescriptProjectMode:n.typescriptProjectMode??"single",typescriptProjects:z(n.typescriptProjects),clojureConfigPath:B(n.clojureConfigPath),files:N(e)}}function B(e){return e?.trim()||void 0}function U(e){try{return _("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}).split(`
2
+ `).filter(Boolean)}catch{return null}}function q(e){let t=[],n=[""];for(;n.length>0;){let o=n.pop(),i=o?x(e,o):e,r;try{r=G(i,{withFileTypes:!0})}catch{continue}for(let s of r){let a=o?`${o}/${s.name}`:s.name;if(s.isDirectory()){k(a)||n.push(a);continue}t.push(a)}}return t}function k(e){let t=e.split("/");return e==="meta.json"||t.some(n=>H.has(n))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var H=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);import J from"ignore";import{readFileSync as X,existsSync as v,readdirSync as Y}from"fs";import{dirname as g,isAbsolute as D,join as u,relative as Q,resolve as Z}from"path";function Se(e){let t=J();return ee(e,t)||t.add(re),{isIgnored:o=>f(t,e,o),filter:o=>o.filter(i=>!f(t,e,i))}}function ee(e,t){let n=new Set,o=(s,a)=>{if(!(n.has(s)||!v(s)))try{let c=X(s,"utf-8");t.add(a?te(c,a):c),n.add(s)}catch{}},i=g(e),r=0;for(;i!==g(i)&&r<5&&(o(u(i,".gitignore"),""),!v(u(i,".git")));)i=g(i),r++;return I(e,"",t,o),n.size>0}function I(e,t,n,o){let i=t?u(e,t):e;o(u(i,".gitignore"),t);let r;try{r=Y(i,{withFileTypes:!0})}catch{return}for(let s of r){if(!s.isDirectory()||s.name===".git")continue;let a=t?`${t}/${s.name}`:s.name;f(n,e,`${a}/`)||I(e,a,n,o)}}function te(e,t){let n=t.replaceAll("\\","/").replace(/\/+$/,"");return e.split(/\r?\n/).map(o=>ne(o,n)).join(`
3
3
  `)}function ne(e,t){let n=e.trimStart();if(!n||n.startsWith("#"))return e;let o=e.slice(0,e.length-n.length),i=n.startsWith("!"),r=i?n.slice(1):n;if(!r||r.startsWith("#"))return e;let s=r.startsWith("/"),a=s?r.slice(1):r,p=(a.endsWith("/")?a.slice(0,-1):a).includes("/")||s?`${t}/${a}`:`${t}/**/${a}`;return`${o}${i?"!":""}${p}`}var re=`
4
4
  # Dependencies
5
5
  node_modules/
@@ -63,5 +63,5 @@ Thumbs.db
63
63
  ${e.pathExclusionsFor("documents")}
64
64
  ${n}
65
65
  ${o}
66
- ORDER BY relative_path`,...i).map(a=>a.relative_path),s=t.extensions?r.filter(a=>t.extensions.some(c=>a.toLowerCase().endsWith(c.toLowerCase()))):r;return t.includeIgnored===!1?s.filter(a=>!e.isIgnored(a)):s}export{V as a,ce as b,le as c,R as d,B as e,ye as f,d as g,ke as h,ve as i,De as j,ae as k,we as l,Ce as m};
67
- //# sourceMappingURL=chunk-C7NIYIQ4.js.map
66
+ ORDER BY relative_path`,...i).map(a=>a.relative_path),s=t.extensions?r.filter(a=>t.extensions.some(c=>a.toLowerCase().endsWith(c.toLowerCase()))):r;return t.includeIgnored===!1?s.filter(a=>!e.isIgnored(a)):s}export{V as a,ce as b,le as c,M as d,z as e,N as f,ye as g,d as h,ke as i,ve as j,De as k,ae as l,we as m,Se as n};
67
+ //# sourceMappingURL=chunk-VOQFGC2W.js.map
@@ -1,2 +1,2 @@
1
- import{a as k,b as C}from"./chunk-U6WNH5GC.js";import{a as V,b as R,c as F,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{N as y}from"./chunk-YGAGTIDK.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=k(u,r=>r.tokens);return C({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=R(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return V({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return F([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
2
- //# sourceMappingURL=chunk-DZ74OMG6.js.map
1
+ import{a as k,b as C}from"./chunk-MGBJHRFB.js";import{a as V,b as R,c as F,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{N as y}from"./chunk-DGMCFMPG.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=k(u,r=>r.tokens);return C({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=R(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return V({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return F([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
2
+ //# sourceMappingURL=chunk-VP542C25.js.map
@@ -1,8 +1,8 @@
1
- import{a as k}from"./chunk-7B3UPBVA.js";import{a as T,e as x,s as R}from"./chunk-XYADIZHU.js";import{o as w}from"./chunk-X6D5IC6I.js";import{b as l}from"./chunk-YGAGTIDK.js";import{d as g,z as _}from"./chunk-L7SPDE73.js";import{a as S}from"./chunk-64MNV6AB.js";import{existsSync as d,readFileSync as B,readdirSync as $}from"fs";import{join as p}from"path";var H={files:new Set,pathPrefixes:[]},y=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,K=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,A=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],Y=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),q=4,J=g("package-surface",{clearGroups:["whole-project"]});function Q(t){return J.get(t,()=>Z(t.config.projectRoot))}function E(t,e){let r=Q(t);return r.files.has(e)?!0:r.pathPrefixes.some(s=>e.startsWith(s))}function Z(t){let e=new Set,r=[];for(let{manifest:s,packageRoot:i}of z(t))for(let n of tt(s))et(t,i,n,e,r);return e.size===0&&r.length===0?H:{files:e,pathPrefixes:r}}function z(t){let e=[],r=O(t,"");return r&&e.push({manifest:r,packageRoot:""}),D(t,"",e,0),e}function D(t,e,r,s){if(s>=q)return;let i=p(t,e);if(d(i))for(let n of $(i,{withFileTypes:!0})){if(!n.isDirectory()||Y.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name,o=O(t,a);o&&r.push({manifest:o,packageRoot:a}),D(t,a,r,s+1)}}function O(t,e){try{let r=B(p(t,e,"package.json"),"utf-8"),s=JSON.parse(r);return s&&typeof s=="object"?s:null}catch{return null}}function tt(t){let e=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&e.push(t[s]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let s of Object.values(r))typeof s=="string"&&e.push(s);return F(t.exports,e),e}function F(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))F(r,e)}function et(t,e,r,s,i){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let a=n.indexOf("*");if(a>=0){let c=n.slice(0,a);for(let u of j(c))u!==""&&i.push(f(e,u));return}let o=n.replace(K,"");for(let c of j(o)){c===o&&c===n&&s.add(f(e,n));for(let u of A)rt(t,s,e,c+u)}s.add(f(e,n))}function j(t){let e=[t];return y.test(t)&&(e.push(t.replace(y,"src/")),e.push(t.replace(y,""))),e}function rt(t,e,r,s){let i=f(r,s);if(e.add(i),!s.startsWith("src/")||d(p(t,i)))return;let n=A.find(P=>s.endsWith(P));if(!n)return;let a=s.slice(0,-n.length);st(t,e,r,a,n);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),u=a.slice(o+1);for(let P of N(t,r,c,`${u}${n}`))e.add(P)}function st(t,e,r,s,i){let n=f(r,`${s}/index${i}`);d(p(t,n))&&e.add(n)}function N(t,e,r,s){let i=p(t,e,r);if(!d(i))return[];let n=[];for(let a of $(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?n.push(...N(t,e,o,s)):a.isFile()&&a.name===s&&n.push(f(e,o))}return n}function f(t,e){return t?`${t}/${e}`:e}import{existsSync as h,readFileSync as nt,readdirSync as it}from"fs";import{dirname as at,join as b}from"path";var ot={rootFiles:new Set,sourcePrefixes:[]},ct=new Set([".git",".scipquery","node_modules","target"]),ut=6,ft=g("rust-library-surface",{clearGroups:["whole-project"]});function L(t,e,r){if(!r.endsWith(".rs")||!pt(lt(t),r))return!1;let s=R(t,r).find(i=>i.symbol===e);return s?St(_(t,r)[s.startLine]??""):!1}function lt(t){return ft.get(t,()=>gt(t.config.projectRoot))}function gt(t){let e=new Set,r=new Set;for(let s of dt(t)){let i=b(t,s,"Cargo.toml"),n=nt(i,"utf8"),a=ht(n),o=f(s,"src/lib.rs"),c=a?f(s,a):!bt(n)&&h(b(t,o))?o:null;if(!c)continue;e.add(c);let u=at(c).replaceAll("\\","/");r.add(u==="."?"":`${u}/`)}return e.size===0?ot:{rootFiles:e,sourcePrefixes:[...r].sort()}}function pt(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:mt(e)?!1:t.sourcePrefixes.some(r=>e.startsWith(r)):!1}function St(t){return/^\s*pub\s+(?!\()/.test(t)}function dt(t){if(!h(t))return[];let e=[];return C(t,"",e,0),e}function C(t,e,r,s){let i=b(t,e);if(h(i)&&(h(b(i,"Cargo.toml"))&&r.push(e),!(s>=ut)))for(let n of it(i,{withFileTypes:!0})){if(!n.isDirectory()||ct.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name;C(t,a,r,s+1)}}function ht(t){let e=!1;for(let r of t.split(`
1
+ import{a as k}from"./chunk-YLVE3SXZ.js";import{a as T,e as x,s as R}from"./chunk-ZTTISZ7J.js";import{o as w}from"./chunk-7LABSJSR.js";import{b as l}from"./chunk-DGMCFMPG.js";import{I as _,m as g}from"./chunk-B5MHCHP3.js";import{a as S}from"./chunk-64MNV6AB.js";import{existsSync as d,readFileSync as B,readdirSync as $}from"fs";import{join as p}from"path";var H={files:new Set,pathPrefixes:[]},y=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,K=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,A=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],Y=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),q=4,J=g("package-surface",{clearGroups:["whole-project"]});function Q(t){return J.get(t,()=>Z(t.config.projectRoot))}function E(t,e){let r=Q(t);return r.files.has(e)?!0:r.pathPrefixes.some(s=>e.startsWith(s))}function Z(t){let e=new Set,r=[];for(let{manifest:s,packageRoot:i}of z(t))for(let n of tt(s))et(t,i,n,e,r);return e.size===0&&r.length===0?H:{files:e,pathPrefixes:r}}function z(t){let e=[],r=O(t,"");return r&&e.push({manifest:r,packageRoot:""}),D(t,"",e,0),e}function D(t,e,r,s){if(s>=q)return;let i=p(t,e);if(d(i))for(let n of $(i,{withFileTypes:!0})){if(!n.isDirectory()||Y.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name,o=O(t,a);o&&r.push({manifest:o,packageRoot:a}),D(t,a,r,s+1)}}function O(t,e){try{let r=B(p(t,e,"package.json"),"utf-8"),s=JSON.parse(r);return s&&typeof s=="object"?s:null}catch{return null}}function tt(t){let e=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&e.push(t[s]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let s of Object.values(r))typeof s=="string"&&e.push(s);return F(t.exports,e),e}function F(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))F(r,e)}function et(t,e,r,s,i){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let a=n.indexOf("*");if(a>=0){let c=n.slice(0,a);for(let u of j(c))u!==""&&i.push(f(e,u));return}let o=n.replace(K,"");for(let c of j(o)){c===o&&c===n&&s.add(f(e,n));for(let u of A)rt(t,s,e,c+u)}s.add(f(e,n))}function j(t){let e=[t];return y.test(t)&&(e.push(t.replace(y,"src/")),e.push(t.replace(y,""))),e}function rt(t,e,r,s){let i=f(r,s);if(e.add(i),!s.startsWith("src/")||d(p(t,i)))return;let n=A.find(P=>s.endsWith(P));if(!n)return;let a=s.slice(0,-n.length);st(t,e,r,a,n);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),u=a.slice(o+1);for(let P of N(t,r,c,`${u}${n}`))e.add(P)}function st(t,e,r,s,i){let n=f(r,`${s}/index${i}`);d(p(t,n))&&e.add(n)}function N(t,e,r,s){let i=p(t,e,r);if(!d(i))return[];let n=[];for(let a of $(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?n.push(...N(t,e,o,s)):a.isFile()&&a.name===s&&n.push(f(e,o))}return n}function f(t,e){return t?`${t}/${e}`:e}import{existsSync as h,readFileSync as nt,readdirSync as it}from"fs";import{dirname as at,join as b}from"path";var ot={rootFiles:new Set,sourcePrefixes:[]},ct=new Set([".git",".scipquery","node_modules","target"]),ut=6,ft=g("rust-library-surface",{clearGroups:["whole-project"]});function L(t,e,r){if(!r.endsWith(".rs")||!pt(lt(t),r))return!1;let s=R(t,r).find(i=>i.symbol===e);return s?St(_(t,r)[s.startLine]??""):!1}function lt(t){return ft.get(t,()=>gt(t.config.projectRoot))}function gt(t){let e=new Set,r=new Set;for(let s of dt(t)){let i=b(t,s,"Cargo.toml"),n=nt(i,"utf8"),a=ht(n),o=f(s,"src/lib.rs"),c=a?f(s,a):!bt(n)&&h(b(t,o))?o:null;if(!c)continue;e.add(c);let u=at(c).replaceAll("\\","/");r.add(u==="."?"":`${u}/`)}return e.size===0?ot:{rootFiles:e,sourcePrefixes:[...r].sort()}}function pt(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:mt(e)?!1:t.sourcePrefixes.some(r=>e.startsWith(r)):!1}function St(t){return/^\s*pub\s+(?!\()/.test(t)}function dt(t){if(!h(t))return[];let e=[];return C(t,"",e,0),e}function C(t,e,r,s){let i=b(t,e);if(h(i)&&(h(b(i,"Cargo.toml"))&&r.push(e),!(s>=ut)))for(let n of it(i,{withFileTypes:!0})){if(!n.isDirectory()||ct.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name;C(t,a,r,s+1)}}function ht(t){let e=!1;for(let r of t.split(`
2
2
  `)){let s=r.replace(/\s+#.*$/,"").trim(),i=/^\[([^\]]+)\]$/.exec(s);if(i){e=i[1]==="lib";continue}if(!e)continue;let n=/^path\s*=\s*["']([^"']+)["']/.exec(s)?.[1];if(n)return n.replaceAll("\\","/").replace(/^\.\//,"")}return null}function bt(t){let e=!1;for(let r of t.split(`
3
3
  `)){let s=r.replace(/\s+#.*$/,"").trim(),i=/^\[([^\]]+)\]$/.exec(s);if(i){e=i[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(s))return!0}return!1}function mt(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}function m(t){let e=l(t);return Mt(e)?"test":It(e)?"worker":vt(e)?"entry":Vt(e)?"barrel":"source"}function Pt(t){return m(t)==="barrel"}function I(t){return xt.get(t,()=>{let r=S(t,{includeIgnored:!1}).filter(a=>{let o=m(a);return o==="entry"||o==="worker"});if(r.length===0)return new Set;let s=k(t),i=new Set,n=new Set;for(;r.length>0;){let a=r.shift();if(!i.has(a)){i.add(a),m(a)==="barrel"&&n.add(a);for(let o of s.get(a)??[])i.has(o)||r.push(o)}}return n})}var xt=g("live-barrels",{clearGroups:["whole-project"]});function yt(t,e){return I(t).has(l(e))}function ce(t){let e=I(t);return S(t,{includeIgnored:!1}).filter(r=>Pt(r)&&!e.has(r)&&!Et(t,r))}function Et(t,e){let r=l(e),s=T(t).forFile(r,{facts:!0}).facts?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
4
4
  FROM defn_enclosing_ranges der
5
5
  JOIN documents d ON d.id = der.document_id
6
6
  WHERE d.relative_path = ?
7
7
  AND der.end_line - der.start_line >= 2`,r)?.n??0)>0}function ue(t,e){let r=l(e),s=m(e);return s==="entry"||s==="worker"||Nt(r)||yt(t,r)}function fe(t,e,r){let s=l(r);if(E(t,s)||wt(t,e,s)||L(t,e,s)||Ft(e,s))return!0;let i=t.config.entryRoots;return i?!!(i.files?.some(n=>l(n)===s)||i.pathPrefixes?.some(n=>s.startsWith(l(n)))||i.qualifiedVars?.some(n=>Xt(e,n))||i.symbolPatterns?.some(n=>{try{return new RegExp(n).test(e)}catch{return!1}})):!1}var _t=g("package-surface-reachability",{clearGroups:["whole-project"]});function wt(t,e,r){let s=kt(t).get(r);return s===void 0?!1:s===null||s.has(x(e))}function kt(t){return _t.get(t,()=>{let e=new Map,r=[];for(let s of S(t,{includeIgnored:!1}))E(t,s)&&(e.set(s,null),r.push(s));for(;r.length>0;){let s=r.shift(),i=e.get(s);if(i!==void 0)for(let n of w(t,s)){if(!n.sourcePath||t.isIgnored(n.sourcePath))continue;let a=Tt(i,n);a!==void 0&&Rt(e,n.sourcePath,a)&&r.push(n.sourcePath)}}return e})}function Tt(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return;let r=e.names.filter(s=>t.has(s));return r.length>0?new Set(r):void 0}function Rt(t,e,r){if(!t.has(e))return t.set(e,r),!0;let s=t.get(e);if(s===void 0)return!1;if(s===null||r===null)return s===null?!1:(t.set(e,null),!0);let i=!1;for(let n of r)s.has(n)||(s.add(n),i=!0);return i}var v=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),jt=new Set(["default","generateMetadata","generateStaticParams"]),$t=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),At=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),Dt=new Set(["load","actions","entries",...v]),Ot=new Set(["default"]);function Ft(t,e){let r=x(t);return r===""?!1:V(e)?v.has(r):X(e)?jt.has(r):W(e)?$t.has(r):G(e)?At.has(r):U(e)?Dt.has(r):Ct(e)?Ot.has(r):!1}function Nt(t){return V(t)||X(t)||W(t)||Lt(t)||G(t)||U(t)}function V(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function X(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function W(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Lt(t){let e="(?:middleware|proxy|instrumentation)\\.(?:ts|js|mts|mjs)";return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function G(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function U(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function Ct(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function Mt(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function It(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function vt(t){let e=t.split("/"),r=e[e.length-1]??t;return r==="cli.ts"||r==="cli.js"||r==="postinstall.ts"||r==="postinstall.js"||r==="main.ts"||r==="main.js"||r==="main.rs"||r==="main.go"||r==="main.py"||r==="build.rs"||r==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:r==="index.ts"||r==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:e.length<=2:!1}function Vt(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function Xt(t,e){let r=e.lastIndexOf("/");if(r<0)return!1;let s=e.slice(0,r),i=e.slice(r+1);return t.includes(M(s)+"/")&&t.includes(M(i)+".")}function M(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{E as a,m as b,Pt as c,yt as d,ce as e,ue as f,fe as g};
8
- //# sourceMappingURL=chunk-Q3AFUTGB.js.map
8
+ //# sourceMappingURL=chunk-WMXRRBII.js.map
@@ -1,3 +1,3 @@
1
- import{a as S}from"./chunk-HKEHS2AS.js";import{a as y}from"./chunk-XLTP42QA.js";import{c as x}from"./chunk-NH5ALKPW.js";import{a as h,g as b}from"./chunk-Q3AFUTGB.js";import{a as P}from"./chunk-B75HZHUP.js";import{a as v}from"./chunk-BGBBVSH4.js";import{d as l,e as p,h as d}from"./chunk-XYADIZHU.js";import{a as u,h as m,i as g}from"./chunk-X6D5IC6I.js";import{z as f}from"./chunk-L7SPDE73.js";import{basename as L,extname as D}from"path";function K(n,e){let{scope:i,maxLoc:t=15,limit:r=30,scanLimit:a}=e??{},s=new x(n);return y({candidates:()=>A(n,s,i,t),orderCandidates:P,scanLimit:a,profile:{name:"passthrough-candidates"},prepare:o=>s.calleeMap(o,{semantic:e?.semantic!==!1}),evaluate:(o,c)=>w(n,o,c.get(o.symbolId)??[]),orderResults:(o,c)=>o.loc-c.loc||o.file.localeCompare(c.file),limit:r})}function w(n,e,i){let t=j(i);if(t.size!==1||!m(n,e.relativePath,e.startLine,e.endLine))return null;let[,r]=[...t.entries()][0],a=I(n,e,r),s=T(n,e),o=a.length>0||s.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:r.symbol,forwardsToShort:l(r.symbol),forwardsToFile:r.file,actionTier:o,boundaryEvidence:a,publicFacadeEvidence:s,recommendation:E(o,a,s)}}function I(n,e,i){return S(n,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:l(e.symbol)},{label:"callee name",value:l(i.symbol)},{label:"passthrough module",value:L(e.relativePath,D(e.relativePath))},{label:"callee module",value:L(i.file,D(i.file))}])}function E(n,e,i){if(n==="signal"){if(i.length>0)return`Review the public API before inlining; public-facade evidence: ${i.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 T(n,e){return C(n,e)?h(n,e.relativePath)?["exported passthrough is declared on the package public surface"]:b(n,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function C(n,e){let i=f(n,e.relativePath);if(i.length===0)return!1;let t=p(e.symbol);if(!t)return!1;let r=i.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
1
+ import{a as S}from"./chunk-2GSQR6YA.js";import{a as y}from"./chunk-UUJBLG6J.js";import{c as x}from"./chunk-XVJ3V7LM.js";import{a as h,g as b}from"./chunk-WMXRRBII.js";import{a as P}from"./chunk-B75HZHUP.js";import{a as v}from"./chunk-BGBBVSH4.js";import{d as l,e as p,h as d}from"./chunk-ZTTISZ7J.js";import{a as u,h as m,i as g}from"./chunk-7LABSJSR.js";import{I as f}from"./chunk-B5MHCHP3.js";import{basename as L,extname as D}from"path";function K(n,e){let{scope:i,maxLoc:t=15,limit:r=30,scanLimit:a}=e??{},s=new x(n);return y({candidates:()=>A(n,s,i,t),orderCandidates:P,scanLimit:a,profile:{name:"passthrough-candidates"},prepare:o=>s.calleeMap(o,{semantic:e?.semantic!==!1}),evaluate:(o,c)=>w(n,o,c.get(o.symbolId)??[]),orderResults:(o,c)=>o.loc-c.loc||o.file.localeCompare(c.file),limit:r})}function w(n,e,i){let t=j(i);if(t.size!==1||!m(n,e.relativePath,e.startLine,e.endLine))return null;let[,r]=[...t.entries()][0],a=I(n,e,r),s=T(n,e),o=a.length>0||s.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:r.symbol,forwardsToShort:l(r.symbol),forwardsToFile:r.file,actionTier:o,boundaryEvidence:a,publicFacadeEvidence:s,recommendation:E(o,a,s)}}function I(n,e,i){return S(n,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:l(e.symbol)},{label:"callee name",value:l(i.symbol)},{label:"passthrough module",value:L(e.relativePath,D(e.relativePath))},{label:"callee module",value:L(i.file,D(i.file))}])}function E(n,e,i){if(n==="signal"){if(i.length>0)return`Review the public API before inlining; public-facade evidence: ${i.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 T(n,e){return C(n,e)?h(n,e.relativePath)?["exported passthrough is declared on the package public surface"]:b(n,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function C(n,e){let i=f(n,e.relativePath);if(i.length===0)return!1;let t=p(e.symbol);if(!t)return!1;let r=i.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
2
2
  `),a=u(t);return new RegExp(`^\\s*export\\s+(?:default\\s+)?(?:(?:async\\s+)?function\\s+${a}\\b|(?:const|let|var)\\s+${a}\\b)`,"m").test(r)?!0:R(i,t)}function R(n,e){if(!e)return!1;let i=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${u(e)}\\b`);return n.some(t=>i.test(t))}function F(n){return n.includes("public surface")}function j(n){let e=n.some(t=>d(t.symbol))?n.filter(t=>d(t.symbol)):n,i=new Map;for(let t of e)i.has(t.symbol)||i.set(t.symbol,t);return i}function A(n,e,i,t){return e.productionCallableDefinitions({scope:i,minLoc:3,maxLoc:t,requireFunctionLikeSymbol:!0,excludeRustTraitImplMembers:!0}).filter(r=>!g(n,r))}export{K as a,C as b};
3
- //# sourceMappingURL=chunk-ZGZUZ7XE.js.map
3
+ //# sourceMappingURL=chunk-WXAAURU7.js.map
@@ -0,0 +1,20 @@
1
+ import{i as o,k as r}from"./chunk-GA64UPMI.js";import l from"better-sqlite3";var c=["node_modules",".git","dist","build","out","coverage","target",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs",".scipquery-cache","__pycache__",".venv","venv"],s=class{db;config;generation;pathFilter;statementCache=new Map;constructor(e,t){this.config=e,this.pathFilter=t??null;let a=d(e);this.generation=a.generation,this.db=a.db,this.db.pragma("busy_timeout = 5000"),this.db.pragma("query_only = ON"),this.db.pragma("temp_store = MEMORY"),this.db.pragma("cache_size = -64000"),this.db.pragma("mmap_size = 268435456")}isIgnored(e){return this.pathFilter?.isIgnored(e)??!1}get localSymbolPredicate(){return`(
2
+ EXISTS (
3
+ SELECT 1
4
+ FROM defn_enclosing_ranges local_der
5
+ JOIN documents local_d ON local_der.document_id = local_d.id
6
+ WHERE local_der.symbol_id = gs.id
7
+ ${this.pathExclusionsFor("local_d").trimStart()}
8
+ )
9
+ OR EXISTS (
10
+ SELECT 1
11
+ FROM mentions local_m
12
+ JOIN chunks local_c ON local_m.chunk_id = local_c.id
13
+ JOIN documents local_d ON local_c.document_id = local_d.id
14
+ WHERE local_m.symbol_id = gs.id
15
+ AND local_m.role = 1
16
+ ${this.pathExclusionsFor("local_d").trimStart()}
17
+ )
18
+ )`}get pathExclusions(){return this.pathExclusionsFor("d")}get symbolNoise(){return this.symbolNoiseFor("gs")}pathExclusionsFor(...e){return e.flatMap(t=>c.flatMap(a=>[`AND ${t}.relative_path NOT LIKE '${a}/%'`,`AND ${t}.relative_path NOT LIKE '%/${a}/%'`])).join(`
19
+ `)}symbolNoiseFor(e){return`AND ${e}.symbol NOT LIKE '%().(%' AND ${e}.symbol NOT LIKE '%typeLiteral%'`}all(e,...t){return this.statement(e).all(...t)}get(e,...t){return this.statement(e).get(...t)}close(){this.statementCache.clear(),this.db.close()}statement(e){let t=this.statementCache.get(e);return t||(t=this.db.prepare(e),this.statementCache.set(e,t)),t}};function d(i){for(let e=0;e<4;e+=1){let t=o(i),a=new l(t.databasePath,{readonly:!0,fileMustExist:!0});if(t.source==="immutable")return{db:a,generation:t};try{let n=o(i);if(t.databaseFileIdentity===r(t.databasePath)&&n.source==="legacy"&&n.identity===t.identity&&n.databaseFileIdentity===t.databaseFileIdentity&&n.metadataRaw===t.metadataRaw)return{db:a,generation:t}}catch(n){throw a.close(),n}a.close()}throw new Error("SQLite index publication changed repeatedly while opening a coherent generation.")}export{s as a};
20
+ //# sourceMappingURL=chunk-X3NLZHPA.js.map
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunk-54HA4ZXH.js";import{c as d}from"./chunk-NH5ALKPW.js";import{l as c}from"./chunk-U7DSEKOM.js";import{d as u}from"./chunk-XYADIZHU.js";function L(e,n,i={}){let t=f(e,n);if(!t)return null;let r=h(e,t);if(!r||e.isIgnored(r.relative_path))return null;let s=[],m=0,l=g(e,r.relative_path),p=i.semantic===!1?new Map:c(e,l);for(let o of l){let a=S(e,r,o,p.get(o.symbolId)??new Set);m+=a,s.push({symbol:o.symbol,shortName:u(o.symbol),startLine:o.startLine,endLine:o.endLine,externalConsumers:a,riskLevel:b(a)})}return{file:r.relative_path,symbols:s,totalExternalConsumers:m}}function h(e,n){return e.get(`SELECT id, relative_path FROM documents
1
+ import{a as f}from"./chunk-N3SE646F.js";import{c as d}from"./chunk-XVJ3V7LM.js";import{l as c}from"./chunk-Z5QQPJ3U.js";import{d as u}from"./chunk-ZTTISZ7J.js";function L(e,n,i={}){let t=f(e,n);if(!t)return null;let r=h(e,t);if(!r||e.isIgnored(r.relative_path))return null;let s=[],m=0,l=g(e,r.relative_path),p=i.semantic===!1?new Map:c(e,l);for(let o of l){let a=S(e,r,o,p.get(o.symbolId)??new Set);m+=a,s.push({symbol:o.symbol,shortName:u(o.symbol),startLine:o.startLine,endLine:o.endLine,externalConsumers:a,riskLevel:b(a)})}return{file:r.relative_path,symbols:s,totalExternalConsumers:m}}function h(e,n){return e.get(`SELECT id, relative_path FROM documents
2
2
  WHERE relative_path = ?
3
3
  ${e.pathExclusionsFor("documents")}
4
4
  LIMIT 1`,n)??null}function g(e,n){return new d(e).definitionsForFile(n).sort((i,t)=>i.startLine-t.startLine||i.endLine-t.endLine)}function S(e,n,i,t){let r=e.all(`SELECT DISTINCT consumer_d.relative_path
@@ -8,4 +8,4 @@ import{a as f}from"./chunk-54HA4ZXH.js";import{c as d}from"./chunk-NH5ALKPW.js";
8
8
  WHERE m.symbol_id = ?
9
9
  AND m.role != 1
10
10
  AND c.document_id != ?`,i.symbolId,n.id);return new Set([...r.map(s=>s.relative_path),...[...t].filter(s=>s!==n.relative_path)]).size}function b(e){return e>10?"high":e>0?"medium":"low"}export{L as a};
11
- //# sourceMappingURL=chunk-WER3B7MI.js.map
11
+ //# sourceMappingURL=chunk-XF3KLXN3.js.map
@@ -1,2 +1,2 @@
1
- import{b as C,f as X,g as Z}from"./chunk-Q3AFUTGB.js";import{a as F}from"./chunk-BGBBVSH4.js";import{d as le}from"./chunk-UOAV44HR.js";import{a as $,c as ne,d as te,e as ie,f as oe,g as re,i as N,j as ae,k as se,n as I}from"./chunk-LBMJEAEW.js";import{d as ee}from"./chunk-U7DSEKOM.js";import{a as H}from"./chunk-7B3UPBVA.js";import{a as O,e as z,g as w,h as E,j as W,k as Y,s as D,t as J,u as Q,v as U,w as A}from"./chunk-XYADIZHU.js";import{k as B,m as S}from"./chunk-X6D5IC6I.js";import{B as y,C as V,L as G}from"./chunk-YGAGTIDK.js";import{B as v,s as j,y as _}from"./chunk-L7SPDE73.js";import{a as M}from"./chunk-64MNV6AB.js";function ce(n,e,t={}){let i=new Map;if(e&&e.length===0)return i;let r=M(n,{includeIgnored:!1}),o=ie(n),a=e??J(n),c=new Set(a.map(m=>m.symbolId)),f=Me(a);return pe(n,i,r,o,c,f),ye(n,i,a,c),Re(n,i,r,o,c,f),t.semantic!==!1&&t.semanticEvidence&&De(i,t.semanticEvidence.callerMap(n,ve(a))),i}function pe(n,e,t,i,r,o){for(let a of t){if(!y(a))continue;let c=B(n,a);if(c)for(let f of c){if(o&&!o.has(f.calleeLeaf))continue;let m=ne(a,i.get(f.calleeLeaf)??[]);if(!m||m.length===0)continue;let s=te(n,a,m,f.memberAccess);s&&r.has(s.symbolId)&&s.file!==a&&T(e,s.symbolId,a)}}}function ye(n,e,t,i){let r=ge(t);for(let o of Se(n,i))n.isIgnored(o.relative_path)||he(o,r.get(o.symbol_id))||T(e,o.symbol_id,o.relative_path)}function Se(n,e){return ee(n,e?[...e]:void 0)}function ge(n){let e=new Map;for(let t of n)e.set(t.symbolId,{docId:t.documentId,startLine:t.startLine,endLine:t.endLine});return e}function he(n,e){return!!e&&e.docId===n.document_id&&n.chunk_start>=e.startLine&&n.chunk_end<=e.endLine}function Re(n,e,t,i,r,o){for(let a of t){if(y(a)!=="rust")continue;let c=S(n,a,{includeRustAttributeNames:!0});if(c.length!==0)for(let{name:f}of c){if(o&&!o.has(f))continue;let m=i.get(f);if(m)for(let s of m)r.has(s.symbolId)&&s.file!==a&&T(e,s.symbolId,a)}}}function T(n,e,t){let i=n.get(e);i||(i=new Set,n.set(e,i)),i.add(t)}function Me(n){let e=new Set;for(let t of n){let i="leaf"in t&&typeof t.leaf=="string"?t.leaf:"symbol"in t&&typeof t.symbol=="string"?z(t.symbol):"";i&&e.add(i)}return e.size>0?e:null}function ve(n){return n.filter(e=>"relativePath"in e&&"symbol"in e&&"leaf"in e)}function De(n,e){for(let[t,i]of e){let r=n.get(t);r||(r=new Set,n.set(t,r));for(let o of i)r.add(o)}}function q(n,e,t={}){return ce(n,e,t)}function K(n,e,t={}){return se(n,e,t)}function fe(n,e,t={}){let i=q(n,e,{semantic:t.semantic,semanticEvidence:t.semanticEvidence});return t.sourceFallback===!1?i:Ce(i,K(n,e))}function Ce(n,e){let t=new Map;for(let[i,r]of n)t.set(i,new Set(r));for(let[i,r]of e){let o=t.get(i)??new Set;for(let a of r)o.add(a);t.set(i,o)}return t}function ue(n,e,t){let i=e.identifierResolution==="strict"?N:ae,r=e.candidateNames?oe(e.candidateNames):null,o=0,a=0,c=0,f=0,m="";for(let s of e.paths)if(o+=1,m=s,!(!y(s)&&!(e.includeVueSfc&&V(s)))&&!n.isIgnored(s)&&!e.skipPath?.(s))try{if(r&&!re(_(n,s),r))continue;a+=1;let h=(u,b,x,g)=>{if(e.candidateNames&&!e.candidateNames.has(u))return;c+=1;let R=e.resolveTargets?e.resolveTargets({sourceFile:s,name:u,kind:b,defaultTargets:g}):g();for(let P of R)f+=1,t({sourceFile:s,name:u,target:P,occurrences:x,kind:b})},k=$(n,s);for(let[u,b]of k)h(u,"identifier",b.length,()=>i(n,s,u));for(let u of S(n,s,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let b=u.kind==="cross-language-dispatch"?()=>N(n,s,u.name):()=>i(n,s,u.name);h(u.name,u.kind,u.occurrences,b)}}finally{e.afterPath?.(s),o%10===0&&j("source-reference-scan.progress",()=>{},()=>({scannedPaths:o,currentPath:m,candidateMatchedPaths:a,visitedNames:c,visitedHits:f}))}}function de(n,e={}){let{scope:t,files:i,minLoc:r=1,maxLoc:o=Number.POSITIVE_INFINITY,excludeSymbol:a,excludeEntrySurfaces:c=!1,excludeTypesFiles:f=!1,excludeRootedSymbols:m=!1,requireFunctionLikeSymbol:s=!1,requireCallableSymbol:L=!1,excludeRustTraitImplMembers:h=!1,includeSuppressed:k=!1,sortByLocDesc:u=!1}=e,b=[],x=Ie(n,{scope:t,files:i,requireFunctionLikeSymbol:s,requireCallableSymbol:L}),g=new Map,R=new Map,P=l=>{let d=g.get(l);if(d!==void 0)return d;let p=X(n,l);return g.set(l,p),p},be=l=>{let d=R.get(l);if(d!==void 0)return d;let p=C(l);return R.set(l,p),p};for(let l of x){let d=l.relativePath;if(n.isIgnored(d)||c&&P(d)||!Fe(l,{requireFunctionLikeSymbol:s,requireCallableSymbol:L})||a!==void 0&&l.symbol===a)continue;let p=F(l);p<r||p>o||f&&Le(d)||m&&Z(n,l.symbol,d)||h&&W(l.symbol)||be(d)!=="test"&&(Y(l.symbol)||!k&&v(n,d,l.startLine)||b.push(l))}return u?b.sort((l,d)=>F(d)-F(l)):b}function Ie(n,e){return e.files!==void 0?[...new Set(e.files.map(i=>i.replace(/\\/g,"/")))].sort().filter(i=>!e.scope||i.includes(e.scope)).flatMap(i=>D(n,i)):e.requireCallableSymbol?A(n,{scope:e.scope,symbolMatches:w,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?A(n,{scope:e.scope,symbolMatches:E,sqlPrefilter:"function-like"}):U(n,e.scope)}function Fe(n,e){return e.requireCallableSymbol?w(n.symbol):e.requireFunctionLikeSymbol?E(n.symbol):n.isFunctionLike}function Le(n){return(n.split("/").pop()??"").includes("types")}var me=class{constructor(e){this.db=e}db;scopedDefinitions(e){return Q(this.db,e)}definitionsForFile(e){return D(this.db,e)}productionCallableDefinitions(e={}){return de(this.db,e)}calleeMap(e,t={}){return le(this.db,e,{...t,semanticEvidence:I})}crossFileCallerMap(e,t={}){return q(this.db,e,{...t,semanticEvidence:I})}sourceFallbackCallerFiles(e,t={}){return K(this.db,e,t)}callerFileMap(e,t={}){return fe(this.db,e,{...t,semanticEvidence:I})}frameworkReferencedSymbolIds(e){let t=new Map;for(let r of e){if(!r.leaf)continue;let o=t.get(r.leaf)??[];o.push(r.symbolId),t.set(r.leaf,o)}let i=new Set;for(let r of M(this.db,{includeIgnored:!1}))if(y(r)==="rust")for(let{name:o}of S(this.db,r,{includeRustAttributeNames:!0}))for(let a of t.get(o)??[])i.add(a);return i}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let i=new Map(e.map(o=>[o.symbolId,o.symbol])),r=this.calleeMap(e,t);return new Set([...r.entries()].filter(([o,a])=>{let c=i.get(o);return a.some(f=>f.symbol!==c)}).map(([o])=>o))}fileDependencyGraph(e){return H(this.db,e)}fileKind(e){return C(e)}hasSuppressionComment(e){return v(this.db,e.relativePath,e.startLine)}sourceFiles(){return G(this.db)}scanSourceReferences(e,t){ue(this.db,e,t)}callableSignature(e){let t=O(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(i=>i.startLine===e.startLine&&i.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};export{K as a,Ce as b,me as c};
2
- //# sourceMappingURL=chunk-NH5ALKPW.js.map
1
+ import{b as C,f as X,g as Z}from"./chunk-WMXRRBII.js";import{a as F}from"./chunk-BGBBVSH4.js";import{d as le}from"./chunk-E2ZXPB7J.js";import{a as $,c as ne,d as te,e as ie,f as oe,g as re,i as N,j as ae,k as se,n as I}from"./chunk-JERWGHQT.js";import{d as ee}from"./chunk-Z5QQPJ3U.js";import{a as H}from"./chunk-YLVE3SXZ.js";import{a as O,e as z,g as w,h as E,j as W,k as Y,s as D,t as J,u as Q,v as U,w as A}from"./chunk-ZTTISZ7J.js";import{k as B,m as S}from"./chunk-7LABSJSR.js";import{B as y,C as V,L as G}from"./chunk-DGMCFMPG.js";import{B as j,H as _,K as v}from"./chunk-B5MHCHP3.js";import{a as M}from"./chunk-64MNV6AB.js";function ce(n,e,t={}){let i=new Map;if(e&&e.length===0)return i;let r=M(n,{includeIgnored:!1}),o=ie(n),a=e??J(n),c=new Set(a.map(m=>m.symbolId)),f=Me(a);return pe(n,i,r,o,c,f),ye(n,i,a,c),Re(n,i,r,o,c,f),t.semantic!==!1&&t.semanticEvidence&&De(i,t.semanticEvidence.callerMap(n,ve(a))),i}function pe(n,e,t,i,r,o){for(let a of t){if(!y(a))continue;let c=B(n,a);if(c)for(let f of c){if(o&&!o.has(f.calleeLeaf))continue;let m=ne(a,i.get(f.calleeLeaf)??[]);if(!m||m.length===0)continue;let s=te(n,a,m,f.memberAccess);s&&r.has(s.symbolId)&&s.file!==a&&T(e,s.symbolId,a)}}}function ye(n,e,t,i){let r=ge(t);for(let o of Se(n,i))n.isIgnored(o.relative_path)||he(o,r.get(o.symbol_id))||T(e,o.symbol_id,o.relative_path)}function Se(n,e){return ee(n,e?[...e]:void 0)}function ge(n){let e=new Map;for(let t of n)e.set(t.symbolId,{docId:t.documentId,startLine:t.startLine,endLine:t.endLine});return e}function he(n,e){return!!e&&e.docId===n.document_id&&n.chunk_start>=e.startLine&&n.chunk_end<=e.endLine}function Re(n,e,t,i,r,o){for(let a of t){if(y(a)!=="rust")continue;let c=S(n,a,{includeRustAttributeNames:!0});if(c.length!==0)for(let{name:f}of c){if(o&&!o.has(f))continue;let m=i.get(f);if(m)for(let s of m)r.has(s.symbolId)&&s.file!==a&&T(e,s.symbolId,a)}}}function T(n,e,t){let i=n.get(e);i||(i=new Set,n.set(e,i)),i.add(t)}function Me(n){let e=new Set;for(let t of n){let i="leaf"in t&&typeof t.leaf=="string"?t.leaf:"symbol"in t&&typeof t.symbol=="string"?z(t.symbol):"";i&&e.add(i)}return e.size>0?e:null}function ve(n){return n.filter(e=>"relativePath"in e&&"symbol"in e&&"leaf"in e)}function De(n,e){for(let[t,i]of e){let r=n.get(t);r||(r=new Set,n.set(t,r));for(let o of i)r.add(o)}}function q(n,e,t={}){return ce(n,e,t)}function K(n,e,t={}){return se(n,e,t)}function fe(n,e,t={}){let i=q(n,e,{semantic:t.semantic,semanticEvidence:t.semanticEvidence});return t.sourceFallback===!1?i:Ce(i,K(n,e))}function Ce(n,e){let t=new Map;for(let[i,r]of n)t.set(i,new Set(r));for(let[i,r]of e){let o=t.get(i)??new Set;for(let a of r)o.add(a);t.set(i,o)}return t}function ue(n,e,t){let i=e.identifierResolution==="strict"?N:ae,r=e.candidateNames?oe(e.candidateNames):null,o=0,a=0,c=0,f=0,m="";for(let s of e.paths)if(o+=1,m=s,!(!y(s)&&!(e.includeVueSfc&&V(s)))&&!n.isIgnored(s)&&!e.skipPath?.(s))try{if(r&&!re(_(n,s),r))continue;a+=1;let h=(u,b,x,g)=>{if(e.candidateNames&&!e.candidateNames.has(u))return;c+=1;let R=e.resolveTargets?e.resolveTargets({sourceFile:s,name:u,kind:b,defaultTargets:g}):g();for(let P of R)f+=1,t({sourceFile:s,name:u,target:P,occurrences:x,kind:b})},k=$(n,s);for(let[u,b]of k)h(u,"identifier",b.length,()=>i(n,s,u));for(let u of S(n,s,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let b=u.kind==="cross-language-dispatch"?()=>N(n,s,u.name):()=>i(n,s,u.name);h(u.name,u.kind,u.occurrences,b)}}finally{e.afterPath?.(s),o%10===0&&j("source-reference-scan.progress",()=>{},()=>({scannedPaths:o,currentPath:m,candidateMatchedPaths:a,visitedNames:c,visitedHits:f}))}}function de(n,e={}){let{scope:t,files:i,minLoc:r=1,maxLoc:o=Number.POSITIVE_INFINITY,excludeSymbol:a,excludeEntrySurfaces:c=!1,excludeTypesFiles:f=!1,excludeRootedSymbols:m=!1,requireFunctionLikeSymbol:s=!1,requireCallableSymbol:L=!1,excludeRustTraitImplMembers:h=!1,includeSuppressed:k=!1,sortByLocDesc:u=!1}=e,b=[],x=Ie(n,{scope:t,files:i,requireFunctionLikeSymbol:s,requireCallableSymbol:L}),g=new Map,R=new Map,P=l=>{let d=g.get(l);if(d!==void 0)return d;let p=X(n,l);return g.set(l,p),p},be=l=>{let d=R.get(l);if(d!==void 0)return d;let p=C(l);return R.set(l,p),p};for(let l of x){let d=l.relativePath;if(n.isIgnored(d)||c&&P(d)||!Fe(l,{requireFunctionLikeSymbol:s,requireCallableSymbol:L})||a!==void 0&&l.symbol===a)continue;let p=F(l);p<r||p>o||f&&Le(d)||m&&Z(n,l.symbol,d)||h&&W(l.symbol)||be(d)!=="test"&&(Y(l.symbol)||!k&&v(n,d,l.startLine)||b.push(l))}return u?b.sort((l,d)=>F(d)-F(l)):b}function Ie(n,e){return e.files!==void 0?[...new Set(e.files.map(i=>i.replace(/\\/g,"/")))].sort().filter(i=>!e.scope||i.includes(e.scope)).flatMap(i=>D(n,i)):e.requireCallableSymbol?A(n,{scope:e.scope,symbolMatches:w,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?A(n,{scope:e.scope,symbolMatches:E,sqlPrefilter:"function-like"}):U(n,e.scope)}function Fe(n,e){return e.requireCallableSymbol?w(n.symbol):e.requireFunctionLikeSymbol?E(n.symbol):n.isFunctionLike}function Le(n){return(n.split("/").pop()??"").includes("types")}var me=class{constructor(e){this.db=e}db;scopedDefinitions(e){return Q(this.db,e)}definitionsForFile(e){return D(this.db,e)}productionCallableDefinitions(e={}){return de(this.db,e)}calleeMap(e,t={}){return le(this.db,e,{...t,semanticEvidence:I})}crossFileCallerMap(e,t={}){return q(this.db,e,{...t,semanticEvidence:I})}sourceFallbackCallerFiles(e,t={}){return K(this.db,e,t)}callerFileMap(e,t={}){return fe(this.db,e,{...t,semanticEvidence:I})}frameworkReferencedSymbolIds(e){let t=new Map;for(let r of e){if(!r.leaf)continue;let o=t.get(r.leaf)??[];o.push(r.symbolId),t.set(r.leaf,o)}let i=new Set;for(let r of M(this.db,{includeIgnored:!1}))if(y(r)==="rust")for(let{name:o}of S(this.db,r,{includeRustAttributeNames:!0}))for(let a of t.get(o)??[])i.add(a);return i}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let i=new Map(e.map(o=>[o.symbolId,o.symbol])),r=this.calleeMap(e,t);return new Set([...r.entries()].filter(([o,a])=>{let c=i.get(o);return a.some(f=>f.symbol!==c)}).map(([o])=>o))}fileDependencyGraph(e){return H(this.db,e)}fileKind(e){return C(e)}hasSuppressionComment(e){return v(this.db,e.relativePath,e.startLine)}sourceFiles(){return G(this.db)}scanSourceReferences(e,t){ue(this.db,e,t)}callableSignature(e){let t=O(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(i=>i.startLine===e.startLine&&i.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};export{K as a,Ce as b,me as c};
2
+ //# sourceMappingURL=chunk-XVJ3V7LM.js.map
@@ -1,3 +1,3 @@
1
- import{a as d}from"./chunk-FECYOO5O.js";import{b as g,d as m}from"./chunk-XYADIZHU.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-2OXVAGGT.js";import{b as g,d as m}from"./chunk-ZTTISZ7J.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-4XTA5OMB.js.map
3
+ //# sourceMappingURL=chunk-YGQN3XGZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as C,b as B}from"./chunk-U6WNH5GC.js";import{a as R,c as P,e as a,f}from"./chunk-B3X6KU75.js";import{a as v,b as h,c as k}from"./chunk-KMVGRIO2.js";import{N as g}from"./chunk-YGAGTIDK.js";function D(e,o={}){let{minSimilarity:r=.62,minTokens:n=8,limit:l=20,scope:m,scanLimit:d,filePattern:p,focusFiles:u}=o,c=g(e).reactProfiles({scope:m,minJsxTokens:n,scanLimit:d}).filter(t=>t.kind==="component").map(t=>({file:t.file,component:t.name,tokens:t.jsxTokens,profile:t})),s=C(c,t=>t.tokens);return B({profiles:c,limit:l,filePattern:p,focusFiles:u,candidateIndex:s,profile:{name:"react-component-duplicates"},compare:(t,i)=>y(t,i,r),sort:(t,i)=>i.similarity-t.similarity||t.fileA.localeCompare(i.fileA)||t.componentA.localeCompare(i.componentA)||t.fileB.localeCompare(i.fileB)||t.componentB.localeCompare(i.componentB)})}function y(e,o,r){let n=v(e.tokens,o.tokens);if(n.size<6||!T(n))return null;let l=k(e.tokens,o.tokens);if(l<r)return null;let m=a(n,"component:"),d=a(n,"native:"),p=a(n,"prop:"),u=a(n,"event:"),c=a(n,"binding:"),s=b({sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c});return{fileA:e.file,componentA:e.component,fileB:o.file,componentB:o.component,similarity:l,tokenCountA:e.tokens.size,tokenCountB:o.tokens.size,sharedTokens:f(n),sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c,evidenceClass:s.evidenceClass,actionTier:s.actionTier,evidenceClassReasons:s.reasons,recommendation:s.recommendation,uniqueToA:f(h(e.tokens,o.tokens)).slice(0,25),uniqueToB:f(h(o.tokens,e.tokens)).slice(0,25),locA:e.profile.loc,locB:o.profile.loc}}function T(e){let o=0,r=0;for(let n of e)n.startsWith("component:")&&(o+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("native:")||n.startsWith("jsx:"))&&(r+=1);return P([{name:"component",count:o},{name:"shape",count:r}],[{min:{component:1},reason:"shared custom component"},{min:{shape:4},reason:"shared JSX structure"}]).pass}function b(e){return R({genericWords:w,primitiveGroups:[{values:e.sharedNativeTags,reasonPrefix:"shared native tags",bucket:"generic"},{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"}],recommendation:A})}function A(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific UI primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var w=new Set(["actions","app","button","card","children","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{D as a};
2
- //# sourceMappingURL=chunk-CFMXJPHH.js.map
1
+ import{a as C,b as B}from"./chunk-MGBJHRFB.js";import{a as R,c as P,e as a,f}from"./chunk-B3X6KU75.js";import{a as v,b as h,c as k}from"./chunk-KMVGRIO2.js";import{N as g}from"./chunk-DGMCFMPG.js";function D(e,o={}){let{minSimilarity:r=.62,minTokens:n=8,limit:l=20,scope:m,scanLimit:d,filePattern:p,focusFiles:u}=o,c=g(e).reactProfiles({scope:m,minJsxTokens:n,scanLimit:d}).filter(t=>t.kind==="component").map(t=>({file:t.file,component:t.name,tokens:t.jsxTokens,profile:t})),s=C(c,t=>t.tokens);return B({profiles:c,limit:l,filePattern:p,focusFiles:u,candidateIndex:s,profile:{name:"react-component-duplicates"},compare:(t,i)=>y(t,i,r),sort:(t,i)=>i.similarity-t.similarity||t.fileA.localeCompare(i.fileA)||t.componentA.localeCompare(i.componentA)||t.fileB.localeCompare(i.fileB)||t.componentB.localeCompare(i.componentB)})}function y(e,o,r){let n=v(e.tokens,o.tokens);if(n.size<6||!T(n))return null;let l=k(e.tokens,o.tokens);if(l<r)return null;let m=a(n,"component:"),d=a(n,"native:"),p=a(n,"prop:"),u=a(n,"event:"),c=a(n,"binding:"),s=b({sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c});return{fileA:e.file,componentA:e.component,fileB:o.file,componentB:o.component,similarity:l,tokenCountA:e.tokens.size,tokenCountB:o.tokens.size,sharedTokens:f(n),sharedComponents:m,sharedNativeTags:d,sharedProps:p,sharedEvents:u,sharedBindings:c,evidenceClass:s.evidenceClass,actionTier:s.actionTier,evidenceClassReasons:s.reasons,recommendation:s.recommendation,uniqueToA:f(h(e.tokens,o.tokens)).slice(0,25),uniqueToB:f(h(o.tokens,e.tokens)).slice(0,25),locA:e.profile.loc,locB:o.profile.loc}}function T(e){let o=0,r=0;for(let n of e)n.startsWith("component:")&&(o+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("native:")||n.startsWith("jsx:"))&&(r+=1);return P([{name:"component",count:o},{name:"shape",count:r}],[{min:{component:1},reason:"shared custom component"},{min:{shape:4},reason:"shared JSX structure"}]).pass}function b(e){return R({genericWords:w,primitiveGroups:[{values:e.sharedNativeTags,reasonPrefix:"shared native tags",bucket:"generic"},{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"}],recommendation:A})}function A(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific UI primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var w=new Set(["actions","app","button","card","children","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{D as a};
2
+ //# sourceMappingURL=chunk-YHXBD52M.js.map
@@ -1,4 +1,4 @@
1
- import{o as O,p as A}from"./chunk-X6D5IC6I.js";import{c as F,g as S,i as _,s as y,w as C,x as N}from"./chunk-L7SPDE73.js";import{a as P}from"./chunk-64MNV6AB.js";var G=C({kind:"file-dependency-graph",invalidation:N("file-dependency-graph"),serialize:e=>JSON.stringify(e),deserialize:k}),I=F("file-dep-graph",{clearGroups:["whole-project"]});function W(e,n,t={}){let s=t.scipEdges??"all-references",i=t.sourceEdges??"imports-only",o=v(n,s,i);return I.get(e,o,()=>{let d=new Set(P(e,{includeIgnored:!1})),c=_(e),p=0,l=0,m=null,E=!1,a=0,h=0;return y("file-dep-graph.product",()=>{if(c){let r=G.read(e,o,c);if(r){E=!0;let f=R(r);return p=r.sourceFileCount,l=r.sourceEdgeCount,a=r.scipEdgeCount,h=f.size,m=r.sourceDependencyFingerprint,f}}let g=y("file-dep-graph.source-imports",()=>{let r=M(e,d,n,i);return p=r.files.length,l=r.edges.length,m=r.fingerprint,r},()=>({scope:n??null,sourceEdges:i,files:p,edges:l})),u=new Map,D=(r,f)=>j(e,u,d,r,f);y("file-dep-graph.scip-edges",()=>{for(let r of $(e,n,s))a+=1,D(r.from_file,r.to_file)},()=>({scope:n??null,edges:a}));for(let r of g.edges)D(r.fromFile,r.toFile);return h=u.size,c&&G.write(e,o,c,{sourceDependencyFingerprint:g.fingerprint,sourceFileCount:g.files.length,sourceEdgeCount:g.edges.length,scipEdgeCount:a,graph:w(u)}),u},()=>({scope:n??null,available:c!==null,hit:E,files:p,sourceEdges:l,sourceEdgeMode:i,scipEdges:a,graphFiles:h,sourceDependencyFingerprint:m}))})}function M(e,n,t,s){let i=[],o=[];for(let d of n)if(!(t&&!d.includes(t))){i.push(d);for(let c of A(e,d))c.sourcePath&&o.push({fromFile:d,toFile:c.sourcePath});if(s==="imports-and-reexports")for(let c of O(e,d))c.sourcePath&&o.push({fromFile:d,toFile:c.sourcePath})}return{files:i,edges:o,fingerprint:b(i,o)}}function b(e,n){let t=n.map(s=>`${s.fromFile}\0${s.toFile}`).sort();return S(JSON.stringify({files:e,edges:t}))}function v(e,n,t){return`edge-mode-v3:${n}:${t}:${e??"<all>"}`}function w(e){return[...e].map(([n,t])=>[n,[...t]])}function R(e){return new Map(e.graph.map(([n,t])=>[n,new Set(t)]))}function k(e){let n=JSON.parse(e);return x(n)?n:null}function x(e){if(!e||typeof e!="object")return!1;let n=e;return typeof n.sourceDependencyFingerprint=="string"&&typeof n.sourceFileCount=="number"&&typeof n.sourceEdgeCount=="number"&&typeof n.scipEdgeCount=="number"&&Array.isArray(n.graph)&&n.graph.every(J)}function J(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&Array.isArray(e[1])&&e[1].every(n=>typeof n=="string")}function $(e,n,t){let s=n?"AND d1.relative_path LIKE ?":"",i=n?[`%${n}%`]:[],o=t==="imports-only"?"AND m.role = 2":"AND m.role != 1";return e.all(`SELECT DISTINCT
1
+ import{o as O,p as A}from"./chunk-7LABSJSR.js";import{B as y,F as C,G as N,l as F,p as S,r as _}from"./chunk-B5MHCHP3.js";import{a as P}from"./chunk-64MNV6AB.js";var G=C({kind:"file-dependency-graph",invalidation:N("file-dependency-graph"),serialize:e=>JSON.stringify(e),deserialize:k}),I=F("file-dep-graph",{clearGroups:["whole-project"]});function W(e,n,t={}){let s=t.scipEdges??"all-references",i=t.sourceEdges??"imports-only",o=v(n,s,i);return I.get(e,o,()=>{let d=new Set(P(e,{includeIgnored:!1})),c=_(e),p=0,l=0,m=null,E=!1,a=0,h=0;return y("file-dep-graph.product",()=>{if(c){let r=G.read(e,o,c);if(r){E=!0;let f=R(r);return p=r.sourceFileCount,l=r.sourceEdgeCount,a=r.scipEdgeCount,h=f.size,m=r.sourceDependencyFingerprint,f}}let g=y("file-dep-graph.source-imports",()=>{let r=M(e,d,n,i);return p=r.files.length,l=r.edges.length,m=r.fingerprint,r},()=>({scope:n??null,sourceEdges:i,files:p,edges:l})),u=new Map,D=(r,f)=>j(e,u,d,r,f);y("file-dep-graph.scip-edges",()=>{for(let r of $(e,n,s))a+=1,D(r.from_file,r.to_file)},()=>({scope:n??null,edges:a}));for(let r of g.edges)D(r.fromFile,r.toFile);return h=u.size,c&&G.write(e,o,c,{sourceDependencyFingerprint:g.fingerprint,sourceFileCount:g.files.length,sourceEdgeCount:g.edges.length,scipEdgeCount:a,graph:w(u)}),u},()=>({scope:n??null,available:c!==null,hit:E,files:p,sourceEdges:l,sourceEdgeMode:i,scipEdges:a,graphFiles:h,sourceDependencyFingerprint:m}))})}function M(e,n,t,s){let i=[],o=[];for(let d of n)if(!(t&&!d.includes(t))){i.push(d);for(let c of A(e,d))c.sourcePath&&o.push({fromFile:d,toFile:c.sourcePath});if(s==="imports-and-reexports")for(let c of O(e,d))c.sourcePath&&o.push({fromFile:d,toFile:c.sourcePath})}return{files:i,edges:o,fingerprint:b(i,o)}}function b(e,n){let t=n.map(s=>`${s.fromFile}\0${s.toFile}`).sort();return S(JSON.stringify({files:e,edges:t}))}function v(e,n,t){return`edge-mode-v3:${n}:${t}:${e??"<all>"}`}function w(e){return[...e].map(([n,t])=>[n,[...t]])}function R(e){return new Map(e.graph.map(([n,t])=>[n,new Set(t)]))}function k(e){let n=JSON.parse(e);return x(n)?n:null}function x(e){if(!e||typeof e!="object")return!1;let n=e;return typeof n.sourceDependencyFingerprint=="string"&&typeof n.sourceFileCount=="number"&&typeof n.sourceEdgeCount=="number"&&typeof n.scipEdgeCount=="number"&&Array.isArray(n.graph)&&n.graph.every(J)}function J(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&Array.isArray(e[1])&&e[1].every(n=>typeof n=="string")}function $(e,n,t){let s=n?"AND d1.relative_path LIKE ?":"",i=n?[`%${n}%`]:[],o=t==="imports-only"?"AND m.role = 2":"AND m.role != 1";return e.all(`SELECT DISTINCT
2
2
  d1.relative_path AS from_file,
3
3
  d2.relative_path AS to_file
4
4
  FROM mentions m
@@ -17,4 +17,4 @@ import{o as O,p as A}from"./chunk-X6D5IC6I.js";import{c as F,g as S,i as _,s as
17
17
  ${o}
18
18
  ${e.pathExclusionsFor("d1","d2")}
19
19
  ${s}`,...i)}function j(e,n,t,s,i){if(s===i||e.isIgnored(s)||e.isIgnored(i)||!t.has(i))return;let o=n.get(s);o||(o=new Set,n.set(s,o)),o.add(i)}export{W as a};
20
- //# sourceMappingURL=chunk-7B3UPBVA.js.map
20
+ //# sourceMappingURL=chunk-YLVE3SXZ.js.map
@@ -1,4 +1,4 @@
1
- import{c as D}from"./chunk-UOAV44HR.js";import{n as R}from"./chunk-LBMJEAEW.js";import{a as M,c as N}from"./chunk-FECYOO5O.js";import{d as b,f as g,s as S,z as I}from"./chunk-XYADIZHU.js";import{B as p}from"./chunk-YGAGTIDK.js";function C(o,n,l={}){let{maxDepth:u=5,scope:m}=l,i=M(o,n);if(!i)return[];let c=[],d=new Set([i.symbolId]),a=new Set,r=[i];for(let e=1;e<=u&&r.length!==0;e++){let t=[],f=D(o,r,{limit:500,semanticEvidence:R});for(let y of r)for(let s of w(o,y,m,f.get(y.symbolId)??[])){let h=`${s.file}|${s.shortName}`;if(s.symbolId!==null){if(d.has(s.symbolId))continue;d.add(s.symbolId)}else if(a.has(h))continue;a.add(h),c.push({symbol:s.symbol,shortName:s.shortName,file:s.file,depth:e}),s.symbolId!==null&&s.symbolMatch&&t.push(s.symbolMatch)}r=t}return c.sort((e,t)=>e.depth-t.depth||e.file.localeCompare(t.file)),c}function w(o,n,l,u){let m=u.filter(e=>!o.isIgnored(e.file)).filter(e=>!l||e.file.includes(l)),i=new Set(m.map(e=>e.file)),c=[];for(let e of A(o,n,l)){if(i.has(e))continue;let t=S(o,e),f=t.length>0?I(t,t[0].startLine):null;c.push({symbol:f?.symbol??e,file:e})}let d=[...m,...c],a=[],r=new Set;for(let e of d){let t=N(o,e.symbol);if(!t){let y=`${e.file}|${e.symbol}`;if(r.has(y))continue;r.add(y),a.push({symbolId:null,symbol:e.symbol,shortName:b(e.symbol),file:e.file,symbolMatch:null});continue}if(t.symbolId===n.symbolId||o.isIgnored(t.relativePath)||!_(t))continue;let f=`${t.symbolId}|${t.relativePath}`;r.has(f)||(r.add(f),a.push({symbolId:t.symbolId,symbol:t.symbol,shortName:b(t.symbol),file:t.relativePath,symbolMatch:t}))}return a}function A(o,n,l){let u=l?"AND consumer_d.relative_path LIKE ?":"",m=[n.symbolId,n.documentId];return l&&m.push(`%${l}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
1
+ import{c as D}from"./chunk-E2ZXPB7J.js";import{n as R}from"./chunk-JERWGHQT.js";import{a as M,c as N}from"./chunk-2OXVAGGT.js";import{d as b,f as g,s as S,z as I}from"./chunk-ZTTISZ7J.js";import{B as p}from"./chunk-DGMCFMPG.js";function C(o,n,l={}){let{maxDepth:u=5,scope:m}=l,i=M(o,n);if(!i)return[];let c=[],d=new Set([i.symbolId]),a=new Set,r=[i];for(let e=1;e<=u&&r.length!==0;e++){let t=[],f=D(o,r,{limit:500,semanticEvidence:R});for(let y of r)for(let s of w(o,y,m,f.get(y.symbolId)??[])){let h=`${s.file}|${s.shortName}`;if(s.symbolId!==null){if(d.has(s.symbolId))continue;d.add(s.symbolId)}else if(a.has(h))continue;a.add(h),c.push({symbol:s.symbol,shortName:s.shortName,file:s.file,depth:e}),s.symbolId!==null&&s.symbolMatch&&t.push(s.symbolMatch)}r=t}return c.sort((e,t)=>e.depth-t.depth||e.file.localeCompare(t.file)),c}function w(o,n,l,u){let m=u.filter(e=>!o.isIgnored(e.file)).filter(e=>!l||e.file.includes(l)),i=new Set(m.map(e=>e.file)),c=[];for(let e of A(o,n,l)){if(i.has(e))continue;let t=S(o,e),f=t.length>0?I(t,t[0].startLine):null;c.push({symbol:f?.symbol??e,file:e})}let d=[...m,...c],a=[],r=new Set;for(let e of d){let t=N(o,e.symbol);if(!t){let y=`${e.file}|${e.symbol}`;if(r.has(y))continue;r.add(y),a.push({symbolId:null,symbol:e.symbol,shortName:b(e.symbol),file:e.file,symbolMatch:null});continue}if(t.symbolId===n.symbolId||o.isIgnored(t.relativePath)||!_(t))continue;let f=`${t.symbolId}|${t.relativePath}`;r.has(f)||(r.add(f),a.push({symbolId:t.symbolId,symbol:t.symbol,shortName:b(t.symbol),file:t.relativePath,symbolMatch:t}))}return a}function A(o,n,l){let u=l?"AND consumer_d.relative_path LIKE ?":"",m=[n.symbolId,n.documentId];return l&&m.push(`%${l}%`),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{c as D}from"./chunk-UOAV44HR.js";import{n as R}from"./chunk-LBMJEAEW.js";
7
7
  AND c.document_id != ?
8
8
  ${o.pathExclusionsFor("consumer_d")}
9
9
  ${u}`,...m).map(i=>i.relative_path).filter(i=>!o.isIgnored(i)))}function _(o){if(o.symbol.startsWith("scip-clojure ")||p(o.relativePath)==="clojure")return!0;let n=g(o.symbol);return n==="method"||n==="type"||o.symbol.endsWith("().")}export{C as a};
10
- //# sourceMappingURL=chunk-YIJ7ZAA4.js.map
10
+ //# sourceMappingURL=chunk-YTUD45PU.js.map
@@ -1,4 +1,4 @@
1
- import{b as d}from"./chunk-UOAV44HR.js";import{n as f}from"./chunk-LBMJEAEW.js";import{d as r,t as m}from"./chunk-XYADIZHU.js";function g(t,o={}){let{limit:n=30,scope:e}=o,s=e?"AND def_d.relative_path LIKE ?":"",c=e?[`%${e}%`]:[],l=t.all(`SELECT
1
+ import{b as d}from"./chunk-E2ZXPB7J.js";import{n as f}from"./chunk-JERWGHQT.js";import{d as r,t as m}from"./chunk-ZTTISZ7J.js";function g(t,o={}){let{limit:n=30,scope:e}=o,s=e?"AND def_d.relative_path LIKE ?":"",c=e?[`%${e}%`]:[],l=t.all(`SELECT
2
2
  gs.symbol,
3
3
  COUNT(*) AS ref_count,
4
4
  COUNT(DISTINCT ref_d.id) AS file_count,
@@ -23,4 +23,4 @@ import{b as d}from"./chunk-UOAV44HR.js";import{n as f}from"./chunk-LBMJEAEW.js";
23
23
  GROUP BY gs.id
24
24
  ORDER BY ref_count DESC
25
25
  LIMIT ?`,...c,n).filter(i=>!t.isIgnored(i.defined_in)).map(i=>({symbol:i.symbol,shortName:r(i.symbol),refCount:i.ref_count,fileCount:i.file_count,definedIn:i.defined_in}));return l.length>0?l:u(t,e,n)}function u(t,o,n){return m(t,{scope:o}).filter(e=>!t.isIgnored(e.relativePath)).map(e=>a(t,e)).filter(e=>e.refCount>0).sort((e,s)=>s.refCount-e.refCount||s.fileCount-e.fileCount).slice(0,n)}function a(t,o){let e=d(t,o,{limit:500,semanticEvidence:f}).filter(s=>s.file!==o.relativePath);return{symbol:o.symbol,shortName:r(o.symbol),refCount:e.length,fileCount:new Set(e.map(s=>s.file)).size,definedIn:o.relativePath}}export{g as a};
26
- //# sourceMappingURL=chunk-VTKGCT3V.js.map
26
+ //# sourceMappingURL=chunk-YWB2EBNB.js.map
@@ -1,2 +1,2 @@
1
- import{c as d}from"./chunk-NH5ALKPW.js";import{b as g}from"./chunk-B75HZHUP.js";import{a as p,b as u}from"./chunk-UOAV44HR.js";import{n as b}from"./chunk-LBMJEAEW.js";import{d as f}from"./chunk-XYADIZHU.js";function F(i,t={}){let{limit:l=20,scope:a,minFanIn:s=2,minFanOut:m=2,scanLimit:o}=t,r=new d(i);return g(r.productionCallableDefinitions({scope:a,requireCallableSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof o=="number"&&o>0}),o).map(e=>h(i,e,t.semantic!==!1)).filter(e=>e.fanIn>=s&&e.fanOut>=m).sort((e,y)=>y.score-e.score||y.fanIn-e.fanIn).slice(0,l)}function h(i,t,l){let a=[...new Set(u(i,t,{limit:500,semantic:l,semanticEvidence:b}).map(n=>n.file))].sort(),s=new Map;for(let n of p(i,t,{limit:500,semantic:l,semanticEvidence:b})){if(n.file===t.relativePath)continue;let e=`${n.symbol}|${n.file}`;s.has(e)||s.set(e,{symbol:n.symbol,shortName:f(n.symbol),file:n.file})}let m=[...s.values()].sort((n,e)=>n.file.localeCompare(e.file)||n.symbol.localeCompare(e.symbol)),o=a.length,r=m.length,c=o*r;return{symbol:t.symbol,shortName:f(t.symbol),fanIn:o,fanOut:r,callerFiles:a,externalCallees:m,score:c,definedIn:t.relativePath,actionTier:"signal",riskKind:"coordination-hotspot",evidenceReasons:[`${o} incoming file(s) reference this symbol`,`${r} distinct cross-file callee symbol(s) are reached from it`,`centrality score is ${c} (fan-in * fan-out)`],recommendation:"Review ownership, API stability, and caller groups before changing this central symbol; do not refactor solely from graph centrality."}}export{F as a};
2
- //# sourceMappingURL=chunk-UKZBVX4U.js.map
1
+ import{c as d}from"./chunk-XVJ3V7LM.js";import{b as g}from"./chunk-B75HZHUP.js";import{a as p,b as u}from"./chunk-E2ZXPB7J.js";import{n as b}from"./chunk-JERWGHQT.js";import{d as f}from"./chunk-ZTTISZ7J.js";function F(i,t={}){let{limit:l=20,scope:a,minFanIn:s=2,minFanOut:m=2,scanLimit:o}=t,r=new d(i);return g(r.productionCallableDefinitions({scope:a,requireCallableSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof o=="number"&&o>0}),o).map(e=>h(i,e,t.semantic!==!1)).filter(e=>e.fanIn>=s&&e.fanOut>=m).sort((e,y)=>y.score-e.score||y.fanIn-e.fanIn).slice(0,l)}function h(i,t,l){let a=[...new Set(u(i,t,{limit:500,semantic:l,semanticEvidence:b}).map(n=>n.file))].sort(),s=new Map;for(let n of p(i,t,{limit:500,semantic:l,semanticEvidence:b})){if(n.file===t.relativePath)continue;let e=`${n.symbol}|${n.file}`;s.has(e)||s.set(e,{symbol:n.symbol,shortName:f(n.symbol),file:n.file})}let m=[...s.values()].sort((n,e)=>n.file.localeCompare(e.file)||n.symbol.localeCompare(e.symbol)),o=a.length,r=m.length,c=o*r;return{symbol:t.symbol,shortName:f(t.symbol),fanIn:o,fanOut:r,callerFiles:a,externalCallees:m,score:c,definedIn:t.relativePath,actionTier:"signal",riskKind:"coordination-hotspot",evidenceReasons:[`${o} incoming file(s) reference this symbol`,`${r} distinct cross-file callee symbol(s) are reached from it`,`centrality score is ${c} (fan-in * fan-out)`],recommendation:"Review ownership, API stability, and caller groups before changing this central symbol; do not refactor solely from graph centrality."}}export{F as a};
2
+ //# sourceMappingURL=chunk-Z2LHPIOM.js.map