@optave/codegraph 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1112) hide show
  1. package/README.md +47 -54
  2. package/dist/ast-analysis/engine.d.ts +17 -0
  3. package/dist/ast-analysis/engine.d.ts.map +1 -0
  4. package/dist/ast-analysis/engine.js +328 -0
  5. package/dist/ast-analysis/engine.js.map +1 -0
  6. package/dist/ast-analysis/metrics.d.ts +51 -0
  7. package/dist/ast-analysis/metrics.d.ts.map +1 -0
  8. package/dist/ast-analysis/metrics.js +106 -0
  9. package/dist/ast-analysis/metrics.js.map +1 -0
  10. package/dist/ast-analysis/rules/csharp.d.ts +24 -0
  11. package/dist/ast-analysis/rules/csharp.d.ts.map +1 -0
  12. package/dist/ast-analysis/rules/csharp.js +192 -0
  13. package/dist/ast-analysis/rules/csharp.js.map +1 -0
  14. package/dist/ast-analysis/rules/go.d.ts +24 -0
  15. package/dist/ast-analysis/rules/go.d.ts.map +1 -0
  16. package/dist/ast-analysis/rules/go.js +173 -0
  17. package/dist/ast-analysis/rules/go.js.map +1 -0
  18. package/dist/ast-analysis/rules/index.d.ts +31 -0
  19. package/dist/ast-analysis/rules/index.d.ts.map +1 -0
  20. package/dist/ast-analysis/rules/index.js +72 -0
  21. package/dist/ast-analysis/rules/index.js.map +1 -0
  22. package/dist/ast-analysis/rules/java.d.ts +24 -0
  23. package/dist/ast-analysis/rules/java.d.ts.map +1 -0
  24. package/dist/ast-analysis/rules/java.js +166 -0
  25. package/dist/ast-analysis/rules/java.js.map +1 -0
  26. package/dist/ast-analysis/rules/javascript.d.ts +31 -0
  27. package/dist/ast-analysis/rules/javascript.d.ts.map +1 -0
  28. package/dist/ast-analysis/rules/javascript.js +235 -0
  29. package/dist/ast-analysis/rules/javascript.js.map +1 -0
  30. package/dist/ast-analysis/rules/php.d.ts +24 -0
  31. package/dist/ast-analysis/rules/php.d.ts.map +1 -0
  32. package/dist/ast-analysis/rules/php.js +210 -0
  33. package/dist/ast-analysis/rules/php.js.map +1 -0
  34. package/dist/ast-analysis/rules/python.d.ts +24 -0
  35. package/dist/ast-analysis/rules/python.d.ts.map +1 -0
  36. package/dist/ast-analysis/rules/python.js +188 -0
  37. package/dist/ast-analysis/rules/python.js.map +1 -0
  38. package/dist/ast-analysis/rules/ruby.d.ts +24 -0
  39. package/dist/ast-analysis/rules/ruby.d.ts.map +1 -0
  40. package/dist/ast-analysis/rules/ruby.js +193 -0
  41. package/dist/ast-analysis/rules/ruby.js.map +1 -0
  42. package/dist/ast-analysis/rules/rust.d.ts +24 -0
  43. package/dist/ast-analysis/rules/rust.d.ts.map +1 -0
  44. package/dist/ast-analysis/rules/rust.js +165 -0
  45. package/dist/ast-analysis/rules/rust.js.map +1 -0
  46. package/dist/ast-analysis/shared.d.ts +106 -0
  47. package/dist/ast-analysis/shared.d.ts.map +1 -0
  48. package/dist/ast-analysis/shared.js +186 -0
  49. package/dist/ast-analysis/shared.js.map +1 -0
  50. package/dist/ast-analysis/visitor-utils.d.ts +41 -0
  51. package/dist/ast-analysis/visitor-utils.d.ts.map +1 -0
  52. package/dist/ast-analysis/visitor-utils.js +180 -0
  53. package/dist/ast-analysis/visitor-utils.js.map +1 -0
  54. package/dist/ast-analysis/visitor.d.ts +119 -0
  55. package/dist/ast-analysis/visitor.d.ts.map +1 -0
  56. package/dist/ast-analysis/visitor.js +146 -0
  57. package/dist/ast-analysis/visitor.js.map +1 -0
  58. package/dist/ast-analysis/visitors/ast-store-visitor.d.ts +11 -0
  59. package/dist/ast-analysis/visitors/ast-store-visitor.d.ts.map +1 -0
  60. package/dist/ast-analysis/visitors/ast-store-visitor.js +147 -0
  61. package/dist/ast-analysis/visitors/ast-store-visitor.js.map +1 -0
  62. package/dist/ast-analysis/visitors/cfg-visitor.d.ts +8 -0
  63. package/dist/ast-analysis/visitors/cfg-visitor.d.ts.map +1 -0
  64. package/dist/ast-analysis/visitors/cfg-visitor.js +660 -0
  65. package/dist/ast-analysis/visitors/cfg-visitor.js.map +1 -0
  66. package/dist/ast-analysis/visitors/complexity-visitor.d.ts +17 -0
  67. package/dist/ast-analysis/visitors/complexity-visitor.d.ts.map +1 -0
  68. package/dist/ast-analysis/visitors/complexity-visitor.js +216 -0
  69. package/dist/ast-analysis/visitors/complexity-visitor.js.map +1 -0
  70. package/dist/ast-analysis/visitors/dataflow-visitor.d.ts +8 -0
  71. package/dist/ast-analysis/visitors/dataflow-visitor.d.ts.map +1 -0
  72. package/dist/ast-analysis/visitors/dataflow-visitor.js +321 -0
  73. package/dist/ast-analysis/visitors/dataflow-visitor.js.map +1 -0
  74. package/dist/cli/commands/ast.d.ts +9 -0
  75. package/dist/cli/commands/ast.d.ts.map +1 -0
  76. package/dist/cli/commands/ast.js +23 -0
  77. package/dist/cli/commands/ast.js.map +1 -0
  78. package/dist/cli/commands/audit.d.ts +9 -0
  79. package/dist/cli/commands/audit.d.ts.map +1 -0
  80. package/dist/cli/commands/audit.js +46 -0
  81. package/dist/cli/commands/audit.js.map +1 -0
  82. package/dist/cli/commands/batch.d.ts +9 -0
  83. package/dist/cli/commands/batch.d.ts.map +1 -0
  84. package/dist/cli/commands/batch.js +70 -0
  85. package/dist/cli/commands/batch.js.map +1 -0
  86. package/dist/cli/commands/branch-compare.d.ts +7 -0
  87. package/dist/cli/commands/branch-compare.d.ts.map +1 -0
  88. package/dist/cli/commands/branch-compare.js +22 -0
  89. package/dist/cli/commands/branch-compare.js.map +1 -0
  90. package/dist/cli/commands/brief.d.ts +7 -0
  91. package/dist/cli/commands/brief.d.ts.map +1 -0
  92. package/dist/cli/commands/brief.js +12 -0
  93. package/dist/cli/commands/brief.js.map +1 -0
  94. package/dist/cli/commands/build.d.ts +7 -0
  95. package/dist/cli/commands/build.d.ts.map +1 -0
  96. package/dist/cli/commands/build.js +26 -0
  97. package/dist/cli/commands/build.js.map +1 -0
  98. package/dist/cli/commands/cfg.d.ts +10 -0
  99. package/dist/cli/commands/cfg.d.ts.map +1 -0
  100. package/dist/cli/commands/cfg.js +27 -0
  101. package/dist/cli/commands/cfg.js.map +1 -0
  102. package/dist/cli/commands/check.d.ts +8 -0
  103. package/dist/cli/commands/check.d.ts.map +1 -0
  104. package/dist/cli/commands/check.js +65 -0
  105. package/dist/cli/commands/check.js.map +1 -0
  106. package/dist/cli/commands/children.d.ts +9 -0
  107. package/dist/cli/commands/children.d.ts.map +1 -0
  108. package/dist/cli/commands/children.js +33 -0
  109. package/dist/cli/commands/children.js.map +1 -0
  110. package/dist/cli/commands/co-change.d.ts +7 -0
  111. package/dist/cli/commands/co-change.d.ts.map +1 -0
  112. package/dist/cli/commands/co-change.js +62 -0
  113. package/dist/cli/commands/co-change.js.map +1 -0
  114. package/dist/cli/commands/communities.d.ts +8 -0
  115. package/dist/cli/commands/communities.d.ts.map +1 -0
  116. package/dist/cli/commands/communities.js +20 -0
  117. package/dist/cli/commands/communities.js.map +1 -0
  118. package/dist/cli/commands/complexity.d.ts +9 -0
  119. package/dist/cli/commands/complexity.d.ts.map +1 -0
  120. package/dist/cli/commands/complexity.js +47 -0
  121. package/dist/cli/commands/complexity.js.map +1 -0
  122. package/dist/cli/commands/context.d.ts +10 -0
  123. package/dist/cli/commands/context.d.ts.map +1 -0
  124. package/dist/cli/commands/context.js +35 -0
  125. package/dist/cli/commands/context.js.map +1 -0
  126. package/dist/cli/commands/cycles.d.ts +7 -0
  127. package/dist/cli/commands/cycles.d.ts.map +1 -0
  128. package/dist/cli/commands/cycles.js +33 -0
  129. package/dist/cli/commands/cycles.js.map +1 -0
  130. package/dist/cli/commands/dataflow.d.ts +10 -0
  131. package/dist/cli/commands/dataflow.d.ts.map +1 -0
  132. package/dist/cli/commands/dataflow.js +29 -0
  133. package/dist/cli/commands/dataflow.js.map +1 -0
  134. package/dist/cli/commands/deps.d.ts +8 -0
  135. package/dist/cli/commands/deps.d.ts.map +1 -0
  136. package/dist/cli/commands/deps.js +18 -0
  137. package/dist/cli/commands/deps.js.map +1 -0
  138. package/dist/cli/commands/diff-impact.d.ts +7 -0
  139. package/dist/cli/commands/diff-impact.d.ts.map +1 -0
  140. package/dist/cli/commands/diff-impact.js +28 -0
  141. package/dist/cli/commands/diff-impact.js.map +1 -0
  142. package/dist/cli/commands/embed.d.ts +8 -0
  143. package/dist/cli/commands/embed.d.ts.map +1 -0
  144. package/dist/cli/commands/embed.js +29 -0
  145. package/dist/cli/commands/embed.js.map +1 -0
  146. package/dist/cli/commands/export.d.ts +7 -0
  147. package/dist/cli/commands/export.d.ts.map +1 -0
  148. package/dist/cli/commands/export.js +72 -0
  149. package/dist/cli/commands/export.js.map +1 -0
  150. package/dist/cli/commands/exports.d.ts +8 -0
  151. package/dist/cli/commands/exports.d.ts.map +1 -0
  152. package/dist/cli/commands/exports.js +14 -0
  153. package/dist/cli/commands/exports.js.map +1 -0
  154. package/dist/cli/commands/flow.d.ts +10 -0
  155. package/dist/cli/commands/flow.d.ts.map +1 -0
  156. package/dist/cli/commands/flow.js +32 -0
  157. package/dist/cli/commands/flow.js.map +1 -0
  158. package/dist/cli/commands/fn-impact.d.ts +10 -0
  159. package/dist/cli/commands/fn-impact.d.ts.map +1 -0
  160. package/dist/cli/commands/fn-impact.js +33 -0
  161. package/dist/cli/commands/fn-impact.js.map +1 -0
  162. package/dist/cli/commands/impact.d.ts +7 -0
  163. package/dist/cli/commands/impact.d.ts.map +1 -0
  164. package/dist/cli/commands/impact.js +12 -0
  165. package/dist/cli/commands/impact.js.map +1 -0
  166. package/dist/cli/commands/implementations.d.ts +10 -0
  167. package/dist/cli/commands/implementations.d.ts.map +1 -0
  168. package/dist/cli/commands/implementations.js +29 -0
  169. package/dist/cli/commands/implementations.js.map +1 -0
  170. package/dist/cli/commands/info.d.ts +6 -0
  171. package/dist/cli/commands/info.d.ts.map +1 -0
  172. package/dist/cli/commands/info.js +66 -0
  173. package/dist/cli/commands/info.js.map +1 -0
  174. package/dist/cli/commands/interfaces.d.ts +10 -0
  175. package/dist/cli/commands/interfaces.d.ts.map +1 -0
  176. package/dist/cli/commands/interfaces.js +29 -0
  177. package/dist/cli/commands/interfaces.js.map +1 -0
  178. package/dist/cli/commands/map.d.ts +7 -0
  179. package/dist/cli/commands/map.d.ts.map +1 -0
  180. package/dist/cli/commands/map.js +19 -0
  181. package/dist/cli/commands/map.js.map +1 -0
  182. package/dist/cli/commands/mcp.d.ts +7 -0
  183. package/dist/cli/commands/mcp.d.ts.map +1 -0
  184. package/dist/cli/commands/mcp.js +19 -0
  185. package/dist/cli/commands/mcp.js.map +1 -0
  186. package/dist/cli/commands/models.d.ts +6 -0
  187. package/dist/cli/commands/models.d.ts.map +1 -0
  188. package/dist/cli/commands/models.js +17 -0
  189. package/dist/cli/commands/models.js.map +1 -0
  190. package/dist/cli/commands/owners.d.ts +8 -0
  191. package/dist/cli/commands/owners.d.ts.map +1 -0
  192. package/dist/cli/commands/owners.js +27 -0
  193. package/dist/cli/commands/owners.js.map +1 -0
  194. package/dist/cli/commands/path.d.ts +8 -0
  195. package/dist/cli/commands/path.d.ts.map +1 -0
  196. package/dist/cli/commands/path.js +36 -0
  197. package/dist/cli/commands/path.js.map +1 -0
  198. package/dist/cli/commands/plot.d.ts +7 -0
  199. package/dist/cli/commands/plot.d.ts.map +1 -0
  200. package/dist/cli/commands/plot.js +94 -0
  201. package/dist/cli/commands/plot.js.map +1 -0
  202. package/dist/cli/commands/query.d.ts +10 -0
  203. package/dist/cli/commands/query.d.ts.map +1 -0
  204. package/dist/cli/commands/query.js +51 -0
  205. package/dist/cli/commands/query.js.map +1 -0
  206. package/dist/cli/commands/registry.d.ts +16 -0
  207. package/dist/cli/commands/registry.d.ts.map +1 -0
  208. package/dist/cli/commands/registry.js +95 -0
  209. package/dist/cli/commands/registry.js.map +1 -0
  210. package/dist/cli/commands/roles.d.ts +9 -0
  211. package/dist/cli/commands/roles.d.ts.map +1 -0
  212. package/dist/cli/commands/roles.js +31 -0
  213. package/dist/cli/commands/roles.js.map +1 -0
  214. package/dist/cli/commands/search.d.ts +9 -0
  215. package/dist/cli/commands/search.d.ts.map +1 -0
  216. package/dist/cli/commands/search.js +47 -0
  217. package/dist/cli/commands/search.js.map +1 -0
  218. package/dist/cli/commands/sequence.d.ts +10 -0
  219. package/dist/cli/commands/sequence.d.ts.map +1 -0
  220. package/dist/cli/commands/sequence.js +29 -0
  221. package/dist/cli/commands/sequence.js.map +1 -0
  222. package/dist/cli/commands/snapshot.d.ts +11 -0
  223. package/dist/cli/commands/snapshot.d.ts.map +1 -0
  224. package/dist/cli/commands/snapshot.js +61 -0
  225. package/dist/cli/commands/snapshot.js.map +1 -0
  226. package/dist/cli/commands/stats.d.ts +7 -0
  227. package/dist/cli/commands/stats.d.ts.map +1 -0
  228. package/dist/cli/commands/stats.js +15 -0
  229. package/dist/cli/commands/stats.js.map +1 -0
  230. package/dist/cli/commands/structure.d.ts +7 -0
  231. package/dist/cli/commands/structure.d.ts.map +1 -0
  232. package/dist/cli/commands/structure.js +33 -0
  233. package/dist/cli/commands/structure.js.map +1 -0
  234. package/dist/cli/commands/triage.d.ts +8 -0
  235. package/dist/cli/commands/triage.d.ts.map +1 -0
  236. package/dist/cli/commands/triage.js +89 -0
  237. package/dist/cli/commands/triage.js.map +1 -0
  238. package/dist/cli/commands/watch.d.ts +6 -0
  239. package/dist/cli/commands/watch.d.ts.map +1 -0
  240. package/dist/cli/commands/watch.js +12 -0
  241. package/dist/cli/commands/watch.js.map +1 -0
  242. package/dist/cli/commands/where.d.ts +9 -0
  243. package/dist/cli/commands/where.d.ts.map +1 -0
  244. package/dist/cli/commands/where.js +20 -0
  245. package/dist/cli/commands/where.js.map +1 -0
  246. package/dist/cli/index.d.ts +31 -0
  247. package/dist/cli/index.d.ts.map +1 -0
  248. package/dist/cli/index.js +109 -0
  249. package/dist/cli/index.js.map +1 -0
  250. package/dist/cli/shared/open-graph.d.ts +14 -0
  251. package/dist/cli/shared/open-graph.d.ts.map +1 -0
  252. package/dist/cli/shared/open-graph.js +13 -0
  253. package/dist/cli/shared/open-graph.js.map +1 -0
  254. package/dist/cli/shared/options.d.ts +31 -0
  255. package/dist/cli/shared/options.d.ts.map +1 -0
  256. package/dist/cli/shared/options.js +58 -0
  257. package/dist/cli/shared/options.js.map +1 -0
  258. package/dist/cli/shared/output.d.ts +2 -0
  259. package/dist/cli/shared/output.d.ts.map +1 -0
  260. package/dist/cli/shared/output.js +2 -0
  261. package/dist/cli/shared/output.js.map +1 -0
  262. package/dist/cli.d.ts +3 -0
  263. package/dist/cli.d.ts.map +1 -0
  264. package/dist/cli.js +15 -0
  265. package/dist/cli.js.map +1 -0
  266. package/dist/db/connection.d.ts +39 -0
  267. package/dist/db/connection.d.ts.map +1 -0
  268. package/dist/db/connection.js +217 -0
  269. package/dist/db/connection.js.map +1 -0
  270. package/dist/db/index.d.ts +5 -0
  271. package/dist/db/index.d.ts.map +1 -0
  272. package/dist/db/index.js +6 -0
  273. package/dist/db/index.js.map +1 -0
  274. package/dist/db/migrations.d.ts +8 -0
  275. package/dist/db/migrations.d.ts.map +1 -0
  276. package/dist/db/migrations.js +323 -0
  277. package/dist/db/migrations.js.map +1 -0
  278. package/dist/db/query-builder.d.ts +106 -0
  279. package/dist/db/query-builder.d.ts.map +1 -0
  280. package/dist/db/query-builder.js +313 -0
  281. package/dist/db/query-builder.js.map +1 -0
  282. package/dist/db/repository/base.d.ts +115 -0
  283. package/dist/db/repository/base.d.ts.map +1 -0
  284. package/dist/db/repository/base.js +165 -0
  285. package/dist/db/repository/base.js.map +1 -0
  286. package/dist/db/repository/build-stmts.d.ts +25 -0
  287. package/dist/db/repository/build-stmts.d.ts.map +1 -0
  288. package/dist/db/repository/build-stmts.js +86 -0
  289. package/dist/db/repository/build-stmts.js.map +1 -0
  290. package/dist/db/repository/cached-stmt.d.ts +13 -0
  291. package/dist/db/repository/cached-stmt.d.ts.map +1 -0
  292. package/dist/db/repository/cached-stmt.js +20 -0
  293. package/dist/db/repository/cached-stmt.js.map +1 -0
  294. package/dist/db/repository/cfg.d.ts +27 -0
  295. package/dist/db/repository/cfg.d.ts.map +1 -0
  296. package/dist/db/repository/cfg.js +57 -0
  297. package/dist/db/repository/cfg.js.map +1 -0
  298. package/dist/db/repository/cochange.d.ts +20 -0
  299. package/dist/db/repository/cochange.d.ts.map +1 -0
  300. package/dist/db/repository/cochange.js +45 -0
  301. package/dist/db/repository/cochange.js.map +1 -0
  302. package/dist/db/repository/complexity.d.ts +15 -0
  303. package/dist/db/repository/complexity.d.ts.map +1 -0
  304. package/dist/db/repository/complexity.js +15 -0
  305. package/dist/db/repository/complexity.js.map +1 -0
  306. package/dist/db/repository/dataflow.d.ts +7 -0
  307. package/dist/db/repository/dataflow.d.ts.map +1 -0
  308. package/dist/db/repository/dataflow.js +17 -0
  309. package/dist/db/repository/dataflow.js.map +1 -0
  310. package/dist/db/repository/edges.d.ts +173 -0
  311. package/dist/db/repository/edges.d.ts.map +1 -0
  312. package/dist/db/repository/edges.js +231 -0
  313. package/dist/db/repository/edges.js.map +1 -0
  314. package/dist/db/repository/embeddings.d.ts +20 -0
  315. package/dist/db/repository/embeddings.d.ts.map +1 -0
  316. package/dist/db/repository/embeddings.js +47 -0
  317. package/dist/db/repository/embeddings.js.map +1 -0
  318. package/dist/db/repository/graph-read.d.ts +41 -0
  319. package/dist/db/repository/graph-read.d.ts.map +1 -0
  320. package/dist/db/repository/graph-read.js +41 -0
  321. package/dist/db/repository/graph-read.js.map +1 -0
  322. package/dist/db/repository/in-memory-repository.d.ts +156 -0
  323. package/dist/db/repository/in-memory-repository.d.ts.map +1 -0
  324. package/dist/db/repository/in-memory-repository.js +533 -0
  325. package/dist/db/repository/in-memory-repository.js.map +1 -0
  326. package/dist/db/repository/index.d.ts +14 -0
  327. package/dist/db/repository/index.d.ts.map +1 -0
  328. package/dist/db/repository/index.js +15 -0
  329. package/dist/db/repository/index.js.map +1 -0
  330. package/dist/db/repository/nodes.d.ts +151 -0
  331. package/dist/db/repository/nodes.d.ts.map +1 -0
  332. package/dist/db/repository/nodes.js +244 -0
  333. package/dist/db/repository/nodes.js.map +1 -0
  334. package/dist/db/repository/sqlite-repository.d.ts +100 -0
  335. package/dist/db/repository/sqlite-repository.d.ts.map +1 -0
  336. package/dist/db/repository/sqlite-repository.js +143 -0
  337. package/dist/db/repository/sqlite-repository.js.map +1 -0
  338. package/dist/domain/analysis/brief.d.ts +16 -0
  339. package/dist/domain/analysis/brief.d.ts.map +1 -0
  340. package/dist/domain/analysis/brief.js +147 -0
  341. package/dist/domain/analysis/brief.js.map +1 -0
  342. package/dist/domain/analysis/context.d.ts +3 -0
  343. package/dist/domain/analysis/context.d.ts.map +1 -0
  344. package/dist/domain/analysis/context.js +378 -0
  345. package/dist/domain/analysis/context.js.map +1 -0
  346. package/dist/domain/analysis/dependencies.d.ts +60 -0
  347. package/dist/domain/analysis/dependencies.d.ts.map +1 -0
  348. package/dist/domain/analysis/dependencies.js +359 -0
  349. package/dist/domain/analysis/dependencies.js.map +1 -0
  350. package/dist/domain/analysis/exports.d.ts +2 -0
  351. package/dist/domain/analysis/exports.d.ts.map +1 -0
  352. package/dist/domain/analysis/exports.js +168 -0
  353. package/dist/domain/analysis/exports.js.map +1 -0
  354. package/dist/domain/analysis/impact.d.ts +39 -0
  355. package/dist/domain/analysis/impact.d.ts.map +1 -0
  356. package/dist/domain/analysis/impact.js +596 -0
  357. package/dist/domain/analysis/impact.js.map +1 -0
  358. package/dist/domain/analysis/implementations.d.ts +59 -0
  359. package/dist/domain/analysis/implementations.d.ts.map +1 -0
  360. package/dist/domain/analysis/implementations.js +93 -0
  361. package/dist/domain/analysis/implementations.js.map +1 -0
  362. package/dist/domain/analysis/module-map.d.ts +64 -0
  363. package/dist/domain/analysis/module-map.d.ts.map +1 -0
  364. package/dist/domain/analysis/module-map.js +334 -0
  365. package/dist/domain/analysis/module-map.js.map +1 -0
  366. package/dist/domain/analysis/roles.d.ts +2 -0
  367. package/dist/domain/analysis/roles.d.ts.map +1 -0
  368. package/dist/domain/analysis/roles.js +50 -0
  369. package/dist/domain/analysis/roles.js.map +1 -0
  370. package/dist/domain/analysis/symbol-lookup.d.ts +12 -0
  371. package/dist/domain/analysis/symbol-lookup.d.ts.map +1 -0
  372. package/dist/domain/analysis/symbol-lookup.js +202 -0
  373. package/dist/domain/analysis/symbol-lookup.js.map +1 -0
  374. package/dist/domain/graph/builder/context.d.ts +91 -0
  375. package/dist/domain/graph/builder/context.d.ts.map +1 -0
  376. package/dist/domain/graph/builder/context.js +78 -0
  377. package/dist/domain/graph/builder/context.js.map +1 -0
  378. package/dist/domain/graph/builder/helpers.d.ts +43 -0
  379. package/dist/domain/graph/builder/helpers.d.ts.map +1 -0
  380. package/dist/domain/graph/builder/helpers.js +209 -0
  381. package/dist/domain/graph/builder/helpers.js.map +1 -0
  382. package/dist/domain/graph/builder/incremental.d.ts +17 -0
  383. package/dist/domain/graph/builder/incremental.d.ts.map +1 -0
  384. package/dist/domain/graph/builder/incremental.js +191 -0
  385. package/dist/domain/graph/builder/incremental.js.map +1 -0
  386. package/dist/domain/graph/builder/pipeline.d.ts +13 -0
  387. package/dist/domain/graph/builder/pipeline.d.ts.map +1 -0
  388. package/dist/domain/graph/builder/pipeline.js +146 -0
  389. package/dist/domain/graph/builder/pipeline.js.map +1 -0
  390. package/dist/domain/graph/builder/stages/build-edges.d.ts +5 -0
  391. package/dist/domain/graph/builder/stages/build-edges.d.ts.map +1 -0
  392. package/dist/domain/graph/builder/stages/build-edges.js +387 -0
  393. package/dist/domain/graph/builder/stages/build-edges.js.map +1 -0
  394. package/dist/domain/graph/builder/stages/build-structure.d.ts +5 -0
  395. package/dist/domain/graph/builder/stages/build-structure.d.ts.map +1 -0
  396. package/dist/domain/graph/builder/stages/build-structure.js +107 -0
  397. package/dist/domain/graph/builder/stages/build-structure.js.map +1 -0
  398. package/dist/domain/graph/builder/stages/collect-files.d.ts +5 -0
  399. package/dist/domain/graph/builder/stages/collect-files.d.ts.map +1 -0
  400. package/dist/domain/graph/builder/stages/collect-files.js +45 -0
  401. package/dist/domain/graph/builder/stages/collect-files.js.map +1 -0
  402. package/dist/domain/graph/builder/stages/detect-changes.d.ts +5 -0
  403. package/dist/domain/graph/builder/stages/detect-changes.d.ts.map +1 -0
  404. package/dist/domain/graph/builder/stages/detect-changes.js +358 -0
  405. package/dist/domain/graph/builder/stages/detect-changes.js.map +1 -0
  406. package/dist/domain/graph/builder/stages/finalize.d.ts +5 -0
  407. package/dist/domain/graph/builder/stages/finalize.d.ts.map +1 -0
  408. package/dist/domain/graph/builder/stages/finalize.js +123 -0
  409. package/dist/domain/graph/builder/stages/finalize.js.map +1 -0
  410. package/dist/domain/graph/builder/stages/insert-nodes.d.ts +5 -0
  411. package/dist/domain/graph/builder/stages/insert-nodes.d.ts.map +1 -0
  412. package/dist/domain/graph/builder/stages/insert-nodes.js +183 -0
  413. package/dist/domain/graph/builder/stages/insert-nodes.js.map +1 -0
  414. package/dist/domain/graph/builder/stages/parse-files.d.ts +5 -0
  415. package/dist/domain/graph/builder/stages/parse-files.d.ts.map +1 -0
  416. package/dist/domain/graph/builder/stages/parse-files.js +25 -0
  417. package/dist/domain/graph/builder/stages/parse-files.js.map +1 -0
  418. package/dist/domain/graph/builder/stages/resolve-imports.d.ts +18 -0
  419. package/dist/domain/graph/builder/stages/resolve-imports.d.ts.map +1 -0
  420. package/dist/domain/graph/builder/stages/resolve-imports.js +139 -0
  421. package/dist/domain/graph/builder/stages/resolve-imports.js.map +1 -0
  422. package/dist/domain/graph/builder/stages/run-analyses.d.ts +5 -0
  423. package/dist/domain/graph/builder/stages/run-analyses.d.ts.map +1 -0
  424. package/dist/domain/graph/builder/stages/run-analyses.js +39 -0
  425. package/dist/domain/graph/builder/stages/run-analyses.js.map +1 -0
  426. package/dist/domain/graph/builder.d.ts +4 -0
  427. package/dist/domain/graph/builder.d.ts.map +1 -0
  428. package/dist/domain/graph/builder.js +6 -0
  429. package/dist/domain/graph/builder.js.map +1 -0
  430. package/dist/domain/graph/change-journal.d.ts +57 -0
  431. package/dist/domain/graph/change-journal.d.ts.map +1 -0
  432. package/dist/domain/graph/change-journal.js +120 -0
  433. package/dist/domain/graph/change-journal.js.map +1 -0
  434. package/dist/domain/graph/cycles.d.ts +18 -0
  435. package/dist/domain/graph/cycles.d.ts.map +1 -0
  436. package/dist/domain/graph/cycles.js +75 -0
  437. package/dist/domain/graph/cycles.js.map +1 -0
  438. package/dist/domain/graph/journal.d.ts +27 -0
  439. package/dist/domain/graph/journal.d.ts.map +1 -0
  440. package/dist/domain/graph/journal.js +100 -0
  441. package/dist/domain/graph/journal.js.map +1 -0
  442. package/dist/domain/graph/resolve.d.ts +76 -0
  443. package/dist/domain/graph/resolve.d.ts.map +1 -0
  444. package/dist/domain/graph/resolve.js +482 -0
  445. package/dist/domain/graph/resolve.js.map +1 -0
  446. package/dist/domain/graph/watcher.d.ts +2 -0
  447. package/dist/domain/graph/watcher.d.ts.map +1 -0
  448. package/dist/domain/graph/watcher.js +140 -0
  449. package/dist/domain/graph/watcher.js.map +1 -0
  450. package/dist/domain/parser.d.ts +104 -0
  451. package/dist/domain/parser.d.ts.map +1 -0
  452. package/dist/domain/parser.js +557 -0
  453. package/dist/domain/parser.js.map +1 -0
  454. package/dist/domain/queries.d.ts +14 -0
  455. package/dist/domain/queries.d.ts.map +1 -0
  456. package/dist/domain/queries.js +25 -0
  457. package/dist/domain/queries.js.map +1 -0
  458. package/dist/domain/search/generator.d.ts +17 -0
  459. package/dist/domain/search/generator.d.ts.map +1 -0
  460. package/dist/domain/search/generator.js +135 -0
  461. package/dist/domain/search/generator.js.map +1 -0
  462. package/dist/domain/search/index.d.ts +8 -0
  463. package/dist/domain/search/index.d.ts.map +1 -0
  464. package/dist/domain/search/index.js +13 -0
  465. package/dist/domain/search/index.js.map +1 -0
  466. package/dist/domain/search/models.d.ts +82 -0
  467. package/dist/domain/search/models.d.ts.map +1 -0
  468. package/dist/domain/search/models.js +198 -0
  469. package/dist/domain/search/models.js.map +1 -0
  470. package/dist/domain/search/search/cli-formatter.d.ts +6 -0
  471. package/dist/domain/search/search/cli-formatter.d.ts.map +1 -0
  472. package/dist/domain/search/search/cli-formatter.js +135 -0
  473. package/dist/domain/search/search/cli-formatter.js.map +1 -0
  474. package/dist/domain/search/search/filters.d.ts +19 -0
  475. package/dist/domain/search/search/filters.d.ts.map +1 -0
  476. package/dist/domain/search/search/filters.js +48 -0
  477. package/dist/domain/search/search/filters.js.map +1 -0
  478. package/dist/domain/search/search/hybrid.d.ts +22 -0
  479. package/dist/domain/search/search/hybrid.d.ts.map +1 -0
  480. package/dist/domain/search/search/hybrid.js +113 -0
  481. package/dist/domain/search/search/hybrid.js.map +1 -0
  482. package/dist/domain/search/search/keyword.d.ts +17 -0
  483. package/dist/domain/search/search/keyword.d.ts.map +1 -0
  484. package/dist/domain/search/search/keyword.js +66 -0
  485. package/dist/domain/search/search/keyword.js.map +1 -0
  486. package/dist/domain/search/search/prepare.d.ts +13 -0
  487. package/dist/domain/search/search/prepare.d.ts.map +1 -0
  488. package/dist/domain/search/search/prepare.js +70 -0
  489. package/dist/domain/search/search/prepare.js.map +1 -0
  490. package/dist/domain/search/search/semantic.d.ts +34 -0
  491. package/dist/domain/search/search/semantic.d.ts.map +1 -0
  492. package/dist/domain/search/search/semantic.js +129 -0
  493. package/dist/domain/search/search/semantic.js.map +1 -0
  494. package/dist/domain/search/stores/fts5.d.ts +11 -0
  495. package/dist/domain/search/stores/fts5.d.ts.map +1 -0
  496. package/dist/domain/search/stores/fts5.js +31 -0
  497. package/dist/domain/search/stores/fts5.js.map +1 -0
  498. package/dist/domain/search/stores/sqlite-blob.d.ts +27 -0
  499. package/dist/domain/search/stores/sqlite-blob.d.ts.map +1 -0
  500. package/dist/domain/search/stores/sqlite-blob.js +22 -0
  501. package/dist/domain/search/stores/sqlite-blob.js.map +1 -0
  502. package/dist/domain/search/strategies/source.d.ts +5 -0
  503. package/dist/domain/search/strategies/source.d.ts.map +1 -0
  504. package/dist/domain/search/strategies/source.js +14 -0
  505. package/dist/domain/search/strategies/source.js.map +1 -0
  506. package/dist/domain/search/strategies/structured.d.ts +6 -0
  507. package/dist/domain/search/strategies/structured.d.ts.map +1 -0
  508. package/dist/domain/search/strategies/structured.js +40 -0
  509. package/dist/domain/search/strategies/structured.js.map +1 -0
  510. package/dist/domain/search/strategies/text-utils.d.ts +11 -0
  511. package/dist/domain/search/strategies/text-utils.d.ts.map +1 -0
  512. package/dist/domain/search/strategies/text-utils.js +47 -0
  513. package/dist/domain/search/strategies/text-utils.js.map +1 -0
  514. package/dist/extractors/csharp.d.ts +12 -0
  515. package/dist/extractors/csharp.d.ts.map +1 -0
  516. package/dist/extractors/csharp.js +402 -0
  517. package/dist/extractors/csharp.js.map +1 -0
  518. package/dist/extractors/go.d.ts +12 -0
  519. package/dist/extractors/go.d.ts.map +1 -0
  520. package/dist/extractors/go.js +381 -0
  521. package/dist/extractors/go.js.map +1 -0
  522. package/dist/extractors/hcl.d.ts +11 -0
  523. package/dist/extractors/hcl.d.ts.map +1 -0
  524. package/dist/extractors/hcl.js +105 -0
  525. package/dist/extractors/hcl.js.map +1 -0
  526. package/dist/extractors/helpers.d.ts +16 -0
  527. package/dist/extractors/helpers.d.ts.map +1 -0
  528. package/dist/extractors/helpers.js +88 -0
  529. package/dist/extractors/helpers.js.map +1 -0
  530. package/dist/extractors/index.d.ts +10 -0
  531. package/dist/extractors/index.d.ts.map +1 -0
  532. package/dist/extractors/index.js +10 -0
  533. package/dist/extractors/index.js.map +1 -0
  534. package/dist/extractors/java.d.ts +12 -0
  535. package/dist/extractors/java.d.ts.map +1 -0
  536. package/dist/extractors/java.js +325 -0
  537. package/dist/extractors/java.js.map +1 -0
  538. package/dist/extractors/javascript.d.ts +81 -0
  539. package/dist/extractors/javascript.d.ts.map +1 -0
  540. package/dist/extractors/javascript.js +1232 -0
  541. package/dist/extractors/javascript.js.map +1 -0
  542. package/dist/extractors/php.d.ts +12 -0
  543. package/dist/extractors/php.d.ts.map +1 -0
  544. package/dist/extractors/php.js +380 -0
  545. package/dist/extractors/php.js.map +1 -0
  546. package/dist/extractors/python.d.ts +12 -0
  547. package/dist/extractors/python.d.ts.map +1 -0
  548. package/dist/extractors/python.js +426 -0
  549. package/dist/extractors/python.js.map +1 -0
  550. package/dist/extractors/ruby.d.ts +11 -0
  551. package/dist/extractors/ruby.d.ts.map +1 -0
  552. package/dist/extractors/ruby.js +284 -0
  553. package/dist/extractors/ruby.js.map +1 -0
  554. package/dist/extractors/rust.d.ts +12 -0
  555. package/dist/extractors/rust.d.ts.map +1 -0
  556. package/dist/extractors/rust.js +366 -0
  557. package/dist/extractors/rust.js.map +1 -0
  558. package/dist/features/ast.d.ts +30 -0
  559. package/dist/features/ast.d.ts.map +1 -0
  560. package/dist/features/ast.js +242 -0
  561. package/dist/features/ast.js.map +1 -0
  562. package/dist/features/audit.d.ts +6 -0
  563. package/dist/features/audit.d.ts.map +1 -0
  564. package/dist/features/audit.js +283 -0
  565. package/dist/features/audit.js.map +1 -0
  566. package/dist/features/batch.d.ts +110 -0
  567. package/dist/features/batch.d.ts.map +1 -0
  568. package/dist/features/batch.js +138 -0
  569. package/dist/features/batch.js.map +1 -0
  570. package/dist/features/boundaries.d.ts +69 -0
  571. package/dist/features/boundaries.d.ts.map +1 -0
  572. package/dist/features/boundaries.js +344 -0
  573. package/dist/features/boundaries.js.map +1 -0
  574. package/dist/features/branch-compare.d.ts +52 -0
  575. package/dist/features/branch-compare.d.ts.map +1 -0
  576. package/dist/features/branch-compare.js +425 -0
  577. package/dist/features/branch-compare.js.map +1 -0
  578. package/dist/features/cfg.d.ts +51 -0
  579. package/dist/features/cfg.d.ts.map +1 -0
  580. package/dist/features/cfg.js +372 -0
  581. package/dist/features/cfg.js.map +1 -0
  582. package/dist/features/check.d.ts +99 -0
  583. package/dist/features/check.d.ts.map +1 -0
  584. package/dist/features/check.js +296 -0
  585. package/dist/features/check.js.map +1 -0
  586. package/dist/features/cochange.d.ts +119 -0
  587. package/dist/features/cochange.d.ts.map +1 -0
  588. package/dist/features/cochange.js +425 -0
  589. package/dist/features/cochange.js.map +1 -0
  590. package/dist/features/communities.d.ts +40 -0
  591. package/dist/features/communities.d.ts.map +1 -0
  592. package/dist/features/communities.js +163 -0
  593. package/dist/features/communities.js.map +1 -0
  594. package/dist/features/complexity.d.ts +127 -0
  595. package/dist/features/complexity.d.ts.map +1 -0
  596. package/dist/features/complexity.js +683 -0
  597. package/dist/features/complexity.js.map +1 -0
  598. package/dist/features/dataflow.d.ts +72 -0
  599. package/dist/features/dataflow.d.ts.map +1 -0
  600. package/dist/features/dataflow.js +483 -0
  601. package/dist/features/dataflow.js.map +1 -0
  602. package/dist/features/export.d.ts +29 -0
  603. package/dist/features/export.d.ts.map +1 -0
  604. package/dist/features/export.js +336 -0
  605. package/dist/features/export.js.map +1 -0
  606. package/dist/features/flow.d.ts +49 -0
  607. package/dist/features/flow.d.ts.map +1 -0
  608. package/dist/features/flow.js +203 -0
  609. package/dist/features/flow.js.map +1 -0
  610. package/dist/features/graph-enrichment.d.ts +54 -0
  611. package/dist/features/graph-enrichment.d.ts.map +1 -0
  612. package/dist/features/graph-enrichment.js +297 -0
  613. package/dist/features/graph-enrichment.js.map +1 -0
  614. package/dist/features/manifesto.d.ts +46 -0
  615. package/dist/features/manifesto.d.ts.map +1 -0
  616. package/dist/features/manifesto.js +398 -0
  617. package/dist/features/manifesto.js.map +1 -0
  618. package/dist/features/owners.d.ts +123 -0
  619. package/dist/features/owners.d.ts.map +1 -0
  620. package/dist/features/owners.js +289 -0
  621. package/dist/features/owners.js.map +1 -0
  622. package/dist/features/sequence.d.ts +33 -0
  623. package/dist/features/sequence.d.ts.map +1 -0
  624. package/dist/features/sequence.js +269 -0
  625. package/dist/features/sequence.js.map +1 -0
  626. package/dist/features/shared/find-nodes.d.ts +11 -0
  627. package/dist/features/shared/find-nodes.d.ts.map +1 -0
  628. package/dist/features/shared/find-nodes.js +27 -0
  629. package/dist/features/shared/find-nodes.js.map +1 -0
  630. package/dist/features/snapshot.d.ts +64 -0
  631. package/dist/features/snapshot.d.ts.map +1 -0
  632. package/dist/features/snapshot.js +132 -0
  633. package/dist/features/snapshot.js.map +1 -0
  634. package/dist/features/structure.d.ts +42 -0
  635. package/dist/features/structure.d.ts.map +1 -0
  636. package/dist/features/structure.js +596 -0
  637. package/dist/features/structure.js.map +1 -0
  638. package/dist/features/triage.d.ts +13 -0
  639. package/dist/features/triage.d.ts.map +1 -0
  640. package/dist/features/triage.js +133 -0
  641. package/dist/features/triage.js.map +1 -0
  642. package/dist/graph/algorithms/bfs.d.ts +13 -0
  643. package/dist/graph/algorithms/bfs.d.ts.map +1 -0
  644. package/dist/graph/algorithms/bfs.js +47 -0
  645. package/dist/graph/algorithms/bfs.js.map +1 -0
  646. package/dist/graph/algorithms/centrality.d.ts +11 -0
  647. package/dist/graph/algorithms/centrality.d.ts.map +1 -0
  648. package/dist/graph/algorithms/centrality.js +17 -0
  649. package/dist/graph/algorithms/centrality.js.map +1 -0
  650. package/dist/graph/algorithms/index.d.ts +6 -0
  651. package/dist/graph/algorithms/index.d.ts.map +1 -0
  652. package/dist/graph/algorithms/index.js +6 -0
  653. package/dist/graph/algorithms/index.js.map +1 -0
  654. package/dist/graph/algorithms/louvain.d.ts +5 -0
  655. package/dist/graph/algorithms/louvain.d.ts.map +1 -0
  656. package/dist/graph/algorithms/louvain.js +22 -0
  657. package/dist/graph/algorithms/louvain.js.map +1 -0
  658. package/dist/graph/algorithms/shortest-path.d.ts +10 -0
  659. package/dist/graph/algorithms/shortest-path.d.ts.map +1 -0
  660. package/dist/graph/algorithms/shortest-path.js +41 -0
  661. package/dist/graph/algorithms/shortest-path.js.map +1 -0
  662. package/dist/graph/algorithms/tarjan.d.ts +9 -0
  663. package/dist/graph/algorithms/tarjan.d.ts.map +1 -0
  664. package/dist/graph/algorithms/tarjan.js +48 -0
  665. package/dist/graph/algorithms/tarjan.js.map +1 -0
  666. package/dist/graph/builders/dependency.d.ts +15 -0
  667. package/dist/graph/builders/dependency.d.ts.map +1 -0
  668. package/dist/graph/builders/dependency.js +99 -0
  669. package/dist/graph/builders/dependency.js.map +1 -0
  670. package/dist/graph/builders/index.d.ts +4 -0
  671. package/dist/graph/builders/index.d.ts.map +1 -0
  672. package/dist/graph/builders/index.js +4 -0
  673. package/dist/graph/builders/index.js.map +1 -0
  674. package/dist/graph/builders/structure.d.ts +7 -0
  675. package/dist/graph/builders/structure.d.ts.map +1 -0
  676. package/dist/graph/builders/structure.js +32 -0
  677. package/dist/graph/builders/structure.js.map +1 -0
  678. package/dist/graph/builders/temporal.d.ts +10 -0
  679. package/dist/graph/builders/temporal.d.ts.map +1 -0
  680. package/dist/graph/builders/temporal.js +31 -0
  681. package/dist/graph/builders/temporal.js.map +1 -0
  682. package/dist/graph/classifiers/index.d.ts +3 -0
  683. package/dist/graph/classifiers/index.d.ts.map +1 -0
  684. package/dist/graph/classifiers/index.js +3 -0
  685. package/dist/graph/classifiers/index.js.map +1 -0
  686. package/dist/graph/classifiers/risk.d.ts +49 -0
  687. package/dist/graph/classifiers/risk.d.ts.map +1 -0
  688. package/dist/graph/classifiers/risk.js +84 -0
  689. package/dist/graph/classifiers/risk.js.map +1 -0
  690. package/dist/graph/classifiers/roles.d.ts +29 -0
  691. package/dist/graph/classifiers/roles.d.ts.map +1 -0
  692. package/dist/graph/classifiers/roles.js +109 -0
  693. package/dist/graph/classifiers/roles.js.map +1 -0
  694. package/dist/graph/index.d.ts +5 -0
  695. package/dist/graph/index.d.ts.map +1 -0
  696. package/dist/graph/index.js +6 -0
  697. package/dist/graph/index.js.map +1 -0
  698. package/dist/graph/model.d.ts +53 -0
  699. package/dist/graph/model.d.ts.map +1 -0
  700. package/dist/graph/model.js +210 -0
  701. package/dist/graph/model.js.map +1 -0
  702. package/dist/index.cjs +18 -0
  703. package/dist/index.cjs.map +1 -0
  704. package/dist/index.d.cts +3 -0
  705. package/dist/index.d.cts.map +1 -0
  706. package/dist/index.d.ts +26 -0
  707. package/dist/index.d.ts.map +1 -0
  708. package/dist/index.js +36 -0
  709. package/dist/index.js.map +1 -0
  710. package/dist/infrastructure/config.d.ts +222 -0
  711. package/dist/infrastructure/config.d.ts.map +1 -0
  712. package/dist/infrastructure/config.js +386 -0
  713. package/dist/infrastructure/config.js.map +1 -0
  714. package/dist/infrastructure/logger.d.ts +7 -0
  715. package/dist/infrastructure/logger.d.ts.map +1 -0
  716. package/dist/infrastructure/logger.js +21 -0
  717. package/dist/infrastructure/logger.js.map +1 -0
  718. package/dist/infrastructure/native.d.ts +19 -0
  719. package/dist/infrastructure/native.d.ts.map +1 -0
  720. package/dist/infrastructure/native.js +105 -0
  721. package/dist/infrastructure/native.js.map +1 -0
  722. package/dist/infrastructure/registry.d.ts +57 -0
  723. package/dist/infrastructure/registry.d.ts.map +1 -0
  724. package/dist/infrastructure/registry.js +157 -0
  725. package/dist/infrastructure/registry.js.map +1 -0
  726. package/dist/infrastructure/result-formatter.d.ts +2 -0
  727. package/dist/infrastructure/result-formatter.d.ts.map +1 -0
  728. package/dist/infrastructure/result-formatter.js +3 -0
  729. package/dist/infrastructure/result-formatter.js.map +1 -0
  730. package/dist/infrastructure/test-filter.d.ts +5 -0
  731. package/dist/infrastructure/test-filter.d.ts.map +1 -0
  732. package/dist/infrastructure/test-filter.js +7 -0
  733. package/dist/infrastructure/test-filter.js.map +1 -0
  734. package/dist/infrastructure/update-check.d.ts +24 -0
  735. package/dist/infrastructure/update-check.d.ts.map +1 -0
  736. package/dist/infrastructure/update-check.js +150 -0
  737. package/dist/infrastructure/update-check.js.map +1 -0
  738. package/dist/mcp/index.d.ts +3 -0
  739. package/dist/mcp/index.d.ts.map +1 -0
  740. package/dist/mcp/index.js +3 -0
  741. package/dist/mcp/index.js.map +1 -0
  742. package/dist/mcp/middleware.d.ts +26 -0
  743. package/dist/mcp/middleware.d.ts.map +1 -0
  744. package/dist/mcp/middleware.js +38 -0
  745. package/dist/mcp/middleware.js.map +1 -0
  746. package/dist/mcp/server.d.ts +2 -0
  747. package/dist/mcp/server.d.ts.map +1 -0
  748. package/dist/mcp/server.js +120 -0
  749. package/dist/mcp/server.js.map +1 -0
  750. package/dist/mcp/tool-registry.d.ts +8 -0
  751. package/dist/mcp/tool-registry.d.ts.map +1 -0
  752. package/dist/mcp/tool-registry.js +819 -0
  753. package/dist/mcp/tool-registry.js.map +1 -0
  754. package/dist/mcp/tools/ast-query.d.ts +9 -0
  755. package/dist/mcp/tools/ast-query.d.ts.map +1 -0
  756. package/dist/mcp/tools/ast-query.js +13 -0
  757. package/dist/mcp/tools/ast-query.js.map +1 -0
  758. package/dist/mcp/tools/audit.d.ts +3 -0
  759. package/dist/mcp/tools/audit.d.ts.map +1 -0
  760. package/dist/mcp/tools/audit.js +20 -0
  761. package/dist/mcp/tools/audit.js.map +1 -0
  762. package/dist/mcp/tools/batch-query.d.ts +9 -0
  763. package/dist/mcp/tools/batch-query.d.ts.map +1 -0
  764. package/dist/mcp/tools/batch-query.js +11 -0
  765. package/dist/mcp/tools/batch-query.js.map +1 -0
  766. package/dist/mcp/tools/branch-compare.d.ts +3 -0
  767. package/dist/mcp/tools/branch-compare.d.ts.map +1 -0
  768. package/dist/mcp/tools/branch-compare.js +10 -0
  769. package/dist/mcp/tools/branch-compare.js.map +1 -0
  770. package/dist/mcp/tools/brief.d.ts +3 -0
  771. package/dist/mcp/tools/brief.d.ts.map +1 -0
  772. package/dist/mcp/tools/brief.js +8 -0
  773. package/dist/mcp/tools/brief.js.map +1 -0
  774. package/dist/mcp/tools/cfg.d.ts +10 -0
  775. package/dist/mcp/tools/cfg.d.ts.map +1 -0
  776. package/dist/mcp/tools/cfg.js +20 -0
  777. package/dist/mcp/tools/cfg.js.map +1 -0
  778. package/dist/mcp/tools/check.d.ts +24 -0
  779. package/dist/mcp/tools/check.d.ts.map +1 -0
  780. package/dist/mcp/tools/check.js +39 -0
  781. package/dist/mcp/tools/check.js.map +1 -0
  782. package/dist/mcp/tools/co-changes.d.ts +10 -0
  783. package/dist/mcp/tools/co-changes.d.ts.map +1 -0
  784. package/dist/mcp/tools/co-changes.js +19 -0
  785. package/dist/mcp/tools/co-changes.js.map +1 -0
  786. package/dist/mcp/tools/code-owners.d.ts +48 -0
  787. package/dist/mcp/tools/code-owners.d.ts.map +1 -0
  788. package/dist/mcp/tools/code-owners.js +12 -0
  789. package/dist/mcp/tools/code-owners.js.map +1 -0
  790. package/dist/mcp/tools/communities.d.ts +8 -0
  791. package/dist/mcp/tools/communities.d.ts.map +1 -0
  792. package/dist/mcp/tools/communities.js +14 -0
  793. package/dist/mcp/tools/communities.js.map +1 -0
  794. package/dist/mcp/tools/complexity.d.ts +7 -0
  795. package/dist/mcp/tools/complexity.d.ts.map +1 -0
  796. package/dist/mcp/tools/complexity.js +17 -0
  797. package/dist/mcp/tools/complexity.js.map +1 -0
  798. package/dist/mcp/tools/context.d.ts +3 -0
  799. package/dist/mcp/tools/context.d.ts.map +1 -0
  800. package/dist/mcp/tools/context.js +16 -0
  801. package/dist/mcp/tools/context.js.map +1 -0
  802. package/dist/mcp/tools/dataflow.d.ts +6 -0
  803. package/dist/mcp/tools/dataflow.d.ts.map +1 -0
  804. package/dist/mcp/tools/dataflow.js +25 -0
  805. package/dist/mcp/tools/dataflow.js.map +1 -0
  806. package/dist/mcp/tools/diff-impact.d.ts +3 -0
  807. package/dist/mcp/tools/diff-impact.d.ts.map +1 -0
  808. package/dist/mcp/tools/diff-impact.js +23 -0
  809. package/dist/mcp/tools/diff-impact.js.map +1 -0
  810. package/dist/mcp/tools/execution-flow.d.ts +17 -0
  811. package/dist/mcp/tools/execution-flow.d.ts.map +1 -0
  812. package/dist/mcp/tools/execution-flow.js +25 -0
  813. package/dist/mcp/tools/execution-flow.js.map +1 -0
  814. package/dist/mcp/tools/export-graph.d.ts +3 -0
  815. package/dist/mcp/tools/export-graph.d.ts.map +1 -0
  816. package/dist/mcp/tools/export-graph.js +55 -0
  817. package/dist/mcp/tools/export-graph.js.map +1 -0
  818. package/dist/mcp/tools/file-deps.d.ts +3 -0
  819. package/dist/mcp/tools/file-deps.d.ts.map +1 -0
  820. package/dist/mcp/tools/file-deps.js +11 -0
  821. package/dist/mcp/tools/file-deps.js.map +1 -0
  822. package/dist/mcp/tools/file-exports.d.ts +3 -0
  823. package/dist/mcp/tools/file-exports.d.ts.map +1 -0
  824. package/dist/mcp/tools/file-exports.js +12 -0
  825. package/dist/mcp/tools/file-exports.js.map +1 -0
  826. package/dist/mcp/tools/find-cycles.d.ts +6 -0
  827. package/dist/mcp/tools/find-cycles.d.ts.map +1 -0
  828. package/dist/mcp/tools/find-cycles.js +15 -0
  829. package/dist/mcp/tools/find-cycles.js.map +1 -0
  830. package/dist/mcp/tools/fn-impact.d.ts +3 -0
  831. package/dist/mcp/tools/fn-impact.d.ts.map +1 -0
  832. package/dist/mcp/tools/fn-impact.js +14 -0
  833. package/dist/mcp/tools/fn-impact.js.map +1 -0
  834. package/dist/mcp/tools/impact-analysis.d.ts +3 -0
  835. package/dist/mcp/tools/impact-analysis.d.ts.map +1 -0
  836. package/dist/mcp/tools/impact-analysis.js +11 -0
  837. package/dist/mcp/tools/impact-analysis.js.map +1 -0
  838. package/dist/mcp/tools/implementations.d.ts +3 -0
  839. package/dist/mcp/tools/implementations.d.ts.map +1 -0
  840. package/dist/mcp/tools/implementations.js +13 -0
  841. package/dist/mcp/tools/implementations.js.map +1 -0
  842. package/dist/mcp/tools/index.d.ts +3 -0
  843. package/dist/mcp/tools/index.d.ts.map +1 -0
  844. package/dist/mcp/tools/index.js +76 -0
  845. package/dist/mcp/tools/index.js.map +1 -0
  846. package/dist/mcp/tools/interfaces.d.ts +3 -0
  847. package/dist/mcp/tools/interfaces.d.ts.map +1 -0
  848. package/dist/mcp/tools/interfaces.js +13 -0
  849. package/dist/mcp/tools/interfaces.js.map +1 -0
  850. package/dist/mcp/tools/list-functions.d.ts +3 -0
  851. package/dist/mcp/tools/list-functions.d.ts.map +1 -0
  852. package/dist/mcp/tools/list-functions.js +13 -0
  853. package/dist/mcp/tools/list-functions.js.map +1 -0
  854. package/dist/mcp/tools/list-repos.d.ts +11 -0
  855. package/dist/mcp/tools/list-repos.d.ts.map +1 -0
  856. package/dist/mcp/tools/list-repos.js +11 -0
  857. package/dist/mcp/tools/list-repos.js.map +1 -0
  858. package/dist/mcp/tools/module-map.d.ts +3 -0
  859. package/dist/mcp/tools/module-map.d.ts.map +1 -0
  860. package/dist/mcp/tools/module-map.js +6 -0
  861. package/dist/mcp/tools/module-map.js.map +1 -0
  862. package/dist/mcp/tools/node-roles.d.ts +3 -0
  863. package/dist/mcp/tools/node-roles.d.ts.map +1 -0
  864. package/dist/mcp/tools/node-roles.js +13 -0
  865. package/dist/mcp/tools/node-roles.js.map +1 -0
  866. package/dist/mcp/tools/path.d.ts +3 -0
  867. package/dist/mcp/tools/path.d.ts.map +1 -0
  868. package/dist/mcp/tools/path.js +12 -0
  869. package/dist/mcp/tools/path.js.map +1 -0
  870. package/dist/mcp/tools/query.d.ts +3 -0
  871. package/dist/mcp/tools/query.d.ts.map +1 -0
  872. package/dist/mcp/tools/query.js +29 -0
  873. package/dist/mcp/tools/query.js.map +1 -0
  874. package/dist/mcp/tools/semantic-search.d.ts +3 -0
  875. package/dist/mcp/tools/semantic-search.d.ts.map +1 -0
  876. package/dist/mcp/tools/semantic-search.js +61 -0
  877. package/dist/mcp/tools/semantic-search.js.map +1 -0
  878. package/dist/mcp/tools/sequence.d.ts +18 -0
  879. package/dist/mcp/tools/sequence.d.ts.map +1 -0
  880. package/dist/mcp/tools/sequence.js +16 -0
  881. package/dist/mcp/tools/sequence.js.map +1 -0
  882. package/dist/mcp/tools/structure.d.ts +3 -0
  883. package/dist/mcp/tools/structure.d.ts.map +1 -0
  884. package/dist/mcp/tools/structure.js +14 -0
  885. package/dist/mcp/tools/structure.js.map +1 -0
  886. package/dist/mcp/tools/symbol-children.d.ts +3 -0
  887. package/dist/mcp/tools/symbol-children.d.ts.map +1 -0
  888. package/dist/mcp/tools/symbol-children.js +13 -0
  889. package/dist/mcp/tools/symbol-children.js.map +1 -0
  890. package/dist/mcp/tools/triage.d.ts +3 -0
  891. package/dist/mcp/tools/triage.d.ts.map +1 -0
  892. package/dist/mcp/tools/triage.js +34 -0
  893. package/dist/mcp/tools/triage.js.map +1 -0
  894. package/dist/mcp/tools/where.d.ts +3 -0
  895. package/dist/mcp/tools/where.d.ts.map +1 -0
  896. package/dist/mcp/tools/where.js +12 -0
  897. package/dist/mcp/tools/where.js.map +1 -0
  898. package/dist/presentation/audit.d.ts +5 -0
  899. package/dist/presentation/audit.d.ts.map +1 -0
  900. package/dist/presentation/audit.js +77 -0
  901. package/dist/presentation/audit.js.map +1 -0
  902. package/dist/presentation/batch.d.ts +10 -0
  903. package/dist/presentation/batch.d.ts.map +1 -0
  904. package/dist/presentation/batch.js +25 -0
  905. package/dist/presentation/batch.js.map +1 -0
  906. package/dist/presentation/branch-compare.d.ts +2 -0
  907. package/dist/presentation/branch-compare.d.ts.map +1 -0
  908. package/dist/presentation/branch-compare.js +75 -0
  909. package/dist/presentation/branch-compare.js.map +1 -0
  910. package/dist/presentation/brief.d.ts +12 -0
  911. package/dist/presentation/brief.d.ts.map +1 -0
  912. package/dist/presentation/brief.js +49 -0
  913. package/dist/presentation/brief.js.map +1 -0
  914. package/dist/presentation/cfg.d.ts +5 -0
  915. package/dist/presentation/cfg.d.ts.map +1 -0
  916. package/dist/presentation/cfg.js +50 -0
  917. package/dist/presentation/cfg.js.map +1 -0
  918. package/dist/presentation/check.d.ts +5 -0
  919. package/dist/presentation/check.d.ts.map +1 -0
  920. package/dist/presentation/check.js +70 -0
  921. package/dist/presentation/check.js.map +1 -0
  922. package/dist/presentation/cochange.d.ts +9 -0
  923. package/dist/presentation/cochange.d.ts.map +1 -0
  924. package/dist/presentation/cochange.js +39 -0
  925. package/dist/presentation/cochange.js.map +1 -0
  926. package/dist/presentation/colors.d.ts +26 -0
  927. package/dist/presentation/colors.d.ts.map +1 -0
  928. package/dist/presentation/colors.js +42 -0
  929. package/dist/presentation/colors.js.map +1 -0
  930. package/dist/presentation/communities.d.ts +5 -0
  931. package/dist/presentation/communities.d.ts.map +1 -0
  932. package/dist/presentation/communities.js +56 -0
  933. package/dist/presentation/communities.js.map +1 -0
  934. package/dist/presentation/complexity.d.ts +5 -0
  935. package/dist/presentation/complexity.d.ts.map +1 -0
  936. package/dist/presentation/complexity.js +56 -0
  937. package/dist/presentation/complexity.js.map +1 -0
  938. package/dist/presentation/dataflow.d.ts +5 -0
  939. package/dist/presentation/dataflow.d.ts.map +1 -0
  940. package/dist/presentation/dataflow.js +96 -0
  941. package/dist/presentation/dataflow.js.map +1 -0
  942. package/dist/presentation/export.d.ts +137 -0
  943. package/dist/presentation/export.d.ts.map +1 -0
  944. package/dist/presentation/export.js +374 -0
  945. package/dist/presentation/export.js.map +1 -0
  946. package/dist/presentation/flow.d.ts +5 -0
  947. package/dist/presentation/flow.d.ts.map +1 -0
  948. package/dist/presentation/flow.js +64 -0
  949. package/dist/presentation/flow.js.map +1 -0
  950. package/dist/presentation/manifesto.d.ts +5 -0
  951. package/dist/presentation/manifesto.d.ts.map +1 -0
  952. package/dist/presentation/manifesto.js +56 -0
  953. package/dist/presentation/manifesto.js.map +1 -0
  954. package/dist/presentation/owners.d.ts +5 -0
  955. package/dist/presentation/owners.d.ts.map +1 -0
  956. package/dist/presentation/owners.js +45 -0
  957. package/dist/presentation/owners.js.map +1 -0
  958. package/dist/presentation/queries-cli/exports.d.ts +2 -0
  959. package/dist/presentation/queries-cli/exports.d.ts.map +1 -0
  960. package/dist/presentation/queries-cli/exports.js +94 -0
  961. package/dist/presentation/queries-cli/exports.js.map +1 -0
  962. package/dist/presentation/queries-cli/impact.d.ts +6 -0
  963. package/dist/presentation/queries-cli/impact.d.ts.map +1 -0
  964. package/dist/presentation/queries-cli/impact.js +196 -0
  965. package/dist/presentation/queries-cli/impact.js.map +1 -0
  966. package/dist/presentation/queries-cli/index.d.ts +6 -0
  967. package/dist/presentation/queries-cli/index.d.ts.map +1 -0
  968. package/dist/presentation/queries-cli/index.js +6 -0
  969. package/dist/presentation/queries-cli/index.js.map +1 -0
  970. package/dist/presentation/queries-cli/inspect.d.ts +8 -0
  971. package/dist/presentation/queries-cli/inspect.d.ts.map +1 -0
  972. package/dist/presentation/queries-cli/inspect.js +353 -0
  973. package/dist/presentation/queries-cli/inspect.js.map +1 -0
  974. package/dist/presentation/queries-cli/overview.d.ts +4 -0
  975. package/dist/presentation/queries-cli/overview.d.ts.map +1 -0
  976. package/dist/presentation/queries-cli/overview.js +163 -0
  977. package/dist/presentation/queries-cli/overview.js.map +1 -0
  978. package/dist/presentation/queries-cli/path.d.ts +2 -0
  979. package/dist/presentation/queries-cli/path.d.ts.map +1 -0
  980. package/dist/presentation/queries-cli/path.js +51 -0
  981. package/dist/presentation/queries-cli/path.js.map +1 -0
  982. package/dist/presentation/queries-cli.d.ts +2 -0
  983. package/dist/presentation/queries-cli.d.ts.map +1 -0
  984. package/dist/presentation/queries-cli.js +12 -0
  985. package/dist/presentation/queries-cli.js.map +1 -0
  986. package/dist/presentation/query.d.ts +2 -0
  987. package/dist/presentation/query.d.ts.map +1 -0
  988. package/dist/presentation/query.js +6 -0
  989. package/dist/presentation/query.js.map +1 -0
  990. package/dist/presentation/result-formatter.d.ts +10 -0
  991. package/dist/presentation/result-formatter.d.ts.map +1 -0
  992. package/dist/presentation/result-formatter.js +134 -0
  993. package/dist/presentation/result-formatter.js.map +1 -0
  994. package/dist/presentation/sequence-renderer.d.ts +12 -0
  995. package/dist/presentation/sequence-renderer.d.ts.map +1 -0
  996. package/dist/presentation/sequence-renderer.js +36 -0
  997. package/dist/presentation/sequence-renderer.js.map +1 -0
  998. package/dist/presentation/sequence.d.ts +5 -0
  999. package/dist/presentation/sequence.d.ts.map +1 -0
  1000. package/dist/presentation/sequence.js +29 -0
  1001. package/dist/presentation/sequence.js.map +1 -0
  1002. package/dist/presentation/structure.d.ts +8 -0
  1003. package/dist/presentation/structure.d.ts.map +1 -0
  1004. package/dist/presentation/structure.js +50 -0
  1005. package/dist/presentation/structure.js.map +1 -0
  1006. package/dist/presentation/table.d.ts +28 -0
  1007. package/dist/presentation/table.d.ts.map +1 -0
  1008. package/dist/presentation/table.js +39 -0
  1009. package/dist/presentation/table.js.map +1 -0
  1010. package/dist/presentation/triage.d.ts +5 -0
  1011. package/dist/presentation/triage.d.ts.map +1 -0
  1012. package/dist/presentation/triage.js +37 -0
  1013. package/dist/presentation/triage.js.map +1 -0
  1014. package/dist/presentation/viewer.d.ts +85 -0
  1015. package/dist/presentation/viewer.d.ts.map +1 -0
  1016. package/dist/presentation/viewer.js +621 -0
  1017. package/dist/presentation/viewer.js.map +1 -0
  1018. package/dist/shared/constants.d.ts +11 -0
  1019. package/dist/shared/constants.d.ts.map +1 -0
  1020. package/dist/shared/constants.js +35 -0
  1021. package/dist/shared/constants.js.map +1 -0
  1022. package/dist/shared/errors.d.ts +47 -0
  1023. package/dist/shared/errors.d.ts.map +1 -0
  1024. package/dist/shared/errors.js +69 -0
  1025. package/dist/shared/errors.js.map +1 -0
  1026. package/dist/shared/file-utils.d.ts +14 -0
  1027. package/dist/shared/file-utils.d.ts.map +1 -0
  1028. package/dist/shared/file-utils.js +165 -0
  1029. package/dist/shared/file-utils.js.map +1 -0
  1030. package/dist/shared/generators.d.ts +62 -0
  1031. package/dist/shared/generators.d.ts.map +1 -0
  1032. package/dist/shared/generators.js +120 -0
  1033. package/dist/shared/generators.js.map +1 -0
  1034. package/dist/shared/hierarchy.d.ts +2 -0
  1035. package/dist/shared/hierarchy.d.ts.map +1 -0
  1036. package/dist/shared/hierarchy.js +27 -0
  1037. package/dist/shared/hierarchy.js.map +1 -0
  1038. package/dist/shared/kinds.d.ts +11 -0
  1039. package/dist/shared/kinds.d.ts.map +1 -0
  1040. package/dist/shared/kinds.js +56 -0
  1041. package/dist/shared/kinds.js.map +1 -0
  1042. package/dist/shared/normalize.d.ts +19 -0
  1043. package/dist/shared/normalize.d.ts.map +1 -0
  1044. package/dist/shared/normalize.js +59 -0
  1045. package/dist/shared/normalize.js.map +1 -0
  1046. package/dist/shared/paginate.d.ts +80 -0
  1047. package/dist/shared/paginate.d.ts.map +1 -0
  1048. package/dist/shared/paginate.js +111 -0
  1049. package/dist/shared/paginate.js.map +1 -0
  1050. package/dist/types.d.ts +1322 -0
  1051. package/dist/types.d.ts.map +1 -0
  1052. package/dist/types.js +10 -0
  1053. package/dist/types.js.map +1 -0
  1054. package/package.json +21 -15
  1055. package/src/cli/commands/diff-impact.js +2 -0
  1056. package/src/cli/commands/fn-impact.js +2 -0
  1057. package/src/cli/commands/implementations.js +29 -0
  1058. package/src/cli/commands/info.js +1 -1
  1059. package/src/cli/commands/interfaces.js +29 -0
  1060. package/src/cli/commands/roles.js +2 -1
  1061. package/src/cli/commands/triage.js +4 -1
  1062. package/src/db/index.js +2 -0
  1063. package/src/db/query-builder.js +9 -4
  1064. package/src/db/repository/edges.js +38 -0
  1065. package/src/db/repository/in-memory-repository.js +11 -2
  1066. package/src/db/repository/index.js +2 -0
  1067. package/src/domain/analysis/brief.js +12 -6
  1068. package/src/domain/analysis/context.js +74 -20
  1069. package/src/domain/analysis/exports.js +81 -10
  1070. package/src/domain/analysis/impact.js +84 -6
  1071. package/src/domain/analysis/implementations.js +98 -0
  1072. package/src/domain/analysis/module-map.js +13 -4
  1073. package/src/domain/analysis/roles.js +8 -2
  1074. package/src/domain/graph/builder/incremental.js +22 -2
  1075. package/src/domain/graph/builder/pipeline.js +9 -1
  1076. package/src/domain/graph/builder/stages/build-edges.js +117 -20
  1077. package/src/domain/graph/resolve.js +315 -1
  1078. package/src/domain/parser.js +70 -6
  1079. package/src/domain/queries.js +1 -0
  1080. package/src/domain/search/search/hybrid.js +7 -4
  1081. package/src/domain/search/search/semantic.js +11 -6
  1082. package/src/extractors/csharp.js +62 -0
  1083. package/src/extractors/go.js +141 -0
  1084. package/src/extractors/java.js +29 -3
  1085. package/src/extractors/javascript.js +163 -1
  1086. package/src/extractors/php.js +43 -0
  1087. package/src/extractors/python.js +130 -0
  1088. package/src/extractors/rust.js +60 -0
  1089. package/src/features/audit.js +2 -1
  1090. package/src/features/communities.js +3 -1
  1091. package/src/features/graph-enrichment.js +1 -1
  1092. package/src/features/sequence.js +3 -1
  1093. package/src/features/structure.js +33 -4
  1094. package/src/features/triage.js +9 -2
  1095. package/src/graph/classifiers/risk.js +9 -2
  1096. package/src/graph/classifiers/roles.js +51 -3
  1097. package/src/infrastructure/config.js +255 -4
  1098. package/src/mcp/middleware.js +20 -2
  1099. package/src/mcp/server.js +6 -0
  1100. package/src/mcp/tool-registry.js +40 -1
  1101. package/src/mcp/tools/implementations.js +14 -0
  1102. package/src/mcp/tools/index.js +4 -0
  1103. package/src/mcp/tools/interfaces.js +14 -0
  1104. package/src/presentation/queries-cli/exports.js +54 -4
  1105. package/src/presentation/queries-cli/index.js +9 -1
  1106. package/src/presentation/queries-cli/inspect.js +64 -0
  1107. package/src/presentation/queries-cli.js +3 -1
  1108. package/src/presentation/result-formatter.js +9 -5
  1109. package/src/shared/file-utils.js +20 -11
  1110. package/src/shared/kinds.js +14 -1
  1111. package/src/shared/paginate.js +10 -2
  1112. package/src/types.ts +1609 -0
@@ -0,0 +1,284 @@
1
+ import { findChild, nodeEndLine } from './helpers.js';
2
+ /**
3
+ * Extract symbols from Ruby files.
4
+ */
5
+ export function extractRubySymbols(tree, _filePath) {
6
+ const ctx = {
7
+ definitions: [],
8
+ calls: [],
9
+ imports: [],
10
+ classes: [],
11
+ exports: [],
12
+ };
13
+ walkRubyNode(tree.rootNode, ctx);
14
+ return ctx;
15
+ }
16
+ function walkRubyNode(node, ctx) {
17
+ switch (node.type) {
18
+ case 'class':
19
+ handleRubyClass(node, ctx);
20
+ break;
21
+ case 'module':
22
+ handleRubyModule(node, ctx);
23
+ break;
24
+ case 'method':
25
+ handleRubyMethod(node, ctx);
26
+ break;
27
+ case 'singleton_method':
28
+ handleRubySingletonMethod(node, ctx);
29
+ break;
30
+ case 'assignment':
31
+ handleRubyAssignment(node, ctx);
32
+ break;
33
+ case 'call':
34
+ handleRubyCall(node, ctx);
35
+ break;
36
+ }
37
+ for (let i = 0; i < node.childCount; i++)
38
+ walkRubyNode(node.child(i), ctx);
39
+ }
40
+ // ── Walk-path per-node-type handlers ────────────────────────────────────────
41
+ function handleRubyClass(node, ctx) {
42
+ const nameNode = node.childForFieldName('name');
43
+ if (!nameNode)
44
+ return;
45
+ const classChildren = extractRubyClassChildren(node);
46
+ ctx.definitions.push({
47
+ name: nameNode.text,
48
+ kind: 'class',
49
+ line: node.startPosition.row + 1,
50
+ endLine: nodeEndLine(node),
51
+ children: classChildren.length > 0 ? classChildren : undefined,
52
+ });
53
+ const superclass = node.childForFieldName('superclass');
54
+ if (superclass) {
55
+ for (let i = 0; i < superclass.childCount; i++) {
56
+ const child = superclass.child(i);
57
+ if (child && (child.type === 'constant' || child.type === 'scope_resolution')) {
58
+ ctx.classes.push({
59
+ name: nameNode.text,
60
+ extends: child.text,
61
+ line: node.startPosition.row + 1,
62
+ });
63
+ break;
64
+ }
65
+ }
66
+ if (superclass.type === 'superclass') {
67
+ for (let i = 0; i < superclass.childCount; i++) {
68
+ const child = superclass.child(i);
69
+ if (child && (child.type === 'constant' || child.type === 'scope_resolution')) {
70
+ ctx.classes.push({
71
+ name: nameNode.text,
72
+ extends: child.text,
73
+ line: node.startPosition.row + 1,
74
+ });
75
+ break;
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ function handleRubyModule(node, ctx) {
82
+ const nameNode = node.childForFieldName('name');
83
+ if (!nameNode)
84
+ return;
85
+ const moduleChildren = extractRubyBodyConstants(node);
86
+ ctx.definitions.push({
87
+ name: nameNode.text,
88
+ kind: 'module',
89
+ line: node.startPosition.row + 1,
90
+ endLine: nodeEndLine(node),
91
+ children: moduleChildren.length > 0 ? moduleChildren : undefined,
92
+ });
93
+ }
94
+ function handleRubyMethod(node, ctx) {
95
+ const nameNode = node.childForFieldName('name');
96
+ if (!nameNode)
97
+ return;
98
+ const parentClass = findRubyParentClass(node);
99
+ const fullName = parentClass ? `${parentClass}.${nameNode.text}` : nameNode.text;
100
+ const params = extractRubyParameters(node);
101
+ ctx.definitions.push({
102
+ name: fullName,
103
+ kind: 'method',
104
+ line: node.startPosition.row + 1,
105
+ endLine: nodeEndLine(node),
106
+ children: params.length > 0 ? params : undefined,
107
+ });
108
+ }
109
+ function handleRubySingletonMethod(node, ctx) {
110
+ const nameNode = node.childForFieldName('name');
111
+ if (!nameNode)
112
+ return;
113
+ const parentClass = findRubyParentClass(node);
114
+ const fullName = parentClass ? `${parentClass}.${nameNode.text}` : nameNode.text;
115
+ const params = extractRubyParameters(node);
116
+ ctx.definitions.push({
117
+ name: fullName,
118
+ kind: 'function',
119
+ line: node.startPosition.row + 1,
120
+ endLine: nodeEndLine(node),
121
+ children: params.length > 0 ? params : undefined,
122
+ });
123
+ }
124
+ function handleRubyAssignment(node, ctx) {
125
+ if (node.parent && node.parent.type === 'program') {
126
+ const left = node.childForFieldName('left');
127
+ if (left && left.type === 'constant') {
128
+ ctx.definitions.push({
129
+ name: left.text,
130
+ kind: 'constant',
131
+ line: node.startPosition.row + 1,
132
+ endLine: nodeEndLine(node),
133
+ });
134
+ }
135
+ }
136
+ }
137
+ function handleRubyCall(node, ctx) {
138
+ const methodNode = node.childForFieldName('method');
139
+ if (!methodNode)
140
+ return;
141
+ if (methodNode.text === 'require' || methodNode.text === 'require_relative') {
142
+ handleRubyRequire(node, ctx);
143
+ }
144
+ else if (methodNode.text === 'include' ||
145
+ methodNode.text === 'extend' ||
146
+ methodNode.text === 'prepend') {
147
+ handleRubyModuleInclusion(node, methodNode, ctx);
148
+ }
149
+ else {
150
+ const recv = node.childForFieldName('receiver');
151
+ const call = { name: methodNode.text, line: node.startPosition.row + 1 };
152
+ if (recv)
153
+ call.receiver = recv.text;
154
+ ctx.calls.push(call);
155
+ }
156
+ }
157
+ function handleRubyRequire(node, ctx) {
158
+ const args = node.childForFieldName('arguments');
159
+ if (!args)
160
+ return;
161
+ for (let i = 0; i < args.childCount; i++) {
162
+ const arg = args.child(i);
163
+ if (arg && (arg.type === 'string' || arg.type === 'string_content')) {
164
+ const strContent = arg.text.replace(/^['"]|['"]$/g, '');
165
+ ctx.imports.push({
166
+ source: strContent,
167
+ names: [strContent.split('/').pop()],
168
+ line: node.startPosition.row + 1,
169
+ rubyRequire: true,
170
+ });
171
+ break;
172
+ }
173
+ if (arg && arg.type === 'string') {
174
+ const content = findChild(arg, 'string_content');
175
+ if (content) {
176
+ ctx.imports.push({
177
+ source: content.text,
178
+ names: [content.text.split('/').pop()],
179
+ line: node.startPosition.row + 1,
180
+ rubyRequire: true,
181
+ });
182
+ break;
183
+ }
184
+ }
185
+ }
186
+ }
187
+ function handleRubyModuleInclusion(node, _methodNode, ctx) {
188
+ const parentClass = findRubyParentClass(node);
189
+ if (!parentClass)
190
+ return;
191
+ const args = node.childForFieldName('arguments');
192
+ if (!args)
193
+ return;
194
+ for (let i = 0; i < args.childCount; i++) {
195
+ const arg = args.child(i);
196
+ if (arg && (arg.type === 'constant' || arg.type === 'scope_resolution')) {
197
+ ctx.classes.push({
198
+ name: parentClass,
199
+ implements: arg.text,
200
+ line: node.startPosition.row + 1,
201
+ });
202
+ }
203
+ }
204
+ }
205
+ function findRubyParentClass(node) {
206
+ let current = node.parent;
207
+ while (current) {
208
+ if (current.type === 'class' || current.type === 'module') {
209
+ const nameNode = current.childForFieldName('name');
210
+ return nameNode ? nameNode.text : null;
211
+ }
212
+ current = current.parent;
213
+ }
214
+ return null;
215
+ }
216
+ // ── Child extraction helpers ────────────────────────────────────────────────
217
+ const RUBY_PARAM_TYPES = new Set([
218
+ 'identifier',
219
+ 'optional_parameter',
220
+ 'splat_parameter',
221
+ 'hash_splat_parameter',
222
+ 'block_parameter',
223
+ 'keyword_parameter',
224
+ ]);
225
+ function extractRubyParameters(methodNode) {
226
+ const params = [];
227
+ const paramList = methodNode.childForFieldName('parameters') || findChild(methodNode, 'method_parameters');
228
+ if (!paramList)
229
+ return params;
230
+ for (let i = 0; i < paramList.childCount; i++) {
231
+ const param = paramList.child(i);
232
+ if (!param || !RUBY_PARAM_TYPES.has(param.type))
233
+ continue;
234
+ let name;
235
+ if (param.type === 'identifier') {
236
+ name = param.text;
237
+ }
238
+ else {
239
+ // Compound parameter types have an identifier child for the name
240
+ const id = findChild(param, 'identifier');
241
+ name = id ? id.text : param.text;
242
+ }
243
+ params.push({ name, kind: 'parameter', line: param.startPosition.row + 1 });
244
+ }
245
+ return params;
246
+ }
247
+ function extractRubyBodyConstants(containerNode) {
248
+ const children = [];
249
+ const body = containerNode.childForFieldName('body') || findChild(containerNode, 'body');
250
+ if (!body)
251
+ return children;
252
+ for (let i = 0; i < body.childCount; i++) {
253
+ const child = body.child(i);
254
+ if (!child || child.type !== 'assignment')
255
+ continue;
256
+ const left = child.childForFieldName('left');
257
+ if (left && left.type === 'constant') {
258
+ children.push({ name: left.text, kind: 'constant', line: child.startPosition.row + 1 });
259
+ }
260
+ }
261
+ return children;
262
+ }
263
+ function extractRubyClassChildren(classNode) {
264
+ const children = [];
265
+ const body = classNode.childForFieldName('body') || findChild(classNode, 'body');
266
+ if (!body)
267
+ return children;
268
+ for (let i = 0; i < body.childCount; i++) {
269
+ const child = body.child(i);
270
+ if (!child || child.type !== 'assignment')
271
+ continue;
272
+ const left = child.childForFieldName('left');
273
+ if (!left)
274
+ continue;
275
+ if (left.type === 'instance_variable') {
276
+ children.push({ name: left.text, kind: 'property', line: child.startPosition.row + 1 });
277
+ }
278
+ else if (left.type === 'constant') {
279
+ children.push({ name: left.text, kind: 'constant', line: child.startPosition.row + 1 });
280
+ }
281
+ }
282
+ return children;
283
+ }
284
+ //# sourceMappingURL=ruby.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruby.js","sourceRoot":"","sources":["../../src/extractors/ruby.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAI,EAAE,SAAS;IAChD,MAAM,GAAG,GAAG;Q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5B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;YAAE,SAAS;QACpD,MAAM,IAAI,GAAG,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,IAAI,IAAI,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1F,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1F,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Extract symbols from Rust files.
3
+ */
4
+ export function extractRustSymbols(tree: any, _filePath: any): {
5
+ definitions: never[];
6
+ calls: never[];
7
+ imports: never[];
8
+ classes: never[];
9
+ exports: never[];
10
+ typeMap: Map<any, any>;
11
+ };
12
+ //# sourceMappingURL=rust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rust.d.ts","sourceRoot":"","sources":["../../src/extractors/rust.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;;;;;;;EAaC"}
@@ -0,0 +1,366 @@
1
+ import { findChild, nodeEndLine, rustVisibility } from './helpers.js';
2
+ /**
3
+ * Extract symbols from Rust files.
4
+ */
5
+ export function extractRustSymbols(tree, _filePath) {
6
+ const ctx = {
7
+ definitions: [],
8
+ calls: [],
9
+ imports: [],
10
+ classes: [],
11
+ exports: [],
12
+ typeMap: new Map(),
13
+ };
14
+ walkRustNode(tree.rootNode, ctx);
15
+ extractRustTypeMap(tree.rootNode, ctx);
16
+ return ctx;
17
+ }
18
+ function walkRustNode(node, ctx) {
19
+ switch (node.type) {
20
+ case 'function_item':
21
+ handleRustFuncItem(node, ctx);
22
+ break;
23
+ case 'struct_item':
24
+ handleRustStructItem(node, ctx);
25
+ break;
26
+ case 'enum_item':
27
+ handleRustEnumItem(node, ctx);
28
+ break;
29
+ case 'const_item':
30
+ handleRustConstItem(node, ctx);
31
+ break;
32
+ case 'trait_item':
33
+ handleRustTraitItem(node, ctx);
34
+ break;
35
+ case 'impl_item':
36
+ handleRustImplItem(node, ctx);
37
+ break;
38
+ case 'use_declaration':
39
+ handleRustUseDecl(node, ctx);
40
+ break;
41
+ case 'call_expression':
42
+ handleRustCallExpr(node, ctx);
43
+ break;
44
+ case 'macro_invocation':
45
+ handleRustMacroInvocation(node, ctx);
46
+ break;
47
+ }
48
+ for (let i = 0; i < node.childCount; i++)
49
+ walkRustNode(node.child(i), ctx);
50
+ }
51
+ // ── Walk-path per-node-type handlers ────────────────────────────────────────
52
+ function handleRustFuncItem(node, ctx) {
53
+ // Skip default-impl functions already emitted by handleRustTraitItem
54
+ if (node.parent?.parent?.type === 'trait_item')
55
+ return;
56
+ const nameNode = node.childForFieldName('name');
57
+ if (!nameNode)
58
+ return;
59
+ const implType = findCurrentImpl(node);
60
+ const fullName = implType ? `${implType}.${nameNode.text}` : nameNode.text;
61
+ const kind = implType ? 'method' : 'function';
62
+ const params = extractRustParameters(node.childForFieldName('parameters'));
63
+ ctx.definitions.push({
64
+ name: fullName,
65
+ kind,
66
+ line: node.startPosition.row + 1,
67
+ endLine: nodeEndLine(node),
68
+ children: params.length > 0 ? params : undefined,
69
+ visibility: rustVisibility(node),
70
+ });
71
+ }
72
+ function handleRustStructItem(node, ctx) {
73
+ const nameNode = node.childForFieldName('name');
74
+ if (!nameNode)
75
+ return;
76
+ const fields = extractStructFields(node);
77
+ ctx.definitions.push({
78
+ name: nameNode.text,
79
+ kind: 'struct',
80
+ line: node.startPosition.row + 1,
81
+ endLine: nodeEndLine(node),
82
+ children: fields.length > 0 ? fields : undefined,
83
+ visibility: rustVisibility(node),
84
+ });
85
+ }
86
+ function handleRustEnumItem(node, ctx) {
87
+ const nameNode = node.childForFieldName('name');
88
+ if (!nameNode)
89
+ return;
90
+ const variants = extractEnumVariants(node);
91
+ ctx.definitions.push({
92
+ name: nameNode.text,
93
+ kind: 'enum',
94
+ line: node.startPosition.row + 1,
95
+ endLine: nodeEndLine(node),
96
+ children: variants.length > 0 ? variants : undefined,
97
+ });
98
+ }
99
+ function handleRustConstItem(node, ctx) {
100
+ const nameNode = node.childForFieldName('name');
101
+ if (!nameNode)
102
+ return;
103
+ ctx.definitions.push({
104
+ name: nameNode.text,
105
+ kind: 'constant',
106
+ line: node.startPosition.row + 1,
107
+ endLine: nodeEndLine(node),
108
+ });
109
+ }
110
+ function handleRustTraitItem(node, ctx) {
111
+ const nameNode = node.childForFieldName('name');
112
+ if (!nameNode)
113
+ return;
114
+ ctx.definitions.push({
115
+ name: nameNode.text,
116
+ kind: 'trait',
117
+ line: node.startPosition.row + 1,
118
+ endLine: nodeEndLine(node),
119
+ });
120
+ const body = node.childForFieldName('body');
121
+ if (body) {
122
+ for (let i = 0; i < body.childCount; i++) {
123
+ const child = body.child(i);
124
+ if (child && (child.type === 'function_signature_item' || child.type === 'function_item')) {
125
+ const methName = child.childForFieldName('name');
126
+ if (methName) {
127
+ ctx.definitions.push({
128
+ name: `${nameNode.text}.${methName.text}`,
129
+ kind: 'method',
130
+ line: child.startPosition.row + 1,
131
+ endLine: child.endPosition.row + 1,
132
+ });
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ function handleRustImplItem(node, ctx) {
139
+ const typeNode = node.childForFieldName('type');
140
+ const traitNode = node.childForFieldName('trait');
141
+ if (typeNode && traitNode) {
142
+ ctx.classes.push({
143
+ name: typeNode.text,
144
+ implements: traitNode.text,
145
+ line: node.startPosition.row + 1,
146
+ });
147
+ }
148
+ }
149
+ function handleRustUseDecl(node, ctx) {
150
+ const argNode = node.child(1);
151
+ if (!argNode)
152
+ return;
153
+ const usePaths = extractRustUsePath(argNode);
154
+ for (const imp of usePaths) {
155
+ ctx.imports.push({
156
+ source: imp.source,
157
+ names: imp.names,
158
+ line: node.startPosition.row + 1,
159
+ rustUse: true,
160
+ });
161
+ }
162
+ }
163
+ function handleRustCallExpr(node, ctx) {
164
+ const fn = node.childForFieldName('function');
165
+ if (!fn)
166
+ return;
167
+ if (fn.type === 'identifier') {
168
+ ctx.calls.push({ name: fn.text, line: node.startPosition.row + 1 });
169
+ }
170
+ else if (fn.type === 'field_expression') {
171
+ const field = fn.childForFieldName('field');
172
+ if (field) {
173
+ const value = fn.childForFieldName('value');
174
+ const call = { name: field.text, line: node.startPosition.row + 1 };
175
+ if (value)
176
+ call.receiver = value.text;
177
+ ctx.calls.push(call);
178
+ }
179
+ }
180
+ else if (fn.type === 'scoped_identifier') {
181
+ const name = fn.childForFieldName('name');
182
+ if (name) {
183
+ const path = fn.childForFieldName('path');
184
+ const call = { name: name.text, line: node.startPosition.row + 1 };
185
+ if (path)
186
+ call.receiver = path.text;
187
+ ctx.calls.push(call);
188
+ }
189
+ }
190
+ }
191
+ function handleRustMacroInvocation(node, ctx) {
192
+ const macroNode = node.child(0);
193
+ if (macroNode) {
194
+ ctx.calls.push({ name: `${macroNode.text}!`, line: node.startPosition.row + 1 });
195
+ }
196
+ }
197
+ function findCurrentImpl(node) {
198
+ let current = node.parent;
199
+ while (current) {
200
+ if (current.type === 'impl_item') {
201
+ const typeNode = current.childForFieldName('type');
202
+ return typeNode ? typeNode.text : null;
203
+ }
204
+ current = current.parent;
205
+ }
206
+ return null;
207
+ }
208
+ // ── Child extraction helpers ────────────────────────────────────────────────
209
+ function extractRustParameters(paramListNode) {
210
+ const params = [];
211
+ if (!paramListNode)
212
+ return params;
213
+ for (let i = 0; i < paramListNode.childCount; i++) {
214
+ const param = paramListNode.child(i);
215
+ if (!param)
216
+ continue;
217
+ if (param.type === 'self_parameter') {
218
+ params.push({ name: 'self', kind: 'parameter', line: param.startPosition.row + 1 });
219
+ }
220
+ else if (param.type === 'parameter') {
221
+ const pattern = param.childForFieldName('pattern');
222
+ if (pattern) {
223
+ params.push({ name: pattern.text, kind: 'parameter', line: param.startPosition.row + 1 });
224
+ }
225
+ }
226
+ }
227
+ return params;
228
+ }
229
+ function extractStructFields(structNode) {
230
+ const fields = [];
231
+ const fieldList = structNode.childForFieldName('body') || findChild(structNode, 'field_declaration_list');
232
+ if (!fieldList)
233
+ return fields;
234
+ for (let i = 0; i < fieldList.childCount; i++) {
235
+ const field = fieldList.child(i);
236
+ if (!field || field.type !== 'field_declaration')
237
+ continue;
238
+ const nameNode = field.childForFieldName('name');
239
+ if (nameNode) {
240
+ fields.push({ name: nameNode.text, kind: 'property', line: field.startPosition.row + 1 });
241
+ }
242
+ }
243
+ return fields;
244
+ }
245
+ function extractEnumVariants(enumNode) {
246
+ const variants = [];
247
+ const body = enumNode.childForFieldName('body') || findChild(enumNode, 'enum_variant_list');
248
+ if (!body)
249
+ return variants;
250
+ for (let i = 0; i < body.childCount; i++) {
251
+ const variant = body.child(i);
252
+ if (!variant || variant.type !== 'enum_variant')
253
+ continue;
254
+ const nameNode = variant.childForFieldName('name');
255
+ if (nameNode) {
256
+ variants.push({ name: nameNode.text, kind: 'constant', line: variant.startPosition.row + 1 });
257
+ }
258
+ }
259
+ return variants;
260
+ }
261
+ function extractRustTypeMap(node, ctx) {
262
+ extractRustTypeMapDepth(node, ctx, 0);
263
+ }
264
+ function extractRustTypeMapDepth(node, ctx, depth) {
265
+ if (depth >= 200)
266
+ return;
267
+ // let x: MyType = ...
268
+ if (node.type === 'let_declaration') {
269
+ const pattern = node.childForFieldName('pattern');
270
+ const typeNode = node.childForFieldName('type');
271
+ if (pattern && pattern.type === 'identifier' && typeNode) {
272
+ const typeName = extractRustTypeName(typeNode);
273
+ if (typeName)
274
+ ctx.typeMap.set(pattern.text, { type: typeName, confidence: 0.9 });
275
+ }
276
+ }
277
+ // fn foo(x: MyType) — parameter node has pattern + type fields
278
+ if (node.type === 'parameter') {
279
+ const pattern = node.childForFieldName('pattern');
280
+ const typeNode = node.childForFieldName('type');
281
+ if (pattern && typeNode) {
282
+ const name = pattern.type === 'identifier' ? pattern.text : null;
283
+ if (name && name !== 'self' && name !== '&self' && name !== '&mut self') {
284
+ const typeName = extractRustTypeName(typeNode);
285
+ if (typeName)
286
+ ctx.typeMap.set(name, { type: typeName, confidence: 0.9 });
287
+ }
288
+ }
289
+ }
290
+ for (let i = 0; i < node.childCount; i++) {
291
+ const child = node.child(i);
292
+ if (child)
293
+ extractRustTypeMapDepth(child, ctx, depth + 1);
294
+ }
295
+ }
296
+ function extractRustTypeName(typeNode) {
297
+ if (!typeNode)
298
+ return null;
299
+ const t = typeNode.type;
300
+ if (t === 'type_identifier' || t === 'identifier')
301
+ return typeNode.text;
302
+ if (t === 'scoped_type_identifier')
303
+ return typeNode.text;
304
+ // Reference: &MyType or &mut MyType → MyType
305
+ if (t === 'reference_type') {
306
+ for (let i = 0; i < typeNode.childCount; i++) {
307
+ const child = typeNode.child(i);
308
+ if (child && (child.type === 'type_identifier' || child.type === 'scoped_type_identifier')) {
309
+ return child.text;
310
+ }
311
+ }
312
+ }
313
+ // Generic: Vec<T> → Vec
314
+ if (t === 'generic_type') {
315
+ const first = typeNode.child(0);
316
+ return first ? first.text : null;
317
+ }
318
+ return null;
319
+ }
320
+ function extractRustUsePath(node) {
321
+ if (!node)
322
+ return [];
323
+ if (node.type === 'use_list') {
324
+ const results = [];
325
+ for (let i = 0; i < node.childCount; i++) {
326
+ results.push(...extractRustUsePath(node.child(i)));
327
+ }
328
+ return results;
329
+ }
330
+ if (node.type === 'scoped_use_list') {
331
+ const pathNode = node.childForFieldName('path');
332
+ const listNode = node.childForFieldName('list');
333
+ const prefix = pathNode ? pathNode.text : '';
334
+ if (listNode) {
335
+ const names = [];
336
+ for (let i = 0; i < listNode.childCount; i++) {
337
+ const child = listNode.child(i);
338
+ if (child &&
339
+ (child.type === 'identifier' || child.type === 'use_as_clause' || child.type === 'self')) {
340
+ const name = child.type === 'use_as_clause'
341
+ ? (child.childForFieldName('alias') || child.childForFieldName('name'))?.text
342
+ : child.text;
343
+ if (name)
344
+ names.push(name);
345
+ }
346
+ }
347
+ return [{ source: prefix, names }];
348
+ }
349
+ return [{ source: prefix, names: [] }];
350
+ }
351
+ if (node.type === 'use_as_clause') {
352
+ const name = node.childForFieldName('alias') || node.childForFieldName('name');
353
+ return [{ source: node.text, names: name ? [name.text] : [] }];
354
+ }
355
+ if (node.type === 'use_wildcard') {
356
+ const pathNode = node.childForFieldName('path');
357
+ return [{ source: pathNode ? pathNode.text : '*', names: ['*'] }];
358
+ }
359
+ if (node.type === 'scoped_identifier' || node.type === 'identifier') {
360
+ const text = node.text;
361
+ const lastName = text.split('::').pop();
362
+ return [{ source: text, names: [lastName] }];
363
+ }
364
+ return [];
365
+ }
366
+ //# sourceMappingURL=rust.js.map