fix(install): build workspace artifacts before web

This commit is contained in:
Tianyi Cui
2026-07-31 19:57:51 +08:00
parent 0d949cfe67
commit 4ada0017cf
5 changed files with 17 additions and 17 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write README.md
README.md: f5367578570a7b4ec7bad13be3b801ac7870de6c
README.zh.md: b9f593857d2a65b5df61983a640022be605ee93b
README.md: e297ff32c4086df0fcc17310dabbebfaae2691ca
README.zh.md: 5995acdf8d1c5a9aab5dcae39f3ab1e3c8b0a679

View File

@@ -22,7 +22,7 @@ Install `dsh` with one command:
curl -fsSL https://raw.githubusercontent.com/deepseek-harness/deepseek-harness/master/scripts/install.sh | sh
```
The installer requires `git` and Node `^22.19 || >=24`, offers to install `pnpm` when it is missing, prompts for a DeepSeek API key, then lets you launch the Web UI or TUI. Choosing Web UI builds its frontend first.
The installer requires `git` and Node `^22.19 || >=24`, offers to install `pnpm` when it is missing, prompts for a DeepSeek API key, then lets you launch the Web UI or TUI. Choosing Web UI builds the required repository artifacts first.
The installer keeps every checkout under `~/.dsh/source`: the master clone at `~/.dsh/source/master` and each install's staging checkout as a git worktree `~/.dsh/source/staging-<timestamp>`. The stable symlink `~/.dsh/source/current` points at the active staging worktree, and `dsh` in `~/.local/bin` links to `current/bin/dsh`, so an upgrade repoints one symlink and the `dsh` on PATH never moves. Re-running the command adds a fresh staging worktree from an updated master and repoints `current` at it. See [`scripts/install.sh`](scripts/install.sh) for alternate install locations and other options.
@@ -30,10 +30,10 @@ The installer keeps every checkout under `~/.dsh/source`: the master clone at `~
### Web UI
For the recommended local interface, choose Web UI when the installer finishes. To start it later, or after updating the active checkout, build the frontend and run:
For the recommended local interface, choose Web UI when the installer finishes. To start it later, or after updating the active checkout, build the repository and run:
```sh
(cd ~/.dsh/source/current && pnpm --filter @deepseek-ai/dsh-frontend run build)
(cd ~/.dsh/source/current && pnpm run build)
dsh web
```

View File

@@ -22,7 +22,7 @@ DeepSeek Harness`dsh`)是一款基于 DeepSeek Harness SDK 构建的开源
curl -fsSL https://raw.githubusercontent.com/deepseek-harness/deepseek-harness/master/scripts/install.sh | sh
```
安装器要求系统已安装 `git` 和 Node `^22.19 || >=24`,缺少 `pnpm` 时可代为安装,并会提示输入 DeepSeek API 密钥,随后让你选择启动 Web UI 或 TUI。选择 Web UI 时,安装器会先构建其前端
安装器要求系统已安装 `git` 和 Node `^22.19 || >=24`,缺少 `pnpm` 时可代为安装,并会提示输入 DeepSeek API 密钥,随后让你选择启动 Web UI 或 TUI。选择 Web UI 时,安装器会先构建所需的仓库产物
安装器会把所有检出都放在 `~/.dsh/source`master 克隆位于 `~/.dsh/source/master`,每次安装的 staging 检出是一个 git worktree `~/.dsh/source/staging-<时间戳>`。稳定符号链接 `~/.dsh/source/current` 指向当前生效的 staging worktree`~/.local/bin` 中的 `dsh` 链接到 `current/bin/dsh`因此升级只需重指一个符号链接PATH 上的 `dsh` 从不移动。再次运行该命令会基于更新后的 master 新增一个 staging worktree并把 `current` 重指到它。其他安装位置和选项见 [`scripts/install.sh`](scripts/install.sh)。
@@ -30,10 +30,10 @@ curl -fsSL https://raw.githubusercontent.com/deepseek-harness/deepseek-harness/m
### Web UI
推荐在本地使用 Web UI安装结束时选择 Web UI 即可。以后需要启动时,或更新当前生效的检出后,请构建前端并运行:
推荐在本地使用 Web UI安装结束时选择 Web UI 即可。以后需要启动时,或更新当前生效的检出后,请构建仓库并运行:
```sh
(cd ~/.dsh/source/current && pnpm --filter @deepseek-ai/dsh-frontend run build)
(cd ~/.dsh/source/current && pnpm run build)
dsh web
```

View File

@@ -127,7 +127,7 @@ describe.runIf(process.platform !== 'win32')('one-line installer interface choic
])
expect(output).toContain('launching Web UI')
expect(readFileSync(fixture.pnpmLog, 'utf8')).toBe('install\n--filter @deepseek-ai/dsh-frontend run build\n')
expect(readFileSync(fixture.pnpmLog, 'utf8')).toBe('install\nrun build\n')
expect(readFileSync(fixture.launchLog, 'utf8')).toBe('web\n')
})

View File

@@ -10,11 +10,11 @@
# `pnpm install`, points the stable `~/.dsh/source/current` symlink
# at that staging worktree and symlinks `dsh` onto PATH at `current/bin/dsh`,
# records your API credentials in the Harness home (`~/.dsh`) dsh reads at boot,
# and lets you launch the Web UI or TUI. The Web choice builds the frontend
# artifact first; the TUI runs directly from TypeScript source through the repo's
# own tsx. Keeping every checkout under ~/.dsh/source keeps successive upgrades
# in one place instead of scattered sibling clones, and lets staging worktrees
# share the master clone's object store. The PATH symlink resolves through
# and lets you launch the Web UI or TUI. The Web choice builds the repository
# artifacts first; the TUI runs directly from TypeScript source through the
# repo's own tsx. Keeping every checkout under ~/.dsh/source keeps successive
# upgrades in one place instead of scattered sibling clones, and lets staging
# worktrees share the master clone's object store. The PATH symlink resolves through
# `current`, so an upgrade repoints one stable symlink instead of relinking PATH:
# the `dsh` on PATH never moves and can never dangle.
#
@@ -353,8 +353,8 @@ if [ "$HAS_TTY" = 1 ]; then
LAUNCH_INTERFACE=$(ask "Choose an interface [1/2]:" 1)
case "$LAUNCH_INTERFACE" in
1|web|Web|WEB)
step "Building Web UI"
( cd "$DSH_STAGING" && pnpm --filter @deepseek-ai/dsh-frontend run build )
step "Building DeepSeek Harness for Web UI"
( cd "$DSH_STAGING" && pnpm run build )
info "launching Web UI — run 'dsh web' anytime to start again"
exec "$DSH_BIN_DIR/dsh" web </dev/tty
;;
@@ -369,7 +369,7 @@ if [ "$HAS_TTY" = 1 ]; then
done
else
info "install complete. Build and start the Web UI with:"
printf ' (cd %s && pnpm --filter @deepseek-ai/dsh-frontend run build)\n' "$DSH_STAGING"
printf ' (cd %s && pnpm run build)\n' "$DSH_STAGING"
printf ' %s web\n' "$DSH_BIN_DIR/dsh"
info "or start the TUI with:"
printf ' %s\n' "$DSH_BIN_DIR/dsh"