@alternative-path/x-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +364 -0
- package/dist/agents/test-planner-context.d.ts +7 -0
- package/dist/agents/test-planner-context.d.ts.map +1 -0
- package/dist/agents/test-planner-context.js +283 -0
- package/dist/agents/test-planner-context.js.map +1 -0
- package/dist/agents/test-planner-prompt.d.ts +34 -0
- package/dist/agents/test-planner-prompt.d.ts.map +1 -0
- package/dist/agents/test-planner-prompt.js +82 -0
- package/dist/agents/test-planner-prompt.js.map +1 -0
- package/dist/api-client.d.ts +52 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +240 -0
- package/dist/api-client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +159 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/auth-tools.d.ts +17 -0
- package/dist/tools/auth-tools.d.ts.map +1 -0
- package/dist/tools/auth-tools.js +154 -0
- package/dist/tools/auth-tools.js.map +1 -0
- package/dist/tools/automation-tools.d.ts +25 -0
- package/dist/tools/automation-tools.d.ts.map +1 -0
- package/dist/tools/automation-tools.js +399 -0
- package/dist/tools/automation-tools.js.map +1 -0
- package/dist/tools/export-import-tools.d.ts +16 -0
- package/dist/tools/export-import-tools.d.ts.map +1 -0
- package/dist/tools/export-import-tools.js +62 -0
- package/dist/tools/export-import-tools.js.map +1 -0
- package/dist/tools/module-tools.d.ts +42 -0
- package/dist/tools/module-tools.d.ts.map +1 -0
- package/dist/tools/module-tools.js +302 -0
- package/dist/tools/module-tools.js.map +1 -0
- package/dist/tools/project-tools.d.ts +44 -0
- package/dist/tools/project-tools.d.ts.map +1 -0
- package/dist/tools/project-tools.js +67 -0
- package/dist/tools/project-tools.js.map +1 -0
- package/dist/tools/testcase-tools.d.ts +129 -0
- package/dist/tools/testcase-tools.d.ts.map +1 -0
- package/dist/tools/testcase-tools.js +762 -0
- package/dist/tools/testcase-tools.js.map +1 -0
- package/dist/tools/testgroup-launch-tools.d.ts +28 -0
- package/dist/tools/testgroup-launch-tools.d.ts.map +1 -0
- package/dist/tools/testgroup-launch-tools.js +332 -0
- package/dist/tools/testgroup-launch-tools.js.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
export class ModuleTools {
|
|
2
|
+
apiClient;
|
|
3
|
+
constructor(apiClient) {
|
|
4
|
+
this.apiClient = apiClient;
|
|
5
|
+
}
|
|
6
|
+
getTools() {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
name: "list_modules",
|
|
10
|
+
description: "List all modules, components, and subcomponents in the project. Returns a hierarchical tree structure.",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
projectId: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "Optional project ID. If not provided, uses the configured project ID.",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "create_module",
|
|
23
|
+
description: "Create a new module (level 1), component (level 2), or subcomponent (level 3). The level is determined by the parent_id.",
|
|
24
|
+
inputSchema: {
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
name: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "Name of the module/component/subcomponent",
|
|
30
|
+
},
|
|
31
|
+
parentId: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Optional parent module ID. If provided, creates a child (component or subcomponent). If not provided, creates a top-level module.",
|
|
34
|
+
},
|
|
35
|
+
context: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Optional context/description for the module",
|
|
38
|
+
},
|
|
39
|
+
projectId: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "Optional project ID. If not provided, uses the configured project ID.",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ["name"],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "update_module",
|
|
49
|
+
description: "Update an existing module, component, or subcomponent. You can change its name and/or context.",
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
moduleId: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "ID of the module to update",
|
|
56
|
+
},
|
|
57
|
+
name: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "New name for the module",
|
|
60
|
+
},
|
|
61
|
+
context: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "New context/description for the module",
|
|
64
|
+
},
|
|
65
|
+
projectId: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Optional project ID. If not provided, uses the configured project ID.",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ["moduleId"],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "delete_module",
|
|
75
|
+
description: "Delete a module, component, or subcomponent. This will also delete all child modules and test cases within it.",
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
moduleId: {
|
|
80
|
+
type: "string",
|
|
81
|
+
description: "ID of the module to delete",
|
|
82
|
+
},
|
|
83
|
+
projectId: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "Optional project ID. If not provided, uses the configured project ID.",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
required: ["moduleId"],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "get_module",
|
|
93
|
+
description: "Get detailed information about a specific module, including its children and path in the hierarchy.",
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {
|
|
97
|
+
moduleId: {
|
|
98
|
+
type: "string",
|
|
99
|
+
description: "ID of the module to retrieve",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
required: ["moduleId"],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
handles(name) {
|
|
108
|
+
return [
|
|
109
|
+
"list_modules",
|
|
110
|
+
"create_module",
|
|
111
|
+
"update_module",
|
|
112
|
+
"delete_module",
|
|
113
|
+
"get_module",
|
|
114
|
+
].includes(name);
|
|
115
|
+
}
|
|
116
|
+
async handle(name, args) {
|
|
117
|
+
switch (name) {
|
|
118
|
+
case "list_modules":
|
|
119
|
+
return await this.listModules(args);
|
|
120
|
+
case "create_module":
|
|
121
|
+
return await this.createModule(args);
|
|
122
|
+
case "update_module":
|
|
123
|
+
return await this.updateModule(args);
|
|
124
|
+
case "delete_module":
|
|
125
|
+
return await this.deleteModule(args);
|
|
126
|
+
case "get_module":
|
|
127
|
+
return await this.getModule(args);
|
|
128
|
+
default:
|
|
129
|
+
throw new Error(`Unknown module tool: ${name}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async listModules(args) {
|
|
133
|
+
const projectId = args.projectId || this.apiClient["projectId"];
|
|
134
|
+
if (!projectId) {
|
|
135
|
+
throw new Error("Project ID is required. Provide it as an argument or set X_MCP_PROJECT_ID.");
|
|
136
|
+
}
|
|
137
|
+
const response = await this.apiClient.get(`${projectId}/modules/get`);
|
|
138
|
+
return {
|
|
139
|
+
content: [
|
|
140
|
+
{
|
|
141
|
+
type: "text",
|
|
142
|
+
text: JSON.stringify({
|
|
143
|
+
success: response.success,
|
|
144
|
+
message: response.message,
|
|
145
|
+
data: response.data,
|
|
146
|
+
}, null, 2),
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
async createModule(args) {
|
|
152
|
+
const { name, parentId, context, projectId: argProjectId } = args;
|
|
153
|
+
const projectId = argProjectId || this.apiClient["projectId"];
|
|
154
|
+
if (!name) {
|
|
155
|
+
throw new Error("Module name is required");
|
|
156
|
+
}
|
|
157
|
+
if (!projectId) {
|
|
158
|
+
throw new Error("Project ID is required. Provide it as an argument or set X_MCP_PROJECT_ID.");
|
|
159
|
+
}
|
|
160
|
+
// Determine level based on parent
|
|
161
|
+
let level = 1;
|
|
162
|
+
if (parentId) {
|
|
163
|
+
// Fetch parent to determine level
|
|
164
|
+
try {
|
|
165
|
+
const response = await this.apiClient.get(`${projectId}/modules/get`);
|
|
166
|
+
// Find parent module in the response data
|
|
167
|
+
const findModule = (modules, id) => {
|
|
168
|
+
for (const module of modules) {
|
|
169
|
+
if (module.id === id)
|
|
170
|
+
return module;
|
|
171
|
+
if (module.children && module.children.length > 0) {
|
|
172
|
+
const found = findModule(module.children, id);
|
|
173
|
+
if (found)
|
|
174
|
+
return found;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return null;
|
|
178
|
+
};
|
|
179
|
+
const parent = findModule(response.data, parentId);
|
|
180
|
+
if (parent) {
|
|
181
|
+
level = (parent.level || 1) + 1;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
level = 2; // If parent not found, assume level 2
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
// If parent fetch fails, assume level 2
|
|
189
|
+
level = 2;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const response = await this.apiClient.post(`${projectId}/modules/create`, {
|
|
193
|
+
name,
|
|
194
|
+
parentId: parentId || null,
|
|
195
|
+
level,
|
|
196
|
+
context: context || null,
|
|
197
|
+
});
|
|
198
|
+
return {
|
|
199
|
+
content: [
|
|
200
|
+
{
|
|
201
|
+
type: "text",
|
|
202
|
+
text: JSON.stringify({
|
|
203
|
+
success: response.success,
|
|
204
|
+
message: response.message,
|
|
205
|
+
data: response.data,
|
|
206
|
+
}, null, 2),
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
async updateModule(args) {
|
|
212
|
+
const { moduleId, name, context, projectId: argProjectId } = args;
|
|
213
|
+
const projectId = argProjectId || this.apiClient["projectId"];
|
|
214
|
+
if (!moduleId) {
|
|
215
|
+
throw new Error("Module ID is required");
|
|
216
|
+
}
|
|
217
|
+
if (!projectId) {
|
|
218
|
+
throw new Error("Project ID is required. Provide it as an argument or set X_MCP_PROJECT_ID.");
|
|
219
|
+
}
|
|
220
|
+
const updateData = {};
|
|
221
|
+
if (name !== undefined)
|
|
222
|
+
updateData.name = name;
|
|
223
|
+
if (context !== undefined)
|
|
224
|
+
updateData.context = context;
|
|
225
|
+
if (Object.keys(updateData).length === 0) {
|
|
226
|
+
throw new Error("At least one field (name or context) must be provided to update");
|
|
227
|
+
}
|
|
228
|
+
const response = await this.apiClient.put(`${projectId}/modules/${moduleId}`, updateData);
|
|
229
|
+
return {
|
|
230
|
+
content: [
|
|
231
|
+
{
|
|
232
|
+
type: "text",
|
|
233
|
+
text: JSON.stringify({
|
|
234
|
+
success: response.success,
|
|
235
|
+
message: response.message,
|
|
236
|
+
data: response.data,
|
|
237
|
+
}, null, 2),
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
async deleteModule(args) {
|
|
243
|
+
const { moduleId, projectId: argProjectId } = args;
|
|
244
|
+
const projectId = argProjectId || this.apiClient["projectId"];
|
|
245
|
+
if (!moduleId) {
|
|
246
|
+
throw new Error("Module ID is required");
|
|
247
|
+
}
|
|
248
|
+
if (!projectId) {
|
|
249
|
+
throw new Error("Project ID is required. Provide it as an argument or set X_MCP_PROJECT_ID.");
|
|
250
|
+
}
|
|
251
|
+
const response = await this.apiClient.delete(`${projectId}/modules/${moduleId}`);
|
|
252
|
+
return {
|
|
253
|
+
content: [
|
|
254
|
+
{
|
|
255
|
+
type: "text",
|
|
256
|
+
text: JSON.stringify({
|
|
257
|
+
success: response.success,
|
|
258
|
+
message: response.message,
|
|
259
|
+
}, null, 2),
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
async getModule(args) {
|
|
265
|
+
const { moduleId, projectId: argProjectId } = args;
|
|
266
|
+
const projectId = argProjectId || this.apiClient["projectId"];
|
|
267
|
+
if (!moduleId) {
|
|
268
|
+
throw new Error("Module ID is required");
|
|
269
|
+
}
|
|
270
|
+
if (!projectId) {
|
|
271
|
+
throw new Error("Project ID is required. Provide it as an argument or set X_MCP_PROJECT_ID.");
|
|
272
|
+
}
|
|
273
|
+
// Since there's no direct get-by-id endpoint, we'll list all and find the one
|
|
274
|
+
const response = await this.apiClient.get(`${projectId}/modules/get`);
|
|
275
|
+
const modules = response.data;
|
|
276
|
+
const findModule = (modules, id) => {
|
|
277
|
+
for (const module of modules) {
|
|
278
|
+
if (module.id === id)
|
|
279
|
+
return module;
|
|
280
|
+
if (module.children) {
|
|
281
|
+
const found = findModule(module.children, id);
|
|
282
|
+
if (found)
|
|
283
|
+
return found;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return null;
|
|
287
|
+
};
|
|
288
|
+
const module = findModule(modules, moduleId);
|
|
289
|
+
if (!module) {
|
|
290
|
+
throw new Error(`Module with ID ${moduleId} not found`);
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
content: [
|
|
294
|
+
{
|
|
295
|
+
type: "text",
|
|
296
|
+
text: JSON.stringify(module, null, 2),
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
//# sourceMappingURL=module-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-tools.js","sourceRoot":"","sources":["../../src/tools/module-tools.ts"],"names":[],"mappings":"AA4BA,MAAM,OAAO,WAAW;IACF;IAApB,YAAoB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAE5C,QAAQ;QACN,OAAO;YACL;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,wGAAwG;gBAC1G,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oB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AAQ,CAAC,IAAI,CAAC;QAC9B,MAAM,UAAU,GAAG,CAAC,OAAiB,EAAE,EAAU,EAAiB,EAAE;YAClE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,IAAI,MAAM,CAAC,EAAE,KAAK,EAAE;oBAAE,OAAO,MAAM,CAAC;gBACpC,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;oBACpB,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;oBAC9C,IAAI,KAAK;wBAAE,OAAO,KAAK,CAAC;gBAC1B,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QAEF,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,kBAAkB,QAAQ,YAAY,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtC;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import { ApiClient } from "../api-client.js";
|
|
3
|
+
export interface Project {
|
|
4
|
+
id: string;
|
|
5
|
+
org_id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
updated_at: string;
|
|
10
|
+
context: string;
|
|
11
|
+
created_by: string | null;
|
|
12
|
+
updated_by: string | null;
|
|
13
|
+
prefix: string;
|
|
14
|
+
deletedAt: string | null;
|
|
15
|
+
createdByUser: {
|
|
16
|
+
id: string;
|
|
17
|
+
username: string;
|
|
18
|
+
} | null;
|
|
19
|
+
updatedByUser: {
|
|
20
|
+
id: string;
|
|
21
|
+
username: string;
|
|
22
|
+
} | null;
|
|
23
|
+
testCaseCount: number;
|
|
24
|
+
moduleCount: number;
|
|
25
|
+
}
|
|
26
|
+
export interface ProjectsResponse {
|
|
27
|
+
success: boolean;
|
|
28
|
+
message: string;
|
|
29
|
+
data: Project[];
|
|
30
|
+
}
|
|
31
|
+
export declare class ProjectTools {
|
|
32
|
+
private apiClient;
|
|
33
|
+
constructor(apiClient: ApiClient);
|
|
34
|
+
getTools(): Tool[];
|
|
35
|
+
handles(name: string): boolean;
|
|
36
|
+
handle(name: string, args: any): Promise<{
|
|
37
|
+
content: {
|
|
38
|
+
type: string;
|
|
39
|
+
text: string;
|
|
40
|
+
}[];
|
|
41
|
+
}>;
|
|
42
|
+
private listProjects;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=project-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-tools.d.ts","sourceRoot":"","sources":["../../src/tools/project-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,IAAI,CAAC;IACT,aAAa,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,IAAI,CAAC;IACT,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB;AAED,qBAAa,YAAY;IACX,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAExC,QAAQ,IAAI,IAAI,EAAE;IA0BlB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIxB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;;;;;;YAStB,YAAY;CAmC3B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export class ProjectTools {
|
|
2
|
+
apiClient;
|
|
3
|
+
constructor(apiClient) {
|
|
4
|
+
this.apiClient = apiClient;
|
|
5
|
+
}
|
|
6
|
+
getTools() {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
name: "list_projects",
|
|
10
|
+
description: "List all projects accessible to the authenticated user. Returns projects with their details including test case counts and module counts.",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
sortField: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "Optional field to sort by (e.g., 'name', 'created_at').",
|
|
17
|
+
},
|
|
18
|
+
sortOrder: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Optional sort order: 'ASC' or 'DESC'. Defaults to 'ASC'.",
|
|
21
|
+
enum: ["ASC", "DESC"],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
handles(name) {
|
|
29
|
+
return ["list_projects"].includes(name);
|
|
30
|
+
}
|
|
31
|
+
async handle(name, args) {
|
|
32
|
+
switch (name) {
|
|
33
|
+
case "list_projects":
|
|
34
|
+
return await this.listProjects(args);
|
|
35
|
+
default:
|
|
36
|
+
throw new Error(`Unknown project tool: ${name}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async listProjects(args) {
|
|
40
|
+
const { sortField, sortOrder } = args;
|
|
41
|
+
const params = {};
|
|
42
|
+
if (sortField)
|
|
43
|
+
params.sortField = sortField;
|
|
44
|
+
if (sortOrder)
|
|
45
|
+
params.sortOrder = sortOrder;
|
|
46
|
+
// Note: getProjects endpoint doesn't require x-project-id header
|
|
47
|
+
// It returns all projects for the authenticated user based on session
|
|
48
|
+
// XSRF-TOKEN cookie is automatically sent via cookie jar (set during login)
|
|
49
|
+
// We must explicitly remove x-project-id header to avoid permission checks
|
|
50
|
+
const response = await this.apiClient.get(`/project/getProjects`, {
|
|
51
|
+
params,
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
text: JSON.stringify({
|
|
58
|
+
success: response.success,
|
|
59
|
+
message: response.message,
|
|
60
|
+
data: response.data,
|
|
61
|
+
}, null, 2),
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=project-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-tools.js","sourceRoot":"","sources":["../../src/tools/project-tools.ts"],"names":[],"mappings":"AAiCA,MAAM,OAAO,YAAY;IACH;IAApB,YAAoB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAE5C,QAAQ;QACN,OAAO;YACL;gBACE,IAAI,EAAE,eAAe;gBACrB,WAAW,EACT,2IAA2I;gBAC7I,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;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AE,QAAQ,CAAC,IAAI;qBACpB,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import { ApiClient } from "../api-client.js";
|
|
3
|
+
export interface TestCase {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
module_id: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
status?: string;
|
|
10
|
+
priority?: string;
|
|
11
|
+
estimated_duration?: number;
|
|
12
|
+
testdata?: any;
|
|
13
|
+
labels?: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
}>;
|
|
17
|
+
attachments?: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
filename: string;
|
|
20
|
+
url: string;
|
|
21
|
+
}>;
|
|
22
|
+
created_at?: string;
|
|
23
|
+
updated_at?: string;
|
|
24
|
+
key?: string;
|
|
25
|
+
key_counter?: number;
|
|
26
|
+
automation_status?: string;
|
|
27
|
+
execution_mode?: string;
|
|
28
|
+
generated_by?: string;
|
|
29
|
+
updated_by?: string;
|
|
30
|
+
module?: {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
modulePath?: string;
|
|
34
|
+
};
|
|
35
|
+
lastExecutionResultStatus?: {
|
|
36
|
+
id?: string | null;
|
|
37
|
+
status?: string | null;
|
|
38
|
+
} | null;
|
|
39
|
+
}
|
|
40
|
+
export interface TestCaseListResponse {
|
|
41
|
+
success: boolean;
|
|
42
|
+
message: string;
|
|
43
|
+
data: {
|
|
44
|
+
rows: TestCase[];
|
|
45
|
+
pagination: {
|
|
46
|
+
totalItems: number;
|
|
47
|
+
totalPages: number;
|
|
48
|
+
currentPage: number;
|
|
49
|
+
pageSize: number;
|
|
50
|
+
hasMore: boolean;
|
|
51
|
+
count: number;
|
|
52
|
+
total: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface TestCaseResponse {
|
|
57
|
+
success: boolean;
|
|
58
|
+
message: string;
|
|
59
|
+
data: TestCase;
|
|
60
|
+
}
|
|
61
|
+
export interface DeleteTestCaseResponse {
|
|
62
|
+
success: boolean;
|
|
63
|
+
message: string;
|
|
64
|
+
data: {
|
|
65
|
+
deletedCount: number;
|
|
66
|
+
testCaseIds: string[];
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface CloneTestCaseResponse {
|
|
70
|
+
success: boolean;
|
|
71
|
+
message: string;
|
|
72
|
+
data: {
|
|
73
|
+
clonedTestCaseIds: string[];
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface MoveTestCaseResponse {
|
|
77
|
+
success: boolean;
|
|
78
|
+
message: string;
|
|
79
|
+
data: {
|
|
80
|
+
movedCount: number;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export interface BulkCreateResponse {
|
|
84
|
+
success: boolean;
|
|
85
|
+
message: string;
|
|
86
|
+
data: {
|
|
87
|
+
createdTestCases: any[];
|
|
88
|
+
updatedTestCases: any[];
|
|
89
|
+
errors: Array<{
|
|
90
|
+
row: number;
|
|
91
|
+
errors: Array<{
|
|
92
|
+
column: string;
|
|
93
|
+
message: string;
|
|
94
|
+
}>;
|
|
95
|
+
}>;
|
|
96
|
+
totalTestCases: number;
|
|
97
|
+
correcttestcase: number;
|
|
98
|
+
invalidTestCases: number;
|
|
99
|
+
rowsInvolved?: Array<{
|
|
100
|
+
row: number;
|
|
101
|
+
testCase: any;
|
|
102
|
+
testCaseId?: string | null;
|
|
103
|
+
error: boolean;
|
|
104
|
+
}>;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export declare class TestCaseTools {
|
|
108
|
+
private apiClient;
|
|
109
|
+
constructor(apiClient: ApiClient);
|
|
110
|
+
getTools(): Tool[];
|
|
111
|
+
handles(name: string): boolean;
|
|
112
|
+
handle(name: string, args: any): Promise<{
|
|
113
|
+
content: {
|
|
114
|
+
type: string;
|
|
115
|
+
text: string;
|
|
116
|
+
}[];
|
|
117
|
+
}>;
|
|
118
|
+
private listTestCases;
|
|
119
|
+
private getTestCase;
|
|
120
|
+
private getExecutionHistory;
|
|
121
|
+
private getExecutionPlan;
|
|
122
|
+
private createTestCase;
|
|
123
|
+
private updateTestCase;
|
|
124
|
+
private deleteTestCase;
|
|
125
|
+
private cloneTestCase;
|
|
126
|
+
private moveTestCase;
|
|
127
|
+
private bulkCreateTestCases;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=testcase-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testcase-tools.d.ts","sourceRoot":"","sources":["../../src/tools/testcase-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,UAAU,CAA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