安装手册
August 8, 2026 · View on GitHub
English | 中文
dsh-skins 的仓库根现在就是一个可安装的官方 Profile Bundle:package.json 声明 dsh.bundle.patch 与 dshClient,cordis.patch.yml 只向官方配置树插入一个 Web Client Bundle。真正的加载、依赖注入、Cordis 生命周期和 HMR 仍由 DeepSeek Harness 负责;OMDSH 只在外面补不可变市场元数据与 Profile generation 事务。
这不是第二套插件 Loader,也不要求发布 npm 包。NDA 阶段安装源是带 40 位 commit 的私有 Git 仓库。
路径一:OMDSH 市场事务安装(推荐)
omdsh market install dsh-web-skins --profile web --enable
omdsh activate --profile web
omdsh launch --profile web --
omdsh market install 只接收 Registry 条目 id。Runtime 从审核后的 Atlas Registry 解析 @dsh-external/dsh-web-skins 和不可变 Git spec,在独立 candidate generation 中调用官方 dsh plugin,默认传 --ignore-scripts,再以 dsh --dump-config 验证。只有 activate 后候选才成为当前版本;launch 收到官方 runtime-ready 确认后才提交这次启动。
私仓安装需要当前用户对 dsh-external/dsh-skins 有读权限,并让 Git 凭据可供 pnpm 使用。市场不会代替 GitHub 鉴权,也不会把 Token 写进 Registry。
路径二:直接使用官方 Profile CLI(调试/兜底)
dsh plugin --profile web add 'git+https://github.com/dsh-external/dsh-skins.git#<40-char-commit>' --ignore-scripts
这是 0807 Harness 自带的底层原语,会把根包加入 Profile dependencies,并把 @dsh-external/dsh-web-skins 加入 dsh.profile.bundles。它适合开发调试,但会直接修改活动 Profile,没有 OMDSH candidate/current/previous 的跨重启事务边界。
开发者本地验证
源码类型检查需要一份可访问的官方 DSH 快照作为兄弟目录 fulltest-wt/。该快照只提供私有类型与真实冒烟环境,不会进入插件包。
workspace/
├── fulltest-wt/ # private DSH snapshot checkout
└── dsh-skins/ # this repository
git clone https://github.com/dsh-external/dsh-skins.git
ln -s /path/to/private-dsh-snapshot ../fulltest-wt
pnpm install --ignore-scripts
pnpm verify
dsh plugin --profile web add 'file:/absolute/path/to/dsh-skins' --ignore-scripts
本地 file: 依赖可能被 pnpm 缓存;在同一路径重建产物后,移除并重新添加该包即可刷新。正式市场安装使用变化的不可变 commit spec,不存在这个问题。
实际装入了什么
- 根
package.json是 Git 可安装包,声明官方dsh.bundle.patch,且没有preinstall/install/postinstall/prepare脚本。 cordis.patch.yml只插入@dsh-external/dsh-web-skins;它不替换 Profile、不修改 Harness 核心。packages/dsh-web-skins/lib/client.js是官方 Client Module Loader 消费的浏览器 bundle;ctx.slots.inject()、ThemeService、Cordis effect/dispose 与 HMR 均复用官方实现。- 背景资源内联在 bundle 中;插件不启动独立服务、不写外部数据库,也没有需要补偿的外部副作用。
验证
- 启动后打开 设置 → 通用设置,应看到“皮肤”行以及 Nord、极光、纸张、云梦四个选项。
- 点击任意皮肤应立即选中并换肤;切回浅色/深色/跟随系统后,插件拥有的
body[data-ds-skin]与样式应被回收。 - 页面 boot manifest 应包含
@dsh-external/dsh-web-skins,客户端地址为/plugins/@dsh-external/dsh-web-skins/client.js。
更新、恢复与卸载
Registry 切换到新 commit 后,再执行同一个市场安装命令会生成新的 candidate;不要使用隐式 latest:
omdsh market install dsh-web-skins --profile web --enable
omdsh activate --profile web
omdsh launch --profile web --
omdsh recover --profile web
卸载也先生成 candidate,再显式激活:
omdsh uninstall @dsh-external/dsh-web-skins --profile web
omdsh activate --profile web
恢复边界
- 官方 HMR 负责一次运行中的 client tree last-good:新 bundle 导入失败会展示错误并保留上一个可用树。
- OMDSH 负责安装代际:候选验证失败不会污染 current;激活后若启动确认前失败,launcher 可切回 previous。
- “恢复”只恢复 Profile 制品选择,不撤销插件已经造成的网络、文件或数据库副作用。本插件没有这类外部写入,因此实际恢复范围接近完整。
- 直接运行
dsh plugin会绕过 OMDSH 事务;需要可恢复安装时应走市场命令。