mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 11:30:22 +08:00
docs: 安装说明改为分步式(Quick start + Step by step),三语同步(#179)
This commit is contained in:
1 parent
7dee000aa7
commit
a6cc01c7bd
3 files changed
+147
-135
No files matched your search
@@ -144,30 +144,39 @@ Unmatched patches stay pending or skipped; nothing is rewritten blindly.
|
||||
|
||||
## Install
|
||||
|
||||
Follow the three steps below. **Do not use the plugin marketplace.** One-click install on [dsh-plugin.org](https://dsh-plugin.org) or in Settings → Plugin Market fails with `already queued: dsh-purge` and never runs a command. The name `dsh-purge` is not on the npm registry; do not `pnpm add dsh-purge`. If this machine only has pnpm, use the pnpm URL in step 2.
|
||||
**Do not use the plugin marketplace.** One-click install on [dsh-plugin.org](https://dsh-plugin.org) or in Settings → Plugin Market fails with `already queued: dsh-purge` and never runs a command. The name is not on the npm registry, so do not `pnpm add dsh-purge`.
|
||||
|
||||
### 1. Which host are you running?
|
||||
### Quick start
|
||||
|
||||
Official `dsh web` and the official desktop EXE are installed and patched **separately**. Only install into the host you actually open.
|
||||
|
||||
| What you run | Profile | Command |
|
||||
|---|---|---|
|
||||
| Official `dsh web` | `web` | First command below |
|
||||
| Official desktop EXE | `desktop` | Second command below |
|
||||
|
||||
### 2. Add it to the profile (`dsh` or pnpm-only)
|
||||
|
||||
Use `codeload.github.com`. Do not use `github.com/.../archive`: that 302 makes pnpm fail with `fetch failed`.
|
||||
|
||||
**If you have `dsh`:**
|
||||
Have `dsh` on PATH? One command, one restart, one click. Run the line for the host you open (the desktop EXE is the same with `desktop` instead of `web`):
|
||||
|
||||
```sh
|
||||
# Official `dsh web`
|
||||
dsh plugin --profile web add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
|
||||
# Official desktop EXE
|
||||
dsh plugin --profile desktop add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
```
|
||||
|
||||
Use `desktop` instead of `web` for the EXE. If this directory is already a clone, use `.` instead of the URL.
|
||||
1. **Fully quit and reopen** the host you installed into. Web: stop `dsh web` and start it again. Desktop: quit the tray icon too, then open the exe.
|
||||
2. On that host, click **dsh-purge** beside the session title → **Clean** → **Apply**. A successful Apply restarts the host once.
|
||||
|
||||
**pnpm only (no `dsh` required):** run this inside the profile you actually use, not the repo root.
|
||||
Done — verify with `/purge status` in chat. If pnpm asks about build scripts, or anything below does not appear, follow the step by step.
|
||||
|
||||
### Step by step
|
||||
|
||||
**Step 1 — Pick your host.** Official `dsh web` and the official desktop EXE are installed and patched **separately**; only install into the host you actually open.
|
||||
|
||||
| What you run | Profile | Install command |
|
||||
|---|---|---|
|
||||
| Official `dsh web` | `web` | the `web` line in Quick start |
|
||||
| Official desktop EXE | `desktop` | the `desktop` line in Quick start |
|
||||
|
||||
**Step 2 — Install the plugin.** Use the `codeload.github.com` URL exactly. Do not use `github.com/.../archive`: that 302 makes pnpm fail with `fetch failed`.
|
||||
|
||||
Have `dsh`? Run the Quick start line for your profile. If this directory is already a clone, use `.` instead of the URL.
|
||||
|
||||
pnpm only (no `dsh` required): run this inside the profile you actually use, not the repo root.
|
||||
|
||||
```sh
|
||||
cd "$DSH_HOME/profiles/web" # desktop: profiles/desktop
|
||||
@@ -181,7 +190,11 @@ cd "$env:USERPROFILE\.dsh\profiles\web" # desktop: profiles\desktop
|
||||
pnpm add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
```
|
||||
|
||||
`pnpm add` and `dsh plugin add` fetch the package; `postinstall` writes `dsh-purge` into `dsh.profile.bundles` and adds a body `insert` in the profile `cordis.patch.yml`. Without that insert the host never loads the plugin and no button appears. pnpm 11/12 skips install scripts (`ERR_PNPM_IGNORED_BUILDS`) unless you allow the build:
|
||||
`pnpm add` and `dsh plugin add` fetch the package; `postinstall` writes `dsh-purge` into `dsh.profile.bundles` and adds a body `insert` in the profile `cordis.patch.yml`. Without that insert the host never loads the plugin and no button appears.
|
||||
|
||||
**Expected result:** `node_modules/dsh-purge/package.json` exists, `"dsh-purge"` is in that profile's `bundles`, and `cordis.patch.yml` has an `id: dsh-purge` insert.
|
||||
|
||||
- pnpm 11/12 skips install scripts (`ERR_PNPM_IGNORED_BUILDS`) unless you allow the build:
|
||||
|
||||
```sh
|
||||
pnpm add --allow-build=dsh-purge --allow-build=dsh-purge@https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
@@ -191,35 +204,25 @@ pnpm approve-builds dsh-purge@https://codeload.github.com/YuJunZhiXue/dsh-purge/
|
||||
node node_modules/dsh-purge/scripts/ensure-profile-bundle.mjs
|
||||
```
|
||||
|
||||
Success: `node_modules/dsh-purge/package.json` exists, `"dsh-purge"` is in that profile's `bundles`, and `cordis.patch.yml` has an `id: dsh-purge` insert. If neither `dsh` nor pnpm is available, use [Manual install](#manual).
|
||||
|
||||
For the desktop client you can also click the button (`dsh://` deep link; it still downloads the same tarball):
|
||||
- If neither `dsh` nor pnpm is available, jump to [Manual install](#manual).
|
||||
- On the desktop client you can also click the button (`dsh://` deep link; it still downloads the same tarball).
|
||||
|
||||
<p align="center">
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.81&repo=YuJunZhiXue%2Fdsh-purge&permissions=%E7%B3%BB%E7%BB%9F%E6%8F%90%E7%A4%BA%E8%AF%8D%E6%B3%A8%E5%85%A5%2C%E6%9C%AC%E6%9C%BA%E8%A1%A5%E4%B8%81%2C%E8%AE%BE%E7%BD%AE%E9%A1%B5&downloadUrl=https%3A%2F%2Fcodeload.github.com%2FYuJunZhiXue%2Fdsh-purge%2Ftar.gz%2Frefs%2Fheads%2Fmaster"><strong>Install in desktop client</strong></a>
|
||||
</p>
|
||||
|
||||
### 3. Three more clicks after the command
|
||||
**Step 3 — Restart the host.** Adding the plugin to a profile does **not** patch `@deepseek-ai` by itself. Fully quit and reopen the host you just installed into (Web: stop `dsh web` and start again; Desktop: quit the tray icon too, then open the exe).
|
||||
|
||||
Adding the plugin to a profile does **not** patch `@deepseek-ai` by itself.
|
||||
**Expected result:** **dsh-purge** stands beside the session title. Missing? Jump to Step 5.
|
||||
|
||||
1. **Fully quit and reopen** the host you just installed into. Web: stop `dsh web` and start it again. Desktop: quit the tray icon too, then open the exe.
|
||||
2. On **that host**, click **dsh-purge** beside the session title, open **Clean**, and click **Apply**. It is not on the host Settings page.
|
||||
3. A successful **Apply** restarts once. It does not restart if it did not finish.
|
||||
**Step 4 — Apply and verify.** On **that host**, click **dsh-purge** beside the session title, open **Clean**, and click **Apply**. It is not on the host Settings page. A successful **Apply** restarts once; 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.
|
||||
|
||||
Web controls affect Web only; desktop controls affect the desktop app only. Do not Apply one host from the other.
|
||||
**Expected result:** `/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.
|
||||
|
||||
### How to tell it installed
|
||||
**Step 5 — Troubleshooting.** Jump here only when a step above did not end with its expected result.
|
||||
|
||||
- **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.
|
||||
|
||||
If the button is missing, run `dsh --dump-config` (or `dsh --profile desktop --dump-config`) and look for a body row `id: dsh-purge` (not `dsh-purge-redteam`). If it is absent, run `ensure-profile-bundle.mjs` above, then fully quit and reopen the host. After this version, a live red-team child entry also writes the missing insert on startup — quit and reopen once more. `entry "redteam-store" not found` at the top is leftover from an old red-team package and can be ignored.
|
||||
|
||||
### If the market says `already queued: dsh-purge`
|
||||
|
||||
Stop clicking the market. Use `dsh plugin add` or pnpm from step 2 again. If the CLI also says it is already there:
|
||||
- **No button beside the session title.** Run `dsh --dump-config` (or `dsh --profile desktop --dump-config`) and look for a body row `id: dsh-purge` (not `dsh-purge-redteam`). If it is absent, run `ensure-profile-bundle.mjs` (Step 2), then fully quit and reopen the host. After this version, a live red-team child entry also writes the missing insert on startup — quit and reopen once more. `entry "redteam-store" not found` at the top is leftover from an old red-team package and can be ignored.
|
||||
- **The market says `already queued: dsh-purge`.** Stop clicking the market; use `dsh plugin add` or pnpm from Step 2. If the CLI also says it is already there, remove and re-add, then redo Step 3:
|
||||
|
||||
```sh
|
||||
dsh plugin --profile desktop remove dsh-purge
|
||||
@@ -234,11 +237,11 @@ pnpm remove dsh-purge
|
||||
pnpm add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
```
|
||||
|
||||
Swap `desktop` for `web` on Web. Then do step 3.
|
||||
Swap `desktop` for `web` on Web.
|
||||
|
||||
### Hand this to an assistant
|
||||
### Advanced
|
||||
|
||||
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.
|
||||
**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.
|
||||
|
||||
<details>
|
||||
<summary><strong>For AI assistants (install only)</strong></summary>
|
||||
@@ -271,9 +274,7 @@ After the command finishes, tell the user to fully quit and restart `dsh web`, t
|
||||
|
||||
<a id="manual"></a>
|
||||
|
||||
### 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.
|
||||
**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.
|
||||
|
||||
<details>
|
||||
<summary><strong>Full manual steps</strong></summary>
|
||||
@@ -339,13 +340,14 @@ pnpm install
|
||||
|
||||
Success: `profiles/<web|desktop>/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.
|
||||
**5. Fully quit that host, reopen it, then Apply** — Step 3 and Step 4 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.
|
||||
|
||||
</details>
|
||||
|
||||
### Uninstall
|
||||
**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. Disable or uninstall also resets an agent-preset default that still points at `redteam` back to `standard`, so the host can create sessions after the preset is gone.
|
||||
|
||||
**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. Disable or uninstall also resets an agent-preset default that still points at `redteam` back to `standard`, so the host can create sessions after the preset is gone.
|
||||
<details>
|
||||
<summary><strong>Uninstall commands and config</strong></summary>
|
||||
|
||||
```sh
|
||||
# or from a terminal / chat
|
||||
@@ -369,6 +371,8 @@ Plugin config lives in `cordis.patch.yml` (`postPrompt` is empty by default):
|
||||
postPrompt: ""
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Preview
|
||||
|
||||
Reference in new issue
Block a user