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,283 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var steering_exports = {};
30
+ __export(steering_exports, {
31
+ writeSteering: () => writeSteering
32
+ });
33
+ module.exports = __toCommonJS(steering_exports);
34
+ var fs = __toESM(require("fs"));
35
+ var path = __toESM(require("path"));
36
+ var import_caveman = require("./caveman");
37
+ const STEERING_CONTENT = `---
38
+ inclusion: always
39
+ ---
40
+
41
+ # KiroGraph
42
+
43
+ KiroGraph builds a semantic knowledge graph of your codebase. Use its MCP tools instead of grep/glob/file reads whenever \`.kirograph/\` exists in the project.
44
+
45
+ ## Quick decision guide
46
+
47
+ | Question | Tool |
48
+ |----------|------|
49
+ | Where do I start on this task? | \`kirograph_context\` |
50
+ | What is this symbol / show me its code | \`kirograph_node\` with \`includeCode: true\` |
51
+ | Find a symbol by name | \`kirograph_search\` |
52
+ | Who calls function X? | \`kirograph_callers\` |
53
+ | What does function X call? | \`kirograph_callees\` |
54
+ | What breaks if I change X? | \`kirograph_impact\` |
55
+ | How are X and Y connected? | \`kirograph_path\` |
56
+ | What extends / implements this type? | \`kirograph_type_hierarchy\` |
57
+ | Which code is never called? | \`kirograph_dead_code\` |
58
+ | Are there import cycles? | \`kirograph_circular_deps\` |
59
+ | What files are indexed? | \`kirograph_files\` |
60
+ | Is the index healthy? | \`kirograph_status\` |
61
+ | What are the most critical symbols? | \`kirograph_hotspots\` |
62
+ | Any unexpected cross-module coupling? | \`kirograph_surprising\` |
63
+ | What changed since the last snapshot? | \`kirograph_diff\` |
64
+ | What packages/layers exist? | \`kirograph_architecture\` |
65
+ | How coupled is package X? | \`kirograph_coupling\` |
66
+ | What does package X depend on? | \`kirograph_package\` |
67
+
68
+ ---
69
+
70
+ ## Tool reference
71
+
72
+ ### \`kirograph_context\` \u2014 **start here for any code task**
73
+
74
+ Returns entry points, related symbols, and code snippets for a natural-language task description. Usually enough to orient without any additional tool calls.
75
+
76
+ \`\`\`
77
+ kirograph_context(task: "fix the auth token expiry bug")
78
+ kirograph_context(task: "add dark mode", maxNodes: 30)
79
+ kirograph_context(task: "refactor payment service", includeCode: false)
80
+ \`\`\`
81
+
82
+ ### \`kirograph_search\` \u2014 find symbols by name
83
+
84
+ Exact match \u2192 FTS \u2192 LIKE fallback \u2192 vector (last resort). Use instead of grep.
85
+
86
+ \`\`\`
87
+ kirograph_search(query: "signIn")
88
+ kirograph_search(query: "UserService", kind: "class")
89
+ kirograph_search(query: "auth", limit: 20)
90
+ \`\`\`
91
+
92
+ Supported kinds: \`function\`, \`method\`, \`class\`, \`interface\`, \`type_alias\`, \`variable\`, \`route\`, \`component\`
93
+
94
+ ### \`kirograph_node\` \u2014 inspect a symbol
95
+
96
+ Returns kind, file, signature, docstring. Add \`includeCode: true\` to get the full source.
97
+
98
+ \`\`\`
99
+ kirograph_node(symbol: "validateToken")
100
+ kirograph_node(symbol: "AuthService", includeCode: true)
101
+ \`\`\`
102
+
103
+ ### \`kirograph_callers\` \u2014 who calls this?
104
+
105
+ BFS over incoming \`calls\` edges (depth 1).
106
+
107
+ \`\`\`
108
+ kirograph_callers(symbol: "processPayment", limit: 30)
109
+ \`\`\`
110
+
111
+ ### \`kirograph_callees\` \u2014 what does this call?
112
+
113
+ BFS over outgoing \`calls\` edges (depth 1).
114
+
115
+ \`\`\`
116
+ kirograph_callees(symbol: "handleRequest")
117
+ \`\`\`
118
+
119
+ ### \`kirograph_impact\` \u2014 blast radius before a change
120
+
121
+ Traverses all incoming edges up to \`depth\` hops. Call this before editing a symbol.
122
+
123
+ \`\`\`
124
+ kirograph_impact(symbol: "UserRepository", depth: 3)
125
+ \`\`\`
126
+
127
+ ### \`kirograph_path\` \u2014 how are two symbols connected?
128
+
129
+ BFS shortest path across all edge types.
130
+
131
+ \`\`\`
132
+ kirograph_path(from: "LoginController", to: "DatabasePool")
133
+ \`\`\`
134
+
135
+ ### \`kirograph_type_hierarchy\` \u2014 class/interface inheritance
136
+
137
+ \`\`\`
138
+ kirograph_type_hierarchy(symbol: "BaseRepository", direction: "down") // derived types
139
+ kirograph_type_hierarchy(symbol: "PaymentService", direction: "up") // base types
140
+ kirograph_type_hierarchy(symbol: "IUserStore", direction: "both") // all
141
+ \`\`\`
142
+
143
+ ### \`kirograph_dead_code\` \u2014 unreferenced symbols
144
+
145
+ Returns unexported symbols with zero incoming edges. Good first step when cleaning up.
146
+
147
+ \`\`\`
148
+ kirograph_dead_code(limit: 50)
149
+ \`\`\`
150
+
151
+ ### \`kirograph_circular_deps\` \u2014 import cycles
152
+
153
+ Runs Tarjan's SCC over import edges. No parameters needed.
154
+
155
+ \`\`\`
156
+ kirograph_circular_deps()
157
+ \`\`\`
158
+
159
+ ### \`kirograph_files\` \u2014 indexed file structure
160
+
161
+ \`\`\`
162
+ kirograph_files(format: "tree") // default
163
+ kirograph_files(format: "flat") // one path per line
164
+ kirograph_files(format: "grouped") // by directory
165
+ kirograph_files(filterPath: "src/auth", maxDepth: 2)
166
+ kirograph_files(pattern: "**/*.test.ts")
167
+ \`\`\`
168
+
169
+ ### \`kirograph_status\` \u2014 index health
170
+
171
+ Returns file count, symbol count, edge count, embedding coverage, DB size. Call when something feels off.
172
+
173
+ ### \`kirograph_hotspots\` \u2014 most-connected symbols
174
+
175
+ Returns the top-N symbols by total edge degree (in + out, excluding structural \`contains\` edges). Use to find core abstractions, identify high blast-radius symbols before a refactor, or understand what the codebase revolves around.
176
+
177
+ \`\`\`
178
+ kirograph_hotspots(limit: 20)
179
+ \`\`\`
180
+
181
+ ### \`kirograph_surprising\` \u2014 unexpected cross-module coupling
182
+
183
+ Finds direct edges between symbols in structurally distant files, scored by path distance \xD7 edge-kind weight. Use before a refactor to discover hidden dependencies that will break. High score = more unexpected.
184
+
185
+ \`\`\`
186
+ kirograph_surprising(limit: 20)
187
+ \`\`\`
188
+
189
+ ### \`kirograph_diff\` \u2014 what changed since a snapshot?
190
+
191
+ Compares the current graph against a saved snapshot. Shows added/removed symbols and edges. A snapshot must exist \u2014 the user saves one with \`kirograph snapshot save <label>\` before making changes.
192
+
193
+ \`\`\`
194
+ kirograph_diff() // vs latest snapshot
195
+ kirograph_diff(snapshot: "pre-refactor") // vs named snapshot
196
+ \`\`\`
197
+
198
+ ---
199
+
200
+ ## Architecture tools *(require \`enableArchitecture: true\` in config)*
201
+
202
+ ### \`kirograph_architecture\` \u2014 **start here for architectural questions**
203
+
204
+ Returns the full package graph, detected layers (api/service/data/ui/shared), and their dependency edges.
205
+
206
+ \`\`\`
207
+ kirograph_architecture() // packages + layers
208
+ kirograph_architecture(level: "packages")
209
+ kirograph_architecture(level: "layers")
210
+ kirograph_architecture(includeFiles: true) // add file\u2192package assignments
211
+ \`\`\`
212
+
213
+ ### \`kirograph_coupling\` \u2014 stability metrics per package
214
+
215
+ Returns Ca (afferent \u2014 depended on by), Ce (efferent \u2014 depends on), and instability (Ce/(Ca+Ce)).
216
+ - High Ca + low instability = load-bearing, safe to depend on, risky to change interface.
217
+ - High Ce + high instability = depends on many things, safe to refactor internals.
218
+
219
+ \`\`\`
220
+ kirograph_coupling() // all packages, sorted by instability
221
+ kirograph_coupling(sortBy: "afferent") // most depended-on first
222
+ kirograph_coupling(sortBy: "efferent") // most outgoing deps first
223
+ \`\`\`
224
+
225
+ ### \`kirograph_package\` \u2014 drill into one package
226
+
227
+ Returns metadata, coupling metrics, outgoing deps, incoming dependents, and file list.
228
+
229
+ \`\`\`
230
+ kirograph_package(package: "auth")
231
+ kirograph_package(package: "src/services", includeFiles: false)
232
+ \`\`\`
233
+
234
+ ---
235
+
236
+ ## Workflows
237
+
238
+ **Bug fix or feature:**
239
+ 1. \`kirograph_context\` \u2014 orient, find entry points.
240
+ 2. \`kirograph_node\` with \`includeCode: true\` \u2014 read the relevant symbol.
241
+ 3. \`kirograph_callers\` / \`kirograph_callees\` \u2014 trace the call flow.
242
+ 4. \`kirograph_impact\` \u2014 check blast radius before editing.
243
+
244
+ **Refactor planning:**
245
+ 1. \`kirograph_hotspots\` \u2014 identify the most-connected symbols; changing these is risky.
246
+ 2. \`kirograph_surprising\` \u2014 surface hidden coupling that will break.
247
+ 3. \`kirograph_impact\` on specific targets \u2014 confirm blast radius.
248
+ 4. \`kirograph_diff\` after the refactor \u2014 verify the structural change matches intent.
249
+
250
+ **Architectural review:**
251
+ 1. \`kirograph_architecture\` \u2014 get the package and layer map.
252
+ 2. \`kirograph_coupling\` \u2014 find the most stable (high Ca) and most volatile (high instability) packages.
253
+ 3. \`kirograph_package\` \u2014 drill into any package of interest.
254
+ 4. \`kirograph_circular_deps\` \u2014 check for import cycles.
255
+
256
+ **Code cleanup:**
257
+ 1. \`kirograph_dead_code\` \u2014 find unreferenced unexported symbols.
258
+ 2. \`kirograph_circular_deps\` \u2014 find import cycles to untangle.
259
+ 3. \`kirograph_surprising\` \u2014 find unexpected coupling to decouple.
260
+
261
+ ---
262
+
263
+ ## If \`.kirograph/\` does NOT exist
264
+
265
+ Ask the user: "This project doesn't have KiroGraph initialized. Run \`kirograph init -i\` to build a code knowledge graph for faster exploration?"
266
+ `;
267
+ function buildSteeringContent(cavemanMode) {
268
+ const caveman = cavemanMode && cavemanMode !== "off" ? import_caveman.CAVEMAN_RULES[cavemanMode] : null;
269
+ if (!caveman) return STEERING_CONTENT;
270
+ return STEERING_CONTENT.trimEnd() + "\n\n" + caveman + "\n";
271
+ }
272
+ function writeSteering(kiroDir, cavemanMode) {
273
+ const steeringDir = path.join(kiroDir, "steering");
274
+ fs.mkdirSync(steeringDir, { recursive: true });
275
+ const steeringPath = path.join(steeringDir, "kirograph.md");
276
+ fs.writeFileSync(steeringPath, buildSteeringContent(cavemanMode));
277
+ console.log(` \u2713 Steering file written to ${steeringPath}`);
278
+ }
279
+ // Annotate the CommonJS export names for ESM import in node:
280
+ 0 && (module.exports = {
281
+ writeSteering
282
+ });
283
+ //# sourceMappingURL=steering.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/bin/installer/steering.ts"],
4
+ "sourcesContent": ["/**\n * KiroGraph Installer \u2014 Kiro steering file\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CAVEMAN_RULES, CavemanMode } from './caveman';\n\nconst STEERING_CONTENT = `---\ninclusion: always\n---\n\n# KiroGraph\n\nKiroGraph builds a semantic knowledge graph of your codebase. Use its MCP tools instead of grep/glob/file reads whenever \\`.kirograph/\\` exists in the project.\n\n## Quick decision guide\n\n| Question | Tool |\n|----------|------|\n| Where do I start on this task? | \\`kirograph_context\\` |\n| What is this symbol / show me its code | \\`kirograph_node\\` with \\`includeCode: true\\` |\n| Find a symbol by name | \\`kirograph_search\\` |\n| Who calls function X? | \\`kirograph_callers\\` |\n| What does function X call? | \\`kirograph_callees\\` |\n| What breaks if I change X? | \\`kirograph_impact\\` |\n| How are X and Y connected? | \\`kirograph_path\\` |\n| What extends / implements this type? | \\`kirograph_type_hierarchy\\` |\n| Which code is never called? | \\`kirograph_dead_code\\` |\n| Are there import cycles? | \\`kirograph_circular_deps\\` |\n| What files are indexed? | \\`kirograph_files\\` |\n| Is the index healthy? | \\`kirograph_status\\` |\n| What are the most critical symbols? | \\`kirograph_hotspots\\` |\n| Any unexpected cross-module coupling? | \\`kirograph_surprising\\` |\n| What changed since the last snapshot? | \\`kirograph_diff\\` |\n| What packages/layers exist? | \\`kirograph_architecture\\` |\n| How coupled is package X? | \\`kirograph_coupling\\` |\n| What does package X depend on? | \\`kirograph_package\\` |\n\n---\n\n## Tool reference\n\n### \\`kirograph_context\\` \u2014 **start here for any code task**\n\nReturns entry points, related symbols, and code snippets for a natural-language task description. Usually enough to orient without any additional tool calls.\n\n\\`\\`\\`\nkirograph_context(task: \"fix the auth token expiry bug\")\nkirograph_context(task: \"add dark mode\", maxNodes: 30)\nkirograph_context(task: \"refactor payment service\", includeCode: false)\n\\`\\`\\`\n\n### \\`kirograph_search\\` \u2014 find symbols by name\n\nExact match \u2192 FTS \u2192 LIKE fallback \u2192 vector (last resort). Use instead of grep.\n\n\\`\\`\\`\nkirograph_search(query: \"signIn\")\nkirograph_search(query: \"UserService\", kind: \"class\")\nkirograph_search(query: \"auth\", limit: 20)\n\\`\\`\\`\n\nSupported kinds: \\`function\\`, \\`method\\`, \\`class\\`, \\`interface\\`, \\`type_alias\\`, \\`variable\\`, \\`route\\`, \\`component\\`\n\n### \\`kirograph_node\\` \u2014 inspect a symbol\n\nReturns kind, file, signature, docstring. Add \\`includeCode: true\\` to get the full source.\n\n\\`\\`\\`\nkirograph_node(symbol: \"validateToken\")\nkirograph_node(symbol: \"AuthService\", includeCode: true)\n\\`\\`\\`\n\n### \\`kirograph_callers\\` \u2014 who calls this?\n\nBFS over incoming \\`calls\\` edges (depth 1).\n\n\\`\\`\\`\nkirograph_callers(symbol: \"processPayment\", limit: 30)\n\\`\\`\\`\n\n### \\`kirograph_callees\\` \u2014 what does this call?\n\nBFS over outgoing \\`calls\\` edges (depth 1).\n\n\\`\\`\\`\nkirograph_callees(symbol: \"handleRequest\")\n\\`\\`\\`\n\n### \\`kirograph_impact\\` \u2014 blast radius before a change\n\nTraverses all incoming edges up to \\`depth\\` hops. Call this before editing a symbol.\n\n\\`\\`\\`\nkirograph_impact(symbol: \"UserRepository\", depth: 3)\n\\`\\`\\`\n\n### \\`kirograph_path\\` \u2014 how are two symbols connected?\n\nBFS shortest path across all edge types.\n\n\\`\\`\\`\nkirograph_path(from: \"LoginController\", to: \"DatabasePool\")\n\\`\\`\\`\n\n### \\`kirograph_type_hierarchy\\` \u2014 class/interface inheritance\n\n\\`\\`\\`\nkirograph_type_hierarchy(symbol: \"BaseRepository\", direction: \"down\") // derived types\nkirograph_type_hierarchy(symbol: \"PaymentService\", direction: \"up\") // base types\nkirograph_type_hierarchy(symbol: \"IUserStore\", direction: \"both\") // all\n\\`\\`\\`\n\n### \\`kirograph_dead_code\\` \u2014 unreferenced symbols\n\nReturns unexported symbols with zero incoming edges. Good first step when cleaning up.\n\n\\`\\`\\`\nkirograph_dead_code(limit: 50)\n\\`\\`\\`\n\n### \\`kirograph_circular_deps\\` \u2014 import cycles\n\nRuns Tarjan's SCC over import edges. No parameters needed.\n\n\\`\\`\\`\nkirograph_circular_deps()\n\\`\\`\\`\n\n### \\`kirograph_files\\` \u2014 indexed file structure\n\n\\`\\`\\`\nkirograph_files(format: \"tree\") // default\nkirograph_files(format: \"flat\") // one path per line\nkirograph_files(format: \"grouped\") // by directory\nkirograph_files(filterPath: \"src/auth\", maxDepth: 2)\nkirograph_files(pattern: \"**/*.test.ts\")\n\\`\\`\\`\n\n### \\`kirograph_status\\` \u2014 index health\n\nReturns file count, symbol count, edge count, embedding coverage, DB size. Call when something feels off.\n\n### \\`kirograph_hotspots\\` \u2014 most-connected symbols\n\nReturns the top-N symbols by total edge degree (in + out, excluding structural \\`contains\\` edges). Use to find core abstractions, identify high blast-radius symbols before a refactor, or understand what the codebase revolves around.\n\n\\`\\`\\`\nkirograph_hotspots(limit: 20)\n\\`\\`\\`\n\n### \\`kirograph_surprising\\` \u2014 unexpected cross-module coupling\n\nFinds direct edges between symbols in structurally distant files, scored by path distance \u00D7 edge-kind weight. Use before a refactor to discover hidden dependencies that will break. High score = more unexpected.\n\n\\`\\`\\`\nkirograph_surprising(limit: 20)\n\\`\\`\\`\n\n### \\`kirograph_diff\\` \u2014 what changed since a snapshot?\n\nCompares the current graph against a saved snapshot. Shows added/removed symbols and edges. A snapshot must exist \u2014 the user saves one with \\`kirograph snapshot save <label>\\` before making changes.\n\n\\`\\`\\`\nkirograph_diff() // vs latest snapshot\nkirograph_diff(snapshot: \"pre-refactor\") // vs named snapshot\n\\`\\`\\`\n\n---\n\n## Architecture tools *(require \\`enableArchitecture: true\\` in config)*\n\n### \\`kirograph_architecture\\` \u2014 **start here for architectural questions**\n\nReturns the full package graph, detected layers (api/service/data/ui/shared), and their dependency edges.\n\n\\`\\`\\`\nkirograph_architecture() // packages + layers\nkirograph_architecture(level: \"packages\")\nkirograph_architecture(level: \"layers\")\nkirograph_architecture(includeFiles: true) // add file\u2192package assignments\n\\`\\`\\`\n\n### \\`kirograph_coupling\\` \u2014 stability metrics per package\n\nReturns Ca (afferent \u2014 depended on by), Ce (efferent \u2014 depends on), and instability (Ce/(Ca+Ce)).\n- High Ca + low instability = load-bearing, safe to depend on, risky to change interface.\n- High Ce + high instability = depends on many things, safe to refactor internals.\n\n\\`\\`\\`\nkirograph_coupling() // all packages, sorted by instability\nkirograph_coupling(sortBy: \"afferent\") // most depended-on first\nkirograph_coupling(sortBy: \"efferent\") // most outgoing deps first\n\\`\\`\\`\n\n### \\`kirograph_package\\` \u2014 drill into one package\n\nReturns metadata, coupling metrics, outgoing deps, incoming dependents, and file list.\n\n\\`\\`\\`\nkirograph_package(package: \"auth\")\nkirograph_package(package: \"src/services\", includeFiles: false)\n\\`\\`\\`\n\n---\n\n## Workflows\n\n**Bug fix or feature:**\n1. \\`kirograph_context\\` \u2014 orient, find entry points.\n2. \\`kirograph_node\\` with \\`includeCode: true\\` \u2014 read the relevant symbol.\n3. \\`kirograph_callers\\` / \\`kirograph_callees\\` \u2014 trace the call flow.\n4. \\`kirograph_impact\\` \u2014 check blast radius before editing.\n\n**Refactor planning:**\n1. \\`kirograph_hotspots\\` \u2014 identify the most-connected symbols; changing these is risky.\n2. \\`kirograph_surprising\\` \u2014 surface hidden coupling that will break.\n3. \\`kirograph_impact\\` on specific targets \u2014 confirm blast radius.\n4. \\`kirograph_diff\\` after the refactor \u2014 verify the structural change matches intent.\n\n**Architectural review:**\n1. \\`kirograph_architecture\\` \u2014 get the package and layer map.\n2. \\`kirograph_coupling\\` \u2014 find the most stable (high Ca) and most volatile (high instability) packages.\n3. \\`kirograph_package\\` \u2014 drill into any package of interest.\n4. \\`kirograph_circular_deps\\` \u2014 check for import cycles.\n\n**Code cleanup:**\n1. \\`kirograph_dead_code\\` \u2014 find unreferenced unexported symbols.\n2. \\`kirograph_circular_deps\\` \u2014 find import cycles to untangle.\n3. \\`kirograph_surprising\\` \u2014 find unexpected coupling to decouple.\n\n---\n\n## If \\`.kirograph/\\` does NOT exist\n\nAsk the user: \"This project doesn't have KiroGraph initialized. Run \\`kirograph init -i\\` to build a code knowledge graph for faster exploration?\"\n`;\n\nfunction buildSteeringContent(cavemanMode?: CavemanMode | 'off'): string {\n const caveman = cavemanMode && cavemanMode !== 'off' ? CAVEMAN_RULES[cavemanMode] : null;\n if (!caveman) return STEERING_CONTENT;\n return STEERING_CONTENT.trimEnd() + '\\n\\n' + caveman + '\\n';\n}\n\nexport function writeSteering(kiroDir: string, cavemanMode?: CavemanMode | 'off'): void {\n const steeringDir = path.join(kiroDir, 'steering');\n fs.mkdirSync(steeringDir, { recursive: true });\n const steeringPath = path.join(steeringDir, 'kirograph.md');\n fs.writeFileSync(steeringPath, buildSteeringContent(cavemanMode));\n console.log(` \u2713 Steering file written to ${steeringPath}`);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,SAAoB;AACpB,WAAsB;AACtB,qBAA2C;AAE3C,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuOzB,SAAS,qBAAqB,aAA2C;AACvE,QAAM,UAAU,eAAe,gBAAgB,QAAQ,6BAAc,WAAW,IAAI;AACpF,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,iBAAiB,QAAQ,IAAI,SAAS,UAAU;AACzD;AAEO,SAAS,cAAc,SAAiB,aAAyC;AACtF,QAAM,cAAc,KAAK,KAAK,SAAS,UAAU;AACjD,KAAG,UAAU,aAAa,EAAE,WAAW,KAAK,CAAC;AAC7C,QAAM,eAAe,KAAK,KAAK,aAAa,cAAc;AAC1D,KAAG,cAAc,cAAc,qBAAqB,WAAW,CAAC;AAChE,UAAQ,IAAI,qCAAgC,YAAY,EAAE;AAC5D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * KiroGraph CLI
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=kirograph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kirograph.d.ts","sourceRoot":"","sources":["../../src/bin/kirograph.ts"],"names":[],"mappings":";AACA;;GAEG"}
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var import_commander = require("commander");
4
+ var import_banner = require("./banner");
5
+ var import_help = require("./commands/help");
6
+ var import_init = require("./commands/init");
7
+ var import_uninit = require("./commands/uninit");
8
+ var import_commands = require("./commands/index");
9
+ var import_sync = require("./commands/sync");
10
+ var import_status = require("./commands/status");
11
+ var import_query = require("./commands/query");
12
+ var import_files = require("./commands/files");
13
+ var import_context = require("./commands/context");
14
+ var import_affected = require("./commands/affected");
15
+ var import_mark_dirty = require("./commands/mark-dirty");
16
+ var import_sync_if_dirty = require("./commands/sync-if-dirty");
17
+ var import_unlock = require("./commands/unlock");
18
+ var import_install = require("./commands/install");
19
+ var import_serve = require("./commands/serve");
20
+ var import_dashboard = require("./commands/dashboard");
21
+ var import_architecture = require("./commands/architecture");
22
+ var import_coupling = require("./commands/coupling");
23
+ var import_package = require("./commands/package");
24
+ var import_caveman = require("./commands/caveman");
25
+ var import_dead_code = require("./commands/dead-code");
26
+ var import_hotspots = require("./commands/hotspots");
27
+ var import_surprising = require("./commands/surprising");
28
+ var import_snapshot = require("./commands/snapshot");
29
+ var import_path = require("./commands/path");
30
+ var import_export = require("./commands/export");
31
+ process.on("uncaughtException", (err) => {
32
+ const msg = err?.message ?? String(err);
33
+ const isWasmAbort = msg.includes("Aborted(") || msg.includes("RuntimeError") || err?.constructor?.name === "RuntimeError";
34
+ if (isWasmAbort) {
35
+ process.stderr.write([
36
+ "",
37
+ " \u2716 KiroGraph crashed: SQLite WASM runtime aborted.",
38
+ "",
39
+ " Most likely cause: another process (e.g. the Kiro MCP server) is",
40
+ " holding the database open while indexing is running.",
41
+ "",
42
+ " How to fix:",
43
+ " 1. Close Kiro IDE (or disable the kirograph MCP server) before indexing",
44
+ " 2. Run: kirograph unlock",
45
+ " 3. Then retry: kirograph index",
46
+ "",
47
+ " If the problem persists, delete the lock manually:",
48
+ " del .kirograph\\kirograph.db.lock (Windows)",
49
+ " rm -rf .kirograph/kirograph.db.lock (macOS/Linux)",
50
+ ""
51
+ ].join("\n"));
52
+ process.exit(1);
53
+ }
54
+ process.stderr.write(`Uncaught error: ${msg}
55
+ `);
56
+ process.exit(1);
57
+ });
58
+ const program = new import_commander.Command();
59
+ program.name("kirograph").description("Semantic code knowledge graph for Kiro").version("0.12.1").addHelpCommand(true).hook("preAction", (thisCommand) => {
60
+ const name = thisCommand.name();
61
+ if (name === "init") (0, import_banner.printBanner)();
62
+ });
63
+ (0, import_install.register)(program);
64
+ (0, import_init.register)(program);
65
+ (0, import_uninit.register)(program);
66
+ (0, import_commands.register)(program);
67
+ (0, import_sync.register)(program);
68
+ (0, import_sync_if_dirty.register)(program);
69
+ (0, import_mark_dirty.register)(program);
70
+ (0, import_status.register)(program);
71
+ (0, import_query.register)(program);
72
+ (0, import_context.register)(program);
73
+ (0, import_files.register)(program);
74
+ (0, import_affected.register)(program);
75
+ (0, import_unlock.register)(program);
76
+ (0, import_serve.register)(program);
77
+ (0, import_dashboard.register)(program);
78
+ (0, import_architecture.register)(program);
79
+ (0, import_coupling.register)(program);
80
+ (0, import_package.register)(program);
81
+ (0, import_caveman.register)(program);
82
+ (0, import_dead_code.register)(program);
83
+ (0, import_hotspots.register)(program);
84
+ (0, import_surprising.register)(program);
85
+ (0, import_snapshot.register)(program);
86
+ (0, import_path.register)(program);
87
+ (0, import_export.register)(program);
88
+ if (process.argv.length === 2) {
89
+ (0, import_banner.printBanner)();
90
+ (0, import_help.printColoredHelp)();
91
+ process.exit(0);
92
+ }
93
+ (0, import_help.register)(program);
94
+ program.parse(process.argv);
95
+ //# sourceMappingURL=kirograph.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/bin/kirograph.ts"],
4
+ "sourcesContent": ["#!/usr/bin/env node\n/**\n * KiroGraph CLI\n */\n\nimport { Command } from 'commander';\nimport { printBanner } from './banner';\nimport { printColoredHelp, register as registerHelp } from './commands/help';\nimport { register as registerInit } from './commands/init';\nimport { register as registerUninit } from './commands/uninit';\nimport { register as registerIndex } from './commands/index';\nimport { register as registerSync } from './commands/sync';\nimport { register as registerStatus } from './commands/status';\nimport { register as registerQuery } from './commands/query';\nimport { register as registerFiles } from './commands/files';\nimport { register as registerContext } from './commands/context';\nimport { register as registerAffected } from './commands/affected';\nimport { register as registerMarkDirty } from './commands/mark-dirty';\nimport { register as registerSyncIfDirty } from './commands/sync-if-dirty';\nimport { register as registerUnlock } from './commands/unlock';\nimport { register as registerInstall } from './commands/install';\nimport { register as registerServe } from './commands/serve';\nimport { register as registerDashboard } from './commands/dashboard';\nimport { register as registerArchitecture } from './commands/architecture';\nimport { register as registerCoupling } from './commands/coupling';\nimport { register as registerPackage } from './commands/package';\nimport { register as registerCaveman } from './commands/caveman';\nimport { register as registerDeadCode } from './commands/dead-code';\nimport { register as registerHotspots } from './commands/hotspots';\nimport { register as registerSurprising } from './commands/surprising';\nimport { register as registerSnapshot } from './commands/snapshot';\nimport { register as registerPath } from './commands/path';\nimport { register as registerExport } from './commands/export';\n\n// \u2500\u2500 Global error handler for WASM runtime crashes \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// node-sqlite3-wasm calls process.abort() when it hits a fatal error (e.g.\n// database is locked by another process). This produces a raw \"Aborted()\"\n// message with no context. We intercept it here to print a clear explanation\n// before the process exits.\nprocess.on('uncaughtException', (err: Error) => {\n const msg = err?.message ?? String(err);\n const isWasmAbort = msg.includes('Aborted(') || msg.includes('RuntimeError') || (err as any)?.constructor?.name === 'RuntimeError';\n\n if (isWasmAbort) {\n process.stderr.write([\n '',\n ' \u2716 KiroGraph crashed: SQLite WASM runtime aborted.',\n '',\n ' Most likely cause: another process (e.g. the Kiro MCP server) is',\n ' holding the database open while indexing is running.',\n '',\n ' How to fix:',\n ' 1. Close Kiro IDE (or disable the kirograph MCP server) before indexing',\n ' 2. Run: kirograph unlock',\n ' 3. Then retry: kirograph index',\n '',\n ' If the problem persists, delete the lock manually:',\n ' del .kirograph\\\\kirograph.db.lock (Windows)',\n ' rm -rf .kirograph/kirograph.db.lock (macOS/Linux)',\n '',\n ].join('\\n'));\n process.exit(1);\n }\n\n // Not a WASM crash \u2014 re-throw as normal\n process.stderr.write(`Uncaught error: ${msg}\\n`);\n process.exit(1);\n});\n\ndeclare const __CLI_VERSION__: string;\n\nconst program = new Command();\n\nprogram\n .name('kirograph')\n .description('Semantic code knowledge graph for Kiro')\n .version(__CLI_VERSION__)\n .addHelpCommand(true)\n .hook('preAction', (thisCommand) => {\n const name = thisCommand.name();\n if (name === 'init') printBanner();\n });\n\nregisterInstall(program);\nregisterInit(program);\nregisterUninit(program);\nregisterIndex(program);\nregisterSync(program);\nregisterSyncIfDirty(program);\nregisterMarkDirty(program);\nregisterStatus(program);\nregisterQuery(program);\nregisterContext(program);\nregisterFiles(program);\nregisterAffected(program);\nregisterUnlock(program);\nregisterServe(program);\nregisterDashboard(program);\nregisterArchitecture(program);\nregisterCoupling(program);\nregisterPackage(program);\nregisterCaveman(program);\nregisterDeadCode(program);\nregisterHotspots(program);\nregisterSurprising(program);\nregisterSnapshot(program);\nregisterPath(program);\nregisterExport(program);\n\n// Show banner + help when called with no arguments, otherwise parse normally\nif (process.argv.length === 2) {\n printBanner();\n printColoredHelp();\n process.exit(0);\n}\n\nregisterHelp(program);\n\nprogram.parse(process.argv);\n"],
5
+ "mappings": ";;AAKA,uBAAwB;AACxB,oBAA4B;AAC5B,kBAA2D;AAC3D,kBAAyC;AACzC,oBAA2C;AAC3C,sBAA0C;AAC1C,kBAAyC;AACzC,oBAA2C;AAC3C,mBAA0C;AAC1C,mBAA0C;AAC1C,qBAA4C;AAC5C,sBAA6C;AAC7C,wBAA8C;AAC9C,2BAAgD;AAChD,oBAA2C;AAC3C,qBAA4C;AAC5C,mBAA0C;AAC1C,uBAA8C;AAC9C,0BAAiD;AACjD,sBAA6C;AAC7C,qBAA4C;AAC5C,qBAA4C;AAC5C,uBAA6C;AAC7C,sBAA6C;AAC7C,wBAA+C;AAC/C,sBAA6C;AAC7C,kBAAyC;AACzC,oBAA2C;AAQ3C,QAAQ,GAAG,qBAAqB,CAAC,QAAe;AAC9C,QAAM,MAAM,KAAK,WAAW,OAAO,GAAG;AACtC,QAAM,cAAc,IAAI,SAAS,UAAU,KAAK,IAAI,SAAS,cAAc,KAAM,KAAa,aAAa,SAAS;AAEpH,MAAI,aAAa;AACf,YAAQ,OAAO,MAAM;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI,CAAC;AACZ,YAAQ,KAAK,CAAC;AAAA,EAChB;AAGA,UAAQ,OAAO,MAAM,mBAAmB,GAAG;AAAA,CAAI;AAC/C,UAAQ,KAAK,CAAC;AAChB,CAAC;AAID,MAAM,UAAU,IAAI,yBAAQ;AAE5B,QACG,KAAK,WAAW,EAChB,YAAY,wCAAwC,EACpD,QAAQ,QAAe,EACvB,eAAe,IAAI,EACnB,KAAK,aAAa,CAAC,gBAAgB;AAClC,QAAM,OAAO,YAAY,KAAK;AAC9B,MAAI,SAAS,OAAQ,gCAAY;AACnC,CAAC;AAAA,IAEH,eAAAA,UAAgB,OAAO;AAAA,IACvB,YAAAC,UAAa,OAAO;AAAA,IACpB,cAAAC,UAAe,OAAO;AAAA,IACtB,gBAAAC,UAAc,OAAO;AAAA,IACrB,YAAAC,UAAa,OAAO;AAAA,IACpB,qBAAAC,UAAoB,OAAO;AAAA,IAC3B,kBAAAC,UAAkB,OAAO;AAAA,IACzB,cAAAC,UAAe,OAAO;AAAA,IACtB,aAAAC,UAAc,OAAO;AAAA,IACrB,eAAAC,UAAgB,OAAO;AAAA,IACvB,aAAAC,UAAc,OAAO;AAAA,IACrB,gBAAAC,UAAiB,OAAO;AAAA,IACxB,cAAAC,UAAe,OAAO;AAAA,IACtB,aAAAC,UAAc,OAAO;AAAA,IACrB,iBAAAC,UAAkB,OAAO;AAAA,IACzB,oBAAAC,UAAqB,OAAO;AAAA,IAC5B,gBAAAC,UAAiB,OAAO;AAAA,IACxB,eAAAC,UAAgB,OAAO;AAAA,IACvB,eAAAC,UAAgB,OAAO;AAAA,IACvB,iBAAAC,UAAiB,OAAO;AAAA,IACxB,gBAAAC,UAAiB,OAAO;AAAA,IACxB,kBAAAC,UAAmB,OAAO;AAAA,IAC1B,gBAAAC,UAAiB,OAAO;AAAA,IACxB,YAAAC,UAAa,OAAO;AAAA,IACpB,cAAAC,UAAe,OAAO;AAGtB,IAAI,QAAQ,KAAK,WAAW,GAAG;AAC7B,iCAAY;AACZ,oCAAiB;AACjB,UAAQ,KAAK,CAAC;AAChB;AAAA,IAEA,YAAAC,UAAa,OAAO;AAEpB,QAAQ,MAAM,QAAQ,IAAI;",
6
+ "names": ["registerInstall", "registerInit", "registerUninit", "registerIndex", "registerSync", "registerSyncIfDirty", "registerMarkDirty", "registerStatus", "registerQuery", "registerContext", "registerFiles", "registerAffected", "registerUnlock", "registerServe", "registerDashboard", "registerArchitecture", "registerCoupling", "registerPackage", "registerCaveman", "registerDeadCode", "registerHotspots", "registerSurprising", "registerSnapshot", "registerPath", "registerExport", "registerHelp"]
7
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * KiroGraph CLI Progress Renderer
3
+ *
4
+ * Renders indexAll/sync progress events to stdout.
5
+ * Lives in src/bin/ because it is a display concern — not part of the core library.
6
+ */
7
+ import type { IndexProgress } from '../types';
8
+ /**
9
+ * Renders a single indexAll progress event to stdout.
10
+ * Scanning and framework detection print a persistent line (with \n).
11
+ * Parsing, resolving, and embeddings overwrite the current line (\r).
12
+ */
13
+ export declare function renderIndexProgress(p: IndexProgress): void;
14
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/bin/progress.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAe9C;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAuC1D"}
@@ -0,0 +1,201 @@
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 progress_exports = {};
20
+ __export(progress_exports, {
21
+ renderIndexProgress: () => renderIndexProgress,
22
+ renderSyncProgress: () => renderSyncProgress,
23
+ renderSyncProgressVerbose: () => renderSyncProgressVerbose,
24
+ renderSyncSummary: () => renderSyncSummary
25
+ });
26
+ module.exports = __toCommonJS(progress_exports);
27
+ const _v = "\x1B[38;5;99m";
28
+ const _r = "\x1B[0m";
29
+ const _d = "\x1B[2m";
30
+ const _g = "\x1B[38;5;114m";
31
+ function _bar(pct, width = 20) {
32
+ const filled = Math.floor(pct / (100 / width));
33
+ return "\u2588".repeat(filled) + "\u2591".repeat(width - filled);
34
+ }
35
+ function _num(n) {
36
+ return n.toLocaleString();
37
+ }
38
+ function renderIndexProgress(p) {
39
+ const pct = p.total > 0 ? Math.round(p.current / p.total * 100) : 0;
40
+ if (p.phase === "scanning") {
41
+ process.stdout.write(` ${_v}\u2713 scanning${_r} ${_v}${p.current}${_r} ${_d}files found${_r}
42
+ `);
43
+ } else if (p.phase === "parsing") {
44
+ process.stdout.write(`\r ${_v}parsing${_r} [${_bar(pct)}] ${_v}${pct}%${_r}${" ".repeat(8)}`);
45
+ if (p.current === p.total) process.stdout.write("\n");
46
+ } else if (p.phase === "resolving") {
47
+ if (p.current === 0 && p.total <= 1) {
48
+ process.stdout.write(`\r ${_v}resolving${_r} cross-file references\u2026${" ".repeat(20)}`);
49
+ } else if (p.total > 0) {
50
+ const bar = _bar(pct);
51
+ const suffix = p.current === p.total ? `${_v}${p.current}${_r}${_d}/${p.total} refs${_r}
52
+ ` : `${_v}${p.current}${_r}${_d}/${p.total}${_r}${" ".repeat(10)}`;
53
+ const prefix = p.current === p.total ? `\r ${_v}\u2713 resolving${_r}` : `\r ${_v}resolving${_r} `;
54
+ process.stdout.write(`${prefix} [${bar}] ${suffix}`);
55
+ }
56
+ } else if (p.phase === "detecting frameworks") {
57
+ if (p.current === 1) {
58
+ const frameworks = p.meta?.frameworks ?? [];
59
+ const languages = p.meta?.languages ?? [];
60
+ const fwLabel = frameworks.length > 0 ? `${_v}${frameworks.join(", ")}${_r}` : `${_d}none${_r}`;
61
+ const langLabel = languages.length > 0 ? `${_v}${languages.join(", ")}${_r}` : `${_d}none${_r}`;
62
+ process.stdout.write(` ${_v}\u2713 languages${_r} detected: ${langLabel}
63
+ `);
64
+ process.stdout.write(` ${_v}\u2713 frameworks${_r} detected: ${fwLabel}
65
+ `);
66
+ }
67
+ } else if (p.phase === "embeddings") {
68
+ if (p.current === -1) {
69
+ process.stdout.write(`
70
+ \x1B[33m\u26A0 Large codebase: ${_num(p.total)} embeddable symbols detected.\x1B[0m
71
+ `);
72
+ process.stdout.write(` \x1B[33m Embedding may be slow or memory-intensive. Consider setting enableEmbeddings: false\x1B[0m
73
+ `);
74
+ process.stdout.write(` \x1B[33m for codebases this large, or use a lighter model (e.g. Xenova/all-MiniLM-L6-v2).\x1B[0m
75
+
76
+ `);
77
+ } else {
78
+ process.stdout.write(`\r ${_v}embeddings${_r} [${_bar(pct)}] ${_v}${pct}%${_r}${" ".repeat(10)}`);
79
+ if (p.current === p.total && p.total > 0) process.stdout.write("\n");
80
+ }
81
+ } else {
82
+ process.stdout.write(`\r ${_v}${p.phase}${_r} ${p.current}/${p.total}${" ".repeat(20)}`);
83
+ }
84
+ }
85
+ function renderSyncProgress(p) {
86
+ const pct = p.total > 0 ? Math.round(p.current / p.total * 100) : 0;
87
+ if (p.phase === "scanning") {
88
+ if (p.current > 0) {
89
+ process.stdout.write(`\r ${_v}\u2713 scanning${_r} ${_v}${_num(p.current)}${_r} ${_d}files found${_r}
90
+ `);
91
+ } else {
92
+ process.stdout.write(`\r ${_v}scanning${_r} ${_d}detecting changes\u2026${_r}${" ".repeat(20)}`);
93
+ }
94
+ } else if (p.phase === "parsing") {
95
+ process.stdout.write(`\r ${_v}parsing${_r} [${_bar(pct)}] ${_v}${pct}%${_r}${" ".repeat(8)}`);
96
+ if (p.current === p.total) process.stdout.write("\n");
97
+ } else if (p.phase === "resolving") {
98
+ if (p.current === 0 && p.total <= 1) {
99
+ process.stdout.write(`\r ${_v}resolving${_r} cross-file references\u2026${" ".repeat(20)}`);
100
+ } else if (p.total > 0) {
101
+ const bar = _bar(pct);
102
+ const suffix = p.current === p.total ? `${_v}${_num(p.current)}${_r}${_d}/${_num(p.total)} refs${_r}
103
+ ` : `${_v}${_num(p.current)}${_r}${_d}/${_num(p.total)}${_r}${" ".repeat(10)}`;
104
+ const prefix = p.current === p.total ? `\r ${_v}\u2713 resolving${_r}` : `\r ${_v}resolving${_r} `;
105
+ process.stdout.write(`${prefix} [${bar}] ${suffix}`);
106
+ }
107
+ } else if (p.phase === "embeddings") {
108
+ if (p.current === -1) {
109
+ process.stdout.write(`
110
+ \x1B[33m\u26A0 Large codebase: ${_num(p.total)} embeddable symbols detected.\x1B[0m
111
+ `);
112
+ process.stdout.write(` \x1B[33m Embedding may be slow or memory-intensive. Consider setting enableEmbeddings: false\x1B[0m
113
+ `);
114
+ process.stdout.write(` \x1B[33m for codebases this large, or use a lighter model (e.g. Xenova/all-MiniLM-L6-v2).\x1B[0m
115
+
116
+ `);
117
+ } else {
118
+ process.stdout.write(`\r ${_v}embeddings${_r} [${_bar(pct)}] ${_v}${pct}%${_r}${" ".repeat(10)}`);
119
+ if (p.current === p.total && p.total > 0) process.stdout.write("\n");
120
+ }
121
+ } else {
122
+ process.stdout.write(`\r ${_v}${p.phase}${_r} ${p.current}/${p.total}${" ".repeat(20)}`);
123
+ }
124
+ }
125
+ function renderSyncProgressVerbose(p) {
126
+ if (p.phase === "scanning") {
127
+ if (p.meta?.excludeCleanup && p.meta.file) {
128
+ process.stdout.write(` ${_d}exclude${_r} ${_d}${p.meta.file}${_r}
129
+ `);
130
+ } else if (p.current > 0) {
131
+ process.stdout.write(` ${_v}\u2713 scanning${_r} ${_v}${_num(p.current)}${_r} ${_d}files found${_r}
132
+ `);
133
+ } else {
134
+ process.stdout.write(` ${_v}scanning${_r} ${_d}detecting changes\u2026${_r}
135
+ `);
136
+ }
137
+ } else if (p.phase === "parsing") {
138
+ if (p.currentFile) {
139
+ const short = p.currentFile.length > 60 ? "\u2026" + p.currentFile.slice(p.currentFile.length - 59) : p.currentFile;
140
+ process.stdout.write(` ${_v}parse${_r} ${_d}[${_num(p.current)}/${_num(p.total)}]${_r} ${short}
141
+ `);
142
+ }
143
+ } else if (p.phase === "resolving") {
144
+ if (p.current === 0 && p.total <= 1) {
145
+ process.stdout.write(` ${_v}resolving${_r} cross-file references\u2026
146
+ `);
147
+ } else if (p.total > 0 && p.current === p.total) {
148
+ process.stdout.write(` ${_v}\u2713 resolving${_r} ${_v}${_num(p.current)}${_r}${_d}/${_num(p.total)} refs${_r}
149
+ `);
150
+ }
151
+ } else if (p.phase === "embeddings") {
152
+ if (p.current === -1) {
153
+ process.stdout.write(`
154
+ \x1B[33m\u26A0 Large codebase: ${_num(p.total)} embeddable symbols detected.\x1B[0m
155
+ `);
156
+ process.stdout.write(` \x1B[33m Embedding may be slow or memory-intensive. Consider setting enableEmbeddings: false\x1B[0m
157
+ `);
158
+ process.stdout.write(` \x1B[33m for codebases this large, or use a lighter model (e.g. Xenova/all-MiniLM-L6-v2).\x1B[0m
159
+
160
+ `);
161
+ } else {
162
+ const pct = p.total > 0 ? Math.round(p.current / p.total * 100) : 0;
163
+ process.stdout.write(`\r ${_v}embeddings${_r} [${_bar(pct)}] ${_v}${pct}%${_r}${" ".repeat(10)}`);
164
+ if (p.current === p.total && p.total > 0) process.stdout.write("\n");
165
+ }
166
+ } else if (p.phase === "architecture") {
167
+ if (p.meta?.msg) {
168
+ process.stdout.write(` ${_v}architecture${_r} ${_d}${p.meta.msg}${_r}
169
+ `);
170
+ } else if (p.current === p.total && p.total > 0) {
171
+ process.stdout.write(` ${_v}\u2713 architecture${_r}
172
+ `);
173
+ }
174
+ } else {
175
+ process.stdout.write(` ${_v}${p.phase}${_r} ${p.current}/${p.total}
176
+ `);
177
+ }
178
+ }
179
+ function renderSyncSummary(result) {
180
+ const secs = (result.duration / 1e3).toFixed(1);
181
+ const filesChanged = result.added.length + result.modified.length;
182
+ const filesDeleted = result.removed.length;
183
+ console.log(`
184
+ ${_g}\u2713${_r} sync complete ${_d}(${secs}s)${_r}`);
185
+ console.log(` ${_d}files scanned:${_r} ${_v}${_num(result.filesScanned)}${_r}`);
186
+ console.log(` ${_d}files changed:${_r} ${_v}${_num(filesChanged)}${_r}`);
187
+ console.log(` ${_d}files deleted:${_r} ${_v}${_num(filesDeleted)}${_r}`);
188
+ console.log(` ${_d}nodes added:${_r} ${_v}${_num(result.nodesCreated)}${_r}`);
189
+ console.log(` ${_d}nodes updated:${_r} ${_v}${_num(result.nodesUpdated)}${_r}`);
190
+ console.log(` ${_d}nodes removed:${_r} ${_v}${_num(result.nodesRemoved)}${_r}`);
191
+ console.log(` ${_d}edges added:${_r} ${_v}${_num(result.edgesCreated)}${_r}`);
192
+ console.log(` ${_d}edges removed:${_r} ${_v}${_num(result.edgesRemoved)}${_r}`);
193
+ }
194
+ // Annotate the CommonJS export names for ESM import in node:
195
+ 0 && (module.exports = {
196
+ renderIndexProgress,
197
+ renderSyncProgress,
198
+ renderSyncProgressVerbose,
199
+ renderSyncSummary
200
+ });
201
+ //# sourceMappingURL=progress.js.map