DeepSeek Harness (DSH) adopts a plugin-based architecture. The Web profile runs in browser tabs by default. When frequently switching or managing multiple instances, tab management can easily become confusing, and direct process control is lacking. This plugin opens Harness as a standalone Chromium application window through a desktop shortcut, and provides sidebar power controls and the open_web tool.

Core Features

This plugin mainly addresses the following issues:

  1. Desktop shortcut and standalone window: Generates a desktop shortcut that opens Harness by default in Chromium-based browser --app=<url> mode. This mode removes the address bar and tab bar, providing a native-application-like experience. If no Chromium-based browser is installed locally, it falls back to the system default browser.
  2. Sidebar power controls: Adds shutdown (⏻), restart (⟳), and check-for-updates (⬇) buttons at the bottom of the sidebar.
    • Shutdown: Gracefully stops the process, releases resources, and persists the session to disk.
    • Restart: A watchdog process running outside the Harness process tree is responsible for launching a new instance, supporting heartbeat-based self-recovery.
    • Check for updates: Queries the latest version of @deepseek-ai/dsh on npm. When a new version is found, it allows one-click copying of the update command.
  3. open_web tool: Registers a model tool that allows opening a specified URL in a new tab in the default browser.
  4. Multi-signal liveness detection: Before startup, checks port listening status and the owner PID of the task-board lock (~/.dsh/task-board/ledger-v2.lock). If the old instance is not serving but still alive, the launcher diagnoses the issue and exits, avoiding conflicts caused by duplicate startup.
  5. Automatic version check: Automatically checks and prompts for the latest version of @deepseek-ai/dsh on npm.

Installation and Enablement

This plugin is intended only for the web profile. After installation, Harness must be restarted for it to take effect.

# 安装插件
dsh plugin --profile web add Yuanloss/dsh-quick-window-launcher

# 启动 Harness
dsh web

On first startup, the plugin writes two pure Node helper scripts (.cjs) into the %USERPROFILE%\.dsh\logs directory and creates the desktop shortcut DeepSeek Harness.lnk.

Feature Details

Desktop Shortcut Behavior

Double-clicking the desktop shortcut causes the launcher to perform the following steps:

  1. Check whether Harness is already listening on the specified port.
  2. Check whether the owner PID of the task-board lock is alive. If the Harness process exists but is not listening on the port (possibly in a hung state), the launcher diagnoses the issue and exits to prevent startup conflicts.
  3. If Harness is not running, launch it using the Node binary used by the plugin itself.
  4. Wait until the UI is accessible.
  5. Obtain the authentication URL and issue a Cookie to the isolated window profile, ensuring the App window opens without requiring login.
  6. Open the window using the --app=<url> command-line argument.

Power Controls and Watchdog

The restart function relies on a watchdog process running outside the Harness process tree. The watchdog polls once per second, handles restart requests, and restores listening, providing heartbeat-based self-recovery.

The shutdown function is implemented through a graceful stop (SIGTERM), ensuring session data is correctly persisted to disk.

Security and Antivirus Software

  • Interface restrictions: /api/shutdown and /api/restart accept only loopback address (localhost) and POST requests.
  • Antivirus compatibility: Since version v0.2.6, all .ps1 scripts have been removed. Older versions relied on PowerShell scripts, which were quarantined by antivirus software such as Huorong based on the heuristic rule “New PowerShell script.” The new version uses pure Node .cjs scripts and inline COM calls to create shortcuts, avoiding quarantine.

Configuration

The following configuration can be overridden using profile patch:

Key Default Description
createShortcut true Whether to generate/refresh the desktop shortcut.
desktopName DeepSeek Harness Base file name of the shortcut.
desktopPath (auto-resolved) Manually specify the desktop directory (resolves cases where auto-resolution fails, such as OneDrive redirection). Resolution priority: desktopPath → Windows registry → ~/Desktop.
watchdog true Whether to start the restart watchdog. If set to false, the restart button degrades to the shutdown function.

Example configuration:

- id: quick-window-launcher
  name: 'dsh-quick-window-launcher'
  config:
    createShortcut: true
    desktopName: 'DeepSeek Harness'
    watchdog: true

Diagnostics

If you encounter startup or window issues, run the following command in PowerShell to diagnose:

node "$env:USERPROFILE\.dsh\logs\dsh-launch-web.cjs" --diagnose

This command outputs port status, task-board lock owner, watchdog heartbeat, and recent logs.

Summary

dsh-quick-window-launcher provides a solution for bringing the DSH Web interface “to the desktop.” Through standalone windows and sidebar controls, it reduces the overhead of tab management and provides graceful process restart and update capabilities. All helper scripts run in pure Node form for compatibility with mainstream antivirus software.

  • Plugin directory: https://www.skillhub.cn/plugins/Yuanloss/dsh-quick-window-launcher
  • GitHub repository: https://github.com/Yuanloss/dsh-quick-window-launcher