@testingbot/mcp-server 1.1.6 → 1.3.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/README.md +140 -6
- package/dist/console-to-stderr.d.ts +2 -0
- package/dist/console-to-stderr.d.ts.map +1 -0
- package/dist/console-to-stderr.js +11 -0
- package/dist/console-to-stderr.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/tunnel-manager.d.ts +50 -0
- package/dist/lib/tunnel-manager.d.ts.map +1 -0
- package/dist/lib/tunnel-manager.js +106 -0
- package/dist/lib/tunnel-manager.js.map +1 -0
- package/dist/lib/types.d.ts +10 -3
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +35 -0
- package/dist/lib/utils.js.map +1 -1
- package/dist/prompts.d.ts +30 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +105 -0
- package/dist/prompts.js.map +1 -0
- package/dist/resources.d.ts +24 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +110 -0
- package/dist/resources.js.map +1 -0
- package/dist/server-factory.d.ts +14 -0
- package/dist/server-factory.d.ts.map +1 -1
- package/dist/server-factory.js +74 -16
- package/dist/server-factory.js.map +1 -1
- package/dist/tools/accessibility.d.ts +45 -0
- package/dist/tools/accessibility.d.ts.map +1 -0
- package/dist/tools/accessibility.js +153 -0
- package/dist/tools/accessibility.js.map +1 -0
- package/dist/tools/ai-analysis.d.ts +19 -0
- package/dist/tools/ai-analysis.d.ts.map +1 -0
- package/dist/tools/ai-analysis.js +128 -0
- package/dist/tools/ai-analysis.js.map +1 -0
- package/dist/tools/app-automate.js +1 -1
- package/dist/tools/app-automate.js.map +1 -1
- package/dist/tools/cdp.js +1 -1
- package/dist/tools/cdp.js.map +1 -1
- package/dist/tools/live.d.ts +6 -1
- package/dist/tools/live.d.ts.map +1 -1
- package/dist/tools/live.js +185 -37
- package/dist/tools/live.js.map +1 -1
- package/dist/tools/maestro.d.ts.map +1 -1
- package/dist/tools/maestro.js +8 -1
- package/dist/tools/maestro.js.map +1 -1
- package/dist/tools/screenshots.d.ts.map +1 -1
- package/dist/tools/screenshots.js +21 -2
- package/dist/tools/screenshots.js.map +1 -1
- package/dist/tools/storage.d.ts.map +1 -1
- package/dist/tools/storage.js +10 -4
- package/dist/tools/storage.js.map +1 -1
- package/dist/tools/team.js +16 -16
- package/dist/tools/team.js.map +1 -1
- package/dist/tools/tunnels.d.ts +2 -1
- package/dist/tools/tunnels.d.ts.map +1 -1
- package/dist/tools/tunnels.js +126 -5
- package/dist/tools/tunnels.js.map +1 -1
- package/dist/tools/visual.d.ts +41 -0
- package/dist/tools/visual.d.ts.map +1 -0
- package/dist/tools/visual.js +165 -0
- package/dist/tools/visual.js.map +1 -0
- package/package.json +7 -5
package/dist/prompts.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// MCP prompts (prompts/list, prompts/get): ready-made task recipes a client can
|
|
2
|
+
// offer as slash commands. Each one returns a single user message that tells the
|
|
3
|
+
// model which TestingBot tools and resources to use, in which order, and what to
|
|
4
|
+
// report. They only reference tools by name; nothing is called here.
|
|
5
|
+
function arg(args, name, fallback = "") {
|
|
6
|
+
const value = args[name];
|
|
7
|
+
return typeof value === "string" && value.trim() ? value.trim() : fallback;
|
|
8
|
+
}
|
|
9
|
+
export const PROMPTS = [
|
|
10
|
+
{
|
|
11
|
+
name: "why-did-my-test-fail",
|
|
12
|
+
title: "Why did my test fail?",
|
|
13
|
+
description: "Investigate one failed TestingBot test: status, AI failure analysis when enabled, and the failing log lines.",
|
|
14
|
+
arguments: [
|
|
15
|
+
{
|
|
16
|
+
name: "sessionId",
|
|
17
|
+
description: "Session ID (or numeric test ID) of the failed test.",
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
build: (args) => {
|
|
22
|
+
const id = arg(args, "sessionId");
|
|
23
|
+
return [
|
|
24
|
+
`Find out why TestingBot test ${id} failed.`,
|
|
25
|
+
"",
|
|
26
|
+
`1. Call getTestDetails for ${id} (or read the resource testingbot://tests/${id}) to get its status, status message, environment and which logs exist.`,
|
|
27
|
+
`2. If the analyzeTestFailure tool is available, call it for ${id}. If it reports that AI Analysis is not enabled, do not ask to enable it; carry on with the logs.`,
|
|
28
|
+
`3. Call getFailureLogs for ${id} with failuresOnly=true. Read the full log of one type only if the failing lines are not enough.`,
|
|
29
|
+
"4. Report: what the test was doing, the step that failed, the most likely cause (application bug, test script, environment or flaky), the log lines that show it, and one to three concrete fixes. Quote the evidence; say how sure you are and do not guess beyond it.",
|
|
30
|
+
].join("\n");
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "summarise-build",
|
|
35
|
+
title: "Summarise a build",
|
|
36
|
+
description: "Summarise a TestingBot build: pass/fail counts, the failures grouped by cause, and what to fix first.",
|
|
37
|
+
arguments: [
|
|
38
|
+
{
|
|
39
|
+
name: "buildId",
|
|
40
|
+
description: "ID of the build (from getBuilds).",
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
build: (args) => {
|
|
45
|
+
const id = arg(args, "buildId");
|
|
46
|
+
return [
|
|
47
|
+
`Summarise TestingBot build ${id}.`,
|
|
48
|
+
"",
|
|
49
|
+
`1. Call getTestsForBuild for build ${id} (or read testingbot://builds/${id}).`,
|
|
50
|
+
"2. Count passed, failed and unknown tests, and list the environments (browser/OS or device) they ran on.",
|
|
51
|
+
"3. For each failed test (at most 10), call getFailureLogs with failuresOnly=true. If analyzeTestFailure is available and enabled, use getAiFailureAnalysis to read existing analyses first; only start new ones for up to 3 tests.",
|
|
52
|
+
"4. Group the failures by shared cause (same error message, same environment, same step).",
|
|
53
|
+
"5. Report a short summary line, a table of failure groups with the affected tests and environments, and what to fix first. Mention tests that failed in one environment only.",
|
|
54
|
+
].join("\n");
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "find-flaky-tests",
|
|
59
|
+
title: "Find flaky tests",
|
|
60
|
+
description: "Find tests that both passed and failed recently and suggest why they are unstable.",
|
|
61
|
+
arguments: [
|
|
62
|
+
{
|
|
63
|
+
name: "timeRange",
|
|
64
|
+
description: "How far back to look, e.g. 7d or 30d (default 30d).",
|
|
65
|
+
required: false,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
build: (args) => {
|
|
69
|
+
const range = arg(args, "timeRange", "30d");
|
|
70
|
+
return [
|
|
71
|
+
`Find flaky TestingBot tests over the last ${range}.`,
|
|
72
|
+
"",
|
|
73
|
+
`1. Read the resource testingbot://insights/flaky-tests?time_range=${encodeURIComponent(range)}. It lists test names with their pass rate and a flaky flag, most flaky first.`,
|
|
74
|
+
"2. For the top 5 flaky tests, call getTests and pick one recent failed and one recent passed run of each; call getFailureLogs with failuresOnly=true on the failed run.",
|
|
75
|
+
"3. Look for timing problems (timeouts, waits, animations), order dependence, shared test data, or one environment failing more than others.",
|
|
76
|
+
"4. Report a ranked list: test name, pass rate, runs, the likely reason it is unstable, and a concrete change to make it stable.",
|
|
77
|
+
].join("\n");
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
export function listPrompts() {
|
|
82
|
+
return PROMPTS.map(({ name, title, description, arguments: args }) => ({
|
|
83
|
+
name,
|
|
84
|
+
title,
|
|
85
|
+
description,
|
|
86
|
+
arguments: args,
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
export function getPrompt(name, args = {}) {
|
|
90
|
+
const prompt = PROMPTS.find((p) => p.name === name);
|
|
91
|
+
if (!prompt)
|
|
92
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
93
|
+
for (const a of prompt.arguments) {
|
|
94
|
+
if (a.required && !arg(args, a.name)) {
|
|
95
|
+
throw new Error(`Prompt ${name} needs the argument "${a.name}"`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
description: prompt.description,
|
|
100
|
+
messages: [
|
|
101
|
+
{ role: "user", content: { type: "text", text: prompt.build(args) } },
|
|
102
|
+
],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,qEAAqE;AAgBrE,SAAS,GAAG,CAAC,IAA4B,EAAE,IAAY,EAAE,QAAQ,GAAG,EAAE;IACpE,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7E,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAuB;IACzC;QACE,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,8GAA8G;QAChH,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,qDAAqD;gBAClE,QAAQ,EAAE,IAAI;aACf;SACF;QACD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;YACd,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAClC,OAAO;gBACL,gCAAgC,EAAE,UAAU;gBAC5C,EAAE;gBACF,8BAA8B,EAAE,6CAA6C,EAAE,wEAAwE;gBACvJ,+DAA+D,EAAE,mGAAmG;gBACpK,8BAA8B,EAAE,kGAAkG;gBAClI,yQAAyQ;aAC1Q,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC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QACJ,KAAK;QACL,WAAW;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,OAA+B,EAAE;IACvE,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACpD,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;IACxD,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,wBAAwB,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IACD,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE;YACR,EAAE,IAAI,EAAE,MAAe,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE;SACxF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const RESOURCE_TEMPLATES: {
|
|
2
|
+
uriTemplate: string;
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
mimeType: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const STATIC_RESOURCES: {
|
|
9
|
+
uri: string;
|
|
10
|
+
name: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
mimeType: string;
|
|
14
|
+
}[];
|
|
15
|
+
type Contents = {
|
|
16
|
+
uri: string;
|
|
17
|
+
mimeType: string;
|
|
18
|
+
text: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function readResource(testingBotApi: any, uri: string): Promise<{
|
|
21
|
+
contents: Contents[];
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,kBAAkB;;;;;;GAuB9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;GAS5B,CAAC;AAEF,KAAK,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAoBhE,wBAAsB,YAAY,CAChC,aAAa,EAAE,GAAG,EAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;CAAE,CAAC,CAiDnC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { sanitizeSessionId } from "./lib/utils.js";
|
|
2
|
+
// MCP resources (resources/list, resources/templates/list, resources/read):
|
|
3
|
+
// read-only TestingBot data a client can attach to a conversation.
|
|
4
|
+
//
|
|
5
|
+
// testingbot://tests/{sessionId} test details (JSON)
|
|
6
|
+
// testingbot://tests/{sessionId}/logs/{logType} one session log (text, tail)
|
|
7
|
+
// testingbot://builds/{buildId} tests in a build (JSON)
|
|
8
|
+
// testingbot://insights/flaky-tests most flaky tests (JSON)
|
|
9
|
+
const LOG_TYPES = ["selenium", "browser", "chrome", "vm", "appium"];
|
|
10
|
+
const MAX_LOG_BYTES = 200_000;
|
|
11
|
+
const LOG_TIMEOUT_MS = 15_000;
|
|
12
|
+
export const RESOURCE_TEMPLATES = [
|
|
13
|
+
{
|
|
14
|
+
uriTemplate: "testingbot://tests/{sessionId}",
|
|
15
|
+
name: "test",
|
|
16
|
+
title: "TestingBot test",
|
|
17
|
+
description: "Status, environment, duration, build and asset links of one test (session ID or numeric test ID).",
|
|
18
|
+
mimeType: "application/json",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
uriTemplate: "testingbot://tests/{sessionId}/logs/{logType}",
|
|
22
|
+
name: "test-log",
|
|
23
|
+
title: "TestingBot test log",
|
|
24
|
+
description: `One log file of a test, the last ${MAX_LOG_BYTES / 1000} KB. logType: ${LOG_TYPES.join(", ")}.`,
|
|
25
|
+
mimeType: "text/plain",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
uriTemplate: "testingbot://builds/{buildId}",
|
|
29
|
+
name: "build",
|
|
30
|
+
title: "TestingBot build",
|
|
31
|
+
description: "The tests in a build with their status.",
|
|
32
|
+
mimeType: "application/json",
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
export const STATIC_RESOURCES = [
|
|
36
|
+
{
|
|
37
|
+
uri: "testingbot://insights/flaky-tests",
|
|
38
|
+
name: "flaky-tests",
|
|
39
|
+
title: "Flaky tests",
|
|
40
|
+
description: "Tests that both passed and failed in the last 30 days, most flaky first. Add ?time_range=7d to change the window.",
|
|
41
|
+
mimeType: "application/json",
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
function json(uri, body) {
|
|
45
|
+
return { uri, mimeType: "application/json", text: JSON.stringify(body, null, 2) };
|
|
46
|
+
}
|
|
47
|
+
function cleanId(raw) {
|
|
48
|
+
const id = sanitizeSessionId(decodeURIComponent(raw));
|
|
49
|
+
if (!id)
|
|
50
|
+
throw new Error("Empty ID in resource URI");
|
|
51
|
+
return id;
|
|
52
|
+
}
|
|
53
|
+
async function fetchLogTail(url) {
|
|
54
|
+
const response = await fetch(url, { signal: AbortSignal.timeout(LOG_TIMEOUT_MS) });
|
|
55
|
+
if (!response.ok)
|
|
56
|
+
throw new Error(`HTTP ${response.status} fetching log`);
|
|
57
|
+
const text = await response.text();
|
|
58
|
+
if (text.length <= MAX_LOG_BYTES)
|
|
59
|
+
return text;
|
|
60
|
+
return `… (truncated ${text.length - MAX_LOG_BYTES} bytes) …\n` + text.slice(-MAX_LOG_BYTES);
|
|
61
|
+
}
|
|
62
|
+
export async function readResource(testingBotApi, uri) {
|
|
63
|
+
let parsed;
|
|
64
|
+
try {
|
|
65
|
+
parsed = new URL(uri);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
throw new Error(`Invalid resource URI: ${uri}`);
|
|
69
|
+
}
|
|
70
|
+
if (parsed.protocol !== "testingbot:")
|
|
71
|
+
throw new Error(`Unknown resource URI: ${uri}`);
|
|
72
|
+
// For testingbot://tests/abc the "host" is "tests" and the path is "/abc".
|
|
73
|
+
const parts = [parsed.host, ...parsed.pathname.split("/").filter(Boolean)];
|
|
74
|
+
if (parts[0] === "tests" && parts.length === 2) {
|
|
75
|
+
const test = await testingBotApi.getTestDetails(cleanId(parts[1]), {
|
|
76
|
+
skip_fields: "steps",
|
|
77
|
+
});
|
|
78
|
+
return { contents: [json(uri, test)] };
|
|
79
|
+
}
|
|
80
|
+
if (parts[0] === "tests" && parts.length === 4 && parts[2] === "logs") {
|
|
81
|
+
const id = cleanId(parts[1]);
|
|
82
|
+
const logType = parts[3];
|
|
83
|
+
if (!LOG_TYPES.includes(logType)) {
|
|
84
|
+
throw new Error(`Unknown log type "${logType}". Use one of: ${LOG_TYPES.join(", ")}`);
|
|
85
|
+
}
|
|
86
|
+
const test = await testingBotApi.getTestDetails(id);
|
|
87
|
+
const url = test?.logs && typeof test.logs === "object" ? test.logs[logType] : undefined;
|
|
88
|
+
if (!url)
|
|
89
|
+
throw new Error(`Test ${id} has no ${logType} log`);
|
|
90
|
+
return { contents: [{ uri, mimeType: "text/plain", text: await fetchLogTail(url) }] };
|
|
91
|
+
}
|
|
92
|
+
if (parts[0] === "builds" && parts.length === 2) {
|
|
93
|
+
const tests = await testingBotApi.getTestsForBuild(cleanId(parts[1]));
|
|
94
|
+
return { contents: [json(uri, tests)] };
|
|
95
|
+
}
|
|
96
|
+
if (parts[0] === "insights" && parts[1] === "flaky-tests" && parts.length === 2) {
|
|
97
|
+
const range = parsed.searchParams.get("time_range") || "30d";
|
|
98
|
+
if (!/^\d{1,3}[hdw]$/.test(range))
|
|
99
|
+
throw new Error("time_range must look like 24h, 7d or 4w");
|
|
100
|
+
const body = await testingBotApi.request({
|
|
101
|
+
method: "GET",
|
|
102
|
+
url: "/insights/test-cases",
|
|
103
|
+
data: { sort: "flaky", sort_order: "desc", time_range: range, count: 50 },
|
|
104
|
+
});
|
|
105
|
+
const rows = Array.isArray(body?.data) ? body.data.filter((r) => r?.flaky) : [];
|
|
106
|
+
return { contents: [json(uri, { time_range: range, flaky_tests: rows, meta: body?.meta })] };
|
|
107
|
+
}
|
|
108
|
+
throw new Error(`Unknown resource URI: ${uri}`);
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,4EAA4E;AAC5E,mEAAmE;AACnE,EAAE;AACF,wEAAwE;AACxE,iFAAiF;AACjF,4EAA4E;AAC5E,4EAA4E;AAE5E,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AACpE,MAAM,aAAa,GAAG,OAAO,CAAC;AAC9B,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;QACE,WAAW,EAAE,gCAAgC;QAC7C,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,mGAAmG;QACrG,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,UAAU;QAChB,KAAK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E,CAAC;QAChF,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC;QAC7D,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC9F,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC;YACvC,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,sBAAsB;YAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;SAC1E,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACrF,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;IAC/F,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAC;AAClD,CAAC"}
|
package/dist/server-factory.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Server as McpServer } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
2
|
import { TestingBotConfig } from "./lib/types.js";
|
|
3
|
+
import { toolInputSchema } from "@testingbot/automation-mcp";
|
|
3
4
|
export declare class TestingBotMcpServer {
|
|
4
5
|
server: McpServer;
|
|
5
6
|
tools: Record<string, any>;
|
|
@@ -9,6 +10,18 @@ export declare class TestingBotMcpServer {
|
|
|
9
10
|
private closing;
|
|
10
11
|
constructor(testingBotApi: any, config: TestingBotConfig);
|
|
11
12
|
private setupHandlers;
|
|
13
|
+
handleResourceRead(uri: string): Promise<{
|
|
14
|
+
contents: {
|
|
15
|
+
uri: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
listTools(): Array<{
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
inputSchema: any;
|
|
24
|
+
}>;
|
|
12
25
|
handleToolCall(toolName: string, toolArgs: any): Promise<any>;
|
|
13
26
|
private hasCredentials;
|
|
14
27
|
reinitializeAfterLogin(): Promise<void>;
|
|
@@ -30,4 +43,5 @@ export declare class TestingBotMcpServer {
|
|
|
30
43
|
run(): Promise<void>;
|
|
31
44
|
close(): Promise<void>;
|
|
32
45
|
}
|
|
46
|
+
export { toolInputSchema };
|
|
33
47
|
//# sourceMappingURL=server-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-factory.d.ts","sourceRoot":"","sources":["../src/server-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"server-factory.d.ts","sourceRoot":"","sources":["../src/server-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAahF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA0BlD,OAAO,EAIL,eAAe,EAEhB,MAAM,4BAA4B,CAAC;AAEpC,qBAAa,mBAAmB;IACvB,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACvC,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,UAAU,CAAiC;IACnD,OAAO,CAAC,OAAO,CAAS;gBAEZ,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,gBAAgB;IA2BxD,OAAO,CAAC,aAAa;IAsCR,kBAAkB,CAAC,GAAG,EAAE,MAAM;;;;;;;IAepC,SAAS,IAAI,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,GAAG,CAAA;KAAE,CAAC;IAUrE,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAgC1E,OAAO,CAAC,cAAc;IAST,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAkCpD,OAAO,CAAC,kBAAkB;IA8B1B;;;;;OAKG;YACW,uBAAuB;IAM9B,IAAI,CACT,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC;;;;wBAApB,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC;;IAezB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAgC1B,GAAG;IAQH,KAAK;CA0BnB;AAID,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/server-factory.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Server as McpServer } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
-
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { CallToolRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema, ListResourceTemplatesRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import { getPrompt, listPrompts } from "./prompts.js";
|
|
5
|
+
import { RESOURCE_TEMPLATES, STATIC_RESOURCES, readResource } from "./resources.js";
|
|
4
6
|
import logger from "./lib/logger.js";
|
|
5
7
|
import { createRequire } from "module";
|
|
6
8
|
const require = createRequire(import.meta.url);
|
|
@@ -15,12 +17,16 @@ import addLiveTools from "./tools/live.js";
|
|
|
15
17
|
import addTeamTools from "./tools/team.js";
|
|
16
18
|
import addCdpTools from "./tools/cdp.js";
|
|
17
19
|
import addTunnelTools from "./tools/tunnels.js";
|
|
20
|
+
import { tunnelManager } from "./lib/tunnel-manager.js";
|
|
18
21
|
import addLogTools from "./tools/logs.js";
|
|
22
|
+
import addVisualTools from "./tools/visual.js";
|
|
23
|
+
import addAccessibilityTools from "./tools/accessibility.js";
|
|
24
|
+
import addAiAnalysisTools from "./tools/ai-analysis.js";
|
|
19
25
|
import addProjectTools from "./tools/project.js";
|
|
20
26
|
import addMaestroTools from "./tools/maestro.js";
|
|
21
27
|
import addAppAutomateTools from "./tools/app-automate.js";
|
|
22
28
|
import addAuthTools from "./tools/auth.js";
|
|
23
|
-
import { addAutomationTools } from "@testingbot/automation-mcp";
|
|
29
|
+
import { addAutomationTools, invalidArgsResult, parseToolArgs, toolInputSchema, } from "@testingbot/automation-mcp";
|
|
24
30
|
export class TestingBotMcpServer {
|
|
25
31
|
server;
|
|
26
32
|
tools = {};
|
|
@@ -39,6 +45,11 @@ export class TestingBotMcpServer {
|
|
|
39
45
|
// listChanged lets us notify clients when tb_login re-registers
|
|
40
46
|
// credential-dependent (automation) tools after a successful login.
|
|
41
47
|
tools: { listChanged: true },
|
|
48
|
+
// Task recipes ("why did my test fail", "summarise a build", "find
|
|
49
|
+
// flaky tests") and read-only test/build/log data (src/prompts.ts,
|
|
50
|
+
// src/resources.ts).
|
|
51
|
+
prompts: {},
|
|
52
|
+
resources: {},
|
|
42
53
|
},
|
|
43
54
|
});
|
|
44
55
|
this.registerLocalTools();
|
|
@@ -47,19 +58,7 @@ export class TestingBotMcpServer {
|
|
|
47
58
|
setupHandlers() {
|
|
48
59
|
// Handle tools/list request
|
|
49
60
|
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
50
|
-
return {
|
|
51
|
-
tools: Object.values(this.tools).map((tool) => ({
|
|
52
|
-
name: tool.name,
|
|
53
|
-
description: tool.description,
|
|
54
|
-
// Proxied tools (e.g. appium-mcp) pre-stash a raw JSON Schema on the
|
|
55
|
-
// tool object. Honor it; otherwise serialize the Zod-style dict.
|
|
56
|
-
inputSchema: tool.inputSchema ?? {
|
|
57
|
-
type: "object",
|
|
58
|
-
properties: tool.schema,
|
|
59
|
-
required: Object.keys(tool.schema).filter((key) => !tool.schema[key].isOptional?.()),
|
|
60
|
-
},
|
|
61
|
-
})),
|
|
62
|
-
};
|
|
61
|
+
return { tools: this.listTools() };
|
|
63
62
|
});
|
|
64
63
|
// Handle tools/call request
|
|
65
64
|
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
@@ -68,6 +67,37 @@ export class TestingBotMcpServer {
|
|
|
68
67
|
logger.info({ tool: toolName, args: toolArgs }, "Tool called");
|
|
69
68
|
return this.handleToolCall(toolName, toolArgs);
|
|
70
69
|
});
|
|
70
|
+
this.server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
71
|
+
prompts: listPrompts(),
|
|
72
|
+
}));
|
|
73
|
+
this.server.setRequestHandler(GetPromptRequestSchema, async (request) => getPrompt(request.params.name, (request.params.arguments ?? {})));
|
|
74
|
+
this.server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
75
|
+
resources: STATIC_RESOURCES,
|
|
76
|
+
}));
|
|
77
|
+
this.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({
|
|
78
|
+
resourceTemplates: RESOURCE_TEMPLATES,
|
|
79
|
+
}));
|
|
80
|
+
this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => this.handleResourceRead(request.params.uri));
|
|
81
|
+
}
|
|
82
|
+
// Same degraded-mode rule as tools: without credentials, say how to log in.
|
|
83
|
+
async handleResourceRead(uri) {
|
|
84
|
+
if (!this.hasCredentials()) {
|
|
85
|
+
throw new Error("No TestingBot credentials configured. Run the tb_login tool to authenticate, or set TESTINGBOT_KEY and TESTINGBOT_SECRET.");
|
|
86
|
+
}
|
|
87
|
+
logger.info({ uri }, "Resource read");
|
|
88
|
+
return readResource(this.testingBotApi, uri);
|
|
89
|
+
}
|
|
90
|
+
// The tools/list payload. Proxied tools (e.g. appium-mcp) pre-stash a raw
|
|
91
|
+
// JSON Schema on the tool object; honor it. Local tools carry a dict of Zod
|
|
92
|
+
// types, which must be converted: putting the Zod objects straight into
|
|
93
|
+
// `properties` published their internals (`_def`, `~standard`) instead of
|
|
94
|
+
// JSON Schema, so clients could neither validate nor prompt for arguments.
|
|
95
|
+
listTools() {
|
|
96
|
+
return Object.values(this.tools).map((tool) => ({
|
|
97
|
+
name: tool.name,
|
|
98
|
+
description: tool.description,
|
|
99
|
+
inputSchema: tool.inputSchema ?? toolInputSchema(tool.schema),
|
|
100
|
+
}));
|
|
71
101
|
}
|
|
72
102
|
// Dispatch a single tool call, applying the degraded-mode credential gate.
|
|
73
103
|
// Extracted from the request handler so the gate is unit-testable.
|
|
@@ -91,7 +121,16 @@ export class TestingBotMcpServer {
|
|
|
91
121
|
isError: true,
|
|
92
122
|
};
|
|
93
123
|
}
|
|
94
|
-
|
|
124
|
+
// Proxied tools (appium-mcp) carry a raw JSON Schema and check their own
|
|
125
|
+
// arguments. Local tools are parsed against their Zod shape, so a missing
|
|
126
|
+
// or wrong argument comes back as a clear message instead of a crash
|
|
127
|
+
// inside the handler, and handlers get defaults and coercions applied.
|
|
128
|
+
if (tool.inputSchema)
|
|
129
|
+
return tool.handler(toolArgs);
|
|
130
|
+
const parsed = parseToolArgs(tool.schema, toolArgs);
|
|
131
|
+
if (!parsed.success)
|
|
132
|
+
return invalidArgsResult(toolName, parsed.message);
|
|
133
|
+
return tool.handler(parsed.data);
|
|
95
134
|
}
|
|
96
135
|
hasCredentials() {
|
|
97
136
|
return Boolean(this.config["testingbot-key"] && this.config["testingbot-secret"]);
|
|
@@ -146,6 +185,9 @@ export class TestingBotMcpServer {
|
|
|
146
185
|
addCdpTools,
|
|
147
186
|
addTunnelTools,
|
|
148
187
|
addLogTools,
|
|
188
|
+
addVisualTools,
|
|
189
|
+
addAccessibilityTools,
|
|
190
|
+
addAiAnalysisTools,
|
|
149
191
|
addProjectTools,
|
|
150
192
|
addMaestroTools,
|
|
151
193
|
addAppAutomateTools,
|
|
@@ -220,6 +262,19 @@ export class TestingBotMcpServer {
|
|
|
220
262
|
if (this.automation) {
|
|
221
263
|
await this.automation.shutdown();
|
|
222
264
|
}
|
|
265
|
+
}
|
|
266
|
+
catch (error) {
|
|
267
|
+
logger.error({ error }, "Error while closing automation sessions");
|
|
268
|
+
}
|
|
269
|
+
try {
|
|
270
|
+
// Tunnels started via startTunnel are local Java processes; stop them so
|
|
271
|
+
// they don't outlive the server.
|
|
272
|
+
await tunnelManager.stopAll();
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
logger.error({ error }, "Error while stopping tunnels");
|
|
276
|
+
}
|
|
277
|
+
try {
|
|
223
278
|
await this.server.close();
|
|
224
279
|
}
|
|
225
280
|
catch (error) {
|
|
@@ -227,4 +282,7 @@ export class TestingBotMcpServer {
|
|
|
227
282
|
}
|
|
228
283
|
}
|
|
229
284
|
}
|
|
285
|
+
// Shared with @testingbot/automation-mcp: one Zod → JSON Schema conversion for
|
|
286
|
+
// every tool this server lists, and the same argument checks.
|
|
287
|
+
export { toolInputSchema };
|
|
230
288
|
//# sourceMappingURL=server-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-factory.js","sourceRoot":"","sources":["../src/server-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA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8B,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,gCAAgC,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF;AAED,+EAA+E;AAC/E,8DAA8D;AAC9D,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TestingBotConfig } from "../lib/types.js";
|
|
2
|
+
interface Severity {
|
|
3
|
+
critical: number;
|
|
4
|
+
serious: number;
|
|
5
|
+
moderate: number;
|
|
6
|
+
minor: number;
|
|
7
|
+
}
|
|
8
|
+
interface RunSummary {
|
|
9
|
+
id: number;
|
|
10
|
+
test_id: number;
|
|
11
|
+
state: string;
|
|
12
|
+
passed: boolean | null;
|
|
13
|
+
score: number | null;
|
|
14
|
+
wcag_issues_count: number | null;
|
|
15
|
+
needs_review_count: number | null;
|
|
16
|
+
recommendations_count: number | null;
|
|
17
|
+
severity: Severity | null;
|
|
18
|
+
created_at?: string;
|
|
19
|
+
run_url?: string;
|
|
20
|
+
}
|
|
21
|
+
interface Rule {
|
|
22
|
+
rule: string;
|
|
23
|
+
impact?: string | null;
|
|
24
|
+
help?: string | null;
|
|
25
|
+
help_url?: string | null;
|
|
26
|
+
wcag?: string[];
|
|
27
|
+
elements_count: number;
|
|
28
|
+
elements: Array<{
|
|
29
|
+
target: string[];
|
|
30
|
+
html?: string;
|
|
31
|
+
impact?: string | null;
|
|
32
|
+
failure_summary?: string | null;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
interface RunDetail extends RunSummary {
|
|
36
|
+
violations: Rule[];
|
|
37
|
+
recommendations: Rule[];
|
|
38
|
+
needs_review: Rule[];
|
|
39
|
+
new_violations: string[] | null;
|
|
40
|
+
resolved_violations: string[] | null;
|
|
41
|
+
}
|
|
42
|
+
export declare function formatRunDetail(run: RunDetail): string;
|
|
43
|
+
export default function addAccessibilityTools(server: any, testingBotApi: any, _config: TestingBotConfig): Record<string, any>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=accessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/tools/accessibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAYnD,UAAU,QAAQ;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,IAAI;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC;QACd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