目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
无依赖(基础插件)
依赖链 · 下游(依赖该插件的节点):
dsh-api-gatewaydsh-client-connectiondsh-client-hmrdsh-client-modulesdsh-client-shortcutsdsh-client-ui-settings-accountdsh-client-ui-settings-modelsdsh-client-ui-sidebar-documentpreviewdsh-client-ui-themedsh-client-webdsh-deepseek-account-platformdsh-experimental-inspectordsh-experimental-webworker-runtimedsh-host-directory-picker-autodsh-host-frontend-staticdsh-host-open-in-appdsh-webhook-github
同一拓扑层(Layer 0,层次遍历层序):
cordis-plugin-loadercordis-plugin-logger-consolecordis-plugin-timerdsh-attachment-localdsh-bash-localdsh-client-resourcesdsh-client-ui-primitivesdsh-credentials-localdsh-deepseek-llm-api-extensionsdsh-experimental-api-speech-to-textdsh-experimental-ptc-runtime-pythondsh-experimental-speech-to-text-sensevoicedsh-fs-localdsh-fs-observation-policydsh-host-directory-picker-browsedsh-host-directory-picker-nativedsh-host-webserverdsh-invariantsdsh-lsp-stdiodsh-pwsh-localdsh-sandbox-localdsh-sandbox-sshdsh-shell-envdsh-spill-localdsh-storagedsh-subprocess-localdsh-typert-registrydsh-workspace-changesschemastery
Layer 0↓ Layer 1(13 插件)
插件信息
| 包名 | @deepseek-ai/dsh-host-webserver |
|---|---|
| 分组 | G20 · 宿主服务 |
| 拓扑层 | Layer 0(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/host/webserver |
| 来源层 | L2 web-app bundle(base 之上装配) |
① 实现逻辑
实现 ctx.webServer 服务(node:http 载体),Service.init 监听 socket 并把命名路由/升级路由/fallback 分派(src/index.ts:125-316)。命名路由支持 exact 与最长前缀匹配,fallback 座位单属主且二次注册抛错(src/index.ts:166-203、319-328)。index 渲染先收集 webserver/index-inject 结构化注入行再套用原始 tapIndex 变换(src/index.ts:336-362),injections.ts 负责行到 markup 的渲染与 boot-ready 结算(src/injections.ts:96-118)。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- ctx.webServer (HTTP 载体服务:命名路由/升级路由/fallback 座位/index 注入渲染,src/index.ts:125-365)
③ 依赖(depends_on · 上游前驱)
无依赖(基础插件)
④ 被依赖(dependents · 下游消费者)
dsh-api-gateway
注册 WebSocket upgrade 路由
src/index.ts:16 import type + src/index.ts:261 webServer.registerUpgrade
dsh-client-connection
把 /api 路由和 recovery 注入表挂到 Web carrier 上
src/index.ts:8 + src/index.ts:139 ctx.inject(['webServer']) + src/index.ts:158 webCtx.webServer.register
dsh-client-hmr
挂载 /plugins/events SSE 路由
src/index.ts:16 + src/index.ts:27 inject 'webServer' + src/index.ts:181 ctx.webServer.register
dsh-client-modules
注册 /plugins bundle 路由并向 index 注入启动脚本与全局图
src/index.ts:35 + src/index.ts:653 ctx.inject(['webServer']) + src/index.ts:649 webCtx.webServer.register
dsh-client-shortcuts
把键盘配置注入到服务的页面 index
src/index.ts:5 + src/index.ts:16 ctx.on('webserver/index-inject')
dsh-client-ui-settings-account
向 webserver 注入账户联系方式配置
src/index.ts:3 import + src/index.ts:50 ctx.on('webserver/index-inject')
dsh-client-ui-settings-models
Host 侧向浏览器页面注入引导配置全局
src/index.ts:4 type-only import + src/index.ts:15 ctx.on('webserver/index-inject')
dsh-client-ui-sidebar-documentpreview
Host 侧向浏览器页面注入预览配置全局
src/index.ts:3 type-only import + src/index.ts:14 ctx.on('webserver/index-inject')
dsh-client-ui-theme
向 HTML index 注入 boot 主题样式与脚本
src/index.ts:9 import type + src/index.ts:41 ctx.on('webserver/index-inject')
dsh-deepseek-account-platform
注册 /oauth/callback 路由接收浏览器回调
src/index.ts:4 import type {} from '@deepseek-ai/dsh-host-webserver' + src/index.ts:510 ctx.get('webServer') + src/index.ts:526 webServer.register
dsh-experimental-inspector
向页面注入 Client bootstrap 并在 webserver 生命周期内启动
src/host/plugin.ts:4 import type { IndexInjection } + src/index.ts:63 inject ['webServer'] + src/host/plugin.ts:49 webserver/index-inject
dsh-experimental-webworker-runtime
使用 webserver 采集 index injections 作为 boot payload
src/client/client.ts:8 import '@deepseek-ai/dsh-host-webserver'
dsh-host-directory-picker-auto
读取生效绑定 host 作为后端判定事实
package.json:36 peerDep + src/index.ts:17 type import; src/index.ts:64 ctx.webServer.host
dsh-host-frontend-static
占用其 fallback 座位并渲染 index 注入
package.json:30 peerDep + src/index.ts:21 type import; src/index.ts:118 ctx.webServer.renderIndex、:121 registerFallback
dsh-host-open-in-app
承载 apps/icon/open 三条路由
package.json:50 devDep + src/index.ts:27 type import; src/index.ts:193/206/241 ctx.webServer.register
dsh-webhook-github
在宿主机 WebServer 上注册 webhook 的 exact 路由
package.json:37 peerDep + src/handler.ts:13 import type { WebRoute } + src/index.ts:14 inject 'webServer' + src/index.ts:59 ctx.webServer.register