deepseek-harness/apps/cli
Yichen Jiang fe221be572 Merge remote-tracking branch 'origin/master' into worktree/preset-plane-fallout-p1
The vendored Cordis rescope (`cordis` -> `@deepseek-ai/cordis`,
`@cordisjs/plugin-*` -> `@deepseek-ai/cordis-plugin-*`) collided with this
branch's two added edges. Resolved by taking master's package names and
keeping this branch's additions: `@deepseek-ai/dsh-agent` and
`@deepseek-ai/dsh-system-prompt` peers, the `scopeChainOf` import, and the
`agent/created` type-only edge.

`docs/event-producer-consumer.*` is generated; regenerated after the merge
rather than hand-resolved.
2026-08-10 23:00:23 +08:00
..
config fix(preset): keep the token meter host-plane and name unjoined agents 2026-08-10 22:36:06 +08:00
reference refactor: remove repository plugin path 2026-08-10 21:32:13 +08:00
src build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
tests Merge remote-tracking branch 'origin/master' into worktree/preset-plane-fallout-p1 2026-08-10 23:00:23 +08:00
composition.md build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
package.json Merge remote-tracking branch 'origin/master' into worktree/preset-plane-fallout-p1 2026-08-10 23:00:23 +08:00
README.i18n.yaml fix(headless): dsh run is a direct core front door 2026-08-09 13:44:44 +08:00
README.md fix(headless): dsh run is a direct core front door 2026-08-09 13:44:44 +08:00
README.zh.md fix(headless): dsh run is a direct core front door 2026-08-09 13:44:44 +08:00
tsconfig.json refactor(packages): dissolve ui/ and rename sdk/ to scaffold/ 2026-08-09 01:21:12 +08:00
tsdown.config.ts cleanup: remove TUI package and legacy dsh entrypoints 2026-08-04 13:20:28 +08:00

@deepseek-ai/dsh

English | 中文

The dsh command is the product launcher for profiles: ordered stacks of plugin-bundle patch layers under the user's own overrides. src/args.ts owns the command grammar, and src/bin.ts loads only the selected runner. Invalid commands, options from another mode, configuration errors, and boot failures exit nonzero.

Entry modes

Command Purpose
dsh --profile <name> Boot the named profile under $DSH_HOME/profiles/<name>.
dsh run [--profile <name>] [--patch <path>...] "task" Run one fresh persisted session directly over core, print the final answer, and exit; the profile defaults to headless and mounts no Web server.
dsh web Alias of --profile web with the Web flag family (--host, --port, --dev, ...).
dsh plugin --profile <name> <pnpm args> Manage a profile's plugins by forwarding to pnpm in the profile directory.

The invoking directory is the default workspace root. dsh run requires non-blank task text and the selected profile must mount the headless-runner row; --profile preserves custom one-shot profiles. The web and headless profiles auto-initialize on first use from shipped templates; any other profile must be created through dsh plugin.

Profiles

A profile directory holds a package.json (out-of-tree plugin dependencies plus the profile manifest dsh.profile with its ordered bundles list) and a cordis.patch.yml (the user's own patch layer, hot-reloaded on long-lived surfaces). The tree composes over an empty root: each bundle's patch in dsh.profile.bundles order, then the profile's cordis.patch.yml, then the home-level $DSH_HOME/cordis.patch.yml, then --patch overlays, then flag patches. Bundles named in dsh.profile.bundles resolve from the dsh installation first (@deepseek-ai/dsh-base, @deepseek-ai/dsh-web-app, @deepseek-ai/dsh-headless), then from the profile's own node_modules, where pnpm installs out-of-tree plugins. Use --dump-default-config and --dump-config to inspect the composed tree without booting it.

The CLI behavior reference owns exact layer precedence, flags, shutdown behavior, deployment defaults, and the source launcher.

Development

Production runs require built package and frontend artifacts. From a checkout, pnpm run dsh runs the TypeScript entry and forwards arguments; the source-launcher reference describes the PATH symlink and module-resolution contract.