Files
deepseek-harness/packages/bundle/headless/README.zh.md
Turtle c598989d08 refactor(cmdline): trim the command-line seams to existing interfaces
The web runtime creates its dev-mode client-hmr row in the root tree
after Loader settlement with plain loader.create, deleting the vendored
Entry.enableRuntime state machine and dsh-cmdline's enableRow export.
Include declares the existing EntryGroup.key tree-carrier marker instead
of the EntryConfigResolver protocol (its own path stays literal; nothing
used a dynamic path). The launcher recognizes no app row: SIGTERM exits
0 on every surface, every boot watches its user patch layers, and the
headless runner exits through ctx.appExit, deleting ctx.headlessIo. Also
restores the vendor README rescope entry to the position the
rescope-vendor exact-edit anchor requires, fixing the master hygiene
regression.
2026-08-11 18:00:15 +08:00

2.2 KiB
Raw Blame History

@deepseek-ai/dsh-headless

English | 中文

dsh 一次性任务组合包。cordis.patch.yml 直接叠加在 dsh-base 之上:提供编码 persona 和工具模式、禁用 HMR热模块替换、将 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。最终 reason 为 error 时,还会将持久化的 code 与 message 写入 stderr成功运行时 stderr 保持为空。进程不会打开监听端口。任务文本就是这个应用的命令行:普通 headless-startup 提供方(src/startup.ts)注入 ctx.cmdlineArgsdsh-cmdline),读取 dsh --profile headless "task" 的位置参数、打印应用自己的 --help,并提供 headlessStartuprunner 注入该服务,再从惰性配置中读取任务。缺失或只有空白的任务会在 runner 激活前被拒绝。

模型体验

无影响,因为 runner 把任务作为普通用户消息提交;提示词与工具归 base 和 headless 组合包中的相应行所有。

KV Cache 影响

runner 不向请求前缀添加任何内容。

已知限制与延期工作

  • 只提交一个任务runner 没有用于交互式后续输入的 surface它会等待 Agent 在返回 idle 前完成的所有工作,并打印该区间内最后一条非空 assistant 消息。
  • ctx.appExit 由启动器持有:在 dsh 启动器之外启动 headless profile 会在激活时明确报错,直到宿主提供该退出请求。