Files
deepseek-harness/packages/bundle/sdk-app/README.zh.md
T
Tianyi Cui 8dc3b0380e feat(bundle): ship the standalone sdk-minimal profile
Add a startup-only sdk-minimal template whose sole bundle inserts the complete JSON-RPC agent tree over the empty profile root. The roster is an explicit composition allowlist: it contains one DeepSeek adapter, the minimal agent spine, persistent Bash, the string-replace editor, local execution, and JSONL persistence, while dsh-base and Web remain absent.

Reuse the SDK app startup provider so the new profile retains help, stdin EOF, and bounded launcher shutdown semantics. Make that provider render its configured profile name, which keeps both sdk and sdk-minimal help truthful without duplicating process lifecycle code.

Register the package in the CLI closure, TypeScript graph, lockfile, Knip policy, and bilingual bundle references. Exact manifest, row-roster, profile-template, config-dump, and HMR tests make later additions visible instead of relying on a blacklist.
2026-08-24 17:28:28 +08:00

2.9 KiB
Raw Blame History

@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。独立的 sdk-minimal 组合包复用同一个启动提供方,并提供自己的 profile 名称。

启动提供方把 stdin EOF 接到启动器的有界成功关闭流程。SDK 协议 shutdown、SIGINT 与 SIGTERM 继续使用各自所属的 server 或启动器路径;dispose(资源释放)会排空根 profile 配置树与持久化。stdout 专用于按换行分隔的 JSON-RPC 帧。SDK 不提供 title 表层,因此本组合包禁用模型生成的 session title;确定性的 fallback title 仍会持久化,但不发起辅助模型请求。部署通过 profile 组合包与 patch 文件选择另一套完整组合,而不是使用另一个应用 bin。

配置 默认值 行为
profile sdk 命令 help 中呈现的 profile 名称;挂载此提供方的组合包会设置自己的随附 profile 名称。

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 使用仅启动时 patchprofile 变化会在下一个进程生效。

已知限制与延期工作

  • profile 可以省略 SDK serverTypeScript client 选择的自定义 profile 必须保留本组合包或另一个 dsh-sdk-jsonrpc-server 配置项;没有 peer 响应时,client 初始化会失败。
  • 用户插件可以破坏 stdout 纯净性profile 与逐次启动 patch 属于受信任应用组合。随附组合包不会向 stdout 写入非协议内容,但无法约束任意插入插件。
  • 配置变化需要重启:随附 sdk profile 使用 patchReload: startup,因此一个 stdio 连接不会观察到 server 或 Agent 依赖被替换。