How monster-cli/dsh-whileplay works
Whileplay is a DeepSeek Harness Web game plugin: users open a floating game window, play task-linked action games or local board games, and can follow live session progress during play. The documented expedition workflow projects session events into a bounded read model, presents that task context alongside an escort battle, and saves progress per session. The excerpts show the plugin’s projection registration and several simulation-module calls; UI wiring and some documented capabilities are represented from the README, not inspected source.
Main entry points: engine.js Game engine · client.js Web client · escort-action.js Escort battle · index.js Plugin entry
Components 22
Harness integration
- Plugin entry
index.js - Task projection
mission.js - Expedition projection
escort-mission.js
Game interface
- Web client
client.js - Game window
src/window.js - Game controls
src/ui.js
Arcade gameplay
- Game engine
src/engine.js - Flight progression
src/flight.js - Mission combat
src/mission-game.js - Ground mission events
src/ground-mission.js - Tank simulation
src/tank.js - Flight saves
src/flight-save.js
Escort expedition
- Escort battle
src/escort-action.js - Live task context
src/escort-live.js - Task briefing
src/escort-task.js - Route and terrain
src/escort-terrain.js - Battle artwork
src/escort-art.js
Board games
- Board interface
src/board-ui.js - Board game logic
src/board-games.js - Xiangqi engine
src/xiangqi.js
Other components
- Player
- Harness session
Connections 21
- Player → Web client: opens games
README.md - Harness session → Plugin entry: emits session events
- Plugin entry → Task projection: registers fold
index.js - Plugin entry → Expedition projection: registers fold
index.js - Player → Game window: moves and resizes
README.md - Web client → Game engine: runs games
- Web client → Board interface: opens board play
- Web client → Live task context: shows session status
- Game engine → Tank simulation: steps and draws
src/engine.js - Game engine → Mission combat: steps and draws
src/engine.js - Game engine → Ground mission events: steps and draws
src/engine.js - Game engine → Flight progression: creates flight state
src/engine.js - Mission combat → Flight progression: updates progression
src/mission-game.js - Game engine → Escort battle: creates escort state
src/engine.js - Escort battle → Route and terrain: uses route and terrain
src/escort-action.js - Escort battle → Battle artwork: draws battle assets
src/escort-action.js - Escort battle → Task briefing: draws task briefing
src/escort-action.js - Task briefing → Route and terrain: reads route stage
src/escort-task.js - Board interface → Board game logic: handles board play
- Board game logic → Xiangqi engine: uses rules engine
src/board-games.js - Web client → Flight saves: saves flight progress