@linxin666/dsh-client-ui-plugin-manager 0.3.24 → 0.4.0
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 +9 -9
- package/README.zh.md +9 -9
- package/icon.svg +3 -0
- package/lib/client.js +56 -281
- package/lib/client.js.map +1 -1
- package/lib/index.js +23 -1
- package/lib/types/client/PluginManagerTab.d.ts +1 -7
- package/lib/types/client/locales.d.ts +3 -45
- package/lib/types/core/repair.d.ts +3 -16
- package/lib/types/host/http.d.ts +18 -1
- package/package.json +19 -14
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: dad908f4c1d008094a043de97d2e7ea5f30ccf2f
|
|
6
|
+
README.zh.md: af0eef7d024cd22431dc802c3a92ae302dcf8aa1
|
package/README.md
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Update, conflict and repair tab for the dsh web GUI Plugins settings section: it keeps the surfaces the official plugin manager page does not own — registry update checks with DSH-runtime compatibility gating, the host-recorded install-conflict ledger with undo and a repair handoff, the boot-failure ring, and the safe-mode banner — and renders the plugin inventory read-only. Installing, uninstalling and switching plugins belong to the official page since 0.1.7-alpha.1.
|
|
6
6
|
|
|
7
7
|
## What it does
|
|
8
8
|
|
|
9
9
|
- Registers a `Plugin manager` tab in the official Plugins settings section (the `settings.plugins.tab` slot, order 20), next to the official installer tab.
|
|
10
10
|
- 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.
|
|
11
|
-
-
|
|
12
|
-
- Lists installed user plugins with
|
|
13
|
-
-
|
|
11
|
+
- Renders the inventory read-only and points at the official plugin manager page (the `Plugins` sidebar entry) for installing, uninstalling and switching a bundle or a row; the official page applies those changes live.
|
|
12
|
+
- Lists installed user plugins with name, version, source badge and effective state, with registry update checks (npm sources) and verified npm updates.
|
|
13
|
+
- Grouped aggregate rows stay readable: a bundle claiming several entry rows, such as `@linxin666/dsh-web-all`, expands into a child list showing every family plugin's effective state, with locked rows noted. The rows' switches live on the official page.
|
|
14
14
|
- The aggregate child list is collapsed by default: the row shows only a `N/M child plugins on` summary that expands on click, so a bundle carrying 20+ family rows no longer stretches the settings page.
|
|
15
15
|
- 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.
|
|
16
16
|
- 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), show the requirement beside the update button, disable the button when the running DSH is below it, and the host update route returns 412 before starting any CLI job when the runtime cannot be verified.
|
|
17
|
-
- Shows the built-in product
|
|
18
|
-
- Surfaces install-
|
|
17
|
+
- Shows the built-in product rows and their effective state when the official plugin-control surface exists; switching them happens on the official page.
|
|
18
|
+
- Surfaces the install-conflict ledger: the changes the host recorded around the last install or update through this package's gateway channel, or the product-snapshot diff around an update this tab performs on the official channel, with undo for reversible actions and an `Ask the agent to fix` handoff on every conflict row.
|
|
19
19
|
- 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 (the existing plugins are never touched), with the error and repair handoff on the error row.
|
|
20
|
-
- Renders the boot-failure ring per plugin with `Ask the agent to fix` (a repair conversation over the plugin install root) and `Copy error
|
|
20
|
+
- Renders the boot-failure ring per plugin with `Ask the agent to fix` (a repair conversation over the plugin install root) and `Copy error`.
|
|
21
21
|
- Shows the host's safe-mode banner and the `Restore normal mode` affordance (the web build applies it at the next manual restart).
|
|
22
22
|
|
|
23
23
|
## Install
|
|
@@ -41,7 +41,7 @@ Restart `dsh web`; the tab appears in the settings page's Plugins section.
|
|
|
41
41
|
|
|
42
42
|
## Config
|
|
43
43
|
|
|
44
|
-
The tab carries no configuration namespace.
|
|
44
|
+
The tab carries no configuration namespace. Update and conflict-undo writes apply at the next restart.
|
|
45
45
|
|
|
46
46
|
## Cordis service
|
|
47
47
|
|
|
@@ -68,7 +68,7 @@ The contract source of truth is `src/core/service.ts` (`PluginManagerService`).
|
|
|
68
68
|
- The web build has no in-place restart: changes apply at the next manual restart.
|
|
69
69
|
- Install-time conflict detection reports what the install actually changed (product rows in official mode, profile rows and bundle entries in gateway mode). 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); on official runtimes the host's own rules and the boot-failure ring own that case.
|
|
70
70
|
- 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, where official runtimes keep the failure ring and the npm runtime does not.
|
|
71
|
-
- 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 (
|
|
71
|
+
- 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.
|
|
72
72
|
- The wire shapes mirror the official installer tab protocol; on drift the tolerant parsers degrade to error rows rather than misbehaving.
|
|
73
73
|
- The repair conversation's workspace keeps its path-derived default title.
|
|
74
74
|
|
package/README.zh.md
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
面向 dsh web GUI
|
|
5
|
+
面向 dsh web GUI「插件」设置分区的更新与修复 Tab:只保留官方插件管理页不负责的部分——更新检查与 DSH 运行时兼容门禁、host 记录的安装冲突对账(可撤销、可转交修复)、启动失败环与安全模式横幅——插件清单以只读方式呈现。安装、卸载与启停自 0.1.7-alpha.1 起由官方页面负责。
|
|
6
6
|
|
|
7
7
|
## 功能
|
|
8
8
|
|
|
9
9
|
- 在官方「插件」设置分区注册「插件管理」Tab(`settings.plugins.tab` 槽位,order 20,与官方安装器 Tab 并列)。
|
|
10
10
|
- 双通道传输:带官方安装器服务的运行时(DSHCode 与 1.0.4 checkout 版 web)走官方 `/plugin-installer`、`/plugin-control` loopback RPC 通道;npm 发布的官方 web 没有这些通道,本包的 host 半区挂载 loopback 门禁的 HTTP 网关——安装/卸载 spawn 官方 `dsh plugin` CLI(唯一写入器),启停写入 `disabled` 覆盖行。
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
11
|
+
- 清单只读呈现,并指向官方插件管理页(侧边栏「插件」)执行安装、卸载与启停;官方页面的改动实时生效。
|
|
12
|
+
- 列出已装用户插件:名称、版本、来源徽标与生效状态,并提供更新检查(npm 源走 registry)与已核验的 npm 更新。
|
|
13
|
+
- 聚合包行仍可读:`@linxin666/dsh-web-all` 等声明多条入口行的聚合包展开为子行列表,逐个显示家族插件的生效状态,锁定行有标注;这些行的开关在官方页面上。
|
|
14
14
|
- 聚合包子插件列表默认收起:行上只显示「子插件 N/M 已启用」摘要,点击展开,携带 20+ 家族行的全家桶不再把设置页拉长。
|
|
15
15
|
- 检测旧聚合包 `@linxin666/dsh-web-ui-all`,把更新动作转换为到 `@linxin666/dsh-web-all` 的事务迁移;网关先移除旧包、安装精确版本的新包、恢复旧聚合包的层顺序,并在 `--dump-config` 通过后才报告成功。
|
|
16
16
|
- 更新前校验 DSH 运行时兼容(issue #754):更新检查读取最新版本清单声明的 DSH 最低版本(`dsh.engines.dsh`,兼容回退读顶层 `engines.dsh`),在更新按钮旁显示要求,运行 DSH 低于要求时禁用按钮;host 更新路由在启动任何 CLI 任务前若无法核实时也会返回 412 并拒绝。
|
|
17
|
-
- 官方 plugin-control
|
|
18
|
-
-
|
|
19
|
-
- 按插件渲染启动失败环:「让 Agent
|
|
17
|
+
- 官方 plugin-control 面存在时展示内置产品行及其生效状态;切换在官方页面上进行。
|
|
18
|
+
- 冲突对账:host 记录本包网关通道上最近一次安装/更新的层变化;官方通道上则对本次 Tab 执行的更新做产品快照前后 diff。可撤销的动作给一键撤销,每条冲突都给「让 Agent 修复」转交。
|
|
19
|
+
- 按插件渲染启动失败环:「让 Agent 修复」(以插件安装根为工作区的修复会话)与「复制错误」。
|
|
20
20
|
- 显示宿主安全模式横幅与「恢复正常模式」操作(web 端在下次手动重启时生效)。
|
|
21
21
|
- npm 运行时保护下次启动:安装后网关校验依赖真实落盘、拒绝重复入口 id 认领与引用不可解析包的 insert 行,并用 CLI 的 `--dump-config` 做组合预检;冲突或失败的安装会经官方 remove 路径自动回滚(绝不触碰现有插件),错误行带修复转交。
|
|
22
22
|
|
|
@@ -41,7 +41,7 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-plugin-manager
|
|
|
41
41
|
|
|
42
42
|
## 配置
|
|
43
43
|
|
|
44
|
-
本 Tab
|
|
44
|
+
本 Tab 不携带配置命名空间。更新与冲突撤销的写入在下次重启后生效。
|
|
45
45
|
|
|
46
46
|
## cordis 服务
|
|
47
47
|
|
|
@@ -68,7 +68,7 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-plugin-manager
|
|
|
68
68
|
- web 端无壳内重启:变更在下次手动重启后生效。
|
|
69
69
|
- 安装时冲突检测报告安装实际改了什么(官方模式为产品行;网关模式为 profile 行与 bundle 条目)。npm 运行时上重复 insert id 认领在安装后即被检出并自动回滚新插件(共享 id 写 disabled 无法阻止 loader 的重复检查,只会误伤现有插件);官方运行时由官方规则与失败环处置该类冲突。
|
|
70
70
|
- npm 运行时的启动预检(`--dump-config`)能抓组合失败,静态 insert 检查能抓引用不存在包的 insert 行;真正的运行时 import/apply 失败仍要到下次启动才暴露,官方运行时靠失败环呈现,npm 运行时没有失败环。
|
|
71
|
-
- 重复挂载保护(网关模式):官方 CLI 的 bundle 对账会在任何安装/卸载后把所有声明 `dsh.bundle` 的依赖重新加进 `dsh.profile.bundles`——包括组合树里已由 patch
|
|
71
|
+
- 重复挂载保护(网关模式):官方 CLI 的 bundle 对账会在任何安装/卸载后把所有声明 `dsh.bundle` 的依赖重新加进 `dsh.profile.bundles`——包括组合树里已由 patch 行挂载的包(bundle 以 patch 行挂载外部插件时),下次启动会重复挂载而失败(`duplicate prefix route`)。每次 CLI 变更成功后,网关只把「本次新增且已被 patch 行挂载」的 bundles 条目剥除(清单写入走备份 + tmp + 原子 rename),并在任务结果上为每个被剥除的条目发一条 notice;正常安装的 bundles 条目与用户此前已有的条目一律不动。
|
|
72
72
|
- wire 形状镜像官方安装器 Tab 协议;漂移时宽容解析器降级为错误行,不误操作。
|
|
73
73
|
- 修复会话工作区保留路径派生的默认标题。
|
|
74
74
|
|
package/icon.svg
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
+
<path fill="#4d6bfe" fill-rule="evenodd" d="M 67.5 120 L 70.5 120 L 72.5 121 L 80.5 129 L 81.5 129 L 84.5 132 L 85.5 132 L 90.5 136 L 93.5 137 L 95.5 139 L 101.5 142 L 103.5 142 L 106.5 144 L 111.5 145 L 112.5 146 L 115.5 146 L 119.5 148 Q 122.75 147.25 123.5 149 L 127.5 149 L 128.5 150 L 133.5 150 L 134.5 151 L 140.5 151 L 141.5 152 L 150.5 152 L 151.5 153 L 160.5 153 L 161.5 154 L 171.5 154 L 172.5 155 L 178.5 155 L 179.5 156 Q 183.5 155 184.5 157 L 189.5 157 Q 190.5 159 194.5 158 L 195.5 159 L 197.5 159 L 198.5 160 L 200.5 160 L 201.5 161 L 206.5 162 L 209.5 164 L 211.5 164 L 219.5 168 L 224.5 172 L 227.5 173 L 247 191.5 L 247 192.5 L 253 199.5 L 255.5 204 L 258 201.5 L 263 193.5 L 272.5 183 L 273.5 183 L 280.5 176 L 281.5 176 L 292.5 168 L 300.5 164 L 302.5 164 L 305.5 162 L 307.5 162 L 308.5 161 L 310.5 161 L 314.5 159 L 317.5 159 L 318.5 158 Q 321.75 158.75 322.5 157 L 326.5 157 L 327.5 156 L 331.5 156 L 332.5 155 L 337.5 155 L 338.5 154 L 348.5 154 L 349.5 153 L 358.5 153 L 359.5 152 L 368.5 152 L 369.5 151 L 376.5 151 L 377.5 150 L 383.5 150 L 384.5 149 L 388.5 149 L 389.5 148 L 392.5 148 L 393.5 147 L 396.5 147 L 397.5 146 L 399.5 146 L 400.5 145 L 405.5 144 L 423.5 135 L 426.5 132 L 431.5 129 L 439.5 121 L 441.5 120 L 444.5 120 L 448 123.5 L 448 140.5 L 447 141.5 L 447 149.5 L 446 150.5 L 446 154.5 L 445 155.5 Q 445.75 158.75 444 159.5 L 444 163.5 Q 442.25 164.25 443 167.5 L 440 173.5 L 439 178.5 L 435 185.5 L 435 187.5 L 432 193.5 L 430 195.5 L 429 198.5 L 427 200.5 L 425 204.5 L 419 211.5 L 419 212.5 L 402.5 229 L 401.5 229 L 394.5 235 L 393.5 235 L 388.5 239 L 385.5 240 L 383.5 242 L 371.5 248 L 369.5 248 L 364.5 251 L 362.5 251 L 361.5 252 L 359.5 252 L 358.5 253 L 356.5 253 L 355.5 254 L 353.5 254 L 349.5 256 L 342.5 257 L 338.5 259 L 335.5 259 L 334.5 260 L 327.5 261 L 326.5 262 L 324.5 262 L 323.5 263 L 321.5 263 L 320.5 264 L 318.5 264 L 317.5 265 L 312.5 266 L 309.5 268 L 307.5 268 L 295.5 275 L 288 282.5 Q 287.5 286 285 287.5 Q 285.5 290 284 290.5 L 284 293.5 L 283 294.5 L 283 311.5 L 284 312.5 L 284 318.5 L 285 319.5 L 285 323.5 L 286 324.5 L 286 328.5 Q 288 329.5 287 333.5 L 288 334.5 L 288 337.5 L 289 338.5 L 289 341.5 L 290 342.5 L 290 345.5 L 291 346.5 L 292 353.5 L 293 354.5 L 293 356.5 L 295 360.5 L 295 363.5 L 296 364.5 L 296 367.5 L 297 368.5 L 297 370.5 L 298 371.5 L 298 373.5 L 299 374.5 L 299 376.5 L 301 380.5 L 301 386.5 L 298.5 389 L 294.5 391 Q 292 390.5 291.5 392 L 286.5 392 L 285.5 393 L 272.5 393 L 271.5 394 L 240.5 394 L 239.5 393 L 227.5 393 L 226.5 392 L 221.5 392 Q 220.75 390.25 217.5 391 L 212 387.5 L 211 385.5 L 211 381.5 L 212 380.5 Q 211.5 378 213 377.5 L 213 374.5 L 214 373.5 L 214 371.5 L 216 367.5 L 216 364.5 L 217 363.5 L 217 361.5 L 219 357.5 L 219 354.5 L 221 350.5 L 221 347.5 L 222 346.5 L 222 343.5 L 223 342.5 L 223 339.5 L 224 338.5 L 224 335.5 L 225 334.5 Q 224.25 331.25 226 330.5 L 226 326.5 L 227 325.5 Q 226 321.5 228 320.5 L 228 315.5 L 229 314.5 L 229 292.5 L 228 291.5 L 227 286.5 L 225 284.5 L 223 280.5 L 219.5 277 L 218.5 277 L 212.5 272 L 202.5 267 L 200.5 267 L 197.5 265 L 194.5 265 L 193.5 264 L 191.5 264 L 190.5 263 L 188.5 263 L 184.5 261 L 181.5 261 L 180.5 260 L 173.5 259 L 172.5 258 L 170.5 258 L 166.5 256 L 159.5 255 L 158.5 254 L 156.5 254 L 155.5 253 L 150.5 252 L 147.5 250 L 145.5 250 L 142.5 248 L 140.5 248 L 128.5 242 L 123.5 238 L 120.5 237 L 109.5 228 L 108.5 228 L 95 214.5 L 95 213.5 L 87 204.5 L 84 198.5 L 82 196.5 L 80 191.5 L 77 187.5 L 77 185.5 L 72 175.5 L 72 173.5 L 71 172.5 L 71 170.5 L 69 166.5 L 69 163.5 L 68 162.5 Q 68.75 159.25 67 158.5 L 67 154.5 L 66 153.5 L 66 148.5 L 65 147.5 L 65 139.5 L 64 138.5 L 64 124.5 L 67.5 120 Z"/>
|
|
3
|
+
</svg>
|