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,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/bin/commands/sync-if-dirty.ts"],
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport * as path from 'path';\nimport { dim, reset } from '../ui';\nimport { warnFallback, formatSyncCounts } from './utils';\n\nexport function register(program: Command): void {\n program\n .command('sync-if-dirty [projectPath]')\n .description('Sync only if a dirty marker is present')\n .option('-q, --quiet', 'Suppress output')\n .action(async (projectPath: string | undefined, opts: { quiet?: boolean }) => {\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n const target = path.resolve(projectPath ?? process.cwd());\n if (!KiroGraph.isInitialized(target)) { process.exit(0); }\n const cg = await KiroGraph.open(target);\n const result = await cg.syncIfDirty();\n if (!opts.quiet) {\n if (result) {\n const changed = result.added.length + result.modified.length + result.removed.length;\n if (changed === 0) {\n console.log(` ${dim}Index up to date.${reset}`);\n } else {\n console.log(formatSyncCounts(result));\n }\n if (result.errors.length) console.warn(` \\x1b[33m\u26A0 ${result.errors.length} warning(s)\\x1b[0m`);\n warnFallback(cg.getEngineFallback());\n } else {\n console.log(` ${dim}Not dirty, skipped.${reset}`);\n }\n }\n cg.close();\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,WAAsB;AACtB,gBAA2B;AAC3B,mBAA+C;AAExC,SAAS,SAAS,SAAwB;AAC/C,UACG,QAAQ,6BAA6B,EACrC,YAAY,wCAAwC,EACpD,OAAO,eAAe,iBAAiB,EACvC,OAAO,OAAO,aAAiC,SAA8B;AAC5E,UAAM,aAAa,MAAM,QAAQ,QAAQ,EAAE,KAAK,MAAM,QAAQ,gBAAgB,CAAC,GAAG;AAClF,UAAM,SAAS,KAAK,QAAQ,eAAe,QAAQ,IAAI,CAAC;AACxD,QAAI,CAAC,UAAU,cAAc,MAAM,GAAG;AAAE,cAAQ,KAAK,CAAC;AAAA,IAAG;AACzD,UAAM,KAAK,MAAM,UAAU,KAAK,MAAM;AACtC,UAAM,SAAS,MAAM,GAAG,YAAY;AACpC,QAAI,CAAC,KAAK,OAAO;AACf,UAAI,QAAQ;AACV,cAAM,UAAU,OAAO,MAAM,SAAS,OAAO,SAAS,SAAS,OAAO,QAAQ;AAC9E,YAAI,YAAY,GAAG;AACjB,kBAAQ,IAAI,KAAK,aAAG,oBAAoB,eAAK,EAAE;AAAA,QACjD,OAAO;AACL,kBAAQ,QAAI,+BAAiB,MAAM,CAAC;AAAA,QACtC;AACA,YAAI,OAAO,OAAO,OAAQ,SAAQ,KAAK,oBAAe,OAAO,OAAO,MAAM,oBAAoB;AAC9F,uCAAa,GAAG,kBAAkB,CAAC;AAAA,MACrC,OAAO;AACL,gBAAQ,IAAI,KAAK,aAAG,sBAAsB,eAAK,EAAE;AAAA,MACnD;AAAA,IACF;AACA,OAAG,MAAM;AAAA,EACX,CAAC;AACL;",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function register(program: Command): void;
3
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoB/C"}
@@ -0,0 +1,81 @@
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 sync_exports = {};
30
+ __export(sync_exports, {
31
+ register: () => register
32
+ });
33
+ module.exports = __toCommonJS(sync_exports);
34
+ var path = __toESM(require("path"));
35
+ var import_ui = require("../ui");
36
+ var import_progress = require("../progress");
37
+ var import_utils = require("./utils");
38
+ function register(program) {
39
+ program.command("sync [projectPath]").description("Incremental sync of changed files").option("--files <files...>", "Specific files to sync").option("-q, --quiet", "Suppress progress output").option("--progress", "Verbose per-file progress output (implies errors are shown inline)").action(async (projectPath, opts) => {
40
+ const KiroGraph = (await Promise.resolve().then(() => require("../../index.js"))).default;
41
+ const target = path.resolve(projectPath ?? process.cwd());
42
+ const cg = await KiroGraph.open(target);
43
+ let progressHandler;
44
+ if (opts.quiet) {
45
+ progressHandler = void 0;
46
+ } else if (opts.progress) {
47
+ progressHandler = import_progress.renderSyncProgressVerbose;
48
+ } else {
49
+ progressHandler = import_progress.renderSyncProgress;
50
+ }
51
+ const result = await cg.sync({
52
+ files: opts.files,
53
+ onProgress: progressHandler
54
+ });
55
+ const changed = result.added.length + result.modified.length + result.removed.length;
56
+ if (changed === 0) {
57
+ if (!opts.quiet) process.stdout.write("\n");
58
+ console.log(` ${import_ui.dim}Nothing to sync \u2014 index is up to date.${import_ui.reset}`);
59
+ } else {
60
+ (0, import_progress.renderSyncSummary)(result);
61
+ }
62
+ if (result.errors.length) {
63
+ if (opts.progress) {
64
+ console.warn(`
65
+ \x1B[33m\u26A0 ${result.errors.length} error(s) during sync:\x1B[0m`);
66
+ for (const err of result.errors) {
67
+ console.warn(` \x1B[33m${err}\x1B[0m`);
68
+ }
69
+ } else {
70
+ console.warn(` \x1B[33m\u26A0 ${result.errors.length} warning(s)\x1B[0m`);
71
+ }
72
+ }
73
+ (0, import_utils.warnFallback)(cg.getEngineFallback());
74
+ cg.close();
75
+ });
76
+ }
77
+ // Annotate the CommonJS export names for ESM import in node:
78
+ 0 && (module.exports = {
79
+ register
80
+ });
81
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/bin/commands/sync.ts"],
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport * as path from 'path';\nimport { dim, reset } from '../ui';\nimport { renderSyncProgress, renderSyncProgressVerbose, renderSyncSummary } from '../progress';\nimport { warnFallback } from './utils';\n\nexport function register(program: Command): void {\n program\n .command('sync [projectPath]')\n .description('Incremental sync of changed files')\n .option('--files <files...>', 'Specific files to sync')\n .option('-q, --quiet', 'Suppress progress output')\n .option('--progress', 'Verbose per-file progress output (implies errors are shown inline)')\n .action(async (projectPath: string | undefined, opts: { files?: string[]; quiet?: boolean; progress?: boolean }) => {\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n const target = path.resolve(projectPath ?? process.cwd());\n const cg = await KiroGraph.open(target);\n\n let progressHandler: ((p: import('../../types').IndexProgress) => void) | undefined;\n if (opts.quiet) {\n progressHandler = undefined;\n } else if (opts.progress) {\n progressHandler = renderSyncProgressVerbose;\n } else {\n progressHandler = renderSyncProgress;\n }\n\n const result = await cg.sync({\n files: opts.files,\n onProgress: progressHandler,\n });\n\n const changed = result.added.length + result.modified.length + result.removed.length;\n if (changed === 0) {\n if (!opts.quiet) process.stdout.write('\\n');\n console.log(` ${dim}Nothing to sync \u2014 index is up to date.${reset}`);\n } else {\n renderSyncSummary(result);\n }\n\n // In --progress mode, print errors inline with full detail\n if (result.errors.length) {\n if (opts.progress) {\n console.warn(`\\n \\x1b[33m\u26A0 ${result.errors.length} error(s) during sync:\\x1b[0m`);\n for (const err of result.errors) {\n console.warn(` \\x1b[33m${err}\\x1b[0m`);\n }\n } else {\n console.warn(` \\x1b[33m\u26A0 ${result.errors.length} warning(s)\\x1b[0m`);\n }\n }\n\n warnFallback(cg.getEngineFallback());\n cg.close();\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,WAAsB;AACtB,gBAA2B;AAC3B,sBAAiF;AACjF,mBAA6B;AAEtB,SAAS,SAAS,SAAwB;AAC/C,UACG,QAAQ,oBAAoB,EAC5B,YAAY,mCAAmC,EAC/C,OAAO,sBAAsB,wBAAwB,EACrD,OAAO,eAAe,0BAA0B,EAChD,OAAO,cAAc,oEAAoE,EACzF,OAAO,OAAO,aAAiC,SAAoE;AAClH,UAAM,aAAa,MAAM,QAAQ,QAAQ,EAAE,KAAK,MAAM,QAAQ,gBAAgB,CAAC,GAAG;AAClF,UAAM,SAAS,KAAK,QAAQ,eAAe,QAAQ,IAAI,CAAC;AACxD,UAAM,KAAK,MAAM,UAAU,KAAK,MAAM;AAEtC,QAAI;AACJ,QAAI,KAAK,OAAO;AACd,wBAAkB;AAAA,IACpB,WAAW,KAAK,UAAU;AACxB,wBAAkB;AAAA,IACpB,OAAO;AACL,wBAAkB;AAAA,IACpB;AAEA,UAAM,SAAS,MAAM,GAAG,KAAK;AAAA,MAC3B,OAAO,KAAK;AAAA,MACZ,YAAY;AAAA,IACd,CAAC;AAED,UAAM,UAAU,OAAO,MAAM,SAAS,OAAO,SAAS,SAAS,OAAO,QAAQ;AAC9E,QAAI,YAAY,GAAG;AACjB,UAAI,CAAC,KAAK,MAAO,SAAQ,OAAO,MAAM,IAAI;AAC1C,cAAQ,IAAI,KAAK,aAAG,8CAAyC,eAAK,EAAE;AAAA,IACtE,OAAO;AACL,6CAAkB,MAAM;AAAA,IAC1B;AAGA,QAAI,OAAO,OAAO,QAAQ;AACxB,UAAI,KAAK,UAAU;AACjB,gBAAQ,KAAK;AAAA,mBAAiB,OAAO,OAAO,MAAM,+BAA+B;AACjF,mBAAW,OAAO,OAAO,QAAQ;AAC/B,kBAAQ,KAAK,eAAe,GAAG,SAAS;AAAA,QAC1C;AAAA,MACF,OAAO;AACL,gBAAQ,KAAK,oBAAe,OAAO,OAAO,MAAM,oBAAoB;AAAA,MACtE;AAAA,IACF;AAEA,mCAAa,GAAG,kBAAkB,CAAC;AACnC,OAAG,MAAM;AAAA,EACX,CAAC;AACL;",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function register(program: Command): void;
3
+ //# sourceMappingURL=typesense.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typesense.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/typesense.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkE/C"}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.register = register;
37
+ const path = __importStar(require("path"));
38
+ const fs = __importStar(require("fs"));
39
+ const ui_1 = require("../ui");
40
+ const dashboard_1 = require("../installer/dashboard");
41
+ const SERVER_STATE_FILE = 'typesense-server.json';
42
+ function readState(kirographDir) {
43
+ try {
44
+ return JSON.parse(fs.readFileSync(path.join(kirographDir, SERVER_STATE_FILE), 'utf8'));
45
+ }
46
+ catch {
47
+ return null;
48
+ }
49
+ }
50
+ function isAlive(pid) {
51
+ try {
52
+ process.kill(pid, 0);
53
+ return true;
54
+ }
55
+ catch {
56
+ return false;
57
+ }
58
+ }
59
+ function register(program) {
60
+ const ts = program
61
+ .command('typesense [projectPath]')
62
+ .description('Manage the Typesense engine and dashboard');
63
+ // ── start ──────────────────────────────────────────────────────────────────
64
+ ts.command('start [projectPath]')
65
+ .description('Start the Typesense server (if not running) and open the local dashboard')
66
+ .action(async (projectPath) => {
67
+ const target = path.resolve(projectPath ?? process.cwd());
68
+ const kirographDir = path.join(target, '.kirograph');
69
+ // Check if already running
70
+ const saved = readState(kirographDir);
71
+ if (saved && isAlive(saved.pid)) {
72
+ console.log(`\n ${ui_1.green}✓${ui_1.reset} Typesense already running ${ui_1.dim}(pid ${saved.pid}, port ${saved.apiPort})${ui_1.reset}`);
73
+ }
74
+ else {
75
+ // Start via TypesenseIndex.initialize() — it handles binary download,
76
+ // spawn, health check, and writes the state file.
77
+ console.log();
78
+ const { TypesenseIndex } = await Promise.resolve().then(() => __importStar(require('../../vectors/typesense-index')));
79
+ const index = new TypesenseIndex(kirographDir);
80
+ await index.initialize();
81
+ if (!index.isAvailable()) {
82
+ console.log(` Typesense failed to start.\n`);
83
+ return;
84
+ }
85
+ index.close(); // detach client; server keeps running as daemon
86
+ }
87
+ // Open dashboard (reads fresh state file for the actual port)
88
+ await (0, dashboard_1.openTypesenseDashboard)(target);
89
+ console.log(` ${ui_1.dim}Press Ctrl+C to close the dashboard (Typesense keeps running — use ${ui_1.reset}kg typesense stop${ui_1.dim} to shut it down).${ui_1.reset}\n`);
90
+ process.on('SIGINT', () => process.exit(0));
91
+ });
92
+ // ── stop ───────────────────────────────────────────────────────────────────
93
+ ts.command('stop [projectPath]')
94
+ .description('Stop the Typesense server')
95
+ .action((projectPath) => {
96
+ const target = path.resolve(projectPath ?? process.cwd());
97
+ const kirographDir = path.join(target, '.kirograph');
98
+ const stateFile = path.join(kirographDir, SERVER_STATE_FILE);
99
+ console.log();
100
+ const saved = readState(kirographDir);
101
+ if (!saved) {
102
+ console.log(` ${ui_1.dim}No running Typesense server found.${ui_1.reset}\n`);
103
+ return;
104
+ }
105
+ let killed = false;
106
+ if (isAlive(saved.pid)) {
107
+ try {
108
+ process.kill(saved.pid, 'SIGTERM');
109
+ killed = true;
110
+ }
111
+ catch { /* ignore */ }
112
+ }
113
+ try {
114
+ fs.unlinkSync(stateFile);
115
+ }
116
+ catch { /* ignore */ }
117
+ if (killed) {
118
+ console.log(` ${ui_1.green}✓${ui_1.reset} ${(0, ui_1.label)('Stopped')} Typesense server ${ui_1.dim}(pid ${saved.pid}, port ${saved.apiPort})${ui_1.reset}`);
119
+ }
120
+ else {
121
+ console.log(` ${ui_1.dim}Typesense server (pid ${saved.pid}) was not running — state file cleaned up.${ui_1.reset}`);
122
+ }
123
+ console.log();
124
+ });
125
+ }
126
+ //# sourceMappingURL=typesense.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typesense.js","sourceRoot":"","sources":["../../../src/bin/commands/typesense.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import { Command } from 'commander';
2
+ export declare const UNINIT_FAREWELLS: string[];
3
+ export declare function register(program: Command): void;
4
+ //# sourceMappingURL=uninit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uninit.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/uninit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,gBAAgB,UAW5B,CAAC;AA6DF,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAY/C"}
@@ -0,0 +1,123 @@
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 uninit_exports = {};
30
+ __export(uninit_exports, {
31
+ UNINIT_FAREWELLS: () => UNINIT_FAREWELLS,
32
+ register: () => register
33
+ });
34
+ module.exports = __toCommonJS(uninit_exports);
35
+ var path = __toESM(require("path"));
36
+ var fs = __toESM(require("fs"));
37
+ var import_banner = require("../banner");
38
+ var import_ui = require("../ui");
39
+ const UNINIT_FAREWELLS = [
40
+ "Oh. So it's come to this.",
41
+ "We're sorry to see you go. (Are we? Yes. We are.)",
42
+ "Deleting months of carefully indexed knowledge. Bold move.",
43
+ "Fine. We'll just sit here in the dark.",
44
+ "You can always come back. We won't mention this.",
45
+ "The graph remembers everything. Except, soon, anything.",
46
+ "Somewhere a tree-sitter is crying.",
47
+ "Uninstalling... and pretending it doesn't hurt.",
48
+ "574 embeddings. Gone. Just like that.",
49
+ "See you on the other side of `kirograph install`."
50
+ ];
51
+ async function runUninit(projectPath, opts) {
52
+ const target = path.resolve(projectPath ?? process.cwd());
53
+ const dir = path.join(target, ".kirograph");
54
+ if (!fs.existsSync(dir)) {
55
+ console.log("Not initialized.");
56
+ return;
57
+ }
58
+ if (!opts.force) {
59
+ (0, import_banner.printBanner)();
60
+ const farewell = UNINIT_FAREWELLS[Math.floor(Math.random() * UNINIT_FAREWELLS.length)];
61
+ console.log(` ${import_ui.violet}${import_ui.bold}${farewell}${import_ui.reset}`);
62
+ console.log(`
63
+ ${import_ui.dim}This will remove .kirograph/, all Kiro hooks, the steering file, and the CLI agent config.${import_ui.reset}`);
64
+ console.log(` ${import_ui.dim}Your source code is untouched.${import_ui.reset}
65
+ `);
66
+ const readline = await import("readline");
67
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
68
+ await new Promise((resolve) => rl.question(` ${import_ui.violet}Remove KiroGraph from this project?${import_ui.reset} ${import_ui.dim}(y/N)${import_ui.reset} `, (ans) => {
69
+ rl.close();
70
+ if (ans.toLowerCase() !== "y") {
71
+ console.log(`
72
+ ${import_ui.dim}Cancelled. The graph lives on.${import_ui.reset}
73
+ `);
74
+ process.exit(0);
75
+ }
76
+ resolve();
77
+ }));
78
+ console.log();
79
+ }
80
+ fs.rmSync(dir, { recursive: true, force: true });
81
+ console.log(` ${import_ui.green}\u2713${import_ui.reset} Removed .kirograph/`);
82
+ const kiroHooks = [
83
+ "kirograph-mark-dirty-on-save.json",
84
+ "kirograph-mark-dirty-on-create.json",
85
+ "kirograph-sync-on-delete.json",
86
+ "kirograph-sync-if-dirty.json",
87
+ "kirograph-sync-on-save.json",
88
+ "kirograph-sync-on-create.json"
89
+ ];
90
+ const hooksDir = path.join(target, ".kiro", "hooks");
91
+ let removedHooks = 0;
92
+ for (const hook of kiroHooks) {
93
+ const p = path.join(hooksDir, hook);
94
+ if (fs.existsSync(p)) {
95
+ fs.unlinkSync(p);
96
+ removedHooks++;
97
+ }
98
+ }
99
+ if (removedHooks > 0) console.log(` ${import_ui.green}\u2713${import_ui.reset} Removed ${removedHooks} hook(s) from .kiro/hooks/`);
100
+ const steeringPath = path.join(target, ".kiro", "steering", "kirograph.md");
101
+ if (fs.existsSync(steeringPath)) {
102
+ fs.unlinkSync(steeringPath);
103
+ console.log(` ${import_ui.green}\u2713${import_ui.reset} Removed .kiro/steering/kirograph.md`);
104
+ }
105
+ const agentPath = path.join(target, ".kiro", "agents", "kirograph.json");
106
+ if (fs.existsSync(agentPath)) {
107
+ fs.unlinkSync(agentPath);
108
+ console.log(` ${import_ui.green}\u2713${import_ui.reset} Removed .kiro/agents/kirograph.json`);
109
+ }
110
+ console.log(`
111
+ ${import_ui.dim}Done. Run ${import_ui.violet}kirograph install${import_ui.reset}${import_ui.dim} to come back anytime.${import_ui.reset}
112
+ `);
113
+ }
114
+ function register(program) {
115
+ program.command("uninit [projectPath]").description("Remove KiroGraph from a project").option("--force", "Skip confirmation").action(runUninit);
116
+ program.command("uninstall [projectPath]").description("Alias for uninit \u2014 remove KiroGraph from a project").option("--force", "Skip confirmation").action(runUninit);
117
+ }
118
+ // Annotate the CommonJS export names for ESM import in node:
119
+ 0 && (module.exports = {
120
+ UNINIT_FAREWELLS,
121
+ register
122
+ });
123
+ //# sourceMappingURL=uninit.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/bin/commands/uninit.ts"],
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport { printBanner } from '../banner';\nimport { dim, reset, violet, bold, green } from '../ui';\n\nexport const UNINIT_FAREWELLS = [\n \"Oh. So it's come to this.\",\n \"We're sorry to see you go. (Are we? Yes. We are.)\",\n \"Deleting months of carefully indexed knowledge. Bold move.\",\n \"Fine. We'll just sit here in the dark.\",\n \"You can always come back. We won't mention this.\",\n \"The graph remembers everything. Except, soon, anything.\",\n \"Somewhere a tree-sitter is crying.\",\n \"Uninstalling... and pretending it doesn't hurt.\",\n \"574 embeddings. Gone. Just like that.\",\n \"See you on the other side of `kirograph install`.\",\n];\n\nasync function runUninit(projectPath: string | undefined, opts: { force?: boolean }): Promise<void> {\n const target = path.resolve(projectPath ?? process.cwd());\n const dir = path.join(target, '.kirograph');\n if (!fs.existsSync(dir)) { console.log('Not initialized.'); return; }\n if (!opts.force) {\n printBanner();\n const farewell = UNINIT_FAREWELLS[Math.floor(Math.random() * UNINIT_FAREWELLS.length)]!;\n console.log(` ${violet}${bold}${farewell}${reset}`);\n console.log(`\\n ${dim}This will remove .kirograph/, all Kiro hooks, the steering file, and the CLI agent config.${reset}`);\n console.log(` ${dim}Your source code is untouched.${reset}\\n`);\n const readline = await import('readline');\n const rl = readline.createInterface({ input: process.stdin, output: process.stdout });\n await new Promise<void>(resolve => rl.question(` ${violet}Remove KiroGraph from this project?${reset} ${dim}(y/N)${reset} `, ans => {\n rl.close();\n if (ans.toLowerCase() !== 'y') {\n console.log(`\\n ${dim}Cancelled. The graph lives on.${reset}\\n`);\n process.exit(0);\n }\n resolve();\n }));\n console.log();\n }\n fs.rmSync(dir, { recursive: true, force: true });\n console.log(` ${green}\u2713${reset} Removed .kirograph/`);\n\n // Remove .kiro hooks created by kirograph\n const kiroHooks = [\n 'kirograph-mark-dirty-on-save.json',\n 'kirograph-mark-dirty-on-create.json',\n 'kirograph-sync-on-delete.json',\n 'kirograph-sync-if-dirty.json',\n 'kirograph-sync-on-save.json',\n 'kirograph-sync-on-create.json',\n ];\n const hooksDir = path.join(target, '.kiro', 'hooks');\n let removedHooks = 0;\n for (const hook of kiroHooks) {\n const p = path.join(hooksDir, hook);\n if (fs.existsSync(p)) { fs.unlinkSync(p); removedHooks++; }\n }\n if (removedHooks > 0) console.log(` ${green}\u2713${reset} Removed ${removedHooks} hook(s) from .kiro/hooks/`);\n\n // Remove .kiro/steering/kirograph.md\n const steeringPath = path.join(target, '.kiro', 'steering', 'kirograph.md');\n if (fs.existsSync(steeringPath)) {\n fs.unlinkSync(steeringPath);\n console.log(` ${green}\u2713${reset} Removed .kiro/steering/kirograph.md`);\n }\n\n // Remove .kiro/agents/kirograph.json\n const agentPath = path.join(target, '.kiro', 'agents', 'kirograph.json');\n if (fs.existsSync(agentPath)) {\n fs.unlinkSync(agentPath);\n console.log(` ${green}\u2713${reset} Removed .kiro/agents/kirograph.json`);\n }\n\n console.log(`\\n ${dim}Done. Run ${violet}kirograph install${reset}${dim} to come back anytime.${reset}\\n`);\n}\n\nexport function register(program: Command): void {\n program\n .command('uninit [projectPath]')\n .description('Remove KiroGraph from a project')\n .option('--force', 'Skip confirmation')\n .action(runUninit);\n\n program\n .command('uninstall [projectPath]')\n .description('Alias for uninit \u2014 remove KiroGraph from a project')\n .option('--force', 'Skip confirmation')\n .action(runUninit);\n}\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function register(program: Command): void;
3
+ //# sourceMappingURL=unlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/unlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAc/C"}
@@ -0,0 +1,53 @@
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 unlock_exports = {};
30
+ __export(unlock_exports, {
31
+ register: () => register
32
+ });
33
+ module.exports = __toCommonJS(unlock_exports);
34
+ var path = __toESM(require("path"));
35
+ var fs = __toESM(require("fs"));
36
+ var import_ui = require("../ui");
37
+ function register(program) {
38
+ program.command("unlock [projectPath]").description("Force-release a stale KiroGraph lock file").action(async (projectPath) => {
39
+ const lockPath = path.join(path.resolve(projectPath ?? process.cwd()), ".kirograph", "kirograph.lock");
40
+ if (!fs.existsSync(lockPath)) {
41
+ console.log(` ${import_ui.dim}No lock file found.${import_ui.reset}`);
42
+ return;
43
+ }
44
+ const content = fs.readFileSync(lockPath, "utf8").trim();
45
+ fs.unlinkSync(lockPath);
46
+ console.log(` ${import_ui.green}\u2713${import_ui.reset} Lock released ${import_ui.dim}(was held by: ${content})${import_ui.reset}`);
47
+ });
48
+ }
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ register
52
+ });
53
+ //# sourceMappingURL=unlock.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/bin/commands/unlock.ts"],
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport { dim, reset, green } from '../ui';\n\nexport function register(program: Command): void {\n program\n .command('unlock [projectPath]')\n .description('Force-release a stale KiroGraph lock file')\n .action(async (projectPath: string | undefined) => {\n const lockPath = path.join(path.resolve(projectPath ?? process.cwd()), '.kirograph', 'kirograph.lock');\n if (!fs.existsSync(lockPath)) {\n console.log(` ${dim}No lock file found.${reset}`);\n return;\n }\n const content = fs.readFileSync(lockPath, 'utf8').trim();\n fs.unlinkSync(lockPath);\n console.log(` ${green}\u2713${reset} Lock released ${dim}(was held by: ${content})${reset}`);\n });\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,WAAsB;AACtB,SAAoB;AACpB,gBAAkC;AAE3B,SAAS,SAAS,SAAwB;AAC/C,UACG,QAAQ,sBAAsB,EAC9B,YAAY,2CAA2C,EACvD,OAAO,OAAO,gBAAoC;AACjD,UAAM,WAAW,KAAK,KAAK,KAAK,QAAQ,eAAe,QAAQ,IAAI,CAAC,GAAG,cAAc,gBAAgB;AACrG,QAAI,CAAC,GAAG,WAAW,QAAQ,GAAG;AAC5B,cAAQ,IAAI,KAAK,aAAG,sBAAsB,eAAK,EAAE;AACjD;AAAA,IACF;AACA,UAAM,UAAU,GAAG,aAAa,UAAU,MAAM,EAAE,KAAK;AACvD,OAAG,WAAW,QAAQ;AACtB,YAAQ,IAAI,KAAK,eAAK,SAAI,eAAK,kBAAkB,aAAG,iBAAiB,OAAO,IAAI,eAAK,EAAE;AAAA,EACzF,CAAC;AACL;",
6
+ "names": []
7
+ }
@@ -0,0 +1,12 @@
1
+ export declare function openProject(projectPath?: string): Promise<{
2
+ cg: any;
3
+ target: string;
4
+ }>;
5
+ export declare function warnFallback(fallback: string | null): void;
6
+ export declare function formatSyncCounts(result: {
7
+ added: unknown[];
8
+ modified: unknown[];
9
+ removed: unknown[];
10
+ duration: number;
11
+ }): string;
12
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/utils.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAK5F;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAE1D;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEhI"}
@@ -0,0 +1,56 @@
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 utils_exports = {};
30
+ __export(utils_exports, {
31
+ formatSyncCounts: () => formatSyncCounts,
32
+ openProject: () => openProject,
33
+ warnFallback: () => warnFallback
34
+ });
35
+ module.exports = __toCommonJS(utils_exports);
36
+ var path = __toESM(require("path"));
37
+ var import_ui = require("../ui");
38
+ async function openProject(projectPath) {
39
+ const KiroGraph = (await Promise.resolve().then(() => require("../../index.js"))).default;
40
+ const target = path.resolve(projectPath ?? process.cwd());
41
+ const cg = await KiroGraph.open(target);
42
+ return { cg, target };
43
+ }
44
+ function warnFallback(fallback) {
45
+ if (fallback) console.warn(` \x1B[33m\u26A0 Engine fallback: ${fallback}\x1B[0m`);
46
+ }
47
+ function formatSyncCounts(result) {
48
+ return ` ${import_ui.green}\u2713${import_ui.reset} ${import_ui.dim}added${import_ui.reset} ${(0, import_ui.value)(String(result.added.length))} ${import_ui.dim}modified${import_ui.reset} ${(0, import_ui.value)(String(result.modified.length))} ${import_ui.dim}removed${import_ui.reset} ${(0, import_ui.value)(String(result.removed.length))} ${import_ui.dim}(${result.duration}ms)${import_ui.reset}`;
49
+ }
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ formatSyncCounts,
53
+ openProject,
54
+ warnFallback
55
+ });
56
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/bin/commands/utils.ts"],
4
+ "sourcesContent": ["import * as path from 'path';\nimport { dim, reset, violet, bold, green, value } from '../ui';\n\nexport async function openProject(projectPath?: string): Promise<{ cg: any; target: string }> {\n const KiroGraph = (await Promise.resolve().then(() => require('../../index.js'))).default;\n const target = path.resolve(projectPath ?? process.cwd());\n const cg = await KiroGraph.open(target);\n return { cg, target };\n}\n\nexport function warnFallback(fallback: string | null): void {\n if (fallback) console.warn(` \\x1b[33m\u26A0 Engine fallback: ${fallback}\\x1b[0m`);\n}\n\nexport function formatSyncCounts(result: { added: unknown[]; modified: unknown[]; removed: unknown[]; duration: number }): string {\n return ` ${green}\u2713${reset} ${dim}added${reset} ${value(String(result.added.length))} ${dim}modified${reset} ${value(String(result.modified.length))} ${dim}removed${reset} ${value(String(result.removed.length))} ${dim}(${result.duration}ms)${reset}`;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAsB;AACtB,gBAAuD;AAEvD,eAAsB,YAAY,aAA4D;AAC5F,QAAM,aAAa,MAAM,QAAQ,QAAQ,EAAE,KAAK,MAAM,QAAQ,gBAAgB,CAAC,GAAG;AAClF,QAAM,SAAS,KAAK,QAAQ,eAAe,QAAQ,IAAI,CAAC;AACxD,QAAM,KAAK,MAAM,UAAU,KAAK,MAAM;AACtC,SAAO,EAAE,IAAI,OAAO;AACtB;AAEO,SAAS,aAAa,UAA+B;AAC1D,MAAI,SAAU,SAAQ,KAAK,qCAAgC,QAAQ,SAAS;AAC9E;AAEO,SAAS,iBAAiB,QAAiG;AAChI,SAAO,KAAK,eAAK,SAAI,eAAK,IAAI,aAAG,QAAQ,eAAK,QAAI,iBAAM,OAAO,OAAO,MAAM,MAAM,CAAC,CAAC,KAAK,aAAG,WAAW,eAAK,QAAI,iBAAM,OAAO,OAAO,SAAS,MAAM,CAAC,CAAC,KAAK,aAAG,UAAU,eAAK,QAAI,iBAAM,OAAO,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK,aAAG,IAAI,OAAO,QAAQ,MAAM,eAAK;AAC5P;",
6
+ "names": []
7
+ }