@linxin666/dsh-client-ui-plugin-manager 0.4.5 → 0.4.7

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
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # node scripts/verify-docs.mjs --write <dir>
5
- README.md: 5640ee3101ede09b832e8e97797b56f9b894c1c3
6
- README.zh.md: 59a16689e1e6c8bb63f525a4033bf0e6f4a91bb6
5
+ README.md: dc8c77b9f1423ef1444777ee7a40313ff30a89bc
6
+ README.zh.md: 018d1b32436acdb60cca31062d98a0076f97f00a
package/README.md CHANGED
@@ -5,7 +5,7 @@ English | [中文](README.zh.md)
5
5
  <p align="center">
6
6
  <img src="https://img.shields.io/npm/v/@linxin666/dsh-client-ui-plugin-manager?style=flat-square" alt="Version">
7
7
  &nbsp;
8
- <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.0--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
8
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
9
9
  &nbsp;
10
10
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
11
11
  </p>
@@ -67,9 +67,9 @@ The contract source of truth is `src/core/service.ts` (`PluginManagerService`).
67
67
  ## Known limitations
68
68
 
69
69
  - Loopback-only: on a LAN or remote browser the update block renders a local-only notice (the same boundary the official installer page enforces; the gateway refuses non-loopback requests with 403).
70
- - On the npm-published web runtime, gateway writes go through the official CLI. The gateway resolves `dsh` from the host process PATH first, then from `node_modules/.bin` project roots above the running host entry, and finally from the running host package's own `lib/bin.js` — which covers local-wrapper and npx launches and the packaged desktop runtime, where the CLI ships beside the host process and every `.bin` shim directory is stripped from the installer. A Node-script CLI (an npm or homebrew shim, a `.bin` symlink, a `lib/bin.js`) runs under an interpreter resolved without PATH: the `node` installed beside the CLI when the installation ships one, otherwise the host's own interpreter. The CLI's own directory goes first on the child PATH, so the `dsh plugin` run finds the pnpm installed beside it. If no source contains the CLI, CLI-backed writes remain unavailable — an application-owned profile writes through the official in-process manager and needs no binary, so its install, update and removal routes never demand one. CLI output is decoded as bytes in one pass, so a Windows console's code page (CP936/GBK) renders as readable text instead of replacement characters. Installs of git sources can take minutes and run as background jobs. Gateway updates apply only to npm registry sources, resolve the latest version on the host, and succeed only after the same installed package reports that exact version.
71
- - An application-owned profile (the packaged Desktop client) runs installs, updates and removals through the official in-process plugin manager the host mounts, the same writer that profile's official Plugins page drives: the CLI refuses `--profile desktop` outright, and the launcher hands that manager its bundled package-manager invocation. The job, its status polling and its verification are identical to the CLI path — an install must add a dependency the profile did not carry, a removal must drop one, and an update must still report the version the route resolved — while the CLI-specific guards (duplicate-mount stripping, insert-row and boot preflight) stay with the CLI writer, because there the official manager validates and applies the bundle itself. The manager's own verdict is read before the profile is: it resolves a refused run with `application: 'failed'` instead of rejecting, so the job reports that run's real reason (the pnpm diagnostic, or the packages an incompatible-version refusal names) rather than a no-op after an unchanged profile. Every other runtime keeps the CLI as the single writer of installs, updates and removals.
72
- - Compatibility gating applies only when the target manifest declares a minimum DSH version; packages without `dsh.engines.dsh` update unchecked, and official-installer runtimes (DSHCode and the checkout web) are not gated here because their updates go through the official installer.
70
+ - On the npm-published web runtime, gateway writes go through the official CLI. The gateway resolves `dsh` from the host process PATH first, then from `node_modules/.bin` project roots above the running host entry, then from the running host package's own `lib/bin.js`, and finally from the packaged Desktop install's own CLI launcher under the Electron resource directory (`runtime/cli/bin/dsh.cmd` on Windows, `runtime/cli/bin/dsh` elsewhere) — the last one covers a packaged Desktop, where the host runs from inside `app.asar`, the private host package ships no `lib/bin.js`, every `.bin` shim directory is stripped from the installer, and the launcher puts only the bundled `node` on the host's PATH. A Node-script CLI (an npm or homebrew shim, a `.bin` symlink, a `lib/bin.js`) runs under an interpreter resolved without PATH: the `node` installed beside the CLI when the installation ships one, otherwise the host's own interpreter. The CLI's own directory goes first on the child PATH, so the `dsh plugin` run finds the pnpm installed beside it. If no source contains the CLI, CLI-backed writes remain unavailable — an application-owned profile writes through the official in-process manager and needs no binary, so its install, update and removal routes never demand one. CLI output is decoded as bytes in one pass, so a Windows console's code page (CP936/GBK) renders as readable text instead of replacement characters. Installs of git sources can take minutes and run as background jobs. Gateway updates apply only to npm registry sources, resolve the latest version on the host, and succeed only after the same installed package reports that exact version.
71
+ - An application-owned profile (the packaged Desktop client) runs installs, updates and removals through the official in-process plugin manager the host mounts, the same writer that profile's official Plugins page drives: the CLI refuses `--profile desktop` outright, and the launcher hands that manager its bundled package-manager invocation. The job, its status polling and its verification are identical to the CLI path — an install must add a dependency the profile did not carry, a removal must drop one, and an update must still report the version the route resolved — while the CLI-specific guards (duplicate-mount stripping, insert-row and boot preflight) stay with the CLI writer, because there the official manager validates and applies the bundle itself. The manager's own verdict is read before the profile is: it resolves a refused run with `application: 'failed'` instead of rejecting, so the job reports that run's real reason (the pnpm diagnostic, or the packages an incompatible-version refusal names) rather than a no-op after an unchanged profile. Since 0.2.1-rc.2 that manager also refuses to install a dependency the profile already carries while the host mounts `hmr` — every profile host — so an update there runs as its two phases instead: remove the installed bundle, then install the target spec through the same manager, and a second phase that fails reinstalls the spec the profile carried before the run, so a failed update leaves a working plugin rather than an empty slot. The single call stays first, so an upstream in-place update would need no change here. Every other runtime keeps the CLI as the single writer of installs, updates and removals.
72
+ - Compatibility gating applies only when the target manifest declares a minimum DSH version; packages without `dsh.engines.dsh` update unchecked, and official-installer runtimes (DSHCode and the checkout web) are not gated here because their updates go through the official installer. The running DSH version is read from the installation's own `@deepseek-ai/dsh` manifest, which the launcher publishes as the profile's install anchor — no subprocess, no PATH, and therefore an answer on a packaged Desktop host — with `dsh --version` kept as the fallback for a runtime that publishes no anchor. A requirement the host cannot verify at all is reported as unverified rather than as a version below the minimum: both hold the update back, but only the second sends the user to upgrade DSH.
73
73
  - Enablement on the npm runtime reports the effective next-start value: a profile override row wins where present, otherwise the installed bundle's own `disabled` rows decide (the aggregate's inactive-by-default families), and rows no layer mentions are enabled. Enabling a row the bundle disables writes an explicit `disabled: false` override, because deleting the user row would only restore the bundle default; the runtime's loader honors these rows at the next start, but this path is less exercised than the official desktop writer's.
74
74
  - Restart is explicit, user-clicked and three-mode. The route is method-aware: `GET /api/plugin-manager/restart` reads the plan (no side effects, so a prefetch or a typed URL can never stop a host) and `POST` carries it out; every other method is refused with 405. The toolbar reads the plan first, so the confirmation names the same consequence the host will produce. On a terminal launch (`dsh web`) the host starts a detached helper that waits for the outgoing process to exit and then re-executes the same command line, so the port is free before the replacement binds it, and the replacement's output goes to `$DSH_HOME/logs/plugin-manager-restart.log`. Under the packaged Desktop app the plugin cannot relaunch anything — Electron owns the process tree, a detached respawn would fight the shell for the same port, and the shell's own recovery dialog is the only restart it offers — so that confirmation says what its dialog does before running it: confirming stops the host, the shell shows its error-titled dialog, and the dialog's Restart finishes `app.relaunch()` (a crash report is written with it); the manual way out, quitting DeepSeek Harness and opening it again, is named beside it. A launch with no terminal (a supervisor, an editor task) is left running and the toolbar says to restart manually. Without a restart, updated plugin code is loaded at the next start.
75
75
  - On the npm runtime, duplicate insert-id claims are detected after install and the new plugin is rolled back automatically (a shared id can never be `disabled` away: the loader's duplicate check has no disabled exemption).
@@ -81,7 +81,7 @@ The contract source of truth is `src/core/service.ts` (`PluginManagerService`).
81
81
 
82
82
  - Trust boundary is the loopback fence: every gateway route requires a loopback socket address, a loopback Host header, and a non-cross-site origin (socket + Host + Origin + `sec-fetch-site`), the same authority the official installer channels enforce. There is no browser-reachable path from a remote origin; rejected requests receive HTTP 403 with `{ ok: false, error: "forbidden: loopback-only" }`.
83
83
  - Mutation routes (install / update / remove / set-enabled / restart) carry no token: the loopback authority *is* the local user, matching the official channels. The restart route is the one route whose effect is process-level: it never invents a command line (it re-executes this process's own `execPath` + argv, dropping inspector flags), it refuses to relaunch anything it cannot identify as a terminal launch, and under the packaged Desktop app it only stops this process so the shell decides what happens next. Any local process can therefore drive plugin installs and removals, and npm installs run package install scripts — treat the gateway as local code execution by design and never expose it beyond loopback.
84
- - Install specs and package ids are rejected when they contain command-shell expansion characters or control characters. On Windows, npm shims are resolved to `node.exe` plus the package `bin.js`; packaged Desktop shims have no adjacent npm layout, so they run through `cmd.exe /d /s /c` with a pre-quoted, verbatim argument envelope. Desktop profile discovery reads the packaged launcher's profile environment value or persisted profile selection, and application-owned profile installs, updates and removals run in the host half through the mounted official `pluginManager` service — the same writer that profile's official Plugins page drives through its own RPC face — under the same loopback fence and user click.
84
+ - Install specs and package ids are rejected when they contain command-shell expansion characters or control characters. On Windows, npm shims are resolved to `node.exe` plus the package `bin.js`; packaged Desktop shims have no adjacent npm layout, so they run through `cmd.exe /d /s /c` with a pre-quoted, verbatim argument envelope. That command processor is addressed by absolute path (`ComSpec`, otherwise `%SystemRoot%\System32\cmd.exe`) instead of by bare name, so a host whose PATH omits the system directories still runs the shim; a spawn that still fails settles as a failed job carrying the reason instead of taking the dsh host process down. Desktop profile discovery reads the packaged launcher's profile environment value or persisted profile selection, and application-owned profile installs, updates and removals run in the host half through the mounted official `pluginManager` service — the same writer that profile's official Plugins page drives through its own RPC face — under the same loopback fence and user click.
85
85
  - Mutations are serialized through one queue, so concurrent jobs never interleave their before/after profile captures. An install is only `done` when the new dependency actually landed in the profile (and a removal only when it is gone); a success exit code alone is never trusted.
86
86
  - Enablement re-reads the current profile manifest under that mutation queue and rejects stale or unknown package ids with `404` before writing, so a panel row left behind by an uninstall cannot create an orphan `disabled` override.
87
87
  - Conflict handling is owner-aware: a duplicate entry id or an insert row naming an unresolvable package rolls the *new* package back through the official remove path. The gateway never writes `disabled` rows for a shared id (such rows cannot stop the loader's duplicate check and would flag the existing owner).
package/README.zh.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <p align="center">
6
6
  <img src="https://img.shields.io/npm/v/@linxin666/dsh-client-ui-plugin-manager?style=flat-square" alt="Version">
7
7
  &nbsp;
8
- <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.0--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
8
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.2.1--rc.2-4c6ef5?style=flat-square&amp;labelColor=454a54" alt="DSH">
9
9
  &nbsp;
10
10
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
11
11
  </p>
@@ -67,9 +67,9 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-plugin-manager
67
67
  ## 已知限制
68
68
 
69
69
  - 仅限本机:LAN 或远程浏览器只显示「仅限本机操作」提示(与官方安装器页同一边界;网关对非 loopback 请求返回 403)。
70
- - npm 发布的官方 web 上,网关写入经官方 CLI 执行。网关先从 host 进程 PATH 解析 `dsh`,再从运行中 host 入口上层各项目根的 `node_modules/.bin` 回退查找,最后回退到运行中 host 包自身的 `lib/bin.js`——覆盖本地包装器与 npx 启动,以及桌面安装包运行时(CLI 与 host 进程同处一树,且安装包会剥除所有 `.bin` shim 目录);Node 脚本形式的 CLI(npm/homebrew shim、`.bin` 符号链接、`lib/bin.js`)由不依赖 PATH 的解释器执行——安装包里 CLI 旁有 `node` 时用它,否则用 host 自身的解释器;CLI 所在目录放在子进程 PATH 首位,使 `dsh plugin` 运行能找到同处安装的 pnpm。全部来源都没有 CLI 时,走 CLI 的写入才不可用——应用自有 profile 由官方进程内管理器写入,不需要任何二进制,其安装、更新与卸载路由也不要求它。CLI 输出按字节一次性解码,Windows 中文控制台(CP936/GBK)的报错文本可读而不再是替换字符。git 源安装可能耗时数分钟,以后台任务运行。网关更新只适用于 npm registry 源,由 host 解析最新版本,且仅当同一已装包报告该精确版本时才算成功。
71
- - 应用自有 profile(打包桌面客户端)的安装、更新与卸载走宿主挂载的官方进程内插件管理器——即该 profile 官方插件页所用的同一个写入器:CLI 直接拒绝 `--profile desktop`,启动器则把自带的包管理器调用交给该管理器。任务、状态轮询与校验与 CLI 路径一致:安装必须新增一条此前没有的依赖、卸载必须删除一条依赖、更新必须报告路由解析出的版本;而 CLI 专属的守卫(重复挂载剥离、insert 行与启动预检)仍留在 CLI 写入器一侧,因为该路径下官方管理器会自行校验并应用 bundle。管理器返回的判定会先于 profile 被读取:被拒绝的运行以 `application: 'failed'` 解析而不是抛错,因此任务上报该运行的真实原因(pnpm 诊断文本,或 `incompatible-version` 拒绝点名的包),而不是在 profile 未变之后给出一句空转文案。其余运行时的安装、更新与卸载仍以 CLI 为唯一写入器。
72
- - 兼容性门禁只在目标清单声明了最低 DSH 版本时生效;未声明 `dsh.engines.dsh` 的包更新不被检查,官方安装器运行时(DSHCode 与 checkout 版 web)不经过本门禁(其更新走官方安装器)。
70
+ - npm 发布的官方 web 上,网关写入经官方 CLI 执行。网关先从 host 进程 PATH 解析 `dsh`,再从运行中 host 入口上层各项目根的 `node_modules/.bin` 回退查找,然后回退到运行中 host 包自身的 `lib/bin.js`,最后回退到桌面安装包自带的 CLI 启动器(位于 Electron 资源目录下:Windows 为 `runtime/cli/bin/dsh.cmd`,其他平台为 `runtime/cli/bin/dsh`)——最后这条覆盖打包桌面端:host 从 `app.asar` 内运行、私有 host 包不带 `lib/bin.js`、安装包剥除所有 `.bin` shim 目录,且启动器只把自带的 `node` 放进 host 的 PATH;Node 脚本形式的 CLI(npm/homebrew shim、`.bin` 符号链接、`lib/bin.js`)由不依赖 PATH 的解释器执行——安装包里 CLI 旁有 `node` 时用它,否则用 host 自身的解释器;CLI 所在目录放在子进程 PATH 首位,使 `dsh plugin` 运行能找到同处安装的 pnpm。全部来源都没有 CLI 时,走 CLI 的写入才不可用——应用自有 profile 由官方进程内管理器写入,不需要任何二进制,其安装、更新与卸载路由也不要求它。CLI 输出按字节一次性解码,Windows 中文控制台(CP936/GBK)的报错文本可读而不再是替换字符。git 源安装可能耗时数分钟,以后台任务运行。网关更新只适用于 npm registry 源,由 host 解析最新版本,且仅当同一已装包报告该精确版本时才算成功。
71
+ - 应用自有 profile(打包桌面客户端)的安装、更新与卸载走宿主挂载的官方进程内插件管理器——即该 profile 官方插件页所用的同一个写入器:CLI 直接拒绝 `--profile desktop`,启动器则把自带的包管理器调用交给该管理器。任务、状态轮询与校验与 CLI 路径一致:安装必须新增一条此前没有的依赖、卸载必须删除一条依赖、更新必须报告路由解析出的版本;而 CLI 专属的守卫(重复挂载剥离、insert 行与启动预检)仍留在 CLI 写入器一侧,因为该路径下官方管理器会自行校验并应用 bundle。管理器返回的判定会先于 profile 被读取:被拒绝的运行以 `application: 'failed'` 解析而不是抛错,因此任务上报该运行的真实原因(pnpm 诊断文本,或 `incompatible-version` 拒绝点名的包),而不是在 profile 未变之后给出一句空转文案。自 0.2.1-rc.2 起,该管理器在宿主挂载 `hmr` 时还会拒绝安装 profile 已携带的依赖——而那是每个 profile 宿主——因此那里的更新改为按两个阶段执行:先移除已安装的组合包,再用同一个管理器安装目标 spec;第二阶段失败时,装回运行前 profile 携带的 spec,使失败的更新留下可用的插件而不是空槽。单次调用仍排在最前,因此上游哪天接受原地更新,这里无需改动。其余运行时的安装、更新与卸载仍以 CLI 为唯一写入器。
72
+ - 兼容性门禁只在目标清单声明了最低 DSH 版本时生效;未声明 `dsh.engines.dsh` 的包更新不被检查,官方安装器运行时(DSHCode 与 checkout 版 web)不经过本门禁(其更新走官方安装器)。运行中的 DSH 版本读取安装自身的 `@deepseek-ai/dsh` 清单——启动器把它作为 profile 的 install anchor 发布——无需子进程、无需 PATH,因此打包桌面端也能作答;运行时不发布 anchor 时回退到 `dsh --version`。宿主完全无法核验的要求按「无法确认」呈现,而不是报成低于下限:两者都拦住更新,但只有后者会让用户去升级 DSH。
73
73
  - npm 运行时上的启停显示下次启动的真实生效值:profile 覆盖行优先,其次由所装 bundle 自带的 `disabled` 行决定(聚合包的按需开启家族),两层都未提及的行视为启用。开启一个被 bundle 停用的行会写入显式 `disabled: false` 覆盖行——只删除用户行只会退回 bundle 默认值;该运行时 loader 在下次启动时认读这些行,但这条路径不如官方桌面写入器经过充分锻炼。
74
74
  - 重启是显式、需用户点击且有三种模式的动作,路由按方法区分:`GET /api/plugin-manager/restart` 只读「重启方案」(无副作用,因此浏览器预取或直接输入 URL 都不会停掉宿主),`POST` 才执行;其他方法一律 405 拒绝。工具条先读方案,确认面板说的后果与实际执行的一致。终端启动(`dsh web`)时宿主启动一个 detached helper:等旧进程退出后按原命令行重新拉起,端口先释放再被替换进程绑定,替换进程的输出写入 `$DSH_HOME/logs/plugin-manager-restart.log`。打包桌面应用下本插件无法重启任何东西——进程树归 Electron,detached 重拉只会与桌面外壳抢同一端口,而外壳只提供它自己的恢复对话框这一条重启路径——因此那里的确认面板会先写明该对话框会做什么:确认后宿主退出,外壳弹出错误样式的「应用无法启动或已意外停止」对话框,在对话框里点「重启」即完成 `app.relaunch()`(同时写一份崩溃报告);旁边给出替代路径——退出 DeepSeek Harness 后重新打开。无终端的启动(受监督进程、编辑器任务)保持不动,工具条提示手动重启。不重启时,更新后的插件代码在下次启动生效。
75
75
  - npm 运行时上重复 insert id 认领在安装后即被检出并自动回滚新插件(共享 id 写 disabled 无法阻止 loader 的重复检查,只会误伤现有插件)。
@@ -81,7 +81,7 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-plugin-manager
81
81
 
82
82
  - 信任边界是 loopback 门禁:每条网关路由都要求 loopback socket 地址、loopback Host 头与非跨站来源(socket + Host + Origin + `sec-fetch-site` 四重),与官方安装器通道同一权威。远程来源的浏览器没有可达路径;被拒请求返回 HTTP 403 与 `{ ok: false, error: "forbidden: loopback-only" }`。
83
83
  - 变更类路由(install / update / remove / set-enabled / restart)不带 token:loopback 权威即本机用户,与官方通道同模型。重启路由是唯一作用在进程层面的路由:它绝不臆造命令行(只重放本进程自身的 `execPath` + argv,并剔除 inspector 开关),对无法确认为终端启动的宿主拒绝重拉,在打包桌面应用下只让本进程退出而把后续交给外壳。因此任何本机进程都能驱动插件安装与卸载,且 npm 安装会执行包的 install 脚本——请将本网关视为「设计上即本机代码执行」,绝不暴露到 loopback 之外。
84
- - 安装 spec 与包 id 含命令行展开字符或控制字符时一律拒绝。Windows 下,npm shim 会解析为 `node.exe` 加包内 `bin.js`;DSH Desktop 打包 shim 附近没有 npm 布局,因此通过带完整预引用、逐字参数封套的 `cmd.exe /d /s /c` 执行。桌面 profile 从打包启动器环境值或持久化的 profile 选择中读取;应用自有 profile 的安装、更新与卸载由 host 半区直接调用宿主挂载的官方 `pluginManager` 服务(与官方插件页经自身 RPC 面驱动的是同一个写入器),其权威同样是 loopback 门禁加用户点击。
84
+ - 安装 spec 与包 id 含命令行展开字符或控制字符时一律拒绝。Windows 下,npm shim 会解析为 `node.exe` 加包内 `bin.js`;DSH Desktop 打包 shim 附近没有 npm 布局,因此通过带完整预引用、逐字参数封套的 `cmd.exe /d /s /c` 执行;该命令解释器按绝对路径定位(`ComSpec`,其次 `%SystemRoot%\System32\cmd.exe`)而不再依赖裸名的 PATH 查找,因此 PATH 缺系统目录的宿主仍能执行 shim;若 spawn 仍失败,则该次作业以失败结算并带出原因,绝不带走 dsh 宿主进程。桌面 profile 从打包启动器环境值或持久化的 profile 选择中读取;应用自有 profile 的安装、更新与卸载由 host 半区直接调用宿主挂载的官方 `pluginManager` 服务(与官方插件页经自身 RPC 面驱动的是同一个写入器),其权威同样是 loopback 门禁加用户点击。
85
85
  - 变更经同一队列串行,并发任务的 before/after profile 快照绝不交错。安装只有在依赖真实落入 profile 后才判 done(卸载以依赖消失为准),绝不轻信成功退出码。
86
86
  - 启停操作会在该变更队列内重新读取最新 profile 清单,并在写入前以 `404` 拒绝过期或未知的包 id,因此卸载后遗留在面板里的旧行不会制造孤儿 `disabled` 覆盖。
87
87
  - 冲突处置是 owner-aware 的:重复入口 id 或引用不可解析包的 insert 行会经官方 remove 路径回滚**新**包;网关绝不对共享 id 写 `disabled` 行(那既阻止不了 loader 的重复检查,又会误伤现有插件)。
package/lib/client.js CHANGED
@@ -185,6 +185,7 @@ window.__ModuleLoader__.load({
185
185
  });
186
186
  const requiresDsh = found?.requiresDsh;
187
187
  const blocked = found?.compatible === false;
188
+ const unverified = blocked && found?.hostVersion === void 0;
188
189
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
189
190
  className: plugin_manager_module_css_default.section,
190
191
  "data-update-patch": true,
@@ -216,7 +217,8 @@ window.__ModuleLoader__.load({
216
217
  found !== void 0 && requiresDsh !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
217
218
  className: blocked ? plugin_manager_module_css_default.compatBlocked : plugin_manager_module_css_default.compatHint,
218
219
  "data-update-compat": blocked ? "blocked" : "ok",
219
- children: blocked ? t("updateBlockedDsh", { min: displayMinimumVersion(requiresDsh) }) : t("updateRequiresDsh", { min: displayMinimumVersion(requiresDsh) })
220
+ "data-update-compat-reason": blocked ? unverified ? "unverified" : "below-minimum" : void 0,
221
+ children: !blocked ? t("updateRequiresDsh", { min: displayMinimumVersion(requiresDsh) }) : unverified ? t("updateUnverifiedDsh", { min: displayMinimumVersion(requiresDsh) }) : t("updateBlockedDsh", { min: displayMinimumVersion(requiresDsh) })
220
222
  }),
221
223
  found !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
222
224
  type: "button",
@@ -619,7 +621,8 @@ window.__ModuleLoader__.load({
619
621
  }),
620
622
  row.compatible === false && row.requiresDsh !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
621
623
  className: plugin_manager_module_css_default.compatBlocked,
622
- children: t("updateBlockedDsh", { min: displayMinimumVersion(row.requiresDsh) })
624
+ "data-update-row-compat-reason": row.hostVersion === void 0 ? "unverified" : "below-minimum",
625
+ children: row.hostVersion === void 0 ? t("updateUnverifiedDsh", { min: displayMinimumVersion(row.requiresDsh) }) : t("updateBlockedDsh", { min: displayMinimumVersion(row.requiresDsh) })
623
626
  })
624
627
  ]
625
628
  }, row.id))
@@ -758,6 +761,7 @@ window.__ModuleLoader__.load({
758
761
  "latest": "最新 {version}",
759
762
  "updateRequiresDsh": "需要 DSH ≥ {min}",
760
763
  "updateBlockedDsh": "需要 DSH ≥ {min},请先升级 DSH 再更新",
764
+ "updateUnverifiedDsh": "无法确认本机 DSH 版本(需要 DSH ≥ {min}),已暂停更新",
761
765
  "restartHint": "插件变更将在重启应用后生效。",
762
766
  "updatesAvailable": "{count} 个可更新",
763
767
  "updateAll": "全部更新({count})",
@@ -796,6 +800,7 @@ window.__ModuleLoader__.load({
796
800
  "latest": "Latest {version}",
797
801
  "updateRequiresDsh": "Requires DSH >= {min}",
798
802
  "updateBlockedDsh": "Requires DSH >= {min}; upgrade DSH before updating",
803
+ "updateUnverifiedDsh": "Cannot confirm the local DSH version (this update needs DSH >= {min}); update paused",
799
804
  "restartHint": "Plugin changes take effect after restarting the application.",
800
805
  "updatesAvailable": "{count} updates available",
801
806
  "updateAll": "Update all ({count})",
@@ -925,6 +930,10 @@ window.__ModuleLoader__.load({
925
930
  if (typeof update.compatible !== "boolean") throw new Error(`plugin-manager: update row ${String(index)} is invalid`);
926
931
  row.compatible = update.compatible;
927
932
  }
933
+ if (update.hostVersion !== void 0) {
934
+ if (!isString(update.hostVersion)) throw new Error(`plugin-manager: update row ${String(index)} is invalid`);
935
+ row.hostVersion = update.hostVersion;
936
+ }
928
937
  return row;
929
938
  });
930
939
  }
@@ -974,7 +983,7 @@ window.__ModuleLoader__.load({
974
983
  /** The building package's version, when the bundle carries it. */
975
984
  function bakedVersion() {
976
985
  try {
977
- return "0.4.5";
986
+ return "0.4.7";
978
987
  } catch {
979
988
  return;
980
989
  }