Preface¶
The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” Plugin developers often need to monitor DeepSeek’s billing periods (peak/off-peak) and the current Agent’s running status in real time during development. DeepSeek Pet is a fun plugin maintained by kuixiu. It keeps a chibi-style virtual pet resident in the bottom-right corner of the interface, with integrated real-time price hints and Agent status monitoring.
Features¶
The plugin mainly includes the following features:
- Resident overlay in the bottom-right corner: Registered in
shell.overlay, positioned in the bottom-right corner usingposition: fixed, and rendered as a full-frame overlay (click-through) that does not block main interface interactions. - Chibi animal and animations: Draws a kitten using inline SVG, and implements animations such as breathing/floating, tail wagging, ear twitching, periodic blinking, and hearts popping out when its head is petted, all in pure CSS.
- Peak and off-peak indicator: The badge displays in real time whether the current period is peak or off-peak. During off-peak periods, the dot breathes/flashes, and a countdown to the next switch is shown.
- Multi-timezone comparison: The panel displays Beijing time (UTC+8), local time, and UTC time simultaneously, and gives the exact time of the next switch.
- Holidays: A built-in 2026 Chinese statutory holiday schedule. Weekends and statutory holidays are counted as off-peak all day; when the holiday table is outdated, you can manually check “Today is a holiday” to force off-peak display.
- Nurturing stats: Features three stats — satiety, mood, and energy — which decay over real time (accumulating up to 48 hours). Feeding, petting, playing, and sleeping change the stats and increase the bond counter. Values are stored in
localStorage. - Follow Agent status: Reads the real-time status of the current session (
running,pendingInteraction,completionUnread) and changes the kitten’s expression and bubble accordingly: working (focused expression + flashing), awaiting operation (worried expression), turn completed (happy + hearts, lasting 4 seconds). - Interaction and memory: Supports dragging by pressing and holding; the position is automatically saved to
localStorage. The panel offers a one-click reset to the bottom-right corner. Double-clicking the pet hides it into a 🐾 button; clicking it anytime restores it. - Bilingual (Chinese/English): Registers dictionaries via
ctx.locale, following the Harness language settings.
Peak and Off-Peak Rules¶
The plugin determines the time period based on DeepSeek’s official documentation (Models & Pricing):
- Peak hours: Monday to Friday Beijing time (excluding Chinese statutory holidays), 09:00 - 12:00 and 14:00 - 18:00.
- Off-peak hours: All other times, including weekends and Chinese statutory holidays all day.
- Implementation details: The code makes judgments in the
Asia/Shanghaitimezone to avoid date inconsistency issues caused by using UTC to determine the day of week. The old 2025 rule (nighttime staggering) is no longer valid.
Installation and Activation¶
Install from npm:
dsh plugin --profile desktop add @kuixiu/dsh-pet
Or call it through the Agent in Harness:
plugin_manager action=install_bundle target=@kuixiu/dsh-pet
Notes:
1. First-time activation: After installation, you need to refresh the page once to see the effect.
2. Client Bundle: The client bundle is built by client-modules on first request and cached to /plugins/<id>/client.js, so if it doesn’t take effect after a refresh, restart the host process once.
Local Development¶
Clone the repository and verify:
git clone git@github.com:kuixiu/dsh-pet.git
cd dsh-pet
node verify-all.mjs
Local mount debugging:
dsh plugin --profile desktop add "$PWD"
Development notes:
* This plugin is hand-written JavaScript with no build step. client.js is the factory format executed by the browser.
* Make sure to run npm run verify (equivalent to node verify-all.mjs) before committing.
Cautions¶
- Package name consistency: The
nameinpackage.json, thenamein the loader line ofcordis.patch.yml, and the module id inclient.jsmust be completely consistent. Inconsistency among the three places will cause the browser-side bundle to fail to locate the module. - npm Scope semantics:
@scopeis npm’s organization/publishing domain, not a personal username. Publishing a scoped package requires explicitly using the--access publicparameter. - Persistence fix: Early versions had a save file parsing error that caused
undefinedorNaNto be displayed. The current version is fixed via thesanitizePetandfiniteOrfunctions, which automatically repair old saves and prevent numeric anomalies.
Conclusion¶
DeepSeek Pet provides a visual cost monitoring and Agent status feedback tool. For developers who need to use the DeepSeek API long-term in DSH, being able to visually see price fluctuations and the current session status helps optimize usage strategies.