dsh-lego-plugin
September 6, 2026 · View on GitHub
Lego-style visualization of dynamic Cordis plugins in the DeepSeek Harness (DSH) Web GUI.
This plugin replaces the native "Cordis Plugin" panel at the bottom-left
sidebar with a Lego-brick view of the plugins the current session is running
(dyn/*). Every plugin is a brick rendered with pure CSS — no external
libraries, no WebGL — and each brick keeps the full lifecycle controls of the
native panel: run, stop, remove, approve, decline. Hot plug/unplug is the
point of the plugin, not just a pretty list.
Trademark notice. This project is not affiliated with, endorsed by, or connected to the LEGO Group. "LEGO" is a trademark of the LEGO Group. The brick-style appearance is a visual metaphor only.
Scope. This plugin manages dynamic Cordis plugins (
dyn/*, the ones created throughcordis_define). Static Loader plugins fromcordis.ymlare not listed — hot plug/unplug exists only for dynamic plugins.
Features
- Replaces the native Cordis Plugin panel — same entry position and label ("Cordis Plugin"), same data and lifecycle verbs, Lego-brick presentation.
- Hot plug/unplug — click a brick: Run / Stop / Remove for running or stopped plugins, Approve / Approve (future versions) / Decline while a run is awaiting approval. State refreshes live as plugins start and stop.
- Lego bricks — realistic ABS plastic finish (specular gloss sheen, micro-bevels, concentric-ring 3D studs, and extruded bite wall); running plugins render vibrant with trans-neon glowing jewels, stopped ones semi-transparent, awaiting-approval ones pulsing.
- Natural multi-color & adaptive shapes — no monotonous monochrome! The system automatically deduces official 10-color Lego palettes (Bright Red, Yellow, Azure, Green, Orange, Coral, etc.) and adaptive geometries (2x2 square, 2x3 brick, 2x4 core, 2x6 beam, plates, slim beams) based on plugin id hash, creating a lively staggered Lego cityscape.
- Tactile snap sound — procedural Web Audio synthesis produces an authentic plastic "click/snap" sound on click and interaction without external audio assets.
- 🎲 Shake the box — a playful button in the panel header to re-shuffle colors on demand, bringing genuine toy-like delight.
- Search — filter bricks by plugin id.
- Running count — the sidebar entry shows how many plugins are running.
- i18n — follows the GUI locale (中文 / English).
- Light/dark — colors come from
--dsw-alias-*theme tokens.
Style reference
The brick and stud styling follows the classic pure-CSS Lego block recipe:
- rembertdesigns/CSS-Lego-Block — the glossy stud highlight + drop-shadow recipe this project builds on.
- 纯 CSS 创作一块乐高积木 — a walkthrough of the same technique.
The stud/brick visuals are original code in this repository, informed by those references; no code is copied verbatim.
Screenshot
Install
Requires a DeepSeek Harness installation with the Web GUI and pnpm on your
PATH (dsh plugin forwards the command to pnpm).
dsh plugin --profile web add dsh-lego-plugin
Developing or testing inside the DeepSeek Harness source tree, where
dshis not yet a global binary? Run the source entry through pnpm instead:pnpm dsh plugin --profile web add dsh-lego-plugin
--profile is required and names your run configuration. Use web if you
start the GUI with dsh web (the most common case), headless for the CLI,
or any other name — a missing profile is created automatically.
Or install directly from GitHub:
dsh plugin --profile web add github:XIAOke8698/dsh-lego-plugin
Git installs build from source via the package's prepare script. pnpm ≥ 10
blocks a git dependency's build script until allowlisted — the first add
fails and prints a key. Add that key to pnpm-workspace.yaml in your profile
directory, then re-run the add command:
allowBuilds:
- <the-key-pnpm-printed>
(Or run pnpm approve-builds in the profile directory to approve it
interactively.)
Usage
Click Cordis Plugin at the bottom-left of the sidebar. The panel opens with one Lego brick per dynamic plugin. Click a brick to see its actions:
| Brick state | Available actions |
|---|---|
| Running (solid + green dot) | Stop, Remove |
| Stopped (greyed out) | Run, Remove |
| Awaiting approval (red outline) | Approve, Approve (future versions), Decline |
Uninstalling
Remove the bundle from your profile to restore the native Cordis Plugin panel:
dsh plugin --profile web remove dsh-lego-plugin
Removal is clean and complete:
- The browser half unloads, which restores the native Cordis Plugin panel — nothing about this plugin persists in the page after it stops.
- The stylesheet this plugin injected is removed on unload; no global styles are left behind.
- The
cordis.patch.ymllayer is removed from the profile, so the package is no longer mounted at the nextdsh webstart.
You can also stop just the visual replacement without uninstalling: because
the panel is a dynamic plugin itself, stop it from the Cordis panel
(dyn/… brick → Stop) or with cordis_stop, and the native panel returns
immediately.
Development
src/
index.js host half (Loader entry)
client/index.js browser half — the whole feature
scripts/
build-client.mjs zero-dependency build (Node only)
pnpm install
node scripts/build-client.mjs
node --check lib/client.js
License
MIT