mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 00:20: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
+49
-45
@@ -144,30 +144,39 @@ Harness は単にプロンプトを転送するだけではありません。プ
|
||||
|
||||
## インストール
|
||||
|
||||
以下の 3 ステップに従ってください。**プラグインマーケットプレイスは使わないでください。** [dsh-plugin.org](https://dsh-plugin.org) や 設定 → プラグインマーケット でのワンクリックインストールは `already queued: dsh-purge` で失敗し、コマンドを実行しません。`dsh-purge` という名前は npm レジストリにありません。`pnpm add dsh-purge` はしないでください。このマシンに pnpm しかない場合は、ステップ 2 の pnpm URL を使ってください。
|
||||
**プラグインマーケットプレイスは使わないでください。** [dsh-plugin.org](https://dsh-plugin.org) や 設定 → プラグインマーケット でのワンクリックインストールは `already queued: dsh-purge` で失敗し、コマンドを実行しません。`dsh-purge` という名前は npm レジストリにないので、`pnpm add dsh-purge` はしないでください。
|
||||
|
||||
### 1. どのホストを実行していますか?
|
||||
### クイックスタート
|
||||
|
||||
公式 `dsh web` と公式デスクトップ EXE は **別々に** インストール・パッチされます。実際に開くホストにのみインストールしてください。
|
||||
|
||||
| 実行するもの | プロファイル | コマンド |
|
||||
|---|---|---|
|
||||
| 公式 `dsh web` | `web` | 下記の 1 つ目のコマンド |
|
||||
| 公式デスクトップ EXE | `desktop` | 下記の 2 つ目のコマンド |
|
||||
|
||||
### 2. プロファイルに追加(`dsh` または pnpm のみ)
|
||||
|
||||
`codeload.github.com` を使ってください。`github.com/.../archive` は使わないでください。その 302 により pnpm が `fetch failed` で失敗します。
|
||||
|
||||
**`dsh` がある場合:**
|
||||
PATH に `dsh` があれば、コマンド 1 つ、再起動 1 回、クリック 1 回。自分が開いているホストのコマンドをそのまま実行します(デスクトップ EXE は `web` の代わりに `desktop`):
|
||||
|
||||
```sh
|
||||
# 公式 `dsh web`
|
||||
dsh plugin --profile web add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
|
||||
# 公式デスクトップ EXE
|
||||
dsh plugin --profile desktop add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
```
|
||||
|
||||
EXE の場合は `web` の代わりに `desktop` を使います。このディレクトリがすでにクローンなら、URL の代わりに `.` を使います。
|
||||
1. インストールしたホストを **完全に終了して再起動** します。Web: `dsh web` を停止して起動し直す。デスクトップ: トレイアイコンも終了してから exe を開く。
|
||||
2. そのホストで、セッションタイトルの横の **dsh-purge** → **Clean** → **Apply** をクリック。成功した Apply は 1 回だけ再起動します。
|
||||
|
||||
**pnpm のみ(`dsh` 不要):** リポジトリのルートではなく、実際に使うプロファイル内で実行してください。
|
||||
完了 — チャットで `/purge status` を実行して確認します。pnpm がビルド許可を尋ねてきた場合や、下記の何かが現れない場合は、この後のステップ別の手順に進んでください。
|
||||
|
||||
### ステップバイステップ
|
||||
|
||||
**ステップ 1 — 使うホストを選ぶ。** 公式 `dsh web` と公式デスクトップ EXE は **別々に** インストール・パッチされます。実際に開くホストにのみインストールしてください。
|
||||
|
||||
| 実行するもの | プロファイル | インストールコマンド |
|
||||
|---|---|---|
|
||||
| 公式 `dsh web` | `web` | クイックスタートの `web` の行 |
|
||||
| 公式デスクトップ EXE | `desktop` | クイックスタートの `desktop` の行 |
|
||||
|
||||
**ステップ 2 — プラグインを入れる。** 圧縮パッケージの URL は `codeload.github.com` の書き方そのままにしてください。`github.com/.../archive` は使わないでください。その 302 により pnpm が `fetch failed` で失敗します。
|
||||
|
||||
`dsh` がある場合: クイックスタートの自分のプロファイルの行を実行します。このディレクトリがすでにクローンなら、URL の代わりに `.` を使います。
|
||||
|
||||
pnpm のみ(`dsh` 不要): リポジトリのルートではなく、実際に使うプロファイル内で実行してください。
|
||||
|
||||
```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` と `dsh plugin add` はパッケージを取得します。`postinstall` が `dsh-purge` を `dsh.profile.bundles` に書き込み、プロファイルの `cordis.patch.yml` に body `insert` を追加します。その insert がないとホストはプラグインを読み込まず、ボタンも現れません。pnpm 11/12 はビルドを許可しないとインストールスクリプトをスキップします(`ERR_PNPM_IGNORED_BUILDS`):
|
||||
`pnpm add` と `dsh plugin add` はパッケージを取得します。`postinstall` が `dsh-purge` を `dsh.profile.bundles` に書き込み、プロファイルの `cordis.patch.yml` に body `insert` を追加します。その insert がないとホストはプラグインを読み込まず、ボタンも現れません。
|
||||
|
||||
**完了の目安:** `node_modules/dsh-purge/package.json` が存在し、そのプロファイルの `bundles` に `"dsh-purge"` があり、`cordis.patch.yml` に `id: dsh-purge` の insert があること。
|
||||
|
||||
- pnpm 11/12 はビルドを許可しないとインストールスクリプトをスキップします(`ERR_PNPM_IGNORED_BUILDS`):
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
成功: `node_modules/dsh-purge/package.json` が存在し、そのプロファイルの `bundles` に `"dsh-purge"` があり、`cordis.patch.yml` に `id: dsh-purge` の insert があること。`dsh` も pnpm も使えない場合は [手動インストール](#手動) を使ってください。
|
||||
|
||||
デスクトップクライアントではボタンをクリックすることもできます(`dsh://` ディープリンク。同じ tarball をダウンロードします):
|
||||
- `dsh` も pnpm も使えない場合は [手動インストール](#手動) に進んでください。
|
||||
- デスクトップクライアントではボタンをクリックすることもできます(`dsh://` ディープリンク。同じ 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>デスクトップクライアントでインストール</strong></a>
|
||||
</p>
|
||||
|
||||
### 3. コマンドのあと、あと 3 クリック
|
||||
**ステップ 3 — ホストを再起動する。** プラグインをプロファイルに追加しただけでは、`@deepseek-ai` にパッチは当たりません。インストールしたホストを完全に終了して再起動します(Web: `dsh web` を停止して起動し直す。デスクトップ: トレイアイコンも終了してから exe を開く)。
|
||||
|
||||
プラグインをプロファイルに追加しただけでは、`@deepseek-ai` にパッチは当たりません。
|
||||
**完了の目安:** セッションタイトルの横に **dsh-purge** がある。見当たらない場合はステップ 5 へ。
|
||||
|
||||
1. インストールしたホストを **完全に終了して再起動** します。Web: `dsh web` を停止して起動し直す。デスクトップ: トレイアイコンも終了してから exe を開く。
|
||||
2. **そのホスト** で、セッションタイトルの横の **dsh-purge** をクリックし、**Clean** を開いて **Apply** をクリック。ホストの設定ページにはありません。
|
||||
3. 成功した **Apply** は 1 回だけ再起動します。完了しなかった場合は再起動しません。
|
||||
**ステップ 4 — Apply して確認。** **そのホスト** で、セッションタイトルの横の **dsh-purge** をクリックし、**Clean** を開いて **Apply** をクリック。ホストの設定ページにはありません。成功した **Apply** は 1 回だけ再起動します。完了しなかった場合は再起動しません。Web のコントロールは Web のみに、デスクトップのコントロールはデスクトップアプリのみに作用します。片方のホストからもう片方を Apply しないでください。
|
||||
|
||||
Web のコントロールは Web のみに、デスクトップのコントロールはデスクトップアプリのみに作用します。片方のホストからもう片方を Apply しないでください。
|
||||
**完了の目安:** チャットで `/purge status` を打つと `DSH_HOME` とパッチ一覧が表示され、パスは実際に実行しているホームであること。インストールされていないオプションパッケージ(liangshen)は skipped と表示され、Apply を妨げません。
|
||||
|
||||
### インストールされたか確認する
|
||||
**ステップ 5 — トラブルシューティング。** 上のステップが「完了の目安」で終わらなかったときだけ読むセクションです。
|
||||
|
||||
- **dsh-purge** がセッションタイトルの横にあり、その Clean ページに **Apply** がある。
|
||||
- チャットで `/purge status` を打つと `DSH_HOME` とパッチ一覧が表示される — パスは実際に実行しているホームであるべき。
|
||||
- インストールされていないオプションパッケージ(liangshen)は skipped と表示され、Apply を妨げません。
|
||||
|
||||
ボタンが見当たらない場合は `dsh --dump-config`(または `dsh --profile desktop --dump-config`)を実行し、body 行に `id: dsh-purge`(`dsh-purge-redteam` ではない)があるか確認します。無ければ上記の `ensure-profile-bundle.mjs` を実行し、ホストを完全に終了して再起動します。このバージョン以降は、起動時にライブのレッドチーム子エントリが欠けている insert も書き込みます — もう一度終了・再起動してください。先頭の `entry "redteam-store" not found` は古いレッドチームパッケージの名残で、無視して構いません。
|
||||
|
||||
### マーケットが `already queued: dsh-purge` と言う場合
|
||||
|
||||
マーケットのクリックをやめてください。ステップ 2 の `dsh plugin add` か pnpm を再度使います。CLI もすでにあると言う場合:
|
||||
- **セッションタイトルの横にボタンが無い。** `dsh --dump-config`(または `dsh --profile desktop --dump-config`)を実行し、body 行に `id: dsh-purge`(`dsh-purge-redteam` ではない)があるか確認します。無ければステップ 2 の `ensure-profile-bundle.mjs` を実行し、ホストを完全に終了して再起動します。このバージョン以降は、起動時にライブのレッドチーム子エントリが欠けている insert も書き込みます — もう一度終了・再起動してください。先頭の `entry "redteam-store" not found` は古いレッドチームパッケージの名残で、無視して構いません。
|
||||
- **マーケットが `already queued: dsh-purge` と言う。** マーケットのクリックをやめてください。ステップ 2 の `dsh plugin add` か pnpm を再度使います。CLI もすでにあると言う場合は、先に削除してから入れ直し、ステップ 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
|
||||
```
|
||||
|
||||
Web では `desktop` を `web` に置き換えます。その後ステップ 3 を行います。
|
||||
Web では `desktop` を `web` に置き換えます。
|
||||
|
||||
### アシスタントに任せる
|
||||
### その他
|
||||
|
||||
以下のブロックをローカルアシスタントに貼ってください。実行すべきはインストールコマンドのみです — ディスクスキャン、ほかの編集、Apply、再起動はしません。
|
||||
**アシスタントに任せる。** 以下のブロックをローカルアシスタントに貼ってください。実行すべきはインストールコマンドのみです — ディスクスキャン、ほかの編集、Apply、再起動はしません。
|
||||
|
||||
<details>
|
||||
<summary><strong>AI アシスタント向け(インストールのみ)</strong></summary>
|
||||
@@ -271,9 +274,7 @@ pnpm add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/mas
|
||||
|
||||
<a id="手動"></a>
|
||||
|
||||
### 手動インストール
|
||||
|
||||
コマンドが失敗する場合、または `dsh` が PATH に無い場合に使います。**実行するホストのプロファイルだけ** を編集してください — もう片方には触れず、既存の bundles を削除しないでください。
|
||||
**手動インストール。** コマンドが失敗する場合、または `dsh` が PATH に無い場合に使います。**実行するホストのプロファイルだけ** を編集してください — もう片方には触れず、既存の bundles を削除しないでください。
|
||||
|
||||
<details>
|
||||
<summary><strong>完全な手動手順</strong></summary>
|
||||
@@ -339,13 +340,14 @@ pnpm install
|
||||
|
||||
成功: `profiles/<web|desktop>/node_modules/dsh-purge/package.json` が存在すること。`pnpm` が無い場合は公式 `dsh` に同梱の Node / pnpm を使います。`Could not resolve` の場合は `file:` パスを再確認、JSON エラーの場合はカンマを直すかバックアップを復元します。
|
||||
|
||||
**5. そのホストを完全に終了して再起動し、Apply** — 上記と同じ 3 ステップです。カードはセッションタイトルの横に現れます。そのホストでのみ **Apply**(または `/purge apply`)をクリック。カードが無ければ、おそらく別の `.dsh` を編集しています — ステップ 1 に戻ってください。
|
||||
**5. そのホストを完全に終了して再起動し、Apply** — 上のステップ 3 とステップ 4 です。カードはセッションタイトルの横に現れます。そのホストでのみ **Apply**(または `/purge apply`)をクリック。カードが無ければ、おそらく別の `.dsh` を編集しています — 手順 1 に戻ってください。
|
||||
|
||||
</details>
|
||||
|
||||
### アンインストール
|
||||
**アンインストール。** セッションタイトル横の **dsh-purge** → **Clean** → **Uninstall**。ダイアログを確認: 適用済みパッチを元に戻し、元の Harness を復元し、現在のホストを再起動します。無効化やアンインストールは、まだ `redteam` を指しているエージェントプリセットのデフォルトも `standard` に戻すので、プリセットが消えた後もホストはセッションを作成できます。
|
||||
|
||||
セッションタイトル横の **dsh-purge** → **Clean** → **Uninstall**。ダイアログを確認: 適用済みパッチを元に戻し、元の Harness を復元し、現在のホストを再起動します。無効化やアンインストールは、まだ `redteam` を指しているエージェントプリセットのデフォルトも `standard` に戻すので、プリセットが消えた後もホストはセッションを作成できます。
|
||||
<details>
|
||||
<summary><strong>アンインストールのコマンドと設定</strong></summary>
|
||||
|
||||
```sh
|
||||
# またはターミナル / チャットから
|
||||
@@ -369,6 +371,8 @@ dsh-purge --uninstall
|
||||
postPrompt: ""
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## プレビュー
|
||||
|
||||
@@ -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
|
||||
|
||||
+49
-45
@@ -146,30 +146,39 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审
|
||||
|
||||
## 安装
|
||||
|
||||
按下面三步走。**不要走插件市场**:[dsh-plugin.org](https://dsh-plugin.org) 或设置里的「插件市场」一键安装会报 `already queued: dsh-purge`,命令也走不成。npm 仓库没有 `dsh-purge` 这个名字,不要 `pnpm add dsh-purge`;本机只有 pnpm 时走第 2 步里的 pnpm 地址。
|
||||
**不要走插件市场**:[dsh-plugin.org](https://dsh-plugin.org) 或设置里的「插件市场」一键安装会报 `already queued: dsh-purge`,命令也走不成。npm 仓库没有 `dsh-purge` 这个名字,不要 `pnpm add dsh-purge`。
|
||||
|
||||
### 1. 看你开的是哪一端
|
||||
### 快速安装
|
||||
|
||||
官方 `dsh web` 和官方桌面 EXE **分开装、分开应用**,只装你正在打开的那一个。
|
||||
|
||||
| 你正在用 | profile | 用哪条命令 |
|
||||
|---|---|---|
|
||||
| 官方 `dsh web` | `web` | 下面第一条 |
|
||||
| 官方桌面 EXE | `desktop` | 下面第二条 |
|
||||
|
||||
### 2. 装进 profile(有 `dsh` 或只有 pnpm,走一条)
|
||||
|
||||
压缩包走 `codeload.github.com`,不要用 `github.com/.../archive`:后者 302,pnpm 会 `fetch failed`。
|
||||
|
||||
**有 `dsh`:**
|
||||
PATH 里有 `dsh`?一条命令、一次重启、一次点击。跑你正在打开那一端的命令(桌面版把 `web` 换成 `desktop`):
|
||||
|
||||
```sh
|
||||
# 官方 `dsh web`
|
||||
dsh plugin --profile web add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
|
||||
# 官方桌面 EXE
|
||||
dsh plugin --profile desktop add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
```
|
||||
|
||||
桌面把 `web` 换成 `desktop`。当前目录已是本仓库时,把网址换成 `.`。
|
||||
1. **完全退出再打开**刚装的那个宿主。Web:停掉 `dsh web` 再开。桌面:托盘也要退出,再开 exe。
|
||||
2. 在这个宿主点会话标题旁的 **dsh-purge** →「清洗」→「应用」。应用成功后会自动重启一次。
|
||||
|
||||
**只有 pnpm(没有 `dsh` 也行):** 进正在用的那个 profile,不要在仓库根执行。
|
||||
完成 —— 聊天里跑 `/purge status` 验证。如果 pnpm 问要不要允许构建、或者下面任何东西没出现,走后面的分步说明。
|
||||
|
||||
### 分步说明
|
||||
|
||||
**第 1 步 —— 选定宿主。** 官方 `dsh web` 和官方桌面 EXE **分开装、分开应用**,只装你正在打开的那一个。
|
||||
|
||||
| 你正在用 | profile | 安装命令 |
|
||||
|---|---|---|
|
||||
| 官方 `dsh web` | `web` | 快速安装里 `web` 那条 |
|
||||
| 官方桌面 EXE | `desktop` | 快速安装里 `desktop` 那条 |
|
||||
|
||||
**第 2 步 —— 装插件。** 压缩包地址只用 `codeload.github.com` 这个写法,不要用 `github.com/.../archive`:后者 302,pnpm 会 `fetch failed`。
|
||||
|
||||
有 `dsh`:跑快速安装里你那一端的命令。当前目录已是本仓库时,把网址换成 `.`。
|
||||
|
||||
只有 pnpm(没有 `dsh` 也行):进正在用的那个 profile,不要在仓库根执行。
|
||||
|
||||
```sh
|
||||
cd "$DSH_HOME/profiles/web" # 桌面改 profiles/desktop
|
||||
@@ -183,7 +192,11 @@ cd "$env:USERPROFILE\.dsh\profiles\web" # 桌面改 profiles\desktop
|
||||
pnpm add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
```
|
||||
|
||||
`pnpm add` 和 `dsh plugin add` 都会拉包;`postinstall` 再把 `dsh-purge` 写进 `dsh.profile.bundles`,并在用户层 `cordis.patch.yml` 补上本体 `insert`(没有这一行,宿主不加载插件,界面没有按钮)。pnpm 11/12 默认拦安装脚本(`ERR_PNPM_IGNORED_BUILDS`),请带上允许构建,或事后补跑:
|
||||
`pnpm add` 和 `dsh plugin add` 都会拉包;`postinstall` 再把 `dsh-purge` 写进 `dsh.profile.bundles`,并在 profile 的 `cordis.patch.yml` 补上本体 `insert`(没有这一行,宿主不加载插件,界面也没有按钮)。
|
||||
|
||||
**完成标志:** `node_modules/dsh-purge/package.json` 在,该 profile 的 `bundles` 里有 `"dsh-purge"`,`cordis.patch.yml` 里有 `id: dsh-purge` 的 insert。
|
||||
|
||||
- pnpm 11/12 默认拦安装脚本(`ERR_PNPM_IGNORED_BUILDS`),要带上允许构建:
|
||||
|
||||
```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
|
||||
@@ -193,35 +206,25 @@ pnpm approve-builds dsh-purge@https://codeload.github.com/YuJunZhiXue/dsh-purge/
|
||||
node node_modules/dsh-purge/scripts/ensure-profile-bundle.mjs
|
||||
```
|
||||
|
||||
成功标志:`node_modules/dsh-purge/package.json` 在,profile 的 `bundles` 里有 `"dsh-purge"`,`cordis.patch.yml` 里有 `id: dsh-purge` 的 insert。`dsh` 和 pnpm 都没有时走 [手动安装](#manual)。
|
||||
|
||||
桌面客户端也可以点按钮(`dsh://` 唤起,下的仍是同一份压缩包):
|
||||
- `dsh` 和 pnpm 都没有时,跳到[手动安装](#manual)。
|
||||
- 桌面客户端也可以点按钮(`dsh://` 唤起,下的仍是同一份压缩包)。
|
||||
|
||||
<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>唤起客户端一键安装</strong></a>
|
||||
</p>
|
||||
|
||||
### 3. 装完还要做这三下
|
||||
**第 3 步 —— 重启宿主。** 只把插件写进 profile **还不会**改 `@deepseek-ai`。完全退出再打开刚装的那个宿主(Web:停掉 `dsh web` 再开;桌面:托盘也要退出,再开 exe)。
|
||||
|
||||
只把插件写进 profile **还不会**改 `@deepseek-ai`。
|
||||
**完成标志:** 会话标题旁出现 **dsh-purge**。没出现?跳到第 5 步。
|
||||
|
||||
1. **完全退出再打开**刚装的那个宿主。Web:停掉 `dsh web` 再开。桌面:托盘也要退出,再开 exe。
|
||||
2. 在**这个宿主**点会话标题旁的 **dsh-purge**,打开 **清洗**,点 **「应用」**。宿主自己的设置页里没有这一项。
|
||||
3. 「应用」成功后会自动重启一次。没做完不会重启。
|
||||
**第 4 步 —— 应用并验证。** 在**这个宿主**点会话标题旁的 **dsh-purge**,打开「清洗」,点「应用」。宿主自己的设置页里没有这一项。应用成功后会自动重启一次,没做完不会重启。Web 的按钮只动 Web,桌面的只动桌面,不要在一个里面点另一个的应用。
|
||||
|
||||
Web 的按钮只动 Web,桌面的只动桌面。不要在一个里面点另一个的应用。
|
||||
**完成标志:** 聊天里 `/purge status` 能打出 `DSH_HOME` 和补丁列表,路径是你正在用的那一份。没装的可选包(梁神)显示跳过,不挡住完成。
|
||||
|
||||
### 怎样算装上了
|
||||
**第 5 步 —— 排障。** 只有上面没有跑到「完成标志」时才看这里。
|
||||
|
||||
- 会话标题旁有 **dsh-purge**,清洗页能点「应用」。
|
||||
- 聊天里 `/purge status` 能打出 `DSH_HOME` 和补丁列表,路径是你正在用的那一份。
|
||||
- 没装的可选包(例如梁神)显示跳过,不挡住完成。
|
||||
|
||||
没有按钮时,在对应 profile 跑 `dsh --dump-config`(或 `dsh --profile desktop --dump-config`),看有没有本体行 `id: dsh-purge`(不是 `dsh-purge-redteam`)。没有就再跑上面的 `ensure-profile-bundle.mjs`,然后完全退出重开宿主。升到本版本后,若演练台子行已经在跑,它也会在启动时把缺的 insert 补上,再完全退出重开一次即可。开头那几条 `entry "redteam-store" not found` 只是旧红队包不在,可以忽略。
|
||||
|
||||
### 市场报 `already queued: dsh-purge` 时
|
||||
|
||||
不要再点市场。按第 2 步用 `dsh plugin add` 或 pnpm 再装一遍。命令也说已经有了,就先卸再装:
|
||||
- **会话标题旁没有按钮。** 在对应 profile 跑 `dsh --dump-config`(或 `dsh --profile desktop --dump-config`),看有没有本体行 `id: dsh-purge`(不是 `dsh-purge-redteam`)。没有就再跑第 2 步的 `ensure-profile-bundle.mjs`,然后完全退出重开宿主。升到本版本后,若演练台子行已经在跑,它也会在启动时把缺的 insert 补上,再完全退出重开一次即可。开头那几条 `entry "redteam-store" not found` 只是旧红队包不在,可以忽略。
|
||||
- **市场报 `already queued: dsh-purge`。** 不要再点市场;回到第 2 步用 `dsh plugin add` 或 pnpm 装。命令也说已经有了,就先卸再装,然后重走第 3 步:
|
||||
|
||||
```sh
|
||||
dsh plugin --profile desktop remove dsh-purge
|
||||
@@ -236,11 +239,11 @@ pnpm remove dsh-purge
|
||||
pnpm add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/master
|
||||
```
|
||||
|
||||
Web 把 `desktop` 换成 `web`。然后再走第 3 步。
|
||||
Web 端把 `desktop` 换成 `web`。
|
||||
|
||||
### 交给助手安装
|
||||
### 高级
|
||||
|
||||
把下面整段发给本机助手。它只执行安装命令:不要全盘搜索、不要改其它文件、不要代点「应用」、不要重启。
|
||||
**交给助手安装。** 把下面整段发给本机助手。它只执行安装命令:不要全盘搜索、不要改其它文件、不要代点「应用」、不要重启。
|
||||
|
||||
<details>
|
||||
<summary><strong>给 AI 助手(只安装)</strong></summary>
|
||||
@@ -273,9 +276,7 @@ pnpm add https://codeload.github.com/YuJunZhiXue/dsh-purge/tar.gz/refs/heads/mas
|
||||
|
||||
<a id="manual"></a>
|
||||
|
||||
### 手动安装
|
||||
|
||||
命令行装不上、或 `dsh` 不在 PATH 时用这个。只改**正在用的那个宿主**对应的 profile,不要动另一个,也不要删原有 bundle。
|
||||
**手动安装。** 命令装不上、或 `dsh` 不在 PATH 时用这个。只改**正在用的那个宿主**对应的 profile,不要动另一个,也不要删原有 bundle。
|
||||
|
||||
<details>
|
||||
<summary><strong>完整手动步骤</strong></summary>
|
||||
@@ -341,13 +342,14 @@ pnpm install
|
||||
|
||||
成功标志:出现 `profiles/<web|desktop>/node_modules/dsh-purge/package.json`。找不到 `pnpm` 就用官方 `dsh` 自带的 Node / pnpm;报 `Could not resolve` 就检查 `file:` 路径;JSON 解析失败就修逗号或还原备份。
|
||||
|
||||
**5. 完全退出该宿主,再启动,再点「应用」** —— 和上面三步一样。按钮会出现在会话标题旁,只在这个宿主点「应用」(或 `/purge apply`)。没出现多半是改错了另一份 `.dsh`,回到第 1 步核对。
|
||||
**5. 完全退出该宿主,再启动,再点「应用」** —— 即第 3 步和第 4 步。按钮会出现在会话标题旁,只在这个宿主点「应用」(或 `/purge apply`)。没出现多半是改错了另一份 `.dsh`,回到第 1 步核对。
|
||||
|
||||
</details>
|
||||
|
||||
### 卸载
|
||||
**卸载。** 会话标题旁的 **dsh-purge** →「清洗」→「卸载」。弹窗确认:会先还原已应用的补丁,还原回原版 Harness,再重启当前宿主。停用或卸载时会把「智能体预设」里指向红队模式的默认值改回 `standard`,避免宿主因找不到 `redteam` 而无法新建会话。
|
||||
|
||||
会话标题旁的 **dsh-purge** →「清洗」→「卸载」。弹窗确认:会先还原已应用的补丁,还原回原版 Harness,再重启当前宿主。停用或卸载时会把「智能体预设」里指向红队模式的默认值改回 `standard`,避免宿主因找不到 `redteam` 而无法新建会话。
|
||||
<details>
|
||||
<summary><strong>卸载命令与配置</strong></summary>
|
||||
|
||||
```sh
|
||||
# 也可以用命令行 / 聊天
|
||||
@@ -371,6 +373,8 @@ dsh-purge --uninstall
|
||||
postPrompt: ""
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## 界面预览
|
||||
|
||||
Reference in new issue
Block a user