nothumanallowed 13.5.171 → 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 +1 -1
- package/src/commands/ui.mjs +30 -1
- package/src/constants.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
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": {
|
package/src/commands/ui.mjs
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
} from '../services/task-store.mjs';
|
|
28
28
|
import { runPlanningPipeline } from '../services/ops-pipeline.mjs';
|
|
29
29
|
import { AGENTS, AGENTS_DIR, NHA_DIR, VERSION } from '../constants.mjs';
|
|
30
|
+
import { startDaemon, isRunning } from '../services/ops-daemon.mjs';
|
|
30
31
|
import { getHTML, getJS } from '../services/web-ui.mjs';
|
|
31
32
|
import { loadChatHistory, saveChatHistory, extractMemory, buildMemoryContext } from '../services/memory.mjs';
|
|
32
33
|
import {
|
|
@@ -249,6 +250,14 @@ export async function cmdUI(args) {
|
|
|
249
250
|
const htmlPage = getHTML(port);
|
|
250
251
|
const jsBundle = getJS();
|
|
251
252
|
|
|
253
|
+
// Auto-start daemon (Telegram bot + cron jobs) if not already running
|
|
254
|
+
if (!isRunning()) {
|
|
255
|
+
const daemonResult = startDaemon();
|
|
256
|
+
if (daemonResult.ok) {
|
|
257
|
+
console.log(` ✓ PAO daemon started (PID ${daemonResult.pid}) — Telegram + cron active`);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
252
261
|
// Migrate old chat history to multi-conversation format
|
|
253
262
|
migrateOldHistory();
|
|
254
263
|
|
|
@@ -639,10 +648,30 @@ export async function cmdUI(args) {
|
|
|
639
648
|
child.on('close', (code) => {
|
|
640
649
|
if (code === 0) {
|
|
641
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);
|
|
642
671
|
} else {
|
|
643
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
|
|
644
674
|
}
|
|
645
|
-
setTimeout(() => process.exit(0), 1500);
|
|
646
675
|
});
|
|
647
676
|
}, 100);
|
|
648
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.
|
|
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
|
|