Files
deepseek-harness/apps/cli/README.zh.md
Turtle 62d0f26fd6 refactor(cli)!: namespace the profile and bundle manifests under dsh.profile and dsh.bundle
A profile manifest and a bundle manifest are different kinds and shared one
flat `dsh` section: `dsh.plugins` listed bundles (not plugins) and `dsh.patch`
declared a bundle's layer. Each kind now names its role — a bundle declares
`dsh.bundle.patch`, a profile declares `dsh.profile.bundles` — so a
package.json states which role it plays and the list name matches its contents.

`DEFAULT_PROFILE_PLUGINS` becomes `DEFAULT_PROFILE_BUNDLES`, and
`DshManifestSection` splits into `DshBundleManifest`/`DshProfileManifest`.
Pre-release: no compatibility shim; turtle-ui moved with it (bd5ff10).
2026-08-06 17:28:30 +08:00

2.3 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(树外插件依赖,加上 profile manifest元数据清单dsh.profile 及其有序的 bundles 列表)和一个 cordis.patch.yml(用户自己的 patch 层,在长期运行的 surface 上热重载)。配置树在空根之上组合:先按 dsh.profile.bundles 顺序应用各组合包的 patch然后是 profile 的 cordis.patch.yml,然后是 home 级的 $DSH_HOME/cordis.patch.yml,然后是 --patch overlay最后是 flag patch。dsh.profile.bundles 中列出的组合包先从 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 符号链接和模块解析契约。