@eclipse-glsp-examples/workflow-server 2.7.0-next.9 → 2.8.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/app.d.ts +2 -2
- package/lib/browser/app.d.ts.map +1 -1
- package/lib/browser/app.js +9 -4
- package/lib/browser/app.js.map +1 -1
- package/lib/common/index.d.ts +5 -1
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +5 -1
- package/lib/common/index.js.map +1 -1
- package/lib/common/mcp/{workflow-mcp-module.d.ts → workflow-mcp-diagram-module.d.ts} +2 -11
- package/lib/common/mcp/workflow-mcp-diagram-module.d.ts.map +1 -0
- package/lib/common/mcp/{workflow-mcp-module.js → workflow-mcp-diagram-module.js} +2 -12
- package/lib/common/mcp/workflow-mcp-diagram-module.js.map +1 -0
- package/lib/node/app.js +3 -2
- package/lib/node/app.js.map +1 -1
- package/lib/node/index.d.ts +2 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +2 -1
- package/lib/node/index.js.map +1 -1
- package/lib/{common/handler/create-foreign-node-handler.d.ts → node/mcp/workflow-mcp-module.d.ts} +7 -9
- package/lib/node/mcp/workflow-mcp-module.d.ts.map +1 -0
- package/lib/{common/handler/create-foreign-object-node-handler.d.ts → node/mcp/workflow-mcp-module.js} +12 -10
- package/lib/node/mcp/workflow-mcp-module.js.map +1 -0
- package/package.json +6 -6
- package/src/browser/app.ts +11 -4
- package/src/common/index.ts +5 -1
- package/src/common/mcp/{workflow-mcp-module.ts → workflow-mcp-diagram-module.ts} +1 -16
- package/src/node/app.ts +2 -1
- package/src/node/index.ts +2 -1
- package/src/node/mcp/workflow-mcp-module.ts +23 -0
- package/lib/common/handler/create-foreign-node-handler.d.ts.map +0 -1
- package/lib/common/handler/create-foreign-node-handler.js +0 -52
- package/lib/common/handler/create-foreign-node-handler.js.map +0 -1
- package/lib/common/handler/create-foreign-object-node-handler.d.ts.map +0 -1
- package/lib/common/handler/create-foreign-object-node-handler.js +0 -40
- package/lib/common/handler/create-foreign-object-node-handler.js.map +0 -1
- package/lib/common/mcp/workflow-mcp-module.d.ts.map +0 -1
- package/lib/common/mcp/workflow-mcp-module.js.map +0 -1
package/lib/browser/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import 'reflect-metadata';
|
|
17
|
-
export declare function launch(
|
|
17
|
+
export declare function launch(_argv?: string[]): Promise<void>;
|
|
18
18
|
//# sourceMappingURL=app.d.ts.map
|
package/lib/browser/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC;AAW1B,wBAAsB,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB5D"}
|
package/lib/browser/app.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.launch = launch;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2022-
|
|
5
|
+
* Copyright (c) 2022-2026 STMicroelectronics and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -19,11 +19,15 @@ exports.launch = launch;
|
|
|
19
19
|
require("reflect-metadata");
|
|
20
20
|
const layout_elk_1 = require("@eclipse-glsp/layout-elk");
|
|
21
21
|
const browser_1 = require("@eclipse-glsp/server/browser");
|
|
22
|
+
const browser_2 = require("@eclipse-glsp/server-mcp/browser");
|
|
22
23
|
const inversify_1 = require("inversify");
|
|
23
24
|
const workflow_layout_configurator_1 = require("../common/layout/workflow-layout-configurator");
|
|
25
|
+
const workflow_mcp_diagram_module_1 = require("../common/mcp/workflow-mcp-diagram-module");
|
|
24
26
|
const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
|
|
25
27
|
const mock_model_storage_1 = require("./mock-model-storage");
|
|
26
|
-
async function launch(
|
|
28
|
+
async function launch(_argv) {
|
|
29
|
+
// Bridge must be created before any await so postMessages that arrive on the next event-loop tick aren't dropped.
|
|
30
|
+
const bridge = new browser_2.McpWorkerBridge();
|
|
27
31
|
const appContainer = new inversify_1.Container();
|
|
28
32
|
appContainer.load((0, browser_1.createAppModule)({ logLevel: browser_1.LogLevel.info }));
|
|
29
33
|
const launcher = appContainer.resolve(browser_1.WorkerServerLauncher);
|
|
@@ -32,8 +36,9 @@ async function launch(argv) {
|
|
|
32
36
|
layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator,
|
|
33
37
|
isWebWorker: true
|
|
34
38
|
});
|
|
35
|
-
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => mock_model_storage_1.WorkflowMockModelStorage), elkLayoutModule);
|
|
36
|
-
launcher.configure(serverModule);
|
|
39
|
+
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => mock_model_storage_1.WorkflowMockModelStorage), elkLayoutModule, new workflow_mcp_diagram_module_1.WorkflowMcpDiagramModule());
|
|
40
|
+
launcher.configure(serverModule, bridge.createServerModule());
|
|
41
|
+
// Resolves only on connection close — must be the last await.
|
|
37
42
|
await launcher.start({});
|
|
38
43
|
}
|
|
39
44
|
launch().catch(error => console.error('Error in workflow server launcher:', error));
|
package/lib/browser/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/browser/app.ts"],"names":[],"mappings":";;AA0BA,wBAwBC;AAlDD;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAE1B,yDAAoE;AACpE,0DAA+F;AAC/F,8DAAmE;AACnE,yCAAsC;AACtC,gGAA2F;AAC3F,2FAAqF;AACrF,+EAAgG;AAChG,6DAAgE;AAEzD,KAAK,UAAU,MAAM,CAAC,KAAgB;IACzC,kHAAkH;IAClH,MAAM,MAAM,GAAG,IAAI,yBAAe,EAAE,CAAC;IAErC,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,IAAA,yBAAe,EAAC,EAAE,QAAQ,EAAE,kBAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAoB,CAAC,CAAC;IAC5D,MAAM,eAAe,GAAG,IAAA,qCAAwB,EAAC;QAC7C,UAAU,EAAE,CAAC,SAAS,CAAC;QACvB,kBAAkB,EAAE,yDAA0B;QAC9C,WAAW,EAAE,IAAI;KACpB,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAClE,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,6CAAwB,CAAC,EACzD,eAAe,EACf,IAAI,sDAAwB,EAAE,CACjC,CAAC;IAEF,QAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAE9D,8DAA8D;IAC9D,MAAM,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
package/lib/common/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -31,6 +31,10 @@ export * from './handler/grid-snapper';
|
|
|
31
31
|
export * from './labeledit/workflow-label-edit-validator';
|
|
32
32
|
export * from './layout/workflow-layout-configurator';
|
|
33
33
|
export * from './marker/workflow-model-validator';
|
|
34
|
+
export * from './mcp/workflow-element-types-provider';
|
|
35
|
+
export * from './mcp/workflow-mcp-diagram-module';
|
|
36
|
+
export * from './mcp/workflow-mcp-label-provider';
|
|
37
|
+
export * from './mcp/workflow-mcp-model-serializer';
|
|
34
38
|
export * from './model/workflow-navigation-target-resolver';
|
|
35
39
|
export * from './provider/abstract-next-or-previous-navigation-target-provider';
|
|
36
40
|
export * from './provider/next-node-navigation-target-provider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,mBAAmB,CAAC;AAClC,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iEAAiE,CAAC;AAChF,cAAc,iDAAiD,CAAC;AAChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,cAAc,mBAAmB,CAAC;AAClC,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iEAAiE,CAAC;AAChF,cAAc,iDAAiD,CAAC;AAChE,cAAc,0DAA0D,CAAC;AACzE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
package/lib/common/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2023-
|
|
3
|
+
* Copyright (c) 2023-2026 STMicroelectronics and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -47,6 +47,10 @@ __exportStar(require("./handler/grid-snapper"), exports);
|
|
|
47
47
|
__exportStar(require("./labeledit/workflow-label-edit-validator"), exports);
|
|
48
48
|
__exportStar(require("./layout/workflow-layout-configurator"), exports);
|
|
49
49
|
__exportStar(require("./marker/workflow-model-validator"), exports);
|
|
50
|
+
__exportStar(require("./mcp/workflow-element-types-provider"), exports);
|
|
51
|
+
__exportStar(require("./mcp/workflow-mcp-diagram-module"), exports);
|
|
52
|
+
__exportStar(require("./mcp/workflow-mcp-label-provider"), exports);
|
|
53
|
+
__exportStar(require("./mcp/workflow-mcp-model-serializer"), exports);
|
|
50
54
|
__exportStar(require("./model/workflow-navigation-target-resolver"), exports);
|
|
51
55
|
__exportStar(require("./provider/abstract-next-or-previous-navigation-target-provider"), exports);
|
|
52
56
|
__exportStar(require("./provider/next-node-navigation-target-provider"), exports);
|
package/lib/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,oDAAkC;AAClC,yEAAuD;AACvD,0EAAwD;AACxD,oEAAkD;AAClD,yEAAuD;AACvD,gEAA8C;AAC9C,qEAAmD;AACnD,6EAA2D;AAC3D,qEAAmD;AACnD,uEAAqD;AACrD,sEAAoD;AACpD,gEAA8C;AAC9C,yEAAuD;AACvD,mFAAiE;AACjE,yDAAuC;AACvC,4EAA0D;AAC1D,wEAAsD;AACtD,oEAAkD;AAClD,8EAA4D;AAC5D,kGAAgF;AAChF,kFAAgE;AAChE,2FAAyE;AACzE,sFAAoE;AACpE,sFAAoE;AACpE,iFAA+D;AAC/D,yEAAuD;AACvD,wEAAsD;AACtD,iEAA+C;AAC/C,qDAAmC;AACnC,mEAAiD;AACjD,4DAA0C;AAC1C,mEAAiD;AACjD,yDAAuC;AACvC,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;AAElF,oDAAkC;AAClC,yEAAuD;AACvD,0EAAwD;AACxD,oEAAkD;AAClD,yEAAuD;AACvD,gEAA8C;AAC9C,qEAAmD;AACnD,6EAA2D;AAC3D,qEAAmD;AACnD,uEAAqD;AACrD,sEAAoD;AACpD,gEAA8C;AAC9C,yEAAuD;AACvD,mFAAiE;AACjE,yDAAuC;AACvC,4EAA0D;AAC1D,wEAAsD;AACtD,oEAAkD;AAClD,wEAAsD;AACtD,oEAAkD;AAClD,oEAAkD;AAClD,sEAAoD;AACpD,8EAA4D;AAC5D,kGAAgF;AAChF,kFAAgE;AAChE,2FAAyE;AACzE,sFAAoE;AACpE,sFAAoE;AACpE,iFAA+D;AAC/D,yEAAuD;AACvD,wEAAsD;AACtD,iEAA+C;AAC/C,qDAAmC;AACnC,mEAAiD;AACjD,4DAA0C;AAC1C,mEAAiD;AACjD,yDAAuC;AACvC,2DAAyC"}
|
|
@@ -14,23 +14,14 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { BindingTarget } from '@eclipse-glsp/server';
|
|
17
|
-
import { DefaultMcpDiagramModule,
|
|
18
|
-
/**
|
|
19
|
-
* Workflow-specific server-scope MCP module. Currently no server-scope customizations beyond
|
|
20
|
-
* the defaults — every diagram-type-specific override lives on {@link WorkflowMcpDiagramModule}.
|
|
21
|
-
* Kept as the named entry point and as a hook for future server-scope extensions.
|
|
22
|
-
*/
|
|
23
|
-
export declare class WorkflowMcpServerModule extends DefaultMcpServerModule {
|
|
24
|
-
}
|
|
17
|
+
import { DefaultMcpDiagramModule, ElementTypesProvider, McpLabelProvider, McpModelSerializer } from '@eclipse-glsp/server-mcp';
|
|
25
18
|
/**
|
|
26
19
|
* Workflow-specific diagram-scope MCP module — swaps in the workflow-aware
|
|
27
20
|
* {@link McpLabelProvider}, {@link McpModelSerializer}, and {@link ElementTypesProvider}.
|
|
28
|
-
* `LayoutMcpToolHandler` ships in the default tool set and self-skips when no `LayoutEngine`
|
|
29
|
-
* is bound, so workflow doesn't need to add it explicitly.
|
|
30
21
|
*/
|
|
31
22
|
export declare class WorkflowMcpDiagramModule extends DefaultMcpDiagramModule {
|
|
32
23
|
protected bindLabelProvider(): BindingTarget<McpLabelProvider>;
|
|
33
24
|
protected bindModelSerializer(): BindingTarget<McpModelSerializer>;
|
|
34
25
|
protected bindElementTypesProvider(): BindingTarget<ElementTypesProvider>;
|
|
35
26
|
}
|
|
36
|
-
//# sourceMappingURL=workflow-mcp-module.d.ts.map
|
|
27
|
+
//# sourceMappingURL=workflow-mcp-diagram-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-mcp-diagram-module.d.ts","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK/H;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,uBAAuB;cAC9C,iBAAiB,IAAI,aAAa,CAAC,gBAAgB,CAAC;cAIpD,mBAAmB,IAAI,aAAa,CAAC,kBAAkB,CAAC;cAIxD,wBAAwB,IAAI,aAAa,CAAC,oBAAoB,CAAC;CAGrF"}
|
|
@@ -15,24 +15,14 @@
|
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.WorkflowMcpDiagramModule =
|
|
18
|
+
exports.WorkflowMcpDiagramModule = void 0;
|
|
19
19
|
const server_mcp_1 = require("@eclipse-glsp/server-mcp");
|
|
20
20
|
const workflow_element_types_provider_1 = require("./workflow-element-types-provider");
|
|
21
21
|
const workflow_mcp_label_provider_1 = require("./workflow-mcp-label-provider");
|
|
22
22
|
const workflow_mcp_model_serializer_1 = require("./workflow-mcp-model-serializer");
|
|
23
|
-
/**
|
|
24
|
-
* Workflow-specific server-scope MCP module. Currently no server-scope customizations beyond
|
|
25
|
-
* the defaults — every diagram-type-specific override lives on {@link WorkflowMcpDiagramModule}.
|
|
26
|
-
* Kept as the named entry point and as a hook for future server-scope extensions.
|
|
27
|
-
*/
|
|
28
|
-
class WorkflowMcpServerModule extends server_mcp_1.DefaultMcpServerModule {
|
|
29
|
-
}
|
|
30
|
-
exports.WorkflowMcpServerModule = WorkflowMcpServerModule;
|
|
31
23
|
/**
|
|
32
24
|
* Workflow-specific diagram-scope MCP module — swaps in the workflow-aware
|
|
33
25
|
* {@link McpLabelProvider}, {@link McpModelSerializer}, and {@link ElementTypesProvider}.
|
|
34
|
-
* `LayoutMcpToolHandler` ships in the default tool set and self-skips when no `LayoutEngine`
|
|
35
|
-
* is bound, so workflow doesn't need to add it explicitly.
|
|
36
26
|
*/
|
|
37
27
|
class WorkflowMcpDiagramModule extends server_mcp_1.DefaultMcpDiagramModule {
|
|
38
28
|
bindLabelProvider() {
|
|
@@ -46,4 +36,4 @@ class WorkflowMcpDiagramModule extends server_mcp_1.DefaultMcpDiagramModule {
|
|
|
46
36
|
}
|
|
47
37
|
}
|
|
48
38
|
exports.WorkflowMcpDiagramModule = WorkflowMcpDiagramModule;
|
|
49
|
-
//# sourceMappingURL=workflow-mcp-module.js.map
|
|
39
|
+
//# sourceMappingURL=workflow-mcp-diagram-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-mcp-diagram-module.js","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-diagram-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,yDAA+H;AAC/H,uFAAiF;AACjF,+EAAyE;AACzE,mFAA6E;AAE7E;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,oCAAuB;IAC9C,iBAAiB;QAChC,OAAO,sDAAwB,CAAC;IACpC,CAAC;IAEkB,mBAAmB;QAClC,OAAO,0DAA0B,CAAC;IACtC,CAAC;IAEkB,wBAAwB;QACvC,OAAO,8DAA4B,CAAC;IACxC,CAAC;CACJ;AAZD,4DAYC"}
|
package/lib/node/app.js
CHANGED
|
@@ -20,8 +20,9 @@ const layout_elk_1 = require("@eclipse-glsp/layout-elk");
|
|
|
20
20
|
const node_1 = require("@eclipse-glsp/server/node");
|
|
21
21
|
const inversify_1 = require("inversify");
|
|
22
22
|
const workflow_layout_configurator_1 = require("../common/layout/workflow-layout-configurator");
|
|
23
|
-
const
|
|
23
|
+
const workflow_mcp_diagram_module_1 = require("../common/mcp/workflow-mcp-diagram-module");
|
|
24
24
|
const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
|
|
25
|
+
const workflow_mcp_module_1 = require("./mcp/workflow-mcp-module");
|
|
25
26
|
const workflow_cli_parser_1 = require("./workflow-cli-parser");
|
|
26
27
|
async function launch(argv) {
|
|
27
28
|
const options = (0, workflow_cli_parser_1.createWorkflowCliParser)().parse(argv);
|
|
@@ -35,7 +36,7 @@ async function launch(argv) {
|
|
|
35
36
|
process.on('uncaughtException', error => {
|
|
36
37
|
logger.error('Uncaught exception:', error);
|
|
37
38
|
});
|
|
38
|
-
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => node_1.GModelStorage), new layout_elk_1.ElkLayoutModule({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator }), new
|
|
39
|
+
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => node_1.GModelStorage), new layout_elk_1.ElkLayoutModule({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator }), new workflow_mcp_diagram_module_1.WorkflowMcpDiagramModule());
|
|
39
40
|
const mcpServerModule = new workflow_mcp_module_1.WorkflowMcpServerModule();
|
|
40
41
|
if (options.webSocket) {
|
|
41
42
|
const launcher = appContainer.resolve(node_1.WebSocketServerLauncher);
|
package/lib/node/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAE1B,yDAA2D;AAC3D,oDAAkI;AAClI,yCAAsC;AAEtC,gGAA2F;AAC3F,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAE1B,yDAA2D;AAC3D,oDAAkI;AAClI,yCAAsC;AAEtC,gGAA2F;AAC3F,2FAAqF;AACrF,+EAAgG;AAChG,mEAAoE;AACpE,+DAAgE;AAEhE,KAAK,UAAU,MAAM,CAAC,IAAe;IACjC,MAAM,OAAO,GAAG,IAAA,6CAAuB,GAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,IAAA,sBAAe,EAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,aAAM,CAAC,CAAC;IAExC,mHAAmH;IACnH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC3C,MAAM,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,KAAK,CAAC,EAAE;QACpC,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAClE,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,oBAAa,CAAC,EAC9C,IAAI,4BAAe,CAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,EAChG,IAAI,sDAAwB,EAAE,CACjC,CAAC;IACF,MAAM,eAAe,GAAG,IAAI,6CAAuB,EAAE,CAAC;IACtD,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACpB,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAuB,CAAC,CAAC;QAC/D,QAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAClD,MAAM,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IACvF,CAAC;SAAM,CAAC;QACJ,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,2BAAoB,CAAC,CAAC;QAC5D,QAAQ,CAAC,SAAS,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAClD,MAAM,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
package/lib/node/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
export * from './mcp/workflow-mcp-module';
|
|
16
17
|
export * from './reexport';
|
|
17
18
|
export * from './workflow-cli-parser';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC"}
|
package/lib/node/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/********************************************************************************
|
|
18
|
-
* Copyright (c) 2022-
|
|
18
|
+
* Copyright (c) 2022-2026 EclipseSource and others.
|
|
19
19
|
*
|
|
20
20
|
* This program and the accompanying materials are made available under the
|
|
21
21
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
*
|
|
30
30
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
31
31
|
********************************************************************************/
|
|
32
|
+
__exportStar(require("./mcp/workflow-mcp-module"), exports);
|
|
32
33
|
__exportStar(require("./reexport"), exports);
|
|
33
34
|
__exportStar(require("./workflow-cli-parser"), exports);
|
|
34
35
|
//# sourceMappingURL=index.js.map
|
package/lib/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,6CAA2B;AAC3B,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4DAA0C;AAC1C,6CAA2B;AAC3B,wDAAsC"}
|
package/lib/{common/handler/create-foreign-node-handler.d.ts → node/mcp/workflow-mcp-module.d.ts}
RENAMED
|
@@ -13,13 +13,11 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
createNode(operation: CreateNodeOperation, relativeLocation?: Point): GNode | undefined;
|
|
23
|
-
protected builder(point?: Point): GNodeBuilder;
|
|
16
|
+
import { NodeMcpServerModule } from '@eclipse-glsp/server-mcp/node';
|
|
17
|
+
/**
|
|
18
|
+
* Workflow-scope MCP module — adopter hook for future workflow-specific server-scope bindings.
|
|
19
|
+
* Currently a no-op subclass; diagram-scope customizations live on `WorkflowMcpDiagramModule`.
|
|
20
|
+
*/
|
|
21
|
+
export declare class WorkflowMcpServerModule extends NodeMcpServerModule {
|
|
24
22
|
}
|
|
25
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=workflow-mcp-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-mcp-module.d.ts","sourceRoot":"","sources":["../../../src/node/mcp/workflow-mcp-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,mBAAmB;CAAG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/********************************************************************************
|
|
2
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
3
4
|
*
|
|
4
5
|
* This program and the accompanying materials are made available under the
|
|
5
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,13 +14,14 @@
|
|
|
13
14
|
*
|
|
14
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
16
|
********************************************************************************/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.WorkflowMcpServerModule = void 0;
|
|
19
|
+
const node_1 = require("@eclipse-glsp/server-mcp/node");
|
|
20
|
+
/**
|
|
21
|
+
* Workflow-scope MCP module — adopter hook for future workflow-specific server-scope bindings.
|
|
22
|
+
* Currently a no-op subclass; diagram-scope customizations live on `WorkflowMcpDiagramModule`.
|
|
23
|
+
*/
|
|
24
|
+
class WorkflowMcpServerModule extends node_1.NodeMcpServerModule {
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
exports.WorkflowMcpServerModule = WorkflowMcpServerModule;
|
|
27
|
+
//# sourceMappingURL=workflow-mcp-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-mcp-module.js","sourceRoot":"","sources":["../../../src/node/mcp/workflow-mcp-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,wDAAoE;AAEpE;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,0BAAmB;CAAG;AAAnE,0DAAmE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0-next.0+bb0b4e8",
|
|
4
4
|
"description": "GLSP node server for the workflow example",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"browser.js"
|
|
47
47
|
],
|
|
48
48
|
"scripts": {
|
|
49
|
-
"build": "tsc -b && yarn bundle",
|
|
49
|
+
"build": "tsc -b && yarn bundle && yarn bundle:browser",
|
|
50
50
|
"bundle": "webpack",
|
|
51
51
|
"bundle:browser": "webpack --env target=webworker ",
|
|
52
52
|
"clean": "rimraf lib *.tsbuildinfo",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"watch:bundle": "webpack -w"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@eclipse-glsp/layout-elk": "2.
|
|
60
|
-
"@eclipse-glsp/server": "2.
|
|
61
|
-
"@eclipse-glsp/server-mcp": "2.
|
|
59
|
+
"@eclipse-glsp/layout-elk": "2.8.0-next.0+bb0b4e8",
|
|
60
|
+
"@eclipse-glsp/server": "2.8.0-next.0+bb0b4e8",
|
|
61
|
+
"@eclipse-glsp/server-mcp": "2.8.0-next.0+bb0b4e8",
|
|
62
62
|
"inversify": "^6.1.3"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "bb0b4e86909b0c6ea8ba805a9aba68e4afd2decb"
|
|
73
73
|
}
|
package/src/browser/app.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -17,12 +17,17 @@ import 'reflect-metadata';
|
|
|
17
17
|
|
|
18
18
|
import { configureELKLayoutModule } from '@eclipse-glsp/layout-elk';
|
|
19
19
|
import { createAppModule, LogLevel, WorkerServerLauncher } from '@eclipse-glsp/server/browser';
|
|
20
|
+
import { McpWorkerBridge } from '@eclipse-glsp/server-mcp/browser';
|
|
20
21
|
import { Container } from 'inversify';
|
|
21
22
|
import { WorkflowLayoutConfigurator } from '../common/layout/workflow-layout-configurator';
|
|
23
|
+
import { WorkflowMcpDiagramModule } from '../common/mcp/workflow-mcp-diagram-module';
|
|
22
24
|
import { WorkflowDiagramModule, WorkflowServerModule } from '../common/workflow-diagram-module';
|
|
23
25
|
import { WorkflowMockModelStorage } from './mock-model-storage';
|
|
24
26
|
|
|
25
|
-
export async function launch(
|
|
27
|
+
export async function launch(_argv?: string[]): Promise<void> {
|
|
28
|
+
// Bridge must be created before any await so postMessages that arrive on the next event-loop tick aren't dropped.
|
|
29
|
+
const bridge = new McpWorkerBridge();
|
|
30
|
+
|
|
26
31
|
const appContainer = new Container();
|
|
27
32
|
appContainer.load(createAppModule({ logLevel: LogLevel.info }));
|
|
28
33
|
|
|
@@ -35,11 +40,13 @@ export async function launch(argv?: string[]): Promise<void> {
|
|
|
35
40
|
|
|
36
41
|
const serverModule = new WorkflowServerModule().configureDiagramModule(
|
|
37
42
|
new WorkflowDiagramModule(() => WorkflowMockModelStorage),
|
|
38
|
-
elkLayoutModule
|
|
43
|
+
elkLayoutModule,
|
|
44
|
+
new WorkflowMcpDiagramModule()
|
|
39
45
|
);
|
|
40
46
|
|
|
41
|
-
launcher.configure(serverModule);
|
|
47
|
+
launcher.configure(serverModule, bridge.createServerModule());
|
|
42
48
|
|
|
49
|
+
// Resolves only on connection close — must be the last await.
|
|
43
50
|
await launcher.start({});
|
|
44
51
|
}
|
|
45
52
|
|
package/src/common/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023-
|
|
2
|
+
* Copyright (c) 2023-2026 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -32,6 +32,10 @@ export * from './handler/grid-snapper';
|
|
|
32
32
|
export * from './labeledit/workflow-label-edit-validator';
|
|
33
33
|
export * from './layout/workflow-layout-configurator';
|
|
34
34
|
export * from './marker/workflow-model-validator';
|
|
35
|
+
export * from './mcp/workflow-element-types-provider';
|
|
36
|
+
export * from './mcp/workflow-mcp-diagram-module';
|
|
37
|
+
export * from './mcp/workflow-mcp-label-provider';
|
|
38
|
+
export * from './mcp/workflow-mcp-model-serializer';
|
|
35
39
|
export * from './model/workflow-navigation-target-resolver';
|
|
36
40
|
export * from './provider/abstract-next-or-previous-navigation-target-provider';
|
|
37
41
|
export * from './provider/next-node-navigation-target-provider';
|
|
@@ -15,29 +15,14 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
import { BindingTarget } from '@eclipse-glsp/server';
|
|
18
|
-
import {
|
|
19
|
-
DefaultMcpDiagramModule,
|
|
20
|
-
DefaultMcpServerModule,
|
|
21
|
-
ElementTypesProvider,
|
|
22
|
-
McpLabelProvider,
|
|
23
|
-
McpModelSerializer
|
|
24
|
-
} from '@eclipse-glsp/server-mcp';
|
|
18
|
+
import { DefaultMcpDiagramModule, ElementTypesProvider, McpLabelProvider, McpModelSerializer } from '@eclipse-glsp/server-mcp';
|
|
25
19
|
import { WorkflowElementTypesProvider } from './workflow-element-types-provider';
|
|
26
20
|
import { WorkflowMcpLabelProvider } from './workflow-mcp-label-provider';
|
|
27
21
|
import { WorkflowMcpModelSerializer } from './workflow-mcp-model-serializer';
|
|
28
22
|
|
|
29
|
-
/**
|
|
30
|
-
* Workflow-specific server-scope MCP module. Currently no server-scope customizations beyond
|
|
31
|
-
* the defaults — every diagram-type-specific override lives on {@link WorkflowMcpDiagramModule}.
|
|
32
|
-
* Kept as the named entry point and as a hook for future server-scope extensions.
|
|
33
|
-
*/
|
|
34
|
-
export class WorkflowMcpServerModule extends DefaultMcpServerModule {}
|
|
35
|
-
|
|
36
23
|
/**
|
|
37
24
|
* Workflow-specific diagram-scope MCP module — swaps in the workflow-aware
|
|
38
25
|
* {@link McpLabelProvider}, {@link McpModelSerializer}, and {@link ElementTypesProvider}.
|
|
39
|
-
* `LayoutMcpToolHandler` ships in the default tool set and self-skips when no `LayoutEngine`
|
|
40
|
-
* is bound, so workflow doesn't need to add it explicitly.
|
|
41
26
|
*/
|
|
42
27
|
export class WorkflowMcpDiagramModule extends DefaultMcpDiagramModule {
|
|
43
28
|
protected override bindLabelProvider(): BindingTarget<McpLabelProvider> {
|
package/src/node/app.ts
CHANGED
|
@@ -20,8 +20,9 @@ import { GModelStorage, Logger, SocketServerLauncher, WebSocketServerLauncher, c
|
|
|
20
20
|
import { Container } from 'inversify';
|
|
21
21
|
|
|
22
22
|
import { WorkflowLayoutConfigurator } from '../common/layout/workflow-layout-configurator';
|
|
23
|
-
import { WorkflowMcpDiagramModule
|
|
23
|
+
import { WorkflowMcpDiagramModule } from '../common/mcp/workflow-mcp-diagram-module';
|
|
24
24
|
import { WorkflowDiagramModule, WorkflowServerModule } from '../common/workflow-diagram-module';
|
|
25
|
+
import { WorkflowMcpServerModule } from './mcp/workflow-mcp-module';
|
|
25
26
|
import { createWorkflowCliParser } from './workflow-cli-parser';
|
|
26
27
|
|
|
27
28
|
async function launch(argv?: string[]): Promise<void> {
|
package/src/node/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,5 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
export * from './mcp/workflow-mcp-module';
|
|
16
17
|
export * from './reexport';
|
|
17
18
|
export * from './workflow-cli-parser';
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
|
|
17
|
+
import { NodeMcpServerModule } from '@eclipse-glsp/server-mcp/node';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Workflow-scope MCP module — adopter hook for future workflow-specific server-scope bindings.
|
|
21
|
+
* Currently a no-op subclass; diagram-scope customizations live on `WorkflowMcpDiagramModule`.
|
|
22
|
+
*/
|
|
23
|
+
export class WorkflowMcpServerModule extends NodeMcpServerModule {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-foreign-node-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-foreign-node-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,mBAAmB,EAKnB,KAAK,EACL,YAAY,EACZ,KAAK,EACR,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,qBAAa,wBAAyB,SAAQ,kCAAkC;IAC5E,cAAc,WAA6B;IAC3C,KAAK,SAAkB;IACvB,SAAS,CAAC,SAAS,SAC4N;IAE/O,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,GAAE,KAAoB,GAAG,YAAY;CAsB/D"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateForeignNodeHandler = void 0;
|
|
4
|
-
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2026 EclipseSource and others.
|
|
6
|
-
*
|
|
7
|
-
* This program and the accompanying materials are made available under the
|
|
8
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
-
*
|
|
11
|
-
* This Source Code may also be made available under the following Secondary
|
|
12
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
-
* with the GNU Classpath Exception which is available at
|
|
15
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
-
********************************************************************************/
|
|
19
|
-
const server_1 = require("@eclipse-glsp/server");
|
|
20
|
-
const model_types_1 = require("../util/model-types");
|
|
21
|
-
const create_workflow_node_operation_handler_1 = require("./create-workflow-node-operation-handler");
|
|
22
|
-
class CreateForeignNodeHandler extends create_workflow_node_operation_handler_1.CreateWorkflowNodeOperationHandler {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.elementTypeIds = [model_types_1.ModelTypes.FOREIGN_NODE];
|
|
26
|
-
this.label = 'Foreign Node';
|
|
27
|
-
this.multiText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ';
|
|
28
|
-
}
|
|
29
|
-
createNode(operation, relativeLocation) {
|
|
30
|
-
return this.builder(relativeLocation).build();
|
|
31
|
-
}
|
|
32
|
-
builder(point = server_1.Point.ORIGIN) {
|
|
33
|
-
return server_1.GNode.builder()
|
|
34
|
-
.type(this.elementTypeIds[0])
|
|
35
|
-
.position(point)
|
|
36
|
-
.layout('vbox')
|
|
37
|
-
.addLayoutOption('prefWidth', 50)
|
|
38
|
-
.addLayoutOption('prefHeight', 50)
|
|
39
|
-
.add(server_1.GCompartment.builder()
|
|
40
|
-
.layout('hbox')
|
|
41
|
-
.add(server_1.GLabel.builder().text('Test').build())
|
|
42
|
-
.add(server_1.GForeignObjectElement.builder()
|
|
43
|
-
.type(server_1.DefaultTypes.FOREIGN_OBJECT)
|
|
44
|
-
.id('test-foreign-object')
|
|
45
|
-
.addCssClass('wfp-multiline')
|
|
46
|
-
.addArg('text', this.multiText)
|
|
47
|
-
.build())
|
|
48
|
-
.build());
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.CreateForeignNodeHandler = CreateForeignNodeHandler;
|
|
52
|
-
//# sourceMappingURL=create-foreign-node-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-foreign-node-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-foreign-node-handler.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAS8B;AAC9B,qDAAiD;AACjD,qGAA8F;AAE9F,MAAa,wBAAyB,SAAQ,2EAAkC;IAAhF;;QACI,mBAAc,GAAG,CAAC,wBAAU,CAAC,YAAY,CAAC,CAAC;QAC3C,UAAK,GAAG,cAAc,CAAC;QACb,cAAS,GACf,0OAA0O,CAAC;IA4BnP,CAAC;IA1BG,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,QAAe,cAAK,CAAC,MAAM;QACzC,OAAO,cAAK,CAAC,OAAO,EAAE;aACjB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;aAC5B,QAAQ,CAAC,KAAK,CAAC;aACf,MAAM,CAAC,MAAM,CAAC;aACd,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC;aAChC,eAAe,CAAC,YAAY,EAAE,EAAE,CAAC;aACjC,GAAG,CACA,qBAAY,CAAC,OAAO,EAAE;aACjB,MAAM,CAAC,MAAM,CAAC;aACd,GAAG,CAAC,eAAM,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;aAC1C,GAAG,CACA,8BAAqB,CAAC,OAAO,EAAE;aAC1B,IAAI,CAAC,qBAAY,CAAC,cAAc,CAAC;aACjC,EAAE,CAAC,qBAAqB,CAAC;aACzB,WAAW,CAAC,eAAe,CAAC;aAC5B,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;aAC9B,KAAK,EAAE,CACf;aACA,KAAK,EAAE,CACf,CAAC;IACV,CAAC;CACJ;AAhCD,4DAgCC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-foreign-object-node-handler.d.ts","sourceRoot":"","sources":["../../../src/common/handler/create-foreign-object-node-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAqB,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAE9F,qBAAa,8BAA+B,SAAQ,kCAAkC;IAClF,cAAc,WAAoC;IAClD,KAAK,SAAyB;IAE9B,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS;IAIvF,SAAS,CAAC,OAAO,CAAC,KAAK,GAAE,KAAoB,GAAG,wBAAwB;CAM3E"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateForeignObjectNodeHandler = void 0;
|
|
4
|
-
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
6
|
-
*
|
|
7
|
-
* This program and the accompanying materials are made available under the
|
|
8
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
-
*
|
|
11
|
-
* This Source Code may also be made available under the following Secondary
|
|
12
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
-
* with the GNU Classpath Exception which is available at
|
|
15
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
-
********************************************************************************/
|
|
19
|
-
const server_1 = require("@eclipse-glsp/server");
|
|
20
|
-
const graph_extension_1 = require("../graph-extension");
|
|
21
|
-
const model_types_1 = require("../util/model-types");
|
|
22
|
-
const create_workflow_node_operation_handler_1 = require("./create-workflow-node-operation-handler");
|
|
23
|
-
class CreateForeignObjectNodeHandler extends create_workflow_node_operation_handler_1.CreateWorkflowNodeOperationHandler {
|
|
24
|
-
constructor() {
|
|
25
|
-
super(...arguments);
|
|
26
|
-
this.elementTypeIds = [model_types_1.ModelTypes.FOREIGN_OBJECT_NODE];
|
|
27
|
-
this.label = 'Foreign Object Node';
|
|
28
|
-
}
|
|
29
|
-
createNode(operation, relativeLocation) {
|
|
30
|
-
return this.builder(relativeLocation).build();
|
|
31
|
-
}
|
|
32
|
-
builder(point = server_1.Point.ORIGIN) {
|
|
33
|
-
return graph_extension_1.ForeignObjectNode.builder()
|
|
34
|
-
.type(model_types_1.ModelTypes.FOREIGN_OBJECT_NODE)
|
|
35
|
-
.position(point)
|
|
36
|
-
.name('ForeignObjectNode' + this.modelState.index.getAllByClass(graph_extension_1.ForeignObjectNode).length);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.CreateForeignObjectNodeHandler = CreateForeignObjectNodeHandler;
|
|
40
|
-
//# sourceMappingURL=create-foreign-object-node-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-foreign-object-node-handler.js","sourceRoot":"","sources":["../../../src/common/handler/create-foreign-object-node-handler.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAyE;AACzE,wDAAiF;AACjF,qDAAiD;AACjD,qGAA8F;AAE9F,MAAa,8BAA+B,SAAQ,2EAAkC;IAAtF;;QACI,mBAAc,GAAG,CAAC,wBAAU,CAAC,mBAAmB,CAAC,CAAC;QAClD,UAAK,GAAG,qBAAqB,CAAC;IAYlC,CAAC;IAVG,UAAU,CAAC,SAA8B,EAAE,gBAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;IAClD,CAAC;IAES,OAAO,CAAC,QAAe,cAAK,CAAC,MAAM;QACzC,OAAO,mCAAiB,CAAC,OAAO,EAAE;aAC7B,IAAI,CAAC,wBAAU,CAAC,mBAAmB,CAAC;aACpC,QAAQ,CAAC,KAAK,CAAC;aACf,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,mCAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;IACnG,CAAC;CACJ;AAdD,wEAcC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-mcp-module.d.ts","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACH,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EACrB,MAAM,0BAA0B,CAAC;AAKlC;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,sBAAsB;CAAG;AAEtE;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,uBAAuB;cAC9C,iBAAiB,IAAI,aAAa,CAAC,gBAAgB,CAAC;cAIpD,mBAAmB,IAAI,aAAa,CAAC,kBAAkB,CAAC;cAIxD,wBAAwB,IAAI,aAAa,CAAC,oBAAoB,CAAC;CAGrF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-mcp-module.js","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,yDAMkC;AAClC,uFAAiF;AACjF,+EAAyE;AACzE,mFAA6E;AAE7E;;;;GAIG;AACH,MAAa,uBAAwB,SAAQ,mCAAsB;CAAG;AAAtE,0DAAsE;AAEtE;;;;;GAKG;AACH,MAAa,wBAAyB,SAAQ,oCAAuB;IAC9C,iBAAiB;QAChC,OAAO,sDAAwB,CAAC;IACpC,CAAC;IAEkB,mBAAmB;QAClC,OAAO,0DAA0B,CAAC;IACtC,CAAC;IAEkB,wBAAwB;QACvC,OAAO,8DAA4B,CAAC;IACxC,CAAC;CACJ;AAZD,4DAYC"}
|