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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ Works with 23+ CLI-based coding agents including Claude Code, OpenAI Codex, Curs
| Git | Any | Latest |
| pnpm | Any | Latest |

The Electron frontend is currently developed and packaged on Node 20.x. Run
`nvm use 20 || nvm install 20` before installing `frontend/` dependencies; its
preinstall check rejects unsupported runtimes before they can leave Electron
partially installed.

**Optional:**

- `tmux` (Darwin/Linux) - For Unix runtime
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
22 changes: 22 additions & 0 deletions frontend/scripts/check-node-version.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 runtimes can leave node_modules/electron partially installed,",
" causing `npm run dev` to 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);
}