nothumanallowed 13.5.172 → 13.5.173

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.172",
3
+ "version": "13.5.173",
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": {
@@ -648,10 +648,30 @@ export async function cmdUI(args) {
648
648
  child.on('close', (code) => {
649
649
  if (code === 0) {
650
650
  wsBroadcast({ type: 'npm-update', line: '\n✅ Update complete! Restarting server...\n', done: true });
651
+ setTimeout(async () => {
652
+ // Self-restart: spawn the new nha binary with same args, then exit
653
+ // Works on Windows/Mac/Linux without PM2
654
+ try {
655
+ const { execPath } = process;
656
+ // Find the nha bin: look for it next to the current node executable
657
+ // or use `nha` from PATH (npm -g installs it there)
658
+ const isWindows = process.platform === 'win32';
659
+ const nhaCmd = isWindows ? 'nha.cmd' : 'nha';
660
+ const restartArgs = ['ui', '--no-browser', ...(lanMode ? ['--lan'] : []), `--port=${port}`];
661
+ const restartChild = spawn(nhaCmd, restartArgs, {
662
+ detached: true,
663
+ stdio: 'ignore',
664
+ shell: isWindows,
665
+ env: process.env,
666
+ });
667
+ restartChild.unref();
668
+ } catch (_) {}
669
+ process.exit(0);
670
+ }, 1500);
651
671
  } else {
652
672
  wsBroadcast({ type: 'npm-update', line: '\n❌ Update failed (exit code ' + code + '). Check output above.\n', error: true });
673
+ // Don't exit on failure — server stays alive
653
674
  }
654
- setTimeout(() => process.exit(0), 1500);
655
675
  });
656
676
  }, 100);
657
677
  return;
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 = '13.5.172';
8
+ export const VERSION = '13.5.173';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11