DSH 浏览器表层组合包,在 dsh-base 之上叠加 Web 宿主与浏览器插件,注册前端 dist、URL 输出与 DSH_WEB_URL 变量。
- 语言
- TypeScript
- License
- MIT
- 分支
- main
安装
$ dsh plugin --profile web add github:op7418/pilot-harness/packages/bundle/web-app在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
一句话定位
DSH 的浏览器表层组合包。在 dsh-base 之上叠加 Web 宿主与浏览器插件,让 dsh --profile web 起一个本地 GUI 服务。
核心能力
- 在 dsh-base 之上叠加 Web 宿主行(webserver、API 网关、workspace、投影缓存、存储)与浏览器插件组合(主题、布局、会话、命令、插件中心、模型选择等)
- 解析
--host/--port/--trusted-host/--help等命令行参数,并以webStartup服务提供给宿主行 - 在端口就绪、Loader 配置树结算后打印
dsh web: http://127.0.0.1:<port>,避免兄弟行失败时公告一个已失效的应用 - 在 bash 环境中注册
DSH_WEB_URL运行时变量,每次调用时由当前监听 URL 解析 - 给模型系统提示词注入
harness:source和app:web-surface段落,让模型知道它在 GUI 中以及不接受浏览器替代品 - 监听阶段从当前网卡采样 IPv4 地址,作为 LAN 信任栅栏的来源
技术实现
- 语言: TypeScript (ESM)
- 关键依赖:
@deepseek-ai/dsh-web-frontend(前端 dist 入口)、commander(命令行解析)、@deepseek-ai/cordis&@deepseek-ai/cordis-plugin-loader(插件宿主) - 架构模式: Cordis function plugin +
cordis.patch.yml组合包,通过dsh.bundle.patchmanifest 字段叠加在 dsh-base 之上;宿主行注入webStartup服务,web-runtime 采样 bind 依赖值后释放webRuntime给客户端信任栅栏 - 入口文件:
src/index.ts(web-runtime glue plugin) +src/startup.ts(CLI provider) +cordis.patch.yml(补丁层)
适用场景
给最终使用者安装「浏览器里跑的 dsh」体验:本地装一个仓库后,谁想用 GUI 而不是 CLI/TTY 就可以装这个 bundle;或者开发者需要带 URL 的 dsh 进程来给宿主、Claude Code/Codex 这类工具代理时使用。也适合作为 dsh-frontend 的资源供应商,上游打包/分发平台以此 bundle 为嵌入点。
前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| DSH | 0.1.0-rc.7+ | 与 monorepo 同版本,本 bundle 与 dsh-base / dsh-headless 同级 |
| Node | ^22.19.0 || >=24.0.0 | 来自 monorepo 根 package.json 的 engines.node 字段 |
| 平台 | 跨平台 | 未声明 os/cpu 限制;启动行为不依赖特定 OS |
| 原生模块 | 无 | 仅使用 Node 内置 node:os / node:module / node:url,未引入 node-gyp 依赖 |
安装方式
dsh plugin --profile web add github:op7418/pilot-harness/packages/bundle/web-app
配置项
bundle 自身配置(写在 cordis.patch.yml 的 web-runtime 行)
| 配置 | 类型 | 说明 | 默认值 |
|---|---|---|---|
printUrl | boolean | 是否在端口就绪后向终端打印 dsh web: http://127.0.0.1:<port> 一行 | true |
surfaceContext | boolean | 是否给模型注入「Web 表层」提示词段落和 bash 变量 DSH_WEB_URL | true |
trustedHosts | string[] | --trusted-host 命令行参数传入的额外权威主机,会拼入浏览器信任栅栏 | [] |
命令行参数(通过 dsh --profile web 传入)
| 参数 | 用途 |
|---|---|
--host <host> | 监听 host;绑定 0.0.0.0 会被拒绝并报 usage error |
--port <port> | 监听端口;传 0 表示由 OS 选一个空闲端口 |
--trusted-host <authority...> | 浏览器信任栅栏额外允许的权威主机,可重复 |
-h, --help | 打印本应用帮助文本;打印过程中不启动服务 |
常见问题
Q: 这个 bundle 是什么,有什么用?
A: 它是 dsh 的「Web 表层」组合包,在 dsh-base 之上叠加一层浏览器界面所需的全部宿主与浏览器插件,安装后通过 dsh --profile web 启动一个本地 GUI 服务。
Q: 和 dsh-headless、dsh-desktop 是什么关系?
A: 这三个是 dsh-base 上的同级表层组合包。web-app 是浏览器表层,headless 是无界面表层,desktop 是桌面应用;它们互不嵌套,按 --profile 选其一加载。
Q: 启动后会自动打开浏览器吗?能不能关掉?
A: 这个 bundle 本身不负责拉起系统浏览器,只在端口就绪后打印一行 dsh web: http://127.0.0.1:<port>。是否由其它层(如 desktop 或外部 supervisor)打开浏览器不在此 bundle 范围内。
Q: 为什么 --host 0.0.0.0 被拒绝?
A: bundle 当前有意不支持绑定所有网卡(会在激活前报 usage error 并退出),因为这会把远程代码执行能力暴露到网络。请使用 127.0.0.1 或 LAN 信任主机模式。
Q: 报「frontend dist not built」该怎么办?
A: 这表示仓库未构建前端 dist。此 bundle 把 dist 路径当作工作区内部知识,要求在仓库根先执行 pnpm run build,然后再启动 dsh --profile web。
Q: 提供的 DSH_WEB_URL 变量是干什么用的?
A: bundle 会注册一个 bash 可见的运行时变量 DSH_WEB_URL,每次调用时由当前监听的本地 URL 解析,模型与脚本可用它定位当前 GUI。
Q: Web 和 dsh-base 共享的工具/工具栏为什么有些被禁用了?
A: Web 把 agent 平面(tool-bash、tool-pwsh、tool-fs、tool-skill、tool-subagent 等)移到会话级别的 agent 预设中,宿主平面只保留 registry 与服务,因此联网后的 agent 由各自 preset 决定如何装配。
Q: HMR 好像没在工作?
A: 当前 hmr 行在 cordis.patch.yml 中被置为禁用,并标注 TODO:等 Web 端重载生命周期测试完成后重新启用;客户端插件热重载需配合 pnpm run dev:web watcher 才会触发。
上手难度
入门 — 安装一次、跑一行 pnpm run build 与 dsh --profile web 即可在浏览器看到界面;除 --host / --port / --trusted-host 外没有必填配置。
已知问题与限制
- 前端 dist 必须已构建:对 dist 的
require.resolve在激活时报错并给出构建提示,没有从源码直接服务的回退路径(README.md:25) lanAddresses是启动期快照:启动后网卡变化不会重新公告;打印的 LAN URL 始终与配置的信任栅栏一致(README.md:26)--host 0.0.0.0被有意拒绝:CLI 把「绑定所有网卡」视为安全风险,会在解析阶段退出而不发布webStartup服务(src/startup.ts:69-71)hmr行被禁用:cordis.patch.yml 中以 TODO 标注,等 Web 端重载生命周期测试完成后再启用(cordis.patch.yml:21-23)DSH_TOOLS_MODE是临时绕过:整个 dsh 进程的 tools 模式(native|code|both)通过环境变量切换,等 Web UI 能按 session 选择后移除(cordis.patch.yml:36-41)
Pilot Harness
English | 中文
A CodePilot-inspired desktop client and plugin suite for DeepSeek Harness.
Run the DeepSeek Harness plugin runtime as a focused native app, manage providers and multimodal models visually, and keep desktop additions isolated as ordinary Harness plugins.
Quick start · Plugins · Architecture · MIT License
Why Pilot Harness
DeepSeek Harness has a powerful “everything is a plugin” architecture, but its default experience is designed around a CLI-launched Web UI. Pilot Harness keeps that runtime model and adds the parts expected from a daily desktop product:
- A real desktop app — Electron packages the local Harness runtime for macOS, Windows, and Linux, owns native window behavior, and provides a recovery screen when startup needs attention.
- A calmer CodePilot-inspired interface — consistent tokens, radii, menus, hover states, settings cards, Markdown, conversation/trajectory navigation, and platform-aware title bars.
- Provider and model management — connect supported providers, declare an OpenAI-compatible endpoint, manage credentials separately from settings, browse the live model catalog, and identify image-capable models.
- Workspace context without clutter — project-aware conversation rows show branch, state, reminder summary, mode, and model details, while Files opens as a true right sidebar.
- Plugin-first extensions — the theme, Worktree sidebar, Schedule summary, and Session-log export remain Cordis/DeepSeek Harness rows rather than desktop-only business logic.
- Reversible customization — disabling the CodePilot theme row removes its product mark and visual overrides so the stock Harness presentation can take over again.
Pilot Harness does not replace the DeepSeek Harness agent loop, Session log, tool pipeline, provider contracts, or RPC implementation. Electron owns packaging and native integration; the composed Harness plugin tree remains the application runtime.
Quick Start
Download the installer for your system from GitHub Releases:
| Platform | Download | Install and handle the security prompt |
|---|---|---|
| macOS (Apple Silicon) | DMG installer ZIP app | Open the DMG, drag pilot-harness.app into Applications, and launch it normally. A formal Release is published only after its Developer ID signature has been verified. Because notarization is not enabled yet, Gatekeeper may still block the first launch; in that case open System Settings → Privacy & Security, click Open Anyway, then confirm Open. Do not run xattr or disable Gatekeeper for a formal Release. If macOS reports that the signed app is damaged, delete it, verify the Release checksum, and download it again instead of bypassing the warning. Apple's security instructions. |
| Windows (x64) | EXE installer | Run the EXE. If Microsoft Defender SmartScreen says Windows protected your PC, first confirm that the file came from this Release, then choose More info → Run anyway. Do not disable SmartScreen globally. A managed computer may hide this option; contact its administrator instead. Microsoft's SmartScreen explanation. |
| Linux (x64) | AppImage DEB RPM | DEB: sudo apt install ./Pilot-Harness-Linux-amd64.debRPM: sudo dnf install ./Pilot-Harness-Linux-x86_64.rpmAppImage: chmod +x Pilot-Harness-Linux-x86_64.AppImage, then ./Pilot-Harness-Linux-x86_64.AppImage. If the file manager blocks execution, enable Allow executing file as program in file properties. The preview packages are unsigned, so only accept a package-manager warning after confirming the official Release source. |
The table links to formal end-user Releases, not the seven-day Actions preview artifacts. Formal macOS files must pass Developer ID verification before publication; while they remain unnotarized, the only expected extra step is Open Anyway in System Settings. Preview macOS artifacts are ad-hoc signed for CI verification and are not the normal installation path. Once notarization is enabled, the Open Anyway step should normally disappear and this guide must be updated with the release pipeline. Windows and Linux preview installers remain unsigned. Only override an operating-system warning for files downloaded from this repository's official GitHub Release; do not turn off platform security globally.
After installation, open Pilot Harness, select a Workspace, then go to Settings → Providers to connect a provider and choose one of its available models. No separate DeepSeek Harness installation is required for the desktop app. Source setup and packaging instructions live in Development, not in the user installation path.
What is included
| Area | What Pilot Harness adds | Ownership |
|---|---|---|
| Desktop shell | Native window, local runtime lifecycle, directory dialog, recovery, installers, and platform icons | Electron app |
| Visual system | CodePilot-inspired design tokens and component contracts | @deepseek-ai/dsh-client-ui-codepilot-theme |
| Workspace Files | Right sidebar, file count, branch summary, row actions, and @path insertion | @deepseek-ai/dsh-ui-worktree |
| Reminder summary | Active reminder count and nearest scheduled time in Session hover details | @deepseek-ai/dsh-ui-schedule-summary |
| Session export | Per-Session ZIP export from the Trajectory toolbar and /export | @deepseek-ai/dsh-session-log-export |
| Providers and models | Configurable adapter, credential/settings UI, live catalog, and multimodal labels | Existing Harness plugins plus the Pilot Harness desktop profile |
The provider/model experience is deliberately a profile composition, not a new provider implementation. It mounts existing adapter, Settings, and Credentials contracts, then replaces the desktop placeholder only after a real provider advertises a usable model.
Use the plugins independently
The desktop client already includes every plugin below. If you use a local DeepSeek Harness Web profile instead, install only the feature you want with one command; each release asset is a prebuilt dsh.bundle, so no repository clone, YAML patch, or local build is required.
CodePilot theme
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-client-ui-codepilot-theme-0.1.0-rc.5.tgz
Applies the Pilot Harness visual system and product mark. Removing the plugin restores the stock Harness presentation. See theme details.
Files sidebar
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-ui-worktree-0.1.0-rc.5.tgz
Adds the Workspace-confined right file sidebar, file count, branch summary, row actions, and @path insertion. See Files plugin details.
Reminder summary
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-ui-schedule-summary-0.1.0-rc.5.tgz
Adds active-reminder metadata to Session hover details while the upstream Schedule plugin remains the reminder authority. See reminder plugin details.
Session-log export
dsh plugin --profile web add https://github.com/op7418/pilot-harness/releases/latest/download/deepseek-ai-dsh-session-log-export-0.1.0-rc.7.tgz
Adds per-Session ZIP export to the Trajectory toolbar and the /export command. See export plugin details.
Restart the Web profile after installation and use dsh --profile web --dump-config to confirm the added row. Files and Reminder summary require the Pilot Harness UI slot contracts included in Pilot Harness v0.1.0; older upstream Harness builds can install their bundles but cannot render those two UI contributions.
Remove a plugin with the same package name shown in its details page, for example:
dsh plugin --profile web remove @deepseek-ai/dsh-ui-worktree
Development
git clone https://github.com/op7418/pilot-harness.git
cd pilot-harness
pnpm install
pnpm run desktop:dev
Run the desktop checks with:
pnpm run desktop:test
pnpm --filter @deepseek-ai/dsh-desktop run typecheck
pnpm --filter @deepseek-ai/dsh-desktop run test:e2e
Official installers are never built or uploaded from a developer machine. Every verified push to main, and a manual workflow dispatch without a release tag, produces seven-day Actions preview artifacts on native macOS, Windows, and Linux runners. A version-matched v* tag starts the formal path, verifies the platform artifacts and macOS Developer ID signature, generates SHA256SUMS.txt, and publishes the GitHub Release.
The Sync DeepSeek Harness upstream workflow checks the newest non-draft official release every day at 09:00 Asia/Shanghai. A clean update is merged without force-pushing, verified, committed to main, and dispatched to the same native release pipeline as v<upstream-version>-pilot.1. A merge conflict opens or refreshes a GitHub Issue and stops before changing main; missing macOS signing secrets also open an issue and leave the verified source synchronized without publishing an unsigned release. Rerunning the workflow after resolving either condition resumes the pending release.
For the underlying system, read the DeepSeek Harness architecture, development guide, and desktop architecture.
Upstream, attribution, and trademark notice
Pilot Harness is an independent community project derived from the MIT-licensed DeepSeek Harness and visually inspired by CodePilot. It is not an official DeepSeek product and is not endorsed by or affiliated with DeepSeek. “DeepSeek”, “DeepSeek Harness”, and “CodePilot” remain the property of their respective owners.
License
Pilot Harness is available under the MIT License. Third-party software and licenses are listed in THIRD_PARTY_NOTICES.md.