dsh-custom-mode 2.2.5 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  # 双语配对一致性记录:两侧在「上次确认一致」时的 git blob 哈希。
2
2
  # 两份文档权威相同——改完任意一侧,请把另一侧也改掉,然后重新记录:
3
3
  # node tools/verify-translation-pairing.mjs --write
4
- README.md: f111de149dd80c8d3e73f5c6ef0d43e8af6d3748
5
- README.zh.md: ede6eabf8c6b7383e60158fbe76e6f86cb7c00d4
4
+ README.md: c45d995f478c01972b08ea681831a593531c279a
5
+ README.zh.md: f2a7906bddc3559d96585c8474a0a102d74cf44c
package/README.md CHANGED
@@ -2,98 +2,117 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- Edit a DeepSeek Harness (`dsh`) custom mode: system prompt, base mode, and plugin switches. Keep more than one assistant. 自定义模式、系统提示词、提示词编辑。
5
+ Edit your DeepSeek Harness (`dsh`) assistants' system prompts, base modes and plugin switches. Keep separate assistants for different tasks.
6
6
 
7
7
  <p align="center">
8
8
  <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/header.png" width="820" alt="dsh-custom-mode">
9
9
  </p>
10
10
 
11
+ [Install](#install-and-make-the-first-request) · [First use](#verify-the-whole-path) · [Updates](#plugin-updates) · [Screenshots](#screenshots) · [Compatibility](#compatibility-and-versioning) · [Help](#help-and-docs)
12
+
13
+ ## Install and make the first request
14
+
15
+ These instructions describe version `2.3.0`. Confirm that the exact version is available in [Releases](https://github.com/BOWLUNA/dsh-custom-mode/releases), and check the [exact-host results and acceptance limits](docs/CURRENT_COMPATIBILITY.md) before installing or updating.
16
+
17
+ Start with an installed [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) and a model configured through its own interface. Check `dsh --version` against the exact hosts in the compatibility record. This package does not install the host or configure model credentials.
18
+
19
+ ### Web / CLI
20
+
21
+ Pin the plugin version; a bare name can resolve an older build during pnpm's release cooldown:
22
+
23
+ ```sh
24
+ dsh --version
25
+ dsh plugin --profile web add dsh-custom-mode@2.3.0
26
+ ```
27
+
28
+ Restart the process that serves this Web profile using its usual launcher. For a local CLI instance, the existing launch form is `dsh web --port 3081 --no-open`; use a free port and open the URL printed by that process. Restart only that instance. Installing a bundle does not refresh an already running host.
29
+
30
+ ### Desktop and Windows
31
+
32
+ In the desktop app, use its **Plugins** page to install `dsh-custom-mode@2.3.0`, then restart the app. This project's scripts deliberately refuse `--profile desktop`; do not modify its profile files by hand. Windows/Electron acceptance remains separate from Web acceptance; see the compatibility record.
33
+
34
+ On Windows, the npm installation above can use the host's `dsh` command from PowerShell. Only the optional clone installer requires Git Bash (plus Node.js and npm). If `dsh` is not on PATH, use the host's supplied launcher, or replace `dsh` with `node "<host-install>/node_modules/@deepseek-ai/dsh/lib/bin.js"`. Do not point that path at this plugin's directory unless the host is actually installed there.
35
+
36
+ ### Verify the whole path
37
+
38
+ 1. Open Settings → Custom mode and check the displayed version. A page that opens is only the first check.
39
+ 2. Scroll to **New assistant at the bottom of the page**. When the built-in `custom` assistant already exists, this section follows its editor. Choose a starting setting such as Writing, enter a recognizable name, and select New assistant. The created assistant becomes the editing target.
40
+ 3. Set a temporary prompt such as `For the next readiness check, reply with exactly CUSTOM_MODE_READY.` Save and wait for the page to confirm that it was applied. If it says the file was saved but application failed, select Retry activation before continuing.
41
+ 4. Start a **new session**, open its mode/assistant selector, and explicitly choose that named assistant. Send `Readiness check.` through a model already configured in DSH.
42
+ 5. Success means the assistant is selectable without a broken-preset warning and returns the expected readiness reply without a prompt-assembly error. Restore your intended prompt after the check. If it fails, use the [current recovery steps](docs/TROUBLESHOOTING.md#current-recovery-steps).
43
+
44
+ ## Screenshots
45
+
46
+ Captured from plugin `2.2.6` in an isolated DSH Web instance with synthetic assistants. These images show the editor, not the new update controls. [Capture sources and limits](docs/images/README.md).
47
+
11
48
  <table align="center">
12
49
  <tr>
13
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png" width="360" alt="Assistants"></td>
14
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png" width="360" alt="System prompt"></td>
50
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png" width="360" alt="Create an assistant"><br>Create an assistant</td>
51
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png" width="360" alt="System prompt editor"><br>Edit its system prompt</td>
15
52
  </tr>
16
53
  <tr>
17
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png" width="360" alt="Base mode"></td>
18
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png" width="360" alt="Plugin switches"></td>
54
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png" width="360" alt="Base-mode choices"><br>Choose a base mode</td>
55
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png" width="360" alt="Native plugin switches"><br>Adjust plugin switches</td>
19
56
  </tr>
20
57
  </table>
21
58
 
22
- ## Install
59
+ [View the new-session assistant selector](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/04-preset-picker.png).
23
60
 
24
- Pin the version. A bare name can install an older build during pnpm's release cooldown. Details: [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md).
25
-
26
- ```sh
27
- dsh plugin --profile web add dsh-custom-mode@2.2.5
28
- ```
61
+ ## What each choice means
29
62
 
30
- Restart the process that serves the profile. Success means Settings → Custom mode shows `v2.2.5`, and the session mode picker offers Custom mode without a broken-preset warning.
63
+ The assistant selected on the settings page is the **one being edited**. Selecting or creating it does not change the assistant used by a new session. On first activation, the plugin may fill a missing default with the built-in `custom` assistant; an existing default is preserved. A newly created Writing assistant still needs to be chosen in the session selector.
31
64
 
32
- Desktop app: its in-app Plugins page is the installation entry point; the CLI cannot modify `profiles/desktop`. This release has not been verified on Windows/Electron.
65
+ Choose the creation starting settings first; a new assistant starts from Standard. After creation, its base mode and individual plugin switches can be adjusted in its editor.
33
66
 
34
- On Windows, `install.sh` is bash and it needs a `dsh` executable on `PATH`. Otherwise use the `dsh` shipped with DeepSeek Harness, or `node node_modules/@deepseek-ai/dsh/lib/bin.js`.
35
-
36
- The GitHub Release also provides a packed plugin (`dsh-custom-mode-2.2.5.tgz`), a preset-only import archive, and `SHA256SUMS`. Verify the checksum, then install the packed plugin with `dsh plugin --profile web add ./dsh-custom-mode-2.2.5.tgz`. The preset-only archive does not include the settings plugin.
67
+ | Starting settings | Initial behavior |
68
+ | --- | --- |
69
+ | Coding | Official Standard mode, tools as shipped. |
70
+ | Writing | Official Standard mode; terminal off, file tools on. |
71
+ | Chat | Official Standard mode; files and terminal off. |
37
72
 
38
- ## Use
73
+ The prompt is stored in `prompt.md` and reread when the next model step is assembled. History and file import load a draft; saving writes it. A stale save is refused when the underlying file changed. `custom_prompt` asks for approval before it writes the same file. Turning off the Identity/persona row also turns off this prompt's injection.
39
74
 
40
- 1. Open Settings → Custom mode.
41
- 2. Edit the system prompt. Save is directly under the editor.
42
- 3. For example, select Writing, create an assistant, then edit its prompt; or change the current assistant’s base mode and tool switches, then save.
43
- 4. A new session uses this assistant when `settings.yaml` has no `agent-presets.default` yet. An existing value is left as it is. Flow-style, scalar, and alias `agent-presets` values are preserved without inserting YAML into them.
75
+ <a id="plugin-updates"></a>
44
76
 
45
- The prompt is `prompt.md`. The next time a model step is assembled, that file is read again. History can load an older draft into the editor; loading does not write. A save computed against an older copy is refused when the file changed underneath. The model can change the same file only through `custom_prompt`, which asks first.
77
+ ## Upgrade, clone development, and removal
46
78
 
47
- The page is two branches. This assistant edits the one you have open, and all five base modes can be chosen. New assistant writes only when you click New assistant: Coding, Writing, and Chat stay selectable, and only the official Standard mode is lit. The other four official modes are dim and cannot be chosen there.
79
+ The page header shows the **running plugin version**. With DSH `0.2.2-alpha.2`'s native update capability, select **Check for updates** to ask the host for eligible versions. A recommended version offers **Update in Plugins**, which opens the official plugin details for its own confirmation, progress and result. The custom page does not install a package itself. Save pending drafts and resolve activation/refresh warnings before leaving the page.
48
80
 
49
- | Posture | After create |
50
- | --- | --- |
51
- | Develop | Official Standard mode, tools as shipped. |
52
- | Write | Official Standard mode. Terminal off, file tools on. |
53
- | Chat | Official Standard mode. Files and terminal off. |
81
+ On `0.2.1-rc.2`, `0.2.1-rc.4`, `0.2.0-rc.2` and `0.1.7-rc.2`, the native version-query API is absent: use **Open plugin details** or **Update guide** and the manual fixed-version path below. File, tarball and source-linked installations remain managed by their original source; checking does not silently convert them to npm. Permission denial, network failure, filtered versions or a partial result do not mean the plugin is current. A separate **Installed on disk** version does not prove that the running code has changed.
54
82
 
55
- ## Boundaries
83
+ When you update from 2.2.6 through a Web host's native Plugins page, or a failed update restores 2.2.6, restart that host once, then check the running version and assistant availability. Hot-stopping the old version can leave assistant registrations behind.
56
84
 
57
- - It does not replace Standard, PTC, Minimal, or Creator.
58
- - It does not ship a role-play preset.
59
- - It does not run in the desktop profile from the CLI. Headless mode will not start a session that uses an agent preset.
85
+ For a manual registry upgrade, use the fixed-version npm command above with a published version, then restart the host and verify the running version. [GitHub Releases](https://github.com/BOWLUNA/dsh-custom-mode/releases) also provides the plugin `.tgz`, a preset-only import archive and `SHA256SUMS`. Verify downloaded hashes; the preset-only archive does not include the settings page.
60
86
 
61
- ## Compatibility
87
+ That command targets Web/CLI only. Desktop users must use an update path actually offered by their app. If it has none, do not substitute the Web CLI command or edit the desktop profile files.
62
88
 
63
- Declared range: `>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0`
89
+ For source development, follow [the isolated setup](CONTRIBUTING.md#isolated-development). The optional `./install.sh --profile web` keeps the source-linked workflow and preserves existing prompt, metadata and composition. Its local package/code rollback and recovery paths are explained in [package and release assets](docs/PUBLISHING.md#package-and-release-assets).
64
90
 
65
- On 2026-10-17, npm `latest` names `0.2.0-rc.2`, `alpha` names `0.2.1-alpha.5`, and `next` names `0.2.1-rc.2`. Upstream has not published a final stable version yet.
91
+ `./uninstall.sh` removes the plugin but keeps assistant data. `--purge` explicitly deletes the managed assistant directories and their prompts; keep your own backup before using it.
66
92
 
67
- | dsh | Channel | Checked for 2.2.5 |
68
- | --- | --- | --- |
69
- | `0.2.0-rc.2` | npm `latest` | Exact npm host, packed plugin load, API lifecycle, settings and picker in an isolated Linux Web profile |
70
- | `0.2.1-alpha.5` | npm `alpha` | The same isolated checks, against this host's own preset declarations |
71
- | `0.2.1-rc.2` | npm `next` | The same isolated checks, against this host's own preset declarations |
72
- | `0.1.7-rc.2` | earlier declared line | Kept in the CI regression matrix |
93
+ ## Compatibility and versioning
73
94
 
74
- Release waits for the unit, boot, and browser workflows. To reproduce against an already installed exact host:
95
+ Declared host range: `>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0 || >=0.2.2-alpha.2 <0.3.0-0`
75
96
 
76
- ```sh
77
- node tools/compat-check.mjs --host-install /path/to/host --out /tmp/custom-mode-check
78
- node tools/runtime-check.mjs --host-install /path/to/host --out /tmp/custom-mode-check --browser /path/to/chrome
79
- ```
97
+ The plugin version is its own stable `x.y.z` line; it does not mirror DSH. On 2026-10-27 the public host tags were `latest=0.2.1-rc.2`, `next=0.2.1-rc.4`, and `alpha=0.2.2-alpha.2`. Tags move; the declared range and completed checks are separate facts. See [exact versions, acceptance limits and historical evidence](docs/CURRENT_COMPATIBILITY.md) for the tested scope.
80
98
 
81
- Both tools use a generated home and ordinary mock prompts. The runtime check exercises all five base modes, repeated saves, uninstall, reinstall, data preservation, and repeated installation. No model calls are needed. Windows/Electron desktop and real model or GPU execution are unverified. See [the exact coverage](docs/CURRENT_COMPATIBILITY.md).
99
+ Release requires the compatibility and browser workflows. The unit runner, real prompt-component checks, packed-install checks and browser checks cover different boundaries. Windows/Electron, a real model response and GPU execution must each have their own evidence; they are not inferred from a page screenshot or unit count. Headless mode does not start an agent-preset session.
82
100
 
83
101
  ## Plugin markets
84
102
 
85
- `dshmarket`, DSH Plugin Hub (`dsh-plugin`), and DSH Plugin Store (`dshmarketplace-plugin`) use different catalogs but install the same profile bundle. The root npm manifest provides `dsh.bundle.patch`, the browser export, the public repository, and matching compatibility ranges; no extra runtime adapter or build script is needed.
86
-
87
- Run `node tools/market-check.mjs --out /tmp/custom-mode-markets.json` to check their public discovery data. An inaccessible catalog or an unverified/stale listing is reported explicitly. The tool never runs catalog-provided shell commands or submits a listing. [Market interfaces and limits](docs/MARKETPLACES.md).
103
+ The documented catalogs use different discovery and approval rules. Their 2026-10-09 listing results are historical, so a package may not be searchable in every market today. The fixed-version installation above remains the direct path. [Market interfaces and limits](docs/MARKETPLACES.md) explains the read-only adapter; it never executes catalog-provided shell commands or submits a listing.
88
104
 
89
- ## Docs
105
+ ## Help and docs
90
106
 
91
- - [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) — wrong version installed, base mode unavailable, half-finished upgrade
92
- - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — where the prompt is read, and which host calls this package depends on
93
- - [docs/PUBLISHING.md](docs/PUBLISHING.md) — tags and release
94
- - [CONTRIBUTING.md](CONTRIBUTING.md) — people
95
- - [AGENTS.md](AGENTS.md) — agents
107
+ - [Troubleshooting](docs/TROUBLESHOOTING.md) — current recovery first, historical incidents below.
108
+ - [Report a bug](https://github.com/BOWLUNA/dsh-custom-mode/issues/new?template=bug_report.yml) or [suggest a feature](https://github.com/BOWLUNA/dsh-custom-mode/issues/new?template=feature_request.yml).
109
+ - [Security reports](SECURITY.md) — request a private channel without posting vulnerability details.
110
+ - [Releases](https://github.com/BOWLUNA/dsh-custom-mode/releases) and [changelog](CHANGELOG.md).
111
+ - [Contributing](CONTRIBUTING.md) — isolated development and checks.
112
+ - [Architecture](docs/ARCHITECTURE.md) — prompt reading and host coupling points.
113
+ - [Publishing](docs/PUBLISHING.md) — existing gated release path and read-back evidence.
114
+ - [AGENTS.md](AGENTS.md) — repository instructions for agents.
96
115
 
97
116
  ## License
98
117
 
99
- MIT
118
+ [MIT](LICENSE)
package/README.zh.md CHANGED
@@ -2,98 +2,117 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- 在 DeepSeek Harness(`dsh`)里改自定义模式的系统提示词、基础模式和插件开关。可以有多个助手。custom mode、system prompt、prompt editor。
5
+ 在 DeepSeek Harness(`dsh`)里编辑助手的系统提示词、基础模式和插件开关,为不同任务保留独立助手。
6
6
 
7
7
  <p align="center">
8
8
  <img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/header.png" width="820" alt="dsh-custom-mode">
9
9
  </p>
10
10
 
11
+ [安装](#安装并完成首次请求) · [首次使用](#验证完整路径) · [更新](#plugin-updates) · [截图](#使用截图) · [兼容](#兼容与版本) · [求助](#帮助与文档)
12
+
13
+ ## 安装并完成首次请求
14
+
15
+ 本说明描述版本 `2.3.0`。安装或更新前,先确认[发布版本](https://github.com/BOWLUNA/dsh-custom-mode/releases)中已有该精确版本,并核对[精确宿主结果与验收边界](docs/CURRENT_COMPATIBILITY.zh.md)。
16
+
17
+ 先安装 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness),并在宿主自己的界面中配置可用模型。用 `dsh --version` 对照兼容记录中的精确宿主版本。本插件不安装宿主,也不配置模型凭据。
18
+
19
+ ### Web / CLI
20
+
21
+ 钉住插件版本;只写包名可能在 pnpm 发布冷却期解析到旧版:
22
+
23
+ ```sh
24
+ dsh --version
25
+ dsh plugin --profile web add dsh-custom-mode@2.3.0
26
+ ```
27
+
28
+ 用原有启动方式重启为该 Web profile 提供服务的进程。本地 CLI 的既有启动形式是 `dsh web --port 3081 --no-open`;选择空闲端口,打开该进程打印的地址。只重启这个实例。安装 bundle 不会刷新已经运行的宿主。
29
+
30
+ ### 桌面端与 Windows
31
+
32
+ 在桌面应用的 **Plugins(插件)** 页安装 `dsh-custom-mode@2.3.0`,然后重启应用。本项目脚本明确拒绝 `--profile desktop`,不要手改它的 profile 文件。Windows/Electron 与 Web 分别验收,详见兼容记录。
33
+
34
+ Windows 上可在 PowerShell 中用宿主提供的 `dsh` 执行上面的 npm 安装命令。只有可选的 clone 安装脚本需要 Git Bash,另需 Node.js 和 npm。PATH 中没有 `dsh` 时,使用宿主自带启动器,或将 `dsh` 替换为 `node "<host-install>/node_modules/@deepseek-ai/dsh/lib/bin.js"`。除非宿主确实装在本插件目录中,否则不要把这个路径指向插件目录。
35
+
36
+ ### 验证完整路径
37
+
38
+ 1. 打开设置 → 自定义模式,检查显示版本。页面能打开只是第一步。
39
+ 2. 滚动到**页面底部的「新建助手」区**。已有内置 `custom` 助手时,该区位于编辑区之后。选择写作等起步设置,输入容易辨认的名称,再点「新增助手」;新建的助手会成为编辑对象。
40
+ 3. 临时把提示词设为 `下一次就绪检查只回复 CUSTOM_MODE_READY。`,保存并等页面确认已应用。若提示文件已保存但应用失败,先点「重试生效」。
41
+ 4. 新建一个**会话**,打开该会话的模式/助手选择器,明确选择刚才命名的助手。通过 DSH 中已经配置的模型发送 `就绪检查。`
42
+ 5. 成功意味着助手可以选择、没有预设损坏告警,并返回预期就绪回复且不出现提示词组装错误。检查后恢复自己的提示词。失败时先看[当前自救步骤](docs/TROUBLESHOOTING.zh.md#当前自救步骤)。
43
+
44
+ ## 使用截图
45
+
46
+ 截图来自隔离DSH Web实例中的插件 `2.2.6`,助手内容均为合成数据。它们展示编辑页,不展示新增的更新控件。[截图来源与边界](docs/images/README.md)。
47
+
11
48
  <table align="center">
12
49
  <tr>
13
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png" width="360" alt="助手"></td>
14
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png" width="360" alt="系统提示词"></td>
50
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/05-assistant-manager.png" width="360" alt="新建助手"><br>新建助手</td>
51
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/03-system-prompt.png" width="360" alt="系统提示词编辑区"><br>编辑系统提示词</td>
15
52
  </tr>
16
53
  <tr>
17
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png" width="360" alt="基础模式"></td>
18
- <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png" width="360" alt="插件开关"></td>
54
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/01-mode-switch.png" width="360" alt="基础模式选择"><br>选择基础模式</td>
55
+ <td align="center"><img src="https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/02-plugin-switches.png" width="360" alt="原生插件开关"><br>调整插件开关</td>
19
56
  </tr>
20
57
  </table>
21
58
 
22
- ## 安装
59
+ [查看新会话的助手选择器](https://raw.githubusercontent.com/BOWLUNA/dsh-custom-mode/main/docs/images/04-preset-picker.png)。
23
60
 
24
- 钉版本。只写包名时,pnpm 的发布冷却期可能装到旧版。细节见 [docs/TROUBLESHOOTING.zh.md](docs/TROUBLESHOOTING.zh.md)。
25
-
26
- ```sh
27
- dsh plugin --profile web add dsh-custom-mode@2.2.5
28
- ```
61
+ ## 各项选择分别做什么
29
62
 
30
- 重启为这个 profile 提供服务的进程。成功判定:设置 → 自定义模式显示 `v2.2.5`,会话模式选择器出现自定义模式,且没有预设损坏告警。
63
+ 设置页选中的助手是**正在编辑的对象**。选中或新建它不会改变新会话使用的助手。首次激活时,插件可能把缺失的默认值补为内置 `custom`;已经存在的默认值保持不变。新建写作助手后,仍需在会话选择器中选它。
31
64
 
32
- 桌面端从应用里的插件页安装。CLI 不能改 `profiles/desktop`。本版未实测 Windows/Electron。
65
+ 先选择新建时的起步设置;新助手以标准模式创建。创建后,可以在它的编辑区调整基础模式与各项插件开关。
33
66
 
34
- 在 Windows 上,`install.sh` 是 bash,而且 PATH 里要有 `dsh`。否则用 DeepSeek Harness 自带的 `dsh`,或 `node node_modules/@deepseek-ai/dsh/lib/bin.js`。
35
-
36
- GitHub Release 另附插件包 `dsh-custom-mode-2.2.5.tgz`、仅供预设导入的归档与 `SHA256SUMS`。核对校验和后,可用 `dsh plugin --profile web add ./dsh-custom-mode-2.2.5.tgz` 安装插件包。仅供预设导入的归档不包含设置插件。
67
+ | 起步设置 | 初始行为 |
68
+ | --- | --- |
69
+ | 开发 | 官方标准模式,工具按出厂设置。 |
70
+ | 写作 | 官方标准模式;终端关闭,文件工具开启。 |
71
+ | 聊天 | 官方标准模式;文件与终端关闭。 |
37
72
 
38
- ## 使用
73
+ 提示词保存在 `prompt.md`,下一步组装模型输入时会重读。历史与文件导入先载入草稿,保存才落盘。底层文件已变化时,过期保存会被拒绝。`custom_prompt` 写同一个文件前需要批准。关闭身份/persona 行也会关闭该提示词的注入。
39
74
 
40
- 1. 打开设置 → 自定义模式。
41
- 2. 改系统提示词。保存按钮在编辑器下面。
42
- 3. 典型用法:选写作姿态新增助手,再改提示词;或调整当前助手的基础模式和工具开关后保存。
43
- 4. `settings.yaml` 里还没有 `agent-presets.default` 时,新会话用这个助手。已经写过的值保持原样。`agent-presets` 使用行内对象、标量或别名时也原样保留,不向里面插入 YAML。
75
+ <a id="plugin-updates"></a>
44
76
 
45
- 提示词是 `prompt.md`。下一步组装模型输入时会重读这个文件。历史可以把旧稿载入编辑器;载入不落盘。打开页面之后文件被改过时,这一次保存会被拒绝。模型要改同一份文件,只能走 `custom_prompt`,并且先问过你。
77
+ ## 升级、clone 开发与卸载
46
78
 
47
- 页面分成两支。当前助手改的是已经打开的这一位,基础模式五档都可以点。新建助手只在点「新增助手」时写入:开发、写作、聊天可以点,工具底只有官方标准模式是亮的。其余四档是暗的,在这一支里点不了。
79
+ 页首显示**运行中的插件版本**。宿主提供DSH `0.2.2-alpha.2`的原生更新能力时,点「**检查更新**」让宿主查询可用版本。有推荐版本后,「**在插件管理中更新**」会打开官方插件详情,由它承接确认、进度与结果;自定义页不直接安装包。离开前先保存待处理草稿,并处理生效/读取告警。
48
80
 
49
- | 姿态 | 新建之后 |
50
- | --- | --- |
51
- | 开发 | 官方标准模式,工具按出厂。 |
52
- | 写作 | 官方标准模式。终端关,文件工具开。 |
53
- | 聊天 | 官方标准模式。文件和终端关。 |
81
+ `0.2.1-rc.2`、`0.2.1-rc.4`、`0.2.0-rc.2`和`0.1.7-rc.2`没有原生版本查询API,可用「**打开插件详情**」或「**更新指引**」,再按下方固定版本方式手动更新。文件、tarball与源码链接安装继续由原来源管理,不会因检查更新而悄悄转成npm。权限拒绝、网络失败、版本被筛除或结果不完整都不代表已是最新。「**磁盘安装版本**」与运行版本不同,不能据此认定新代码已运行。
54
82
 
55
- ## 边界
83
+ 通过Web宿主的原生插件页从2.2.6更新,或更新失败后恢复到2.2.6时,请重启该宿主一次,再核对运行版本与助手是否可用。旧版热停止可能留下助手注册记录。
56
84
 
57
- - 不替换标准、PTC、极简、创造。
58
- - 不附带角色扮演预设。
59
- - 不用 CLI 改桌面端 profile。headless 不会启动使用 agent preset 的会话。
85
+ 手动更新注册表安装时,使用上面的固定版本npm命令并选择已发布版本,再重启宿主、核对运行版本。[GitHub Releases](https://github.com/BOWLUNA/dsh-custom-mode/releases)也提供插件`.tgz`、仅供预设导入的归档和`SHA256SUMS`。安装下载的归档前先核对散列;仅供预设导入的归档没有设置页。
60
86
 
61
- ## 兼容
87
+ 该命令仅适用于Web/CLI。桌面用户必须使用应用实际提供的更新路径;应用没有更新入口时,不要改用Web CLI命令或手改桌面profile文件。
62
88
 
63
- 声明范围:`>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0`
89
+ 源码开发按[隔离准备步骤](CONTRIBUTING.zh.md#隔离开发)进行。可选的`./install.sh --profile web`保留源码链接方式,已有提示词、元数据和组成不被覆盖。本地包/代码回滚与恢复路径见[包与发布资产](docs/PUBLISHING.zh.md#包与发布资产)。
64
90
 
65
- 2026-10-17 核对 npm:`latest` 是 `0.2.0-rc.2`,`alpha` 是 `0.2.1-alpha.5`,`next` 是 `0.2.1-rc.2`。上游尚未发布去掉预发布后缀的正式稳定版。
91
+ `./uninstall.sh` 移除插件但保留助手数据。`--purge` 明确删除受管助手目录及提示词,使用前请自行备份。
66
92
 
67
- | dsh | 通道 | 2.2.5 核对 |
68
- | --- | --- | --- |
69
- | `0.2.0-rc.2` | npm `latest` | 精确 npm 宿主、打包加载、API 生命周期、隔离 Linux Web profile 设置页与选择器 |
70
- | `0.2.1-alpha.5` | npm `alpha` | 同一套隔离检查,读取该宿主自己的预设声明 |
71
- | `0.2.1-rc.2` | npm `next` | 同一套隔离检查,读取该宿主自己的预设声明 |
72
- | `0.1.7-rc.2` | 先前声明支持的版本 | 保留在 CI 回归矩阵里 |
93
+ ## 兼容与版本
73
94
 
74
- 发布必须等待单元、启动和浏览器工作流通过。已有精确版本的宿主安装时,可以这样复现:
95
+ 声明的宿主范围:`>=0.1.5-rc.2 <0.2.0-0 || >=0.1.6-alpha.1 <0.2.0-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-0 <0.3.0-0 || >=0.2.1-alpha.1 <0.3.0-0 || >=0.2.2-alpha.2 <0.3.0-0`
75
96
 
76
- ```sh
77
- node tools/compat-check.mjs --host-install /path/to/host --out /tmp/custom-mode-check
78
- node tools/runtime-check.mjs --host-install /path/to/host --out /tmp/custom-mode-check --browser /path/to/chrome
79
- ```
97
+ 插件版本走独立的稳定 `x.y.z` 版本线,不镜像 DSH。2026-10-27 公开宿主标签为 `latest=0.2.1-rc.2`、`next=0.2.1-rc.4`、`alpha=0.2.2-alpha.2`。标签会移动,声明范围与已完成检查是两件事。实测范围见[精确版本、验收边界与历史证据](docs/CURRENT_COMPATIBILITY.zh.md)。
80
98
 
81
- 两项工具只使用新生成的 home 和普通 mock 提示词。运行检查覆盖全部五档基础模式、重复保存、卸载、重装、用户数据保留与重复安装,不需要调用模型。Windows/Electron 桌面端和真实模型或 GPU 执行尚未验证。详见[准确覆盖范围](docs/CURRENT_COMPATIBILITY.zh.md)。
99
+ 发布必须通过兼容性与浏览器工作流。单元、真实提示词组件、打包安装和浏览器检查分别覆盖不同边界。Windows/Electron、真实模型回复、GPU 执行都必须单独留证,不能从页面截图或单元计数推断。headless 不启动使用 agent preset 的会话。
82
100
 
83
101
  ## 插件市场
84
102
 
85
- `dshmarket`、DSH Plugin Hub(`dsh-plugin`)和 DSH Plugin Store(`dshmarketplace-plugin`)使用不同目录,但安装的是同一个 profile bundle。根 npm 清单提供 `dsh.bundle.patch`、浏览器导出、公开仓库和一致的兼容范围,不需要额外的运行时适配器或构建脚本。
86
-
87
- 运行 `node tools/market-check.mjs --out /tmp/custom-mode-markets.json` 检查它们的公开发现数据。目录不可访问、条目未审核或数据过期都会明确报告。工具不执行目录提供的 shell 命令,也不提交收录。[市场接口与限制](docs/MARKETPLACES.zh.md)。
103
+ 各目录的发现与审核规则不同。2026-10-09 的上架结果属于历史记录,不能据此保证今天每个市场都能搜索到。上面的固定版本安装仍是直接入口。[市场接口与限制](docs/MARKETPLACES.zh.md) 说明只读适配器;它不执行目录提供的 shell 命令,也不提交收录。
88
104
 
89
- ## 文档
105
+ ## 帮助与文档
90
106
 
91
- - [docs/TROUBLESHOOTING.zh.md](docs/TROUBLESHOOTING.zh.md) — 装到旧版、基础模式不可用、升级停在半截
92
- - [docs/ARCHITECTURE.zh.md](docs/ARCHITECTURE.zh.md) — 提示词在哪被读,依赖宿主的哪些调用
93
- - [docs/PUBLISHING.zh.md](docs/PUBLISHING.zh.md) — tag 与发布
94
- - [CONTRIBUTING.zh.md](CONTRIBUTING.zh.md) — 给人看
95
- - [AGENTS.md](AGENTS.md) — 给 agent 看
107
+ - [故障排查](docs/TROUBLESHOOTING.zh.md) — 当前自救在前,历史故障在后。
108
+ - [报告故障](https://github.com/BOWLUNA/dsh-custom-mode/issues/new?template=bug_report.yml)或[建议功能](https://github.com/BOWLUNA/dsh-custom-mode/issues/new?template=feature_request.yml)。
109
+ - [安全报告](SECURITY.zh.md) — 仅公开请求私下渠道,不发布漏洞细节。
110
+ - [发布版本](https://github.com/BOWLUNA/dsh-custom-mode/releases)与[变更记录](CHANGELOG.zh.md)。
111
+ - [贡献指南](CONTRIBUTING.zh.md) — 隔离开发与检查。
112
+ - [架构](docs/ARCHITECTURE.zh.md) — 提示词读取与宿主耦合点。
113
+ - [发布](docs/PUBLISHING.zh.md) — 既有发布门禁与读回证据。
114
+ - [AGENTS.md](AGENTS.md) — 仓库代理约定。
96
115
 
97
116
  ## 许可证
98
117
 
99
- MIT
118
+ [MIT](LICENSE)
package/assistants.mjs CHANGED
@@ -32,7 +32,7 @@ import { dshHome, PRESET_DIR } from './paths.mjs'
32
32
  // ReferenceError 被 try/catch 吞掉,回滚循环 continue 掉每一条 —— 用户看到的"已回滚"从未发生,
33
33
  // 磁盘上留下改了一半的 order。少一个导入就能让一整段安全网变成死代码(外部评审复现)。
34
34
  import { readPresetMeta, writePresetMeta, presetMetaPath } from './meta.mjs'
35
- import { writeAtomic } from './atomic.mjs'
35
+ import { restoreBackups, writeAtomic } from './atomic.mjs'
36
36
  import { unresolvableRows } from './composition.mjs'
37
37
  import { seedPreset, seedPresetWithLog, dropShippedDescription } from './seed.mjs'
38
38
 
@@ -100,8 +100,13 @@ export function markSeeded(root) {
100
100
  /** Whether `dir` is a directory this feature owns (see the module comment). */
101
101
  export function isManagedDir(dir) {
102
102
  if (typeof dir !== 'string' || dir === '') return false
103
+ // A crashed save can move prompt.md away. Recover before requiring that very file as proof.
104
+ // Keep a known reader-owned directory visible on an unresolved recovery; readState explains it and
105
+ // seedPreset refuses to fill missing user data with template content.
106
+ const readerPresent = existsSync(join(dir, 'prompt-reader.mjs'))
107
+ if (readerPresent && restoreBackups(dir).ok !== true) return true
103
108
  if (!existsSync(join(dir, 'prompt.md'))) return false
104
- if (existsSync(join(dir, 'prompt-reader.mjs'))) return true
109
+ if (readerPresent) return true
105
110
  // The reader is gone but the composition still injects it: still ours, and the
106
111
  // repair pass below can put the module back.
107
112
  try {
@@ -333,6 +338,7 @@ export function seedOnActivation({ root, templateDir, composition, log = console
333
338
  // 之后描述仍是旧的)。放在这个循环里,每次激活都会检查,且 `dropShippedDescription` 只认**逐字**
334
339
  // 等于我们自己写过的那些串,用户自己写的描述一个字都不会动。
335
340
  for (const dir of existing) {
341
+ if (restoreBackups(dir).ok !== true) continue
336
342
  try {
337
343
  if (dropShippedDescription(dir).migrated === true) {
338
344
  info(`custom-mode: 已清空 ${dir} 的描述 —— 它还是我们早年播种的那条中英拼接,壳无法按界面语言本地化产品数据`)