Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: use local PM2 binary in npm scripts to avoid pm2.cmd CMD windows
[._.]/ Adam Eivy7258ba48a8c8
diff --git a/.changelog/v1.6.x.md b/.changelog/v1.6.x.mdindex 223677be50..fb878feb36 100644--- a/.changelog/v1.6.x.md+++ b/.changelog/v1.6.x.md@@ -26,6 +26,7 @@ Folder picker improvements for Windows: drive selector, home directory quick-nav- Added `max_restarts: 10`, `min_uptime: '10s'`, and `restart_delay: 5000` to `startApp` and `startWithCommand` — previously had `autorestart: true` with no restart cap, causing infinite CMD window spawn loops when a managed app crashed on startup- Fixed PM2 fork mode crash on Windows: when ecosystem configs use `script: 'npm'` (common pattern), PM2 resolves it to `npm.cmd` and tries to `require()` a batch file as JavaScript, causing `SyntaxError: Invalid or unexpected token` + infinite restart loop. On Windows, `startFromEcosystem` now loads the config, patches non-JS scripts with `interpreter: 'none'` (spawn mode), writes a temp config, and starts PM2 with it. Same fix applied to `startWithCommand` and `startApp`.- Eliminated remaining CMD window flashes by bypassing `pm2.cmd` entirely: all PM2 CLI invocations (`jlist`, `logs`, `start`, `stop`, `restart`, `delete`) now run `node pm2/bin/pm2` directly instead of `spawn('pm2', {shell:true})` which created a `cmd.exe → pm2.cmd → node` chain where the intermediate `.cmd` batch file flashed a visible window. New `spawnPm2()` and `execPm2()` helpers in `pm2.js` are shared by logs, socket, detect, streamingDetect, and cos services.+- Updated all `pm2:*` npm scripts in package.json to use `node ./node_modules/pm2/bin/pm2` instead of bare `pm2` command, avoiding `pm2.cmd` batch file wrapper on Windows### FolderPicker: Error state handling- Directory load errors now display inline with a message and "Go to default directory" recovery button instead of silently failingdiff --git a/package-lock.json b/package-lock.jsonindex 2e0137981b..2db8f6b232 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "portos",- "version": "1.6.2",+ "version": "1.6.3","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "portos",- "version": "1.6.2",+ "version": "1.6.3","license": "MIT","dependencies": {"express": "^4.21.2",diff --git a/package.json b/package.jsonindex 1c183ca3ac..68a1d80eb8 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "portos",- "version": "1.6.2",+ "version": "1.6.3","private": true,"description": "Local dev machine App OS portal","author": "Adam Eivy (@antic|@atomantic)",@@ -12,11 +12,11 @@"dev:client": "cd client && npm run dev","build": "cd client && npm run build","start": "cd server && npm start",- "pm2:start": "pm2 start ecosystem.config.cjs",- "pm2:stop": "pm2 stop ecosystem.config.cjs",- "pm2:restart": "pm2 restart ecosystem.config.cjs",- "pm2:logs": "pm2 logs",- "pm2:status": "pm2 status",+ "pm2:start": "node ./node_modules/pm2/bin/pm2 start ecosystem.config.cjs",+ "pm2:stop": "node ./node_modules/pm2/bin/pm2 stop ecosystem.config.cjs",+ "pm2:restart": "node ./node_modules/pm2/bin/pm2 restart ecosystem.config.cjs",+ "pm2:logs": "node ./node_modules/pm2/bin/pm2 logs",+ "pm2:status": "node ./node_modules/pm2/bin/pm2 status","install:all": "npm install && cd client && npm install && cd ../server && npm install && cd .. && npm run setup","setup": "node scripts/setup-data.js && node scripts/setup-browser.js","setup:data": "node scripts/setup-data.js",