Move the shared module-reload policy into dsh-base by inserting its HMR row disabled, then remove the redundant disabled overrides from Web, headless, SDK, and ACP. No shipped profile enables server module reload; live profile patch watching continues through the launcher-owned config-only fallback, and browser client HMR remains a separate mechanism. A later profile layer can opt into source-module reload explicitly with disabled: false while retaining the base root configuration. Composition tests cover every shipped mode and the explicit enable path, and the bundle references plus launcher Agent Notes document the resulting ownership and safety rationale.
2.3 KiB
@deepseek-ai/dsh-headless
English | 中文
dsh 一次性任务组合包。cordis.patch.yml 直接叠加在 dsh-base 之上:继承 base 默认禁用模块 HMR(热模块替换)的策略,提供编码 persona 和工具模式,将 Code Mode 的 worker 作为核心执行能力挂载,并插入本包的 headless-runner 插件(配置为 {task},从注入的 headlessStartup 提供方解析)。它不挂载任何 Host、HTTP server、Web runtime 或浏览器插件。
Loader 结算后,runner 读取共享的 ctx.agentDefaultModel,通过 ctx.agents 创建一个全新的持久化 Agent(智能体),将任务作为普通用户消息提交,并等待完全停稳。它对 Session 执行 flush 后再汇总自身持有的持久化事件区间,将最后一条非空 assistant 文本写入 stdout,再经启动器提供的 ctx.appExit 宿主钩子(dsh-cmdline)请求退出(最终 turn/end 完成 → 0,否则为 1)。最终结束原因为 error 时,还会将 code 与 message 写入 stderr;成功运行时 stderr 保持为空。进程不会打开监听端口。任务文本就是这个应用的命令行:普通 headless-startup 提供方(src/startup.ts)注入 ctx.cmdlineArgs(dsh-cmdline),读取 dsh --profile headless "task" 的位置参数、打印应用自己的 --help,并提供 headlessStartup;runner 注入该服务,再从惰性配置中读取任务。缺失或只有空白的任务会在 runner 激活前被拒绝。
模型体验
无影响,因为 runner 把任务作为普通用户消息提交;提示词与工具由 base 和 headless 组合包中的相应条目提供。
KV Cache 影响
无;runner 不向请求前缀添加任何内容。
已知限制与暂缓事项
- 只提交一个任务:runner 没有用于交互式后续输入的 surface;它会等待 Agent 在返回 idle 前完成的所有工作,并打印该区间内最后一条非空 assistant 消息。
ctx.appExit由启动器持有:在dsh启动器之外启动 headless profile 会在激活时明确报错,直到宿主提供该退出请求。