From 4ada0017cf4e8f6a61617af780a6c451307598a2 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Fri, 31 Jul 2026 19:57:51 +0800 Subject: [PATCH] fix(install): build workspace artifacts before web --- README.i18n.yaml | 4 ++-- README.md | 6 +++--- README.zh.md | 6 +++--- apps/cli/tests/install-script.spec.ts | 2 +- scripts/install.sh | 16 ++++++++-------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.i18n.yaml b/README.i18n.yaml index c37e24e075..c999eac01a 100644 --- a/README.i18n.yaml +++ b/README.i18n.yaml @@ -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 diff --git a/README.md b/README.md index f536757857..e297ff32c4 100644 --- a/README.md +++ b/README.md @@ -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-`. 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 ``` diff --git a/README.zh.md b/README.zh.md index b9f593857d..5995acdf8d 100644 --- a/README.zh.md +++ b/README.zh.md @@ -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 ``` diff --git a/apps/cli/tests/install-script.spec.ts b/apps/cli/tests/install-script.spec.ts index 63bb0c307f..8c25ff6891 100644 --- a/apps/cli/tests/install-script.spec.ts +++ b/apps/cli/tests/install-script.spec.ts @@ -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') }) diff --git a/scripts/install.sh b/scripts/install.sh index 9e110e32cf..0525da9e34 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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