DeepSeek Harness 插件

dsh-live2d-pet

Live2D companion for DeepSeek Harness: render a Cubism model (e.g. the official Haru sample) in the web UI with state-driven expressions and mouse tracking. · DSH 桌宠的 Live2D 渲染插件(英文原文)

跳到安装方式

来源信息

GitHub 仓库
ankesu/dsh-live2d-pet
最近更新
2026年8月17日
分类
趣味扩展
GitHub stars
2
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/ankesu/dsh-live2d-pet
插件名:dsh-live2d-pet
作者:ankesu

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-live2d-pet

> A Live2D companion for DeepSeek Harness: renders a Cubism model as a floating companion in the Web UI, with state-driven expressions and mouse tracking. > > DSH 桌宠的 Live2D 渲染插件:在 Web UI 里渲染一个 Cubism 模型,带表情切换和鼠标跟随。

![preview](docs/preview.png)

Features / 功能

  • 🐳 Real Live2D model — powered by pixi-live2d-display (Cubism 4), rendered on a floating canvas
  • 👀 Mouse tracking — head turns and gaze follow your cursor (ParamAngleX/Y, ParamEyeBallX/Y)
  • 😊 Expression switching — the model's .exp3.json expressions map to harness activity states (idle/waiting/thinking/tool/done)
  • 🎛️ Config-driven geometry — size/position come from cordis.patch.yml, tweak without rebuilding
  • 💾 localStorage toggledsh-live2d-pet key, survives refreshes

Install / 安装

# from a local checkout (or use a link: dependency)
dsh plugin --profile web add link:/path/to/dsh-live2d-pet
# or from npm
dsh plugin --profile web add dsh-live2d-pet

Enable / 启用(必读!)

> ⚠️ The model does NOT appear automatically after install. You must run > one line in the browser console first: > ⚠️ 装完不会自动显示! 必须先在浏览器控制台执行下面这行:

localStorage.setItem('dsh-live2d-pet', '1')

1. Open the DSH web page (the profile where you installed the plugin) 2. Press F12 → Console tab 3. Paste localStorage.setItem('dsh-live2d-pet', '1') and press Enter 4. Reload the page (F5)

The model then floats bottom-right (or wherever you configure). The setting persists across refreshes and server restarts — you only do this once per browser.

To disable:

localStorage.setItem('dsh-live2d-pet', '0')

Configuration / 配置

cordis.patch.yml:

- insert:
    - id: live2d-pet
      name: dsh-live2d-pet
      config:
        model: haru/haru_greeter_t03.model3.json  # path under assets/live2d/
        size: 320                                  # canvas size, px
        right: 24                                  # distance from right edge, px
        bottom: 100                                # distance from bottom edge, px

Drop any Cubism 4 model into assets/live2d/ and point model at it — swap in your own character without touching code.

Bundled model / 附带模型

The official Haru sample model (Live2D Inc.) is bundled under its official sample-model license for testing. Replace it with your own model for production use.

Architecture notes / 架构要点

  • Host half injects the Cubism core script (live2dcubismcore.min.js) into

the document head before the client bundle evaluates — pixi-live2d-display checks window.Live2DCubismCore at module time.

  • Model assets are served from /pet/live2d/* (prefix route; the webserver

matches prefixes with ${prefix}/, so the path must have no trailing slash).

  • The client bundle imports pixi-live2d-display/cubism4 (not the main

entry) to skip the Cubism 2 runtime check.

  • Static imports only — the DSH client module system cannot load split

chunks, so pixi is fully inlined (≈1.6 MB).

  • Node builtins in dependencies (e.g. @pixi/utils's `import { parse } from

'url') are shimmed at build time by the dsh-client-url-shim plugin (inlined copy in scripts/url-shim.js`).

All of these mines were cleared in an isolated test profile before shipping — details in the companion write-up (TBD).

License

MIT. The bundled Haru model remains © Live2D Inc. (official sample-model license).