@linxin666/dsh-client-ui-plugin-manager 0.4.12 → 0.4.14

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: 5d35d6f70cb0a3d917c56cab48e34e1c9592d8db
6
- README.zh.md: cb538a8fb9b665d762c5b44698c88285a3027da8
5
+ README.md: c62f7076c35f041d7105ab77a6107f827e7cdf52
6
+ README.zh.md: 89a05c6af18333e5335a9ef789fa381b075c3183
package/README.md CHANGED
@@ -25,6 +25,8 @@ An update and lifecycle manager for DeepSeek Harness (DSH) Web GUI and official
25
25
  - 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
26
  - 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
27
  - 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
+ - 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. Expanding and collapsing only switches between the two 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, displaying each preset's composed rows and status (enabled, disabled, or conditionally enabled with expression) without switches since preset rows are determined by composition.
28
30
 
29
31
  ## Install
30
32
 
@@ -71,16 +73,18 @@ The contract source of truth is `src/core/service.ts` (`PluginManagerService`).
71
73
  - 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
74
  - 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
75
  - 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
- - 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 official shell answers a host exit with `fail("dsh desktop host stopped")` and an error page, because it exposes no way to ask the shell to restart — so the host exits there only when the shell exports `DSH_SHELL_RESTARTS_HOST=1`, its own declaration that an exiting host is brought back. Without that guarantee the restart panel states that this process cannot restart itself, names the manual way out (quit DeepSeek Harness and open it again), and offers no confirmation button: that path would not restart anything. 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.
76
+ - Restart is explicit, user-clicked and four-mode. The route is method-aware: `GET /api/plugin-manager/restart` reads the plan (returning `{ restart: { mode, unit? } }` with no side effects, so a prefetch or a typed URL can never stop a host) and `POST` carries it out (responding with `{ restart: { mode } }`); 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 a provable systemd user service (`INVOCATION_ID` exists, cgroup ends in `*.service` under `/user.slice/`, and `$XDG_RUNTIME_DIR/systemd/private` exists; system scope and other supervised launches remain manual), the confirmation panel explicitly names the unit to be restarted, and the host strictly answers 202 before requesting systemd to run `systemctl --user restart <unit>` (because systemd begins the stop job as soon as the request is queued), logging any failure to `$DSH_HOME/logs/plugin-manager-restart.log` while continuing to serve. 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 official shell answers a host exit with `fail("dsh desktop host stopped")` and an error page, because it exposes no way to ask the shell to restart — so the host exits there only when the shell exports `DSH_SHELL_RESTARTS_HOST=1`, its own declaration that an exiting host is brought back. Without that guarantee the restart panel states that this process cannot restart itself, names the manual way out (quit DeepSeek Harness and open it again), and offers no confirmation button: that path would not restart anything. A launch with no terminal and no provable systemd user service (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
77
  - 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).
76
78
  - 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.
77
79
  - 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.
78
80
  - 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.
79
83
 
80
84
  ## Security model
81
85
 
82
86
  - 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
- - 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 stops this process only when the shell declares `DSH_SHELL_RESTARTS_HOST=1`. 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.
87
+ - 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 or a provable systemd user service (delegating solely to `systemctl --user restart <unit>` while leaving system scope and other supervision in manual mode), and under the packaged Desktop app it stops this process only when the shell declares `DSH_SHELL_RESTARTS_HOST=1`. 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
88
  - 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
89
  - 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
90
  - 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.
package/README.zh.md CHANGED
@@ -25,6 +25,8 @@
25
25
  - 检测旧聚合包 `@linxin666/dsh-web-ui-all`,把更新动作转换为到 `@linxin666/dsh-web-all` 的事务迁移;网关先移除旧包、安装精确版本的新包、恢复旧聚合包的层顺序,并在 `--dump-config` 通过后才报告成功。
26
26
  - 更新前校验 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
27
  - npm 运行时保护下次启动:安装后网关校验依赖真实落盘、拒绝重复入口 id 认领与引用不可解析包的 insert 行,并用 CLI 的 `--dump-config` 做组合预检;冲突或失败的安装会经官方 remove 路径自动回滚,绝不触碰现有插件。
28
+ - 在官方「插件」页列表最下方挂载「内置插件」分组,因官方页面未提供列表底部扩展槽位,该分组与检查更新工具条一样作为独立 React root 容器插入官方 DOM,在页面重绘或切换面板时自动复位或摘除。分组默认只列「没有任何已安装 bundle 的补丁所插入」的 Loader 行(本部署是 8 行),采用减法口径使 profile 补丁 insert 块中的行(例如 Computer Use 的 `computer-use` 与 `computer-use-cua-driver-native`)得以正常呈现;分组标题旁的控件可以展开,展开后在同一列表里追加其余全部 Loader 行(本部署是 230 行),每条已归属行会显示「来自 <bundle 包名>」,说明它同时出现在那个组合包的详情页里。展开/收起只切换已读取到的两个集合,不重新读取、不写入、不改任何行的启停状态;两种范围下开关行为一致:每行提供启停开关,调用官方 `pluginManager` 远端的 `setPluginEnabled` 写入 profile 补丁层并热应用(带 HMR 的 profile 无需重启);官方 manager 判定为只读的行(`management-required` / `unaddressable`)显示为禁用开关并标明锁类型,本包不自建白名单;切换被接受后界面重读 Loader 确认状态,失败则按官方 `error.code` 呈现提示。
29
+ - 在内置插件分组下方提供只读的「Agent 预设」区块,列出每个预设的组合行与状态(启用、停用、条件启用及表达式);由于预设行由组合决定,此处不提供启停开关。
28
30
 
29
31
  ## 安装
30
32
 
@@ -71,16 +73,18 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-plugin-manager
71
73
  - 应用自有 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
74
  - 兼容性门禁只在目标清单声明了最低 DSH 版本时生效;未声明 `dsh.engines.dsh` 的包更新不被检查,官方安装器运行时(DSHCode 与 checkout 版 web)不经过本门禁(其更新走官方安装器)。运行中的 DSH 版本读取安装自身的 `@deepseek-ai/dsh` 清单——启动器把它作为 profile 的 install anchor 发布——无需子进程、无需 PATH,因此打包桌面端也能作答;运行时不发布 anchor 时回退到 `dsh --version`。宿主完全无法核验的要求按「无法确认」呈现,而不是报成低于下限:两者都拦住更新,但只有后者会让用户去升级 DSH。
73
75
  - npm 运行时上的启停显示下次启动的真实生效值:profile 覆盖行优先,其次由所装 bundle 自带的 `disabled` 行决定(聚合包的按需开启家族),两层都未提及的行视为启用。开启一个被 bundle 停用的行会写入显式 `disabled: false` 覆盖行——只删除用户行只会退回 bundle 默认值;该运行时 loader 在下次启动时认读这些行,但这条路径不如官方桌面写入器经过充分锻炼。
74
- - 重启是显式、需用户点击且有三种模式的动作,路由按方法区分:`GET /api/plugin-manager/restart` 只读「重启方案」(无副作用,因此浏览器预取或直接输入 URL 都不会停掉宿主),`POST` 才执行;其他方法一律 405 拒绝。工具条先读方案,确认面板说的后果与实际执行的一致。终端启动(`dsh web`)时宿主启动一个 detached helper:等旧进程退出后按原命令行重新拉起,端口先释放再被替换进程绑定,替换进程的输出写入 `$DSH_HOME/logs/plugin-manager-restart.log`。打包桌面应用下本插件无法重启任何东西——进程树归 Electron,detached 重拉只会与桌面外壳抢同一端口,而官方外壳对宿主退出只做 `fail("dsh desktop host stopped")` 并显示错误页,没有「请壳重启宿主」的通道——因此桌面端只在壳导出 `DSH_SHELL_RESTARTS_HOST=1`(宣告会把退出的宿主重新拉起)时才让宿主退出;壳没有这个保证时,重启面板如实写「当前进程无法自动重启,请手动重启 DSH。」、给出替代路径——退出 DeepSeek Harness 后重新打开,并且不提供确认按钮。无终端的启动(受监督进程、编辑器任务)同样保持不动,工具条提示手动重启。不重启时,更新后的插件代码在下次启动生效。
76
+ - 重启是显式、需用户点击且有四种模式的动作,路由按方法区分:`GET /api/plugin-manager/restart` 只读「重启方案」(wire 形状为 `{ restart: { mode, unit? } }`,无副作用,因此浏览器预取或直接输入 URL 都不会停掉宿主),`POST` 才执行(应答 `{ restart: { mode } }`);其他方法一律 405 拒绝。工具条先读方案,确认面板说的后果与实际执行的一致。终端启动(`dsh web`)时宿主启动一个 detached helper:等旧进程退出后按原命令行重新拉起,端口先释放再被替换进程绑定,替换进程的输出写入 `$DSH_HOME/logs/plugin-manager-restart.log`。可证明的 systemd 用户服务下(`INVOCATION_ID` 存在、cgroup 末段是 `*.service`、路径在 `/user.slice/` 下且 `$XDG_RUNTIME_DIR/systemd/private` 存在;system scope 与其它受监督启动维持 manual),确认面板会明确写明将要重启的 unit 名;执行时严格先应答 202 再请 systemd 执行 `systemctl --user restart <unit>` 由 systemd 停旧起新(因 stop job 在请求入队即开始),若命令失败只记录到 `$DSH_HOME/logs/plugin-manager-restart.log`,宿主继续服务。打包桌面应用下本插件无法重启任何东西——进程树归 Electron,detached 重拉只会与桌面外壳抢同一端口,而官方外壳对宿主退出只做 `fail("dsh desktop host stopped")` 并显示错误页,没有「请壳重启宿主」的通道——因此桌面端只在壳导出 `DSH_SHELL_RESTARTS_HOST=1`(宣告会把退出的宿主重新拉起)时才让宿主退出;壳没有这个保证时,重启面板如实写「当前进程无法自动重启,请手动重启 DSH。」、给出替代路径——退出 DeepSeek Harness 后重新打开,并且不提供确认按钮。无终端且非可证明 systemd 用户服务的启动(受监督进程、编辑器任务)同样保持不动,工具条提示手动重启。不重启时,更新后的插件代码在下次启动生效。
75
77
  - npm 运行时上重复 insert id 认领在安装后即被检出并自动回滚新插件(共享 id 写 disabled 无法阻止 loader 的重复检查,只会误伤现有插件)。
76
78
  - npm 运行时的启动预检(`--dump-config`)能抓组合失败,静态 insert 检查能抓引用不存在包的 insert 行;真正的运行时 import/apply 失败仍要到下次启动才暴露。
77
79
  - 重复挂载保护(网关模式):官方 CLI 的 bundle 对账会在任何安装/卸载后把所有声明 `dsh.bundle` 的依赖重新加进 `dsh.profile.bundles`——包括组合树里已由 patch 行挂载的包(bundle 以 patch 行挂载外部插件时),下次启动会重复挂载而失败(`duplicate prefix route`)。每次 CLI 变更成功后,网关只把「本次新增且已被 patch 行挂载」的 bundles 条目剥除(清单写入走备份 + tmp + 原子 rename),并在任务结果上为每个被剥除的条目发一条 notice;正常安装的 bundles 条目与用户此前已有的条目一律不动。
78
80
  - wire 形状镜像官方安装器协议;漂移时宽容解析器降级为错误行,不误操作。
81
+ - 设置界面「内置插件」分区下线:本包 `cordis.patch.yml` 包含一条顶层裸行 `- id: ui-settings-plugins` 并置 `disabled: true`,聚合层在 `@deepseek-ai/dsh-web-app` 之后应用因此覆盖生效,下线原设置分区;相关管理能力集中移至官方「插件」页的「内置插件」分组,禁用本包即可恢复原设置分区。
82
+ - 官方插件页提示文案残留:官方「插件」页说明文案仍写有「内置插件列表及运行状态可在『设置 → 内置插件』中查看」,但该设置入口已被本包下线;该提示属于官方 bundle 的既有文案,本仓库无法修改。
79
83
 
80
84
  ## 安全模型
81
85
 
82
86
  - 信任边界是 loopback 门禁:每条网关路由都要求 loopback socket 地址、loopback Host 头与非跨站来源(socket + Host + Origin + `sec-fetch-site` 四重),与官方安装器通道同一权威。远程来源的浏览器没有可达路径;被拒请求返回 HTTP 403 与 `{ ok: false, error: "forbidden: loopback-only" }`。
83
- - 变更类路由(install / update / remove / set-enabled / restart)不带 token:loopback 权威即本机用户,与官方通道同模型。重启路由是唯一作用在进程层面的路由:它绝不臆造命令行(只重放本进程自身的 `execPath` + argv,并剔除 inspector 开关),对无法确认为终端启动的宿主拒绝重拉,在打包桌面应用下只在壳声明 `DSH_SHELL_RESTARTS_HOST=1` 时才让本进程退出。因此任何本机进程都能驱动插件安装与卸载,且 npm 安装会执行包的 install 脚本——请将本网关视为「设计上即本机代码执行」,绝不暴露到 loopback 之外。
87
+ - 变更类路由(install / update / remove / set-enabled / restart)不带 token:loopback 权威即本机用户,与官方通道同模型。重启路由是唯一作用在进程层面的路由:它绝不臆造命令行(只重放本进程自身的 `execPath` + argv,并剔除 inspector 开关),对无法确认为终端启动或可证明 systemd 用户服务的宿主拒绝重拉(只认受控的 `systemctl --user restart <unit>`,system scope 与其它受监督启动维持 manual),在打包桌面应用下只在壳声明 `DSH_SHELL_RESTARTS_HOST=1` 时才让本进程退出。因此任何本机进程都能驱动插件安装与卸载,且 npm 安装会执行包的 install 脚本——请将本网关视为「设计上即本机代码执行」,绝不暴露到 loopback 之外。
84
88
  - 安装 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
89
  - 变更经同一队列串行,并发任务的 before/after profile 快照绝不交错。安装只有在依赖真实落入 profile 后才判 done(卸载以依赖消失为准),绝不轻信成功退出码。
86
90
  - 启停操作会在该变更队列内重新读取最新 profile 清单,并在写入前以 `404` 拒绝过期或未知的包 id,因此卸载后遗留在面板里的旧行不会制造孤儿 `disabled` 覆盖。
package/cordis.patch.yml CHANGED
@@ -18,3 +18,12 @@
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