nothumanallowed 14.4.21 → 14.4.22

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": "14.4.21",
3
+ "version": "14.4.22",
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": {
package/src/constants.mjs CHANGED
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = path.dirname(__filename);
7
7
 
8
- export const VERSION = '14.4.21';
8
+ export const VERSION = '14.4.22';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -436,5 +436,24 @@ export async function startServer({ port = 3847, host = '127.0.0.1', noBrowser =
436
436
 
437
437
  if (!noBrowser) openBrowser(`http://localhost:${port}`);
438
438
 
439
+ // Cleanup sandbox processes on server shutdown
440
+ const cleanup = async () => {
441
+ try {
442
+ const { exec } = await import('child_process');
443
+ const { promisify } = await import('util');
444
+ const execAsync = promisify(exec);
445
+ for (let p = 4000; p <= 4010; p++) {
446
+ try {
447
+ const { stdout } = await execAsync(`lsof -ti:${p} 2>/dev/null || fuser ${p}/tcp 2>/dev/null`, { timeout: 2000 });
448
+ const pids = stdout.trim().split(/\s+/).filter(Boolean);
449
+ for (const pid of pids) { try { process.kill(parseInt(pid), 'SIGKILL'); } catch {} }
450
+ } catch {}
451
+ }
452
+ } catch {}
453
+ process.exit(0);
454
+ };
455
+ process.on('SIGINT', cleanup);
456
+ process.on('SIGTERM', cleanup);
457
+
439
458
  return server;
440
459
  }