fix: pin supported install toolchain (#35)

This commit is contained in:
Marc Chan 2026-04-29 15:40:25 +08:00 committed by GitHub
parent 1dbfbdcf5e
commit a6a2133527
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 12 deletions

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
22

View file

@ -5,8 +5,10 @@ Run the full product locally.
## One-shot (dev mode)
```bash
npm install
npm run dev:all # starts daemon (:7456) + Vite (:5173) together
nvm use # uses Node 22 from .nvmrc
corepack enable
pnpm install
pnpm dev:all # starts daemon (:7456) + Vite (:5173) together
open http://localhost:5173
```
@ -24,13 +26,15 @@ Pair a skill with a design system and a single prompt produces a layout-appropri
## Other scripts
```bash
npm run daemon # just the daemon (no web UI build)
npm run dev # just Vite (fails /api calls unless daemon is up)
npm run build # production build of the frontend → dist/
npm run start # build + daemon serving dist/ (single-process prod mode)
npm run typecheck # tsc -b --noEmit
pnpm daemon # just the daemon (no web UI build)
pnpm dev # just Vite (fails /api calls unless daemon is up)
pnpm build # production build of the frontend → dist/
pnpm start # build + daemon serving dist/ (single-process prod mode)
pnpm typecheck # tsc -b --noEmit
```
Use Node 2022. The repo pins pnpm via `packageManager`; Node 24 is not supported because `better-sqlite3` may lack matching prebuilt binaries and fall back to native compilation.
For the daemon-only production mode, the daemon serves the built SPA itself at `http://localhost:7456`, so no proxy involved.
## Two execution modes

View file

@ -248,7 +248,7 @@ Every layer is composable. Every layer is a file you can edit. Read [`src/prompt
| Layer | Stack |
|---|---|
| Frontend | Vite 5 + React 18 + TypeScript |
| Daemon | Node 18+ · Express · SSE streaming · `better-sqlite3` for projects/conversations/messages/tabs |
| Daemon | Node 2022 · Express · SSE streaming · `better-sqlite3` for projects/conversations/messages/tabs |
| Agent transport | `child_process.spawn` with `claude-stream-json` parser for Claude Code, line-buffered plain stdout for the rest |
| Storage | Plain files in `.od/projects/<id>/` + SQLite at `.od/db.sqlite` (gitignored) |
| Preview | Sandboxed iframe via `srcdoc` + per-skill `<artifact>` parser |
@ -259,7 +259,9 @@ Every layer is composable. Every layer is a file you can edit. Read [`src/prompt
```bash
git clone https://github.com/nexu-io/open-design.git
cd open-design
pnpm install # or npm install
nvm use # uses Node 22 from .nvmrc
corepack enable
pnpm install
pnpm dev:all # daemon (:7456) + Vite (:5173)
open http://localhost:5173
```

View file

@ -248,7 +248,7 @@ DISCOVERY 指令 turn-1 表单、turn-2 品牌分支、TodoWrite、
| 层 | 技术栈 |
|---|---|
| 前端 | Vite 5 + React 18 + TypeScript |
| Daemon | Node 18+ · Express · SSE 流 · `better-sqlite3` 存项目/对话/消息/tab |
| Daemon | Node 2022 · Express · SSE 流 · `better-sqlite3` 存项目/对话/消息/tab |
| Agent 传输层 | `child_process.spawn`Claude Code 走 `claude-stream-json` 解析器,其余走 line-buffered plain stdout |
| 存储 | 纯文件 `.od/projects/<id>/` + SQLite `.od/app.sqlite`(已 gitignoredaemon 启动自建) |
| 预览 | 沙盒 iframe`srcdoc`+ 每个 skill 的 `<artifact>` parser |
@ -259,7 +259,9 @@ DISCOVERY 指令 turn-1 表单、turn-2 品牌分支、TodoWrite、
```bash
git clone https://github.com/nexu-io/open-design.git
cd open-design
pnpm install # 或 npm install
nvm use # 使用 .nvmrc 中的 Node 22
corepack enable
pnpm install
pnpm dev:all # daemon (:7456) + Vite (:5173) 一起起
open http://localhost:5173
```

View file

@ -2,6 +2,7 @@
"name": "open-design",
"version": "0.1.0",
"private": true,
"packageManager": "pnpm@9.15.9",
"type": "module",
"description": "Local-first design product: detects your installed code-agent CLI, runs design skills + design systems, streams artifacts into a sandboxed preview.",
"license": "Apache-2.0",
@ -34,7 +35,7 @@
"vite": "^5.4.11"
},
"engines": {
"node": ">=18"
"node": ">=20 <23"
},
"pnpm": {
"onlyBuiltDependencies": [