nothumanallowed 13.5.101 → 13.5.102

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nothumanallowed",
3
- "version": "13.5.101",
3
+ "version": "13.5.102",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -7531,7 +7531,13 @@ function wcStopAutoFixPoller() {
7531
7531
  }
7532
7532
 
7533
7533
  async function wcTriggerAutoFix(missingModule) {
7534
- if (wcChatRunning) return;
7534
+ if (wcChatRunning) {
7535
+ var waited = 0;
7536
+ await new Promise(function(resolve) {
7537
+ var t = setInterval(function() { waited += 500; if (!wcChatRunning || waited >= 30000) { clearInterval(t); resolve(); } }, 500);
7538
+ });
7539
+ if (wcChatRunning) return;
7540
+ }
7535
7541
  var fixMsg = 'AUTO-FIX: Cannot find module ' + missingModule + String.fromCharCode(10) + 'Analizza tutti i file del progetto e correggi il require/import per questo modulo. Se il modulo non esiste, rimuovi il require e implementa la funzionalita con moduli disponibili o Node.js built-in.';
7536
7542
  wcChat.push({ role: 'user', text: '\uD83E\uDD16 Auto-fix modulo mancante: ' + missingModule });
7537
7543
  wcChatRunning = true;
@@ -7577,7 +7583,14 @@ async function wcTriggerAutoFix(missingModule) {
7577
7583
  wcScrollChatToBottom();
7578
7584
  }
7579
7585
  async function wcTriggerCrashFix(errorMsg) {
7580
- if (wcChatRunning) return;
7586
+ if (wcChatRunning) {
7587
+ // Wait up to 30s for current agent to finish, then retry
7588
+ var waited = 0;
7589
+ await new Promise(function(resolve) {
7590
+ var t = setInterval(function() { waited += 500; if (!wcChatRunning || waited >= 30000) { clearInterval(t); resolve(); } }, 500);
7591
+ });
7592
+ if (wcChatRunning) return;
7593
+ }
7581
7594
  var fixMsg = 'AUTO-FIX: ' + errorMsg + String.fromCharCode(10) + 'Il server Express ha crashato con questo errore. Analizza tutti i file del progetto, individua la causa e correggi il codice. Modifica i file necessari usando i tool disponibili.';
7582
7595
  wcChat.push({ role: 'user', text: '\uD83E\uDD16 Auto-fix crash: ' + errorMsg });
7583
7596
  wcChatRunning = true;
@@ -8536,11 +8549,8 @@ async function wcStartSandbox() {
8536
8549
  _wcAutoFixAttempts++;
8537
8550
  wcTriggerAutoFix(modMatch[1]);
8538
8551
  } else if (errMsg && !modMatch && _wcAutoFixAttempts < 3) {
8539
- // Generic crash: post error to chat so agent can see it
8540
8552
  _wcAutoFixAttempts++;
8541
- wcChat.push({ role: 'system', text: '&#10060; Errore sandbox: ' + errMsg });
8542
- renderWebCraft(document.getElementById('content'));
8543
- wcScrollChatToBottom();
8553
+ wcTriggerCrashFix(errMsg);
8544
8554
  }
8545
8555
  }
8546
8556
  } catch(_) {}