kemdicode-mcp 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (872) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +486 -0
  3. package/dist/ai/agents.d.ts +40 -0
  4. package/dist/ai/agents.d.ts.map +1 -0
  5. package/dist/ai/agents.js +164 -0
  6. package/dist/ai/agents.js.map +1 -0
  7. package/dist/ai/client.d.ts +73 -0
  8. package/dist/ai/client.d.ts.map +1 -0
  9. package/dist/ai/client.js +235 -0
  10. package/dist/ai/client.js.map +1 -0
  11. package/dist/ai/execute.d.ts +61 -0
  12. package/dist/ai/execute.d.ts.map +1 -0
  13. package/dist/ai/execute.js +98 -0
  14. package/dist/ai/execute.js.map +1 -0
  15. package/dist/ai/file-context.d.ts +44 -0
  16. package/dist/ai/file-context.d.ts.map +1 -0
  17. package/dist/ai/file-context.js +220 -0
  18. package/dist/ai/file-context.js.map +1 -0
  19. package/dist/ai/index.d.ts +14 -0
  20. package/dist/ai/index.d.ts.map +1 -0
  21. package/dist/ai/index.js +21 -0
  22. package/dist/ai/index.js.map +1 -0
  23. package/dist/ai/model-spec.d.ts +33 -0
  24. package/dist/ai/model-spec.d.ts.map +1 -0
  25. package/dist/ai/model-spec.js +106 -0
  26. package/dist/ai/model-spec.js.map +1 -0
  27. package/dist/ai/providers/anthropic.provider.d.ts +23 -0
  28. package/dist/ai/providers/anthropic.provider.d.ts.map +1 -0
  29. package/dist/ai/providers/anthropic.provider.js +135 -0
  30. package/dist/ai/providers/anthropic.provider.js.map +1 -0
  31. package/dist/ai/providers/gemini.provider.d.ts +20 -0
  32. package/dist/ai/providers/gemini.provider.d.ts.map +1 -0
  33. package/dist/ai/providers/gemini.provider.js +113 -0
  34. package/dist/ai/providers/gemini.provider.js.map +1 -0
  35. package/dist/ai/providers/index.d.ts +13 -0
  36. package/dist/ai/providers/index.d.ts.map +1 -0
  37. package/dist/ai/providers/index.js +12 -0
  38. package/dist/ai/providers/index.js.map +1 -0
  39. package/dist/ai/providers/openai-compat.provider.d.ts +13 -0
  40. package/dist/ai/providers/openai-compat.provider.d.ts.map +1 -0
  41. package/dist/ai/providers/openai-compat.provider.js +68 -0
  42. package/dist/ai/providers/openai-compat.provider.js.map +1 -0
  43. package/dist/ai/providers/openai-shared.d.ts +41 -0
  44. package/dist/ai/providers/openai-shared.d.ts.map +1 -0
  45. package/dist/ai/providers/openai-shared.js +67 -0
  46. package/dist/ai/providers/openai-shared.js.map +1 -0
  47. package/dist/ai/providers/openai.provider.d.ts +22 -0
  48. package/dist/ai/providers/openai.provider.d.ts.map +1 -0
  49. package/dist/ai/providers/openai.provider.js +74 -0
  50. package/dist/ai/providers/openai.provider.js.map +1 -0
  51. package/dist/ai/providers/registry.d.ts +33 -0
  52. package/dist/ai/providers/registry.d.ts.map +1 -0
  53. package/dist/ai/providers/registry.js +137 -0
  54. package/dist/ai/providers/registry.js.map +1 -0
  55. package/dist/ai/providers/types.d.ts +59 -0
  56. package/dist/ai/providers/types.d.ts.map +1 -0
  57. package/dist/ai/providers/types.js +58 -0
  58. package/dist/ai/providers/types.js.map +1 -0
  59. package/dist/ai/workspace-editor.d.ts +59 -0
  60. package/dist/ai/workspace-editor.d.ts.map +1 -0
  61. package/dist/ai/workspace-editor.js +155 -0
  62. package/dist/ai/workspace-editor.js.map +1 -0
  63. package/dist/config/defaults.d.ts +31 -0
  64. package/dist/config/defaults.d.ts.map +1 -0
  65. package/dist/config/defaults.js +100 -0
  66. package/dist/config/defaults.js.map +1 -0
  67. package/dist/config/index.d.ts +45 -0
  68. package/dist/config/index.d.ts.map +1 -0
  69. package/dist/config/index.js +44 -0
  70. package/dist/config/index.js.map +1 -0
  71. package/dist/config/manager.d.ts +101 -0
  72. package/dist/config/manager.d.ts.map +1 -0
  73. package/dist/config/manager.js +338 -0
  74. package/dist/config/manager.js.map +1 -0
  75. package/dist/config/schema.d.ts +382 -0
  76. package/dist/config/schema.d.ts.map +1 -0
  77. package/dist/config/schema.js +150 -0
  78. package/dist/config/schema.js.map +1 -0
  79. package/dist/config/types.d.ts +189 -0
  80. package/dist/config/types.d.ts.map +1 -0
  81. package/dist/config/types.js +32 -0
  82. package/dist/config/types.js.map +1 -0
  83. package/dist/constants.d.ts +92 -0
  84. package/dist/constants.d.ts.map +1 -0
  85. package/dist/constants.js +100 -0
  86. package/dist/constants.js.map +1 -0
  87. package/dist/context/agent-monitor.d.ts +173 -0
  88. package/dist/context/agent-monitor.d.ts.map +1 -0
  89. package/dist/context/agent-monitor.js +958 -0
  90. package/dist/context/agent-monitor.js.map +1 -0
  91. package/dist/context/feedback-loop.d.ts +73 -0
  92. package/dist/context/feedback-loop.d.ts.map +1 -0
  93. package/dist/context/feedback-loop.js +303 -0
  94. package/dist/context/feedback-loop.js.map +1 -0
  95. package/dist/context/index.d.ts +29 -0
  96. package/dist/context/index.d.ts.map +1 -0
  97. package/dist/context/index.js +29 -0
  98. package/dist/context/index.js.map +1 -0
  99. package/dist/context/integration.d.ts +83 -0
  100. package/dist/context/integration.d.ts.map +1 -0
  101. package/dist/context/integration.js +276 -0
  102. package/dist/context/integration.js.map +1 -0
  103. package/dist/context/iteration-tracker.d.ts +87 -0
  104. package/dist/context/iteration-tracker.d.ts.map +1 -0
  105. package/dist/context/iteration-tracker.js +333 -0
  106. package/dist/context/iteration-tracker.js.map +1 -0
  107. package/dist/context/storage.d.ts +234 -0
  108. package/dist/context/storage.d.ts.map +1 -0
  109. package/dist/context/storage.js +513 -0
  110. package/dist/context/storage.js.map +1 -0
  111. package/dist/context/types.d.ts +396 -0
  112. package/dist/context/types.d.ts.map +1 -0
  113. package/dist/context/types.js +125 -0
  114. package/dist/context/types.js.map +1 -0
  115. package/dist/index.d.ts +70 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +207 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/infrastructure/redis/connection.d.ts +111 -0
  120. package/dist/infrastructure/redis/connection.d.ts.map +1 -0
  121. package/dist/infrastructure/redis/connection.js +242 -0
  122. package/dist/infrastructure/redis/connection.js.map +1 -0
  123. package/dist/infrastructure/redis/index.d.ts +2 -0
  124. package/dist/infrastructure/redis/index.d.ts.map +1 -0
  125. package/dist/infrastructure/redis/index.js +2 -0
  126. package/dist/infrastructure/redis/index.js.map +1 -0
  127. package/dist/infrastructure/redis/redis-backed-service.d.ts +35 -0
  128. package/dist/infrastructure/redis/redis-backed-service.d.ts.map +1 -0
  129. package/dist/infrastructure/redis/redis-backed-service.js +55 -0
  130. package/dist/infrastructure/redis/redis-backed-service.js.map +1 -0
  131. package/dist/kanban/board-store.d.ts +222 -0
  132. package/dist/kanban/board-store.d.ts.map +1 -0
  133. package/dist/kanban/board-store.js +486 -0
  134. package/dist/kanban/board-store.js.map +1 -0
  135. package/dist/kanban/index.d.ts +33 -0
  136. package/dist/kanban/index.d.ts.map +1 -0
  137. package/dist/kanban/index.js +37 -0
  138. package/dist/kanban/index.js.map +1 -0
  139. package/dist/kanban/kanban-store.d.ts +236 -0
  140. package/dist/kanban/kanban-store.d.ts.map +1 -0
  141. package/dist/kanban/kanban-store.js +854 -0
  142. package/dist/kanban/kanban-store.js.map +1 -0
  143. package/dist/kanban/membership-store.d.ts +230 -0
  144. package/dist/kanban/membership-store.d.ts.map +1 -0
  145. package/dist/kanban/membership-store.js +384 -0
  146. package/dist/kanban/membership-store.js.map +1 -0
  147. package/dist/kanban/migration.d.ts +131 -0
  148. package/dist/kanban/migration.d.ts.map +1 -0
  149. package/dist/kanban/migration.js +275 -0
  150. package/dist/kanban/migration.js.map +1 -0
  151. package/dist/kanban/types.d.ts +314 -0
  152. package/dist/kanban/types.d.ts.map +1 -0
  153. package/dist/kanban/types.js +126 -0
  154. package/dist/kanban/types.js.map +1 -0
  155. package/dist/kanban/workspace-store.d.ts +193 -0
  156. package/dist/kanban/workspace-store.d.ts.map +1 -0
  157. package/dist/kanban/workspace-store.js +386 -0
  158. package/dist/kanban/workspace-store.js.map +1 -0
  159. package/dist/loci/graph-storage.d.ts +120 -0
  160. package/dist/loci/graph-storage.d.ts.map +1 -0
  161. package/dist/loci/graph-storage.js +489 -0
  162. package/dist/loci/graph-storage.js.map +1 -0
  163. package/dist/loci/graph-traversal.d.ts +56 -0
  164. package/dist/loci/graph-traversal.d.ts.map +1 -0
  165. package/dist/loci/graph-traversal.js +291 -0
  166. package/dist/loci/graph-traversal.js.map +1 -0
  167. package/dist/loci/index.d.ts +30 -0
  168. package/dist/loci/index.d.ts.map +1 -0
  169. package/dist/loci/index.js +27 -0
  170. package/dist/loci/index.js.map +1 -0
  171. package/dist/loci/loci-manager.d.ts +119 -0
  172. package/dist/loci/loci-manager.d.ts.map +1 -0
  173. package/dist/loci/loci-manager.js +435 -0
  174. package/dist/loci/loci-manager.js.map +1 -0
  175. package/dist/loci/sequence-tracker.d.ts +89 -0
  176. package/dist/loci/sequence-tracker.d.ts.map +1 -0
  177. package/dist/loci/sequence-tracker.js +311 -0
  178. package/dist/loci/sequence-tracker.js.map +1 -0
  179. package/dist/loci/types.d.ts +306 -0
  180. package/dist/loci/types.d.ts.map +1 -0
  181. package/dist/loci/types.js +143 -0
  182. package/dist/loci/types.js.map +1 -0
  183. package/dist/mpc/auth.d.ts +67 -0
  184. package/dist/mpc/auth.d.ts.map +1 -0
  185. package/dist/mpc/auth.js +173 -0
  186. package/dist/mpc/auth.js.map +1 -0
  187. package/dist/mpc/crypto.d.ts +139 -0
  188. package/dist/mpc/crypto.d.ts.map +1 -0
  189. package/dist/mpc/crypto.js +287 -0
  190. package/dist/mpc/crypto.js.map +1 -0
  191. package/dist/mpc/index.d.ts +30 -0
  192. package/dist/mpc/index.d.ts.map +1 -0
  193. package/dist/mpc/index.js +27 -0
  194. package/dist/mpc/index.js.map +1 -0
  195. package/dist/mpc/redis-store.d.ts +88 -0
  196. package/dist/mpc/redis-store.d.ts.map +1 -0
  197. package/dist/mpc/redis-store.js +337 -0
  198. package/dist/mpc/redis-store.js.map +1 -0
  199. package/dist/mpc/share-manager.d.ts +59 -0
  200. package/dist/mpc/share-manager.d.ts.map +1 -0
  201. package/dist/mpc/share-manager.js +254 -0
  202. package/dist/mpc/share-manager.js.map +1 -0
  203. package/dist/mpc/types.d.ts +213 -0
  204. package/dist/mpc/types.d.ts.map +1 -0
  205. package/dist/mpc/types.js +42 -0
  206. package/dist/mpc/types.js.map +1 -0
  207. package/dist/recursive/index.d.ts +27 -0
  208. package/dist/recursive/index.d.ts.map +1 -0
  209. package/dist/recursive/index.js +27 -0
  210. package/dist/recursive/index.js.map +1 -0
  211. package/dist/recursive/tool-invoker.d.ts +51 -0
  212. package/dist/recursive/tool-invoker.d.ts.map +1 -0
  213. package/dist/recursive/tool-invoker.js +293 -0
  214. package/dist/recursive/tool-invoker.js.map +1 -0
  215. package/dist/recursive/types.d.ts +110 -0
  216. package/dist/recursive/types.d.ts.map +1 -0
  217. package/dist/recursive/types.js +52 -0
  218. package/dist/recursive/types.js.map +1 -0
  219. package/dist/rl/dopamine.d.ts +96 -0
  220. package/dist/rl/dopamine.d.ts.map +1 -0
  221. package/dist/rl/dopamine.js +242 -0
  222. package/dist/rl/dopamine.js.map +1 -0
  223. package/dist/rl/index.d.ts +30 -0
  224. package/dist/rl/index.d.ts.map +1 -0
  225. package/dist/rl/index.js +27 -0
  226. package/dist/rl/index.js.map +1 -0
  227. package/dist/rl/potential.d.ts +78 -0
  228. package/dist/rl/potential.d.ts.map +1 -0
  229. package/dist/rl/potential.js +152 -0
  230. package/dist/rl/potential.js.map +1 -0
  231. package/dist/rl/rewards.d.ts +92 -0
  232. package/dist/rl/rewards.d.ts.map +1 -0
  233. package/dist/rl/rewards.js +278 -0
  234. package/dist/rl/rewards.js.map +1 -0
  235. package/dist/rl/state-tracker.d.ts +107 -0
  236. package/dist/rl/state-tracker.d.ts.map +1 -0
  237. package/dist/rl/state-tracker.js +285 -0
  238. package/dist/rl/state-tracker.js.map +1 -0
  239. package/dist/rl/types.d.ts +274 -0
  240. package/dist/rl/types.d.ts.map +1 -0
  241. package/dist/rl/types.js +145 -0
  242. package/dist/rl/types.js.map +1 -0
  243. package/dist/runtime/crypto.d.ts +87 -0
  244. package/dist/runtime/crypto.d.ts.map +1 -0
  245. package/dist/runtime/crypto.js +226 -0
  246. package/dist/runtime/crypto.js.map +1 -0
  247. package/dist/runtime/http.d.ts +111 -0
  248. package/dist/runtime/http.d.ts.map +1 -0
  249. package/dist/runtime/http.js +350 -0
  250. package/dist/runtime/http.js.map +1 -0
  251. package/dist/runtime/index.d.ts +48 -0
  252. package/dist/runtime/index.d.ts.map +1 -0
  253. package/dist/runtime/index.js +43 -0
  254. package/dist/runtime/index.js.map +1 -0
  255. package/dist/runtime/net.d.ts +42 -0
  256. package/dist/runtime/net.d.ts.map +1 -0
  257. package/dist/runtime/net.js +108 -0
  258. package/dist/runtime/net.js.map +1 -0
  259. package/dist/runtime/process.d.ts +54 -0
  260. package/dist/runtime/process.d.ts.map +1 -0
  261. package/dist/runtime/process.js +247 -0
  262. package/dist/runtime/process.js.map +1 -0
  263. package/dist/runtime/types.d.ts +143 -0
  264. package/dist/runtime/types.d.ts.map +1 -0
  265. package/dist/runtime/types.js +19 -0
  266. package/dist/runtime/types.js.map +1 -0
  267. package/dist/server/http-server.d.ts +26 -0
  268. package/dist/server/http-server.d.ts.map +1 -0
  269. package/dist/server/http-server.js +290 -0
  270. package/dist/server/http-server.js.map +1 -0
  271. package/dist/server/index.d.ts +22 -0
  272. package/dist/server/index.d.ts.map +1 -0
  273. package/dist/server/index.js +25 -0
  274. package/dist/server/index.js.map +1 -0
  275. package/dist/server/progress.d.ts +74 -0
  276. package/dist/server/progress.d.ts.map +1 -0
  277. package/dist/server/progress.js +174 -0
  278. package/dist/server/progress.js.map +1 -0
  279. package/dist/server/session-server.d.ts +76 -0
  280. package/dist/server/session-server.d.ts.map +1 -0
  281. package/dist/server/session-server.js +186 -0
  282. package/dist/server/session-server.js.map +1 -0
  283. package/dist/server/types.d.ts +82 -0
  284. package/dist/server/types.d.ts.map +1 -0
  285. package/dist/server/types.js +25 -0
  286. package/dist/server/types.js.map +1 -0
  287. package/dist/session/cwd-resolver.d.ts +136 -0
  288. package/dist/session/cwd-resolver.d.ts.map +1 -0
  289. package/dist/session/cwd-resolver.js +715 -0
  290. package/dist/session/cwd-resolver.js.map +1 -0
  291. package/dist/session/index.d.ts +27 -0
  292. package/dist/session/index.d.ts.map +1 -0
  293. package/dist/session/index.js +27 -0
  294. package/dist/session/index.js.map +1 -0
  295. package/dist/session/manager.d.ts +296 -0
  296. package/dist/session/manager.d.ts.map +1 -0
  297. package/dist/session/manager.js +605 -0
  298. package/dist/session/manager.js.map +1 -0
  299. package/dist/session/types.d.ts +152 -0
  300. package/dist/session/types.d.ts.map +1 -0
  301. package/dist/session/types.js +60 -0
  302. package/dist/session/types.js.map +1 -0
  303. package/dist/tools/agents/agent-alert.tool.d.ts +20 -0
  304. package/dist/tools/agents/agent-alert.tool.d.ts.map +1 -0
  305. package/dist/tools/agents/agent-alert.tool.js +103 -0
  306. package/dist/tools/agents/agent-alert.tool.js.map +1 -0
  307. package/dist/tools/agents/agent-history.tool.d.ts +20 -0
  308. package/dist/tools/agents/agent-history.tool.d.ts.map +1 -0
  309. package/dist/tools/agents/agent-history.tool.js +133 -0
  310. package/dist/tools/agents/agent-history.tool.js.map +1 -0
  311. package/dist/tools/agents/agent-inject.tool.d.ts +39 -0
  312. package/dist/tools/agents/agent-inject.tool.d.ts.map +1 -0
  313. package/dist/tools/agents/agent-inject.tool.js +121 -0
  314. package/dist/tools/agents/agent-inject.tool.js.map +1 -0
  315. package/dist/tools/agents/agent-list.tool.d.ts +20 -0
  316. package/dist/tools/agents/agent-list.tool.d.ts.map +1 -0
  317. package/dist/tools/agents/agent-list.tool.js +86 -0
  318. package/dist/tools/agents/agent-list.tool.js.map +1 -0
  319. package/dist/tools/agents/agent-register.tool.d.ts +20 -0
  320. package/dist/tools/agents/agent-register.tool.d.ts.map +1 -0
  321. package/dist/tools/agents/agent-register.tool.js +114 -0
  322. package/dist/tools/agents/agent-register.tool.js.map +1 -0
  323. package/dist/tools/agents/agent-summary.tool.d.ts +20 -0
  324. package/dist/tools/agents/agent-summary.tool.d.ts.map +1 -0
  325. package/dist/tools/agents/agent-summary.tool.js +99 -0
  326. package/dist/tools/agents/agent-summary.tool.js.map +1 -0
  327. package/dist/tools/agents/agent-watch.tool.d.ts +20 -0
  328. package/dist/tools/agents/agent-watch.tool.d.ts.map +1 -0
  329. package/dist/tools/agents/agent-watch.tool.js +56 -0
  330. package/dist/tools/agents/agent-watch.tool.js.map +1 -0
  331. package/dist/tools/agents/index.d.ts +41 -0
  332. package/dist/tools/agents/index.d.ts.map +1 -0
  333. package/dist/tools/agents/index.js +41 -0
  334. package/dist/tools/agents/index.js.map +1 -0
  335. package/dist/tools/agents/monitor.tool.d.ts +20 -0
  336. package/dist/tools/agents/monitor.tool.d.ts.map +1 -0
  337. package/dist/tools/agents/monitor.tool.js +314 -0
  338. package/dist/tools/agents/monitor.tool.js.map +1 -0
  339. package/dist/tools/agents/queue-message.tool.d.ts +20 -0
  340. package/dist/tools/agents/queue-message.tool.d.ts.map +1 -0
  341. package/dist/tools/agents/queue-message.tool.js +176 -0
  342. package/dist/tools/agents/queue-message.tool.js.map +1 -0
  343. package/dist/tools/ask-ai.tool.d.ts +20 -0
  344. package/dist/tools/ask-ai.tool.d.ts.map +1 -0
  345. package/dist/tools/ask-ai.tool.js +49 -0
  346. package/dist/tools/ask-ai.tool.js.map +1 -0
  347. package/dist/tools/batch.tool.d.ts +42 -0
  348. package/dist/tools/batch.tool.d.ts.map +1 -0
  349. package/dist/tools/batch.tool.js +146 -0
  350. package/dist/tools/batch.tool.js.map +1 -0
  351. package/dist/tools/brainstorm.tool.d.ts +20 -0
  352. package/dist/tools/brainstorm.tool.d.ts.map +1 -0
  353. package/dist/tools/brainstorm.tool.js +86 -0
  354. package/dist/tools/brainstorm.tool.js.map +1 -0
  355. package/dist/tools/code/code-outline.tool.d.ts +20 -0
  356. package/dist/tools/code/code-outline.tool.d.ts.map +1 -0
  357. package/dist/tools/code/code-outline.tool.js +803 -0
  358. package/dist/tools/code/code-outline.tool.js.map +1 -0
  359. package/dist/tools/code/find-definition.tool.d.ts +20 -0
  360. package/dist/tools/code/find-definition.tool.d.ts.map +1 -0
  361. package/dist/tools/code/find-definition.tool.js +218 -0
  362. package/dist/tools/code/find-definition.tool.js.map +1 -0
  363. package/dist/tools/code/find-references.tool.d.ts +20 -0
  364. package/dist/tools/code/find-references.tool.d.ts.map +1 -0
  365. package/dist/tools/code/find-references.tool.js +207 -0
  366. package/dist/tools/code/find-references.tool.js.map +1 -0
  367. package/dist/tools/code/find-symbols.tool.d.ts +20 -0
  368. package/dist/tools/code/find-symbols.tool.d.ts.map +1 -0
  369. package/dist/tools/code/find-symbols.tool.js +367 -0
  370. package/dist/tools/code/find-symbols.tool.js.map +1 -0
  371. package/dist/tools/code/index.d.ts +34 -0
  372. package/dist/tools/code/index.d.ts.map +1 -0
  373. package/dist/tools/code/index.js +35 -0
  374. package/dist/tools/code/index.js.map +1 -0
  375. package/dist/tools/code/insert-after-symbol.tool.d.ts +20 -0
  376. package/dist/tools/code/insert-after-symbol.tool.d.ts.map +1 -0
  377. package/dist/tools/code/insert-after-symbol.tool.js +224 -0
  378. package/dist/tools/code/insert-after-symbol.tool.js.map +1 -0
  379. package/dist/tools/code/insert-before-symbol.tool.d.ts +20 -0
  380. package/dist/tools/code/insert-before-symbol.tool.d.ts.map +1 -0
  381. package/dist/tools/code/insert-before-symbol.tool.js +136 -0
  382. package/dist/tools/code/insert-before-symbol.tool.js.map +1 -0
  383. package/dist/tools/code/rename-symbol.tool.d.ts +20 -0
  384. package/dist/tools/code/rename-symbol.tool.d.ts.map +1 -0
  385. package/dist/tools/code/rename-symbol.tool.js +255 -0
  386. package/dist/tools/code/rename-symbol.tool.js.map +1 -0
  387. package/dist/tools/code/semantic-search.tool.d.ts +20 -0
  388. package/dist/tools/code/semantic-search.tool.d.ts.map +1 -0
  389. package/dist/tools/code/semantic-search.tool.js +172 -0
  390. package/dist/tools/code/semantic-search.tool.js.map +1 -0
  391. package/dist/tools/code/symbol-search.d.ts +39 -0
  392. package/dist/tools/code/symbol-search.d.ts.map +1 -0
  393. package/dist/tools/code/symbol-search.js +118 -0
  394. package/dist/tools/code/symbol-search.js.map +1 -0
  395. package/dist/tools/context/feedback.tool.d.ts +20 -0
  396. package/dist/tools/context/feedback.tool.d.ts.map +1 -0
  397. package/dist/tools/context/feedback.tool.js +176 -0
  398. package/dist/tools/context/feedback.tool.js.map +1 -0
  399. package/dist/tools/context/get-shared-context.tool.d.ts +20 -0
  400. package/dist/tools/context/get-shared-context.tool.d.ts.map +1 -0
  401. package/dist/tools/context/get-shared-context.tool.js +83 -0
  402. package/dist/tools/context/get-shared-context.tool.js.map +1 -0
  403. package/dist/tools/context/index.d.ts +26 -0
  404. package/dist/tools/context/index.d.ts.map +1 -0
  405. package/dist/tools/context/index.js +26 -0
  406. package/dist/tools/context/index.js.map +1 -0
  407. package/dist/tools/context/shared-thoughts.tool.d.ts +20 -0
  408. package/dist/tools/context/shared-thoughts.tool.d.ts.map +1 -0
  409. package/dist/tools/context/shared-thoughts.tool.js +199 -0
  410. package/dist/tools/context/shared-thoughts.tool.js.map +1 -0
  411. package/dist/tools/edit/delete-lines.tool.d.ts +20 -0
  412. package/dist/tools/edit/delete-lines.tool.d.ts.map +1 -0
  413. package/dist/tools/edit/delete-lines.tool.js +88 -0
  414. package/dist/tools/edit/delete-lines.tool.js.map +1 -0
  415. package/dist/tools/edit/edit-shared.d.ts +55 -0
  416. package/dist/tools/edit/edit-shared.d.ts.map +1 -0
  417. package/dist/tools/edit/edit-shared.js +122 -0
  418. package/dist/tools/edit/edit-shared.js.map +1 -0
  419. package/dist/tools/edit/index.d.ts +29 -0
  420. package/dist/tools/edit/index.d.ts.map +1 -0
  421. package/dist/tools/edit/index.js +29 -0
  422. package/dist/tools/edit/index.js.map +1 -0
  423. package/dist/tools/edit/insert-at-line.tool.d.ts +20 -0
  424. package/dist/tools/edit/insert-at-line.tool.d.ts.map +1 -0
  425. package/dist/tools/edit/insert-at-line.tool.js +92 -0
  426. package/dist/tools/edit/insert-at-line.tool.js.map +1 -0
  427. package/dist/tools/edit/replace-content.tool.d.ts +20 -0
  428. package/dist/tools/edit/replace-content.tool.d.ts.map +1 -0
  429. package/dist/tools/edit/replace-content.tool.js +214 -0
  430. package/dist/tools/edit/replace-content.tool.js.map +1 -0
  431. package/dist/tools/edit/replace-lines.tool.d.ts +20 -0
  432. package/dist/tools/edit/replace-lines.tool.d.ts.map +1 -0
  433. package/dist/tools/edit/replace-lines.tool.js +97 -0
  434. package/dist/tools/edit/replace-lines.tool.js.map +1 -0
  435. package/dist/tools/file/file-diff.tool.d.ts +20 -0
  436. package/dist/tools/file/file-diff.tool.d.ts.map +1 -0
  437. package/dist/tools/file/file-diff.tool.js +359 -0
  438. package/dist/tools/file/file-diff.tool.js.map +1 -0
  439. package/dist/tools/file/file-read.tool.d.ts +20 -0
  440. package/dist/tools/file/file-read.tool.d.ts.map +1 -0
  441. package/dist/tools/file/file-read.tool.js +270 -0
  442. package/dist/tools/file/file-read.tool.js.map +1 -0
  443. package/dist/tools/file/file-search.tool.d.ts +20 -0
  444. package/dist/tools/file/file-search.tool.d.ts.map +1 -0
  445. package/dist/tools/file/file-search.tool.js +339 -0
  446. package/dist/tools/file/file-search.tool.js.map +1 -0
  447. package/dist/tools/file/file-tree.tool.d.ts +49 -0
  448. package/dist/tools/file/file-tree.tool.d.ts.map +1 -0
  449. package/dist/tools/file/file-tree.tool.js +398 -0
  450. package/dist/tools/file/file-tree.tool.js.map +1 -0
  451. package/dist/tools/file/file-write.tool.d.ts +20 -0
  452. package/dist/tools/file/file-write.tool.d.ts.map +1 -0
  453. package/dist/tools/file/file-write.tool.js +204 -0
  454. package/dist/tools/file/file-write.tool.js.map +1 -0
  455. package/dist/tools/file/index.d.ts +31 -0
  456. package/dist/tools/file/index.d.ts.map +1 -0
  457. package/dist/tools/file/index.js +31 -0
  458. package/dist/tools/file/index.js.map +1 -0
  459. package/dist/tools/git/git-blame.tool.d.ts +20 -0
  460. package/dist/tools/git/git-blame.tool.d.ts.map +1 -0
  461. package/dist/tools/git/git-blame.tool.js +138 -0
  462. package/dist/tools/git/git-blame.tool.js.map +1 -0
  463. package/dist/tools/git/git-branch.tool.d.ts +20 -0
  464. package/dist/tools/git/git-branch.tool.d.ts.map +1 -0
  465. package/dist/tools/git/git-branch.tool.js +158 -0
  466. package/dist/tools/git/git-branch.tool.js.map +1 -0
  467. package/dist/tools/git/git-diff.tool.d.ts +20 -0
  468. package/dist/tools/git/git-diff.tool.d.ts.map +1 -0
  469. package/dist/tools/git/git-diff.tool.js +117 -0
  470. package/dist/tools/git/git-diff.tool.js.map +1 -0
  471. package/dist/tools/git/git-log.tool.d.ts +20 -0
  472. package/dist/tools/git/git-log.tool.d.ts.map +1 -0
  473. package/dist/tools/git/git-log.tool.js +150 -0
  474. package/dist/tools/git/git-log.tool.js.map +1 -0
  475. package/dist/tools/git/git-status.tool.d.ts +20 -0
  476. package/dist/tools/git/git-status.tool.d.ts.map +1 -0
  477. package/dist/tools/git/git-status.tool.js +81 -0
  478. package/dist/tools/git/git-status.tool.js.map +1 -0
  479. package/dist/tools/git/index.d.ts +31 -0
  480. package/dist/tools/git/index.d.ts.map +1 -0
  481. package/dist/tools/git/index.js +32 -0
  482. package/dist/tools/git/index.js.map +1 -0
  483. package/dist/tools/index.d.ts +19 -0
  484. package/dist/tools/index.d.ts.map +1 -0
  485. package/dist/tools/index.js +170 -0
  486. package/dist/tools/index.js.map +1 -0
  487. package/dist/tools/kanban/board-create.tool.d.ts +20 -0
  488. package/dist/tools/kanban/board-create.tool.d.ts.map +1 -0
  489. package/dist/tools/kanban/board-create.tool.js +92 -0
  490. package/dist/tools/kanban/board-create.tool.js.map +1 -0
  491. package/dist/tools/kanban/board-invite.tool.d.ts +20 -0
  492. package/dist/tools/kanban/board-invite.tool.d.ts.map +1 -0
  493. package/dist/tools/kanban/board-invite.tool.js +96 -0
  494. package/dist/tools/kanban/board-invite.tool.js.map +1 -0
  495. package/dist/tools/kanban/board-list.tool.d.ts +20 -0
  496. package/dist/tools/kanban/board-list.tool.d.ts.map +1 -0
  497. package/dist/tools/kanban/board-list.tool.js +94 -0
  498. package/dist/tools/kanban/board-list.tool.js.map +1 -0
  499. package/dist/tools/kanban/board-members.tool.d.ts +20 -0
  500. package/dist/tools/kanban/board-members.tool.d.ts.map +1 -0
  501. package/dist/tools/kanban/board-members.tool.js +153 -0
  502. package/dist/tools/kanban/board-members.tool.js.map +1 -0
  503. package/dist/tools/kanban/board-share.tool.d.ts +20 -0
  504. package/dist/tools/kanban/board-share.tool.d.ts.map +1 -0
  505. package/dist/tools/kanban/board-share.tool.js +91 -0
  506. package/dist/tools/kanban/board-share.tool.js.map +1 -0
  507. package/dist/tools/kanban/board-status.tool.d.ts +20 -0
  508. package/dist/tools/kanban/board-status.tool.d.ts.map +1 -0
  509. package/dist/tools/kanban/board-status.tool.js +79 -0
  510. package/dist/tools/kanban/board-status.tool.js.map +1 -0
  511. package/dist/tools/kanban/index.d.ts +42 -0
  512. package/dist/tools/kanban/index.d.ts.map +1 -0
  513. package/dist/tools/kanban/index.js +46 -0
  514. package/dist/tools/kanban/index.js.map +1 -0
  515. package/dist/tools/kanban/task-assign.tool.d.ts +20 -0
  516. package/dist/tools/kanban/task-assign.tool.d.ts.map +1 -0
  517. package/dist/tools/kanban/task-assign.tool.js +103 -0
  518. package/dist/tools/kanban/task-assign.tool.js.map +1 -0
  519. package/dist/tools/kanban/task-claim.tool.d.ts +20 -0
  520. package/dist/tools/kanban/task-claim.tool.d.ts.map +1 -0
  521. package/dist/tools/kanban/task-claim.tool.js +107 -0
  522. package/dist/tools/kanban/task-claim.tool.js.map +1 -0
  523. package/dist/tools/kanban/task-create.tool.d.ts +20 -0
  524. package/dist/tools/kanban/task-create.tool.d.ts.map +1 -0
  525. package/dist/tools/kanban/task-create.tool.js +123 -0
  526. package/dist/tools/kanban/task-create.tool.js.map +1 -0
  527. package/dist/tools/kanban/task-list.tool.d.ts +20 -0
  528. package/dist/tools/kanban/task-list.tool.d.ts.map +1 -0
  529. package/dist/tools/kanban/task-list.tool.js +95 -0
  530. package/dist/tools/kanban/task-list.tool.js.map +1 -0
  531. package/dist/tools/kanban/task-push-multi.tool.d.ts +20 -0
  532. package/dist/tools/kanban/task-push-multi.tool.d.ts.map +1 -0
  533. package/dist/tools/kanban/task-push-multi.tool.js +273 -0
  534. package/dist/tools/kanban/task-push-multi.tool.js.map +1 -0
  535. package/dist/tools/kanban/task-update.tool.d.ts +20 -0
  536. package/dist/tools/kanban/task-update.tool.d.ts.map +1 -0
  537. package/dist/tools/kanban/task-update.tool.js +173 -0
  538. package/dist/tools/kanban/task-update.tool.js.map +1 -0
  539. package/dist/tools/kanban/workspace-create.tool.d.ts +20 -0
  540. package/dist/tools/kanban/workspace-create.tool.d.ts.map +1 -0
  541. package/dist/tools/kanban/workspace-create.tool.js +84 -0
  542. package/dist/tools/kanban/workspace-create.tool.js.map +1 -0
  543. package/dist/tools/kanban/workspace-join.tool.d.ts +20 -0
  544. package/dist/tools/kanban/workspace-join.tool.d.ts.map +1 -0
  545. package/dist/tools/kanban/workspace-join.tool.js +76 -0
  546. package/dist/tools/kanban/workspace-join.tool.js.map +1 -0
  547. package/dist/tools/kanban/workspace-leave.tool.d.ts +20 -0
  548. package/dist/tools/kanban/workspace-leave.tool.d.ts.map +1 -0
  549. package/dist/tools/kanban/workspace-leave.tool.js +74 -0
  550. package/dist/tools/kanban/workspace-leave.tool.js.map +1 -0
  551. package/dist/tools/kanban/workspace-list.tool.d.ts +20 -0
  552. package/dist/tools/kanban/workspace-list.tool.d.ts.map +1 -0
  553. package/dist/tools/kanban/workspace-list.tool.js +75 -0
  554. package/dist/tools/kanban/workspace-list.tool.js.map +1 -0
  555. package/dist/tools/loci/graph-find-path.tool.d.ts +38 -0
  556. package/dist/tools/loci/graph-find-path.tool.d.ts.map +1 -0
  557. package/dist/tools/loci/graph-find-path.tool.js +133 -0
  558. package/dist/tools/loci/graph-find-path.tool.js.map +1 -0
  559. package/dist/tools/loci/graph-query.tool.d.ts +55 -0
  560. package/dist/tools/loci/graph-query.tool.d.ts.map +1 -0
  561. package/dist/tools/loci/graph-query.tool.js +98 -0
  562. package/dist/tools/loci/graph-query.tool.js.map +1 -0
  563. package/dist/tools/loci/index.d.ts +27 -0
  564. package/dist/tools/loci/index.d.ts.map +1 -0
  565. package/dist/tools/loci/index.js +27 -0
  566. package/dist/tools/loci/index.js.map +1 -0
  567. package/dist/tools/loci/loci-recall.tool.d.ts +33 -0
  568. package/dist/tools/loci/loci-recall.tool.d.ts.map +1 -0
  569. package/dist/tools/loci/loci-recall.tool.js +156 -0
  570. package/dist/tools/loci/loci-recall.tool.js.map +1 -0
  571. package/dist/tools/loci/sequence-recommend.tool.d.ts +33 -0
  572. package/dist/tools/loci/sequence-recommend.tool.d.ts.map +1 -0
  573. package/dist/tools/loci/sequence-recommend.tool.js +114 -0
  574. package/dist/tools/loci/sequence-recommend.tool.js.map +1 -0
  575. package/dist/tools/memory/delete-memory.tool.d.ts +20 -0
  576. package/dist/tools/memory/delete-memory.tool.d.ts.map +1 -0
  577. package/dist/tools/memory/delete-memory.tool.js +96 -0
  578. package/dist/tools/memory/delete-memory.tool.js.map +1 -0
  579. package/dist/tools/memory/edit-memory.tool.d.ts +20 -0
  580. package/dist/tools/memory/edit-memory.tool.d.ts.map +1 -0
  581. package/dist/tools/memory/edit-memory.tool.js +172 -0
  582. package/dist/tools/memory/edit-memory.tool.js.map +1 -0
  583. package/dist/tools/memory/index.d.ts +31 -0
  584. package/dist/tools/memory/index.d.ts.map +1 -0
  585. package/dist/tools/memory/index.js +31 -0
  586. package/dist/tools/memory/index.js.map +1 -0
  587. package/dist/tools/memory/list-memories.tool.d.ts +20 -0
  588. package/dist/tools/memory/list-memories.tool.d.ts.map +1 -0
  589. package/dist/tools/memory/list-memories.tool.js +142 -0
  590. package/dist/tools/memory/list-memories.tool.js.map +1 -0
  591. package/dist/tools/memory/read-memory.tool.d.ts +20 -0
  592. package/dist/tools/memory/read-memory.tool.d.ts.map +1 -0
  593. package/dist/tools/memory/read-memory.tool.js +98 -0
  594. package/dist/tools/memory/read-memory.tool.js.map +1 -0
  595. package/dist/tools/memory/write-memory.tool.d.ts +20 -0
  596. package/dist/tools/memory/write-memory.tool.d.ts.map +1 -0
  597. package/dist/tools/memory/write-memory.tool.js +162 -0
  598. package/dist/tools/memory/write-memory.tool.js.map +1 -0
  599. package/dist/tools/mpc/index.d.ts +27 -0
  600. package/dist/tools/mpc/index.d.ts.map +1 -0
  601. package/dist/tools/mpc/index.js +27 -0
  602. package/dist/tools/mpc/index.js.map +1 -0
  603. package/dist/tools/mpc/mpc-distribute.tool.d.ts +36 -0
  604. package/dist/tools/mpc/mpc-distribute.tool.d.ts.map +1 -0
  605. package/dist/tools/mpc/mpc-distribute.tool.js +129 -0
  606. package/dist/tools/mpc/mpc-distribute.tool.js.map +1 -0
  607. package/dist/tools/mpc/mpc-reconstruct.tool.d.ts +28 -0
  608. package/dist/tools/mpc/mpc-reconstruct.tool.d.ts.map +1 -0
  609. package/dist/tools/mpc/mpc-reconstruct.tool.js +125 -0
  610. package/dist/tools/mpc/mpc-reconstruct.tool.js.map +1 -0
  611. package/dist/tools/mpc/mpc-split.tool.d.ts +43 -0
  612. package/dist/tools/mpc/mpc-split.tool.d.ts.map +1 -0
  613. package/dist/tools/mpc/mpc-split.tool.js +120 -0
  614. package/dist/tools/mpc/mpc-split.tool.js.map +1 -0
  615. package/dist/tools/mpc/mpc-status.tool.d.ts +33 -0
  616. package/dist/tools/mpc/mpc-status.tool.d.ts.map +1 -0
  617. package/dist/tools/mpc/mpc-status.tool.js +129 -0
  618. package/dist/tools/mpc/mpc-status.tool.js.map +1 -0
  619. package/dist/tools/multi-llm/consensus-prompt.tool.d.ts +9 -0
  620. package/dist/tools/multi-llm/consensus-prompt.tool.d.ts.map +1 -0
  621. package/dist/tools/multi-llm/consensus-prompt.tool.js +165 -0
  622. package/dist/tools/multi-llm/consensus-prompt.tool.js.map +1 -0
  623. package/dist/tools/multi-llm/index.d.ts +8 -0
  624. package/dist/tools/multi-llm/index.d.ts.map +1 -0
  625. package/dist/tools/multi-llm/index.js +8 -0
  626. package/dist/tools/multi-llm/index.js.map +1 -0
  627. package/dist/tools/multi-llm/multi-prompt.tool.d.ts +9 -0
  628. package/dist/tools/multi-llm/multi-prompt.tool.d.ts.map +1 -0
  629. package/dist/tools/multi-llm/multi-prompt.tool.js +90 -0
  630. package/dist/tools/multi-llm/multi-prompt.tool.js.map +1 -0
  631. package/dist/tools/project/check-types.tool.d.ts +20 -0
  632. package/dist/tools/project/check-types.tool.d.ts.map +1 -0
  633. package/dist/tools/project/check-types.tool.js +254 -0
  634. package/dist/tools/project/check-types.tool.js.map +1 -0
  635. package/dist/tools/project/index.d.ts +35 -0
  636. package/dist/tools/project/index.d.ts.map +1 -0
  637. package/dist/tools/project/index.js +35 -0
  638. package/dist/tools/project/index.js.map +1 -0
  639. package/dist/tools/project/project-info.tool.d.ts +20 -0
  640. package/dist/tools/project/project-info.tool.d.ts.map +1 -0
  641. package/dist/tools/project/project-info.tool.js +364 -0
  642. package/dist/tools/project/project-info.tool.js.map +1 -0
  643. package/dist/tools/project/run-lint.tool.d.ts +20 -0
  644. package/dist/tools/project/run-lint.tool.d.ts.map +1 -0
  645. package/dist/tools/project/run-lint.tool.js +279 -0
  646. package/dist/tools/project/run-lint.tool.js.map +1 -0
  647. package/dist/tools/project/run-script.tool.d.ts +20 -0
  648. package/dist/tools/project/run-script.tool.d.ts.map +1 -0
  649. package/dist/tools/project/run-script.tool.js +141 -0
  650. package/dist/tools/project/run-script.tool.js.map +1 -0
  651. package/dist/tools/project/run-tests.tool.d.ts +20 -0
  652. package/dist/tools/project/run-tests.tool.d.ts.map +1 -0
  653. package/dist/tools/project/run-tests.tool.js +357 -0
  654. package/dist/tools/project/run-tests.tool.js.map +1 -0
  655. package/dist/tools/recursive/index.d.ts +28 -0
  656. package/dist/tools/recursive/index.d.ts.map +1 -0
  657. package/dist/tools/recursive/index.js +28 -0
  658. package/dist/tools/recursive/index.js.map +1 -0
  659. package/dist/tools/recursive/invocation-log.tool.d.ts +20 -0
  660. package/dist/tools/recursive/invocation-log.tool.d.ts.map +1 -0
  661. package/dist/tools/recursive/invocation-log.tool.js +110 -0
  662. package/dist/tools/recursive/invocation-log.tool.js.map +1 -0
  663. package/dist/tools/recursive/invoke-batch.tool.d.ts +20 -0
  664. package/dist/tools/recursive/invoke-batch.tool.d.ts.map +1 -0
  665. package/dist/tools/recursive/invoke-batch.tool.js +99 -0
  666. package/dist/tools/recursive/invoke-batch.tool.js.map +1 -0
  667. package/dist/tools/recursive/invoke-tool.tool.d.ts +20 -0
  668. package/dist/tools/recursive/invoke-tool.tool.d.ts.map +1 -0
  669. package/dist/tools/recursive/invoke-tool.tool.js +100 -0
  670. package/dist/tools/recursive/invoke-tool.tool.js.map +1 -0
  671. package/dist/tools/registry.d.ts +261 -0
  672. package/dist/tools/registry.d.ts.map +1 -0
  673. package/dist/tools/registry.js +462 -0
  674. package/dist/tools/registry.js.map +1 -0
  675. package/dist/tools/rl/index.d.ts +25 -0
  676. package/dist/tools/rl/index.d.ts.map +1 -0
  677. package/dist/tools/rl/index.js +25 -0
  678. package/dist/tools/rl/index.js.map +1 -0
  679. package/dist/tools/rl/rl-dopamine-log.tool.d.ts +32 -0
  680. package/dist/tools/rl/rl-dopamine-log.tool.d.ts.map +1 -0
  681. package/dist/tools/rl/rl-dopamine-log.tool.js +112 -0
  682. package/dist/tools/rl/rl-dopamine-log.tool.js.map +1 -0
  683. package/dist/tools/rl/rl-reward-stats.tool.d.ts +33 -0
  684. package/dist/tools/rl/rl-reward-stats.tool.d.ts.map +1 -0
  685. package/dist/tools/rl/rl-reward-stats.tool.js +100 -0
  686. package/dist/tools/rl/rl-reward-stats.tool.js.map +1 -0
  687. package/dist/tools/session/index.d.ts +28 -0
  688. package/dist/tools/session/index.d.ts.map +1 -0
  689. package/dist/tools/session/index.js +28 -0
  690. package/dist/tools/session/index.js.map +1 -0
  691. package/dist/tools/session/session-create.tool.d.ts +35 -0
  692. package/dist/tools/session/session-create.tool.d.ts.map +1 -0
  693. package/dist/tools/session/session-create.tool.js +74 -0
  694. package/dist/tools/session/session-create.tool.js.map +1 -0
  695. package/dist/tools/session/session-delete.tool.d.ts +32 -0
  696. package/dist/tools/session/session-delete.tool.d.ts.map +1 -0
  697. package/dist/tools/session/session-delete.tool.js +94 -0
  698. package/dist/tools/session/session-delete.tool.js.map +1 -0
  699. package/dist/tools/session/session-info.tool.d.ts +30 -0
  700. package/dist/tools/session/session-info.tool.d.ts.map +1 -0
  701. package/dist/tools/session/session-info.tool.js +89 -0
  702. package/dist/tools/session/session-info.tool.js.map +1 -0
  703. package/dist/tools/session/session-list.tool.d.ts +43 -0
  704. package/dist/tools/session/session-list.tool.d.ts.map +1 -0
  705. package/dist/tools/session/session-list.tool.js +85 -0
  706. package/dist/tools/session/session-list.tool.js.map +1 -0
  707. package/dist/tools/session/session-switch.tool.d.ts +32 -0
  708. package/dist/tools/session/session-switch.tool.d.ts.map +1 -0
  709. package/dist/tools/session/session-switch.tool.js +75 -0
  710. package/dist/tools/session/session-switch.tool.js.map +1 -0
  711. package/dist/tools/simple-tools.d.ts +23 -0
  712. package/dist/tools/simple-tools.d.ts.map +1 -0
  713. package/dist/tools/simple-tools.js +73 -0
  714. package/dist/tools/simple-tools.js.map +1 -0
  715. package/dist/tools/specialized/analyze-deps.tool.d.ts +20 -0
  716. package/dist/tools/specialized/analyze-deps.tool.d.ts.map +1 -0
  717. package/dist/tools/specialized/analyze-deps.tool.js +102 -0
  718. package/dist/tools/specialized/analyze-deps.tool.js.map +1 -0
  719. package/dist/tools/specialized/auto-fix-agent.tool.d.ts +12 -0
  720. package/dist/tools/specialized/auto-fix-agent.tool.d.ts.map +1 -0
  721. package/dist/tools/specialized/auto-fix-agent.tool.js +154 -0
  722. package/dist/tools/specialized/auto-fix-agent.tool.js.map +1 -0
  723. package/dist/tools/specialized/auto-fix.tool.d.ts +20 -0
  724. package/dist/tools/specialized/auto-fix.tool.d.ts.map +1 -0
  725. package/dist/tools/specialized/auto-fix.tool.js +264 -0
  726. package/dist/tools/specialized/auto-fix.tool.js.map +1 -0
  727. package/dist/tools/specialized/code-review.tool.d.ts +20 -0
  728. package/dist/tools/specialized/code-review.tool.d.ts.map +1 -0
  729. package/dist/tools/specialized/code-review.tool.js +140 -0
  730. package/dist/tools/specialized/code-review.tool.js.map +1 -0
  731. package/dist/tools/specialized/explain-code.tool.d.ts +20 -0
  732. package/dist/tools/specialized/explain-code.tool.d.ts.map +1 -0
  733. package/dist/tools/specialized/explain-code.tool.js +90 -0
  734. package/dist/tools/specialized/explain-code.tool.js.map +1 -0
  735. package/dist/tools/specialized/fix-bug.tool.d.ts +20 -0
  736. package/dist/tools/specialized/fix-bug.tool.d.ts.map +1 -0
  737. package/dist/tools/specialized/fix-bug.tool.js +107 -0
  738. package/dist/tools/specialized/fix-bug.tool.js.map +1 -0
  739. package/dist/tools/specialized/index.d.ts +26 -0
  740. package/dist/tools/specialized/index.d.ts.map +1 -0
  741. package/dist/tools/specialized/index.js +26 -0
  742. package/dist/tools/specialized/index.js.map +1 -0
  743. package/dist/tools/specialized/refactor.tool.d.ts +20 -0
  744. package/dist/tools/specialized/refactor.tool.d.ts.map +1 -0
  745. package/dist/tools/specialized/refactor.tool.js +115 -0
  746. package/dist/tools/specialized/refactor.tool.js.map +1 -0
  747. package/dist/tools/specialized/write-tests.tool.d.ts +20 -0
  748. package/dist/tools/specialized/write-tests.tool.d.ts.map +1 -0
  749. package/dist/tools/specialized/write-tests.tool.js +115 -0
  750. package/dist/tools/specialized/write-tests.tool.js.map +1 -0
  751. package/dist/tools/system/ai-config.tool.d.ts +13 -0
  752. package/dist/tools/system/ai-config.tool.d.ts.map +1 -0
  753. package/dist/tools/system/ai-config.tool.js +252 -0
  754. package/dist/tools/system/ai-config.tool.js.map +1 -0
  755. package/dist/tools/system/ai-models.tool.d.ts +45 -0
  756. package/dist/tools/system/ai-models.tool.d.ts.map +1 -0
  757. package/dist/tools/system/ai-models.tool.js +194 -0
  758. package/dist/tools/system/ai-models.tool.js.map +1 -0
  759. package/dist/tools/system/config.tool.d.ts +57 -0
  760. package/dist/tools/system/config.tool.d.ts.map +1 -0
  761. package/dist/tools/system/config.tool.js +320 -0
  762. package/dist/tools/system/config.tool.js.map +1 -0
  763. package/dist/tools/system/env-info.tool.d.ts +20 -0
  764. package/dist/tools/system/env-info.tool.d.ts.map +1 -0
  765. package/dist/tools/system/env-info.tool.js +228 -0
  766. package/dist/tools/system/env-info.tool.js.map +1 -0
  767. package/dist/tools/system/index.d.ts +37 -0
  768. package/dist/tools/system/index.d.ts.map +1 -0
  769. package/dist/tools/system/index.js +37 -0
  770. package/dist/tools/system/index.js.map +1 -0
  771. package/dist/tools/system/memory-usage.tool.d.ts +20 -0
  772. package/dist/tools/system/memory-usage.tool.d.ts.map +1 -0
  773. package/dist/tools/system/memory-usage.tool.js +223 -0
  774. package/dist/tools/system/memory-usage.tool.js.map +1 -0
  775. package/dist/tools/system/process-list.tool.d.ts +20 -0
  776. package/dist/tools/system/process-list.tool.d.ts.map +1 -0
  777. package/dist/tools/system/process-list.tool.js +202 -0
  778. package/dist/tools/system/process-list.tool.js.map +1 -0
  779. package/dist/tools/system/shell-exec.tool.d.ts +20 -0
  780. package/dist/tools/system/shell-exec.tool.d.ts.map +1 -0
  781. package/dist/tools/system/shell-exec.tool.js +293 -0
  782. package/dist/tools/system/shell-exec.tool.js.map +1 -0
  783. package/dist/tools/timeout-test.tool.d.ts +20 -0
  784. package/dist/tools/timeout-test.tool.d.ts.map +1 -0
  785. package/dist/tools/timeout-test.tool.js +46 -0
  786. package/dist/tools/timeout-test.tool.js.map +1 -0
  787. package/dist/tree-sitter/index.d.ts +27 -0
  788. package/dist/tree-sitter/index.d.ts.map +1 -0
  789. package/dist/tree-sitter/index.js +27 -0
  790. package/dist/tree-sitter/index.js.map +1 -0
  791. package/dist/tree-sitter/parser-manager.d.ts +83 -0
  792. package/dist/tree-sitter/parser-manager.d.ts.map +1 -0
  793. package/dist/tree-sitter/parser-manager.js +430 -0
  794. package/dist/tree-sitter/parser-manager.js.map +1 -0
  795. package/dist/tree-sitter/types.d.ts +117 -0
  796. package/dist/tree-sitter/types.d.ts.map +1 -0
  797. package/dist/tree-sitter/types.js +375 -0
  798. package/dist/tree-sitter/types.js.map +1 -0
  799. package/dist/types/file-types.d.ts +277 -0
  800. package/dist/types/file-types.d.ts.map +1 -0
  801. package/dist/types/file-types.js +75 -0
  802. package/dist/types/file-types.js.map +1 -0
  803. package/dist/types/git-types.d.ts +270 -0
  804. package/dist/types/git-types.d.ts.map +1 -0
  805. package/dist/types/git-types.js +26 -0
  806. package/dist/types/git-types.js.map +1 -0
  807. package/dist/types/index.d.ts +28 -0
  808. package/dist/types/index.d.ts.map +1 -0
  809. package/dist/types/index.js +31 -0
  810. package/dist/types/index.js.map +1 -0
  811. package/dist/types/tool-types.d.ts +231 -0
  812. package/dist/types/tool-types.d.ts.map +1 -0
  813. package/dist/types/tool-types.js +30 -0
  814. package/dist/types/tool-types.js.map +1 -0
  815. package/dist/utils/bun-file.d.ts +99 -0
  816. package/dist/utils/bun-file.d.ts.map +1 -0
  817. package/dist/utils/bun-file.js +393 -0
  818. package/dist/utils/bun-file.js.map +1 -0
  819. package/dist/utils/cache.d.ts +124 -0
  820. package/dist/utils/cache.d.ts.map +1 -0
  821. package/dist/utils/cache.js +228 -0
  822. package/dist/utils/cache.js.map +1 -0
  823. package/dist/utils/commandExecutor.d.ts +54 -0
  824. package/dist/utils/commandExecutor.d.ts.map +1 -0
  825. package/dist/utils/commandExecutor.js +165 -0
  826. package/dist/utils/commandExecutor.js.map +1 -0
  827. package/dist/utils/edit-utils.d.ts +72 -0
  828. package/dist/utils/edit-utils.d.ts.map +1 -0
  829. package/dist/utils/edit-utils.js +129 -0
  830. package/dist/utils/edit-utils.js.map +1 -0
  831. package/dist/utils/errors.d.ts +170 -0
  832. package/dist/utils/errors.d.ts.map +1 -0
  833. package/dist/utils/errors.js +304 -0
  834. package/dist/utils/errors.js.map +1 -0
  835. package/dist/utils/file-utils.d.ts +195 -0
  836. package/dist/utils/file-utils.d.ts.map +1 -0
  837. package/dist/utils/file-utils.js +401 -0
  838. package/dist/utils/file-utils.js.map +1 -0
  839. package/dist/utils/git-utils.d.ts +204 -0
  840. package/dist/utils/git-utils.d.ts.map +1 -0
  841. package/dist/utils/git-utils.js +352 -0
  842. package/dist/utils/git-utils.js.map +1 -0
  843. package/dist/utils/languageDetection.d.ts +54 -0
  844. package/dist/utils/languageDetection.d.ts.map +1 -0
  845. package/dist/utils/languageDetection.js +340 -0
  846. package/dist/utils/languageDetection.js.map +1 -0
  847. package/dist/utils/logger.d.ts +207 -0
  848. package/dist/utils/logger.d.ts.map +1 -0
  849. package/dist/utils/logger.js +484 -0
  850. package/dist/utils/logger.js.map +1 -0
  851. package/dist/utils/process-utils.d.ts +196 -0
  852. package/dist/utils/process-utils.d.ts.map +1 -0
  853. package/dist/utils/process-utils.js +302 -0
  854. package/dist/utils/process-utils.js.map +1 -0
  855. package/dist/utils/projectContext.enhanced.d.ts +71 -0
  856. package/dist/utils/projectContext.enhanced.d.ts.map +1 -0
  857. package/dist/utils/projectContext.enhanced.js +816 -0
  858. package/dist/utils/projectContext.enhanced.js.map +1 -0
  859. package/dist/utils/security.d.ts +123 -0
  860. package/dist/utils/security.d.ts.map +1 -0
  861. package/dist/utils/security.js +337 -0
  862. package/dist/utils/security.js.map +1 -0
  863. package/dist/utils/validation.d.ts +163 -0
  864. package/dist/utils/validation.d.ts.map +1 -0
  865. package/dist/utils/validation.js +558 -0
  866. package/dist/utils/validation.js.map +1 -0
  867. package/dist/version.d.ts +17 -0
  868. package/dist/version.d.ts.map +1 -0
  869. package/dist/version.js +17 -0
  870. package/dist/version.js.map +1 -0
  871. package/kemdi-code-mcp-logo.png +0 -0
  872. package/package.json +136 -0
@@ -0,0 +1,12 @@
1
+ /**
2
+ * KemdiCode MCP Server
3
+ * Copyright (C) 2025-2026 Kemdi Sp. z o.o.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ */
10
+ import { UnifiedTool } from '../registry.js';
11
+ export declare const autoFixAgentTool: UnifiedTool;
12
+ //# sourceMappingURL=auto-fix-agent.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-fix-agent.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/specialized/auto-fix-agent.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA4B7C,eAAO,MAAM,gBAAgB,EAAE,WAgI9B,CAAC"}
@@ -0,0 +1,154 @@
1
+ /**
2
+ * KemdiCode MCP Server
3
+ * Copyright (C) 2025-2026 Kemdi Sp. z o.o.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ */
10
+ /**
11
+ * Auto-Fix Agent Tool
12
+ *
13
+ * Multi-agent code fixing using OpenAI Agents SDK.
14
+ * Uses applyPatchTool with WorkspaceEditor for reliable file modifications.
15
+ *
16
+ * @module tools/specialized/auto-fix-agent
17
+ */
18
+ import { z } from 'zod';
19
+ import { Agent, run, applyPatchTool } from '@openai/agents';
20
+ import { createWorkspaceEditor } from '../../ai/workspace-editor.js';
21
+ import { parseFiles } from '../../ai/index.js';
22
+ import { getEnhancedContextString } from '../../utils/projectContext.enhanced.js';
23
+ import { Logger } from '../../utils/logger.js';
24
+ import { config } from '../../config/index.js';
25
+ import { readFile } from 'node:fs/promises';
26
+ const FOCUS_MAP = {
27
+ security: 'SECURITY: SQL injection, XSS, CSRF, auth bypass, hardcoded secrets',
28
+ performance: 'PERFORMANCE: N+1 queries, missing cache, inefficient loops, memory leaks',
29
+ quality: 'QUALITY: SOLID violations, code duplication, missing error handling, type safety',
30
+ all: 'ALL: Security + Performance + Quality + Best practices',
31
+ };
32
+ const schema = z.object({
33
+ files: z.string().describe('Files to fix (use @path/file.ts syntax)'),
34
+ focus: z.enum(['security', 'performance', 'quality', 'all']).default('all'),
35
+ severity: z
36
+ .enum(['critical', 'all'])
37
+ .default('critical')
38
+ .describe('critical = only urgent fixes'),
39
+ dryRun: z.boolean().default(false).describe('true = show changes without applying'),
40
+ approve: z.boolean().default(true).describe('Auto-approve all patches (set false for manual)'),
41
+ });
42
+ export const autoFixAgentTool = {
43
+ name: 'auto-fix-agent',
44
+ description: 'Multi-agent code fixing using OpenAI Agents SDK. Analyzes code and applies patches with diff-based editing.',
45
+ zodSchema: schema,
46
+ execute: async (args, onProgress) => {
47
+ const input = args;
48
+ const { files, focus = 'all', severity = 'critical', dryRun = false, approve = true } = input;
49
+ if (!files?.toString().trim()) {
50
+ throw new Error('Files required. Use @path/file.ts syntax.');
51
+ }
52
+ const filesStr = String(files);
53
+ onProgress?.(`Auto-fix agent (${focus}, ${dryRun ? 'dry-run' : 'apply'}): ${filesStr}`);
54
+ // Parse and read files
55
+ const parsedFiles = parseFiles(filesStr);
56
+ let fileContents = '';
57
+ for (const filePath of parsedFiles) {
58
+ try {
59
+ const content = await readFile(filePath, 'utf8');
60
+ fileContents += `\n### File: ${filePath}\n\`\`\`\n${content}\n\`\`\`\n`;
61
+ }
62
+ catch (error) {
63
+ fileContents += `\n### File: ${filePath}\nError reading file: ${error}\n`;
64
+ }
65
+ }
66
+ // Get model from config
67
+ const serverConfig = config.get('server');
68
+ const model = serverConfig?.primaryModel || 'gpt-4o';
69
+ // Create workspace editor for file operations
70
+ const editor = createWorkspaceEditor({
71
+ root: process.cwd(),
72
+ createBackups: true,
73
+ });
74
+ // Create the fixer agent with applyPatchTool
75
+ const fixerAgent = new Agent({
76
+ name: 'CodeFixer',
77
+ instructions: `${getEnhancedContextString()}
78
+
79
+ You are an expert code analyzer and fixer. Your job is to analyze code, identify issues, and fix them.
80
+
81
+ ## Mode: ${dryRun ? 'DRY-RUN (describe what you would change, do NOT use tools)' : 'APPLY (use apply_patch tool to fix issues)'}
82
+
83
+ ## Focus: ${FOCUS_MAP[focus]}
84
+ ${severity === 'critical' ? '**CRITICAL ONLY** - Only fix issues requiring immediate attention.' : ''}
85
+
86
+ ## Code to Analyze:
87
+ ${fileContents}
88
+
89
+ ## Your Task:
90
+ 1. Analyze the code thoroughly for issues in the focus area
91
+ 2. For each issue found:
92
+ - Explain what the problem is
93
+ - Why it's a problem
94
+ - ${dryRun ? 'Describe the fix you would apply' : 'Use apply_patch tool to fix it'}
95
+ 3. ${dryRun ? 'Summarize all proposed changes' : 'Report what was fixed'}
96
+
97
+ ## Rules for Patches:
98
+ - Make minimal, targeted changes
99
+ - Preserve existing code style
100
+ - Each patch should be atomic and safe
101
+ - Use proper diff format for patches`,
102
+ model,
103
+ tools: dryRun
104
+ ? [] // No tools in dry-run mode
105
+ : [
106
+ applyPatchTool({
107
+ editor,
108
+ needsApproval: !approve,
109
+ onApproval: async (_ctx, approvalItem) => {
110
+ if (approve) {
111
+ return { approve: true };
112
+ }
113
+ const op = approvalItem.rawItem.type === 'apply_patch_call'
114
+ ? approvalItem.rawItem
115
+ .operation
116
+ : undefined;
117
+ Logger.info(`auto-fix-agent: Patch requires approval: ${op?.type} ${op?.path}`);
118
+ return { approve: true };
119
+ },
120
+ }),
121
+ ],
122
+ });
123
+ try {
124
+ onProgress?.('Running code fixer agent...');
125
+ // Run the agent
126
+ const result = await run(fixerAgent, `Analyze the code and ${dryRun ? 'describe fixes' : 'apply fixes'}. Focus: ${focus}, Severity: ${severity}`);
127
+ onProgress?.('Analysis and fixes complete.');
128
+ // Extract results
129
+ const output = result.finalOutput || 'No output from agent';
130
+ return JSON.stringify({
131
+ success: true,
132
+ mode: dryRun ? 'dry-run' : 'apply',
133
+ focus,
134
+ severity,
135
+ filesAnalyzed: parsedFiles.length,
136
+ model,
137
+ agentOutput: output,
138
+ message: dryRun
139
+ ? 'Dry-run complete. No changes were made.'
140
+ : 'Fixes applied using OpenAI Agents SDK.',
141
+ });
142
+ }
143
+ catch (error) {
144
+ const message = error instanceof Error ? error.message : String(error);
145
+ Logger.error(`auto-fix-agent: Error: ${message}`);
146
+ return JSON.stringify({
147
+ success: false,
148
+ error: message,
149
+ mode: dryRun ? 'dry-run' : 'apply',
150
+ });
151
+ }
152
+ },
153
+ };
154
+ //# sourceMappingURL=auto-fix-agent.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-fix-agent.tool.js","sourceRoot":"","sources":["../../../src/tools/specialized/auto-fix-agent.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,SAAS,GAA2B;IACxC,QAAQ,EAAE,oEAAoE;IAC9E,WAAW,EAAE,0EAA0E;IACvF,OAAO,EAAE,kFAAkF;IAC3F,GAAG,EAAE,wDAAwD;CAC9D,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,CAAC,CAA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,MAAM;oBACb,CAAC,CAAC,yCAAyC;oBAC3C,CAAC,CAAC,wCAAwC;aAC7C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,CAAC,KAAK,CAAC,0BAA0B,OAAO,EAAE,CAAC,CAAC;YAElD,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;aACnC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * KemdiCode MCP Server
3
+ * Copyright (C) 2025-2026 Kemdi Sp. z o.o.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+ import { UnifiedTool } from '../registry.js';
19
+ export declare const autoFixTool: UnifiedTool;
20
+ //# sourceMappingURL=auto-fix.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-fix.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/specialized/auto-fix.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAkG7C,eAAO,MAAM,WAAW,EAAE,WAoLzB,CAAC"}
@@ -0,0 +1,264 @@
1
+ /**
2
+ * KemdiCode MCP Server
3
+ * Copyright (C) 2025-2026 Kemdi Sp. z o.o.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+ import { z } from 'zod';
19
+ import { promises as fs } from 'fs';
20
+ import * as path from 'path';
21
+ import { executeAI, parseFiles } from '../../ai/index.js';
22
+ import { getEnhancedContextString } from '../../utils/projectContext.enhanced.js';
23
+ import { Logger } from '../../utils/logger.js';
24
+ import { validatePath } from '../../utils/validation.js';
25
+ const FOCUS_MAP = {
26
+ security: 'SECURITY: SQL injection, XSS, CSRF, auth bypass, hardcoded secrets',
27
+ performance: 'PERFORMANCE: N+1 queries, missing cache, inefficient loops, memory leaks',
28
+ quality: 'QUALITY: SOLID violations, code duplication, missing error handling, magic values',
29
+ all: 'ALL: Security + Performance + Quality + Best practices',
30
+ };
31
+ const schema = z.object({
32
+ files: z.string().describe('Files to fix (use @path/file.php syntax)'),
33
+ focus: z.enum(['security', 'performance', 'quality', 'all']).default('all'),
34
+ severity: z
35
+ .enum(['critical', 'all'])
36
+ .default('critical')
37
+ .describe('critical = only urgent fixes'),
38
+ dryRun: z.boolean().default(false).describe('true = show changes without applying'),
39
+ });
40
+ /**
41
+ * Parse AI response to extract structured edits
42
+ * Expects JSON block with array of edits
43
+ */
44
+ function parseAIEdits(response) {
45
+ const edits = [];
46
+ // Try to find JSON block in response
47
+ const jsonMatch = response.match(/```json\s*([\s\S]*?)\s*```/);
48
+ if (jsonMatch) {
49
+ try {
50
+ const parsed = JSON.parse(jsonMatch[1]);
51
+ if (Array.isArray(parsed)) {
52
+ for (const edit of parsed) {
53
+ if (edit.file && edit.search && edit.replace !== undefined) {
54
+ edits.push({
55
+ file: edit.file,
56
+ search: edit.search,
57
+ replace: edit.replace,
58
+ description: edit.description || 'No description',
59
+ severity: edit.severity || 'medium',
60
+ });
61
+ }
62
+ }
63
+ }
64
+ }
65
+ catch (e) {
66
+ Logger.warn(`auto-fix: Failed to parse JSON edits: ${e}`);
67
+ }
68
+ }
69
+ // Fallback: try to find raw JSON array
70
+ if (edits.length === 0) {
71
+ const rawJsonMatch = response.match(/\[\s*\{[\s\S]*?\}\s*\]/);
72
+ if (rawJsonMatch) {
73
+ try {
74
+ const parsed = JSON.parse(rawJsonMatch[0]);
75
+ if (Array.isArray(parsed)) {
76
+ for (const edit of parsed) {
77
+ if (edit.file && edit.search && edit.replace !== undefined) {
78
+ edits.push({
79
+ file: edit.file,
80
+ search: edit.search,
81
+ replace: edit.replace,
82
+ description: edit.description || 'No description',
83
+ severity: edit.severity || 'medium',
84
+ });
85
+ }
86
+ }
87
+ }
88
+ }
89
+ catch (e) {
90
+ Logger.warn(`auto-fix: Failed to parse raw JSON: ${e}`);
91
+ }
92
+ }
93
+ }
94
+ return edits;
95
+ }
96
+ export const autoFixTool = {
97
+ name: 'auto-fix',
98
+ description: 'Automatic code fixes - security, performance, quality. Can apply changes or show dry-run.',
99
+ zodSchema: schema,
100
+ prompt: { description: 'Auto-fix code issues' },
101
+ execute: async (args, onProgress) => {
102
+ const { files, focus = 'all', severity = 'critical', dryRun } = args;
103
+ if (!files?.toString().trim())
104
+ throw new Error('Files required. Use @path/file.php syntax.');
105
+ const filesStr = String(files);
106
+ const isDryRun = Boolean(dryRun);
107
+ const agent = 'plan'; // Always use plan to get structured analysis
108
+ const prompt = `${getEnhancedContextString()}
109
+ # Auto-Fix Request
110
+
111
+ ## Mode: ${isDryRun ? 'DRY-RUN (analysis only)' : 'AUTO-FIX (will apply changes)'}
112
+
113
+ ## Focus: ${FOCUS_MAP[focus]}
114
+ ${severity === 'critical' ? '**CRITICAL ONLY** - Fix only issues requiring immediate attention.' : ''}
115
+
116
+ ## Files
117
+ ${filesStr}
118
+
119
+ ## CRITICAL INSTRUCTIONS
120
+
121
+ You MUST output fixes in the following JSON format. This is REQUIRED for the fixes to be applied.
122
+
123
+ \`\`\`json
124
+ [
125
+ {
126
+ "file": "path/to/file.ts",
127
+ "search": "exact code to find and replace",
128
+ "replace": "new code to replace it with",
129
+ "description": "Brief description of the fix",
130
+ "severity": "critical|high|medium|low"
131
+ }
132
+ ]
133
+ \`\`\`
134
+
135
+ ## Rules for edits:
136
+ 1. The "search" field must be an EXACT match of existing code (including whitespace)
137
+ 2. Keep search strings short enough to be unique but include enough context
138
+ 3. The "replace" field should contain the fixed code
139
+ 4. Only include fixes that are necessary and safe
140
+ 5. Each fix should be atomic and self-contained
141
+
142
+ ## Output Format
143
+
144
+ First, briefly describe what issues you found.
145
+ Then output the JSON block with all fixes.
146
+ Finally, summarize what was fixed.
147
+
148
+ Begin analysis:`;
149
+ onProgress?.(`Auto-fix (${focus}, ${isDryRun ? 'dry-run' : 'apply'}): ${filesStr}`);
150
+ // Get AI analysis with structured edits
151
+ const aiResponse = await executeAI({ prompt, agent, files: parseFiles(filesStr), onProgress });
152
+ // Parse edits from AI response
153
+ const edits = parseAIEdits(aiResponse);
154
+ if (edits.length === 0) {
155
+ return JSON.stringify({
156
+ success: true,
157
+ mode: isDryRun ? 'dry-run' : 'apply',
158
+ message: 'No actionable fixes found or AI did not provide structured edits',
159
+ aiResponse: aiResponse.slice(0, 2000), // Include truncated AI response for context
160
+ editsFound: 0,
161
+ editsApplied: 0,
162
+ });
163
+ }
164
+ // In dry-run mode, just show what would be done
165
+ if (isDryRun) {
166
+ return JSON.stringify({
167
+ success: true,
168
+ mode: 'dry-run',
169
+ message: `Found ${edits.length} fixes (not applied)`,
170
+ edits: edits.map((e) => ({
171
+ file: e.file,
172
+ description: e.description,
173
+ severity: e.severity,
174
+ searchPreview: e.search.slice(0, 100) + (e.search.length > 100 ? '...' : ''),
175
+ replacePreview: e.replace.slice(0, 100) + (e.replace.length > 100 ? '...' : ''),
176
+ })),
177
+ editsFound: edits.length,
178
+ editsApplied: 0,
179
+ });
180
+ }
181
+ // Group edits by file to apply atomically
182
+ const editsByFile = new Map();
183
+ for (const edit of edits) {
184
+ const filePath = path.isAbsolute(edit.file)
185
+ ? edit.file
186
+ : path.resolve(process.cwd(), edit.file);
187
+ // Validate path to prevent path traversal from AI-generated edits
188
+ try {
189
+ await validatePath(filePath, { allowSymlinks: false, operation: 'write', requireWithinProject: false });
190
+ }
191
+ catch {
192
+ Logger.warn(`auto-fix: Skipping unsafe path: ${filePath}`);
193
+ continue;
194
+ }
195
+ const existing = editsByFile.get(filePath) || [];
196
+ existing.push({ ...edit, file: filePath });
197
+ editsByFile.set(filePath, existing);
198
+ }
199
+ // Apply all edits to each file atomically
200
+ const results = [];
201
+ for (const [filePath, fileEdits] of editsByFile) {
202
+ try {
203
+ // Read file once
204
+ let content = await fs.readFile(filePath, 'utf8');
205
+ // Create backup before any changes
206
+ const backupPath = `${filePath}.bak`;
207
+ await fs.copyFile(filePath, backupPath);
208
+ // Apply all edits to this file
209
+ for (const edit of fileEdits) {
210
+ if (content.includes(edit.search)) {
211
+ content = content.replace(edit.search, edit.replace);
212
+ results.push({
213
+ file: edit.file,
214
+ description: edit.description,
215
+ severity: edit.severity,
216
+ success: true,
217
+ backup: backupPath,
218
+ });
219
+ }
220
+ else {
221
+ results.push({
222
+ file: edit.file,
223
+ description: edit.description,
224
+ severity: edit.severity,
225
+ success: false,
226
+ error: 'Search string not found in file',
227
+ });
228
+ }
229
+ }
230
+ // Write file once with all changes
231
+ await fs.writeFile(filePath, content, 'utf8');
232
+ Logger.info(`auto-fix: Applied ${fileEdits.length} fixes to ${filePath}`);
233
+ }
234
+ catch (error) {
235
+ // Mark all edits for this file as failed
236
+ for (const edit of fileEdits) {
237
+ results.push({
238
+ file: edit.file,
239
+ description: edit.description,
240
+ severity: edit.severity,
241
+ success: false,
242
+ error: error instanceof Error ? error.message : String(error),
243
+ });
244
+ }
245
+ }
246
+ }
247
+ const successful = results.filter((r) => r.success);
248
+ const failed = results.filter((r) => !r.success);
249
+ return JSON.stringify({
250
+ success: failed.length === 0,
251
+ mode: 'apply',
252
+ message: `Applied ${successful.length}/${edits.length} fixes`,
253
+ results,
254
+ editsFound: edits.length,
255
+ editsApplied: successful.length,
256
+ editsFailed: failed.length,
257
+ summary: {
258
+ successful: successful.map((r) => `${r.file}: ${r.description}`),
259
+ failed: failed.map((r) => `${r.file}: ${r.error}`),
260
+ },
261
+ });
262
+ },
263
+ };
264
+ //# sourceMappingURL=auto-fix.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-fix.tool.js","sourceRoot":"","sources":["../../../src/tools/specialized/auto-fix.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAkB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,SAAS,GAA2B;IACxC,QAAQ,EAAE,oEAAoE;IAC9E,WAAW,EAAE,0EAA0E;IACvF,OAAO,EAAE,mFAAmF;IAC5F,GAAG,EAAE,wDAAwD;CAC9D,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;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AAK,CAAC;qBAC9D,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACpD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAEjD,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;YAC5B,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,WAAW,UAAU,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,QAAQ;YAC7D,OAAO;YACP,UAAU,EAAE,KAAK,CAAC,MAAM;YACxB,YAAY,EAAE,UAAU,CAAC,MAAM;YAC/B,WAAW,EAAE,MAAM,CAAC,MAAM;YAC1B,OAAO,EAAE;gBACP,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;gBAChE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;aACnD;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * KemdiCode MCP Server
3
+ * Copyright (C) 2025-2026 Kemdi Sp. z o.o.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+ import { UnifiedTool } from '../registry.js';
19
+ export declare const codeReviewTool: UnifiedTool;
20
+ //# sourceMappingURL=code-review.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-review.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/specialized/code-review.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAqE7C,eAAO,MAAM,cAAc,EAAE,WAwE5B,CAAC"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * KemdiCode MCP Server
3
+ * Copyright (C) 2025-2026 Kemdi Sp. z o.o.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+ import { z } from 'zod';
19
+ import { existsSync, readFileSync } from 'fs';
20
+ import { executeAI, parseFiles } from '../../ai/index.js';
21
+ import { getEnhancedContextString, getCurrentProjectRoot, } from '../../utils/projectContext.enhanced.js';
22
+ import { detectLanguage, detectLanguageFromExtension } from '../../utils/languageDetection.js';
23
+ import { recordSuggestion } from '../../context/feedback-loop.js';
24
+ const FOCUS_PROMPTS = {
25
+ security: `**FOCUS: SECURITY** - SQL Injection, XSS, CSRF, auth bypass, hardcoded secrets, OWASP Top 10`,
26
+ performance: `**FOCUS: PERFORMANCE** - N+1 queries, missing cache, inefficient loops, memory leaks`,
27
+ quality: `**FOCUS: QUALITY** - SOLID violations, duplication, complex methods, missing error handling`,
28
+ all: `**COMPREHENSIVE** - Security + Performance + Quality + Best Practices`,
29
+ };
30
+ const schema = z.object({
31
+ files: z.string().describe('Files to review (use @path/file syntax)'),
32
+ focus: z.enum(['security', 'performance', 'quality', 'all']).default('all'),
33
+ severity: z.enum(['critical', 'all']).default('all').describe('critical = only urgent issues'),
34
+ concise: z.boolean().default(false).describe('Short descriptions, no verbose explanations'),
35
+ withDeps: z.boolean().default(false).describe('Analyze dependencies (imports, DI)'),
36
+ continueSession: z.boolean().default(false).describe('Continue last session'),
37
+ });
38
+ /**
39
+ * Extract the first file path from files string
40
+ */
41
+ function extractFirstFile(filesStr) {
42
+ // Match @path/to/file.ext pattern
43
+ const match = filesStr.match(/@([^\s@]+)/);
44
+ if (match) {
45
+ return match[1];
46
+ }
47
+ // Try plain path
48
+ const parts = filesStr.trim().split(/\s+/);
49
+ return parts[0]?.replace('@', '') || null;
50
+ }
51
+ /**
52
+ * Detect language from files - uses extension first, then ML for content
53
+ */
54
+ async function detectLanguageFromFiles(filesStr) {
55
+ const firstFile = extractFirstFile(filesStr);
56
+ if (!firstFile)
57
+ return 'text';
58
+ // Try extension-based detection first (fast)
59
+ const extResult = detectLanguageFromExtension(firstFile);
60
+ if (extResult) {
61
+ return extResult.syntaxHighlight;
62
+ }
63
+ // Try reading file content for ML detection
64
+ const projectRoot = getCurrentProjectRoot();
65
+ const fullPath = firstFile.startsWith('/') ? firstFile : `${projectRoot}/${firstFile}`;
66
+ if (existsSync(fullPath)) {
67
+ try {
68
+ const content = readFileSync(fullPath, 'utf-8').slice(0, 10000); // First 10KB
69
+ const result = await detectLanguage(firstFile, content);
70
+ return result.syntaxHighlight;
71
+ }
72
+ catch {
73
+ // Ignore read errors
74
+ }
75
+ }
76
+ return 'text';
77
+ }
78
+ export const codeReviewTool = {
79
+ name: 'code-review',
80
+ description: 'Security/performance/quality code review with optional dependency analysis',
81
+ zodSchema: schema,
82
+ prompt: { description: 'Code review for source files' },
83
+ execute: async (args, onProgress) => {
84
+ const { files, focus = 'all', severity = 'all', concise, withDeps, continueSession } = args;
85
+ if (!files?.toString().trim())
86
+ throw new Error('Files required. Use @path/file syntax.');
87
+ const filesStr = String(files);
88
+ // Auto-detect language using ML or extension
89
+ const codeBlockLang = await detectLanguageFromFiles(filesStr);
90
+ const prompt = `${getEnhancedContextString()}
91
+ # Code Review Request
92
+
93
+ ${FOCUS_PROMPTS[focus]}
94
+ ${severity === 'critical' ? '\n**CRITICAL ONLY** - Report only issues requiring immediate fix.' : ''}
95
+ ${concise ? '\n**CONCISE MODE** - Short descriptions, direct fixes only.' : ''}
96
+ ${withDeps ? '\n**WITH DEPENDENCIES** - Analyze imported modules and their usage.' : ''}
97
+
98
+ ## Files
99
+ ${filesStr}
100
+
101
+ ## Output Format
102
+ ### [SEVERITY] Issue Title
103
+ **File:** \`path:LINE\`
104
+ **Category:** Security|Performance|Quality
105
+ **Problem:** Brief description
106
+ **Fix:**
107
+ \`\`\`${codeBlockLang}
108
+ // suggested fix
109
+ \`\`\`
110
+
111
+ ---
112
+
113
+ ## Summary
114
+ - Critical: X | Warning: Y | Info: Z
115
+
116
+ ## Priority Actions
117
+ 1. [action 1]
118
+ 2. [action 2]
119
+
120
+ Begin review:`;
121
+ onProgress?.(`Code review (${focus}) for: ${filesStr}`);
122
+ const result = await executeAI({
123
+ prompt,
124
+ agent: 'plan',
125
+ files: parseFiles(filesStr),
126
+ continueSession: Boolean(continueSession),
127
+ onProgress,
128
+ });
129
+ // Record suggestions for feedback tracking
130
+ const parsedFiles = parseFiles(filesStr);
131
+ for (const file of parsedFiles) {
132
+ recordSuggestion('code-review', file, 'review', `Code review (${focus}) - ${severity === 'critical' ? 'critical issues' : 'all issues'}`, result.slice(0, 500) // First 500 chars as snippet
133
+ ).catch(() => {
134
+ /* ignore errors */
135
+ });
136
+ }
137
+ return result;
138
+ },
139
+ };
140
+ //# sourceMappingURL=code-review.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-review.tool.js","sourceRoot":"","sources":["../../../src/tools/specialized/code-review.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,aAAa,GAA2B;IAC5C,QAAQ,EAAE,8FAA8F;IACxG,WAAW,EAAE,sFAAsF;IACnG,OAAO,EAAE,6FAA6F;IACtG,GAAG,EAAE,uEAAuE;CAC7E,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IACrE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAC3E,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC9F,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC3F,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAA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