Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture. In a Windows environment, managing a system-resident tray watcher (such as DshTaskWatcher) usually requires manually downloading an installer, configuring the environment, and ensuring the process remains resident. yeqingtang/dsh-task-watcher-plugin packages DshTaskWatcher (a standalone PowerShell tray application) into a DSH plugin, completing deployment, startup, and lifecycle management under the DSH framework. It addresses the need to decouple a standalone process from the host service.

Core Features

This plugin uses a Host + Web dual-endpoint architecture. Main capabilities are as follows:

  • Host Process Detachment: Uses the CREATE_NO_WINDOW flag to start PowerShell, without binding to a job object and without a terminal window. When the DSH process restarts or exits, the tray watcher continues to run unaffected.
  • Independent Lifecycle: The plugin is only responsible for deployment and startup; it does not interfere with the day-to-day operation of the tray process. Even if the plugin is disabled or uninstalled, a running watcher will not be terminated.
  • Stop Intent Memory: When the watcher is exited through the toggle switch or a tray right-click, a stopped.flag file is created. After DSH restarts, it does not automatically restart a stopped watcher unless manually restarted. This is consistent with the design logic that “crash/force-kill still allows automatic recovery.”
  • Single-instance Exclusion: The watcher implements a mutex to prevent double trays from conflicting with manually installed instances.
  • Zero Dependencies, Zero Build: The dependency libraries are pure hand-written ESM, with no build step, reducing environment complexity.

Management API

The plugin provides three loopback POST endpoints for control:

  • POST /api/dsh-task-watcher/status: Query running status, PID, and deployed version.
  • POST /api/dsh-task-watcher/start: Incrementally overwrites and deploys the assets, then launches the tray. The configuration file config.json is written only if missing.
  • POST /api/dsh-task-watcher/stop: Stops the tray process. The matching logic is strictly anchored to -File DshTaskWatcher.ps1 to avoid accidentally killing other processes that contain this file name.

Installation and Activation

Run the following command in a terminal to install the plugin:

dsh plugin --profile web add @yeqingtang/dsh-task-watcher-plugin

After installation, restart the web service for it to take effect. After activation, the status display and start/stop toggle can be seen in Settings → Plugins → Task Watcher (the interface polls every 10 seconds and supports both Chinese and English).

Usage Notes

  1. Platform Limitation: Windows (win32) only.
  2. Node Version: Requires Node.js >= 20.0.0.
  3. Deployment Path: The watcher is installed to %LOCALAPPDATA%\DshTaskWatcher.
  4. Stop Logic: The stop endpoint only matches processes launched via the start endpoint and will not accidentally kill other startup scripts.

Summary

Through shell integration, this plugin incorporates a standalone Windows tray program into the DSH ecosystem. It preserves the watcher’s independence while providing a unified control entry point through the API, making it suitable for DeepSeek Harness users who need to maintain resident background tasks in a Windows environment.