@eclipse-glsp-examples/workflow-server 2.7.0-next.7 → 2.7.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/graph-extension.d.ts +1 -1
- package/lib/common/graph-extension.js +3 -3
- package/lib/common/graph-extension.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-element-types-provider.d.ts +27 -0
- package/lib/common/mcp/workflow-element-types-provider.d.ts.map +1 -0
- package/lib/common/mcp/workflow-element-types-provider.js +62 -0
- package/lib/common/mcp/workflow-element-types-provider.js.map +1 -0
- package/lib/common/mcp/workflow-mcp-diagram-module.d.ts +27 -0
- package/lib/common/mcp/workflow-mcp-diagram-module.d.ts.map +1 -0
- package/lib/common/mcp/workflow-mcp-diagram-module.js +39 -0
- package/lib/common/mcp/workflow-mcp-diagram-module.js.map +1 -0
- package/lib/common/mcp/workflow-mcp-label-provider.d.ts +27 -0
- package/lib/common/mcp/workflow-mcp-label-provider.d.ts.map +1 -0
- package/lib/common/mcp/workflow-mcp-label-provider.js +48 -0
- package/lib/common/mcp/workflow-mcp-label-provider.js.map +1 -0
- package/lib/common/mcp/workflow-mcp-model-serializer.d.ts +29 -0
- package/lib/common/mcp/workflow-mcp-model-serializer.d.ts.map +1 -0
- package/lib/common/mcp/workflow-mcp-model-serializer.js +189 -0
- package/lib/common/mcp/workflow-mcp-model-serializer.js.map +1 -0
- package/lib/common/workflow-diagram-module.d.ts +3 -3
- package/lib/common/workflow-diagram-module.d.ts.map +1 -1
- package/lib/common/workflow-diagram-module.js +3 -3
- package/lib/common/workflow-diagram-module.js.map +1 -1
- package/lib/common/workflow-glsp-server.d.ts +4 -4
- package/lib/common/workflow-glsp-server.d.ts.map +1 -1
- package/lib/common/workflow-glsp-server.js +12 -13
- package/lib/common/workflow-glsp-server.js.map +1 -1
- package/lib/node/app.d.ts +1 -1
- package/lib/node/app.js +7 -5
- 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/node/mcp/workflow-mcp-module.d.ts +23 -0
- package/lib/node/mcp/workflow-mcp-module.d.ts.map +1 -0
- package/lib/node/mcp/workflow-mcp-module.js +27 -0
- package/lib/node/mcp/workflow-mcp-module.js.map +1 -0
- package/package.json +6 -5
- package/src/browser/app.ts +11 -4
- package/src/common/graph-extension.ts +3 -3
- package/src/common/index.ts +5 -1
- package/src/common/mcp/workflow-element-types-provider.ts +54 -0
- package/src/common/mcp/workflow-mcp-diagram-module.ts +39 -0
- package/src/common/mcp/workflow-mcp-label-provider.ts +37 -0
- package/src/common/mcp/workflow-mcp-model-serializer.ts +187 -0
- package/src/common/workflow-diagram-module.ts +5 -5
- package/src/common/workflow-glsp-server.ts +17 -10
- package/src/node/app.ts +13 -8
- package/src/node/index.ts +2 -1
- package/src/node/mcp/workflow-mcp-module.ts +23 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.WorkflowMcpModelSerializer = void 0;
|
|
25
|
+
const server_1 = require("@eclipse-glsp/server");
|
|
26
|
+
const server_mcp_1 = require("@eclipse-glsp/server-mcp");
|
|
27
|
+
const inversify_1 = require("inversify");
|
|
28
|
+
const model_types_1 = require("../util/model-types");
|
|
29
|
+
/**
|
|
30
|
+
* As compared to the {@link MarkdownMcpModelSerializer}, this is a specific implementation and we
|
|
31
|
+
* know not only the structure of our graph but also each relevant attribute. This enables us to
|
|
32
|
+
* order them semantically so the produced serialization makes more sense if read with semantics
|
|
33
|
+
* mind. As LLMs (i.e., the MCP clients) work semantically, this is superior to a random ordering.
|
|
34
|
+
* Furthermore, including only the relevant information without redundancies decreases context size.
|
|
35
|
+
*/
|
|
36
|
+
let WorkflowMcpModelSerializer = class WorkflowMcpModelSerializer extends server_mcp_1.MarkdownMcpModelSerializer {
|
|
37
|
+
prepareElement(element) {
|
|
38
|
+
var _a;
|
|
39
|
+
// Pass the live parent's id so the input element gets `parentId` set even when the
|
|
40
|
+
// spread inside `flattenStructure` doesn't carry the (typically non-enumerable) `parent`
|
|
41
|
+
// reference. Without this, `query-elements` inspect on a single leaf drops `parentId`,
|
|
42
|
+
// creating an inconsistency with `diagram-model`.
|
|
43
|
+
const elements = this.flattenStructure(element, (_a = element.parent) === null || _a === void 0 ? void 0 : _a.id);
|
|
44
|
+
// Define the order of keys
|
|
45
|
+
const result = {
|
|
46
|
+
[server_1.DefaultTypes.GRAPH]: [],
|
|
47
|
+
[model_types_1.ModelTypes.CATEGORY]: [],
|
|
48
|
+
[model_types_1.ModelTypes.AUTOMATED_TASK]: [],
|
|
49
|
+
[model_types_1.ModelTypes.MANUAL_TASK]: [],
|
|
50
|
+
[model_types_1.ModelTypes.FORK_NODE]: [],
|
|
51
|
+
[model_types_1.ModelTypes.JOIN_NODE]: [],
|
|
52
|
+
[model_types_1.ModelTypes.DECISION_NODE]: [],
|
|
53
|
+
[model_types_1.ModelTypes.MERGE_NODE]: [],
|
|
54
|
+
[server_1.DefaultTypes.EDGE]: [],
|
|
55
|
+
[model_types_1.ModelTypes.WEIGHTED_EDGE]: []
|
|
56
|
+
};
|
|
57
|
+
elements.forEach(serialized => {
|
|
58
|
+
this.combinePositionAndSize(serialized);
|
|
59
|
+
const adjustedElement = this.adjustElement(serialized);
|
|
60
|
+
if (!adjustedElement) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const type = serialized.type;
|
|
64
|
+
if (typeof type === 'string' && result[type]) {
|
|
65
|
+
result[type].push(adjustedElement);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
adjustElement(element) {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
const type = element.type;
|
|
73
|
+
switch (type) {
|
|
74
|
+
case model_types_1.ModelTypes.AUTOMATED_TASK:
|
|
75
|
+
case model_types_1.ModelTypes.MANUAL_TASK: {
|
|
76
|
+
const children = Array.isArray(element.children) ? element.children : [];
|
|
77
|
+
const label = children.find(child => child.type === model_types_1.ModelTypes.LABEL_HEADING);
|
|
78
|
+
if (!label || !server_1.Dimension.is(label.size)) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
// For tasks, the only content with impact on element size is the label
|
|
82
|
+
// Therefore, all other factors get integrated into the label size for the AI to do proper resizing operations
|
|
83
|
+
const labelSize = {
|
|
84
|
+
// 10px padding right, 31px padding left (incl. icon)
|
|
85
|
+
width: Math.trunc(label.size.width + 10 + 31),
|
|
86
|
+
// 7px padding top and bottom each
|
|
87
|
+
height: Math.trunc(label.size.height + 14)
|
|
88
|
+
};
|
|
89
|
+
// If the task lives inside a `STRUCTURE` (a layout-only wrapper), report the
|
|
90
|
+
// structure's parent as the logical parent. Falls back to the direct `parentId`
|
|
91
|
+
// when the task is at the root or the structure has no parent.
|
|
92
|
+
const liveParent = element.parent;
|
|
93
|
+
const parentId = (liveParent === null || liveParent === void 0 ? void 0 : liveParent.type) === model_types_1.ModelTypes.STRUCTURE ? (_b = (_a = liveParent.parent) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : element.parentId : element.parentId;
|
|
94
|
+
return {
|
|
95
|
+
id: element.id,
|
|
96
|
+
type,
|
|
97
|
+
position: element.position,
|
|
98
|
+
size: element.size,
|
|
99
|
+
bounds: element.bounds,
|
|
100
|
+
label: label.text,
|
|
101
|
+
labelSize,
|
|
102
|
+
parentId
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
case model_types_1.ModelTypes.CATEGORY: {
|
|
106
|
+
const children = Array.isArray(element.children) ? element.children : [];
|
|
107
|
+
const header = children.find(child => child.type === model_types_1.ModelTypes.COMP_HEADER);
|
|
108
|
+
const headerChildren = header && Array.isArray(header.children) ? header.children : [];
|
|
109
|
+
const label = headerChildren.find(child => child.type === model_types_1.ModelTypes.LABEL_HEADING);
|
|
110
|
+
if (!label || !server_1.Dimension.is(label.size)) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
const labelSize = {
|
|
114
|
+
width: Math.trunc(label.size.width + 20),
|
|
115
|
+
height: Math.trunc(label.size.height + 20)
|
|
116
|
+
};
|
|
117
|
+
// `combinePositionAndSize` (in MarkdownMcpModelSerializer) omits `size`/`bounds`
|
|
118
|
+
// when an element has no explicit geometry yet, so the LLM doesn't try to "fix"
|
|
119
|
+
// placeholder bounds. Categories normally do have an explicit size in the model,
|
|
120
|
+
// but if a freshly created (or otherwise unsized) category lands here, skip the
|
|
121
|
+
// derived `usableSpaceSize` rather than crashing on `element.size.width`.
|
|
122
|
+
const usableSpaceSize = server_1.Dimension.is(element.size)
|
|
123
|
+
? {
|
|
124
|
+
width: Math.trunc(Math.max(0, element.size.width - 10)),
|
|
125
|
+
height: Math.trunc(Math.max(0, element.size.height - labelSize.height - 10))
|
|
126
|
+
}
|
|
127
|
+
: undefined;
|
|
128
|
+
return {
|
|
129
|
+
id: element.id,
|
|
130
|
+
type,
|
|
131
|
+
isContainer: true,
|
|
132
|
+
position: element.position,
|
|
133
|
+
size: element.size,
|
|
134
|
+
bounds: element.bounds,
|
|
135
|
+
label: label.text,
|
|
136
|
+
labelSize,
|
|
137
|
+
usableSpaceSize,
|
|
138
|
+
parentId: element.parentId
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
case model_types_1.ModelTypes.JOIN_NODE:
|
|
142
|
+
case model_types_1.ModelTypes.MERGE_NODE:
|
|
143
|
+
case model_types_1.ModelTypes.DECISION_NODE:
|
|
144
|
+
case model_types_1.ModelTypes.FORK_NODE: {
|
|
145
|
+
return {
|
|
146
|
+
id: element.id,
|
|
147
|
+
type,
|
|
148
|
+
position: element.position,
|
|
149
|
+
size: element.size,
|
|
150
|
+
bounds: element.bounds,
|
|
151
|
+
parentId: element.parentId
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
case server_1.DefaultTypes.EDGE: {
|
|
155
|
+
return {
|
|
156
|
+
id: element.id,
|
|
157
|
+
type,
|
|
158
|
+
sourceId: element.sourceId,
|
|
159
|
+
targetId: element.targetId,
|
|
160
|
+
parentId: element.parentId
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
case model_types_1.ModelTypes.WEIGHTED_EDGE: {
|
|
164
|
+
return {
|
|
165
|
+
id: element.id,
|
|
166
|
+
type,
|
|
167
|
+
sourceId: element.sourceId,
|
|
168
|
+
targetId: element.targetId,
|
|
169
|
+
probability: element.probability,
|
|
170
|
+
parentId: element.parentId
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
case server_1.DefaultTypes.GRAPH: {
|
|
174
|
+
return {
|
|
175
|
+
id: element.id,
|
|
176
|
+
type,
|
|
177
|
+
isContainer: true
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
default:
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
exports.WorkflowMcpModelSerializer = WorkflowMcpModelSerializer;
|
|
186
|
+
exports.WorkflowMcpModelSerializer = WorkflowMcpModelSerializer = __decorate([
|
|
187
|
+
(0, inversify_1.injectable)()
|
|
188
|
+
], WorkflowMcpModelSerializer);
|
|
189
|
+
//# sourceMappingURL=workflow-mcp-model-serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-mcp-model-serializer.js","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-model-serializer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAGlF,iDAA+D;AAC/D,yDAAyF;AACzF,yCAAuC;AACvC,qDAAiD;AAEjD;;;;;;GAMG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,uCAA0B;IAC7D,cAAc,CAAC,OAAsB;;QAC1C,mFAAmF;QACnF,yFAAyF;QACzF,uFAAuF;QACvF,kDAAkD;QAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAuC,EAAE,MAAA,OAAO,CAAC,MAAM,0CAAE,EAAE,CAAC,CAAC;QAEpG,2BAA2B;QAC3B,MAAM,MAAM,GAAwC;YAChD,CAAC,qBAAY,CAAC,KA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YACN,CAAC;YACD,KAAK,wBAAU,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC5B,OAAO;oBACH,EAAE,EAAE,OAAO,CAAC,EAAE;oBACd,IAAI;oBACJ,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;oBAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;iBAC7B,CAAC;YACN,CAAC;YACD,KAAK,qBAAY,CAAC,KAAK,CAAC,CAAC,CAAC;gBACtB,OAAO;oBACH,EAAE,EAAE,OAAO,CAAC,EAAE;oBACd,IAAI;oBACJ,WAAW,EAAE,IAAI;iBACpB,CAAC;YACN,CAAC;YACD;gBACI,OAAO,SAAS,CAAC;QACzB,CAAC;IACL,CAAC;CACJ,CAAA;AA5JY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CA4JtC"}
|
|
@@ -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
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { BindingTarget, CommandPaletteActionProvider, ContextActionsProvider, ContextEditValidator, ContextMenuItemProvider, DiagramConfiguration, EdgeCreationChecker,
|
|
16
|
+
import { BindingTarget, CommandPaletteActionProvider, ContextActionsProvider, ContextEditValidator, ContextMenuItemProvider, DiagramConfiguration, EdgeCreationChecker, GLSPServerInitializer, GModelDiagramModule, InstanceMultiBinding, LabelEditValidator, ModelValidator, MultiBinding, NavigationTargetProvider, NavigationTargetResolver, OperationHandlerConstructor, PopupModelFactory, ServerModule, SourceModelStorage } from '@eclipse-glsp/server';
|
|
17
17
|
export declare class WorkflowServerModule extends ServerModule {
|
|
18
|
-
protected
|
|
18
|
+
protected configureGLSPServerInitializers(binding: MultiBinding<GLSPServerInitializer>): void;
|
|
19
19
|
}
|
|
20
20
|
export declare class WorkflowDiagramModule extends GModelDiagramModule {
|
|
21
21
|
bindSourceModelStorage: () => BindingTarget<SourceModelStorage>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../../src/common/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,aAAa,EACb,4BAA4B,EAC5B,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"workflow-diagram-module.d.ts","sourceRoot":"","sources":["../../src/common/workflow-diagram-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,aAAa,EACb,4BAA4B,EAC5B,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EACrB,MAAM,sBAAsB,CAAC;AA2B9B,qBACa,oBAAqB,SAAQ,YAAY;cAC/B,+BAA+B,CAAC,OAAO,EAAE,YAAY,CAAC,qBAAqB,CAAC,GAAG,IAAI;CAGzG;AAED,qBACa,qBAAsB,SAAQ,mBAAmB;IACvC,sBAAsB,EAAE,MAAM,aAAa,CAAC,kBAAkB,CAAC;gBAA/D,sBAAsB,EAAE,MAAM,aAAa,CAAC,kBAAkB,CAAC;IAIlF,IAAI,WAAW,IAAI,MAAM,CAExB;cAEkB,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,CAAC,2BAA2B,CAAC,GAAG,IAAI;IAc/G,SAAS,CAAC,wBAAwB,IAAI,aAAa,CAAC,oBAAoB,CAAC;cAItD,4BAA4B,IAAI,aAAa,CAAC,wBAAwB,CAAC,GAAG,SAAS;cAInF,2BAA2B,IAAI,aAAa,CAAC,uBAAuB,CAAC,GAAG,SAAS;cAIjF,gCAAgC,IAAI,aAAa,CAAC,4BAA4B,CAAC,GAAG,SAAS;cAI3F,sBAAsB,IAAI,aAAa,CAAC,kBAAkB,CAAC,GAAG,SAAS;cAIvE,qBAAqB,IAAI,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS;cAIrE,kBAAkB,IAAI,aAAa,CAAC,cAAc,CAAC,GAAG,SAAS;cAI/D,kCAAkC,CAAC,OAAO,EAAE,YAAY,CAAC,wBAAwB,CAAC,GAAG,IAAI;cAOzF,+BAA+B,CAAC,OAAO,EAAE,YAAY,CAAC,sBAAsB,CAAC,GAAG,IAAI;cAKpF,8BAA8B,CAAC,OAAO,EAAE,YAAY,CAAC,oBAAoB,CAAC,GAAG,IAAI;cAKjF,uBAAuB,IAAI,aAAa,CAAC,mBAAmB,CAAC,GAAG,SAAS;CAG/F"}
|
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.WorkflowDiagramModule = exports.WorkflowServerModule = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2022-
|
|
14
|
+
* Copyright (c) 2022-2026 STMicroelectronics and others.
|
|
15
15
|
*
|
|
16
16
|
* This program and the accompanying materials are made available under the
|
|
17
17
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -52,8 +52,8 @@ const workflow_edge_creation_checker_1 = require("./workflow-edge-creation-check
|
|
|
52
52
|
const workflow_glsp_server_1 = require("./workflow-glsp-server");
|
|
53
53
|
const workflow_popup_factory_1 = require("./workflow-popup-factory");
|
|
54
54
|
let WorkflowServerModule = class WorkflowServerModule extends server_1.ServerModule {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
configureGLSPServerInitializers(binding) {
|
|
56
|
+
binding.add(workflow_glsp_server_1.CustomArgsInitContribution);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
exports.WorkflowServerModule = WorkflowServerModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../../src/common/workflow-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAoB8B;AAC9B,yCAAuC;AACvC,2FAAqF;AACrF,+EAA0E;AAC1E,yFAAmF;AACnF,uEAAkE;AAClE,iFAA2E;AAC3E,iFAA2E;AAC3E,qFAA+E;AAC/E,mFAA6E;AAC7E,yFAAmF;AACnF,6FAAuF;AACvF,gFAA2E;AAC3E,qGAA+F;AAC/F,0GAAmG;AACnG,4HAAqH;AACrH,kHAA2G;AAC3G,kHAA2G;AAC3G,wGAAiG;AACjG,wFAAkF;AAClF,sFAAsF;AACtF,wEAAmE;AACnE,qFAAgF;AAChF,qFAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"workflow-diagram-module.js","sourceRoot":"","sources":["../../src/common/workflow-diagram-module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAoB8B;AAC9B,yCAAuC;AACvC,2FAAqF;AACrF,+EAA0E;AAC1E,yFAAmF;AACnF,uEAAkE;AAClE,iFAA2E;AAC3E,iFAA2E;AAC3E,qFAA+E;AAC/E,mFAA6E;AAC7E,yFAAmF;AACnF,6FAAuF;AACvF,gFAA2E;AAC3E,qGAA+F;AAC/F,0GAAmG;AACnG,4HAAqH;AACrH,kHAA2G;AA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;IAEkB,4BAA4B;QAC3C,OAAO,sEAAgC,CAAC;IAC5C,CAAC;IAEkB,2BAA2B;QAC1C,OAAO,qEAA+B,CAAC;IAC3C,CAAC;IAEkB,gCAAgC;QAC/C,OAAO,+EAAoC,CAAC;IAChD,CAAC;IAEkB,sBAAsB;QACrC,OAAO,0DAA0B,CAAC;IACtC,CAAC;IAEkB,qBAAqB;QACpC,OAAO,6CAAoB,CAAC;IAChC,CAAC;IAEkB,kBAAkB;QACjC,OAAO,iDAAsB,CAAC;IAClC,CAAC;IAEkB,kCAAkC,CAAC,OAA+C;QACjG,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,uEAAgC,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,+EAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,yFAAyC,CAAC,CAAC;IAC3D,CAAC;IAEkB,+BAA+B,CAAC,OAA6C;QAC5F,KAAK,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,0DAA6B,CAAC,CAAC;IAC/C,CAAC;IAEkB,8BAA8B,CAAC,OAA2C;QACzF,KAAK,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,uCAAiB,CAAC,CAAC;IACnC,CAAC;IAEkB,uBAAuB;QACtC,OAAO,4DAA2B,CAAC;IACvC,CAAC;CACJ,CAAA;AAvEY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,sBAAU,GAAE;;GACA,qBAAqB,CAuEjC"}
|
|
@@ -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
|
|
@@ -13,11 +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
|
-
export declare class
|
|
16
|
+
import { GLSPServer, GLSPServerInitializer, InitializeParameters, InitializeResult, Logger, MaybePromise } from '@eclipse-glsp/server';
|
|
17
|
+
export declare class CustomArgsInitContribution implements GLSPServerInitializer {
|
|
18
18
|
MESSAGE_KEY: string;
|
|
19
19
|
TIMESTAMP_KEY: string;
|
|
20
20
|
protected logger: Logger;
|
|
21
|
-
|
|
21
|
+
initializeServer(server: GLSPServer, params: InitializeParameters, result: InitializeResult): MaybePromise<InitializeResult>;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=workflow-glsp-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-glsp-server.d.ts","sourceRoot":"","sources":["../../src/common/workflow-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"workflow-glsp-server.d.ts","sourceRoot":"","sources":["../../src/common/workflow-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,EACN,YAAY,EACf,MAAM,sBAAsB,CAAC;AAG9B,qBACa,0BAA2B,YAAW,qBAAqB;IACpE,WAAW,SAAa;IACxB,aAAa,SAAe;IAEZ,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzC,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,gBAAgB,GAAG,YAAY,CAAC,gBAAgB,CAAC;CAU/H"}
|
|
@@ -9,9 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.CustomArgsInitContribution = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2022-
|
|
14
|
+
* Copyright (c) 2022-2026 STMicroelectronics and others.
|
|
15
15
|
*
|
|
16
16
|
* This program and the accompanying materials are made available under the
|
|
17
17
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -27,28 +27,27 @@ exports.WorkflowGLSPServer = void 0;
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const server_1 = require("@eclipse-glsp/server");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
|
-
let
|
|
30
|
+
let CustomArgsInitContribution = class CustomArgsInitContribution {
|
|
31
31
|
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
32
|
this.MESSAGE_KEY = 'message';
|
|
34
33
|
this.TIMESTAMP_KEY = 'timestamp';
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
if (!args) {
|
|
35
|
+
initializeServer(server, params, result) {
|
|
36
|
+
if (!params.args) {
|
|
38
37
|
return result;
|
|
39
38
|
}
|
|
40
|
-
const timestamp = server_1.ArgsUtil.get(args, this.TIMESTAMP_KEY);
|
|
41
|
-
const message = server_1.ArgsUtil.get(args, this.MESSAGE_KEY);
|
|
42
|
-
this.logger.
|
|
39
|
+
const timestamp = server_1.ArgsUtil.get(params.args, this.TIMESTAMP_KEY);
|
|
40
|
+
const message = server_1.ArgsUtil.get(params.args, this.MESSAGE_KEY);
|
|
41
|
+
this.logger.info(`${timestamp}: ${message}`);
|
|
43
42
|
return result;
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
|
-
exports.
|
|
45
|
+
exports.CustomArgsInitContribution = CustomArgsInitContribution;
|
|
47
46
|
__decorate([
|
|
48
47
|
(0, inversify_1.inject)(server_1.Logger),
|
|
49
48
|
__metadata("design:type", server_1.Logger)
|
|
50
|
-
],
|
|
51
|
-
exports.
|
|
49
|
+
], CustomArgsInitContribution.prototype, "logger", void 0);
|
|
50
|
+
exports.CustomArgsInitContribution = CustomArgsInitContribution = __decorate([
|
|
52
51
|
(0, inversify_1.injectable)()
|
|
53
|
-
],
|
|
52
|
+
], CustomArgsInitContribution);
|
|
54
53
|
//# sourceMappingURL=workflow-glsp-server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-glsp-server.js","sourceRoot":"","sources":["../../src/common/workflow-glsp-server.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"workflow-glsp-server.js","sourceRoot":"","sources":["../../src/common/workflow-glsp-server.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAQ8B;AAC9B,yCAA+C;AAGxC,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAAhC;QACH,gBAAW,GAAG,SAAS,CAAC;QACxB,kBAAa,GAAG,WAAW,CAAC;IAchC,CAAC;IAVG,gBAAgB,CAAC,MAAkB,EAAE,MAA4B,EAAE,MAAwB;QACvF,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,MAAM,CAAC;QAClB,CAAC;QACD,MAAM,SAAS,GAAG,iBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAChE,MAAM,OAAO,GAAG,iBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAE5D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,KAAK,OAAO,EAAE,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAhBY,gEAA0B;AAIT;IAAzB,IAAA,kBAAM,EAAC,eAAM,CAAC;8BAAmB,eAAM;0DAAC;qCAJhC,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CAgBtC"}
|
package/lib/node/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
|
package/lib/node/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/********************************************************************************
|
|
4
|
-
* Copyright (c) 2022-
|
|
4
|
+
* Copyright (c) 2022-2026 STMicroelectronics and others.
|
|
5
5
|
*
|
|
6
6
|
* This program and the accompanying materials are made available under the
|
|
7
7
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -20,7 +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 workflow_mcp_diagram_module_1 = require("../common/mcp/workflow-mcp-diagram-module");
|
|
23
24
|
const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
|
|
25
|
+
const workflow_mcp_module_1 = require("./mcp/workflow-mcp-module");
|
|
24
26
|
const workflow_cli_parser_1 = require("./workflow-cli-parser");
|
|
25
27
|
async function launch(argv) {
|
|
26
28
|
const options = (0, workflow_cli_parser_1.createWorkflowCliParser)().parse(argv);
|
|
@@ -34,16 +36,16 @@ async function launch(argv) {
|
|
|
34
36
|
process.on('uncaughtException', error => {
|
|
35
37
|
logger.error('Uncaught exception:', error);
|
|
36
38
|
});
|
|
37
|
-
const
|
|
38
|
-
const
|
|
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());
|
|
40
|
+
const mcpServerModule = new workflow_mcp_module_1.WorkflowMcpServerModule();
|
|
39
41
|
if (options.webSocket) {
|
|
40
42
|
const launcher = appContainer.resolve(node_1.WebSocketServerLauncher);
|
|
41
|
-
launcher.configure(serverModule);
|
|
43
|
+
launcher.configure(serverModule, mcpServerModule);
|
|
42
44
|
await launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
43
45
|
}
|
|
44
46
|
else {
|
|
45
47
|
const launcher = appContainer.resolve(node_1.SocketServerLauncher);
|
|
46
|
-
launcher.configure(serverModule);
|
|
48
|
+
launcher.configure(serverModule, mcpServerModule);
|
|
47
49
|
await launcher.start({ port: options.port, host: options.host });
|
|
48
50
|
}
|
|
49
51
|
}
|
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,
|
|
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,C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AY,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"}
|
|
@@ -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
|
+
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 {
|
|
22
|
+
}
|
|
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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.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 {
|
|
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.7.0
|
|
3
|
+
"version": "2.7.0",
|
|
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,8 +56,9 @@
|
|
|
56
56
|
"watch:bundle": "webpack -w"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@eclipse-glsp/layout-elk": "2.7.0
|
|
60
|
-
"@eclipse-glsp/server": "2.7.0
|
|
59
|
+
"@eclipse-glsp/layout-elk": "2.7.0",
|
|
60
|
+
"@eclipse-glsp/server": "2.7.0",
|
|
61
|
+
"@eclipse-glsp/server-mcp": "2.7.0",
|
|
61
62
|
"inversify": "^6.1.3"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
@@ -68,5 +69,5 @@
|
|
|
68
69
|
"publishConfig": {
|
|
69
70
|
"access": "public"
|
|
70
71
|
},
|
|
71
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "009013242e08e679f251b4bb7feceb05314d73b2"
|
|
72
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
|
|
|
@@ -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
|
|
@@ -86,7 +86,7 @@ export class TaskNodeBuilder<T extends TaskNode = TaskNode> extends GNodeBuilder
|
|
|
86
86
|
protected createCompartmentHeader(): GLabel {
|
|
87
87
|
return new GLabelBuilder(GLabel)
|
|
88
88
|
.type(ModelTypes.LABEL_HEADING)
|
|
89
|
-
.id(this.proxy.id + '
|
|
89
|
+
.id(this.proxy.id + '_label')
|
|
90
90
|
.text(this.proxy.name)
|
|
91
91
|
.build();
|
|
92
92
|
}
|
|
@@ -151,7 +151,7 @@ export class CategoryNodeBuilder<T extends Category = Category> extends Activity
|
|
|
151
151
|
protected createCompartmentHeader(): GLabel {
|
|
152
152
|
return new GLabelBuilder(GLabel)
|
|
153
153
|
.type(ModelTypes.LABEL_HEADING)
|
|
154
|
-
.id(this.proxy.id + '
|
|
154
|
+
.id(this.proxy.id + '_label')
|
|
155
155
|
.text(this.proxy.name)
|
|
156
156
|
.build();
|
|
157
157
|
}
|