civaapple-alt/mini-dsh--packages-host-webserver ↗★ 7
@mini-dsh/host-webserver
🚀 Educational & minimalist DeepSeek Harness (DSH) architecture implementation powered by Cordis microkernel. 极简版 DeepSeek Harness 架构实现与学习指南。 面向需要搭建 Web 路由载体的开发者,提供路径处理器注册与生命周期管理。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗@mini-dsh/host-webserver
English | 中文
Mini-DSH 的宿主 HTTP 服务器与路由基础服务。
核心职责与 Cordis 契约
- 注册服务:
ctx.server(WebServerService); - 生命周期:
- 构造时创建
http.Server实例; ctx.effect()内监听端口并在插件卸载时调用this.server.close();
- 构造时创建
- 公开 API:
ctx.server.route(path: string, handler: RouteHandler): () => void:注册 HTTP 路径处理器,返回注销函数(Disposer)。
对应 DeepSeek Harness (dsh) 模块
- 对应 dsh 仓库的
packages/host/webserver(ctx.webServer)。 - 异同对比:
- 两者都作为 Web GUI 的网络路由载体;
dsh完整版封装了更严格的前缀路由分发、中间件、SPA 页面回退以及 WebSocket / SSE 载体支持。