Introduction¶
DeepSeek Harness (DSH) offers an “everything-is-a-plugin” capability, allowing various extensions to be mounted in its Web interface. Developers typically focus more on models, prompts, and workflows, but staring at a window for extended periods can lead to visual fatigue. A pet companion that responds to conversation state changes and remains on the desktop after the window is minimized can provide a touch of companionship without disrupting the workflow.
Plugin Overview¶
This is a fun plugin for DSH, maintained by JERRY-hub26, classified under “Fun Skins.” It provides an interactive virtual pet for DSH’s Web UI, featuring three appearances, three sets of animations, and a desktop floating window. It does not connect to any chat model, does not require an API key, and all dialogue and behavior are controlled by local scripts.
Core Features¶
- Three-state sprites: Automatically switches between three poses based on conversation state—Idle (hugging a book), Thinking (holding a magnifying glass), and Writing (holding a quill pen).
- Three appearances: Q-version, Youth, and Adult. Switchable in settings. Each appearance includes the same blinking, magnifying-glass, and quill-pen animations, differing only in height and sway amplitude. An optional “Switch appearance by reasoning intensity” feature can be enabled to assign a specific appearance to each reasoning level (disabled by default).
- Muttering and blinking: 18 lines of dialogue written for the character persona appear randomly. Blinking occurs three times every 9.2 seconds (uneven intervals). Blinking is combined with breathing and slight swaying; sway amplitude auto-scales based on the appearance’s height.
- Speech bubble: A white rounded-corner bubble displaying one line at a time, with dialogue written for a fixed persona.
- Placement and right-click menu: Draggable with position remembered after release; supports corner docking and margin settings; size range is 60%–200%. The right-click menu has only two items: “Mutter” and “Check Balance.”
- Dedicated settings page: A new “Claude Pet” page is added to the “Settings” sidebar, allowing configuration of name, size, docking corner, margins, display mode (Both / Desktop only / Web only / Hidden), desktop floating window toggle, and muttering toggle. All controls are graphical—sliders, toggles, and a 2×2 grid—eliminating the need to manually edit config files.
- Desktop floating window: When the main window is minimized or hidden, a standalone pet appears on the desktop. It is draggable, right-clickable, and remembers its position. It automatically retracts when the main window is restored. Desktop edition only.
- Mobile/tablet adaptation: On narrow screens, capped at 34vw; long-press for 0.55 seconds to open the context menu (touch screens lack right-click); menu items and the close button are enlarged to 44px to avoid notches and the home indicator bar.
- No model or network required: Does not connect to any chat model and does not require an API key; all dialogue and behavior are hardcoded locally. The only two network interactions are: downloading Electron once when the desktop floating window is first used (can be disabled), and calling the balance inquiry API when the user clicks “Check Balance.”
Installation & Activation¶
Method 1: Plugin page (Desktop edition, recommended)
- On this page, click Code → Download ZIP in the upper-right corner, then extract to a fixed directory (e.g.,
D:\dsh-claude-pet). - Open DSH: Settings → Plugins → Add Plugin, and select the extracted directory.
- Fully quit DSH and restart. Closing the window only minimizes it to the tray; the main process keeps running and the plugin will not be reloaded—please quit from the tray menu.
Method 2: Command line (fastest when the dsh command is available)
dsh plugin --profile desktop add github:JERRY-hub26/dsh-claude-pet
To pin a specific version, include the commit hash: github:JERRY-hub26/dsh-claude-pet#<commit>. This package is pure JavaScript, zero dependencies, and requires no build steps—git installation does not need additional allowBuilds authorization.
Method 3: npm (this is what the “Install” button in the plugin marketplace uses)
dsh plugin add dsh-claude-pet
On networks in China, the plugin manager defaults to registry.npmmirror.com. Newly published versions may not yet be synced to the mirror, resulting in an ERR_PNPM_PACKAGE_NOT_FOUND error. You can open https://npmmirror.com/package/dsh-claude-pet in a browser and click “Sync,” or run the following in a terminal with internet access:
curl -X PUT "https://registry.npmmirror.com/dsh-claude-pet/sync?sync_upstream=true"
Wait about ten seconds and try installing again. If you need it urgently, use Method 2 (git install) instead, as it bypasses the npm mirror.
Method 4: Manual config file edit (last resort)
git clone https://github.com/JERRY-hub26/dsh-claude-pet.git
Open %USERPROFILE%\.dsh\profiles\desktop\package.json (on macOS / Linux: ~/.dsh/profiles/desktop/package.json), add the absolute path under dependencies, and append the package name at the end of dsh.profile.bundles:
{
"dependencies": {
"dsh-claude-pet": "link:D:/dsh-claude-pet"
},
"dsh": {
"profile": {
"bundles": ["...", "dsh-claude-pet"]
}
}
}
Plugin not appearing after installation?
Run window.__dshClaudePet() in the conversation. If attached is true, the plugin is mounted on the current session; lastError will indicate the failure reason.
Compatibility¶
The plugin declares engines.dsh: "^0.2.0" in package.json, meaning DSH 0.2.x and its nightly builds (e.g., 0.2.2-rc.1). DSH uses this to determine installability; starting from 0.3.0, the plugin must be updated first. You can check the version number under “About” in Settings or in the session startup info.
Desktop Floating Window Notes¶
- Available only in DSH Desktop edition; pure Web environments (
http://127.0.0.1:port) have no desktop window. - The floating window appears only when the main window is minimized or hidden; it automatically retracts when the main window is restored to avoid both being visible simultaneously.
- The Electron executable is searched in the following order:
1. Environment variableDSH_CLAUDE_PET_ELECTRON(pointing toelectron.exe);
2.%USERPROFILE%\.dsh\electron\electron.exe(other DSH plugins typically install it here);
3. On macOS:Electron.app/Contents/MacOS/Electron; on Linux:electron. - If not found, a one-time download occurs: when the desktop floating window is first needed, the plugin fetches the official Electron 43.3.0 (~100 MB) and extracts it to
%USERPROFILE%\.dsh\electronfor subsequent reuse. Download sources are tried in order:https://npmmirror.com/mirrors/electron/, then GitHub Releases; on networks in China, the first source is preferred, typically taking a few seconds to one minute. During download, the settings page shows “Downloading Electron…”, and the floating window appears automatically once complete. - If the download fails (e.g., no network), the plugin does not throw an error—it simply doesn’t show the desktop floating window, and all other features remain unaffected. The “Desktop Floating Window” toggle on the settings page will be grayed out with an explanation.
- For intranet environments or using a custom Electron: point
DSH_CLAUDE_PET_ELECTRONto anyelectron.exeto skip the download; useDSH_CLAUDE_PET_ELECTRON_MIRRORto specify your own mirror directory; to disable network access entirely, setDSH_CLAUDE_PET_NO_DOWNLOAD=1.
Privacy & Network¶
- Communication between the desktop floating window and the main process uses only a random port on
127.0.0.1with a one-time random token; no external listening is performed. - HTTP routes the plugin opens on the main process first pass DSH’s access check (
ctx.connection.requestRejection): Host must be localhost andOriginmust be same-origin. Any third-party web page opened in a browser cannot access these routes or read their responses. The plugin does not setAccess-Control-Allow-Origin. - No usage data is collected or uploaded; there is no telemetry and no crash reporting.
- The only outbound network request is when “Check Balance” is invoked, calling DeepSeek’s official
https://api.deepseek.com/user/balanceor the local account service’sgetBalance. Other providers do not trigger requests; the bubble displays a red message “Balance inquiry is not supported by the current provider” + gray text “Current provider:“. - The desktop floating window spawns an Electron process (only during the minimized period), loading only local pages from the repository—no remote pages are loaded.
Settings¶
| Setting | Description |
|---|---|
| Name | Up to 16 characters; defaults to the preset name if left blank; saved on blur |
| Size | 60%–200% |
| Docking corner | Bottom-left / Bottom-right / Top-left / Top-right |
| Horizontal / Vertical margin | 0–240 px |
| Display on | Both / Desktop only / Web only / Hidden |
| Desktop floating window | Whether to remain on desktop after minimizing (shown as unavailable on non-desktop editions) |
| Muttering | Whether to speak randomly |
Directory Structure¶
lib/
index.js Host side: private HTTP routes, desktop helper daemon, balance inquiry
client.js Client side: pet rendering, speech bubble, right-click menu, settings page
runtime/helper/
main.cjs Standalone Electron main process (transparent always-on-top window, click-through, drag)
preload.cjs Context bridge
index.html Floating window page
pet.js Floating window logic (state polling, bubble, menu)
pet.css Sprite animations and bubble styles consistent with the client
lines.js Dialogue table for the floating window
assets/ Three-state sprites (idle is a two-frame sprite sheet)
locale/ Chinese and English settings strings
docs/DETAIL.md Design and implementation details
Balance Inquiry Support¶
| Provider | Behavior |
|---|---|
deepseek-official and other routes containing deepseek |
Reads DEEPSEEK_API_KEY (from credential service or environment variable) and calls the official user/balance |
deepseek-account |
Calls the local account service’s getBalance |
Others (e.g., self-hosted gah, third-party proxies) |
No request is made; the bubble displays a red message “Balance inquiry is not supported by the current provider” + gray text “Current provider: |
Use Cases & Notes¶
Ideal for developers who want to add a sense of companionship to the DSH Web interface and enjoy the visual feedback of a desktop pet. The plugin runs with the permissions of the current DSH process; it is recommended to review the source code and license (MIT) before installing. The desktop floating window depends on Electron and may require a download on first use or in restricted network environments.
Closing¶
This plugin, while maintaining zero dependencies and local control, brings customizable and interactive desktop companionship to DSH. For installation and usage details, visit the plugin’s directory page or GitHub repository.