@debugg-ai/debugg-ai-mcp 1.0.35 → 1.0.36
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.
|
@@ -35,10 +35,28 @@ export async function testPageChangesHandler(input, context, progressCallback) {
|
|
|
35
35
|
logger.info(`Reusing tunnel: ${ctx.targetUrl} (id: ${ctx.tunnelId})`);
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
|
|
38
|
+
let tunnel;
|
|
39
|
+
try {
|
|
40
|
+
tunnel = await client.tunnels.provision();
|
|
41
|
+
}
|
|
42
|
+
catch (provisionError) {
|
|
43
|
+
const msg = provisionError instanceof Error ? provisionError.message : String(provisionError);
|
|
44
|
+
throw new Error(`Failed to provision tunnel for ${ctx.originalUrl}. ` +
|
|
45
|
+
`The remote browser needs a secure tunnel to reach your local dev server. ` +
|
|
46
|
+
`Make sure your dev server is running on the specified port and try again. ` +
|
|
47
|
+
`(Detail: ${msg})`);
|
|
48
|
+
}
|
|
39
49
|
keyId = tunnel.keyId;
|
|
40
|
-
|
|
41
|
-
|
|
50
|
+
try {
|
|
51
|
+
ctx = await ensureTunnel(ctx, tunnel.tunnelKey, tunnel.tunnelId, tunnel.keyId, () => client.revokeNgrokKey(tunnel.keyId));
|
|
52
|
+
}
|
|
53
|
+
catch (tunnelError) {
|
|
54
|
+
const msg = tunnelError instanceof Error ? tunnelError.message : String(tunnelError);
|
|
55
|
+
throw new Error(`Tunnel creation failed for ${ctx.originalUrl}. ` +
|
|
56
|
+
`Could not establish a secure connection between the remote browser and your local port. ` +
|
|
57
|
+
`Verify your dev server is running and the port is accessible. ` +
|
|
58
|
+
`(Detail: ${msg})`);
|
|
59
|
+
}
|
|
42
60
|
logger.info(`Tunnel ready: ${ctx.targetUrl} (id: ${ctx.tunnelId})`);
|
|
43
61
|
}
|
|
44
62
|
}
|
|
@@ -10,7 +10,7 @@ import { testPageChangesHandler } from '../handlers/testPageChangesHandler.js';
|
|
|
10
10
|
export const testPageChangesTool = {
|
|
11
11
|
name: "check_app_in_browser",
|
|
12
12
|
title: "Run E2E Browser Test",
|
|
13
|
-
description: "Give an AI agent eyes on a live website or app. The agent browses it, interacts with it, and tells you whether a given task or check passed. Works on localhost or any URL. Use for visual QA, flow validation, regression checks, or anything that needs a real browser to verify.",
|
|
13
|
+
description: "Give an AI agent eyes on a live website or app. The agent browses it, interacts with it, and tells you whether a given task or check passed. Works on localhost or any URL. Use for visual QA, flow validation, regression checks, or anything that needs a real browser to verify.\n\nLOCALHOST SUPPORT: Pass any localhost URL (e.g. http://localhost:3000) and it Just Works. A secure tunnel is automatically created so the remote browser can reach your local dev server — no manual ngrok setup, no port forwarding, no config. Supports localhost, 127.0.0.1, 0.0.0.0, [::1], and private IPs (192.168.x.x, 10.x.x.x). The tunnel stays alive for 55 minutes and is reused across calls to the same port.",
|
|
14
14
|
inputSchema: {
|
|
15
15
|
type: "object",
|
|
16
16
|
properties: {
|
|
@@ -21,7 +21,7 @@ export const testPageChangesTool = {
|
|
|
21
21
|
},
|
|
22
22
|
url: {
|
|
23
23
|
type: "string",
|
|
24
|
-
description: "URL to navigate to.
|
|
24
|
+
description: "URL to navigate to. Can be any public URL (https://example.com) OR a localhost/local dev server URL. For localhost URLs (http://localhost:3000, http://127.0.0.1:8080, etc.), a secure tunnel is automatically created so the remote browser can reach your machine — just make sure your dev server is running on that port. No extra setup needed."
|
|
25
25
|
},
|
|
26
26
|
environmentId: {
|
|
27
27
|
type: "string",
|
package/dist/types/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { normalizeUrl } from '../utils/urlParser.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export const TestPageChangesInputSchema = z.object({
|
|
10
10
|
description: z.string().min(1, 'Description is required'),
|
|
11
|
-
url: z.preprocess(normalizeUrl, z.string().url('
|
|
11
|
+
url: z.preprocess(normalizeUrl, z.string().url('Invalid URL. Pass a full URL like "http://localhost:3000" or "https://example.com". Localhost URLs are auto-tunneled to the remote browser — no extra setup needed.')),
|
|
12
12
|
// Credential/environment resolution
|
|
13
13
|
environmentId: z.string().uuid().optional(),
|
|
14
14
|
credentialId: z.string().uuid().optional(),
|