Introduction¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture, where the left sidebar serves as the unified entry point for various workflows. Existing plugins mostly focus on AI agents, knowledge bases, code, and documentation, but there is still no unified entry point for “murder mystery (jubensha)” and “tabletop RPG” scenarios. Local playtesting requires switching between multiple applications, while script organization, scene-by-scene distribution, and online room creation are scattered across separate tools.
Case Desk (dsh-game-desk) is a DSH client plugin that integrates both murder mystery and game hall into the left sidebar, enabling script selection, game mastering, scene-by-scene character script distribution, AI game mastering, whiteboard debriefing, and LAN/public network room play — all within a single page.
What Is It¶
Case Desk is a DSH client plugin maintained by xinghe-1018, released under the MIT license. It converts a folder of murder mystery cases (case.yml + raw materials) into a playable game page and provides seven game hall entry points. The plugin depends on @max-null/dsh-jubensha (scripts and mastering rules) and dsh-xgame (game hall gameplay), injects configuration via cordis.patch.yml, and mounts the page at /game-desk/app/.
Core Features¶
1. Left Sidebar Integration¶
After installation, two new rows appear in the left sidebar:
- Murder Mystery: The script library. The profile page displays player count, seats, genre, difficulty, and validation results. You can start a game or enter the game room.
- Game Hall: Seven gameplay entry points: Lateral Thinking Puzzles, Detective Reasoning, Escape Room, Murder Mystery (Twist), Time Loop, Kingdom Council, Solo TTRPG.
Inside the game room, there are 8 tabs:
| Tab | Content |
|---|---|
| Game | AI Game Master (in-page DM): distribute clues, Q&A, advance scenes; note-taking on the right |
| Prologue | Opening and rules of the script |
| Main Plot | Scene-by-scene story / background |
| Character Script | Scene-gated: Scene N only shows Scene N content, rendered as page images (flipable to see all) |
| Flow | AI-generated game master outline: per-scene objectives, discussion points, truth manual reveal timing |
| Whiteboard | Free-draw canvas + card board (drag, resize, 7 colors, connect with lines, export PNG) |
| Table | Custom table: timeline template (time/character/location/action) or blank table |
| Materials | Clues, manuals, PDF originals; spoiler content is locked from player perspective |
2. Script Library & Material Folders¶
- A directory is a library. Folders containing
case.ymlare treated as scripts; otherwise they are treated as material folders (recursively scanned for PDFs / images / documents, grouped by subdirectory). - Supports importing external material folders (PDFs / scans / images) to generate a script, running the full pipeline: text extraction → validation → missing-field review → AI playtest.
3. Scene-Gated Script Pages¶
- Pages are split by “Scene N” headings and rendered to JPEG via PyMuPDF with caching. Scans that can’t be split by scene fall back to “full document as sequential page images” and won’t revert to the PDF embedded viewer.
4. Game Mastering Flow & In-Page DM¶
- After import, AI can plan the full session: what happens in each scene, where to pause for discussion, when to reveal the truth manual. Truth content is only visible from the game master perspective.
- The game master prompt is split into a “static prefix (full material package) + dynamic per-round tail (current scene, clues distributed, player’s exact words).” Switching scenes doesn’t change the prefix, reducing tokens and improving cache hit rate.
5. Whiteboard¶
- 2400×1500 world canvas, supports scroll-wheel zoom and drag-to-pan on empty space.
- Cards can be dragged, resized, colored in 7 colors, connected via edge dots (straight lines + endpoint arrows), and exported as PNG.
- In draw mode, left-click to draw; “✋ Drag” switches to pointer mode (cards are still draggable).
6. Rooms: Local / LAN / Public (3 Tiers)¶
- Local: Direct browser connection, all permissions granted.
- LAN: Enter with a 6-digit hex
lanKey; read-only materials and in-page DM allowed; text extraction, import, restart, and batch model operations require owner. - Public: Requires
remoteKey+ room presence +remoteMode; read-only and “player’s own copy” allowed; game master perspective, truth content, and flow outline are all locked. - Public rooms use cloudflared quick tunnel (auto-retry with backoff on failure, cycling protocols, up to ~3 minutes). Visitors can see on the page “whether there’s a room, which script, and what’s missing.” Two real players cannot occupy the same character.
7. Spoiler Protection¶
- Default player perspective: other players’ scripts, flow outlines, truth manuals, and game master notes are all locked. Switch to “Game Master Perspective” to expand.
Installation & Activation¶
Prerequisites:
- DSH 0.2.x
- Node ≥ 20
- Python (for text extraction and scene-gated pages; requires pypdf / PyMuPDF)
- Optional: PaddleOCR (for scan OCR), cloudflared (for public rooms)
Clone the repo into the plugins directory:
git clone https://github.com/xinghe-1018/dsh-game-desk.git ~/.dsh/plugins/dsh-game-desk
Add a link dependency in the profile’s package.json and register the id in dsh.profile.bundles:
{
"dependencies": {
"dsh-game-desk": "link:C:/Users/<you>/.dsh/plugins/dsh-game-desk"
},
"dsh": { "profile": { "bundles": ["...", "dsh-game-desk"] } }
}
After restarting the app, “Murder Mystery / Game Hall” rows appear in the left sidebar, and the page is served at /game-desk/app/.
Typical Usage¶
Adding a Script¶
Create a directory under $DSH_HOME/game-desk/cases/, e.g., 01-My-Script/, with the following structure:
$DSH_HOME/game-desk/cases/
└── 01-My-Script/
├── case.yml # Structured definition
├── _source/ # Raw PDFs / images (optional)
└── _text/ # Extracted text (generated during import)
Minimal case.yml (fill in what you know, leave unknowns blank — the page will show “what’s missing”):
meta:
id: my-case
title: My Script
players: 2
genre: Mystery
difficulty: 2
scene:
place: Old Mansion
premise: One-sentence background
roles:
- id: p1
name: Cheng Xi
player: Player 1
script: _source/ChengXi.pdf # Can also point to a txt in _text/
All other fields (truth / clues / phases / briefing / audit / reveal …) are optional. The 7 scripts bundled with @max-null/dsh-jubensha are copied into cases/ on first launch and can be used as references.
No ready-made script? Drop a bundle of materials (PDFs / images / scans) into any directory, add it to the library via “+ Directory” on the page, then click “Import Script” — the full pipeline runs: text extraction → validation → missing-field review → AI playtest. Missing fields will be listed on the profile page.
Runtime Requirements¶
| Capability | Required | Fallback if missing |
|---|---|---|
| Text extraction (PDF → txt) | Python + pypdf / PyMuPDF | Text won’t be extracted; profile page shows “No text extracted” |
| Scene-gated pages | Python + PyMuPDF | Falls back to PDF embedded viewer |
| Scan OCR | PaddleOCR (GPU by default) | Scans are treated as images only, not included in validation |
| Public rooms | cloudflared |
LAN / Local work normally; public button shows “cloudflared not installed” |
| AI mastering / flow / playtest | Any session model | These buttons prompt that a model is needed; static materials remain viewable |
Python is located via PATH by default; the OCR venv path is probed per local convention — if it doesn’t match, it can be changed in Settings. Page images and flow outlines are disk-cached; reopening doesn’t recompute.
Configuration¶
Plugin config (under config in cordis.patch.yml):
| Key | Default | Purpose |
|---|---|---|
casesDir |
$DSH_HOME/game-desk/cases |
Script library (writable; new scripts land here) |
seedFromJubensha |
true |
Copies the 7 bundled jubensha scripts into cases/ on first launch (only missing ones) |
libraryRoots |
[] |
Additional library directories; “+ Directory” on the page writes to $DSH_HOME/game-desk/library.json |
Runtime settings ($DSH_HOME/game-desk/settings.json, written by page toggles):
lanEnabled/lanKey(6-digit hex) — LAN roomremoteMode(off/quota/allow) /remoteKey— what public visitors can do- The public tunnel address is stored here after opening; it will be re-assigned on restart
Rooms & Security¶
Three-tier gate, determined by source:
- Local: Direct browser connection, all permissions granted.
- LAN (via
lanKey): Read-only materials and in-page DM allowed; text extraction, import, restart, and batch model operations require owner. - Public (
remoteKey+ room presence +remoteMode): Read-only and “player’s own copy” allowed; game master perspective, truth content, and flow outline are all locked.
All file endpoints perform path guards (only files within configured libraries are readable). Page images and cache are stored under $DSH_HOME/game-desk/; the source directory is never written to (cloud storage / read-only directories are fully supported).
FAQ¶
The port changes every restart. Check the app log for the local address: http://127.0.0.1:<port>/game-desk/app/. LAN is fixed at 5288; public uses the tunnel address. Hardcoded old ports will 404.
Character script shows only text/PDF, not scene-split. This means the role script had no text extracted (it’s a scan) or headings aren’t in “Scene N” format. The former will show “full document as page images”; the latter shows the whole document. Add text to _text/ or fix headings first, then reopen.
Public room creation reports cloudflared timeout. Clicking “Open Room” auto-retries 4 times × up to 3 rounds (cycling quic → http2 → ipv4). The page shows “Attempt n/4 (Round N/3).” If it still fails after 3 minutes, the connection is genuinely unreachable — check connectivity from your machine to api.trycloudflare.com first.
Can players see the truth? Default player perspective: other players’ scripts, flow, truth manual, and game master notes are all locked. Switch to “Game Master Perspective” to run the game.
Script copyright. The repo contains only plugin code, no scripts. The 7 scripts in cases/ come bundled with @max-null/dsh-jubensha; copyright belongs to their respective authors.
Use Cases & Notes¶
- Suitable for scenarios requiring unified management of murder mystery and tabletop game playtesting via the DSH left sidebar.
- The plugin runs with the current DSH process permissions. Review the source code and license before installation.
- Development log is in
DEVELOPMENT.md, organized by requirement ID. Search it first when troubleshooting.
Summary¶
Case Desk unifies murder mystery and game hall into the DSH left sidebar, providing an all-in-one experience from script selection, scene-gated distribution, AI game mastering, to whiteboard debriefing and online room play. If you need to playtest murder mystery or organize tabletop games within DSH, you can obtain the plugin via the directory page or GitHub.
- Directory page: https://www.skillhub.cn/plugins/xinghe-1018/dsh-game-desk
- GitHub: https://github.com/xinghe-1018/dsh-game-desk