@eclipse-glsp-examples/workflow-server 2.7.0-next.7 → 2.7.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/lib/common/graph-extension.d.ts +1 -1
  2. package/lib/common/graph-extension.js +3 -3
  3. package/lib/common/graph-extension.js.map +1 -1
  4. package/lib/common/handler/create-foreign-node-handler.d.ts +25 -0
  5. package/lib/common/handler/create-foreign-node-handler.d.ts.map +1 -0
  6. package/lib/common/handler/create-foreign-node-handler.js +52 -0
  7. package/lib/common/handler/create-foreign-node-handler.js.map +1 -0
  8. package/lib/common/handler/create-foreign-object-node-handler.d.ts +25 -0
  9. package/lib/common/handler/create-foreign-object-node-handler.d.ts.map +1 -0
  10. package/lib/common/handler/create-foreign-object-node-handler.js +40 -0
  11. package/lib/common/handler/create-foreign-object-node-handler.js.map +1 -0
  12. package/lib/common/mcp/workflow-element-types-provider.d.ts +27 -0
  13. package/lib/common/mcp/workflow-element-types-provider.d.ts.map +1 -0
  14. package/lib/common/mcp/workflow-element-types-provider.js +62 -0
  15. package/lib/common/mcp/workflow-element-types-provider.js.map +1 -0
  16. package/lib/common/mcp/workflow-mcp-label-provider.d.ts +27 -0
  17. package/lib/common/mcp/workflow-mcp-label-provider.d.ts.map +1 -0
  18. package/lib/common/mcp/workflow-mcp-label-provider.js +48 -0
  19. package/lib/common/mcp/workflow-mcp-label-provider.js.map +1 -0
  20. package/lib/common/mcp/workflow-mcp-model-serializer.d.ts +29 -0
  21. package/lib/common/mcp/workflow-mcp-model-serializer.d.ts.map +1 -0
  22. package/lib/common/mcp/workflow-mcp-model-serializer.js +189 -0
  23. package/lib/common/mcp/workflow-mcp-model-serializer.js.map +1 -0
  24. package/lib/common/mcp/workflow-mcp-module.d.ts +36 -0
  25. package/lib/common/mcp/workflow-mcp-module.d.ts.map +1 -0
  26. package/lib/common/mcp/workflow-mcp-module.js +49 -0
  27. package/lib/common/mcp/workflow-mcp-module.js.map +1 -0
  28. package/lib/common/workflow-diagram-module.d.ts +3 -3
  29. package/lib/common/workflow-diagram-module.d.ts.map +1 -1
  30. package/lib/common/workflow-diagram-module.js +3 -3
  31. package/lib/common/workflow-diagram-module.js.map +1 -1
  32. package/lib/common/workflow-glsp-server.d.ts +4 -4
  33. package/lib/common/workflow-glsp-server.d.ts.map +1 -1
  34. package/lib/common/workflow-glsp-server.js +12 -13
  35. package/lib/common/workflow-glsp-server.js.map +1 -1
  36. package/lib/node/app.d.ts +1 -1
  37. package/lib/node/app.js +6 -5
  38. package/lib/node/app.js.map +1 -1
  39. package/package.json +5 -4
  40. package/src/common/graph-extension.ts +3 -3
  41. package/src/common/mcp/workflow-element-types-provider.ts +54 -0
  42. package/src/common/mcp/workflow-mcp-label-provider.ts +37 -0
  43. package/src/common/mcp/workflow-mcp-model-serializer.ts +187 -0
  44. package/src/common/mcp/workflow-mcp-module.ts +54 -0
  45. package/src/common/workflow-diagram-module.ts +5 -5
  46. package/src/common/workflow-glsp-server.ts +17 -10
  47. package/src/node/app.ts +12 -8
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2022-2023 STMicroelectronics and others.
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
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CategoryNodeBuilder = exports.Category = exports.WeightedEdgeBuilder = exports.WeightedEdge = exports.TaskNodeBuilder = exports.TaskNode = exports.ActivityNodeBuilder = exports.ActivityNode = void 0;
4
4
  /********************************************************************************
5
- * Copyright (c) 2022-2023 STMicroelectronics and others.
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
@@ -64,7 +64,7 @@ class TaskNodeBuilder extends server_1.GNodeBuilder {
64
64
  createCompartmentHeader() {
65
65
  return new server_1.GLabelBuilder(server_1.GLabel)
66
66
  .type(model_types_1.ModelTypes.LABEL_HEADING)
67
- .id(this.proxy.id + '_classname')
67
+ .id(this.proxy.id + '_label')
68
68
  .text(this.proxy.name)
69
69
  .build();
70
70
  }
@@ -121,7 +121,7 @@ class CategoryNodeBuilder extends ActivityNodeBuilder {
121
121
  createCompartmentHeader() {
122
122
  return new server_1.GLabelBuilder(server_1.GLabel)
123
123
  .type(model_types_1.ModelTypes.LABEL_HEADING)
124
- .id(this.proxy.id + '_classname')
124
+ .id(this.proxy.id + '_label')
125
125
  .text(this.proxy.name)
126
126
  .build();
127
127
  }
@@ -1 +1 @@
1
- {"version":3,"file":"graph-extension.js","sourceRoot":"","sources":["../../src/common/graph-extension.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAW8B;AAC9B,oDAAgD;AAEhD,MAAa,YAAa,SAAQ,cAAK;IAGnC,MAAM,CAAU,OAAO;QACnB,OAAO,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;CACJ;AAND,oCAMC;AAED,MAAa,mBAA2D,SAAQ,qBAAe;IAC3F,QAAQ,CAAC,QAAgB;QACrB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AALD,kDAKC;AAED,MAAa,QAAS,SAAQ,cAAK;IAM/B,MAAM,CAAU,OAAO;QACnB,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,iBAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9G,CAAC;CACJ;AATD,4BASC;AAED,MAAa,eAA+C,SAAQ,qBAAe;IAC/E,IAAI,CAAC,IAAY;QACb,IAAI,CAAC,KAAK,CAAC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AC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,sBAAsB;QAC5B,MAAM,aAAa,GAAS,EAAE,CAAC;QAC/B,OAAO,IAAI,4BAAmB,CAAC,qBAAY,CAAC;aACvC,IAAI,CAAC,wBAAU,CAAC,WAAW,CAAC;aAC5B,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,CAAC;aAC7B,MAAM,CAAC,MAAM,CAAC;aACd,gBAAgB,CAAC,aAAa,CAAC;aAC/B,GAAG,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC;aACnC,KAAK,EAAE,CAAC;IACjB,CAAC;IAES,uBAAuB;QAC7B,OAAO,IAAI,sBAAa,CAAC,eAAM,CAAC;aAC3B,IAAI,CAAC,wBAAU,CAAC,aAAa,CAAC;aAC9B,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC;aAC5B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;aACrB,KAAK,EAAE,CAAC;IACjB,CAAC;IAES,uBAAuB;QAC7B,OAAO,IAAI,4BAAmB,CAAC,qBAAY,CAAC;aACvC,IAAI,CAAC,wBAAU,CAAC,SAAS,CAAC;aAC1B,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,CAAC;aAC7B,MAAM,CAAC,UAAU,CAAC;aAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;aAC9D,KAAK,EAAE,CAAC;IACjB,CAAC;CACJ;AAvCD,kDAuCC"}
@@ -0,0 +1,25 @@
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 { CreateNodeOperation, GNode, GNodeBuilder, Point } from '@eclipse-glsp/server';
17
+ import { CreateWorkflowNodeOperationHandler } from './create-workflow-node-operation-handler';
18
+ export declare class CreateForeignNodeHandler extends CreateWorkflowNodeOperationHandler {
19
+ elementTypeIds: string[];
20
+ label: string;
21
+ protected multiText: string;
22
+ createNode(operation: CreateNodeOperation, relativeLocation?: Point): GNode | undefined;
23
+ protected builder(point?: Point): GNodeBuilder;
24
+ }
25
+ //# sourceMappingURL=create-foreign-node-handler.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,52 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,25 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022-2023 STMicroelectronics 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 { CreateNodeOperation, GNode, Point } from '@eclipse-glsp/server';
17
+ import { ForeignObjectNodeBuilder } from '../graph-extension';
18
+ import { CreateWorkflowNodeOperationHandler } from './create-workflow-node-operation-handler';
19
+ export declare class CreateForeignObjectNodeHandler extends CreateWorkflowNodeOperationHandler {
20
+ elementTypeIds: string[];
21
+ label: string;
22
+ createNode(operation: CreateNodeOperation, relativeLocation?: Point): GNode | undefined;
23
+ protected builder(point?: Point): ForeignObjectNodeBuilder;
24
+ }
25
+ //# sourceMappingURL=create-foreign-object-node-handler.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,40 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,27 @@
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 { ElementTypes, ElementTypesProvider } from '@eclipse-glsp/server-mcp';
17
+ /**
18
+ * Workflow-specific {@link ElementTypesProvider}. Returns the constant set of creatable types
19
+ * with richer LLM-facing fields (`description`, `acceptsText`) than the default registry-scrape
20
+ * impl can infer. Bound on the workflow MCP diagram module via `bindElementTypesProvider()`;
21
+ * the standard `element-types` tool handler exposes the full entries via `structuredContent`
22
+ * (with a short summary in the text content) — no handler rebind needed.
23
+ */
24
+ export declare class WorkflowElementTypesProvider implements ElementTypesProvider {
25
+ get(): ElementTypes;
26
+ }
27
+ //# sourceMappingURL=workflow-element-types-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-element-types-provider.d.ts","sourceRoot":"","sources":["../../../src/common/mcp/workflow-element-types-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAoB,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAwBhG;;;;;;GAMG;AACH,qBACa,4BAA6B,YAAW,oBAAoB;IACrE,GAAG,IAAI,YAAY;CAGtB"}
@@ -0,0 +1,62 @@
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.WorkflowElementTypesProvider = void 0;
25
+ const server_1 = require("@eclipse-glsp/server");
26
+ const inversify_1 = require("inversify");
27
+ const model_types_1 = require("../util/model-types");
28
+ const NODE_TYPES = [
29
+ { id: model_types_1.ModelTypes.AUTOMATED_TASK, label: 'Automated Task', description: 'Task without human input', acceptsText: true },
30
+ { id: model_types_1.ModelTypes.MANUAL_TASK, label: 'Manual Task', description: 'Task done by a human', acceptsText: true },
31
+ { id: model_types_1.ModelTypes.JOIN_NODE, label: 'Join Node', description: 'Gateway that merges parallel flows', acceptsText: false },
32
+ { id: model_types_1.ModelTypes.FORK_NODE, label: 'Fork Node', description: 'Gateway that splits into parallel flows', acceptsText: false },
33
+ { id: model_types_1.ModelTypes.MERGE_NODE, label: 'Merge Node', description: 'Gateway that merges alternative flows', acceptsText: false },
34
+ { id: model_types_1.ModelTypes.DECISION_NODE, label: 'Decision Node', description: 'Gateway that splits into alternative flows', acceptsText: false },
35
+ { id: model_types_1.ModelTypes.CATEGORY, label: 'Category', description: 'Container node that groups other elements', acceptsText: true }
36
+ ];
37
+ const EDGE_TYPES = [
38
+ { id: server_1.DefaultTypes.EDGE, label: 'Edge', description: 'Standard control flow edge', acceptsText: false },
39
+ {
40
+ id: model_types_1.ModelTypes.WEIGHTED_EDGE,
41
+ label: 'Weighted Edge',
42
+ description: 'Edge that indicates a weighted probability. Typically used with a Decision Node.',
43
+ acceptsText: false
44
+ }
45
+ ];
46
+ /**
47
+ * Workflow-specific {@link ElementTypesProvider}. Returns the constant set of creatable types
48
+ * with richer LLM-facing fields (`description`, `acceptsText`) than the default registry-scrape
49
+ * impl can infer. Bound on the workflow MCP diagram module via `bindElementTypesProvider()`;
50
+ * the standard `element-types` tool handler exposes the full entries via `structuredContent`
51
+ * (with a short summary in the text content) — no handler rebind needed.
52
+ */
53
+ let WorkflowElementTypesProvider = class WorkflowElementTypesProvider {
54
+ get() {
55
+ return { nodeTypes: NODE_TYPES, edgeTypes: EDGE_TYPES };
56
+ }
57
+ };
58
+ exports.WorkflowElementTypesProvider = WorkflowElementTypesProvider;
59
+ exports.WorkflowElementTypesProvider = WorkflowElementTypesProvider = __decorate([
60
+ (0, inversify_1.injectable)()
61
+ ], WorkflowElementTypesProvider);
62
+ //# sourceMappingURL=workflow-element-types-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-element-types-provider.js","sourceRoot":"","sources":["../../../src/common/mcp/workflow-element-types-provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,iDAAoD;AAEpD,yCAAuC;AACvC,qDAAiD;AAEjD,MAAM,UAAU,GAAuB;IACnC,EAAE,EAAE,EAAE,wBAAU,CAAC,cAAc,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,0BAA0B,EAAE,WAAW,EAAE,IAAI,EAAE;IACtH,EAAE,EAAE,EAAE,wBAAU,CAAC,WAAW,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,WAAW,EAAE,IAAI,EAAE;IAC5G,EAAE,EAAE,EAAE,wBAAU,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,oCAAoC,EAAE,WAAW,EAAE,KAAK,EAAE;IACvH,EAAE,EAAE,EAAE,wBAAU,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,yCAAyC,EAAE,WAAW,EAAE,KAAK,EAAE;IAC5H,EAAE,EAAE,EAAE,wBAAU,CAAC,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,uCAAuC,EAAE,WAAW,EAAE,KAAK,EAAE;IAC5H,EAAE,EAAE,EAAE,wBAAU,CAAC,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,4CAA4C,EAAE,WAAW,EAAE,KAAK,EAAE;IACvI,EAAE,EAAE,EAAE,wBAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,2CAA2C,EAAE,WAAW,EAAE,IAAI,EAAE;CAC9H,CAAC;AAEF,MAAM,UAAU,GAAuB;IACnC,EAAE,EAAE,EAAE,qBAAY,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,4BAA4B,EAAE,WAAW,EAAE,KAAK,EAAE;IACvG;QACI,EAAE,EAAE,wBAAU,CAAC,aAAa;QAC5B,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,kFAAkF;QAC/F,WAAW,EAAE,KAAK;KACrB;CACJ,CAAC;AAEF;;;;;;GAMG;AAEI,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC,GAAG;QACC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;IAC5D,CAAC;CACJ,CAAA;AAJY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAIxC"}
@@ -0,0 +1,27 @@
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 { GLabel, GModelElement } from '@eclipse-glsp/server';
17
+ import { DefaultMcpLabelProvider } from '@eclipse-glsp/server-mcp';
18
+ /**
19
+ * Workflow-specific {@link DefaultMcpLabelProvider}: category labels are nested inside a
20
+ * compartment-header child rather than directly under the category, so the default
21
+ * direct-child lookup misses them. Other workflow element types fall through to the
22
+ * inherited default.
23
+ */
24
+ export declare class WorkflowMcpLabelProvider extends DefaultMcpLabelProvider {
25
+ getLabel(element: GModelElement): GLabel | undefined;
26
+ }
27
+ //# sourceMappingURL=workflow-mcp-label-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-mcp-label-provider.d.ts","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-label-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAInE;;;;;GAKG;AACH,qBACa,wBAAyB,SAAQ,uBAAuB;IACxD,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS;CAOhE"}
@@ -0,0 +1,48 @@
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.WorkflowMcpLabelProvider = 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
+ * Workflow-specific {@link DefaultMcpLabelProvider}: category labels are nested inside a
31
+ * compartment-header child rather than directly under the category, so the default
32
+ * direct-child lookup misses them. Other workflow element types fall through to the
33
+ * inherited default.
34
+ */
35
+ let WorkflowMcpLabelProvider = class WorkflowMcpLabelProvider extends server_mcp_1.DefaultMcpLabelProvider {
36
+ getLabel(element) {
37
+ if (element.type === model_types_1.ModelTypes.CATEGORY) {
38
+ const header = element.children.find(child => child.type === model_types_1.ModelTypes.COMP_HEADER);
39
+ return header === null || header === void 0 ? void 0 : header.children.find((child) => child instanceof server_1.GLabel);
40
+ }
41
+ return super.getLabel(element);
42
+ }
43
+ };
44
+ exports.WorkflowMcpLabelProvider = WorkflowMcpLabelProvider;
45
+ exports.WorkflowMcpLabelProvider = WorkflowMcpLabelProvider = __decorate([
46
+ (0, inversify_1.injectable)()
47
+ ], WorkflowMcpLabelProvider);
48
+ //# sourceMappingURL=workflow-mcp-label-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-mcp-label-provider.js","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-label-provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,iDAA6D;AAC7D,yDAAmE;AACnE,yCAAuC;AACvC,qDAAiD;AAEjD;;;;;GAKG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,oCAAuB;IACxD,QAAQ,CAAC,OAAsB;QACpC,IAAI,OAAO,CAAC,IAAI,KAAK,wBAAU,CAAC,QAAQ,EAAE,CAAC;YACvC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,wBAAU,CAAC,WAAW,CAAC,CAAC;YACrF,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,KAAK,YAAY,eAAM,CAAC,CAAC;QACtF,CAAC;QACD,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACJ,CAAA;AARY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CAQpC"}
@@ -0,0 +1,29 @@
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 { GModelElement } from '@eclipse-glsp/graph';
17
+ import { MarkdownMcpModelSerializer, SerializedElement } from '@eclipse-glsp/server-mcp';
18
+ /**
19
+ * As compared to the {@link MarkdownMcpModelSerializer}, this is a specific implementation and we
20
+ * know not only the structure of our graph but also each relevant attribute. This enables us to
21
+ * order them semantically so the produced serialization makes more sense if read with semantics
22
+ * mind. As LLMs (i.e., the MCP clients) work semantically, this is superior to a random ordering.
23
+ * Furthermore, including only the relevant information without redundancies decreases context size.
24
+ */
25
+ export declare class WorkflowMcpModelSerializer extends MarkdownMcpModelSerializer {
26
+ prepareElement(element: GModelElement): Record<string, SerializedElement[]>;
27
+ private adjustElement;
28
+ }
29
+ //# sourceMappingURL=workflow-mcp-model-serializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-mcp-model-serializer.d.ts","sourceRoot":"","sources":["../../../src/common/mcp/workflow-mcp-model-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIzF;;;;;;GAMG;AACH,qBACa,0BAA2B,SAAQ,0BAA0B;IAC7D,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAqCpF,OAAO,CAAC,aAAa;CAsHxB"}
@@ -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