Skip to content
Back to search

dsh-pets

DSH Pet Companion 🐾

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hellosz--dsh-pets/badge.svg)](/listings/hellosz--dsh-pets)

HTML

<a href="/listings/hellosz--dsh-pets"><img src="/api/listings/hellosz--dsh-pets/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 132 lines
  1. # DSH Pet Companion 🐾
  2. 把 OpenAI **Codex Pets** 的宠物陪伴体验带进 **DeepSeek Harness**(DSH)Web GUI 的 Cordis 插件。
  3. > 用宠物的行为状态代替进度条 —— 你的皮卡丘/小火龙会用动画告诉你 agent 正在思考、等你确认、还是完成了待你审查。
  4. ![pikachu preview](docs/pikachu-preview.png)
  5. ## 它解决了什么问题
  6. AI coding agent 跑长任务时(几分钟到十几分钟),你无法直观知道它现在在干什么:
  7. | Agent 状态 | 宠物表现 | 你该做什么 |
  8. | --- | --- | --- |
  9. | 思考中 / 写代码 | 原地跑动动画 | 去喝杯咖啡 ☕ |
  10. | 等待你确认 / 审批 | 停下来盯着你看 | 回 DSH 响应 |
  11. | 完成待审查 | 端坐/专注姿态 | 去看 diff |
  12. | 出错 | 灰蓝色沮丧抖动 | 检查错误 |
  13. | 空闲 | 呼吸/眨眼,偶尔挥手跳跃 | 陪它玩 😄 |
  14. 这正是 Codex Pets 的核心设计哲学:**"agent 正在做什么"比"agent 是什么动物"更重要**。
  15. ## 特性
  16. - 🖼️ **内置 10 只宠物**:皮卡丘、小火龙、妙蛙种子、杰尼龟、胖丁、伊布、梦幻、波加曼、木木枭、敲音猴
  17. - idle 动画来自 PokeAPI 第五世代官方动画帧(或 Pokémon Showdown 动画)
  18. - 其余 8 个状态由经典精灵程序化派生(翻转/弹跳/挥手/沮丧/呼吸/跑动/审查)
  19. - 🎬 **9 状态动画**:idle / running / waiting / review / failed / waving / jumping / running-left / running-right
  20. - 📍 **浮动宠物**:注册到 `shell.overlay`,右下角常驻,可拖拽、点击弹菜单、一键隐藏;状态气泡与配置菜单跟随宠物
  21. - 💬 **性格与口头禅**:每只宠物都有独立性格、台词和动画节奏("交给我吧,皮卡!"/"烧起来了!")
  22. - ⚙️ **设置页**:Settings → 宠物伙伴,切换宠物、缩放滑块(0.6x–2.5x)、开关
  23. - 📦 **petdex 兼容宠物包格式**:`pet.json` + 8×9 spritesheet(每帧 192×208)——社区标准,未来可直接导入 petdex.dev 上 4500+ 个社区宠物
  24. - 🔌 **零侵入**:只监听 DSH 现有事件(emit 模式),不阻塞、不篡改任何流程
  25. ## 快速开始
  26. ### 前置条件
  27. - Node.js ≥ 22
  28. - 已安装 DeepSeek Harness CLI:`npm install -g @deepseek-ai/dsh`
  29. - 已安装 `pnpm`(`dsh plugin` 内部会调用 pnpm;可执行 `corepack enable`)
  30. ### 安装插件
  31. ```bash
  32. dsh plugin --profile web add @hellosz/dsh-pets
  33. dsh web
  34. ```
  35. 如果使用 `npx` 启动 dsh,则对应命令为:
  36. ```bash
  37. npx @deepseek-ai/dsh plugin --profile web add @hellosz/dsh-pets
  38. npx @deepseek-ai/dsh web
  39. ```
  40. 安装后验证:
  41. ```bash
  42. dsh --profile web --dump-config | grep -A2 'dsh-pets'
  43. ```
  44. 浏览器打开 `http://localhost:3080`,皮卡丘会出现在右下角。
  45. 卸载:
  46. ```bash
  47. dsh plugin --profile web remove @hellosz/dsh-pets
  48. ```
  49. ## 架构
  50. ```
  51. dsh-pets.mjs # Host 入口(bundle 主入口):状态引擎 + pet/state、pet/asset 路由 + pet_say 工具
  52. cordis.patch.yml # dsh bundle patch:向 profile 插件树插入本插件行
  53. lib/client.js # Client 预构建产物:window.__ModuleLoader__.load 工厂
  54. plugin/
  55. ├── pet-companion.host.js # 动态插件 Host(会话内 cordis_define 用,与 dsh-pets.mjs 功能一致)
  56. └── pet-companion.client.js # 动态插件 Client(会话内 cordis_define 用)
  57. packs/<id>/
  58. ├── pet.json # petdex 元数据(10 只)
  59. └── spritesheet.png # 8×9 spritesheet
  60. scripts/generate-packs.js # 从 sprites/ 源素材生成宠物包(ImageMagick)
  61. sprites/ # 源素材(PokeAPI / Showdown 精灵)
  62. docs/ # 预览图
  63. ```
  64. **状态优先级**:`waiting(审批) > failed(错误) > review(回合结束) > running(思考/工具/子代理) > idle`
  65. **数据流**:Host 监听 `agent/status`、`agent/turn-stopping`、`agent/error`、`approval/request`、`tools/execute|result`、`subagent/start|end`、`workflow/start|end` → 推导状态 → 通过 `webServer` 暴露 `GET /pet/state` 与 `GET /pet/asset` → Client 每 600ms 轮询 `pet/state` → 播放对应动画行。
  66. ## 宠物包格式(petdex 兼容 v1)
  67. - `pet.json`:`{ id, displayName, description, spritesheetPath }`
  68. - `spritesheet.png`:**8 列 × 9 行**,每帧 192×208,行序固定:
  69. | 行 | 状态 | 帧数 | 用途 |
  70. | --- | --- | --- | --- |
  71. | 0 | idle | 6 | 呼吸/眨眼 |
  72. | 1 | running-right | 8 | 向右跑 |
  73. | 2 | running-left | 8 | 向左跑 |
  74. | 3 | waving | 4 | 打招呼 |
  75. | 4 | jumping | 5 | 跳跃 |
  76. | 5 | failed | 8 | 出错 |
  77. | 6 | waiting | 6 | 等待 |
  78. | 7 | running | 6 | 原地跑 |
  79. | 8 | review | 6 | 审查 |
  80. ## 重新生成宠物包
  81. ```bash
  82. # 依赖 ImageMagick 6+
  83. node scripts/generate-packs.js
  84. ```
  85. ## 素材来源与致谢
  86. - 皮卡丘/小火龙经典精灵与第五世代动画帧:**[PokeAPI/sprites](https://github.com/PokeAPI/sprites)**(社区广泛使用的游戏素材镜像)
  87. - 动画参考:**[Pokemon Showdown](https://play.pokemonshowdown.com/sprites/ani/)** 动画精灵(`sprites/` 目录已备)
  88. - 宠物包格式规范:**[petdex](https://github.com/crafter-station/petdex)**(Codex 宠物社区标准,MIT)
  89. - 产品逻辑参考:OpenAI Codex Pets(running / waiting for input / ready for review 三状态范式)
  90. ## Roadmap
  91. - [ ] 导入 petdex.dev 社区宠物包(manifest API 直连)
  92. - [ ] 多会话多宠物(并发任务各自一只)
  93. - [ ] 宠物孵化玩法(按你写的语言/风格出宠物,致敬 hatch-pet)
  94. - [ ] 浏览器端配置持久化(localStorage)
  95. ## License
  96. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.