# deepseek-harness-desktop-app

> The root Client Bundle for DSH Web Profile that replaces the official DSH Web UI shell, hosting this product's workspace sidebar, sessions, and settings interface.

## Metadata

- Author: [@vibeinging](https://github.com/vibeinging)
- Repo: <https://github.com/vibeinging/deepseek-harness-desktop-app.git>
- GitHub: [vibeinging/deepseek-harness-desktop-app](https://github.com/vibeinging/deepseek-harness-desktop-app)
- Stars: 606
- Language: JavaScript
- License: [MIT](https://spdx.org/licenses/MIT.html)
- Topics: `agentic-workflows`, `ai-agent`, `ai-workbench`, `data-analysis`, `deepseek-harness`, `desktop-app`, `dsh`, `dsh-plugin`, `electron`, `local-first`, `mcp`, `model-context-protocol`, `office-automation`, `react`, `typescript`
- Forks: 32
- Open Issues: 6
- Last push: 2026-08-15T08:56:28.000Z
- Added: 2026-08-20T00:00:00.000Z

## Install

```bash
dsh plugin --profile web add github:vibeinging/deepseek-harness-desktop-app/packages/dsh-work-shell
```

## Wiki

## 一句话定位
这个插件把 DSH Web 界面原本由官方负责的可见根替换为「DeepSeek Harness Desktop App」自己的工作区壳——侧栏、对话窗口和设置页都用本产品的样式承载。它必须挂载到 DSH Web Profile 里才能生效，不是单独可运行的程序。

## 核心能力
- 接管 DSH Web 的可见根：禁用官方 ui-layout / ui-sidebar / ui-conversation / ui-settings-general，改用本产品壳渲染
- 接管侧栏：在产品工作区侧栏底部追加 DSH 插件的页脚动作
- 接管会话窗口：在产品对话区暴露官方会话的「已排队输入」快照（只读）
- 接管设置：注册「常规」分区，集中渲染各插件的设置项（外观/语言/权限等内置项除外）
- 接管主题：把当前主题应用到页面主题色、字体色等
- 提供 layout 服务：响应切换侧栏、打开/关闭详情面板的请求

## 技术实现
- **语言**: TypeScript + JavaScript
- **关键依赖**: `@deepseek-ai/dsh-client-runtime`、`@deepseek-ai/dsh-client-ui-slots`、`@deepseek-ai/dsh-client-ui-layout`、`react-dom`（portal）
- **架构模式**: Cordis Patch Bundle —— 用 `cordis.patch.yml` 禁用官方 4 个 UI 插件并插入自身；通过 `ctx.reflect.provide` 注册 layout 服务，通过 `ctx.slots.register` 注册 4 个 slot；用 React Portal 把内容注入产品 DOM
- **入口文件**: `packages/dsh-work-shell/src/index.js`（host 空壳） + `packages/dsh-work-shell/src/client/index.tsx`（浏览器端实现）

## 适用场景
DeepSeek Harness Desktop App 在打包发行时，把 DSH Web Profile 的可见壳替换为自己的产品壳，让用户在桌面客户端里看到品牌化的工作区/会话/设置体验，而不是 DSH 默认的官方界面。它必须配合官方 DSH 宿主运行，不是独立可分发的应用。

## 前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| Node | ^22.19.0 \|\| >=24.0.0 | package.json#engines 声明的运行时 |
| Cordis | ^4.0.1 | 插件框架 |
| DSH Client locale | ^0.1.0-rc.6 | 语言服务 |
| DSH Client runtime | ^0.1.0-rc.6 | 客户端运行时 |
| DSH Client ui-conversation / ui-layout / ui-sidebar / ui-settings / ui-slots / ui-theme | ^0.1.0-rc.6 | 注入式 UI 模块 |
| DSH Client web-react | ^0.1.0-rc.6 | React 适配层 |
| React / ReactDOM | ^18.2.0 | UI 库 |
| 平台 | Web（macOS / Windows 桌面客户端打包目标） | package.json 中 `dsh.client.platform: "web"`；父仓 Electron 桌面端仅打包 mac 与 Windows |

## 安装方式
```bash
dsh plugin --profile web add github:vibeinging/deepseek-harness-desktop-app/packages/dsh-work-shell
```

## 配置项
本插件无需额外配置——源码中无 Schema、无 `process.env` 读取、无用户可配置字段，所有行为由 Cordis Patch 与 ClientContext 注入决定。

## 常见问题

**Q: 安装后没看到任何变化？**

A: 这个插件只对 DSH Web Profile 起作用，并且必须被 DeepSeek Harness Desktop App 通过 Profile bundle list 挂载。单独安装到通用 DSH Web 上不会让官方 UI 变成产品壳。

**Q: 它是独立应用吗？**

A: 不是。它是 Profile Bundle，需要 DSH 宿主承载，浏览器 bundle 必须通过 `/plugins/<id>/client.js` 路由加载，没有独立页面。

**Q: 是否会替换掉 DSH 官方功能？**

A: 不会替换。它只接管可见根（侧栏/对话/设置），官方运行时、传输、Client 图与特性行都保留，主题与语言状态直接复用官方共享服务。

**Q: 能和官方插件共存吗？**

A: 它会禁用官方 ui-layout、ui-sidebar、ui-conversation、ui-settings-general 这 4 个内置 UI；其余官方插件按 Profile 列表加载，DSH 官方 Models 等 section 在存在时仍会被渲染。

**Q: 交互式输入扩展能用吗？**

A: 暂不支持。源码与 README 明确写出「Interactive input and message Slots remain unsupported until they can reuse the same Session command path without introducing a second input or queue owner」，目前只暴露只读的 composer dock 快照。

**Q: 卸载后会怎样？**

A: 移除后 DSH Web 回退到官方默认 UI（ui-layout/sidebar/conversation/settings-general 重新启用），本插件不在本地持久化任何业务数据，因此不影响其他模块。

## 上手难度
专家 —— 这是面向 DSH Profile / Cordis Patch / Client Plugin 体系的双面扩展包，需要熟悉 DSH 内部 Slot、ClientContext 与 Profile Bundle 注入机制，普通用户不应直接安装。

## 已知问题与限制
- 交互式 input 与 message Slot 暂不支持，仅暴露只读的 composer dock 快照（README.md:5 / src/client/index.tsx:127-163）
- `details` slot 已在 children 声明（src/client/index.tsx:175），但产品壳未渲染该面板（README.md:5）
- App storage 仅作为独立开发时的 fallback，不在发行版生效（README.md:5）
- 浏览器 bundle 必须经由 DSH 的 `/plugins/<id>/client.js` 路由加载，不存在独立页面（README.md:5）
- 本包 `"private": true`，仅能通过 Profile bundle list 挂载，不能独立发布（package.json:5 / README.md:5）

---

This document is auto-generated by [deepseek-plugin.org](https://deepseek-plugin.org). HTML page: [deepseek-harness-desktop-app](https://deepseek-plugin.org/plugins/vibeinging/deepseek-harness-desktop-app/packages/dsh-work-shell)
Wiki generated by AI (model: `MiniMax-M3`)
