omdsh-dev/dsh-minigames 预览 preview

omdsh-dev/dsh-minigames

Plugin插件 Native原生 ⭐ 6 BSD-3-Clause Pets & Fun桌宠与娱乐

DSH Web UI 右侧小游戏面板:18 款离线小游戏(恐龙跳一跳 / 俄罗斯方块 / 坦克大战 / 扫雷 / 2048 / 数独 / 吃豆人 / 跟枪练习等),可扩展游戏注册表,等待模型回复或修 bug 时的摸鱼神器

Project Overview项目介绍

dsh-minigames is a native plugin built exclusively for DeepSeek Harness (DSH), adding a floating minigame window to DSH's web UI for users to play while waiting for model responses or debugging tasks. Installation requires a pre-built DSH snapshot dated 20260808 or newer and the pnpm package manager. Users must select the correct plugin version tag matching their local DSH installation, as mismatched versions will cause common errors like useConversation is not a function. After installation completes, you need to hard refresh your browser to load the plugin correctly.

The plugin offers 18 fully offline minigames rendered entirely via Canvas, including classic titles like Chrome Dino, Tetris, AI-powered Tank Battle, 2048, Sudoku, Gomoku, Pac-Man, and an FPS aim training game. When collapsed, the plugin leaves a draggable floating button in the bottom right corner that opens the game panel on click. When expanded, the panel can be dragged and snaps to screen edges, with all position and size settings persisted between DSH sessions. All games pause automatically when the window is hidden or you switch browser tabs, and resume right where you left off when you return.

The plugin is released under the permissive BSD-3-Clause open source license. It provides a clear extension interface that lets developers add new games by implementing the MiniGameDefinition interface and registering it with the built-in registerGame method. All existing games separate game logic from rendering, with 189 unit tests covering core logic to ensure stability. Known limitations include that keyboard input only works when the game canvas is focused, and level progress is not saved between sessions, only high scores are persisted to local browser storage.

这是一款专为 DeepSeek Harness (DSH) 开发的原生插件,用于在 DSH 的 Web UI 中添加一个浮动小游戏窗口,供用户等待模型回复或调试问题时休闲使用。插件支持折叠和展开两种状态,折叠后会在界面默认右下角留下可自由拖动的圆形游戏按钮,拖动超过5px松手不会打开窗口,单击才可重新打开面板,位置信息会自动持久化保存。展开状态下,窗口可拖动,松手靠近屏幕边缘会自动吸附,宽度支持在 360px 到 80vw 之间自定义调整。

插件内置了 18 款全离线、纯 Canvas 绘制的经典小游戏,涵盖恐龙跳一跳、俄罗斯方块、带AI的坦克大战、消消乐、数字华容道、贪吃蛇、2048、扫雷、记忆翻牌、AI对战五子棋、跳一跳、打砖块、打地鼠、AI对战黑白棋、Flappy Bird、数独、吃豆人、FPS跟枪练习共 18 款,满足不同用户的休闲需求。用户安装完插件后,点击浮动按钮打开面板,选择想要游玩的游戏即可开始,隐藏窗口或切换标签页时游戏会自动暂停,恢复后可继续游玩,不影响原有对话流程。

该插件采用 BSD-3-Clause 开源许可证,安装需要已构建的 20260808+ 版本 DSH 和 pnpm 包管理器,用户必须根据本地 DSH 版本选择对应标签的插件版本安装,装错版本会导致启动报错。安装完成后需要强制刷新浏览器才能生效,插件预留了标准游戏扩展接口,开发者可以按照规范快速添加新的自定义游戏。目前存在部分已知限制,比如关卡进度不跨会话保存,键盘输入仅在游戏区域获得焦点后生效。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add '@dsh-external/dsh-minigames@github:omdsh-dev/dsh-minigames#v0.3.27'

把 omdsh-dev/dsh-minigames 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-minigames

简体中文 | English

DSH Web UI 浮动小游戏窗口:等待模型回复或修 bug 时的摸鱼神器。

  • 折叠态:窗口隐藏后留下一个圆形浮动 🎮 按钮(默认右下角),可自由拖动并记住位置, 按住拖动(位移超过 5px)松手不会打开窗口;单击才重新打开面板。
  • 展开态:浮动小游戏窗口,拖动标题栏可随意移动,松手靠近屏幕边缘自动吸附 (左右停靠/上下贴边),位置、停靠状态与宽度均持久化,刷新后自动恢复;默认宽度 min(50vw, 640px),可拖左缘调整 360px–80vw,面板内自由选择游戏。
  • 游戏(全部离线、零资源文件、Canvas 绘制):
    1. 🦖 恐龙跳一跳 —— Chrome 经典小恐龙(昼夜/雨天);
    2. 🧱 俄罗斯方块 —— 经典下落消除;
    3. 🛡️ 坦克大战(带 AI) —— 2D 坦克对战,敌军追踪 + 视线开火,共 3 波;
    4. 💎 消消乐 —— 点击消除四连通同色块,目标分过关、逐关递增;
    5. 🔢 华容道 —— 16 格数字华容道(15-puzzle),滑动方块按序排列,用时越短分越高;
    6. 🐍 贪吃蛇 —— 经典贪吃蛇,穿越边界会从对侧出现(环面地图);
    7. 🔢 2048 —— 方向键滑动合并数字,合成 2048 即达成;
    8. 💣 扫雷 —— 左键翻开、右键标旗、双击数字自动展开周围;
    9. 🃏 记忆翻牌 —— 翻开两张配对,步数越少分越高;
    10. ⚫ 五子棋 vs AI —— 15×15,AI 会进攻也会堵你;
    11. 🦘 跳一跳 —— 按住蓄力、松开起跳,落点越准加分越多;
    12. 🧱 打砖块 —— 移动挡板反弹小球,清完进入下一关、球速递增;
    13. 🔨 打地鼠 —— 30 秒限时点击打地鼠,命中 +1、打空 -1;
    14. ⚫ 黑白棋 vs AI —— 8×8 奥赛罗,角最重要,无棋可下自动让位;
    15. 🐦 Flappy —— 点击/空格振翅穿过柱子缝隙,越远分越高;
    16. 🧩 数独 —— 9×9 标准数独,D 键切换难度,填满无冲突即胜;
    17. 🟡 吃豆人 —— 经典迷宫吃豆,力量豆可反吃幽灵;
    18. 🎯 跟枪练习 —— FPS 跟枪:锁定鼠标转视角压住三维漂移靶子,左键射击有后坐力。
  • 预留扩展接口:游戏注册表(registerGame),新增游戏只需实现一个接口。
  • 体验细节:隐藏窗口/切换标签页时自动暂停游戏、恢复时继续;每局最高分存 localStorage;键盘输入只在点击游戏区域后生效,不会劫持聊天输入框。
  • 尺寸自适应:游戏画布按面板真实可用空间自适应(工具条+画布+按键提示整体 始终完整展示,不出现滚动条;浏览器缩放/面板拖宽缩窄都会自动重排),宽高上限 960px。

你的 DSH 版本决定装哪个插件版本(装错会崩:常见症状 useConversation is not a function)

  • DSH 0.1.2-alpha.1 ~ 0.2.1-alpha.1:装新版(下方默认命令;各 DSH 版本对应的插件 tag 见下方变更记录)
  • 更旧的 DSH(0.1.1-rc.2 及以前):无可用版本

安装

前置:已构建的 DSH 20260808+ 快照、pnpm。

# 方式一:git 依赖固定 tag(公开镜像,推荐;也可用 github:omdsh-dev/dsh-minigames)
dsh plugin --profile web add '@dsh-external/dsh-minigames@github:omdsh-dev/dsh-minigames#v0.3.27'

# 方式二:本地安装
git clone https://github.com/omdsh-dev/dsh-minigames.git   # 或直接使用本目录
cd dsh-minigames
pnpm install
pnpm build

# 装入当前 web profile(自动写入依赖并加入 dsh.profile.bundles)
dsh plugin --profile web add /绝对路径/to/dsh-minigames

# 可选:确认组合配置只出现一个插件行
dsh --profile web --dump-config | grep dsh-minigames

安装提示:pnpm 11 首次安装可能拦截 node-pty 等构建脚本——在 ~/.dsh/profiles/web 下执行 pnpm approve-builds --all 放行后重跑安装命令;装完硬刷新浏览器(Ctrl/Cmd+Shift+R)。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-mpkg-wallpaper 下一个 Next dsh-harness-zh-cn →