Preface

DeepSeek Harness (DSH) provides a Web interface for managing agents. During development, observing an agent’s running and completed states helps with debugging and user experience. DSH’s philosophy is “everything is a plugin,” meaning developers can add custom components. The Kun Like Desktop Pet is a static Bundle plugin that integrates dynamic sprite animations into DSH’s Web interface.

Plugin Introduction

The Kun Like Desktop Pet is maintained by GangLongYu and follows the MIT License. It renders sprite animations in the bottom-right corner of the DSH Web interface, translating abstract agent states into visual character actions. Instead of relying on local absolute-path assets, the plugin is assembled automatically via a static Bundle.

Core Capabilities

  • Nine sprite animations: Maintains the asset contract of 8 columns × 9 rows, with each cell 192 × 208.
  • State awareness: Listens to agent/status and falls back to polling agents.list() to detect running and completed states.
  • State mapping: Uses tools/execute, approval/request, and agent/request-error to display working, waiting, and failed states.
  • System sounds: The Host plays a system notification sound when a task completes; corresponding implementations exist for Windows, macOS, and Linux.
  • Interaction: The desktop pet can be dragged; clicking it makes it wave and play an interactive voice clip.
  • Debugging tools: Provides the kun_pet_debug tool and the /kun-pet/state debugging endpoint.

State-to-Action Mapping

Agent State Desktop Pet Action Bubble Text
Tool executing Focused at work Working hard…
Turn running but no tool executing Thinking Thinking…
Waiting for reply or approval Expectant Waiting for your reply~
Request error Sad Aww… an error occurred (._.)
Turn completed Waves/jumps and plays a notification sound Done! What are you doing~ Ouch
Idle Breathing idle Resting~ Call me if you need anything

Install and Enable

Use the official CLI to install the plugin into the web profile.

npx @deepseek-ai/dsh plugin --profile web add github:GangLongYu/dsh-kun-like-pet
npx @deepseek-ai/dsh web

After installation, open the Web address shown in terminal output; the desktop pet should appear in the bottom-right corner. The Host provides self-check endpoints for verification:

  • http://127.0.0.1:3080/kun-pet/state
  • http://127.0.0.1:3080/kun-pet/spritesheet.webp
  • http://127.0.0.1:3080/kun-pet/voice.mp3

If port 3080 is occupied, DSH will automatically use another port; please refer to the startup log.

Local Development

To modify the source code, clone the repository and build it as follows.

1、Clone the repository and install dependencies:

git clone https://github.com/GangLongYu/dsh-kun-like-pet.git
cd dsh-kun-like-pet
npm ci

2、Build the artifacts and run tests:

npm run build
npm test

3、Install it into DSH:

npx @deepseek-ai/dsh plugin --profile web add .
npx @deepseek-ai/dsh web

After modifying plugin/src/, you must rerun npm run build and commit the updated plugin/lib/ as well.

Environment Requirements and Notes

  • Node.js: Requires version 22.19 or higher.
  • DeepSeek Harness: Recommended version 0.1.0-rc.6. DSH is still in the development preview stage. If an upgrade introduces breaking API changes, run this repository’s tests first.
  • Sound dependencies:
  • Linux: Requires an available ffplay.
  • Windows: Uses WPF MediaPlayer.
  • macOS: Uses afplay.
  • Asset licensing: The code uses the MIT License, but assets in assets/ (images, voice) are fan-created derivative works and do not automatically receive commercial-use authorization from the code license.
  • Permissions: The plugin runs with the permissions of the current DSH process; review the source code and license before installation.

Technical Details

The plugin adopts a Host/Client separated architecture.

  • Host (plugin/lib/index.js): Responsible for event listening (such as tools/execute), state polling, sound playback, and the /kun-pet/state route.
  • Client (plugin/lib/client.js): Injects React components via shell.overlay to implement desktop pet rendering, dragging, and click interaction.

The directory structure includes cordis.patch.yml for profile installation patches, and an assets/ directory for sprite sheets and voice files.