DeepSeek Harness (DSH) focuses on agent building, but developers often have scenario-specific needs, such as real-time game play. Existing community Xiangqi plugins either only provide tools or interrupt when the model misbehaves. There is a need for a solution that can play smoothly within a session and automatically fall back to a local engine when the model fails.
dsh-xiangqi-mate is a human-versus-AI Xiangqi plugin. The plugin owner is lpeixin. It lets the user (playing Red) play against the model configured in the current DSH session (playing Black). If the model experiences a timeout, rate limiting, or makes an illegal move, the built-in local engine takes over the game.
Core Features¶
- Zero dependencies, no build step: The host side uses only built-in Node modules, and the browser side is a hand-written single file, ready to use after installation.
- Local engine fallback mechanism: When the model times out, is rate-limited, or returns an illegal move, it automatically switches to the local engine to continue play.
- Universal notation: Supports ICCS (e.g.,
h2e2) and Chinese notation (e.g.,炮二平五). - Multilingual UI: Supports Chinese and English, and automatically switches with the DSH language settings.
- Standalone engine library:
lib/engine/**is a pure-function library, independent of DSH, and reusable in other projects.
Installation and Activation¶
Use plugin_manager to install:
plugin_manager { action: "install_bundle", target: "github:lpeixin/dsh-xiangqi-mate" }
After installation, ensure the status is applied. If restart-required is displayed, restart DSH.
Typical Usage¶
- UI operations: Click a piece → legal targets are highlighted → click a target to place the piece. Dragging is also supported.
- Chat trigger: Type “let’s play chess” in the chat, and the model calls
xiangqi_newto start a game. - Command line:
/xiangqi new | state | move 炮二平五 | undo | hint | resign | review
Configuration Notes¶
Edit cordis.patch.yml. Note: the patch replaces the entire configuration object rather than merging.
The configuration items include:
- id: xiangqi
config:
opponent:
mode: model # 模型执黑 | local 为纯本地引擎
timeoutMs: 60000
maxRetries: 2
maxTokensPerMove: 256
maxTokensPerGame: 20000
local:
depth: 4
timeMs: 300
rules:
fiftyMovePlies: 120
perpetualCheckLoses: true
ui:
showCoordinates: true
showEval: false
animation: true
clock: off # off | perMove | total
Applicable Scenarios and Notes¶
This plugin is suitable for developers who need to play Xiangqi directly within a DSH session. It does not clutter the chat history with move records; instead, it runs independently in the right-side panel. The plugin runs with the permissions of the current DSH process, so it is recommended to review the source code and license before installation.
Conclusion¶
This plugin fills the gap between “tool-based plugins” and “pure local engines,” providing a robust human-versus-AI play environment.
- Directory page: https://www.skillhub.cn/plugins/lpeixin/dsh-xiangqi-mate
- Source code: https://github.com/lpeixin/dsh-xiangqi-mate