Skip to main content

dsh-web-ui/packages/dsh-pet

5.1kStars310Forks49Issues5Watchers

Registry-driven desktop pet companion for dsh web GUI. Model session activity drives animation switching. Pet and feed to increase intimacy. Supports custom pets and messages.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
Apache-2.0
Branch
dev
deepseek-harnessdshdsh-pluginweb-ui

Install

cmdweb profile
$ dsh plugin --profile web add @linxin666/dsh-pet

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 zhu1090093659/dsh-web-ui/packages/dsh-pet for me: review the repository at https://github.com/zhu1090093659/dsh-web 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.

One-Line Description

Adds a desktop pet companion fixed to the bottom-right corner of the dsh web GUI: model conversation activity drives animation switches, you can pet and feed to build affinity, and can plug in any custom sprite or Live2D pet via pet.json directory without code changes.

Core Features

  • Mount a floating sprite pet in the bottom-right corner; switch to different animations when the model is in six phases: waiting / thinking / using tools / organizing / completed / failed; completing triggers a jump, failing triggers a pause before returning to idle
  • Two interaction types: petting (10s cooldown, +1 affinity) and feeding dried fish (30s cooldown, +5 affinity, -1 stock); affinity has 9 levels from "Baby Whale" to "Whale Life Companion", capping won't block anything
  • Dried fish is scarce economy: +1 per 30 completed conversation rounds, +1 every 5 hours, stock cap 20, 10x slower than original Codex pace
  • Built-in two whale girls (original + refined version), and scans $DSH_HOME/pets/ user directory, ~/.codex/pets/ legacy directory, plus additional entries passed by embedding app via "registry"; same id auto-overwrites
  • Supports sprite2d sprite atlases (9 rows × 8 columns default contract) and Live2D models (v2 manifest); Live2D uses PixiJS on-demand loading via MIT vendor bundle
  • Floating panel provides rename, feed, hide+summon, drag to reposition; status bubbles rotate through scene-specific word banks, supports voice.json to replace all copy and button text

Technical Implementation

  • Language: TypeScript (with JSX) + Node.js (host half) + React 18 (browser half)
  • Key Dependencies: react / react-dom ^18.2.0 (peer, injected by host runtime), clsx (class name merging), schemastery (DSH config schema validation), Live2D on-demand loading via pixi.js + untitled-pixi-live2d-engine MIT vendor bundle
  • Architecture Pattern: Dual-half cordis bundle: src/index.ts is the host half (export const name='pet', cordis Service pet.*, register settings partition, mount /api/pet/* and /pet/<id>/* routes), src/client/index.ts is the browser half (createRoot → document.body global mount, poll host every 2 seconds, immediate fetch after visibilitychange wake, ctx.locale.register register Chinese/English dictionary, ctx.slots.inject('settings.section', …) register top-level settings card)
  • Entry Files: packages/dsh-pet/src/index.ts (host entry), packages/dsh-pet/src/client/index.ts (browser entry); cordis bundle declared in packages/dsh-pet/cordis.patch.yml:1-10 (insert id pet), browser dependencies in packages/dsh-pet/package.json:45-58 (inject 4 official @deepseek-ai/dsh-client-* modules + platform: web)

Use Cases

  • Users who want DSH Web GUI to be less monotonous during long model tasks while having the companion feel of "raising a pet": the pet swims around while the model thinks, jumps to celebrate upon completion;
  • Users who want to make a "signature sprite / mascot" for their work or community theme to put into DSH: just drop pet.json + atlas into $DSH_HOME/pets/ to go live, no plugin code changes needed;
  • Users who want to give the pet a different "personality script" (e.g., make a cat shout different slogans): place a voice.json in the pet directory for per-slot overrides.

Prerequisites & Compatibility

DependencyMinimum VersionNotes
DSH Host0.1.0-rc.6+ recommendedPackage doesn't declare minimum version in dsh.engines; devDependencies uniformly locked to @deepseek-ai/dsh-* ^0.1.0-rc.8, known host CLI is 0.1.0-rc.7/rc.8
Node.js^22.19.0 or >=24.0.0package.json engines.node
PlatformCross-platformHost half is Node.js, client half is browser, no OS restrictions
Native ModulesNoneRuntime dependencies only include clsx / schemastery; Live2D uses PixiJS and Live2D engine MIT vendor bundle, Cubism Core provided by user
React^18.2.0peerDependency, injected by host

Installation

dsh plugin --profile web add github:zhu1090093659/dsh-web-ui/packages/dsh-pet

Configuration Options

ConfigTypeDescriptionDefault
visibletoggleWhether to display the pet on screentrue
sizenumber (32–512, px)Pet display size (sprite single cell height)160
rightnumber (0–10000, px)Horizontal offset from viewport right edge24
bottomnumber (0–10000, px)Vertical offset from viewport bottom edge120
petIdstringCurrently selected pet id (chosen from registry)built-in default whale girl
enabledtogglePlugin master switch: when off, pet and API are both disabledtrue
decorationEnabledtoggleWhether to show small whale decoration before status bubblestrue
Interaction Cooldown (Pet)internal constant (affinity.petCooldownMs)Minimum interval between two pet actions, adjustable in source10000 ms
Interaction Cooldown (Feed)internal constant (affinity.feedCooldownMs)Minimum interval between two feed actions, adjustable in source30000 ms
Dried Fish Cap (treats.maxTreats)numberStock limit20
Affinity Cap (affinity.AFFINITY_MAX)numberAffinity points cumulative limit999999999

Note: "Interaction Cooldown / Dried Fish Cap / Affinity Cap" are defaults in source affinity.ts / treats.ts; to adjust, pass affinity / treats parameters via host config; regular users can use defaults.

FAQ

Q: Pet doesn't show after installation. What should I do?

A: Must restart dsh web after installation; registry is built only once at host startup; browser half gets list via /api/pet/pets, confirm you see two built-in options. If just blank, first check browser console for pet.state transport error, mostly occurs when browser half is disabled—go to Settings → Pet and turn "enabled" on. packages/dsh-pet/src/client/index.ts:114-119、165-184 / packages/dsh-pet/README.zh.md:271-272.

Q: I switched computers, will affinity and dried fish carry over?

A: Data is written to $DSH_HOME/pet.json (default ~/.dsh/pet.json), not in cloud. Manually copy this file to the same path on the new machine to restore all progress (affinity, naming, stock, position, custom pet id). packages/dsh-pet/src/persist.ts:77-167.

Q: Custom Live2D model won't display. Why?

A: Most likely missing Cubism Core. Live2D proprietary license prohibits redistribution; this plugin can't download it for you; get live2dcubismcore.min.js from Live2D official, place in $DSH_HOME/pets/.runtime/, then restart dsh web. If path is correct but still blank, check if atlas path matches live2d.model, and if model directory is under $DSH_HOME/pets/. packages/dsh-pet/README.zh.md:127-134.

Q: Multiple conversations running simultaneously, will pet lag or bubbles pile up?

A: No. Sprite animation follows the most recent meaningful activity; each top-level session has its own bubble, maximum 12 on screen, excess merged into +N badge on top-right of main bubble, hover to expand; sub-agents don't occupy independent bubbles, avoiding bubble stack of N dialogues + N sub-agents. packages/dsh-pet/src/service.ts:439-458、559-571.

Q: I don't like its speaking tone, how to change?

A: Two granularities. Simplest is to hover on floating panel and click "Rename", just gives current pet a different nickname; if you want entire set of "dialogue changes", place a voice.json in pet directory (or write global override to $DSH_HOME/pets/.voice.json), follow voicePackVersion: 1 format to override status / tools / whispers / panel four sections; merge priority: pet native > global > built-in, bad package only warns, doesn't reject. packages/dsh-pet/README.zh.md:91-123.

Q: How to completely turn it off without uninstalling plugin?

A: Go to Settings → Pet, turn off "enabled"; host API and browser side will both unload (after hiding, a "Summon name" button appears in bottom-right to re-enable). To completely remove from settings, including the plugin itself, use dsh plugin --profile web remove github:zhu1090093659/dsh-web-ui/packages/dsh-pet, $DSH_HOME/pets/ and pet.json won't be deleted, next reinstall can pick up. packages/dsh-pet/src/index.ts:177-191 / packages/dsh-pet/src/client/index.ts:312-315.

Q: Can people on LAN access my pet atlas or status?

A: By default no. All /api/pet/* and /pet/<id>/* are fenced by loopback (127.0.0.1 + Host header + sec-fetch-site), LAN neighbors get 403 directly. When dsh-remote-web-ui is also installed, paired device cookies can serve as additional pass-through. Asset routes also do realpath escape detection (symlink escape 403) and size limits (images 20 MB, Live2D models 32 MB, manifest 64 KB, over-limit 413). packages/dsh-pet/README.zh.md:289-295 / packages/dsh-pet/src/routes.ts:42-49、72-82.

Difficulty Level

Beginner — one-line install, zero extra config to see built-in whale girl; players who want their own just need to place atlas and description file in $DSH_HOME/pets/ following pet.json template from README, no TS/JS code involved.

Known Issues & Limitations

  • Live2D Cubism Core is limited by Live2D proprietary license; this plugin doesn't include or download it; when file is missing, Live2D pet position shows installation guide card, sprite2d pets unaffected (packages/dsh-pet/README.zh.md:127-134 / packages/dsh-pet/src/routes.ts:328-345)
  • Asset route hard limits: atlas and PNG/WebP/GIF images 20 MB, Live2D model closure files 32 MB, manifest 64 KB; over returns 413 (packages/dsh-pet/src/routes.ts:42-49)
  • User-authored voice.json / decoration.json / .voice.json scanned with 64 KB limit and "must be regular file" filter; over limit or device/FIFO silently skipped (packages/dsh-pet/src/registry.ts:629-661)
  • Corrupted or missing pet.json silently falls back to defaults, won't error (packages/dsh-pet/src/persist.ts:156-158)
  • When registry completely can't find any valid entries, plugin startup throws error directly [dsh-pet] no valid pet manifests found (packages/dsh-pet/src/service.ts:246-248)
  • Live2D models must be under pet directory and their referenced closures (moc, textures, motions, physics, poses, expressions) need to be complete; models .model3.json referencing穿越/absolute/URL形态 files will directly reject with diagnosis (packages/dsh-pet/src/registry.ts:500-535)
  • Legacy hatch-pet source that only depends on old ${CODEX_HOME:-~/.codex}/pets/ can still be recognized but is historical compatibility, new pets please go directly to $DSH_HOME/pets/ (packages/dsh-pet/src/registry.ts:813-820)
  • Third-party decoration (spraying whale) material derived from DeepSeek wordmark (MIT), see packages/dsh-pet/THIRD_PARTY_NOTICES.md

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

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/zhu1090093659/dsh-web-ui/packages/dsh-pet)

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