@eclipse-glsp/server-mcp 2.7.0-next.9

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 (303) hide show
  1. package/LICENSE +642 -0
  2. package/README.md +57 -0
  3. package/lib/index.d.ts +23 -0
  4. package/lib/index.d.ts.map +1 -0
  5. package/lib/index.js +41 -0
  6. package/lib/index.js.map +1 -0
  7. package/lib/prompts/handlers/describe-diagram-mcp-prompt-handler.d.ts +43 -0
  8. package/lib/prompts/handlers/describe-diagram-mcp-prompt-handler.d.ts.map +1 -0
  9. package/lib/prompts/handlers/describe-diagram-mcp-prompt-handler.js +96 -0
  10. package/lib/prompts/handlers/describe-diagram-mcp-prompt-handler.js.map +1 -0
  11. package/lib/prompts/handlers/suggest-improvements-mcp-prompt-handler.d.ts +43 -0
  12. package/lib/prompts/handlers/suggest-improvements-mcp-prompt-handler.d.ts.map +1 -0
  13. package/lib/prompts/handlers/suggest-improvements-mcp-prompt-handler.js +95 -0
  14. package/lib/prompts/handlers/suggest-improvements-mcp-prompt-handler.js.map +1 -0
  15. package/lib/prompts/index.d.ts +18 -0
  16. package/lib/prompts/index.d.ts.map +1 -0
  17. package/lib/prompts/index.js +34 -0
  18. package/lib/prompts/index.js.map +1 -0
  19. package/lib/resources/handlers/diagram-png-mcp-resource-handler.d.ts +81 -0
  20. package/lib/resources/handlers/diagram-png-mcp-resource-handler.d.ts.map +1 -0
  21. package/lib/resources/handlers/diagram-png-mcp-resource-handler.js +174 -0
  22. package/lib/resources/handlers/diagram-png-mcp-resource-handler.js.map +1 -0
  23. package/lib/resources/handlers/diagram-svg-mcp-resource-handler.d.ts +52 -0
  24. package/lib/resources/handlers/diagram-svg-mcp-resource-handler.d.ts.map +1 -0
  25. package/lib/resources/handlers/diagram-svg-mcp-resource-handler.js +96 -0
  26. package/lib/resources/handlers/diagram-svg-mcp-resource-handler.js.map +1 -0
  27. package/lib/resources/index.d.ts +20 -0
  28. package/lib/resources/index.d.ts.map +1 -0
  29. package/lib/resources/index.js +36 -0
  30. package/lib/resources/index.js.map +1 -0
  31. package/lib/resources/services/element-types-provider.d.ts +65 -0
  32. package/lib/resources/services/element-types-provider.d.ts.map +1 -0
  33. package/lib/resources/services/element-types-provider.js +81 -0
  34. package/lib/resources/services/element-types-provider.js.map +1 -0
  35. package/lib/resources/services/mcp-model-serializer.d.ts +78 -0
  36. package/lib/resources/services/mcp-model-serializer.d.ts.map +1 -0
  37. package/lib/resources/services/mcp-model-serializer.js +188 -0
  38. package/lib/resources/services/mcp-model-serializer.js.map +1 -0
  39. package/lib/server/glsp-mcp-server.d.ts +82 -0
  40. package/lib/server/glsp-mcp-server.d.ts.map +1 -0
  41. package/lib/server/glsp-mcp-server.js +140 -0
  42. package/lib/server/glsp-mcp-server.js.map +1 -0
  43. package/lib/server/index.d.ts +37 -0
  44. package/lib/server/index.d.ts.map +1 -0
  45. package/lib/server/index.js +57 -0
  46. package/lib/server/index.js.map +1 -0
  47. package/lib/server/lru-event-store.d.ts +53 -0
  48. package/lib/server/lru-event-store.d.ts.map +1 -0
  49. package/lib/server/lru-event-store.js +100 -0
  50. package/lib/server/lru-event-store.js.map +1 -0
  51. package/lib/server/mcp-diagram-handler-dispatcher.d.ts +144 -0
  52. package/lib/server/mcp-diagram-handler-dispatcher.d.ts.map +1 -0
  53. package/lib/server/mcp-diagram-handler-dispatcher.js +382 -0
  54. package/lib/server/mcp-diagram-handler-dispatcher.js.map +1 -0
  55. package/lib/server/mcp-diagram-module.d.ts +123 -0
  56. package/lib/server/mcp-diagram-module.d.ts.map +1 -0
  57. package/lib/server/mcp-diagram-module.js +186 -0
  58. package/lib/server/mcp-diagram-module.js.map +1 -0
  59. package/lib/server/mcp-diagram-prompt-handler-registry.d.ts +33 -0
  60. package/lib/server/mcp-diagram-prompt-handler-registry.d.ts.map +1 -0
  61. package/lib/server/mcp-diagram-prompt-handler-registry.js +76 -0
  62. package/lib/server/mcp-diagram-prompt-handler-registry.js.map +1 -0
  63. package/lib/server/mcp-diagram-resource-handler-registry.d.ts +35 -0
  64. package/lib/server/mcp-diagram-resource-handler-registry.d.ts.map +1 -0
  65. package/lib/server/mcp-diagram-resource-handler-registry.js +94 -0
  66. package/lib/server/mcp-diagram-resource-handler-registry.js.map +1 -0
  67. package/lib/server/mcp-diagram-tool-handler-registry.d.ts +57 -0
  68. package/lib/server/mcp-diagram-tool-handler-registry.d.ts.map +1 -0
  69. package/lib/server/mcp-diagram-tool-handler-registry.js +111 -0
  70. package/lib/server/mcp-diagram-tool-handler-registry.js.map +1 -0
  71. package/lib/server/mcp-handler-shared.d.ts +142 -0
  72. package/lib/server/mcp-handler-shared.d.ts.map +1 -0
  73. package/lib/server/mcp-handler-shared.js +199 -0
  74. package/lib/server/mcp-handler-shared.js.map +1 -0
  75. package/lib/server/mcp-http-transport.d.ts +93 -0
  76. package/lib/server/mcp-http-transport.d.ts.map +1 -0
  77. package/lib/server/mcp-http-transport.js +350 -0
  78. package/lib/server/mcp-http-transport.js.map +1 -0
  79. package/lib/server/mcp-id-alias-service.d.ts +70 -0
  80. package/lib/server/mcp-id-alias-service.d.ts.map +1 -0
  81. package/lib/server/mcp-id-alias-service.js +85 -0
  82. package/lib/server/mcp-id-alias-service.js.map +1 -0
  83. package/lib/server/mcp-input-schemas.d.ts +73 -0
  84. package/lib/server/mcp-input-schemas.d.ts.map +1 -0
  85. package/lib/server/mcp-input-schemas.js +67 -0
  86. package/lib/server/mcp-input-schemas.js.map +1 -0
  87. package/lib/server/mcp-label-provider.d.ts +45 -0
  88. package/lib/server/mcp-label-provider.d.ts.map +1 -0
  89. package/lib/server/mcp-label-provider.js +42 -0
  90. package/lib/server/mcp-label-provider.js.map +1 -0
  91. package/lib/server/mcp-log-level-registry.d.ts +54 -0
  92. package/lib/server/mcp-log-level-registry.d.ts.map +1 -0
  93. package/lib/server/mcp-log-level-registry.js +80 -0
  94. package/lib/server/mcp-log-level-registry.js.map +1 -0
  95. package/lib/server/mcp-logger.d.ts +59 -0
  96. package/lib/server/mcp-logger.d.ts.map +1 -0
  97. package/lib/server/mcp-logger.js +104 -0
  98. package/lib/server/mcp-logger.js.map +1 -0
  99. package/lib/server/mcp-mime-types.d.ts +28 -0
  100. package/lib/server/mcp-mime-types.d.ts.map +1 -0
  101. package/lib/server/mcp-mime-types.js +18 -0
  102. package/lib/server/mcp-mime-types.js.map +1 -0
  103. package/lib/server/mcp-options.d.ts +39 -0
  104. package/lib/server/mcp-options.d.ts.map +1 -0
  105. package/lib/server/mcp-options.js +53 -0
  106. package/lib/server/mcp-options.js.map +1 -0
  107. package/lib/server/mcp-progress-reporter.d.ts +48 -0
  108. package/lib/server/mcp-progress-reporter.d.ts.map +1 -0
  109. package/lib/server/mcp-progress-reporter.js +66 -0
  110. package/lib/server/mcp-progress-reporter.js.map +1 -0
  111. package/lib/server/mcp-prompt-handler.d.ts +120 -0
  112. package/lib/server/mcp-prompt-handler.d.ts.map +1 -0
  113. package/lib/server/mcp-prompt-handler.js +131 -0
  114. package/lib/server/mcp-prompt-handler.js.map +1 -0
  115. package/lib/server/mcp-request-context.d.ts +37 -0
  116. package/lib/server/mcp-request-context.d.ts.map +1 -0
  117. package/lib/server/mcp-request-context.js +37 -0
  118. package/lib/server/mcp-request-context.js.map +1 -0
  119. package/lib/server/mcp-resource-handler.d.ts +212 -0
  120. package/lib/server/mcp-resource-handler.d.ts.map +1 -0
  121. package/lib/server/mcp-resource-handler.js +298 -0
  122. package/lib/server/mcp-resource-handler.js.map +1 -0
  123. package/lib/server/mcp-server-launcher.d.ts +143 -0
  124. package/lib/server/mcp-server-launcher.d.ts.map +1 -0
  125. package/lib/server/mcp-server-launcher.js +355 -0
  126. package/lib/server/mcp-server-launcher.js.map +1 -0
  127. package/lib/server/mcp-server-module.d.ts +143 -0
  128. package/lib/server/mcp-server-module.d.ts.map +1 -0
  129. package/lib/server/mcp-server-module.js +249 -0
  130. package/lib/server/mcp-server-module.js.map +1 -0
  131. package/lib/server/mcp-session.d.ts +44 -0
  132. package/lib/server/mcp-session.d.ts.map +1 -0
  133. package/lib/server/mcp-session.js +18 -0
  134. package/lib/server/mcp-session.js.map +1 -0
  135. package/lib/server/mcp-tool-handler.d.ts +259 -0
  136. package/lib/server/mcp-tool-handler.d.ts.map +1 -0
  137. package/lib/server/mcp-tool-handler.js +355 -0
  138. package/lib/server/mcp-tool-handler.js.map +1 -0
  139. package/lib/tools/handlers/count-elements-mcp-tool-handler.d.ts +46 -0
  140. package/lib/tools/handlers/count-elements-mcp-tool-handler.d.ts.map +1 -0
  141. package/lib/tools/handlers/count-elements-mcp-tool-handler.js +76 -0
  142. package/lib/tools/handlers/count-elements-mcp-tool-handler.js.map +1 -0
  143. package/lib/tools/handlers/create-edges-mcp-tool-handler.d.ts +112 -0
  144. package/lib/tools/handlers/create-edges-mcp-tool-handler.d.ts.map +1 -0
  145. package/lib/tools/handlers/create-edges-mcp-tool-handler.js +190 -0
  146. package/lib/tools/handlers/create-edges-mcp-tool-handler.js.map +1 -0
  147. package/lib/tools/handlers/create-nodes-mcp-tool-handler.d.ts +81 -0
  148. package/lib/tools/handlers/create-nodes-mcp-tool-handler.d.ts.map +1 -0
  149. package/lib/tools/handlers/create-nodes-mcp-tool-handler.js +123 -0
  150. package/lib/tools/handlers/create-nodes-mcp-tool-handler.js.map +1 -0
  151. package/lib/tools/handlers/delete-elements-mcp-tool-handler.d.ts +52 -0
  152. package/lib/tools/handlers/delete-elements-mcp-tool-handler.d.ts.map +1 -0
  153. package/lib/tools/handlers/delete-elements-mcp-tool-handler.js +73 -0
  154. package/lib/tools/handlers/delete-elements-mcp-tool-handler.js.map +1 -0
  155. package/lib/tools/handlers/diagram-model-mcp-tool-handler.d.ts +59 -0
  156. package/lib/tools/handlers/diagram-model-mcp-tool-handler.d.ts.map +1 -0
  157. package/lib/tools/handlers/diagram-model-mcp-tool-handler.js +78 -0
  158. package/lib/tools/handlers/diagram-model-mcp-tool-handler.js.map +1 -0
  159. package/lib/tools/handlers/element-types-mcp-tool-handler.d.ts +97 -0
  160. package/lib/tools/handlers/element-types-mcp-tool-handler.d.ts.map +1 -0
  161. package/lib/tools/handlers/element-types-mcp-tool-handler.js +155 -0
  162. package/lib/tools/handlers/element-types-mcp-tool-handler.js.map +1 -0
  163. package/lib/tools/handlers/get-selection-mcp-tool-handler.d.ts +43 -0
  164. package/lib/tools/handlers/get-selection-mcp-tool-handler.d.ts.map +1 -0
  165. package/lib/tools/handlers/get-selection-mcp-tool-handler.js +68 -0
  166. package/lib/tools/handlers/get-selection-mcp-tool-handler.js.map +1 -0
  167. package/lib/tools/handlers/layout-mcp-tool-handler.d.ts +43 -0
  168. package/lib/tools/handlers/layout-mcp-tool-handler.d.ts.map +1 -0
  169. package/lib/tools/handlers/layout-mcp-tool-handler.js +71 -0
  170. package/lib/tools/handlers/layout-mcp-tool-handler.js.map +1 -0
  171. package/lib/tools/handlers/modify-edges-mcp-tool-handler.d.ts +78 -0
  172. package/lib/tools/handlers/modify-edges-mcp-tool-handler.d.ts.map +1 -0
  173. package/lib/tools/handlers/modify-edges-mcp-tool-handler.js +136 -0
  174. package/lib/tools/handlers/modify-edges-mcp-tool-handler.js.map +1 -0
  175. package/lib/tools/handlers/modify-nodes-mcp-tool-handler.d.ts +92 -0
  176. package/lib/tools/handlers/modify-nodes-mcp-tool-handler.d.ts.map +1 -0
  177. package/lib/tools/handlers/modify-nodes-mcp-tool-handler.js +125 -0
  178. package/lib/tools/handlers/modify-nodes-mcp-tool-handler.js.map +1 -0
  179. package/lib/tools/handlers/query-elements-mcp-tool-handler.d.ts +102 -0
  180. package/lib/tools/handlers/query-elements-mcp-tool-handler.d.ts.map +1 -0
  181. package/lib/tools/handlers/query-elements-mcp-tool-handler.js +158 -0
  182. package/lib/tools/handlers/query-elements-mcp-tool-handler.js.map +1 -0
  183. package/lib/tools/handlers/redo-mcp-tool-handler.d.ts +45 -0
  184. package/lib/tools/handlers/redo-mcp-tool-handler.d.ts.map +1 -0
  185. package/lib/tools/handlers/redo-mcp-tool-handler.js +73 -0
  186. package/lib/tools/handlers/redo-mcp-tool-handler.js.map +1 -0
  187. package/lib/tools/handlers/save-model-mcp-tool-handler.d.ts +55 -0
  188. package/lib/tools/handlers/save-model-mcp-tool-handler.d.ts.map +1 -0
  189. package/lib/tools/handlers/save-model-mcp-tool-handler.js +91 -0
  190. package/lib/tools/handlers/save-model-mcp-tool-handler.js.map +1 -0
  191. package/lib/tools/handlers/session-info-mcp-tool-handler.d.ts +65 -0
  192. package/lib/tools/handlers/session-info-mcp-tool-handler.d.ts.map +1 -0
  193. package/lib/tools/handlers/session-info-mcp-tool-handler.js +108 -0
  194. package/lib/tools/handlers/session-info-mcp-tool-handler.js.map +1 -0
  195. package/lib/tools/handlers/set-selection-mcp-tool-handler.d.ts +60 -0
  196. package/lib/tools/handlers/set-selection-mcp-tool-handler.d.ts.map +1 -0
  197. package/lib/tools/handlers/set-selection-mcp-tool-handler.js +103 -0
  198. package/lib/tools/handlers/set-selection-mcp-tool-handler.js.map +1 -0
  199. package/lib/tools/handlers/set-view-mcp-tool-handler.d.ts +110 -0
  200. package/lib/tools/handlers/set-view-mcp-tool-handler.d.ts.map +1 -0
  201. package/lib/tools/handlers/set-view-mcp-tool-handler.js +142 -0
  202. package/lib/tools/handlers/set-view-mcp-tool-handler.js.map +1 -0
  203. package/lib/tools/handlers/undo-mcp-tool-handler.d.ts +45 -0
  204. package/lib/tools/handlers/undo-mcp-tool-handler.d.ts.map +1 -0
  205. package/lib/tools/handlers/undo-mcp-tool-handler.js +74 -0
  206. package/lib/tools/handlers/undo-mcp-tool-handler.js.map +1 -0
  207. package/lib/tools/handlers/validate-diagram-mcp-tool-handler.d.ts +66 -0
  208. package/lib/tools/handlers/validate-diagram-mcp-tool-handler.d.ts.map +1 -0
  209. package/lib/tools/handlers/validate-diagram-mcp-tool-handler.js +0 -0
  210. package/lib/tools/handlers/validate-diagram-mcp-tool-handler.js.map +1 -0
  211. package/lib/tools/index.d.ts +34 -0
  212. package/lib/tools/index.d.ts.map +1 -0
  213. package/lib/tools/index.js +50 -0
  214. package/lib/tools/index.js.map +1 -0
  215. package/lib/util/index.d.ts +18 -0
  216. package/lib/util/index.d.ts.map +1 -0
  217. package/lib/util/index.js +34 -0
  218. package/lib/util/index.js.map +1 -0
  219. package/lib/util/markdown-util.d.ts +20 -0
  220. package/lib/util/markdown-util.d.ts.map +1 -0
  221. package/lib/util/markdown-util.js +45 -0
  222. package/lib/util/markdown-util.js.map +1 -0
  223. package/lib/util/mcp-util.d.ts +22 -0
  224. package/lib/util/mcp-util.d.ts.map +1 -0
  225. package/lib/util/mcp-util.js +29 -0
  226. package/lib/util/mcp-util.js.map +1 -0
  227. package/package.json +63 -0
  228. package/src/index.ts +24 -0
  229. package/src/prompts/handlers/describe-diagram-mcp-prompt-handler.ts +89 -0
  230. package/src/prompts/handlers/suggest-improvements-mcp-prompt-handler.ts +86 -0
  231. package/src/prompts/index.ts +18 -0
  232. package/src/resources/handlers/diagram-png-mcp-resource-handler.ts +181 -0
  233. package/src/resources/handlers/diagram-svg-mcp-resource-handler.ts +89 -0
  234. package/src/resources/index.ts +20 -0
  235. package/src/resources/services/element-types-provider.ts +105 -0
  236. package/src/resources/services/mcp-model-serializer.ts +211 -0
  237. package/src/server/glsp-mcp-server.spec.ts +73 -0
  238. package/src/server/glsp-mcp-server.ts +196 -0
  239. package/src/server/index.ts +42 -0
  240. package/src/server/lru-event-store.spec.ts +121 -0
  241. package/src/server/lru-event-store.ts +112 -0
  242. package/src/server/mcp-diagram-handler-dispatcher.spec.ts +231 -0
  243. package/src/server/mcp-diagram-handler-dispatcher.ts +459 -0
  244. package/src/server/mcp-diagram-module.ts +248 -0
  245. package/src/server/mcp-diagram-prompt-handler-registry.ts +59 -0
  246. package/src/server/mcp-diagram-resource-handler-registry.ts +73 -0
  247. package/src/server/mcp-diagram-tool-handler-registry.ts +97 -0
  248. package/src/server/mcp-handler-shared.spec.ts +53 -0
  249. package/src/server/mcp-handler-shared.ts +247 -0
  250. package/src/server/mcp-http-transport-e2e.spec.ts +151 -0
  251. package/src/server/mcp-http-transport.spec.ts +385 -0
  252. package/src/server/mcp-http-transport.ts +368 -0
  253. package/src/server/mcp-id-alias-service.spec.ts +106 -0
  254. package/src/server/mcp-id-alias-service.ts +104 -0
  255. package/src/server/mcp-input-schemas.ts +82 -0
  256. package/src/server/mcp-label-provider.ts +52 -0
  257. package/src/server/mcp-log-level-registry.spec.ts +75 -0
  258. package/src/server/mcp-log-level-registry.ts +90 -0
  259. package/src/server/mcp-logger.spec.ts +227 -0
  260. package/src/server/mcp-logger.ts +91 -0
  261. package/src/server/mcp-mime-types.ts +31 -0
  262. package/src/server/mcp-options.ts +43 -0
  263. package/src/server/mcp-progress-reporter.spec.ts +93 -0
  264. package/src/server/mcp-progress-reporter.ts +67 -0
  265. package/src/server/mcp-prompt-handler.ts +157 -0
  266. package/src/server/mcp-request-context.ts +39 -0
  267. package/src/server/mcp-resource-handler.ts +389 -0
  268. package/src/server/mcp-server-launcher.spec.ts +173 -0
  269. package/src/server/mcp-server-launcher.ts +369 -0
  270. package/src/server/mcp-server-module.ts +287 -0
  271. package/src/server/mcp-session.ts +45 -0
  272. package/src/server/mcp-tool-handler.spec.ts +182 -0
  273. package/src/server/mcp-tool-handler.ts +431 -0
  274. package/src/server/raw-http.spec.ts +59 -0
  275. package/src/tools/handlers/count-elements-mcp-tool-handler.spec.ts +99 -0
  276. package/src/tools/handlers/count-elements-mcp-tool-handler.ts +66 -0
  277. package/src/tools/handlers/create-edges-mcp-tool-handler.spec.ts +196 -0
  278. package/src/tools/handlers/create-edges-mcp-tool-handler.ts +205 -0
  279. package/src/tools/handlers/create-nodes-mcp-tool-handler.spec.ts +197 -0
  280. package/src/tools/handlers/create-nodes-mcp-tool-handler.ts +131 -0
  281. package/src/tools/handlers/delete-elements-mcp-tool-handler.ts +73 -0
  282. package/src/tools/handlers/diagram-model-mcp-tool-handler.ts +66 -0
  283. package/src/tools/handlers/element-types-mcp-tool-handler.ts +151 -0
  284. package/src/tools/handlers/get-selection-mcp-tool-handler.ts +54 -0
  285. package/src/tools/handlers/layout-mcp-tool-handler.ts +56 -0
  286. package/src/tools/handlers/modify-edges-mcp-tool-handler.ts +148 -0
  287. package/src/tools/handlers/modify-nodes-mcp-tool-handler.ts +140 -0
  288. package/src/tools/handlers/query-elements-mcp-tool-handler.spec.ts +210 -0
  289. package/src/tools/handlers/query-elements-mcp-tool-handler.ts +161 -0
  290. package/src/tools/handlers/redo-mcp-tool-handler.ts +62 -0
  291. package/src/tools/handlers/save-model-mcp-tool-handler.ts +71 -0
  292. package/src/tools/handlers/session-info-mcp-tool-handler.spec.ts +152 -0
  293. package/src/tools/handlers/session-info-mcp-tool-handler.ts +97 -0
  294. package/src/tools/handlers/set-selection-mcp-tool-handler.spec.ts +118 -0
  295. package/src/tools/handlers/set-selection-mcp-tool-handler.ts +90 -0
  296. package/src/tools/handlers/set-view-mcp-tool-handler.ts +162 -0
  297. package/src/tools/handlers/undo-mcp-tool-handler.ts +61 -0
  298. package/src/tools/handlers/validate-diagram-mcp-tool-handler.ts +0 -0
  299. package/src/tools/index.ts +34 -0
  300. package/src/tools/tool-annotations.spec.ts +141 -0
  301. package/src/util/index.ts +18 -0
  302. package/src/util/markdown-util.ts +44 -0
  303. package/src/util/mcp-util.ts +25 -0
@@ -0,0 +1,174 @@
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ var DiagramPngMcpResourceHandler_1;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.DiagramPngMcpResourceHandler = exports.DiagramPngInputSchema = void 0;
29
+ const server_1 = require("@eclipse-glsp/server");
30
+ const inversify_1 = require("inversify");
31
+ const z = require("zod/v4");
32
+ const server_2 = require("../../server");
33
+ exports.DiagramPngInputSchema = server_2.McpDiagramScopedInputSchema.extend({
34
+ scale: z
35
+ .number()
36
+ .min(0.1)
37
+ .max(4)
38
+ .optional()
39
+ .describe("Multiplier applied to the diagram's natural extent (range 0.1..4). Use values >1 for " +
40
+ 'sharper-than-default renders, <1 for thumbnails. Ignored when `width` or `height` is supplied.'),
41
+ width: z
42
+ .number()
43
+ .int()
44
+ .min(1)
45
+ .max(8192)
46
+ .optional()
47
+ .describe('Override the rendered width in pixels. When given alone, the height is derived from the diagram aspect ratio.'),
48
+ height: z
49
+ .number()
50
+ .int()
51
+ .min(1)
52
+ .max(8192)
53
+ .optional()
54
+ .describe('Override the rendered height in pixels. When given alone, the width is derived from the diagram aspect ratio.'),
55
+ timeoutMs: z
56
+ .number()
57
+ .int()
58
+ .min(100)
59
+ .max(60000)
60
+ .optional()
61
+ .describe('Override the default render timeout in milliseconds (100–60000). Useful for very large diagrams.')
62
+ });
63
+ /** Rendering lives on the client — `RequestExportAction('png')` routes to the registered PNG exporter, which returns base64 via `ExportResultAction`. */
64
+ let DiagramPngMcpResourceHandler = DiagramPngMcpResourceHandler_1 = class DiagramPngMcpResourceHandler extends server_2.AbstractMcpDiagramResourceHandler {
65
+ constructor() {
66
+ super(...arguments);
67
+ /** Default timeout (in ms) used when the call doesn't override `timeoutMs`. Override via subclass + rebind. */
68
+ this.defaultTimeoutMs = 5000;
69
+ /**
70
+ * Default `scale` multiplier when the caller doesn't pin `width`/`height`/`scale`. `1` means
71
+ * "render at the diagram's natural extent" — sharp because the client rasterises the SVG
72
+ * at the requested size. Adopters override (e.g. to `2` for a high-DPI deployment) via
73
+ * subclass + rebind.
74
+ */
75
+ this.defaultScale = 1;
76
+ this.name = DiagramPngMcpResourceHandler_1.NAME;
77
+ this.title = 'Diagram Model PNG';
78
+ this.description = 'Render the session diagram as a base64-encoded PNG screenshot of its current visible state. ' +
79
+ 'Includes all nodes, edges, and their styling — useful when a visual answer would help the agent ' +
80
+ '(layout reasoning, confirming a recently-created element looks right, sharing the diagram with the user). ' +
81
+ "Defaults to a sharp render at the diagram's natural extent; pass `scale` to multiply, " +
82
+ 'or `width`/`height` to pin specific dimensions. ' +
83
+ 'Requires a connected frontend client to perform the render and is subject to a timeout if no response arrives. ' +
84
+ 'For a structured-text view of the model use `diagram-model` instead; for vector output use `diagram-svg`.';
85
+ this.mimeType = 'image/png';
86
+ this.uri = { template: 'glsp://diagrams/{sessionId}/png' };
87
+ /** Both the user (visual artifact) and the assistant (visual reasoning) consume the rendered diagram. */
88
+ this.audience = ['user', 'assistant'];
89
+ /** Useful when relevant, but not always-relevant — clients may skip when text-only reasoning suffices. */
90
+ this.priority = 0.6;
91
+ // `lastModified` intentionally omitted: we have no cheap, accurate freshness signal for the
92
+ // rendered PNG (the model state doesn't track a "rendered at" timestamp), and a stale value
93
+ // would mislead clients.
94
+ this.toolAlternativeInputSchema = exports.DiagramPngInputSchema;
95
+ }
96
+ /** Skip-bind when the GLSP client doesn't speak `RequestExportAction` — every read would otherwise time out. */
97
+ canRegister() {
98
+ return this.clientActionKinds.has(server_1.RequestExportAction.KIND);
99
+ }
100
+ async createResult({ scale, width, height, timeoutMs }) {
101
+ const resolved = this.resolveSize(scale, width, height);
102
+ // Best-effort beat for clients that opted in via `_meta.progressToken`; no-ops otherwise.
103
+ await this.progress.emit({ progress: 0, message: 'Awaiting client-side PNG render…' });
104
+ const response = await this.requestAction(server_1.RequestExportAction.create('png', { formatOptions: { width: resolved.width, height: resolved.height } }), timeoutMs !== null && timeoutMs !== void 0 ? timeoutMs : this.defaultTimeoutMs);
105
+ // A misbehaving exporter strategy returning text-encoded data here would silently corrupt the blob; fail loudly instead.
106
+ if (response.encoding !== 'base64') {
107
+ throw new server_2.McpToolError(`PNG export returned unexpected encoding '${response.encoding}'; expected 'base64'.`);
108
+ }
109
+ return { blob: response.data };
110
+ }
111
+ /**
112
+ * Resolve the final render size with this precedence:
113
+ * - `width` and `height` both given → use as-is.
114
+ * - only one of `width`/`height` given → derive the other from the diagram aspect ratio.
115
+ * - neither dimension given → natural × (`scale` ?? {@link defaultScale}).
116
+ */
117
+ resolveSize(scale, width, height) {
118
+ if (width !== undefined && height !== undefined) {
119
+ return { width, height };
120
+ }
121
+ const natural = this.computeNaturalSize();
122
+ if (width !== undefined) {
123
+ return { width, height: Math.max(1, Math.round(width * (natural.height / natural.width))) };
124
+ }
125
+ if (height !== undefined) {
126
+ return { width: Math.max(1, Math.round(height * (natural.width / natural.height))), height };
127
+ }
128
+ const factor = scale !== null && scale !== void 0 ? scale : this.defaultScale;
129
+ return {
130
+ width: Math.max(1, Math.round(natural.width * factor)),
131
+ height: Math.max(1, Math.round(natural.height * factor))
132
+ };
133
+ }
134
+ /**
135
+ * Compute the diagram's natural extent as the bounding box of every {@link isGBoundsAware}
136
+ * element with both `position` and `size`. Throws when the model has no positioned elements
137
+ * — a 1×1 PNG of an empty diagram is technically renderable but useless, and surfacing it
138
+ * as a self-correctable error lets the LLM react (e.g. wait for layout, ask the user).
139
+ */
140
+ computeNaturalSize() {
141
+ let maxX = 0;
142
+ let maxY = 0;
143
+ for (const id of this.modelState.index.allIds()) {
144
+ const element = this.modelState.index.get(id);
145
+ if (!element || !(0, server_1.isGBoundsAware)(element)) {
146
+ continue;
147
+ }
148
+ const position = element.position;
149
+ const size = element.size;
150
+ if (position && size && size.width > 0 && size.height > 0) {
151
+ maxX = Math.max(maxX, position.x + size.width);
152
+ maxY = Math.max(maxY, position.y + size.height);
153
+ }
154
+ }
155
+ if (maxX <= 0 || maxY <= 0) {
156
+ throw new server_2.McpToolError('Diagram has no positioned elements yet — render once after layout completes, or pass `width` / `height` explicitly.');
157
+ }
158
+ return { width: Math.ceil(maxX), height: Math.ceil(maxY) };
159
+ }
160
+ };
161
+ exports.DiagramPngMcpResourceHandler = DiagramPngMcpResourceHandler;
162
+ DiagramPngMcpResourceHandler.NAME = 'diagram-png';
163
+ __decorate([
164
+ (0, inversify_1.inject)(server_2.McpProgressReporter),
165
+ __metadata("design:type", server_2.McpProgressReporter)
166
+ ], DiagramPngMcpResourceHandler.prototype, "progress", void 0);
167
+ __decorate([
168
+ (0, inversify_1.inject)(server_1.ClientActionKinds),
169
+ __metadata("design:type", Set)
170
+ ], DiagramPngMcpResourceHandler.prototype, "clientActionKinds", void 0);
171
+ exports.DiagramPngMcpResourceHandler = DiagramPngMcpResourceHandler = DiagramPngMcpResourceHandler_1 = __decorate([
172
+ (0, inversify_1.injectable)()
173
+ ], DiagramPngMcpResourceHandler);
174
+ //# sourceMappingURL=diagram-png-mcp-resource-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagram-png-mcp-resource-handler.js","sourceRoot":"","sources":["../../../src/resources/handlers/diagram-png-mcp-resource-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,iDAA8F;AAE9F,yCAA+C;AAC/C,4BAA4B;AAC5B,yCAQsB;AAET,QAAA,qBAAqB,GAAG,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GAAG,CAAC,EAAE,CAAC,CAAC;YAC9C,IAAI,CAAC,OAAO,IAAI,CAAC,IAAA,uBAAc,EAAC,OAAO,CAAC,EAAE,CAAC;gBACvC,SAAS;YACb,CAAC;YACD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;YAClC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAC1B,IAAI,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxD,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC/C,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;YACpD,CAAC;QACL,CAAC;QACD,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,qBAAY,CAClB,qHAAqH,CACxH,CAAC;QACN,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC/D,CAAC;;AAjHQ,oEAA4B;AAYrB,iCAAI,GAAG,aAAa,AAAhB,CAAiB;AAsBE;IAAtC,IAAA,kBAAM,EAAC,4BAAmB,CAAC;8BAAqB,4BAAmB;8DAAC;AAEhC;IAApC,IAAA,kBAAM,EAAC,0BAAiB,CAAC;8BAA8B,GAAG;uEAAS;uCApC3D,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAkHxC"}
@@ -0,0 +1,52 @@
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 { Role } from '@modelcontextprotocol/sdk/types.js';
17
+ import * as z from 'zod/v4';
18
+ import { AbstractMcpDiagramResourceHandler, McpMimeType, McpProgressReporter, McpResourceContent, McpResourceUri } from '../../server';
19
+ export declare const DiagramSvgInputSchema: z.ZodObject<{
20
+ sessionId: z.ZodString;
21
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
22
+ }, z.core.$strip>;
23
+ export type DiagramSvgInput = z.infer<typeof DiagramSvgInputSchema>;
24
+ /**
25
+ * Vector counterpart of {@link DiagramPngMcpResourceHandler}. Emits the diagram as raw SVG
26
+ * markup (text-encoded). No `width`/`height` knobs because SVG is vector — clients (and
27
+ * downstream rasterisers) scale it freely.
28
+ */
29
+ export declare class DiagramSvgMcpResourceHandler extends AbstractMcpDiagramResourceHandler<DiagramSvgInput> {
30
+ /** Default timeout (in ms) used when the call doesn't override `timeoutMs`. Override via subclass + rebind. */
31
+ protected readonly defaultTimeoutMs: number;
32
+ static readonly NAME = "diagram-svg";
33
+ readonly name = "diagram-svg";
34
+ readonly title = "Diagram Model SVG";
35
+ readonly description: string;
36
+ readonly mimeType: McpMimeType;
37
+ readonly uri: McpResourceUri;
38
+ /** Both the user (visual artifact) and the assistant (visual reasoning) consume the rendered diagram. */
39
+ readonly audience: Role[];
40
+ /** Useful when relevant, but not always-relevant — clients may skip when text-only reasoning suffices. */
41
+ readonly priority = 0.6;
42
+ readonly toolAlternativeInputSchema: z.ZodObject<{
43
+ sessionId: z.ZodString;
44
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
45
+ }, z.core.$strip>;
46
+ protected progress: McpProgressReporter;
47
+ protected clientActionKinds: Set<string>;
48
+ /** Skip-bind when the GLSP client doesn't speak `RequestExportAction`. */
49
+ canRegister(): boolean;
50
+ protected createResult({ timeoutMs }: DiagramSvgInput): Promise<McpResourceContent>;
51
+ }
52
+ //# sourceMappingURL=diagram-svg-mcp-resource-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagram-svg-mcp-resource-handler.d.ts","sourceRoot":"","sources":["../../../src/resources/handlers/diagram-svg-mcp-resource-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACH,iCAAiC,EAEjC,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EAEjB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,qBAAqB;;;iBAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;GAIG;AACH,qBACa,4BAA6B,SAAQ,iCAAiC,CAAC,eAAe,CAAC;IAChG,+GAA+G;IAC/G,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAQ;IAEnD,MAAM,CAAC,QAAQ,CAAC,IAAI,iBAAiB;IACrC,QAAQ,CAAC,IAAI,iBAAqC;IAClD,SAAkB,KAAK,uBAAuB;IAC9C,QAAQ,CAAC,WAAW,SAMiE;IACrF,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAmB;IACjD,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAmD;IAC/E,yGAAyG;IACzG,SAAkB,QAAQ,EAAE,IAAI,EAAE,CAAyB;IAC3D,0GAA0G;IAC1G,SAAkB,QAAQ,OAAO;IACjC,SAAkB,0BAA0B;;;sBAAyB;IAExC,SAAS,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAE1C,SAAS,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAEpE,0EAA0E;IACjE,WAAW,IAAI,OAAO;cAIf,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAU5F"}
@@ -0,0 +1,96 @@
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ var DiagramSvgMcpResourceHandler_1;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.DiagramSvgMcpResourceHandler = exports.DiagramSvgInputSchema = void 0;
29
+ const server_1 = require("@eclipse-glsp/server");
30
+ const inversify_1 = require("inversify");
31
+ const z = require("zod/v4");
32
+ const server_2 = require("../../server");
33
+ exports.DiagramSvgInputSchema = server_2.McpDiagramScopedInputSchema.extend({
34
+ timeoutMs: z
35
+ .number()
36
+ .int()
37
+ .min(100)
38
+ .max(60000)
39
+ .optional()
40
+ .describe('Override the default render timeout in milliseconds (100–60000). Useful for very large diagrams.')
41
+ });
42
+ /**
43
+ * Vector counterpart of {@link DiagramPngMcpResourceHandler}. Emits the diagram as raw SVG
44
+ * markup (text-encoded). No `width`/`height` knobs because SVG is vector — clients (and
45
+ * downstream rasterisers) scale it freely.
46
+ */
47
+ let DiagramSvgMcpResourceHandler = DiagramSvgMcpResourceHandler_1 = class DiagramSvgMcpResourceHandler extends server_2.AbstractMcpDiagramResourceHandler {
48
+ constructor() {
49
+ super(...arguments);
50
+ /** Default timeout (in ms) used when the call doesn't override `timeoutMs`. Override via subclass + rebind. */
51
+ this.defaultTimeoutMs = 5000;
52
+ this.name = DiagramSvgMcpResourceHandler_1.NAME;
53
+ this.title = 'Diagram Model SVG';
54
+ this.description = 'Render the session diagram as SVG markup of its current visible state. ' +
55
+ 'Vector format — scales without quality loss, ideal for embedding in documentation, ' +
56
+ 'further programmatic processing, or post-export rasterisation at arbitrary resolutions. ' +
57
+ 'Requires a connected frontend client to perform the render and is subject to a timeout if no response arrives. ' +
58
+ 'Use `diagram-png` instead when you need a ready-to-display raster image; ' +
59
+ '`diagram-model` is the structured-text alternative for content-only reasoning.';
60
+ this.mimeType = 'image/svg+xml';
61
+ this.uri = { template: 'glsp://diagrams/{sessionId}/svg' };
62
+ /** Both the user (visual artifact) and the assistant (visual reasoning) consume the rendered diagram. */
63
+ this.audience = ['user', 'assistant'];
64
+ /** Useful when relevant, but not always-relevant — clients may skip when text-only reasoning suffices. */
65
+ this.priority = 0.6;
66
+ this.toolAlternativeInputSchema = exports.DiagramSvgInputSchema;
67
+ }
68
+ /** Skip-bind when the GLSP client doesn't speak `RequestExportAction`. */
69
+ canRegister() {
70
+ return this.clientActionKinds.has(server_1.RequestExportAction.KIND);
71
+ }
72
+ async createResult({ timeoutMs }) {
73
+ // Best-effort beat for clients that opted in via `_meta.progressToken`; no-ops otherwise.
74
+ await this.progress.emit({ progress: 0, message: 'Awaiting client-side SVG render…' });
75
+ const response = await this.requestAction(server_1.RequestExportAction.create('svg'), timeoutMs !== null && timeoutMs !== void 0 ? timeoutMs : this.defaultTimeoutMs);
76
+ // SVG is text-encoded — base64 encoding here would mean an exporter mis-classified its payload.
77
+ if (response.encoding !== 'text') {
78
+ throw new server_2.McpToolError(`SVG export returned unexpected encoding '${response.encoding}'; expected 'text'.`);
79
+ }
80
+ return { text: response.data };
81
+ }
82
+ };
83
+ exports.DiagramSvgMcpResourceHandler = DiagramSvgMcpResourceHandler;
84
+ DiagramSvgMcpResourceHandler.NAME = 'diagram-svg';
85
+ __decorate([
86
+ (0, inversify_1.inject)(server_2.McpProgressReporter),
87
+ __metadata("design:type", server_2.McpProgressReporter)
88
+ ], DiagramSvgMcpResourceHandler.prototype, "progress", void 0);
89
+ __decorate([
90
+ (0, inversify_1.inject)(server_1.ClientActionKinds),
91
+ __metadata("design:type", Set)
92
+ ], DiagramSvgMcpResourceHandler.prototype, "clientActionKinds", void 0);
93
+ exports.DiagramSvgMcpResourceHandler = DiagramSvgMcpResourceHandler = DiagramSvgMcpResourceHandler_1 = __decorate([
94
+ (0, inversify_1.injectable)()
95
+ ], DiagramSvgMcpResourceHandler);
96
+ //# sourceMappingURL=diagram-svg-mcp-resource-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagram-svg-mcp-resource-handler.js","sourceRoot":"","sources":["../../../src/resources/handlers/diagram-svg-mcp-resource-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,iDAA8E;AAE9E,yCAA+C;AAC/C,4BAA4B;AAC5B,yCAQsB;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,cAAT,SAAS,GAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACjH,gGAAgG;QAChG,IAAI,QAAQ,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YAC/B,MAAM,IAAI,qBAAY,CAAC,4CAA4C,QAAQ,CAAC,QAAQ,qBAAqB,CAAC,CAAC;QAC/G,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;;AAxCQ,oEAA4B;AAIrB,iCAAI,GAAG,aAAa,AAAhB,CAAiB;AAkBE;IAAtC,IAAA,kBAAM,EAAC,4BAAmB,CAAC;8BAAqB,4BAAmB;8DAAC;AAEhC;IAApC,IAAA,kBAAM,EAAC,0BAAiB,CAAC;8BAA8B,GAAG;uEAAS;uCAxB3D,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAyCxC"}
@@ -0,0 +1,20 @@
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 './handlers/diagram-png-mcp-resource-handler';
17
+ export * from './handlers/diagram-svg-mcp-resource-handler';
18
+ export * from './services/element-types-provider';
19
+ export * from './services/mcp-model-serializer';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,36 @@
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
+ };
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);
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,8EAA4D;AAC5D,8EAA4D;AAC5D,oEAAkD;AAClD,kEAAgD"}
@@ -0,0 +1,65 @@
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 { CreateOperationHandler, Logger, OperationHandlerRegistry } from '@eclipse-glsp/server';
17
+ /**
18
+ * A discoverable creatable element type emitted by the `element-types` tool handler. Adopters
19
+ * may add further passthrough fields beyond these — the tool handler's structured output schema
20
+ * is `loose()`.
21
+ *
22
+ * @experimental
23
+ */
24
+ export interface ElementTypeEntry {
25
+ id: string;
26
+ /** Human-readable display name for the element TYPE (e.g. `Manual Task`). */
27
+ label: string;
28
+ /** Adopter-supplied human-readable description; absent on the default scrape impl. */
29
+ description?: string;
30
+ /** Whether create-* / modify-* tools should pass a `text` arg for this type. Absent ⇒ unknown. */
31
+ acceptsText?: boolean;
32
+ }
33
+ /** Node + edge types creatable in a given diagram type. */
34
+ export interface ElementTypes {
35
+ nodeTypes: ElementTypeEntry[];
36
+ edgeTypes: ElementTypeEntry[];
37
+ }
38
+ /**
39
+ * Per-diagram-type provider of creatable element types. Bound on the diagram (per-GLSP-session)
40
+ * container so each diagram type can supply its own list. Adopters with explicit type info
41
+ * typically rebind to a constant-value provider; the default scrapes
42
+ * {@link OperationHandlerRegistry} for backwards compatibility with adopters that haven't
43
+ * declared their types yet.
44
+ *
45
+ * @experimental
46
+ */
47
+ export interface ElementTypesProvider {
48
+ get(): ElementTypes;
49
+ }
50
+ export declare const ElementTypesProvider: unique symbol;
51
+ /**
52
+ * Default {@link ElementTypesProvider} that scrapes the per-session {@link OperationHandlerRegistry}
53
+ * for {@link CreateNodeOperationHandler} / {@link CreateEdgeOperationHandler} instances and reads
54
+ * their `elementTypeIds`.
55
+ */
56
+ export declare class DefaultElementTypesProvider implements ElementTypesProvider {
57
+ protected operationHandlerRegistry: OperationHandlerRegistry;
58
+ protected logger: Logger;
59
+ /** Already-warned operation types, deduped so the warn fires once per type. */
60
+ protected readonly warnedTypes: Set<string>;
61
+ get(): ElementTypes;
62
+ /** Once-per-type warn when a `CreateOperationHandler` carries an unrecognized `operationType`. */
63
+ protected warnUnrecognizedOperationType(handler: CreateOperationHandler): void;
64
+ }
65
+ //# sourceMappingURL=element-types-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-types-provider.d.ts","sourceRoot":"","sources":["../../../src/resources/services/element-types-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAGH,sBAAsB,EACtB,MAAM,EACN,wBAAwB,EAC3B,MAAM,sBAAsB,CAAC;AAG9B;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kGAAkG;IAClG,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,2DAA2D;AAC3D,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,SAAS,EAAE,gBAAgB,EAAE,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACjC,GAAG,IAAI,YAAY,CAAC;CACvB;AACD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AAEnE;;;;GAIG;AACH,qBACa,2BAA4B,YAAW,oBAAoB;IAClC,SAAS,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;IAE/E,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzC,+EAA+E;IAC/E,SAAS,CAAC,QAAQ,CAAC,WAAW,cAAqB;IAEnD,GAAG,IAAI,YAAY;IAenB,kGAAkG;IAClG,SAAS,CAAC,6BAA6B,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI;CAWjF"}
@@ -0,0 +1,81 @@
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.DefaultElementTypesProvider = exports.ElementTypesProvider = void 0;
28
+ const protocol_1 = require("@eclipse-glsp/protocol");
29
+ const server_1 = require("@eclipse-glsp/server");
30
+ const inversify_1 = require("inversify");
31
+ exports.ElementTypesProvider = Symbol('ElementTypesProvider');
32
+ /**
33
+ * Default {@link ElementTypesProvider} that scrapes the per-session {@link OperationHandlerRegistry}
34
+ * for {@link CreateNodeOperationHandler} / {@link CreateEdgeOperationHandler} instances and reads
35
+ * their `elementTypeIds`.
36
+ */
37
+ let DefaultElementTypesProvider = class DefaultElementTypesProvider {
38
+ constructor() {
39
+ /** Already-warned operation types, deduped so the warn fires once per type. */
40
+ this.warnedTypes = new Set();
41
+ }
42
+ get() {
43
+ const nodeTypes = [];
44
+ const edgeTypes = [];
45
+ for (const handler of this.operationHandlerRegistry.getAll()) {
46
+ if (server_1.CreateNodeOperationHandler.is(handler)) {
47
+ handler.elementTypeIds.forEach(id => nodeTypes.push({ id, label: handler.label }));
48
+ }
49
+ else if (server_1.CreateEdgeOperationHandler.is(handler)) {
50
+ handler.elementTypeIds.forEach(id => edgeTypes.push({ id, label: handler.label }));
51
+ }
52
+ else if (server_1.CreateOperationHandler.is(handler)) {
53
+ this.warnUnrecognizedOperationType(handler);
54
+ }
55
+ }
56
+ return { nodeTypes, edgeTypes };
57
+ }
58
+ /** Once-per-type warn when a `CreateOperationHandler` carries an unrecognized `operationType`. */
59
+ warnUnrecognizedOperationType(handler) {
60
+ const operationType = handler.operationType;
61
+ if (this.warnedTypes.has(operationType)) {
62
+ return;
63
+ }
64
+ this.warnedTypes.add(operationType);
65
+ this.logger.warn(`DefaultElementTypesProvider: ignoring CreateOperationHandler with operationType '${operationType}' — ` +
66
+ `expected '${protocol_1.CreateNodeOperation.KIND}' or '${protocol_1.CreateEdgeOperation.KIND}'. Rebind ElementTypesProvider for custom operation types.`);
67
+ }
68
+ };
69
+ exports.DefaultElementTypesProvider = DefaultElementTypesProvider;
70
+ __decorate([
71
+ (0, inversify_1.inject)(server_1.OperationHandlerRegistry),
72
+ __metadata("design:type", server_1.OperationHandlerRegistry)
73
+ ], DefaultElementTypesProvider.prototype, "operationHandlerRegistry", void 0);
74
+ __decorate([
75
+ (0, inversify_1.inject)(server_1.Logger),
76
+ __metadata("design:type", server_1.Logger)
77
+ ], DefaultElementTypesProvider.prototype, "logger", void 0);
78
+ exports.DefaultElementTypesProvider = DefaultElementTypesProvider = __decorate([
79
+ (0, inversify_1.injectable)()
80
+ ], DefaultElementTypesProvider);
81
+ //# sourceMappingURL=element-types-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-types-provider.js","sourceRoot":"","sources":["../../../src/resources/services/element-types-provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,qDAAkF;AAClF,iDAM8B;AAC9B,yCAA+C;AAqClC,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAEnE;;;;GAIG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAAjC;QAKH,+EAA+E;QAC5D,gBAAW,GAAG,IAAI,GAAG,EAAU,CAAC;IA6BvD,CAAC;IA3BG,GAAG;QACC,MAAM,SAAS,GAAuB,EAAE,CAAC;QACzC,MAAM,SAAS,GAAuB,EAAE,CAAC;QACzC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,EAAE,CAAC;YAC3D,IAAI,mCAA0B,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACvF,CAAC;iBAAM,IAAI,mCAA0B,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;gBAChD,OA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