Back to home@ldystudy0913-jpg

dsh-pet

Desk pet for the DSH Web UI: an orange desk cat that reacts to the live agent session state.

Stars
0
Language
JavaScript
Created
Aug 18, 2026
Updated
Aug 18, 2026
GitHub repo

Introduction

dsh-pet 🐱

A desk pet for the DeepSeek Harness (DSH) Web UI: a little orange cat on a desk in the bottom-right corner of the page that performs according to the live agent session state — typing away while the agent is running, throwing its laptop away when a task is done, napping while idle, and tilting its head when the agent is waiting for you.

中文说明见 README.zh.md

Features

  • State-driven animations — reads the active session's live summary (SessionSummary.running / .completed / .pendingInteraction) through the standard useSessions hook on the shell.overlay slot:
    • running → typing at a tiny laptop with scrolling code + blinking cursor
    • running → done → throws the laptop away, confetti 🎉
    • idle → sleeping with floating Zzz
    • pendingInteraction → tilted head + "?" bubble
  • Pure client-side — a static client plugin. No host logic, no network, no backend, nothing runs on the server.
  • Interactive — click to hop & chat, drag to move anywhere, double-click to hide (a respawn button appears), gear menu to force demo states (working / throw laptop / error).
  • Persistent — position and hidden state survive reloads via localStorage (dshpet.pos, dshpet.hidden).

Demo

How it works

The package declares itself as a web dsh.client plugin in package.json:

"dsh": { "client": { "inject": ["@deepseek-ai/dsh-client-runtime"], "platform": "web" } }

The loader activates the package, @deepseek-ai/dsh-client-modules scans it and serves lib/client.js at /plugins/dsh-pet/client.js; the browser bundle registers into the shell.overlay slot. The host entry (lib/index.js) is intentionally a no-op — it only exists so the loader activates the package and scans its client bundle.

Requirements

  • DSH 0.1.0-rc.7 or later (web profile, i.e. dsh web)
  • A running DSH Web GUI in the browser (the pet renders in the page)

Installation

1. Add the package to your web profile

From GitHub (works for any published tag/branch):

dsh plugin --profile web add "dsh-pet@github:ldystudy0913-jpg/dsh-pet"

Or add the dependency to $DSH_HOME/profiles/web/package.json manually and run dsh plugin --profile web install:

"dependencies": {
  "dsh-pet": "github:ldystudy0913-jpg/dsh-pet"
}

From npm (once the package is published):

dsh plugin --profile web add dsh-pet

dsh plugin --profile <name> <pnpm args> simply forwards the arguments to pnpm inside the profile directory, so any pnpm dependency specifier works.

2. Activate the row in your profile patch

Append to $DSH_HOME/profiles/web/cordis.patch.yml:

- insert:
    - id: pet
      name: 'dsh-pet'

3. Restart

Stop and start dsh web (or dsh --profile web). The cat should appear in the bottom-right corner of the page.

Uninstall

Remove the patch row, then:

dsh plugin --profile web remove dsh-pet

Interaction

ActionEffect
Clickhop + random chat bubble
Dragmove the pet anywhere
Double-clickhide (a 🐱 respawn button appears at bottom-right)
Hover ⚙demo panel: force 开工 (working) / 丢电脑 (throw laptop) / 出错 (error) states for 5 s

Development

Work on the pet inside your own profile so you can see changes immediately:

# from $DSH_HOME/profiles/web
pnpm add "dsh-pet@file:./dsh-pet"

Then add the patch row and restart dsh web. The client bundle is plain JavaScript with no build step — it uses the tsdown-style window.__ModuleLoader__.load({ id, factory }) format the DSH client module loader expects (see the @deepseek-ai/dsh-client-modules README for the exact contract).

Compatibility note: the animation states are derived from SessionSummary.running / .completed / .pendingInteraction via the useSessions standard hook on the shell.overlay slot. If a future DSH version renames or restructures these fields, update the derivation logic in lib/client.js (PetView).

Publishing (maintainers)

  • GitHub — add topics to the repository so it is easy to discover: deepseek-harness, dsh, dsh-plugin, desktop-pet, deepseek.
  • npm — the name dsh-pet is currently available on npm. To publish:
npm login
npm version patch && npm publish

License

MIT