Five casual mini-games (sliding-number puzzle, Sudoku, snake, Schulte grid, number memory) that pop up when a turn starts, with auto-saved progress across sessions.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:pwping/moyu_games
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DeepSeek Harness(DSH)的「摸鱼」小游戏插件。任务执行(一个 turn 或 step 启动)时,屏幕右下角会弹出小游戏窗口,让你在 agent 干活的同时摸一摸鱼。窗口默认贴右下角、可按住标题栏拖动。
这是一个独立的 DSH Web 插件。它只使用官方 @deepseek-ai/* SDK 和官方 shell 槽位(sidebar.footer.action、shell.overlay、settings.section),不依赖任何插件族或 monorepo,任何人都可以安装。
整体视觉使用微信绿(#07C160)主题,包含5款小游戏。
截图
功能
- 自动 / 手动开关(标题右侧,默认自动)。
- 自动:每次任务发起(
task-start)自动弹出游戏窗口。 - 手动:任务发起不再自动弹窗,需点击侧边栏左下角「摸鱼游戏」按钮才打开。
- 开关写入设置命名空间的
autoPopup,与设置页一致。
- 自动:每次任务发起(
- 任务执行时自动弹窗。 宿主订阅
session/event,当turn/start或step/start启动时,通过 SSE 端点/api/moyu-games/events广播一个带单调递增任务号的task-start帧;浏览器在开启自动弹窗时弹出窗口并保持打开,直到你手动关闭(广播带防抖)。手动关闭后,同一任务剩余部分不会自动重弹;点按钮手动打开始终可用。下一个任务到来时(自动模式)会再次弹出。 - 右下角可拖动窗口。 窗口固定在右下角(整体 80% 大小),可按住标题栏拖动(会限制在屏幕内,拖动后停留原位,下次打开回到右下角)。外层是一层全透明、可点击穿透的遮罩,下方任务日志始终可见可操作;只有窗口本身接收输入。
- 游戏本体(5 选 1,顶部 Tab 切换): 数字华容道 → 数独 → 贪吃蛇 → 舒尔特方格 → 数字记忆。
- 数字华容道:经典滑动拼图,点击与空格相邻的数字方块滑入空位,还原为
1..n²(空格在最后)。难度 3x3~10x10,带步数/用时。所有方块统一深微信绿,移动过程中不变色。规则:把数字1-n²-1按顺序排列好即可。 - 数独:9x9 标准数独,支持选择、键盘/数字键盘输入、笔记模式、撤销、擦除、提示;统计正确数/错误数/用时。规则:填入数字 1-9,每行每列每个 9 宫格数字都不重复。「笔记」按钮选中态为深微信绿。
- 贪吃蛇:Canvas 渲染的 30×30 方格蛇,方向键或鼠标控制方向,吃到彩色圆点变长,得分与游戏结束弹窗。规则:方向键或鼠标控制方向,吃彩色圆点变长。
- 舒尔特方格:把打乱的数字按
1..n²顺序依次点击。难度 3x3~10x10,带「下一个数」与用时;点错的数字以深绿放大提示。规则:按1-n²的顺序依次点击数字(速度越快说明专注力越强)。已点中的数字用深微信绿显示。 - 数字记忆:6x6 格子,先记住 N 个数字的位置,再按顺序依次点击;统计错误数与用时。规则:记住数字位置,按
1-N的顺序依次点击(速度越快说明记忆力越好)。
- 数字华容道:经典滑动拼图,点击与空格相邻的数字方块滑入空位,还原为
- 入口。 侧边栏底部「设置」旁的「摸鱼游戏」行(官方
sidebar.footer.action槽位,纯图标+文字、无背景框),以及自动弹窗。 - 配置 在 设置 → 「摸鱼游戏」页面:总开关、自动弹窗、默认棋盘大小。
安装
前置条件
- Node.js
^22.19.0或>=24.0.0(用于构建;仅安装使用已构建的lib/不强制要求) - DeepSeek Harness(DSH) 已安装且
dsh命令可用(dsh --version能输出版本号)
方式一:给 Agent 的精简安装指令
这是插件仓库地址:
https://github.com/pwping/moyu_games帮我安装。
方式二:从本仓库 clone 后安装(推荐,本地开发或自用)
# 1. 克隆仓库到任意目录
git clone https://github.com/pwping/moyu_games.git
cd moyu_games
# 2.(可选)如需从源码重新构建,安装依赖并构建
# 仓库已提交构建产物 lib/,跳过此步也能直接安装
npm install
npm run build
# 3. 用 dsh 注册本插件(指向仓库根目录的绝对路径)
dsh plugin --profile web add /absolute/path/to/moyu_games
# Windows 示例:
# dsh plugin --profile web add E:/Vibe_CODE/moyu_games
# 4. 重启 dsh web 使插件加载
dsh web
# 若已在运行,先停止再重启:Ctrl+C 后重新执行 dsh web
安装完成后:
- 侧边栏底部「设置」旁出现「摸鱼游戏」行
- 自动模式下,任务(turn/step)开始时右下角自动弹出游戏窗口
- 设置 → 「摸鱼游戏」页可调整总开关 / 自动弹窗 / 默认棋盘大小
构建(仅在修改源码时需要)
npm install
npm run build
npm run build 生成 lib/index.js(宿主,一个 cordis 插件)和 lib/client.js(浏览器端,交给 DSH 闭包工厂客户端包)。npm run typecheck 和 npm test 用于校验源码。
安全模型
- 插件只挂载 UI 表面(侧边栏底部操作、右下角窗口、设置页),并打开一条只读的 SSE 流连接到 GUI 加载时所在的同源。它不写任何磁盘内容,不暴露任何状态或变更端点。
- 自动弹窗可通过
autoPopup(窗口内开关/设置页)关闭;窗口始终可手动关闭(按钮或 Escape),关闭后同一任务内不再自动重弹。
实现要点
- 宿主端:
src/index.ts(一个 cordis 插件)+src/stream.ts(SSE 广播器,带任务号与防抖)。注册设置命名空间和/api/moyu-games/events路由,并订阅session/event。 - 浏览器端:
src/client/index.ts注册三个官方槽位并订阅 SSE 流;src/client/ui.tsx渲染底部入口、右下角窗口、5 款游戏与设置页;src/client/game/*是各游戏的纯逻辑引擎;src/client/styles.ts注入微信绿样式表。 tsdown.config.ts构建宿主(ESM,SDK 外部化)和客户端(CJS 闭包工厂,交给window.__ModuleLoader__.load,shell 的冻结模块表保持外部、其余全部内联)。
License
MIT。
Links
More in this category
PC2005-cloud/dsh-pet#dsh-pet★ 1260
Desktop pet for the DSH Web UI with 25 transparent animations, screen wandering, click reactions and drag, plus a reproducible asset-generation pipeline.
Nagi-ovo/dsh-ads★ 660
Parody ads in 2005-Chinese-web style: sidebar banners, in-chat feeds, corner popups, and a close button whose hit area is smaller than it looks. All fictional.
vlln/whale-girl★ 357
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
yyh-001/dsh-meme★ 171
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
a86582751/dsh-nexttavern★ 165
Roleplay workspace for DeepSeek Harness: import SillyTavern/TauriTavern character cards or author one from scratch through an interactive flow; turn a long TXT novel into a playable card with either an intensive or a coarse reading pass; the main agent consults worldbooks on demand, and prose is read in a dedicated tavern reader tab; explore multiple worldlines inside one conversation (regenerate, edit-and-send, explicit clone); scoped style presets with 16 built-in styles, a character agent cluster, a standalone decision card, and card or novel export; long stories hold together through a frozen settings prefix, a hard-cut context window, traceable director notes and keyword/semantic/hybrid recall, with embeddings either online or fully local. Targets Harness 0.1.2-alpha.3 and applies its documented compatibility patches.
Sutera-Diffusus/dsh-whale-musume★ 120
A whale-girl desktop pet for the DeepSeek Harness Web UI: pat-to-raise growth, work-state poses per tool type, 494 dialogue lines, 30 achievements, a growth diary, drag physics, theme sync and an accessibility mode. Chat-keyword sensing and API-balance care ship off and are opt-in; an optional weather mood calls Open-Meteo only after you name a city. No telemetry.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.