nothumanallowed 13.5.172 → 13.5.174

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.174",
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,25 @@ 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: launch new nha ui process, then exit current one
653
+ try {
654
+ const { exec: execCmd } = await import('child_process');
655
+ const isWindows = process.platform === 'win32';
656
+ const extraArgs = (lanMode ? ' --lan' : '') + (port !== DEFAULT_PORT ? ` --port=${port}` : '');
657
+ if (isWindows) {
658
+ // start /B launches detached in background on Windows
659
+ execCmd(`start /B nha ui --no-browser${extraArgs}`, { shell: true });
660
+ } else {
661
+ execCmd(`nohup nha ui --no-browser${extraArgs} </dev/null >/dev/null 2>&1 &`);
662
+ }
663
+ } catch (_) {}
664
+ setTimeout(() => process.exit(0), 500);
665
+ }, 1500);
651
666
  } else {
652
667
  wsBroadcast({ type: 'npm-update', line: '\n❌ Update failed (exit code ' + code + '). Check output above.\n', error: true });
668
+ // Don't exit on failure — server stays alive
653
669
  }
654
- setTimeout(() => process.exit(0), 1500);
655
670
  });
656
671
  }, 100);
657
672
  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.174';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11