kirograph 0.12.1

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 (434) hide show
  1. package/README.md +1171 -0
  2. package/dist/architecture/index.d.ts +11 -0
  3. package/dist/architecture/index.d.ts.map +1 -0
  4. package/dist/architecture/index.js +207 -0
  5. package/dist/architecture/index.js.map +7 -0
  6. package/dist/architecture/layers/csharp.d.ts +6 -0
  7. package/dist/architecture/layers/csharp.d.ts.map +1 -0
  8. package/dist/architecture/layers/csharp.js +100 -0
  9. package/dist/architecture/layers/csharp.js.map +7 -0
  10. package/dist/architecture/layers/elixir.js +116 -0
  11. package/dist/architecture/layers/elixir.js.map +7 -0
  12. package/dist/architecture/layers/go.d.ts +7 -0
  13. package/dist/architecture/layers/go.d.ts.map +1 -0
  14. package/dist/architecture/layers/go.js +117 -0
  15. package/dist/architecture/layers/go.js.map +7 -0
  16. package/dist/architecture/layers/index.d.ts +30 -0
  17. package/dist/architecture/layers/index.d.ts.map +1 -0
  18. package/dist/architecture/layers/index.js +100 -0
  19. package/dist/architecture/layers/index.js.map +7 -0
  20. package/dist/architecture/layers/java.d.ts +7 -0
  21. package/dist/architecture/layers/java.d.ts.map +1 -0
  22. package/dist/architecture/layers/java.js +119 -0
  23. package/dist/architecture/layers/java.js.map +7 -0
  24. package/dist/architecture/layers/python.d.ts +7 -0
  25. package/dist/architecture/layers/python.d.ts.map +1 -0
  26. package/dist/architecture/layers/python.js +111 -0
  27. package/dist/architecture/layers/python.js.map +7 -0
  28. package/dist/architecture/layers/ruby.d.ts +6 -0
  29. package/dist/architecture/layers/ruby.d.ts.map +1 -0
  30. package/dist/architecture/layers/ruby.js +95 -0
  31. package/dist/architecture/layers/ruby.js.map +7 -0
  32. package/dist/architecture/layers/rust.d.ts +6 -0
  33. package/dist/architecture/layers/rust.d.ts.map +1 -0
  34. package/dist/architecture/layers/rust.js +98 -0
  35. package/dist/architecture/layers/rust.js.map +7 -0
  36. package/dist/architecture/layers/types.d.ts +2 -0
  37. package/dist/architecture/layers/types.d.ts.map +1 -0
  38. package/dist/architecture/layers/types.js +17 -0
  39. package/dist/architecture/layers/types.js.map +7 -0
  40. package/dist/architecture/layers/typescript.d.ts +9 -0
  41. package/dist/architecture/layers/typescript.d.ts.map +1 -0
  42. package/dist/architecture/layers/typescript.js +143 -0
  43. package/dist/architecture/layers/typescript.js.map +7 -0
  44. package/dist/architecture/manifest/cargo.d.ts +3 -0
  45. package/dist/architecture/manifest/cargo.d.ts.map +1 -0
  46. package/dist/architecture/manifest/cargo.js +94 -0
  47. package/dist/architecture/manifest/cargo.js.map +7 -0
  48. package/dist/architecture/manifest/csproj.d.ts +3 -0
  49. package/dist/architecture/manifest/csproj.d.ts.map +1 -0
  50. package/dist/architecture/manifest/csproj.js +75 -0
  51. package/dist/architecture/manifest/csproj.js.map +7 -0
  52. package/dist/architecture/manifest/go.d.ts +3 -0
  53. package/dist/architecture/manifest/go.d.ts.map +1 -0
  54. package/dist/architecture/manifest/go.js +85 -0
  55. package/dist/architecture/manifest/go.js.map +7 -0
  56. package/dist/architecture/manifest/gradle.d.ts +3 -0
  57. package/dist/architecture/manifest/gradle.d.ts.map +1 -0
  58. package/dist/architecture/manifest/gradle.js +80 -0
  59. package/dist/architecture/manifest/gradle.js.map +7 -0
  60. package/dist/architecture/manifest/index.d.ts +12 -0
  61. package/dist/architecture/manifest/index.d.ts.map +1 -0
  62. package/dist/architecture/manifest/index.js +130 -0
  63. package/dist/architecture/manifest/index.js.map +7 -0
  64. package/dist/architecture/manifest/maven.d.ts +3 -0
  65. package/dist/architecture/manifest/maven.d.ts.map +1 -0
  66. package/dist/architecture/manifest/maven.js +76 -0
  67. package/dist/architecture/manifest/maven.js.map +7 -0
  68. package/dist/architecture/manifest/npm.d.ts +3 -0
  69. package/dist/architecture/manifest/npm.d.ts.map +1 -0
  70. package/dist/architecture/manifest/npm.js +103 -0
  71. package/dist/architecture/manifest/npm.js.map +7 -0
  72. package/dist/architecture/manifest/python.d.ts +3 -0
  73. package/dist/architecture/manifest/python.d.ts.map +1 -0
  74. package/dist/architecture/manifest/python.js +105 -0
  75. package/dist/architecture/manifest/python.js.map +7 -0
  76. package/dist/architecture/manifest/types.d.ts +2 -0
  77. package/dist/architecture/manifest/types.d.ts.map +1 -0
  78. package/dist/architecture/manifest/types.js +17 -0
  79. package/dist/architecture/manifest/types.js.map +7 -0
  80. package/dist/architecture/types.d.ts +91 -0
  81. package/dist/architecture/types.d.ts.map +1 -0
  82. package/dist/architecture/types.js +17 -0
  83. package/dist/architecture/types.js.map +7 -0
  84. package/dist/assets/logo.png +0 -0
  85. package/dist/banner.d.ts +6 -0
  86. package/dist/banner.d.ts.map +1 -0
  87. package/dist/banner.js +67 -0
  88. package/dist/banner.js.map +1 -0
  89. package/dist/bin/banner.d.ts +6 -0
  90. package/dist/bin/banner.d.ts.map +1 -0
  91. package/dist/bin/banner.js +88 -0
  92. package/dist/bin/banner.js.map +7 -0
  93. package/dist/bin/commands/affected.d.ts +3 -0
  94. package/dist/bin/commands/affected.d.ts.map +1 -0
  95. package/dist/bin/commands/affected.js +78 -0
  96. package/dist/bin/commands/affected.js.map +7 -0
  97. package/dist/bin/commands/architecture.d.ts +3 -0
  98. package/dist/bin/commands/architecture.d.ts.map +1 -0
  99. package/dist/bin/commands/architecture.js +125 -0
  100. package/dist/bin/commands/architecture.js.map +7 -0
  101. package/dist/bin/commands/caveman.js +136 -0
  102. package/dist/bin/commands/caveman.js.map +7 -0
  103. package/dist/bin/commands/context.d.ts +3 -0
  104. package/dist/bin/commands/context.d.ts.map +1 -0
  105. package/dist/bin/commands/context.js +81 -0
  106. package/dist/bin/commands/context.js.map +7 -0
  107. package/dist/bin/commands/coupling.d.ts +3 -0
  108. package/dist/bin/commands/coupling.d.ts.map +1 -0
  109. package/dist/bin/commands/coupling.js +164 -0
  110. package/dist/bin/commands/coupling.js.map +7 -0
  111. package/dist/bin/commands/dashboard.d.ts +3 -0
  112. package/dist/bin/commands/dashboard.d.ts.map +1 -0
  113. package/dist/bin/commands/dashboard.js +209 -0
  114. package/dist/bin/commands/dashboard.js.map +7 -0
  115. package/dist/bin/commands/dead-code.js +77 -0
  116. package/dist/bin/commands/dead-code.js.map +7 -0
  117. package/dist/bin/commands/export.js +2620 -0
  118. package/dist/bin/commands/export.js.map +7 -0
  119. package/dist/bin/commands/files.d.ts +3 -0
  120. package/dist/bin/commands/files.d.ts.map +1 -0
  121. package/dist/bin/commands/files.js +104 -0
  122. package/dist/bin/commands/files.js.map +7 -0
  123. package/dist/bin/commands/help.d.ts +4 -0
  124. package/dist/bin/commands/help.d.ts.map +1 -0
  125. package/dist/bin/commands/help.js +212 -0
  126. package/dist/bin/commands/help.js.map +7 -0
  127. package/dist/bin/commands/hotspots.js +77 -0
  128. package/dist/bin/commands/hotspots.js.map +7 -0
  129. package/dist/bin/commands/index.d.ts +3 -0
  130. package/dist/bin/commands/index.d.ts.map +1 -0
  131. package/dist/bin/commands/index.js +58 -0
  132. package/dist/bin/commands/index.js.map +7 -0
  133. package/dist/bin/commands/init.d.ts +3 -0
  134. package/dist/bin/commands/init.d.ts.map +1 -0
  135. package/dist/bin/commands/init.js +68 -0
  136. package/dist/bin/commands/init.js.map +7 -0
  137. package/dist/bin/commands/install.d.ts +3 -0
  138. package/dist/bin/commands/install.d.ts.map +1 -0
  139. package/dist/bin/commands/install.js +34 -0
  140. package/dist/bin/commands/install.js.map +7 -0
  141. package/dist/bin/commands/mark-dirty.d.ts +3 -0
  142. package/dist/bin/commands/mark-dirty.d.ts.map +1 -0
  143. package/dist/bin/commands/mark-dirty.js +51 -0
  144. package/dist/bin/commands/mark-dirty.js.map +7 -0
  145. package/dist/bin/commands/package.d.ts +3 -0
  146. package/dist/bin/commands/package.d.ts.map +1 -0
  147. package/dist/bin/commands/package.js +139 -0
  148. package/dist/bin/commands/package.js.map +7 -0
  149. package/dist/bin/commands/path.js +93 -0
  150. package/dist/bin/commands/path.js.map +7 -0
  151. package/dist/bin/commands/qdrant.d.ts +3 -0
  152. package/dist/bin/commands/qdrant.d.ts.map +1 -0
  153. package/dist/bin/commands/qdrant.js +159 -0
  154. package/dist/bin/commands/qdrant.js.map +1 -0
  155. package/dist/bin/commands/query.d.ts +3 -0
  156. package/dist/bin/commands/query.d.ts.map +1 -0
  157. package/dist/bin/commands/query.js +47 -0
  158. package/dist/bin/commands/query.js.map +7 -0
  159. package/dist/bin/commands/serve.d.ts +3 -0
  160. package/dist/bin/commands/serve.d.ts.map +1 -0
  161. package/dist/bin/commands/serve.js +59 -0
  162. package/dist/bin/commands/serve.js.map +7 -0
  163. package/dist/bin/commands/snapshot.js +122 -0
  164. package/dist/bin/commands/snapshot.js.map +7 -0
  165. package/dist/bin/commands/status.d.ts +3 -0
  166. package/dist/bin/commands/status.d.ts.map +1 -0
  167. package/dist/bin/commands/status.js +107 -0
  168. package/dist/bin/commands/status.js.map +7 -0
  169. package/dist/bin/commands/stop.d.ts +3 -0
  170. package/dist/bin/commands/stop.d.ts.map +1 -0
  171. package/dist/bin/commands/stop.js +81 -0
  172. package/dist/bin/commands/stop.js.map +1 -0
  173. package/dist/bin/commands/surprising.js +79 -0
  174. package/dist/bin/commands/surprising.js.map +7 -0
  175. package/dist/bin/commands/sync-if-dirty.d.ts +3 -0
  176. package/dist/bin/commands/sync-if-dirty.d.ts.map +1 -0
  177. package/dist/bin/commands/sync-if-dirty.js +67 -0
  178. package/dist/bin/commands/sync-if-dirty.js.map +7 -0
  179. package/dist/bin/commands/sync.d.ts +3 -0
  180. package/dist/bin/commands/sync.d.ts.map +1 -0
  181. package/dist/bin/commands/sync.js +81 -0
  182. package/dist/bin/commands/sync.js.map +7 -0
  183. package/dist/bin/commands/typesense.d.ts +3 -0
  184. package/dist/bin/commands/typesense.d.ts.map +1 -0
  185. package/dist/bin/commands/typesense.js +126 -0
  186. package/dist/bin/commands/typesense.js.map +1 -0
  187. package/dist/bin/commands/uninit.d.ts +4 -0
  188. package/dist/bin/commands/uninit.d.ts.map +1 -0
  189. package/dist/bin/commands/uninit.js +123 -0
  190. package/dist/bin/commands/uninit.js.map +7 -0
  191. package/dist/bin/commands/unlock.d.ts +3 -0
  192. package/dist/bin/commands/unlock.d.ts.map +1 -0
  193. package/dist/bin/commands/unlock.js +53 -0
  194. package/dist/bin/commands/unlock.js.map +7 -0
  195. package/dist/bin/commands/utils.d.ts +12 -0
  196. package/dist/bin/commands/utils.d.ts.map +1 -0
  197. package/dist/bin/commands/utils.js +56 -0
  198. package/dist/bin/commands/utils.js.map +7 -0
  199. package/dist/bin/installer/archive.js +230 -0
  200. package/dist/bin/installer/archive.js.map +7 -0
  201. package/dist/bin/installer/caveman.js +57 -0
  202. package/dist/bin/installer/caveman.js.map +7 -0
  203. package/dist/bin/installer/cli-agent.d.ts +15 -0
  204. package/dist/bin/installer/cli-agent.d.ts.map +1 -0
  205. package/dist/bin/installer/cli-agent.js +89 -0
  206. package/dist/bin/installer/cli-agent.js.map +7 -0
  207. package/dist/bin/installer/config-prompt.d.ts +13 -0
  208. package/dist/bin/installer/config-prompt.d.ts.map +1 -0
  209. package/dist/bin/installer/config-prompt.js +158 -0
  210. package/dist/bin/installer/config-prompt.js.map +7 -0
  211. package/dist/bin/installer/dashboard.d.ts +3 -0
  212. package/dist/bin/installer/dashboard.d.ts.map +1 -0
  213. package/dist/bin/installer/dashboard.js +149 -0
  214. package/dist/bin/installer/dashboard.js.map +7 -0
  215. package/dist/bin/installer/hooks.d.ts +5 -0
  216. package/dist/bin/installer/hooks.d.ts.map +1 -0
  217. package/dist/bin/installer/hooks.js +155 -0
  218. package/dist/bin/installer/hooks.js.map +7 -0
  219. package/dist/bin/installer/index.d.ts +11 -0
  220. package/dist/bin/installer/index.d.ts.map +1 -0
  221. package/dist/bin/installer/index.js +228 -0
  222. package/dist/bin/installer/index.js.map +7 -0
  223. package/dist/bin/installer/mcp.d.ts +5 -0
  224. package/dist/bin/installer/mcp.d.ts.map +1 -0
  225. package/dist/bin/installer/mcp.js +80 -0
  226. package/dist/bin/installer/mcp.js.map +7 -0
  227. package/dist/bin/installer/prompts.d.ts +28 -0
  228. package/dist/bin/installer/prompts.d.ts.map +1 -0
  229. package/dist/bin/installer/prompts.js +134 -0
  230. package/dist/bin/installer/prompts.js.map +7 -0
  231. package/dist/bin/installer/qdrant-dashboard.d.ts +4 -0
  232. package/dist/bin/installer/qdrant-dashboard.d.ts.map +1 -0
  233. package/dist/bin/installer/qdrant-dashboard.js +115 -0
  234. package/dist/bin/installer/qdrant-dashboard.js.map +7 -0
  235. package/dist/bin/installer/steering.d.ts +5 -0
  236. package/dist/bin/installer/steering.d.ts.map +1 -0
  237. package/dist/bin/installer/steering.js +283 -0
  238. package/dist/bin/installer/steering.js.map +7 -0
  239. package/dist/bin/kirograph.d.ts +6 -0
  240. package/dist/bin/kirograph.d.ts.map +1 -0
  241. package/dist/bin/kirograph.js +95 -0
  242. package/dist/bin/kirograph.js.map +7 -0
  243. package/dist/bin/progress.d.ts +14 -0
  244. package/dist/bin/progress.d.ts.map +1 -0
  245. package/dist/bin/progress.js +201 -0
  246. package/dist/bin/progress.js.map +7 -0
  247. package/dist/bin/ui.d.ts +11 -0
  248. package/dist/bin/ui.d.ts.map +1 -0
  249. package/dist/bin/ui.js +71 -0
  250. package/dist/bin/ui.js.map +7 -0
  251. package/dist/config.d.ts +48 -0
  252. package/dist/config.d.ts.map +1 -0
  253. package/dist/config.js +273 -0
  254. package/dist/config.js.map +7 -0
  255. package/dist/context/index.d.ts +61 -0
  256. package/dist/context/index.d.ts.map +1 -0
  257. package/dist/context/index.js +224 -0
  258. package/dist/context/index.js.map +7 -0
  259. package/dist/core/file-tree.d.ts +15 -0
  260. package/dist/core/file-tree.d.ts.map +1 -0
  261. package/dist/core/file-tree.js +69 -0
  262. package/dist/core/file-tree.js.map +7 -0
  263. package/dist/core/lock-manager.d.ts +20 -0
  264. package/dist/core/lock-manager.d.ts.map +1 -0
  265. package/dist/core/lock-manager.js +120 -0
  266. package/dist/core/lock-manager.js.map +7 -0
  267. package/dist/core/pipeline.d.ts +37 -0
  268. package/dist/core/pipeline.d.ts.map +1 -0
  269. package/dist/core/pipeline.js +375 -0
  270. package/dist/core/pipeline.js.map +7 -0
  271. package/dist/core/snapshot.js +141 -0
  272. package/dist/core/snapshot.js.map +7 -0
  273. package/dist/db/database.d.ts +133 -0
  274. package/dist/db/database.d.ts.map +1 -0
  275. package/dist/db/database.js +929 -0
  276. package/dist/db/database.js.map +7 -0
  277. package/dist/db/schema.sql +174 -0
  278. package/dist/errors.d.ts +49 -0
  279. package/dist/errors.d.ts.map +1 -0
  280. package/dist/errors.js +160 -0
  281. package/dist/errors.js.map +7 -0
  282. package/dist/extraction/extractor.d.ts +29 -0
  283. package/dist/extraction/extractor.d.ts.map +1 -0
  284. package/dist/extraction/extractor.js +764 -0
  285. package/dist/extraction/extractor.js.map +7 -0
  286. package/dist/extraction/grammars.d.ts +48 -0
  287. package/dist/extraction/grammars.d.ts.map +1 -0
  288. package/dist/extraction/grammars.js +166 -0
  289. package/dist/extraction/grammars.js.map +7 -0
  290. package/dist/extraction/languages.d.ts +9 -0
  291. package/dist/extraction/languages.d.ts.map +1 -0
  292. package/dist/extraction/languages.js +103 -0
  293. package/dist/extraction/languages.js.map +7 -0
  294. package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  295. package/dist/frameworks/csharp.d.ts +8 -0
  296. package/dist/frameworks/csharp.d.ts.map +1 -0
  297. package/dist/frameworks/csharp.js +93 -0
  298. package/dist/frameworks/csharp.js.map +7 -0
  299. package/dist/frameworks/elixir.js +142 -0
  300. package/dist/frameworks/elixir.js.map +7 -0
  301. package/dist/frameworks/express.d.ts +8 -0
  302. package/dist/frameworks/express.d.ts.map +1 -0
  303. package/dist/frameworks/express.js +143 -0
  304. package/dist/frameworks/express.js.map +7 -0
  305. package/dist/frameworks/go.d.ts +8 -0
  306. package/dist/frameworks/go.d.ts.map +1 -0
  307. package/dist/frameworks/go.js +85 -0
  308. package/dist/frameworks/go.js.map +7 -0
  309. package/dist/frameworks/index.d.ts +30 -0
  310. package/dist/frameworks/index.d.ts.map +1 -0
  311. package/dist/frameworks/index.js +243 -0
  312. package/dist/frameworks/index.js.map +7 -0
  313. package/dist/frameworks/java.d.ts +8 -0
  314. package/dist/frameworks/java.d.ts.map +1 -0
  315. package/dist/frameworks/java.js +87 -0
  316. package/dist/frameworks/java.js.map +7 -0
  317. package/dist/frameworks/laravel.d.ts +9 -0
  318. package/dist/frameworks/laravel.d.ts.map +1 -0
  319. package/dist/frameworks/laravel.js +115 -0
  320. package/dist/frameworks/laravel.js.map +7 -0
  321. package/dist/frameworks/python.d.ts +10 -0
  322. package/dist/frameworks/python.d.ts.map +1 -0
  323. package/dist/frameworks/python.js +158 -0
  324. package/dist/frameworks/python.js.map +7 -0
  325. package/dist/frameworks/react.d.ts +9 -0
  326. package/dist/frameworks/react.d.ts.map +1 -0
  327. package/dist/frameworks/react.js +230 -0
  328. package/dist/frameworks/react.js.map +7 -0
  329. package/dist/frameworks/ruby.d.ts +8 -0
  330. package/dist/frameworks/ruby.d.ts.map +1 -0
  331. package/dist/frameworks/ruby.js +136 -0
  332. package/dist/frameworks/ruby.js.map +7 -0
  333. package/dist/frameworks/rust.d.ts +8 -0
  334. package/dist/frameworks/rust.d.ts.map +1 -0
  335. package/dist/frameworks/rust.js +82 -0
  336. package/dist/frameworks/rust.js.map +7 -0
  337. package/dist/frameworks/svelte.d.ts +8 -0
  338. package/dist/frameworks/svelte.d.ts.map +1 -0
  339. package/dist/frameworks/svelte.js +174 -0
  340. package/dist/frameworks/svelte.js.map +7 -0
  341. package/dist/frameworks/swift.d.ts +10 -0
  342. package/dist/frameworks/swift.d.ts.map +1 -0
  343. package/dist/frameworks/swift.js +151 -0
  344. package/dist/frameworks/swift.js.map +7 -0
  345. package/dist/frameworks/types.d.ts +37 -0
  346. package/dist/frameworks/types.d.ts.map +1 -0
  347. package/dist/frameworks/types.js +17 -0
  348. package/dist/frameworks/types.js.map +7 -0
  349. package/dist/graph/queries.d.ts +53 -0
  350. package/dist/graph/queries.d.ts.map +1 -0
  351. package/dist/graph/queries.js +224 -0
  352. package/dist/graph/queries.js.map +7 -0
  353. package/dist/graph/traversal.d.ts +35 -0
  354. package/dist/graph/traversal.d.ts.map +1 -0
  355. package/dist/graph/traversal.js +148 -0
  356. package/dist/graph/traversal.js.map +7 -0
  357. package/dist/index.d.ts +102 -0
  358. package/dist/index.d.ts.map +1 -0
  359. package/dist/index.js +303 -0
  360. package/dist/index.js.map +7 -0
  361. package/dist/installer/index.d.ts +10 -0
  362. package/dist/installer/index.d.ts.map +1 -0
  363. package/dist/installer/index.js +526 -0
  364. package/dist/installer/index.js.map +1 -0
  365. package/dist/mcp/server.d.ts +16 -0
  366. package/dist/mcp/server.d.ts.map +1 -0
  367. package/dist/mcp/server.js +116 -0
  368. package/dist/mcp/server.js.map +7 -0
  369. package/dist/mcp/tools.d.ts +37 -0
  370. package/dist/mcp/tools.d.ts.map +1 -0
  371. package/dist/mcp/tools.js +779 -0
  372. package/dist/mcp/tools.js.map +7 -0
  373. package/dist/mcp/transport.d.ts +29 -0
  374. package/dist/mcp/transport.d.ts.map +1 -0
  375. package/dist/mcp/transport.js +70 -0
  376. package/dist/mcp/transport.js.map +7 -0
  377. package/dist/resolution/index.d.ts +56 -0
  378. package/dist/resolution/index.d.ts.map +1 -0
  379. package/dist/resolution/index.js +384 -0
  380. package/dist/resolution/index.js.map +7 -0
  381. package/dist/resolution/name-matcher.d.ts +25 -0
  382. package/dist/resolution/name-matcher.d.ts.map +1 -0
  383. package/dist/resolution/name-matcher.js +60 -0
  384. package/dist/resolution/name-matcher.js.map +7 -0
  385. package/dist/scripts/postinstall.js +64 -0
  386. package/dist/search/query-utils.d.ts +21 -0
  387. package/dist/search/query-utils.d.ts.map +1 -0
  388. package/dist/search/query-utils.js +219 -0
  389. package/dist/search/query-utils.js.map +7 -0
  390. package/dist/search/searcher.d.ts +15 -0
  391. package/dist/search/searcher.d.ts.map +1 -0
  392. package/dist/search/searcher.js +49 -0
  393. package/dist/search/searcher.js.map +7 -0
  394. package/dist/sync/index.d.ts +33 -0
  395. package/dist/sync/index.d.ts.map +1 -0
  396. package/dist/sync/index.js +200 -0
  397. package/dist/sync/index.js.map +7 -0
  398. package/dist/types.d.ts +131 -0
  399. package/dist/types.d.ts.map +1 -0
  400. package/dist/types.js +37 -0
  401. package/dist/types.js.map +7 -0
  402. package/dist/utils.d.ts +52 -0
  403. package/dist/utils.d.ts.map +1 -0
  404. package/dist/utils.js +254 -0
  405. package/dist/utils.js.map +7 -0
  406. package/dist/vectors/index.d.ts +71 -0
  407. package/dist/vectors/index.d.ts.map +1 -0
  408. package/dist/vectors/index.js +480 -0
  409. package/dist/vectors/index.js.map +7 -0
  410. package/dist/vectors/lancedb-index.d.ts +50 -0
  411. package/dist/vectors/lancedb-index.d.ts.map +1 -0
  412. package/dist/vectors/lancedb-index.js +153 -0
  413. package/dist/vectors/lancedb-index.js.map +7 -0
  414. package/dist/vectors/orama-index.d.ts +54 -0
  415. package/dist/vectors/orama-index.d.ts.map +1 -0
  416. package/dist/vectors/orama-index.js +213 -0
  417. package/dist/vectors/orama-index.js.map +7 -0
  418. package/dist/vectors/pglite-index.d.ts +53 -0
  419. package/dist/vectors/pglite-index.d.ts.map +1 -0
  420. package/dist/vectors/pglite-index.js +194 -0
  421. package/dist/vectors/pglite-index.js.map +7 -0
  422. package/dist/vectors/qdrant-index.d.ts +70 -0
  423. package/dist/vectors/qdrant-index.d.ts.map +1 -0
  424. package/dist/vectors/qdrant-index.js +364 -0
  425. package/dist/vectors/qdrant-index.js.map +7 -0
  426. package/dist/vectors/typesense-index.d.ts +75 -0
  427. package/dist/vectors/typesense-index.d.ts.map +1 -0
  428. package/dist/vectors/typesense-index.js +453 -0
  429. package/dist/vectors/typesense-index.js.map +7 -0
  430. package/dist/vectors/vec-index.d.ts +52 -0
  431. package/dist/vectors/vec-index.d.ts.map +1 -0
  432. package/dist/vectors/vec-index.js +198 -0
  433. package/dist/vectors/vec-index.js.map +7 -0
  434. package/package.json +67 -0
@@ -0,0 +1,384 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var resolution_exports = {};
20
+ __export(resolution_exports, {
21
+ ReferenceResolver: () => ReferenceResolver
22
+ });
23
+ module.exports = __toCommonJS(resolution_exports);
24
+ var import_name_matcher = require("./name-matcher");
25
+ var import_errors = require("../errors");
26
+ class ReferenceResolver {
27
+ constructor(db, config) {
28
+ // Warm caches for O(1) lookup
29
+ this.nameCache = /* @__PURE__ */ new Map();
30
+ this.qualifiedNameCache = /* @__PURE__ */ new Map();
31
+ this.kindCache = /* @__PURE__ */ new Map();
32
+ this.lowerNameCache = /* @__PURE__ */ new Map();
33
+ this.nodeByIdCache = /* @__PURE__ */ new Map();
34
+ // namespace prefix → first non-import node ID (for C#/Java namespace-level imports)
35
+ this.namespacePrefixCache = /* @__PURE__ */ new Map();
36
+ this.cacheWarmed = false;
37
+ this.db = db;
38
+ this.config = config;
39
+ }
40
+ /**
41
+ * Pre-load all nodes into Maps for O(1) lookup.
42
+ * Must be called before resolveUnresolvedRefs() for best performance.
43
+ */
44
+ warmCaches() {
45
+ this.nameCache.clear();
46
+ this.qualifiedNameCache.clear();
47
+ this.kindCache.clear();
48
+ this.lowerNameCache.clear();
49
+ this.nodeByIdCache.clear();
50
+ this.namespacePrefixCache.clear();
51
+ const rawDb = this.db.db;
52
+ const rows = rawDb.all("SELECT * FROM nodes");
53
+ for (const row of rows) {
54
+ const node = this._rowToNode(row);
55
+ const nameList = this.nameCache.get(node.name) ?? [];
56
+ nameList.push(node);
57
+ this.nameCache.set(node.name, nameList);
58
+ if (node.qualifiedName) {
59
+ this.qualifiedNameCache.set(node.qualifiedName, node);
60
+ }
61
+ const kindList = this.kindCache.get(node.kind) ?? [];
62
+ kindList.push(node);
63
+ this.kindCache.set(node.kind, kindList);
64
+ const lower = node.name.toLowerCase();
65
+ const lowerList = this.lowerNameCache.get(lower) ?? [];
66
+ lowerList.push(node);
67
+ this.lowerNameCache.set(lower, lowerList);
68
+ this.nodeByIdCache.set(node.id, node);
69
+ }
70
+ for (const [qualName, node] of this.qualifiedNameCache) {
71
+ if (node.kind === "class" || node.kind === "interface" || node.kind === "namespace" || node.kind === "module") {
72
+ const parts = qualName.split(".");
73
+ for (let k = 1; k < parts.length; k++) {
74
+ const prefix = parts.slice(0, k).join(".");
75
+ if (!this.namespacePrefixCache.has(prefix)) {
76
+ this.namespacePrefixCache.set(prefix, node.id);
77
+ }
78
+ }
79
+ }
80
+ }
81
+ this.cacheWarmed = true;
82
+ (0, import_errors.logDebug)(`ReferenceResolver: warmed caches with ${rows.length} nodes`);
83
+ }
84
+ /**
85
+ * Resolve all pending unresolved references.
86
+ * Warms caches first, then processes all pending refs.
87
+ * Returns a ResolutionResult with counts and duration.
88
+ */
89
+ async resolveAll(onProgress) {
90
+ const start = Date.now();
91
+ this.warmCaches();
92
+ const resolvedCount = await this.resolveUnresolvedRefs(onProgress);
93
+ const rawDb = this.db.db;
94
+ const remaining = rawDb.get("SELECT COUNT(*) as c FROM unresolved_refs")?.c ?? 0;
95
+ const total = resolvedCount + remaining;
96
+ const durationMs = Date.now() - start;
97
+ (0, import_errors.logDebug)(`ReferenceResolver: resolved ${resolvedCount}/${total} refs in ${durationMs}ms`);
98
+ return {
99
+ resolved: resolvedCount,
100
+ unresolved: remaining,
101
+ total,
102
+ durationMs
103
+ };
104
+ }
105
+ /**
106
+ * Process all pending unresolved references using warm caches.
107
+ * Returns the count of newly resolved edges.
108
+ */
109
+ async resolveUnresolvedRefs(onProgress) {
110
+ if (!this.cacheWarmed) {
111
+ this.warmCaches();
112
+ }
113
+ const rawDb = this.db.db;
114
+ const refs = rawDb.all("SELECT * FROM unresolved_refs");
115
+ let resolved = 0;
116
+ const total = refs.length;
117
+ const BATCH_SIZE = 1e3;
118
+ const FUZZY_ALL_NODES_LIMIT = 2e5;
119
+ const skipFullFuzzy = this.nodeByIdCache.size > FUZZY_ALL_NODES_LIMIT;
120
+ if (skipFullFuzzy) {
121
+ (0, import_errors.logDebug)(`ReferenceResolver: skipping full-scan fuzzy (${this.nodeByIdCache.size} nodes exceeds ${FUZZY_ALL_NODES_LIMIT} limit)`);
122
+ }
123
+ for (let batchStart = 0; batchStart < refs.length; batchStart += BATCH_SIZE) {
124
+ const batchEnd = Math.min(batchStart + BATCH_SIZE, refs.length);
125
+ rawDb.run("BEGIN");
126
+ try {
127
+ for (let i = batchStart; i < batchEnd; i++) {
128
+ const ref = refs[i];
129
+ onProgress?.(i + 1, total);
130
+ const {
131
+ id: refId,
132
+ source_id: sourceId,
133
+ ref_name: refName,
134
+ ref_kind: refKind,
135
+ file_path: filePath,
136
+ line,
137
+ column
138
+ } = ref;
139
+ const attemptedStrategies = [];
140
+ let targetId = null;
141
+ if (refKind === "import") {
142
+ attemptedStrategies.push("import-path");
143
+ targetId = this._resolveImportPath(refName, filePath);
144
+ } else if (refKind === "extends" || refKind === "implements") {
145
+ attemptedStrategies.push("type-name");
146
+ targetId = this._resolveTypeName(refName);
147
+ } else {
148
+ attemptedStrategies.push("framework");
149
+ attemptedStrategies.push("qualified");
150
+ const qualifiedNode = this.qualifiedNameCache.get(refName);
151
+ if (qualifiedNode) {
152
+ targetId = qualifiedNode.id;
153
+ }
154
+ if (!targetId && refName.includes(".")) {
155
+ attemptedStrategies.push("method");
156
+ const methodPart = refName.slice(refName.lastIndexOf(".") + 1);
157
+ const methodCandidates = this.nameCache.get(methodPart) ?? [];
158
+ if (methodCandidates.length > 0) {
159
+ targetId = methodCandidates[0].id;
160
+ }
161
+ }
162
+ if (!targetId) {
163
+ attemptedStrategies.push("exact");
164
+ const exactCandidates = this.nameCache.get(refName) ?? [];
165
+ if (exactCandidates.length > 0) {
166
+ targetId = exactCandidates[0].id;
167
+ }
168
+ }
169
+ if (!targetId) {
170
+ attemptedStrategies.push("fuzzy");
171
+ const threshold = this.config.fuzzyResolutionThreshold ?? 0.5;
172
+ const lowerRef = refName.toLowerCase();
173
+ const fuzzyCandidates = this.lowerNameCache.get(lowerRef) ?? [];
174
+ if (fuzzyCandidates.length > 0) {
175
+ const match = (0, import_name_matcher.matchReference)(refName, fuzzyCandidates, threshold);
176
+ if (match) {
177
+ targetId = match.nodeId;
178
+ }
179
+ }
180
+ if (!targetId && !skipFullFuzzy) {
181
+ const allCandidates = [...this.nodeByIdCache.values()];
182
+ const match = (0, import_name_matcher.matchReference)(refName, allCandidates, threshold);
183
+ if (match) {
184
+ targetId = match.nodeId;
185
+ }
186
+ }
187
+ }
188
+ }
189
+ if (targetId) {
190
+ const edgeKind = refKind === "import" ? "imports" : refKind === "extends" ? "extends" : refKind === "implements" ? "implements" : "calls";
191
+ const edge = {
192
+ source: sourceId,
193
+ target: targetId,
194
+ kind: edgeKind,
195
+ line: line ?? void 0,
196
+ column: column ?? void 0
197
+ };
198
+ this.db.insertEdge(edge);
199
+ rawDb.run("DELETE FROM unresolved_refs WHERE id = ?", [refId]);
200
+ resolved++;
201
+ } else {
202
+ const strategiesJson = JSON.stringify(attemptedStrategies);
203
+ try {
204
+ rawDb.run(
205
+ "UPDATE unresolved_refs SET attempted_strategies = ? WHERE id = ?",
206
+ [strategiesJson, refId]
207
+ );
208
+ } catch {
209
+ (0, import_errors.logWarn)(`ReferenceResolver: failed to record attempted strategies for ref ${refId}`);
210
+ }
211
+ }
212
+ }
213
+ rawDb.run("COMMIT");
214
+ } catch (err) {
215
+ try {
216
+ rawDb.run("ROLLBACK");
217
+ } catch {
218
+ }
219
+ (0, import_errors.logWarn)(`ReferenceResolver: batch ${batchStart}-${batchEnd} failed: ${err instanceof Error ? err.message : String(err)}`);
220
+ }
221
+ }
222
+ return resolved;
223
+ }
224
+ /**
225
+ * Invalidate cache entries for all nodes belonging to the given file.
226
+ * Call this when a file is re-indexed to prevent stale cache hits.
227
+ */
228
+ invalidateFile(filePath) {
229
+ const nodesToRemove = [];
230
+ for (const node of this.nodeByIdCache.values()) {
231
+ if (node.filePath === filePath) {
232
+ nodesToRemove.push(node);
233
+ }
234
+ }
235
+ for (const node of nodesToRemove) {
236
+ this.nodeByIdCache.delete(node.id);
237
+ const nameList = this.nameCache.get(node.name);
238
+ if (nameList) {
239
+ const filtered = nameList.filter((n) => n.id !== node.id);
240
+ if (filtered.length === 0) {
241
+ this.nameCache.delete(node.name);
242
+ } else {
243
+ this.nameCache.set(node.name, filtered);
244
+ }
245
+ }
246
+ if (node.qualifiedName) {
247
+ const cached = this.qualifiedNameCache.get(node.qualifiedName);
248
+ if (cached?.id === node.id) {
249
+ this.qualifiedNameCache.delete(node.qualifiedName);
250
+ }
251
+ }
252
+ const kindList = this.kindCache.get(node.kind);
253
+ if (kindList) {
254
+ const filtered = kindList.filter((n) => n.id !== node.id);
255
+ if (filtered.length === 0) {
256
+ this.kindCache.delete(node.kind);
257
+ } else {
258
+ this.kindCache.set(node.kind, filtered);
259
+ }
260
+ }
261
+ const lower = node.name.toLowerCase();
262
+ const lowerList = this.lowerNameCache.get(lower);
263
+ if (lowerList) {
264
+ const filtered = lowerList.filter((n) => n.id !== node.id);
265
+ if (filtered.length === 0) {
266
+ this.lowerNameCache.delete(lower);
267
+ } else {
268
+ this.lowerNameCache.set(lower, filtered);
269
+ }
270
+ }
271
+ }
272
+ (0, import_errors.logDebug)(`ReferenceResolver: invalidated ${nodesToRemove.length} cache entries for ${filePath}`);
273
+ }
274
+ // ── Private helpers ────────────────────────────────────────────────────────
275
+ /**
276
+ * Resolve an import path to a node ID.
277
+ *
278
+ * Handles three cases:
279
+ * 1. Relative paths (JS/TS/Go/…) — resolved via the file tree.
280
+ * 2. Fully-qualified type imports (Java `import com.example.Foo`) — exact qualifiedName lookup,
281
+ * then name+namespace-prefix match.
282
+ * 3. Namespace-level imports (C# `using MyApp.Services`) — namespace node lookup, then
283
+ * namespace prefix cache (O(1)) to find any class in that namespace.
284
+ */
285
+ _resolveImportPath(importPath, sourceFilePath) {
286
+ if (importPath.startsWith(".")) {
287
+ const sourceDir = sourceFilePath.replace(/[^/]+$/, "");
288
+ const segments = (sourceDir + importPath).split("/");
289
+ const normalized = [];
290
+ for (const seg of segments) {
291
+ if (seg === "..") normalized.pop();
292
+ else if (seg !== ".") normalized.push(seg);
293
+ }
294
+ const basePath = normalized.join("/");
295
+ const candidates = [
296
+ basePath,
297
+ basePath + ".ts",
298
+ basePath + ".tsx",
299
+ basePath + ".js",
300
+ basePath + ".jsx",
301
+ basePath + "/index.ts",
302
+ basePath + "/index.tsx",
303
+ basePath + "/index.js"
304
+ ];
305
+ const rawDb = this.db.db;
306
+ for (const candidate of candidates) {
307
+ const row = rawDb.get("SELECT id FROM nodes WHERE file_path = ? LIMIT 1", [candidate]);
308
+ if (row) return row.id;
309
+ }
310
+ return null;
311
+ }
312
+ if (importPath.endsWith(".*") || importPath.endsWith("*")) {
313
+ const ns = importPath.replace(/\.\*$/, "").replace(/\*$/, "");
314
+ return this.namespacePrefixCache.get(ns) ?? null;
315
+ }
316
+ const exact = this.qualifiedNameCache.get(importPath);
317
+ if (exact) return exact.id;
318
+ const lastDot = importPath.lastIndexOf(".");
319
+ if (lastDot > 0) {
320
+ const typeName = importPath.slice(lastDot + 1);
321
+ const namespace = importPath.slice(0, lastDot);
322
+ const candidates = this.nameCache.get(typeName) ?? [];
323
+ for (const candidate of candidates) {
324
+ if (candidate.qualifiedName && candidate.qualifiedName.startsWith(namespace)) {
325
+ return candidate.id;
326
+ }
327
+ }
328
+ }
329
+ const nsCandidates = this.nameCache.get(importPath.split(".").pop() ?? "") ?? [];
330
+ for (const candidate of nsCandidates) {
331
+ if (candidate.kind === "namespace" && candidate.name === importPath) return candidate.id;
332
+ }
333
+ return this.namespacePrefixCache.get(importPath) ?? null;
334
+ }
335
+ /**
336
+ * Resolve a bare type name to a node ID.
337
+ * Used for extends/implements refs where we have only the unqualified type name.
338
+ * Prefers class/interface/trait/protocol nodes over other kinds.
339
+ */
340
+ _resolveTypeName(name) {
341
+ const candidates = this.nameCache.get(name) ?? [];
342
+ if (candidates.length > 0) {
343
+ const preferred = candidates.find(
344
+ (n) => n.kind === "class" || n.kind === "interface" || n.kind === "trait" || n.kind === "protocol"
345
+ );
346
+ return (preferred ?? candidates[0]).id;
347
+ }
348
+ const qualified = this.qualifiedNameCache.get(name);
349
+ if (qualified) return qualified.id;
350
+ return null;
351
+ }
352
+ /**
353
+ * Convert a raw DB row to a Node object.
354
+ */
355
+ _rowToNode(row) {
356
+ return {
357
+ id: row.id,
358
+ kind: row.kind,
359
+ name: row.name,
360
+ qualifiedName: row.qualified_name,
361
+ filePath: row.file_path,
362
+ language: row.language,
363
+ startLine: row.start_line,
364
+ endLine: row.end_line,
365
+ startColumn: row.start_column,
366
+ endColumn: row.end_column,
367
+ docstring: row.docstring ?? void 0,
368
+ signature: row.signature ?? void 0,
369
+ visibility: row.visibility ?? void 0,
370
+ isExported: row.is_exported === 1,
371
+ isAsync: row.is_async === 1,
372
+ isStatic: row.is_static === 1,
373
+ isAbstract: row.is_abstract === 1,
374
+ decorators: row.decorators ? JSON.parse(row.decorators) : void 0,
375
+ typeParameters: row.type_parameters ? JSON.parse(row.type_parameters) : void 0,
376
+ updatedAt: row.updated_at
377
+ };
378
+ }
379
+ }
380
+ // Annotate the CommonJS export names for ESM import in node:
381
+ 0 && (module.exports = {
382
+ ReferenceResolver
383
+ });
384
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/resolution/index.ts"],
4
+ "sourcesContent": ["/**\n * KiroGraph Reference Resolver\n *\n * Implements the warm-cache resolution engine with multiple strategies.\n * Mirrors CodeGraph src/resolution/index.ts\n */\n\nimport type { Node, NodeKind, Edge } from '../types';\nimport type { GraphDatabase } from '../db/database';\nimport type { KiroGraphConfig } from '../config';\nimport { matchReference } from './name-matcher';\nimport { logDebug, logWarn } from '../errors';\n\n// \u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface ResolutionResult {\n resolved: number;\n unresolved: number;\n total: number;\n durationMs: number;\n}\n\n// \u2500\u2500 ReferenceResolver \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport class ReferenceResolver {\n private db: GraphDatabase;\n private config: KiroGraphConfig;\n\n // Warm caches for O(1) lookup\n private nameCache: Map<string, Node[]> = new Map();\n private qualifiedNameCache: Map<string, Node> = new Map();\n private kindCache: Map<NodeKind, Node[]> = new Map();\n private lowerNameCache: Map<string, Node[]> = new Map();\n private nodeByIdCache: Map<string, Node> = new Map();\n // namespace prefix \u2192 first non-import node ID (for C#/Java namespace-level imports)\n private namespacePrefixCache: Map<string, string> = new Map();\n\n private cacheWarmed = false;\n\n constructor(db: GraphDatabase, config: KiroGraphConfig) {\n this.db = db;\n this.config = config;\n }\n\n /**\n * Pre-load all nodes into Maps for O(1) lookup.\n * Must be called before resolveUnresolvedRefs() for best performance.\n */\n warmCaches(): void {\n this.nameCache.clear();\n this.qualifiedNameCache.clear();\n this.kindCache.clear();\n this.lowerNameCache.clear();\n this.nodeByIdCache.clear();\n this.namespacePrefixCache.clear();\n\n // Access the underlying db instance to query all nodes\n const rawDb = (this.db as any).db;\n const rows: any[] = rawDb.all('SELECT * FROM nodes');\n\n for (const row of rows) {\n const node: Node = this._rowToNode(row);\n\n // nameCache\n const nameList = this.nameCache.get(node.name) ?? [];\n nameList.push(node);\n this.nameCache.set(node.name, nameList);\n\n // qualifiedNameCache\n if (node.qualifiedName) {\n this.qualifiedNameCache.set(node.qualifiedName, node);\n }\n\n // kindCache\n const kindList = this.kindCache.get(node.kind) ?? [];\n kindList.push(node);\n this.kindCache.set(node.kind, kindList);\n\n // lowerNameCache\n const lower = node.name.toLowerCase();\n const lowerList = this.lowerNameCache.get(lower) ?? [];\n lowerList.push(node);\n this.lowerNameCache.set(lower, lowerList);\n\n // nodeByIdCache\n this.nodeByIdCache.set(node.id, node);\n }\n\n // Build namespace prefix cache for C#/Java namespace-level import resolution.\n // For each class/interface with a dotted qualifiedName, record every ancestor\n // namespace prefix \u2192 the node ID, so \"using MyApp.Services\" resolves O(1).\n for (const [qualName, node] of this.qualifiedNameCache) {\n if (node.kind === 'class' || node.kind === 'interface' || node.kind === 'namespace' || node.kind === 'module') {\n const parts = qualName.split('.');\n for (let k = 1; k < parts.length; k++) {\n const prefix = parts.slice(0, k).join('.');\n if (!this.namespacePrefixCache.has(prefix)) {\n this.namespacePrefixCache.set(prefix, node.id);\n }\n }\n }\n }\n\n this.cacheWarmed = true;\n logDebug(`ReferenceResolver: warmed caches with ${rows.length} nodes`);\n }\n\n /**\n * Resolve all pending unresolved references.\n * Warms caches first, then processes all pending refs.\n * Returns a ResolutionResult with counts and duration.\n */\n async resolveAll(onProgress?: (current: number, total: number) => void): Promise<ResolutionResult> {\n const start = Date.now();\n\n this.warmCaches();\n const resolvedCount = await this.resolveUnresolvedRefs(onProgress);\n\n // Count remaining unresolved\n const rawDb = (this.db as any).db;\n const remaining = rawDb.get('SELECT COUNT(*) as c FROM unresolved_refs')?.c ?? 0;\n const total = resolvedCount + remaining;\n\n const durationMs = Date.now() - start;\n logDebug(`ReferenceResolver: resolved ${resolvedCount}/${total} refs in ${durationMs}ms`);\n\n return {\n resolved: resolvedCount,\n unresolved: remaining,\n total,\n durationMs,\n };\n }\n\n /**\n * Process all pending unresolved references using warm caches.\n * Returns the count of newly resolved edges.\n */\n async resolveUnresolvedRefs(onProgress?: (current: number, total: number) => void): Promise<number> {\n if (!this.cacheWarmed) {\n this.warmCaches();\n }\n\n const rawDb = (this.db as any).db;\n const refs: any[] = rawDb.all('SELECT * FROM unresolved_refs');\n let resolved = 0;\n const total = refs.length;\n\n // Process in batched transactions to avoid WASM heap exhaustion.\n // Without batching, each individual write allocates journal pages in the\n // WASM linear memory, which can exceed the 2GB limit on large codebases.\n const BATCH_SIZE = 1000;\n\n // Skip the expensive \"scan all nodes\" fuzzy fallback for very large graphs.\n // The O(N*M) cost is prohibitive and the WASM heap cannot sustain it.\n const FUZZY_ALL_NODES_LIMIT = 200_000;\n const skipFullFuzzy = this.nodeByIdCache.size > FUZZY_ALL_NODES_LIMIT;\n if (skipFullFuzzy) {\n logDebug(`ReferenceResolver: skipping full-scan fuzzy (${this.nodeByIdCache.size} nodes exceeds ${FUZZY_ALL_NODES_LIMIT} limit)`);\n }\n\n for (let batchStart = 0; batchStart < refs.length; batchStart += BATCH_SIZE) {\n const batchEnd = Math.min(batchStart + BATCH_SIZE, refs.length);\n\n // Wrap each batch in a transaction \u2014 dramatically reduces write amplification\n rawDb.run('BEGIN');\n try {\n for (let i = batchStart; i < batchEnd; i++) {\n const ref = refs[i];\n onProgress?.(i + 1, total);\n const {\n id: refId,\n source_id: sourceId,\n ref_name: refName,\n ref_kind: refKind,\n file_path: filePath,\n line,\n column,\n } = ref;\n\n const attemptedStrategies: string[] = [];\n let targetId: string | null = null;\n\n if (refKind === 'import') {\n attemptedStrategies.push('import-path');\n targetId = this._resolveImportPath(refName, filePath);\n } else if (refKind === 'extends' || refKind === 'implements') {\n attemptedStrategies.push('type-name');\n targetId = this._resolveTypeName(refName);\n } else {\n attemptedStrategies.push('framework');\n\n // Strategy 2: Qualified name match (confidence 0.95)\n attemptedStrategies.push('qualified');\n const qualifiedNode = this.qualifiedNameCache.get(refName);\n if (qualifiedNode) {\n targetId = qualifiedNode.id;\n }\n\n // Strategy 3: Method call pattern (confidence 0.85)\n if (!targetId && refName.includes('.')) {\n attemptedStrategies.push('method');\n const methodPart = refName.slice(refName.lastIndexOf('.') + 1);\n const methodCandidates = this.nameCache.get(methodPart) ?? [];\n if (methodCandidates.length > 0) {\n targetId = methodCandidates[0].id;\n }\n }\n\n // Strategy 4: Exact name match (confidence 0.9)\n if (!targetId) {\n attemptedStrategies.push('exact');\n const exactCandidates = this.nameCache.get(refName) ?? [];\n if (exactCandidates.length > 0) {\n targetId = exactCandidates[0].id;\n }\n }\n\n // Strategy 5: Fuzzy / lowercase match (confidence 0.5)\n if (!targetId) {\n attemptedStrategies.push('fuzzy');\n const threshold = this.config.fuzzyResolutionThreshold ?? 0.5;\n const lowerRef = refName.toLowerCase();\n const fuzzyCandidates = this.lowerNameCache.get(lowerRef) ?? [];\n\n if (fuzzyCandidates.length > 0) {\n const match = matchReference(refName, fuzzyCandidates, threshold);\n if (match) {\n targetId = match.nodeId;\n }\n }\n\n // Full-scan fuzzy: only for smaller graphs (O(N*M) is too expensive otherwise)\n if (!targetId && !skipFullFuzzy) {\n const allCandidates = [...this.nodeByIdCache.values()];\n const match = matchReference(refName, allCandidates, threshold);\n if (match) {\n targetId = match.nodeId;\n }\n }\n }\n }\n\n if (targetId) {\n const edgeKind = refKind === 'import' ? 'imports'\n : refKind === 'extends' ? 'extends'\n : refKind === 'implements' ? 'implements'\n : 'calls';\n const edge: Edge = {\n source: sourceId,\n target: targetId,\n kind: edgeKind,\n line: line ?? undefined,\n column: column ?? undefined,\n };\n this.db.insertEdge(edge);\n rawDb.run('DELETE FROM unresolved_refs WHERE id = ?', [refId]);\n resolved++;\n } else {\n const strategiesJson = JSON.stringify(attemptedStrategies);\n try {\n rawDb.run(\n 'UPDATE unresolved_refs SET attempted_strategies = ? WHERE id = ?',\n [strategiesJson, refId]\n );\n } catch {\n logWarn(`ReferenceResolver: failed to record attempted strategies for ref ${refId}`);\n }\n }\n }\n rawDb.run('COMMIT');\n } catch (err) {\n // Roll back the failed batch but continue with remaining batches\n try { rawDb.run('ROLLBACK'); } catch { /* already rolled back */ }\n logWarn(`ReferenceResolver: batch ${batchStart}-${batchEnd} failed: ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n return resolved;\n }\n\n /**\n * Invalidate cache entries for all nodes belonging to the given file.\n * Call this when a file is re-indexed to prevent stale cache hits.\n */\n invalidateFile(filePath: string): void {\n const nodesToRemove: Node[] = [];\n\n for (const node of this.nodeByIdCache.values()) {\n if (node.filePath === filePath) {\n nodesToRemove.push(node);\n }\n }\n\n for (const node of nodesToRemove) {\n // Remove from nodeByIdCache\n this.nodeByIdCache.delete(node.id);\n\n // Remove from nameCache\n const nameList = this.nameCache.get(node.name);\n if (nameList) {\n const filtered = nameList.filter(n => n.id !== node.id);\n if (filtered.length === 0) {\n this.nameCache.delete(node.name);\n } else {\n this.nameCache.set(node.name, filtered);\n }\n }\n\n // Remove from qualifiedNameCache\n if (node.qualifiedName) {\n const cached = this.qualifiedNameCache.get(node.qualifiedName);\n if (cached?.id === node.id) {\n this.qualifiedNameCache.delete(node.qualifiedName);\n }\n }\n\n // Remove from kindCache\n const kindList = this.kindCache.get(node.kind);\n if (kindList) {\n const filtered = kindList.filter(n => n.id !== node.id);\n if (filtered.length === 0) {\n this.kindCache.delete(node.kind);\n } else {\n this.kindCache.set(node.kind, filtered);\n }\n }\n\n // Remove from lowerNameCache\n const lower = node.name.toLowerCase();\n const lowerList = this.lowerNameCache.get(lower);\n if (lowerList) {\n const filtered = lowerList.filter(n => n.id !== node.id);\n if (filtered.length === 0) {\n this.lowerNameCache.delete(lower);\n } else {\n this.lowerNameCache.set(lower, filtered);\n }\n }\n }\n\n logDebug(`ReferenceResolver: invalidated ${nodesToRemove.length} cache entries for ${filePath}`);\n }\n\n // \u2500\u2500 Private helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n /**\n * Resolve an import path to a node ID.\n *\n * Handles three cases:\n * 1. Relative paths (JS/TS/Go/\u2026) \u2014 resolved via the file tree.\n * 2. Fully-qualified type imports (Java `import com.example.Foo`) \u2014 exact qualifiedName lookup,\n * then name+namespace-prefix match.\n * 3. Namespace-level imports (C# `using MyApp.Services`) \u2014 namespace node lookup, then\n * namespace prefix cache (O(1)) to find any class in that namespace.\n */\n private _resolveImportPath(importPath: string, sourceFilePath: string): string | null {\n // \u2500\u2500 1. Relative path (JS/TS etc.) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n if (importPath.startsWith('.')) {\n const sourceDir = sourceFilePath.replace(/[^/]+$/, '');\n const segments = (sourceDir + importPath).split('/');\n const normalized: string[] = [];\n for (const seg of segments) {\n if (seg === '..') normalized.pop();\n else if (seg !== '.') normalized.push(seg);\n }\n const basePath = normalized.join('/');\n const candidates = [\n basePath,\n basePath + '.ts', basePath + '.tsx',\n basePath + '.js', basePath + '.jsx',\n basePath + '/index.ts', basePath + '/index.tsx', basePath + '/index.js',\n ];\n const rawDb = (this.db as any).db;\n for (const candidate of candidates) {\n const row = rawDb.get('SELECT id FROM nodes WHERE file_path = ? LIMIT 1', [candidate]);\n if (row) return row.id;\n }\n return null;\n }\n\n // \u2500\u2500 2. Wildcard namespace import (`import com.example.*`, `using static \u2026`) \u2500\n if (importPath.endsWith('.*') || importPath.endsWith('*')) {\n const ns = importPath.replace(/\\.\\*$/, '').replace(/\\*$/, '');\n return this.namespacePrefixCache.get(ns) ?? null;\n }\n\n // \u2500\u2500 3. Exact qualifiedName match (Java `import com.example.Foo`) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const exact = this.qualifiedNameCache.get(importPath);\n if (exact) return exact.id;\n\n // \u2500\u2500 4. Name + namespace prefix (Java: last segment is the type name) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const lastDot = importPath.lastIndexOf('.');\n if (lastDot > 0) {\n const typeName = importPath.slice(lastDot + 1);\n const namespace = importPath.slice(0, lastDot);\n const candidates = this.nameCache.get(typeName) ?? [];\n for (const candidate of candidates) {\n if (candidate.qualifiedName && candidate.qualifiedName.startsWith(namespace)) {\n return candidate.id;\n }\n }\n }\n\n // \u2500\u2500 5. Namespace-level import (C# `using MyApp.Services`) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // First check for an explicit namespace node with this name\n const nsCandidates = this.nameCache.get(importPath.split('.').pop() ?? '') ?? [];\n for (const candidate of nsCandidates) {\n if (candidate.kind === 'namespace' && candidate.name === importPath) return candidate.id;\n }\n // Then fall back to the prefix cache: return any class/interface in this namespace\n return this.namespacePrefixCache.get(importPath) ?? null;\n }\n\n /**\n * Resolve a bare type name to a node ID.\n * Used for extends/implements refs where we have only the unqualified type name.\n * Prefers class/interface/trait/protocol nodes over other kinds.\n */\n private _resolveTypeName(name: string): string | null {\n const candidates = this.nameCache.get(name) ?? [];\n if (candidates.length > 0) {\n const preferred = candidates.find(n =>\n n.kind === 'class' || n.kind === 'interface' || n.kind === 'trait' || n.kind === 'protocol'\n );\n return (preferred ?? candidates[0]).id;\n }\n // Try as a fully-qualified name\n const qualified = this.qualifiedNameCache.get(name);\n if (qualified) return qualified.id;\n return null;\n }\n\n /**\n * Convert a raw DB row to a Node object.\n */\n private _rowToNode(row: any): Node {\n return {\n id: row.id,\n kind: row.kind,\n name: row.name,\n qualifiedName: row.qualified_name,\n filePath: row.file_path,\n language: row.language,\n startLine: row.start_line,\n endLine: row.end_line,\n startColumn: row.start_column,\n endColumn: row.end_column,\n docstring: row.docstring ?? undefined,\n signature: row.signature ?? undefined,\n visibility: row.visibility ?? undefined,\n isExported: row.is_exported === 1,\n isAsync: row.is_async === 1,\n isStatic: row.is_static === 1,\n isAbstract: row.is_abstract === 1,\n decorators: row.decorators ? JSON.parse(row.decorators) : undefined,\n typeParameters: row.type_parameters ? JSON.parse(row.type_parameters) : undefined,\n updatedAt: row.updated_at,\n };\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,0BAA+B;AAC/B,oBAAkC;AAa3B,MAAM,kBAAkB;AAAA,EAe7B,YAAY,IAAmB,QAAyB;AAVxD;AAAA,SAAQ,YAAiC,oBAAI,IAAI;AACjD,SAAQ,qBAAwC,oBAAI,IAAI;AACxD,SAAQ,YAAmC,oBAAI,IAAI;AACnD,SAAQ,iBAAsC,oBAAI,IAAI;AACtD,SAAQ,gBAAmC,oBAAI,IAAI;AAEnD;AAAA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,IAAI;AAAA,MACjB,WAAW,IAAI;AAAA,MACf,WAAW,IAAI,aAAa;AAAA,MAC5B,WAAW,IAAI,aAAa;AAAA,MAC5B,YAAY,IAAI,cAAc;AAAA,MAC9B,YAAY,IAAI,gBAAgB;AAAA,MAChC,SAAS,IAAI,aAAa;AAAA,MAC1B,UAAU,IAAI,cAAc;AAAA,MAC5B,YAAY,IAAI,gBAAgB;AAAA,MAChC,YAAY,IAAI,aAAa,KAAK,MAAM,IAAI,UAAU,IAAI;AAAA,MAC1D,gBAAgB,IAAI,kBAAkB,KAAK,MAAM,IAAI,eAAe,IAAI;AAAA,MACxE,WAAW,IAAI;AAAA,IACjB;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * KiroGraph Reference Name Matcher
3
+ *
4
+ * Implements multi-strategy reference matching for the resolution engine.
5
+ * Mirrors CodeGraph src/resolution/name-matcher.ts
6
+ */
7
+ import type { Node } from '../types';
8
+ export interface MatchResult {
9
+ nodeId: string;
10
+ confidence: number;
11
+ strategy: 'qualified' | 'exact' | 'method' | 'fuzzy';
12
+ }
13
+ /**
14
+ * Attempt to match a reference name against a set of candidate nodes using
15
+ * multiple strategies in priority order. Returns the best match above the
16
+ * given confidence threshold, or null if none qualifies.
17
+ *
18
+ * Strategy order (highest confidence first):
19
+ * 1. Qualified name match — confidence 0.95
20
+ * 2. Exact name match — confidence 0.90
21
+ * 3. Method call pattern — confidence 0.85 (refName contains '.')
22
+ * 4. Fuzzy / lowercase — confidence 0.50
23
+ */
24
+ export declare function matchReference(refName: string, candidates: Node[], threshold: number): MatchResult | null;
25
+ //# sourceMappingURL=name-matcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"name-matcher.d.ts","sourceRoot":"","sources":["../../src/resolution/name-matcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIrC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtD;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,IAAI,EAAE,EAClB,SAAS,EAAE,MAAM,GAChB,WAAW,GAAG,IAAI,CAwCpB"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var name_matcher_exports = {};
20
+ __export(name_matcher_exports, {
21
+ matchReference: () => matchReference
22
+ });
23
+ module.exports = __toCommonJS(name_matcher_exports);
24
+ function matchReference(refName, candidates, threshold) {
25
+ if (!refName || candidates.length === 0) return null;
26
+ for (const node of candidates) {
27
+ if (node.qualifiedName === refName) {
28
+ const result = { nodeId: node.id, confidence: 0.95, strategy: "qualified" };
29
+ if (result.confidence >= threshold) return result;
30
+ }
31
+ }
32
+ for (const node of candidates) {
33
+ if (node.name === refName) {
34
+ const result = { nodeId: node.id, confidence: 0.9, strategy: "exact" };
35
+ if (result.confidence >= threshold) return result;
36
+ }
37
+ }
38
+ if (refName.includes(".")) {
39
+ const methodPart = refName.slice(refName.lastIndexOf(".") + 1);
40
+ for (const node of candidates) {
41
+ if (node.name === methodPart) {
42
+ const result = { nodeId: node.id, confidence: 0.85, strategy: "method" };
43
+ if (result.confidence >= threshold) return result;
44
+ }
45
+ }
46
+ }
47
+ const lowerRef = refName.toLowerCase();
48
+ for (const node of candidates) {
49
+ if (node.name.toLowerCase() === lowerRef) {
50
+ const result = { nodeId: node.id, confidence: 0.5, strategy: "fuzzy" };
51
+ if (result.confidence >= threshold) return result;
52
+ }
53
+ }
54
+ return null;
55
+ }
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ matchReference
59
+ });
60
+ //# sourceMappingURL=name-matcher.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/resolution/name-matcher.ts"],
4
+ "sourcesContent": ["/**\n * KiroGraph Reference Name Matcher\n *\n * Implements multi-strategy reference matching for the resolution engine.\n * Mirrors CodeGraph src/resolution/name-matcher.ts\n */\n\nimport type { Node } from '../types';\n\n// \u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface MatchResult {\n nodeId: string;\n confidence: number; // 0.0\u20131.0\n strategy: 'qualified' | 'exact' | 'method' | 'fuzzy';\n}\n\n// \u2500\u2500 matchReference \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * Attempt to match a reference name against a set of candidate nodes using\n * multiple strategies in priority order. Returns the best match above the\n * given confidence threshold, or null if none qualifies.\n *\n * Strategy order (highest confidence first):\n * 1. Qualified name match \u2014 confidence 0.95\n * 2. Exact name match \u2014 confidence 0.90\n * 3. Method call pattern \u2014 confidence 0.85 (refName contains '.')\n * 4. Fuzzy / lowercase \u2014 confidence 0.50\n */\nexport function matchReference(\n refName: string,\n candidates: Node[],\n threshold: number\n): MatchResult | null {\n if (!refName || candidates.length === 0) return null;\n\n // Strategy 1: Qualified name match (confidence 0.95)\n for (const node of candidates) {\n if (node.qualifiedName === refName) {\n const result: MatchResult = { nodeId: node.id, confidence: 0.95, strategy: 'qualified' };\n if (result.confidence >= threshold) return result;\n }\n }\n\n // Strategy 2: Exact name match (confidence 0.90)\n for (const node of candidates) {\n if (node.name === refName) {\n const result: MatchResult = { nodeId: node.id, confidence: 0.9, strategy: 'exact' };\n if (result.confidence >= threshold) return result;\n }\n }\n\n // Strategy 3: Method call pattern \u2014 if refName contains '.', match the part after '.' (confidence 0.85)\n if (refName.includes('.')) {\n const methodPart = refName.slice(refName.lastIndexOf('.') + 1);\n for (const node of candidates) {\n if (node.name === methodPart) {\n const result: MatchResult = { nodeId: node.id, confidence: 0.85, strategy: 'method' };\n if (result.confidence >= threshold) return result;\n }\n }\n }\n\n // Strategy 4: Fuzzy / lowercase match (confidence 0.50)\n const lowerRef = refName.toLowerCase();\n for (const node of candidates) {\n if (node.name.toLowerCase() === lowerRef) {\n const result: MatchResult = { nodeId: node.id, confidence: 0.5, strategy: 'fuzzy' };\n if (result.confidence >= threshold) return result;\n }\n }\n\n return null;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BO,SAAS,eACd,SACA,YACA,WACoB;AACpB,MAAI,CAAC,WAAW,WAAW,WAAW,EAAG,QAAO;AAGhD,aAAW,QAAQ,YAAY;AAC7B,QAAI,KAAK,kBAAkB,SAAS;AAClC,YAAM,SAAsB,EAAE,QAAQ,KAAK,IAAI,YAAY,MAAM,UAAU,YAAY;AACvF,UAAI,OAAO,cAAc,UAAW,QAAO;AAAA,IAC7C;AAAA,EACF;AAGA,aAAW,QAAQ,YAAY;AAC7B,QAAI,KAAK,SAAS,SAAS;AACzB,YAAM,SAAsB,EAAE,QAAQ,KAAK,IAAI,YAAY,KAAK,UAAU,QAAQ;AAClF,UAAI,OAAO,cAAc,UAAW,QAAO;AAAA,IAC7C;AAAA,EACF;AAGA,MAAI,QAAQ,SAAS,GAAG,GAAG;AACzB,UAAM,aAAa,QAAQ,MAAM,QAAQ,YAAY,GAAG,IAAI,CAAC;AAC7D,eAAW,QAAQ,YAAY;AAC7B,UAAI,KAAK,SAAS,YAAY;AAC5B,cAAM,SAAsB,EAAE,QAAQ,KAAK,IAAI,YAAY,MAAM,UAAU,SAAS;AACpF,YAAI,OAAO,cAAc,UAAW,QAAO;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AAGA,QAAM,WAAW,QAAQ,YAAY;AACrC,aAAW,QAAQ,YAAY;AAC7B,QAAI,KAAK,KAAK,YAAY,MAAM,UAAU;AACxC,YAAM,SAAsB,EAAE,QAAQ,KAAK,IAAI,YAAY,KAAK,UAAU,QAAQ;AAClF,UAAI,OAAO,cAAc,UAAW,QAAO;AAAA,IAC7C;AAAA,EACF;AAEA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
25
+ var import_fs = require("fs");
26
+ var import_path = require("path");
27
+ var import_os = require("os");
28
+ const KIROGRAPH_DIR = (0, import_path.join)((0, import_os.homedir)(), ".kirograph");
29
+ const MODELS_DIR = (0, import_path.join)(KIROGRAPH_DIR, "models");
30
+ const MODEL_ID = "nomic-ai/nomic-embed-text-v1.5";
31
+ async function downloadModel() {
32
+ (0, import_fs.mkdirSync)(KIROGRAPH_DIR, { recursive: true });
33
+ (0, import_fs.mkdirSync)(MODELS_DIR, { recursive: true });
34
+ const modelCachePath = (0, import_path.join)(MODELS_DIR, MODEL_ID.replace("/", "--"));
35
+ if ((0, import_fs.existsSync)(modelCachePath)) {
36
+ console.log("KiroGraph: Embedding model already downloaded.");
37
+ return;
38
+ }
39
+ console.log("KiroGraph: Downloading embedding model (~130MB)...");
40
+ console.log("This is a one-time download for semantic code search.\n");
41
+ try {
42
+ const { pipeline, env } = await import("@huggingface/transformers");
43
+ env.cacheDir = MODELS_DIR;
44
+ await pipeline("feature-extraction", MODEL_ID, {
45
+ progress_callback: (progress) => {
46
+ if (progress.status === "progress" && progress.file && progress.progress !== void 0) {
47
+ const fileName = progress.file.split("/").pop();
48
+ const percent = Math.round(progress.progress);
49
+ process.stdout.write(`\rDownloading ${fileName}... ${percent}% `);
50
+ } else if (progress.status === "done") {
51
+ process.stdout.write("\n");
52
+ }
53
+ }
54
+ });
55
+ console.log("\nKiroGraph: Embedding model ready!");
56
+ } catch (error) {
57
+ console.log("\nKiroGraph: Could not download embedding model.");
58
+ console.log("Semantic search will download it on first use.");
59
+ if (process.env.KIROGRAPH_DEBUG) {
60
+ console.error(error);
61
+ }
62
+ }
63
+ }
64
+ downloadModel().catch(() => process.exit(0));
@@ -0,0 +1,21 @@
1
+ import type { NodeKind } from '../types';
2
+ /** Common English words that carry no search signal. */
3
+ export declare const STOP_WORDS: Set<string>;
4
+ /**
5
+ * Tokenises a natural-language query.
6
+ * Splits camelCase, PascalCase, snake_case, SCREAMING_SNAKE, and dot.notation.
7
+ * Lowercases all tokens, removes stop words, removes tokens shorter than 3 chars.
8
+ */
9
+ export declare function extractSearchTerms(query: string): string[];
10
+ /**
11
+ * Numeric relevance score for a file path against a query string.
12
+ * +10 if filename (no extension) matches a query token exactly.
13
+ * +5 if a directory segment matches a query token exactly.
14
+ * +3 if any path segment contains a query token as a substring.
15
+ */
16
+ export declare function scorePathRelevance(filePath: string, query: string): number;
17
+ /**
18
+ * Numeric relevance bonus by node kind.
19
+ */
20
+ export declare function kindBonus(kind: NodeKind): number;
21
+ //# sourceMappingURL=query-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-utils.d.ts","sourceRoot":"","sources":["../../src/search/query-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAIzC,wDAAwD;AACxD,eAAO,MAAM,UAAU,aAYrB,CAAC;AAIH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAsB1D;AAID;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAiC1E;AAID;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAoChD"}