nothumanallowed 14.4.3 → 14.4.4

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.3",
3
+ "version": "14.4.4",
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": {
@@ -50,18 +50,37 @@ export async function cmdUI(args) {
50
50
  console.log(` \x1b[33m!\x1b[0m Killed previous process on port ${port} (PID ${pid})`);
51
51
  }
52
52
  } else {
53
- // Unix/Mac: lsof to find and kill
54
- const out = execSync(`lsof -ti:${port} 2>/dev/null`, { encoding: 'utf-8', timeout: 3000 }).trim();
55
- if (out) {
56
- const pids = out.split('\n').filter((p) => p && p !== String(process.pid));
57
- for (const pid of pids) {
58
- try { process.kill(parseInt(pid), 'SIGTERM'); } catch {}
59
- }
60
- if (pids.length > 0) {
61
- console.log(` \x1b[33m!\x1b[0m Killed previous process on port ${port} (PID ${pids.join(', ')})`);
62
- await new Promise((r) => setTimeout(r, 500)); // wait for port to free
53
+ // Unix/Mac: try lsof first, then fuser, then ss+kill as fallbacks
54
+ let killed = false;
55
+ // Method 1: lsof
56
+ try {
57
+ const out = execSync(`lsof -ti:${port} 2>/dev/null`, { encoding: 'utf-8', timeout: 3000 }).trim();
58
+ if (out) {
59
+ const pids = out.split('\n').filter((p) => p && p !== String(process.pid));
60
+ for (const pid of pids) { try { process.kill(parseInt(pid), 'SIGTERM'); } catch {} }
61
+ if (pids.length > 0) { killed = true; console.log(` \x1b[33m!\x1b[0m Killed previous process on port ${port} (PID ${pids.join(', ')})`); }
63
62
  }
63
+ } catch {}
64
+ // Method 2: fuser (Linux without lsof)
65
+ if (!killed) {
66
+ try {
67
+ execSync(`fuser -k ${port}/tcp 2>/dev/null`, { timeout: 3000, stdio: 'ignore' });
68
+ killed = true;
69
+ console.log(` \x1b[33m!\x1b[0m Killed previous process on port ${port} (via fuser)`);
70
+ } catch {}
71
+ }
72
+ // Method 3: ss + kill (minimal Linux)
73
+ if (!killed) {
74
+ try {
75
+ const out = execSync(`ss -tlnp 2>/dev/null | grep :${port}`, { encoding: 'utf-8', timeout: 3000 }).trim();
76
+ const pidMatch = out.match(/pid=(\d+)/);
77
+ if (pidMatch) {
78
+ try { process.kill(parseInt(pidMatch[1]), 'SIGTERM'); killed = true; } catch {}
79
+ if (killed) console.log(` \x1b[33m!\x1b[0m Killed previous process on port ${port} (PID ${pidMatch[1]})`);
80
+ }
81
+ } catch {}
64
82
  }
83
+ if (killed) await new Promise((r) => setTimeout(r, 500));
65
84
  }
66
85
  } catch { /* port is free */ }
67
86
 
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.3';
8
+ export const VERSION = '14.4.4';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11