dsh-web-app owns --host/--port/--dev/--workspace-root/--trusted-host and its --help in a web-startup row; the rows it configures wait for the webStartup service, and the client-plugin HMR receiver now ships disabled so --dev is a row toggle rather than a runtime insert (the Loader cannot resolve a row inserted from inside a mounting plugin). dsh-headless owns the task positional and rejects a missing task as its own usage error. Its runner ships disabled, not merely waiting: the schema requires the task, and a row's config is validated when its fiber is created, before the startup row can supply one. A composition has exactly one command-line owner, so the patch disables the web startup row and this one provides webStartup too, leaving the web rows on their composed one-shot values. The keyless web scaffold provides the same three values with no arguments, which is what an embedding host with no command line does.
2.6 KiB
@deepseek-ai/dsh-web-app
English | 中文
dsh 浏览器表层组合包。cordis.patch.yml 叠加在 dsh-base 之上:设置 coding persona,插入 Web 宿主行(webserver、API 网关、workspace、投影缓存、存储)与浏览器插件名录,并挂载本包的 web-runtime 粘合插件(配置为 {mode, printUrl, surfaceContext, lanAddresses})。该插件通过 @deepseek-ai/dsh-frontend 的 exports 解析已构建的前端 dist,挂载 frontend-static 回退席位所有者,在 surfaceContext 为 true 时注册 web 表层提示词段落和 bash 可见的 DSH_WEB_URL/DSH_WEB_MODE 运行时变量,并在 printUrl 为 true 时打印 dsh web: URL 行。本组合包还持有应用命令行:web-startup 行(src/startup.ts)从 ctx.cmdlineArgs(dsh-cmdline)解析 --host、--port、--dev、--workspace-root 以及可重复的 --trusted-host,并打印应用自己的 --help。它所配置的每一行都注入 webStartup,因此在参数解析完成之前不会有任何东西绑定端口,dsh --profile web --help 也不会启动服务器。mode 与 lanAddresses 在每次 boot 时解析,因为它们描述的是本次调用。dsh-headless 是同一 base 之上的同级表层,不挂载本组合包。
模型体验
Web 表层提示词段落与 bash 运行时变量
模型看到的内容
当 surfaceContext 为 true 时,全局段落 app:web-surface(顺序 −98)向模型说明 GUI:规范的本地 URL、「this page」指代什么、当前模式下 HMR(热模块替换)/重建的更新约定,以及不要启动替代服务器的指令。DSH_WEB_URL 与 DSH_WEB_MODE 还会连同各自描述出现在受管 bash 环境中,每次调用时从运行中的服务器解析。当它为 false 时,该提示词段和这些变量都不会注册。
Token 影响
每个会话一段提示词,外加两行受管环境变量;每个进程内保持恒定。
KV Cache 影响
该提示词段落位于系统提示词靠前位置,且在进程整个生命周期内稳定(端口与模式是启动期事实),因此不会使跨轮次缓存失效。
已知限制与延期工作
- 前端 dist 必须已构建:对 dist 的
require.resolve在激活时明确报错并给出构建提示;没有从源码直接服务的回退路径。 lanAddresses是启动期快照:启动后的网卡变化不会重新公告;打印的 LAN URL 始终与配置的信任栅栏一致。