dsh-std README

The project's README from github.com/T-Auto/dsh-std. As one markdown file: README.md.

DSH Standard

English | 中文

In plain terms, DSH Standard is a set of universal interoperability protocols. Its goal is simple: let DSH plugins, background runtimes, and various user interfaces (TUI terminals, Web UIs, desktop apps, headless daemons) decouple cleanly and work together smoothly.

@dsh-std/core is a "meta-protocol" (the protocol about protocols). Domain-specific protocols—like Command, Tool, Model, and Presentation—sit on top of this meta-protocol substrate for discovery and negotiation, each versioned independently. Different hosts and applications only implement the parts they actually need.

Reference packages provide types, validators, and pure-function negotiators. Conforming implementations are not required to depend on these npm packages, nor do they need to run inside DeepSeek Harness.

What is a "Meta-protocol" (The Protocol About Protocols)?

Most protocols you deal with handle specific domain tasks:

In contrast, @dsh-std/core knows zero domain business fields (it doesn't even know what a command or a model is). It is purely the "protocol about protocols":

Why is this powerful?
Monolithic frameworks hardcode every capability (commands, storage, events) into a central SDK; whenever a new domain arises, the entire framework requires a release or a breaking change. Under a meta-protocol architecture, the protocols themselves are pluggable plugins: public standards, community extensions, and private protocols alike register as standalone protocol definitions. The core never changes, letting the ecosystem evolve boundlessly on its own.

Why Decouple via Adapters?

The upstream DSH core and downstream ecosystem plugins have inherently different engineering priorities:

The Adapter serves as a single-point shock absorber: It isolates the upstream runtime from the universal protocol layer. DSH is free to refactor aggressively; all potential breaking changes are absorbed within a single adapter layer (@dsh-std/adapter-dsh), shielding the broader ecosystem from code churn. Similarly, standalone TUIs, Web frontends, and remote runners can plug in via their own adapters on equal footing.

What else is great about this (Beyond stable dependencies)?

Shielding plugins from upstream breaking changes is just the baseline. In day-to-day development, this architecture brings several concrete superpowers:

Vision: Layered, Optional, Non-coercive

Meta-protocol (core)   only defines how protocols are declared and negotiated; no domain concepts, no fixed roles
        |
Domain protocols       connection / command / tool / session / presentation / agent ...
        |              independently versioned, implementable and replaceable; future protocols may supersede them
        |
Profiles               admission and interoperability specifications for concrete product shapes,
                       carried by ecosystem projects (e.g. dsh-ecosystem-spec provides the TUI Profile)

Start here

Status

The code and proposals are early drafts.

Each package records changes in its own CHANGELOG.md. Public contract modifications must update the corresponding changelog.

Development

Node.js ^22.19 || >=24 and pnpm are required.

pnpm install
pnpm check

License

MIT

dsh-std (T-Auto/dsh-std)

Searching Database…

这是什么?DSH Standard 是一套通用互操作协议,让 DSH 插件、后台运行时和不同的用户界面(TUI、Web UI、桌面应用、无头守护进程)彼此解耦并协同工作。
这是一个运行时,还是只是带参考包的协议规范?它是一份元协议规范,外加一组可供实现方选择性使用的 npm 参考包(类型、校验器、纯函数协商器);符合规范的代码不必依赖这些包,也不必运行在 DeepSeek Harness 内。
我怎么在插件或宿主中开始使用它?用包索引挑选你需要的最小已实现包接口,然后用 pnpm 构建 monorepo(例如 `pnpm -r build`)。
构建它需要安装什么?使用该仓库需要 Node.js ^22.19 或 >=24 版本,以及 pnpm。
这个标准已经完成并稳定了吗?没有,代码和提案都被明确标注为早期草稿,接口仍可能变化;每个包在自己的 CHANGELOG.md 中记录变更。
它面向谁——插件作者还是宿主开发者?两者都是:希望自己的代码能在 TUI、Web、远程 SSH 和无头宿主上不经修改就运行的插件作者,以及需要在不执行插件代码的情况下检查插件兼容性的宿主/工具构建者。
Adapter 层是做什么用的?适配器(如 @dsh-std/adapter-dsh)会吸收快速变动的上游 DSH 运行时带来的破坏性变更,让下游插件和其他宿主保持稳定的契约。
Facet 模型是什么?单个插件包可以捆绑多个 facet(例如 UI 和后端逻辑),宿主只激活它实际需要的 facet,因此无头服务器永远不会加载前端代码,未使用的资源也不会被泄露。
工具能在安装插件之前检查兼容性吗?可以,因为插件附带静态清单(dsh-plugin.json),市场和 CI 工具可以在毫秒级内算出兼容性,而无需运行任何插件代码。
构建 DSH 插件必须遵循这个标准吗?不必,采用是自愿的;项目可以自由使用自己的架构,但如果声称符合某个协议版本,就必须通过该协议的一致性测试套件。
Creator
T-Auto
Size
0.8 MB
Stars
157
Updated
CommitOct 10
Age
2mo
Commits · 90 Days