@mastra/code-sdk 0.0.0-client-tool-results-20260912062135

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 (594) hide show
  1. package/LICENSE.md +32 -0
  2. package/README.md +37 -0
  3. package/dist/acp/agent.d.ts +35 -0
  4. package/dist/acp/agent.d.ts.map +1 -0
  5. package/dist/acp/agent.js +161 -0
  6. package/dist/acp/agent.js.map +1 -0
  7. package/dist/acp/event-mapper.d.ts +22 -0
  8. package/dist/acp/event-mapper.d.ts.map +1 -0
  9. package/dist/acp/event-mapper.js +214 -0
  10. package/dist/acp/event-mapper.js.map +1 -0
  11. package/dist/acp/index.d.ts +8 -0
  12. package/dist/acp/index.d.ts.map +1 -0
  13. package/dist/acp/index.js +65 -0
  14. package/dist/acp/index.js.map +1 -0
  15. package/dist/acp/server.d.ts +7 -0
  16. package/dist/acp/server.d.ts.map +1 -0
  17. package/dist/acp/server.js +35 -0
  18. package/dist/acp/server.js.map +1 -0
  19. package/dist/acp.d.ts +2 -0
  20. package/dist/acp.d.ts.map +1 -0
  21. package/dist/acp.js +2 -0
  22. package/dist/agents/context-audit.d.ts +84 -0
  23. package/dist/agents/context-audit.d.ts.map +1 -0
  24. package/dist/agents/context-audit.js +118 -0
  25. package/dist/agents/context-audit.js.map +1 -0
  26. package/dist/agents/credential-resolver.d.ts +63 -0
  27. package/dist/agents/credential-resolver.d.ts.map +1 -0
  28. package/dist/agents/credential-resolver.js +97 -0
  29. package/dist/agents/credential-resolver.js.map +1 -0
  30. package/dist/agents/custom-provider-source.d.ts +35 -0
  31. package/dist/agents/custom-provider-source.d.ts.map +1 -0
  32. package/dist/agents/custom-provider-source.js +25 -0
  33. package/dist/agents/custom-provider-source.js.map +1 -0
  34. package/dist/agents/instructions.d.ts +29 -0
  35. package/dist/agents/instructions.d.ts.map +1 -0
  36. package/dist/agents/instructions.js +58 -0
  37. package/dist/agents/instructions.js.map +1 -0
  38. package/dist/agents/mastracode-gateway.d.ts +74 -0
  39. package/dist/agents/mastracode-gateway.d.ts.map +1 -0
  40. package/dist/agents/mastracode-gateway.js +431 -0
  41. package/dist/agents/mastracode-gateway.js.map +1 -0
  42. package/dist/agents/memory.d.ts +30 -0
  43. package/dist/agents/memory.d.ts.map +1 -0
  44. package/dist/agents/memory.js +171 -0
  45. package/dist/agents/memory.js.map +1 -0
  46. package/dist/agents/model.d.ts +81 -0
  47. package/dist/agents/model.d.ts.map +1 -0
  48. package/dist/agents/model.js +155 -0
  49. package/dist/agents/model.js.map +1 -0
  50. package/dist/agents/modes/build.d.ts +10 -0
  51. package/dist/agents/modes/build.d.ts.map +1 -0
  52. package/dist/agents/modes/build.js +49 -0
  53. package/dist/agents/modes/build.js.map +1 -0
  54. package/dist/agents/modes/explore.d.ts +10 -0
  55. package/dist/agents/modes/explore.d.ts.map +1 -0
  56. package/dist/agents/modes/explore.js +42 -0
  57. package/dist/agents/modes/explore.js.map +1 -0
  58. package/dist/agents/modes/plan.d.ts +6 -0
  59. package/dist/agents/modes/plan.d.ts.map +1 -0
  60. package/dist/agents/modes/plan.js +42 -0
  61. package/dist/agents/modes/plan.js.map +1 -0
  62. package/dist/agents/prompts/agent-instructions.d.ts +70 -0
  63. package/dist/agents/prompts/agent-instructions.d.ts.map +1 -0
  64. package/dist/agents/prompts/agent-instructions.js +211 -0
  65. package/dist/agents/prompts/agent-instructions.js.map +1 -0
  66. package/dist/agents/prompts/build.d.ts +12 -0
  67. package/dist/agents/prompts/build.d.ts.map +1 -0
  68. package/dist/agents/prompts/build.js +76 -0
  69. package/dist/agents/prompts/build.js.map +1 -0
  70. package/dist/agents/prompts/fast.d.ts +5 -0
  71. package/dist/agents/prompts/fast.d.ts.map +1 -0
  72. package/dist/agents/prompts/fast.js +26 -0
  73. package/dist/agents/prompts/fast.js.map +1 -0
  74. package/dist/agents/prompts/index.d.ts +50 -0
  75. package/dist/agents/prompts/index.d.ts.map +1 -0
  76. package/dist/agents/prompts/index.js +119 -0
  77. package/dist/agents/prompts/index.js.map +1 -0
  78. package/dist/agents/prompts/model.d.ts +5 -0
  79. package/dist/agents/prompts/model.d.ts.map +1 -0
  80. package/dist/agents/prompts/model.js +23 -0
  81. package/dist/agents/prompts/model.js.map +1 -0
  82. package/dist/agents/prompts/plan.d.ts +6 -0
  83. package/dist/agents/prompts/plan.d.ts.map +1 -0
  84. package/dist/agents/prompts/plan.js +111 -0
  85. package/dist/agents/prompts/plan.js.map +1 -0
  86. package/dist/agents/prompts/tool-guidance.d.ts +18 -0
  87. package/dist/agents/prompts/tool-guidance.d.ts.map +1 -0
  88. package/dist/agents/prompts/tool-guidance.js +180 -0
  89. package/dist/agents/prompts/tool-guidance.js.map +1 -0
  90. package/dist/agents/sandbox-filesystem.d.ts +117 -0
  91. package/dist/agents/sandbox-filesystem.d.ts.map +1 -0
  92. package/dist/agents/sandbox-filesystem.js +356 -0
  93. package/dist/agents/sandbox-filesystem.js.map +1 -0
  94. package/dist/agents/subagents/execute.d.ts +3 -0
  95. package/dist/agents/subagents/execute.d.ts.map +1 -0
  96. package/dist/agents/subagents/execute.js +27 -0
  97. package/dist/agents/subagents/execute.js.map +1 -0
  98. package/dist/agents/subagents/explore.d.ts +3 -0
  99. package/dist/agents/subagents/explore.d.ts.map +1 -0
  100. package/dist/agents/subagents/explore.js +18 -0
  101. package/dist/agents/subagents/explore.js.map +1 -0
  102. package/dist/agents/subagents/plan.d.ts +3 -0
  103. package/dist/agents/subagents/plan.d.ts.map +1 -0
  104. package/dist/agents/subagents/plan.js +18 -0
  105. package/dist/agents/subagents/plan.js.map +1 -0
  106. package/dist/agents/thread-caveman-state.d.ts +17 -0
  107. package/dist/agents/thread-caveman-state.d.ts.map +1 -0
  108. package/dist/agents/thread-caveman-state.js +107 -0
  109. package/dist/agents/thread-caveman-state.js.map +1 -0
  110. package/dist/agents/tool-availability.d.ts +10 -0
  111. package/dist/agents/tool-availability.d.ts.map +1 -0
  112. package/dist/agents/tool-availability.js +96 -0
  113. package/dist/agents/tool-availability.js.map +1 -0
  114. package/dist/agents/tools.d.ts +36 -0
  115. package/dist/agents/tools.d.ts.map +1 -0
  116. package/dist/agents/tools.js +117 -0
  117. package/dist/agents/tools.js.map +1 -0
  118. package/dist/agents/workflow-builder-agent.d.ts +2 -0
  119. package/dist/agents/workflow-builder-agent.d.ts.map +1 -0
  120. package/dist/agents/workflow-builder-agent.js +80 -0
  121. package/dist/agents/workflow-builder-agent.js.map +1 -0
  122. package/dist/agents/workspace.d.ts +32 -0
  123. package/dist/agents/workspace.d.ts.map +1 -0
  124. package/dist/agents/workspace.js +208 -0
  125. package/dist/agents/workspace.js.map +1 -0
  126. package/dist/analytics.d.ts +18 -0
  127. package/dist/analytics.d.ts.map +1 -0
  128. package/dist/analytics.js +163 -0
  129. package/dist/analytics.js.map +1 -0
  130. package/dist/auth/authorization-input.d.ts +16 -0
  131. package/dist/auth/authorization-input.d.ts.map +1 -0
  132. package/dist/auth/authorization-input.js +42 -0
  133. package/dist/auth/authorization-input.js.map +1 -0
  134. package/dist/auth/device-code.d.ts +93 -0
  135. package/dist/auth/device-code.d.ts.map +1 -0
  136. package/dist/auth/device-code.js +129 -0
  137. package/dist/auth/device-code.js.map +1 -0
  138. package/dist/auth/index.d.ts +12 -0
  139. package/dist/auth/index.d.ts.map +1 -0
  140. package/dist/auth/index.js +8 -0
  141. package/dist/auth/pkce.d.ts +13 -0
  142. package/dist/auth/pkce.d.ts.map +1 -0
  143. package/dist/auth/pkce.js +32 -0
  144. package/dist/auth/pkce.js.map +1 -0
  145. package/dist/auth/provider-auth-error.d.ts +12 -0
  146. package/dist/auth/provider-auth-error.d.ts.map +1 -0
  147. package/dist/auth/provider-auth-error.js +16 -0
  148. package/dist/auth/provider-auth-error.js.map +1 -0
  149. package/dist/auth/providers/anthropic.d.ts +40 -0
  150. package/dist/auth/providers/anthropic.d.ts.map +1 -0
  151. package/dist/auth/providers/anthropic.js +126 -0
  152. package/dist/auth/providers/anthropic.js.map +1 -0
  153. package/dist/auth/providers/github-copilot.d.ts +154 -0
  154. package/dist/auth/providers/github-copilot.d.ts.map +1 -0
  155. package/dist/auth/providers/github-copilot.js +340 -0
  156. package/dist/auth/providers/github-copilot.js.map +1 -0
  157. package/dist/auth/providers/kimi-coding.d.ts +38 -0
  158. package/dist/auth/providers/kimi-coding.d.ts.map +1 -0
  159. package/dist/auth/providers/kimi-coding.js +232 -0
  160. package/dist/auth/providers/kimi-coding.js.map +1 -0
  161. package/dist/auth/providers/openai-codex.d.ts +139 -0
  162. package/dist/auth/providers/openai-codex.d.ts.map +1 -0
  163. package/dist/auth/providers/openai-codex.js +519 -0
  164. package/dist/auth/providers/openai-codex.js.map +1 -0
  165. package/dist/auth/providers/xai.d.ts +64 -0
  166. package/dist/auth/providers/xai.d.ts.map +1 -0
  167. package/dist/auth/providers/xai.js +205 -0
  168. package/dist/auth/providers/xai.js.map +1 -0
  169. package/dist/auth/storage.d.ts +92 -0
  170. package/dist/auth/storage.d.ts.map +1 -0
  171. package/dist/auth/storage.js +211 -0
  172. package/dist/auth/storage.js.map +1 -0
  173. package/dist/auth/types.d.ts +89 -0
  174. package/dist/auth/types.d.ts.map +1 -0
  175. package/dist/auth/types.js +1 -0
  176. package/dist/clipboard/index.d.ts +26 -0
  177. package/dist/clipboard/index.d.ts.map +1 -0
  178. package/dist/clipboard/index.js +226 -0
  179. package/dist/clipboard/index.js.map +1 -0
  180. package/dist/constants.d.ts +10 -0
  181. package/dist/constants.d.ts.map +1 -0
  182. package/dist/constants.js +18 -0
  183. package/dist/constants.js.map +1 -0
  184. package/dist/error-classification.d.ts +10 -0
  185. package/dist/error-classification.d.ts.map +1 -0
  186. package/dist/error-classification.js +22 -0
  187. package/dist/error-classification.js.map +1 -0
  188. package/dist/evals/context-builder.d.ts +41 -0
  189. package/dist/evals/context-builder.d.ts.map +1 -0
  190. package/dist/evals/context-builder.js +161 -0
  191. package/dist/evals/context-builder.js.map +1 -0
  192. package/dist/evals/index.d.ts +4 -0
  193. package/dist/evals/index.d.ts.map +1 -0
  194. package/dist/evals/index.js +5 -0
  195. package/dist/evals/scorers/classify-command.d.ts +31 -0
  196. package/dist/evals/scorers/classify-command.d.ts.map +1 -0
  197. package/dist/evals/scorers/classify-command.js +73 -0
  198. package/dist/evals/scorers/classify-command.js.map +1 -0
  199. package/dist/evals/scorers/efficiency.d.ts +44 -0
  200. package/dist/evals/scorers/efficiency.d.ts.map +1 -0
  201. package/dist/evals/scorers/efficiency.js +259 -0
  202. package/dist/evals/scorers/efficiency.js.map +1 -0
  203. package/dist/evals/scorers/extract-tools.d.ts +25 -0
  204. package/dist/evals/scorers/extract-tools.d.ts.map +1 -0
  205. package/dist/evals/scorers/extract-tools.js +60 -0
  206. package/dist/evals/scorers/extract-tools.js.map +1 -0
  207. package/dist/evals/scorers/index.d.ts +3 -0
  208. package/dist/evals/scorers/index.d.ts.map +1 -0
  209. package/dist/evals/scorers/index.js +3 -0
  210. package/dist/evals/scorers/outcome.d.ts +49 -0
  211. package/dist/evals/scorers/outcome.d.ts.map +1 -0
  212. package/dist/evals/scorers/outcome.js +347 -0
  213. package/dist/evals/scorers/outcome.js.map +1 -0
  214. package/dist/goal-manager.d.ts +78 -0
  215. package/dist/goal-manager.d.ts.map +1 -0
  216. package/dist/goal-manager.js +273 -0
  217. package/dist/goal-manager.js.map +1 -0
  218. package/dist/goal-signal.d.ts +14 -0
  219. package/dist/goal-signal.d.ts.map +1 -0
  220. package/dist/goal-signal.js +17 -0
  221. package/dist/goal-signal.js.map +1 -0
  222. package/dist/headless/cli.d.ts +42 -0
  223. package/dist/headless/cli.d.ts.map +1 -0
  224. package/dist/headless/cli.js +209 -0
  225. package/dist/headless/cli.js.map +1 -0
  226. package/dist/headless/flags.d.ts +33 -0
  227. package/dist/headless/flags.d.ts.map +1 -0
  228. package/dist/headless/flags.js +190 -0
  229. package/dist/headless/flags.js.map +1 -0
  230. package/dist/headless/format.d.ts +38 -0
  231. package/dist/headless/format.d.ts.map +1 -0
  232. package/dist/headless/format.js +89 -0
  233. package/dist/headless/format.js.map +1 -0
  234. package/dist/headless/index.d.ts +25 -0
  235. package/dist/headless/index.d.ts.map +1 -0
  236. package/dist/headless/index.js +6 -0
  237. package/dist/headless/policy.d.ts +17 -0
  238. package/dist/headless/policy.d.ts.map +1 -0
  239. package/dist/headless/policy.js +42 -0
  240. package/dist/headless/policy.js.map +1 -0
  241. package/dist/headless/run-mc.d.ts +7 -0
  242. package/dist/headless/run-mc.d.ts.map +1 -0
  243. package/dist/headless/run-mc.js +346 -0
  244. package/dist/headless/run-mc.js.map +1 -0
  245. package/dist/headless/types.d.ts +158 -0
  246. package/dist/headless/types.d.ts.map +1 -0
  247. package/dist/headless/types.js +19 -0
  248. package/dist/headless/types.js.map +1 -0
  249. package/dist/hooks/config.d.ts +11 -0
  250. package/dist/hooks/config.d.ts.map +1 -0
  251. package/dist/hooks/config.js +73 -0
  252. package/dist/hooks/config.js.map +1 -0
  253. package/dist/hooks/executor.d.ts +13 -0
  254. package/dist/hooks/executor.d.ts.map +1 -0
  255. package/dist/hooks/executor.js +129 -0
  256. package/dist/hooks/executor.js.map +1 -0
  257. package/dist/hooks/index.d.ts +6 -0
  258. package/dist/hooks/index.d.ts.map +1 -0
  259. package/dist/hooks/index.js +5 -0
  260. package/dist/hooks/manager.d.ts +54 -0
  261. package/dist/hooks/manager.d.ts.map +1 -0
  262. package/dist/hooks/manager.js +241 -0
  263. package/dist/hooks/manager.js.map +1 -0
  264. package/dist/hooks/types.d.ts +172 -0
  265. package/dist/hooks/types.d.ts.map +1 -0
  266. package/dist/hooks/types.js +8 -0
  267. package/dist/hooks/types.js.map +1 -0
  268. package/dist/index.d.ts +341 -0
  269. package/dist/index.d.ts.map +1 -0
  270. package/dist/index.js +919 -0
  271. package/dist/index.js.map +1 -0
  272. package/dist/ipc/ipc-reporter.d.ts +14 -0
  273. package/dist/ipc/ipc-reporter.d.ts.map +1 -0
  274. package/dist/ipc/ipc-reporter.js +21 -0
  275. package/dist/ipc/ipc-reporter.js.map +1 -0
  276. package/dist/knowledge-inspector.d.ts +119 -0
  277. package/dist/knowledge-inspector.d.ts.map +1 -0
  278. package/dist/knowledge-inspector.js +508 -0
  279. package/dist/knowledge-inspector.js.map +1 -0
  280. package/dist/knowledge-scope.d.ts +35 -0
  281. package/dist/knowledge-scope.d.ts.map +1 -0
  282. package/dist/knowledge-scope.js +47 -0
  283. package/dist/knowledge-scope.js.map +1 -0
  284. package/dist/lsp/client.d.ts +56 -0
  285. package/dist/lsp/client.d.ts.map +1 -0
  286. package/dist/lsp/client.js +251 -0
  287. package/dist/lsp/client.js.map +1 -0
  288. package/dist/lsp/index.d.ts +4 -0
  289. package/dist/lsp/index.d.ts.map +1 -0
  290. package/dist/lsp/index.js +4 -0
  291. package/dist/lsp/language.d.ts +9 -0
  292. package/dist/lsp/language.d.ts.map +1 -0
  293. package/dist/lsp/language.js +44 -0
  294. package/dist/lsp/language.js.map +1 -0
  295. package/dist/lsp/manager.d.ts +34 -0
  296. package/dist/lsp/manager.d.ts.map +1 -0
  297. package/dist/lsp/manager.js +82 -0
  298. package/dist/lsp/manager.js.map +1 -0
  299. package/dist/lsp/server.d.ts +27 -0
  300. package/dist/lsp/server.d.ts.map +1 -0
  301. package/dist/lsp/server.js +159 -0
  302. package/dist/lsp/server.js.map +1 -0
  303. package/dist/lsp/workspace.d.ts +9 -0
  304. package/dist/lsp/workspace.d.ts.map +1 -0
  305. package/dist/lsp/workspace.js +55 -0
  306. package/dist/lsp/workspace.js.map +1 -0
  307. package/dist/mcp/config.d.ts +62 -0
  308. package/dist/mcp/config.d.ts.map +1 -0
  309. package/dist/mcp/config.js +301 -0
  310. package/dist/mcp/config.js.map +1 -0
  311. package/dist/mcp/index.d.ts +6 -0
  312. package/dist/mcp/index.d.ts.map +1 -0
  313. package/dist/mcp/index.js +3 -0
  314. package/dist/mcp/manager.d.ts +101 -0
  315. package/dist/mcp/manager.d.ts.map +1 -0
  316. package/dist/mcp/manager.js +644 -0
  317. package/dist/mcp/manager.js.map +1 -0
  318. package/dist/mcp/state.d.ts +35 -0
  319. package/dist/mcp/state.d.ts.map +1 -0
  320. package/dist/mcp/state.js +97 -0
  321. package/dist/mcp/state.js.map +1 -0
  322. package/dist/mcp/types.d.ts +125 -0
  323. package/dist/mcp/types.d.ts.map +1 -0
  324. package/dist/mcp/types.js +1 -0
  325. package/dist/onboarding/custom-packs.d.ts +7 -0
  326. package/dist/onboarding/custom-packs.d.ts.map +1 -0
  327. package/dist/onboarding/custom-packs.js +17 -0
  328. package/dist/onboarding/custom-packs.js.map +1 -0
  329. package/dist/onboarding/custom-providers.d.ts +4 -0
  330. package/dist/onboarding/custom-providers.d.ts.map +1 -0
  331. package/dist/onboarding/custom-providers.js +30 -0
  332. package/dist/onboarding/custom-providers.js.map +1 -0
  333. package/dist/onboarding/index.d.ts +5 -0
  334. package/dist/onboarding/index.d.ts.map +1 -0
  335. package/dist/onboarding/index.js +3 -0
  336. package/dist/onboarding/om-settings.d.ts +25 -0
  337. package/dist/onboarding/om-settings.d.ts.map +1 -0
  338. package/dist/onboarding/om-settings.js +47 -0
  339. package/dist/onboarding/om-settings.js.map +1 -0
  340. package/dist/onboarding/packs.d.ts +49 -0
  341. package/dist/onboarding/packs.d.ts.map +1 -0
  342. package/dist/onboarding/packs.js +182 -0
  343. package/dist/onboarding/packs.js.map +1 -0
  344. package/dist/onboarding/settings.d.ts +438 -0
  345. package/dist/onboarding/settings.d.ts.map +1 -0
  346. package/dist/onboarding/settings.js +847 -0
  347. package/dist/onboarding/settings.js.map +1 -0
  348. package/dist/permissions.d.ts +55 -0
  349. package/dist/permissions.d.ts.map +1 -0
  350. package/dist/permissions.js +137 -0
  351. package/dist/permissions.js.map +1 -0
  352. package/dist/plugin.d.ts +144 -0
  353. package/dist/plugin.d.ts.map +1 -0
  354. package/dist/plugin.js +30 -0
  355. package/dist/plugin.js.map +1 -0
  356. package/dist/plugins/dependencies.d.ts +9 -0
  357. package/dist/plugins/dependencies.d.ts.map +1 -0
  358. package/dist/plugins/dependencies.js +88 -0
  359. package/dist/plugins/dependencies.js.map +1 -0
  360. package/dist/plugins/install.d.ts +21 -0
  361. package/dist/plugins/install.d.ts.map +1 -0
  362. package/dist/plugins/install.js +190 -0
  363. package/dist/plugins/install.js.map +1 -0
  364. package/dist/plugins/loader.d.ts +19 -0
  365. package/dist/plugins/loader.d.ts.map +1 -0
  366. package/dist/plugins/loader.js +258 -0
  367. package/dist/plugins/loader.js.map +1 -0
  368. package/dist/plugins/manager.d.ts +98 -0
  369. package/dist/plugins/manager.d.ts.map +1 -0
  370. package/dist/plugins/manager.js +456 -0
  371. package/dist/plugins/manager.js.map +1 -0
  372. package/dist/plugins/manifest.d.ts +14 -0
  373. package/dist/plugins/manifest.d.ts.map +1 -0
  374. package/dist/plugins/manifest.js +50 -0
  375. package/dist/plugins/manifest.js.map +1 -0
  376. package/dist/plugins/package-link.d.ts +3 -0
  377. package/dist/plugins/package-link.d.ts.map +1 -0
  378. package/dist/plugins/package-link.js +61 -0
  379. package/dist/plugins/package-link.js.map +1 -0
  380. package/dist/plugins/paths.d.ts +10 -0
  381. package/dist/plugins/paths.d.ts.map +1 -0
  382. package/dist/plugins/paths.js +25 -0
  383. package/dist/plugins/paths.js.map +1 -0
  384. package/dist/plugins/registry.d.ts +8 -0
  385. package/dist/plugins/registry.d.ts.map +1 -0
  386. package/dist/plugins/registry.js +112 -0
  387. package/dist/plugins/registry.js.map +1 -0
  388. package/dist/plugins/scaffold.d.ts +10 -0
  389. package/dist/plugins/scaffold.d.ts.map +1 -0
  390. package/dist/plugins/scaffold.js +116 -0
  391. package/dist/plugins/scaffold.js.map +1 -0
  392. package/dist/plugins/signal-lane.d.ts +58 -0
  393. package/dist/plugins/signal-lane.d.ts.map +1 -0
  394. package/dist/plugins/signal-lane.js +166 -0
  395. package/dist/plugins/signal-lane.js.map +1 -0
  396. package/dist/plugins/types.d.ts +81 -0
  397. package/dist/plugins/types.d.ts.map +1 -0
  398. package/dist/plugins/types.js +1 -0
  399. package/dist/process-memory-diagnostics.d.ts +135 -0
  400. package/dist/process-memory-diagnostics.d.ts.map +1 -0
  401. package/dist/process-memory-diagnostics.js +500 -0
  402. package/dist/process-memory-diagnostics.js.map +1 -0
  403. package/dist/processors/plan-rejection-abort.d.ts +12 -0
  404. package/dist/processors/plan-rejection-abort.d.ts.map +1 -0
  405. package/dist/processors/plan-rejection-abort.js +54 -0
  406. package/dist/processors/plan-rejection-abort.js.map +1 -0
  407. package/dist/providers/amazon-bedrock-gateway.d.ts +47 -0
  408. package/dist/providers/amazon-bedrock-gateway.d.ts.map +1 -0
  409. package/dist/providers/amazon-bedrock-gateway.js +153 -0
  410. package/dist/providers/amazon-bedrock-gateway.js.map +1 -0
  411. package/dist/providers/amazon-bedrock.d.ts +28 -0
  412. package/dist/providers/amazon-bedrock.d.ts.map +1 -0
  413. package/dist/providers/amazon-bedrock.js +102 -0
  414. package/dist/providers/amazon-bedrock.js.map +1 -0
  415. package/dist/providers/claude-max.d.ts +65 -0
  416. package/dist/providers/claude-max.d.ts.map +1 -0
  417. package/dist/providers/claude-max.js +252 -0
  418. package/dist/providers/claude-max.js.map +1 -0
  419. package/dist/providers/github-copilot.d.ts +60 -0
  420. package/dist/providers/github-copilot.d.ts.map +1 -0
  421. package/dist/providers/github-copilot.js +266 -0
  422. package/dist/providers/github-copilot.js.map +1 -0
  423. package/dist/providers/kimi-coding.d.ts +15 -0
  424. package/dist/providers/kimi-coding.d.ts.map +1 -0
  425. package/dist/providers/kimi-coding.js +69 -0
  426. package/dist/providers/kimi-coding.js.map +1 -0
  427. package/dist/providers/openai-codex.d.ts +73 -0
  428. package/dist/providers/openai-codex.d.ts.map +1 -0
  429. package/dist/providers/openai-codex.js +306 -0
  430. package/dist/providers/openai-codex.js.map +1 -0
  431. package/dist/providers/xai.d.ts +33 -0
  432. package/dist/providers/xai.d.ts.map +1 -0
  433. package/dist/providers/xai.js +71 -0
  434. package/dist/providers/xai.js.map +1 -0
  435. package/dist/schema.d.ts +200 -0
  436. package/dist/schema.d.ts.map +1 -0
  437. package/dist/schema.js +92 -0
  438. package/dist/schema.js.map +1 -0
  439. package/dist/theme-palette.d.ts +17 -0
  440. package/dist/theme-palette.d.ts.map +1 -0
  441. package/dist/theme-palette.js +21 -0
  442. package/dist/theme-palette.js.map +1 -0
  443. package/dist/thinking.d.ts +33 -0
  444. package/dist/thinking.d.ts.map +1 -0
  445. package/dist/thinking.js +58 -0
  446. package/dist/thinking.js.map +1 -0
  447. package/dist/tool-names.d.ts +73 -0
  448. package/dist/tool-names.d.ts.map +1 -0
  449. package/dist/tool-names.js +52 -0
  450. package/dist/tool-names.js.map +1 -0
  451. package/dist/tools/index.d.ts +6 -0
  452. package/dist/tools/index.d.ts.map +1 -0
  453. package/dist/tools/index.js +3 -0
  454. package/dist/tools/request-sandbox-access.d.ts +6 -0
  455. package/dist/tools/request-sandbox-access.d.ts.map +1 -0
  456. package/dist/tools/request-sandbox-access.js +79 -0
  457. package/dist/tools/request-sandbox-access.js.map +1 -0
  458. package/dist/tools/utils.d.ts +20 -0
  459. package/dist/tools/utils.d.ts.map +1 -0
  460. package/dist/tools/utils.js +32 -0
  461. package/dist/tools/utils.js.map +1 -0
  462. package/dist/tools/web-search.d.ts +114 -0
  463. package/dist/tools/web-search.d.ts.map +1 -0
  464. package/dist/tools/web-search.js +155 -0
  465. package/dist/tools/web-search.js.map +1 -0
  466. package/dist/tools/workflows/create-workflow.d.ts +7 -0
  467. package/dist/tools/workflows/create-workflow.d.ts.map +1 -0
  468. package/dist/tools/workflows/create-workflow.js +81 -0
  469. package/dist/tools/workflows/create-workflow.js.map +1 -0
  470. package/dist/tools/workflows/delete-workflow.d.ts +7 -0
  471. package/dist/tools/workflows/delete-workflow.d.ts.map +1 -0
  472. package/dist/tools/workflows/delete-workflow.js +21 -0
  473. package/dist/tools/workflows/delete-workflow.js.map +1 -0
  474. package/dist/tools/workflows/ephemeral-memory.d.ts +7 -0
  475. package/dist/tools/workflows/ephemeral-memory.d.ts.map +1 -0
  476. package/dist/tools/workflows/ephemeral-memory.js +45 -0
  477. package/dist/tools/workflows/ephemeral-memory.js.map +1 -0
  478. package/dist/tools/workflows/extract-json-schema.d.ts +12 -0
  479. package/dist/tools/workflows/extract-json-schema.d.ts.map +1 -0
  480. package/dist/tools/workflows/extract-json-schema.js +22 -0
  481. package/dist/tools/workflows/extract-json-schema.js.map +1 -0
  482. package/dist/tools/workflows/get-workflow.d.ts +11 -0
  483. package/dist/tools/workflows/get-workflow.d.ts.map +1 -0
  484. package/dist/tools/workflows/get-workflow.js +34 -0
  485. package/dist/tools/workflows/get-workflow.js.map +1 -0
  486. package/dist/tools/workflows/list-available-agents.d.ts +8 -0
  487. package/dist/tools/workflows/list-available-agents.d.ts.map +1 -0
  488. package/dist/tools/workflows/list-available-agents.js +32 -0
  489. package/dist/tools/workflows/list-available-agents.js.map +1 -0
  490. package/dist/tools/workflows/list-available-tools.d.ts +9 -0
  491. package/dist/tools/workflows/list-available-tools.d.ts.map +1 -0
  492. package/dist/tools/workflows/list-available-tools.js +40 -0
  493. package/dist/tools/workflows/list-available-tools.js.map +1 -0
  494. package/dist/tools/workflows/list-available-workflows.d.ts +9 -0
  495. package/dist/tools/workflows/list-available-workflows.d.ts.map +1 -0
  496. package/dist/tools/workflows/list-available-workflows.js +32 -0
  497. package/dist/tools/workflows/list-available-workflows.js.map +1 -0
  498. package/dist/tools/workflows/list-workflows.d.ts +9 -0
  499. package/dist/tools/workflows/list-workflows.d.ts.map +1 -0
  500. package/dist/tools/workflows/list-workflows.js +33 -0
  501. package/dist/tools/workflows/list-workflows.js.map +1 -0
  502. package/dist/tools/workflows/run-workflow.d.ts +9 -0
  503. package/dist/tools/workflows/run-workflow.d.ts.map +1 -0
  504. package/dist/tools/workflows/run-workflow.js +52 -0
  505. package/dist/tools/workflows/run-workflow.js.map +1 -0
  506. package/dist/tools/workflows/save-workflow.d.ts +1015 -0
  507. package/dist/tools/workflows/save-workflow.d.ts.map +1 -0
  508. package/dist/tools/workflows/save-workflow.js +28 -0
  509. package/dist/tools/workflows/save-workflow.js.map +1 -0
  510. package/dist/tools/workflows/tool-ids.d.ts +15 -0
  511. package/dist/tools/workflows/tool-ids.d.ts.map +1 -0
  512. package/dist/tools/workflows/tool-ids.js +19 -0
  513. package/dist/tools/workflows/tool-ids.js.map +1 -0
  514. package/dist/utils/binaries.d.ts +7 -0
  515. package/dist/utils/binaries.d.ts.map +1 -0
  516. package/dist/utils/binaries.js +78 -0
  517. package/dist/utils/binaries.js.map +1 -0
  518. package/dist/utils/debug-log.d.ts +12 -0
  519. package/dist/utils/debug-log.d.ts.map +1 -0
  520. package/dist/utils/debug-log.js +59 -0
  521. package/dist/utils/debug-log.js.map +1 -0
  522. package/dist/utils/errors.d.ts +36 -0
  523. package/dist/utils/errors.d.ts.map +1 -0
  524. package/dist/utils/errors.js +196 -0
  525. package/dist/utils/errors.js.map +1 -0
  526. package/dist/utils/gateway-sync.d.ts +26 -0
  527. package/dist/utils/gateway-sync.d.ts.map +1 -0
  528. package/dist/utils/gateway-sync.js +61 -0
  529. package/dist/utils/gateway-sync.js.map +1 -0
  530. package/dist/utils/path-security.d.ts +2 -0
  531. package/dist/utils/path-security.d.ts.map +1 -0
  532. package/dist/utils/path-security.js +10 -0
  533. package/dist/utils/path-security.js.map +1 -0
  534. package/dist/utils/plan-diff.d.ts +25 -0
  535. package/dist/utils/plan-diff.d.ts.map +1 -0
  536. package/dist/utils/plan-diff.js +62 -0
  537. package/dist/utils/plan-diff.js.map +1 -0
  538. package/dist/utils/plans.d.ts +59 -0
  539. package/dist/utils/plans.d.ts.map +1 -0
  540. package/dist/utils/plans.js +117 -0
  541. package/dist/utils/plans.js.map +1 -0
  542. package/dist/utils/project.d.ts +160 -0
  543. package/dist/utils/project.d.ts.map +1 -0
  544. package/dist/utils/project.js +364 -0
  545. package/dist/utils/project.js.map +1 -0
  546. package/dist/utils/signals-pubsub.d.ts +41 -0
  547. package/dist/utils/signals-pubsub.d.ts.map +1 -0
  548. package/dist/utils/signals-pubsub.js +122 -0
  549. package/dist/utils/signals-pubsub.js.map +1 -0
  550. package/dist/utils/slash-command-loader.d.ts +52 -0
  551. package/dist/utils/slash-command-loader.d.ts.map +1 -0
  552. package/dist/utils/slash-command-loader.js +142 -0
  553. package/dist/utils/slash-command-loader.js.map +1 -0
  554. package/dist/utils/slash-command-processor.d.ts +14 -0
  555. package/dist/utils/slash-command-processor.d.ts.map +1 -0
  556. package/dist/utils/slash-command-processor.js +109 -0
  557. package/dist/utils/slash-command-processor.js.map +1 -0
  558. package/dist/utils/stdin-pipe.d.ts +33 -0
  559. package/dist/utils/stdin-pipe.d.ts.map +1 -0
  560. package/dist/utils/stdin-pipe.js +96 -0
  561. package/dist/utils/stdin-pipe.js.map +1 -0
  562. package/dist/utils/storage-factory.d.ts +50 -0
  563. package/dist/utils/storage-factory.d.ts.map +1 -0
  564. package/dist/utils/storage-factory.js +121 -0
  565. package/dist/utils/storage-factory.js.map +1 -0
  566. package/dist/utils/storage-maintenance.d.ts +103 -0
  567. package/dist/utils/storage-maintenance.d.ts.map +1 -0
  568. package/dist/utils/storage-maintenance.js +274 -0
  569. package/dist/utils/storage-maintenance.js.map +1 -0
  570. package/dist/utils/thread-lock.d.ts +26 -0
  571. package/dist/utils/thread-lock.d.ts.map +1 -0
  572. package/dist/utils/thread-lock.js +112 -0
  573. package/dist/utils/thread-lock.js.map +1 -0
  574. package/dist/utils/token-estimator.d.ts +3 -0
  575. package/dist/utils/token-estimator.d.ts.map +1 -0
  576. package/dist/utils/token-estimator.js +21 -0
  577. package/dist/utils/token-estimator.js.map +1 -0
  578. package/dist/utils/update-check.d.ts +101 -0
  579. package/dist/utils/update-check.d.ts.map +1 -0
  580. package/dist/utils/update-check.js +383 -0
  581. package/dist/utils/update-check.js.map +1 -0
  582. package/dist/voice/stt-registry.d.ts +64 -0
  583. package/dist/voice/stt-registry.d.ts.map +1 -0
  584. package/dist/voice/stt-registry.js +144 -0
  585. package/dist/voice/stt-registry.js.map +1 -0
  586. package/dist/workflows/register-primitives.d.ts +52 -0
  587. package/dist/workflows/register-primitives.d.ts.map +1 -0
  588. package/dist/workflows/register-primitives.js +40 -0
  589. package/dist/workflows/register-primitives.js.map +1 -0
  590. package/dist/workflows/service.d.ts +64 -0
  591. package/dist/workflows/service.d.ts.map +1 -0
  592. package/dist/workflows/service.js +53 -0
  593. package/dist/workflows/service.js.map +1 -0
  594. package/package.json +97 -0
@@ -0,0 +1,47 @@
1
+ //#region src/knowledge-scope.ts
2
+ /**
3
+ * The organization rung local (TUI/studio) knowledge is curated under. A fixed
4
+ * literal on purpose: deriving it from a hostname, machine id, or path would
5
+ * fragment local knowledge per machine or checkout, and a user running several
6
+ * machines against one shared store could never share knowledge between them.
7
+ * Resolving a real org id (settings, /knowledge, login) is future work; when it
8
+ * lands, it replaces this default here.
9
+ */
10
+ const LOCAL_KNOWLEDGE_ORG_ID = "local";
11
+ /**
12
+ * The single source of truth for which org/resource rungs a session's knowledge
13
+ * lives under. Every reader and writer of the knowledge store (the subconscious
14
+ * memory factory, the /knowledge inspector) must derive its scope from here so
15
+ * that what curation writes is what the browser reads.
16
+ *
17
+ * - Factory seeds the authoritative org id into session state. There is no
18
+ * fallback: a session owner is a USER id, never an organization, so a
19
+ * Factory-owned session without an org resolves to nothing (fail closed).
20
+ * - Factory runs share one knowledge graph per project, so the resource rung is
21
+ * anchored on the project id.
22
+ * - TUI/studio sessions use {@link LOCAL_KNOWLEDGE_ORG_ID}.
23
+ */
24
+ function resolveKnowledgeScopeIdentity(state) {
25
+ const factoryProjectId = state?.factoryProjectId;
26
+ const isFactory = typeof factoryProjectId === "string" && factoryProjectId.trim().length > 0;
27
+ const factoryOrgId = state?.factoryOrgId;
28
+ const factoryOwned = isFactory || state?.factoryOrgUnresolved === true;
29
+ const organizationId = typeof factoryOrgId === "string" ? factoryOrgId.trim() : "";
30
+ if (organizationId) return {
31
+ resolved: true,
32
+ organizationId,
33
+ knowledgeResourceId: isFactory ? factoryProjectId : void 0
34
+ };
35
+ if (factoryOwned) return {
36
+ resolved: false,
37
+ knowledgeResourceId: isFactory ? factoryProjectId : void 0
38
+ };
39
+ return {
40
+ resolved: true,
41
+ organizationId: LOCAL_KNOWLEDGE_ORG_ID
42
+ };
43
+ }
44
+ //#endregion
45
+ export { LOCAL_KNOWLEDGE_ORG_ID, resolveKnowledgeScopeIdentity };
46
+
47
+ //# sourceMappingURL=knowledge-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge-scope.js","names":[],"sources":["../src/knowledge-scope.ts"],"sourcesContent":["import type { MastraCodeState } from './schema.js';\n\n/**\n * The organization rung local (TUI/studio) knowledge is curated under. A fixed\n * literal on purpose: deriving it from a hostname, machine id, or path would\n * fragment local knowledge per machine or checkout, and a user running several\n * machines against one shared store could never share knowledge between them.\n * Resolving a real org id (settings, /knowledge, login) is future work; when it\n * lands, it replaces this default here.\n */\nexport const LOCAL_KNOWLEDGE_ORG_ID = 'local';\n\nexport type KnowledgeScopeIdentity =\n | {\n resolved: true;\n organizationId: string;\n /** Set when the resource rung is anchored on something other than the session resource. */\n knowledgeResourceId?: string;\n }\n | { resolved: false; knowledgeResourceId?: string; reason?: string };\n\n/**\n * The single source of truth for which org/resource rungs a session's knowledge\n * lives under. Every reader and writer of the knowledge store (the subconscious\n * memory factory, the /knowledge inspector) must derive its scope from here so\n * that what curation writes is what the browser reads.\n *\n * - Factory seeds the authoritative org id into session state. There is no\n * fallback: a session owner is a USER id, never an organization, so a\n * Factory-owned session without an org resolves to nothing (fail closed).\n * - Factory runs share one knowledge graph per project, so the resource rung is\n * anchored on the project id.\n * - TUI/studio sessions use {@link LOCAL_KNOWLEDGE_ORG_ID}.\n */\nexport function resolveKnowledgeScopeIdentity(state: MastraCodeState | undefined): KnowledgeScopeIdentity {\n const factoryProjectId = state?.factoryProjectId;\n const isFactory = typeof factoryProjectId === 'string' && factoryProjectId.trim().length > 0;\n const factoryOrgId = state?.factoryOrgId;\n const factoryOwned = isFactory || state?.factoryOrgUnresolved === true;\n\n // Trimmed to match what the Factory org seeder stores; not every seam routes\n // its seed through it.\n const organizationId = typeof factoryOrgId === 'string' ? factoryOrgId.trim() : '';\n if (organizationId) {\n return {\n resolved: true,\n organizationId,\n knowledgeResourceId: isFactory ? factoryProjectId : undefined,\n };\n }\n if (factoryOwned) {\n return { resolved: false, knowledgeResourceId: isFactory ? factoryProjectId : undefined };\n }\n return { resolved: true, organizationId: LOCAL_KNOWLEDGE_ORG_ID };\n}\n"],"mappings":";;;;;;;;;AAUA,MAAa,yBAAyB;;;;;;;;;;;;;;AAwBtC,SAAgB,8BAA8B,OAA4D;CACxG,MAAM,mBAAmB,OAAO;CAChC,MAAM,YAAY,OAAO,qBAAqB,YAAY,iBAAiB,KAAK,CAAC,CAAC,SAAS;CAC3F,MAAM,eAAe,OAAO;CAC5B,MAAM,eAAe,aAAa,OAAO,yBAAyB;CAIlE,MAAM,iBAAiB,OAAO,iBAAiB,WAAW,aAAa,KAAK,IAAI;CAChF,IAAI,gBACF,OAAO;EACL,UAAU;EACV;EACA,qBAAqB,YAAY,mBAAmB,KAAA;CACtD;CAEF,IAAI,cACF,OAAO;EAAE,UAAU;EAAO,qBAAqB,YAAY,mBAAmB,KAAA;CAAU;CAE1F,OAAO;EAAE,UAAU;EAAM,gBAAgB;CAAuB;AAClE"}
@@ -0,0 +1,56 @@
1
+ import type { Diagnostic } from 'vscode-languageserver-protocol';
2
+ import type { LSPServerInfo } from './server.js';
3
+ /**
4
+ * LSP Client wrapper for JSON-RPC communication
5
+ */
6
+ export declare class LSPClient {
7
+ private connection;
8
+ private process;
9
+ private serverInfo;
10
+ private workspaceRoot;
11
+ private diagnostics;
12
+ private initializationOptions;
13
+ constructor(serverInfo: LSPServerInfo, workspaceRoot: string);
14
+ /**
15
+ * Initialize the LSP connection
16
+ */
17
+ initialize(): Promise<void>;
18
+ /**
19
+ * Notify the server that a document has been opened
20
+ */
21
+ notifyOpen(filePath: string, content: string, languageId: string): void;
22
+ /**
23
+ * Notify the server that a document has changed
24
+ */
25
+ notifyChange(filePath: string, content: string, version: number): void;
26
+ /**
27
+ * Wait for diagnostics to be available for a specific file
28
+ * @param waitForChange If true, waits for diagnostics to change from their initial state
29
+ */
30
+ waitForDiagnostics(filePath: string, timeoutMs?: number, waitForChange?: boolean): Promise<Diagnostic[]>;
31
+ /**
32
+ * Get hover information for a position
33
+ */
34
+ getHover(filePath: string, line: number, character: number): Promise<any>;
35
+ /**
36
+ * Get diagnostics for a specific file
37
+ */
38
+ getDiagnostics(filePath: string): Diagnostic[];
39
+ /**
40
+ * Get all diagnostics from all files
41
+ */
42
+ getAllDiagnostics(): Diagnostic[];
43
+ /**
44
+ * Notify server that a file was closed
45
+ */
46
+ notifyClose(filePath: string): void;
47
+ /**
48
+ * Restart the LSP client
49
+ */
50
+ restart(): Promise<void>;
51
+ /**
52
+ * Shutdown the connection
53
+ */
54
+ shutdown(): Promise<void>;
55
+ }
56
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/lsp/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;GAEG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAwC;IAC3D,OAAO,CAAC,qBAAqB,CAAa;gBAE9B,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM;IAK5D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAkLjC;;OAEG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAkBvE;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAYtE;;;OAGG;IACG,kBAAkB,CACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,MAAa,EACxB,aAAa,GAAE,OAAe,GAC7B,OAAO,CAAC,UAAU,EAAE,CAAC;IA+BxB;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAa/E;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE;IAK9C;;OAEG;IACH,iBAAiB,IAAI,UAAU,EAAE;IAQjC;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAcnC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAoChC"}
@@ -0,0 +1,251 @@
1
+ import { StreamMessageReader, StreamMessageWriter, createMessageConnection } from "vscode-jsonrpc/node.js";
2
+ import { Position, TextDocumentIdentifier } from "vscode-languageserver-protocol";
3
+ //#region src/lsp/client.ts
4
+ /**
5
+ * LSP Client wrapper for JSON-RPC communication
6
+ */
7
+ var LSPClient = class {
8
+ connection = null;
9
+ process = null;
10
+ serverInfo;
11
+ workspaceRoot;
12
+ diagnostics = /* @__PURE__ */ new Map();
13
+ initializationOptions = null;
14
+ constructor(serverInfo, workspaceRoot) {
15
+ this.serverInfo = serverInfo;
16
+ this.workspaceRoot = workspaceRoot;
17
+ }
18
+ /**
19
+ * Initialize the LSP connection
20
+ */
21
+ async initialize() {
22
+ const spawnResult = await this.serverInfo.spawn(this.workspaceRoot);
23
+ if (!spawnResult) throw new Error("Failed to spawn LSP server");
24
+ let initializationOptions = void 0;
25
+ if ("process" in spawnResult) {
26
+ this.process = spawnResult.process;
27
+ initializationOptions = spawnResult.initialization;
28
+ } else this.process = spawnResult;
29
+ if (!this.process.stdin || !this.process.stdout) throw new Error("Failed to create LSP process with proper stdio");
30
+ const reader = new StreamMessageReader(this.process.stdout);
31
+ const writer = new StreamMessageWriter(this.process.stdin);
32
+ this.connection = createMessageConnection(reader, writer);
33
+ this.connection.onError((error) => {
34
+ if ((error?.[0])?.code !== "ERR_STREAM_DESTROYED") {}
35
+ });
36
+ this.connection.onNotification("textDocument/publishDiagnostics", (params) => {
37
+ if (params.diagnostics && params.diagnostics.length > 0) {}
38
+ this.diagnostics.set(params.uri, params.diagnostics);
39
+ });
40
+ this.connection.onNotification((_method, _params) => {});
41
+ this.connection.listen();
42
+ if (this.process.stderr) this.process.stderr.on("data", (_data) => {});
43
+ this.process.on("error", (_error) => {});
44
+ this.process.on("exit", (_code, _signal) => {});
45
+ const initParams = {
46
+ processId: process.pid,
47
+ rootUri: `file://${this.workspaceRoot}`,
48
+ workspaceFolders: [{
49
+ name: "workspace",
50
+ uri: `file://${this.workspaceRoot}`
51
+ }],
52
+ capabilities: {
53
+ window: { workDoneProgress: true },
54
+ workspace: { configuration: true },
55
+ textDocument: {
56
+ publishDiagnostics: {
57
+ relatedInformation: true,
58
+ tagSupport: { valueSet: [1, 2] },
59
+ versionSupport: false
60
+ },
61
+ synchronization: {
62
+ didOpen: true,
63
+ didChange: true,
64
+ dynamicRegistration: false,
65
+ willSave: false,
66
+ willSaveWaitUntil: false,
67
+ didSave: false
68
+ },
69
+ completion: {
70
+ dynamicRegistration: false,
71
+ completionItem: {
72
+ snippetSupport: false,
73
+ commitCharactersSupport: false,
74
+ documentationFormat: ["markdown", "plaintext"],
75
+ deprecatedSupport: false,
76
+ preselectSupport: false
77
+ }
78
+ },
79
+ definition: {
80
+ dynamicRegistration: false,
81
+ linkSupport: true
82
+ },
83
+ typeDefinition: {
84
+ dynamicRegistration: false,
85
+ linkSupport: true
86
+ },
87
+ implementation: {
88
+ dynamicRegistration: false,
89
+ linkSupport: true
90
+ },
91
+ references: { dynamicRegistration: false },
92
+ documentHighlight: { dynamicRegistration: false },
93
+ documentSymbol: {
94
+ dynamicRegistration: false,
95
+ hierarchicalDocumentSymbolSupport: true
96
+ },
97
+ codeAction: {
98
+ dynamicRegistration: false,
99
+ codeActionLiteralSupport: { codeActionKind: { valueSet: [
100
+ "quickfix",
101
+ "refactor",
102
+ "refactor.extract",
103
+ "refactor.inline",
104
+ "refactor.rewrite",
105
+ "source",
106
+ "source.organizeImports"
107
+ ] } }
108
+ },
109
+ hover: {
110
+ dynamicRegistration: false,
111
+ contentFormat: ["markdown", "plaintext"]
112
+ }
113
+ }
114
+ }
115
+ };
116
+ if (initializationOptions) {
117
+ initParams.initializationOptions = initializationOptions;
118
+ this.initializationOptions = initializationOptions;
119
+ }
120
+ this.connection.onRequest("workspace/configuration", (params) => {
121
+ return params.items?.map(() => ({})) || [];
122
+ });
123
+ this.connection.onRequest("window/workDoneProgress/create", (_params) => {
124
+ return null;
125
+ });
126
+ await Promise.race([this.connection.sendRequest("initialize", initParams), new Promise((_, reject) => setTimeout(() => reject(/* @__PURE__ */ new Error("LSP initialize request timed out")), 1e4))]);
127
+ this.connection.sendNotification("initialized", {});
128
+ if (this.initializationOptions) this.connection.sendNotification("workspace/didChangeConfiguration", { settings: this.initializationOptions });
129
+ else this.connection.sendNotification("workspace/didChangeConfiguration", { settings: {} });
130
+ }
131
+ /**
132
+ * Notify the server that a document has been opened
133
+ */
134
+ notifyOpen(filePath, content, languageId) {
135
+ if (!this.connection) return;
136
+ const uri = `file://${filePath}`;
137
+ this.diagnostics.delete(uri);
138
+ this.connection.sendNotification("textDocument/didOpen", { textDocument: {
139
+ uri,
140
+ languageId,
141
+ version: 0,
142
+ text: content
143
+ } });
144
+ }
145
+ /**
146
+ * Notify the server that a document has changed
147
+ */
148
+ notifyChange(filePath, content, version) {
149
+ if (!this.connection) return;
150
+ this.connection.sendNotification("textDocument/didChange", {
151
+ textDocument: {
152
+ uri: `file://${filePath}`,
153
+ version
154
+ },
155
+ contentChanges: [{ text: content }]
156
+ });
157
+ }
158
+ /**
159
+ * Wait for diagnostics to be available for a specific file
160
+ * @param waitForChange If true, waits for diagnostics to change from their initial state
161
+ */
162
+ async waitForDiagnostics(filePath, timeoutMs = 5e3, waitForChange = false) {
163
+ if (!this.connection) return [];
164
+ const uri = `file://${filePath}`;
165
+ const startTime = Date.now();
166
+ const initialDiagnostics = this.diagnostics.get(uri);
167
+ const initialCount = initialDiagnostics?.length || 0;
168
+ while (Date.now() - startTime < timeoutMs) {
169
+ const currentDiagnostics = this.diagnostics.get(uri);
170
+ const currentCount = currentDiagnostics?.length || 0;
171
+ if (waitForChange) {
172
+ if (currentDiagnostics !== void 0 && currentCount !== initialCount) return currentDiagnostics;
173
+ } else if (currentDiagnostics !== void 0) return currentDiagnostics;
174
+ await new Promise((resolve) => setTimeout(resolve, 100));
175
+ }
176
+ return waitForChange ? initialDiagnostics || [] : [];
177
+ }
178
+ /**
179
+ * Get hover information for a position
180
+ */
181
+ async getHover(filePath, line, character) {
182
+ if (!this.connection) return null;
183
+ try {
184
+ return await this.connection.sendRequest("textDocument/hover", {
185
+ textDocument: TextDocumentIdentifier.create(`file://${filePath}`),
186
+ position: Position.create(line, character)
187
+ });
188
+ } catch {
189
+ return null;
190
+ }
191
+ }
192
+ /**
193
+ * Get diagnostics for a specific file
194
+ */
195
+ getDiagnostics(filePath) {
196
+ const uri = `file://${filePath}`;
197
+ return this.diagnostics.get(uri) || [];
198
+ }
199
+ /**
200
+ * Get all diagnostics from all files
201
+ */
202
+ getAllDiagnostics() {
203
+ const allDiagnostics = [];
204
+ for (const diagnostics of this.diagnostics.values()) allDiagnostics.push(...diagnostics);
205
+ return allDiagnostics;
206
+ }
207
+ /**
208
+ * Notify server that a file was closed
209
+ */
210
+ notifyClose(filePath) {
211
+ if (!this.connection) return;
212
+ const uri = `file://${filePath}`;
213
+ this.diagnostics.delete(uri);
214
+ this.connection.sendNotification("textDocument/didClose", { textDocument: TextDocumentIdentifier.create(uri) });
215
+ }
216
+ /**
217
+ * Restart the LSP client
218
+ */
219
+ async restart() {
220
+ await this.shutdown();
221
+ await this.initialize();
222
+ }
223
+ /**
224
+ * Shutdown the connection
225
+ */
226
+ async shutdown() {
227
+ if (this.connection) {
228
+ try {
229
+ if (this.process && !this.process.killed) {
230
+ await Promise.race([this.connection.sendRequest("shutdown"), new Promise((_, reject) => setTimeout(() => reject(/* @__PURE__ */ new Error("Shutdown request timed out")), 1e3))]);
231
+ this.connection.sendNotification("exit");
232
+ }
233
+ } catch {}
234
+ try {
235
+ this.connection.dispose();
236
+ } catch {}
237
+ this.connection = null;
238
+ }
239
+ if (this.process) {
240
+ try {
241
+ if (!this.process.killed) this.process.kill();
242
+ } catch {}
243
+ this.process = null;
244
+ }
245
+ this.diagnostics = /* @__PURE__ */ new Map();
246
+ }
247
+ };
248
+ //#endregion
249
+ export { LSPClient };
250
+
251
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","names":[],"sources":["../../src/lsp/client.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process';\nimport { StreamMessageReader, StreamMessageWriter, createMessageConnection } from 'vscode-jsonrpc/node.js';\nimport type { MessageConnection } from 'vscode-jsonrpc/node.js';\nimport { TextDocumentIdentifier, Position } from 'vscode-languageserver-protocol';\nimport type { Diagnostic } from 'vscode-languageserver-protocol';\nimport type { LSPServerInfo } from './server.js';\n\n/**\n * LSP Client wrapper for JSON-RPC communication\n */\nexport class LSPClient {\n private connection: MessageConnection | null = null;\n private process: ChildProcess | null = null;\n private serverInfo: LSPServerInfo;\n private workspaceRoot: string;\n private diagnostics: Map<string, Diagnostic[]> = new Map();\n private initializationOptions: any = null;\n\n constructor(serverInfo: LSPServerInfo, workspaceRoot: string) {\n this.serverInfo = serverInfo;\n this.workspaceRoot = workspaceRoot;\n }\n\n /**\n * Initialize the LSP connection\n */\n async initialize(): Promise<void> {\n const spawnResult = await this.serverInfo.spawn(this.workspaceRoot);\n\n if (!spawnResult) {\n throw new Error('Failed to spawn LSP server');\n }\n\n // Handle both ChildProcess and { process: ChildProcess, initialization? } formats\n let initializationOptions: any = undefined;\n if ('process' in spawnResult) {\n this.process = spawnResult.process;\n initializationOptions = spawnResult.initialization;\n } else {\n this.process = spawnResult;\n }\n\n if (!this.process.stdin || !this.process.stdout) {\n throw new Error('Failed to create LSP process with proper stdio');\n }\n\n const reader = new StreamMessageReader(this.process.stdout);\n const writer = new StreamMessageWriter(this.process.stdin);\n this.connection = createMessageConnection(reader, writer);\n\n // Handle connection errors (e.g., ERR_STREAM_DESTROYED during shutdown)\n this.connection.onError(error => {\n // Silently ignore stream destroyed errors during shutdown\n const errorObj = error?.[0] as any;\n if (errorObj?.code !== 'ERR_STREAM_DESTROYED') {\n }\n });\n\n // Set up diagnostic listener before starting connection\n\n this.connection.onNotification('textDocument/publishDiagnostics', (params: any) => {\n if (params.diagnostics && params.diagnostics.length > 0) {\n }\n this.diagnostics.set(params.uri, params.diagnostics);\n });\n (this.connection as any).onNotification((_method: string, _params: any) => {});\n\n this.connection.listen();\n\n // Capture stderr for debugging\n if (this.process.stderr) {\n this.process.stderr.on('data', _data => {});\n }\n\n // Handle process errors\n this.process.on('error', _error => {});\n\n this.process.on('exit', (_code, _signal) => {});\n\n // Send initialize request matching OpenCode's structure\n const initParams: any = {\n processId: process.pid,\n rootUri: `file://${this.workspaceRoot}`,\n workspaceFolders: [\n {\n name: 'workspace',\n uri: `file://${this.workspaceRoot}`,\n },\n ],\n capabilities: {\n window: {\n workDoneProgress: true,\n },\n workspace: {\n configuration: true,\n },\n textDocument: {\n publishDiagnostics: {\n relatedInformation: true,\n tagSupport: {\n valueSet: [1, 2],\n },\n versionSupport: false,\n },\n synchronization: {\n didOpen: true,\n didChange: true,\n dynamicRegistration: false,\n willSave: false,\n willSaveWaitUntil: false,\n didSave: false,\n },\n completion: {\n dynamicRegistration: false,\n completionItem: {\n snippetSupport: false,\n commitCharactersSupport: false,\n documentationFormat: ['markdown', 'plaintext'],\n deprecatedSupport: false,\n preselectSupport: false,\n },\n },\n definition: {\n dynamicRegistration: false,\n linkSupport: true,\n },\n typeDefinition: {\n dynamicRegistration: false,\n linkSupport: true,\n },\n implementation: {\n dynamicRegistration: false,\n linkSupport: true,\n },\n references: {\n dynamicRegistration: false,\n },\n documentHighlight: {\n dynamicRegistration: false,\n },\n documentSymbol: {\n dynamicRegistration: false,\n hierarchicalDocumentSymbolSupport: true,\n },\n codeAction: {\n dynamicRegistration: false,\n codeActionLiteralSupport: {\n codeActionKind: {\n valueSet: [\n 'quickfix',\n 'refactor',\n 'refactor.extract',\n 'refactor.inline',\n 'refactor.rewrite',\n 'source',\n 'source.organizeImports',\n ],\n },\n },\n },\n hover: {\n dynamicRegistration: false,\n contentFormat: ['markdown', 'plaintext'],\n },\n },\n },\n };\n\n // Add initialization options if provided by the server\n if (initializationOptions) {\n initParams.initializationOptions = initializationOptions;\n this.initializationOptions = initializationOptions;\n }\n\n // Add workspace/configuration request handler like OpenCode\n this.connection.onRequest('workspace/configuration', (params: any) => {\n return params.items?.map(() => ({})) || [];\n });\n\n // Handle window/workDoneProgress/create requests\n this.connection.onRequest('window/workDoneProgress/create', (_params: any) => {\n return null;\n });\n\n await Promise.race([\n this.connection.sendRequest('initialize', initParams),\n new Promise((_, reject) => setTimeout(() => reject(new Error('LSP initialize request timed out')), 10000)),\n ]);\n\n // Send initialized notification with empty object like OpenCode\n this.connection.sendNotification('initialized', {});\n\n // Send workspace/didChangeConfiguration with initialization options like OpenCode\n if (this.initializationOptions) {\n this.connection.sendNotification('workspace/didChangeConfiguration', {\n settings: this.initializationOptions,\n });\n } else {\n this.connection.sendNotification('workspace/didChangeConfiguration', {\n settings: {},\n });\n }\n }\n\n /**\n * Notify the server that a document has been opened\n */\n notifyOpen(filePath: string, content: string, languageId: string): void {\n if (!this.connection) return;\n\n const uri = `file://${filePath}`;\n\n // Clear diagnostics for this file before sending didOpen (like OpenCode does)\n this.diagnostics.delete(uri);\n\n this.connection.sendNotification('textDocument/didOpen', {\n textDocument: {\n uri,\n languageId,\n version: 0,\n text: content,\n },\n });\n }\n\n /**\n * Notify the server that a document has changed\n */\n notifyChange(filePath: string, content: string, version: number): void {\n if (!this.connection) return;\n\n this.connection.sendNotification('textDocument/didChange', {\n textDocument: {\n uri: `file://${filePath}`,\n version,\n },\n contentChanges: [{ text: content }],\n });\n }\n\n /**\n * Wait for diagnostics to be available for a specific file\n * @param waitForChange If true, waits for diagnostics to change from their initial state\n */\n async waitForDiagnostics(\n filePath: string,\n timeoutMs: number = 5000,\n waitForChange: boolean = false,\n ): Promise<Diagnostic[]> {\n if (!this.connection) return [];\n\n const uri = `file://${filePath}`;\n const startTime = Date.now();\n const initialDiagnostics = this.diagnostics.get(uri);\n const initialCount = initialDiagnostics?.length || 0;\n\n // Poll for diagnostics to be updated\n while (Date.now() - startTime < timeoutMs) {\n const currentDiagnostics = this.diagnostics.get(uri);\n const currentCount = currentDiagnostics?.length || 0;\n\n // If waiting for change, check if diagnostics have changed\n if (waitForChange) {\n if (currentDiagnostics !== undefined && currentCount !== initialCount) {\n return currentDiagnostics;\n }\n } else {\n // Return if we have diagnostics (even if empty array)\n if (currentDiagnostics !== undefined) {\n return currentDiagnostics;\n }\n }\n\n await new Promise(resolve => setTimeout(resolve, 100));\n }\n\n return waitForChange ? initialDiagnostics || [] : [];\n }\n\n /**\n * Get hover information for a position\n */\n async getHover(filePath: string, line: number, character: number): Promise<any> {\n if (!this.connection) return null;\n\n try {\n return await this.connection.sendRequest('textDocument/hover', {\n textDocument: TextDocumentIdentifier.create(`file://${filePath}`),\n position: Position.create(line, character),\n });\n } catch {\n return null;\n }\n }\n\n /**\n * Get diagnostics for a specific file\n */\n getDiagnostics(filePath: string): Diagnostic[] {\n const uri = `file://${filePath}`;\n return this.diagnostics.get(uri) || [];\n }\n\n /**\n * Get all diagnostics from all files\n */\n getAllDiagnostics(): Diagnostic[] {\n const allDiagnostics: Diagnostic[] = [];\n for (const diagnostics of this.diagnostics.values()) {\n allDiagnostics.push(...diagnostics);\n }\n return allDiagnostics;\n }\n\n /**\n * Notify server that a file was closed\n */\n notifyClose(filePath: string): void {\n if (!this.connection) return;\n\n const uri = `file://${filePath}`;\n\n // Clear diagnostics for this file\n this.diagnostics.delete(uri);\n\n // Send didClose notification\n this.connection.sendNotification('textDocument/didClose', {\n textDocument: TextDocumentIdentifier.create(uri),\n });\n }\n\n /**\n * Restart the LSP client\n */\n async restart(): Promise<void> {\n await this.shutdown();\n\n // Re-initialize (this will re-spawn the server)\n await this.initialize();\n }\n\n /**\n * Shutdown the connection\n */\n async shutdown(): Promise<void> {\n if (this.connection) {\n try {\n // Only send shutdown request if the process is still alive\n const processAlive = this.process && !this.process.killed;\n if (processAlive) {\n await Promise.race([\n this.connection.sendRequest('shutdown'),\n new Promise((_, reject) => setTimeout(() => reject(new Error('Shutdown request timed out')), 1000)),\n ]);\n this.connection.sendNotification('exit');\n }\n } catch {\n // Ignore shutdown errors (process may have already crashed)\n }\n try {\n this.connection.dispose();\n } catch {\n // Ignore dispose errors (stream may already be destroyed)\n }\n this.connection = null;\n }\n\n if (this.process) {\n try {\n if (!this.process.killed) {\n this.process.kill();\n }\n } catch {\n // Ignore kill errors\n }\n this.process = null;\n }\n\n this.diagnostics = new Map();\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ export { LSPClient } from './client.js';
2
+ export { getServersForFile } from './server.js';
3
+ export { lspManager } from './manager.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lsp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { LSPClient } from "./client.js";
2
+ import { getServersForFile } from "./server.js";
3
+ import { lspManager } from "./manager.js";
4
+ export { LSPClient, getServersForFile, lspManager };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Maps file extensions to LSP language identifiers
3
+ */
4
+ export declare const LANGUAGE_EXTENSIONS: Record<string, string>;
5
+ /**
6
+ * Get LSP language ID for a file path
7
+ */
8
+ export declare function getLanguageId(filePath: string): string | undefined;
9
+ //# sourceMappingURL=language.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/lsp/language.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+CtD,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGlE"}
@@ -0,0 +1,44 @@
1
+ //#region src/lsp/language.ts
2
+ /**
3
+ * Maps file extensions to LSP language identifiers
4
+ */
5
+ const LANGUAGE_EXTENSIONS = {
6
+ ".ts": "typescript",
7
+ ".tsx": "typescriptreact",
8
+ ".js": "javascript",
9
+ ".jsx": "javascriptreact",
10
+ ".mjs": "javascript",
11
+ ".cjs": "javascript",
12
+ ".py": "python",
13
+ ".pyi": "python",
14
+ ".go": "go",
15
+ ".rs": "rust",
16
+ ".c": "c",
17
+ ".cpp": "cpp",
18
+ ".cc": "cpp",
19
+ ".cxx": "cpp",
20
+ ".h": "c",
21
+ ".hpp": "cpp",
22
+ ".java": "java",
23
+ ".json": "json",
24
+ ".jsonc": "jsonc",
25
+ ".yaml": "yaml",
26
+ ".yml": "yaml",
27
+ ".md": "markdown",
28
+ ".html": "html",
29
+ ".css": "css",
30
+ ".scss": "scss",
31
+ ".sass": "sass",
32
+ ".less": "less"
33
+ };
34
+ /**
35
+ * Get LSP language ID for a file path
36
+ */
37
+ function getLanguageId(filePath) {
38
+ const ext = filePath.substring(filePath.lastIndexOf("."));
39
+ return LANGUAGE_EXTENSIONS[ext];
40
+ }
41
+ //#endregion
42
+ export { LANGUAGE_EXTENSIONS, getLanguageId };
43
+
44
+ //# sourceMappingURL=language.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.js","names":[],"sources":["../../src/lsp/language.ts"],"sourcesContent":["/**\n * Maps file extensions to LSP language identifiers\n */\nexport const LANGUAGE_EXTENSIONS: Record<string, string> = {\n // TypeScript/JavaScript\n '.ts': 'typescript',\n '.tsx': 'typescriptreact',\n '.js': 'javascript',\n '.jsx': 'javascriptreact',\n '.mjs': 'javascript',\n '.cjs': 'javascript',\n\n // Python\n '.py': 'python',\n '.pyi': 'python',\n\n // Go\n '.go': 'go',\n\n // Rust\n '.rs': 'rust',\n\n // C/C++\n '.c': 'c',\n '.cpp': 'cpp',\n '.cc': 'cpp',\n '.cxx': 'cpp',\n '.h': 'c',\n '.hpp': 'cpp',\n\n // Java\n '.java': 'java',\n\n // JSON\n '.json': 'json',\n '.jsonc': 'jsonc',\n\n // YAML\n '.yaml': 'yaml',\n '.yml': 'yaml',\n\n // Markdown\n '.md': 'markdown',\n\n // HTML/CSS\n '.html': 'html',\n '.css': 'css',\n '.scss': 'scss',\n '.sass': 'sass',\n '.less': 'less',\n};\n\n/**\n * Get LSP language ID for a file path\n */\nexport function getLanguageId(filePath: string): string | undefined {\n const ext = filePath.substring(filePath.lastIndexOf('.'));\n return LANGUAGE_EXTENSIONS[ext];\n}\n"],"mappings":";;;;AAGA,MAAa,sBAA8C;CAEzD,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,QAAQ;CAGR,OAAO;CACP,QAAQ;CAGR,OAAO;CAGP,OAAO;CAGP,MAAM;CACN,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;CAGR,SAAS;CAGT,SAAS;CACT,UAAU;CAGV,SAAS;CACT,QAAQ;CAGR,OAAO;CAGP,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;AACX;;;;AAKA,SAAgB,cAAc,UAAsC;CAClE,MAAM,MAAM,SAAS,UAAU,SAAS,YAAY,GAAG,CAAC;CACxD,OAAO,oBAAoB;AAC7B"}
@@ -0,0 +1,34 @@
1
+ import { LSPClient } from './client.js';
2
+ /**
3
+ * Singleton LSP client manager that keeps clients alive and reuses them
4
+ * across tool calls for better performance and accuracy
5
+ */
6
+ declare class LSPManager {
7
+ private clients;
8
+ private initializationPromises;
9
+ /**
10
+ * Get or create an LSP client for a file
11
+ * Returns null if no LSP server is available for the file
12
+ */
13
+ getClient(filePath: string, workspaceRoot: string): Promise<LSPClient | null>;
14
+ /**
15
+ * Shutdown a specific client
16
+ */
17
+ shutdownClient(workspaceRoot: string, serverName?: string): Promise<void>;
18
+ /**
19
+ * Shutdown all clients
20
+ */
21
+ shutdownAll(): Promise<void>;
22
+ /**
23
+ * Get the number of active clients
24
+ */
25
+ getActiveClientCount(): number;
26
+ /**
27
+ * Close a document in all active clients
28
+ * This is useful for tests that reuse the same file path
29
+ */
30
+ closeDocument(filePath: string): void;
31
+ }
32
+ export declare const lspManager: LSPManager;
33
+ export {};
34
+ //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/lsp/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;;GAGG;AACH,cAAM,UAAU;IACd,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,sBAAsB,CAAyC;IAEvE;;;OAGG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;IA2DnF;;OAEG;IACG,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAe/E;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAOlC;;OAEG;IACH,oBAAoB,IAAI,MAAM;IAI9B;;;OAGG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAStC;AAGD,eAAO,MAAM,UAAU,YAAmB,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { LSPClient } from "./client.js";
2
+ import { getServersForFile } from "./server.js";
3
+ //#region src/lsp/manager.ts
4
+ /**
5
+ * Singleton LSP client manager that keeps clients alive and reuses them
6
+ * across tool calls for better performance and accuracy
7
+ */
8
+ var LSPManager = class {
9
+ clients = /* @__PURE__ */ new Map();
10
+ initializationPromises = /* @__PURE__ */ new Map();
11
+ /**
12
+ * Get or create an LSP client for a file
13
+ * Returns null if no LSP server is available for the file
14
+ */
15
+ async getClient(filePath, workspaceRoot) {
16
+ const servers = getServersForFile(filePath, workspaceRoot);
17
+ if (servers.length === 0) return null;
18
+ const serverInfo = servers.find((s) => s.languageIds.includes("typescript") || s.languageIds.includes("javascript") || s.languageIds.includes("python") || s.languageIds.includes("go")) || servers[0];
19
+ if (!serverInfo) return null;
20
+ const key = `${serverInfo.name}:${workspaceRoot}`;
21
+ if (this.clients.has(key)) return this.clients.get(key);
22
+ if (this.initializationPromises.has(key)) {
23
+ await this.initializationPromises.get(key);
24
+ return this.clients.get(key) || null;
25
+ }
26
+ const initPromise = (async () => {
27
+ const client = new LSPClient(serverInfo, workspaceRoot);
28
+ await client.initialize();
29
+ this.clients.set(key, client);
30
+ })();
31
+ this.initializationPromises.set(key, initPromise);
32
+ try {
33
+ await Promise.race([initPromise, new Promise((_, reject) => setTimeout(() => reject(/* @__PURE__ */ new Error("LSP client initialization timed out")), 15e3))]);
34
+ return this.clients.get(key) || null;
35
+ } catch {
36
+ this.clients.delete(key);
37
+ return null;
38
+ } finally {
39
+ this.initializationPromises.delete(key);
40
+ }
41
+ }
42
+ /**
43
+ * Shutdown a specific client
44
+ */
45
+ async shutdownClient(workspaceRoot, serverName) {
46
+ const keysToRemove = [];
47
+ for (const [key, client] of this.clients.entries()) if (key.includes(workspaceRoot) && (!serverName || key.startsWith(serverName))) {
48
+ await client.shutdown();
49
+ keysToRemove.push(key);
50
+ }
51
+ for (const key of keysToRemove) this.clients.delete(key);
52
+ }
53
+ /**
54
+ * Shutdown all clients
55
+ */
56
+ async shutdownAll() {
57
+ const shutdownPromises = Array.from(this.clients.values()).map((client) => client.shutdown());
58
+ await Promise.all(shutdownPromises);
59
+ this.clients.clear();
60
+ this.initializationPromises.clear();
61
+ }
62
+ /**
63
+ * Get the number of active clients
64
+ */
65
+ getActiveClientCount() {
66
+ return this.clients.size;
67
+ }
68
+ /**
69
+ * Close a document in all active clients
70
+ * This is useful for tests that reuse the same file path
71
+ */
72
+ closeDocument(filePath) {
73
+ for (const client of this.clients.values()) try {
74
+ client.notifyClose(filePath);
75
+ } catch {}
76
+ }
77
+ };
78
+ const lspManager = new LSPManager();
79
+ //#endregion
80
+ export { lspManager };
81
+
82
+ //# sourceMappingURL=manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.js","names":[],"sources":["../../src/lsp/manager.ts"],"sourcesContent":["import { LSPClient } from './client.js';\nimport { getServersForFile } from './server.js';\n\n/**\n * Singleton LSP client manager that keeps clients alive and reuses them\n * across tool calls for better performance and accuracy\n */\nclass LSPManager {\n private clients: Map<string, LSPClient> = new Map();\n private initializationPromises: Map<string, Promise<void>> = new Map();\n\n /**\n * Get or create an LSP client for a file\n * Returns null if no LSP server is available for the file\n */\n async getClient(filePath: string, workspaceRoot: string): Promise<LSPClient | null> {\n const servers = getServersForFile(filePath, workspaceRoot);\n if (servers.length === 0) {\n return null;\n }\n\n // Use the first matching server (prioritize TypeScript/JavaScript)\n const serverInfo =\n servers.find(\n s =>\n s.languageIds.includes('typescript') ||\n s.languageIds.includes('javascript') ||\n s.languageIds.includes('python') ||\n s.languageIds.includes('go'),\n ) || servers[0];\n // Create a unique key for this server + workspace combination\n if (!serverInfo) {\n return null;\n }\n const key = `${serverInfo.name}:${workspaceRoot}`;\n\n // Return existing client if available\n if (this.clients.has(key)) {\n return this.clients.get(key)!;\n }\n\n // If initialization is in progress, wait for it\n if (this.initializationPromises.has(key)) {\n await this.initializationPromises.get(key);\n return this.clients.get(key) || null;\n }\n\n // Create and initialize new client with a timeout to prevent indefinite hangs\n // (e.g., npx resolution issues in pnpm-linked projects)\n const initPromise = (async () => {\n const client = new LSPClient(serverInfo, workspaceRoot);\n await client.initialize();\n this.clients.set(key, client);\n })();\n\n this.initializationPromises.set(key, initPromise);\n\n try {\n await Promise.race([\n initPromise,\n new Promise<void>((_, reject) =>\n setTimeout(() => reject(new Error('LSP client initialization timed out')), 15000),\n ),\n ]);\n return this.clients.get(key) || null;\n } catch {\n // If initialization timed out or failed, clean up\n this.clients.delete(key);\n return null;\n } finally {\n this.initializationPromises.delete(key);\n }\n }\n\n /**\n * Shutdown a specific client\n */\n async shutdownClient(workspaceRoot: string, serverName?: string): Promise<void> {\n const keysToRemove: string[] = [];\n\n for (const [key, client] of this.clients.entries()) {\n if (key.includes(workspaceRoot) && (!serverName || key.startsWith(serverName))) {\n await client.shutdown();\n keysToRemove.push(key);\n }\n }\n\n for (const key of keysToRemove) {\n this.clients.delete(key);\n }\n }\n\n /**\n * Shutdown all clients\n */\n async shutdownAll(): Promise<void> {\n const shutdownPromises = Array.from(this.clients.values()).map(client => client.shutdown());\n await Promise.all(shutdownPromises);\n this.clients.clear();\n this.initializationPromises.clear();\n }\n\n /**\n * Get the number of active clients\n */\n getActiveClientCount(): number {\n return this.clients.size;\n }\n\n /**\n * Close a document in all active clients\n * This is useful for tests that reuse the same file path\n */\n closeDocument(filePath: string): void {\n for (const client of this.clients.values()) {\n try {\n client.notifyClose(filePath);\n } catch {\n // Ignore errors if document wasn't open\n }\n }\n }\n}\n\n// Export singleton instance\nexport const lspManager = new LSPManager();\n"],"mappings":";;;;;;;AAOA,IAAM,aAAN,MAAiB;CACf,0BAA0C,IAAI,IAAI;CAClD,yCAA6D,IAAI,IAAI;;;;;CAMrE,MAAM,UAAU,UAAkB,eAAkD;EAClF,MAAM,UAAU,kBAAkB,UAAU,aAAa;EACzD,IAAI,QAAQ,WAAW,GACrB,OAAO;EAIT,MAAM,aACJ,QAAQ,MACN,MACE,EAAE,YAAY,SAAS,YAAY,KACnC,EAAE,YAAY,SAAS,YAAY,KACnC,EAAE,YAAY,SAAS,QAAQ,KAC/B,EAAE,YAAY,SAAS,IAAI,CAC/B,KAAK,QAAQ;EAEf,IAAI,CAAC,YACH,OAAO;EAET,MAAM,MAAM,GAAG,WAAW,KAAK,GAAG;EAGlC,IAAI,KAAK,QAAQ,IAAI,GAAG,GACtB,OAAO,KAAK,QAAQ,IAAI,GAAG;EAI7B,IAAI,KAAK,uBAAuB,IAAI,GAAG,GAAG;GACxC,MAAM,KAAK,uBAAuB,IAAI,GAAG;GACzC,OAAO,KAAK,QAAQ,IAAI,GAAG,KAAK;EAClC;EAIA,MAAM,eAAe,YAAY;GAC/B,MAAM,SAAS,IAAI,UAAU,YAAY,aAAa;GACtD,MAAM,OAAO,WAAW;GACxB,KAAK,QAAQ,IAAI,KAAK,MAAM;EAC9B,EAAA,CAAG;EAEH,KAAK,uBAAuB,IAAI,KAAK,WAAW;EAEhD,IAAI;GACF,MAAM,QAAQ,KAAK,CACjB,aACA,IAAI,SAAe,GAAG,WACpB,iBAAiB,uBAAO,IAAI,MAAM,qCAAqC,CAAC,GAAG,IAAK,CAClF,CACF,CAAC;GACD,OAAO,KAAK,QAAQ,IAAI,GAAG,KAAK;EAClC,QAAQ;GAEN,KAAK,QAAQ,OAAO,GAAG;GACvB,OAAO;EACT,UAAU;GACR,KAAK,uBAAuB,OAAO,GAAG;EACxC;CACF;;;;CAKA,MAAM,eAAe,eAAuB,YAAoC;EAC9E,MAAM,eAAyB,CAAC;EAEhC,KAAK,MAAM,CAAC,KAAK,WAAW,KAAK,QAAQ,QAAQ,GAC/C,IAAI,IAAI,SAAS,aAAa,MAAM,CAAC,cAAc,IAAI,WAAW,UAAU,IAAI;GAC9E,MAAM,OAAO,SAAS;GACtB,aAAa,KAAK,GAAG;EACvB;EAGF,KAAK,MAAM,OAAO,cAChB,KAAK,QAAQ,OAAO,GAAG;CAE3B;;;;CAKA,MAAM,cAA6B;EACjC,MAAM,mBAAmB,MAAM,KAAK,KAAK,QAAQ,OAAO,CAAC,CAAC,CAAC,KAAI,WAAU,OAAO,SAAS,CAAC;EAC1F,MAAM,QAAQ,IAAI,gBAAgB;EAClC,KAAK,QAAQ,MAAM;EACnB,KAAK,uBAAuB,MAAM;CACpC;;;;CAKA,uBAA+B;EAC7B,OAAO,KAAK,QAAQ;CACtB;;;;;CAMA,cAAc,UAAwB;EACpC,KAAK,MAAM,UAAU,KAAK,QAAQ,OAAO,GACvC,IAAI;GACF,OAAO,YAAY,QAAQ;EAC7B,QAAQ,CAER;CAEJ;AACF;AAGA,MAAa,aAAa,IAAI,WAAW"}
@@ -0,0 +1,27 @@
1
+ import type { ChildProcess } from 'node:child_process';
2
+ /**
3
+ * LSP Server definition and spawning logic
4
+ */
5
+ export interface LSPServerInfo {
6
+ id: string;
7
+ name: string;
8
+ languageIds: string[];
9
+ root: (cwd: string) => string | null;
10
+ spawn: (root: string) => ChildProcess | Promise<{
11
+ process: ChildProcess;
12
+ initialization?: any;
13
+ } | undefined>;
14
+ }
15
+ /**
16
+ * Find the nearest project root directory
17
+ */
18
+ export declare function findNearestRoot(cwd: string, markers: string[]): string | null;
19
+ /**
20
+ * Built-in LSP server definitions
21
+ */
22
+ export declare const BUILTIN_SERVERS: Record<string, LSPServerInfo>;
23
+ /**
24
+ * Get all servers that can handle a file
25
+ */
26
+ export declare function getServersForFile(filePath: string, cwd: string): LSPServerInfo[];
27
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/lsp/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQvD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACrC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,YAAY,CAAC;QAAC,cAAc,CAAC,EAAE,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;CAC9G;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAgB7E;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CA4GzD,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,EAAE,CAOhF"}