dsh-ui-web/packages/dsh-web-ui-all

34Stars2Forks0Issues0Watchers

DSH Web UI 全家桶聚合包,一键安装 task-board、aionui-panel、git-graph、pet、live-stats、usage-dashboard、ssh、web-ui-settings 及全部皮肤,并内置 DOM 兼容垫片与 crypto.randomUUID 兜底。

Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki

This plugin is a sub-package of the CAPTAIN1275/dsh-ui-web monorepo — stars and activity count the whole repository.

Language
TypeScript
License
Apache-2.0
Branch
main
dsh-plugindsh-plugin-marketdsh-plugins

Install

$ dsh plugin --profile web add github:CAPTAIN1275/dsh-ui-web/packages/dsh-web-ui-all

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin CAPTAIN1275/dsh-ui-web/packages/dsh-web-ui-all for me: review the repository at https://github.com/CAPTAIN1275/dsh-ui-web.git first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

一句话定位

DSH Web UI 全家桶的聚合载体包:一次安装即拉入 task-board、aionui-panel、git-graph、pet、live-stats、usage-dashboard、ssh、web-ui-settings、full-stats 与全部皮肤(含皮肤中心),并自带一个让老式 DOM 选择器仍能命中 dsh web 外壳的兼容垫片。本身不写任何业务功能,所有能力来自被聚合的子包。

核心能力

  • 聚合 11 个子包为单一安装:@captain1275/dsh-client-ui-aionui-panel / dsh-client-ui-task-board / dsh-client-ui-git-graph / dsh-pet / dsh-live-stats / dsh-usage-dashboard / dsh-ssh / dsh-client-ui-web-ui-settings / dsh-full-stats / dsh-skins / dsh-client-ui-skin-aurora,避免逐个挑选与逐次安装(package.json:22-34)。
  • 兼容垫片 (compat shim):当前 dsh web 外壳只渲染 css-module 类名(如 *_sidebarCol / *_centerCol / *_detailsCol)而不再带老式 data-pane / data-dsh-frame 属性时,本包浏览器半区按 [class*="sidebarCol"] 等选择器给三列容器与根容器补写属性,让按老选择器挂载的子插件与皮肤继续生效(src/client/index.ts:20-42)。
  • React 重渲染自动重打属性:通过 MutationObserver 监听整个 body 的 DOM 变化,React 重建列容器后自动补回属性;垫片只 setAttribute 固定值、不删节点、不改结构,与 React 协调互不干扰(src/client/index.ts:75-83)。
  • 移动端 crypto.randomUUID 兜底:部分旧版 WebView 与国产浏览器没有 crypto.randomUUID,会触发"crypto.randomUUID is not a function"导致官方模型目录等加载崩溃;本包在页面加载早期补一个 UUID v4 polyfill(优先用 getRandomValues,缺失时退到 Math.random),保住后续流程不崩(src/client/index.ts:45-64)。
  • 自动聚合脚本:aggregate.yml 是手写清单(patchFrom 收集子包 insert 行、deps 解析子包 name 写入本包 dependencies、self 加载聚合包自身的 host/client 半区),scripts/aggregate.mjs 据此重新生成 cordis.patch.ymlpackage.json#dependencies;CI 用 --check 模式校验一致性(aggregate.yml:9-32、scripts/aggregate.mjs:1-317)。

技术实现

  • 语言: TypeScript(ESM;host 与 browser 半区分层编译)
  • 关键依赖: @deepseek-ai/cordis(host 半区插件运行时类型);浏览器半区零第三方依赖;host 半区 apply 是空函数(src/index.ts:11-14、src/client/index.ts:67-83、tsdown.config.ts:1-8)
  • 架构模式: cordis bundle 聚合包 — aggregate.yml 是唯一手写清单,scripts/aggregate.mjs 据此生成 cordis.patch.yml(AUTO-GENERATED 头标禁止手改)与 package.json#dependencies;host 半区无业务逻辑(空 apply),浏览器半区是 DOM 兼容垫片 + crypto.randomUUID polyfill(src/index.ts:1-14、src/client/index.ts:17-83、cordis.patch.yml:1-3、aggregate.yml:1-32)
  • 入口文件: packages/dsh-web-ui-all/src/index.ts(host 入口,空 apply)、packages/dsh-web-ui-all/src/client/index.ts(compat shim 入口)、packages/dsh-web-ui-all/aggregate.yml(聚合清单)、packages/dsh-web-ui-all/cordis.patch.yml(自动生成的 cordis patch)、scripts/aggregate.mjs(聚合生成脚本)

适用场景

刚接触 DSH Web GUI、希望一条命令拿到完整增强体验(任务看板、右侧文件/预览面板、Git 图谱、看板娘、实时令牌、用量统计、SSH 运维、设置扩展、全部皮肤)但不想逐个挑选插件的用户。同时作为官方 dsh web 外壳更新后老插件失效时的兜底垫片,保证子插件按老选择器仍能挂载。

前置依赖与兼容性

依赖最低版本说明
DSH未声明(本包)本包 package.jsonengines;运行时通过 @deepseek-ai/dsh-* SDK 隐式锁定(子包 peerDependencies^0.1.0-rc.6,如 packages/dsh-pet/package.json:55-68、packages/dsh-task-board/package.json:37-43)
Node未声明(本包)本包 package.jsonengines;同仓子包 packages/dsh-pet/package.json:6-8、packages/dsh-git-graph/package.json:6-8、packages/dsh-ssh/package.json:6-8 均声明 ^22.19.0 || >=24.0.0
平台跨平台package.json#dsh.client.platform 声明 web(cordis.patch.yml 在 web profile 注册),宿主 dsh web 跨平台运行即可(package.json:12-20)
原生模块全部走 cordis bundle + 浏览器 Web DOM API + Node 标准库(node:fs / node:http / node:path),无 node-pty / node:sqlite 等 native binding

安装方式

dsh plugin --profile web add github:CAPTAIN1275/dsh-ui-web/packages/dsh-web-ui-all

安装后重启 dsh web 即可看到皮肤、任务看板、宠物、Git 图谱、用量看板等全部子能力。

配置项

本插件无需额外配置 — 聚合包本身无独立配置面,所有配置都走各子插件自己的设置项(在 dsh web 设置 → Web UI 插件分组里逐卡片启用/关闭,或编辑子插件各自的 JSON 配置文件)。

常见问题

Q: 安装完还需要做什么才能让插件生效?

A: 重启 dsh web。如果是源码开发模式,还需在仓库内 pnpm install && pnpm -r build,再 node scripts/link-profile.mjs 把本地包链接进 profile,最后重启 dsh web 才生效。

Q: 只想装其中一两个子插件怎么办?

A: 直接装对应独立子包即可(如 dsh plugin --profile web add @captain1275/dsh-pet),不必走本聚合包。本包安装会一次性激活全部子插件,无法只挑其中一部分。

Q: 跟同名独立插件包同时安装会冲突吗?

A: 会。聚合行 id(如 task-boardpetsshlive-stats)与独立子包 id 完全相同,cordis loader 会拒绝重复注册;切换前请先 dsh plugin remove 移除旧包,再装本聚合包(或反过来)。

Q: 本包代码里到底装了什么自定义逻辑?

A: host 半区没有任何业务逻辑(apply 是空函数);浏览器半区只有一个 compat shim,给 dsh web 外壳侧栏/中间/详情三列容器补上老式 data-pane / data-dsh-frame 属性,让按老选择器挂载的子插件与皮肤继续工作;并对旧 WebView 缺失的 crypto.randomUUID 做了 UUID v4 polyfill。

Q: 官方 dsh web 外壳升级后,本包还能正常工作吗?

A: 可以。compat shim 用 MutationObserver 监听整个 body 的 DOM 变化,React 重渲染重建列容器后会自动补回属性,且只写入固定属性值、不删节点、不破坏 React 协调,可幂等重复触发。

Q: 修改了子插件的 cordis.patch.yml 怎么同步到本包?

A: 不要直接改本包的 cordis.patch.yml(文件头明确标注 AUTO-GENERATED)。改 aggregate.ymlpatchFrom / deps 列表后执行 node scripts/aggregate.mjs,脚本会重新汇总子包 insert 行并写入本包 patch;CI 用 node scripts/aggregate.mjs --check 校验一致性。

Q: 升级到新版本后新版没有生效,怎么排查?

A: 改 profile 的 package.json 版本号后执行 pnpm install,顶层 node_modules/@captain1275/* 条目可能仍链接到旧版 store 目录。需要确认这些链接已指向新版,再重启 dsh web

上手难度

入门 — 一条命令安装,重启 dsh web 即生效;本包无独立配置面,所有能力由被聚合的子包自行提供。

已知问题与限制

  • 全家桶激活即全部子插件一并加载,无法只挑选部分;如需部分安装请改用对应独立子包(README.md:73-89)。
  • 聚合行 id 与独立子包 id 完全相同(如 task-boardpetsshlive-stats),不能与对应独立包同时安装;切换前先 dsh plugin remove 移除旧包(cordis.patch.yml:11-49、aggregate.yml:11-32)。
  • crypto.randomUUID polyfill 在浏览器既没有 crypto.randomUUID 也没有 crypto.getRandomValues 时会回退到 Math.random,生成的 UUID 不具备密码学强度;仅作为移动端老 WebView 上的兜底,不应用于安全敏感场景(src/client/index.ts:54-56)。
  • cordis.patch.yml 文件头明确标注 "AUTO-GENERATED by scripts/aggregate.mjs — do not edit",手改会被 node scripts/aggregate.mjs 覆盖(cordis.patch.yml:1-3)。
  • aggregate.yml 注释明确说明皮肤(packages/skins/<id>)不进入 patchFrom 段;皮肤资产由 packages/dsh-skins/build.mjs 单独打包到 dsh-skins/skins/<id>,皮肤启用互斥走 dsh-skin use,本包不接管(aggregate.yml:1-8)。
  • 本包的 cordis.patch.yml 注释顺序故意把 ui-web-ui-settings 排在 self 之后、其他插件之前,让设置组的 web-ui.plugin.item 子槽位最先声明,避免观感上的注册顺序歧义(aggregate.yml:5-8、cordis.patch.yml:5-14)。
  • 严格(isolated)profile 布局需在 profile 配 hoist(nodeLinker: hoistedpublic-hoist-pattern),否则聚合包的 workspace:* 依赖解析失败(docs/plugins.md:39-58)。

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/CAPTAIN1275/dsh-ui-web/packages/dsh-web-ui-all)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory