deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:AlexPeng07/dsh-custom-plugin
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Custom convenience suite for the DeepSeek Harness (DSH) Web GUI: personalization, weather FX, glass effects, a per-user-message timeline rail, project folders, enhanced prompts, conversation export/search, Mermaid rendering, quote reply, 7/30/90-day usage analytics, budget and key-free local backups, plus a Ctrl/Cmd+K command palette.
The plugin is dual-face: the host half (src/) owns the state document, registers the /api/custom-plugin routes and the custom_plugin_status agent tool; the browser half (src/client/) injects its UI through eight injections into seven official slots and talks to the host over same-origin fetch. Mounted through the official profile mechanism — no DSH source changes.
Settings → 个性化: the full-page appearance config![]() |
The same panel as a popover from the session header (light theme)![]() |
Liquid glass (displacement refraction on Custom surfaces)![]() |
Timeline rail with hover preview![]() |
Multi-level project folders![]() |
Mermaid mindmap rendered in place![]() |
Balance and today's per-model usage![]() |
Rain — three depth layers![]() |
Sakura petals![]() |
Snow![]() |
Weather FX is shown in dark mode, where only "no color" and "aurora" backgrounds are selectable. Usage history, backup-import previews, session search, and the command palette are dynamic views of the same panel; open them inside DSH to inspect the live UI — no additional fixed screenshots are included.
天青灰 by default) plus "no color" (follows the GUI default theme) and the high-saturation aurora gradient. In dark mode only "no color" and "aurora" stay selectable; the other colors are disabled and the plugin text turns white for readability.Every direct user message gets a node on a right-side (or left-side) rail:
Nodes are sourced from the rendered user-message rows (DOM positioning) and refresh automatically after history loads; the rail keeps up to 400 tail nodes.
A multi-level folder tree persisted in the $DSH_HOME state file, shared across workspaces. Any workspace or session can be folded in; folders support drag-to-reorder (before / inside / after), rename, delete, and add-current-session shortcuts.
A prompt library with add / edit / copy / delete, search, favorites, tags, drag sorting, recency and use counts. {{variable}} placeholders open a fill-in form before insertion. The library supports versioned JSON and heading-based Markdown import/export.
Export the current session in three formats (file names carry a date stamp):
messages structure (user / assistant / tool), with a meta block carrying the session title, creation time, working directory and export time — importable elsewhere;Tool rows carry the tool name and an argument digest (resolved from the paired tool/call events).
Plugin state can be exported as a versioned JSON backup containing appearance, folders, prompts, stars, usage, and budget settings. API keys and credential metadata are excluded. Imports show a conflict preview, support merge or non-secret replacement, and create a recovery copy first.
``mermaid blocks anywhere in the chat — assistant replies included (mindmaps, flowcharts, sequence diagrams, …) — render in place automatically: a diagram/code toggle bar with a mermaid.live fallback link appears above the block, streaming blocks preview once their content is complete, diagrams re-render on GUI theme flips, and a failed render keeps the raw code. Detection keys off the fence language label; with a blank label (mid-stream) a content heuristic decides (keyword prefix + completeness checks, so blocks labeled with a real language are never touched). The engine loads from the mermaid 11 dependency installed with the plugin (works offline), falling back to jsdelivr / fastly / unpkg mirrors and caching in the host process; the render chips under user messages and the multi-diagram modal stay, and the mermaid.live link uses the DEFLATE-compressed#pako:` format that restores the diagram on open.
scroll-behavior: auto so sends never yank the view to the bottom (off by default);Ctrl+K / Cmd+K outside editors to search sessions, workspaces, prompts, and common actions; cross-session content search uses DSH's official API.A balance badge sits in the session header (clickable to pin); the balance panel provides:
https://api.deepseek.com/user/balance endpoint, CNY preferred, granted and topped-up balances listed separately, with the account availability flag.DEEPSEEK_API_KEY / DEEPSEEK_KEY / DEEPSEEK_TOKEN (values must start with sk-) → the DSH credentials file $DSH_HOME/.credentials.yaml (reuses the DeepSeek key already configured in DSH — no duplicate setup).session/event records.deepseek-v4-flash / deepseek-v4-flash-vision-exp ¥3 / ¥9, deepseek-v4-pro ¥9 / ¥27 (CNY per 1M tokens in / out, cache writes ¥0.1 / ¥0.3; the retired deepseek-chat / deepseek-reasoner price as v4-flash). Indicative only.The Settings → 个性化 section provides the full appearance and tool-toggle page; the 个性化 buttons in the session header and the sidebar footer open the same panel as a popover.
The custom_plugin_status tool reports appearance config, today's per-model usage, balance, a timeline sample, Mermaid engine state, the state file path and client diagnostics. The plugin never injects system-prompt announcements.
Prerequisites: Node 22+, pnpm, and the dsh CLI (the official @deepseek-ai/dsh npm package; npx @deepseek-ai/dsh stands in for dsh when it is not installed globally).
dsh plugin --profile web add @alexpeng/dsh-custom-plugin
# restart dsh web
The registry tarball ships prebuilt output — no source build on the installing machine.
dsh plugin --profile web add github:AlexPeng07/dsh-custom-plugin
# restart dsh web
Git installs pull sources; the prepare script builds lib/ on the installing machine. pnpm ≥10 asks you to approve that build once — copy the exact package key it prints into the profile's pnpm-workspace.yaml under allowBuilds, then re-run the add. The npm route above skips the build-approval step.
# build (run from this repo root)
pnpm install
pnpm build
# add to the web profile. The link path must not contain spaces: on Windows,
# create a space-free directory junction first and link to the junction path
dsh plugin --profile web add link:F:/dsh-plugin-dev
# restart dsh web
The package declares its manifest per the official bundle protocol: dsh.bundle.patch in package.json points at the cordis.patch.yml config layer (row id custom-plugin) and dsh.client declares the browser half. dsh plugin add forwards to pnpm inside the profile directory; the installed package joins dsh.profile.bundles automatically because of that declaration, and the browser half loads via the official client module system from the same row.
The plugin reads and writes one JSON document at $DSH_HOME/custom-plugin-state.json (~/.dsh by default, overridable via the DSH_HOME environment variable): appearance config, folders, prompts, stars, legacy compatibility data, and a 90-day per-day usage ledger. Writes are atomic (temp file + rename), so a crash never truncates the document.
Appearance and feature toggles (the cfg field, all with defaults):
| Key | Default | Meaning |
|---|---|---|
bg |
天青灰 |
default (no color) / aurora / one of the 20 palette names |
weather |
none |
none / snow / rain / sakura |
glass |
true |
master glass toggle for Custom surfaces |
glassMode |
frost |
frost frosted / liquid displacement glass |
globalGlass |
true |
blur global overlays (dialogs/menus/tooltips) |
timeline |
true |
timeline rail toggle |
timelineLeft |
false |
rail on the left |
starsOnly |
false |
show only starred nodes |
quote |
true |
selection quote reply |
antiScroll |
false |
anti auto-scroll |
mermaid |
true |
automatic in-place Mermaid rendering (plus render chips) |
formula |
true |
LaTeX / MathML copy chips |
monthlyBudgetCny |
0 |
Monthly CNY budget; 0 disables warnings |
budgetWarningPercent |
80 |
Monthly warning threshold (1–100) |
/api/custom-plugin routes; every route checks a loopback socket address, a loopback Host header, and browser same-origin markers (sec-fetch-site / Origin). X-Forwarded-For is never trusted.keytar when it is present; older plaintext state keys are migrated on startup when that store is available. keytar ships as no dependency of this plugin (a native module would trip pnpm 11's strict build gate and silently keep the whole bundle from activating); users who want the OS keyring can add it to the profile themselves: dsh plugin --profile web add keytar.$DSH_HOME/custom-plugin-state.json; protect $DSH_HOME accordingly. DSH's own $DSH_HOME/.credentials.yaml remains a supported plaintext fallback.session/event records, retains 90 Beijing calendar days, and a manual "scan" re-reads today's session logs with four concurrent reads when live events were missed.keytar module present in the profile's node_modules when the host starts; when it cannot be loaded, the compatibility state-file fallback is used.pnpm typecheck # type check
pnpm test # vitest unit tests
pnpm build # build the node ESM library and the browser bundle into lib/
Apache-2.0. Portions of the code reference Nagi-ovo/voyager and unovue/inspira-ui.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。