@tlog/mcp 0.1.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/README.md +281 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +4 -0
- package/dist/constants.js.map +1 -0
- package/dist/core-tools.d.ts +146 -0
- package/dist/core-tools.d.ts.map +1 -0
- package/dist/core-tools.js +884 -0
- package/dist/core-tools.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/normalization.d.ts +5 -0
- package/dist/normalization.d.ts.map +1 -0
- package/dist/normalization.js +186 -0
- package/dist/normalization.js.map +1 -0
- package/dist/runtime.d.ts +4 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +19 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schema-contract.d.ts +15 -0
- package/dist/schema-contract.d.ts.map +1 -0
- package/dist/schema-contract.js +439 -0
- package/dist/schema-contract.js.map +1 -0
- package/dist/schemas.d.ts +172 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +154 -0
- package/dist/schemas.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +594 -0
- package/dist/server.js.map +1 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +14 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +146 -0
- package/dist/utils.js.map +1 -0
- package/package.json +39 -0
package/dist/server.js
ADDED
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { createCaseFileCore, createSuiteFileCore, createSuiteFromPromptCore, createTemplateDirectoryCore, createTestcaseFromPromptCore, deleteCaseCore, deleteSuiteCore, expandTestcaseCore, initTestsDirectoryCore, listCasesCore, listSuitesCore, listTemplatesCore, organizeExecutionTargetsCore, resolveEntityPathByIdCore, resolveRelatedTargetsCore, getWorkspaceSnapshotCore, suiteStatsCore, syncRelatedCore, updateCaseCore, updateSuiteCore, validateTestsDirectoryCore } from "./core-tools.js";
|
|
3
|
+
import { buildMissingContextGuidance, buildTlogSchemaExamplesPayload, buildTlogSchemaPayload, collectMissingContext, getSchemaByTopic, getSchemaExamplesByTopic, getSchemaHints, getSchemaUsageTemplate } from "./schema-contract.js";
|
|
4
|
+
import { MCP_SERVER_NAME, MCP_SERVER_VERSION } from "./constants.js";
|
|
5
|
+
import { collectMissingContextInputSchema, createCaseFileInputSchema, createCaseInputSchema, createSuiteFileInputSchema, createSuiteInputSchema, createTemplateDirectoryInputSchema, deleteEntityInputSchema, expandCaseInputSchema, getTlogSchemaInputSchema, initTestsDirectoryInputSchema, listCasesInputSchema, listSuitesInputSchema, listTemplatesInputSchema, organizeInputSchema, resolveEntityPathByIdInputSchema, resolveRelatedTargetsInputSchema, schemaUsagePromptArgsSchema, getWorkspaceSnapshotInputSchema, syncRelatedInputSchema, suiteStatsInputSchema, updateCaseInputSchema, updateSuiteInputSchema, validateTestsDirectoryInputSchema } from "./schemas.js";
|
|
6
|
+
import { logEvent, toToolError, toToolResult } from "./utils.js";
|
|
7
|
+
export function createMcpServer() {
|
|
8
|
+
const server = new McpServer({
|
|
9
|
+
name: MCP_SERVER_NAME,
|
|
10
|
+
version: MCP_SERVER_VERSION
|
|
11
|
+
});
|
|
12
|
+
server.registerResource("tlog_schema", "tlog://schema", {
|
|
13
|
+
title: "TLog schema",
|
|
14
|
+
description: "Canonical schema for TLog entities (suite/case/issue). Read this first to get required fields, enum values, and strict field names before calling create/update tools.",
|
|
15
|
+
mimeType: "application/json"
|
|
16
|
+
}, async () => {
|
|
17
|
+
const payload = buildTlogSchemaPayload();
|
|
18
|
+
return {
|
|
19
|
+
contents: [
|
|
20
|
+
{
|
|
21
|
+
uri: "tlog://schema",
|
|
22
|
+
text: JSON.stringify(payload, null, 2),
|
|
23
|
+
mimeType: "application/json"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
server.registerResource("tlog_schema_examples", "tlog://schema/examples", {
|
|
29
|
+
title: "TLog schema examples",
|
|
30
|
+
description: "Minimal and recommended examples for suite/case/issue payloads. Use these examples as concrete input references for create/update operations.",
|
|
31
|
+
mimeType: "application/json"
|
|
32
|
+
}, async () => {
|
|
33
|
+
const payload = buildTlogSchemaExamplesPayload();
|
|
34
|
+
return {
|
|
35
|
+
contents: [
|
|
36
|
+
{
|
|
37
|
+
uri: "tlog://schema/examples",
|
|
38
|
+
text: JSON.stringify(payload, null, 2),
|
|
39
|
+
mimeType: "application/json"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
server.registerPrompt("tlog_instruction_template", {
|
|
45
|
+
title: "tlog instruction template",
|
|
46
|
+
description: "Basic reusable instruction templates for suite/case generation. Prefer tlog_schema_usage_template when you need strict schema-aware guidance."
|
|
47
|
+
}, async () => {
|
|
48
|
+
return {
|
|
49
|
+
messages: [
|
|
50
|
+
{
|
|
51
|
+
role: "assistant",
|
|
52
|
+
content: {
|
|
53
|
+
type: "text",
|
|
54
|
+
text: [
|
|
55
|
+
"Suite template: id: <suite-id>; title: <suite title>; include owners/tags/purpose.",
|
|
56
|
+
"Case template: id: <case-id>; title: <case title>; include operations and expected outcomes."
|
|
57
|
+
].join("\n")
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
server.registerPrompt("tlog_schema_usage_template", {
|
|
64
|
+
title: "tlog schema usage template",
|
|
65
|
+
description: "Step-by-step guidance for schema-safe calls. Explains pre-check sequence (schema -> examples -> missing context), then create/update call patterns.",
|
|
66
|
+
argsSchema: schemaUsagePromptArgsSchema
|
|
67
|
+
}, async ({ useCase }) => {
|
|
68
|
+
return {
|
|
69
|
+
messages: [
|
|
70
|
+
{
|
|
71
|
+
role: "assistant",
|
|
72
|
+
content: {
|
|
73
|
+
type: "text",
|
|
74
|
+
text: getSchemaUsageTemplate(useCase)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
server.registerTool("get_tlog_schema", {
|
|
81
|
+
title: "Get TLog schema",
|
|
82
|
+
description: "Returns schema definitions by topic (suite|case|issue|enum|all). Call this before mutation tools to avoid unknown fields or invalid enum values.",
|
|
83
|
+
inputSchema: getTlogSchemaInputSchema
|
|
84
|
+
}, async (args) => {
|
|
85
|
+
try {
|
|
86
|
+
const result = getSchemaByTopic(args.topic);
|
|
87
|
+
return toToolResult(result);
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
return toToolError("failed to get tlog schema", "get_tlog_schema_failed", { cause: String(error) });
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
server.registerTool("get_tlog_schema_examples", {
|
|
94
|
+
title: "Get TLog schema examples",
|
|
95
|
+
description: "Returns minimal/recommended examples by topic. Use when translating natural language requirements into valid structured inputs.",
|
|
96
|
+
inputSchema: getTlogSchemaInputSchema
|
|
97
|
+
}, async (args) => {
|
|
98
|
+
try {
|
|
99
|
+
const result = getSchemaExamplesByTopic(args.topic);
|
|
100
|
+
return toToolResult(result);
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
return toToolError("failed to get tlog schema examples", "get_tlog_schema_examples_failed", {
|
|
104
|
+
cause: String(error)
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
server.registerTool("collect_missing_context", {
|
|
109
|
+
title: "Collect missing context",
|
|
110
|
+
description: "Pre-flight checker for create/update workflows. Returns missingFields/questions/nextAction so the client can ask the user and retry with complete context.",
|
|
111
|
+
inputSchema: collectMissingContextInputSchema
|
|
112
|
+
}, async (args) => {
|
|
113
|
+
try {
|
|
114
|
+
const result = collectMissingContext(args.operation, args.draft);
|
|
115
|
+
return toToolResult(result);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
return toToolError("failed to collect missing context", "collect_missing_context_failed", {
|
|
119
|
+
cause: String(error)
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
server.registerTool("create_suite_from_prompt", {
|
|
124
|
+
title: "Create suite from prompt",
|
|
125
|
+
description: "Generate a suite from instruction text. Required: workspaceRoot, targetDir, instruction. Set write=false for preview, write=true to persist. Returns schemaHints and may return missing_required_context.",
|
|
126
|
+
inputSchema: createSuiteInputSchema
|
|
127
|
+
}, async (args) => {
|
|
128
|
+
try {
|
|
129
|
+
const contextCheck = collectMissingContext("create_suite_from_prompt", {
|
|
130
|
+
instruction: args.instruction,
|
|
131
|
+
targetDir: args.targetDir
|
|
132
|
+
});
|
|
133
|
+
if (contextCheck.missingFields.length > 0) {
|
|
134
|
+
return toToolError("missing required context", "missing_required_context", {
|
|
135
|
+
missingFields: contextCheck.missingFields,
|
|
136
|
+
questions: contextCheck.questions,
|
|
137
|
+
nextAction: contextCheck.nextAction,
|
|
138
|
+
guidance: buildMissingContextGuidance("create_suite_from_prompt", {
|
|
139
|
+
workspaceRoot: args.workspaceRoot,
|
|
140
|
+
targetDir: args.targetDir,
|
|
141
|
+
instruction: args.instruction
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
logEvent("info", "tool.request", { tool: "create_suite_from_prompt", args: { write: args.write } });
|
|
146
|
+
const result = await createSuiteFromPromptCore(args);
|
|
147
|
+
result.schemaHints = getSchemaHints("suite");
|
|
148
|
+
result.missingFields = [];
|
|
149
|
+
logEvent("info", "tool.response", {
|
|
150
|
+
tool: "create_suite_from_prompt",
|
|
151
|
+
summary: { warnings: result.warnings.length }
|
|
152
|
+
});
|
|
153
|
+
return toToolResult(result);
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
logEvent("error", "tool.error", { tool: "create_suite_from_prompt", error: String(error) });
|
|
157
|
+
return toToolError("failed to create suite", "create_suite_failed", { cause: String(error) });
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
server.registerTool("create_testcase_from_prompt", {
|
|
161
|
+
title: "Create testcase from prompt",
|
|
162
|
+
description: "Generate a testcase from instruction text. Required: workspaceRoot, suiteDir, instruction, and rich context. Primary: context.operations + context.tests[].expected. Fallback: context.expected. Set write=false for preview, write=true to persist.",
|
|
163
|
+
inputSchema: createCaseInputSchema
|
|
164
|
+
}, async (args) => {
|
|
165
|
+
try {
|
|
166
|
+
const contextCheck = collectMissingContext("create_testcase_from_prompt", {
|
|
167
|
+
instruction: args.instruction,
|
|
168
|
+
suiteDir: args.suiteDir,
|
|
169
|
+
context: args.context
|
|
170
|
+
});
|
|
171
|
+
if (contextCheck.missingFields.length > 0) {
|
|
172
|
+
return toToolError("missing required context", "missing_required_context", {
|
|
173
|
+
missingFields: contextCheck.missingFields,
|
|
174
|
+
questions: contextCheck.questions,
|
|
175
|
+
nextAction: contextCheck.nextAction,
|
|
176
|
+
guidance: buildMissingContextGuidance("create_testcase_from_prompt", {
|
|
177
|
+
workspaceRoot: args.workspaceRoot,
|
|
178
|
+
suiteDir: args.suiteDir,
|
|
179
|
+
instruction: args.instruction,
|
|
180
|
+
context: args.context
|
|
181
|
+
})
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
logEvent("info", "tool.request", { tool: "create_testcase_from_prompt", args: { write: args.write } });
|
|
185
|
+
const result = await createTestcaseFromPromptCore(args);
|
|
186
|
+
result.schemaHints = getSchemaHints("case");
|
|
187
|
+
result.missingFields = [];
|
|
188
|
+
logEvent("info", "tool.response", {
|
|
189
|
+
tool: "create_testcase_from_prompt",
|
|
190
|
+
summary: { warnings: result.warnings.length }
|
|
191
|
+
});
|
|
192
|
+
return toToolResult(result);
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
logEvent("error", "tool.error", { tool: "create_testcase_from_prompt", error: String(error) });
|
|
196
|
+
return toToolError("failed to create testcase", "create_testcase_failed", { cause: String(error) });
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
server.registerTool("expand_testcase", {
|
|
200
|
+
title: "Expand testcase",
|
|
201
|
+
description: "Expand an existing testcase file with additional instruction while preserving selected fields. Use write=false to inspect diffSummary before applying changes.",
|
|
202
|
+
inputSchema: expandCaseInputSchema
|
|
203
|
+
}, async (args) => {
|
|
204
|
+
try {
|
|
205
|
+
const result = await expandTestcaseCore(args);
|
|
206
|
+
return toToolResult(result);
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
return toToolError("failed to expand testcase", "expand_testcase_failed", { cause: String(error) });
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
server.registerTool("organize_test_execution_targets", {
|
|
213
|
+
title: "Organize test execution targets",
|
|
214
|
+
description: "Reorganize testcase tests[] with risk/flow/component strategy. mode=auto infers append/replace; set write=true only after reviewing proposedTests.",
|
|
215
|
+
inputSchema: organizeInputSchema
|
|
216
|
+
}, async (args) => {
|
|
217
|
+
try {
|
|
218
|
+
const result = await organizeExecutionTargetsCore(args);
|
|
219
|
+
return toToolResult(result);
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
return toToolError("failed to organize execution targets", "organize_test_execution_targets_failed", {
|
|
223
|
+
cause: String(error)
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
server.registerTool("init_tests_directory", {
|
|
228
|
+
title: "Initialize tests directory",
|
|
229
|
+
description: "Initialize tests directory scaffold. Use write=false to preview plannedFiles, then write=true to create files safely inside workspaceRoot.",
|
|
230
|
+
inputSchema: initTestsDirectoryInputSchema
|
|
231
|
+
}, async (args) => {
|
|
232
|
+
try {
|
|
233
|
+
const result = await initTestsDirectoryCore(args);
|
|
234
|
+
return toToolResult(result);
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
return toToolError("failed to initialize tests directory", "init_tests_directory_failed", {
|
|
238
|
+
cause: String(error)
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
server.registerTool("create_template_directory", {
|
|
243
|
+
title: "Create template directory",
|
|
244
|
+
description: "Create a reusable template directory for suite/case generation. Supports preview via write=false and optional base import via fromDir.",
|
|
245
|
+
inputSchema: createTemplateDirectoryInputSchema
|
|
246
|
+
}, async (args) => {
|
|
247
|
+
try {
|
|
248
|
+
const result = await createTemplateDirectoryCore(args);
|
|
249
|
+
return toToolResult(result);
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
return toToolError("failed to create template directory", "create_template_directory_failed", {
|
|
253
|
+
cause: String(error)
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
server.registerTool("create_suite_file", {
|
|
258
|
+
title: "Create suite file",
|
|
259
|
+
description: "Create a suite YAML file directly from structured fields. id must match ^[A-Za-z0-9_-]+$ and must be unique in dir.",
|
|
260
|
+
inputSchema: createSuiteFileInputSchema
|
|
261
|
+
}, async (args) => {
|
|
262
|
+
try {
|
|
263
|
+
const result = await createSuiteFileCore({
|
|
264
|
+
workspaceRoot: args.workspaceRoot,
|
|
265
|
+
dir: args.dir,
|
|
266
|
+
id: args.id,
|
|
267
|
+
title: args.title,
|
|
268
|
+
fields: args.fields,
|
|
269
|
+
write: args.write
|
|
270
|
+
});
|
|
271
|
+
return toToolResult(result);
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
return toToolError("failed to create suite file", "create_suite_file_failed", { cause: String(error) });
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
server.registerTool("create_case_file", {
|
|
278
|
+
title: "Create case file",
|
|
279
|
+
description: "Create a testcase YAML file directly from structured fields. id must match ^[A-Za-z0-9_-]+$ and must be unique in dir.",
|
|
280
|
+
inputSchema: createCaseFileInputSchema
|
|
281
|
+
}, async (args) => {
|
|
282
|
+
try {
|
|
283
|
+
const result = await createCaseFileCore({
|
|
284
|
+
workspaceRoot: args.workspaceRoot,
|
|
285
|
+
dir: args.dir,
|
|
286
|
+
id: args.id,
|
|
287
|
+
title: args.title,
|
|
288
|
+
fields: args.fields,
|
|
289
|
+
write: args.write
|
|
290
|
+
});
|
|
291
|
+
return toToolResult(result);
|
|
292
|
+
}
|
|
293
|
+
catch (error) {
|
|
294
|
+
return toToolError("failed to create case file", "create_case_file_failed", { cause: String(error) });
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
server.registerTool("update_suite", {
|
|
298
|
+
title: "Update suite",
|
|
299
|
+
description: "Patch a suite by id (id-based resolution, not filename-based). Required: id, patch. Validates with shared schema before write; unknown fields are rejected/normalized.",
|
|
300
|
+
inputSchema: updateSuiteInputSchema
|
|
301
|
+
}, async (args) => {
|
|
302
|
+
try {
|
|
303
|
+
logEvent("info", "tool.request", {
|
|
304
|
+
tool: "update_suite",
|
|
305
|
+
target: args.id,
|
|
306
|
+
mode: args.write ? "write" : "dry-run"
|
|
307
|
+
});
|
|
308
|
+
const contextCheck = collectMissingContext("update_suite", {
|
|
309
|
+
id: args.id,
|
|
310
|
+
patch: args.patch
|
|
311
|
+
});
|
|
312
|
+
if (contextCheck.missingFields.length > 0) {
|
|
313
|
+
return toToolError("missing required context", "missing_required_context", {
|
|
314
|
+
missingFields: contextCheck.missingFields,
|
|
315
|
+
questions: contextCheck.questions,
|
|
316
|
+
nextAction: contextCheck.nextAction
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
const result = await updateSuiteCore({
|
|
320
|
+
workspaceRoot: args.workspaceRoot,
|
|
321
|
+
dir: args.dir,
|
|
322
|
+
id: args.id,
|
|
323
|
+
patch: args.patch,
|
|
324
|
+
write: args.write
|
|
325
|
+
});
|
|
326
|
+
logEvent("info", "tool.response", {
|
|
327
|
+
tool: "update_suite",
|
|
328
|
+
target: args.id,
|
|
329
|
+
mode: args.write ? "write" : "dry-run",
|
|
330
|
+
resultCount: 1,
|
|
331
|
+
errorCode: null
|
|
332
|
+
});
|
|
333
|
+
return toToolResult(result);
|
|
334
|
+
}
|
|
335
|
+
catch (error) {
|
|
336
|
+
logEvent("error", "tool.error", {
|
|
337
|
+
tool: "update_suite",
|
|
338
|
+
target: args.id,
|
|
339
|
+
mode: args.write ? "write" : "dry-run",
|
|
340
|
+
resultCount: 0,
|
|
341
|
+
errorCode: "update_suite_failed"
|
|
342
|
+
});
|
|
343
|
+
return toToolError("failed to update suite", "update_suite_failed", { cause: String(error) });
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
server.registerTool("update_case", {
|
|
347
|
+
title: "Update case",
|
|
348
|
+
description: "Patch a testcase by id (id-based resolution, not filename-based). Required: id, patch. Validates with shared schema before write; unknown fields are rejected/normalized.",
|
|
349
|
+
inputSchema: updateCaseInputSchema
|
|
350
|
+
}, async (args) => {
|
|
351
|
+
try {
|
|
352
|
+
logEvent("info", "tool.request", {
|
|
353
|
+
tool: "update_case",
|
|
354
|
+
target: args.id,
|
|
355
|
+
mode: args.write ? "write" : "dry-run"
|
|
356
|
+
});
|
|
357
|
+
const contextCheck = collectMissingContext("update_case", {
|
|
358
|
+
id: args.id,
|
|
359
|
+
patch: args.patch
|
|
360
|
+
});
|
|
361
|
+
if (contextCheck.missingFields.length > 0) {
|
|
362
|
+
return toToolError("missing required context", "missing_required_context", {
|
|
363
|
+
missingFields: contextCheck.missingFields,
|
|
364
|
+
questions: contextCheck.questions,
|
|
365
|
+
nextAction: contextCheck.nextAction
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
const result = await updateCaseCore({
|
|
369
|
+
workspaceRoot: args.workspaceRoot,
|
|
370
|
+
dir: args.dir,
|
|
371
|
+
id: args.id,
|
|
372
|
+
patch: args.patch,
|
|
373
|
+
write: args.write
|
|
374
|
+
});
|
|
375
|
+
logEvent("info", "tool.response", {
|
|
376
|
+
tool: "update_case",
|
|
377
|
+
target: args.id,
|
|
378
|
+
mode: args.write ? "write" : "dry-run",
|
|
379
|
+
resultCount: 1,
|
|
380
|
+
errorCode: null
|
|
381
|
+
});
|
|
382
|
+
return toToolResult(result);
|
|
383
|
+
}
|
|
384
|
+
catch (error) {
|
|
385
|
+
logEvent("error", "tool.error", {
|
|
386
|
+
tool: "update_case",
|
|
387
|
+
target: args.id,
|
|
388
|
+
mode: args.write ? "write" : "dry-run",
|
|
389
|
+
resultCount: 0,
|
|
390
|
+
errorCode: "update_case_failed"
|
|
391
|
+
});
|
|
392
|
+
return toToolError("failed to update case", "update_case_failed", { cause: String(error) });
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
server.registerTool("validate_tests_directory", {
|
|
396
|
+
title: "Validate tests directory",
|
|
397
|
+
description: "Validate all suite/case YAML files under dir and return structured diagnostics. Use after write=true operations for safe automation pipelines.",
|
|
398
|
+
inputSchema: validateTestsDirectoryInputSchema
|
|
399
|
+
}, async (args) => {
|
|
400
|
+
try {
|
|
401
|
+
const result = await validateTestsDirectoryCore(args);
|
|
402
|
+
return toToolResult(result);
|
|
403
|
+
}
|
|
404
|
+
catch (error) {
|
|
405
|
+
return toToolError("failed to validate tests directory", "validate_tests_directory_failed", {
|
|
406
|
+
cause: String(error)
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
server.registerTool("list_templates", {
|
|
411
|
+
title: "List templates",
|
|
412
|
+
description: "List template directories (folders containing index.yaml) under the specified dir.",
|
|
413
|
+
inputSchema: listTemplatesInputSchema
|
|
414
|
+
}, async (args) => {
|
|
415
|
+
try {
|
|
416
|
+
const result = await listTemplatesCore(args);
|
|
417
|
+
return toToolResult(result);
|
|
418
|
+
}
|
|
419
|
+
catch (error) {
|
|
420
|
+
return toToolError("failed to list templates", "list_templates_failed", { cause: String(error) });
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
server.registerTool("list_suites", {
|
|
424
|
+
title: "List suites",
|
|
425
|
+
description: "List suites with id/path and optional filters (id/tag).",
|
|
426
|
+
inputSchema: listSuitesInputSchema
|
|
427
|
+
}, async (args) => {
|
|
428
|
+
try {
|
|
429
|
+
const result = await listSuitesCore(args);
|
|
430
|
+
return toToolResult(result);
|
|
431
|
+
}
|
|
432
|
+
catch (error) {
|
|
433
|
+
return toToolError("failed to list suites", "list_suites_failed", { cause: String(error) });
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
server.registerTool("list_cases", {
|
|
437
|
+
title: "List cases",
|
|
438
|
+
description: "List testcases with id/status/path. Supports filters: id, status, tags, owners(issue owners), scopedOnly, issueHas(keyword), issueStatus.",
|
|
439
|
+
inputSchema: listCasesInputSchema
|
|
440
|
+
}, async (args) => {
|
|
441
|
+
try {
|
|
442
|
+
const result = await listCasesCore(args);
|
|
443
|
+
return toToolResult(result);
|
|
444
|
+
}
|
|
445
|
+
catch (error) {
|
|
446
|
+
return toToolError("failed to list cases", "list_cases_failed", { cause: String(error) });
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
server.registerTool("resolve_entity_path_by_id", {
|
|
450
|
+
title: "Resolve entity path by id",
|
|
451
|
+
description: "Resolve entity path by YAML id, independent from filename. Use this when files were renamed manually but ids stayed stable.",
|
|
452
|
+
inputSchema: resolveEntityPathByIdInputSchema
|
|
453
|
+
}, async (args) => {
|
|
454
|
+
try {
|
|
455
|
+
const result = await resolveEntityPathByIdCore(args);
|
|
456
|
+
return toToolResult(result);
|
|
457
|
+
}
|
|
458
|
+
catch (error) {
|
|
459
|
+
return toToolError("failed to resolve entity path", "resolve_entity_path_by_id_failed", {
|
|
460
|
+
cause: String(error)
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
server.registerTool("resolve_related_targets", {
|
|
465
|
+
title: "Resolve related targets",
|
|
466
|
+
description: "Resolve related ids from source entity (or provided relatedIds). Returns resolved targets and unresolved ids as warnings.",
|
|
467
|
+
inputSchema: resolveRelatedTargetsInputSchema
|
|
468
|
+
}, async (args) => {
|
|
469
|
+
try {
|
|
470
|
+
const result = await resolveRelatedTargetsCore(args);
|
|
471
|
+
return toToolResult(result);
|
|
472
|
+
}
|
|
473
|
+
catch (error) {
|
|
474
|
+
return toToolError("failed to resolve related targets", "resolve_related_targets_failed", {
|
|
475
|
+
cause: String(error)
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
server.registerTool("sync_related", {
|
|
480
|
+
title: "Sync related",
|
|
481
|
+
description: "Synchronize related references. mode=one-way updates only source; mode=two-way also adds reciprocal links on targets. Use write=false first to review changed.",
|
|
482
|
+
inputSchema: syncRelatedInputSchema
|
|
483
|
+
}, async (args) => {
|
|
484
|
+
try {
|
|
485
|
+
const result = await syncRelatedCore(args);
|
|
486
|
+
return toToolResult(result);
|
|
487
|
+
}
|
|
488
|
+
catch (error) {
|
|
489
|
+
return toToolError("failed to sync related", "sync_related_failed", {
|
|
490
|
+
cause: String(error)
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
server.registerTool("get_workspace_snapshot", {
|
|
495
|
+
title: "Get workspace snapshot",
|
|
496
|
+
description: "Return workspace-level suite/case snapshot (lightweight cards) for planning and context compression before detailed tool calls.",
|
|
497
|
+
inputSchema: getWorkspaceSnapshotInputSchema
|
|
498
|
+
}, async (args) => {
|
|
499
|
+
try {
|
|
500
|
+
const result = await getWorkspaceSnapshotCore(args);
|
|
501
|
+
return toToolResult(result);
|
|
502
|
+
}
|
|
503
|
+
catch (error) {
|
|
504
|
+
return toToolError("failed to get workspace snapshot", "get_workspace_snapshot_failed", {
|
|
505
|
+
cause: String(error)
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
server.registerTool("suite_stats", {
|
|
510
|
+
title: "Suite stats",
|
|
511
|
+
description: "Return suite progress metrics by suite id: todo/doing/done summary and burndown time series derived from scheduled duration and case completion.",
|
|
512
|
+
inputSchema: suiteStatsInputSchema
|
|
513
|
+
}, async (args) => {
|
|
514
|
+
try {
|
|
515
|
+
const result = await suiteStatsCore(args);
|
|
516
|
+
return toToolResult(result);
|
|
517
|
+
}
|
|
518
|
+
catch (error) {
|
|
519
|
+
return toToolError("failed to compute suite stats", "suite_stats_failed", {
|
|
520
|
+
cause: String(error)
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
server.registerTool("delete_suite", {
|
|
525
|
+
title: "Delete suite",
|
|
526
|
+
description: "Delete suite by id with safety contract. dryRun=true returns deletion plan and impact only. Execution requires dryRun=false and confirm=true.",
|
|
527
|
+
inputSchema: deleteEntityInputSchema
|
|
528
|
+
}, async (args) => {
|
|
529
|
+
try {
|
|
530
|
+
logEvent("info", "tool.request", {
|
|
531
|
+
tool: "delete_suite",
|
|
532
|
+
target: args.id,
|
|
533
|
+
mode: args.dryRun ? "dry-run" : "write"
|
|
534
|
+
});
|
|
535
|
+
const result = await deleteSuiteCore(args);
|
|
536
|
+
logEvent("info", "tool.response", {
|
|
537
|
+
tool: "delete_suite",
|
|
538
|
+
target: args.id,
|
|
539
|
+
mode: args.dryRun ? "dry-run" : "write",
|
|
540
|
+
resultCount: Array.isArray(result.writtenFiles) ? result.writtenFiles.length : 0,
|
|
541
|
+
errorCode: null
|
|
542
|
+
});
|
|
543
|
+
return toToolResult(result);
|
|
544
|
+
}
|
|
545
|
+
catch (error) {
|
|
546
|
+
logEvent("error", "tool.error", {
|
|
547
|
+
tool: "delete_suite",
|
|
548
|
+
target: args.id,
|
|
549
|
+
mode: args.dryRun ? "dry-run" : "write",
|
|
550
|
+
resultCount: 0,
|
|
551
|
+
errorCode: "delete_suite_failed"
|
|
552
|
+
});
|
|
553
|
+
return toToolError("failed to delete suite", "delete_suite_failed", {
|
|
554
|
+
cause: String(error)
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
server.registerTool("delete_case", {
|
|
559
|
+
title: "Delete case",
|
|
560
|
+
description: "Delete case by id with safety contract. dryRun=true returns deletion plan and impact only. Execution requires dryRun=false and confirm=true.",
|
|
561
|
+
inputSchema: deleteEntityInputSchema
|
|
562
|
+
}, async (args) => {
|
|
563
|
+
try {
|
|
564
|
+
logEvent("info", "tool.request", {
|
|
565
|
+
tool: "delete_case",
|
|
566
|
+
target: args.id,
|
|
567
|
+
mode: args.dryRun ? "dry-run" : "write"
|
|
568
|
+
});
|
|
569
|
+
const result = await deleteCaseCore(args);
|
|
570
|
+
logEvent("info", "tool.response", {
|
|
571
|
+
tool: "delete_case",
|
|
572
|
+
target: args.id,
|
|
573
|
+
mode: args.dryRun ? "dry-run" : "write",
|
|
574
|
+
resultCount: Array.isArray(result.writtenFiles) ? result.writtenFiles.length : 0,
|
|
575
|
+
errorCode: null
|
|
576
|
+
});
|
|
577
|
+
return toToolResult(result);
|
|
578
|
+
}
|
|
579
|
+
catch (error) {
|
|
580
|
+
logEvent("error", "tool.error", {
|
|
581
|
+
tool: "delete_case",
|
|
582
|
+
target: args.id,
|
|
583
|
+
mode: args.dryRun ? "dry-run" : "write",
|
|
584
|
+
resultCount: 0,
|
|
585
|
+
errorCode: "delete_case_failed"
|
|
586
|
+
});
|
|
587
|
+
return toToolError("failed to delete case", "delete_case_failed", {
|
|
588
|
+
cause: String(error)
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
return server;
|
|
593
|
+
}
|
|
594
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,4BAA4B,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AAC;QACL,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type LogLevel = "info" | "warn" | "error";
|
|
2
|
+
export type ToolResult = {
|
|
3
|
+
content: Array<{
|
|
4
|
+
type: "text";
|
|
5
|
+
text: string;
|
|
6
|
+
}>;
|
|
7
|
+
structuredContent?: Record<string, unknown>;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export interface NormalizationResult<T> {
|
|
11
|
+
entity: T;
|
|
12
|
+
warnings: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface FileWriteResult {
|
|
15
|
+
yamlText: string;
|
|
16
|
+
writtenFile: string | null;
|
|
17
|
+
}
|
|
18
|
+
export interface PromptExtraction {
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
warnings: string[];
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC;IACV,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|