dsh-lego-plugin
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 — plastic-look 3D bricks with glossy studs (highlight + drop shadow); running plugins render solid with a green status dot, stopped ones greyed out, awaiting-approval ones outlined in red.
- 4 themes — Classic red, Ocean blue, Forest green, Amber (switchable in the panel header).
- 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.
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 automatically; pnpm may ask you to allow the
package's build script, then re-run the add command.
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)
node scripts/build-client.mjs
node --check lib/client.js
License
MIT
No comments yet. Be the first to write one.