dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Make a Git for Windows installation resolvable as bash inside the dsh host process, so the official bash shell stack can run on Windows
English · 中文
Built for dsh-TUI.
Make a Git for Windows installation resolvable as bash inside the dsh
host process, so the official bash shell stack can run on Windows.
bin directory holds
bash.exe. The default install location (%ProgramFiles%\Git\bin) is found
automatically; a portable or non-standard install is configured through
gitBinDir (see Configuration).@deepseek-ai/dsh-base — the rows this
package's patch overrides are mounted there.^22.19 || >=24 (the same range the host requires).⚠️ Read this before installing: this bundle is a shell-stack swap, not an addition. Its patch enables the bash rows and disables the pwsh rows at boot, before this plugin's
apply()runs. If no Git for Windows installation is found, this plugin cannot repair that:bashstays unresolvable, thebashtool fails on every spawn, and the disabled pwsh rows leave no fallback shell. On a machine without Git for Windows, do not install this bundle — install Git for Windows first, or pointgitBinDirat a portable installation. Removing the bundle restores the platform defaults:dsh plugin --profile <profile> remove dsh-git-bash.
dsh ships two shell stacks and gates them by platform: on Windows
@deepseek-ai/dsh-base mounts pwsh-sandbox + tool-pwsh and disables
bash-sandbox + tool-bash. The bash stack is not disabled for lack of
support — it is disabled because it spawns the bare name bash:
["bash", "-c", command], and["bash", "-c", command] for the confined
runner.Neither place accepts a configurable executable path. A stock Windows PATH does
not resolve bash: Git for Windows puts cmd\git.exe on PATH, but not
bin\bash.exe. So the only seam that reaches both spawn sites is the process
PATH — which is what this plugin edits.
On win32 only, during apply():
%ProgramFiles%\Git\bin,
%ProgramFiles(x86)%\Git\bin, %LOCALAPPDATA%\Programs\Git\bin, then
C:\Program Files\Git\bin) and checks that it really holds bash.exe;process.env.PATH — but only when that directory
is not already a PATH entry, and never reordering an existing entry;~/.dsh-tui/dsh-git-bash.log (bounded: past
128 KiB the older half is dropped, and node --test runs never write it);bash tool will not work.On other platforms it logs skipped: not win32 and does nothing.
It never throws: a missing installation, an unreadable log or a hostile config leaves PATH exactly as it was. That is deliberately not the same as leaving the machine as it was — the bundle patch has already swapped the shell stacks by then, and no plugin can undo that. Hence the warning above and the error-level report.
A plugin cannot register a tool; it can only make the environment the official tools need. So this package's own bundle patch does both halves, and installing the package IS the installation:
- insert:
- id: dsh-git-bash
name: 'dsh-git-bash'
- id: bash-sandbox # enabled (config restated: a patch replaces it whole)
disabled: false
- id: pwsh-sandbox # disabled
disabled: true
- id: tool-bash # enabled -> the `bash` tool appears
disabled: false
- id: tool-pwsh # disabled
disabled: true
Both stacks provide ctx.shell, so exactly one may mount: this is a swap, not
an addition. pwsh remains reachable from bash (powershell -Command '…') if
you need it.
Reverting is removing the bundle (dsh plugin --profile <p> remove dsh-git-bash): every override above disappears with it and the platform gating
in @deepseek-ai/dsh-base applies again.
Do not put this swap in a LIVE profile's own
cordis.patch.ymlinstead. That file is watched bypatchReload: live, so editing it re-configures running sessions immediately — before this plugin's row is loaded, which leaves them with a shell stack that cannot spawnbash. A bundle patch is read at boot, which is the order this needs.
# from npm (package name: dsh-git-bash)
dsh plugin --profile dsh-tui add dsh-git-bash
# from a local checkout (development)
dsh plugin --profile dsh-tui add file:/absolute/path/to/dsh-git-bash
Then restart the TUI (/restart) and confirm the composition before trusting
it:
dsh --profile dsh-tui --dump-config # composes the tree without starting the UI
Also check the detection result — ~/.dsh-tui/dsh-git-bash.log or the host log
records it, and a missing installation shows up there as a
SHELL TOOLS WILL NOT RUN error (see Diagnostics).
| Key | Type | Default | Meaning |
|---|---|---|---|
gitBinDir | string | "" | Directory holding bash.exe. Empty = auto-detect. When set, it is the only candidate — a typo is reported at error level instead of being papered over. |
Set it on the plugin's row when detection cannot find your installation:
- id: dsh-git-bash
config:
gitBinDir: 'D:\PortableGit\bin'
gitBinDir, or remove the bundle..bak of your cordis.patch.yml: rolling
back is deleting the four override lines above.danger-full-access the
executor skips the confinement wrapper entirely, which is what has been
exercised here. Under workspace-write the sandbox layer wraps the command in
the Windows ACL restricted-token runner — a path built for POSIX. Treat
confined modes as unverified.bash (the agent's own commands included)
benefits.pnpm install
pnpm test # node:test unit tests (pure discovery/PATH rules)
pnpm check:encoding # no UTF-8 BOM / damaged sequences / tab indentation
pnpm verify # both, in order
The tests are pure and injectable: resolveBinDir takes its environment and its
existence probe as arguments, so the discovery rules are pinned without touching
the machine. The win32 cases exercise the real installation when one is present
and skip otherwise.
~/.dsh-tui/dsh-git-bash.log holds one line per decision: the detected
directory, already resolvable, SHELL TOOLS WILL NOT RUN … when no
installation was found, and the unload restore (or PATH left alone: it changed after this plugin). Every message is also sent to the host logger — the
missing-installation one at error level.
v* tags drive .github/workflows/release.yml, which publishes to npm through trusted publishing (OIDC) — no token is stored in the repository.MIT.