@eclipse-glsp/server-mcp 2.7.0-next.9 → 2.8.0-next.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 (461) hide show
  1. package/README.md +17 -3
  2. package/{lib/util/index.d.ts → browser.d.ts} +1 -3
  3. package/browser.js +18 -0
  4. package/common.d.ts +16 -0
  5. package/common.js +18 -0
  6. package/lib/{resources → browser}/index.d.ts +5 -4
  7. package/lib/browser/index.d.ts.map +1 -0
  8. package/lib/{index.js → browser/index.js} +20 -24
  9. package/lib/browser/index.js.map +1 -0
  10. package/lib/browser/modules/browser-mcp-server-module.d.ts +42 -0
  11. package/lib/browser/modules/browser-mcp-server-module.d.ts.map +1 -0
  12. package/lib/browser/modules/browser-mcp-server-module.js +50 -0
  13. package/lib/browser/modules/browser-mcp-server-module.js.map +1 -0
  14. package/lib/browser/reexport.d.ts +17 -0
  15. package/lib/browser/reexport.d.ts.map +1 -0
  16. package/lib/{util/index.js → browser/reexport.js} +17 -18
  17. package/lib/browser/reexport.js.map +1 -0
  18. package/lib/browser/server/browser-mcp-request-context.d.ts +27 -0
  19. package/lib/browser/server/browser-mcp-request-context.d.ts.map +1 -0
  20. package/lib/browser/server/browser-mcp-request-context.js +67 -0
  21. package/lib/browser/server/browser-mcp-request-context.js.map +1 -0
  22. package/lib/browser/server/mcp-worker-bridge.d.ts +81 -0
  23. package/lib/browser/server/mcp-worker-bridge.d.ts.map +1 -0
  24. package/lib/browser/server/mcp-worker-bridge.js +159 -0
  25. package/lib/browser/server/mcp-worker-bridge.js.map +1 -0
  26. package/lib/browser/server/web-mcp-server-launcher.d.ts +34 -0
  27. package/lib/browser/server/web-mcp-server-launcher.d.ts.map +1 -0
  28. package/lib/browser/server/web-mcp-server-launcher.js +50 -0
  29. package/lib/browser/server/web-mcp-server-launcher.js.map +1 -0
  30. package/lib/common/index.d.ts +65 -0
  31. package/lib/common/index.d.ts.map +1 -0
  32. package/lib/common/index.js +81 -0
  33. package/lib/common/index.js.map +1 -0
  34. package/lib/{server/mcp-server-module.d.ts → common/modules/abstract-mcp-server-module.d.ts} +55 -46
  35. package/lib/common/modules/abstract-mcp-server-module.d.ts.map +1 -0
  36. package/lib/{server/mcp-server-module.js → common/modules/abstract-mcp-server-module.js} +58 -79
  37. package/lib/common/modules/abstract-mcp-server-module.js.map +1 -0
  38. package/lib/{server → common/modules}/mcp-diagram-module.d.ts +5 -5
  39. package/lib/common/modules/mcp-diagram-module.d.ts.map +1 -0
  40. package/lib/{server → common/modules}/mcp-diagram-module.js +44 -28
  41. package/lib/common/modules/mcp-diagram-module.js.map +1 -0
  42. package/lib/{prompts → common/prompts}/handlers/describe-diagram-mcp-prompt-handler.d.ts +2 -1
  43. package/lib/common/prompts/handlers/describe-diagram-mcp-prompt-handler.d.ts.map +1 -0
  44. package/lib/{prompts → common/prompts}/handlers/describe-diagram-mcp-prompt-handler.js +21 -15
  45. package/lib/common/prompts/handlers/describe-diagram-mcp-prompt-handler.js.map +1 -0
  46. package/lib/{prompts → common/prompts}/handlers/suggest-improvements-mcp-prompt-handler.d.ts +2 -1
  47. package/lib/common/prompts/handlers/suggest-improvements-mcp-prompt-handler.d.ts.map +1 -0
  48. package/lib/{prompts → common/prompts}/handlers/suggest-improvements-mcp-prompt-handler.js +16 -12
  49. package/lib/common/prompts/handlers/suggest-improvements-mcp-prompt-handler.js.map +1 -0
  50. package/lib/{resources → common/resources}/handlers/diagram-png-mcp-resource-handler.d.ts +4 -1
  51. package/lib/common/resources/handlers/diagram-png-mcp-resource-handler.d.ts.map +1 -0
  52. package/lib/{resources → common/resources}/handlers/diagram-png-mcp-resource-handler.js +10 -7
  53. package/lib/common/resources/handlers/diagram-png-mcp-resource-handler.js.map +1 -0
  54. package/lib/{resources → common/resources}/handlers/diagram-svg-mcp-resource-handler.d.ts +4 -1
  55. package/lib/common/resources/handlers/diagram-svg-mcp-resource-handler.d.ts.map +1 -0
  56. package/lib/{resources → common/resources}/handlers/diagram-svg-mcp-resource-handler.js +9 -6
  57. package/lib/common/resources/handlers/diagram-svg-mcp-resource-handler.js.map +1 -0
  58. package/lib/common/resources/services/element-types-provider.d.ts.map +1 -0
  59. package/lib/common/resources/services/element-types-provider.js.map +1 -0
  60. package/lib/common/resources/services/mcp-model-serializer.d.ts.map +1 -0
  61. package/lib/{resources → common/resources}/services/mcp-model-serializer.js +2 -2
  62. package/lib/common/resources/services/mcp-model-serializer.js.map +1 -0
  63. package/lib/common/server/abstract-mcp-server-launcher.d.ts +168 -0
  64. package/lib/common/server/abstract-mcp-server-launcher.d.ts.map +1 -0
  65. package/lib/{server/mcp-server-launcher.js → common/server/abstract-mcp-server-launcher.js} +235 -121
  66. package/lib/common/server/abstract-mcp-server-launcher.js.map +1 -0
  67. package/lib/{server → common/server}/glsp-mcp-server.d.ts +1 -1
  68. package/lib/common/server/glsp-mcp-server.d.ts.map +1 -0
  69. package/lib/{server → common/server}/glsp-mcp-server.js +6 -1
  70. package/lib/common/server/glsp-mcp-server.js.map +1 -0
  71. package/lib/{server → common/server}/lru-event-store.d.ts +1 -1
  72. package/lib/common/server/lru-event-store.d.ts.map +1 -0
  73. package/lib/common/server/lru-event-store.js.map +1 -0
  74. package/lib/{server → common/server}/mcp-diagram-handler-dispatcher.d.ts +3 -1
  75. package/lib/common/server/mcp-diagram-handler-dispatcher.d.ts.map +1 -0
  76. package/lib/{server → common/server}/mcp-diagram-handler-dispatcher.js +12 -6
  77. package/lib/common/server/mcp-diagram-handler-dispatcher.js.map +1 -0
  78. package/lib/common/server/mcp-diagram-prompt-handler-registry.d.ts.map +1 -0
  79. package/lib/common/server/mcp-diagram-prompt-handler-registry.js.map +1 -0
  80. package/lib/common/server/mcp-diagram-resource-handler-registry.d.ts.map +1 -0
  81. package/lib/{server → common/server}/mcp-diagram-resource-handler-registry.js +4 -1
  82. package/lib/common/server/mcp-diagram-resource-handler-registry.js.map +1 -0
  83. package/lib/common/server/mcp-diagram-tool-handler-registry.d.ts.map +1 -0
  84. package/lib/{server → common/server}/mcp-diagram-tool-handler-registry.js +3 -1
  85. package/lib/common/server/mcp-diagram-tool-handler-registry.js.map +1 -0
  86. package/lib/common/server/mcp-handler-shared.d.ts.map +1 -0
  87. package/lib/common/server/mcp-handler-shared.js.map +1 -0
  88. package/lib/common/server/mcp-id-alias-service.d.ts.map +1 -0
  89. package/lib/common/server/mcp-id-alias-service.js.map +1 -0
  90. package/lib/{server → common/server}/mcp-input-schemas.d.ts +8 -0
  91. package/lib/common/server/mcp-input-schemas.d.ts.map +1 -0
  92. package/lib/{server → common/server}/mcp-input-schemas.js +13 -1
  93. package/lib/common/server/mcp-input-schemas.js.map +1 -0
  94. package/lib/common/server/mcp-label-provider.d.ts.map +1 -0
  95. package/lib/common/server/mcp-label-provider.js.map +1 -0
  96. package/lib/{server → common/server}/mcp-log-level-registry.d.ts +1 -1
  97. package/lib/common/server/mcp-log-level-registry.d.ts.map +1 -0
  98. package/lib/common/server/mcp-log-level-registry.js.map +1 -0
  99. package/lib/{server → common/server}/mcp-logger.d.ts +4 -2
  100. package/lib/common/server/mcp-logger.d.ts.map +1 -0
  101. package/lib/{server → common/server}/mcp-logger.js +11 -3
  102. package/lib/common/server/mcp-logger.js.map +1 -0
  103. package/lib/common/server/mcp-mime-types.d.ts.map +1 -0
  104. package/lib/common/server/mcp-mime-types.js.map +1 -0
  105. package/lib/{server → common/server}/mcp-options.d.ts +1 -1
  106. package/lib/common/server/mcp-options.d.ts.map +1 -0
  107. package/lib/{server → common/server}/mcp-options.js +1 -1
  108. package/lib/common/server/mcp-options.js.map +1 -0
  109. package/lib/{server → common/server}/mcp-progress-reporter.d.ts +4 -2
  110. package/lib/common/server/mcp-progress-reporter.d.ts.map +1 -0
  111. package/lib/{server → common/server}/mcp-progress-reporter.js +14 -3
  112. package/lib/common/server/mcp-progress-reporter.js.map +1 -0
  113. package/lib/{server → common/server}/mcp-prompt-handler.d.ts +3 -1
  114. package/lib/common/server/mcp-prompt-handler.d.ts.map +1 -0
  115. package/lib/{server → common/server}/mcp-prompt-handler.js +10 -2
  116. package/lib/common/server/mcp-prompt-handler.js.map +1 -0
  117. package/lib/common/server/mcp-request-context.d.ts +35 -0
  118. package/lib/common/server/mcp-request-context.d.ts.map +1 -0
  119. package/lib/common/server/mcp-request-context.js +30 -0
  120. package/lib/common/server/mcp-request-context.js.map +1 -0
  121. package/lib/{server → common/server}/mcp-resource-handler.d.ts +3 -1
  122. package/lib/common/server/mcp-resource-handler.d.ts.map +1 -0
  123. package/lib/{server → common/server}/mcp-resource-handler.js +13 -5
  124. package/lib/common/server/mcp-resource-handler.js.map +1 -0
  125. package/lib/common/server/mcp-session.d.ts.map +1 -0
  126. package/lib/common/server/mcp-session.js.map +1 -0
  127. package/lib/{server → common/server}/mcp-tool-handler.d.ts +3 -1
  128. package/lib/common/server/mcp-tool-handler.d.ts.map +1 -0
  129. package/lib/{server → common/server}/mcp-tool-handler.js +7 -1
  130. package/lib/{server → common/server}/mcp-tool-handler.js.map +1 -1
  131. package/lib/{tools → common/tools}/handlers/count-elements-mcp-tool-handler.d.ts +2 -1
  132. package/lib/common/tools/handlers/count-elements-mcp-tool-handler.d.ts.map +1 -0
  133. package/lib/{tools → common/tools}/handlers/count-elements-mcp-tool-handler.js +4 -3
  134. package/lib/common/tools/handlers/count-elements-mcp-tool-handler.js.map +1 -0
  135. package/lib/{tools → common/tools}/handlers/create-edges-mcp-tool-handler.d.ts +4 -1
  136. package/lib/common/tools/handlers/create-edges-mcp-tool-handler.d.ts.map +1 -0
  137. package/lib/{tools → common/tools}/handlers/create-edges-mcp-tool-handler.js +9 -7
  138. package/lib/common/tools/handlers/create-edges-mcp-tool-handler.js.map +1 -0
  139. package/lib/{tools → common/tools}/handlers/create-nodes-mcp-tool-handler.d.ts +4 -1
  140. package/lib/common/tools/handlers/create-nodes-mcp-tool-handler.d.ts.map +1 -0
  141. package/lib/{tools → common/tools}/handlers/create-nodes-mcp-tool-handler.js +10 -8
  142. package/lib/common/tools/handlers/create-nodes-mcp-tool-handler.js.map +1 -0
  143. package/lib/{tools → common/tools}/handlers/delete-elements-mcp-tool-handler.d.ts +4 -1
  144. package/lib/common/tools/handlers/delete-elements-mcp-tool-handler.d.ts.map +1 -0
  145. package/lib/{tools → common/tools}/handlers/delete-elements-mcp-tool-handler.js +9 -6
  146. package/lib/common/tools/handlers/delete-elements-mcp-tool-handler.js.map +1 -0
  147. package/lib/{tools → common/tools}/handlers/diagram-model-mcp-tool-handler.d.ts +2 -1
  148. package/lib/common/tools/handlers/diagram-model-mcp-tool-handler.d.ts.map +1 -0
  149. package/lib/{tools → common/tools}/handlers/diagram-model-mcp-tool-handler.js +4 -3
  150. package/lib/common/tools/handlers/diagram-model-mcp-tool-handler.js.map +1 -0
  151. package/lib/{tools → common/tools}/handlers/element-types-mcp-tool-handler.d.ts +2 -1
  152. package/lib/common/tools/handlers/element-types-mcp-tool-handler.d.ts.map +1 -0
  153. package/lib/{tools → common/tools}/handlers/element-types-mcp-tool-handler.js +6 -5
  154. package/lib/common/tools/handlers/element-types-mcp-tool-handler.js.map +1 -0
  155. package/lib/{tools → common/tools}/handlers/get-selection-mcp-tool-handler.d.ts +2 -1
  156. package/lib/common/tools/handlers/get-selection-mcp-tool-handler.d.ts.map +1 -0
  157. package/lib/{tools → common/tools}/handlers/get-selection-mcp-tool-handler.js +6 -4
  158. package/lib/common/tools/handlers/get-selection-mcp-tool-handler.js.map +1 -0
  159. package/lib/{tools → common/tools}/handlers/layout-mcp-tool-handler.d.ts +4 -1
  160. package/lib/common/tools/handlers/layout-mcp-tool-handler.d.ts.map +1 -0
  161. package/lib/{tools → common/tools}/handlers/layout-mcp-tool-handler.js +7 -5
  162. package/lib/common/tools/handlers/layout-mcp-tool-handler.js.map +1 -0
  163. package/lib/{tools → common/tools}/handlers/modify-edges-mcp-tool-handler.d.ts +2 -1
  164. package/lib/common/tools/handlers/modify-edges-mcp-tool-handler.d.ts.map +1 -0
  165. package/lib/{tools → common/tools}/handlers/modify-edges-mcp-tool-handler.js +12 -10
  166. package/lib/common/tools/handlers/modify-edges-mcp-tool-handler.js.map +1 -0
  167. package/lib/{tools → common/tools}/handlers/modify-nodes-mcp-tool-handler.d.ts +2 -1
  168. package/lib/common/tools/handlers/modify-nodes-mcp-tool-handler.d.ts.map +1 -0
  169. package/lib/{tools → common/tools}/handlers/modify-nodes-mcp-tool-handler.js +13 -11
  170. package/lib/common/tools/handlers/modify-nodes-mcp-tool-handler.js.map +1 -0
  171. package/lib/{tools → common/tools}/handlers/query-elements-mcp-tool-handler.d.ts +2 -1
  172. package/lib/common/tools/handlers/query-elements-mcp-tool-handler.d.ts.map +1 -0
  173. package/lib/{tools → common/tools}/handlers/query-elements-mcp-tool-handler.js +7 -5
  174. package/lib/common/tools/handlers/query-elements-mcp-tool-handler.js.map +1 -0
  175. package/lib/{tools → common/tools}/handlers/redo-mcp-tool-handler.d.ts +2 -1
  176. package/lib/common/tools/handlers/redo-mcp-tool-handler.d.ts.map +1 -0
  177. package/lib/{tools → common/tools}/handlers/redo-mcp-tool-handler.js +6 -4
  178. package/lib/common/tools/handlers/redo-mcp-tool-handler.js.map +1 -0
  179. package/lib/{tools → common/tools}/handlers/save-model-mcp-tool-handler.d.ts +3 -1
  180. package/lib/common/tools/handlers/save-model-mcp-tool-handler.d.ts.map +1 -0
  181. package/lib/{tools → common/tools}/handlers/save-model-mcp-tool-handler.js +7 -5
  182. package/lib/common/tools/handlers/save-model-mcp-tool-handler.js.map +1 -0
  183. package/lib/{tools → common/tools}/handlers/session-info-mcp-tool-handler.d.ts +2 -1
  184. package/lib/common/tools/handlers/session-info-mcp-tool-handler.d.ts.map +1 -0
  185. package/lib/{tools → common/tools}/handlers/session-info-mcp-tool-handler.js +4 -3
  186. package/lib/common/tools/handlers/session-info-mcp-tool-handler.js.map +1 -0
  187. package/lib/{tools → common/tools}/handlers/set-selection-mcp-tool-handler.d.ts +2 -1
  188. package/lib/common/tools/handlers/set-selection-mcp-tool-handler.d.ts.map +1 -0
  189. package/lib/{tools → common/tools}/handlers/set-selection-mcp-tool-handler.js +6 -5
  190. package/lib/common/tools/handlers/set-selection-mcp-tool-handler.js.map +1 -0
  191. package/lib/{tools → common/tools}/handlers/set-view-mcp-tool-handler.d.ts +2 -1
  192. package/lib/common/tools/handlers/set-view-mcp-tool-handler.d.ts.map +1 -0
  193. package/lib/{tools → common/tools}/handlers/set-view-mcp-tool-handler.js +10 -8
  194. package/lib/common/tools/handlers/set-view-mcp-tool-handler.js.map +1 -0
  195. package/lib/{tools → common/tools}/handlers/undo-mcp-tool-handler.d.ts +2 -1
  196. package/lib/common/tools/handlers/undo-mcp-tool-handler.d.ts.map +1 -0
  197. package/lib/{tools → common/tools}/handlers/undo-mcp-tool-handler.js +6 -4
  198. package/lib/common/tools/handlers/undo-mcp-tool-handler.js.map +1 -0
  199. package/lib/{tools → common/tools}/handlers/validate-diagram-mcp-tool-handler.d.ts +2 -1
  200. package/lib/common/tools/handlers/validate-diagram-mcp-tool-handler.d.ts.map +1 -0
  201. package/lib/{tools → common/tools}/handlers/validate-diagram-mcp-tool-handler.js +0 -0
  202. package/lib/common/tools/handlers/validate-diagram-mcp-tool-handler.js.map +1 -0
  203. package/lib/common/util/markdown-util.d.ts.map +1 -0
  204. package/lib/common/util/markdown-util.js.map +1 -0
  205. package/lib/common/util/mcp-util.d.ts.map +1 -0
  206. package/lib/common/util/mcp-util.js.map +1 -0
  207. package/lib/{prompts → node}/index.d.ts +4 -2
  208. package/lib/node/index.d.ts.map +1 -0
  209. package/lib/{resources → node}/index.js +4 -4
  210. package/lib/node/index.js.map +1 -0
  211. package/lib/node/modules/node-mcp-server-module.d.ts +37 -0
  212. package/lib/node/modules/node-mcp-server-module.d.ts.map +1 -0
  213. package/lib/node/modules/node-mcp-server-module.js +52 -0
  214. package/lib/node/modules/node-mcp-server-module.js.map +1 -0
  215. package/lib/node/reexport.d.ts +17 -0
  216. package/lib/node/reexport.d.ts.map +1 -0
  217. package/lib/{prompts/index.js → node/reexport.js} +17 -18
  218. package/lib/node/reexport.js.map +1 -0
  219. package/lib/node/server/node-mcp-request-context.d.ts +24 -0
  220. package/lib/node/server/node-mcp-request-context.d.ts.map +1 -0
  221. package/lib/node/server/node-mcp-request-context.js +43 -0
  222. package/lib/node/server/node-mcp-request-context.js.map +1 -0
  223. package/lib/node/server/node-mcp-server-launcher.d.ts +55 -0
  224. package/lib/node/server/node-mcp-server-launcher.d.ts.map +1 -0
  225. package/lib/node/server/node-mcp-server-launcher.js +123 -0
  226. package/lib/node/server/node-mcp-server-launcher.js.map +1 -0
  227. package/node.d.ts +16 -0
  228. package/{src/util/index.ts → node.js} +2 -2
  229. package/package.json +19 -13
  230. package/src/{resources → browser}/index.ts +5 -4
  231. package/src/browser/modules/browser-mcp-server-module.ts +54 -0
  232. package/src/browser/reexport.ts +16 -0
  233. package/src/browser/server/browser-mcp-request-context.ts +59 -0
  234. package/src/browser/server/mcp-worker-bridge.ts +200 -0
  235. package/src/browser/server/web-mcp-server-launcher.ts +39 -0
  236. package/src/common/index.ts +65 -0
  237. package/src/{server/mcp-server-module.ts → common/modules/abstract-mcp-server-module.ts} +65 -77
  238. package/src/{server → common/modules}/mcp-diagram-module.ts +27 -28
  239. package/src/{prompts → common/prompts}/handlers/describe-diagram-mcp-prompt-handler.ts +8 -9
  240. package/src/{prompts → common/prompts}/handlers/suggest-improvements-mcp-prompt-handler.ts +6 -7
  241. package/src/{resources → common/resources}/handlers/diagram-png-mcp-resource-handler.ts +5 -9
  242. package/src/{resources → common/resources}/handlers/diagram-svg-mcp-resource-handler.ts +5 -9
  243. package/src/{resources → common/resources}/services/mcp-model-serializer.ts +1 -1
  244. package/src/common/server/abstract-mcp-server-launcher.spec.ts +458 -0
  245. package/src/common/server/abstract-mcp-server-launcher.ts +524 -0
  246. package/src/{server → common/server}/glsp-mcp-server.ts +7 -2
  247. package/src/{server → common/server}/lru-event-store.ts +1 -1
  248. package/src/{server → common/server}/mcp-diagram-handler-dispatcher.ts +13 -9
  249. package/src/{server → common/server}/mcp-diagram-resource-handler-registry.ts +4 -1
  250. package/src/{server → common/server}/mcp-diagram-tool-handler-registry.ts +3 -1
  251. package/src/{server → common/server}/mcp-input-schemas.ts +13 -0
  252. package/src/{server → common/server}/mcp-log-level-registry.ts +1 -1
  253. package/src/{server → common/server}/mcp-logger.spec.ts +26 -18
  254. package/src/{server → common/server}/mcp-logger.ts +9 -5
  255. package/src/{server → common/server}/mcp-options.ts +1 -1
  256. package/src/{server → common/server}/mcp-progress-reporter.spec.ts +19 -9
  257. package/src/{server → common/server}/mcp-progress-reporter.ts +9 -5
  258. package/src/{server → common/server}/mcp-prompt-handler.ts +8 -4
  259. package/src/{server → common/server}/mcp-request-context.ts +20 -16
  260. package/src/{server → common/server}/mcp-resource-handler.ts +11 -7
  261. package/src/{server → common/server}/mcp-tool-handler.spec.ts +4 -4
  262. package/src/{server → common/server}/mcp-tool-handler.ts +8 -4
  263. package/src/{tools → common/tools}/handlers/count-elements-mcp-tool-handler.spec.ts +3 -1
  264. package/src/{tools → common/tools}/handlers/count-elements-mcp-tool-handler.ts +3 -1
  265. package/src/{tools → common/tools}/handlers/create-edges-mcp-tool-handler.spec.ts +3 -1
  266. package/src/{tools → common/tools}/handlers/create-edges-mcp-tool-handler.ts +7 -5
  267. package/src/{tools → common/tools}/handlers/create-nodes-mcp-tool-handler.spec.ts +3 -1
  268. package/src/{tools → common/tools}/handlers/create-nodes-mcp-tool-handler.ts +7 -5
  269. package/src/{tools → common/tools}/handlers/delete-elements-mcp-tool-handler.ts +7 -9
  270. package/src/{tools → common/tools}/handlers/diagram-model-mcp-tool-handler.ts +3 -1
  271. package/src/{tools → common/tools}/handlers/element-types-mcp-tool-handler.ts +2 -1
  272. package/src/{tools → common/tools}/handlers/get-selection-mcp-tool-handler.ts +3 -1
  273. package/src/{tools → common/tools}/handlers/layout-mcp-tool-handler.ts +6 -3
  274. package/src/{tools → common/tools}/handlers/modify-edges-mcp-tool-handler.ts +6 -6
  275. package/src/{tools → common/tools}/handlers/modify-nodes-mcp-tool-handler.ts +6 -6
  276. package/src/{tools → common/tools}/handlers/query-elements-mcp-tool-handler.spec.ts +3 -1
  277. package/src/{tools → common/tools}/handlers/query-elements-mcp-tool-handler.ts +3 -7
  278. package/src/{tools → common/tools}/handlers/redo-mcp-tool-handler.ts +3 -1
  279. package/src/{tools → common/tools}/handlers/save-model-mcp-tool-handler.ts +4 -1
  280. package/src/{tools → common/tools}/handlers/session-info-mcp-tool-handler.spec.ts +1 -1
  281. package/src/{tools → common/tools}/handlers/session-info-mcp-tool-handler.ts +2 -1
  282. package/src/{tools → common/tools}/handlers/set-selection-mcp-tool-handler.spec.ts +3 -1
  283. package/src/{tools → common/tools}/handlers/set-selection-mcp-tool-handler.ts +3 -1
  284. package/src/{tools → common/tools}/handlers/set-view-mcp-tool-handler.ts +3 -9
  285. package/src/{tools → common/tools}/handlers/undo-mcp-tool-handler.ts +3 -1
  286. package/src/{tools → common/tools}/handlers/validate-diagram-mcp-tool-handler.ts +0 -0
  287. package/src/{prompts → node}/index.ts +4 -2
  288. package/src/node/modules/node-mcp-server-module.ts +56 -0
  289. package/src/node/reexport.ts +16 -0
  290. package/src/node/server/mcp-http-transport-e2e.spec.ts +297 -0
  291. package/src/node/server/node-mcp-request-context.ts +33 -0
  292. package/src/{server/mcp-server-launcher.spec.ts → node/server/node-mcp-server-launcher.spec.ts} +19 -8
  293. package/src/node/server/node-mcp-server-launcher.ts +130 -0
  294. package/lib/index.d.ts +0 -23
  295. package/lib/index.d.ts.map +0 -1
  296. package/lib/index.js.map +0 -1
  297. package/lib/prompts/handlers/describe-diagram-mcp-prompt-handler.d.ts.map +0 -1
  298. package/lib/prompts/handlers/describe-diagram-mcp-prompt-handler.js.map +0 -1
  299. package/lib/prompts/handlers/suggest-improvements-mcp-prompt-handler.d.ts.map +0 -1
  300. package/lib/prompts/handlers/suggest-improvements-mcp-prompt-handler.js.map +0 -1
  301. package/lib/prompts/index.d.ts.map +0 -1
  302. package/lib/prompts/index.js.map +0 -1
  303. package/lib/resources/handlers/diagram-png-mcp-resource-handler.d.ts.map +0 -1
  304. package/lib/resources/handlers/diagram-png-mcp-resource-handler.js.map +0 -1
  305. package/lib/resources/handlers/diagram-svg-mcp-resource-handler.d.ts.map +0 -1
  306. package/lib/resources/handlers/diagram-svg-mcp-resource-handler.js.map +0 -1
  307. package/lib/resources/index.d.ts.map +0 -1
  308. package/lib/resources/index.js.map +0 -1
  309. package/lib/resources/services/element-types-provider.d.ts.map +0 -1
  310. package/lib/resources/services/element-types-provider.js.map +0 -1
  311. package/lib/resources/services/mcp-model-serializer.d.ts.map +0 -1
  312. package/lib/resources/services/mcp-model-serializer.js.map +0 -1
  313. package/lib/server/glsp-mcp-server.d.ts.map +0 -1
  314. package/lib/server/glsp-mcp-server.js.map +0 -1
  315. package/lib/server/index.d.ts +0 -37
  316. package/lib/server/index.d.ts.map +0 -1
  317. package/lib/server/index.js +0 -57
  318. package/lib/server/index.js.map +0 -1
  319. package/lib/server/lru-event-store.d.ts.map +0 -1
  320. package/lib/server/lru-event-store.js.map +0 -1
  321. package/lib/server/mcp-diagram-handler-dispatcher.d.ts.map +0 -1
  322. package/lib/server/mcp-diagram-handler-dispatcher.js.map +0 -1
  323. package/lib/server/mcp-diagram-module.d.ts.map +0 -1
  324. package/lib/server/mcp-diagram-module.js.map +0 -1
  325. package/lib/server/mcp-diagram-prompt-handler-registry.d.ts.map +0 -1
  326. package/lib/server/mcp-diagram-prompt-handler-registry.js.map +0 -1
  327. package/lib/server/mcp-diagram-resource-handler-registry.d.ts.map +0 -1
  328. package/lib/server/mcp-diagram-resource-handler-registry.js.map +0 -1
  329. package/lib/server/mcp-diagram-tool-handler-registry.d.ts.map +0 -1
  330. package/lib/server/mcp-diagram-tool-handler-registry.js.map +0 -1
  331. package/lib/server/mcp-handler-shared.d.ts.map +0 -1
  332. package/lib/server/mcp-handler-shared.js.map +0 -1
  333. package/lib/server/mcp-http-transport.d.ts +0 -93
  334. package/lib/server/mcp-http-transport.d.ts.map +0 -1
  335. package/lib/server/mcp-http-transport.js +0 -350
  336. package/lib/server/mcp-http-transport.js.map +0 -1
  337. package/lib/server/mcp-id-alias-service.d.ts.map +0 -1
  338. package/lib/server/mcp-id-alias-service.js.map +0 -1
  339. package/lib/server/mcp-input-schemas.d.ts.map +0 -1
  340. package/lib/server/mcp-input-schemas.js.map +0 -1
  341. package/lib/server/mcp-label-provider.d.ts.map +0 -1
  342. package/lib/server/mcp-label-provider.js.map +0 -1
  343. package/lib/server/mcp-log-level-registry.d.ts.map +0 -1
  344. package/lib/server/mcp-log-level-registry.js.map +0 -1
  345. package/lib/server/mcp-logger.d.ts.map +0 -1
  346. package/lib/server/mcp-logger.js.map +0 -1
  347. package/lib/server/mcp-mime-types.d.ts.map +0 -1
  348. package/lib/server/mcp-mime-types.js.map +0 -1
  349. package/lib/server/mcp-options.d.ts.map +0 -1
  350. package/lib/server/mcp-options.js.map +0 -1
  351. package/lib/server/mcp-progress-reporter.d.ts.map +0 -1
  352. package/lib/server/mcp-progress-reporter.js.map +0 -1
  353. package/lib/server/mcp-prompt-handler.d.ts.map +0 -1
  354. package/lib/server/mcp-prompt-handler.js.map +0 -1
  355. package/lib/server/mcp-request-context.d.ts +0 -37
  356. package/lib/server/mcp-request-context.d.ts.map +0 -1
  357. package/lib/server/mcp-request-context.js +0 -37
  358. package/lib/server/mcp-request-context.js.map +0 -1
  359. package/lib/server/mcp-resource-handler.d.ts.map +0 -1
  360. package/lib/server/mcp-resource-handler.js.map +0 -1
  361. package/lib/server/mcp-server-launcher.d.ts +0 -143
  362. package/lib/server/mcp-server-launcher.d.ts.map +0 -1
  363. package/lib/server/mcp-server-launcher.js.map +0 -1
  364. package/lib/server/mcp-server-module.d.ts.map +0 -1
  365. package/lib/server/mcp-server-module.js.map +0 -1
  366. package/lib/server/mcp-session.d.ts.map +0 -1
  367. package/lib/server/mcp-session.js.map +0 -1
  368. package/lib/server/mcp-tool-handler.d.ts.map +0 -1
  369. package/lib/tools/handlers/count-elements-mcp-tool-handler.d.ts.map +0 -1
  370. package/lib/tools/handlers/count-elements-mcp-tool-handler.js.map +0 -1
  371. package/lib/tools/handlers/create-edges-mcp-tool-handler.d.ts.map +0 -1
  372. package/lib/tools/handlers/create-edges-mcp-tool-handler.js.map +0 -1
  373. package/lib/tools/handlers/create-nodes-mcp-tool-handler.d.ts.map +0 -1
  374. package/lib/tools/handlers/create-nodes-mcp-tool-handler.js.map +0 -1
  375. package/lib/tools/handlers/delete-elements-mcp-tool-handler.d.ts.map +0 -1
  376. package/lib/tools/handlers/delete-elements-mcp-tool-handler.js.map +0 -1
  377. package/lib/tools/handlers/diagram-model-mcp-tool-handler.d.ts.map +0 -1
  378. package/lib/tools/handlers/diagram-model-mcp-tool-handler.js.map +0 -1
  379. package/lib/tools/handlers/element-types-mcp-tool-handler.d.ts.map +0 -1
  380. package/lib/tools/handlers/element-types-mcp-tool-handler.js.map +0 -1
  381. package/lib/tools/handlers/get-selection-mcp-tool-handler.d.ts.map +0 -1
  382. package/lib/tools/handlers/get-selection-mcp-tool-handler.js.map +0 -1
  383. package/lib/tools/handlers/layout-mcp-tool-handler.d.ts.map +0 -1
  384. package/lib/tools/handlers/layout-mcp-tool-handler.js.map +0 -1
  385. package/lib/tools/handlers/modify-edges-mcp-tool-handler.d.ts.map +0 -1
  386. package/lib/tools/handlers/modify-edges-mcp-tool-handler.js.map +0 -1
  387. package/lib/tools/handlers/modify-nodes-mcp-tool-handler.d.ts.map +0 -1
  388. package/lib/tools/handlers/modify-nodes-mcp-tool-handler.js.map +0 -1
  389. package/lib/tools/handlers/query-elements-mcp-tool-handler.d.ts.map +0 -1
  390. package/lib/tools/handlers/query-elements-mcp-tool-handler.js.map +0 -1
  391. package/lib/tools/handlers/redo-mcp-tool-handler.d.ts.map +0 -1
  392. package/lib/tools/handlers/redo-mcp-tool-handler.js.map +0 -1
  393. package/lib/tools/handlers/save-model-mcp-tool-handler.d.ts.map +0 -1
  394. package/lib/tools/handlers/save-model-mcp-tool-handler.js.map +0 -1
  395. package/lib/tools/handlers/session-info-mcp-tool-handler.d.ts.map +0 -1
  396. package/lib/tools/handlers/session-info-mcp-tool-handler.js.map +0 -1
  397. package/lib/tools/handlers/set-selection-mcp-tool-handler.d.ts.map +0 -1
  398. package/lib/tools/handlers/set-selection-mcp-tool-handler.js.map +0 -1
  399. package/lib/tools/handlers/set-view-mcp-tool-handler.d.ts.map +0 -1
  400. package/lib/tools/handlers/set-view-mcp-tool-handler.js.map +0 -1
  401. package/lib/tools/handlers/undo-mcp-tool-handler.d.ts.map +0 -1
  402. package/lib/tools/handlers/undo-mcp-tool-handler.js.map +0 -1
  403. package/lib/tools/handlers/validate-diagram-mcp-tool-handler.d.ts.map +0 -1
  404. package/lib/tools/handlers/validate-diagram-mcp-tool-handler.js.map +0 -1
  405. package/lib/tools/index.d.ts +0 -34
  406. package/lib/tools/index.d.ts.map +0 -1
  407. package/lib/tools/index.js +0 -50
  408. package/lib/tools/index.js.map +0 -1
  409. package/lib/util/index.d.ts.map +0 -1
  410. package/lib/util/index.js.map +0 -1
  411. package/lib/util/markdown-util.d.ts.map +0 -1
  412. package/lib/util/markdown-util.js.map +0 -1
  413. package/lib/util/mcp-util.d.ts.map +0 -1
  414. package/lib/util/mcp-util.js.map +0 -1
  415. package/src/index.ts +0 -24
  416. package/src/server/index.ts +0 -42
  417. package/src/server/mcp-http-transport-e2e.spec.ts +0 -151
  418. package/src/server/mcp-http-transport.spec.ts +0 -385
  419. package/src/server/mcp-http-transport.ts +0 -368
  420. package/src/server/mcp-server-launcher.ts +0 -369
  421. package/src/tools/index.ts +0 -34
  422. /package/lib/{resources → common/resources}/services/element-types-provider.d.ts +0 -0
  423. /package/lib/{resources → common/resources}/services/element-types-provider.js +0 -0
  424. /package/lib/{resources → common/resources}/services/mcp-model-serializer.d.ts +0 -0
  425. /package/lib/{server → common/server}/lru-event-store.js +0 -0
  426. /package/lib/{server → common/server}/mcp-diagram-prompt-handler-registry.d.ts +0 -0
  427. /package/lib/{server → common/server}/mcp-diagram-prompt-handler-registry.js +0 -0
  428. /package/lib/{server → common/server}/mcp-diagram-resource-handler-registry.d.ts +0 -0
  429. /package/lib/{server → common/server}/mcp-diagram-tool-handler-registry.d.ts +0 -0
  430. /package/lib/{server → common/server}/mcp-handler-shared.d.ts +0 -0
  431. /package/lib/{server → common/server}/mcp-handler-shared.js +0 -0
  432. /package/lib/{server → common/server}/mcp-id-alias-service.d.ts +0 -0
  433. /package/lib/{server → common/server}/mcp-id-alias-service.js +0 -0
  434. /package/lib/{server → common/server}/mcp-label-provider.d.ts +0 -0
  435. /package/lib/{server → common/server}/mcp-label-provider.js +0 -0
  436. /package/lib/{server → common/server}/mcp-log-level-registry.js +0 -0
  437. /package/lib/{server → common/server}/mcp-mime-types.d.ts +0 -0
  438. /package/lib/{server → common/server}/mcp-mime-types.js +0 -0
  439. /package/lib/{server → common/server}/mcp-session.d.ts +0 -0
  440. /package/lib/{server → common/server}/mcp-session.js +0 -0
  441. /package/lib/{util → common/util}/markdown-util.d.ts +0 -0
  442. /package/lib/{util → common/util}/markdown-util.js +0 -0
  443. /package/lib/{util → common/util}/mcp-util.d.ts +0 -0
  444. /package/lib/{util → common/util}/mcp-util.js +0 -0
  445. /package/src/{resources → common/resources}/services/element-types-provider.ts +0 -0
  446. /package/src/{server → common/server}/glsp-mcp-server.spec.ts +0 -0
  447. /package/src/{server → common/server}/lru-event-store.spec.ts +0 -0
  448. /package/src/{server → common/server}/mcp-diagram-handler-dispatcher.spec.ts +0 -0
  449. /package/src/{server → common/server}/mcp-diagram-prompt-handler-registry.ts +0 -0
  450. /package/src/{server → common/server}/mcp-handler-shared.spec.ts +0 -0
  451. /package/src/{server → common/server}/mcp-handler-shared.ts +0 -0
  452. /package/src/{server → common/server}/mcp-id-alias-service.spec.ts +0 -0
  453. /package/src/{server → common/server}/mcp-id-alias-service.ts +0 -0
  454. /package/src/{server → common/server}/mcp-label-provider.ts +0 -0
  455. /package/src/{server → common/server}/mcp-log-level-registry.spec.ts +0 -0
  456. /package/src/{server → common/server}/mcp-mime-types.ts +0 -0
  457. /package/src/{server → common/server}/mcp-session.ts +0 -0
  458. /package/src/{tools → common/tools}/tool-annotations.spec.ts +0 -0
  459. /package/src/{util → common/util}/markdown-util.ts +0 -0
  460. /package/src/{util → common/util}/mcp-util.ts +0 -0
  461. /package/src/{server → node/server}/raw-http.spec.ts +0 -0
@@ -15,7 +15,8 @@
15
15
  ********************************************************************************/
16
16
  import { ClientSessionManager } from '@eclipse-glsp/server';
17
17
  import * as z from 'zod/v4';
18
- import { AbstractMcpToolHandler, McpToolResult } from '../../server';
18
+ import { McpToolResult } from '../../server/mcp-handler-shared';
19
+ import { AbstractMcpToolHandler } from '../../server/mcp-tool-handler';
19
20
  export declare const SessionInfoInputSchema: z.ZodObject<{
20
21
  sessionId: z.ZodOptional<z.ZodString>;
21
22
  }, z.core.$strip>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-info-mcp-tool-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/tools/handlers/session-info-mcp-tool-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,oBAAoB,EAA4B,MAAM,sBAAsB,CAAC;AAEtF,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAgB,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,eAAO,MAAM,sBAAsB;;iBAKjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,uBAAuB;;;;;;;;iBAElC,CAAC;AAEH,qBACa,yBAA0B,SAAQ,sBAAsB,CAAC,gBAAgB,CAAC;IACrD,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAEnF,MAAM,CAAC,QAAQ,CAAC,IAAI,kBAAkB;IACtC,QAAQ,CAAC,IAAI,kBAAkC;IAC/C,SAAkB,KAAK,uBAAuB;IAC9C,QAAQ,CAAC,WAAW,SAGmF;IACvG,QAAQ,CAAC,WAAW;;sBAA0B;IAC9C,SAAkB,YAAY;;;;;;;;sBAA2B;IAEzD,SAAS,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,gBAAgB,GAAG,aAAa;IAMtE,mHAAmH;IACnH,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,cAAc;IAa3G,gFAAgF;IAChF,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,MAAM;IAY3D,SAAS,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;CAO9F"}
@@ -29,7 +29,8 @@ exports.SessionInfoMcpToolHandler = exports.SessionInfoOutputSchema = exports.Se
29
29
  const server_1 = require("@eclipse-glsp/server");
30
30
  const inversify_1 = require("inversify");
31
31
  const z = require("zod/v4");
32
- const server_2 = require("../../server");
32
+ const mcp_handler_shared_1 = require("../../server/mcp-handler-shared");
33
+ const mcp_tool_handler_1 = require("../../server/mcp-tool-handler");
33
34
  exports.SessionInfoInputSchema = z.object({
34
35
  sessionId: z
35
36
  .string()
@@ -46,7 +47,7 @@ exports.SessionInfoRowSchema = z.object({
46
47
  exports.SessionInfoOutputSchema = z.object({
47
48
  sessions: z.array(exports.SessionInfoRowSchema)
48
49
  });
49
- let SessionInfoMcpToolHandler = SessionInfoMcpToolHandler_1 = class SessionInfoMcpToolHandler extends server_2.AbstractMcpToolHandler {
50
+ let SessionInfoMcpToolHandler = SessionInfoMcpToolHandler_1 = class SessionInfoMcpToolHandler extends mcp_tool_handler_1.AbstractMcpToolHandler {
50
51
  constructor() {
51
52
  super(...arguments);
52
53
  this.name = SessionInfoMcpToolHandler_1.NAME;
@@ -91,7 +92,7 @@ let SessionInfoMcpToolHandler = SessionInfoMcpToolHandler_1 = class SessionInfoM
91
92
  singleSession(sessionId) {
92
93
  const session = this.clientSessionManager.getSession(sessionId);
93
94
  if (!session) {
94
- throw new server_2.McpToolError(`Unknown sessionId: ${sessionId}`);
95
+ throw new mcp_handler_shared_1.McpToolError(`Unknown sessionId: ${sessionId}`);
95
96
  }
96
97
  return [session];
97
98
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-info-mcp-tool-handler.js","sourceRoot":"","sources":["../../../../src/common/tools/handlers/session-info-mcp-tool-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,iDAAsF;AACtF,yCAA+C;AAC/C,4BAA4B;AAC5B,wEAA8E;AAC9E,oEAAuE;AAE1D,QAAA,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uGAAuG,CAAC;CACzH,CAAC,CAAC;AAGU,QAAA,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,2EAA2E,CAAC;CAC3G,CAAC,CAAC;AAGU,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC;CAC1C,C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************************************************/
16
16
  import { ActionDispatcher } from '@eclipse-glsp/server';
17
17
  import * as z from 'zod/v4';
18
- import { AbstractMcpDiagramToolHandler, McpToolResult } from '../../server';
18
+ import { McpToolResult } from '../../server/mcp-handler-shared';
19
+ import { AbstractMcpDiagramToolHandler } from '../../server/mcp-tool-handler';
19
20
  export declare const SetSelectionInputSchema: z.ZodObject<{
20
21
  sessionId: z.ZodString;
21
22
  selectedElementIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-selection-mcp-tool-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/tools/handlers/set-selection-mcp-tool-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,gBAAgB,EAAiC,MAAM,sBAAsB,CAAC;AAEvF,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAE9E,eAAO,MAAM,uBAAuB;;;;;iBASlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AAEH;;;;;;;GAOG;AACH,qBACa,0BAA2B,SAAQ,6BAA6B,CAAC,iBAAiB,CAAC;IAC5F,MAAM,CAAC,QAAQ,CAAC,IAAI,mBAAmB;IACvC,QAAQ,CAAC,IAAI,mBAAmC;IAChD,SAAkB,KAAK,2BAA2B;IAClD,QAAQ,CAAC,WAAW,SAGgC;IACpD,QAAQ,CAAC,WAAW;;;;;sBAA2B;IAC/C,SAAkB,YAAY;;;;sBAA4B;IAC1D,SAAkB,YAAY,SAAS;IAEb,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;cAEvD,YAAY,CAAC,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IAoB5H,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM;CAO1F"}
@@ -29,12 +29,13 @@ exports.SetSelectionMcpToolHandler = exports.SetSelectionOutputSchema = exports.
29
29
  const server_1 = require("@eclipse-glsp/server");
30
30
  const inversify_1 = require("inversify");
31
31
  const z = require("zod/v4");
32
- const server_2 = require("../../server");
33
- exports.SetSelectionInputSchema = server_2.McpDiagramScopedInputSchema.extend({
34
- selectedElementIds: server_2.elementIds
32
+ const mcp_input_schemas_1 = require("../../server/mcp-input-schemas");
33
+ const mcp_tool_handler_1 = require("../../server/mcp-tool-handler");
34
+ exports.SetSelectionInputSchema = mcp_input_schemas_1.McpDiagramScopedInputSchema.extend({
35
+ selectedElementIds: mcp_input_schemas_1.elementIds
35
36
  .optional()
36
37
  .describe('Element IDs to select. Pass an empty array (or omit + set `clear: true`) to clear the selection.'),
37
- deselectedElementIds: server_2.elementIds.optional().describe('Element IDs to remove from the selection. Used to subtract without replacing.'),
38
+ deselectedElementIds: mcp_input_schemas_1.elementIds.optional().describe('Element IDs to remove from the selection. Used to subtract without replacing.'),
38
39
  clear: z
39
40
  .boolean()
40
41
  .optional()
@@ -53,7 +54,7 @@ exports.SetSelectionOutputSchema = z.object({
53
54
  * Read-write hint is honest: the viewport selection state is part of the client environment
54
55
  * even though the underlying GModel is unaffected.
55
56
  */
56
- let SetSelectionMcpToolHandler = SetSelectionMcpToolHandler_1 = class SetSelectionMcpToolHandler extends server_2.AbstractMcpDiagramToolHandler {
57
+ let SetSelectionMcpToolHandler = SetSelectionMcpToolHandler_1 = class SetSelectionMcpToolHandler extends mcp_tool_handler_1.AbstractMcpDiagramToolHandler {
57
58
  constructor() {
58
59
  super(...arguments);
59
60
  this.name = SetSelectionMcpToolHandler_1.NAME;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-selection-mcp-tool-handler.js","sourceRoot":"","sources":["../../../../src/common/tools/handlers/set-selection-mcp-tool-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,iDAAuF;AACvF,yCAA+C;AAC/C,4BAA4B;AAE5B,sEAAyF;AACzF,oEAA8E;AAEjE,QAAA,uBAAuB,GAAG,+CAA2B,CAAC,MAAM,CAAC;IACtE,kBAAkB,EAAE,8BAAU;SACzB,QAAQ,EAAE;SACV,QAAQ,CAAC,kGAAkG,CAAC;IACjH,oBAAoB,EAAE,8BAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+EAA+E,CAAC;IACrI,KAAK,EAAE,CAAC;SACH,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,6GAA6G,CAAC;CAC/H,CAAC,CAAC;AAGU,QAAA,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACxF,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IAC5F,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,6DAA6D,CAAC;CAC/F,CAAC,CAAC;AAEH;;;;;;;GAOG;AAEI,IAAM,0BAA0B,kCAAhC,MAAM,0BAA2B,SAAQ,gDAAgD;IAAzF;;QAEM,SAAI,GAAG,4BAA0B,CAAC,IAAI,CAAC;QAC9B,UAAK,GAAG,uBAAuB,CAAC;QACzC,gBAAW,GAChB,mFAAmF;YACnF,uFAAuF;YACvF,+CAA+C,CAAC;QAC3C,gBAAW,GAAG,+BAAuB,CAAC;QAC7B,iBAAY,GAAG,gCAAwB,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G,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,YAAY,QAAQ,CAAC,MAAM,WAAW,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QAC/G,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,cAAc,UAAU,CAAC,MAAM,WAAW,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACvH,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC;IACvE,CAAC;;AAxCQ,gEAA0B;AACnB,+BAAI,GAAG,eAAe,AAAlB,CAAmB;AAWH;IAAnC,IAAA,kBAAM,EAAC,yBAAgB,CAAC;;oEAA8C;qCAZ9D,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CAyCtC"}
@@ -15,7 +15,8 @@
15
15
  ********************************************************************************/
16
16
  import { Action, ActionDispatcher, Point } from '@eclipse-glsp/server';
17
17
  import * as z from 'zod/v4';
18
- import { AbstractMcpDiagramToolHandler, McpToolResult } from '../../server';
18
+ import { McpToolResult } from '../../server/mcp-handler-shared';
19
+ import { AbstractMcpDiagramToolHandler } from '../../server/mcp-tool-handler';
19
20
  export declare const VIEWPORT_ACTIONS: readonly ["fit-to-screen", "center-on-elements", "reset-viewport", "set-viewport"];
20
21
  export type ViewportAction = (typeof VIEWPORT_ACTIONS)[number];
21
22
  export declare const SetViewInputSchema: z.ZodObject<{
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-view-mcp-tool-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/tools/handlers/set-view-mcp-tool-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AA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AE,GAAG,MAAM;IAW3G;;;;;OAKG;cACa,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;CAsBrH"}
@@ -29,11 +29,13 @@ exports.SetViewMcpToolHandler = exports.SetViewOutputSchema = exports.SetViewInp
29
29
  const server_1 = require("@eclipse-glsp/server");
30
30
  const inversify_1 = require("inversify");
31
31
  const z = require("zod/v4");
32
- const server_2 = require("../../server");
32
+ const mcp_handler_shared_1 = require("../../server/mcp-handler-shared");
33
+ const mcp_input_schemas_1 = require("../../server/mcp-input-schemas");
34
+ const mcp_tool_handler_1 = require("../../server/mcp-tool-handler");
33
35
  exports.VIEWPORT_ACTIONS = ['fit-to-screen', 'center-on-elements', 'reset-viewport', 'set-viewport'];
34
- exports.SetViewInputSchema = server_2.McpDiagramScopedInputSchema.extend({
36
+ exports.SetViewInputSchema = mcp_input_schemas_1.McpDiagramScopedInputSchema.extend({
35
37
  action: z.enum(exports.VIEWPORT_ACTIONS).describe('The type of viewport change action to be undertaken.'),
36
- elementIds: server_2.elementIds
38
+ elementIds: mcp_input_schemas_1.elementIds
37
39
  .optional()
38
40
  .describe("Elements to center on or fit (relevant for 'center-on-elements' and 'fit-to-screen'). Omit to target the whole diagram."),
39
41
  zoom: z
@@ -43,7 +45,7 @@ exports.SetViewInputSchema = server_2.McpDiagramScopedInputSchema.extend({
43
45
  .optional()
44
46
  .describe("Absolute zoom level for `action: 'set-viewport'` (range 0.05..20, where 1 is 100% / native scale). " +
45
47
  'Ignored by other actions. Omit to keep the current zoom while changing scroll.'),
46
- scroll: server_2.position
48
+ scroll: mcp_input_schemas_1.position
47
49
  .optional()
48
50
  .describe("Absolute scroll position for `action: 'set-viewport'`, in diagram coordinates (top-left of the visible area). " +
49
51
  'Ignored by other actions. Omit to keep the current scroll while changing zoom.')
@@ -56,13 +58,13 @@ exports.SetViewOutputSchema = z.object({
56
58
  .describe("Aliased ids the action targeted (resolved from input or fall-back of all elements). Omitted for `'set-viewport'` since that action targets coordinates, not elements."),
57
59
  viewport: z
58
60
  .object({
59
- scroll: server_2.position,
61
+ scroll: mcp_input_schemas_1.position,
60
62
  zoom: z.number()
61
63
  })
62
64
  .optional()
63
65
  .describe("Resolved final viewport when `action: 'set-viewport'` was applied (current values merged with the supplied overrides).")
64
66
  });
65
- let SetViewMcpToolHandler = SetViewMcpToolHandler_1 = class SetViewMcpToolHandler extends server_2.AbstractMcpDiagramToolHandler {
67
+ let SetViewMcpToolHandler = SetViewMcpToolHandler_1 = class SetViewMcpToolHandler extends mcp_tool_handler_1.AbstractMcpDiagramToolHandler {
66
68
  constructor() {
67
69
  super(...arguments);
68
70
  /** Timeout (in ms) for the `GetViewportAction` round-trip used by `set-viewport` partial updates. Override via subclass + rebind. */
@@ -114,10 +116,10 @@ let SetViewMcpToolHandler = SetViewMcpToolHandler_1 = class SetViewMcpToolHandle
114
116
  */
115
117
  async applyExplicitViewport(zoom, scroll) {
116
118
  if (zoom === undefined && scroll === undefined) {
117
- throw new server_2.McpToolError("'set-viewport' requires at least one of `zoom` or `scroll`.");
119
+ throw new mcp_handler_shared_1.McpToolError("'set-viewport' requires at least one of `zoom` or `scroll`.");
118
120
  }
119
121
  const rootId = this.modelState.root.id;
120
- const current = await (0, server_2.requestActionOrFail)(this.actionDispatcher, server_1.GetViewportAction.create(), this.viewportQueryTimeoutMs, this.name);
122
+ const current = await (0, mcp_handler_shared_1.requestActionOrFail)(this.actionDispatcher, server_1.GetViewportAction.create(), this.viewportQueryTimeoutMs, this.name);
121
123
  // Some clients respond before layout completes — fall back to origin / 1× when fields are null.
122
124
  const newViewport = {
123
125
  scroll: scroll !== null && scroll !== void 0 ? scroll : (server_1.Point.isValid(current.viewport.scroll) ? current.viewport.scroll : server_1.Point.ORIGIN),
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-view-mcp-tool-handler.js","sourceRoot":"","sources":["../../../../src/common/tools/handlers/set-view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AAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;SACrF,CAAC;QACF,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,0BAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvG,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,WAAW,CAAC,MAAM,CAAC,CAAC,UAAU,WAAW,CAAC,IAAI,EAAE,EAAE;YACtH,MAAM,EAAE,cAAc;YACtB,QAAQ,EAAE,WAAW;SACxB,CAAC,CAAC;IACP,CAAC;;AA5EQ,sDAAqB;AAId,0BAAI,GAAG,UAAU,AAAb,CAAc;AAgBE;IAAnC,IAAA,kBAAM,EAAC,yBAAgB,CAAC;;+DAA8C;gCApB9D,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CA6EjC"}
@@ -15,7 +15,8 @@
15
15
  ********************************************************************************/
16
16
  import { CommandStack } from '@eclipse-glsp/server';
17
17
  import * as z from 'zod/v4';
18
- import { McpToolResult, OperationMcpDiagramToolHandler } from '../../server';
18
+ import { McpToolResult } from '../../server/mcp-handler-shared';
19
+ import { OperationMcpDiagramToolHandler } from '../../server/mcp-tool-handler';
19
20
  export declare const UndoInputSchema: z.ZodObject<{
20
21
  sessionId: z.ZodString;
21
22
  commandsToUndo: z.ZodDefault<z.ZodNumber>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo-mcp-tool-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/tools/handlers/undo-mcp-tool-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,YAAY,EAAc,MAAM,sBAAsB,CAAC;AAEhE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAgB,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAE9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAE/E,eAAO,MAAM,eAAe;;;iBAE1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC;AAEH;;GAEG;AACH,qBACa,kBAAmB,SAAQ,8BAA8B,CAAC,SAAS,CAAC;IAC7E,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,QAAQ,CAAC,IAAI,UAA2B;IACxC,SAAkB,KAAK,2BAA2B;IAClD,QAAQ,CAAC,WAAW,SAK2E;IAC/F,QAAQ,CAAC,WAAW;;;sBAAmB;IACvC,SAAkB,YAAY;;sBAAoB;IAE5B,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;cAE3C,YAAY,CAAC,EAAE,cAAc,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;CAWtF"}
@@ -29,8 +29,10 @@ exports.UndoMcpToolHandler = exports.UndoOutputSchema = exports.UndoInputSchema
29
29
  const server_1 = require("@eclipse-glsp/server");
30
30
  const inversify_1 = require("inversify");
31
31
  const z = require("zod/v4");
32
- const server_2 = require("../../server");
33
- exports.UndoInputSchema = server_2.McpDiagramScopedInputSchema.extend({
32
+ const mcp_handler_shared_1 = require("../../server/mcp-handler-shared");
33
+ const mcp_input_schemas_1 = require("../../server/mcp-input-schemas");
34
+ const mcp_tool_handler_1 = require("../../server/mcp-tool-handler");
35
+ exports.UndoInputSchema = mcp_input_schemas_1.McpDiagramScopedInputSchema.extend({
34
36
  commandsToUndo: z.number().min(1).default(1).describe('Number of commands to undo. Defaults to 1 (most recent command).')
35
37
  });
36
38
  exports.UndoOutputSchema = z.object({
@@ -39,7 +41,7 @@ exports.UndoOutputSchema = z.object({
39
41
  /**
40
42
  * Undo a given number of the most recent actions on the command stack.
41
43
  */
42
- let UndoMcpToolHandler = UndoMcpToolHandler_1 = class UndoMcpToolHandler extends server_2.OperationMcpDiagramToolHandler {
44
+ let UndoMcpToolHandler = UndoMcpToolHandler_1 = class UndoMcpToolHandler extends mcp_tool_handler_1.OperationMcpDiagramToolHandler {
43
45
  constructor() {
44
46
  super(...arguments);
45
47
  this.name = UndoMcpToolHandler_1.NAME;
@@ -54,7 +56,7 @@ let UndoMcpToolHandler = UndoMcpToolHandler_1 = class UndoMcpToolHandler extends
54
56
  }
55
57
  async createResult({ commandsToUndo }) {
56
58
  if (!this.commandStack.canUndo()) {
57
- throw new server_2.McpToolError('Nothing to undo (undo stack is empty; the model is at its initial state for this session).');
59
+ throw new mcp_handler_shared_1.McpToolError('Nothing to undo (undo stack is empty; the model is at its initial state for this session).');
58
60
  }
59
61
  for (let i = 0; i < commandsToUndo; i++) {
60
62
  await this.actionDispatcher.dispatch(server_1.UndoAction.create());
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo-mcp-tool-handler.js","sourceRoot":"","sources":["../../../../src/common/tools/handlers/undo-mcp-tool-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,iDAAgE;AAChE,yCAA+C;AAC/C,4BAA4B;AAC5B,wEAA8E;AAC9E,sEAA6E;AAC7E,oEAA+E;AAElE,QAAA,eAAe,GAAG,+CAA2B,CAAC,MAAM,CAAC;IAC9D,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kEAAkE,CAAC;CAC5H,CAAC,CAAC;AAGU,QAAA,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CACrF,CAAC,CAAC;AAEH;;GAEG;AAEI,IAAM,kBAAkB,0BAAxB,MAAM,kBAAmB,SAAQ,iDAAyC;IAA1E;;QAEM,SAAI,GAAG,oBAAkB,CAAC,IAAI,CAAC;QACtB,UAAK,GAAG,uBAAuB,CAAC;QACzC,gBAAW,GAChB,uDAAuD;YACvD,kGAAkG;YAClG,gIAAgI;YAChI,oGAAoG;YACpG,0FAA0F,CAAC;QACtF,gBAAW,GAAG,uBAAe,CAAC;QACrB,iBAAY,GAAG,wBAAgB,CAAC;IAetD,CAAC;IAXa,KAAK,CAAC,YAAY,CAAC,EAAE,cAAc,EAAa;QACtD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;YAC/B,MAAM,IAAI,iCAAY,CAAC,4FAA4F,CAAC,CAAC;QACzH,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,mBAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC,CAAC;IAC/E,CAAC;;AAzBQ,gDAAkB;AACX,uBAAI,GAAG,MAAM,AAAT,CAAU;AAYE;IAA/B,IAAA,kBAAM,EAAC,qBAAY,CAAC;;wDAAsC;6BAblD,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CA0B9B"}
@@ -15,7 +15,8 @@
15
15
  ********************************************************************************/
16
16
  import { ModelValidator } from '@eclipse-glsp/server';
17
17
  import * as z from 'zod/v4';
18
- import { AbstractMcpDiagramToolHandler, McpToolResult } from '../../server';
18
+ import { McpToolResult } from '../../server/mcp-handler-shared';
19
+ import { AbstractMcpDiagramToolHandler } from '../../server/mcp-tool-handler';
19
20
  export declare const ValidateDiagramInputSchema: z.ZodObject<{
20
21
  sessionId: z.ZodString;
21
22
  elementIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-diagram-mcp-tool-handler.d.ts","sourceRoot":"","sources":["../../../../src/common/tools/handlers/validate-diagram-mcp-tool-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAiB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAgB,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAE9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAG9E,eAAO,MAAM,0BAA0B;;;;;;;iBAWrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;iBAStC,CAAC;AAEH,qBACa,6BAA8B,SAAQ,6BAA6B,CAAC,oBAAoB,CAAC;IAClG,MAAM,CAAC,QAAQ,CAAC,IAAI,sBAAsB;IAC1C,QAAQ,CAAC,IAAI,sBAAsC;IACnD,SAAkB,KAAK,sBAAsB;IAC7C,QAAQ,CAAC,WAAW,SAM4G;IAChI,QAAQ,CAAC,WAAW;;;;;;;sBAA8B;IAClD,SAAkB,YAAY;;;;;;;sBAA+B;IAEzB,SAAS,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;cAEzD,YAAY,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;IAyBlG,SAAS,CAAC,kBAAkB,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;CAWrI"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-diagram-mcp-tool-handler.js","sourceRoot":"","sources":["../../../../src/common/tools/handlers/validate-diagram-mcp-tool-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,iDAAqE;AACrE,yCAAyD;AACzD,4BAA4B;AAC5B,wEAA8E;AAC9E,sEAAyF;AACzF,oEAA8E;AAC9E,4DAAsE;AAEzD,QAAA,0BAA0B,GAAG,+CAA2B,CAAC,MAAM,CAAC;IACzE,UAAU,EAAE,8BAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6DAA6D,CAAC;IACzG,MAAM,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,sBAAa,CAAC,KAAK,EAAE,sBAAa,CAAC,IAAI,CAAC,CAAC;SAC/C,QAAQ,EAAE;SACV,QAAQ,CACL,6EAA6E;QACzE,kFAAkF;QAClF,iFAAiF;QACjF,2BAA2B,CAClC;CACR,CAAC,CAAC;AAGU,QAAA,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,OAAO,EAAE,CAAC,CAAC,KAAK,CACZ,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mEAAmE,CAAC;QAC9F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;KACxB,CAAC,CACL;CACJ,CAAC,CAAC;AAGI,IAAM,6BAA6B,qCAAnC,MAAM,6BAA8B,SAAQ,gDAAmD;IAA/F;;QAEM,SAAI,GAAG,+BAA6B,CAAC,IAAI,CAAC;QACjC,UAAK,GAAG,kBAAkB,CAAC;QACpC,gBAAW,GAChB,0GAA0G;YAC1G,iGAAiG;YACjG,8FAA8F;YAC9F,iEAAiE;YACjE,qEAAqE;YACrE,2HAA2H,CAAC;QACvH,gBAAW,GAAG,kCAA0B,CAA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D;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAEjD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAA,0CAA0B,EAAC,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAES,kBAAkB,CAAoF,OAAY;QACxH,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,MAAM,MAAM,GAAQ,EAAE,CAAC;QACvB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;YACvF,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,SAAS;YAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;;AAnDQ,sEAA6B;AACtB,kCAAI,GAAG,kBAAkB,AAArB,CAAsB;AAaI;IAA7C,IAAA,kBAAM,EAAC,uBAAc,CAAC;IAAE,IAAA,oBAAQ,GAAE;;gEAAsC;wCAdhE,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAoDzC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-util.d.ts","sourceRoot":"","sources":["../../../src/common/util/markdown-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,MAAM,CAwB9E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-util.js","sourceRoot":"","sources":["../../../src/common/util/markdown-util.ts"],"names":[],"m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":["../../../src/common/util/mcp-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAGxE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-util.js","sourceRoot":"","sources":["../../../src/common/util/mcp-util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAOlF,4CAGC;AARD;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,IAAY,EAAE,OAAiB;IAC5D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,OAAO,mBAAmB,IAAI,eAAe,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACnG,CAAC"}
@@ -13,6 +13,8 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- export * from './handlers/describe-diagram-mcp-prompt-handler';
17
- export * from './handlers/suggest-improvements-mcp-prompt-handler';
16
+ export * from './modules/node-mcp-server-module';
17
+ export * from './reexport';
18
+ export * from './server/node-mcp-request-context';
19
+ export * from './server/node-mcp-server-launcher';
18
20
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,kCAAkC,CAAC;AACjD,cAAc,YAAY,CAAC;AAC3B,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC"}
@@ -29,8 +29,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
29
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
- __exportStar(require("./handlers/diagram-png-mcp-resource-handler"), exports);
33
- __exportStar(require("./handlers/diagram-svg-mcp-resource-handler"), exports);
34
- __exportStar(require("./services/element-types-provider"), exports);
35
- __exportStar(require("./services/mcp-model-serializer"), exports);
32
+ __exportStar(require("./modules/node-mcp-server-module"), exports);
33
+ __exportStar(require("./reexport"), exports);
34
+ __exportStar(require("./server/node-mcp-request-context"), exports);
35
+ __exportStar(require("./server/node-mcp-server-launcher"), exports);
36
36
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,mEAAiD;AACjD,6CAA2B;AAC3B,oEAAkD;AAClD,oEAAkD"}
@@ -0,0 +1,37 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { BindingTarget } from '@eclipse-glsp/server';
17
+ import { AbstractMcpServerModule } from '../../common/modules/abstract-mcp-server-module';
18
+ import { AbstractMcpServerLauncher } from '../../common/server/abstract-mcp-server-launcher';
19
+ import { McpServerDefaults } from '../../common/server/mcp-options';
20
+ import { McpRequestContext } from '../../common/server/mcp-request-context';
21
+ /**
22
+ * Default {@link AbstractMcpServerModule} entry point for Node hosts. Ships GLSP-default option
23
+ * values (see {@link DEFAULT_OPTIONS}) on top of the abstract module's hook defaults, and binds
24
+ * the Node-flavored {@link NodeMcpServerLauncher} + {@link NodeMcpRequestContext}. Adopter-provided
25
+ * overrides via the constructor merge on top.
26
+ *
27
+ * @experimental The MCP integration is under active development. Option names, schema shapes,
28
+ * and handler contracts MAY change in minor releases until the feature graduates from
29
+ * experimental status.
30
+ */
31
+ export declare class NodeMcpServerModule extends AbstractMcpServerModule {
32
+ static readonly DEFAULT_OPTIONS: McpServerDefaults;
33
+ constructor(overrides?: McpServerDefaults);
34
+ protected bindMcpServerLauncher(): BindingTarget<AbstractMcpServerLauncher>;
35
+ protected bindMcpRequestContext(): BindingTarget<McpRequestContext>;
36
+ }
37
+ //# sourceMappingURL=node-mcp-server-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-mcp-server-module.d.ts","sourceRoot":"","sources":["../../../src/node/modules/node-mcp-server-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAuB,MAAM,iDAAiD,CAAC;AAC/G,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAI5E;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,uBAAuB;IAC5D,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAOhD;gBAEU,SAAS,GAAE,iBAAsB;cAI1B,qBAAqB,IAAI,aAAa,CAAC,yBAAyB,CAAC;cAIjE,qBAAqB,IAAI,aAAa,CAAC,iBAAiB,CAAC;CAG/E"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.NodeMcpServerModule = void 0;
19
+ const abstract_mcp_server_module_1 = require("../../common/modules/abstract-mcp-server-module");
20
+ const node_mcp_server_launcher_1 = require("../server/node-mcp-server-launcher");
21
+ const node_mcp_request_context_1 = require("../server/node-mcp-request-context");
22
+ /**
23
+ * Default {@link AbstractMcpServerModule} entry point for Node hosts. Ships GLSP-default option
24
+ * values (see {@link DEFAULT_OPTIONS}) on top of the abstract module's hook defaults, and binds
25
+ * the Node-flavored {@link NodeMcpServerLauncher} + {@link NodeMcpRequestContext}. Adopter-provided
26
+ * overrides via the constructor merge on top.
27
+ *
28
+ * @experimental The MCP integration is under active development. Option names, schema shapes,
29
+ * and handler contracts MAY change in minor releases until the feature graduates from
30
+ * experimental status.
31
+ */
32
+ class NodeMcpServerModule extends abstract_mcp_server_module_1.AbstractMcpServerModule {
33
+ constructor(overrides = {}) {
34
+ super({ ...NodeMcpServerModule.DEFAULT_OPTIONS, ...overrides });
35
+ }
36
+ bindMcpServerLauncher() {
37
+ return node_mcp_server_launcher_1.NodeMcpServerLauncher;
38
+ }
39
+ bindMcpRequestContext() {
40
+ return node_mcp_request_context_1.NodeMcpRequestContext;
41
+ }
42
+ }
43
+ exports.NodeMcpServerModule = NodeMcpServerModule;
44
+ NodeMcpServerModule.DEFAULT_OPTIONS = {
45
+ ...abstract_mcp_server_module_1.DEFAULT_MCP_OPTIONS,
46
+ host: '127.0.0.1',
47
+ allowedHosts: ['127.0.0.1', 'localhost']
48
+ // `allowedOrigins` deliberately undefined: accept absent Origin (typical for desktop-IDE
49
+ // MCP clients) and rely on Host validation to gate DNS-rebinding. Adopters whose
50
+ // deployment is browser-fronted set this explicitly to their frontend's origin.
51
+ };
52
+ //# sourceMappingURL=node-mcp-server-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-mcp-server-module.js","sourceRoot":"","sources":["../../../src/node/modules/node-mcp-server-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,gGAA+G;AAI/G,iFAA2E;AAC3E,iFAA2E;AAE3E;;;;;;;;;GASG;AACH,MAAa,mBAAoB,SAAQ,oDAAuB;IAU5D,YAAY,YAA+B,EAAE;QACzC,KAAK,CAAC,EAAE,GAAG,mBAAmB,CAAC,eAAe,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACpE,CAAC;IAEkB,qBAAqB;QACpC,OAAO,gDAAqB,CAAC;IACjC,CAAC;IAEkB,qBAAqB;QACpC,OAAO,gDAAqB,CAAC;IACjC,CAAC;;AApBL,kDAqBC;AApBmB,mCAAe,GAAsB;IACjD,GAAG,gDAAmB;IACtB,IAAI,EAAE,WAAW;IACjB,YAAY,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IACxC,yFAAyF;IACzF,iFAAiF;IACjF,gFAAgF;CACnF,CAAC"}
@@ -0,0 +1,17 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ export * from '../common';
17
+ //# sourceMappingURL=reexport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reexport.d.ts","sourceRoot":"","sources":["../../src/node/reexport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,WAAW,CAAC"}
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- /********************************************************************************
3
- * Copyright (c) 2026 EclipseSource and others.
4
- *
5
- * This program and the accompanying materials are made available under the
6
- * terms of the Eclipse Public License v. 2.0 which is available at
7
- * http://www.eclipse.org/legal/epl-2.0.
8
- *
9
- * This Source Code may also be made available under the following Secondary
10
- * Licenses when the conditions for such availability set forth in the Eclipse
11
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- * with the GNU Classpath Exception which is available at
13
- * https://www.gnu.org/software/classpath/license.html.
14
- *
15
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- ********************************************************************************/
17
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
3
  if (k2 === undefined) k2 = k;
19
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -29,6 +14,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
15
  };
31
16
  Object.defineProperty(exports, "__esModule", { value: true });
32
- __exportStar(require("./handlers/describe-diagram-mcp-prompt-handler"), exports);
33
- __exportStar(require("./handlers/suggest-improvements-mcp-prompt-handler"), exports);
34
- //# sourceMappingURL=index.js.map
17
+ /********************************************************************************
18
+ * Copyright (c) 2026 EclipseSource and others.
19
+ *
20
+ * This program and the accompanying materials are made available under the
21
+ * terms of the Eclipse Public License v. 2.0 which is available at
22
+ * http://www.eclipse.org/legal/epl-2.0.
23
+ *
24
+ * This Source Code may also be made available under the following Secondary
25
+ * Licenses when the conditions for such availability set forth in the Eclipse
26
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
27
+ * with the GNU Classpath Exception which is available at
28
+ * https://www.gnu.org/software/classpath/license.html.
29
+ *
30
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
31
+ ********************************************************************************/
32
+ __exportStar(require("../common"), exports);
33
+ //# sourceMappingURL=reexport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reexport.js","sourceRoot":"","sources":["../../src/node/reexport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4CAA0B"}
@@ -0,0 +1,24 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { AsyncLocalStorage } from 'async_hooks';
17
+ import { McpRequestContext, McpRequestExtra } from '../../common/server/mcp-request-context';
18
+ /** {@link McpRequestContext} backed by native `AsyncLocalStorage`; frame survives across `await`. */
19
+ export declare class NodeMcpRequestContext implements McpRequestContext {
20
+ protected storage: AsyncLocalStorage<McpRequestExtra>;
21
+ run<R>(extra: McpRequestExtra, callback: () => R): R;
22
+ getStore(): McpRequestExtra | undefined;
23
+ }
24
+ //# sourceMappingURL=node-mcp-request-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-mcp-request-context.d.ts","sourceRoot":"","sources":["../../../src/node/server/node-mcp-request-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE7F,qGAAqG;AACrG,qBACa,qBAAsB,YAAW,iBAAiB;IAC3D,SAAS,CAAC,OAAO,qCAA4C;IAE7D,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC;IAIpD,QAAQ,IAAI,eAAe,GAAG,SAAS;CAG1C"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.NodeMcpRequestContext = void 0;
25
+ const async_hooks_1 = require("async_hooks");
26
+ const inversify_1 = require("inversify");
27
+ /** {@link McpRequestContext} backed by native `AsyncLocalStorage`; frame survives across `await`. */
28
+ let NodeMcpRequestContext = class NodeMcpRequestContext {
29
+ constructor() {
30
+ this.storage = new async_hooks_1.AsyncLocalStorage();
31
+ }
32
+ run(extra, callback) {
33
+ return this.storage.run(extra, callback);
34
+ }
35
+ getStore() {
36
+ return this.storage.getStore();
37
+ }
38
+ };
39
+ exports.NodeMcpRequestContext = NodeMcpRequestContext;
40
+ exports.NodeMcpRequestContext = NodeMcpRequestContext = __decorate([
41
+ (0, inversify_1.injectable)()
42
+ ], NodeMcpRequestContext);
43
+ //# sourceMappingURL=node-mcp-request-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-mcp-request-context.js","sourceRoot":"","sources":["../../../src/node/server/node-mcp-request-context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,6CAAgD;AAChD,yCAAuC;AAGvC,qGAAqG;AAE9F,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAA3B;QACO,YAAO,GAAG,IAAI,+BAAiB,EAAmB,CAAC;IASjE,CAAC;IAPG,GAAG,CAAI,KAAsB,EAAE,QAAiB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IACnC,CAAC;CACJ,CAAA;AAVY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CAUjC"}