DeepSeek Harness Plugin

dingchenhui0618-arch/dsh-mahjong-solo

Category Just for Fun Added 2026-11-30

Solo Sichuan mahjong (血战到底) in the Harness sidebar: one human against three AI players, with the full local rule set — 108 tiles with no honours, a forced void suit (定缺) that also forbids peng/gang of that suit, no chi, winners leave the table while the rest play on, multiple winners on one discard, wall-empty settlement (查大叫 / 查花猪) and per-gang payments. Fan is additive (平胡 / 对对胡 / 七对 / 龙七对 plus 清一色 / 金钩钓 / 根 / 杠上花 / 杠上炮 / 海底捞月 / 自摸) and capped at 8. A hand is determined by its seed plus the actions the human took: the wall comes from mulberry32, and the AI random stream lives in serialisable game state that is part of the state hash, so the same seed and the same action list replay the identical hand. At the end the record is written to JSON (initial wall, every event, settlement, tenpai and deal-in stats); the replay panel steps or scrubs through it and verifies the state hash, the recorded wall and the event list. Zero-dependency build (src to lib with the client CSS inlined), node --test covers engine, golden vectors and host routes, and a preflight script scans for secrets, checks .gitignore and hunts stray files before pushing. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:dingchenhui0618-arch/dsh-mahjong-solo

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).

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.