[![๐Ÿ‡บ๐Ÿ‡ธ English](https://img.shields.io/badge/lang-English-blue)](README_EN.md) [![๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡](https://img.shields.io/badge/่ฏญ่จ€-็ฎ€ไฝ“ไธญๆ–‡-red)](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: MIT](https://img.shields.io/badge/License-MIT-green.svg)](#license) [![Stars](https://img.shields.io/github/stars/your-username/dsh-theme-minecraft?style=social&label=Stars)](https://github.com/your-username/dsh-theme-minecraft) [![Version](https://img.shields.io/badge/version-0.1.0-blue)](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: ![Main menu](screenshots/menu.png) **World saves** โ€” past sessions rendered as save slots; enter, rename, or refresh: ![World saves](screenshots/worlds.png) **Game-mode picker** โ€” four modes, four agent presets, with DSH's real descriptions on the right: ![Game modes](screenshots/modes.png) **In the world** โ€” chatting with "AI him"; the T-Rex parkour game pops up while the AI thinks: ![In the world](screenshots/play.png) **Tools & reasoning** โ€” tool cards, collapsible thinking, XP particles on completion: ![Tools and reasoning](screenshots/play-tools.png) **Options** โ€” five tabs: game / AI / world / audio / visuals: ![Options](screenshots/settings.png) > 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: MIT](https://img.shields.io/badge/License-MIT-green.svg)](#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.