@camunda/e2e-test-suite 0.0.1201 → 0.0.1203
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/dist/resources/mcp_server_sm/mcp_cluster_tools.bpmn +168 -0
- package/dist/resources/mcp_server_sm/mcp_process_definition_tools.bpmn +234 -0
- package/dist/resources/mcp_server_sm/mcp_process_instance_tools.bpmn +232 -0
- package/dist/resources/mcp_server_sm/mcp_user_task_tools.bpmn +309 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-cluster-tools.spec.js +72 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.js +101 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.js +107 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.d.ts +1 -0
- package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-user-task-tools.spec.js +124 -0
- package/dist/utils/mcpSmSetup.d.ts +19 -0
- package/dist/utils/mcpSmSetup.js +34 -0
- package/package.json +1 -1
- package/resources/mcp_server_sm/mcp_cluster_tools.bpmn +168 -0
- package/resources/mcp_server_sm/mcp_process_definition_tools.bpmn +234 -0
- package/resources/mcp_server_sm/mcp_process_instance_tools.bpmn +232 -0
- package/resources/mcp_server_sm/mcp_user_task_tools.bpmn +309 -0
package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-process-definition-tools.spec.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_9_1 = require("../../../fixtures/SM-8.9");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let toolsInstanceKey;
|
|
10
|
+
SM_8_9_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_9_1.test.describe('MCP Gateway - Process Definition Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_9_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_9_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
16
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_definition_test_file.bpmn', authToken),
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_process_definition_tools.bpmn', authToken),
|
|
18
|
+
]);
|
|
19
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
20
|
+
throw new Error('Failed to deploy process definition tools processes');
|
|
21
|
+
}
|
|
22
|
+
await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
23
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
24
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey });
|
|
25
|
+
});
|
|
26
|
+
SM_8_9_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
27
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
28
|
+
});
|
|
29
|
+
SM_8_9_1.test.afterEach(async ({ page }, testInfo) => {
|
|
30
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
31
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
32
|
+
});
|
|
33
|
+
const processDefinitionToolTests = [
|
|
34
|
+
{
|
|
35
|
+
name: 'searchProcessDefinitions - search process definitions with filters such as name and key.',
|
|
36
|
+
variable: 'mcpResultSearchProcessDefinitions',
|
|
37
|
+
assertions: [
|
|
38
|
+
{
|
|
39
|
+
text: 'totalItems',
|
|
40
|
+
description: 'search response contains totalItems field',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
text: 'processDefinitionKey',
|
|
44
|
+
description: 'search response contains processDefinitionKey field',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
text: 'resourceName',
|
|
48
|
+
description: 'search response contains resourceName field',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'getProcessDefinitionXml - retrieve the BPMN XML of a process definition.',
|
|
54
|
+
variable: 'mcpResultGetProcessDefinitionXml',
|
|
55
|
+
assertions: [
|
|
56
|
+
{
|
|
57
|
+
text: 'bpmn:definitions',
|
|
58
|
+
description: 'XML response contains bpmn:definitions element',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
text: 'bpmn:process',
|
|
62
|
+
description: 'XML response contains bpmn:process element',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'getProcessDefinition - retrieve a process definition by key',
|
|
68
|
+
variable: 'mcpResultGetProcessDefinition',
|
|
69
|
+
assertions: [
|
|
70
|
+
{
|
|
71
|
+
text: 'processDefinitionKey',
|
|
72
|
+
description: 'process definition response contains processDefinitionKey',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
text: 'mcp_process_definition_test_file',
|
|
76
|
+
description: 'process definition response contains correct process name',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
for (const testCase of processDefinitionToolTests) {
|
|
82
|
+
(0, SM_8_9_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
83
|
+
SM_8_9_1.test.slow();
|
|
84
|
+
await SM_8_9_1.test.step('Navigate to completed process in Operate', async () => {
|
|
85
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
86
|
+
timeout: 60000,
|
|
87
|
+
});
|
|
88
|
+
await operateHomePage.clickProcessesTab();
|
|
89
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
90
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
91
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Process Definition Tools');
|
|
92
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
93
|
+
});
|
|
94
|
+
for (const assertion of testCase.assertions) {
|
|
95
|
+
await SM_8_9_1.test.step(`Verify ${assertion.description}`, async () => {
|
|
96
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
package/dist/tests/SM-8.9/orchestration-cluster-mcp-server/mcp-process-instance-tools.spec.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_9_1 = require("../../../fixtures/SM-8.9");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
7
|
+
const test_1 = require("@playwright/test");
|
|
8
|
+
let authToken;
|
|
9
|
+
let toolsInstanceKey;
|
|
10
|
+
SM_8_9_1.test.describe.configure({ mode: 'parallel' });
|
|
11
|
+
SM_8_9_1.test.describe('MCP Gateway - Process Instance Tools @tasklistV2', () => {
|
|
12
|
+
SM_8_9_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
13
|
+
SM_8_9_1.test.beforeAll(async () => {
|
|
14
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
15
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
16
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_process_instance_test_file.bpmn', authToken),
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_process_instance_tools.bpmn', authToken),
|
|
18
|
+
]);
|
|
19
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
20
|
+
throw new Error('Failed to deploy process instance tools processes');
|
|
21
|
+
}
|
|
22
|
+
const testInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
23
|
+
// Wait for test instance to be indexed before tools instance queries it
|
|
24
|
+
await (0, apiHelpers_1.waitForProcessInstanceVisible)(testInstanceKey, authToken, 'sm');
|
|
25
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
26
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey, testInstanceKey });
|
|
27
|
+
});
|
|
28
|
+
SM_8_9_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
29
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
30
|
+
});
|
|
31
|
+
SM_8_9_1.test.afterEach(async ({ page }, testInfo) => {
|
|
32
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
33
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
34
|
+
});
|
|
35
|
+
const processInstanceToolTests = [
|
|
36
|
+
{
|
|
37
|
+
name: 'searchProcessInstances - search process instances with filters such as processDefinitionKey',
|
|
38
|
+
variable: 'mcpResultSearchProcessInstances',
|
|
39
|
+
assertions: [
|
|
40
|
+
{
|
|
41
|
+
text: 'totalItems',
|
|
42
|
+
description: 'search response contains totalItems field',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
text: 'processInstanceKey',
|
|
46
|
+
description: 'search response contains processInstanceKey field',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
text: 'processDefinitionKey',
|
|
50
|
+
description: 'search response contains processDefinitionKey field',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'getProcessInstance - retrieve a process instance by key',
|
|
56
|
+
variable: 'mcpResultGetProcessInstance',
|
|
57
|
+
assertions: [
|
|
58
|
+
{
|
|
59
|
+
text: 'processInstanceKey',
|
|
60
|
+
description: 'process instance response contains processInstanceKey',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
text: 'mcp_process_instance_test_file',
|
|
64
|
+
description: 'process instance response contains correct process name',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
text: 'state',
|
|
68
|
+
description: 'process instance response contains state field',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'createProcessInstance - create a new process instance with variables',
|
|
74
|
+
variable: 'mcpResultCreateProcessInstance',
|
|
75
|
+
assertions: [
|
|
76
|
+
{
|
|
77
|
+
text: 'processInstanceKey',
|
|
78
|
+
description: 'create response contains processInstanceKey',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
text: 'processDefinitionKey',
|
|
82
|
+
description: 'create response contains processDefinitionKey',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
for (const testCase of processInstanceToolTests) {
|
|
88
|
+
(0, SM_8_9_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
89
|
+
SM_8_9_1.test.slow();
|
|
90
|
+
await SM_8_9_1.test.step('Navigate to completed process in Operate', async () => {
|
|
91
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
92
|
+
timeout: 60000,
|
|
93
|
+
});
|
|
94
|
+
await operateHomePage.clickProcessesTab();
|
|
95
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
96
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
97
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP Process Instance Tools');
|
|
98
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
99
|
+
});
|
|
100
|
+
for (const assertion of testCase.assertions) {
|
|
101
|
+
await SM_8_9_1.test.step(assertion.description, async () => {
|
|
102
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const SM_8_9_1 = require("../../../fixtures/SM-8.9");
|
|
4
|
+
const _setup_1 = require("../../../test-setup.js");
|
|
5
|
+
const apiHelpers_1 = require("../../../utils/apiHelpers");
|
|
6
|
+
const userTaskHelpers_1 = require("../../../utils/userTaskHelpers");
|
|
7
|
+
const mcpSmSetup_1 = require("../../../utils/mcpSmSetup");
|
|
8
|
+
const test_1 = require("@playwright/test");
|
|
9
|
+
let authToken;
|
|
10
|
+
let toolsInstanceKey;
|
|
11
|
+
SM_8_9_1.test.describe.configure({ mode: 'parallel' });
|
|
12
|
+
SM_8_9_1.test.describe('MCP Gateway - User Task Tools @tasklistV2', () => {
|
|
13
|
+
SM_8_9_1.test.skip(process.env.MCP_GATEWAY_ENABLED !== 'true', 'MCP gateway not enabled in this deployment');
|
|
14
|
+
SM_8_9_1.test.beforeAll(async () => {
|
|
15
|
+
authToken = await (0, apiHelpers_1.authSmAPI)();
|
|
16
|
+
const [testFileProcessKey, toolsProcessKey] = await Promise.all([
|
|
17
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_saas/mcp_user_task_test_file.bpmn', authToken),
|
|
18
|
+
(0, apiHelpers_1.deployProcess)('./resources/mcp_server_sm/mcp_user_task_tools.bpmn', authToken),
|
|
19
|
+
]);
|
|
20
|
+
if (testFileProcessKey == null || toolsProcessKey == null) {
|
|
21
|
+
throw new Error('Failed to deploy user task tools processes');
|
|
22
|
+
}
|
|
23
|
+
// Create test instance which will create a user task
|
|
24
|
+
const testInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(testFileProcessKey), authToken);
|
|
25
|
+
// Get the user task key created by the test instance (with retry logic)
|
|
26
|
+
const testUserTaskKey = await (0, userTaskHelpers_1.getUserTaskKeyByProcessInstanceKey)(testInstanceKey, authToken, 'sm');
|
|
27
|
+
console.log('Creating tools instance with variables:', {
|
|
28
|
+
testFileProcessKey,
|
|
29
|
+
testUserTaskKey,
|
|
30
|
+
});
|
|
31
|
+
// Create tools instance with required variables
|
|
32
|
+
const mcpVars = (0, mcpSmSetup_1.getMcpSmVariables)();
|
|
33
|
+
toolsInstanceKey = await (0, apiHelpers_1.createProcessInstance)(String(toolsProcessKey), authToken, undefined, undefined, { ...mcpVars, testFileProcessKey, testUserTaskKey });
|
|
34
|
+
});
|
|
35
|
+
SM_8_9_1.test.beforeEach(async ({ navigationPage }, testInfo) => {
|
|
36
|
+
await navigationPage.goToOperate((testInfo.workerIndex + 1) * 1000);
|
|
37
|
+
});
|
|
38
|
+
SM_8_9_1.test.afterEach(async ({ page }, testInfo) => {
|
|
39
|
+
await (0, _setup_1.captureScreenshot)(page, testInfo);
|
|
40
|
+
await (0, _setup_1.captureFailureVideo)(page, testInfo);
|
|
41
|
+
});
|
|
42
|
+
const userTaskToolTests = [
|
|
43
|
+
{
|
|
44
|
+
name: 'searchUserTasks - search user tasks with filters such as processDefinitionKey',
|
|
45
|
+
variable: 'mcpResultSearchUserTasks',
|
|
46
|
+
assertions: [
|
|
47
|
+
{
|
|
48
|
+
text: 'totalItems',
|
|
49
|
+
description: 'search response contains totalItems field',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
text: 'userTaskKey',
|
|
53
|
+
description: 'search response contains userTaskKey field',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
text: 'processDefinitionKey',
|
|
57
|
+
description: 'search response contains processDefinitionKey field',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'getUserTask - retrieve a user task by key',
|
|
63
|
+
variable: 'mcpResultGetUserTask',
|
|
64
|
+
assertions: [
|
|
65
|
+
{
|
|
66
|
+
text: 'userTaskKey',
|
|
67
|
+
description: 'response contains userTaskKey field',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
text: 'processInstanceKey',
|
|
71
|
+
description: 'response contains processInstanceKey field',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
text: 'assignee',
|
|
75
|
+
description: 'response contains assignee field',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'assignUserTask - update the assignment of a user task',
|
|
81
|
+
variable: 'mcpResultAssignUserTask',
|
|
82
|
+
assertions: [
|
|
83
|
+
{
|
|
84
|
+
text: 'mcpUser',
|
|
85
|
+
description: 'response reflects the assignee value mcpUser',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'searchUserTaskVariables - search variables scoped to a specific user task',
|
|
91
|
+
variable: 'mcpResultSearchUserTaskVariables',
|
|
92
|
+
assertions: [
|
|
93
|
+
{
|
|
94
|
+
text: 'totalItems',
|
|
95
|
+
description: 'search response contains totalItems field',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
text: 'items',
|
|
99
|
+
description: 'search response contains items array',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
for (const testCase of userTaskToolTests) {
|
|
105
|
+
(0, SM_8_9_1.test)(testCase.name, async ({ operateHomePage, operateProcessesPage, operateProcessInstancePage, }) => {
|
|
106
|
+
SM_8_9_1.test.slow();
|
|
107
|
+
await SM_8_9_1.test.step('Navigate to completed process in Operate', async () => {
|
|
108
|
+
await (0, test_1.expect)(operateHomePage.operateBanner).toBeVisible({
|
|
109
|
+
timeout: 60000,
|
|
110
|
+
});
|
|
111
|
+
await operateHomePage.clickProcessesTab();
|
|
112
|
+
await operateProcessesPage.clickProcessCompletedCheckbox();
|
|
113
|
+
await operateProcessesPage.applyMoreFilters('Process Instance Key(s)', String(toolsInstanceKey));
|
|
114
|
+
await operateProcessesPage.clickProcessInstanceLink('MCP User Task Tools');
|
|
115
|
+
await operateProcessInstancePage.assertProcessCompleteStatusWithRetry();
|
|
116
|
+
});
|
|
117
|
+
for (const assertion of testCase.assertions) {
|
|
118
|
+
await SM_8_9_1.test.step(assertion.description, async () => {
|
|
119
|
+
await operateProcessInstancePage.assertProcessVariableContainsText(testCase.variable, assertion.text);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP SM setup utilities.
|
|
3
|
+
*
|
|
4
|
+
* Builds the process-variable payload that SM-specific MCP BPMNs
|
|
5
|
+
* (resources/mcp_server_sm/) expect instead of connector secrets.
|
|
6
|
+
*/
|
|
7
|
+
export type McpSmVariables = Record<string, unknown> & {
|
|
8
|
+
mcpBaseUrl: string;
|
|
9
|
+
mcpOauthUrl: string;
|
|
10
|
+
mcpClientId: string;
|
|
11
|
+
mcpClientSecret: string;
|
|
12
|
+
mcpTokenAudience: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Returns the MCP connection variables derived from the SM environment.
|
|
16
|
+
* These are passed as process instance variables so the SM BPMNs
|
|
17
|
+
* (which use FEEL expressions) can resolve them at runtime.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getMcpSmVariables(): McpSmVariables;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP SM setup utilities.
|
|
4
|
+
*
|
|
5
|
+
* Builds the process-variable payload that SM-specific MCP BPMNs
|
|
6
|
+
* (resources/mcp_server_sm/) expect instead of connector secrets.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getMcpSmVariables = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the MCP connection variables derived from the SM environment.
|
|
12
|
+
* These are passed as process instance variables so the SM BPMNs
|
|
13
|
+
* (which use FEEL expressions) can resolve them at runtime.
|
|
14
|
+
*/
|
|
15
|
+
function getMcpSmVariables() {
|
|
16
|
+
const baseUrl = process.env.PLAYWRIGHT_BASE_URL ||
|
|
17
|
+
`https://gke-${process.env.BASE_URL}.ci.distro.ultrawombat.com`;
|
|
18
|
+
const clientId = process.env.MCP_SM_CLIENT_ID ?? 'test';
|
|
19
|
+
const clientSecret = process.env.MCP_SM_CLIENT_SECRET ??
|
|
20
|
+
process.env.DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENTS_SECRET ??
|
|
21
|
+
'';
|
|
22
|
+
const tokenAudience = process.env.MCP_SM_TOKEN_AUDIENCE ?? 'orchestration-api';
|
|
23
|
+
if (!clientSecret) {
|
|
24
|
+
throw new Error('MCP SM client secret is required. Set MCP_SM_CLIENT_SECRET or DISTRO_QA_E2E_TESTS_KEYCLOAK_CLIENTS_SECRET.');
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
mcpBaseUrl: baseUrl,
|
|
28
|
+
mcpOauthUrl: `${baseUrl}/auth/realms/camunda-platform/protocol/openid-connect/token`,
|
|
29
|
+
mcpClientId: clientId,
|
|
30
|
+
mcpClientSecret: clientSecret,
|
|
31
|
+
mcpTokenAudience: tokenAudience,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.getMcpSmVariables = getMcpSmVariables;
|
package/package.json
CHANGED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
3
|
+
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
|
4
|
+
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
|
|
5
|
+
xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
|
|
6
|
+
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
|
|
7
|
+
xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_ClusterStatus"
|
|
8
|
+
targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Web Modeler"
|
|
9
|
+
exporterVersion="9e96352" modeler:executionPlatform="Camunda Cloud"
|
|
10
|
+
modeler:executionPlatformVersion="8.9.0">
|
|
11
|
+
<bpmn:process id="Process_mcp_cluster_tools" name="MCP Cluster tools" isExecutable="true">
|
|
12
|
+
<bpmn:startEvent id="StartEvent_1">
|
|
13
|
+
<bpmn:outgoing>Flow_1nrepge</bpmn:outgoing>
|
|
14
|
+
</bpmn:startEvent>
|
|
15
|
+
<bpmn:endEvent id="EndEvent_1">
|
|
16
|
+
<bpmn:incoming>Flow_0jqbea8</bpmn:incoming>
|
|
17
|
+
</bpmn:endEvent>
|
|
18
|
+
<bpmn:serviceTask id="getClusterStatus" name="getClusterStatus"
|
|
19
|
+
zeebe:modelerTemplate="io.camunda.connectors.agenticai.mcp.remoteclient.v0"
|
|
20
|
+
zeebe:modelerTemplateVersion="2"
|
|
21
|
+
zeebe:modelerTemplateIcon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjAwIDIwMCI+CiAgICA8cGF0aCBkPSJNMjUgOTcuODUyOEw5Mi44ODIzIDI5Ljk3MDZDMTAyLjI1NSAyMC41OTggMTE3LjQ1MSAyMC41OTggMTI2LjgyMyAyOS45NzA2VjI5Ljk3MDZDMTM2LjE5NiAzOS4zNDMxIDEzNi4xOTYgNTQuNTM5MSAxMjYuODIzIDYzLjkxMTdMNzUuNTU4MSAxMTUuMTc3IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik03Ni4yNjUzIDExNC40N0wxMjYuODIzIDYzLjkxMTdDMTM2LjE5NiA1NC41MzkxIDE1MS4zOTIgNTQuNTM5MSAxNjAuNzY1IDYzLjkxMTdMMTYxLjExOCA2NC4yNjUyQzE3MC40OTEgNzMuNjM3OCAxNzAuNDkxIDg4LjgzMzggMTYxLjExOCA5OC4yMDYzTDk5LjcyNDggMTU5LjZDOTYuNjAwNiAxNjIuNzI0IDk2LjYwMDYgMTY3Ljc4OSA5OS43MjQ4IDE3MC45MTNMMTEyLjMzMSAxODMuNTIiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMTIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgogICAgPHBhdGggZD0iTTEwOS44NTMgNDYuOTQxMUw1OS42NDgyIDk3LjE0NTdDNTAuMjc1NyAxMDYuNTE4IDUwLjI3NTcgMTIxLjcxNCA1OS42NDgyIDEzMS4wODdWMTMxLjA4N0M2OS4wMjA4IDE0MC40NTkgODQuMjE2OCAxNDAuNDU5IDkzLjU4OTQgMTMxLjA4N0wxNDMuNzk0IDgwLjg4MjIiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMTIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K">
|
|
22
|
+
<bpmn:extensionElements>
|
|
23
|
+
<zeebe:taskDefinition type="io.camunda.agenticai:mcpremoteclient:1" retries="3" />
|
|
24
|
+
<zeebe:ioMapping>
|
|
25
|
+
<zeebe:input source="http" target="data.transport.type" />
|
|
26
|
+
<zeebe:input source="=mcpBaseUrl + "/mcp/cluster""
|
|
27
|
+
target="data.transport.http.url" />
|
|
28
|
+
<zeebe:input source="oauth-client-credentials-flow"
|
|
29
|
+
target="data.transport.http.authentication.type" />
|
|
30
|
+
<zeebe:input source="=mcpOauthUrl"
|
|
31
|
+
target="data.transport.http.authentication.oauthTokenEndpoint" />
|
|
32
|
+
<zeebe:input source="=mcpClientId"
|
|
33
|
+
target="data.transport.http.authentication.clientId" />
|
|
34
|
+
<zeebe:input source="=mcpClientSecret"
|
|
35
|
+
target="data.transport.http.authentication.clientSecret" />
|
|
36
|
+
<zeebe:input source="=mcpTokenAudience"
|
|
37
|
+
target="data.transport.http.authentication.audience" />
|
|
38
|
+
<zeebe:input source="CREDENTIALS_BODY"
|
|
39
|
+
target="data.transport.http.authentication.clientAuthentication" />
|
|
40
|
+
<zeebe:input source="=true" target="data.options.clientCache" />
|
|
41
|
+
<zeebe:input source="standalone" target="data.connectorMode.type" />
|
|
42
|
+
<zeebe:input source="tools/call" target="data.connectorMode.operation.type" />
|
|
43
|
+
<zeebe:input source="getClusterStatus"
|
|
44
|
+
target="data.connectorMode.operation.toolName" />
|
|
45
|
+
<zeebe:input source="={}" target="data.connectorMode.operation.toolArguments" />
|
|
46
|
+
</zeebe:ioMapping>
|
|
47
|
+
<zeebe:taskHeaders>
|
|
48
|
+
<zeebe:header key="elementTemplateVersion" value="2" />
|
|
49
|
+
<zeebe:header key="elementTemplateId"
|
|
50
|
+
value="io.camunda.connectors.agenticai.mcp.remoteclient.v0" />
|
|
51
|
+
<zeebe:header key="resultVariable" value="mcpResultClusterStatus" />
|
|
52
|
+
<zeebe:header key="retryBackoff" value="PT0S" />
|
|
53
|
+
</zeebe:taskHeaders>
|
|
54
|
+
</bpmn:extensionElements>
|
|
55
|
+
<bpmn:incoming>Flow_0l0tehi</bpmn:incoming>
|
|
56
|
+
<bpmn:outgoing>Flow_101za4d</bpmn:outgoing>
|
|
57
|
+
</bpmn:serviceTask>
|
|
58
|
+
<bpmn:sequenceFlow id="Flow_1nrepge" sourceRef="StartEvent_1" targetRef="Gateway_1axprup" />
|
|
59
|
+
<bpmn:sequenceFlow id="Flow_101za4d" sourceRef="getClusterStatus"
|
|
60
|
+
targetRef="Gateway_1t2m7hj" />
|
|
61
|
+
<bpmn:parallelGateway id="Gateway_1t2m7hj">
|
|
62
|
+
<bpmn:incoming>Flow_101za4d</bpmn:incoming>
|
|
63
|
+
<bpmn:incoming>Flow_1x7w6kt</bpmn:incoming>
|
|
64
|
+
<bpmn:outgoing>Flow_0jqbea8</bpmn:outgoing>
|
|
65
|
+
</bpmn:parallelGateway>
|
|
66
|
+
<bpmn:parallelGateway id="Gateway_1axprup">
|
|
67
|
+
<bpmn:incoming>Flow_1nrepge</bpmn:incoming>
|
|
68
|
+
<bpmn:outgoing>Flow_0l0tehi</bpmn:outgoing>
|
|
69
|
+
<bpmn:outgoing>Flow_066dp5w</bpmn:outgoing>
|
|
70
|
+
</bpmn:parallelGateway>
|
|
71
|
+
<bpmn:sequenceFlow id="Flow_0l0tehi" sourceRef="Gateway_1axprup"
|
|
72
|
+
targetRef="getClusterStatus" />
|
|
73
|
+
<bpmn:serviceTask id="getTopology" name="getTopology"
|
|
74
|
+
zeebe:modelerTemplate="io.camunda.connectors.agenticai.mcp.remoteclient.v0"
|
|
75
|
+
zeebe:modelerTemplateVersion="2"
|
|
76
|
+
zeebe:modelerTemplateIcon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjAwIDIwMCI+CiAgICA8cGF0aCBkPSJNMjUgOTcuODUyOEw5Mi44ODIzIDI5Ljk3MDZDMTAyLjI1NSAyMC41OTggMTE3LjQ1MSAyMC41OTggMTI2LjgyMyAyOS45NzA2VjI5Ljk3MDZDMTM2LjE5NiAzOS4zNDMxIDEzNi4xOTYgNTQuNTM5MSAxMjYuODIzIDYzLjkxMTdMNzUuNTU4MSAxMTUuMTc3IiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik03Ni4yNjUzIDExNC40N0wxMjYuODIzIDYzLjkxMTdDMTM2LjE5NiA1NC41MzkxIDE1MS4zOTIgNTQuNTM5MSAxNjAuNzY1IDYzLjkxMTdMMTYxLjExOCA2NC4yNjUyQzE3MC40OTEgNzMuNjM3OCAxNzAuNDkxIDg4LjgzMzggMTYxLjExOCA5OC4yMDYzTDk5LjcyNDggMTU5LjZDOTYuNjAwNiAxNjIuNzI0IDk2LjYwMDYgMTY3Ljc4OSA5OS43MjQ4IDE3MC45MTNMMTEyLjMzMSAxODMuNTIiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMTIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgogICAgPHBhdGggZD0iTTEwOS44NTMgNDYuOTQxMUw1OS42NDgyIDk3LjE0NTdDNTAuMjc1NyAxMDYuNTE4IDUwLjI3NTcgMTIxLjcxNCA1OS42NDgyIDEzMS4wODdWMTMxLjA4N0M2OS4wMjA4IDE0MC40NTkgODQuMjE2OCAxNDAuNDU5IDkzLjU4OTQgMTMxLjA4N0wxNDMuNzk0IDgwLjg4MjIiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMTIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K">
|
|
77
|
+
<bpmn:extensionElements>
|
|
78
|
+
<zeebe:taskDefinition type="io.camunda.agenticai:mcpremoteclient:1" retries="3" />
|
|
79
|
+
<zeebe:ioMapping>
|
|
80
|
+
<zeebe:input source="http" target="data.transport.type" />
|
|
81
|
+
<zeebe:input source="=mcpBaseUrl + "/mcp/cluster""
|
|
82
|
+
target="data.transport.http.url" />
|
|
83
|
+
<zeebe:input source="oauth-client-credentials-flow"
|
|
84
|
+
target="data.transport.http.authentication.type" />
|
|
85
|
+
<zeebe:input source="=mcpOauthUrl"
|
|
86
|
+
target="data.transport.http.authentication.oauthTokenEndpoint" />
|
|
87
|
+
<zeebe:input source="=mcpClientId"
|
|
88
|
+
target="data.transport.http.authentication.clientId" />
|
|
89
|
+
<zeebe:input source="=mcpClientSecret"
|
|
90
|
+
target="data.transport.http.authentication.clientSecret" />
|
|
91
|
+
<zeebe:input source="=mcpTokenAudience"
|
|
92
|
+
target="data.transport.http.authentication.audience" />
|
|
93
|
+
<zeebe:input source="CREDENTIALS_BODY"
|
|
94
|
+
target="data.transport.http.authentication.clientAuthentication" />
|
|
95
|
+
<zeebe:input source="=true" target="data.options.clientCache" />
|
|
96
|
+
<zeebe:input source="standalone" target="data.connectorMode.type" />
|
|
97
|
+
<zeebe:input source="tools/call" target="data.connectorMode.operation.type" />
|
|
98
|
+
<zeebe:input source="getTopology" target="data.connectorMode.operation.toolName" />
|
|
99
|
+
<zeebe:input source="={}" target="data.connectorMode.operation.toolArguments" />
|
|
100
|
+
</zeebe:ioMapping>
|
|
101
|
+
<zeebe:taskHeaders>
|
|
102
|
+
<zeebe:header key="elementTemplateVersion" value="2" />
|
|
103
|
+
<zeebe:header key="elementTemplateId"
|
|
104
|
+
value="io.camunda.connectors.agenticai.mcp.remoteclient.v0" />
|
|
105
|
+
<zeebe:header key="resultVariable" value="mcpResultTopology" />
|
|
106
|
+
<zeebe:header key="retryBackoff" value="PT0S" />
|
|
107
|
+
</zeebe:taskHeaders>
|
|
108
|
+
</bpmn:extensionElements>
|
|
109
|
+
<bpmn:incoming>Flow_066dp5w</bpmn:incoming>
|
|
110
|
+
<bpmn:outgoing>Flow_1x7w6kt</bpmn:outgoing>
|
|
111
|
+
</bpmn:serviceTask>
|
|
112
|
+
<bpmn:sequenceFlow id="Flow_066dp5w" sourceRef="Gateway_1axprup" targetRef="getTopology" />
|
|
113
|
+
<bpmn:sequenceFlow id="Flow_1x7w6kt" sourceRef="getTopology" targetRef="Gateway_1t2m7hj" />
|
|
114
|
+
<bpmn:sequenceFlow id="Flow_0jqbea8" sourceRef="Gateway_1t2m7hj" targetRef="EndEvent_1" />
|
|
115
|
+
</bpmn:process>
|
|
116
|
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
117
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_mcp_cluster_tools">
|
|
118
|
+
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
|
119
|
+
<dc:Bounds x="112" y="162" width="36" height="36" />
|
|
120
|
+
</bpmndi:BPMNShape>
|
|
121
|
+
<bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1">
|
|
122
|
+
<dc:Bounds x="512" y="162" width="36" height="36" />
|
|
123
|
+
</bpmndi:BPMNShape>
|
|
124
|
+
<bpmndi:BPMNShape id="CallClusterStatus_di" bpmnElement="getClusterStatus">
|
|
125
|
+
<dc:Bounds x="270" y="80" width="100" height="80" />
|
|
126
|
+
<bpmndi:BPMNLabel />
|
|
127
|
+
</bpmndi:BPMNShape>
|
|
128
|
+
<bpmndi:BPMNShape id="Gateway_0zao8hh_di" bpmnElement="Gateway_1t2m7hj">
|
|
129
|
+
<dc:Bounds x="405" y="155" width="50" height="50" />
|
|
130
|
+
</bpmndi:BPMNShape>
|
|
131
|
+
<bpmndi:BPMNShape id="Gateway_0hi8l2e_di" bpmnElement="Gateway_1axprup">
|
|
132
|
+
<dc:Bounds x="185" y="155" width="50" height="50" />
|
|
133
|
+
</bpmndi:BPMNShape>
|
|
134
|
+
<bpmndi:BPMNShape id="BPMNShape_0igquhd" bpmnElement="getTopology">
|
|
135
|
+
<dc:Bounds x="270" y="200" width="100" height="80" />
|
|
136
|
+
<bpmndi:BPMNLabel />
|
|
137
|
+
</bpmndi:BPMNShape>
|
|
138
|
+
<bpmndi:BPMNEdge id="Flow_1nrepge_di" bpmnElement="Flow_1nrepge">
|
|
139
|
+
<di:waypoint x="148" y="180" />
|
|
140
|
+
<di:waypoint x="185" y="180" />
|
|
141
|
+
</bpmndi:BPMNEdge>
|
|
142
|
+
<bpmndi:BPMNEdge id="Flow_101za4d_di" bpmnElement="Flow_101za4d">
|
|
143
|
+
<di:waypoint x="370" y="120" />
|
|
144
|
+
<di:waypoint x="430" y="120" />
|
|
145
|
+
<di:waypoint x="430" y="155" />
|
|
146
|
+
</bpmndi:BPMNEdge>
|
|
147
|
+
<bpmndi:BPMNEdge id="Flow_0l0tehi_di" bpmnElement="Flow_0l0tehi">
|
|
148
|
+
<di:waypoint x="210" y="155" />
|
|
149
|
+
<di:waypoint x="210" y="120" />
|
|
150
|
+
<di:waypoint x="270" y="120" />
|
|
151
|
+
</bpmndi:BPMNEdge>
|
|
152
|
+
<bpmndi:BPMNEdge id="Flow_066dp5w_di" bpmnElement="Flow_066dp5w">
|
|
153
|
+
<di:waypoint x="210" y="205" />
|
|
154
|
+
<di:waypoint x="210" y="240" />
|
|
155
|
+
<di:waypoint x="270" y="240" />
|
|
156
|
+
</bpmndi:BPMNEdge>
|
|
157
|
+
<bpmndi:BPMNEdge id="Flow_1x7w6kt_di" bpmnElement="Flow_1x7w6kt">
|
|
158
|
+
<di:waypoint x="370" y="240" />
|
|
159
|
+
<di:waypoint x="430" y="240" />
|
|
160
|
+
<di:waypoint x="430" y="205" />
|
|
161
|
+
</bpmndi:BPMNEdge>
|
|
162
|
+
<bpmndi:BPMNEdge id="Flow_0jqbea8_di" bpmnElement="Flow_0jqbea8">
|
|
163
|
+
<di:waypoint x="455" y="180" />
|
|
164
|
+
<di:waypoint x="512" y="180" />
|
|
165
|
+
</bpmndi:BPMNEdge>
|
|
166
|
+
</bpmndi:BPMNPlane>
|
|
167
|
+
</bpmndi:BPMNDiagram>
|
|
168
|
+
</bpmn:definitions>
|