dsh-purge-dsh0.2.1: Revised Red Team Evaluation Plugin for DSH 0.2.1-rc.2

Preface

A common misjudgment when conducting security evaluations on DeepSeek Harness (DSH) is attributing a model’s “refusal to answer” to its own capability boundaries, when in fact it originates from the host layer’s prompt rewriting, approval gates, or sandbox policies. To distinguish between “host interception” and “model response” on the local official Harness, one must be able to view patch status, apply and revert evaluation changes to the local @deepseek-ai packages, and edit injection segments and rule sets within a controlled environment.

The community plugin dsh-purge (original author YuJunZhiXue, MIT) is designed for this scenario. This article introduces the third-party patched version sakurayh1080/dsh-purge-dsh0.2.1 (npm package name remains dsh-purge, version 1.1.73+dsh0.2.1) maintained by SakuraYH1080 and listed on SkillHub. Based on the 1.1.73+dsh0.2.1 baseline of 2540656380/dsh-purge, it includes compatibility fixes for cwd prompt variables, restart fixes for Windows paths with Chinese usernames, and cleanup of expired files specifically for DeepSeek Harness 0.2.1-rc.2. The original code, prompts, and the “dsh-purge” name are copyrighted by the original author. This repository is non-commercial and for technical reference only; the list of modifications can be found in NOTICE.md and DSH-PURGE-FIX.md within the repository.

What is this

dsh-purge is a client-side red-team security evaluation plugin installed on a local instance of the official DeepSeek Harness. It supports both the official Web (dsh web) and the official desktop EXE, but they must be installed separately and applied separately. The current version targets dsh 0.2; earlier versions of dsh require their corresponding older plugin versions.

The Harness rewrites prompts, approvals, sandboxes, and session migrations at runtime. This plugin provides capabilities such as “Sanitization” and “Drill Ground” via a sidebar to clean or drill: it applies or reverts patches to the local official package and $DSH_HOME configuration scope. It does not treat these changes as a scanning or attack suite for the public internet or third-party systems. The plugin runs with the privileges of the current dsh process; before installing and enabling it, you should review the source code, the license (MIT, derivative works must attribute the original author’s repository), and the compliance statement in the README.

Corrections Relative to Upstream

This repository is explicitly marked as a third-party patched build in its README and does not replace YuJunZhiXue/dsh-purge. Based on the 1.1.73+dsh0.2.1 baseline, the changes targeting DSH 0.2.1-rc.2 include:

  1. A compatibility fix for cwd prompt variables, preventing abnormal variable parsing in evaluation injection segments under 0.2.1-rc.2.
  2. Restart-related fixes for scenarios involving Windows paths with Chinese usernames.
  3. Cleanup of expired files to reduce status inconsistencies caused by residual old patches or temporary files.

Functionally, it aligns with the upstream README: it does not hardcode drive letters, prioritizing $DSH_HOME, the .dsh directory next to the dsh launcher, and falling back to ~/.dsh; it does not modify the Harness source code tree, and changes are only written to disk when “Apply” is clicked in the “Sanitization” sidebar page.

Core Capabilities (Consistent with Upstream)

The following documents the capabilities available in the sidebar and command line, all limited to the local official Harness.

Area Function
Sanitization View patch status in groups; execute apply, revert, uninstall; edit prompts and multiple rule sets
Drill Ground Built into the official version; after authorization, view assets, skills, and local environment. For use only on local machines, offline targets, or exercises with written authorization you have permission to manage
Host Policies Adjust default text, permission policies, and tool limits, while preserving official capabilities
On Startup Configurable to automatically check and re-apply; no manual file editing needed after npm upgrades overwrite node_modules

Common paths at runtime (resolved in the documented order if DSH_HOME is not set): prompt-inject.md, rules/, skills/, net-scope-allow.txt, redteam/, etc., are located under $DSH_HOME. Web and Desktop each use their own primary directories.

Environment and Compatibility

  • Node.js: ≥18; for Windows scenarios without flash windows, the documentation requires Node ≥22.
  • dsh version: This patched version targets 0.2.1-rc.2; the README states that the latest version only supports dsh 0.2 (the official Desktop 0.2.0-rc.2 / official dsh web uses plugin versions 1.1.40 and above).
  • profile: Web uses web, and the official Desktop EXE uses desktop. Do not cross-apply.

Installation and Activation

Both one-click hub installation and command-line installation point to the npm package dsh-purge. Simply writing the plugin to the profile will not modify the @deepseek-ai host package; you must complete the two steps of restarting and “Applying”.

1. Install according to the profile of the host you are using

Official dsh web:

dsh plugin --profile web add dsh-purge

Official Desktop EXE:

dsh plugin --profile desktop add dsh-purge

If the current working directory is already the source code tree of this repository, change the package name to add .. If dsh is not in the PATH, follow the README’s “Manual Installation” to locate $DSH_HOME and the profile. If the npm registry is unavailable, for the same --profile, you can replace the target with the https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz provided in the documentation (upstream tarball; when using SakuraYH1080’s patched version, use the actual package source you added, e.g., local add .).

2. Three steps after installation (README: “Do these three steps after installation”)

  1. Quit and reopen the host where the plugin was just installed (close dsh web and restart it for Web; exit the tray and restart the exe for Desktop).
  2. Click dsh-purge next to the session title, and click “Apply” on the Sanitization page (this option is not in the settings page).
  3. After “Apply” succeeds, it will automatically restart once; it will not restart if not completed. After the restart, start a new conversation for the injection to take effect in the current session.

Verification: dsh-purge appears next to the session title; /purge status in the chat allows viewing DSH_HOME and the patch list.

Plugin configuration example in cordis.patch.yml (postPrompt is empty by default):

- insert:
    - id: dsh-purge
      name: 'dsh-purge'
      config:
        enabled: true
        autoApplyOnStart: true
        autoUpdateOnStart: false
        autoRevertOnMissing: false
        verbose: false
        postPromptOrder: 5100
        postPrompt: ""

Typical Usage

Sidebar: Click dsh-purge next to the session title → Sanitization (patches, prompts, rule sets, Skills) or Drill Ground (requires completing the authorization process first). “Your own servers” is located below the prompts on the Sanitization page; register an IP or full hostname per line, and it will be written to $DSH_HOME/net-scope-allow.txt after saving.

Command Line and Chat (excerpt):

dsh-purge --status
dsh-purge --apply
dsh-purge --revert
dsh-purge --uninstall
dsh-purge --edit
/purge status | apply | revert | uninstall | edit | help
/rules list | use <id> | create <id> | delete <id> | reset | help
/skills list | import <archive or folder> | create <id> [description] | delete <id> | help
/rewind

Uninstall: Sidebar Sanitization → Uninstall, or dsh-purge --uninstall / /purge uninstall; it will revert patches first and then restart the current host.

Applicable Scenarios and Notes

Suitable for: Red-team research, policy flexibility evaluation, or distinguishing between host-layer interception and model behavior on a local official Harness you are authorized to manage. If you need to align with DSH 0.2.1-rc.2 and encounter issues with cwd variables or Windows Chinese path restarts, prioritize checking this patched version.

Important Notes:

  • The plugin runs with the same privileges as dsh and will rewrite local @deepseek-ai packages and files under $DSH_HOME; please review SakuraYH1080/dsh-purge-dsh0.2.1 and the upstream license/attribution requirements before installation.
  • The README emphasizes that it only affects the local official Harness and prohibits use on unauthorized targets; borrowing code or prompts must attribute YuJunZhiXue/dsh-purge.
  • The DeepSeek Harness ecosystem follows the philosophy that “everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer.

Conclusion

sakurayh1080/dsh-purge-dsh0.2.1 supplements compatibility issues such as cwd prompt variables and Windows Chinese paths for DSH 0.2.1-rc.2, while retaining the local red-team evaluation capabilities of dsh-purge. After installing the npm package dsh-purge according to the profile, restarting the host, and applying it in “Sanitization”, you can use the sidebar and /purge commands to conduct controlled evaluations in new conversations.

  • Directory Page: https://www.skillhub.cn/plugins/SakuraYH1080/dsh-purge-dsh0.2.1
  • Source Code and Documentation: https://github.com/SakuraYH1080/dsh-purge-dsh0.2.1
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye