介紹 DSHX:DeepSeek Harness 外掛的建置時工具鏈
Introducing DSHX: a build-time toolchain for DeepSeek Harness plugins
DSHX 為 DeepSeek Harness 外掛提供建置時工具鏈,涵蓋 Host/Client 合約檢查、Vite 建置與離線診斷。create-dshx 可建立含 build、types 和測試設定的 Host + Client 範本;dshx check 可離線檢查 manifest、入口點和依賴圖。目前屬早期預覽,API 仍在變動。
DeepSeek Harness (DSH) runs plugins, but it does not ship a build pipeline. If you want to write a plugin outside the Harness repo - as a normal npm package with its own dependencies, tests and release cadence - you end up rebuilding the same scaffolding every time: a bundler config, a way to type the API your plugin exposes, a dev loop that reloads client code without restarting the host, and some way to check the manifest before you publish.
DSHX is a small toolchain that does that part.
What it does
-
Typed authoring.
defineHostanddefineClientdeclare the two halves of a plugin together, so the contract between them is checked at build time instead of discovered at runtime. - A bounded Vite build. The build is configured for you and enforces the boundaries DSH expects: what a Host entry may import, what a Client entry may import, and what has to stay out of the bundle.
-
Offline diagnostics.
dshx checkreads the manifest, entry points and dependency graph without starting the runtime, so CI can fail a broken plugin before anyone installs it. -
Reproducible templates.
create-dshxscaffolds a working Host + Client plugin with build, types and test wiring already in place.
DSH and Cordis still own execution, scopes and lifecycle. DSHX is the layer before that: authoring, building, checking, shipping.
Quick start
pnpm create dshx my-plugin
cd my-plugin
pnpm dev
- Docs: dshx.io
- Source: github.com/liyown/dshx
It is an early preview and the APIs are still moving. If you are writing DSH plugins out of tree, feedback on the plugin model is welcome.
來源:DEV Community · dev.to