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.6 KiB
@deepseek-ai/dsh-sdk-app
English | 中文
以 dsh-base 为基础的 SDK stdio 应用 dsh profile 组合包。它继承 base 默认禁用模块 HMR(热模块替换)的策略;其 patch 设置 coding agent(编程智能体)persona、挂载应用自有的零选项命令提供方,并且只在该提供方接受调用后启动 dsh-sdk-jsonrpc-server。因此,dsh --profile sdk --help 会写出 help 并退出,不会占用 stdin 或 stdout。
启动提供方把 stdin EOF 接到启动器的有界成功关闭流程。SDK 协议 shutdown、SIGINT 与 SIGTERM 继续使用各自所属的 server 或启动器路径;dispose(资源释放)会排空根 profile 配置树与持久化。stdout 专用于按换行分隔的 JSON-RPC 帧。SDK 不提供 title 表层,因此本组合包禁用模型生成的 session title;确定性的 fallback title 仍会持久化,但不发起辅助模型请求。部署通过 profile 组合包与 patch 文件选择另一套完整组合,而不是使用另一个应用 bin。
DSH_MAX_TOKENS_AS_SUCCESS 保留 SDK 部署映射:未设置或 JSON true 把 token 达限的 subagent 完成报告为已接受,JSON false 则报告为错误。模型提供方/模型与工作区 cwd 通过 SDK 初始化请求传入;base profile 拥有适配器、工具、持久化、策略、settings 与 credentials。
模型体验
SDK coding agent persona
模型看到什么
profile 会在 base 工具与上下文贡献之前提供 You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.。确切的 SDK 初始化路由与会话 cwd 会解析其中的占位符。
Token 影响
一段简短稳定的 persona,加上随数据变化的 base 提示词段落与所选工具 schema。
KV Cache 影响
对固定 profile、提供方、模型与工具清单保持稳定。由于随附 SDK profile 使用仅启动时 patch,profile 变化会在下一个进程生效。
已知限制与延期工作
- profile 可以省略 SDK server:TypeScript client 选择的自定义 profile 必须保留本组合包或另一个
dsh-sdk-jsonrpc-server配置项;没有 peer 响应时,client 初始化会失败。 - 用户插件可以破坏 stdout 纯净性:profile 与逐次启动 patch 属于受信任应用组合。随附组合包不会向 stdout 写入非协议内容,但无法约束任意插入插件。
- 配置变化需要重启:随附
sdkprofile 使用patchReload: startup,因此一个 stdio 连接不会观察到 server 或 Agent 依赖被替换。