Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,18 @@ The desktop supervisor lives under `frontend/` and is started separately:

```bash
cd frontend
nvm use 20 || nvm install 20
npm install
npm run dev # electron-forge start
```

The Electron frontend is currently developed and packaged on **Node 20.x**.
Newer Node 24/26 runtimes currently hit upstream Electron / Electron Forge
install bugs that can leave `node_modules/electron` half-installed and make
`npm run dev` fail with `Electron failed to install correctly`. The frontend
package fails fast on unsupported Node versions so contributors see the fix
before a partial install corrupts `node_modules`.

Heads-up: `npm run dev` does **not** start the daemon for you. Start it first
(`ao start`, see above) — the renderer attaches to the running daemon over
loopback (`127.0.0.1:3001` by default, the `AO_PORT` from the table below).
Expand Down
1 change: 1 addition & 0 deletions frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
4 changes: 4 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
"description": "Electron + TypeScript frontend for the agent-orchestrator rewrite",
"author": "Agent Orchestrator",
"license": "MIT",
"engines": {
"node": "20.x"
},
"homepage": "https://github.com/aoagents/agent-orchestrator",
"main": ".vite/build/main.js",
"repository": {
"type": "git",
"url": "https://github.com/aoagents/agent-orchestrator"
},
"scripts": {
"preinstall": "node ./scripts/check-node-version.mjs",
"build:daemon": "node ./scripts/build-daemon.mjs",
"dev": "electron-forge start",
"dev:web": "VITE_NO_ELECTRON=1 vite --config vite.renderer.config.ts",
Expand Down
23 changes: 23 additions & 0 deletions frontend/scripts/check-node-version.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const supportedMajor = 20;
const currentMajor = Number.parseInt(process.versions.node.split(".")[0], 10);

if (currentMajor !== supportedMajor) {
console.error(
[
`Unsupported Node.js runtime: ${process.versions.node}.`,
`The Electron frontend is currently supported on Node ${supportedMajor}.x only.`,
"",
"Why this is enforced:",
"- CI and desktop packaging run on Node 20.",
"- Newer Node 24/26 releases currently hit upstream Electron/Forge install bugs",
" that can leave node_modules/electron partially extracted and make",
" `npm run dev` fail with `Electron failed to install correctly`.",
"",
"Switch to Node 20 and reinstall dependencies:",
" nvm use 20 || nvm install 20",
" rm -rf node_modules",
" npm ci",
].join("\n"),
);
process.exit(1);
}