Files
deepseek-harness/apps/cli/README.zh.md
Turtle 65770325e7 feat(cli): restore the home-level user patch layer as $DSH_HOME/cordis.patch.yml
The old $DSH_HOME/config.yaml personal overlay returns under the profile
scheme's filename: machine-local preferences that apply to every profile,
loaded after the profile's own cordis.patch.yml (so the home layer outranks
it) and before --patch overlays and flag patches. Both user layers are
hot-reloaded on long-lived surfaces and shown in --dump-config with their
own provenance labels; the built-bin e2e covers the home layer landing live.
2026-08-06 11:02:42 +08:00

2.2 KiB
Raw Blame History

@deepseek-ai/dsh

English | 中文

dsh 命令是 profile 的产品启动器profile 是按序叠放的插件组合包 patch 层,之上再叠加用户自己的覆盖层。src/args.ts 负责命令语法,src/bin.ts 只加载选中的运行器。无效命令、来自其他模式的选项、配置错误和启动失败都会以非零状态退出。

入口模式

命令 用途
dsh --profile <name> 启动位于 $DSH_HOME/profiles/<name> 的指定 profile。
dsh --profile headless "task" 运行一个新的持久化会话,打印最终答案并退出。
dsh web --profile web 的别名,附带 Web flag 系列(--host--port--dev 等)。
dsh plugin --profile <name> <pnpm args> 通过在 profile 目录中转发给 pnpm 来管理该 profile 的插件。

调用目录是默认 workspace 根目录。webheadless profile 在首次使用时会从随附模板自动初始化;其他任何 profile 都必须通过 dsh plugin 创建。

Profile

profile 目录包含一个 package.json(树外插件依赖,加上有序的 dsh.plugins 组合包列表)和一个 cordis.patch.yml(用户自己的 patch 层,在长期运行的 surface 上热重载)。配置树在空根之上组合:先按 dsh.plugins 顺序应用各组合包的 patch然后是 profile 的 cordis.patch.yml,然后是 home 级的 $DSH_HOME/cordis.patch.yml,然后是 --patch overlay最后是 flag patch。dsh.plugins 中列出的组合包先从 dsh 安装目录解析(@deepseek-ai/dsh-base@deepseek-ai/dsh-web-app@deepseek-ai/dsh-headless),再从 profile 自己的 node_modules 解析pnpm 把树外插件安装在后者。使用 --dump-default-config--dump-config 可在不启动的情况下检查组合后的配置树。

CLI命令行界面行为参考负责确切的层优先级、flag、关闭行为、部署默认值和源码启动器。

开发

生产运行需要已构建的包与前端产物。在 checkout 中,pnpm run dsh 会运行 TypeScript 入口并转发参数;源码启动器参考说明 PATH 符号链接和模块解析契约。