diff --git a/README.en.md b/README.en.md index 554f5f8..6074e88 100644 --- a/README.en.md +++ b/README.en.md @@ -14,7 +14,7 @@ A single toggle enables or disables the rules without altering DSH's UI layout, - [How It Works](#how-it-works) - [System Prompt Injection](#system-prompt-injection) - [Mode Adaptation](#mode-adaptation) - - [Anchor Check & Fallback](#anchor-check--fallback) + - [Structural Fusion & Fallback](#structural-fusion--fallback) - [Instant Toggle](#instant-toggle) - [Installation & Updates](#installation--updates) - [Local Source Install](#local-source-install) @@ -80,9 +80,9 @@ The plugin handles each DSH execution preset according to its prompt structure: - **Minimal Mode**: Injects rules within the active agent scope while preserving custom subagent personas and `structured_output` instructions. - **Subagents**: Background subagents and structured output tasks inherit the current toggle state. -### Anchor Check & Fallback +### Structural Fusion & Fallback -Before each assembly, the plugin checks expected anchor strings in the stock prompt (see `ANCHORS` in `src/rules.js`), including persona openings, Plan Mode policies, and `run_code` descriptions. If an upstream DSH update changes those strings and a check fails, that mode falls back to the stock prompt and reports the failed anchor in the settings panel. +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-alpha.2`) 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 @@ -93,23 +93,25 @@ The toggle state is saved in the profile's `cordis.patch.yml` and takes effect o ## Installation & Updates ```sh -# Install a specific release -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.5 +# Install on DSH Web +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.6 -# Or track master -dsh plugin --profile web add github:yexi-by/dsh-unrestricted +# Install on DSH Desktop +dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.6 ``` -Restart `dsh web` after installing, then follow [Usage](#usage) to enable it. +Restart `dsh web` or DSH Desktop after installing, then follow [Usage](#usage) to enable it. #### Update +You can check and install updates directly from the **Version & Updates** card inside **Plugins → dsh-unrestricted**, or update via CLI: + ```sh dsh plugin --profile web remove dsh-unrestricted -dsh plugin --profile web add github:yexi-by/dsh-unrestricted# +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.6 ``` -Restart `dsh web`. +Restart `dsh web` or DSH Desktop. #### Uninstall @@ -136,9 +138,8 @@ Make sure both switches are turned on after installation: The settings card also provides: -- **Mode Status**: Shows anchor check and injection status for Standard, PTC, Cordis, and Minimal modes. -- **Rule Fingerprint**: First 16 hex characters of the rule text's SHA-256 hash. -- **Prompt Preview**: Expands the full assembled system prompt, line count, and byte size for each mode. +- **Mode Coverage & Prompt Preview**: Shows active status for Standard, PTC, Cordis, and Minimal modes, with expandable full-prompt preview and one-click copy. +- **Version & Updates**: Automatically checks GitHub Releases for new versions, displays an update badge in the plugin detail header, and supports one-click self-update. --- diff --git a/README.ja.md b/README.ja.md index c111206..106d4b5 100644 --- a/README.ja.md +++ b/README.ja.md @@ -14,7 +14,7 @@ - [仕組み](#仕組み) - [システムプロンプト注入](#システムプロンプト注入) - [各実行モードへの対応](#各実行モードへの対応) - - [アンカー検証とフォールバック](#アンカー検証とフォールバック) + - [構造化融合とフォールバック](#構造化融合とフォールバック) - [即時切り替え](#即時切り替え) - [インストールと更新](#インストールと更新) - [ローカルソースインストール](#ローカルソースインストール) @@ -80,9 +80,9 @@ DSH の各実行モードに合わせてプロンプトセクションを処理 - **Minimal モード**:現在のエージェントスコープ内でルールを注入し、サブエージェントのカスタムペルソナと構造化出力(`structured_output`)の指示を保持します。 - **サブエージェント**:バックグラウンドのサブエージェントと構造化出力タスクも現在のスイッチ状態を引き継ぎます。 -### アンカー検証とフォールバック +### 構造化融合とフォールバック -組み立てのたびに、公式プロンプト内のアンカー文字列(`src/rules.js` の `ANCHORS`:ペルソナ冒頭、Plan モードポリシー、`run_code` の説明文)を照合します。DSH の更新で文面が変わり一致しなかった場合、そのモードは公式プロンプトへフォールバックし、設定画面に未通過項目を表示します。 +DSH のセクション名(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)に基づいて構造的かつ冪等に融合を行うため、最新の DSH Web(`0.2.2-alpha.2`)および DSH Desktop(`0.2.1-rc.5`)の双方で安定して動作します。ペルソナセクションが存在しない場合は自動的に標準プロンプトへフォールバックします。 ### 即時切り替え @@ -93,23 +93,25 @@ DSH の各実行モードに合わせてプロンプトセクションを処理 ## インストールと更新 ```sh -# 指定バージョンのインストール -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.5 +# DSH Web へのインストール +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.6 -# または master 最新コードのインストール -dsh plugin --profile web add github:yexi-by/dsh-unrestricted +# DSH Desktop へのインストール +dsh plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.6 ``` -インストール後に `dsh web` を再起動し、下記の[使い方](#使い方)に従って有効化します。 +インストール後に `dsh web` または DSH Desktop を再起動し、下記の[使い方](#使い方)に従って有効化します。 #### 更新 +DSH の **「プラグイン → dsh-unrestricted」** 詳細画面にある **「バージョンと更新」** カードからワンクリックで更新を確認・適用できるほか、CLI からも更新できます: + ```sh dsh plugin --profile web remove dsh-unrestricted -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#バージョン番号 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.6 ``` -更新後に `dsh web` を再起動します。 +更新後に `dsh web` または DSH Desktop を再起動します。 #### アンインストール @@ -136,9 +138,8 @@ dsh plugin --profile web add file:D:/work/dsh/plugin/unrestricted 設定カードでは以下の項目も確認できます: -- **モード状態**:Standard、PTC、Cordis、Minimal の 4 モードにおけるアンカー照合と注入結果を表示します。 -- **ルールフィンガープリント**:ルールテキストの SHA-256 先頭 16 文字を表示します。 -- **プロンプトプレビュー**:各モードで生成されたシステムプロンプト全文、行数、バイト数を展開表示します。 +- **モード状態とプロンプトプレビュー**:Standard、PTC、Cordis、Minimal の 4 モードの状態表示、完全なシステムプロンプトの展開プレビューおよびワンクリックコピー。 +- **バージョンと更新**:GitHub Releases の新バージョン自動チェック、更新通知バッジ表示、および画面内からの手動アップデート。 --- diff --git a/README.md b/README.md index 3045ff2..27337e4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ - [工作原理](#工作原理) - [系统提示词注入](#系统提示词注入) - [各运行模式适配](#各运行模式适配) - - [锚点校验与回退](#锚点校验与回退) + - [结构化融合与安全回退](#结构化融合与安全回退) - [即时开关](#即时开关) - [安装与更新](#安装与更新) - [本地源码安装](#本地源码安装) @@ -80,9 +80,9 @@ DSH 发起请求时会先组装全局系统提示词(System Prompt)。在普 - **Minimal 模式**:在当前智能体作用域内注入规则,保留子代理原有的自定义角色和结构化输出(`structured_output`)说明。 - **子代理**:后台子代理与结构化输出任务自动沿用当前开关状态。 -### 锚点校验与回退 +### 结构化融合与安全回退 -每次组装前,插件会核对官方提示词中的锚点文本(见 `src/rules.js` 的 `ANCHORS`),包括角色设定开头、Plan 模式策略和 `run_code` 说明。如果 DSH 升级后某处文本变动导致匹配失败,对应模式会回退为官方原版提示词,并在设置页标出未通过项,避免拼出损坏的提示词。 +插件按 DSH 官方提示词的结构化段落名称(`deployment:persona-prefix`、`plan:policy`、`tools:ptc-only`、`tool:structured_output`)进行幂等融合,不依赖脆弱的逐字文案哈希校验,兼容最新 DSH Web(`0.2.2-alpha.2`)与 DSH Desktop(`0.2.1-rc.5`)。如果自定义模式缺少角色设定段落,对应模式会自动保留原版提示词并在设置页友好提示。 ### 即时开关 @@ -93,23 +93,25 @@ DSH 发起请求时会先组装全局系统提示词(System Prompt)。在普 ## 安装与更新 ```sh -# 安装指定版本 -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.5 +# Web 端安装指定版本 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.6 -# 或安装 master 最新代码 -dsh plugin --profile web add github:yexi-by/dsh-unrestricted +# 桌面端安装指定版本(使用桌面端内置 CLI) +"& '$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add github:yexi-by/dsh-unrestricted#v0.2.6" ``` -安装后重启 `dsh web`,按下方[使用说明](#使用说明)启用。 +安装后重启 `dsh web` 或 DSH 桌面端,按下方[使用说明](#使用说明)启用。 #### 更新 +可在 DSH **「插件 → dsh-unrestricted」** 详情页底部的 **「版本与更新」** 卡片中点击 **「检查更新」** 与 **「立即更新」** 一键完成更新,或通过命令行手动更新: + ```sh dsh plugin --profile web remove dsh-unrestricted -dsh plugin --profile web add github:yexi-by/dsh-unrestricted#目标版本号 +dsh plugin --profile web add github:yexi-by/dsh-unrestricted#v0.2.6 ``` -更新后重启 `dsh web`。 +更新后重启 `dsh web` 或 DSH 桌面端。 #### 卸载 @@ -136,9 +138,8 @@ dsh plugin --profile web add file:D:/work/dsh/plugin/unrestricted 设置卡片中同时提供: -- **模式状态**:显示 Standard、PTC、Cordis、Minimal 四种模式的锚点校验与注入结果。 -- **规则指纹**:当前规则文本的 SHA-256 前 16 位,用于核对版本。 -- **提示词预览**:展开查看各模式最终生成的完整系统提示词、行数与字节数。 +- **模式覆盖与提示词预览**:显示 Standard、PTC、Cordis、Minimal 四种模式的生效状态,支持展开查看或一键复制各模式最终生成的完整系统提示词。 +- **版本与更新**:打开插件详情页时自动检测 GitHub 最新版本并在标题栏显示「可更新」提醒徽标,支持在页面内一键更新。 --- diff --git a/lib/client.js b/lib/client.js index 07db0af..ee94d95 100644 --- a/lib/client.js +++ b/lib/client.js @@ -5,10 +5,12 @@ window.__ModuleLoader__.load({ var exports = module.exports; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); let react = require("react"); + let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives"); let react_jsx_runtime = require("react/jsx-runtime"); //#region src/client/controller.ts const RPC_CHANNEL = "/dsh-unrestricted"; const SETTINGS_NS = "unrestricted"; + const DEFAULT_VERSION = "0.2.6"; /** Human-readable error text for the banner. */ function messageOf(error) { return error instanceof Error ? error.message : String(error); @@ -26,6 +28,11 @@ window.__ModuleLoader__.load({ writable: false, settingsStatus: "loading", status: null, + update: { + state: "idle", + currentVersion: DEFAULT_VERSION, + restartRequired: false + }, previews: {}, busy: false }; @@ -49,6 +56,7 @@ window.__ModuleLoader__.load({ writable: settingsSnapshot.writable, settingsStatus: settingsSnapshot.status, status: snapshot.status, + update: snapshot.update, previews: snapshot.previews, busy: pendingOperations > 0, message: snapshot.message @@ -84,9 +92,14 @@ window.__ModuleLoader__.load({ const status = await call(endpoint, {}); if (generation !== statusGeneration) return; if (clearPreviews) invalidatePreviews(); + const nextUpdate = status.update !== void 0 && (snapshot.update.state === "idle" || status.update.state !== "idle") ? status.update : { + ...snapshot.update, + currentVersion: status.version ?? snapshot.update.currentVersion + }; snapshot = { ...snapshot, status, + update: nextUpdate, message: void 0 }; } catch (error) { @@ -118,8 +131,7 @@ window.__ModuleLoader__.load({ return readStatus("recheck", true); } /** - * Fetch one preset's deploy preview. The card renders the raw fused prompt, - * so the user reads the exact bytes before switching the mode on. + * Fetch one preset's deploy preview. * @param presetId - preset id from the card's row. */ async function loadPreview(presetId) { @@ -154,6 +166,7 @@ window.__ModuleLoader__.load({ ...snapshot.previews, [presetId]: { status: "failed", + errorCode: "preview-failed", message: messageOf(error) } } @@ -161,6 +174,75 @@ window.__ModuleLoader__.load({ } publish(); } + /** + * Check whether a newer version is available from GitHub or the local source directory. + * @param force - bypass in-flight reuse and force a fresh check. + */ + async function checkUpdate(force = false) { + if (snapshot.update.state === "checking" || snapshot.update.state === "updating") return; + snapshot = { + ...snapshot, + update: { + ...snapshot.update, + state: "checking", + errorCode: void 0, + errorDetail: void 0 + } + }; + publish(); + try { + const update = await call("check-update", { force }); + snapshot = { + ...snapshot, + update + }; + } catch (error) { + snapshot = { + ...snapshot, + update: { + ...snapshot.update, + state: "failed", + errorCode: "update-check-failed", + errorDetail: messageOf(error) + } + }; + } + publish(); + } + /** + * Download and install the latest version into the active profile. + */ + async function performUpdate() { + if (snapshot.update.state === "updating") return; + snapshot = { + ...snapshot, + update: { + ...snapshot.update, + state: "updating", + errorCode: void 0, + errorDetail: void 0 + } + }; + publish(); + try { + const update = await call("perform-update", { targetTag: snapshot.update.latestTag }); + snapshot = { + ...snapshot, + update + }; + } catch (error) { + snapshot = { + ...snapshot, + update: { + ...snapshot.update, + state: "failed", + errorCode: "update-install-failed", + errorDetail: messageOf(error) + } + }; + } + publish(); + } ctx.effect(() => settings.subscribe(publish), "dsh-unrestricted: settings mirror"); ctx.effect(() => ctx.remote.$on("settings/document-updated", (namespace) => { if (namespace === void 0 || namespace === SETTINGS_NS) refresh(true); @@ -172,171 +254,197 @@ window.__ModuleLoader__.load({ setEnabled, recheck, refresh: () => refresh(true), - loadPreview + loadPreview, + checkUpdate, + performUpdate }) }; } //#endregion //#region src/client/locales.ts - /** Copy dictionaries for the unrestricted settings card. */ + /** Copy dictionaries for the unrestricted settings card and detail badge. */ /** Simplified Chinese dictionary and key source of truth. */ const zh = { title: "破限模式", summaryEnabled: "已开启", summaryDisabled: "已关闭", summaryLoading: "读取中", - summaryUnavailable: "设置不可用", - summaryValidationFailed: "部分模式校验未通过", - description: "开启后,各模式的系统提示词整体替换为以当前原版为底稿、融合破限规则的完整版本;关闭即恢复 DSH 原版提示词。从下一次请求和新建子代理开始生效,不改动正在执行的请求、工具定义、权限配置与会话历史。", - toggle: "启用破限", - scopeNote: "提示词仅由 DSH 生成时才受本插件控制;模型平台或宿主环境中更高优先级的规则不在覆盖范围内。", - statusTitle: "各模式状态", + summaryUnavailable: "只读模式", + summaryValidationFailed: "部分模式未生效", + description: "开启后,各运行模式与委派子代理的系统提示词将自动融合无限制本地执行契约;关闭即恢复 DSH 原版提示词。切换从下一次请求生效,不改动正在执行的请求、工具定义、权限配置与会话历史。", + toggle: "启用破限模式", + scopeNote: "仅作用于由 DSH 组装的系统提示词;模型平台或外部网关的远端策略不在本插件覆盖范围内。", + statusTitle: "模式覆盖与提示词预览", + statusSubtitle: "覆盖全部 4 种预设及委派子代理,可随时展开核对或复制融合后的完整提示词。", modeStandard: "Standard 标准模式", - modePtc: "PTC 模式", + modeStandardDesc: "日常编码、逆向分析、脚本编写与综合问答", + modePtc: "PTC 编程模式", + modePtcDesc: "基于 run_code 工具链的程序化任务执行", modeCordis: "Cordis 创造模式", + modeCordisDesc: "DSH 与 Cordis 插件生态开发调试", modeMinimal: "Minimal 极简模式", - subagentNote: "子代理随所属模式一并生效。", + modeMinimalDesc: "零内置先验的纯净系统提示词与子代理基座", + subagentNote: "子代理(含结构化输出子代理)随所属会话模式一并生效。", stateActive: "已生效", - stateOff: "已关闭", - stateChecking: "校验中", - stateValidationFailed: "校验未通过,已保持原版", - recheck: "重新校验", - refresh: "刷新", - preflightTitle: "本次即将写入的内容", - fingerprint: "契约指纹", - fingerprintNote: "与当前提示词一一对应。各模式实际部署的就是下面这段文本。", - preset: "预设", + stateOff: "待命", + stateValidationFailed: "已跳过(缺少角色段落)", + refresh: "刷新状态", presetStandard: "standard", presetPtc: "ptc", presetCordis: "cordis", presetMinimal: "minimal", - showPreview: "查看预览", + showPreview: "查看提示词", hidePreview: "收起预览", - previewLoading: "正在组装当前提示词…", - previewUnavailable: "暂不可预览:", + copyPreview: "复制全文", + copiedPreview: "已复制", + previewLoading: "正在生成当前模式的提示词预览…", + previewUnavailable: "暂无法生成预览:", previewSize: "行", - previewSourceLive: "实时会话", - previewSourceStanding: "静态预设", - settingsUnavailable: "当前连接不可写设置(远程浏览器只读)。", - settingsLoading: "正在读取设置…", + previewSourceLive: "当前会话实时组装", + previewSourceStanding: "预设基准组装", + settingsUnavailable: "当前连接处于只读模式,无法修改设置。", + settingsLoading: "正在读取配置…", operationFailed: "操作失败:", - issueIdentity: "DSH 身份开场白已变更", - issuePersona: "预设角色前缀已变更", - issuePlan: "计划模式段落已变更", - issuePtcOnly: "PTC 模式 run_code 规则已变更", - issueStructuredOutput: "结构化输出指令已变更" + issuePersona: "未检测到预设角色前缀段落,已自动保留原版提示词", + updateTitle: "版本与更新", + currentVersion: "当前版本", + latestVersion: "最新版本", + installSource: "安装方式", + sourceGithub: "GitHub 仓库", + sourceFile: "本地目录 (file:)", + sourceRegistry: "软件包镜像", + sourceUnknown: "当前 Profile", + updateIdle: "尚未检查更新", + updateChecking: "正在检查更新…", + updateUpToDate: "已是最新版本", + updateAvailable: "发现新版本", + updateInstalling: "正在下载并安装更新,请稍候…", + updateInstalled: "已安装新版本,重启 DSH Web 或桌面端后生效", + updateBadge: "可更新", + updateRestartBadge: "待重启生效", + checkUpdate: "检查更新", + installUpdate: "立即更新", + viewRelease: "发布说明", + errorRpcDisconnected: "无法连接宿主服务,请确认 DSH 正在运行后刷新重试。", + errorUnsupportedPreset: "不支持该预设模式的提示词预览。", + errorMissingPersona: "当前预设未包含角色前缀段落,已自动保留原版提示词。", + errorPreviewFailed: "生成提示词预览失败,请稍后刷新重试。", + errorUpdateCheckFailed: "检查更新失败,请确认网络连接正常后重试。", + errorUpdateNoProfile: "当前运行环境未绑定可管理的 Profile 目录,无法执行自动更新。", + errorUpdateFileOutdated: "当前通过本地目录 (file:) 安装,且本地目录版本低于远端最新版本,请先更新本地源码目录后再点更新。", + errorUpdateInstallFailed: "安装更新失败:" }; /** English dictionary checked against the Chinese key set. */ const en = { - title: "Unrestricted mode", + title: "Unrestricted Mode", summaryEnabled: "Enabled", summaryDisabled: "Disabled", summaryLoading: "Loading", - summaryUnavailable: "Settings unavailable", - summaryValidationFailed: "Some mode checks failed", - description: "When enabled, each mode's system prompt is replaced wholesale by a fused prompt built on its current original; disabling restores the stock DSH prompt. Applies from the next request and new subagents; in-flight requests, tool definitions, permissions, and session history are never touched.", + summaryUnavailable: "Read-only", + summaryValidationFailed: "Partial mode coverage", + description: "When enabled, system prompts across all modes and delegated subagents are fused with the unrestricted local execution contract; disabling restores the stock DSH prompt immediately. Takes effect from the next request without altering in-flight turns, tool schemas, permissions, or session history.", toggle: "Enable unrestricted mode", - scopeNote: "This plugin can only rewrite prompts DSH generates itself; higher-priority rules from the model platform or host environment are out of scope.", - statusTitle: "Per-mode status", + 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", + statusSubtitle: "Covers all 4 built-in presets and delegated subagents. Expand any mode to inspect or copy the full fused prompt.", modeStandard: "Standard", - modePtc: "PTC", - modeCordis: "Cordis", - modeMinimal: "Minimal", - subagentNote: "Subagents follow their parent's mode.", + modeStandardDesc: "General coding, reverse engineering, scripting, and technical Q&A", + modePtc: "PTC Mode", + modePtcDesc: "Programmatic tool calling via the run_code execution environment", + modeCordis: "Cordis Mode", + modeCordisDesc: "DSH and Cordis plugin development and framework debugging", + modeMinimal: "Minimal Mode", + modeMinimalDesc: "Zero-prior minimal system prompt and subagent foundation", + subagentNote: "Subagents (including structured-output subagents) automatically follow their parent mode.", stateActive: "Active", - stateOff: "Off", - stateChecking: "Checking", - stateValidationFailed: "Check failed — stock prompt kept", - recheck: "Re-check", + stateOff: "Standby", + stateValidationFailed: "Skipped (missing persona section)", refresh: "Refresh", - preflightTitle: "What this deployment would write", - fingerprint: "Contract fingerprint", - fingerprintNote: "One-to-one with the current prompt: the text below is exactly what each mode deploys.", - preset: "Preset", presetStandard: "standard", presetPtc: "ptc", presetCordis: "cordis", presetMinimal: "minimal", - showPreview: "Show preview", + showPreview: "Preview prompt", hidePreview: "Hide preview", - previewLoading: "Assembling the current prompt…", - previewUnavailable: "No preview available: ", + copyPreview: "Copy prompt", + copiedPreview: "Copied", + previewLoading: "Assembling prompt preview…", + previewUnavailable: "Preview unavailable: ", previewSize: "lines", - previewSourceLive: "live session", - previewSourceStanding: "standing preset", - settingsUnavailable: "This connection cannot write settings (remote browser is read-only).", - settingsLoading: "Reading settings…", + previewSourceLive: "Live session assembly", + previewSourceStanding: "Preset baseline assembly", + settingsUnavailable: "This connection is read-only and cannot modify settings.", + settingsLoading: "Loading configuration…", operationFailed: "Operation failed: ", - issueIdentity: "harness identity opening changed", - issuePersona: "preset persona changed", - issuePlan: "plan-mode section changed", - issuePtcOnly: "ptc-mode run_code rule changed", - issueStructuredOutput: "structured-output instruction changed" + issuePersona: "Preset persona section not found — stock prompt kept", + updateTitle: "Version & Updates", + currentVersion: "Current version", + latestVersion: "Latest version", + installSource: "Install source", + sourceGithub: "GitHub repository", + sourceFile: "Local directory (file:)", + sourceRegistry: "Package registry", + sourceUnknown: "Active profile", + updateIdle: "Not checked yet", + updateChecking: "Checking for updates…", + updateUpToDate: "Up to date", + updateAvailable: "Update available", + updateInstalling: "Downloading and installing update…", + updateInstalled: "Update installed — restart DSH Web or Desktop to apply", + updateBadge: "Update available", + updateRestartBadge: "Restart to apply", + checkUpdate: "Check for updates", + installUpdate: "Update now", + viewRelease: "Release notes", + errorRpcDisconnected: "Cannot reach the host service. Please verify DSH is running and refresh.", + errorUnsupportedPreset: "Prompt preview is not supported for this preset.", + errorMissingPersona: "The preset is missing a persona prefix section; the stock prompt is kept.", + errorPreviewFailed: "Could not assemble the prompt preview. Please try refreshing.", + errorUpdateCheckFailed: "Could not check for updates. Please verify your network connection and try again.", + errorUpdateNoProfile: "This runtime does not expose a managed profile directory for self-update.", + errorUpdateFileOutdated: "Installed from a local file: directory whose version is older than the latest release. Update the local directory first.", + errorUpdateInstallFailed: "Failed to install update: " }; /** Dictionary namespace owned by this plugin. */ const NS = "settings.unrestricted"; //#endregion //#region src/client/styles.ts /** - * Stylesheet for the unrestricted settings card. One hand-written stylesheet - * injected as a single