simplify3x-connect 0.31.2 → 0.31.3
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/adapters/simplifyqa/adapter.d.ts +149 -46
- package/dist/adapters/simplifyqa/adapter.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/adapter.js +766 -206
- package/dist/adapters/simplifyqa/adapter.js.map +1 -1
- package/dist/adapters/simplifyqa/mapper.d.ts.map +1 -1
- package/dist/adapters/simplifyqa/mapper.js +2 -0
- package/dist/adapters/simplifyqa/mapper.js.map +1 -1
- package/dist/adapters/simplifyqa/stackSetup.d.ts +60 -0
- package/dist/adapters/simplifyqa/stackSetup.d.ts.map +1 -0
- package/dist/adapters/simplifyqa/stackSetup.js +135 -0
- package/dist/adapters/simplifyqa/stackSetup.js.map +1 -0
- package/dist/adapters/types.d.ts +8 -4
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/domain/types.d.ts +11 -0
- package/dist/domain/types.d.ts.map +1 -1
- package/dist/domain/types.js.map +1 -1
- package/dist/initAgents.d.ts.map +1 -1
- package/dist/initAgents.js +5 -4
- package/dist/initAgents.js.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/attachment.tools.d.ts +14 -0
- package/dist/tools/attachment.tools.d.ts.map +1 -1
- package/dist/tools/attachment.tools.js +46 -38
- package/dist/tools/attachment.tools.js.map +1 -1
- package/dist/tools/autoDefectLog.d.ts +5 -0
- package/dist/tools/autoDefectLog.d.ts.map +1 -1
- package/dist/tools/autoDefectLog.js +29 -0
- package/dist/tools/autoDefectLog.js.map +1 -1
- package/dist/tools/backlog.tools.d.ts.map +1 -1
- package/dist/tools/backlog.tools.js +7 -5
- package/dist/tools/backlog.tools.js.map +1 -1
- package/dist/tools/defectUpdate.tools.d.ts +3 -2
- package/dist/tools/defectUpdate.tools.d.ts.map +1 -1
- package/dist/tools/defectUpdate.tools.js +106 -20
- package/dist/tools/defectUpdate.tools.js.map +1 -1
- package/dist/tools/discovery.tools.d.ts.map +1 -1
- package/dist/tools/discovery.tools.js +51 -20
- package/dist/tools/discovery.tools.js.map +1 -1
- package/dist/tools/executionPlan.tools.d.ts.map +1 -1
- package/dist/tools/executionPlan.tools.js +38 -20
- package/dist/tools/executionPlan.tools.js.map +1 -1
- package/dist/tools/releaseSprint.tools.d.ts +1 -1
- package/dist/tools/releaseSprint.tools.d.ts.map +1 -1
- package/dist/tools/releaseSprint.tools.js +67 -1
- package/dist/tools/releaseSprint.tools.js.map +1 -1
- package/dist/tools/run.tools.d.ts.map +1 -1
- package/dist/tools/run.tools.js +29 -13
- package/dist/tools/run.tools.js.map +1 -1
- package/dist/tools/stackSetupTool.d.ts +21 -0
- package/dist/tools/stackSetupTool.d.ts.map +1 -0
- package/dist/tools/stackSetupTool.js +28 -0
- package/dist/tools/stackSetupTool.js.map +1 -0
- package/dist/tools/suiteManage.tools.d.ts.map +1 -1
- package/dist/tools/suiteManage.tools.js +14 -13
- package/dist/tools/suiteManage.tools.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `defect_update` — change a SimplifyQA defect
|
|
2
|
+
* `defect_update` / `defect_create` — change or log a SimplifyQA defect with the fields of the defect form.
|
|
3
3
|
*
|
|
4
4
|
* Defects could only be read (sqa_query "defects") and deleted (backlog_delete). backlog_link adds a Linkages row, which is a different
|
|
5
5
|
* relationship from the form fields: USER STORY is the defect's `userstoryId`, and TEST CASE (a test case with its version) is what makes
|
|
6
6
|
* the defect show in that test case's linked defects. This edits those fields the way the defect form does, reads the defect back, and
|
|
7
|
-
* checks the test case really lists the defect.
|
|
7
|
+
* checks the test case really lists the defect. Environment, Type, Feature, the planned dates, Linkages (saved from the defect's side) and
|
|
8
|
+
* Attachments complete the form; Environment / Type are checked against the project's own list (or the form's fixed one).
|
|
8
9
|
*/
|
|
9
10
|
import { z } from 'zod';
|
|
10
11
|
import { ok, err } from '../mcpResult.js';
|
|
12
|
+
import { readAttachmentSource } from './attachment.tools.js';
|
|
11
13
|
const describeError = (e) => (e instanceof Error ? e.message : String(e));
|
|
14
|
+
const linkagesSchema = z.array(z.object({
|
|
15
|
+
destType: z.enum(['epic', 'feature', 'userstory', 'defect', 'task']).describe('What the defect is linked TO.'),
|
|
16
|
+
destId: z.string().describe('Its id or business key (US-25, DE-9, FT-248, TA-4).'),
|
|
17
|
+
linkType: z.string().describe('The link type as the Linkages dropdown shows it ("Clones", "Relates to", …). An unknown one is refused with the available ones.'),
|
|
18
|
+
})).optional().describe('LINKAGES, saved from the DEFECT\'s side (the form\'s Linkages section). A link that already exists is left as it is.');
|
|
19
|
+
const attachmentsSchema = z.array(z.object({
|
|
20
|
+
filePath: z.string().optional().describe('Absolute path of the file (read on this machine).'),
|
|
21
|
+
base64: z.string().optional().describe('File content as base64 when there is no local path. Requires fileName.'),
|
|
22
|
+
fileName: z.string().optional().describe('Name to store it under (default: the file\'s own name).'),
|
|
23
|
+
contentType: z.string().optional().describe('MIME type; inferred from the extension when omitted.'),
|
|
24
|
+
})).optional().describe('ATTACHMENTS: files to attach to the defect (max 20 MB each). To remove or download one later: attachment_delete / attachment_download with entityType "defect".');
|
|
25
|
+
const formFields = {
|
|
26
|
+
environment: z.string().optional().describe('ENVIRONMENT: one of the project\'s own list, or the form\'s (Development, QA, UAT). An unknown value is refused with the valid ones.'),
|
|
27
|
+
executionType: z.string().optional().describe('TYPE (the form\'s Execution Type): Manual or Automation (or the project\'s own list).'),
|
|
28
|
+
type: z.string().optional().describe('Same as executionType — the form\'s TYPE field.'),
|
|
29
|
+
featureId: z.string().optional().describe('FEATURE: a feature of this project — id, business key (FT-248) or exact name.'),
|
|
30
|
+
plannedStartDate: z.string().optional().describe('PLANNED START DATE, YYYY-MM-DD.'),
|
|
31
|
+
plannedEndDate: z.string().optional().describe('PLANNED END DATE, YYYY-MM-DD, on or after the start.'),
|
|
32
|
+
linkages: linkagesSchema,
|
|
33
|
+
attachments: attachmentsSchema,
|
|
34
|
+
};
|
|
35
|
+
/** Attach each file to the defect, one save per file; the first failure stops with what was done so far. */
|
|
36
|
+
async function attachAll(adapter, defect, files) {
|
|
37
|
+
const done = [];
|
|
38
|
+
if (!adapter.addAttachment)
|
|
39
|
+
return { done, error: 'Attaching files is available only on a SimplifyQA connection.' };
|
|
40
|
+
for (const f of files) {
|
|
41
|
+
const src = await readAttachmentSource(f).catch((e) => ({ error: describeError(e) }));
|
|
42
|
+
if ('error' in src)
|
|
43
|
+
return { done, error: src.error };
|
|
44
|
+
try {
|
|
45
|
+
await adapter.addAttachment({ entityType: 'defect', itemId: defect, fileName: src.name, contentType: src.mime, data: src.data });
|
|
46
|
+
done.push(src.name);
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
return { done, error: `"${src.name}": ${describeError(e)}` };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return { done };
|
|
53
|
+
}
|
|
12
54
|
export function registerDefectUpdateTool(server, deps) {
|
|
13
55
|
server.registerTool('defect_update', {
|
|
14
|
-
title: 'Update a defect (
|
|
56
|
+
title: 'Update a defect (state, assignee, environment, type, feature, dates, linkages, attachments, …)',
|
|
15
57
|
description: 'Change an existing DEFECT the way the SimplifyQA defect form does, then READ IT BACK and report each change. Pass `defectId` (id, code like ' +
|
|
16
58
|
'DE-61, or exact name) and only what to change:\n' +
|
|
17
|
-
'- `storyId` — the form\'s USER STORY field (story id or key, e.g. US-25; "none" clears it). This is NOT a Linkages row
|
|
59
|
+
'- `storyId` — the form\'s USER STORY field (story id or key, e.g. US-25; "none" clears it). This is NOT a Linkages row.\n' +
|
|
18
60
|
'- `testCases` — the form\'s TEST CASE field: test cases to ADD, each "TC-41" or with its version "TC-41:v1.0" (no version = the test case\'s ' +
|
|
19
61
|
'current one, and the answer says which). The defect then shows in each test case\'s linked defects — checked after saving. `removeTestCases` ' +
|
|
20
62
|
'takes some out; `clearTestCases:true` empties the field.\n' +
|
|
21
63
|
'- `state`, `priority`, `severity` (the project\'s own values; an unknown one is refused with the valid ones listed), `assignee` (email, name, ' +
|
|
22
64
|
'user id or "me") or `unassign:true`, `releaseId` / `sprintId` (id, code or name; "none" clears), `name`, `description`.\n' +
|
|
65
|
+
'- `environment`, `executionType` (alias `type`), `featureId`, `plannedStartDate`, `plannedEndDate` — the rest of the form ("none" clears one). ' +
|
|
66
|
+
'Environment / Type are checked against the project\'s own list (or the form\'s: Development / QA / UAT, Manual / Automation).\n' +
|
|
67
|
+
'- `linkages` — LINKAGES saved from the defect\'s side: [{ destType, destId, linkType }].\n' +
|
|
68
|
+
'- `attachments` — files to attach to the defect ([{ filePath }]).\n' +
|
|
23
69
|
'Needs the add_defect privilege.',
|
|
24
70
|
inputSchema: {
|
|
25
71
|
defectId: z.string().describe('Defect id, code (DE-61) or exact name.'),
|
|
@@ -36,6 +82,7 @@ export function registerDefectUpdateTool(server, deps) {
|
|
|
36
82
|
sprintId: z.string().optional().describe('Sprint: id, code (SP-1) or exact name; it must belong to the defect\'s release. "none" clears it.'),
|
|
37
83
|
name: z.string().optional().describe('New name (at least 3 characters).'),
|
|
38
84
|
description: z.string().optional(),
|
|
85
|
+
...formFields,
|
|
39
86
|
},
|
|
40
87
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
41
88
|
}, async (args) => {
|
|
@@ -44,22 +91,42 @@ export function registerDefectUpdateTool(server, deps) {
|
|
|
44
91
|
return err('Not connected to a product. Use qa_connect({ url, token, projectId }) first — defect_update needs a live backend connection.');
|
|
45
92
|
if (!adapter.updateDefect)
|
|
46
93
|
return err('This product does not expose defect updates.');
|
|
47
|
-
const { defectId, ...rest } = args;
|
|
94
|
+
const { defectId, attachments, type, ...rest } = args;
|
|
48
95
|
const patch = {};
|
|
49
96
|
for (const [k, v] of Object.entries(rest))
|
|
50
97
|
if (v !== undefined)
|
|
51
98
|
patch[k] = v;
|
|
99
|
+
if (type !== undefined) {
|
|
100
|
+
if (patch.executionType !== undefined && patch.executionType !== type)
|
|
101
|
+
return err('defect_update: `type` and `executionType` are the same field — give one.');
|
|
102
|
+
patch.executionType = type;
|
|
103
|
+
}
|
|
52
104
|
if (patch.unassign && patch.assignee !== undefined)
|
|
53
105
|
return err('defect_update: give either assignee or unassign:true, not both.');
|
|
54
|
-
if (!Object.keys(patch).length) {
|
|
55
|
-
return err('defect_update needs something to change: storyId, testCases (or removeTestCases / clearTestCases), state, priority, severity, assignee (or unassign), releaseId, sprintId, name or
|
|
106
|
+
if (!Object.keys(patch).length && !attachments?.length) {
|
|
107
|
+
return err('defect_update needs something to change: storyId, testCases (or removeTestCases / clearTestCases), state, priority, severity, assignee (or unassign), releaseId, sprintId, name, description, environment, executionType (type), featureId, plannedStartDate, plannedEndDate, linkages or attachments.');
|
|
56
108
|
}
|
|
57
109
|
try {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
110
|
+
const lines = [];
|
|
111
|
+
let data = {};
|
|
112
|
+
let shown = defectId;
|
|
113
|
+
if (Object.keys(patch).length) {
|
|
114
|
+
const r = await adapter.updateDefect(defectId, patch);
|
|
115
|
+
shown = r.code;
|
|
116
|
+
lines.push(r.written
|
|
117
|
+
? `Updated defect ${r.code} "${r.name}" and read it back from SimplifyQA:\n` + r.changes.map((c) => `- ${c.field}: ${c.from} → ${c.to}`).join('\n')
|
|
118
|
+
: `Defect ${r.code} "${r.name}" already matches — nothing was changed.`, ...r.warnings.map((w) => `⚠️ ${w}`));
|
|
119
|
+
data = { ...r };
|
|
120
|
+
}
|
|
121
|
+
if (attachments?.length) {
|
|
122
|
+
const a = await attachAll(adapter, shown, attachments);
|
|
123
|
+
if (a.done.length)
|
|
124
|
+
lines.push(`Attached to ${shown}: ${a.done.join(', ')}.`);
|
|
125
|
+
if (a.error)
|
|
126
|
+
return err([...lines, `Could not attach ${a.error}`].join('\n'));
|
|
127
|
+
data = { ...data, attached: a.done };
|
|
128
|
+
}
|
|
129
|
+
return ok(lines.join('\n'), data);
|
|
63
130
|
}
|
|
64
131
|
catch (e) {
|
|
65
132
|
return err(describeError(e));
|
|
@@ -72,9 +139,12 @@ export function registerDefectUpdateTool(server, deps) {
|
|
|
72
139
|
'`category` (the project\'s own values; an unknown one is refused with the valid ones listed), `assignee` (email, name, user id or "me"), ' +
|
|
73
140
|
'`releaseId` / `sprintId` (id, code or name), `storyId` (the USER STORY field: id or key, e.g. US-25), `testCases` (the TEST CASE field: "TC-41" ' +
|
|
74
141
|
'or "TC-41:v1.0" — the test case then lists the defect, checked after saving), `module` (default: the project\'s Default module), ' +
|
|
75
|
-
'`estimatedEffort`, `customFields` ({ key: value } — needed when the project marks custom fields mandatory)
|
|
76
|
-
'
|
|
77
|
-
'
|
|
142
|
+
'`estimatedEffort`, `customFields` ({ key: value } — needed when the project marks custom fields mandatory), and the rest of the form: ' +
|
|
143
|
+
'`environment`, `executionType` (alias `type`: Manual / Automation), `featureId`, `plannedStartDate` / `plannedEndDate` (YYYY-MM-DD), ' +
|
|
144
|
+
'`linkages` ([{ destType, destId, linkType }], saved from the defect\'s side) and `attachments` ([{ filePath }]). Environment / Type are ' +
|
|
145
|
+
'checked against the project\'s own list (or the form\'s: Development / QA / UAT, Manual / Automation); a bad value refuses the call before ' +
|
|
146
|
+
'anything is created. A defect with the same name is refused. Reads the defect back. Needs the add_defect privilege. To log a defect FROM a ' +
|
|
147
|
+
'failed execution step (evidence pre-filled), use defect_create_from_step instead; to change one later, defect_update.',
|
|
78
148
|
inputSchema: {
|
|
79
149
|
name: z.string().describe('Defect name (3–500 characters).'),
|
|
80
150
|
description: z.string().optional(),
|
|
@@ -90,6 +160,7 @@ export function registerDefectUpdateTool(server, deps) {
|
|
|
90
160
|
module: z.string().optional().describe('Module name, code or id. Default: the project\'s Default module.'),
|
|
91
161
|
estimatedEffort: z.number().min(0).max(9999).optional(),
|
|
92
162
|
customFields: z.record(z.string(), z.unknown()).optional().describe('Custom field values { "<field key>": value }.'),
|
|
163
|
+
...formFields,
|
|
93
164
|
},
|
|
94
165
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
95
166
|
}, async (args) => {
|
|
@@ -99,18 +170,33 @@ export function registerDefectUpdateTool(server, deps) {
|
|
|
99
170
|
if (!adapter.createDefect)
|
|
100
171
|
return err('This product does not expose defect creation.');
|
|
101
172
|
try {
|
|
102
|
-
const
|
|
103
|
-
|
|
173
|
+
const { attachments, type, ...rest } = args;
|
|
174
|
+
const input = { name: rest.name };
|
|
175
|
+
for (const [k, v] of Object.entries(rest))
|
|
104
176
|
if (k !== 'name' && v !== undefined)
|
|
105
177
|
input[k] = v;
|
|
178
|
+
if (type !== undefined) {
|
|
179
|
+
if (input.executionType !== undefined && input.executionType !== type)
|
|
180
|
+
return err('defect_create: `type` and `executionType` are the same field — give one.');
|
|
181
|
+
input.executionType = type;
|
|
182
|
+
}
|
|
106
183
|
const r = await adapter.createDefect(input);
|
|
107
|
-
const
|
|
184
|
+
const lines = [
|
|
108
185
|
`Logged defect ${r.defectCode} "${r.name}" — state ${r.state || '-'}, priority ${r.priority || '-'}${r.severity ? `, severity ${r.severity}` : ''}` +
|
|
109
186
|
`${r.testCases.length ? `, test case ${r.testCases.join(', ')}` : ''}${r.storyId !== undefined ? `, user story #${r.storyId}` : ''}. Read back from SimplifyQA.`,
|
|
187
|
+
...(r.fields?.length ? [`Form fields saved: ${r.fields.join('; ')}.`] : []),
|
|
188
|
+
...(r.linked?.length ? [`Linked from the defect to: ${r.linked.join(', ')}.`] : []),
|
|
110
189
|
...(r.defaults.length ? [`Defaulted (not given): ${r.defaults.join('; ')}.`] : []),
|
|
111
190
|
...r.warnings.map((w) => `⚠️ ${w}`),
|
|
112
|
-
]
|
|
113
|
-
|
|
191
|
+
];
|
|
192
|
+
if (attachments?.length) {
|
|
193
|
+
const a = await attachAll(adapter, r.defectCode, attachments);
|
|
194
|
+
if (a.done.length)
|
|
195
|
+
lines.push(`Attached to ${r.defectCode}: ${a.done.join(', ')}.`);
|
|
196
|
+
if (a.error)
|
|
197
|
+
return err([...lines, `The defect was logged, but attaching failed — ${a.error}`].join('\n'));
|
|
198
|
+
}
|
|
199
|
+
return ok(lines.join('\n'), { ...r });
|
|
114
200
|
}
|
|
115
201
|
catch (e) {
|
|
116
202
|
return err(describeError(e));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defectUpdate.tools.js","sourceRoot":"","sources":["../../src/tools/defectUpdate.tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAM1C,MAAM,aAAa,GAAG,CAAC,CAAU,EAAU,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3F,MAAM,UAAU,wBAAwB,CAAC,MAAiB,EAAE,IAA0B;IACpF,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,KAAK,EAAE,6DAA6D;QACpE,WAAW,EACT,8IAA8I;YAC9I,kDAAkD;YAClD,0IAA0I;YAC1I,+IAA+I;YAC/I,+IAA+I;YAC/I,4DAA4D;YAC5D,gJAAgJ;YAChJ,2HAA2H;YAC3H,iCAAiC;QACnC,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;YACvE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;YACvG,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+DAA+D,CAAC;YACnH,eAAe,EAAE,CAAC,CAAC,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gB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"discovery.tools.d.ts","sourceRoot":"","sources":["../../src/tools/discovery.tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AASnD;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,kFAAkF;IAClF,UAAU,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;IACzC;;6EAEyE;IACzE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK;QAAE,EAAE,EAAE,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;IACxD,qHAAqH;IACrH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAmJF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAk0DxF"}
|
|
@@ -1585,36 +1585,55 @@ export function registerDiscoveryTools(server, deps) {
|
|
|
1585
1585
|
// Kept beside suite_list/suite_get so all suite tools live together; they mutate
|
|
1586
1586
|
// via the adapter's updateSuiteMembers (→ update_suite_members provider-op).
|
|
1587
1587
|
const testCasesTable = (suite) => suite.members.length
|
|
1588
|
-
? '\n\n| order | test case |\n
|
|
1589
|
-
suite.members.map((m) => `| ${m.order} | ${escCell(m.tcId)} |`).join('\n')
|
|
1588
|
+
? '\n\n| order | test case | version |\n|---|---|---|\n' +
|
|
1589
|
+
suite.members.map((m) => `| ${m.order} | ${escCell(m.tcId)} | ${escCell(m.versionId ?? '')} |`).join('\n')
|
|
1590
1590
|
: '';
|
|
1591
1591
|
server.registerTool('suite_add_testcases', {
|
|
1592
|
-
title: 'Add test cases to a suite',
|
|
1593
|
-
description: 'Add one or more EXISTING test cases to a suite (appended in order). `tcIds`
|
|
1594
|
-
'
|
|
1595
|
-
'
|
|
1596
|
-
'
|
|
1592
|
+
title: 'Add test cases to a suite (optionally a specific VERSION of each)',
|
|
1593
|
+
description: 'Add one or more EXISTING test cases to a suite (appended in order). `tcIds` takes ids or business ' +
|
|
1594
|
+
'keys (e.g. TC_123); use suite_list / tc_list to find them. To pin a VERSION, pass ' +
|
|
1595
|
+
'`testCases:[{ tcId:"TC-12826", version:"v2.0" }]` (or `versionId`) — the same test case can sit in ' +
|
|
1596
|
+
'the suite once per version (v1.0 and v2.0 are two rows). A requested version that does not exist ' +
|
|
1597
|
+
'is an ERROR (nothing is added twice as v1.0). Default = the test case\'s current version; an ' +
|
|
1598
|
+
'(tc, version) pair already in the suite is skipped. NOTE: a suite can only hold test cases of ONE ' +
|
|
1599
|
+
'category (all manual OR all automated) — the product rejects a mix. Returns the updated suite.',
|
|
1597
1600
|
inputSchema: {
|
|
1598
1601
|
suiteId: z.string().describe('The suite id to add to (from suite_list).'),
|
|
1599
|
-
tcIds: z.array(z.string()).
|
|
1602
|
+
tcIds: z.array(z.string()).optional().describe('Test case ids / business keys to add (their current version).'),
|
|
1603
|
+
testCases: z.array(z.object({
|
|
1604
|
+
tcId: z.string().describe('Test case id or business key.'),
|
|
1605
|
+
versionId: z.string().optional().describe('Pin this version id (from the TC versions[]).'),
|
|
1606
|
+
version: z.string().optional().describe('Pin this version NAME (e.g. "v2.0"); ignored when versionId is given.'),
|
|
1607
|
+
})).optional().describe('Test cases with an explicit version — lets one TC be added once per version.'),
|
|
1600
1608
|
},
|
|
1601
1609
|
annotations: { readOnlyHint: false },
|
|
1602
|
-
}, async ({ suiteId, tcIds }) => {
|
|
1610
|
+
}, async ({ suiteId, tcIds, testCases }) => {
|
|
1603
1611
|
const adapter = deps.getAdapter();
|
|
1604
1612
|
if (!adapter)
|
|
1605
1613
|
return err(NOT_CONNECTED);
|
|
1614
|
+
const wanted = [
|
|
1615
|
+
...(tcIds ?? []).map((tcId) => ({ tcId })),
|
|
1616
|
+
...(testCases ?? []),
|
|
1617
|
+
];
|
|
1618
|
+
if (!wanted.length)
|
|
1619
|
+
return err('suite_add_testcases needs tcIds or testCases.');
|
|
1606
1620
|
try {
|
|
1607
|
-
const ops =
|
|
1621
|
+
const ops = wanted.map((w) => ({
|
|
1622
|
+
op: 'add', tcId: w.tcId,
|
|
1623
|
+
...(w.versionId ? { versionId: w.versionId } : {}),
|
|
1624
|
+
...(w.version ? { version: w.version } : {}),
|
|
1625
|
+
}));
|
|
1608
1626
|
const suite = await adapter.updateSuiteMembers(suiteId, ops);
|
|
1609
1627
|
const n = suite.members.length;
|
|
1610
1628
|
// Resolve titles for the confirmation — membership rows only carry `tcId`.
|
|
1611
|
-
const added = await Promise.all(
|
|
1629
|
+
const added = await Promise.all(wanted.map(async (w) => {
|
|
1630
|
+
const label = w.versionId ?? w.version;
|
|
1612
1631
|
try {
|
|
1613
|
-
const tc = await adapter.getTestCase(tcId);
|
|
1614
|
-
return tc.title ? `${tc.title} (${tcId})` : tcId
|
|
1632
|
+
const tc = await adapter.getTestCase(w.tcId);
|
|
1633
|
+
return `${tc.title ? `${tc.title} (${w.tcId})` : w.tcId}${label ? ` [${label}]` : ''}`;
|
|
1615
1634
|
}
|
|
1616
1635
|
catch {
|
|
1617
|
-
return tcId
|
|
1636
|
+
return `${w.tcId}${label ? ` [${label}]` : ''}`;
|
|
1618
1637
|
}
|
|
1619
1638
|
}));
|
|
1620
1639
|
return ok(`Added ${added.length} test case${added.length === 1 ? '' : 's'} to **${suite.name}**: ` +
|
|
@@ -1661,16 +1680,18 @@ export function registerDiscoveryTools(server, deps) {
|
|
|
1661
1680
|
inputSchema: {
|
|
1662
1681
|
tcId: z.string().describe('Test case id or business key.'),
|
|
1663
1682
|
pattern: z.string().optional().describe('Case-insensitive substring filter over step descriptions.'),
|
|
1683
|
+
versionId: z.string().optional().describe('SimplifyQA, multi-version test cases: the version to read — its id or name (e.g. "v2.0"). Omit for the current version. ' +
|
|
1684
|
+
'Use the SAME value in journal_modify to edit that version.'),
|
|
1664
1685
|
},
|
|
1665
1686
|
annotations: { readOnlyHint: true },
|
|
1666
|
-
}, async ({ tcId, pattern }) => {
|
|
1687
|
+
}, async ({ tcId, pattern, versionId }) => {
|
|
1667
1688
|
const adapter = deps.getAdapter();
|
|
1668
1689
|
if (!adapter)
|
|
1669
1690
|
return err(NOT_CONNECTED);
|
|
1670
1691
|
if (!adapter.readJournal)
|
|
1671
1692
|
return err('This product has no recording journal.');
|
|
1672
1693
|
try {
|
|
1673
|
-
const view = await adapter.readJournal(tcId);
|
|
1694
|
+
const view = await adapter.readJournal(tcId, versionId || undefined);
|
|
1674
1695
|
const p = pattern?.toLowerCase();
|
|
1675
1696
|
const rows = view.steps
|
|
1676
1697
|
.filter((s) => !p || (s.description ?? '').toLowerCase().includes(p))
|
|
@@ -1678,7 +1699,8 @@ export function registerDiscoveryTools(server, deps) {
|
|
|
1678
1699
|
const staleness = view.source === 'journal'
|
|
1679
1700
|
? ` · journal seed${view.ageDays != null ? ` (${view.ageDays}d old)` : ''}`
|
|
1680
1701
|
: ' · NO journal seed — showing persisted steps (a new-interaction add would be steps-only)';
|
|
1681
|
-
const header = `**${tcId}** — ${view.steps.length} step${view.steps.length === 1 ? '' : 's'} · source: ${view.source}${staleness}
|
|
1702
|
+
const header = `**${tcId}** — ${view.steps.length} step${view.steps.length === 1 ? '' : 's'} · source: ${view.source}${staleness}` +
|
|
1703
|
+
(view.version && (view.versionCount ?? 0) > 1 ? ` · version ${view.version.name} (of ${view.versionCount})` : '');
|
|
1682
1704
|
const body = rows.length
|
|
1683
1705
|
? '\n\n| n | type | description |\n|---|---|---|\n' + rows.join('\n')
|
|
1684
1706
|
: `\n\n(no steps${pattern ? ' match the filter' : ''})`;
|
|
@@ -1714,13 +1736,18 @@ export function registerDiscoveryTools(server, deps) {
|
|
|
1714
1736
|
'needs NO element — e.g. Minimum Wait — needs none. Use add_step { at?, step: { actionType:"Minimum Wait", ' +
|
|
1715
1737
|
'stepType, description, value? } } — `at` (alias `seq`) is the 1-based position the new step takes; it is ' +
|
|
1716
1738
|
'inserted there DIRECTLY (the recorder window does not open) and the other steps just shift down. ' +
|
|
1739
|
+
'A test case with SEVERAL VERSIONS: edits go to the current version unless you pass `versionId` (id or name, e.g. "v2.0") — ' +
|
|
1740
|
+
'read that version first with journal_grep { tcId, versionId } so the step numbers match. ' +
|
|
1717
1741
|
'Requires a live connection.',
|
|
1718
1742
|
inputSchema: {
|
|
1719
1743
|
tcId: z.string().describe('Test case id or business key.'),
|
|
1720
1744
|
ops: z.array(zJournalOp).min(1).describe('Ops to apply, in order.'),
|
|
1745
|
+
versionId: z.string().optional().describe('SimplifyQA, multi-version test cases: the version to edit — its id or name (e.g. "v2.0"); step numbers are that version\'s ' +
|
|
1746
|
+
'(read it with journal_grep { versionId }). Omit to edit the CURRENT version. wrap_in_if / wrap_in_loop need the agent and ' +
|
|
1747
|
+
'only work on the current version.'),
|
|
1721
1748
|
},
|
|
1722
1749
|
annotations: { readOnlyHint: false },
|
|
1723
|
-
}, async ({ tcId, ops }) => {
|
|
1750
|
+
}, async ({ tcId, ops, versionId }) => {
|
|
1724
1751
|
const adapter = deps.getAdapter();
|
|
1725
1752
|
if (!adapter)
|
|
1726
1753
|
return err(NOT_CONNECTED);
|
|
@@ -1737,9 +1764,13 @@ export function registerDiscoveryTools(server, deps) {
|
|
|
1737
1764
|
'Once the recording is saved, edit the test case with journal_modify({ tcId: "TC-…" }).');
|
|
1738
1765
|
}
|
|
1739
1766
|
try {
|
|
1740
|
-
const view = await adapter.editJournal(tcId, ops);
|
|
1767
|
+
const view = await adapter.editJournal(tcId, ops, versionId || undefined);
|
|
1741
1768
|
const rows = view.steps.map((s) => `| ${s.n} | ${escCell(s.stepType)}${s.controlFlow ? `/${s.controlFlow.kind}` : ''} | ${escCell(s.description)} |`);
|
|
1742
|
-
|
|
1769
|
+
// Name the version that was changed whenever there is a choice, so an edit never lands unnoticed on the wrong one.
|
|
1770
|
+
const onVersion = view.version && (view.versionCount ?? 0) > 1
|
|
1771
|
+
? ` (version ${view.version.name}${versionId ? '' : ' — the current one; pass versionId to edit another version'})`
|
|
1772
|
+
: '';
|
|
1773
|
+
return ok(`Updated **${tcId}**${onVersion} — ${view.steps.length} step${view.steps.length === 1 ? '' : 's'}${view.source === 'steps' ? '' : ' (opened in the editor)'}.` +
|
|
1743
1774
|
'\n\n| n | type | description |\n|---|---|---|\n' +
|
|
1744
1775
|
rows.join('\n'), { view });
|
|
1745
1776
|
}
|