From ec69166706bed95efb6c35e225b01588f3cd9b72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=AB=E6=88=91=E5=B0=8F=E6=9D=A8=E5=90=8C=E5=AD=A6?=
Date: Mon, 19 Oct 2026 09:57:27 +0800
Subject: [PATCH] =?UTF-8?q?docs:=20README=20=E9=BB=98=E8=AE=A4=E4=B8=AD?=
=?UTF-8?q?=E6=96=87=EF=BC=8C=E5=81=9C=E6=9B=B4=E8=AF=B4=E6=98=8E=E4=B8=8E?=
=?UTF-8?q?=E5=B9=BF=E5=91=8A=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
仓库首页改为中文,英文移至 README.en.md。停更说明改写得更从容,并开放 README 广告位。
---
README.en.md | 607 ++++++++++++++++++++++++++++++++++++++++++++++++
README.md | 513 +++++++++++++++++++++-------------------
README.zh-CN.md | 24 +-
lib/update.js | 1 +
package.json | 1 +
5 files changed, 902 insertions(+), 244 deletions(-)
create mode 100644 README.en.md
diff --git a/README.en.md b/README.en.md
new file mode 100644
index 0000000..b0a8497
--- /dev/null
+++ b/README.en.md
@@ -0,0 +1,607 @@
+
+
+
+
+⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)
+
+Version 1.1.71
+
+
+ DeepSeek Harness jailbreak: every model, swap prompts per model. Default prompt for 小码酱. Please star ⭐ If you build on this, see Attribution required.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 中文 · English
+
+
+> **Maintenance paused.**
+>
+> Work has to come first for a while, so this project is on hold: no new releases, issues / PRs are not being triaged, and newer dsh versions are not guaranteed. What is already published stays usable. When maintenance resumes, it will be noted at the top of this README.
+>
+> This has always been an after-hours project. If it helped you, the [sponsor](#sponsor) addresses are below. README [ad slots](#ad) are also open, to help keep the lights on.
+
+> **Official Web and the official desktop app are both supported.** Official `dsh web` uses profile `web`. The official desktop EXE (DeepSeek Harness **0.2.0-rc.2**) uses profile `desktop`. Install and Apply them separately. This release targets dsh 0.2 only. Older dsh builds need the matching older plugin. Community Desktop is not maintained.
+>
+> Adding the plugin to a profile does not patch the host. Click **dsh-purge** beside the session title → **Clean** → **Apply**. A successful Apply restarts; an unfinished Apply does not. After the restart, start a new chat — that is when the inject enters the session.
+>
+> Node.js **≥18**. Windows no-flash needs **Node ≥22**. Hub one-click and the commands below both install the npm package `dsh-purge`.
+
+## Contents
+
+- [Sponsor](#sponsor)
+- [Ad slots](#ad)
+- [What this is](#what-this-is)
+- [Attribution required](#attribution-required)
+- [Unauthorized commercial use](#unauthorized-commercial-use)
+- [Supported hosts](#supported-hosts)
+- [Install](#install)
+- [Preview](#preview)
+- [Usage](#usage)
+- [Own servers](#own-servers)
+- [How it works](#how-it-works)
+- [Restore](#restore)
+- [Releases](#releases)
+
+---
+
+
+
+## ☕ Sponsor
+
+If this project helps you, send it over — I'm out here asking~
+
+| Asset | Address |
+| --- | --- |
+| USDT (TRC20) | `TV5ajPkRD8RH623Dx9mqvYZVNN8nPGRKid` |
+| Solana | `6x16GhRgLVpKFFXaU1seKNdx2rypspSJTL4dbpt6Xpwk` |
+| Ethereum | `0xB68BD60C0e8c519513B7DF9bB147696815423B3E` |
+| Bitcoin | `bc1qu70yxkrtwnymt8ryluz9x8y8hqzune5340npht` |
+
+---
+
+
+
+## Ad slots
+
+This README gets steady traffic. A few placements are open; proceeds go toward after-hours upkeep.
+
+| Placement | Status |
+| --- | --- |
+| Above the sponsor block (text link + one-line blurb, or a small image) | **Open** |
+
+Slots are limited and go live after we agree. No gray-market, piracy, impersonation of this repo, or pure traffic-farm listings.
+
+For placement, email [a2269198325@163.com](mailto:a2269198325@163.com) or message [@YuJunZhiXue](https://github.com/YuJunZhiXue) on GitHub. Put `dsh-purge ad slot` in the subject.
+
+---
+
+## What this is
+
+**dsh-purge** is a cybersecurity red-team plugin for the official [DeepSeek Harness](https://www.deepseek.com/harness/) already installed on your machine. Official **Web** (`dsh web`) and the official **desktop EXE** are both supported. Install and Apply them separately.
+
+Harness does more than forward a prompt. It rewrites prompts, approval gates, sandbox policy, and session migration at runtime. Asking only “will the model answer” treats a host-layer block as a model refusal. This plugin separates those two layers on your own install, for controlled evaluation and for seeing which default policy is too tight.
+
+| You get | What it does |
+|---|---|
+| **dsh-purge dock** | A button beside the session title opens the right dock. Two pages: Clean and Drill |
+| **Clean** | Grouped patch status, Apply / Restore / Uninstall, prompt editor, multiple rule sets |
+| **Drill** | Built into the stable release. After authorization: assets, skills, and the local environment. Only for a host you manage, an offline target, or a written authorized exercise |
+| **Host policy** | Default copy, permission policy, and tool limits. Official capabilities stay. No second invented identity |
+| **On start** | Checks and reapplies. After npm overwrites `node_modules`, you do not hand-edit files |
+
+No hardcoded drive letters. It looks at `$DSH_HOME`, `.dsh` next to the dsh launcher, then `~/.dsh`. It does not patch the Harness source tree. **Apply** on the **Clean** page of **dsh-purge** is what writes the changes. Identity comes from the encrypted prompt shipped in the plugin, the text the prompt box shows by default. The host prompt file is not read.
+
+It only touches the official `@deepseek-ai` packages and local config on the user's machine. It is not a public scanner and not an attack kit for third-party sites. The repo does not ship malware, unauthorized-exploit scripts, or payloads aimed at the public internet.
+
+---
+
+## Non-profit public project. Commercial sale, paid resale, and profit from illegal or gray-market activity are forbidden. For technical reference only.
+
+## Attribution required
+
+**If you borrow this project's name, ideas, code, or prompts, you must credit the author and name the source repository:** [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge).
+
+Using them without attribution, hiding the source, or passing them off as your own will be pursued.
+
+---
+
+## Unauthorized commercial use
+
+Douyin live account **「老张的ai」** (room name **「老张AI讲堂」**) is selling this repository: taking fees in the live room, no attribution, and ignoring the non-profit rule above. The author was in the room. They still charged.
+
+This project is free and non-profit. Selling courses, the plugin, tokens, or reselling it voids the license on the spot. The author reserves the right to pursue it.
+
+Recorded 2026-10-12:
+
+
+
+
+
+
+WeChat name **「老张的ai科技」**, same handle as the live-room viewer board. Asked if they were this repo's developer, they said they were. The author said they would report it.
+
+
+
+
+
+---
+
+
+
+
+
+### ⚠️ Strict legal and compliance disclaimer
+
+
+
+**Disclaimer:** This is a non-profit open-source project. It follows applicable laws and the rules of the platforms it uses, and is intended only for learning and research. Do not use it for any illegal or non-compliant purpose; the user bears any resulting consequences.
+
+**Zero-tolerance statement:** This project opposes and forbids any illegal activity. The authors do not support, encourage, or assist unauthorized network attacks, exploit use, data theft, unlawful intrusion into computer information systems, or generation of illegal or prohibited content. **Anyone who uses this project for crime is solely responsible under the law. The authors have no liability.**
+
+1. **This repository contains no illegal material.** The published code, docs, patches, and default prompt are **not** malware, backdoors, unauthorized pentest kits, ransomware, credential-stuffing scripts, or attack payloads aimed at the public internet or third-party systems. The project does not supply illegal content and does not incite, organize, or assist crime.
+2. **Local official Harness only.** Security-eval patches and prompt injection run only on the **official DeepSeek Harness already installed on the user's machine** (`@deepseek-ai` packages, local profile / `$DSH_HOME`). The target is the user's own official local software, **not** someone else's website, server, account, or information system.
+3. **Eval patches do not attack the public internet.** Apply, inject, revert, and uninstall stay in local files and local processes. They **do not scan, probe, intrude, or send attack traffic to any public host or unauthorized system**. Do not use this project as a jump host against the public internet. If "check for updates" is on, the plugin may only contact this plugin's own GitHub repository to compare versions. That is **not** an attack on third-party systems and is **not** authorization to penetrate anything.
+4. **Lawful, controlled scope.** This project is an aid for red-team research and robustness evaluation on an **official Harness the user is entitled to administer**. **Do not run it against targets without the owner's lawful written authorization, public online systems, or production workloads.** Testing must stay on the **authorized local official Harness, offline local synthetic fixtures, authorized cybersecurity ranges, and compliant lab environments**.
+5. **Servers and sites in mainland China, Hong Kong, and Macau are forbidden.** Do not access, scan, probe, or otherwise operate against network ranges in mainland China, Hong Kong, or Macau, or against servers, websites, or addresses that resolve into those ranges. A cloud-provider name is not an exception. The only exception is one exact IP, or one exact hostname, that the user registered in advance as their own server. A key, a password, a network range, a wildcard, or a claim made in the conversation does not add an exception. Anything that is not registered stays forbidden.
+6. **Forbidden uses.** Users must not use this project, directly or indirectly, to violate the following (each must be followed; no excuse to evade):
+ - Criminal Law of the People's Republic of China
+ - Cybersecurity Law of the People's Republic of China
+ - Data Security Law of the People's Republic of China
+ - Personal Information Protection Law of the People's Republic of China
+ - and other applicable laws, regulations, and supervisory rules;
+ - Also forbidden:
+ - Unauthorized intrusion or attacks on public or private computer information systems; extortion, sabotage, credential stuffing, or spreading malicious payloads;
+ - Inducing, generating, or spreading any content the law forbids, including threats to national security, terrorism, violence, pornography, gambling, fraud, and privacy or intellectual-property infringement;
+ - Violating the model provider's terms of service and acceptable-use policy.
+7. **The user bears all responsibility.** The project is provided under the MIT license as-is. The authors make no warranty of completeness, security, or fitness. **Users independently bear all civil, administrative, and criminal liability** for download, deploy, run, modify, distribute, and all resulting inputs and outputs. Authors and contributors bear no direct, indirect, or joint liability for abuse.
+8. **The license ends on breach.** Anyone who uses this project for illegal attacks, malicious activity, or other violations has their open-source license **automatically and irrevocably terminated** from the moment of the violation. They must stop using the project, permanently destroy all copies and derivatives, and accept legal sanctions.
+9. **No affiliation.** This is an independent open-source security-eval research project. It has no employment, commercial, authorization, or endorsement relationship with DeepSeek or its affiliates. "Official" here only means the eval target is the official DeepSeek Harness package on the user's machine. It does **not** mean DeepSeek developed, approved, or warrants this plugin.
+10. **Attribution is required.** If you borrow this project's name, ideas, code, or prompts, you must credit the author and name this repository. Failure to attribute will be pursued. See [Attribution required](#attribution-required).
+
+
+
+
+
+---
+
+## Supported hosts
+
+The latest plugin supports **dsh 0.2** only — do not apply it to 0.1.x.
+
+- **dsh 0.2** (official desktop **0.2.0-rc.2** / official `dsh web`): use **1.1.40** or newer. This page installs that line.
+- **dsh 0.1.7** (incl. rc.1 / rc.2): use **1.1.39** or older — pick the tag on [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases).
+
+Unmatched patches stay pending or skipped; nothing is rewritten blindly.
+
+---
+
+## Install
+
+Web and the official desktop EXE are the two maintained hosts. **Install both. Apply each separately.** A Web install does not reach the desktop app, and a desktop install does not reach Web.
+
+**Web (official `dsh web`)**
+
+```sh
+dsh plugin --profile web add dsh-purge
+```
+
+**Desktop (official EXE)**
+
+```sh
+dsh plugin --profile desktop add dsh-purge
+```
+
+If this directory is already a clone, use `add .` instead of the package name. If `dsh` is not on PATH, use [Manual install](#manual). Registry blocked: add `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` with the same `--profile`.
+
+Hub one-click on [dsh-plugin.org](https://dsh-plugin.org/plugins/yujunzhixue/dsh-purge) searches npm for this repository and installs `dsh-purge`. The catalog line may still show `github:` — use the command above if the button falls back to git.
+
+For the desktop client you can also click the button (`dsh://` deep link):
+
+
+ Install in desktop client
+
+
+### After the command: three steps
+
+Adding the plugin to a profile does **not** patch `@deepseek-ai` by itself.
+
+1. **Quit and reopen** the host you installed into — stop and restart `dsh web`, or quit the desktop tray and reopen that app.
+2. On **that host**, click **dsh-purge** beside the session title, then **Apply** on the **Clean** page. It is not on the host Settings page.
+3. A successful **Apply** restarts once so patches load. It does not restart if it did not finish.
+
+Web controls affect Web only; desktop controls affect the desktop app only. Do not Apply one host from the other.
+
+### How to tell it installed
+
+- **dsh-purge** sits beside the session title, with **Apply** on its Clean page.
+- `/purge status` in chat prints `DSH_HOME` and the patch list — the path should be the home you actually run.
+- Optional packages that are not installed (liangshen) show as skipped and do not block Apply.
+
+### Hand this to an assistant
+
+Paste the block below to a local assistant. It should only run the install command — no disk scan, no other edits, no Apply, no restart.
+
+
+For AI assistants (install only)
+
+
+
+Install the DeepSeek Harness plugin `dsh-purge` into both the Web profile and the official desktop profile. Do not scan the whole disk, do not read or edit other files, do not apply settings, and do not restart the app.
+
+If `dsh` is not on PATH, tell the user and stop. If this directory is already a clone, use `.` instead of the package name in both commands. If the npm registry is blocked, use `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz`. If one profile is missing, skip that command and still install the other.
+
+**Web (official `dsh web`)**
+
+```sh
+dsh plugin --profile web add dsh-purge
+```
+
+**Desktop (official EXE)**
+
+```sh
+dsh plugin --profile desktop add dsh-purge
+```
+
+After the commands finish, tell the user to fully quit and restart `dsh web`, and to quit the desktop tray then reopen the EXE. On each host, open **dsh-purge** beside the session title and **Apply** on **Clean**. Then stop.
+
+
+
+
+
+
+
+### Manual install
+
+Use this when the command fails or `dsh` is not on PATH. Edit **only the profile for the host you run** — do not touch the other, and do not delete existing bundles.
+
+
+Full manual steps
+
+**1. Find the `$DSH_HOME` this host uses.** A real home is named `.dsh` (official EXE sometimes `dsh-home`), contains `profiles`, and has at least one `profiles//package.json`. Check in order: `DSH_HOME` env → `.dsh` next to the install root (portable) → `%USERPROFILE%\.dsh` or `~/.dsh` → `%APPDATA%` / `%LOCALAPPDATA%\DeepSeek Harness\dsh-home`. Confirm: `profiles/web/package.json` has `"name": "dsh-profile-web"` (or `dsh-profile-desktop`). Machines often have two homes — use the one that belongs to the host you actually start.
+
+PowerShell to list candidates:
+
+```powershell
+$cands = @()
+if ($env:DSH_HOME) { $cands += $env:DSH_HOME }
+$cands += "$env:USERPROFILE\.dsh"
+$dsh = Get-Command dsh -ErrorAction SilentlyContinue
+if ($dsh) {
+ $dir = Split-Path $dsh.Source
+ $cands += @((Join-Path $dir ".dsh"), (Join-Path (Split-Path $dir) ".dsh"), (Join-Path (Split-Path (Split-Path $dir)) ".dsh"))
+}
+$cands += @("$env:APPDATA\DeepSeek Harness\dsh-home", "$env:LOCALAPPDATA\DeepSeek Harness\dsh-home")
+$cands | Select-Object -Unique | Where-Object { $_ -and (Test-Path (Join-Path $_ "profiles")) }
+```
+
+**2. Put the plugin at `$DSH_HOME/plugins/dsh-purge`** (folder must be named `dsh-purge`, with a `package.json` whose `"name"` is `dsh-purge`).
+
+```sh
+git clone https://github.com/YuJunZhiXue/dsh-purge.git "$DSH_HOME/plugins/dsh-purge"
+```
+
+Without git: download [master.tar.gz](https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz), extract, rename `dsh-purge-master` → `dsh-purge`, and place it under `plugins`. If you already have a clone, copy the whole tree — not a few `.js` files.
+
+**3. Edit only that profile's `package.json` — back it up first.** Web → `$DSH_HOME/profiles/web/package.json`; desktop → `$DSH_HOME/profiles/desktop/package.json`. Add **only two things**, keeping every existing dependency and bundle:
+
+1. In `dependencies`, add `"dsh-purge": "file:../../plugins/dsh-purge"`
+2. At the **end** of `dsh.profile.bundles`, append `"dsh-purge"` (skip if already there)
+
+```json
+{
+ "name": "dsh-profile-web",
+ "private": true,
+ "dependencies": {
+ "dsh-purge": "file:../../plugins/dsh-purge"
+ },
+ "dsh": {
+ "profile": {
+ "bundles": [
+ "@deepseek-ai/dsh-base",
+ "@deepseek-ai/dsh-web-app",
+ "dsh-purge"
+ ],
+ "patchReload": "live"
+ }
+ }
+}
+```
+
+Keep JSON valid (comma before the new item, none after the last). Do not switch `file:../../plugins/dsh-purge` to an absolute path, do not touch `patchReload` or other plugins, and do not list `"dsh-purge"` twice. On desktop, if there is no `dsh-web-app` row, do not add one.
+
+**4. Run `pnpm install` in that profile only** (`cd` into the profile dir, not the repo root or `$DSH_HOME`):
+
+```sh
+cd "$DSH_HOME/profiles/web" # or profiles/desktop
+pnpm install
+```
+
+Success: `profiles//node_modules/dsh-purge/package.json` exists. If `pnpm` is missing, use the Node / pnpm shipped with official `dsh`; on `Could not resolve`, re-check the `file:` path; on a JSON error, fix commas or restore the backup.
+
+**5. Fully quit that host, reopen it, then Apply** — same three steps as above. The card appears beside the session title; click **Apply** (or `/purge apply`) on that host only. If the card is missing, you likely edited the other `.dsh` — go back to step 1.
+
+
+
+### Uninstall
+
+**dsh-purge** beside the session title → **Clean** → **Uninstall**. Confirm the dialog: it reverts any applied patches, restores the original Harness, and restarts the current host.
+
+```sh
+# or from a terminal / chat
+dsh-purge --uninstall
+# /purge uninstall
+```
+
+Plugin config lives in `cordis.patch.yml` (`postPrompt` is empty by default):
+
+```yaml
+- insert:
+ - id: dsh-purge
+ name: 'dsh-purge'
+ config:
+ enabled: true
+ autoApplyOnStart: true
+ autoUpdateOnStart: false
+ autoRevertOnMissing: false
+ verbose: false
+ postPromptOrder: 5100
+ postPrompt: ""
+```
+
+---
+
+## Preview
+
+**dsh-purge** sits beside the session title. It opens a right-hand dock with two pages: **Clean** and **Drill**. Switch **Light / Ink**. Patches are grouped; the count only includes items that actually applied. Rule sets sit in a list above the editor, with Enable and Delete on each row.
+
+The first time you open Drill you read the notice, wait out the countdown, scroll to the end, and check three boxes. Clean does not need that step. Drill is only for a host you manage, an offline target, or an exercise that already has written authorization.
+
+**Clean**
+
+
+
+**Drill authorization**
+
+
+
+**Drill**
+
+
+
+**Patches**
+
+
+
+**Own servers**
+
+On the Clean page, under Prompt. One host per line, then Save list. Steps are in [Own servers](#own-servers).
+
+
+
+| Area | What it shows |
+|---|---|
+| dsh-purge | button beside the session title; opens or collapses the dock |
+| Clean | the old Rules page: patches, prompt, rule sets, skills |
+| Drill | assets, skills, and environment after authorization. The tab says Unauthorized until then |
+| Patches | grouped status, Apply, Restore, or Uninstall |
+| Prompt | edit `prompt-inject.md` as the session override |
+| Own servers | one IP or exact hostname per line, saved to `$DSH_HOME/net-scope-allow.txt` |
+| Rule sets | multiple `AGENTS.md` / `CLAUDE.md`; Enable writes under `$DSH_HOME`, Delete removes the row |
+| Skills | import a zip or folder into this host’s official `$DSH_HOME/skills//SKILL.md` (web and desktop each use their own home; no drive letter is hardcoded); DSH owns match, load, and `/name`. You can also delete that folder yourself |
+
+---
+
+## Layout
+
+`bin/` is the CLI, `lib/` is patches and the drill console, `presets/redteam/` is the red-team preset, `skills/redteam/` is the bundled skills, and `client.js` is the dock.
+
+Runtime files live under `$DSH_HOME`: `prompt-inject.md`, `rules/`, `skills/`, `net-scope-allow.txt`, `redteam/`. If `DSH_HOME` is unset, the launcher-adjacent `.dsh` wins over `~/.dsh`. Web and the desktop app each use their own home. Skills are not part of the inject section and do not replace the prompt.
+
+---
+
+## Usage
+
+```sh
+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 | create | delete | reset | help
+/skills list | import | create [description] | delete | help
+/rewind
+
+purge_status purge_apply purge_revert
+```
+
+After a successful Apply, the host restarts so patched packages load; you can also click **Restart** manually. Under the patch title are the stable release and the test release. The test release follows the `beta` branch. **Switch to stable** installs `master` and clears any pin. Picking an older stable version pins it; click **Update** to return to the latest. Old test tags are not listed.
+
+The composer **Undo once** and **Undo last round** follow official DSH `session.fork({ atSeq })`: the withdrawn turn is cut off, a new session keeps the earlier context, the old session is archived, and the line returns to the input so **send again** re-injects. `/rewind` does the same.
+
+If the **same task works in standard but fails in minimal or PTC**, preset `run_code`, sandbox, or plan intercept text is often still uncleared, or built-in minimal is missing `agent-instructions`. Use **1.1.61+**, then **quit the host fully → Apply in Clean → restart → start a new chat**. Switching preset alone does not reload patches in the running process.
+
+### Response speed
+
+DSH runs Bash calls in a tool batch one at a time. Older dsh-purge releases raised the default foreground wait from 60 seconds to 10 minutes, so one slow command could hold up later calls for that long. Patch #21 now restores marked plugin values to the official 60-second default. Unmarked timeouts and other custom values are preserved; an unmarked 10-minute value cannot reliably be distinguished from a user setting.
+
+For a shorter wait in `dsh web` on macOS/Linux, add this entry to `$DSH_HOME/profiles/web/cordis.patch.yml` (normally `~/.dsh/profiles/web/cordis.patch.yml`). Edit an existing entry with the same id instead of adding a duplicate. This profile layer is applied after the bundled configuration, so future plugin applies keep the override.
+
+```yaml
+- id: bash-sandbox
+ config:
+ timeoutMs: 10000
+```
+
+With the standard jobs service and `promoteOnTimeout: true`, an unfinished command returns a background job id after 10 seconds and keeps running. Read it with `job_output` or stop it with `job_kill`. This changes the foreground wait, not the command's speed. Without that service or with promotion disabled, the timeout kills the command. A per-call `timeoutMs` overrides this default; `run_in_background: true` returns a job id immediately.
+
+For routine tasks, you can also opt into Low reasoning for new sessions:
+
+```yaml
+- id: agent-default-model
+ config:
+ provider: deepseek-official
+ model: deepseek-flash
+ reasoningEffort: low
+```
+
+Restart `dsh web` to load the profile. The model and reasoning defaults apply to newly created sessions; select Low in the composer for an existing session. The plugin does not change these model preferences automatically. Keep High when the task needs deeper reasoning, and narrow file searches rather than recursively scanning every application directory.
+
+### Own servers
+
+Addresses in mainland China, Hong Kong, and Macau stay forbidden unless that one host was registered first. Saying “this is my server” in chat does not allow it. A key or a password does not allow it either.
+
+The box sits under Prompt. If the dock does not show it yet, quit DeepSeek Harness completely and open it again.
+
+1. Click **dsh-purge** beside the session title and stay on **Clean**.
+2. Scroll past **Prompt**. **Own servers** is the next block.
+3. Put one host on each line, in one of these forms:
+ - `203.0.113.10` — one IP.
+ - `my-vps.example.com` — one exact hostname. After you save, the addresses that hostname resolves to at lookup time are allowed too.
+ - `alice@my-vps.example.com` — the account only identifies this form. It does not prove the machine is yours.
+4. Click **Save list**. The list is written to `$DSH_HOME/net-scope-allow.txt`.
+5. Keys, passwords, ranges, and wildcards are dropped on save. Unlisted mainland China, Hong Kong, and Macau addresses stay forbidden.
+
+`203.0.113.10` and `example.com` above are only examples of the form. Replace them with your own host before you save.
+
+---
+
+## Local checks
+
+```sh
+node --check lib/index.js
+node --check lib/core.js
+node --check lib/surface.js
+node --check lib/web.js
+node --check lib/desktop.js
+node --check lib/host.js
+node --check lib/rewind.js
+node --check lib/skills.js
+node --check client.js
+```
+
+---
+
+## How it works
+
+Apply, on start or when you click Apply:
+
+```mermaid
+flowchart TD
+ A["Start or click Apply"] --> B{"Patch already in place?"}
+ B -->|yes| C["Skip"]
+ B -->|no| D["Back up the original as .dshpurge.bak"]
+ D --> E["Replace the matched files"]
+ E --> F["Override the shim"]
+ F --> G["Inject the encrypted prompt shipped in the plugin, the text the prompt box shows by default"]
+```
+
+Override on each session:
+
+```mermaid
+flowchart TD
+ A["Restart or new session"] --> B["Inject the plugin's encrypted default. No save click, and no host prompt file"]
+```
+
+Prompt injection and ruleset decision at every turn. The three inputs on the left are what you control in the dsh-purge panel; the dotted edges show which decision each one drives:
+
+```mermaid
+flowchart TD
+ L["Rule library: activate a set → writes prompt-inject.md"]
+ W["Local rules: check AGENTS.md / CLAUDE.md in the current dir"]
+ P["Workspace policy: strict / fallback / always"]
+
+ A["Turn start"] --> B{"prompt-inject.md non-empty?"}
+ B -->|yes| C["Inject = prompt-inject.md (A)"]
+ B -->|no| D{"Any checked local md in the current dir, non-empty?"}
+ D -->|yes| E["Inject = selected workspace md (B)"]
+ D -->|no| F["Inject = plugin encrypted slot default (D)"]
+ C --> G{"Workspace baseline policy (C)"}
+ E --> G
+ F --> G
+ G -->|strict| H["Drop DSH workspace baseline section"]
+ G -->|fallback default| I{"User inject present above? (A or B)"}
+ G -->|always| J["Keep DSH workspace baseline section"]
+ I -->|yes| H
+ I -->|no| J
+ H --> K["Final system prompt"]
+ J --> K
+
+ L -.-> B
+ W -.-> D
+ P -.-> G
+```
+
+Skills stay out of the inject section:
+
+```mermaid
+flowchart LR
+ A["Settings import or /skills import"] --> B["Write into the official skills directory"]
+ B --> C["DSH loads it"]
+ C --> D["Uninstall does not delete user skills"]
+```
+
+---
+
+## Restore
+
+- Each target is copied to `.dshpurge.bak` before the first apply.
+- **Restore** or `/purge revert` copies backups back and deletes them. With no backup, shim lines written by this plugin are stripped.
+- `prompt-inject.md` is a user file and is kept.
+- **Uninstall** restores first if patches were applied, then deletes the inject file, rule library, and the plugin itself.
+- Apply is idempotent.
+
+---
+
+## Path detection
+
+The host surface is detected first: `web` / `desktop` (`gui` / `tui` are reserved and still fall back to web).
+
+**Web:**
+
+1. `DSH_HOME` / `DSH_BASE`
+2. `.dsh` next to the dsh launcher (portable install, any drive)
+3. `npm prefix -g` / `npm root -g`
+4. Nested `@deepseek-ai/dsh/node_modules/@deepseek-ai`
+5. `~/.dsh`
+
+**Official desktop EXE:** the running official Harness install (`resources/app` or the unpacked package). The drive letter is not hard-coded. A successful Apply restarts once.
+
+Community Desktop is not maintained.
+
+Official npm-global is not patched. Sealed `host-commands` / `runtime-commands` are scrubbed, never injected.
+
+If nothing is found, set `DSH_BASE` / `DSH_DESKTOP_INSTALL`. No files are changed.
+
+---
+
+## Releases
+
+What changed, and the zip, are on [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases). To publish, bump the version in `package.json`, write Chinese and English notes in `release-notes.md`, and push `master`. Pushing the same version again does not publish another package.
+
+## Notes
+
+- Scope is rendered copy, defaults, and runtime logic inside local `@deepseek-ai/*` packages, plus override files and rule sets under the harness home.
+- After an upgrade, unmatched originals show as skipped. Apply still completes, and those files are left unchanged.
+- Third-party plugin *source repos* outside `@deepseek-ai` are left alone (CMD silence may **best-effort** patch installed doctor / market / liangshen / mnemon at runtime).
+- Install the npm package `dsh-purge`: `dsh plugin --profile web add dsh-purge` or `dsh plugin --profile desktop add dsh-purge`. From this repo, `add .`. If the registry is blocked, add the master.tar.gz URL instead. Hub one-click uses the same npm package.
+
+---
+
+Thanks to the [LINUX DO](https://linux.do) community
diff --git a/README.md b/README.md
index 49c93a0..210718c 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,12 @@
-⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)
+⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)
Version 1.1.71
- DeepSeek Harness jailbreak: every model, swap prompts per model. Default prompt for 小码酱. Please star ⭐ If you build on this, see Attribution required.
+ DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分
@@ -26,217 +26,237 @@
- English | 中文
+ 中文 · English
-> **Updates paused.** The author has no steady income for now because of work. Maintenance is on hold: no new releases, issues / PRs are not taken, and new dsh versions are not guaranteed. The repo stays usable; see Sponsor below. When maintenance resumes, this README will say so.
-
-> **Official Web and the official desktop app are both supported.** Official `dsh web` uses profile `web`. The official desktop EXE (DeepSeek Harness **0.2.0-rc.2**) uses profile `desktop`. Install and Apply them separately. This release targets dsh 0.2 only. Older dsh builds need the matching older plugin. Community Desktop is not maintained.
+> **暂时停更。**
>
-> Adding the plugin to a profile does not patch the host. Click **dsh-purge** beside the session title → **Clean** → **Apply**. A successful Apply restarts; an unfinished Apply does not. After the restart, start a new chat — that is when the inject enters the session.
+> 这段时间要先把工作安顿好,项目维护先放一放:暂不发新版本,暂不处理 issue / PR,新版 dsh 也不保证跟上。已经发布的版本可以继续用,仓库也还在。等我恢复维护,会写在这篇 README 开头。
>
-> Node.js **≥18**. Windows no-flash needs **Node ≥22**. Hub one-click and the commands below both install the npm package `dsh-purge`.
+> 这个项目一直是业余在做。若它对你有帮助,欢迎看看下面的 [赞助](#sponsor);也在征集 README [广告位](#ad),换一点把项目撑下去的空间。
-## Contents
+> **官方 Web 和官方桌面端都支持。** 官方 `dsh web` 用 profile `web`;官方桌面 EXE(DeepSeek Harness **0.2.0-rc.2**)用 profile `desktop`。两边分开安装、分开点「应用」。当前版本只适配 dsh 0.2;更早的 dsh 用对应的老版本插件。社区桌面端不维护。
+>
+> 写进 profile 还不会改宿主。点会话标题旁的 **dsh-purge** → **清洗** → **应用**。成功会自动重启;补丁没打完不重启。重启后新开一轮对话,注入才进当前会话。
+>
+> Node.js **≥18**。Windows 无闪窗需要 **Node ≥22**。插件市场一键安装和下面的命令都走 npm 包 `dsh-purge`。
-- [Sponsor](#sponsor)
-- [What this is](#what-this-is)
-- [Attribution required](#attribution-required)
-- [Unauthorized commercial use](#unauthorized-commercial-use)
-- [Supported hosts](#supported-hosts)
-- [Install](#install)
-- [Preview](#preview)
-- [Usage](#usage)
-- [Own servers](#own-servers)
-- [How it works](#how-it-works)
-- [Restore](#restore)
-- [Releases](#releases)
+## 目录
+
+- [赞助](#sponsor)
+- [广告位](#ad)
+- [介绍](#介绍)
+- [署名要求](#署名要求)
+- [违规商用公示](#违规商用公示)
+- [适配范围](#适配范围)
+- [安装](#安装)
+- [界面](#界面预览)
+- [使用](#使用)
+- [自己的服务器](#自己的服务器)
+- [工作原理](#工作原理)
+- [还原](#还原)
+- [更新](#更新)
---
-## ☕ Sponsor
+## ☕ 赞助
-If this project helps you, send it over — I'm out here asking~
+这个项目要是帮到你了,欢迎打赏。我是讨口子,施舍点~
-| Asset | Address |
+
+| 资产 | 地址 |
+| ----------- | ---------------------------------------------- |
+| USDT(TRC20) | `TV5ajPkRD8RH623Dx9mqvYZVNN8nPGRKid` |
+| Solana | `6x16GhRgLVpKFFXaU1seKNdx2rypspSJTL4dbpt6Xpwk` |
+| Ethereum | `0xB68BD60C0e8c519513B7DF9bB147696815423B3E` |
+| Bitcoin | `bc1qu70yxkrtwnymt8ryluz9x8y8hqzune5340npht` |
+
+---
+
+
+
+## 广告位
+
+README 长期有人看,现开放少量展示位。收入用于贴补业余维护。
+
+| 位置 | 状态 |
| --- | --- |
-| USDT (TRC20) | `TV5ajPkRD8RH623Dx9mqvYZVNN8nPGRKid` |
-| Solana | `6x16GhRgLVpKFFXaU1seKNdx2rypspSJTL4dbpt6Xpwk` |
-| Ethereum | `0xB68BD60C0e8c519513B7DF9bB147696815423B3E` |
-| Bitcoin | `bc1qu70yxkrtwnymt8ryluz9x8y8hqzune5340npht` |
+| 本页赞助区上方(文字链 + 一句介绍,或一张小图) | **空缺,可定** |
+
+名额少,谈妥再上。不接灰产、盗版、冒充本仓库、纯引流盘。
+
+合作请发邮件 [a2269198325@163.com](mailto:a2269198325@163.com),或 GitHub [@YuJunZhiXue](https://github.com/YuJunZhiXue) 私信。标题注明「dsh-purge 广告位」。
---
-## What this is
+## 介绍
-**dsh-purge** is a cybersecurity red-team plugin for the official [DeepSeek Harness](https://www.deepseek.com/harness/) already installed on your machine. Official **Web** (`dsh web`) and the official **desktop EXE** are both supported. Install and Apply them separately.
+**dsh-purge** 是装在本机官方 [DeepSeek Harness](https://www.deepseek.com/harness/) 上的网络安全红队评测插件。官方 **Web**(`dsh web`)和官方 **桌面端**(EXE)都支持,两边分开装、分开应用。
-Harness does more than forward a prompt. It rewrites prompts, approval gates, sandbox policy, and session migration at runtime. Asking only “will the model answer” treats a host-layer block as a model refusal. This plugin separates those two layers on your own install, for controlled evaluation and for seeing which default policy is too tight.
+Harness 不只是把问题交给模型。它还会在运行时改提示词、审批门、沙箱和会话格式。只看「模型答不答」,会把宿主拦截误当成模型拒绝。这个插件在你自己的安装里把这两层分开,用来做受控评测,也用来看默认策略该不该收紧。
-| You get | What it does |
-|---|---|
-| **dsh-purge dock** | A button beside the session title opens the right dock. Two pages: Clean and Drill |
-| **Clean** | Grouped patch status, Apply / Restore / Uninstall, prompt editor, multiple rule sets |
-| **Drill** | Built into the stable release. After authorization: assets, skills, and the local environment. Only for a host you manage, an offline target, or a written authorized exercise |
-| **Host policy** | Default copy, permission policy, and tool limits. Official capabilities stay. No second invented identity |
-| **On start** | Checks and reapplies. After npm overwrites `node_modules`, you do not hand-edit files |
-No hardcoded drive letters. It looks at `$DSH_HOME`, `.dsh` next to the dsh launcher, then `~/.dsh`. It does not patch the Harness source tree. **Apply** on the **Clean** page of **dsh-purge** is what writes the changes. Identity comes from the encrypted prompt shipped in the plugin, the text the prompt box shows by default. The host prompt file is not read.
+| 你会用到 | 它做什么 |
+| ---------------- | ----------------------------------------------- |
+| **dsh-purge 侧栏** | 会话标题旁的按钮打开右侧栏。里面两页:清洗、演练台 |
+| **清洗** | 分组查看补丁,应用、还原、卸载;编辑提示词和多套规则 |
+| **演练台** | 正式版内置。授权后查看资产、技能和本机环境。只用于你有权管理的本机、离线靶标或已书面授权的演练 |
+| **宿主策略** | 调整默认文案、权限策略和工具上限。官方能力保留,不另写一套身份 |
+| **启动时** | 自动再检查并应用。npm 升级盖掉 `node_modules` 之后不用手改文件 |
-It only touches the official `@deepseek-ai` packages and local config on the user's machine. It is not a public scanner and not an attack kit for third-party sites. The repo does not ship malware, unauthorized-exploit scripts, or payloads aimed at the public internet.
+
+不写死盘符。按 `$DSH_HOME`、dsh 启动器旁边的 `.dsh`,再退回 `~/.dsh`。不改 Harness 源码仓库,在 **dsh-purge** 的「清洗」里点「应用」才写入。身份来自插件里的加密提示词,也就是提示词框默认显示的那一份。不读取宿主磁盘上的提示词文件。
+
+本插件只处理使用者本机已安装的官方 `@deepseek-ai` 包和本机配置。它不是公网扫描器,也不是针对第三方站点的攻击套件。仓库内不含木马、未授权渗透脚本或对外攻击载荷。
---
-## Non-profit public project. Commercial sale, paid resale, and profit from illegal or gray-market activity are forbidden. For technical reference only.
+## 📌 非盈利公益项目,严禁任何主体用于商业售卖、付费倒卖或黑灰产牟利,仅供技术参考。
-## Attribution required
+## 署名要求
-**If you borrow this project's name, ideas, code, or prompts, you must credit the author and name the source repository:** [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge).
+**借用本项目的名称、思路、代码或提示词,必须署名,并写明来源仓库:** [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge)。
-Using them without attribution, hiding the source, or passing them off as your own will be pursued.
+不署名、隐瞒来源、改头换面据为己有,作者将依法追究责任。
---
-## Unauthorized commercial use
+## 违规商用公示
-Douyin live account **「老张的ai」** (room name **「老张AI讲堂」**) is selling this repository: taking fees in the live room, no attribution, and ignoring the non-profit rule above. The author was in the room. They still charged.
+抖音直播账号 **「老张的ai」**(直播间显示 **「老张AI讲堂」**)把本仓库当收费货卖:直播间问价、当场收钱,不署名,也不守上面的非盈利条款。作者人就在场,对方照收。
-This project is free and non-profit. Selling courses, the plugin, tokens, or reselling it voids the license on the spot. The author reserves the right to pursue it.
+本项目免费、非盈利。拿它卖课、卖插件、卖 token、倒卖,许可当场作废,作者保留追究权利。
-Recorded 2026-10-12:
+2026-10-12 直播记录:
-
-
+
+
-WeChat name **「老张的ai科技」**, same handle as the live-room viewer board. Asked if they were this repo's developer, they said they were. The author said they would report it.
+对方微信名 **「老张的ai科技」**,直播间观众榜同号。被问到是不是本仓库开发者时,自称「老厉害了」;作者当场表示要投诉。
-
+
---
-
+### ⚠️ 严正法律免责与合规使用声明
-
-### ⚠️ Strict legal and compliance disclaimer
-
+**免责声明:** 本项目为非营利开源项目,遵守国家法律法规及所在平台的相关规范,仅供学习与研究使用。不得将本项目用于任何违法违规用途;由此产生的后果由使用者自行承担。
-**Disclaimer:** This is a non-profit open-source project. It follows applicable laws and the rules of the platforms it uses, and is intended only for learning and research. Do not use it for any illegal or non-compliant purpose; the user bears any resulting consequences.
+**【零容忍严正申明】**:本项目坚决反对并严禁任何形式的违法犯罪行为!本项目开发者绝不支持、不鼓励、不协助任何未授权网络攻击、漏洞利用、数据窃取、非法侵入计算机信息系统或生成违法违禁内容的活动。**任何将本项目用于违法犯罪的行为,均与开发者无关,由行为人依法独立承担全部法律责任。**
+
+1. **本仓库不含违法内容**:`dsh-purge` 发布的代码、文档、补丁与默认提示词**不是**木马、后门、未授权渗透工具、勒索软件、撞库脚本,也**不是**针对公网或第三方系统的攻击载荷。项目本身不提供违法内容,也不教唆、组织、协助实施违法犯罪。
+2. **只作用于本机官方 Harness**:安全评测补丁、提示词注入全部发生在使用者**本机已安装的官方 DeepSeek Harness**(`@deepseek-ai` 包、本机 profile / `$DSH_HOME`)上。对象是使用者自己的官方本地软件,**不是**他人的网站、服务器、账号或信息系统。
+3. **评测补丁不对外网目标联网**:应用补丁、写入注入、回滚、卸载均在本机文件与本机进程内完成,**不对任何公网主机、未授权系统进行扫描、探测、入侵或攻击发包**。不得把本项目当作跳板去打外网。插件若开启「检测更新」,仅可能访问本插件自己的 GitHub 仓库以核对版本,**与对第三方系统的网络攻击无关**,也不能被解释为授权对外渗透。
+4. **合法受控范围限定**:本项目定位为使用者在**自己有权管理的本机官方 Harness**上,进行红队科研与鲁棒性评测的辅助工具。**严禁在未经所有者合法书面授权的目标、公网在线系统或生产业务上运行本项目**。一切测试必须限制在**本机已授权安装的官方 Harness、离线本地合成靶标、授权网络安全演练靶场及合规实验室受控环境**中进行。
+5. **禁止中国大陆、香港、澳门的服务器与网站。** 不得对中国大陆、香港、澳门网段,以及解析进这些网段的服务器、网站或地址进行访问、扫描、探测或任何操作。云厂商的名字不能当作例外。唯一例外是使用者事先登记为自己的服务器的那一个确切 IP,或那一个完整主机名。密钥、密码、网段、通配符,以及对话里的口头说明,都不能增加例外。没有登记的,一律禁止。
+6. **严禁违法与违禁用途**:使用者严禁利用本项目直接或间接从事任何违反下列法律法规的行为(必须逐条遵守,不得以任何理由规避):
+ - **《中华人民共和国刑法》**
+ - **《中华人民共和国网络安全法》**
+ - **《中华人民共和国数据安全法》**
+ - **《中华人民共和国个人信息保护法》**
+ - 以及其他现行有效的法律、行政法规与监管规定;
+ - 同时严禁:
+ - 未经授权渗透、攻击公私机构计算机信息系统,实施勒索、破坏、撞库或传播恶意载荷;
+ - 诱导、生成或传播危害国家安全、恐怖主义、暴力血腥、涉黄涉赌、诈骗、侵犯公民隐私或知识产权等任何法律明令禁止的违法违禁内容;
+ - 违反相关大模型提供商的《服务条款》与《滥用政策》。
+7. **使用者独立承担全部责任**:本项目依据 MIT 开源协议“按现状”提供,开发者不对软件的完整性、安全性与适用性作任何明示或暗示的保证。**使用者应对自身的所有下载、部署、运行、修改、传播行为以及由此产生的全部输入与输出后果承担独立、完全的民事、行政及刑事法律责任**。项目作者与贡献团队绝不承担任何因使用者滥用导致的直接、间接或连带责任。
+8. **违约即终止授权**:任何将本项目用于非法攻击、恶意活动或违规行为的个人或实体,其开源软件使用许可将自违法违规行为发生之日起**自动且不可撤销地立即终止**。该主体须立即停止使用并永久销毁本项目的所有代码、脚本与衍生数据,并依法承担相应法律制裁。
+9. **第三方独立性声明**:本项目属于完全独立的开源安全评测研究项目,与 DeepSeek 官方或其关联主体无任何隶属、商业合作、授权或官方背书关系。文中「官方」仅指评测对象为使用者本机安装的官方 DeepSeek Harness 软件包,**不代表** DeepSeek 官方开发、认可或担保本插件。
+10. **必须署名**:借用本项目的名称、思路、代码或提示词,必须署名并标明本仓库。不署名将依法追究责任。详见 [署名要求](#署名要求)。
-**Zero-tolerance statement:** This project opposes and forbids any illegal activity. The authors do not support, encourage, or assist unauthorized network attacks, exploit use, data theft, unlawful intrusion into computer information systems, or generation of illegal or prohibited content. **Anyone who uses this project for crime is solely responsible under the law. The authors have no liability.**
-1. **This repository contains no illegal material.** The published code, docs, patches, and default prompt are **not** malware, backdoors, unauthorized pentest kits, ransomware, credential-stuffing scripts, or attack payloads aimed at the public internet or third-party systems. The project does not supply illegal content and does not incite, organize, or assist crime.
-2. **Local official Harness only.** Security-eval patches and prompt injection run only on the **official DeepSeek Harness already installed on the user's machine** (`@deepseek-ai` packages, local profile / `$DSH_HOME`). The target is the user's own official local software, **not** someone else's website, server, account, or information system.
-3. **Eval patches do not attack the public internet.** Apply, inject, revert, and uninstall stay in local files and local processes. They **do not scan, probe, intrude, or send attack traffic to any public host or unauthorized system**. Do not use this project as a jump host against the public internet. If "check for updates" is on, the plugin may only contact this plugin's own GitHub repository to compare versions. That is **not** an attack on third-party systems and is **not** authorization to penetrate anything.
-4. **Lawful, controlled scope.** This project is an aid for red-team research and robustness evaluation on an **official Harness the user is entitled to administer**. **Do not run it against targets without the owner's lawful written authorization, public online systems, or production workloads.** Testing must stay on the **authorized local official Harness, offline local synthetic fixtures, authorized cybersecurity ranges, and compliant lab environments**.
-5. **Servers and sites in mainland China, Hong Kong, and Macau are forbidden.** Do not access, scan, probe, or otherwise operate against network ranges in mainland China, Hong Kong, or Macau, or against servers, websites, or addresses that resolve into those ranges. A cloud-provider name is not an exception. The only exception is one exact IP, or one exact hostname, that the user registered in advance as their own server. A key, a password, a network range, a wildcard, or a claim made in the conversation does not add an exception. Anything that is not registered stays forbidden.
-6. **Forbidden uses.** Users must not use this project, directly or indirectly, to violate the following (each must be followed; no excuse to evade):
- - Criminal Law of the People's Republic of China
- - Cybersecurity Law of the People's Republic of China
- - Data Security Law of the People's Republic of China
- - Personal Information Protection Law of the People's Republic of China
- - and other applicable laws, regulations, and supervisory rules;
- - Also forbidden:
- - Unauthorized intrusion or attacks on public or private computer information systems; extortion, sabotage, credential stuffing, or spreading malicious payloads;
- - Inducing, generating, or spreading any content the law forbids, including threats to national security, terrorism, violence, pornography, gambling, fraud, and privacy or intellectual-property infringement;
- - Violating the model provider's terms of service and acceptable-use policy.
-7. **The user bears all responsibility.** The project is provided under the MIT license as-is. The authors make no warranty of completeness, security, or fitness. **Users independently bear all civil, administrative, and criminal liability** for download, deploy, run, modify, distribute, and all resulting inputs and outputs. Authors and contributors bear no direct, indirect, or joint liability for abuse.
-8. **The license ends on breach.** Anyone who uses this project for illegal attacks, malicious activity, or other violations has their open-source license **automatically and irrevocably terminated** from the moment of the violation. They must stop using the project, permanently destroy all copies and derivatives, and accept legal sanctions.
-9. **No affiliation.** This is an independent open-source security-eval research project. It has no employment, commercial, authorization, or endorsement relationship with DeepSeek or its affiliates. "Official" here only means the eval target is the official DeepSeek Harness package on the user's machine. It does **not** mean DeepSeek developed, approved, or warrants this plugin.
-10. **Attribution is required.** If you borrow this project's name, ideas, code, or prompts, you must credit the author and name this repository. Failure to attribute will be pursued. See [Attribution required](#attribution-required).
-
-
---
-## Supported hosts
+## 适配范围
-The latest plugin supports **dsh 0.2** only — do not apply it to 0.1.x.
+最新版只支持 **dsh 0.2**,不要拿它去打 0.1.x。
-- **dsh 0.2** (official desktop **0.2.0-rc.2** / official `dsh web`): use **1.1.40** or newer. This page installs that line.
-- **dsh 0.1.7** (incl. rc.1 / rc.2): use **1.1.39** or older — pick the tag on [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases).
+- **dsh 0.2**(官方桌面 **0.2.0-rc.2** / 官方 `dsh web`):用 **1.1.40** 及以上。本页命令装的就是这一档。
+- **dsh 0.1.7**(含 rc.1 / rc.2):用 **1.1.39** 及更早 —— 在 [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases) 里选对应标签。
-Unmatched patches stay pending or skipped; nothing is rewritten blindly.
+对不上的补丁会显示待应用或跳过,不会乱改文件。
---
-## Install
+## 安装
-Web and the official desktop EXE are the two maintained hosts. **Install both. Apply each separately.** A Web install does not reach the desktop app, and a desktop install does not reach Web.
+现在只维护官方 `dsh web` 和官方桌面 EXE,**两边都要装、分开应用**。Web 的包进不了桌面端,桌面端的包也进不了 Web。
-**Web (official `dsh web`)**
+**Web(官方 `dsh web`)**
```sh
dsh plugin --profile web add dsh-purge
```
-**Desktop (official EXE)**
+**桌面端(官方 EXE)**
```sh
dsh plugin --profile desktop add dsh-purge
```
-If this directory is already a clone, use `add .` instead of the package name. If `dsh` is not on PATH, use [Manual install](#manual). Registry blocked: add `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` with the same `--profile`.
+当前目录已经是本仓库时,把包名换成 `add .`。`dsh` 不在 PATH 时走 [手动安装](#manual)。registry 上不去:同一个 `--profile`,把目标换成 `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz`。
-Hub one-click on [dsh-plugin.org](https://dsh-plugin.org/plugins/yujunzhixue/dsh-purge) searches npm for this repository and installs `dsh-purge`. The catalog line may still show `github:` — use the command above if the button falls back to git.
+[插件市场](https://dsh-plugin.org/plugins/yujunzhixue/dsh-purge) 一键安装会按本仓库反查 npm,命中后装 `dsh-purge`。目录页可能仍写 `github:` —— 按钮若退回 git,用上表命令。
-For the desktop client you can also click the button (`dsh://` deep link):
+桌面客户端也可以点按钮(`dsh://` 唤起):
- Install in desktop client
+ 唤起客户端一键安装
-### After the command: three steps
+### 装完都要做这三步
-Adding the plugin to a profile does **not** patch `@deepseek-ai` by itself.
+只把插件写进 profile **还不会**改 `@deepseek-ai`。
-1. **Quit and reopen** the host you installed into — stop and restart `dsh web`, or quit the desktop tray and reopen that app.
-2. On **that host**, click **dsh-purge** beside the session title, then **Apply** on the **Clean** page. It is not on the host Settings page.
-3. A successful **Apply** restarts once so patches load. It does not restart if it did not finish.
+1. **退出并重新打开**刚装的那个宿主:Web 关掉 `dsh web` 再开;桌面端退出托盘再打开对应 exe。
+2. 在**这个宿主**点会话标题旁的 **dsh-purge**,在 **清洗** 页点 **「应用」**。宿主的设置页里没有这个条目。
+3. 「应用」成功后会自动重启一次,让补丁进入当前进程。没做完不会重启。
-Web controls affect Web only; desktop controls affect the desktop app only. Do not Apply one host from the other.
+Web 的控件只动 Web,桌面端的只动桌面应用。不要在一个宿主里点另一个宿主的应用。
-### How to tell it installed
+### 怎样算装上了
-- **dsh-purge** sits beside the session title, with **Apply** on its Clean page.
-- `/purge status` in chat prints `DSH_HOME` and the patch list — the path should be the home you actually run.
-- Optional packages that are not installed (liangshen) show as skipped and do not block Apply.
+- 会话标题旁有 **dsh-purge**,点开后在「清洗」里能点「应用」。
+- 聊天里 `/purge status` 能打出 `DSH_HOME` 和补丁列表,路径应是你正在用的那一份。
+- 没装的可选包(例如梁神)显示跳过,不挡住应用完成。
-### Hand this to an assistant
+### 交给助手安装
-Paste the block below to a local assistant. It should only run the install command — no disk scan, no other edits, no Apply, no restart.
+把下面整段发给本机助手。它只执行安装命令:不要全盘搜索、不要改其它文件、不要代点「应用」、不要重启。
-For AI assistants (install only)
+给 AI 助手(只安装)
-Install the DeepSeek Harness plugin `dsh-purge` into both the Web profile and the official desktop profile. Do not scan the whole disk, do not read or edit other files, do not apply settings, and do not restart the app.
+安装 DeepSeek Harness 插件 `dsh-purge`,Web 和官方桌面端都要装。不要全盘搜索,不要读或改其它文件,不要应用设置,也不要重启应用。
-If `dsh` is not on PATH, tell the user and stop. If this directory is already a clone, use `.` instead of the package name in both commands. If the npm registry is blocked, use `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz`. If one profile is missing, skip that command and still install the other.
+`dsh` 不在 PATH 就告诉用户后停止。当前目录已是本仓库时,把下面两条里的包名都换成 `.`。npm registry 上不去,把包名换成 `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz`。某个 profile 不存在就跳过那一条,另一条照装。
-**Web (official `dsh web`)**
+**Web 端(官方 `dsh web`)**
```sh
dsh plugin --profile web add dsh-purge
```
-**Desktop (official EXE)**
+**桌面端(官方 EXE)**
```sh
dsh plugin --profile desktop add dsh-purge
```
-After the commands finish, tell the user to fully quit and restart `dsh web`, and to quit the desktop tray then reopen the EXE. On each host, open **dsh-purge** beside the session title and **Apply** on **Clean**. Then stop.
+命令结束后,提醒用户:Web 完全退出并重启 `dsh web`;桌面端退出托盘再打开 EXE。各自点会话标题旁的 **dsh-purge**,在「清洗」里点「应用」。然后停止。
@@ -244,16 +264,16 @@ After the commands finish, tell the user to fully quit and restart `dsh web`, an
-### Manual install
+### 手动安装
-Use this when the command fails or `dsh` is not on PATH. Edit **only the profile for the host you run** — do not touch the other, and do not delete existing bundles.
+命令行装不上、或 `dsh` 不在 PATH 时用这个。只改**正在用的那个宿主**对应的 profile,不要动另一个,也不要删原有 bundle。
-Full manual steps
+完整手动步骤
-**1. Find the `$DSH_HOME` this host uses.** A real home is named `.dsh` (official EXE sometimes `dsh-home`), contains `profiles`, and has at least one `profiles//package.json`. Check in order: `DSH_HOME` env → `.dsh` next to the install root (portable) → `%USERPROFILE%\.dsh` or `~/.dsh` → `%APPDATA%` / `%LOCALAPPDATA%\DeepSeek Harness\dsh-home`. Confirm: `profiles/web/package.json` has `"name": "dsh-profile-web"` (or `dsh-profile-desktop`). Machines often have two homes — use the one that belongs to the host you actually start.
+**1. 找到真正在用的 `$DSH_HOME`。** 认目录:名字是 `.dsh`(官方 EXE 偶见 `dsh-home`),里面有 `profiles`,且至少有一个 `profiles/<名>/package.json`。按顺序找:`DSH_HOME` 环境变量 → 安装根旁边的 `.dsh`(便携包)→ `%USERPROFILE%\.dsh` 或 `~/.dsh` → `%APPDATA%` / `%LOCALAPPDATA%\DeepSeek Harness\dsh-home`。确认:`profiles/web/package.json` 里 `"name"` 是 `dsh-profile-web`(桌面是 `dsh-profile-desktop`)。本机常有两份 `.dsh`,要用你**实际启动**的那个宿主对应的那份。
-PowerShell to list candidates:
+Windows PowerShell 列候选:
```powershell
$cands = @()
@@ -268,18 +288,18 @@ $cands += @("$env:APPDATA\DeepSeek Harness\dsh-home", "$env:LOCALAPPDATA\DeepSee
$cands | Select-Object -Unique | Where-Object { $_ -and (Test-Path (Join-Path $_ "profiles")) }
```
-**2. Put the plugin at `$DSH_HOME/plugins/dsh-purge`** (folder must be named `dsh-purge`, with a `package.json` whose `"name"` is `dsh-purge`).
+**2. 把插件放到 `$DSH_HOME/plugins/dsh-purge`**(目录名必须是 `dsh-purge`,其 `package.json` 里 `"name"` 也必须是 `dsh-purge`)。
```sh
git clone https://github.com/YuJunZhiXue/dsh-purge.git "$DSH_HOME/plugins/dsh-purge"
```
-Without git: download [master.tar.gz](https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz), extract, rename `dsh-purge-master` → `dsh-purge`, and place it under `plugins`. If you already have a clone, copy the whole tree — not a few `.js` files.
+没有 git:下载 [master.tar.gz](https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz),解压后把 `dsh-purge-master` 改名为 `dsh-purge`,整夹放到 `plugins` 下。已有本仓库副本就复制整个目录,不要只拷几个 `.js`。
-**3. Edit only that profile's `package.json` — back it up first.** Web → `$DSH_HOME/profiles/web/package.json`; desktop → `$DSH_HOME/profiles/desktop/package.json`. Add **only two things**, keeping every existing dependency and bundle:
+**3. 只改对应 profile 的 `package.json`,先备份。** Web → `$DSH_HOME/profiles/web/package.json`;桌面 → `$DSH_HOME/profiles/desktop/package.json`。**只追加两处**,原有依赖和 bundle 全部留着:
-1. In `dependencies`, add `"dsh-purge": "file:../../plugins/dsh-purge"`
-2. At the **end** of `dsh.profile.bundles`, append `"dsh-purge"` (skip if already there)
+1. `dependencies` 增加 `"dsh-purge": "file:../../plugins/dsh-purge"`
+2. `dsh.profile.bundles` **末尾**追加 `"dsh-purge"`(已有就不要再加)
```json
{
@@ -301,32 +321,32 @@ Without git: download [master.tar.gz](https://github.com/YuJunZhiXue/dsh-purge/a
}
```
-Keep JSON valid (comma before the new item, none after the last). Do not switch `file:../../plugins/dsh-purge` to an absolute path, do not touch `patchReload` or other plugins, and do not list `"dsh-purge"` twice. On desktop, if there is no `dsh-web-app` row, do not add one.
+JSON 要合法(新增项前面有逗号,最后一项后面没有多余逗号)。`file:../../plugins/dsh-purge` 不要改成绝对路径,`patchReload`、其它插件、版本号都不要动,`"dsh-purge"` 不要写两次。桌面端没有 `dsh-web-app` 就不要硬加。
-**4. Run `pnpm install` in that profile only** (`cd` into the profile dir, not the repo root or `$DSH_HOME`):
+**4. 只在刚改的那个 profile 目录装依赖**(`cd` 进 profile 目录,不要在仓库根或 `$DSH_HOME` 根):
```sh
-cd "$DSH_HOME/profiles/web" # or profiles/desktop
+cd "$DSH_HOME/profiles/web" # 或 profiles/desktop
pnpm install
```
-Success: `profiles//node_modules/dsh-purge/package.json` exists. If `pnpm` is missing, use the Node / pnpm shipped with official `dsh`; on `Could not resolve`, re-check the `file:` path; on a JSON error, fix commas or restore the backup.
+成功标志:出现 `profiles//node_modules/dsh-purge/package.json`。找不到 `pnpm` 就用官方 `dsh` 自带的 Node / pnpm;报 `Could not resolve` 就检查 `file:` 路径;JSON 解析失败就修逗号或还原备份。
-**5. Fully quit that host, reopen it, then Apply** — same three steps as above. The card appears beside the session title; click **Apply** (or `/purge apply`) on that host only. If the card is missing, you likely edited the other `.dsh` — go back to step 1.
+**5. 完全退出该宿主,再启动,再点「应用」** —— 和上面三步一样。按钮会出现在会话标题旁,只在这个宿主点「应用」(或 `/purge apply`)。没出现多半是改错了另一份 `.dsh`,回到第 1 步核对。
-### Uninstall
+### 卸载
-**dsh-purge** beside the session title → **Clean** → **Uninstall**. Confirm the dialog: it reverts any applied patches, restores the original Harness, and restarts the current host.
+会话标题旁的 **dsh-purge** →「清洗」→「卸载」。弹窗确认:会先还原已应用的补丁,还原回原版 Harness,再重启当前宿主。
```sh
-# or from a terminal / chat
+# 也可以用命令行 / 聊天
dsh-purge --uninstall
# /purge uninstall
```
-Plugin config lives in `cordis.patch.yml` (`postPrompt` is empty by default):
+插件配置在 `cordis.patch.yml`(`postPrompt` 默认为空):
```yaml
- insert:
@@ -344,83 +364,92 @@ Plugin config lives in `cordis.patch.yml` (`postPrompt` is empty by default):
---
-## Preview
+## 界面预览
-**dsh-purge** sits beside the session title. It opens a right-hand dock with two pages: **Clean** and **Drill**. Switch **Light / Ink**. Patches are grouped; the count only includes items that actually applied. Rule sets sit in a list above the editor, with Enable and Delete on each row.
+会话标题旁有 **dsh-purge**。点开是右侧栏,两页:**清洗** 和 **演练台**。白 / 墨可切换。补丁按组展开,进度只计真正已应用的项。规则集在上方列表启用或删除,下方编辑正文。
-The first time you open Drill you read the notice, wait out the countdown, scroll to the end, and check three boxes. Clean does not need that step. Drill is only for a host you manage, an offline target, or an exercise that already has written authorization.
+第一次进演练台要先读声明、等倒计时、滚到文末并勾选三项。清洗不需要这一步。演练台只用于你有权管理的本机、离线靶标,或已经书面授权的演练环境。
-**Clean**
+**清洗**
-
+
-**Drill authorization**
+**演练台授权**
-
+
-**Drill**
+**演练台**
-
+
-**Patches**
+**补丁**
-
+
-**Own servers**
+**规则集**
-On the Clean page, under Prompt. One host per line, then Save list. Steps are in [Own servers](#own-servers).
+
-
+**自己的服务器**
+
+在清洗页,提示词下面。每行一台,点保存名单。步骤见 [自己的服务器](#自己的服务器)。
+
+
+
+
+| 区域 | 说明 |
+| --------- | ---------------------------------------------------------------------------------------------------------- |
+| dsh-purge | 会话标题旁的按钮,打开或收起右侧栏 |
+| 清洗 | 原来的规则设定:补丁、提示词、规则集、Skill |
+| 演练台 | 授权后的资产、技能与环境页。未授权时按钮标「未授权」 |
+| 补丁 | 分组查看状态,应用、还原或卸载 |
+| 提示词 | 编辑 `prompt-inject.md`,作为会话覆盖段 |
+| 自己的服务器 | 每行登记一个 IP 或完整主机名,保存后写入 `$DSH_HOME/net-scope-allow.txt` |
+| 规则集 | 多套 `AGENTS.md` / `CLAUDE.md`;启用写入 `$DSH_HOME`,删除从列表去掉 |
+| Skill | 导入压缩包或文件夹到当前宿主官方目录 `$DSH_HOME/skills//SKILL.md`(Web / 桌面各用自己的主目录,不写死盘符);命中、加载、`/名称` 由 DSH 负责。也可自己删该文件夹 |
-| Area | What it shows |
-|---|---|
-| dsh-purge | button beside the session title; opens or collapses the dock |
-| Clean | the old Rules page: patches, prompt, rule sets, skills |
-| Drill | assets, skills, and environment after authorization. The tab says Unauthorized until then |
-| Patches | grouped status, Apply, Restore, or Uninstall |
-| Prompt | edit `prompt-inject.md` as the session override |
-| Own servers | one IP or exact hostname per line, saved to `$DSH_HOME/net-scope-allow.txt` |
-| Rule sets | multiple `AGENTS.md` / `CLAUDE.md`; Enable writes under `$DSH_HOME`, Delete removes the row |
-| Skills | import a zip or folder into this host’s official `$DSH_HOME/skills//SKILL.md` (web and desktop each use their own home; no drive letter is hardcoded); DSH owns match, load, and `/name`. You can also delete that folder yourself |
---
-## Layout
+## 目录结构
-`bin/` is the CLI, `lib/` is patches and the drill console, `presets/redteam/` is the red-team preset, `skills/redteam/` is the bundled skills, and `client.js` is the dock.
+`bin/` 是命令行,`lib/` 是补丁和演练台,`presets/redteam/` 是红队预设,`skills/redteam/` 是随包技能,`client.js` 是侧栏。
-Runtime files live under `$DSH_HOME`: `prompt-inject.md`, `rules/`, `skills/`, `net-scope-allow.txt`, `redteam/`. If `DSH_HOME` is unset, the launcher-adjacent `.dsh` wins over `~/.dsh`. Web and the desktop app each use their own home. Skills are not part of the inject section and do not replace the prompt.
+运行时文件在 `$DSH_HOME`:`prompt-inject.md`、`rules/`、`skills/`、`net-scope-allow.txt`、`redteam/`。未设 `DSH_HOME` 时,优先用 dsh 安装目录旁边的 `.dsh`,再退回 `~/.dsh`。Web 和桌面端各用自己那一份主目录。Skill 不进注入段,也不顶替提示词。
---
-## Usage
+## 使用
```sh
+# CLI
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 | create | delete | reset | help
-/skills list | import | create [description] | delete | help
+/skills list | import <压缩包或文件夹> | create [说明] | delete | help
/rewind
+# 模型工具
purge_status purge_apply purge_revert
```
-After a successful Apply, the host restarts so patched packages load; you can also click **Restart** manually. Under the patch title are the stable release and the test release. The test release follows the `beta` branch. **Switch to stable** installs `master` and clears any pin. Picking an older stable version pins it; click **Update** to return to the latest. Old test tags are not listed.
+设置页「应用」成功后会自动重启,以加载已改的包文件;也可手动点「重启」。补丁标题下有正式版和测试版。测试版跟 `beta` 分支。点「切换到正式版」会装回 master,并清掉钉选。正式版里选旧版本会固定在该版本,要回到最新再点「更新」。旧的测试标签不再列出。
-The composer **Undo once** and **Undo last round** follow official DSH `session.fork({ atSeq })`: the withdrawn turn is cut off, a new session keeps the earlier context, the old session is archived, and the line returns to the input so **send again** re-injects. `/rewind` does the same.
+输入框旁的「回退一次」和「回退上一轮」跟官方 DSH `session.fork({ atSeq })`:撤回已进行的那一轮,新会话接上之前的上下文,旧会话归档,那句回到输入框,再发送会重新注入。聊天里 `/rewind` 同样可用。
-If the **same task works in standard but fails in minimal or PTC**, preset `run_code`, sandbox, or plan intercept text is often still uncleared, or built-in minimal is missing `agent-instructions`. Use **1.1.61+**, then **quit the host fully → Apply in Clean → restart → start a new chat**. Switching preset alone does not reload patches in the running process.
+**极简 / PTC 与标准不一致时**:同一任务在标准模式能跑、在极简或 PTC 被拦,通常是 preset 里 `run_code` 或 plan 拦截句没洗净,或内置 minimal 缺少 `agent-instructions`。请升到 **1.1.61+**,**完全退出宿主 → 清洗里应用 → 自动重启 → 新开一轮对话** 再试;只换 preset 不重应用,旧进程里的补丁不会更新。
-### Response speed
+### 响应速度
-DSH runs Bash calls in a tool batch one at a time. Older dsh-purge releases raised the default foreground wait from 60 seconds to 10 minutes, so one slow command could hold up later calls for that long. Patch #21 now restores marked plugin values to the official 60-second default. Unmarked timeouts and other custom values are preserved; an unmarked 10-minute value cannot reliably be distinguished from a user setting.
+DSH 会按顺序执行同一批中的 Bash 调用。旧版 dsh-purge 把默认前台等待从 60 秒提高到了 10 分钟,一条慢命令会让后续调用一起等待。补丁 #21 现在把带插件标记的旧值恢复为官方的 60 秒。无标记的等待时间和其他自定义值会保留;无标记的 10 分钟无法可靠地区分是插件旧值还是用户设置。
-For a shorter wait in `dsh web` on macOS/Linux, add this entry to `$DSH_HOME/profiles/web/cordis.patch.yml` (normally `~/.dsh/profiles/web/cordis.patch.yml`). Edit an existing entry with the same id instead of adding a duplicate. This profile layer is applied after the bundled configuration, so future plugin applies keep the override.
+在 macOS/Linux 的 `dsh web` 中,如需更快返回工具结果,可在 `$DSH_HOME/profiles/web/cordis.patch.yml`(通常是 `~/.dsh/profiles/web/cordis.patch.yml`)添加下面的条目。已有相同 id 时修改原条目,不要重复添加。这个 profile 覆盖层在内置配置之后加载,后续应用插件会保留它。
```yaml
- id: bash-sandbox
@@ -428,9 +457,9 @@ For a shorter wait in `dsh web` on macOS/Linux, add this entry to `$DSH_HOME/pro
timeoutMs: 10000
```
-With the standard jobs service and `promoteOnTimeout: true`, an unfinished command returns a background job id after 10 seconds and keeps running. Read it with `job_output` or stop it with `job_kill`. This changes the foreground wait, not the command's speed. Without that service or with promotion disabled, the timeout kills the command. A per-call `timeoutMs` overrides this default; `run_in_background: true` returns a job id immediately.
+使用标准 jobs 服务且 `promoteOnTimeout: true` 时,未完成的命令会在 10 秒后返回后台任务 id,并继续运行。用 `job_output` 读取结果、用 `job_kill` 停止。这个设置缩短前台等待,不会让命令本身跑得更快。没有 jobs 服务或关闭自动转后台时,超时会终止命令。单次调用传入的 `timeoutMs` 优先于这里的默认值;`run_in_background: true` 可立即返回任务 id。
-For routine tasks, you can also opt into Low reasoning for new sessions:
+日常任务还可以选择让新会话默认使用 Low 推理:
```yaml
- id: agent-default-model
@@ -440,36 +469,32 @@ For routine tasks, you can also opt into Low reasoning for new sessions:
reasoningEffort: low
```
-Restart `dsh web` to load the profile. The model and reasoning defaults apply to newly created sessions; select Low in the composer for an existing session. The plugin does not change these model preferences automatically. Keep High when the task needs deeper reasoning, and narrow file searches rather than recursively scanning every application directory.
+重启 `dsh web` 后加载配置。模型和推理等级默认值只用于新建会话,已有会话请在输入框中选择 Low。插件不会自动修改这些模型偏好。需要深入推理的任务可保留 High;搜索文件时应限定目录,避免递归扫描所有应用目录。
-### Own servers
+### 自己的服务器
-Addresses in mainland China, Hong Kong, and Macau stay forbidden unless that one host was registered first. Saying “this is my server” in chat does not allow it. A key or a password does not allow it either.
+中国大陆、香港、澳门的地址默认禁止。只有事先登记的那一台可以例外。在对话里说「这是我的服务器」不会放行。密钥和密码也不会。
-The box sits under Prompt. If the dock does not show it yet, quit DeepSeek Harness completely and open it again.
+这一栏在提示词下面。若侧栏里还没有它,先完全退出 DeepSeek Harness,再重新打开。
-1. Click **dsh-purge** beside the session title and stay on **Clean**.
-2. Scroll past **Prompt**. **Own servers** is the next block.
-3. Put one host on each line, in one of these forms:
- - `203.0.113.10` — one IP.
- - `my-vps.example.com` — one exact hostname. After you save, the addresses that hostname resolves to at lookup time are allowed too.
- - `alice@my-vps.example.com` — the account only identifies this form. It does not prove the machine is yours.
-4. Click **Save list**. The list is written to `$DSH_HOME/net-scope-allow.txt`.
-5. Keys, passwords, ranges, and wildcards are dropped on save. Unlisted mainland China, Hong Kong, and Macau addresses stay forbidden.
+1. 点会话标题旁的 **dsh-purge**,停在 **清洗**。
+2. 往下滚过 **提示词**,下面就是 **自己的服务器**。
+3. 每行只写一台,用下面三种写法之一:
+ - `203.0.113.10`:一个 IP。
+ - `my-vps.example.com`:一个完整主机名。保存后,这个主机名当时解析出来的地址也会放行。
+ - `alice@my-vps.example.com`:账号只用来认出这种写法,不能证明这台机器属于你。
+4. 点 **保存名单**。名单写在 `$DSH_HOME/net-scope-allow.txt`。
+5. 密钥、密码、网段和通配符会在保存时丢掉。没有写进名单的大陆、香港、澳门地址仍然禁止。
-`203.0.113.10` and `example.com` above are only examples of the form. Replace them with your own host before you save.
+上面的 `203.0.113.10` 和 `example.com` 只是写法示例,不是放行地址。把它们换成你自己的那一台再保存。
---
-## Local checks
+## 本地校验
```sh
node --check lib/index.js
node --check lib/core.js
-node --check lib/surface.js
-node --check lib/web.js
-node --check lib/desktop.js
-node --check lib/host.js
node --check lib/rewind.js
node --check lib/skills.js
node --check client.js
@@ -477,49 +502,53 @@ node --check client.js
---
-## How it works
+## 工作原理
-Apply, on start or when you click Apply:
+应用,启动时或手动点「应用」:
```mermaid
flowchart TD
- A["Start or click Apply"] --> B{"Patch already in place?"}
- B -->|yes| C["Skip"]
- B -->|no| D["Back up the original as .dshpurge.bak"]
- D --> E["Replace the matched files"]
- E --> F["Override the shim"]
- F --> G["Inject the encrypted prompt shipped in the plugin, the text the prompt box shows by default"]
+ A["启动或点应用"] --> B{"补丁已经生效?"}
+ B -->|是| C["跳过"]
+ B -->|否| D["备份原件为 .dshpurge.bak"]
+ D --> E["按补丁列表替换对应文件"]
+ E --> F["覆盖 shim"]
+ F --> G["注入插件加密默认(提示词框默认显示的那份)"]
```
-Override on each session:
+
+
+每次会话的覆盖:
```mermaid
flowchart TD
- A["Restart or new session"] --> B["Inject the plugin's encrypted default. No save click, and no host prompt file"]
+ A["重启或新会话"] --> B["注入插件加密默认,不必点保存,不读宿主磁盘"]
```
-Prompt injection and ruleset decision at every turn. The three inputs on the left are what you control in the dsh-purge panel; the dotted edges show which decision each one drives:
+
+
+每一轮的提示词注入与规则集决策。左边三个输入就是你在 dsh-purge 面板里控制的东西,虚线表示它们各自驱动哪一步判定:
```mermaid
flowchart TD
- L["Rule library: activate a set → writes prompt-inject.md"]
- W["Local rules: check AGENTS.md / CLAUDE.md in the current dir"]
- P["Workspace policy: strict / fallback / always"]
+ L["规则库:启用某个规则集 → 写入 prompt-inject.md"]
+ W["本地规则:勾选当前目录的 AGENTS.md / CLAUDE.md"]
+ P["工作区策略:strict / fallback / always"]
- A["Turn start"] --> B{"prompt-inject.md non-empty?"}
- B -->|yes| C["Inject = prompt-inject.md (A)"]
- B -->|no| D{"Any checked local md in the current dir, non-empty?"}
- D -->|yes| E["Inject = selected workspace md (B)"]
- D -->|no| F["Inject = plugin encrypted slot default (D)"]
- C --> G{"Workspace baseline policy (C)"}
+ A["新一轮开始"] --> B{"prompt-inject.md 非空?"}
+ B -->|是| C["注入 = prompt-inject.md (A)"]
+ B -->|否| D{"当前目录有被勾选且非空的本地 md?"}
+ D -->|是| E["注入 = 被勾选的 workspace md (B)"]
+ D -->|否| F["注入 = 插件加密 slot 默认值 (D)"]
+ C --> G{"Workspace baseline 策略 (C)"}
E --> G
F --> G
- G -->|strict| H["Drop DSH workspace baseline section"]
- G -->|fallback default| I{"User inject present above? (A or B)"}
- G -->|always| J["Keep DSH workspace baseline section"]
- I -->|yes| H
- I -->|no| J
- H --> K["Final system prompt"]
+ G -->|strict| H["去掉 DSH workspace baseline 段"]
+ G -->|fallback 默认| I{"上面有用户注入内容? (A 或 B)"}
+ G -->|always| J["保留 DSH workspace baseline 段"]
+ I -->|是| H
+ I -->|否| J
+ H --> K["最终系统提示词"]
J --> K
L -.-> B
@@ -527,60 +556,60 @@ flowchart TD
P -.-> G
```
-Skills stay out of the inject section:
+
+
+Skill 不进注入段:
```mermaid
flowchart LR
- A["Settings import or /skills import"] --> B["Write into the official skills directory"]
- B --> C["DSH loads it"]
- C --> D["Uninstall does not delete user skills"]
+ A["设置页导入或 /skills import"] --> B["写到官方 skills 目录"]
+ B --> C["由 DSH 加载"]
+ C --> D["卸载插件不删用户 Skill"]
```
----
-## Restore
-
-- Each target is copied to `.dshpurge.bak` before the first apply.
-- **Restore** or `/purge revert` copies backups back and deletes them. With no backup, shim lines written by this plugin are stripped.
-- `prompt-inject.md` is a user file and is kept.
-- **Uninstall** restores first if patches were applied, then deletes the inject file, rule library, and the plugin itself.
-- Apply is idempotent.
---
-## Path detection
+## 还原
-The host surface is detected first: `web` / `desktop` (`gui` / `tui` are reserved and still fall back to web).
+- 每个目标文件在应用前备份为 `<文件>.dshpurge.bak`。
+- 「还原」或 `/purge revert` 用备份覆盖回去并删除备份;没有备份时去掉 shim 里由本插件写入的行。
+- `prompt-inject.md` 是用户文件,还原时保留。
+- 「卸载」会先还原(若已应用),再删除注入文件、规则库和插件本身。
+- 重复应用是幂等的。
-**Web:**
+---
+
+## 路径探测
+
+宿主面先判断 `web` / `desktop`(预留 `gui` / `tui`,尚未单独适配时回退 web)。
+
+**Web:**
1. `DSH_HOME` / `DSH_BASE`
-2. `.dsh` next to the dsh launcher (portable install, any drive)
+2. dsh 启动器旁的 `.dsh`
3. `npm prefix -g` / `npm root -g`
-4. Nested `@deepseek-ai/dsh/node_modules/@deepseek-ai`
-5. `~/.dsh`
+4. 嵌套 `@deepseek-ai/dsh/node_modules/@deepseek-ai`
+5. 系统默认 `~/.dsh`
-**Official desktop EXE:** the running official Harness install (`resources/app` or the unpacked package). The drive letter is not hard-coded. A successful Apply restarts once.
+**官方桌面:** 只改当前正在运行的官方桌面安装。点「应用」成功后会自动重启一次。社区桌面端不维护。
-Community Desktop is not maintained.
-
-Official npm-global is not patched. Sealed `host-commands` / `runtime-commands` are scrubbed, never injected.
-
-If nothing is found, set `DSH_BASE` / `DSH_DESKTOP_INSTALL`. No files are changed.
+找不到目标时提示设置 `DSH_BASE`,不改文件。
---
-## Releases
+## 更新
-What changed, and the zip, are on [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases). To publish, bump the version in `package.json`, write Chinese and English notes in `release-notes.md`, and push `master`. Pushing the same version again does not publish another package.
+每一版改了什么、安装包在 [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases)。发新版时把 `package.json` 的版本号改掉,中英文说明写进 `release-notes.md`,推到 `master` 就会自动打包。同一版本再推送不会重复发包。
-## Notes
+## 说明
-- Scope is rendered copy, defaults, and runtime logic inside local `@deepseek-ai/*` packages, plus override files and rule sets under the harness home.
-- After an upgrade, unmatched originals show as skipped. Apply still completes, and those files are left unchanged.
-- Third-party plugin *source repos* outside `@deepseek-ai` are left alone (CMD silence may **best-effort** patch installed doctor / market / liangshen / mnemon at runtime).
-- Install the npm package `dsh-purge`: `dsh plugin --profile web add dsh-purge` or `dsh plugin --profile desktop add dsh-purge`. From this repo, `add .`. If the registry is blocked, add the master.tar.gz URL instead. Hub one-click uses the same npm package.
+- 改动范围是本机 `@deepseek-ai/*` 包里的渲染文案、默认策略和执行逻辑,以及用户目录下的覆盖文件与规则集。
+- 升级后原文对不上会显示跳过,这次应用仍算完成,不会乱改。
+- 不改动非 `@deepseek-ai` 的第三方插件源仓库(启动时的 CMD 无感会**尽力**修补已装的 doctor / market / 梁神 / mnemon,属运行时补丁)。
+- 安装走 npm 包名 `dsh-purge`:`dsh plugin --profile web add dsh-purge` 或 `dsh plugin --profile desktop add dsh-purge`。当前目录已是本仓库时 `add .`。registry 上不去再加 master.tar.gz。插件市场一键安装走同一个 npm 包。
---
-Thanks to the [LINUX DO](https://linux.do) community
+感谢 [LINUX DO](https://linux.do) 社区
\ No newline at end of file
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 3f8cf7f..210718c 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -26,10 +26,14 @@
- English | 中文
+ 中文 · English
-> **暂停更新。** 作者因工作安排,近期没有稳定收入,项目维护暂时搁置:不再发版、暂不收 issue / PR,也不保证跟进新版 dsh。仓库仍可自用;赞助见下方。恢复维护时会在本 README 说明。
+> **暂时停更。**
+>
+> 这段时间要先把工作安顿好,项目维护先放一放:暂不发新版本,暂不处理 issue / PR,新版 dsh 也不保证跟上。已经发布的版本可以继续用,仓库也还在。等我恢复维护,会写在这篇 README 开头。
+>
+> 这个项目一直是业余在做。若它对你有帮助,欢迎看看下面的 [赞助](#sponsor);也在征集 README [广告位](#ad),换一点把项目撑下去的空间。
> **官方 Web 和官方桌面端都支持。** 官方 `dsh web` 用 profile `web`;官方桌面 EXE(DeepSeek Harness **0.2.0-rc.2**)用 profile `desktop`。两边分开安装、分开点「应用」。当前版本只适配 dsh 0.2;更早的 dsh 用对应的老版本插件。社区桌面端不维护。
>
@@ -40,6 +44,7 @@
## 目录
- [赞助](#sponsor)
+- [广告位](#ad)
- [介绍](#介绍)
- [署名要求](#署名要求)
- [违规商用公示](#违规商用公示)
@@ -68,6 +73,21 @@
| Ethereum | `0xB68BD60C0e8c519513B7DF9bB147696815423B3E` |
| Bitcoin | `bc1qu70yxkrtwnymt8ryluz9x8y8hqzune5340npht` |
+---
+
+
+
+## 广告位
+
+README 长期有人看,现开放少量展示位。收入用于贴补业余维护。
+
+| 位置 | 状态 |
+| --- | --- |
+| 本页赞助区上方(文字链 + 一句介绍,或一张小图) | **空缺,可定** |
+
+名额少,谈妥再上。不接灰产、盗版、冒充本仓库、纯引流盘。
+
+合作请发邮件 [a2269198325@163.com](mailto:a2269198325@163.com),或 GitHub [@YuJunZhiXue](https://github.com/YuJunZhiXue) 私信。标题注明「dsh-purge 广告位」。
---
diff --git a/lib/update.js b/lib/update.js
index 7a5dda8..790ae49 100644
--- a/lib/update.js
+++ b/lib/update.js
@@ -27,6 +27,7 @@ const COPY_NAMES = [
"package.json",
"README.md",
"README.zh-CN.md",
+ "README.en.md",
"LICENSE",
];
diff --git a/package.json b/package.json
index 4eabf67..6ca2941 100644
--- a/package.json
+++ b/package.json
@@ -31,6 +31,7 @@
"screenshots.json",
"README.md",
"README.zh-CN.md",
+ "README.en.md",
"LICENSE"
],
"scripts": {