@debugg-ai/debugg-ai-mcp 1.0.48 → 1.0.49

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.
@@ -15,7 +15,36 @@ const logger = new Logger({ module: 'testPageChangesHandler' });
15
15
  // Cache the template UUID and project UUIDs within a server session to avoid re-fetching
16
16
  let cachedTemplateUuid = null;
17
17
  const projectUuidCache = new Map();
18
+ // Concurrency control — max 2 simultaneous browser checks.
19
+ // Additional requests queue and run when a slot opens.
20
+ const MAX_CONCURRENT = 2;
21
+ let running = 0;
22
+ const queue = [];
23
+ async function acquireSlot() {
24
+ if (running < MAX_CONCURRENT) {
25
+ running++;
26
+ return;
27
+ }
28
+ await new Promise((resolve) => queue.push({ resolve }));
29
+ }
30
+ function releaseSlot() {
31
+ running--;
32
+ const next = queue.shift();
33
+ if (next) {
34
+ running++;
35
+ next.resolve();
36
+ }
37
+ }
18
38
  export async function testPageChangesHandler(input, context, progressCallback) {
39
+ await acquireSlot();
40
+ try {
41
+ return await testPageChangesHandlerInner(input, context, progressCallback);
42
+ }
43
+ finally {
44
+ releaseSlot();
45
+ }
46
+ }
47
+ async function testPageChangesHandlerInner(input, context, progressCallback) {
19
48
  const startTime = Date.now();
20
49
  logger.toolStart('check_app_in_browser', input);
21
50
  const client = new DebuggAIServerClient(config.api.key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugg-ai/debugg-ai-mcp",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "description": "Zero-Config, Fully AI-Managed End-to-End Testing for all code gen platforms.",
5
5
  "type": "module",
6
6
  "bin": {