[](README_EN.md) [](README.md)
# dsh-theme-minecraft
**A Minecraft Java Edition theme for the DeepSeek Harness web UI โ run `dsh web` and land on the title screen, where the world is your codebase and the villager is a coding agent.**
[](#license)
[](https://github.com/your-username/dsh-theme-minecraft)
[](package.json)
> **How it works**: this is a stock DSH bundle plugin that **touches nothing in the
> DeepSeek Harness core**. Sessions, message streams, tool calls, approvals, presets,
> workspaces, and credentials all run over the existing DSH JSON-RPC / WebSocket API โ
> every state on screen comes from real data, never mocked.
## Features
- [x] **The actual title screen** โ rotating WebGL panorama, pixel logo, yellow splash text, stone buttons; the URL printed by `dsh web` *is* the menu
- [x] **Sessions as world saves** โ past conversations appear on a save-slot screen; entering, renaming, and archiving all map to real `session/*` calls
- [x] **Game modes = agent presets** โ Survival / Creative / Adventure / Expert skins over DSH's standard / ptc / minimal / cordis presets
- [x] **In-world chat console** โ talk to "AI him" with streaming replies, collapsible reasoning, and a live world-info panel (model, tokens, workspace)
- [x] **Minecraft-flavored tool cards** โ opening a book, wiring redstone, mining a block: every real `tool/call` and `tool/result` gets a pixel-art card
- [x] **Approvals without breaking immersion** โ a pending approval pauses the parkour mini-game until you allow or deny it
- [x] **Villager small talk** โ the AI's clarifying questions show up as villager dialogue; answers flow straight back to DSH
- [x] **A parkour mini-game that only runs when the AI does** โ Chrome's offline T-Rex Runner (Chromium BSD license), driven strictly by real THINKING / STREAMING / TOOL_CALLING states, never faked while idle
- [x] **Five-tab settings** โ game / AI / world / audio / visuals: preferences in localStorage, music in IndexedDB, API key in DSH's credential store
- [x] **Synthesized 8-bit audio** โ WebAudio sound effects plus your own background tracks (MP3 / WAV / OGG / FLAC / M4A / AAC / OPUS)
- [x] **Desktop pets & particles** โ an interactive companion (axolotl / cat / wolf / creeper / ghast with feeding, affinity, and an in-app gallery) plus XP / redstone particles (capped at 80); each toggleable
- [x] **Zero lock-in** โ the classic DSH web UI stays untouched, one click away at `/index.html`
## Getting Started
### 1. Prerequisites
| Requirement | Details |
| ---------------- | --------------------------------------------------- |
| Node.js | `^22.19` or `>=24` (DeepSeek Harness runtime) |
| DeepSeek Harness | Installed, with the `dsh` command on your PATH |
| Browser | Any modern browser with WebGL and WebSocket support |
| DEEPSEEK_API_KEY | Required for real conversations (see Configure) |
### 2. Install
**Option A โ install into the web profile (recommended)**
```bash
dsh plugin --profile web add dsh-theme-minecraft # once published to npm
dsh plugin --profile web add ./dsh-theme-minecraft # or from a local checkout
```
The plugin lands in `~/.dsh/profiles/web` and mounts automatically on the next `dsh web`.
**Option B โ run from source (development)**
From the DeepSeek Harness repository root:
```bash
pnpm dsh web --patch ./dsh-theme-minecraft/cordis.source.patch.yml --no-open
# then open http://127.0.0.1:3080/
```
### 3. Configure
1. **Sign in** with the `?token=` URL printed by `dsh web` (same signed-cookie flow as
the stock UI โ the theme reuses `connection.authorizeIndex` and bypasses nothing).
2. **Provide an API key**, either way works:
- In the theme: main menu โ Optionsโฆ โ AI Settings โ save (writes through
`credentials/set` into DSH's credential store; values only ever go in);
- In the environment: put `DEEPSEEK_API_KEY` in your `.env`.
### 4. Run
```bash
dsh web
```
Open the printed URL and you are on the Minecraft main menu. The classic interface
remains available at `http://:/index.html` โ the theme's "Quit Game"
button leads there too.
## Tech Stack
| Technology | Role | Version / Compatibility |
| -------------------- | ----------------------------------------------- | --------------------------- |
| JavaScript (ESM) | All plugin and frontend logic, zero runtime deps | ES2022+ |
| Node.js | Host runtime | `^22.19` or `>=24` |
| Cordis plugin system | Plugin lifecycle and dependency injection | `>=0.x` (peer dependency) |
| WebSocket + JSON-RPC | All real communication with DSH (RPC / streams) | Built into DSH |
| WebGL | Cubemap panorama on the main menu | Native, no three.js |
| Canvas 2D | Parkour mini-game rendering (T-Rex in iframe) | Native |
| Web Audio API | 8-bit sound synthesis and music playback | Native |
| IndexedDB / localStorage | Settings and music persistence | Native |
## Project Layout
```
dsh-theme-minecraft/
โโโ .github/
โ โโโ workflows/
โ โโโ static.yml # Auto-deploys demo/ (the panorama demo site) to GitHub Pages
โโโ demo/ # Minecraft-Panorama demo site (GitHub Pages)
โ โโโ index.html # Main-menu demo (three.js panorama background)
โ โโโ 404.html # Pages 404 page
โ โโโ asset/ # Six cubemap faces + UI textures
โ โโโ css/ # Demo-site styles and pixel fonts
โ โโโ figure/ # Character faces (Steve / villager / creeper)
โ โโโ loading/ # Loading-screen demo page
โ โโโ worlds/ # World-select demo page
โโโ docs/
โ โโโ ๅผๅๆๆกฃ.md # Design & development notes (Chinese)
โโโ screenshots/ # Screenshots used in this README
โโโ web/ # The theme itself (single-page app)
โ โโโ index.html # SPA shell
โ โโโ manifest.webmanifest # PWA manifest
โ โโโ css/
โ โ โโโ minecraft.css # Main menu / saves / options visuals
โ โ โโโ hud.css # In-world HUD
โ โโโ fonts/ # Minecraft-style pixel fonts (ttf / woff)
โ โโโ assets/ # Official art: panorama, GUI, faces
โ โโโ js/
โ โ โโโ rpc.js # Browser protocol client (unary RPC + streams + $events)
โ โ โโโ panorama.js # Native WebGL cubemap panorama
โ โ โโโ menu.js # Main menu / saves / modes / options
โ โ โโโ world.js # In-world HUD, AI state machine, approval & question panels
โ โ โโโ store.js # localStorage settings + IndexedDB music
โ โ โโโ audio.js # WebAudio synth SFX + background music
โ โ โโโ particles.js # XP / redstone particles (capped at 80)
โ โ โโโ pet.js # Desktop pet (iframe hosting web/pet/pet.html)
โ โ โโโ ui.js # Dialogs / toasts / splash library / mode flavor
โ โ โโโ main.js # Routing and startup
โ โโโ pet/ # Pet app itself (pet.html + picture/ assets)
โ โโโ mini-games/
โ โโโ dino-runner.js # Parkour wrapper (T-Rex iframe adapter, createDinoGame factory)
โ โโโ t-rex/ # Chrome offline T-Rex Runner (Chromium BSD license)
โโโ index.js # Host plugin: mounts the / and /minecraft routes
โโโ cordis.patch.yml # Bundle-layer mount declaration (DSH plugin marker)
โโโ cordis.source.patch.yml # In-repo source debugging layer
โโโ package.json # dsh.bundle.patch declaration (bundle form)
โโโ LICENSE # MIT
โโโ .gitignore
โโโ README.md
โโโ README_EN.md
```
## Screenshots
**Main menu** โ the Nether panorama spins behind the logo, and yes, that splash text is a warning:

**World saves** โ past sessions rendered as save slots; enter, rename, or refresh:

**Game-mode picker** โ four modes, four agent presets, with DSH's real descriptions on the right:

**In the world** โ chatting with "AI him"; the T-Rex parkour game pops up while the AI thinks:

**Tools & reasoning** โ tool cards, collapsible thinking, XP particles on completion:

**Options** โ five tabs: game / AI / world / audio / visuals:

> The repo also ships a standalone three.js panorama demo site (the `demo/` directory,
> the Minecraft-Panorama demo, auto-deployed to GitHub Pages on every push to main).
> The theme itself does not use three.js โ its panorama is raw WebGL.
## License
Released under the **[MIT](LICENSE)** license.
[](#license)
> โ ๏ธ **Asset notice**: the name *Minecraft* and all official assets shipped here
> (panoramas, GUI textures, character faces, pixel fonts) are ยฉ Mojang AB / Microsoft.
> This project is a non-commercial fan theme, not affiliated with or endorsed by Mojang
> or Microsoft. Do not use it in commercial products; Mojang may request removal at any time.
## Contributing
Issues and pull requests are welcome. A few conventions keep things moving.
**Filing an issue**
- **Bug reports** should include:
- Environment: OS, browser and version, Node.js version, DeepSeek Harness version;
- Steps to reproduce (starting from which command), expected vs. actual behavior;
- Browser console output and `dsh web` terminal logs.
- **Feature requests** should describe: the scenario you want to solve, how it should
feel in Minecraft terms, and the DSH capability it maps to (if known).
**Opening a pull request**
```text
1. Fork the repository
2. Create a branch git checkout -b feat/your-feature # or fix/your-fix
3. Commit git commit -m "feat: add xyz" # Conventional Commits
4. Push & open a PR Push to your fork, open a PR against main
5. Review Address feedback; a maintainer merges once approved
```
> Please attach before/after screenshots for UI changes, and keep PRs free of
> modifications to the DeepSeek Harness core โ theme capabilities should only ever go
> through DSH's existing plugin mechanism and APIs.