The agents in DeepSeek Harness often require longer thinking cycles when handling complex tasks. To keep the workflow active while waiting, or to provide an observation window for long-running Agents, the dsh-doudizhu plugin introduces a three-player Dou Dizhu (Fight the Landlord) game table into the Harness interface system.
The plugin uses the shell.overlay slot to add an action entry beside the conversation title, opening a draggable and resizable floating window. Inside the window, it integrates the game engine, opponent logic, and work reminders, running in parallel with the underlying Agent process without interfering with each other.
Core Features¶
- Three-Player Play and AI Logic: Supports three seats. The two opponents are either driven by the DeepSeek model (
deepseek-v4-pro) or controlled by a local heuristic strategy. Model opponents invoke the model through the built-inllmservice in Harness, without directly exposing the API key. - Complete Rule Support: Includes all Dou Dizhu combination rules, such as single cards, pairs, triples, straights, consecutive pairs, airplanes, four-with-two, bombs, and rockets.
- Local and Model Hybrid Mode: When a model call fails, times out, or returns an invalid instruction, it automatically falls back to the local strategy; after three consecutive failures, it automatically stops model calls to prevent endless waiting.
- Continuous 300-Token Economy System: Each player starts with 100 Tokens. Won Tokens are transferred directly between players, and balances are retained across games. Because Tokens do not represent real currency, balances cannot go negative; going all-in and busting ends the round.
- Interactive Control: Supports selecting cards by clicking or dragging. The interface validates legality in real time and suggests legal play options (previous/next).
- Quick Chat: Supports sending quick phrases. Opponents reply according to their personalities and also react to key moments such as grabbing the landlord role, playing a bomb, or having fewer than 3 cards.
- Work Reminder Overlay: Displays the current Harness task status, pending approvals, or completion hints above the game window, and provides a one-click entry to return to the conversation.
- State Persistence: Window layout, game Token balances, current hand, and other state are retained after page refresh.
- Real-Time Status Indicators: Displays the Agent’s current status (Thinking/Idle) beside the conversation title, and shows indicator dots in the game window for the player currently waiting to play.
Installation and Enablement¶
In an environment where a Harness Web Profile has already been configured, run the following command to install:
dsh plugin --profile web add github:tongji-1/dsh-doudizhu
Note: If you are using pnpm 10+, the initial installation may fail to build because the prepare script is blocked. Add the corresponding build entry to the allowBuilds field in $DSH_HOME/profiles/web/pnpm-workspace.yaml, then rerun the installation command.
dsh plugin --profile web install
dsh --profile web
Typical Usage¶
After installation, the Dou Dizhu button appears beside the title of the current active conversation in the conversation list. Click it to open the game window.
- Install a Specific Version: Lock a specific version to keep the environment stable:
dsh plugin --profile web add github:tongji-1/dsh-doudizhu#v0.5.0
- Install for Local Development: Clone the repository and point directly to the local path:
git clone https://github.com/tongji-1/dsh-doudizhu.git
cd dsh-doudizhu
pnpm install
dsh plugin --profile web add "$PWD"
Notes¶
- Entertainment Only: Game Tokens are local numbers for entertainment only. They have no real-world currency value and do not support top-ups, withdrawals, or competitive multiplayer betting.
- Security Isolation: Rule logic is maintained on the client/browser side, and model routing is strictly restricted to loopback, so it cannot be used as a general-purpose model proxy.
- Offline Play: If you do not want to consume Tokens or your network is unstable, disable “Opponents Driven by DeepSeek” in the game window settings to switch to fully offline mode.
- Configuration Override: The plugin uses
deepseek-v4-proby default, with high reasoning intensity (reasoningEffort: high). This setting can be overridden when the plugin is integrated into another Profile.
Summary¶
dsh-doudizhu is a practical plugin that integrates an instant game experience into the DeepSeek Harness workflow. Through a floating window, it provides developers with a way to observe Agent status or pass waiting time while ensuring normal Agent task execution, making it especially suitable for gaps between long-running inference tasks.