DSHX is a plugin development toolchain for DeepSeek Harness. This post revisits how it evolved from a Vite plugin into a complete workflow covering Host/Client, Typed API, real Profile debugging, compatibility diagnostics, and Framework Hub.
I've been tinkering with DeepSeek Harness lately.
At first, I only wanted to write a few plugins for DSH. Once I got hands-on, I found that the plugin logic itself wasn't as difficult as I'd imagined. The hard part was the engineering work around it:
- where the Host and Client each run;
- how to declare Cordis dependency injection and
inject; - which Slot the UI should attach to;
- what DSH metadata
package.jsonneeds; - how to build and debug the Host and Client separately;
- how a plugin can handle DSH versions that are still changing rapidly.
When writing just one plugin, you can solve these by reading the source once. But if I wanted to keep writing plugins, or bring more developers in, making everyone piece the workflow together from source each time would be wasteful.
So I built DSHX:
- Project URL: github.com/liyown/dshx
- Framework Hub: dshx.io
As of August 2026, DSHX is still in 0.1.x Preview. The current Authoring API is an API Candidate, not a promise of stable 1.0.
Writing a plugin isn't hard; actually getting it to run is
At first, I just wanted to build a Vite plugin for DSH.
The idea was straightforward:
TypeScript / React
↓
Vite
↓
Host + Client
↓
DSH Plugin
If I wrapped the build entry points for the Host and Client and added some typing, the developer experience should be much smoother.
But as I went further, practical problems came up quickly. For example, if a Client component needs to call a Host API, developers also need to know what the Host exposes, how the Client obtains a Connection, which Provider the plugin needs to declare, what types the inputs and outputs use, and whether the current DSH Runtime actually supports that chain.
That knowledge is scattered across the build, runtime, Manifest, and individual services. Vite can solve only some of it.
So DSHX gradually evolved from a Vite plugin into a toolchain that includes Authoring APIs, building, checks, scaffolding, real Profile debugging, and compatibility diagnostics.
The way I think about it now is this: DSHX turns “what DSH can do” into “how plugin developers should write,” but it does not reimplement DeepSeek Harness.
First, define the boundary: DSHX doesn't reimplement the DSH Runtime
It's easy for a framework to balloon in scope.
If the API is awkward, wrap it in a layer; if communication is awkward, build an RPC system; if state is difficult to handle, add a Store. In the end, the framework owns DI, Runtime, RPC, Cache, and Event Bus, while the original DSH is reduced to a low-level driver.
I deliberately avoided that path.
The principle behind DSHX is that the developer experience can be redesigned, while runtime semantics should be left to DSH wherever possible. The table below doesn't provide a one-to-one mapping; it shows where responsibility lies on each side:
| DSHX handles | DSH / Cordis remain responsible for |
|---|---|
| Types and declarations | Fiber and Scope |
| Code generation and static checks | Registry and dependency injection |
| Host / Client builds | Connection and runtime communication |
| Scaffolding and the development workflow | Persistence and Prompt Assembly |
| Compatibility diagnostics | HMR, unloading, and the disposer lifecycle |
DSHX can provide Authoring APIs such as defineHost, defineApi, and defineSlot, but they ultimately map back to DSH's official capabilities. The resulting build artifacts don't need to carry a private DSHX Runtime to run.
This may sound conservative, but DSH is still iterating rapidly. If DSHX created another Runtime on top, it might feel convenient in the short term, but maintaining two sets of semantics six months later would almost certainly drag the project down.
Typed API: first, let TypeScript report the error
Host-to-Client communication is a perfect example.
First, define a shared Contract:
The Host implements it:
The Client consumes the same Contract directly:
What I care about here isn't writing fewer lines of code, but making errors surface earlier:
- TypeScript reports an incorrect method name;
- the precise Handler type catches a missing Handler implementation in the Host;
- inputs or outputs that don't match the Schema are rejected at the Host boundary;
- if the Client uses a capability but the plugin hasn't declared the corresponding Provider,
dshx checkflags it; - if the locally installed DSH falls outside the range supported by the current Adapter, the build or dev phase immediately produces compatibility diagnostics.
I don't want to wait until a plugin is installed in DSH and the page is open only to see a contextless Runtime Error.
Why dshx dev must run a real DSH
The easiest way to set up a development server is to mock a DSH environment.
It starts quickly and is easy to control. But the Slots, Connections, Providers, and lifecycle exposed by the mock are all fake. A plugin that works perfectly in the development server may still fail after being installed in a real DSH.
So dshx dev runs a real DSH Profile, not a parallel simulated Runtime:
- Client changes go through DSH's official HMR;
- after a Host change rebuilds successfully, the Host restarts by default;
- DSH starts only after the initial build succeeds;
- if configuration or dependencies fail to reload, the last working session is preserved.
Runtime Inspect follows the same principle:
dshx inspect slots
dshx inspect tools
dshx inspect services
dshx inspect events
inspect only reads the official Providers supported by the Adapter in the current Composition. When the Runtime is unavailable, it returns diagnostics instead of falling back to an offline catalog that looks complete but has nothing to do with the live environment.
This is useful for Coding Agents too. An Agent doesn't need to guess that “there is probably a sidebar.xxx Slot somewhere”; it can inspect the Runtime first, then decide where to attach the code.
I want the commands in the DSHX CLI to be as atomic, inspectable, and composable as possible. The CLI provides facts and diagnostics; the developer or Agent plans the next step.
Compatibility can't be handled by enumerating every DSH version
DSH is still in Developer Preview. Suppose versions start arriving in sequence:
0.1.0
0.1.1
0.1.2
0.2.0
...
If DSHX wrote an Adapter for every version and ran a full test for every “plugin × DSH version” combination, this maintenance model would quickly get out of control.
So DSHX manages compatibility using “protocol generations”: a new Protocol Generation is introduced only when an official Contract, API seam, Loader behavior, or Runtime invariant changes in a way that requires different adaptation. Releasing a patch or minor version on its own doesn't automatically produce a new Adapter.
I've also started deliberately separating three facts that often get conflated:
For a prerelease that hasn't been verified, DSHX adds the experimental label; a version not covered by an Adapter is unsupported.
A version falling within a SemVer range only means it overlaps with a protocol generation; it doesn't mean the version has actually run against a real Runtime. This distinction is especially important for the plugin marketplace.
Framework Hub doesn't make guarantees on behalf of plugin authors
At one point, I wanted the plugin marketplace to be very strict: automatically determine whether a package is a DSH plugin, which versions it's compatible with, whether it can be installed, and whether its metadata is complete.
I quickly realized this would push maintenance costs to an unacceptable level. Not every third-party plugin will provide complete metadata according to DSHX conventions, and I can't possibly test every version combination on behalf of every author.
The positioning of dshx.io is now much more focused. The Framework Hub is more of an information layer for plugins: it collects projects, versions, source code, authors, READMEs, installation targets, compatibility declarations, and risk signals from public sources such as GitHub and npm, while clearly distinguishing sourced facts, community curation, and evidence from real-world verification.
The Hub won't reject a plugin just because it hasn't been verified by DSHX, and it won't promise that the plugin will install successfully in any given user's DSH environment either.
For community plugins, I'd rather present the facts, evidence, and risk warnings and leave the final decision to the user. DSHX only takes responsibility for what it actually knows.
Building an in-DSH plugin marketplace with DSHX
The repository also contains a Dogfooding project I really like:
@becomeopc/dshx-plugin-marketplace
It's an ordinary DSH Bundle. After installing it, you can browse the plugins available from Framework Hub in:
Settings → Plugins → Marketplace
The Marketplace uses the full DSHX development path, including:
defineHostdefineSettingsdefineApidefineClientdefineLocaledefineSlot- Standard Schema
useApiQuery- CSS Modules
- Profile development workflow
- Client HMR
The Preview version can be installed like this:
dsh plugin --profile web add @becomeopc/dshx-plugin-marketplace@preview
dsh --profile web
If even my own Framework makes writing its own plugin marketplace painful, the API probably hasn't been designed well. Rather than putting together dozens of standalone Demos, I prefer using one real plugin to surface problems continuously.
DSHX finally has its first usable Preview
After several rounds of iteration on the API and architecture, DSHX has entered its first Preview stage that can actually be used.
To create a plugin:
pnpm create dshx@preview my-plugin
cd my-plugin
pnpm check
pnpm dev
For a more complete API example:
pnpm create dshx@preview my-plugin --template showcase --style tailwind
It now covers:
- Host / Client Authoring;
- Typed API, Settings, and Prompt;
- Slot and Locale;
- Vite builds, CSS Modules, and Tailwind;
- Profile development workflow and Client HMR;
- Runtime Inspect;
- CLI checks, diagnostics, and limited deterministic fixes;
- DSH protocol generations and compatibility Adapters;
- Plugin scaffolding;
- Framework Hub;
- the in-DSH Marketplace plugin.
Conversation Components still live under @becomeopc/dshx/experimental/conversation. I haven't rushed to turn Streaming into a public abstraction either.
These capabilities depend on the upstream project providing more stable semantics for event vocabulary, persistence, Connection Ownership, cancellation, reconnection, and backpressure. Not offering them for now is safer than building a private protocol we'll have to throw away six months from now.
Next, keep refining it with more real plugins
DSHX is still at 0.1.x. I haven't rushed to add more APIs; what I'd rather do next is build a few real plugins and see where this path still breaks down:
If this path holds steady, DSHX will finally have solved the problem of plugin development in DeepSeek Harness.
At first, I only wanted to write a Vite plugin. Looking back, what I actually wanted was to give DeepSeek Harness a complete, checkable plugin development workflow that could keep evolving.
The project is still in Preview, and the API will keep changing. Precisely for that reason, now is a good time to try it out with real plugins: