dsh-pet 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +116 -100
- package/README.md +116 -101
- package/cordis.patch.yml +0 -9
- package/lib/client.js +836 -625
- package/lib/index.js +27 -17
- package/lib/types/index.d.ts +2 -12
- package/package.json +12 -3
- package/src/client/app.ts +13 -451
- package/src/client/config.ts +81 -105
- package/src/client/index.ts +1 -0
- package/src/client/motion.ts +36 -0
- package/src/client/pet.ts +482 -0
- package/src/client/pickers.ts +31 -4
- package/src/client/settings.ts +441 -133
- package/src/client/types.ts +30 -10
- package/src/host/index.ts +126 -99
package/README.en.md
CHANGED
|
@@ -1,100 +1,116 @@
|
|
|
1
|
-
# dsh-pet 🐾
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-pet?label=npm&color=blue"></a>
|
|
5
|
-
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm monthly downloads" src="https://img.shields.io/npm/dm/dsh-pet?label=monthly&color=brightgreen"></a>
|
|
6
|
-
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="total downloads" src="https://img.shields.io/npm/dt/dsh-pet?label=total&color=success"></a>
|
|
7
|
-
<a href="https://github.com/PC2005-cloud/dsh-pet"><img alt="stars" src="https://img.shields.io/github/stars/PC2005-cloud/dsh-pet?style=social"></a>
|
|
8
|
-
<a href="https://github.com/PC2005-cloud/dsh-pet/blob/master/LICENSE"><img alt="license" src="https://img.shields.io/github/license/PC2005-cloud/dsh-pet?color=orange"></a>
|
|
9
|
-
<a href="https://awesome-dsh-plugin.com"><img alt="awesome dsh plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
|
|
10
|
-
<img alt="platform" src="https://img.shields.io/badge/platform-DeepSeek%20Harness%20Web-8A2BE2">
|
|
11
|
-
<img alt="assets" src="https://img.shields.io/badge/assets-dynamic%20animations-ff69b4">
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
> A floating desktop pet for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI: idle breathing, random actions (including dozing off), occasional turns, screen wandering, click reactions, and draggable.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## 🚀 Quick Start (Install the Plugin)
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
dsh plugin --profile web add dsh-pet
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Restart `dsh web` and the pet appears in the bottom-right corner — all transparent animations, ready to use out of the box, no generation pipeline required.
|
|
25
|
-
|
|
26
|
-
> 💡 Want to craft your own one-of-a-kind pet? Clone [PC2005-cloud/dsh-pet](https://github.com/PC2005-cloud/dsh-pet) and use the bundled asset pipeline (AI prompts → green-screen video → transparent animation, generated with Doubao) to generate one from scratch — fully reproducible.
|
|
27
|
-
|
|
28
|
-
## ✨ Features
|
|
29
|
-
|
|
30
|
-
- **A pure pet, nothing else**: no business features — no weather, no monitoring, no agent-state sensing; just a companion. Zero core changes, zero model cost (no LLM/API calls at runtime)
|
|
31
|
-
- **Hand-drawn style transparent animations**: idle breathing, dozing off, playing with a Rubik's cube, humming, hair-raising, blowing bubbles, playing with a water gun, playing violin, the whale emerging, eating rice, looking in the mirror, three dances, writing code, seasonal actions (kite flying, snowman building, ice cream eating, fireworks…) — all seamlessly chained
|
|
32
|
-
- **Never-ending animation chain**: when each animation finishes, the next one is picked instantly by probability (30% idle / 10% turn / 40% action / 20% move)
|
|
33
|
-
- **Screen wandering**: walks toward its facing direction, checks the space ahead and never walks off screen
|
|
34
|
-
- **Click / drag**: click triggers a random reaction animation (happy / shy / tsundere); drag it anywhere
|
|
35
|
-
- **Left/right facing**: all animations are CSS-mirrored, the pet can face left or right
|
|
36
|
-
- **Ground alignment**: animations share a unified foot line, the pet always stands on the "ground"
|
|
37
|
-
- **Smooth transitions**: double-buffered video cross-fade, zero blank frames between switches
|
|
38
|
-
- **Accessibility-friendly**: supports `prefers-reduced-motion`
|
|
39
|
-
|
|
40
|
-
## ⚙️ Configuration
|
|
41
|
-
|
|
42
|
-
| Key
|
|
43
|
-
|
|
44
|
-
| `size`
|
|
45
|
-
| `position` | Default corner position
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
1
|
+
# dsh-pet 🐾
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-pet?label=npm&color=blue"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm monthly downloads" src="https://img.shields.io/npm/dm/dsh-pet?label=monthly&color=brightgreen"></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="total downloads" src="https://img.shields.io/npm/dt/dsh-pet?label=total&color=success"></a>
|
|
7
|
+
<a href="https://github.com/PC2005-cloud/dsh-pet"><img alt="stars" src="https://img.shields.io/github/stars/PC2005-cloud/dsh-pet?style=social"></a>
|
|
8
|
+
<a href="https://github.com/PC2005-cloud/dsh-pet/blob/master/LICENSE"><img alt="license" src="https://img.shields.io/github/license/PC2005-cloud/dsh-pet?color=orange"></a>
|
|
9
|
+
<a href="https://awesome-dsh-plugin.com"><img alt="awesome dsh plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
|
|
10
|
+
<img alt="platform" src="https://img.shields.io/badge/platform-DeepSeek%20Harness%20Web-8A2BE2">
|
|
11
|
+
<img alt="assets" src="https://img.shields.io/badge/assets-dynamic%20animations-ff69b4">
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
> A floating desktop pet for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI: idle breathing, random actions (including dozing off), occasional turns, screen wandering, click reactions, and draggable.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🚀 Quick Start (Install the Plugin)
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
dsh plugin --profile web add dsh-pet
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Restart `dsh web` and the pet appears in the bottom-right corner — all transparent animations, ready to use out of the box, no generation pipeline required.
|
|
25
|
+
|
|
26
|
+
> 💡 Want to craft your own one-of-a-kind pet? Clone [PC2005-cloud/dsh-pet](https://github.com/PC2005-cloud/dsh-pet) and use the bundled asset pipeline (AI prompts → green-screen video → transparent animation, generated with Doubao) to generate one from scratch — fully reproducible.
|
|
27
|
+
|
|
28
|
+
## ✨ Features
|
|
29
|
+
|
|
30
|
+
- **A pure pet, nothing else**: no business features — no weather, no monitoring, no agent-state sensing; just a companion. Zero core changes, zero model cost (no LLM/API calls at runtime)
|
|
31
|
+
- **Hand-drawn style transparent animations**: idle breathing, dozing off, playing with a Rubik's cube, humming, hair-raising, blowing bubbles, playing with a water gun, playing violin, the whale emerging, eating rice, looking in the mirror, three dances, writing code, seasonal actions (kite flying, snowman building, ice cream eating, fireworks…) — all seamlessly chained
|
|
32
|
+
- **Never-ending animation chain**: when each animation finishes, the next one is picked instantly by probability (30% idle / 10% turn / 40% action / 20% move)
|
|
33
|
+
- **Screen wandering**: walks toward its facing direction, checks the space ahead and never walks off screen
|
|
34
|
+
- **Click / drag**: click triggers a random reaction animation (happy / shy / tsundere); drag it anywhere
|
|
35
|
+
- **Left/right facing**: all animations are CSS-mirrored, the pet can face left or right
|
|
36
|
+
- **Ground alignment**: animations share a unified foot line, the pet always stands on the "ground"
|
|
37
|
+
- **Smooth transitions**: double-buffered video cross-fade, zero blank frames between switches
|
|
38
|
+
- **Accessibility-friendly**: supports `prefers-reduced-motion`
|
|
39
|
+
|
|
40
|
+
## ⚙️ Configuration
|
|
41
|
+
|
|
42
|
+
| Key | Description | Current status |
|
|
43
|
+
| ---------- | --------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
44
|
+
| `size` | Stage width (px); pet height ≈ width×9/16×74% | Default 462 (≈260px tall); editable per pet via the settings page (applies instantly) |
|
|
45
|
+
| `position` | Default corner position | Defaults to bottom-right; editable per pet via the settings page (applies instantly) |
|
|
46
|
+
|
|
47
|
+
> Note: the plugin works out of the box; all config above is optional. Settings-page edits are saved to `$DSH_HOME/dsh-pet/main-config.json` (user layer, takes precedence over the packaged defaults).
|
|
48
|
+
> ⚠️ The legacy paths `$DSH_HOME/pet-config.json` / `$DSH_HOME/pet-assets` (pre-v0.1.6) are no longer read — migrate manually after upgrading.
|
|
49
|
+
|
|
50
|
+
### 📄 Advanced customization (edit config files directly)
|
|
51
|
+
|
|
52
|
+
All user data lives under `$DSH_HOME/dsh-pet/` (one directory per plugin; future character packs follow the same pattern with their own plugin id):
|
|
53
|
+
|
|
54
|
+
| Layer | Path | Purpose |
|
|
55
|
+
| -------------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
+
| Default config (read-only) | `assets/config.jsonc` in the package | Complete reference: pet list / animation pools (idle/turn/drag/clicks/moves/categories) / playback weights |
|
|
57
|
+
| User config | `$DSH_HOME/dsh-pet/main-config.json` | Override fragment: optionally override `pets` / `animations` / `animationWeights`; missing fields fall back to defaults |
|
|
58
|
+
| User animations (optional) | `$DSH_HOME/dsh-pet/main-animation/` | Drop `.webm` files here to make them playable — **takes precedence over the packaged assets** |
|
|
59
|
+
|
|
60
|
+
- The settings page shows these paths at the bottom
|
|
61
|
+
- Custom animations: put `xxx.webm` into `main-animation/`, name it in an animation pool/category as `"xxx"`, then **refresh the page** (no DSH restart needed)
|
|
62
|
+
- Format: `.webm` only; **transparent animations require VP9 Alpha encoding** (same spec as the packaged assets — plain webm will show a black background)
|
|
63
|
+
- After editing the user config, **refresh the page** to apply
|
|
64
|
+
- Fill animation names by referring to the default config to avoid referencing missing animations
|
|
65
|
+
|
|
66
|
+
## 🗑️ Uninstall
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
dsh plugin --profile web remove dsh-pet
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 🖥️ Running Screenshots
|
|
73
|
+
|
|
74
|
+
What the pet looks like running inside the DSH Web UI:
|
|
75
|
+
|
|
76
|
+
<p>
|
|
77
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/assets/screenshots/dsh-pet-running-1.png" width="380" alt="dsh-pet running in DSH Web UI 1" title="dsh-pet running in DSH Web UI 1">
|
|
78
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/assets/screenshots/dsh-pet-running-2.png" width="380" alt="dsh-pet running in DSH Web UI 2" title="dsh-pet running in DSH Web UI 2">
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
## 🎬 Animation Previews
|
|
82
|
+
|
|
83
|
+
> The animations have transparent backgrounds; in these GIF previews the transparent areas show the page background color, while the actual playback (webm) is transparent.
|
|
84
|
+
|
|
85
|
+
<p>
|
|
86
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/daiji-huxi-xiuxian.gif" width="160" alt="Idle breathing & chill" title="Idle breathing & chill">
|
|
87
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/dongzhangxiwang.gif" width="160" alt="Looking around" title="Looking around">
|
|
88
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/yuandi-piaofu-tabu.gif" width="160" alt="Floating in place" title="Floating in place">
|
|
89
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/yuandi-xiaoqi-chenmian.gif" width="160" alt="Napping" title="Napping">
|
|
90
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/dianji-huiying-kaixin-yuedong.gif" width="160" alt="Click response - happy bounce" title="Click response - happy bounce">
|
|
91
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/beishubiao-tuozhuai-xuankong-fankui.gif" width="160" alt="Dragged by the mouse" title="Dragged by the mouse">
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
All animations live in the repo under `dsh-pet/assets/thumb/`.
|
|
95
|
+
|
|
96
|
+
## 📚 A Complete Project (More Than a Plugin)
|
|
97
|
+
|
|
98
|
+
This is a **complete three-piece project** — anyone can clone the repo and generate their own desktop pet from scratch:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
① Prompts (recipe) → ② Asset pipeline (engine) → ③ Plugin (product)
|
|
102
|
+
AI animation prompts source video → transparent the pet running in DSH
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- Repository: [PC2005-cloud/dsh-pet](https://github.com/PC2005-cloud/dsh-pet)
|
|
106
|
+
- Design & implementation docs: [DESIGN.md](https://github.com/PC2005-cloud/dsh-pet/blob/master/DESIGN.md)
|
|
107
|
+
|
|
108
|
+
## 🔎 Discover More DSH Plugins
|
|
109
|
+
|
|
110
|
+
- Community plugin catalog: [awesome-dsh-plugin.com](https://awesome-dsh-plugin.com)
|
|
111
|
+
- DSH official repository: [deepseek-ai/DeepSeek-Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
112
|
+
|
|
113
|
+
## 📄 License
|
|
114
|
+
|
|
115
|
+
- Code: MIT
|
|
116
|
+
- Assets (animations/prompts/source videos): open-source use permitted, **no commercial use**
|
package/README.md
CHANGED
|
@@ -1,101 +1,116 @@
|
|
|
1
|
-
# dsh-pet 🐾
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-pet?label=npm&color=blue"></a>
|
|
5
|
-
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm monthly downloads" src="https://img.shields.io/npm/dm/dsh-pet?label=%E6%9C%88%E4%B8%8B%E8%BD%BD&color=brightgreen"></a>
|
|
6
|
-
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="total downloads" src="https://img.shields.io/npm/dt/dsh-pet?label=%E6%80%BB%E4%B8%8B%E8%BD%BD&color=success"></a>
|
|
7
|
-
<a href="https://github.com/PC2005-cloud/dsh-pet"><img alt="stars" src="https://img.shields.io/github/stars/PC2005-cloud/dsh-pet?style=social"></a>
|
|
8
|
-
<a href="https://github.com/PC2005-cloud/dsh-pet/blob/master/LICENSE"><img alt="license" src="https://img.shields.io/github/license/PC2005-cloud/dsh-pet?color=orange"></a>
|
|
9
|
-
<a href="https://awesome-dsh-plugin.com"><img alt="awesome dsh plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
|
|
10
|
-
<img alt="platform" src="https://img.shields.io/badge/platform-DeepSeek%20Harness%20Web-8A2BE2">
|
|
11
|
-
<img alt="assets" src="https://img.shields.io/badge/assets-dynamic%20animations-ff69b4">
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
> A floating desktop pet for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI.
|
|
15
|
-
> 一只住在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web 界面里的桌面宠物:待机呼吸、随机动作(含打瞌睡)、偶尔转向、屏幕漫游、点击反应、可拖拽。
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 🚀 快速开始(安装插件)
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
dsh plugin --profile web add dsh-pet
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
重启 `dsh web`,宠物出现在界面右下角——全部透明动画开箱即用,无需任何生成流程。
|
|
26
|
-
|
|
27
|
-
> 💡 想自己造一只专属宠物?克隆 [PC2005-cloud/dsh-pet](https://github.com/PC2005-cloud/dsh-pet) 仓库,用内置素材链(AI 提示词 → 绿幕视频 → 透明动画,素材由豆包生成)从零生成,全流程可复现。
|
|
28
|
-
|
|
29
|
-
## ✨ 功能特性
|
|
30
|
-
|
|
31
|
-
- **纯粹的桌宠**:不掺业务功能——没有天气查询、系统监控、Agent 状态感知,就一件事:陪你。零核心改动、零模型成本(运行时零 LLM/API 调用)
|
|
32
|
-
- **手绘风透明动画**:待机呼吸、打瞌睡、玩魔方、哼歌、炸毛、吐泡泡、玩水枪、小提琴演奏、蓝鲸现世、吃白饭、照镜子、三支舞、写代码、四季动作(放风筝、堆雪人、吃冰淇淋、放烟花……)全部无缝衔接
|
|
33
|
-
- **永不停止的动画链**:每段动画播完立即按概率选下一个(30% 待机 / 10% 转向 / 40% 动作 / 20% 移动)
|
|
34
|
-
- **屏幕漫游**:朝 facing 方向行走,自动检查空间、不走出屏幕
|
|
35
|
-
- **点击 / 拖拽**:点击有随机回应动画(开心 / 害羞 / 傲娇),可拖到任意位置
|
|
36
|
-
- **左右朝向**:所有动画 CSS 镜像,人物可朝左 / 朝右
|
|
37
|
-
- **落地对齐**:动画统一脚底线,宠物始终站在"地面"上
|
|
38
|
-
- **流畅切换**:双缓冲 video 交叉淡入,切换零空白帧
|
|
39
|
-
- **无障碍友好**:支持 `prefers-reduced-motion`
|
|
40
|
-
|
|
41
|
-
## ⚙️ 配置
|
|
42
|
-
|
|
43
|
-
| 配置项
|
|
44
|
-
|
|
45
|
-
|
|
|
46
|
-
| `
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
##
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
# dsh-pet 🐾
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-pet?label=npm&color=blue"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="npm monthly downloads" src="https://img.shields.io/npm/dm/dsh-pet?label=%E6%9C%88%E4%B8%8B%E8%BD%BD&color=brightgreen"></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/dsh-pet"><img alt="total downloads" src="https://img.shields.io/npm/dt/dsh-pet?label=%E6%80%BB%E4%B8%8B%E8%BD%BD&color=success"></a>
|
|
7
|
+
<a href="https://github.com/PC2005-cloud/dsh-pet"><img alt="stars" src="https://img.shields.io/github/stars/PC2005-cloud/dsh-pet?style=social"></a>
|
|
8
|
+
<a href="https://github.com/PC2005-cloud/dsh-pet/blob/master/LICENSE"><img alt="license" src="https://img.shields.io/github/license/PC2005-cloud/dsh-pet?color=orange"></a>
|
|
9
|
+
<a href="https://awesome-dsh-plugin.com"><img alt="awesome dsh plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
|
|
10
|
+
<img alt="platform" src="https://img.shields.io/badge/platform-DeepSeek%20Harness%20Web-8A2BE2">
|
|
11
|
+
<img alt="assets" src="https://img.shields.io/badge/assets-dynamic%20animations-ff69b4">
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
> A floating desktop pet for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI.
|
|
15
|
+
> 一只住在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web 界面里的桌面宠物:待机呼吸、随机动作(含打瞌睡)、偶尔转向、屏幕漫游、点击反应、可拖拽。
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🚀 快速开始(安装插件)
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
dsh plugin --profile web add dsh-pet
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
重启 `dsh web`,宠物出现在界面右下角——全部透明动画开箱即用,无需任何生成流程。
|
|
26
|
+
|
|
27
|
+
> 💡 想自己造一只专属宠物?克隆 [PC2005-cloud/dsh-pet](https://github.com/PC2005-cloud/dsh-pet) 仓库,用内置素材链(AI 提示词 → 绿幕视频 → 透明动画,素材由豆包生成)从零生成,全流程可复现。
|
|
28
|
+
|
|
29
|
+
## ✨ 功能特性
|
|
30
|
+
|
|
31
|
+
- **纯粹的桌宠**:不掺业务功能——没有天气查询、系统监控、Agent 状态感知,就一件事:陪你。零核心改动、零模型成本(运行时零 LLM/API 调用)
|
|
32
|
+
- **手绘风透明动画**:待机呼吸、打瞌睡、玩魔方、哼歌、炸毛、吐泡泡、玩水枪、小提琴演奏、蓝鲸现世、吃白饭、照镜子、三支舞、写代码、四季动作(放风筝、堆雪人、吃冰淇淋、放烟花……)全部无缝衔接
|
|
33
|
+
- **永不停止的动画链**:每段动画播完立即按概率选下一个(30% 待机 / 10% 转向 / 40% 动作 / 20% 移动)
|
|
34
|
+
- **屏幕漫游**:朝 facing 方向行走,自动检查空间、不走出屏幕
|
|
35
|
+
- **点击 / 拖拽**:点击有随机回应动画(开心 / 害羞 / 傲娇),可拖到任意位置
|
|
36
|
+
- **左右朝向**:所有动画 CSS 镜像,人物可朝左 / 朝右
|
|
37
|
+
- **落地对齐**:动画统一脚底线,宠物始终站在"地面"上
|
|
38
|
+
- **流畅切换**:双缓冲 video 交叉淡入,切换零空白帧
|
|
39
|
+
- **无障碍友好**:支持 `prefers-reduced-motion`
|
|
40
|
+
|
|
41
|
+
## ⚙️ 配置
|
|
42
|
+
|
|
43
|
+
| 配置项 | 说明 |
|
|
44
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| 设置页「桌宠配置」 | DSH 设置 → 桌宠配置:图形化编辑**大小 / 位置 / 边距**,支持**多开**(添加/删除宠物,每只独立配置);保存**即时生效**,恢复默认回落 config.jsonc |
|
|
46
|
+
| `pets`(config.jsonc) | 默认宠物列表:`[{ "id", "size", "position": { "corner", "marginX", "marginY" } }]`;多只即多开,首只为「添加宠物」的默认模板 |
|
|
47
|
+
|
|
48
|
+
> 说明:插件安装即用,配置均为可选;设置页保存的用户覆盖写入 `$DSH_HOME/dsh-pet/main-config.json`(用户层,优先于包内默认)。
|
|
49
|
+
|
|
50
|
+
### 📄 高级自定义(直接编辑配置文件)
|
|
51
|
+
|
|
52
|
+
用户数据统一收敛在 `$DSH_HOME/dsh-pet/`:
|
|
53
|
+
|
|
54
|
+
| 层 | 路径 | 作用 |
|
|
55
|
+
| ---------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
|
|
56
|
+
| 默认配置(只读) | 包内 `assets/config.jsonc` | 完整结构参考:宠物列表 / 动画池(idle/turn/drag/clicks/moves/categories)/ 播放权重 |
|
|
57
|
+
| 用户配置 | `$DSH_HOME/dsh-pet/main-config.json` | 覆盖片段:可整体覆盖 `pets` / `animations` / `animationWeights`,缺省字段回落默认 |
|
|
58
|
+
| 用户动画(可选) | `$DSH_HOME/dsh-pet/main-animation/` | 放入 `.webm` 即可作为动画播放,**优先于包内素材** |
|
|
59
|
+
|
|
60
|
+
- 设置页底部会显示这些路径
|
|
61
|
+
- 自定义动画:把 `xxx.webm` 放进 `main-animation/`,在动画池/分类里写 `"xxx"`,**刷新页面**即可(无需重启 DSH)
|
|
62
|
+
- 格式:仅 `.webm`;**透明动画需 VP9 Alpha 编码**(与包内素材同规范,普通 webm 会有黑底)
|
|
63
|
+
- 修改用户配置后同样**刷新页面**生效
|
|
64
|
+
- 动画名请对照默认配置填写,避免引用不存在的动画
|
|
65
|
+
|
|
66
|
+
## 🗑️ 卸载
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
dsh plugin --profile web remove dsh-pet
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 🖥️ 运行效果
|
|
73
|
+
|
|
74
|
+
宠物实际运行在 DSH Web 界面中的样子:
|
|
75
|
+
|
|
76
|
+
<p>
|
|
77
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/assets/screenshots/dsh-pet-running-1.png" width="380" alt="dsh-pet running in DSH Web UI 1" title="dsh-pet running in DSH Web UI 1">
|
|
78
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/assets/screenshots/dsh-pet-running-2.png" width="380" alt="dsh-pet running in DSH Web UI 2" title="dsh-pet running in DSH Web UI 2">
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
## 🎬 效果预览
|
|
82
|
+
|
|
83
|
+
> 动画为透明背景;GIF 预览中透明部分显示为页面底色,实际播放为透明。
|
|
84
|
+
|
|
85
|
+
<p>
|
|
86
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/daiji-huxi-xiuxian.gif" width="160" alt="待机呼吸休闲" title="待机呼吸休闲">
|
|
87
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/dongzhangxiwang.gif" width="160" alt="东张西望" title="东张西望">
|
|
88
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/yuandi-piaofu-tabu.gif" width="160" alt="原地漂浮踏步" title="原地漂浮踏步">
|
|
89
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/yuandi-xiaoqi-chenmian.gif" width="160" alt="原地小憩沉眠" title="原地小憩沉眠">
|
|
90
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/dianji-huiying-kaixin-yuedong.gif" width="160" alt="点击回应 - 开心跃动" title="点击回应 - 开心跃动">
|
|
91
|
+
<img src="https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/https://raw.githubusercontent.com/PC2005-cloud/dsh-pet/main/dsh-pet/assets/preview/beishubiao-tuozhuai-xuankong-fankui.gif" width="160" alt="被鼠标拖拽悬空反馈" title="被鼠标拖拽悬空反馈">
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
全部动画见仓库:`dsh-pet/assets/thumb/`。
|
|
95
|
+
|
|
96
|
+
## 📚 完整项目(不止是插件)
|
|
97
|
+
|
|
98
|
+
这是**完整的三件套项目**,任何人 clone 仓库都可以从零生成自己的桌面宠物:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
① 提示词(配方) → ② 素材生成链(引擎) → ③ 插件(成品)
|
|
102
|
+
AI 生成动画的配方 源视频 → 透明动画的管线 运行在 DSH 里的宠物
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- 仓库:[PC2005-cloud/dsh-pet](https://github.com/PC2005-cloud/dsh-pet)
|
|
106
|
+
- 设计与实现文档:[DESIGN.md](https://github.com/PC2005-cloud/dsh-pet/blob/master/DESIGN.md)
|
|
107
|
+
|
|
108
|
+
## 🔎 发现更多 DSH 插件
|
|
109
|
+
|
|
110
|
+
- 社区插件目录:[awesome-dsh-plugin.com](https://awesome-dsh-plugin.com)
|
|
111
|
+
- DSH 官方仓库:[deepseek-ai/DeepSeek-Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
112
|
+
|
|
113
|
+
## 📄 许可
|
|
114
|
+
|
|
115
|
+
- 代码:MIT
|
|
116
|
+
- 素材(动画/提示词/源视频):允许开源使用,**禁止商用**
|
package/cordis.patch.yml
CHANGED
|
@@ -13,17 +13,8 @@
|
|
|
13
13
|
# - 因为 package.json 声明了 dsh.client,DSH 的模块系统同时会把
|
|
14
14
|
# 这个包扫描为"浏览器插件",提供 /plugins/dsh-pet/client.js 给页面
|
|
15
15
|
#
|
|
16
|
-
# 【config 说明】
|
|
17
|
-
# 这里写的 config 会传给 host 半侧的 apply(ctx, config)。
|
|
18
|
-
# 注意:浏览器半侧(client)目前收不到这些配置(DSH 客户端配置管线
|
|
19
|
-
# 限制,client 收到的是空对象),所以这些值目前只影响 host 半侧。
|
|
20
|
-
# 宠物行为参数(size/position 等)在 client 里走代码默认值。
|
|
21
|
-
#
|
|
22
16
|
# ============================================================================
|
|
23
17
|
|
|
24
18
|
- insert:
|
|
25
19
|
- id: pet # 插件行 id(唯一)
|
|
26
20
|
name: 'dsh-pet' # 模块名:解析到 lib/index.js
|
|
27
|
-
config:
|
|
28
|
-
size: 260 # 宠物显示高度(px)—— 目前未传到 client
|
|
29
|
-
position: bottom-right # 默认角落位置 —— 目前未传到 client
|