rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
PROJECT README
Chat replies that render as interfaces, not walls of Markdown.
A plugin for DeepSeek Harness (DSH) that upgrades the assistant-message renderer: model-authored OpenUI Lang fences render as cards, tables, charts and diagrams in place, while structured Markdown is automatically compiled into the same visual language. Plain text stays plain text.

中文说明 · Docs index · Component reference · Design system · Architecture · Gallery (GitHub Pages) · Light / dark / mobile
Status: v1.1.1 · 44 components · MIT · light/dark themes · 390/920px · macOS tested locally, Linux covered by CI.
The gallery page is served by GitHub Pages once enabled in the repository settings (see RELEASING.md); the PNG links work immediately.
Markdown is excellent for prose but poor at structure: KPI comparisons turn into walls of text, tables lose hierarchy on mobile, and trends are invisible. Intelligence UI keeps Markdown for the parts that are prose and upgrades the rest:
An assistant reply can mix prose and interface blocks. The plugin intercepts the
assistant-step renderer (priority −20) and runs a three-mode pipeline:
| Reply shape | Trigger | Rendering |
|---|---|---|
| Native fence | a ```openui program in the reply |
parse → evaluate → render components in place (highest fidelity) |
| Auto-compiled | no fence, but Markdown tables / KPI lists / ordered steps | the client compiler turns them into cards, charts and search tables |
| Plain text | everything else | the host Markdown renderer, unchanged |
Text outside a fence stays Markdown, so one reply can be: explanation → chart → caveat. Rendering is insertion-based: nothing is merged, rewritten or stripped.
root = Stack([kpis, chart, note], "column", 16)
kpis = Grid([a, b], 2, 12, 150)
a = StatCard("Revenue", "¥84,300", "+12.6%", "up", null, "gross, tax included", "brand")
b = StatCard("Refund rate", "1.2%", "-0.3%", "down", null, "below the 2% guardrail", "warning")
chart = Chart("Last 7 days", "area", [{name: "Revenue", values: [82, 94, 110, 129, 105, 138, 152]}], [], ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], 220)
note = Callout("Takeaway", "Revenue grew three weeks in a row; shift budget toward the fastest channel.", "success")
| Host | DeepSeek Harness (DSH) desktop app (source), with a build that exposes plugin bundles (engines.dsh >= 0.2.1-rc.0). This repository is the plugin, not a standalone app. |
| Node.js | >= 20 — only needed to build and run tests (the repository ships a prebuilt lib/client.js). |
| pnpm | 12 — pinned through packageManager (Corepack picks it up automatically). |
| Chrome | Any recent Chrome/Chromium for the browser-based tests (CHROME=/path/to/chrome if auto-detection fails). |
| Platform | macOS (14+) and Linux tested; Windows is expected to work but untested for the Chrome-based suites. |
engines.dshrefers to the host's plugin-bundle API version; check the DSH build notes for the exact minimum.
The plugin renders against the host's --dsw-* theme tokens and platform modules
(@deepseek-ai/dsh-client-*). Those are supplied by the host; nothing needs to be installed
globally.
Five minutes from zero to a rendered reply:
git clone https://github.com/MarkYangKp/dsh-intelligence-ui.git
(no build step: lib/client.js is committed).[dsh-intelligence-ui/1.1.1].If step 3 is unavailable in your DSH build, that build does not expose plugin bundles and cannot load this plugin; upgrade DSH or use a build with bundle support.
pnpm install
pnpm build # writes lib/client.js
# then install this directory as a bundle, as in step 3
To update: git pull && pnpm install && pnpm build, then reload the chat page (⌘R / Ctrl-R).
To remove: uninstall the bundle in the plugin manager and restart DSH.
Maintainers iterating on the host machine can use
node scripts/deploy.mjs --to <plugin-directory>to rebuild, back up the target and rsync the repository into the directory the host loads.
Write normal Markdown; insert a fence where the interface belongs:
Ops review:
```openui
root = Stack([hd, tl, ok], "column", 16)
hd = Heading("Incident review", 2)
tl = Timeline([{"title": "14:02 alert", "description": "error rate > 15%", "time": "14:02", "variant": "error"}, {"title": "14:26 rollback complete", "description": "error rate back to 0.4%", "time": "14:26", "variant": "success"}])
ok = Callout("Next", "Add a connection-pool limit to the index job.", "info")
```
No fence? Structured Markdown is upgraded automatically. Both paths share one
parse → evaluate → render pipeline.
examples/.localStorage['dsh-intelligence-ui:disable-auto']='1'.44 components across ten groups; full signatures live in docs/COMPONENTS.md.
| Group | Components |
|---|---|
| Primitives | Box Row Col Text Icon Image Link |
| Layout | Stack Grid Divider Spacer |
| Containers | Card CardHeader Section Callout Quote |
| Text | Heading TextContent BulletList KeyValue CodeBlock Badge BadgeGroup |
| Data | StatCard Table SearchTable ProgressBar ComparisonBar Timeline Steps Checklist |
| Charts | Chart PieChart Sparkline Heatmap |
| Geography | Map |
| Code & files | Diff FileTree |
| Process | TreeView Diagram |
| Interactive | Button Tabs Accordion SegmentedControl |
The visual language is "Precision Editorial": host ink typography, a single business-blue accent
for data, hairline structure and layered surfaces. All tokens live in
src/ui/theme.js; rationale, type scale and per-component guidance are in
docs/design.md.
A headless-Chrome design gate measures computed styles (no gradients, no static shadows, no uppercase labels, no horizontal overflow, bounded type scale, WCAG AA text contrast — 4.5:1 for normal text, 3:1 for large text, bounded accent hues) across light/dark × 920/390.
prefers-reduced-motion, and no horizontal overflow at 390px.aria-* labels where needed;
charts carry text labels for series, axes and values.assistant-step text block
├─ ```openui fence ─► parse → evaluate → render components (text outside stays Markdown)
├─ no fence, settled ─► Markdown compiler → OpenUI program → render
└─ otherwise ─► host Markdown renderer
The repository contains both halves of the plugin: a host half that injects prompt modules
(index.js) and a browser half that registers the renderer (src/ → lib/client.js). Component
implementations are split into focused modules under src/ui/; the tolerant binding layer and
render pipeline live in src/openui-runtime.jsx. Isolation boundaries, resource budgets, streaming
identity and clipboard/timer cleanup are described in docs/ARCHITECTURE.md.
pnpm install
pnpm build # → lib/client.js (committed; CI checks it is up to date)
pnpm test # build + unit/browser suites (310 checks; browser suites skip without Chrome)
pnpm test:unit # the same suites without browser tests (no Chrome needed)
pnpm test:design # computed-style design gates in headless Chrome (36 checks)
pnpm test:interact # chart/map interaction regressions in headless Chrome (10 checks)
pnpm test:docs # relative Markdown links must exist and be tracked
pnpm format # Prettier
pnpm format:check # verify formatting (CI gate)
pnpm shot # regenerate docs/gallery{,-dark,-mobile}.png + gallery.html
pnpm preview -- --name me --only "图表" --theme both
Test suites cover a synthetic 56-program corpus, 63 adversarial inputs, the Markdown compiler, theme-token fidelity, prompt modules, bundle budget/schema fingerprint, chart SSR, and real-browser lifecycle/heap checks. See CONTRIBUTING.md for prerequisites and PR expectations.
The gallery and design gate prefer a local snapshot of the host theme. Generate one with
node scripts/extract-theme.mjs (optional; it falls back to an original approximation in
test/fixtures/theme-fallback.css).
Generated artefacts in this repository: lib/client.js (the shipped bundle) and
docs/gallery* / docs/hero.png (rendered by pnpm shot). Do not edit them by hand; CI verifies
the bundle is in sync with src/.
The plugin itself has no analytics, no telemetry and makes no network requests. Installing the
development dependencies does not send telemetry either: the upstream @openuidev/lang-core
install hook is explicitly denied in this repository's pnpm-workspace.yaml (see
SECURITY.md). Remote images
that a user or model references through the Image component are loaded by the host, like any other
chat image. The bundled upstream @openuidev/lang-core telemetry path is disabled unless the host
explicitly sets OPENUI_RUNTIME_TELEMETRY_ENABLED; the browser runtime never enables it (the
inert upstream code is documented in SECURITY.md). Clipboard access happens only
through user-initiated copy buttons.
The component library and host API are locale-neutral. The injected prompt modules, example programs and gallery content are currently written in Chinese, the primary language of the first release; an English prompt set is on the roadmap. UI chrome rendered by the plugin itself is minimal and language-neutral; number and date formatting comes from the content.
| Doc | Contents |
|---|---|
| docs/COMPONENTS.md | All 44 components, signatures, program syntax rules |
| docs/ARCHITECTURE.md | Reply pipeline, module map, robustness, prompt architecture, test matrix |
| docs/design.md | Design-system v3 tokens, type scale, per-component visual guidance |
| docs/README.md | Documentation index |
| Gallery page | Full rendered gallery (generated; served by GitHub Pages) |
Issues and pull requests are welcome — see CONTRIBUTING.md, CODE_OF_CONDUCT.md and SECURITY.md. Visual changes should include light/dark and 920/390 screenshots. Release steps live in RELEASING.md; changes are tracked in CHANGELOG.md.
@openuidev/lang-core, MIT) —
parser, evaluator and type system for the language.world-atlas (ISC)
for the world outline data.Third-party license texts: THIRD_PARTY_NOTICES.md.
MIT © 2026 MarkYangKp
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: llm、deepseek-harness。