Introduction

The following section introduces the DeepSeek Harness (DSH) Web plugin dsh-sm-version-display. This plugin displays the currently installed DSH version above the “Settings” button in the Web sidebar and detects new versions from the npm registry and official GitHub Releases.

After installing this plugin, you can directly view the current DSH version in the interface, compare version information from npm and GitHub, and perform updates or manage backups through the plugin’s built-in workflows. The plugin is maintained by hjj345 and is released under the MIT License.

Core Features

The plugin displays a rounded version card above the “Settings” button at the bottom of the sidebar. The card occupies its own row.

  1. Runtime reading: The host half reads the installed @deepseek-ai/dsh version when rendering the page, so it automatically follows after DSH is upgraded and restarted.
  2. Safe fallback: If the host version is temporarily unavailable, it displays “Version unknown” instead of guessing or fabricating a fixed version.
  3. Interactions: The card includes a refresh button. During checking, it shows a loading state, and after completion it displays a native DSH toast.
  4. Responsive behavior and theming: When the sidebar collapses into a narrow rail, a circular version icon is shown. Text wraps automatically when there is insufficient space. The card and icon adapt to light and dark themes and use DSH design system variables.
  5. Hover tooltip: Hovering over the card or the narrow-rail icon shows the plugin’s English name, dsh-sm-version-display, and the current version.

Version Detection and Comparison

The plugin automatically detects and compares versions from both npm and GitHub.

  1. Detection triggers: Checking is performed on page load, every 30 minutes, and when the window returns to the foreground. Results are cached in the DSH process, so they remain available after the Settings page is reopened.
  2. Sources:
    • npm: Detects the official npm registry.
    • GitHub: Detects official GitHub Releases.
  3. Fault tolerance: If the GitHub API is rate-limited, it automatically falls back to the official Releases Atom feed; npm detection is not affected.
  4. Version types: GitHub versions distinguish between Alpha, Beta, RC, and Release.
  5. Semantic comparison: It includes lightweight version comparison logic that supports Alpha, Beta, RC, stable releases, and multi-digit version numbers.

DSH Settings Page

A top-level page named “DSH Version Detection” is registered in DSH Settings, mirroring the design of the reference plugin.

  1. Settings card: Includes the plugin name, subtitle, toggle, general settings, plugin information, and installation command.
  2. Trilingual support: Supports Simplified Chinese, English, and Traditional Chinese, with Simplified Chinese as the default. The language selection is persisted.
  3. Expanded detection: Below the button on the Settings page, it displays npm and GitHub version information side by side, including type, release time, Release link, current installation method, and plugin management method.
  4. Sort position: It appears below the reference plugin sm-context-piano (sort order 21) and uses the default gear icon (sort order 22).

Updates and Backups

The plugin provides a complete update workflow and backup-management capabilities.

Dual-Path Updates

  1. Automatic update: Risk confirmation is required before updating, and backup is enabled by default. It supports execution from the host background. During automatic updates, it displays the executed command, real-time output, success/failure status, and restart requirements.
  2. Manual update: It reveals the full command and steps, supporting manual execution one by one. It is recommended to back up .dsh configuration and profile data before updating.
  3. Security constraints: Only exact-version commands fixed inside the host are executed. Requests are limited to the local loopback address. If a GitHub source version has no corresponding npm package, only manual build steps are provided.

Backup Management

  1. Backup selection: Backup is enabled by default during update confirmation, but it can be explicitly skipped. Skipping means no backup rollback is available for that update. You can choose a save directory on the machine where DSH is installed, and the last location is remembered.
  2. Backup viewing: Complete, failed, and interrupted backups in default and registered custom directories can be viewed together. It shows the total actual file size and supports refreshing and scanning specified directories.
  3. Backup deletion: Batch deletion of backups in registered directories is supported. Deleting backups is irreversible. If the complete backup associated with the current task is deleted, that task can no longer be rolled back. Backups currently in use cannot be deleted.
  4. Failure recovery: If a backup fails, it displays the stop time, reason, and copied size. You can re-run the backup and retry. Only a complete, verified backup corresponding to the update can be used for rollback.

Installation and Enablement

Run the installation command first. The plugin is installed into the DSH Web profile:

dsh plugin --profile web add @hjj345345/dsh-sm-version-display

After installation, restart the DSH Web service to activate the plugin:

dsh web

Usage Examples

After installation, you can use the plugin in the following ways:

  1. Check syntax: Check the source code syntax in the plugin root directory.
    npm run check
  1. Build the plugin: Run the build command to package the host and client halves.
    npm run build
  1. Open Settings: Open Settings in the DSH interface and select the “DSH Version Detection” page to perform version detection, updates, or backup management.

Security and Privacy

The plugin follows security principles in both design and implementation:

  1. Permission scope: The host half reads only the version field and installation path type from the manifest of the locally installed DSH package. It does not expose absolute paths to the browser.
  2. Request isolation: The update route accepts only local loopback addresses and a matching token. Commands and parameters are fixed inside the host, and arbitrary commands from the browser are not accepted.
  3. Data security: Requests do not carry DSH login credentials, session content, or user files. The plugin also does not read chat content.
  4. Backup logic: The backup list does not scan the entire computer; it scans only specified directories. The reported size is the total logical size of regular backup files and does not include link targets. Backups do not delete external files by following links inside the backup.