dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
a desktop shell for deepseek-harness (dsh). Import deepseek-harness via zip or git, then self-pack and self-update with one click. Packaging-only: never forks or bundles deepseek-harness source; you bring your own workspace. deepseek-harness(dsh)的桌面外壳,支持 zip/git 导入后一键自行打包与更新,纯打包项目、不内置官方源码。
Electron desktop shell for deepseek-harness (dsh).
DeepSeek Desktop Studio wraps the dsh command-line workflow in a native
desktop app, then adds a real workbench around it: a three-column layout with
a file/git sidebar, a change-review and health panel, a bottom log bar, a
command palette, and guarded git operations — without touching a terminal.
It is deliberately not a heavyweight IDE. Everything it adds is a shell around the dsh page; the coding itself still happens in your editor and in the agent.
Stage, unstage and commit from the sidebar — or switch branches and discard a file's unstaged changes. All of it runs through three hard guards enforced in the only module that shells out to git:
.git/index.lock is never fought over;Hooks run normally and are never skipped.
Ctrl+K opens a fuzzy-matched palette over the app's own menu actions —
panel toggles, settings, diagnostics, backend restart, font scale steps.
The palette is built from the same action closures the menu uses, so it can
never offer an action the app cannot perform.
Ctrl+Alt+D) — self-check of every preload and
view, log tails, and a redacted copy-to-clipboard report. It is the one
window that must keep working when the others are broken, so its preload
is the most sandboxed thing in the app.Ctrl+,) — theme, panel font scale, panel visibility,
external editor, update channel.setZoomFactor, which would break the layout).src/*.ts ──(tsc)──▶ lib-new/*.js ──(electron-builder)──▶ dist/*
| Area | Modules | Responsibility |
|---|---|---|
| Bootstrap | main.ts, launcher.ts, runtime-source.ts, env-detector.ts, workspace.ts, wizard.ts | App lifecycle, spawning/resolving dsh, first-run |
| Windows & layout | window-manager.ts, layout-geometry.ts, ui-scale.ts | WebContentsView layout, geometry arithmetic (pure, unit-tested) |
| Panels | ipc-registry.ts, panel-preload.ts, sidebar-preload.ts, logbar-preload.ts | Every IPC channel in one registry; sandboxed page bridges |
| Git | git-service.ts, fs-tree.ts, file-tree.ts, sidebar-service.ts | The only module that shells out to git; all write guards live here |
| Agent feeds | dsh-stream.ts, event-store.ts, stats-model.ts, approval-groups.ts | SSE mux consumption, session projections, aggregated stats |
| Command palette | command-model.ts, command-registry.ts, command-palette-window.ts | Zero-dependency fuzzy matching, dispatch from menu closures |
| Logging & diagnostics | logging.ts, redact.ts, health-monitor.ts, diagnostics*.ts | Ring buffers, token redaction, health phases, self-check |
| Infrastructure | preferences.ts, theme.ts, external-editor.ts, channels.ts, tray.ts, menu.ts, relaunch.ts | Config, theming, editor integration, tray/menu |
Pure-logic modules (geometry, stats, models, guards) carry zero runtime
dependencies and are unit-tested in plain node — see test/.
npm test # tsc + 29 unit/contract/smoke suites
The suite includes contract tests that scan the preload/HTML/IPC sources for bridge drift (a method used by a page but never exposed, or a channel never registered), dependency rules for sandboxed preloads, and type-scale rules that keep every shell page scalable. Mutation testing is used during development to prove the tests catch real regressions.
dsh CLI is resolved/installed automatically by the launcher.npm install # or: pnpm install
npm run dev # tsc + electron (dev mode, no packaging)
npm test # full unit/contract/smoke suite
npm run pack # Windows portable exe → dist/
npm run pack:mac # macOS dmg
npm run pack:linux # Linux AppImage (build inside Linux — see below)
The Windows build targets portable (single self-contained exe). The
electron-builder.js hook re-applies the app icon after packing because
signAndEditExecutable is disabled for locked-down environments.
Linux needs dpkg/fakeroot, so build the AppImage inside a Linux container
(node:22-bookworm): copy the source in (excluding node_modules), npm install, tsc, then electron-builder --linux. The afterPack hook
renames the main ELF and wraps it with a --no-sandbox launcher script so
the AppImage also starts on distributions that disallow unprivileged
user namespaces (e.g. Ubuntu 24.04+).
npm run dev).Shortcuts worth knowing: Ctrl+K command palette, Ctrl+, settings,
Ctrl+Alt+D diagnostics, Ctrl+Alt+F/B/S/L sidebar/panel/status/log bar.
This project is built on top of
deepseek-harness
(MIT © 2026 DeepSeek). See LICENSE for the full text.
适用于 deepseek-harness(简称
dsh)的 Electron 桌面外壳。
DeepSeek Desktop Studio 把 dsh 命令行工作流封装成原生桌面应用,再围绕它加了一层真正的工作台:文件/git 侧栏、变更审查与健康监控面板、底部日志面板、命令面板、带护栏的 git 操作——全程无需打开终端。
它刻意不做重量级 IDE:所有附加物都是围绕 dsh 页面的壳;写代码这件事仍然发生在你自己的编辑器和 agent 里。
在侧栏里暂存、取消暂存、提交,也能切分支、放弃单文件的未暂存改动。所有操作经过三道硬护栏,强制在唯一与 git 进程打交道的模块里执行:
.git/index.lock 时绝不争抢;hooks 正常运行,绝不跳过。
Ctrl+K 打开模糊匹配的命令面板,覆盖应用自身的菜单动作——面板显隐、设置、诊断、重启后端、字号档位。命令列表由菜单同一批动作闭包构建,因此面板永远不可能给出应用做不到的动作。
Ctrl+Alt+D)—— 各 preload 与视图自检、日志尾部、脱敏后一键复制报告。它是「其他东西都坏了时还能用的那个窗口」,因此它的 preload 是全应用沙箱最严格的地方。Ctrl+,)—— 主题、面板字号、面板显隐、外部编辑器、更新通道。setZoomFactor,那会破坏布局)。src/*.ts ──(tsc)──▶ lib-new/*.js ──(electron-builder)──▶ dist/*
| 领域 | 模块 | 职责 |
|---|---|---|
| 启动 | main.ts、launcher.ts、runtime-source.ts、env-detector.ts、workspace.ts、wizard.ts | 应用生命周期、拉起/解析 dsh、首次启动 |
| 窗口与布局 | window-manager.ts、layout-geometry.ts、ui-scale.ts | WebContentsView 布局、几何运算(纯函数、单测覆盖) |
| 面板 | ipc-registry.ts、panel-preload.ts、sidebar-preload.ts、logbar-preload.ts | 全部 IPC 通道集中注册;沙箱化页面桥 |
| git | git-service.ts、fs-tree.ts、file-tree.ts、sidebar-service.ts | 唯一与 git 进程打交道的模块;全部写护栏在此 |
| agent 数据 | dsh-stream.ts、event-store.ts、stats-model.ts、approval-groups.ts | SSE mux 消费、会话投影、聚合统计 |
| 命令面板 | command-model.ts、command-registry.ts、command-palette-window.ts | 零依赖模糊匹配、从菜单闭包分发 |
| 日志与诊断 | logging.ts、redact.ts、health-monitor.ts、diagnostics*.ts | 环形缓冲、token 脱敏、健康相位、自检 |
| 基础设施 | preferences.ts、theme.ts、external-editor.ts、channels.ts、tray.ts、menu.ts、relaunch.ts | 配置、主题、编辑器集成、托盘/菜单 |
纯逻辑模块(几何、统计、模型、护栏)零运行时依赖,可在纯 node 下单测——见 test/。
npm test # tsc + 29 个单元/契约/冒烟套件
套件包含契约测试:扫描 preload/HTML/IPC 源码防止桥漂移(页面用了但 preload 没暴露的方法、注册了但没人发的通道)、沙箱 preload 的依赖规则、以及保证每个 shell 页面可缩放的字号 token 规则。开发过程中使用变异测试证明这些测试真能抓住回归。
dsh CLI 由启动器自动解析/安装。npm install # 或:pnpm install
npm run dev # tsc + electron(开发模式,不打包)
npm test # 完整单元/契约/冒烟套件
npm run pack # Windows 便携 exe → dist/
npm run pack:mac # macOS dmg
npm run pack:linux # Linux AppImage(需在 Linux 内构建,见下)
Windows 构建目标为 portable(单个自包含 exe)。由于受限环境下禁用了 signAndEditExecutable,electron-builder.js 钩子会在打包完成后重新应用应用图标。
Linux 需要 dpkg/fakeroot,请在 Linux 容器(node:22-bookworm)内构建:源码拷入(排除 node_modules)、npm install、tsc、electron-builder --linux。afterPack 钩子会把主程序 ELF 改名并换成带 --no-sandbox 的启动脚本,使 AppImage 在禁用非特权 user namespace 的发行版(如 Ubuntu 24.04+)上也能启动。
npm run dev)。值得一记的快捷键:Ctrl+K 命令面板、Ctrl+, 设置、Ctrl+Alt+D 诊断、Ctrl+Alt+F/B/S/L 侧栏/监控/状态栏/日志面板。
本项目构建于 deepseek-harness(MIT © 2026 DeepSeek)之上。完整文本见 LICENSE。
English
中文
English
Ctrl+K command palette, diagnostics self-check window
(Ctrl+Alt+D), settings window (Ctrl+,), external editor integration,
panel font scaling, workspace switcher (root name → dsh session dirs).~/.dsh/model-prices.json
(built-in DeepSeek pricing; unmatched presets are simply not priced).中文
Ctrl+K 命令面板、诊断自检窗口(Ctrl+Alt+D)、设置窗口(Ctrl+,)、外部编辑器集成、面板字号调节、工作区切换器(根目录名 → dsh 会话目录)。~/.dsh/model-prices.json(用户可编辑,内置 DeepSeek 官方价;未匹配的 preset 不计费)。English
DSH_CLIENT_COMMIT_HASH must be a Git commit hash; got "". The wizard now injects the resolved HEAD commit hash into the build environment, so the first build succeeds and subsequent launches skip rebuilding (cached).中文
DSH_CLIENT_COMMIT_HASH must be a Git commit hash; got ""。现在向导会在构建环境中显式注入解析到的 HEAD 提交哈希,首次构建成功后,后续启动将跳过重建(已缓存)。