DeepSeek Harness GUI
August 14, 2026 · View on GitHub
DeepSeek Harness 的独立桌面 GUI(Electron 壳)——前端与官方 webui 完全一致(主区 iframe 直接加载官方 webui,无任何改版),并完整保留 Harness 原生的更新接口、插件接口与 四种运行模式。
保留的原生能力
| 能力 | 实现方式 |
|---|---|
| 四种运行模式 | 标准 / PTC / 极简 / 创造 —— webui 内 Agent Preset 选择(与官方 config/agent-presets/ 一致),设置页可查看说明 |
| 更新接口 | 设置 → 更新:内置 npm 将 @deepseek-ai/dsh 升级到最新(连同全部依赖包),失败时旧版本原样保留 |
| 插件接口 | 设置 → 插件:dsh plugin --profile <name> <pnpm 参数>(add/remove/update,安装后自动 reconcile dsh.profile.bundles);设置 → 配置覆盖:编辑 cordis.patch.yml |
| headless 模式 | 设置 → Headless 控制台:一次性任务,流式输出 |
| 一键下载依赖 | 设置 → 运行时:runtime 缺失/损坏时一键重建,多级降级:node 下载失败→复用系统 node;npm 默认源失败→npmmirror 镜像→系统全局 dsh 免网复制。安装包内置完整运行时、打开即用 |
| 数据目录 | 沿用 ~/.dsh(sessions/storages/profiles),设置页可打开 |
架构
Electron 壳 UI ──IPC──> Electron main (Node)
│ spawn
▼
runtime/node/node.exe dsh lib/bin.js --profile web --port 0
│ 解析 URL 行 "dsh web: http://127.0.0.1:<port>"
▼
<iframe> 加载官方 webui(dsh-web-frontend dist + 全部 client 插件)
- 无边框圆角窗口:
transparent: true+frame: false,整个应用是一张 18px 圆角 卡片,无系统边框直角廉价感;右上角悬浮毛玻璃窗口控制(设置/最小化/最大化/关闭), 顶部细透明条可拖动窗口。 - dev 模式:复用项目内
runtime/(node v24 + dsh 全家桶 + pnpm),Vite 端口 15210 - release 模式:自包含运行时(
runtime/打进安装包 extraResources),离线可用
下载
- v0.2.0(最新):Releases
DeepSeek-Harness-GUI-Setup-0.2.0.exe—— NSIS 安装包(174MB)DeepSeek-Harness-GUI-Portable-0.2.0.exe—— 便携单 exe(244MB),免安装,双击即用,首次运行自解压到%LOCALAPPDATA%\dsh
开发
npm install
npm run start:dev # Vite + Electron 并行
打包发布
# 1.(可选)重建自包含运行时(下载便携 node + 安装 dsh 全部依赖 + 打包)
powershell -ExecutionPolicy Bypass -File scripts\bundle-runtime.ps1
# 2. 构建 NSIS 安装包(输出到 release/)
npm run dist
# 3. 构建便携单 exe(免安装,双击即用,首次运行自解压到 %LOCALAPPDATA%\dsh)
npm run dist:portable
便携包为什么不用 electron-builder 自带 portable target:其 7z SFX stub (25.x 与 26.x 均如此)解压时静默丢弃超长路径文件(runtime 的 node_modules 深层包, 如 @mistralai/@opentelemetry 的 90+ 个 .js),导致 dsh 启动报
Cannot find module './ServiceInstanceIdDetector'。scripts/build-portable.cjs改用 7za 打 7z + NSIS 内嵌(Nsis7z 解压),解压目标%LOCALAPPDATA%\dsh短路径 (49 字符)+ 归档最长路径 197 = 246 < 260 缓冲限制,长路径文件完整解压。 首次启动解压约 2-3 分钟(Defender 实时扫描拖慢),之后秒开。
注:npm install 在中国网络需指定镜像:
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm install --registry=https://registry.npmmirror.com