dsh-pet
PC2005-cloud/dsh-petDSH Web UI 桌面宠物,Windows / macOS / Linux 三端可用:浏览器浮层或透明置顶桌面窗口,106 个透明动画、带挤压与粒子的甩抛反弹物理、随会话事件实时联动的工作状态气泡、碎碎念与带持久记忆的对话、余额展示、表情包配图、多开同屏,并支持直接放入的自定义动画与宠物种类(pet pack)。
独立置顶窗口的桌面宠物:直接导入 ~/.codex/pets 的 Codex 宠物,含亲密度段位、会话活动气泡、贴边吸附拖拽、右键可达的智能鼠标穿透;已装 dsh-usage 时自动对齐其当日 token 台账。
A desktop-pet plugin for DeepSeek Harness — the Codex pet experience, fully ported to your desktop.
A self-contained DSH harness plugin: when the harness starts, a frame-animated pet lives on your desktop. No web-pet dependency — it ships its own state machine, chatter engine and pet registry, and subscribes directly to harness session events.
~/.codex/pets — also auto-discovers ~/.dsh/pets and bundled assets/pets (pet.json + spritesheet.webp); the 9 standard tracks (idle / running-right / running-left / waving / jumping / failed / waiting / running / review) with per-pet tracks / sequences overrides+N badgeRequires DSH Desktop (or any harness host with the web server).
dsh plugin --profile web add @qiqibabyy/dsh-pet-desktop
# local development:
dsh plugin --profile web add link:../dsh-pet-desktop
Electron runtime lookup order (first hit wins):
electronPath settingDSH_PET_ELECTRON env varnode_modules/electron/dist/electron.exe%APPDATA%/npm/node_modules/electron (Windows)If nothing is found the settings card says so in red; npm i -g electron fixes it everywhere.
Format details: assets/pets/README.md. Sources scanned in order (later overrides same pet ids):
assets/pets/${CODEX_HOME:-~/.codex}/pets/ — native Codex directory${DSH_HOME:-~/.dsh}/pets/ — user directory (decorations/ subfolders scanned too)petDirs plugin configPets declaring renderer: live2d / frames2d are skipped by design — this plugin renders sprite2d atlases.
Drop them in as-is, zero conversion: copy a Codex pet folder (pet.json + atlas) into ~/.codex/pets/<id>/ and it is discovered automatically (CODEX_HOME is honored). Both Codex manifest generations are understood — the legacy flat hatch-pet shape and v2 sprite2d blocks. No CLI needed to swap pets: harness settings → "Desktop Pet" → the appearance picker; click a thumbnail and the companion re-skins live.
| points ≥ | rank | star trail |
|---|---|---|
| 0 | Baby Whale 幼鲸 | * |
| 25 | Companion 伙伴 | ** |
| 50 | Close Friend 挚友 | *** |
| 80 | Deep Sea Bond 深海羁绊 | **** |
| 200 | Kindred Spirit 心有灵犀 | ***** |
| 500 | Legendary Bond 传说羁绊 | ****** |
| 2000 | Mythic Bond 神话羁绊 | ******* |
| 10000 | Eternal Covenant 永恒之契 | ******** |
| 100000 | Lifelong Companion 鲸生共渡 | ********* |
Served by the plugin on the harness web port, loopback-only:
| Route | Purpose |
|---|---|
GET /api/desktop-pet/state?current=<sid> | full view for the companion renderer |
GET /api/desktop-pet/pets / decorations | registries |
POST /api/desktop-pet/interact {kind} | pet / feed (+reaction) |
POST /api/desktop-pet/set-pet / set-decoration / set-name / set-display / announce | verbs |
GET /api/desktop-pet/status · POST start / stop | companion supervisor |
GET /desktop-pet-assets/** | atlases & decoration frames (allow-listed, containment-checked) |
npm install # one runtime dep: schemastery
node scripts/smoke.mjs # host-free smoke test: registry / ledger / chatter / projection
| Path | Role |
|---|---|
index.js | plugin assembly (cordis host half) |
src/service.js | state machine + affinity ledger + event projection |
src/chatter.js | chatter engine (ported line-by-line from dsh-pet) |
src/registry.js | pet/decoration discovery (Codex v1 + v2 manifests) |
src/routes.js | loopback routes + asset serving |
src/supervisor.js | Electron companion process discovery/spawn/keepalive |
client.js | settings card (build-free CJS module-loader factory) |
companion/ | Electron overlay app (zero npm deps; any electron.exe runs it) |