@eclipse-glsp/server-mcp 2.8.0-next.1 → 2.8.0-next.12
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.
- package/README.md +7 -7
- package/lib/browser/modules/browser-mcp-server-module.js +1 -1
- package/lib/browser/modules/browser-mcp-server-module.js.map +1 -1
- package/lib/common/modules/abstract-mcp-server-module.d.ts +1 -2
- package/lib/common/modules/abstract-mcp-server-module.d.ts.map +1 -1
- package/lib/common/modules/abstract-mcp-server-module.js.map +1 -1
- package/lib/common/modules/mcp-diagram-module.js +1 -1
- package/lib/common/modules/mcp-diagram-module.js.map +1 -1
- package/lib/common/prompts/handlers/describe-diagram-mcp-prompt-handler.js +3 -2
- package/lib/common/prompts/handlers/describe-diagram-mcp-prompt-handler.js.map +1 -1
- package/lib/common/prompts/handlers/suggest-improvements-mcp-prompt-handler.js +3 -2
- package/lib/common/prompts/handlers/suggest-improvements-mcp-prompt-handler.js.map +1 -1
- package/lib/common/resources/handlers/diagram-png-mcp-resource-handler.js +5 -4
- package/lib/common/resources/handlers/diagram-png-mcp-resource-handler.js.map +1 -1
- package/lib/common/resources/handlers/diagram-svg-mcp-resource-handler.js +4 -3
- package/lib/common/resources/handlers/diagram-svg-mcp-resource-handler.js.map +1 -1
- package/lib/common/resources/services/element-types-provider.d.ts.map +1 -1
- package/lib/common/resources/services/element-types-provider.js +1 -2
- package/lib/common/resources/services/element-types-provider.js.map +1 -1
- package/lib/common/resources/services/mcp-model-serializer.d.ts +1 -2
- package/lib/common/resources/services/mcp-model-serializer.d.ts.map +1 -1
- package/lib/common/resources/services/mcp-model-serializer.js +3 -5
- package/lib/common/resources/services/mcp-model-serializer.js.map +1 -1
- package/lib/common/server/abstract-mcp-server-launcher.d.ts +3 -4
- package/lib/common/server/abstract-mcp-server-launcher.d.ts.map +1 -1
- package/lib/common/server/abstract-mcp-server-launcher.js +9 -14
- package/lib/common/server/abstract-mcp-server-launcher.js.map +1 -1
- package/lib/common/server/glsp-mcp-server.d.ts.map +1 -1
- package/lib/common/server/glsp-mcp-server.js +2 -2
- package/lib/common/server/glsp-mcp-server.js.map +1 -1
- package/lib/common/server/lru-event-store.js +2 -3
- package/lib/common/server/lru-event-store.js.map +1 -1
- package/lib/common/server/mcp-diagram-handler-dispatcher.d.ts +20 -4
- package/lib/common/server/mcp-diagram-handler-dispatcher.d.ts.map +1 -1
- package/lib/common/server/mcp-diagram-handler-dispatcher.js +40 -13
- package/lib/common/server/mcp-diagram-handler-dispatcher.js.map +1 -1
- package/lib/common/server/mcp-handler-shared.d.ts +1 -2
- package/lib/common/server/mcp-handler-shared.d.ts.map +1 -1
- package/lib/common/server/mcp-handler-shared.js +1 -1
- package/lib/common/server/mcp-handler-shared.js.map +1 -1
- package/lib/common/server/mcp-id-alias-service.js +1 -2
- package/lib/common/server/mcp-id-alias-service.js.map +1 -1
- package/lib/common/server/mcp-input-schemas.d.ts +2 -0
- package/lib/common/server/mcp-input-schemas.d.ts.map +1 -1
- package/lib/common/server/mcp-input-schemas.js +3 -1
- package/lib/common/server/mcp-input-schemas.js.map +1 -1
- package/lib/common/server/mcp-log-level-registry.js +10 -10
- package/lib/common/server/mcp-log-level-registry.js.map +1 -1
- package/lib/common/server/mcp-mime-types.d.ts +1 -1
- package/lib/common/server/mcp-mime-types.d.ts.map +1 -1
- package/lib/common/server/mcp-options.d.ts +1 -1
- package/lib/common/server/mcp-options.d.ts.map +1 -1
- package/lib/common/server/mcp-progress-reporter.js +1 -2
- package/lib/common/server/mcp-progress-reporter.js.map +1 -1
- package/lib/common/server/mcp-resource-handler.d.ts +10 -1
- package/lib/common/server/mcp-resource-handler.d.ts.map +1 -1
- package/lib/common/server/mcp-resource-handler.js +17 -10
- package/lib/common/server/mcp-resource-handler.js.map +1 -1
- package/lib/common/server/mcp-tool-handler.d.ts +33 -16
- package/lib/common/server/mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/server/mcp-tool-handler.js +19 -3
- package/lib/common/server/mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/count-elements-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/count-elements-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/count-elements-mcp-tool-handler.js +4 -4
- package/lib/common/tools/handlers/count-elements-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/create-edges-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/create-edges-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/create-edges-mcp-tool-handler.js +14 -8
- package/lib/common/tools/handlers/create-edges-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/create-nodes-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/create-nodes-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/create-nodes-mcp-tool-handler.js +18 -10
- package/lib/common/tools/handlers/create-nodes-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/delete-elements-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/delete-elements-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/delete-elements-mcp-tool-handler.js +3 -2
- package/lib/common/tools/handlers/delete-elements-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/diagram-model-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/diagram-model-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/diagram-model-mcp-tool-handler.js +7 -4
- package/lib/common/tools/handlers/diagram-model-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/element-types-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/element-types-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/element-types-mcp-tool-handler.js +8 -5
- package/lib/common/tools/handlers/element-types-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/get-selection-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/get-selection-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/get-selection-mcp-tool-handler.js +3 -2
- package/lib/common/tools/handlers/get-selection-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/layout-mcp-tool-handler.d.ts +5 -2
- package/lib/common/tools/handlers/layout-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/layout-mcp-tool-handler.js +8 -3
- package/lib/common/tools/handlers/layout-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/modify-edges-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/modify-edges-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/modify-edges-mcp-tool-handler.js +13 -9
- package/lib/common/tools/handlers/modify-edges-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/modify-nodes-mcp-tool-handler.d.ts +4 -1
- package/lib/common/tools/handlers/modify-nodes-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/modify-nodes-mcp-tool-handler.js +57 -25
- package/lib/common/tools/handlers/modify-nodes-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/query-elements-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/query-elements-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/query-elements-mcp-tool-handler.js +7 -7
- package/lib/common/tools/handlers/query-elements-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/redo-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/redo-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/redo-mcp-tool-handler.js +10 -5
- package/lib/common/tools/handlers/redo-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/save-model-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/save-model-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/save-model-mcp-tool-handler.js +6 -3
- package/lib/common/tools/handlers/save-model-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/session-info-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/session-info-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/session-info-mcp-tool-handler.js +4 -4
- package/lib/common/tools/handlers/session-info-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/set-selection-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/set-selection-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/set-selection-mcp-tool-handler.js +10 -7
- package/lib/common/tools/handlers/set-selection-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/set-view-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/set-view-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/set-view-mcp-tool-handler.js +6 -5
- package/lib/common/tools/handlers/set-view-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/undo-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/undo-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/undo-mcp-tool-handler.js +10 -5
- package/lib/common/tools/handlers/undo-mcp-tool-handler.js.map +1 -1
- package/lib/common/tools/handlers/validate-diagram-mcp-tool-handler.d.ts +2 -1
- package/lib/common/tools/handlers/validate-diagram-mcp-tool-handler.d.ts.map +1 -1
- package/lib/common/tools/handlers/validate-diagram-mcp-tool-handler.js +0 -0
- package/lib/common/tools/handlers/validate-diagram-mcp-tool-handler.js.map +1 -1
- package/lib/common/util/markdown-util.js +1 -2
- package/lib/common/util/markdown-util.js.map +1 -1
- package/lib/node/modules/node-mcp-server-module.js +8 -8
- package/lib/node/modules/node-mcp-server-module.js.map +1 -1
- package/package.json +17 -17
- package/src/common/modules/abstract-mcp-server-module.ts +3 -3
- package/src/common/modules/mcp-diagram-module.ts +1 -1
- package/src/common/resources/services/element-types-provider.ts +2 -1
- package/src/common/resources/services/mcp-model-serializer.ts +1 -2
- package/src/common/server/abstract-mcp-server-launcher.ts +3 -3
- package/src/common/server/glsp-mcp-server.ts +2 -1
- package/src/common/server/mcp-diagram-handler-dispatcher.ts +56 -5
- package/src/common/server/mcp-handler-shared.ts +2 -4
- package/src/common/server/mcp-input-schemas.ts +3 -0
- package/src/common/server/mcp-mime-types.ts +1 -1
- package/src/common/server/mcp-options.ts +1 -1
- package/src/common/server/mcp-resource-handler.ts +14 -2
- package/src/common/server/mcp-tool-handler.ts +47 -19
- package/src/common/tools/handlers/count-elements-mcp-tool-handler.ts +2 -1
- package/src/common/tools/handlers/create-edges-mcp-tool-handler.ts +20 -8
- package/src/common/tools/handlers/create-nodes-mcp-tool-handler.ts +19 -8
- package/src/common/tools/handlers/delete-elements-mcp-tool-handler.ts +2 -1
- package/src/common/tools/handlers/diagram-model-mcp-tool-handler.ts +6 -3
- package/src/common/tools/handlers/element-types-mcp-tool-handler.ts +6 -3
- package/src/common/tools/handlers/get-selection-mcp-tool-handler.ts +2 -1
- package/src/common/tools/handlers/layout-mcp-tool-handler.ts +8 -2
- package/src/common/tools/handlers/modify-edges-mcp-tool-handler.ts +14 -8
- package/src/common/tools/handlers/modify-nodes-mcp-tool-handler.ts +63 -25
- package/src/common/tools/handlers/query-elements-mcp-tool-handler.ts +2 -1
- package/src/common/tools/handlers/redo-mcp-tool-handler.ts +9 -4
- package/src/common/tools/handlers/save-model-mcp-tool-handler.ts +5 -2
- package/src/common/tools/handlers/session-info-mcp-tool-handler.ts +2 -1
- package/src/common/tools/handlers/set-selection-mcp-tool-handler.ts +8 -5
- package/src/common/tools/handlers/set-view-mcp-tool-handler.ts +3 -2
- package/src/common/tools/handlers/undo-mcp-tool-handler.ts +9 -4
- package/src/common/tools/handlers/validate-diagram-mcp-tool-handler.ts +0 -0
- package/src/common/server/abstract-mcp-server-launcher.spec.ts +0 -458
- package/src/common/server/glsp-mcp-server.spec.ts +0 -73
- package/src/common/server/lru-event-store.spec.ts +0 -121
- package/src/common/server/mcp-diagram-handler-dispatcher.spec.ts +0 -231
- package/src/common/server/mcp-handler-shared.spec.ts +0 -53
- package/src/common/server/mcp-id-alias-service.spec.ts +0 -106
- package/src/common/server/mcp-log-level-registry.spec.ts +0 -75
- package/src/common/server/mcp-logger.spec.ts +0 -235
- package/src/common/server/mcp-progress-reporter.spec.ts +0 -103
- package/src/common/server/mcp-tool-handler.spec.ts +0 -182
- package/src/common/tools/handlers/count-elements-mcp-tool-handler.spec.ts +0 -101
- package/src/common/tools/handlers/create-edges-mcp-tool-handler.spec.ts +0 -198
- package/src/common/tools/handlers/create-nodes-mcp-tool-handler.spec.ts +0 -199
- package/src/common/tools/handlers/query-elements-mcp-tool-handler.spec.ts +0 -212
- package/src/common/tools/handlers/session-info-mcp-tool-handler.spec.ts +0 -152
- package/src/common/tools/handlers/set-selection-mcp-tool-handler.spec.ts +0 -120
- package/src/common/tools/tool-annotations.spec.ts +0 -141
- package/src/node/server/mcp-http-transport-e2e.spec.ts +0 -297
- package/src/node/server/node-mcp-server-launcher.spec.ts +0 -184
- package/src/node/server/raw-http.spec.ts +0 -59
|
@@ -32,10 +32,12 @@ const z = require("zod/v4");
|
|
|
32
32
|
const mcp_input_schemas_1 = require("../../server/mcp-input-schemas");
|
|
33
33
|
const mcp_tool_handler_1 = require("../../server/mcp-tool-handler");
|
|
34
34
|
exports.SetSelectionInputSchema = mcp_input_schemas_1.McpDiagramScopedInputSchema.extend({
|
|
35
|
-
selectedElementIds: mcp_input_schemas_1.
|
|
35
|
+
selectedElementIds: mcp_input_schemas_1.elementIdsAllowingEmpty
|
|
36
36
|
.optional()
|
|
37
|
-
.describe('Element IDs to select. Pass an empty array (or omit
|
|
38
|
-
deselectedElementIds: mcp_input_schemas_1.
|
|
37
|
+
.describe('Element IDs to select. Pass an empty array (or omit the field) together with `clear: true` to clear the selection.'),
|
|
38
|
+
deselectedElementIds: mcp_input_schemas_1.elementIdsAllowingEmpty
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('Element IDs to remove from the selection. Used to subtract without replacing.'),
|
|
39
41
|
clear: z
|
|
40
42
|
.boolean()
|
|
41
43
|
.optional()
|
|
@@ -54,7 +56,7 @@ exports.SetSelectionOutputSchema = z.object({
|
|
|
54
56
|
* Read-write hint is honest: the viewport selection state is part of the client environment
|
|
55
57
|
* even though the underlying GModel is unaffected.
|
|
56
58
|
*/
|
|
57
|
-
let SetSelectionMcpToolHandler =
|
|
59
|
+
let SetSelectionMcpToolHandler = class SetSelectionMcpToolHandler extends mcp_tool_handler_1.AbstractMcpDiagramToolHandler {
|
|
58
60
|
constructor() {
|
|
59
61
|
super(...arguments);
|
|
60
62
|
this.name = SetSelectionMcpToolHandler_1.NAME;
|
|
@@ -66,6 +68,8 @@ let SetSelectionMcpToolHandler = SetSelectionMcpToolHandler_1 = class SetSelecti
|
|
|
66
68
|
this.outputSchema = exports.SetSelectionOutputSchema;
|
|
67
69
|
this.readOnlyHint = false;
|
|
68
70
|
}
|
|
71
|
+
static { SetSelectionMcpToolHandler_1 = this; }
|
|
72
|
+
static { this.NAME = 'set-selection'; }
|
|
69
73
|
async createResult({ selectedElementIds, deselectedElementIds, clear }) {
|
|
70
74
|
const resolvedSelected = this.resolveExistingIds(selectedElementIds);
|
|
71
75
|
const resolvedDeselected = this.resolveExistingIds(deselectedElementIds);
|
|
@@ -75,10 +79,10 @@ let SetSelectionMcpToolHandler = SetSelectionMcpToolHandler_1 = class SetSelecti
|
|
|
75
79
|
if (resolvedSelected.length > 0 || resolvedDeselected.length > 0) {
|
|
76
80
|
await this.actionDispatcher.dispatch(server_1.SelectAction.create({ selectedElementsIDs: resolvedSelected, deselectedElementsIDs: resolvedDeselected }));
|
|
77
81
|
}
|
|
78
|
-
return this.success(this.summarize(resolvedSelected, resolvedDeselected, clear
|
|
82
|
+
return this.success(this.summarize(resolvedSelected, resolvedDeselected, clear ?? false), {
|
|
79
83
|
selectedElementIds: this.encodeIds(resolvedSelected),
|
|
80
84
|
deselectedElementIds: this.encodeIds(resolvedDeselected),
|
|
81
|
-
cleared: clear
|
|
85
|
+
cleared: clear ?? false
|
|
82
86
|
});
|
|
83
87
|
}
|
|
84
88
|
summarize(selected, deselected, cleared) {
|
|
@@ -93,7 +97,6 @@ let SetSelectionMcpToolHandler = SetSelectionMcpToolHandler_1 = class SetSelecti
|
|
|
93
97
|
}
|
|
94
98
|
};
|
|
95
99
|
exports.SetSelectionMcpToolHandler = SetSelectionMcpToolHandler;
|
|
96
|
-
SetSelectionMcpToolHandler.NAME = 'set-selection';
|
|
97
100
|
__decorate([
|
|
98
101
|
(0, inversify_1.inject)(server_1.ActionDispatcher),
|
|
99
102
|
__metadata("design:type", Object)
|
|
@@ -1 +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,
|
|
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,sEAAsG;AACtG,oEAA8E;AAEjE,QAAA,uBAAuB,GAAG,+CAA2B,CAAC,MAAM,CAAC;IACtE,kBAAkB,EAAE,2CAAuB;SACtC,QAAQ,EAAE;SACV,QAAQ,CAAC,oHAAoH,CAAC;IACnI,oBAAoB,EAAE,2CAAuB;SACxC,QAAQ,EAAE;SACV,QAAQ,CAAC,+EAA+E,CAAC;IAC9F,KAAK,EAAE,CAAC;SACH,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,6GAA6G,CAAC;CAC/H,CAAC,CAAC;AAGU,QAAA,wBAAwB,GAAG,CAA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AAU,GAAE;GACA,0BAA0B,CAyCtC"}
|
|
@@ -51,7 +51,8 @@ export declare const SetViewOutputSchema: z.ZodObject<{
|
|
|
51
51
|
zoom: z.ZodNumber;
|
|
52
52
|
}, z.core.$strip>>;
|
|
53
53
|
}, z.core.$strip>;
|
|
54
|
-
export
|
|
54
|
+
export type SetViewOutput = z.infer<typeof SetViewOutputSchema>;
|
|
55
|
+
export declare class SetViewMcpToolHandler extends AbstractMcpDiagramToolHandler<SetViewInput, SetViewOutput> {
|
|
55
56
|
/** Timeout (in ms) for the `GetViewportAction` round-trip used by `set-viewport` partial updates. Override via subclass + rebind. */
|
|
56
57
|
protected readonly viewportQueryTimeoutMs: number;
|
|
57
58
|
static readonly NAME = "set-view";
|
|
@@ -1 +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;AAElF,OAAO,EACH,MAAM,EACN,gBAAgB,EAKhB,KAAK,EAER,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAgB,aAAa,EAAuB,MAAM,iCAAiC,CAAC;AAEnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAE9E,eAAO,MAAM,gBAAgB,oFAAqF,CAAC;AACnH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBAsB7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAe9B,CAAC;
|
|
1
|
+
{"version":3,"file":"set-view-mcp-tool-handler.d.ts","sourceRoot":"","sources":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MAAM,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IAUxG;;;;;OAKG;IACH,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM;IAW3G;;;;;OAKG;cACa,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;CAsBrH"}
|
|
@@ -64,7 +64,7 @@ exports.SetViewOutputSchema = z.object({
|
|
|
64
64
|
.optional()
|
|
65
65
|
.describe("Resolved final viewport when `action: 'set-viewport'` was applied (current values merged with the supplied overrides).")
|
|
66
66
|
});
|
|
67
|
-
let SetViewMcpToolHandler =
|
|
67
|
+
let SetViewMcpToolHandler = class SetViewMcpToolHandler extends mcp_tool_handler_1.AbstractMcpDiagramToolHandler {
|
|
68
68
|
constructor() {
|
|
69
69
|
super(...arguments);
|
|
70
70
|
/** Timeout (in ms) for the `GetViewportAction` round-trip used by `set-viewport` partial updates. Override via subclass + rebind. */
|
|
@@ -83,11 +83,13 @@ let SetViewMcpToolHandler = SetViewMcpToolHandler_1 = class SetViewMcpToolHandle
|
|
|
83
83
|
/** Viewport IS client-side environment; dispatching mutates it, so the read-base default doesn't honestly apply. */
|
|
84
84
|
this.readOnlyHint = false;
|
|
85
85
|
}
|
|
86
|
+
static { SetViewMcpToolHandler_1 = this; }
|
|
87
|
+
static { this.NAME = 'set-view'; }
|
|
86
88
|
async createResult({ action, elementIds, zoom, scroll }) {
|
|
87
89
|
if (action === 'set-viewport') {
|
|
88
90
|
return this.applyExplicitViewport(zoom, scroll);
|
|
89
91
|
}
|
|
90
|
-
const resolvedIds = elementIds ?
|
|
92
|
+
const resolvedIds = elementIds ? this.resolveExistingIds(elementIds) : this.modelState.index.allIds();
|
|
91
93
|
const dispatchAction = this.buildIntentAction(action, resolvedIds);
|
|
92
94
|
await this.actionDispatcher.dispatch(dispatchAction);
|
|
93
95
|
return this.success('Viewport successfully changed', { action, targetIds: this.encodeIds(resolvedIds) });
|
|
@@ -122,8 +124,8 @@ let SetViewMcpToolHandler = SetViewMcpToolHandler_1 = class SetViewMcpToolHandle
|
|
|
122
124
|
const current = await (0, mcp_handler_shared_1.requestActionOrFail)(this.actionDispatcher, server_1.GetViewportAction.create(), this.viewportQueryTimeoutMs, this.name);
|
|
123
125
|
// Some clients respond before layout completes — fall back to origin / 1× when fields are null.
|
|
124
126
|
const newViewport = {
|
|
125
|
-
scroll: scroll
|
|
126
|
-
zoom: zoom
|
|
127
|
+
scroll: scroll ?? (server_1.Point.isValid(current.viewport.scroll) ? current.viewport.scroll : server_1.Point.ORIGIN),
|
|
128
|
+
zoom: zoom ?? (Number.isFinite(current.viewport.zoom) ? current.viewport.zoom : 1)
|
|
127
129
|
};
|
|
128
130
|
await this.actionDispatcher.dispatch(server_1.SetViewportAction.create(rootId, newViewport, { animate: true }));
|
|
129
131
|
return this.success(`Viewport set to scroll=(${newViewport.scroll.x}, ${newViewport.scroll.y}) zoom=${newViewport.zoom}`, {
|
|
@@ -133,7 +135,6 @@ let SetViewMcpToolHandler = SetViewMcpToolHandler_1 = class SetViewMcpToolHandle
|
|
|
133
135
|
}
|
|
134
136
|
};
|
|
135
137
|
exports.SetViewMcpToolHandler = SetViewMcpToolHandler;
|
|
136
|
-
SetViewMcpToolHandler.NAME = 'set-view';
|
|
137
138
|
__decorate([
|
|
138
139
|
(0, inversify_1.inject)(server_1.ActionDispatcher),
|
|
139
140
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-view-mcp-tool-handler.js","sourceRoot":"","sources":["../../../../src/common/tools/handlers/set-view-mcp-tool-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,iDAS8B;AAC9B,yCAA+C;AAC/C,4BAA4B;AAC5B,wEAAmG;AACnG,sEAAmG;AACnG,oEAA8E;AAEjE,QAAA,gBAAgB,GAAG,CAAC,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,cAAc,CAAU,CAAC;AAGtG,QAAA,kBAAkB,GAAG,+CAA2B,CAAC,MAAM,CAAC;IACjE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC,QAAQ,CAAC,sDAAsD,CAAC;IACjG,UAAU,EAAE,8BAAU;SACjB,QAAQ,EAAE;SACV,QAAQ,CACL,yHAAyH,CAC5H;IACL,IAAI,EAAE,CAAC;SACF,MAAM,EAAE;SACR,GAAG,CAAC,IAAI,CAAC;SACT,GAAG,CAAC,EAAE,CAAC;SACP,QAAQ,EAAE;SACV,QAAQ,CACL,qGAAqG;QACjG,gFAAgF,CACvF;IACL,MAAM,EAAE,4BAAQ;SACX,QAAQ,EAAE;SACV,QAAQ,CACL,gHAAgH;QAC5G,gFAAgF,CACvF;CACR,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IAC1F,SAAS,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CACL,uKAAuK,CAC1K;IACL,QAAQ,EAAE,CAAC;SACN,MAAM,CAAC;QACJ,MAAM,EAAE,4BAAQ;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACnB,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,wHAAwH,CAAC;CAC1I,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"set-view-mcp-tool-handler.js","sourceRoot":"","sources":["../../../../src/common/tools/handlers/set-view-mcp-tool-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;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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;AAoBM;IAAnC,IAAA,kBAAM,EAAC,yBAAgB,CAAC;;+DAA8C;gCApB9D,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CA6EjC"}
|
|
@@ -25,10 +25,11 @@ export type UndoInput = z.infer<typeof UndoInputSchema>;
|
|
|
25
25
|
export declare const UndoOutputSchema: z.ZodObject<{
|
|
26
26
|
commandsUndone: z.ZodNumber;
|
|
27
27
|
}, z.core.$strip>;
|
|
28
|
+
export type UndoOutput = z.infer<typeof UndoOutputSchema>;
|
|
28
29
|
/**
|
|
29
30
|
* Undo a given number of the most recent actions on the command stack.
|
|
30
31
|
*/
|
|
31
|
-
export declare class UndoMcpToolHandler extends OperationMcpDiagramToolHandler<UndoInput> {
|
|
32
|
+
export declare class UndoMcpToolHandler extends OperationMcpDiagramToolHandler<UndoInput, UndoOutput> {
|
|
32
33
|
static readonly NAME = "undo";
|
|
33
34
|
readonly name = "undo";
|
|
34
35
|
readonly title = "Undo Diagram Commands";
|
|
@@ -1 +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,iCAA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 -33,7 +33,7 @@ const mcp_handler_shared_1 = require("../../server/mcp-handler-shared");
|
|
|
33
33
|
const mcp_input_schemas_1 = require("../../server/mcp-input-schemas");
|
|
34
34
|
const mcp_tool_handler_1 = require("../../server/mcp-tool-handler");
|
|
35
35
|
exports.UndoInputSchema = mcp_input_schemas_1.McpDiagramScopedInputSchema.extend({
|
|
36
|
-
commandsToUndo: z.number().min(1).default(1).describe('Number of commands to undo. Defaults to 1 (most recent command).')
|
|
36
|
+
commandsToUndo: z.number().int().min(1).default(1).describe('Number of commands to undo. Defaults to 1 (most recent command).')
|
|
37
37
|
});
|
|
38
38
|
exports.UndoOutputSchema = z.object({
|
|
39
39
|
commandsUndone: z.number().int().describe('Number of commands actually reverted.')
|
|
@@ -41,7 +41,7 @@ exports.UndoOutputSchema = z.object({
|
|
|
41
41
|
/**
|
|
42
42
|
* Undo a given number of the most recent actions on the command stack.
|
|
43
43
|
*/
|
|
44
|
-
let UndoMcpToolHandler =
|
|
44
|
+
let UndoMcpToolHandler = class UndoMcpToolHandler extends mcp_tool_handler_1.OperationMcpDiagramToolHandler {
|
|
45
45
|
constructor() {
|
|
46
46
|
super(...arguments);
|
|
47
47
|
this.name = UndoMcpToolHandler_1.NAME;
|
|
@@ -54,18 +54,23 @@ let UndoMcpToolHandler = UndoMcpToolHandler_1 = class UndoMcpToolHandler extends
|
|
|
54
54
|
this.inputSchema = exports.UndoInputSchema;
|
|
55
55
|
this.outputSchema = exports.UndoOutputSchema;
|
|
56
56
|
}
|
|
57
|
+
static { UndoMcpToolHandler_1 = this; }
|
|
58
|
+
static { this.NAME = 'undo'; }
|
|
57
59
|
async createResult({ commandsToUndo }) {
|
|
58
60
|
if (!this.commandStack.canUndo()) {
|
|
59
61
|
throw new mcp_handler_shared_1.McpToolError('Nothing to undo (undo stack is empty; the model is at its initial state for this session).');
|
|
60
62
|
}
|
|
61
|
-
|
|
63
|
+
// The stack may hold fewer commands than requested.
|
|
64
|
+
let commandsUndone = 0;
|
|
65
|
+
while (commandsUndone < commandsToUndo && this.commandStack.canUndo()) {
|
|
62
66
|
await this.actionDispatcher.dispatch(server_1.UndoAction.create());
|
|
67
|
+
commandsUndone++;
|
|
63
68
|
}
|
|
64
|
-
|
|
69
|
+
const shortfall = commandsUndone < commandsToUndo ? ` (${commandsToUndo} requested; the undo stack held no more commands)` : '';
|
|
70
|
+
return this.success(`Undo successful: reverted ${commandsUndone} command(s)${shortfall}`, { commandsUndone });
|
|
65
71
|
}
|
|
66
72
|
};
|
|
67
73
|
exports.UndoMcpToolHandler = UndoMcpToolHandler;
|
|
68
|
-
UndoMcpToolHandler.NAME = 'undo';
|
|
69
74
|
__decorate([
|
|
70
75
|
(0, inversify_1.inject)(server_1.CommandStack),
|
|
71
76
|
__metadata("design:type", Object)
|
|
@@ -1 +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;
|
|
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;I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C,CAAC,EAAE,CAAC;QAChI,OAAO,IAAI,CAAC,OAAO,CAAC,6BAA6B,cAAc,cAAc,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;IAClH,CAAC;;AA7BQ,gDAAkB;AAaK;IAA/B,IAAA,kBAAM,EAAC,qBAAY,CAAC;;wDAAsC;6BAblD,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CA8B9B"}
|
|
@@ -34,7 +34,8 @@ export declare const ValidateDiagramOutputSchema: z.ZodObject<{
|
|
|
34
34
|
elementId: z.ZodString;
|
|
35
35
|
}, z.core.$strip>>;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
|
-
export
|
|
37
|
+
export type ValidateDiagramOutput = z.infer<typeof ValidateDiagramOutputSchema>;
|
|
38
|
+
export declare class ValidateDiagramMcpToolHandler extends AbstractMcpDiagramToolHandler<ValidateDiagramInput, ValidateDiagramOutput> {
|
|
38
39
|
static readonly NAME = "validate-diagram";
|
|
39
40
|
readonly name = "validate-diagram";
|
|
40
41
|
readonly title = "Validate Diagram";
|
|
@@ -1 +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;
|
|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AE,CAAC,EAAE,GAAG,CAAC,EAAE;CAWrI"}
|
|
Binary file
|
|
@@ -1 +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;
|
|
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,yC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AC;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,SAAS,MAAM,CAAC,KAAK,SAAS,MAAM,CAAC,WAAW,SAAS,MAAM,CAAC,SAAS,EAAE,CAAC;YACtG,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;AAcQ;IAA7C,IAAA,kBAAM,EAAC,uBAAc,CAAC;IAAE,IAAA,oBAAQ,GAAE;;gEAAsC;wCAdhE,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAoDzC"}
|
|
@@ -29,8 +29,7 @@ function objectArrayToMarkdownTable(data) {
|
|
|
29
29
|
const dataRows = data.map((obj) => {
|
|
30
30
|
const rowString = headers
|
|
31
31
|
.map(header => {
|
|
32
|
-
|
|
33
|
-
const value = (_a = obj[header]) !== null && _a !== void 0 ? _a : '';
|
|
32
|
+
const value = obj[header] ?? '';
|
|
34
33
|
if (typeof value === 'object') {
|
|
35
34
|
return JSON.stringify(value).replace(/["{}|]/g, '');
|
|
36
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-util.js","sourceRoot":"","sources":["../../../src/common/util/markdown-util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAKlF,gEAwBC;AA3BD;;GAEG;AACH,SAAgB,0BAA0B,CAAC,IAA2B;IAClE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACf,OAAO,E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,KAAK,QAAQ,EAAE,CAAC;gBAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YACxD,CAAC;YACD,+EAA+E;YAC/E,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC/C,CAAC,CAAC;aACD,IAAI,CAAC,KAAK,CAAC,CAAC;QACjB,OAAO,KAAK,SAAS,IAAI,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -30,6 +30,14 @@ const node_mcp_request_context_1 = require("../server/node-mcp-request-context")
|
|
|
30
30
|
* experimental status.
|
|
31
31
|
*/
|
|
32
32
|
class NodeMcpServerModule extends abstract_mcp_server_module_1.AbstractMcpServerModule {
|
|
33
|
+
static { this.DEFAULT_OPTIONS = {
|
|
34
|
+
...abstract_mcp_server_module_1.DEFAULT_MCP_OPTIONS,
|
|
35
|
+
host: '127.0.0.1',
|
|
36
|
+
allowedHosts: ['127.0.0.1', 'localhost']
|
|
37
|
+
// `allowedOrigins` deliberately undefined: accept absent Origin (typical for desktop-IDE
|
|
38
|
+
// MCP clients) and rely on Host validation to gate DNS-rebinding. Adopters whose
|
|
39
|
+
// deployment is browser-fronted set this explicitly to their frontend's origin.
|
|
40
|
+
}; }
|
|
33
41
|
constructor(overrides = {}) {
|
|
34
42
|
super({ ...NodeMcpServerModule.DEFAULT_OPTIONS, ...overrides });
|
|
35
43
|
}
|
|
@@ -41,12 +49,4 @@ class NodeMcpServerModule extends abstract_mcp_server_module_1.AbstractMcpServer
|
|
|
41
49
|
}
|
|
42
50
|
}
|
|
43
51
|
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
52
|
//# sourceMappingURL=node-mcp-server-module.js.map
|
|
@@ -1 +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;
|
|
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;aAC5C,oBAAe,GAAsB;QACjD,GAAG,gDAAmB;QACtB,IAAI,EAAE,WAAW;QACjB,YAAY,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;QACxC,yFAAyF;QACzF,iFAAiF;QACjF,gFAAgF;KACnF,CAAC;IAEF,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/server-mcp",
|
|
3
|
-
"version": "2.8.0-next.
|
|
3
|
+
"version": "2.8.0-next.12",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for the GLSP TypeScript server — runs on Node, browser, and Fetch-API runtimes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -42,28 +42,28 @@
|
|
|
42
42
|
"browser.js",
|
|
43
43
|
"browser.d.ts",
|
|
44
44
|
"common.js",
|
|
45
|
-
"common.d.ts"
|
|
45
|
+
"common.d.ts",
|
|
46
|
+
"!**/*.spec.ts",
|
|
47
|
+
"!**/*.spec.tsx",
|
|
48
|
+
"!**/test/**"
|
|
46
49
|
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "tsc -b",
|
|
49
|
-
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
|
|
50
|
-
"generate:index": "glsp generateIndex src/browser src/common src/node -f -s",
|
|
51
|
-
"lint": "eslint --ext .ts,.tsx ./src",
|
|
52
|
-
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
|
|
53
|
-
"test:ci": "yarn test --reporter mocha-ctrf-json-reporter",
|
|
54
|
-
"test:coverage": "nyc yarn test",
|
|
55
|
-
"watch": "tsc -w"
|
|
56
|
-
},
|
|
57
50
|
"dependencies": {
|
|
58
|
-
"@eclipse-glsp/server": "2.8.0-next.1+ab013b0",
|
|
59
51
|
"@hono/node-server": "^1.19.9",
|
|
60
|
-
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
52
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
53
|
+
"zod": "^4.0.0",
|
|
54
|
+
"@eclipse-glsp/server": "2.8.0-next.12"
|
|
61
55
|
},
|
|
62
56
|
"peerDependencies": {
|
|
63
|
-
"inversify": "^6.1.3"
|
|
57
|
+
"inversify": "^6.1.3",
|
|
58
|
+
"reflect-metadata": "^0.2.2"
|
|
64
59
|
},
|
|
65
60
|
"publishConfig": {
|
|
66
61
|
"access": "public"
|
|
67
62
|
},
|
|
68
|
-
"
|
|
69
|
-
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsc -b",
|
|
65
|
+
"clean": "rimraf lib *.tsbuildinfo coverage",
|
|
66
|
+
"generate:index": "glsp generateIndex src/browser src/common src/node -f -s",
|
|
67
|
+
"lint": "eslint --ext .ts,.tsx ./src"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { McpServerOptions as McpServerOptionsType } from '@eclipse-glsp/protocol';
|
|
18
|
-
import { BindingContext } from '@eclipse-glsp/protocol/lib/di';
|
|
19
17
|
import {
|
|
20
18
|
AbstractMultiBinding,
|
|
21
19
|
applyBindingTarget,
|
|
20
|
+
BindingContext,
|
|
22
21
|
BindingTarget,
|
|
23
22
|
GLSPModule,
|
|
24
23
|
GLSPServerInitializer,
|
|
25
24
|
GLSPServerListener,
|
|
26
|
-
Logger
|
|
25
|
+
Logger,
|
|
26
|
+
McpServerOptions as McpServerOptionsType
|
|
27
27
|
} from '@eclipse-glsp/server';
|
|
28
28
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
29
29
|
import { interfaces } from 'inversify';
|
|
@@ -215,7 +215,7 @@ export abstract class AbstractMcpDiagramModule extends GLSPModule {
|
|
|
215
215
|
binding.add(GetSelectionMcpToolHandler);
|
|
216
216
|
binding.add(SetSelectionMcpToolHandler);
|
|
217
217
|
binding.add(SetViewMcpToolHandler);
|
|
218
|
-
// Auto-skips
|
|
218
|
+
// Auto-skips via `isSupportedByDiagramType()` when no `LayoutEngine` is bound.
|
|
219
219
|
binding.add(LayoutMcpToolHandler);
|
|
220
220
|
}
|
|
221
221
|
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { CreateEdgeOperation, CreateNodeOperation } from '@eclipse-glsp/protocol';
|
|
18
17
|
import {
|
|
18
|
+
CreateEdgeOperation,
|
|
19
19
|
CreateEdgeOperationHandler,
|
|
20
|
+
CreateNodeOperation,
|
|
20
21
|
CreateNodeOperationHandler,
|
|
21
22
|
CreateOperationHandler,
|
|
22
23
|
Logger,
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { GModelElement } from '@eclipse-glsp/
|
|
18
|
-
import { Dimension, GModelSerializer, Logger, Point } from '@eclipse-glsp/server';
|
|
17
|
+
import { Dimension, GModelElement, GModelSerializer, Logger, Point } from '@eclipse-glsp/server';
|
|
19
18
|
import { inject, injectable, postConstruct } from 'inversify';
|
|
20
19
|
import { McpStructuredContent } from '../../server/mcp-handler-shared';
|
|
21
20
|
import { McpIdAliasService } from '../../server/mcp-id-alias-service';
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { McpServerOptions as McpServerOptionsType } from '@eclipse-glsp/protocol';
|
|
18
17
|
import {
|
|
19
18
|
ClientSessionListener,
|
|
20
19
|
ClientSessionManager,
|
|
@@ -30,14 +29,15 @@ import {
|
|
|
30
29
|
McpInitializeParameters,
|
|
31
30
|
McpInitializeResult,
|
|
32
31
|
McpServerConfiguration,
|
|
33
|
-
McpServerInitOptions
|
|
32
|
+
McpServerInitOptions,
|
|
33
|
+
McpServerOptions as McpServerOptionsType
|
|
34
34
|
} from '@eclipse-glsp/server';
|
|
35
35
|
import { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
36
36
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
37
37
|
import { WebStandardStreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js';
|
|
38
38
|
import {
|
|
39
|
-
ServerCapabilities,
|
|
40
39
|
SUPPORTED_PROTOCOL_VERSIONS,
|
|
40
|
+
ServerCapabilities,
|
|
41
41
|
SetLevelRequestSchema,
|
|
42
42
|
isInitializeRequest
|
|
43
43
|
} from '@modelcontextprotocol/sdk/types.js';
|
|
@@ -45,7 +45,8 @@ const KEEP_ALIVE_PING_TIMEOUT_MS = 5_000;
|
|
|
45
45
|
* registration; the launcher disposes it on session-close and on server shutdown.
|
|
46
46
|
*/
|
|
47
47
|
export interface GLSPMcpServer
|
|
48
|
-
extends
|
|
48
|
+
extends
|
|
49
|
+
Pick<McpServer, 'registerPrompt' | 'registerResource' | 'registerTool' | 'sendLoggingMessage' | 'isConnected' | 'connect'>,
|
|
49
50
|
Disposable {
|
|
50
51
|
readonly options: McpServerOptions;
|
|
51
52
|
|
|
@@ -37,6 +37,11 @@ import { McpRequestContext, NoopMcpRequestContext } from './mcp-request-context'
|
|
|
37
37
|
import { AbstractMcpDiagramResourceHandler, McpDiagramResourceHandlerConstructor, toParams } from './mcp-resource-handler';
|
|
38
38
|
import { BaseMcpDiagramToolHandler, McpDiagramToolHandlerConstructor } from './mcp-tool-handler';
|
|
39
39
|
|
|
40
|
+
/** The diagram-type support hook shared by the diagram-scope tool and resource handler bases. */
|
|
41
|
+
interface DiagramTypeSupportAware {
|
|
42
|
+
isSupportedByDiagramType(): boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
/**
|
|
41
46
|
* Per-diagram-type catalog of constructor lists, harvested at MCP-server start by loading each
|
|
42
47
|
* diagram type's modules onto a temporary child container — same pattern as
|
|
@@ -97,11 +102,13 @@ export class DefaultMcpDiagramHandlerDispatcher implements McpDiagramHandlerDisp
|
|
|
97
102
|
|
|
98
103
|
/**
|
|
99
104
|
* Build the per-diagram-type catalog by inspecting each diagram type's module set. We don't
|
|
100
|
-
* have a real GLSP session yet — and we don't want one, because we
|
|
105
|
+
* have a real GLSP session yet — and we don't want one, because we mostly need the bound
|
|
101
106
|
* constructor *lists*, not instances. So we spin up a throwaway child container per diagram
|
|
102
107
|
* type, load its modules plus a placeholder session module, and read out the multi-binding
|
|
103
|
-
* constants.
|
|
104
|
-
*
|
|
108
|
+
* constants. The temporary container is unbound immediately after.
|
|
109
|
+
*
|
|
110
|
+
* Only handlers that override `isSupportedByDiagramType` are instantiated, so a handler with
|
|
111
|
+
* a `@postConstruct` sees this probe just because it opted into the support gate.
|
|
105
112
|
*
|
|
106
113
|
* The placeholder session module is bound with the synthetic {@link TEMPORARY_CLIENT_ID} so
|
|
107
114
|
* any session-scoped `@inject(ClientId)` in module-load wiring resolves cleanly. Diagram
|
|
@@ -123,8 +130,18 @@ export class DefaultMcpDiagramHandlerDispatcher implements McpDiagramHandlerDisp
|
|
|
123
130
|
for (const [diagramType, modules] of this.diagramModules) {
|
|
124
131
|
const tempContainer = this.serverContainer.createChild();
|
|
125
132
|
tempContainer.load(...modules, placeholderSessionModule);
|
|
126
|
-
const tools =
|
|
127
|
-
|
|
133
|
+
const tools = this.filterSupported(
|
|
134
|
+
tempContainer,
|
|
135
|
+
getConstructorList<McpDiagramToolHandlerConstructor>(tempContainer, McpDiagramToolHandlerConstructor),
|
|
136
|
+
diagramType,
|
|
137
|
+
BaseMcpDiagramToolHandler.prototype.isSupportedByDiagramType
|
|
138
|
+
);
|
|
139
|
+
const resources = this.filterSupported(
|
|
140
|
+
tempContainer,
|
|
141
|
+
getConstructorList<McpDiagramResourceHandlerConstructor>(tempContainer, McpDiagramResourceHandlerConstructor),
|
|
142
|
+
diagramType,
|
|
143
|
+
AbstractMcpDiagramResourceHandler.prototype.isSupportedByDiagramType
|
|
144
|
+
);
|
|
128
145
|
const prompts = getConstructorList<McpDiagramPromptHandlerConstructor>(tempContainer, McpDiagramPromptHandlerConstructor);
|
|
129
146
|
tempContainer.unbindAll();
|
|
130
147
|
catalogs.push({ diagramType, toolConstructors: tools, resourceConstructors: resources, promptConstructors: prompts });
|
|
@@ -132,6 +149,40 @@ export class DefaultMcpDiagramHandlerDispatcher implements McpDiagramHandlerDisp
|
|
|
132
149
|
this.diagramCatalogs = catalogs;
|
|
133
150
|
}
|
|
134
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Drop constructors whose handler reports the diagram type can't support it, so they never
|
|
154
|
+
* reach the MCP catalog. A handler that overrides the hook is resolved against the harvest
|
|
155
|
+
* container, where `@optional()` dependencies reflect the diagram type's real bindings; one
|
|
156
|
+
* that inherits `defaultHook` or doesn't declare the hook is kept without being instantiated.
|
|
157
|
+
*
|
|
158
|
+
* Fails open: a constructor that cannot be resolved here stays in the catalog.
|
|
159
|
+
*/
|
|
160
|
+
protected filterSupported<C extends interfaces.Newable<DiagramTypeSupportAware>>(
|
|
161
|
+
container: Container,
|
|
162
|
+
constructors: C[],
|
|
163
|
+
diagramType: string,
|
|
164
|
+
defaultHook: DiagramTypeSupportAware['isSupportedByDiagramType']
|
|
165
|
+
): C[] {
|
|
166
|
+
return constructors.filter(constructor => {
|
|
167
|
+
// A duck-typed handler may not carry the hook at all; skip it rather than resolving it
|
|
168
|
+
// only to call a method that isn't there.
|
|
169
|
+
const hook = constructor.prototype.isSupportedByDiagramType;
|
|
170
|
+
if (typeof hook !== 'function' || hook === defaultHook) {
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
try {
|
|
174
|
+
if (container.resolve(constructor).isSupportedByDiagramType()) {
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
this.logger.debug(`Diagram type '${diagramType}' does not support MCP handler '${constructor.name}'; not registering.`);
|
|
178
|
+
return false;
|
|
179
|
+
} catch (err: unknown) {
|
|
180
|
+
this.logger.debug(`Could not probe MCP handler '${constructor.name}' for diagram type '${diagramType}'; registering.`, err);
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
135
186
|
/** True when at least one diagram type has at least one tool handler bound. */
|
|
136
187
|
hasDiagramTools(): boolean {
|
|
137
188
|
return this.diagramCatalogs.some(catalog => catalog.toolConstructors.length > 0);
|
|
@@ -71,12 +71,10 @@ export interface McpStructuredContent {
|
|
|
71
71
|
* otherwise throw `new McpToolError('context-specific message')`.
|
|
72
72
|
*/
|
|
73
73
|
export class McpToolError extends Error {
|
|
74
|
-
constructor(
|
|
75
|
-
message: string,
|
|
76
|
-
readonly cause?: unknown
|
|
77
|
-
) {
|
|
74
|
+
constructor(message: string, cause?: unknown) {
|
|
78
75
|
super(message);
|
|
79
76
|
this.name = 'McpToolError';
|
|
77
|
+
this.cause = cause;
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
|
|
@@ -45,6 +45,9 @@ export const elementId = z.string();
|
|
|
45
45
|
/** One or more element ids. Empty arrays are rejected. */
|
|
46
46
|
export const elementIds = z.array(z.string()).min(1);
|
|
47
47
|
|
|
48
|
+
/** Zero or more element ids, for tools where an empty array is itself meaningful (e.g. "select nothing"). */
|
|
49
|
+
export const elementIdsAllowingEmpty = z.array(z.string());
|
|
50
|
+
|
|
48
51
|
/** Cartesian position used by node-creation / -modification tools. */
|
|
49
52
|
export const position = z
|
|
50
53
|
.object({
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { ProposalString } from '@eclipse-glsp/
|
|
17
|
+
import { ProposalString } from '@eclipse-glsp/server';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* MIME type for an MCP resource. Annotating a `mimeType` field with this type prompts the IDE
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { McpServerOptions as McpServerOptionsType } from '@eclipse-glsp/
|
|
17
|
+
import { McpServerOptions as McpServerOptionsType } from '@eclipse-glsp/server';
|
|
18
18
|
import { injectable } from 'inversify';
|
|
19
19
|
|
|
20
20
|
/**
|