dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Anime2.5DRig × DSH 桌宠:借助see-through,只凭一张干净背景的图像,即可获得带自动装配、发丝物理、表情动画和状态镜像的桌宠
Anime2.5DRig × DSH 桌宠:借助 see-through,只凭一张干净背景的图像,即可获得带自动装配、发丝物理、表情动画和状态镜像的桌宠。

| 项目 | 要求 |
|---|---|
| DeepSeek Harness (DSH) | 已验证 DSH 0.2.0-rc.2 |
| Node.js | `^22.19.0 |
| 包管理器 | pnpm / npm / bun |
| 浏览器 | Chrome / Edge / Firefox / Safari(需支持 WebGL) |
| 最后验证日期 | 2026-10-06 |
DSH 0.2.0-rc.2 兼容说明(当前版本,插件 0.4.0):0.2.0-rc.2 是一次较大的破坏性 变更,本插件已整体迁移:
@deepseek-ai/dsh-client-runtime被移除,客户端上下文类型改用@deepseek-ai/cordis的Context;ctx.settings.register / get / mutate旧注册面被SettingsForms(describe/mutate)取代,可热改字段改为 Schemastery.volatile()引用;- 待交互数据源由
uiSession.pendingInteractions改为uiSession.sessionStatus(Map<sessionId, { running, pendingInteraction, completionUnread }>);workspaces.openPath被ctx.remote.session.openWorkspacePath取代;- 平台模块表更新为 0.2.0-rc.2 的
@deepseek-ai/dsh-client-store/-ui-slots/-ui-primitives/-ui-dockkit。
版本对应关系:
0.4.x面向 DSH0.2.0-rc.2;0.3.x及更早面向 DSH0.1.0-rc.6~0.1.5-rc.x,已不再被当前源码支持(历史版本见 git 记录)。
dsh plugin --profile web add github:coldfish486/dsh-anime25d-pets
本插件随包附带已编译好的
lib/产物,安装后无需额外构建。 如通过 Release 包或 npm 安装,同样直接可用。
git clone https://github.com/coldfish486/dsh-anime25d-pets.git
cd dsh-anime25d-pets
pnpm install
pnpm build
dsh plugin --profile web add /path/to/dsh-anime25d-pets
# 从 GitHub 安装的可重新执行 add 拉取最新版,或进入插件目录后:
cd dsh-anime25d-pets
git pull
pnpm install
pnpm build
# 重新安装/重启 DSH
Release 正式包已包含
lib/产物,普通用户升级时不需要本地构建。
dsh plugin --profile web remove dsh-anime25d-pets
dsh plugin --profile web add github:coldfish486/dsh-anime25d-pets
# 重启 dsh web,并硬刷新页面(Ctrl/Cmd + Shift + R)
0.2.0-rc.2;仍在使用 0.1.x 的环境请继续用 0.3.0。$DSH_HOME/settings.yaml,改由 ctx.settings 写入当前
profile 的 Cordis 配置层。DSH 0.2.0 首次启动会把遗留 settings.yaml 的每个 section
一次性导入同 id 条目(随后文件改名为 settings.yaml.imported),原有
anime25d-pet 配置通常会自动带过来;若没有,把旧 section 内容补进插件条目的
config 即可。size / model / persona / fpsLimit / opacity / developerMode / debug /
showTapZones / animeParams / talk / rand / flip 现在是可热改字段
(Schemastery .volatile()):在「桌宠配置」页或浮动面板改完即时生效,不再重载插件。在 DSH 设置 →「桌宠配置」中关闭"启用桌宠"开关即可。
dsh plugin --profile web remove dsh-anime25d-pets
# 或手动删除:
# /root/.dsh/profiles/web/node_modules/dsh-anime25d-pets/
# 并从 /root/.dsh/profiles/web/package.json 中移除引用
.psd 地址(支持 HTTP URL 或本地绝对路径)# profile 的 cordis.patch.yml(或 DSH 0.2.0 首次导入的 settings.yaml.imported)
# 中 anime25d-pet 条目的参考配置;带 `.volatile()` 的字段也可在「桌宠配置」页热改。
- insert:
- id: anime25d-pet
name: dsh-anime25d-pets
config:
enabled: true
size: 200
model: sample # 使用内置示例模型
animeParams:
angleX: 0.2 # 左右转头
mouthOpen: 0.3 # 嘴巴张开
talk: true # 随机开口说话
rand: false # 随机小动作
flip: false # 左右镜像翻转
fpsLimit: 30 # 帧率限制(30 / 60 / 0=无限制)
opacity: 1.0 # 宠物透明度(0~1,含气泡)
persona: tsundere
| 配置项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
enabled | boolean | true | 插件总开关 |
size | number | 160 | 宠物尺寸(40~400 px) |
model | string | sample | 模型 ID(内置 preset 或自定义模型 ID) |
animeParams | object | {} | Anime2.5D 参数滑块(34 个参数) |
talk | boolean | false | 随机开口说话 |
rand | boolean | false | 随机小动作 |
flip | boolean | false | 左右镜像翻转桌宠(浮动面板同步管理) |
fpsLimit | number | 30 | 帧率限制(30 / 60 / 0=无限制) |
opacity | number | 1 | 宠物透明度(0~1,含气泡,DSH 设置页可调) |
persona | string | tsundere | 人设 ID |
developerMode | boolean | false | 开发者模式 |
debug | boolean | false | 调试面板 |
showTapZones | boolean | false | 显示点击分区 |
| 分组 | 参数 | 范围 | 默认 |
|---|---|---|---|
| 头部姿态 | angleX / angleY / angleZ | -1 ~ 1 | 0 |
| 眼睛 | eyeOpenL / eyeOpenR | 0 ~ 1 | 1 |
| 眼睛 | eyeX / eyeY | -1 ~ 1 | 0 |
| 眼睛 | irisScale | 0.5 ~ 1.3 | 1 |
| 眼睛 | eyeScaleL / eyeScaleR | 0.5 ~ 1.5 | 1 |
| 眼睛 | eyeEase | 0 ~ 1 | 0.3 |
| 眼睛 | eyeCY / eyeCAng | -1 ~ 1 | 0 |
| 眉毛 | brow | -1 ~ 1 | 0 |
| 眉毛 | browAngSym / browAngL / browAngR | -1 ~ 1 | 0 |
| 嘴巴 | mouthOpen | 0 ~ 1 | 0 |
| 嘴巴 | mouthForm | -1 ~ 1 | 0 |
| 嘴巴 | mouthCY / mouthCAng | -1 ~ 1 | 0 |
| 嘴巴 | mouthEase | 0 ~ 1 | 0.45 |
| 嘴巴 | mouthScale | 0.5 ~ 1.5 | 1 |
| 发型 | fhAmp | 0 ~ 3 | 2 |
| 发型 | fhSoft | 0 ~ 2 | 0.4 |
| 发型 | bangL / bangC / bangR | -1 ~ 1 | 0 |
| 身体物理 | body | -1 ~ 1 | 0 |
| 身体物理 | armY / armPos | -1 ~ 1 | 0 |
| 身体物理 | bust | 0 ~ 5 | 2.5 |
| 身体物理 | bustY | -1 ~ 3 | 1 |
| 身体物理 | physAmp | 0 ~ 3 | 2 |
| 身体物理 | soft | 0 ~ 2 | 2 |
| 变量 | 说明 |
|---|---|
DSH_HOME | DSH 配置目录(默认 ~/.dsh) |
无。本插件不存储凭据、不访问用户敏感数据。
| 数据/资源 | 访问方式 | 说明 |
|---|---|---|
| 本地 PSD 文件 | node:fs 读取 | 仅在用户配置了本地模型路径时读取 |
| 设置配置 | DSH ctx.settings(SettingsForms) | 读写当前 profile 的 Cordis 配置层(0.2.0-rc.2;旧的 settings.yaml 由 DSH 一次性导入) |
| 自定义模型配置 | ~/.dsh/anime25d-pet/custom-models.jsonc | JSONC 格式 |
| 静态资源 | HTTP 同源路由 | /pet-assets/*、/pet-local-models/* |
| 网络访问 | 无 | 不发起外部网络请求(除非用户配置了远程 PSD URL) |
| 摄像头 | 无 | 不访问摄像头 |
| 现象 | 原因 | 解决 |
|---|---|---|
| 紫色 🐾 方块 | 模型加载失败 | 检查模型路径是否正确;检查 assets/lib/ 是否存在 |
| 空白画面 | WebGL 渲染问题 | 检查浏览器是否支持 WebGL;检查 canvas 尺寸 |
| 参数不生效 | 自动动画覆盖 | 手动设置参数后自动动画会跳过;开启自动动画会释放手动锁定 |
| 重启后参数丢失 | 持久化失败 | 检查当前 profile 的 cordis.patch.yml / 插件配置是否可写 |
| 点击分区不准确 | 坐标系不匹配 | 确认 getBounds() 使用 CSS 坐标系 |
DSH Host 日志:/var/log/dsh/dsh-web.log
# 通过 DSH 插件系统移除
dsh plugin --profile web remove dsh-anime25d-pets
# 或手动删除插件目录
rm -rf /root/.dsh/profiles/web/node_modules/dsh-anime25d-pets/
# 克隆仓库
git clone https://github.com/coldfish486/dsh-anime25d-pets.git
cd dsh-anime25d-pets
# 安装依赖
pnpm install
# 类型检查
pnpm run typecheck
# 测试
pnpm test
# 构建
pnpm build
# 构建产物在 lib/ 目录
dsh-anime25d-pets/
├── src/
│ ├── index.ts # Host 入口(插件 Config / 生命周期)
│ ├── service.ts # 宠物状态机 / SSE 推送
│ ├── routes.ts # HTTP 路由 / 静态资源
│ ├── models.ts # 模型类型定义
│ ├── models-host.ts # 模型 URL 解析
│ ├── local-models.ts # 本地 PSD 路径映射
│ ├── presets/ # 内置模型清单
│ └── client/
│ ├── index.ts # 桌宠主逻辑(加载/交互/面板)
│ ├── anime25d.ts # Anime2.5D 渲染引擎适配
│ ├── settings.ts # DSH 设置面板
│ ├── pending-state.ts # 待交互(等待审批)兼容层 + 单测
│ └── personas.ts # 人设台词
├── assets/
│ ├── vendor/ # ag-psd 等第三方库
│ ├── lib/ # rigger 等 Anime2.5DRig 资源
│ ├── models/ # 示例模型
│ ├── icons/ # 图标
│ └── demo.gif # 效果演示图
├── lib/ # 构建产物(pnpm build 生成,随仓库提交)
├── shared/ # DSH 客户端构建预设(tsdown / 平台模块表)
├── package.json
└── tsconfig.json
欢迎提交 PR!请确保:
pnpm run typecheck 通过pnpm test 通过本项目采用 MIT License(见 LICENSE)。
| 组件 | 用途 | 许可证 |
|---|---|---|
| Anime2.5DRig | WebGL 渲染引擎 / 自动装配 | MIT |
| ag-psd | PSD 解析器 | MIT |
| dsh-live2d-pets | 桌宠插件框架 | MIT |
assets/lib/eye_close.psd、assets/lib/mouth_close.psd、assets/models/sample.psd
来自 Anime2.5DRig 仓库(MIT License),
但 PSD 内的美术作品版权归各原作者所有。发布或分发前请确认版权。如发现安全问题,请通过 GitHub Issues 私密报告(不要公开漏洞详情)。