dsh-shell: Selecting a Shell for DSH Agents and Persistent Terminals

Preface

In DeepSeek Harness (DSH), agent one-off commands and minimal persistent terminals default to the officially assembled executors. If you rely on Zsh plugin chains, fish prompts, or depend on Git Bash, MSYS2, and WSL on Windows, and wish for commands and interactive terminals to reside in the same Shell environment, you must explicitly specify the environment on the client side rather than manually changing the invocation method every time.

Below is an introduction to the community plugin dsh-shell (Maintainer: Luca4Don3, Category: Client). Within the DSH plugin ecosystem, it handles Shell selection for agent commands and persistent terminals, and supports the newly added Default Native Passthrough in v0.3.0 (verified against DSH 0.2.0-rc.2). Configuration takes effect during the Cordis assembly phase; after saving, you must restart DSH and create a new session. It cannot be treated as a hot-swap for running processes.

What is this

dsh-shell is a DSH plugin that selects the Shell for agent one-off commands and persistent terminals, covering Bash, Zsh, fish, PowerShell, Git Bash, MSYS2, Cygwin, WSL, etc. (subject to the installations detected on the local machine).

The DSH community plugin directory (such as SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer. Please inspect the source code and license yourself before installation. The plugin runs with the permissions of the current DSH process; selection and sandbox strategies should be considered in conjunction with the limitations described below.

Three Operating Modes

The README uses a table to explain the three selection options and their behaviors. When writing configurations, refer to the documentation:

Selection Behavior
auto Preserves dsh-shell’s existing executor, launch, and environment export inheritance logic; it is not native passthrough.
default Directly assembles the DSH official sandboxed Bash (POSIX) or PowerShell (Windows) executor, retaining official preset tools, terminal backends, and persistence tools.
Detected Shell / Legacy Shell Name Manual selection; existing Shell adapters and launch behaviors remain available.

default does not instantiate SelectedExecutor, does not wrap Shell commands, does not collect login-shell environments, does not inject dsh-shell launch code, and does not rewrite tool registration or Job kinds; Bash tasks still maintain the official kind: 'bash' along with ID, lifecycle, cancellation, timeout, and output management. Parent environment cleanup, allowed env/dshEnv injection, sandbox, and approval policies remain consistent with official DSH.

Configuration is selected during Cordis assembly, rather than switching at the moment of command execution. Official executor rows remain declared as disabled; the assembly plugin loads only one official or selected executor. default reads the configuration of the raw official row (including user overrides) rather than the timeout of the selected executor; the bundled POSIX timeout is 60s, and the PowerShell schema default is 120s.

Available Environments

Only installations detected on the local machine are listed. Detection paths include common locations, PATH, /etc/shells, Git registry, and MSYS2_ROOT / CYGWIN_ROOT. POSIX IDs are derived from the installation path to prevent invalidation after other installations change; legacy names like bash will still select the first installation of that family.

Platform Options
macOS / Linux Bash, Zsh, sh, dash, ksh, mksh, ash, fish, csh, tcsh
Windows PowerShell 7, Windows PowerShell, Git Bash, MSYS2, Cygwin, WSL

Installation and Enablement

Desktop Client

  1. Open Plugins in the sidebar.
  2. Click Add plugin and paste one of the following specs.
  3. Select Enable now, then restart DSH.
github:Luca4Don3/dsh-shell
/absolute/path/to/dsh-shell

The github: spec downloads via HTTPS from codeload.github.com; npm mirrors do not proxy this address, so the host must be able to access GitHub.

CLI Managed Web Profile

add will both install and select the bundle; a DSH restart is still required to complete assembly:

dsh plugin --profile web add github:Luca4Don3/dsh-shell
# Or local path
dsh plugin --profile web add /absolute/path/to/dsh-shell

Typical Usage

  1. Open Plugins → dsh-shell and select a Shell (if WSL is selected, choose a distribution as prompted).
  2. Save, then restart the entire DSH runtime, and create a new session.
  3. After installing a new Shell environment, restart once more to refresh the list.

Startup file loading order for different Shells (excerpt):

Selection Startup
Zsh .zshenv, .zprofile, .zshrc, .zlogin, respecting ZDOTDIR
POSIX Bash /etc/profile, then tries .bash_profile, .bash_login, .profile in order; reads .bashrc only if none of the above exist
Other POSIX Loads the user’s original Shell first and carries exported variables
Windows Bash After capability checks pass, follows the same profile rules as POSIX Bash; whether to source .bashrc is controlled by the profile

default uses official platform tool names. In manual mode, tool names follow the actual running Shell (e.g., zsh, fish; Windows Bash environments still report bash) and include corresponding syntax descriptions. Custom presets can point to dsh-shell/tool-posix or dsh-shell/tool-windows.

shellPath in the Profile patch can override detection results with a same-family executable; it cannot be used simultaneously with auto, default, or wsl. Modes are effective only at startup: after saving, you must restart and start a new session; changing the selection and re-enabling the plugin in the same runtime will result in a restart required error.

Presets and Customization

The four bundled presets (preset-standard, preset-ptc, preset-cordis, preset-minimal) are no longer rewritten entirely; runtime configuration hooks only adapt the above carriers under Auto/Manual, and default does not modify their configurations. User plugin rows, nested groups, expressions, and overrides are preserved; independent custom presets will not be automatically rewritten. You may opt-in via dsh-shell/preset or existing adapters, while the global executor still follows the selected mode.

Use Cases and Limitations

Who it is for

  • DSH users who want agent commands and minimal persistent terminals to be unified in a specific Shell.
  • Those on macOS / Linux needing Zsh, fish, etc.; or on Windows needing PowerShell series or Unix-like environments (Git Bash, MSYS2, etc.).
  • Those who need default mode to stay close to the official sandboxed Bash/PowerShell but prefer to manage selection centrally via the plugin UI.

Limitations you must be aware of

  • WSL requires danger-full-access and will fail in restricted mode; other Windows Shells still run within the DSH sandbox.
  • The peer version declared in v0.3.0 is DSH 0.2.0-rc.2; other DSH versions require self-verification and compatibility cannot be assumed.
  • Configuration saving does not live-switch the Shell; a restart is required after enabling/disabling/upgrading/downgrading the bundle. In case of assembly failure, rc.2 keeps the GUI running, but errors should be resolved before running commands.
  • Do not move the official executor rows or the loader scope of dsh-shell/assembly; custom executor scopes (isolate/intercept/inject) or moving native rows to other groups will result in explicit failures.
  • Independent custom presets will not be automatically adapted; if a non-Bash Shell is selected globally in manual mode, official tool descriptions may still say Bash, requiring opt-in adapters.
  • README states: Full verification is available for macOS 15+ (arm64) with DSH 0.2.0-rc.2; Windows / WSL are asserted on simulated platforms with no native Windows host acceptance; Linux CI is not included in the bundled workflow.

Upgrade, disable, and rollback: The README suggests backing up the profile and retaining the previous installation spec/commit (the truncated text also points to this process; refer to the repository’s Upgrade, disable and rollback section for specific operations).

Conclusion

dsh-shell consolidates the choice of “which Shell to use for agent commands + persistent terminals” into a client plugin configuration: Auto preserves existing adaptation behavior, default aligns with the official sandboxed executor, and manual options cover common local multi-Shell and Windows-side environments. Refer to the README for installation specs; after changing selections, simply restart DSH and create a new session for the changes to take effect.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye