@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.
- 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/handler/create-foreign-node-handler.d.ts +25 -0
- package/lib/common/handler/create-foreign-node-handler.d.ts.map +1 -0
- package/lib/common/handler/create-foreign-node-handler.js +52 -0
- package/lib/common/handler/create-foreign-node-handler.js.map +1 -0
- package/lib/common/handler/create-foreign-object-node-handler.d.ts +25 -0
- package/lib/common/handler/create-foreign-object-node-handler.d.ts.map +1 -0
- package/lib/common/handler/create-foreign-object-node-handler.js +40 -0
- package/lib/common/handler/create-foreign-object-node-handler.js.map +1 -0
- 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-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/mcp/workflow-mcp-module.d.ts +36 -0
- package/lib/common/mcp/workflow-mcp-module.d.ts.map +1 -0
- package/lib/common/mcp/workflow-mcp-module.js +49 -0
- package/lib/common/mcp/workflow-mcp-module.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 +6 -5
- package/lib/node/app.js.map +1 -1
- package/package.json +5 -4
- package/src/common/graph-extension.ts +3 -3
- package/src/common/mcp/workflow-element-types-provider.ts +54 -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/mcp/workflow-mcp-module.ts +54 -0
- package/src/common/workflow-diagram-module.ts +5 -5
- package/src/common/workflow-glsp-server.ts +17 -10
- package/src/node/app.ts +12 -8
|
@@ -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,KAAK,CAAC,EAAE,EAAE;YACxB,CAAC,wBAAU,CAAC,QAAQ,CAAC,EAAE,EAAE;YACzB,CAAC,wBAAU,CAAC,cAAc,CAAC,EAAE,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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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { BindingTarget } from '@eclipse-glsp/server';
|
|
17
|
+
import { DefaultMcpDiagramModule, DefaultMcpServerModule, ElementTypesProvider, McpLabelProvider, McpModelSerializer } from '@eclipse-glsp/server-mcp';
|
|
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
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Workflow-specific diagram-scope MCP module — swaps in the workflow-aware
|
|
27
|
+
* {@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
|
+
*/
|
|
31
|
+
export declare class WorkflowMcpDiagramModule extends DefaultMcpDiagramModule {
|
|
32
|
+
protected bindLabelProvider(): BindingTarget<McpLabelProvider>;
|
|
33
|
+
protected bindModelSerializer(): BindingTarget<McpModelSerializer>;
|
|
34
|
+
protected bindElementTypesProvider(): BindingTarget<ElementTypesProvider>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=workflow-mcp-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.WorkflowMcpDiagramModule = exports.WorkflowMcpServerModule = void 0;
|
|
19
|
+
const server_mcp_1 = require("@eclipse-glsp/server-mcp");
|
|
20
|
+
const workflow_element_types_provider_1 = require("./workflow-element-types-provider");
|
|
21
|
+
const workflow_mcp_label_provider_1 = require("./workflow-mcp-label-provider");
|
|
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
|
+
/**
|
|
32
|
+
* Workflow-specific diagram-scope MCP module — swaps in the workflow-aware
|
|
33
|
+
* {@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
|
+
*/
|
|
37
|
+
class WorkflowMcpDiagramModule extends server_mcp_1.DefaultMcpDiagramModule {
|
|
38
|
+
bindLabelProvider() {
|
|
39
|
+
return workflow_mcp_label_provider_1.WorkflowMcpLabelProvider;
|
|
40
|
+
}
|
|
41
|
+
bindModelSerializer() {
|
|
42
|
+
return workflow_mcp_model_serializer_1.WorkflowMcpModelSerializer;
|
|
43
|
+
}
|
|
44
|
+
bindElementTypesProvider() {
|
|
45
|
+
return workflow_element_types_provider_1.WorkflowElementTypesProvider;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.WorkflowMcpDiagramModule = WorkflowMcpDiagramModule;
|
|
49
|
+
//# sourceMappingURL=workflow-mcp-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -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;;;;;;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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;AAC3G,kHAA2G;AAC3G,wGAAiG;AACjG,wFAAkF;AAClF,sFAAsF;AACtF,wEAAmE;AACnE,qFAAgF;AAChF,qFAA+E;AAC/E,iEAAoE;AACpE,qEAAgE;AAGzD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,qBAAY;IAC/B,+BAA+B,CAAC,OAA4C;QAC3F,OAAO,CAAC,GAAG,CAAC,iDAA0B,CAAC,CAAC;IAC5C,CAAC;CACJ,CAAA;AAJY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAIhC;AAGM,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,4BAAmB;IAC1D,YAAmB,sBAA+D;QAC9E,KAAK,EAAE,CAAC;QADO,2BAAsB,GAAtB,sBAAsB,CAAyC;IAElF,CAAC;IAED,IAAI,WAAW;QACX,OAAO,kBAAkB,CAAC;IAC9B,CAAC;IAEkB,0BAA0B,CAAC,OAA0D;QACpG,KAAK,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAC1C,OAA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,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,6 +20,7 @@ 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_module_1 = require("../common/mcp/workflow-mcp-module");
|
|
23
24
|
const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
|
|
24
25
|
const workflow_cli_parser_1 = require("./workflow-cli-parser");
|
|
25
26
|
async function launch(argv) {
|
|
@@ -34,16 +35,16 @@ async function launch(argv) {
|
|
|
34
35
|
process.on('uncaughtException', error => {
|
|
35
36
|
logger.error('Uncaught exception:', error);
|
|
36
37
|
});
|
|
37
|
-
const
|
|
38
|
-
const
|
|
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 workflow_mcp_module_1.WorkflowMcpDiagramModule());
|
|
39
|
+
const mcpServerModule = new workflow_mcp_module_1.WorkflowMcpServerModule();
|
|
39
40
|
if (options.webSocket) {
|
|
40
41
|
const launcher = appContainer.resolve(node_1.WebSocketServerLauncher);
|
|
41
|
-
launcher.configure(serverModule);
|
|
42
|
+
launcher.configure(serverModule, mcpServerModule);
|
|
42
43
|
await launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
45
46
|
const launcher = appContainer.resolve(node_1.SocketServerLauncher);
|
|
46
|
-
launcher.configure(serverModule);
|
|
47
|
+
launcher.configure(serverModule, mcpServerModule);
|
|
47
48
|
await launcher.start({ port: options.port, host: options.host });
|
|
48
49
|
}
|
|
49
50
|
}
|
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,2EAAsG;AACtG,+EAAgG;AAChG,+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,8CAAwB,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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server",
|
|
3
|
-
"version": "2.7.0-next.
|
|
3
|
+
"version": "2.7.0-next.9+a58ea45",
|
|
4
4
|
"description": "GLSP node server for the workflow example",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -56,8 +56,9 @@
|
|
|
56
56
|
"watch:bundle": "webpack -w"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@eclipse-glsp/layout-elk": "2.7.0-next.
|
|
60
|
-
"@eclipse-glsp/server": "2.7.0-next.
|
|
59
|
+
"@eclipse-glsp/layout-elk": "2.7.0-next.9+a58ea45",
|
|
60
|
+
"@eclipse-glsp/server": "2.7.0-next.9+a58ea45",
|
|
61
|
+
"@eclipse-glsp/server-mcp": "2.7.0-next.9+a58ea45",
|
|
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": "a58ea45de80be3d2fcf46e0934af141b213f6187"
|
|
72
73
|
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { DefaultTypes } from '@eclipse-glsp/server';
|
|
18
|
+
import { ElementTypeEntry, ElementTypes, ElementTypesProvider } from '@eclipse-glsp/server-mcp';
|
|
19
|
+
import { injectable } from 'inversify';
|
|
20
|
+
import { ModelTypes } from '../util/model-types';
|
|
21
|
+
|
|
22
|
+
const NODE_TYPES: ElementTypeEntry[] = [
|
|
23
|
+
{ id: ModelTypes.AUTOMATED_TASK, label: 'Automated Task', description: 'Task without human input', acceptsText: true },
|
|
24
|
+
{ id: ModelTypes.MANUAL_TASK, label: 'Manual Task', description: 'Task done by a human', acceptsText: true },
|
|
25
|
+
{ id: ModelTypes.JOIN_NODE, label: 'Join Node', description: 'Gateway that merges parallel flows', acceptsText: false },
|
|
26
|
+
{ id: ModelTypes.FORK_NODE, label: 'Fork Node', description: 'Gateway that splits into parallel flows', acceptsText: false },
|
|
27
|
+
{ id: ModelTypes.MERGE_NODE, label: 'Merge Node', description: 'Gateway that merges alternative flows', acceptsText: false },
|
|
28
|
+
{ id: ModelTypes.DECISION_NODE, label: 'Decision Node', description: 'Gateway that splits into alternative flows', acceptsText: false },
|
|
29
|
+
{ id: ModelTypes.CATEGORY, label: 'Category', description: 'Container node that groups other elements', acceptsText: true }
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const EDGE_TYPES: ElementTypeEntry[] = [
|
|
33
|
+
{ id: DefaultTypes.EDGE, label: 'Edge', description: 'Standard control flow edge', acceptsText: false },
|
|
34
|
+
{
|
|
35
|
+
id: ModelTypes.WEIGHTED_EDGE,
|
|
36
|
+
label: 'Weighted Edge',
|
|
37
|
+
description: 'Edge that indicates a weighted probability. Typically used with a Decision Node.',
|
|
38
|
+
acceptsText: false
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Workflow-specific {@link ElementTypesProvider}. Returns the constant set of creatable types
|
|
44
|
+
* with richer LLM-facing fields (`description`, `acceptsText`) than the default registry-scrape
|
|
45
|
+
* impl can infer. Bound on the workflow MCP diagram module via `bindElementTypesProvider()`;
|
|
46
|
+
* the standard `element-types` tool handler exposes the full entries via `structuredContent`
|
|
47
|
+
* (with a short summary in the text content) — no handler rebind needed.
|
|
48
|
+
*/
|
|
49
|
+
@injectable()
|
|
50
|
+
export class WorkflowElementTypesProvider implements ElementTypesProvider {
|
|
51
|
+
get(): ElementTypes {
|
|
52
|
+
return { nodeTypes: NODE_TYPES, edgeTypes: EDGE_TYPES };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { GLabel, GModelElement } from '@eclipse-glsp/server';
|
|
18
|
+
import { DefaultMcpLabelProvider } from '@eclipse-glsp/server-mcp';
|
|
19
|
+
import { injectable } from 'inversify';
|
|
20
|
+
import { ModelTypes } from '../util/model-types';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Workflow-specific {@link DefaultMcpLabelProvider}: category labels are nested inside a
|
|
24
|
+
* compartment-header child rather than directly under the category, so the default
|
|
25
|
+
* direct-child lookup misses them. Other workflow element types fall through to the
|
|
26
|
+
* inherited default.
|
|
27
|
+
*/
|
|
28
|
+
@injectable()
|
|
29
|
+
export class WorkflowMcpLabelProvider extends DefaultMcpLabelProvider {
|
|
30
|
+
override getLabel(element: GModelElement): GLabel | undefined {
|
|
31
|
+
if (element.type === ModelTypes.CATEGORY) {
|
|
32
|
+
const header = element.children.find(child => child.type === ModelTypes.COMP_HEADER);
|
|
33
|
+
return header?.children.find((child): child is GLabel => child instanceof GLabel);
|
|
34
|
+
}
|
|
35
|
+
return super.getLabel(element);
|
|
36
|
+
}
|
|
37
|
+
}
|