Bundle
dsh-lego-plugin
Lego-style visualization of dynamic Cordis plugins in the DSH Web GUI — replaces the native Cordis Plugin panel with hot plug/unplug bricks, 4 themes, i18n, pure CSS. 乐高式 DSH 动态插件可视化:将左下角原生 Cordis 插件面板乐高化,支持热插拔启停、4 套主题、中英文,纯 CSS 渲染。
- Source
- XIAOke8698
- License
- MIT
- Updated
- Updated 5 days ago
Readme
# dsh-lego-plugin
<p align="center">
<img src="docs/banner.jpg" alt="dsh-lego-plugin banner" width="100%" />
</p>
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 through `cordis_define`). Static Loader plugins from `cordis.yml`
> are 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](https://github.com/rembertdesigns/CSS-Lego-Block) —
the glossy stud highlight + drop-shadow recipe this project builds on.
- [纯 CSS 创作一块乐高积木](https://www.shuzhiduo.com/A/6pdD9l3Lzw/) —
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
<p align="center">
<img src="docs/screenshot-20260830-174905.png" alt="Cordis Plugin panel rendered as Lego bricks" width="80%" />
</p>
## Install
Requires a DeepSeek Harness installation with the Web GUI.
```sh
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:
```sh
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:
```sh
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.yml` layer is removed from the profile, so the package is
no longer mounted at the next `dsh web` start.
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)
```
```sh
node scripts/build-client.mjs
node --check lib/client.js
```
## License
MIT
Install
dsh plugin --profile web add github:XIAOke8698/dsh-lego-plugin#493a5caa64997bf48452fab4db4b2a31a8162f32
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-lego-plugin from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.