Описание
Ниже — оригинальный текст автора.
metsh · Task Mascot(dsh-task-mascot)
真跟着 Agent 每一步工具调用在动。 DeepSeek Harness(dsh)Web 插件 · by metsh · 社区:LINUX DO

2.2.0 实录:待办清单 + 本轮花费
大部分"桌宠"只是挂在角落循环播放动画。Task Mascot 直接订阅会话的实时事件流:Agent 每调用一个工具,角色就切到对应动作,同时告诉你它正在对哪个文件 / 哪条命令 / 哪个关键词做什么,成功失败一目了然。
安装
已验证:DSH 0.2.2-rc.5(npm
next,Linux ·dsh web;2.2.0 的待办清单与花费估算于 2026-11-22 实测,此前 2.1.3 于 2026-11-18);此前 0.2.2-rc.2(2026-11-12,Linux ·dsh web);DSH Desktop (macOS) 已在 0.2.2-rc.1 上验证安装与启动加载(插件 2.1.2,2026-11-16)。要求 dsh ≥ 0.2.0-rc.2、Node ≥ 22.19。
dsh web(命令行)
sole plugin --profile web add github:sherconan/dsh-task-mascot # 或 npm 包:dsh-task-mascot
然后重启 dsh web。安装会自动把插件加进 web profile 的 bundles,不用手改配置。
dsh web(界面里装):左侧栏 Plugins(插件) → Add plugin(添加插件) → 输入 dsh-task-mascot → Install(安装) → 打开插件卡片右侧的开关(启用),刷新页面即可。
DSH Desktop(桌面版):Desktop 用自己独占的 desktop profile,上面 --profile web 的命令装进的是 web profile,Desktop 里看不到;npm 装的 dsh 也不能改 Desktop 的 profile。请在 Desktop 里按同样步骤 Plugins → Add plugin → dsh-task-mascot 安装并启用;或者用 Desktop 自带的 dsh 命令(应用菜单「管理 dsh 命令…」安装),先完全退出 Desktop,再运行 sole plugin --profile desktop add dsh-task-mascot,重新打开即可。已在 macOS DSH Desktop 0.2.2-rc.1 实机验证安装与启动加载(依据 官方 Desktop 文档)。
设置入口(0.2.1 起没有独立的 Settings 页面):左下角 More(更多)→ Settings(设置)→ 任务角色 Mascot。插件页里 dsh-task-mascot 的卡片只有启用开关和说明页,配置项不在卡片上。

旧版本:0.2.0 及更早的设置入口在 Settings 页面里,同样找「任务角色 Mascot」(本次没有在旧版重测)。
特点
| 常见桌宠插件 | Task Mascot | |
|---|---|---|
| 驱动方式 | 定时 / 随机 / 只区分"忙/闲" | 实时订阅 tool-call-delta、tool/call、结果、审批、turn 结束 |
| 显示内容 | 一个动画 | 动作 + 工具参数("正在改 src/app.js"、"运行 npm test"、"正在搜索 "function"") |
| 步骤感 | 无 | 第 N 步、本步耗时、总耗时、迷你时间线 |
| 聊天里 | 无 | 对话流里的内联步骤卡片,每步 ✓ 成功 / ✗ 失败,本轮结束有总结 + 回放 |
| 待办与花费 | 手动加的生活待办 / 余额 | Agent 自己的待办清单逐项打勾,结束时汇总没做完和没跑通的;本轮花费估算(本地计算)(2.2.0) |
| 状态粒度 | 2–3 种 | 读文件 / 写代码 / 新建 / 改代码 / 对比 / 搜索 / 上网 / 跑命令(git·测试·装依赖·下载·删除)/ MCP / 做计划 / 派子代理 / 等你确认 / 完成 / 出错 … 共 38 种(v2) |
| 看懂循环 | 无 | 第 N 轮、重试、连续失败会着急、连发工具会手忙脚乱、子任务完成、被拒绝 / 被中断(v2) |
| 时长 | 无 | 一步超过 20 s 冒汗、60 s 犯困,长任务结束欢呼,阈值可调(v2) |
| 审批 | 会挡住按钮 | 显示"等你确认",并自动避让审批按钮和输入框 |
| 角色 | 固定 | 可替换角色包(自带 大肥鱼、Claude娘),丢个文件夹就能加 |
| 映射 | 写死 | 设置里可编辑 工具 → 动画 映射规则(正则) |
| 体积 | — | 两个角色包合计约 18 MB(VP9 透明 webm + Safari 用 WebP 兜底) |
其他细节:每步至少停留 600 ms 排队播放不丢步;流式参数只显示已闭合的值不闪烁;三种展示面(内联卡片 / 输入框上方 Dock 条 / 悬浮宠物)可任意组合,默认内联卡片在视野里时不再重复显示 Dock 条,卡片滚出视野才出现(设置里「状态条何时显示」可改成「总是」);宠物可拖动、双击归位;可选提示音(默认关)。

Agent 待办清单 + 本轮花费(2.2.0)
- 看得见 Agent 自己的待办:Agent 用 DSH 自带的
todo_write列计划时,步骤卡里出现一张小清单(☐ 未开始 / ▶ 进行中 / ☑ 已完成),开工时大肥鱼说「接到 3 件事:…」,每勾掉一项冒一句「勾掉一项 ✓ …(2/3)」。 - 收尾汇总:一轮结束时主动说还剩哪项没做、哪一步没跑通(「这轮先到这:还剩「跑单元测试」没做 · 运行 npm test 失败」)。
todo_write没有「失败」状态,失败是从本轮失败的工具调用推断的;同一调用后来重试成功的不算。被中断、输出被截断时也会列出没做完的项。全部勾完会进入「清单全勾」(图鉴第 33 格)。 - 本轮花了多少钱:从每次模型调用的 token 用量(未命中缓存输入 / 缓存命中 / 输出)按 DeepSeek 官方单价和北京时间峰谷时段估算,一律写「约」。默认超过 ¥0.05 才在卡片和悬浮角色上说,回合摘要里总会显示。非 DeepSeek 模型或不认识的模型只显示 token 数。单价表日期见设置页(2026-11-22)。
- 这些都在你的浏览器里从会话事件算出来:不联网、不读 API key。设置里可分别关掉清单、勾项气泡、收尾汇总、花费,或把花费改成每轮都报。

- 大肥鱼图鉴(2.1.0):33 格收集卡(2.2.0 新增「清单全勾」),Agent 第一次触发某种动作(写代码、搜索、跑测试、出错……)时点亮一格,右上角弹出一张不挡对话的「新解锁」小提示(短时间内连续解锁会合并成一张,点它打开图鉴)。设置页「打开图鉴」或右键悬浮角色查看;进度只存在本地 localStorage。
工具 → 动画映射 / Tool → state mapping
v2 新增的状态、bash 命令细分、轮次/重试/时长规则见 docs/states-v2.md。
按顺序匹配,第一条命中生效(tool、ext 均为正则,ext 匹配目标文件扩展名)。在设置里可以编辑 JSON 覆盖。
First match wins (tool/ext are regexes; ext = target file extension). Editable in Settings.
| dsh 工具 / tools | 状态 / state | 大肥鱼实际动画 |
|---|---|---|
write / edit / str_replace_editor / apply_patch 且目标是 md/txt/rst/doc/tex | writingdoc 写文档 | editing(回退) |
write | coding 写代码 | coding |
edit, str_replace_editor, apply_patch | editing 改代码 | editing |
read, read_image, read_mcp_resource, lsp, user_terminal_list, user_terminal_read | reading 读文件 | reading |
glob, grep, session_*, web_search, web_fetch, stagehand_* | search 搜索 | search |
bash, pwsh, terminal_*, job_* | cmd 跑命令 | cmd |
run_code, workflow, office_recalculate | data 跑数据 | reading(回退) |
office_convert, office_render | writingdoc 写文档 | editing(回退) |
todo_write, exit_plan_mode, *_goal, schedule_* | planning 做计划 | planning |
subagent, subagent_fork, subagent_oar, send_message, list_agents, interrupt_agent, spawn_teammate, wait_agent, team_task_*, ralph | subagents 派子代理 | subagents |
ask_user_question, propose_action | waiting 等你确认 | waiting |
list_mcp_resources, list_mcp_resource_templates, mcp__* | mcp 调用 MCP | tools(回退) |
present | summary 总结 | thinking(回退) |
| 其它 (MCP 等) / anything else | tools | cmd(回退) |
生命周期 / lifecycle(优先级从高到低 / priority high→low):
| 事件 / event | 状态 |
|---|---|
turn/end 完成 / error | done / error 一次性 3 秒,之后回到 idle 或进行中的状态 |
审批或提问挂起 (approval/*, pendingInteraction) | waiting |
有进行中的 tool/call | 上表映射 |
| turn 进行中、模型在输出 | thinking |
| 无活动 | idle |
角色包格式 / Pack format
assets/packs/<id>/manifest.json:
{
"schema": 1, "id": "mypack", "title": "My Character", "author": "...", "license": "...",
"preview": "thinking.png",
"states": {
"thinking": { "webm": "thinking.webm", "webp": "thinking.webp", "poster": "thinking.png", "loop": true },
"done": { "webm": "done.webm", "webp": "done.webp", "poster": "done.png", "loop": false, "durationMs": 3000 }
},
"fallback": { "writingdoc": ["editing"], "idle": ["waiting", "thinking"], "*": ["thinking"] }
}
- 至少提供
thinking;缺的状态会按fallback→ 内置回退链 →*依次找。Onlythinkingis required; missing states resolve throughfallback→ built-in chain →*. - 可用状态 / states:
idle thinking reading search coding editing writingdoc cmd data planning subagents tools summary waiting done error。 webm:VP9 + alpha(Chrome/Edge/Firefox/桌面端);webp:动画 WebP,给 Safari(Safari 解 VP9 会丢透明通道);poster:首帧 PNG。- 编码 / encoding:
scripts/encode-packs.sh(384px 30fps VP9 yuva420p crf38;WebP 256px 15fps)。把母版放masters/<pack>/,按脚本里的命名改一下即可。 - 新角色(比如以后的其它角色包)直接新建目录丢进去,设置里就能选。Drop a new folder in and it appears in Settings.
自己做一个角色包
- 新建
assets/packs/<你的id>/,放入每个状态的*.webm(VP9 + alpha)、*.webp(动画 WebP,给 Safari)、*.png(首帧海报)。 - 写
manifest.json(只有thinking是必需的,缺的状态按fallback回退):
{
"schema": 1, "id": "mypack", "title": "My Character", "author": "you", "license": "CC BY 4.0",
"preview": "thinking.png",
"states": {
"thinking": { "webm": "thinking.webm", "webp": "thinking.webp", "poster": "thinking.png", "loop": true },
"done": { "webm": "done.webm", "webp": "done.webp", "poster": "done.png", "loop": false, "durationMs": 3000 }
},
"fallback": { "writingdoc": ["editing"], "idle": ["waiting", "thinking"], "*": ["thinking"] }
}
- 可用状态:
idle thinking reading search coding editing writingdoc cmd data planning subagents tools summary waiting done error。 - 编码:把带透明通道的母版放到
masters/<pack>/,运行npm run encode(scripts/encode-packs.sh:384px 30fps VP9 yuva420p;WebP 256px 15fps)。 - 重启 dsh,在设置里选择新角色。完整教程见 docs/make-a-pack.md。欢迎 PR 分享你的角色包(请写清授权)。
隐私
- 完全在本地运行:服务端只给浏览器提供素材和本机 SSE 事件流,不发起任何外部网络请求、不收集任何数据。
- 服务端转发只包含工具名和目标文件扩展名;工具参数只在你自己的浏览器里从会话流读取并显示。
- 设置保存在浏览器 localStorage。
- 2.2.0 的待办清单和花费估算只读会话里已有的
todo/write和assistant/message事件,在浏览器里计算,不联网、不读取任何 API key,也不经过服务端转发。
开发
npm test # 单元测试(映射 / 状态机 / 事件归一化 / 路径穿越防护)
npm run check # 语法检查
node test/mock-llm/server.mjs # 免 key 的模拟 LLM(:8899),用来跑真实 dsh 做端到端演示
E2E 脚本在 test/e2e/(Playwright),截图输出到 qa/(已 gitignore)。
授权
- 代码:MIT © metsh(LICENSE)
- 角色素材:见 ART_LICENSE.md。
- 大肥鱼动画:CC BY-NC-SA 4.0(非商用)。署名链:上善无形「溟月」→ ZipZipPipe 女仆版 → 社区 Q 版大肥鱼;参考 TreapGoGo/deepseek-whale-girl;动画由 metsh 绘制。
- Claude娘:metsh 原创同人角色,CC BY-SA 4.0。
- 大肥鱼图鉴卡片(
assets/packs/dafeiyu/dex/)为上述大肥鱼动画的衍生素材,同样按 CC BY-NC-SA 4.0 发布、署名链不变。
- 非官方社区插件,与 DeepSeek(深度求索)、Anthropic 均无隶属关系。
社区
- 感谢 LINUX DO 社区:中文 DSH 插件的交流和反馈很多来自这里。欢迎在 LINUX DO 或本仓库 Issues 里提建议、报问题。
English
metsh · Task Mascot — a DeepSeek Harness Web plugin whose mascot really follows every tool call the agent makes.
- Subscribes to the live session stream (
tool-call-delta,tool/call, results, approvals, turn end) — not a timer. - Shows the action and its arguments ("editing src/app.js", "running npm test"), step number, durations and a mini timeline.
- Inline step cards in the chat with per-step success/failure, plus an end-of-turn summary with replay.
- Fine-grained states: read / write / edit / docs / search / run / plan / sub-agent / waiting for approval / done / error.
- Dodges approval buttons and the input box automatically.
- Swappable character packs (ships Whale Girl 大肥鱼 and Claude娘) and an editable tool→animation mapping. ~13 MB.
- 2.2.0: shows the agent's own
todo_writechecklist and checks items off live; at the end of a turn it lists what is left and which steps failed (inferred from failed tool calls, since todo_write has no failed status). Estimates each turn's cost from per-call token usage at DeepSeek list prices with peak/off-peak hours (always marked as approximate; tokens only for non-DeepSeek models). Computed in your browser, no network, no API key. - Runs fully locally; makes no external network calls.
Install (verified on DSH 0.2.2-rc.5, Linux, dsh web, 2026-11-18; previously 0.2.2-rc.2; DSH Desktop (macOS) install and startup load verified on 0.2.2-rc.1 with plugin 2.1.2, 2026-11-16; requires dsh ≥ 0.2.0-rc.2, Node ≥ 22.19):
dsh web:sole plugin --profile web add github:sherconan/dsh-task-mascot(or the npm packagedsh-task-mascot), then restartdsh web. Or in the UI: Plugins → Add plugin →dsh-task-mascot→ Install, turn on the switch on its card, and refresh.- DSH Desktop: Desktop owns its own
desktopprofile, so a--profile webinstall does not show up there. Install from Desktop's Plugins → Add plugin, or quit Desktop and run its bundledsole plugin --profile desktop add dsh-task-mascot. Verified on macOS DSH Desktop 0.2.2-rc.1 (install and startup load). (Per the official Desktop docs.) - Settings: from 0.2.1 there is no standalone Settings page. Open More (bottom-left) → Settings → 任务角色 Mascot. The plugin's card on the Plugins page only has the enable switch and the readme. On 0.2.0 and older, look for the same section in Settings.
Code MIT © metsh. Artwork: 大肥鱼 CC BY-NC-SA 4.0 (「溟月」 by 上善无形 → ZipZipPipe → community 大肥鱼; via TreapGoGo/deepseek-whale-girl), Claude娘 CC BY-SA 4.0 — see ART_LICENSE.md. Unofficial; not affiliated with DeepSeek or Anthropic.
Community: thanks to LINUX DO, where much of the Chinese DSH plugin discussion and feedback happens.
История версий
- 2.2.029 нояб. 2026 г. · 27.2 MB