mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
Document dsh as the only application launcher across architecture, CLI, SDK, app-boot, Python package, contributor, tutorial, and example references. Explain explicit home selection, profile and patch precedence, persistent external plugin installation, the Node-free runtime path, and the absence of complete-config or ~/.dsh fallbacks. Record the Python profile-runtime decision and update the active naming, installed-wheel, and SEA packaging notes with precise supersession. Regenerate the configuration catalog and module graph after deleting the carrier, update both reviewed languages and pairing records, and classify the retained standalone Cordis files as lower-level test fixtures rather than launch interfaces.
50 lines
3.5 KiB
Markdown
50 lines
3.5 KiB
Markdown
# `@deepseek-ai/dsh`
|
|
|
|
English | [中文](README.zh.md)
|
|
|
|
The `dsh` command is the sole supported Node application launcher: profiles are ordered stacks of plugin-bundle patch layers under the user's own overrides. SDK and ACP are profiles, not separate public bins. The Python runtime wheel packages this same command and launches its `sdk` profile. [`src/args.ts`](src/args.ts) owns the command grammar, and [`src/bin.ts`](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 --profile acp` | Serve automation clients over ACP stdio until disconnect. |
|
|
| `dsh --profile headless "job"` | Run one fresh persisted session, print the final answer, and exit. |
|
|
| `dsh --profile sdk` | Serve SDK clients over JSON-RPC stdio until shutdown or disconnect. |
|
|
| `dsh web` | Alias of `--profile web`. |
|
|
| `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. The `web`, `headless`, `sdk`, and `acp` profiles auto-initialize on first use from shipped templates; any other profile must be created through `dsh plugin`.
|
|
|
|
## App arguments
|
|
|
|
The launcher parses only its own flags and hands everything after them to the booted profile, where any injected app plugin may parse the shared immutable snapshot ([`dsh-cmdline`](../../packages/boot/cmdline/README.md)). Launcher flags therefore come first, and the first token the launcher does not recognize starts the app's arguments:
|
|
|
|
```sh
|
|
dsh --profile web --port 8080 # --port belongs to the web app
|
|
dsh --profile tui --resume <id> # example, assuming the tui profile is installed; --resume belongs to the terminal app
|
|
dsh --profile headless "run the tests"
|
|
dsh --profile web --help # the web app's flags, not the launcher's
|
|
dsh --help # the launcher's own help
|
|
```
|
|
|
|
## 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 `patchReload` lifecycle) and a `cordis.patch.yml` (the user's own patch layer). `patchReload: live` watches the profile and home-level patch files; `startup` applies them once.
|
|
|
|
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
|
|
|
|
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`, `@deepseek-ai/dsh-sdk-app`, `@deepseek-ai/dsh-acp-app`), 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](reference/README.md) owns exact layer precedence, flags, shutdown behavior, deployment defaults, and source execution.
|
|
|
|
## Development
|
|
|
|
Production runs require built package and frontend artifacts. From the repository root, run `pnpm run build` separately, then use `pnpm dsh <args...>` to run the TypeScript entry and forward every argument; the [source-execution reference](reference/README.md#source-execution) owns the module-resolution contract.
|