mirror of
https://github.com/yexi-by/dsh-unrestricted.git
synced 2026-11-28 02:30:22 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dfcb22b1b |
No files matched your search
+4
-4
@@ -94,10 +94,10 @@ The toggle state is saved in the profile's `cordis.patch.yml` and takes effect o
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Install on DSH Web
|
# Install on DSH Web
|
||||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
|
|
||||||
# Install on DSH Desktop
|
# Install on DSH Desktop
|
||||||
dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart `dsh web` or DSH Desktop after installing, then follow [Usage](#usage) to enable it.
|
Restart `dsh web` or DSH Desktop after installing, then follow [Usage](#usage) to enable it.
|
||||||
@@ -108,7 +108,7 @@ Use the update controls in DSH’s built-in plugin manager, or the CLI commands
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
dsh plugin --profile web remove dsh-unrestricted
|
dsh plugin --profile web remove dsh-unrestricted
|
||||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart `dsh web` or DSH Desktop.
|
Restart `dsh web` or DSH Desktop.
|
||||||
@@ -138,7 +138,7 @@ Make sure both switches are turned on after installation:
|
|||||||
|
|
||||||
The settings card also provides:
|
The settings card also provides:
|
||||||
|
|
||||||
- **Strip Host Brand Identity**: An independent option that removes `DeepSeek Harness` / `DSH` identity sections and Web GUI checkout context from assembled prompts to reduce upstream proxy client-fingerprinting blocks.
|
- **Strip Host Brand Identity**: An independent option that removes `DeepSeek Harness` / `DSH` identity sections and Web GUI checkout context from assembled prompts, preventing HTTP `429` client-fingerprinting blocks on third-party routes (applicable to Google Antigravity reverse proxies, Google AI Studio PG channels, etc.).
|
||||||
- **Mode Coverage & Prompt Preview**: Shows active status for Standard, PTC, Cordis, and Minimal modes, with expandable full-prompt preview and one-click copy.
|
- **Mode Coverage & Prompt Preview**: Shows active status for Standard, PTC, Cordis, and Minimal modes, with expandable full-prompt preview and one-click copy.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+4
-4
@@ -94,10 +94,10 @@ DSH のセクション名(`deployment:persona-prefix`、`plan:policy`、`tools
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# DSH Web へのインストール
|
# DSH Web へのインストール
|
||||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
|
|
||||||
# DSH Desktop へのインストール
|
# DSH Desktop へのインストール
|
||||||
dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
```
|
```
|
||||||
|
|
||||||
インストール後に `dsh web` または DSH Desktop を再起動し、下記の[使い方](#使い方)に従って有効化します。
|
インストール後に `dsh web` または DSH Desktop を再起動し、下記の[使い方](#使い方)に従って有効化します。
|
||||||
@@ -108,7 +108,7 @@ dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.12
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
dsh plugin --profile web remove dsh-unrestricted
|
dsh plugin --profile web remove dsh-unrestricted
|
||||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
```
|
```
|
||||||
|
|
||||||
更新後に `dsh web` または DSH Desktop を再起動します。
|
更新後に `dsh web` または DSH Desktop を再起動します。
|
||||||
@@ -138,7 +138,7 @@ dsh plugin --profile web add file:D:/work/dsh/plugin/unrestricted
|
|||||||
|
|
||||||
設定カードでは以下の項目も確認できます:
|
設定カードでは以下の項目も確認できます:
|
||||||
|
|
||||||
- **ホストブランド識別子の非表示**:破限スイッチとは独立して動作し、システムプロンプトおよび実行時コンテキストから `DeepSeek Harness` / `DSH` の識別セクションや Web GUI 開発パスを除去して、上流プロキシによるクライアント指紋判定を抑制します。
|
- **ホストブランド識別子の非表示**:破限スイッチとは独立して動作し、システムプロンプトおよび実行時コンテキストから `DeepSeek Harness` / `DSH` の識別セクションや Web GUI 開発パスを除去して、サードパーティ経路(Google Antigravity リバースプロキシや Google AI Studio PG チャネルなど)でクライアント指紋検知により `429` が返されるのを防ぎます。
|
||||||
- **モード状態とプロンプトプレビュー**:Standard、PTC、Cordis、Minimal の 4 モードの状態表示、完全なシステムプロンプトの展開プレビューおよびワンクリックコピー。
|
- **モード状態とプロンプトプレビュー**:Standard、PTC、Cordis、Minimal の 4 モードの状態表示、完全なシステムプロンプトの展開プレビューおよびワンクリックコピー。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -94,10 +94,10 @@ DSH 发起请求时会先组装全局系统提示词(System Prompt)。在普
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Web 端安装指定版本
|
# Web 端安装指定版本
|
||||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
|
|
||||||
# 桌面端安装指定版本(使用桌面端内置 CLI)
|
# 桌面端安装指定版本(使用桌面端内置 CLI)
|
||||||
& "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.12
|
& "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
```
|
```
|
||||||
|
|
||||||
安装后重启 `dsh web` 或 DSH 桌面端,按下方[使用说明](#使用说明)启用。
|
安装后重启 `dsh web` 或 DSH 桌面端,按下方[使用说明](#使用说明)启用。
|
||||||
@@ -108,7 +108,7 @@ dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.12
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
dsh plugin --profile web remove dsh-unrestricted
|
dsh plugin --profile web remove dsh-unrestricted
|
||||||
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.12
|
dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.13
|
||||||
```
|
```
|
||||||
|
|
||||||
更新后重启 `dsh web` 或 DSH 桌面端。
|
更新后重启 `dsh web` 或 DSH 桌面端。
|
||||||
@@ -138,7 +138,7 @@ dsh plugin --profile web add file:D:/work/dsh/plugin/unrestricted
|
|||||||
|
|
||||||
设置卡片中同时提供:
|
设置卡片中同时提供:
|
||||||
|
|
||||||
- **隐藏宿主品牌标识**:独立于破限主开关的去指纹选项,开启后自动移除系统提示词与运行时上下文中的 `DeepSeek Harness` / `DSH` 身份段落及开发界面路径,减少上游反代触发客户端特征检测。
|
- **隐藏宿主品牌标识**:独立于破限主开关的去指纹选项,开启后自动移除系统提示词与运行时上下文中的 `DeepSeek Harness` / `DSH` 身份段落及开发界面路径,避免第三方路由(适用于 Google Antigravity 反重力反代、Google AI Studio PG 渠道等)因客户端特征检测而返回 `429` 拦截。
|
||||||
- **模式覆盖与提示词预览**:显示 Standard、PTC、Cordis、Minimal 四种模式的生效状态,支持展开查看或一键复制各模式最终生成的完整系统提示词。
|
- **模式覆盖与提示词预览**:显示 Standard、PTC、Cordis、Minimal 四种模式的生效状态,支持展开查看或一键复制各模式最终生成的完整系统提示词。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Each DSH preset structures its prompt sections differently:
|
|||||||
During assembly, the plugin locates and fuses prompt sections by DSH's canonical section names (`deployment:persona-prefix`, `plan:policy`, `tools:ptc-only`, `tool:structured_output`) with idempotency guards, supporting both DSH Web and DSH Desktop without brittle exact-string or hash checks. Additional preset ids can be opted in via `extraPresets`; if a preset omits the persona section, it safely falls back to the stock prompt.
|
During assembly, the plugin locates and fuses prompt sections by DSH's canonical section names (`deployment:persona-prefix`, `plan:policy`, `tools:ptc-only`, `tool:structured_output`) with idempotency guards, supporting both DSH Web and DSH Desktop without brittle exact-string or hash checks. Additional preset ids can be opted in via `extraPresets`; if a preset omits the persona section, it safely falls back to the stock prompt.
|
||||||
|
|
||||||
### Host Brand Identity Stripping (Optional)
|
### Host Brand Identity Stripping (Optional)
|
||||||
When **Strip host brand identity** (`stripHostIdentity`) is enabled, the pipeline drops `harness:identity`, `harness:source`, and `app:web-surface` sections plus matching runtime contexts, and neutralizes residual `DeepSeek Harness` / `DSH` brand strings in retained sections (works independently of the main toggle).
|
When **Strip host brand identity** (`stripHostIdentity`) is enabled, the pipeline drops `harness:identity`, `harness:source`, and `app:web-surface` sections plus matching runtime contexts, and neutralizes residual `DeepSeek Harness` / `DSH` brand strings in retained sections (works independently of the main toggle; useful for avoiding HTTP `429` client-fingerprinting blocks on third-party routes such as Google Antigravity reverse proxies and Google AI Studio PG channels).
|
||||||
|
|
||||||
### Prompt preview
|
### Prompt preview
|
||||||
The settings UI queries an RPC endpoint to assemble live baseline previews of the full system prompt, line count, and byte size for each mode (reflecting the strip-identity toggle). Version checks and installation use DSH’s built-in plugin manager.
|
The settings UI queries an RPC endpoint to assemble live baseline previews of the full system prompt, line count, and byte size for each mode (reflecting the strip-identity toggle). Version checks and installation use DSH’s built-in plugin manager.
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ DSH の各実行モードに応じてプロンプトセクションを処理し
|
|||||||
組み立て時には DSH の標準セクション名(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)に基づいて冪等に融合を行うため、文面のハッシュ照合に依存せず DSH Web と DSH Desktop の双方で安定して動作します。`extraPresets` 設定で追加のプリセット名にも対応し、ペルソナセクションがない場合は自動的に標準プロンプトへフォールバックします。
|
組み立て時には DSH の標準セクション名(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)に基づいて冪等に融合を行うため、文面のハッシュ照合に依存せず DSH Web と DSH Desktop の双方で安定して動作します。`extraPresets` 設定で追加のプリセット名にも対応し、ペルソナセクションがない場合は自動的に標準プロンプトへフォールバックします。
|
||||||
|
|
||||||
### ホストブランド識別子の除去(オプション)
|
### ホストブランド識別子の除去(オプション)
|
||||||
**ホストブランド識別子の非表示**(`stripHostIdentity`)を有効にすると、`harness:identity`・`harness:source`・`app:web-surface` セクションおよび対応する実行時コンテキストを除去し、残存セクション内の `DeepSeek Harness` / `DSH` 表記を中立的な表現へ置換します(メインスイッチとは独立して動作します)。
|
**ホストブランド識別子の非表示**(`stripHostIdentity`)を有効にすると、`harness:identity`・`harness:source`・`app:web-surface` セクションおよび対応する実行時コンテキストを除去し、残存セクション内の `DeepSeek Harness` / `DSH` 表記を中立的な表現へ置換します(メインスイッチとは独立して動作し、Google Antigravity リバースプロキシや Google AI Studio PG チャネルなどのサードパーティ経路における `429` クライアント検知の回避に適しています)。
|
||||||
|
|
||||||
### プロンプトプレビュー
|
### プロンプトプレビュー
|
||||||
設定画面から RPC エンドポイントを通じて各モードのシステムプロンプト全文、総行数、サイズを基準スコープから都度プレビューできます(識別子除去スイッチも反映されます)。バージョン確認とインストールには DSH 標準のプラグイン管理画面を使用します。
|
設定画面から RPC エンドポイントを通じて各モードのシステムプロンプト全文、総行数、サイズを基準スコープから都度プレビューできます(識別子除去スイッチも反映されます)。バージョン確認とインストールには DSH 標準のプラグイン管理画面を使用します。
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ DSH 不同运行模式下的提示词分块结构不同,插件分别处理如
|
|||||||
每次组装时,插件按 DSH 官方系统提示词的结构化段落名称(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)进行定位与幂等融合,不依赖脆弱的逐字文本比对或哈希校验,同时兼容 DSH Web 与 DSH 桌面端。可通过 `extraPresets` 配置扩展预设名称支持动态按结构融合;若目标预设不包含角色设定段落,则自动保留官方原版提示词并在设置界面提示。
|
每次组装时,插件按 DSH 官方系统提示词的结构化段落名称(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)进行定位与幂等融合,不依赖脆弱的逐字文本比对或哈希校验,同时兼容 DSH Web 与 DSH 桌面端。可通过 `extraPresets` 配置扩展预设名称支持动态按结构融合;若目标预设不包含角色设定段落,则自动保留官方原版提示词并在设置界面提示。
|
||||||
|
|
||||||
### 宿主品牌标识剥离(可选)
|
### 宿主品牌标识剥离(可选)
|
||||||
启用「隐藏宿主品牌标识(`stripHostIdentity`)」后,流水线会移除 `harness:identity`、`harness:source`、`app:web-surface` 分块以及对应运行时上下文,并将残留分块中的 `DeepSeek Harness`、`DSH` 等宿主品牌字眼替换为中性表述(可独立于破限主开关生效)。
|
启用「隐藏宿主品牌标识(`stripHostIdentity`)」后,流水线会移除 `harness:identity`、`harness:source`、`app:web-surface` 分块以及对应运行时上下文,并将残留分块中的 `DeepSeek Harness`、`DSH` 等宿主品牌字眼替换为中性表述(可独立于破限主开关生效,适用于避免 Google Antigravity 反重力反代、Google AI Studio PG 渠道等第三方路由触发客户端指纹检测返回 `429`)。
|
||||||
|
|
||||||
### 提示词预览
|
### 提示词预览
|
||||||
前端设置卡片通过 RPC 接口实时按基准作用域生成各运行模式组装后的完整系统提示词、总行数与体积预览(并同步反映去标识开关状态)。版本检查和安装统一使用 DSH 原生插件管理页。
|
前端设置卡片通过 RPC 接口实时按基准作用域生成各运行模式组装后的完整系统提示词、总行数与体积预览(并同步反映去标识开关状态)。版本检查和安装统一使用 DSH 原生插件管理页。
|
||||||
|
|||||||
+2
-2
@@ -202,7 +202,7 @@ window.__ModuleLoader__.load({
|
|||||||
toggle: "启用破限模式",
|
toggle: "启用破限模式",
|
||||||
stripHostBadge: "已隐去宿主标识",
|
stripHostBadge: "已隐去宿主标识",
|
||||||
stripHostTitle: "隐藏宿主品牌标识",
|
stripHostTitle: "隐藏宿主品牌标识",
|
||||||
stripHostDesc: "移除系统提示词与运行时上下文中的 DeepSeek Harness / DSH 身份段落及开发界面路径,降低上游反代客户端指纹拦截概率(可独立于破限开关生效)。",
|
stripHostDesc: "移除系统提示词与运行时上下文中的 DeepSeek Harness / DSH 身份段落及开发界面路径,避免第三方路由(适用于 Google Antigravity 反重力反代、Google AI Studio PG 渠道等)因检测到客户端特征而返回 429 拦截(可独立于破限开关生效)。",
|
||||||
scopeNote: "仅作用于由 DSH 组装的系统提示词;模型平台或外部网关的远端策略不在本插件覆盖范围内。",
|
scopeNote: "仅作用于由 DSH 组装的系统提示词;模型平台或外部网关的远端策略不在本插件覆盖范围内。",
|
||||||
statusTitle: "模式覆盖与提示词预览",
|
statusTitle: "模式覆盖与提示词预览",
|
||||||
statusSubtitle: "覆盖全部 4 种预设及委派子代理,可随时展开核对或复制融合后的完整提示词。",
|
statusSubtitle: "覆盖全部 4 种预设及委派子代理,可随时展开核对或复制融合后的完整提示词。",
|
||||||
@@ -253,7 +253,7 @@ window.__ModuleLoader__.load({
|
|||||||
toggle: "Enable unrestricted mode",
|
toggle: "Enable unrestricted mode",
|
||||||
stripHostBadge: "Host identity stripped",
|
stripHostBadge: "Host identity stripped",
|
||||||
stripHostTitle: "Strip host brand identity",
|
stripHostTitle: "Strip host brand identity",
|
||||||
stripHostDesc: "Remove DeepSeek Harness / DSH identity sections and Web GUI checkout context from assembled prompts to reduce upstream proxy client-fingerprinting blocks (works independently of the main toggle).",
|
stripHostDesc: "Remove DeepSeek Harness / DSH identity sections and Web GUI checkout context from assembled prompts to prevent HTTP 429 client-fingerprinting blocks on third-party routes such as Google Antigravity proxies and Google AI Studio PG channels (works independently of the main toggle).",
|
||||||
scopeNote: "Applies only to system prompts assembled by DSH; upstream model provider policies outside the prompt are out of scope.",
|
scopeNote: "Applies only to system prompts assembled by DSH; upstream model provider policies outside the prompt are out of scope.",
|
||||||
statusTitle: "Mode Coverage & Prompt Preview",
|
statusTitle: "Mode Coverage & Prompt Preview",
|
||||||
statusSubtitle: "Covers all 4 built-in presets and delegated subagents. Expand any mode to inspect or copy the full fused prompt.",
|
statusSubtitle: "Covers all 4 built-in presets and delegated subagents. Expand any mode to inspect or copy the full fused prompt.",
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"client.js","names":["useState","writeClipboard","Tag","Switch","Button","StateDot","fileSizeText"],"sources":["../src/client/controller.ts","../src/client/locales.ts","../src/client/styles.ts","../src/client/UnrestrictedCard.tsx","../src/client/index.tsx"],"sourcesContent":["/**\n * Browser-half controller for the unrestricted card: binds the `unrestricted`\n * settings namespace (the toggle) and reads per-preset state and previews.\n */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { ConnectionHandle } from '@deepseek-ai/dsh-client-connection/client'\n// Type-only: the ctx.remote Context merge and the forwarded-event key face.\nimport type {} from '@deepseek-ai/dsh-api-remotes/client'\n// Type-only: the ctx.configForms Context merge.\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\n\n/** The toggle section stored in the `unrestricted` settings namespace. */\nexport interface UnrestrictedSettings {\n enabled?: boolean\n stripHostIdentity?: boolean\n}\n\n/** Per-preset fusion state reported by the host half. */\nexport interface UnrestrictedModeState {\n state: 'off' | 'active' | 'failed'\n issues: string[]\n}\n\n/** Host status endpoint payload. */\nexport interface UnrestrictedStatus {\n enabled: boolean\n stripHostIdentity?: boolean\n /** Current plugin version reported by the host half. */\n version?: string\n modes: Record<string, UnrestrictedModeState>\n}\n\n/** Deploy preview for one preset: what switching on would actually assemble. */\nexport interface UnrestrictedPreview {\n presetId: string\n available: boolean\n /** `live` = bytes a live agent received; `standing` = preset scope, no agent bound. */\n source?: 'live' | 'standing'\n /** Fused prompt text; present when available. */\n text?: string\n bytes?: number\n lines?: number\n /** Structured error code when unavailable. */\n errorCode?: string\n /** Diagnostic reason when unavailable. */\n reason?: string\n}\n\n/** One fetched preview, keyed by preset, plus its in-flight/error state. */\nexport interface UnrestrictedPreviewEntry {\n status: 'loading' | 'ready' | 'failed'\n preview?: UnrestrictedPreview\n errorCode?: string\n message?: string\n}\n\n/** Full view snapshot the card subscribes to. */\nexport interface UnrestrictedViewSnapshot {\n /** Persisted toggle; false until the settings scope first syncs. */\n enabled: boolean\n /** Persisted host-brand stripping toggle; false until synced. */\n stripHostIdentity: boolean\n /** Whether the Host document accepts writes. */\n writable: boolean\n /** Settings scope sync state. */\n settingsStatus: 'loading' | 'ready' | 'unavailable'\n /** Live host status; null until the first RPC answer. */\n status: UnrestrictedStatus | null\n /** presetId -> fetched deploy preview. */\n previews: Record<string, UnrestrictedPreviewEntry>\n /** Whether a settings write or status refresh is in flight. */\n busy: boolean\n /** Last transport/business failure, if any. */\n message?: string\n}\n\n/** Minimal RPC wire shape (structural copy of the host RpcResult). */\ntype RpcResult<T> = { ok: true; value: T } | { ok: false; error: { code: string; message: string } }\n\n/** Minimal observable contract consumed by the slot renderer's hook binding. */\nexport interface UnrestrictedViewSource {\n getSnapshot(): UnrestrictedViewSnapshot\n subscribe(listener: () => void): () => void\n}\n\n/** Inject face handed to the card at registration. */\nexport interface UnrestrictedCardInjected {\n hooks: {\n /** Reactive card view. */\n view: UnrestrictedViewSource\n }\n /** Persist the toggle. */\n setEnabled: (enabled: boolean) => Promise<void>\n /** Persist whether host identity branding is stripped from prompts. */\n setStripHostIdentity: (strip: boolean) => Promise<void>\n /** Re-validate runtime state and refresh. */\n recheck: () => Promise<void>\n /** Re-read host status and invalidate cached previews. */\n refresh: () => Promise<void>\n /** Fetch the exact fused prompt this preset would deploy. */\n loadPreview: (presetId: string) => Promise<void>\n}\n\nconst RPC_CHANNEL = '/api'\nconst RPC_NAMESPACE = 'dsh-unrestricted'\nconst SETTINGS_NS = 'unrestricted'\n\n/** Human-readable error text for the banner. */\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error)\n}\n\n/**\n * Create the card controller bound to the calling plugin's context.\n * @param ctx - the browser plugin context (connection + remote + configForms injected).\n * @returns the controller whose face() feeds the slot inject share.\n */\nexport function createUnrestrictedController(ctx: Context) {\n const connection = ctx.get('connection') as ConnectionHandle\n const settings = ctx.configForms.get<UnrestrictedSettings>(SETTINGS_NS)\n\n let snapshot: UnrestrictedViewSnapshot = {\n enabled: false,\n stripHostIdentity: false,\n writable: false,\n settingsStatus: 'loadinLine truncated
|
{"version":3,"file":"client.js","names":["useState","writeClipboard","Tag","Switch","Button","StateDot","fileSizeText"],"sources":["../src/client/controller.ts","../src/client/locales.ts","../src/client/styles.ts","../src/client/UnrestrictedCard.tsx","../src/client/index.tsx"],"sourcesContent":["/**\n * Browser-half controller for the unrestricted card: binds the `unrestricted`\n * settings namespace (the toggle) and reads per-preset state and previews.\n */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type { ConnectionHandle } from '@deepseek-ai/dsh-client-connection/client'\n// Type-only: the ctx.remote Context merge and the forwarded-event key face.\nimport type {} from '@deepseek-ai/dsh-api-remotes/client'\n// Type-only: the ctx.configForms Context merge.\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\n\n/** The toggle section stored in the `unrestricted` settings namespace. */\nexport interface UnrestrictedSettings {\n enabled?: boolean\n stripHostIdentity?: boolean\n}\n\n/** Per-preset fusion state reported by the host half. */\nexport interface UnrestrictedModeState {\n state: 'off' | 'active' | 'failed'\n issues: string[]\n}\n\n/** Host status endpoint payload. */\nexport interface UnrestrictedStatus {\n enabled: boolean\n stripHostIdentity?: boolean\n /** Current plugin version reported by the host half. */\n version?: string\n modes: Record<string, UnrestrictedModeState>\n}\n\n/** Deploy preview for one preset: what switching on would actually assemble. */\nexport interface UnrestrictedPreview {\n presetId: string\n available: boolean\n /** `live` = bytes a live agent received; `standing` = preset scope, no agent bound. */\n source?: 'live' | 'standing'\n /** Fused prompt text; present when available. */\n text?: string\n bytes?: number\n lines?: number\n /** Structured error code when unavailable. */\n errorCode?: string\n /** Diagnostic reason when unavailable. */\n reason?: string\n}\n\n/** One fetched preview, keyed by preset, plus its in-flight/error state. */\nexport interface UnrestrictedPreviewEntry {\n status: 'loading' | 'ready' | 'failed'\n preview?: UnrestrictedPreview\n errorCode?: string\n message?: string\n}\n\n/** Full view snapshot the card subscribes to. */\nexport interface UnrestrictedViewSnapshot {\n /** Persisted toggle; false until the settings scope first syncs. */\n enabled: boolean\n /** Persisted host-brand stripping toggle; false until synced. */\n stripHostIdentity: boolean\n /** Whether the Host document accepts writes. */\n writable: boolean\n /** Settings scope sync state. */\n settingsStatus: 'loading' | 'ready' | 'unavailable'\n /** Live host status; null until the first RPC answer. */\n status: UnrestrictedStatus | null\n /** presetId -> fetched deploy preview. */\n previews: Record<string, UnrestrictedPreviewEntry>\n /** Whether a settings write or status refresh is in flight. */\n busy: boolean\n /** Last transport/business failure, if any. */\n message?: string\n}\n\n/** Minimal RPC wire shape (structural copy of the host RpcResult). */\ntype RpcResult<T> = { ok: true; value: T } | { ok: false; error: { code: string; message: string } }\n\n/** Minimal observable contract consumed by the slot renderer's hook binding. */\nexport interface UnrestrictedViewSource {\n getSnapshot(): UnrestrictedViewSnapshot\n subscribe(listener: () => void): () => void\n}\n\n/** Inject face handed to the card at registration. */\nexport interface UnrestrictedCardInjected {\n hooks: {\n /** Reactive card view. */\n view: UnrestrictedViewSource\n }\n /** Persist the toggle. */\n setEnabled: (enabled: boolean) => Promise<void>\n /** Persist whether host identity branding is stripped from prompts. */\n setStripHostIdentity: (strip: boolean) => Promise<void>\n /** Re-validate runtime state and refresh. */\n recheck: () => Promise<void>\n /** Re-read host status and invalidate cached previews. */\n refresh: () => Promise<void>\n /** Fetch the exact fused prompt this preset would deploy. */\n loadPreview: (presetId: string) => Promise<void>\n}\n\nconst RPC_CHANNEL = '/api'\nconst RPC_NAMESPACE = 'dsh-unrestricted'\nconst SETTINGS_NS = 'unrestricted'\n\n/** Human-readable error text for the banner. */\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error)\n}\n\n/**\n * Create the card controller bound to the calling plugin's context.\n * @param ctx - the browser plugin context (connection + remote + configForms injected).\n * @returns the controller whose face() feeds the slot inject share.\n */\nexport function createUnrestrictedController(ctx: Context) {\n const connection = ctx.get('connection') as ConnectionHandle\n const settings = ctx.configForms.get<UnrestrictedSettings>(SETTINGS_NS)\n\n let snapshot: UnrestrictedViewSnapshot = {\n enabled: false,\n stripHostIdentity: false,\n writable: false,\n settingsStatus: 'loadinLine truncated
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dsh-unrestricted",
|
"name": "dsh-unrestricted",
|
||||||
"version": "0.2.12",
|
"version": "0.2.13",
|
||||||
"engines": {
|
"engines": {
|
||||||
"dsh": ">=0.2.0-rc.2 <0.2.3-0"
|
"dsh": ">=0.2.0-rc.2 <0.2.3-0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const zh = {
|
|||||||
toggle: '启用破限模式',
|
toggle: '启用破限模式',
|
||||||
stripHostBadge: '已隐去宿主标识',
|
stripHostBadge: '已隐去宿主标识',
|
||||||
stripHostTitle: '隐藏宿主品牌标识',
|
stripHostTitle: '隐藏宿主品牌标识',
|
||||||
stripHostDesc: '移除系统提示词与运行时上下文中的 DeepSeek Harness / DSH 身份段落及开发界面路径,降低上游反代客户端指纹拦截概率(可独立于破限开关生效)。',
|
stripHostDesc: '移除系统提示词与运行时上下文中的 DeepSeek Harness / DSH 身份段落及开发界面路径,避免第三方路由(适用于 Google Antigravity 反重力反代、Google AI Studio PG 渠道等)因检测到客户端特征而返回 429 拦截(可独立于破限开关生效)。',
|
||||||
scopeNote: '仅作用于由 DSH 组装的系统提示词;模型平台或外部网关的远端策略不在本插件覆盖范围内。',
|
scopeNote: '仅作用于由 DSH 组装的系统提示词;模型平台或外部网关的远端策略不在本插件覆盖范围内。',
|
||||||
statusTitle: '模式覆盖与提示词预览',
|
statusTitle: '模式覆盖与提示词预览',
|
||||||
statusSubtitle: '覆盖全部 4 种预设及委派子代理,可随时展开核对或复制融合后的完整提示词。',
|
statusSubtitle: '覆盖全部 4 种预设及委派子代理,可随时展开核对或复制融合后的完整提示词。',
|
||||||
@@ -67,7 +67,7 @@ export const en = {
|
|||||||
toggle: 'Enable unrestricted mode',
|
toggle: 'Enable unrestricted mode',
|
||||||
stripHostBadge: 'Host identity stripped',
|
stripHostBadge: 'Host identity stripped',
|
||||||
stripHostTitle: 'Strip host brand identity',
|
stripHostTitle: 'Strip host brand identity',
|
||||||
stripHostDesc: 'Remove DeepSeek Harness / DSH identity sections and Web GUI checkout context from assembled prompts to reduce upstream proxy client-fingerprinting blocks (works independently of the main toggle).',
|
stripHostDesc: 'Remove DeepSeek Harness / DSH identity sections and Web GUI checkout context from assembled prompts to prevent HTTP 429 client-fingerprinting blocks on third-party routes such as Google Antigravity proxies and Google AI Studio PG channels (works independently of the main toggle).',
|
||||||
scopeNote: 'Applies only to system prompts assembled by DSH; upstream model provider policies outside the prompt are out of scope.',
|
scopeNote: 'Applies only to system prompts assembled by DSH; upstream model provider policies outside the prompt are out of scope.',
|
||||||
statusTitle: 'Mode Coverage & Prompt Preview',
|
statusTitle: 'Mode Coverage & Prompt Preview',
|
||||||
statusSubtitle: 'Covers all 4 built-in presets and delegated subagents. Expand any mode to inspect or copy the full fused prompt.',
|
statusSubtitle: 'Covers all 4 built-in presets and delegated subagents. Expand any mode to inspect or copy the full fused prompt.',
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ import { registerRpcRoutes } from './rpc.js'
|
|||||||
export const name = 'dsh-unrestricted'
|
export const name = 'dsh-unrestricted'
|
||||||
|
|
||||||
/** Current plugin package version. */
|
/** Current plugin package version. */
|
||||||
export const PLUGIN_VERSION = '0.2.12'
|
export const PLUGIN_VERSION = '0.2.13'
|
||||||
|
|
||||||
/** Services required by this plugin (all base-backed profiles provide these). */
|
/** Services required by this plugin (all base-backed profiles provide these). */
|
||||||
export const inject = ['settings', 'systemPrompt', 'loader']
|
export const inject = ['settings', 'systemPrompt', 'loader']
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ try {
|
|||||||
check('shared /api status RPC returns 200 ok with current version',
|
check('shared /api status RPC returns 200 ok with current version',
|
||||||
rpcStatus.status === 200
|
rpcStatus.status === 200
|
||||||
&& rpcStatus.body?.result?.ok === true
|
&& rpcStatus.body?.result?.ok === true
|
||||||
&& rpcStatus.body.result.value?.version === '0.2.12'
|
&& rpcStatus.body.result.value?.version === '0.2.13'
|
||||||
&& rpcStatus.body.result.value?.enabled === true)
|
&& rpcStatus.body.result.value?.enabled === true)
|
||||||
const rpcPreview = await callSharedRpc('preview', { presetId: 'standard' })
|
const rpcPreview = await callSharedRpc('preview', { presetId: 'standard' })
|
||||||
check('shared /api preview RPC returns 200 ok with fused prompt',
|
check('shared /api preview RPC returns 200 ok with fused prompt',
|
||||||
|
|||||||
Reference in new issue
Block a user