Introduction¶
For developers who frequently use dsh web, feedback after agent task completion sometimes only appears in logs, terminals, or browser states. dsh-niulai-pet is a dsh web client desktop pet plugin: it raises a “Niulai” little cow in the corner of the interface, and when an agent task completes, it pops out and shouts “Ma~~Ma~~”. It doesn’t replace status prompts but instead places task completion, runtime timing, and interactive feedback into a lightweight object in a corner of the webpage.
DSH emphasizes “everything is a plugin,” and the community directory is an independent site, not equivalent to an official app store. Below, we introduce what this plugin can do, how to install it, and which scenarios are suitable for its use.
What is this¶
dsh-niulai-pet is a dsh web client desktop pet plugin, with the pet itself running on the browser side. The npm package name is dsh-niulai-pet, the verified version is 0.4.9, the main entry point is index.js, and the license is MIT. The repository address is https://github.com/whitefirer/dsh-niulai-pet.
It mainly addresses three things:
- Provides sound, bubble, and animation prompts when an agent task completes.
- Offers a configurable, multi-pet, customizable skin interactive layer for desktop pets.
- Persists configuration through settings cards in
dsh rc.7+.
Core Features¶
Task Completion Feedback¶
When an agent task completes, the desktop pet can trigger:
- Shouting;
- Bubbles;
- Mouth animation;
- Bound actions.
This supports continuous shouting, delays, and interactive stops. Conditions for stopping the loop include poking it, picking it up, starting a new task, muting, or turning off the switch, with a fallback stop after 60 shouts.
Daily Behaviors and Interactions¶
The plugin supports:
- Standby animations;
- AI session runtime timer bubbles;
- Click-triggered shouts;
- Draggable position memory;
- Multiple desktop pets;
- Physical collisions.
Multiple desktop pets can be added via the “Add Another” option in the main pet menu, with a configurable maximum number (default is 10 including the main pet). Drag positions are saved per device in localStorage and do not enter settings.
Skins and Actions¶
Built-in skins include 9 options: Niulai, Niulai Original, Little Yellow, Panda, Blue Whale, Milk Dragon, Little Milk Dragon, Big Dog, and Cyber Cat.
The action library includes: Flying, Sway Dance, Spinning, Consecutive Jumps, Rolling, Jumping Out of Water, and Swaying. Any skin can be bound to any action.
Regarding assets, verified information indicates: Panda and Blue Whale are hand-drawn originals, and the Big Dog illustration comes from Dagou-Tap-New.
Custom Character Packs¶
Supports importing custom character packs via a zip file containing pack.json, transparent base image, and mp3 files. It can be imported in the settings card’s “Custom Character” area; the demo page also supports direct drag-and-drop of .nlpack.zip for instant preview.
Voice Stop Shouting¶
Voice stop shouting is used for loop shouting scenarios and provides dual engines:
- Model Recognition:
sherpa-onnxChinese KWS wasm; - Template Matching:
MFCC + DTW.
Selectable command words include: “Niulai,” “Stop Shouting,” “Quiet,” and “Stop.”
Model recognition assets are approximately 17MB distributed with the npm package, loaded once on first use; if loading fails, it automatically falls back to template matching. The model recognition worker terminates after being idle for 10 seconds when the loop stops and is rebuilt in seconds upon next use.
Template matching has an inherent limit with other people’s voices, so it is recommended to record your own “Niulai” in settings as the priority template. Template matching requires three consecutive hits above the threshold (0.54) to be considered a match, with positive samples peaking at about 0.43 and negative samples bottoming at about 0.66.
Configuration and Persistence¶
dsh rc.7+ provides a settings card where you can configure sound, completion shouting, skins, actions, maximum quantity, size, phrases, physical collisions, idle dozing, and more.
Configurations in dsh rc.7+ are persisted by dsh host to ~/.dsh/settings.yaml. Versions rc.6 and earlier do not have a settings card; the plugin still works, but configurations fall back to localStorage.
The right-click menu also allows adjusting sound, completion shouting, bubbles, idle dozing, physical collisions, hiding all, skins, actions, and group photo.
Installation and Enabling¶
First, confirm that the dsh web environment is available. Install from npm:
dsh plugin --profile web add dsh-niulai-pet
Alternatively, install from GitHub:
dsh plugin --profile web add github:whitefirer/dsh-niulai-pet
The first installation requires restarting dsh web; subsequent upgrades just require refreshing the page.
If you don’t intend to install immediately, you can visit the online demo page:
https://whitefirer.org/niulai-pet/
Typical Usage¶
Below are reproducible steps based on common paths.
- Install the plugin and restart
dsh web:
dsh plugin --profile web add dsh-niulai-pet
-
Right-click the desktop pet to open the menu and adjust sound, completion shouting, bubbles, idle dozing, physical collisions, hiding all, skins, actions, and group photo.
-
To raise multiple desktop pets, select “Add Another” in the main pet menu. The maximum number is configurable, defaulting to 10 including the main pet.
-
Import custom characters: In the settings card’s “Custom Character” area, import a zip file containing
pack.json, transparent base image, andmp3files. You can also drag a.nlpack.zipinto the demo page for instant preview. -
To experience loop shouting and voice stop shouting, preset in the demo page console:
localStorage['dsh-niulai-pet:state-v1'] = '{"shoutLoop":true}'
After refreshing the page, you can shout “Niulai” into the microphone during loop shouting, or use the selected command words in settings (“Stop Shouting,” “Quiet,” or “Stop”).
-
For debugging, add
?petdebug=1to the page URL to exposecelebrate,poke,setBusy, anddestroyhandles inwindow.__niulai. -
To replace assets, overwrite files in
assets/and then run:
npm run build
Refresh the page to apply changes.
- For local development, you can run:
npm install
npm run build
npm run typecheck
Applicable Scenarios and Notes¶
This plugin is suitable for:
- Developers who want to add a visual/audio prompt for task completion in
dsh web; - DSH plugin users who want to try skins, actions, bubbles, and custom character packs;
- Individuals who need to experience desktop pet interactions without installation.
Before use, note:
- Settings cards are only available in
dsh rc.7+; older versions do not have settings cards, but the plugin still works with configurations stored inlocalStorage. - If the host is too old and lacks sessions services, task completion signals degrade to manual interaction only.
- Voice functionality relies on
getUserMedia, which is only available in secure contexts likehttpsorlocalhost; microphone API is unavailable when accessing via local networkhttp://192.168.x.x, so the switch will be disabled. - Opening the voice switch will cause the browser to genuinely attempt to access the microphone; if permission is denied, the switch reverts to off with a prompt.
- Template matching has an inherent limit with other people’s voices; it’s recommended to record your own “Niulai” as the priority template.
- The plugin runs with the permissions of the current dsh process; before installation, you should review the source code and license. This plugin’s license is
MIT.
Conclusion¶
dsh-niulai-pet transforms dsh’s task completion events into a visible, interactive, configurable desktop object. It doesn’t change the agent itself but adds a feedback layer on the dsh web client side.
Repository address:
https://github.com/whitefirer/dsh-niulai-pet