@debugg-ai/debugg-ai-mcp 1.0.41 → 1.0.43

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.
@@ -9,6 +9,7 @@ import { handleExternalServiceError } from '../utils/errors.js';
9
9
  import { fetchImageAsBase64, imageContentBlock } from '../utils/imageUtils.js';
10
10
  import { DebuggAIServerClient } from '../services/index.js';
11
11
  import { resolveTargetUrl, buildContext, findExistingTunnel, ensureTunnel, sanitizeResponseUrls, touchTunnelById, } from '../utils/tunnelContext.js';
12
+ import { tunnelManager } from '../services/ngrok/tunnelManager.js';
12
13
  const logger = new Logger({ module: 'testPageChangesHandler' });
13
14
  // Cache the template UUID and project UUIDs within a server session to avoid re-fetching
14
15
  let cachedTemplateUuid = null;
@@ -343,12 +344,12 @@ export async function testPageChangesHandler(input, context, progressCallback) {
343
344
  }
344
345
  finally {
345
346
  process.stdin.removeListener('close', onStdinClose);
346
- // Tunnels stay alive for reuse the 55-min auto-shutoff on TunnelManager
347
- // fires revokeKey when the tunnel actually stops.
348
- //
349
- // Only revoke explicitly when we provisioned a key but tunnel creation failed
350
- // (keyId set, ctx.tunnelId not set → key was never attached to a tunnel).
351
- if (keyId && !ctx.tunnelId) {
347
+ // Always tear down the tunnel when the request completes.
348
+ if (ctx.tunnelId) {
349
+ tunnelManager.stopTunnel(ctx.tunnelId).catch(err => logger.warn(`Failed to stop tunnel ${ctx.tunnelId}: ${err}`));
350
+ }
351
+ else if (keyId) {
352
+ // Provisioned a key but tunnel creation failed — revoke the orphaned key.
352
353
  client.revokeNgrokKey(keyId).catch(err => logger.warn(`Failed to revoke unused ngrok key ${keyId}: ${err}`));
353
354
  }
354
355
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugg-ai/debugg-ai-mcp",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "Zero-Config, Fully AI-Managed End-to-End Testing for all code gen platforms.",
5
5
  "type": "module",
6
6
  "bin": {