From ae6c7663fe24d4fbf9e5cac76e6ce0cedc6e01d7 Mon Sep 17 00:00:00 2001 From: yexi Date: Sun, 15 Nov 2026 19:58:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=89=E5=BE=85=20HTTP=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=B0=B1=E7=BB=AA=E5=86=8D=E6=B3=A8=E5=86=8C=E7=A7=81=E6=9C=89?= =?UTF-8?q?=20RPC=EF=BC=88v0.2.10=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 15 +++++++++++---- README.ja.md | 15 +++++++++++---- README.md | 15 +++++++++++---- package.json | 2 +- src/node.js | 4 ++-- 5 files changed, 36 insertions(+), 15 deletions(-) diff --git a/README.en.md b/README.en.md index 6f83e49..329b694 100644 --- a/README.en.md +++ b/README.en.md @@ -82,7 +82,7 @@ The plugin handles each DSH execution preset according to its prompt structure: ### Structural Fusion & Fallback -The plugin fuses sections structurally by DSH's canonical section names (`deployment:persona-prefix`, `plan:policy`, `tools:ptc-only`, `tool:structured_output`) with idempotency guards, supporting both the latest DSH Web (`0.2.2-rc.1`) and DSH Desktop (`0.2.1-rc.5`) without brittle exact-string hash checks. If a custom preset omits the persona section, it safely falls back to the stock prompt. +The plugin fuses sections structurally by DSH's canonical section names (`deployment:persona-prefix`, `plan:policy`, `tools:ptc-only`, `tool:structured_output`) with idempotency guards, supporting both the latest DSH Web (`0.2.2-rc.3`) and DSH Desktop (`0.2.1-rc.5`) without brittle exact-string hash checks. If a custom preset omits the persona section, it safely falls back to the stock prompt. ### Instant Toggle @@ -92,12 +92,19 @@ The toggle state is saved in the profile's `cordis.patch.yml` and takes effect o ## Installation & Updates +For Desktop `0.2.1-rc.5` or the official `dsh-v0.2.2-rc.3` tag, add these dependencies to the `connection` entry in the profile’s `cordis.patch.yml`, preserving any existing configuration. + +```yaml +- id: connection + inject: [webStartup, webServer] +``` + ```sh # Install on DSH Web -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.10 # Install on DSH Desktop -dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.10 ``` Restart `dsh web` or DSH Desktop after installing, then follow [Usage](#usage) to enable it. @@ -108,7 +115,7 @@ Use the update controls in DSH’s built-in plugin manager, or the CLI commands ```sh dsh plugin --profile web remove dsh-unrestricted -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.10 ``` Restart `dsh web` or DSH Desktop. diff --git a/README.ja.md b/README.ja.md index afcf09d..421f08e 100644 --- a/README.ja.md +++ b/README.ja.md @@ -82,7 +82,7 @@ DSH の各実行モードに合わせてプロンプトセクションを処理 ### 構造化融合とフォールバック -DSH のセクション名(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)に基づいて構造的かつ冪等に融合を行うため、最新の DSH Web(`0.2.2-rc.1`)および DSH Desktop(`0.2.1-rc.5`)の双方で安定して動作します。ペルソナセクションが存在しない場合は自動的に標準プロンプトへフォールバックします。 +DSH のセクション名(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)に基づいて構造的かつ冪等に融合を行うため、最新の DSH Web(`0.2.2-rc.3`)および DSH Desktop(`0.2.1-rc.5`)の双方で安定して動作します。ペルソナセクションが存在しない場合は自動的に標準プロンプトへフォールバックします。 ### 即時切り替え @@ -92,12 +92,19 @@ DSH のセクション名(`deployment:persona-prefix`、`plan:policy`、`tools ## インストールと更新 +Desktop `0.2.1-rc.5` または公式タグ `dsh-v0.2.2-rc.3` を使う場合は、対象プロファイルの `cordis.patch.yml` にある `connection` 行の既存設定を保持し、次の依存関係を追加してください。 + +```yaml +- id: connection + inject: [webStartup, webServer] +``` + ```sh # DSH Web へのインストール -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.10 # DSH Desktop へのインストール -dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.10 ``` インストール後に `dsh web` または DSH Desktop を再起動し、下記の[使い方](#使い方)に従って有効化します。 @@ -108,7 +115,7 @@ dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.8 ```sh dsh plugin --profile web remove dsh-unrestricted -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.10 ``` 更新後に `dsh web` または DSH Desktop を再起動します。 diff --git a/README.md b/README.md index bc6fb93..67ceacd 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ DSH 发起请求时会先组装全局系统提示词(System Prompt)。在普 ### 结构化融合与安全回退 -插件按 DSH 官方提示词的结构化段落名称(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)进行幂等融合,不依赖脆弱的逐字文案哈希校验,兼容最新 DSH Web(`0.2.2-rc.1`)与 DSH Desktop(`0.2.1-rc.5`)。如果自定义模式缺少角色设定段落,对应模式会自动保留原版提示词并在设置页友好提示。 +插件按 DSH 官方提示词的结构化段落名称(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)进行幂等融合,不依赖脆弱的逐字文案哈希校验,兼容最新 DSH Web(`0.2.2-rc.3`)与 DSH Desktop(`0.2.1-rc.5`)。如果自定义模式缺少角色设定段落,对应模式会自动保留原版提示词并在设置页友好提示。 ### 即时开关 @@ -92,12 +92,19 @@ DSH 发起请求时会先组装全局系统提示词(System Prompt)。在普 ## 安装与更新 +使用 Desktop `0.2.1-rc.5` 或官方发布 tag `dsh-v0.2.2-rc.3` 时,请在对应 profile 的 `cordis.patch.yml` 给 `connection` 行补充以下依赖,已有配置保留在同一行。 + +```yaml +- id: connection + inject: [webStartup, webServer] +``` + ```sh # Web 端安装指定版本 -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.10 # 桌面端安装指定版本(使用桌面端内置 CLI) -"& '$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.8" +& "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.10 ``` 安装后重启 `dsh web` 或 DSH 桌面端,按下方[使用说明](#使用说明)启用。 @@ -108,7 +115,7 @@ dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.8 ```sh dsh plugin --profile web remove dsh-unrestricted -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.8 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.10 ``` 更新后重启 `dsh web` 或 DSH 桌面端。 diff --git a/package.json b/package.json index e355c74..395b9f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsh-unrestricted", - "version": "0.2.9", + "version": "0.2.10", "engines": { "dsh": ">=0.2.0-rc.2 <0.2.3-0" }, diff --git a/src/node.js b/src/node.js index 085516a..50015de 100644 --- a/src/node.js +++ b/src/node.js @@ -37,7 +37,7 @@ import { export const name = 'dsh-unrestricted' /** Current plugin package version. */ -export const PLUGIN_VERSION = '0.2.9' +export const PLUGIN_VERSION = '0.2.10' /** Services required by this plugin (all base-backed profiles provide these). */ export const inject = ['settings', 'systemPrompt', 'loader'] @@ -421,7 +421,7 @@ export function apply(ctx, config) { }, 'dsh-unrestricted: toggle lifecycle') // Web/Desktop 状态通道由官方 Connection 认证;headless 组合无需提供 connection 服务。 - ctx.inject(['connection'], (connectionCtx) => { + ctx.inject(['connection', 'webServer'], (connectionCtx) => { const disposeRpc = connectionCtx.connection.rpc.handle(RPC_CHANNEL, handleRpc) return async () => { await disposeRpc()