dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Prompt rewrite workbench for DeepSeek Harness: four rewrite modes, cancellable streaming output, and a token-level before/after diff.
English | 中文
A prompt rewrite workbench for DeepSeek Harness (
dsh) — four rewrite modes, streaming output you can stop, and a real before/after diff.
Writing a good prompt is the highest-leverage thing you do in an agent harness, and it is also the thing everyone skips. You type a vague sentence, the agent guesses, and three turns later you are explaining what you actually meant.
dsh-prompt-workbench sits above the composer and turns that vague sentence into a prompt an agent can act on — without leaving the box you are already typing in.
It is deliberately not just an "enhance" button. Three things make it a workbench rather than a one-shot rewriter:
[!WARNING] Installing a plugin runs third-party code inside your harness, with your own permissions. This plugin sends the draft you put in its panel to the model route your session already uses, and only that draft — the analysis itself runs locally in the browser and makes no request. A public repository is not a security review: read the source before you install.
dsh plugin --profile web add github:fufuyin/dsh-prompt-workbench
Then restart the profile and reload the web GUI. Most plugins go live after a page refresh; if the pill does not appear in the composer tool row, restart the profile.
Install from a local checkout while developing:
git clone https://github.com/fufuyin/dsh-prompt-workbench.git
cd dsh-prompt-workbench
npm install
npm run build
dsh plugin --profile web add .
自动 mode detects the draft's script and answers in kind.--dsw-alias-* variable; light and dark both work, and prefers-reduced-motion is respected.@path references, {variables}, <slots>, TODOs, URLs and fenced code blocks verbatim, and never answers the prompt it is rewriting.◎ button (and GET /api/diag) reports how the host sees the plugin's browser half, which is the one question a broken UI cannot answer about itself.⭯ to pull the current composer draft in.Ctrl/Cmd + Enter). The right pane streams the rewrite, rendered by structure. The analysis above is handed to the model as an explicit gap list, so the rewrite targets this draft rather than a generic template.If anything looks wrong, press ◎ in the panel header for a host-side self-diagnosis, or open /dsh-prompt-workbench/api/diag directly.
Open ⚙ in the panel header. These are the plugin's own preferences. They are stored per browser profile in localStorage under a versioned key, so a corrupted or blocked store degrades to defaults instead of breaking the panel.
The plugin deliberately has no durable server-side settings: it changes nothing about how the host runs, so it needs no settings schema and no write access to your config. It follows your session's default model route — change the model in the composer's model selector, and the next rewrite uses it. The active route is shown as a read-only chip in the panel header.
Deliberate limits, all enforced host-side:
An everything-is-a-plugin harness means this is two halves and a patch layer:
cordis.patch.yml the profile patch that installs the plugin
src/analyze.ts SHARED — parsing, dimensions, advice, outline (pure)
src/index.ts HOST — plugin entry; registers the plugin's HTTP routes
src/runs.ts HOST — the run table and the one model call per run
src/prompt.ts HOST — modes + system instruction (pure)
src/http.ts HOST — JSON / same-origin / body helpers
src/client/index.ts CLIENT — inject declaration, style injection, mounting
src/client/panel.ts CLIENT — the two composer surfaces
src/client/api.ts CLIENT — the fetch carrier
src/client/prefs.ts CLIENT — versioned localStorage preferences
src/client/store.ts CLIENT — the one store they share
src/client/diff.ts CLIENT — token-level LCS diff
src/client/styles.ts CLIENT — the whole stylesheet, as one string
scripts/preflight.mjs the post-build assertions `prepack` runs
tests/ unit tests for every pure module
src/analyze.ts is the interesting one: it is pure, and both halves import it. The browser runs it on every keystroke (debounced) so advice is instant, free and offline; the host runs it once per rewrite and hands the resulting gap list to the model. One implementation, two consumers, and a test suite that asserts on it directly.
The host half owns the model call and the run table; the browser half polls it on a fixed cadence and only ever receives the delta since its last cursor, so a long rewrite costs a bounded amount of traffic rather than re-sending the whole buffer.
Through the plugin's own HTTP routes on ctx.webServer.register(), not through @Remote / ctx.remote. That is not a stylistic choice: the host gateway does discover @Remote markers from a third-party package, but the client's $mount path rejects any descriptor that is not a generated strict codec, and the assembly that mounts remote namespaces is a closed in-tree list. Shipping generated codecs would require the harness's own codegen toolchain.
Because plugin-owned routes are not covered by the connection's Host/Origin checks, the two mutating routes gate themselves with a same-origin check. The polling route deliberately does not: browsers omit Origin on same-origin GET, so enforcing it there would reject the plugin's own traffic.
GET /api/diag reports how the host sees this plugin's browser half, plus a bounded ring of the most recent requests (method, path, status, duration, raw origin headers, and the verdict drawn from them). Plugin routes are invisible in the session log, so this is the only surface that can report a browser-side failure.
Targets the DeepSeek Harness developer preview. The harness itself ships compatibility-breaking changes, so pin the version you build against.
Issues and pull requests are welcome. CONTRIBUTING.md covers the development setup, the project layout, the ground rules, and how to report a bug.
MIT © 2026 fufuyin
This is a community plugin and is not affiliated with DeepSeek. It is provided as-is, with no warranty. Installing it runs third-party code inside your harness with your own permissions, so review the source first and install at your own risk.