@linxin666/dsh-client-ui-plugin-manager 0.4.21 → 0.4.23
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 +2 -2
- package/README.md +4 -5
- package/README.zh.md +4 -5
- package/cordis.patch.yml +0 -9
- package/lib/client.js +336 -91
- package/lib/client.js.map +1 -1
- package/lib/index.js +102 -22
- package/lib/types/client/BuiltinPlugins.d.ts +1 -1
- package/lib/types/client/PluginListToolbar.d.ts +1 -1
- package/lib/types/client/PluginUpdatePatch.d.ts +4 -2
- package/lib/types/client/ignored-updates.d.ts +15 -0
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/locales.d.ts +15 -0
- package/lib/types/core/updates.d.ts +15 -0
- package/lib/types/host/dsh-home.d.ts +13 -3
- package/lib/types/host/gateway.d.ts +4 -1
- package/lib/types/host/rows.d.ts +26 -3
- package/package.json +20 -20
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:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: f9820d4dbe75ae7fc78c55dccbf78e6a64cd27e5
|
|
6
|
+
README.zh.md: ba1fc5b3c6dcb475d99107dce15304a42b28a8b0
|
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
|
|
|
8
|
-
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.
|
|
8
|
+
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.3--alpha.4-4c6ef5?style=flat-square&labelColor=454a54" alt="DSH">
|
|
9
9
|
|
|
10
10
|
<img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
|
|
11
11
|
</p>
|
|
@@ -19,14 +19,15 @@ An update and lifecycle manager for DeepSeek Harness (DSH) Web GUI and official
|
|
|
19
19
|
|
|
20
20
|
## What it does
|
|
21
21
|
|
|
22
|
-
- Contributes
|
|
22
|
+
- Contributes an update section into the official Plugins page (the `plugins.detail.section` seat that page declares) on installed bundle pages, deferring automatically when the official native Versions section (`[data-plugin-versions]`, DSH 0.2.3-alpha.2+) is already rendered (showing only a compact restore strip when the bundle has locally ignored update versions). There is no settings section of its own.
|
|
23
23
|
- Adds a list-level toolbar beside that page's **Installed** heading. The heading is the page's own chrome and the page declares no seat beside it (its extension points are `plugins.detail.*`, `plugins.item`, `plugins.bundle.config`, `plugins.row.config` and `plugins.bundle.activation`), so the toolbar is inserted into that element and kept in place through the family's shared body-mutation hub. One click checks every installed plugin; the panel lists the third-party rows that have a newer release, with the declared DSH minimum for any row this runtime is too old for; **Update all** applies the eligible rows in one host job, in order, with per-row progress — a row the host refuses is named in place with its own reason and the run carries on with the rows behind it; **Restart now** then makes the update effective (see the restart note under Known limitations). Official `@deepseek-ai/` packages are never updated in bulk — their version belongs to the DSH installation.
|
|
24
|
+
- **Exact-version update ignore**: each offered row in the list panel and each found update in the per-bundle block carries **Ignore this version**. The rule is stored in this browser as a plugin id plus the offered version, so it excludes only that offer from **Update all** and the single-package action; other plugins continue normally and a newer release appears again. Ignored rows remain listed in a separate section with **Restore update**. Unavailable or malformed local storage degrades to an empty or session-local rule rather than blocking update checks.
|
|
24
25
|
- Dual-channel transport: on runtimes with the official installer services (DSHCode and the 1.0.4 checkout web), every operation rides the official `/plugin-installer` and `/plugin-control` loopback RPC channels; on the npm-published web runtime those channels do not exist, so the package's host half mounts a loopback-fenced HTTP gateway that spawns the official `dsh plugin` CLI for installs/removals (the single writer) and writes `disabled` override rows for enablement. An application-owned profile (a packaged Desktop launch) takes the third writer for installs, updates and removals: the official in-process plugin manager the host mounts, because the CLI refuses to write that profile at all.
|
|
25
26
|
- Detects the legacy aggregate `@linxin666/dsh-web-ui-all` and converts its update action into a transactional migration to `@linxin666/dsh-web-all`; the gateway removes the legacy package, installs the current package at an exact version, restores the legacy layer position, and verifies `--dump-config` before reporting success.
|
|
26
27
|
- Verifies DSH runtime compatibility before npm updates (issue #754): update checks read the declared minimum DSH version from the latest manifest (`dsh.engines.dsh` with a top-level `engines.dsh` fallback), evaluate it as a node-semver range with the call the official boot gate makes — `semver.satisfies(host, range, { includePrerelease: true })` — so `||` alternatives, `^` and `~`, whitespace-separated comparators and x-ranges decide here exactly as they decide at boot, and show the requirement beside the update action. A requirement the running DSH does not satisfy disables the action and says to upgrade DSH. A requirement the host could not verify — an unreadable running version, or a declaration that is not a range node-semver parses — is a different verdict with its own copy: it names no cause and never sends the user to upgrade a DSH that was never compared. Neither verdict lets the update run, and the host update route answers 412 before starting any CLI job in both cases.
|
|
27
28
|
- Protects the next boot on the npm runtime: after each install the gateway verifies the dependency actually landed, rejects duplicate entry-id claims and insert rows naming unresolvable packages, and composes the profile with the CLI's `--dump-config` preflight; a conflicting or failing install is rolled back through the official remove path and the existing plugins are never touched.
|
|
28
29
|
- Adds a "Built-in plugins" group at the bottom of the official Plugins page list; as the page declares no bottom extension slot, this group is inserted directly into the page DOM as a dedicated container with an independent React root (matching the update toolbar) and automatically resets or detaches on page rerenders and panel switches. By default the group lists only Loader rows not inserted by patches of any installed bundle (8 rows in this deployment), using a subtraction formula that surfaces rows declared in profile patch insert blocks (such as Computer Use's `computer-use` and `computer-use-cua-driver-native`) that were previously invisible in the official page; a control beside the group heading can expand it to append all remaining Loader rows (230 rows in this deployment) into the same list, where each owned row displays "From <bundle package name>" to indicate that it also appears on that bundle's details page. Both scopes offer search by localized title, module package, entry id, or owning bundle, with at most 20 matching rows per page and previous/next controls. Expanding, collapsing, searching, clearing, and paging only change the local view over the already-read collections without re-reading, writing, or changing the enabled state of any row; switch behavior is identical across both scopes: each row provides a toggle switch calling official `pluginManager` remote `setPluginEnabled` to write the profile patch layer with hot-application (profiles with HMR require no restart); rows judged read-only by the official manager (`management-required` or `unaddressable`) render disabled switches with the lock type explained rather than maintaining a custom whitelist; accepted toggles re-read the Loader to verify state, and failures display copy mapped from official `error.code`.
|
|
29
|
-
- Provides a read-only "Agent presets" block beneath the built-in plugins group
|
|
30
|
+
- Provides a read-only "Agent presets" block beneath the built-in plugins group. Each preset is a collapsed row carrying its total and enabled row counts; expanding it lays the composed rows and their status (enabled, disabled, or conditionally enabled with expression) out in an adaptive grid, without switches since preset rows are determined by composition. A composition that cannot be read opens itself so its reason is visible.
|
|
30
31
|
|
|
31
32
|
## Install
|
|
32
33
|
|
|
@@ -78,8 +79,6 @@ The contract source of truth is `src/core/service.ts` (`PluginManagerService`).
|
|
|
78
79
|
- The npm runtime's boot preflight (`--dump-config`) catches composition failures, and the static insert check catches insert rows naming packages that resolve nowhere; runtime import/apply failures still surface only at the next real start.
|
|
79
80
|
- Duplicate-mount safeguard (gateway mode): the official CLI's bundle reconciliation re-adds every bundle-declaring dependency to `dsh.profile.bundles` after any install/remove — including packages the composition already mounts through a patch row (a bundle that mounts an external plugin by row), which would double-mount and fail the next boot (`duplicate prefix route`). After every successful CLI mutation the gateway strips exactly the newly added, already-row-mounted bundles entries back out (the manifest write goes through backup + tmp + atomic rename), reports one notice per stripped entry on the job result, and leaves normal installs' bundles entries — and every entry the user had before — untouched.
|
|
80
81
|
- The wire shapes mirror the official installer protocol; on drift the tolerant parsers degrade to error rows rather than misbehaving.
|
|
81
|
-
- Settings "Built-in plugins" section retired: this package's `cordis.patch.yml` includes a top-level bare row `- id: ui-settings-plugins` with `disabled: true`, which the aggregation layer applies after `@deepseek-ai/dsh-web-app` to override and retire that settings section; management is consolidated into the "Built-in plugins" group on the official Plugins page, and disabling this package restores that settings section.
|
|
82
|
-
- Residual official Plugins page notice: the explanatory copy on the official Plugins page still states that built-in plugins can be viewed in Settings → Built-in plugins, though that entrance has been retired by this package; this text belongs to the official bundle and cannot be modified by this repository.
|
|
83
82
|
|
|
84
83
|
## Security model
|
|
85
84
|
|
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
|
|
|
8
|
-
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.
|
|
8
|
+
<img src="https://img.shields.io/badge/DSH-%3E%3D0.2.3--alpha.4-4c6ef5?style=flat-square&labelColor=454a54" alt="DSH">
|
|
9
9
|
|
|
10
10
|
<img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
|
|
11
11
|
</p>
|
|
@@ -19,14 +19,15 @@
|
|
|
19
19
|
|
|
20
20
|
## 功能
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- 向官方插件页注入更新区块(该页声明的 `plugins.detail.section` 席位),只渲染在已安装组合包的页面上;当官方详情页已自带原生「版本」区块(`[data-plugin-versions]`,DSH 0.2.3-alpha.2+)时自动退让以避免重复(仅在该包存在本地已忽略更新版本时显示精简的恢复提示条);设置里不注册本包自己的分区。
|
|
23
23
|
- 在该页 **已安装** 标题旁加一条列表级工具条。该标题是官方页面自己的 chrome,页面并未为它声明席位(扩展点是 `plugins.detail.*`、`plugins.item`、`plugins.bundle.config`、`plugins.row.config` 与 `plugins.bundle.activation`),因此工具条直接插入该元素,并靠家族共享的 body mutation hub 保持就位。一次点击检查全部已装插件;面板列出有新版本的第三方插件(当前运行时版本不够的行附上其声明的 DSH 最低版本);「全部更新」用一个 host 任务按顺序应用合格行并显示逐行进度——被拒的行就地写明原因,整批继续跑后面的行;随后「立即重启」使更新生效(见「已知限制」中的重启说明)。官方 `@deepseek-ai/` 包绝不参与批量更新——它们的版本属于 DSH 安装本身。
|
|
24
|
+
- **按版本忽略更新**:列表面板中的每个更新行与组合包详情页查到的更新都提供「忽略此版本」。规则以「插件 id + 提供的版本」保存在当前浏览器,只把这一条从「全部更新」与单包更新中排除;其他插件照常更新,出现更新版本后会重新显示。被忽略的行保留在独立区域,可点「恢复更新」撤销。本地存储不可用或内容损坏时降级为空规则或当前会话内规则,不阻断更新检查。
|
|
24
25
|
- 双通道传输:带官方安装器服务的运行时(DSHCode 与 1.0.4 checkout 版 web)走官方 `/plugin-installer`、`/plugin-control` loopback RPC 通道;npm 发布的官方 web 没有这些通道,本包的 host 半区挂载 loopback 门禁的 HTTP 网关——安装/卸载 spawn 官方 `dsh plugin` CLI(唯一写入器),启停写入 `disabled` 覆盖行。应用自有 profile(打包桌面启动)的安装、更新与卸载走第三种写入器:宿主挂载的官方进程内插件管理器,因为 CLI 完全拒绝写该 profile。
|
|
25
26
|
- 检测旧聚合包 `@linxin666/dsh-web-ui-all`,把更新动作转换为到 `@linxin666/dsh-web-all` 的事务迁移;网关先移除旧包、安装精确版本的新包、恢复旧聚合包的层顺序,并在 `--dump-config` 通过后才报告成功。
|
|
26
27
|
- 更新前校验 DSH 运行时兼容(issue #754):更新检查读取最新版本清单声明的 DSH 最低版本(`dsh.engines.dsh`,兼容回退读顶层 `engines.dsh`),按 node-semver 范围求值——用的正是官方启动门禁那一句 `semver.satisfies(host, range, { includePrerelease: true })`,因此 `||` 备选、`^` 与 `~`、空格分隔的多比较器与 x-range 在这里的判定与启动时完全一致——并在更新动作旁显示要求。运行 DSH 确实不满足要求时禁用更新并提示升级 DSH。宿主无法核验要求时(运行版本读不出来,或声明不是 node-semver 能解析的范围)是另一种结论,有独立文案:不预设原因,也绝不把用户推去升级一个从未参与比较的 DSH。两种结论都不放行更新,host 更新路由在两种情况下都会在启动任何 CLI 任务前返回 412。
|
|
27
28
|
- npm 运行时保护下次启动:安装后网关校验依赖真实落盘、拒绝重复入口 id 认领与引用不可解析包的 insert 行,并用 CLI 的 `--dump-config` 做组合预检;冲突或失败的安装会经官方 remove 路径自动回滚,绝不触碰现有插件。
|
|
28
29
|
- 在官方「插件」页列表最下方挂载「内置插件」分组,因官方页面未提供列表底部扩展槽位,该分组与检查更新工具条一样作为独立 React root 容器插入官方 DOM,在页面重绘或切换面板时自动复位或摘除。分组默认只列「没有任何已安装 bundle 的补丁所插入」的 Loader 行(本部署是 8 行),采用减法口径使 profile 补丁 insert 块中的行(例如 Computer Use 的 `computer-use` 与 `computer-use-cua-driver-native`)得以正常呈现;分组标题旁的控件可以展开,展开后在同一列表里追加其余全部 Loader 行(本部署是 230 行),每条已归属行会显示「来自 <bundle 包名>」,说明它同时出现在那个组合包的详情页里。两种范围都可按当前语言标题、模块包名、行 id 或组合包归属搜索,匹配结果每页最多显示 20 行并提供上一页/下一页。展开/收起、搜索、清空与翻页只改变已读取集合的本地视图,不重新读取、不写入、不改任何行的启停状态;两种范围下开关行为一致:每行提供启停开关,调用官方 `pluginManager` 远端的 `setPluginEnabled` 写入 profile 补丁层并热应用(带 HMR 的 profile 无需重启);官方 manager 判定为只读的行(`management-required` / `unaddressable`)显示为禁用开关并标明锁类型,本包不自建白名单;切换被接受后界面重读 Loader 确认状态,失败则按官方 `error.code` 呈现提示。
|
|
29
|
-
- 在内置插件分组下方提供只读的「Agent
|
|
30
|
+
- 在内置插件分组下方提供只读的「Agent 预设」区块:每个预设默认是一行折叠摘要,显示组合行总数与已开启数;展开后按可用宽度分栏列出组合行与状态(启用、停用、条件启用及表达式),由于预设行由组合决定,此处不提供启停开关。无法读取的组合会自动展开并显示原因。
|
|
30
31
|
|
|
31
32
|
## 安装
|
|
32
33
|
|
|
@@ -78,8 +79,6 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-plugin-manager
|
|
|
78
79
|
- npm 运行时的启动预检(`--dump-config`)能抓组合失败,静态 insert 检查能抓引用不存在包的 insert 行;真正的运行时 import/apply 失败仍要到下次启动才暴露。
|
|
79
80
|
- 重复挂载保护(网关模式):官方 CLI 的 bundle 对账会在任何安装/卸载后把所有声明 `dsh.bundle` 的依赖重新加进 `dsh.profile.bundles`——包括组合树里已由 patch 行挂载的包(bundle 以 patch 行挂载外部插件时),下次启动会重复挂载而失败(`duplicate prefix route`)。每次 CLI 变更成功后,网关只把「本次新增且已被 patch 行挂载」的 bundles 条目剥除(清单写入走备份 + tmp + 原子 rename),并在任务结果上为每个被剥除的条目发一条 notice;正常安装的 bundles 条目与用户此前已有的条目一律不动。
|
|
80
81
|
- wire 形状镜像官方安装器协议;漂移时宽容解析器降级为错误行,不误操作。
|
|
81
|
-
- 设置界面「内置插件」分区下线:本包 `cordis.patch.yml` 包含一条顶层裸行 `- id: ui-settings-plugins` 并置 `disabled: true`,聚合层在 `@deepseek-ai/dsh-web-app` 之后应用因此覆盖生效,下线原设置分区;相关管理能力集中移至官方「插件」页的「内置插件」分组,禁用本包即可恢复原设置分区。
|
|
82
|
-
- 官方插件页提示文案残留:官方「插件」页说明文案仍写有「内置插件列表及运行状态可在『设置 → 内置插件』中查看」,但该设置入口已被本包下线;该提示属于官方 bundle 的既有文案,本仓库无法修改。
|
|
83
82
|
|
|
84
83
|
## 安全模型
|
|
85
84
|
|
package/cordis.patch.yml
CHANGED
|
@@ -18,12 +18,3 @@
|
|
|
18
18
|
- insert:
|
|
19
19
|
- id: ui-plugin-manager-update-check
|
|
20
20
|
name: '@linxin666/dsh-client-ui-plugin-manager'
|
|
21
|
-
|
|
22
|
-
# The official @deepseek-ai/dsh-client-ui-settings-plugins section listed the
|
|
23
|
-
# built-in rows in Settings; they now render at the bottom of the official Plugins
|
|
24
|
-
# page, beside the manager that toggles them, so that settings-only view is retired.
|
|
25
|
-
# A top-level bare row patches an already-mounted row by id — it spends none of the
|
|
26
|
-
# loader's id namespace, and the aggregate carries it into the profile patch
|
|
27
|
-
# verbatim, applying this layer after @deepseek-ai/dsh-web-app.
|
|
28
|
-
- id: ui-settings-plugins
|
|
29
|
-
disabled: true
|