@testingbot/mcp-server 1.0.0 → 1.0.1
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 +2 -3
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +18 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/constants.d.ts +32 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +32 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/error.d.ts +14 -0
- package/dist/lib/error.d.ts.map +1 -0
- package/dist/lib/error.js +27 -0
- package/dist/lib/error.js.map +1 -0
- package/dist/lib/get-auth.d.ts +6 -0
- package/dist/lib/get-auth.d.ts.map +1 -0
- package/dist/lib/get-auth.js +7 -0
- package/dist/lib/get-auth.js.map +1 -0
- package/dist/lib/logger.d.ts +4 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +51 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/types.d.ts +64 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +12 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +40 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/server-factory.d.ts +19 -0
- package/dist/server-factory.d.ts.map +1 -0
- package/dist/server-factory.js +98 -0
- package/dist/server-factory.js.map +1 -0
- package/dist/tools/browsers.d.ts +3 -0
- package/dist/tools/browsers.d.ts.map +1 -0
- package/dist/tools/browsers.js +73 -0
- package/dist/tools/browsers.js.map +1 -0
- package/dist/tools/builds.d.ts +3 -0
- package/dist/tools/builds.d.ts.map +1 -0
- package/dist/tools/builds.js +115 -0
- package/dist/tools/builds.js.map +1 -0
- package/dist/tools/cdp.d.ts +3 -0
- package/dist/tools/cdp.d.ts.map +1 -0
- package/dist/tools/cdp.js +78 -0
- package/dist/tools/cdp.js.map +1 -0
- package/dist/tools/live.d.ts +3 -0
- package/dist/tools/live.d.ts.map +1 -0
- package/dist/tools/live.js +221 -0
- package/dist/tools/live.js.map +1 -0
- package/dist/tools/screenshots.d.ts +3 -0
- package/dist/tools/screenshots.d.ts.map +1 -0
- package/dist/tools/screenshots.js +132 -0
- package/dist/tools/screenshots.js.map +1 -0
- package/dist/tools/storage.d.ts +3 -0
- package/dist/tools/storage.d.ts.map +1 -0
- package/dist/tools/storage.js +114 -0
- package/dist/tools/storage.js.map +1 -0
- package/dist/tools/team.d.ts +3 -0
- package/dist/tools/team.d.ts.map +1 -0
- package/dist/tools/team.js +171 -0
- package/dist/tools/team.js.map +1 -0
- package/dist/tools/tests.d.ts +3 -0
- package/dist/tools/tests.d.ts.map +1 -0
- package/dist/tools/tests.js +307 -0
- package/dist/tools/tests.js.map +1 -0
- package/dist/tools/tunnels.d.ts +3 -0
- package/dist/tools/tunnels.d.ts.map +1 -0
- package/dist/tools/tunnels.js +74 -0
- package/dist/tools/tunnels.js.map +1 -0
- package/dist/tools/user.d.ts +3 -0
- package/dist/tools/user.d.ts.map +1 -0
- package/dist/tools/user.js +65 -0
- package/dist/tools/user.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleMCPError } from "../lib/utils.js";
|
|
3
|
+
import logger from "../lib/logger.js";
|
|
4
|
+
export default function addBrowserTools(server, testingBotApi, _config) {
|
|
5
|
+
const tools = {};
|
|
6
|
+
tools.getBrowsers = server.tool("getBrowsers", "Get list of available browsers and platforms for testing. Optionally filter by type (web or mobile).", {
|
|
7
|
+
type: z.enum(["web", "mobile"]).optional().describe("Filter browsers by type"),
|
|
8
|
+
}, async (args) => {
|
|
9
|
+
try {
|
|
10
|
+
logger.info({ type: args.type }, "Fetching browsers");
|
|
11
|
+
const browsers = await testingBotApi.getBrowsers(args.type);
|
|
12
|
+
let formattedOutput = "## Available Browsers\n\n";
|
|
13
|
+
if (Array.isArray(browsers)) {
|
|
14
|
+
browsers.forEach((browser) => {
|
|
15
|
+
formattedOutput += `### ${browser.name || browser.browserName}\n`;
|
|
16
|
+
formattedOutput += `- **Platform**: ${browser.platform || browser.os}\n`;
|
|
17
|
+
formattedOutput += `- **Version**: ${browser.version || browser.browserVersion}\n`;
|
|
18
|
+
if (browser.device) {
|
|
19
|
+
formattedOutput += `- **Device**: ${browser.device}\n`;
|
|
20
|
+
}
|
|
21
|
+
formattedOutput += "\n";
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
formattedOutput = JSON.stringify(browsers, null, 2);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
content: [
|
|
29
|
+
{
|
|
30
|
+
type: "text",
|
|
31
|
+
text: formattedOutput,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
return handleMCPError("getBrowsers", error);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
tools.getDevices = server.tool("getDevices", "Get list of available mobile devices for testing (real devices and simulators).", {}, async () => {
|
|
41
|
+
try {
|
|
42
|
+
logger.info("Fetching devices");
|
|
43
|
+
const devices = await testingBotApi.getDevices();
|
|
44
|
+
let formattedOutput = "## Available Devices\n\n";
|
|
45
|
+
if (Array.isArray(devices)) {
|
|
46
|
+
devices.forEach((device) => {
|
|
47
|
+
formattedOutput += `### ${device.name}\n`;
|
|
48
|
+
formattedOutput += `- **ID**: ${device.id}\n`;
|
|
49
|
+
formattedOutput += `- **Platform**: ${device.platform}\n`;
|
|
50
|
+
formattedOutput += `- **Version**: ${device.version}\n`;
|
|
51
|
+
formattedOutput += `- **Available**: ${device.available ? "Yes" : "No"}\n`;
|
|
52
|
+
formattedOutput += "\n";
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
formattedOutput = JSON.stringify(devices, null, 2);
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
content: [
|
|
60
|
+
{
|
|
61
|
+
type: "text",
|
|
62
|
+
text: formattedOutput,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
return handleMCPError("getDevices", error);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return tools;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=browsers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browsers.js","sourceRoot":"","sources":["../../src/tools/browsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,MAAW,EACX,aAAkB,EAClB,OAAyB;IAEzB,MAAM,KAAK,GAAwB,EAAE,CAAC;IAEtC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAC7B,aAAa,EACb,sGAAsG,EACtG;QACE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KAC/E,EACD,KAAK,EAAE,IAAiC,EAAE,EAAE;QAC1C,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC;YAEtD,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE5D,IAAI,eAAe,GAAG,2BA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EAAE,CAAC;gBAC3B,OAAO,CAAC,OAAO,CAAC,CAAC,MAAW,EAAE,EAAE;oBAC9B,eAAe,IAAI,OAAO,MAAM,CAAC,IAAI,IAAI,CAAC;oBAC1C,eAAe,IAAI,aAAa,MAAM,CAAC,EAAE,IAAI,CAAC;oBAC9C,eAAe,IAAI,mBAAmB,MAAM,CAAC,QAAQ,IAAI,CAAC;oBAC1D,eAAe,IAAI,kBAAkB,MAAM,CAAC,OAAO,IAAI,CAAC;oBACxD,eAAe,IAAI,oBAAoB,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;oBAC3E,eAAe,IAAI,IAAI,CAAC;gBAC1B,CAAC,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACrD,CAAC;YAED,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,eAAe;qBACtB;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builds.d.ts","sourceRoot":"","sources":["../../src/tools/builds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,gBAAgB,uBAyI/F"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleMCPError } from "../lib/utils.js";
|
|
3
|
+
import logger from "../lib/logger.js";
|
|
4
|
+
export default function addBuildTools(server, testingBotApi, _config) {
|
|
5
|
+
const tools = {};
|
|
6
|
+
tools.getBuilds = server.tool("getBuilds", "Get a list of builds with optional pagination. Builds group related tests together.", {
|
|
7
|
+
offset: z
|
|
8
|
+
.union([z.number(), z.string().transform(Number)])
|
|
9
|
+
.pipe(z.number().min(0))
|
|
10
|
+
.optional()
|
|
11
|
+
.default(0)
|
|
12
|
+
.describe("Offset for pagination (default: 0)"),
|
|
13
|
+
limit: z
|
|
14
|
+
.union([z.number(), z.string().transform(Number)])
|
|
15
|
+
.pipe(z.number().min(1).max(100))
|
|
16
|
+
.optional()
|
|
17
|
+
.default(10)
|
|
18
|
+
.describe("Number of builds to retrieve (default: 10, max: 100)"),
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
try {
|
|
21
|
+
const offset = Number(args.offset ?? 0);
|
|
22
|
+
const limit = Number(args.limit ?? 10);
|
|
23
|
+
logger.info({ offset, limit }, "Fetching builds");
|
|
24
|
+
const response = await testingBotApi.getBuilds(offset, limit);
|
|
25
|
+
const builds = response?.data || [];
|
|
26
|
+
let formattedOutput = `## Recent Builds (showing ${limit} from offset ${offset})\n\n`;
|
|
27
|
+
if (builds.length > 0) {
|
|
28
|
+
builds.forEach((build) => {
|
|
29
|
+
formattedOutput += `### Build: ${build.name || build.id}\n`;
|
|
30
|
+
formattedOutput += `- **ID**: ${build.id}\n`;
|
|
31
|
+
formattedOutput += `- **Tests**: ${build.tests || 0}\n`;
|
|
32
|
+
formattedOutput += `- **Created**: ${build.created_at}\n`;
|
|
33
|
+
formattedOutput += "\n";
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
formattedOutput += "No builds found.\n";
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
content: [
|
|
41
|
+
{
|
|
42
|
+
type: "text",
|
|
43
|
+
text: formattedOutput,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return handleMCPError("getBuilds", error);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
tools.getTestsForBuild = server.tool("getTestsForBuild", "Get all tests associated with a specific build ID.", {
|
|
53
|
+
buildId: z
|
|
54
|
+
.union([z.number(), z.string().transform(Number)])
|
|
55
|
+
.pipe(z.number())
|
|
56
|
+
.describe("The build ID"),
|
|
57
|
+
}, async (args) => {
|
|
58
|
+
try {
|
|
59
|
+
const buildId = Number(args.buildId);
|
|
60
|
+
logger.info({ buildId }, "Fetching tests for build");
|
|
61
|
+
const response = await testingBotApi.getTestsForBuild(buildId);
|
|
62
|
+
const tests = response?.data || [];
|
|
63
|
+
let formattedOutput = `## Tests for Build ${buildId}\n\n`;
|
|
64
|
+
if (tests.length > 0) {
|
|
65
|
+
tests.forEach((test) => {
|
|
66
|
+
formattedOutput += `### Test ${test.session_id}\n`;
|
|
67
|
+
formattedOutput += `- **Status**: ${test.status}\n`;
|
|
68
|
+
formattedOutput += `- **Browser**: ${test.browser} ${test.version}\n`;
|
|
69
|
+
formattedOutput += `- **Platform**: ${test.platform}\n`;
|
|
70
|
+
formattedOutput += `- **Duration**: ${test.duration}s\n`;
|
|
71
|
+
formattedOutput += "\n";
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
formattedOutput += "No tests found for this build.\n";
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
content: [
|
|
79
|
+
{
|
|
80
|
+
type: "text",
|
|
81
|
+
text: formattedOutput,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return handleMCPError("getTestsForBuild", error);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
tools.deleteBuild = server.tool("deleteBuild", "Delete a build and all its associated tests by build ID.", {
|
|
91
|
+
buildId: z
|
|
92
|
+
.union([z.number(), z.string().transform(Number)])
|
|
93
|
+
.pipe(z.number())
|
|
94
|
+
.describe("The build ID to delete"),
|
|
95
|
+
}, async (args) => {
|
|
96
|
+
try {
|
|
97
|
+
const buildId = Number(args.buildId);
|
|
98
|
+
logger.info({ buildId }, "Deleting build");
|
|
99
|
+
await testingBotApi.deleteBuild(buildId);
|
|
100
|
+
return {
|
|
101
|
+
content: [
|
|
102
|
+
{
|
|
103
|
+
type: "text",
|
|
104
|
+
text: `Build ${buildId} deleted successfully.`,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
return handleMCPError("deleteBuild", error);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
return tools;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=builds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builds.js","sourceRoot":"","sources":["../../src/tools/builds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,MAAW,EAAE,aAAkB,EAAE,OAAyB;IAC9F,MAAM,KAAK,GAAwB,EAAE,CAAC;IAEtC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,CAC3B,WAAW,EACX,qFAAqF,EACrF;QACE,MAAM,EAAE,CAAC;aACN,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;aACjD,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;aACvB,QAAQ,EAAE;aACV,OAAO,CAAC,CAAC,CAAC;aACV,QAAQ,C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P;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,SAAS,OAAO,wBAAwB;qBAC/C;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,cAAc,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../../src/tools/cdp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,gBAAgB,uBA8F7F"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleMCPError } from "../lib/utils.js";
|
|
3
|
+
import logger from "../lib/logger.js";
|
|
4
|
+
export default function addCdpTools(server, testingBotApi, _config) {
|
|
5
|
+
const tools = {};
|
|
6
|
+
tools.createCdpSession = server.tool("createCdpSession", "Create a remote browser session on TestingBot and get its CDP (Chrome DevTools Protocol) URL for direct browser control. Use this to automate browsers via CDP clients like Puppeteer or Playwright.", {
|
|
7
|
+
browserName: z.string().describe("Browser name (chrome, firefox, edge, safari)"),
|
|
8
|
+
browserVersion: z
|
|
9
|
+
.string()
|
|
10
|
+
.optional()
|
|
11
|
+
.default("latest")
|
|
12
|
+
.describe("Browser version (default: 'latest')"),
|
|
13
|
+
platform: z.string().describe("Platform/OS (WIN11, WIN10, MONTEREY, BIGSUR, etc.)"),
|
|
14
|
+
screenResolution: z.string().optional().describe("Screen resolution (e.g., '1920x1080')"),
|
|
15
|
+
timeZone: z.string().optional().describe("Time zone (e.g., 'America/New_York')"),
|
|
16
|
+
name: z.string().optional().describe("Session name for identification"),
|
|
17
|
+
build: z.string().optional().describe("Build identifier"),
|
|
18
|
+
extraCapabilities: z
|
|
19
|
+
.record(z.any())
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Additional capabilities as key-value pairs"),
|
|
22
|
+
}, async (args) => {
|
|
23
|
+
try {
|
|
24
|
+
logger.info({ browser: args.browserName, platform: args.platform }, "Creating CDP session");
|
|
25
|
+
// Build capabilities object
|
|
26
|
+
const capabilities = {
|
|
27
|
+
browserName: args.browserName,
|
|
28
|
+
browserVersion: args.browserVersion || "latest",
|
|
29
|
+
platform: args.platform,
|
|
30
|
+
};
|
|
31
|
+
if (args.screenResolution) {
|
|
32
|
+
capabilities.screenResolution = args.screenResolution;
|
|
33
|
+
}
|
|
34
|
+
if (args.timeZone) {
|
|
35
|
+
capabilities.timeZone = args.timeZone;
|
|
36
|
+
}
|
|
37
|
+
if (args.name) {
|
|
38
|
+
capabilities.name = args.name;
|
|
39
|
+
}
|
|
40
|
+
if (args.build) {
|
|
41
|
+
capabilities.build = args.build;
|
|
42
|
+
}
|
|
43
|
+
// Merge extra capabilities
|
|
44
|
+
if (args.extraCapabilities) {
|
|
45
|
+
Object.assign(capabilities, args.extraCapabilities);
|
|
46
|
+
}
|
|
47
|
+
const options = { capabilities };
|
|
48
|
+
const session = await testingBotApi.createSession(options);
|
|
49
|
+
let formattedOutput = `## CDP Session Created\n\n`;
|
|
50
|
+
formattedOutput += `- **Session ID**: ${session.session_id}\n`;
|
|
51
|
+
formattedOutput += `- **CDP URL**: ${session.cdp_url}\n`;
|
|
52
|
+
formattedOutput += `- **Browser**: ${args.browserName} ${args.browserVersion || "latest"}\n`;
|
|
53
|
+
formattedOutput += `- **Platform**: ${args.platform}\n\n`;
|
|
54
|
+
formattedOutput += `### Connect with Puppeteer\n\`\`\`javascript\n`;
|
|
55
|
+
formattedOutput += `const puppeteer = require('puppeteer-core');\n`;
|
|
56
|
+
formattedOutput += `const browser = await puppeteer.connect({\n`;
|
|
57
|
+
formattedOutput += ` browserWSEndpoint: '${session.cdp_url}'\n`;
|
|
58
|
+
formattedOutput += `});\n\`\`\`\n\n`;
|
|
59
|
+
formattedOutput += `### Connect with Playwright\n\`\`\`javascript\n`;
|
|
60
|
+
formattedOutput += `const { chromium } = require('playwright');\n`;
|
|
61
|
+
formattedOutput += `const browser = await chromium.connectOverCDP('${session.cdp_url}');\n`;
|
|
62
|
+
formattedOutput += `\`\`\`\n`;
|
|
63
|
+
return {
|
|
64
|
+
content: [
|
|
65
|
+
{
|
|
66
|
+
type: "text",
|
|
67
|
+
text: formattedOutput,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
return handleMCPError("createCdpSession", error);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return tools;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=cdp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../src/tools/cdp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAW,EAAE,aAAkB,EAAE,OAAyB;IAC5F,MAAM,KAAK,GAAwB,EAAE,CAAC;IAEtC,KAAK,CAAC,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAClC,kBAAkB,EAClB,sMAAsM,EACtM;QACE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;QAChF,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,OAAO,CAAC,QAAQ,CAAC;aACjB,QAAQ,CAAC,qCAAqC,CAAC;QAClD,QAAQ,EAAE,CAAC,CAAC,MAAM,EA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B,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../src/tools/live.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAoFnD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,gBAAgB,uBAmL7F"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleMCPError, validateUrl } from "../lib/utils.js";
|
|
3
|
+
import logger from "../lib/logger.js";
|
|
4
|
+
var PlatformType;
|
|
5
|
+
(function (PlatformType) {
|
|
6
|
+
PlatformType["Desktop"] = "desktop";
|
|
7
|
+
PlatformType["Mobile"] = "mobile";
|
|
8
|
+
})(PlatformType || (PlatformType = {}));
|
|
9
|
+
const DesktopLiveArgsShape = {
|
|
10
|
+
platformType: z.literal(PlatformType.Desktop),
|
|
11
|
+
desiredURL: z.string().url().describe("The URL to open in the browser"),
|
|
12
|
+
desiredOS: z
|
|
13
|
+
.enum(["Windows", "Mac", "Linux"])
|
|
14
|
+
.describe("Operating system (Windows, Mac, or Linux)"),
|
|
15
|
+
desiredOSVersion: z.string().describe("OS version (e.g., '11', '13', 'Monterey')"),
|
|
16
|
+
desiredBrowser: z.enum(["chrome", "firefox", "safari", "edge", "ie"]).describe("Browser name"),
|
|
17
|
+
desiredBrowserVersion: z
|
|
18
|
+
.string()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe("Browser version or 'latest' (default: latest)"),
|
|
21
|
+
};
|
|
22
|
+
// Mobile browser live session schema
|
|
23
|
+
const MobileLiveArgsShape = {
|
|
24
|
+
platformType: z.literal(PlatformType.Mobile),
|
|
25
|
+
desiredURL: z.string().url().describe("The URL to open in the mobile browser"),
|
|
26
|
+
desiredOS: z.enum(["android", "ios"]).describe("Mobile platform (android or ios)"),
|
|
27
|
+
desiredOSVersion: z.string().describe("OS version (e.g., '13.0', '16.0')"),
|
|
28
|
+
desiredDevice: z.string().describe("Device name (e.g., 'iPhone 14', 'Galaxy S23')"),
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Construct environment ID for TestingBot based on browser/device configuration
|
|
32
|
+
*/
|
|
33
|
+
function constructEnvironmentId(args) {
|
|
34
|
+
if (args.platformType === PlatformType.Desktop) {
|
|
35
|
+
const desktopArgs = args;
|
|
36
|
+
const os = desktopArgs.desiredOS.toLowerCase();
|
|
37
|
+
const osVersion = desktopArgs.desiredOSVersion;
|
|
38
|
+
const browser = desktopArgs.desiredBrowser.toLowerCase();
|
|
39
|
+
const browserVersion = desktopArgs.desiredBrowserVersion || "latest";
|
|
40
|
+
// Format: browser_version_os_osVersion
|
|
41
|
+
// Example: chrome_120_windows_11
|
|
42
|
+
return `${browser}_${browserVersion}_${os}_${osVersion.replace(/\s+/g, "_")}`;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const mobileArgs = args;
|
|
46
|
+
const platform = mobileArgs.desiredOS.toLowerCase();
|
|
47
|
+
const platformVersion = mobileArgs.desiredOSVersion;
|
|
48
|
+
const device = mobileArgs.desiredDevice.replace(/\s+/g, "_");
|
|
49
|
+
// Format: platform_platformVersion_device
|
|
50
|
+
// Example: ios_16.0_iPhone_14
|
|
51
|
+
return `${platform}_${platformVersion}_${device}`;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function startLiveSession(args, _config) {
|
|
55
|
+
const url = args.desiredURL;
|
|
56
|
+
if (!validateUrl(url)) {
|
|
57
|
+
throw new Error("Invalid URL provided");
|
|
58
|
+
}
|
|
59
|
+
const environmentId = constructEnvironmentId(args);
|
|
60
|
+
const sessionUrl = `https://testingbot.com/members/manual/start?browser=${environmentId}&url=${encodeURIComponent(url)}`;
|
|
61
|
+
logger.info({
|
|
62
|
+
platformType: args.platformType,
|
|
63
|
+
environmentId,
|
|
64
|
+
url,
|
|
65
|
+
}, "Starting live session");
|
|
66
|
+
return sessionUrl;
|
|
67
|
+
}
|
|
68
|
+
export default function addLiveTools(server, testingBotApi, config) {
|
|
69
|
+
const tools = {};
|
|
70
|
+
tools.startLiveSession = server.tool("startLiveSession", "Start an interactive live testing session on TestingBot. Opens a real browser or mobile device for manual testing. Supports both desktop browsers (Chrome, Firefox, Safari, Edge, IE) and mobile devices (iOS, Android).", {
|
|
71
|
+
platformType: z
|
|
72
|
+
.enum([PlatformType.Desktop, PlatformType.Mobile])
|
|
73
|
+
.describe("Platform type: 'desktop' for desktop browsers or 'mobile' for mobile devices"),
|
|
74
|
+
desiredURL: z.string().url().describe("The URL to open in the browser"),
|
|
75
|
+
desiredOS: z
|
|
76
|
+
.string()
|
|
77
|
+
.describe("Operating system: 'Windows', 'Mac', 'Linux' for desktop; 'android', 'ios' for mobile"),
|
|
78
|
+
desiredOSVersion: z
|
|
79
|
+
.string()
|
|
80
|
+
.describe("OS version (e.g., '11' for Windows 11, '16.0' for iOS 16)"),
|
|
81
|
+
desiredBrowser: z
|
|
82
|
+
.string()
|
|
83
|
+
.optional()
|
|
84
|
+
.describe("Browser name for desktop: 'chrome', 'firefox', 'safari', 'edge', 'ie'"),
|
|
85
|
+
desiredBrowserVersion: z
|
|
86
|
+
.string()
|
|
87
|
+
.optional()
|
|
88
|
+
.describe("Browser version or 'latest' (default: latest)"),
|
|
89
|
+
desiredDevice: z
|
|
90
|
+
.string()
|
|
91
|
+
.optional()
|
|
92
|
+
.describe("Device name for mobile (e.g., 'iPhone 14', 'Galaxy S23')"),
|
|
93
|
+
}, async (args) => {
|
|
94
|
+
try {
|
|
95
|
+
// Validate and parse args based on platform type
|
|
96
|
+
let validatedArgs;
|
|
97
|
+
if (args.platformType === PlatformType.Desktop) {
|
|
98
|
+
const desktopSchema = z.object(DesktopLiveArgsShape);
|
|
99
|
+
validatedArgs = desktopSchema.parse(args);
|
|
100
|
+
}
|
|
101
|
+
else if (args.platformType === PlatformType.Mobile) {
|
|
102
|
+
const mobileSchema = z.object(MobileLiveArgsShape);
|
|
103
|
+
validatedArgs = mobileSchema.parse(args);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
throw new Error("Invalid platformType. Must be 'desktop' or 'mobile'");
|
|
107
|
+
}
|
|
108
|
+
const sessionUrl = await startLiveSession(validatedArgs, config);
|
|
109
|
+
let formattedOutput = "## Live Session Ready\n\n";
|
|
110
|
+
formattedOutput += `Your interactive testing session is ready to start!\n\n`;
|
|
111
|
+
formattedOutput += `**Session URL**: ${sessionUrl}\n\n`;
|
|
112
|
+
if (validatedArgs.platformType === PlatformType.Desktop) {
|
|
113
|
+
const desktopArgs = validatedArgs;
|
|
114
|
+
formattedOutput += `**Configuration:**\n`;
|
|
115
|
+
formattedOutput += `- Platform: Desktop\n`;
|
|
116
|
+
formattedOutput += `- Browser: ${desktopArgs.desiredBrowser} ${desktopArgs.desiredBrowserVersion || "latest"}\n`;
|
|
117
|
+
formattedOutput += `- OS: ${desktopArgs.desiredOS} ${desktopArgs.desiredOSVersion}\n`;
|
|
118
|
+
formattedOutput += `- URL: ${desktopArgs.desiredURL}\n\n`;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
const mobileArgs = validatedArgs;
|
|
122
|
+
formattedOutput += `**Configuration:**\n`;
|
|
123
|
+
formattedOutput += `- Platform: Mobile\n`;
|
|
124
|
+
formattedOutput += `- Device: ${mobileArgs.desiredDevice}\n`;
|
|
125
|
+
formattedOutput += `- OS: ${mobileArgs.desiredOS} ${mobileArgs.desiredOSVersion}\n`;
|
|
126
|
+
formattedOutput += `- URL: ${mobileArgs.desiredURL}\n\n`;
|
|
127
|
+
}
|
|
128
|
+
formattedOutput += `**Instructions:**\n`;
|
|
129
|
+
formattedOutput += `1. Click the URL above or copy it to your browser\n`;
|
|
130
|
+
formattedOutput += `2. Log in to TestingBot if prompted\n`;
|
|
131
|
+
formattedOutput += `3. The live session will start automatically\n`;
|
|
132
|
+
formattedOutput += `4. Interact with the browser/device in real-time\n`;
|
|
133
|
+
return {
|
|
134
|
+
content: [
|
|
135
|
+
{
|
|
136
|
+
type: "text",
|
|
137
|
+
text: formattedOutput,
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
return handleMCPError("startLiveSession", error);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
tools.startDesktopLiveSession = server.tool("startDesktopLiveSession", "Convenience tool to start a desktop browser live testing session. Automatically sets platformType to 'desktop'.", {
|
|
147
|
+
desiredURL: z.string().url().describe("The URL to open in the browser"),
|
|
148
|
+
desiredOS: z
|
|
149
|
+
.enum(["Windows", "Mac", "Linux"])
|
|
150
|
+
.describe("Operating system (Windows, Mac, or Linux)"),
|
|
151
|
+
desiredOSVersion: z.string().describe("OS version (e.g., '11', '13', 'Monterey')"),
|
|
152
|
+
desiredBrowser: z
|
|
153
|
+
.enum(["chrome", "firefox", "safari", "edge", "ie"])
|
|
154
|
+
.describe("Browser name"),
|
|
155
|
+
desiredBrowserVersion: z
|
|
156
|
+
.string()
|
|
157
|
+
.optional()
|
|
158
|
+
.default("latest")
|
|
159
|
+
.describe("Browser version or 'latest' (default: latest)"),
|
|
160
|
+
}, async (args) => {
|
|
161
|
+
try {
|
|
162
|
+
const fullArgs = {
|
|
163
|
+
...args,
|
|
164
|
+
platformType: PlatformType.Desktop,
|
|
165
|
+
};
|
|
166
|
+
const sessionUrl = await startLiveSession(fullArgs, config);
|
|
167
|
+
let formattedOutput = "## Desktop Live Session Ready\n\n";
|
|
168
|
+
formattedOutput += `**Session URL**: ${sessionUrl}\n\n`;
|
|
169
|
+
formattedOutput += `**Configuration:**\n`;
|
|
170
|
+
formattedOutput += `- Browser: ${args.desiredBrowser} ${args.desiredBrowserVersion || "latest"}\n`;
|
|
171
|
+
formattedOutput += `- OS: ${args.desiredOS} ${args.desiredOSVersion}\n`;
|
|
172
|
+
formattedOutput += `- URL: ${args.desiredURL}\n\n`;
|
|
173
|
+
formattedOutput += `Click the URL above to start your interactive testing session.`;
|
|
174
|
+
return {
|
|
175
|
+
content: [
|
|
176
|
+
{
|
|
177
|
+
type: "text",
|
|
178
|
+
text: formattedOutput,
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
return handleMCPError("startDesktopLiveSession", error);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
tools.startMobileLiveSession = server.tool("startMobileLiveSession", "Convenience tool to start a mobile device live testing session. Automatically sets platformType to 'mobile'.", {
|
|
188
|
+
desiredURL: z.string().url().describe("The URL to open in the mobile browser"),
|
|
189
|
+
desiredOS: z.enum(["android", "ios"]).describe("Mobile platform (android or ios)"),
|
|
190
|
+
desiredOSVersion: z.string().describe("OS version (e.g., '13.0', '16.0')"),
|
|
191
|
+
desiredDevice: z.string().describe("Device name (e.g., 'iPhone 14', 'Galaxy S23')"),
|
|
192
|
+
}, async (args) => {
|
|
193
|
+
try {
|
|
194
|
+
const fullArgs = {
|
|
195
|
+
...args,
|
|
196
|
+
platformType: PlatformType.Mobile,
|
|
197
|
+
};
|
|
198
|
+
const sessionUrl = await startLiveSession(fullArgs, config);
|
|
199
|
+
let formattedOutput = "## Mobile Live Session Ready\n\n";
|
|
200
|
+
formattedOutput += `**Session URL**: ${sessionUrl}\n\n`;
|
|
201
|
+
formattedOutput += `**Configuration:**\n`;
|
|
202
|
+
formattedOutput += `- Device: ${args.desiredDevice}\n`;
|
|
203
|
+
formattedOutput += `- OS: ${args.desiredOS} ${args.desiredOSVersion}\n`;
|
|
204
|
+
formattedOutput += `- URL: ${args.desiredURL}\n\n`;
|
|
205
|
+
formattedOutput += `Click the URL above to start your interactive mobile testing session.`;
|
|
206
|
+
return {
|
|
207
|
+
content: [
|
|
208
|
+
{
|
|
209
|
+
type: "text",
|
|
210
|
+
text: formattedOutput,
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
return handleMCPError("startMobileLiveSession", error);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
return tools;
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=live.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live.js","sourceRoot":"","sources":["../../src/tools/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,IAAK,YAGJ;AAHD,WAAK,YAAY;IACf,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;AACnB,CAAC,EAHI,YAAY,KAAZ,YAAY,QAGhB;AAED,MAAM,oBAAoB,GAAG;IAC3B,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACvE,SAAS,EAAE,CAAC;SACT,IAAI,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;SACjC,QAAQ,CAAC,2CAA2C,CAAC;IACxD,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAClF,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;IAC9F,qBAAqB,EAAE,CAAC;SACrB,MAAM,EAAE;SACR,QAAQ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