mirror of
https://github.com/yexi-by/dsh-unrestricted.git
synced 2026-11-27 10:20:22 +08:00
等待 HTTP 服务就绪再注册私有 RPC(v0.2.10)
This commit is contained in:
1 parent
c7afd4e03d
commit
ae6c7663fe
5 files changed
+36
-15
No files matched your search
+11
-4
@@ -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.
|
||||
|
||||
+11
-4
@@ -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 を再起動します。
|
||||
|
||||
@@ -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 桌面端。
|
||||
|
||||
+1
-1
@@ -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"
|
||||
},
|
||||
|
||||
+2
-2
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user