DSH Desktop: Turning the Desktop into a Plugin with DeepSeek Harness
DSH Desktop is an open‑source Thin‑Electron client that treats desktop capabilities—window, tray, terminal, updates, and configuration—as first‑class DSH plugins via the Cordis host, offering installation rollback, startup recovery, and safeguards against accidental plugin disabling.
Project Overview
DSH Desktop (anywhere-labs/deepseek-harness-desktop) is the most‑starred DeepSeek Harness desktop client. Its distinguishing feature is that desktop capabilities themselves are implemented as DSH plugins rather than being wrapped by an external Electron layer.
The official README states the core claim: “Everything is a plugin, the desktop itself is a plugin.” This is reflected in the architecture: windows, tray, terminal, and update mechanisms are mounted into the Cordis host runtime alongside official agents, models, and tool plugins, sharing the same generation context.
Key Capabilities
Desktop‑as‑Plugin Architecture : window, tray, terminal, update, and work‑profile are all DSH plugins attached to the Cordis host.
Installation Rollback Transaction : supports cross‑restart install recovery; if startup health checks fail, the system automatically restores the previous good state.
Plugin Enable/Disable Safety : a two‑stage preview‑token (preview → execute) with a 5‑minute TTL prevents accidental disabling; tokens are one‑time and bound to exact packages.
Undisable Core Plugins : dsh-desktop-app, dsh-plugin-desktop, and dsh-community-market cannot be disabled, ensuring the desktop remains accessible.
Built‑in Plugin Marketplace : discovers, details, installs, and manages plugins via a public schema that connects to various data sources.
Integrated Terminal : provides terminal functionality inside the desktop using node-pty.
Log and Crash Management : 10 MB file limit, 200 MB directory limit, 7‑day cleanup, log sanitization, and crash‑evidence reporting.
Platform Adaptation : separate adapters for Windows, macOS, and Linux handle directory selection, shell mode switching, and update download.
Suitable Scenarios
DeepSeek Harness power users who want desktop capabilities to be composable, replaceable, and evolvable as plugins.
Users concerned about breaking their environment when installing plugins and who value a local‑first, resilient setup.
Developers interested in seeing how Cordis/Koishi plugin practices are applied in a desktop client.
Overall Architecture – How Desktop‑as‑Plugin Is Realized
The design can be summed up as: “Desktop capabilities are not external processes; they are Cordis plugins inside DSH.” The architecture diagram in docs/architecture.md shows a flowchart where the Host Cordis generation simultaneously hosts upstream DSH services, desktop‑owned plugins, and third‑party plugins.
1. Architecture Overview
DSH Desktop consists of three main parts:
Launcher : prepares profiles and provides a built‑in pnpm environment.
Host : the Cordis generation that runs official, desktop, and third‑party plugins.
Renderer : a sandboxed web renderer that communicates via a loopback HTTP/WebSocket carrier, never touching Electron directly.
Any profile or mode switch disposes the current generation and starts a new one; service references, window objects, and subprocess handles cannot be cached across generations, preventing dangling references.
2. Technical Architecture Diagram
(Diagram omitted – described in the source as a Mermaid flowchart.)
3. Startup Flow
Start Electron
│ Single‑instance lock (exit if not acquired)
▼
LogFileSink init (10 MB file / 200 MB dir / 7‑day cleanup) + crash reporting + install‑recovery transaction start
│
▼
resolveDshHome → read profile state → prepare built‑in pnpm / dsh runtime
│
▼
boot() → launch official DSH Host (Cordis root generation)
// inject desktop runtime
// inject built‑in pnpm
// desktop action plugins
// plugin enable/disable service
// work‑profile service
provideCmdline(['--host','127.0.0.1','--port',...])
▼
configureTerminal + mountScheduled + beginRendererBootMonitoring
│
▼
rendererBoot reports readiness
│ Healthy → markHealthy (commit install rollback) + markDesktopProfileHealthy
│ Failure → startup‑recovery window (retry / view logs / exit)
▼
Create tray icon + commit last‑known‑good stateQuick Start
1. Environment Requirements
Windows x64 or macOS Universal (Apple Silicon + Intel).
No additional environment needed (no separate Node.js or pnpm installation).
Platform‑specific installers: NSIS installer for Windows, DMG for macOS.
2. Installation
Download the appropriate installer from GitHub Releases or the official website and run it with a single click.
3. Build from Source (Optional)
git submodule update --init --recursive
corepack yarn install --immutable
corepack yarn devConclusion
DSH Desktop is an open‑source DeepSeek Harness desktop client that turns desktop capabilities into DSH plugins via the Cordis plugin mechanism, allowing windows, tray, terminal, and updates to run in the same runtime as official and third‑party plugins, and it includes engineering‑grade resilience features such as installation rollback, startup recovery, and safeguards against accidental plugin disabling.
References
Project repository: https://github.com/anywhere-labs/deepseek-harness-desktop
Official docs: docs/architecture.md · docs/why-desktop.md · dsh-plugin-desktop/docs/plugin-services.zh.md
Related projects: deepseek-ai/deepseek-harness · Cordis · Koishi.jsSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AI Open-Source Efficiency Guide
With years of experience in cloud computing and DevOps, we daily recommend top open-source projects, use tools to boost coding efficiency, and apply AI to transform your programming workflow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
