One-click updater for a source-installed DeepSeek Harness checkout: compares the local tree with the dsh-v* release tags on origin via git ls-remote (read-only), shows the version diff and release notes, and changes nothing until you click. The pipeline runs fetch, four safety gates (required paths, plugin peer conflicts, leftover lib/ of removed packages, post-restart startup log), stash of uncommitted and untracked changes, checkout, pnpm install, clean, build, then restarts DSH and polls /ping until the new process binds the port before reloading the page. Any failure rolls the tree back to the previous version and rebuilds; local changes stay in the stash. The same pipeline can also roll back to any earlier historical dsh-v* tag. Network source picks Auto (direct first, then mirrors), GitHub direct with an optional local proxy port (covering version checks, update fetches, and GitHub release notes), or a fixed mirror (gh-proxy.com, ghproxy.net, ghfast.top); automatic checks run every 1 / 6 / 12 / 24 hours (6 by default) and put a red dot on the button when a new tag appears. The UI ships in Chinese, English and Japanese and follows the DSH locale. All five API routes are registered on the shared DSH /api admission channel (ctx.connection.fetch), where the host enforces its Host/Origin trust fence and browser login check (requires DSH >= 0.2.3).
Install
# from npm (prebuilt)
dsh plugin --profile web add @zhucy123/dsh-update
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Zhucy123/dsh-update
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
dsh-update
The update plugin for DeepSeek Harness web.
Upgrade DSH with one click in the sidebar — no more typing out a string of git and pnpm commands.
Contents · The problem it solves · What it looks like · Features · Installation · Configuration · How it works · Compatibility · Troubleshooting · Development
The problem it solves
Running DSH web from source means every upgrade is a long string of hand-typed commands — pull the tag, stop the service, check out, install, clean, build, start the service again. Any step can go wrong on the way, and at the end you still have to bring the service back up yourself.
Install the plugin and the bottom of the sidebar gains a "Check for updates" button: it tells you whether a newer version exists, nothing happens until you click, and when the build finishes it restarts by itself and the page comes back on its own — and if anything fails, it falls back to the previous version. The only thing left for you to do is confirm; everything else (fetching, stashing local changes, rebuilding, rolling back) is handled for you.
What it looks like
Sidebar button
The button sits at the bottom of the sidebar and sizes itself to its label instead of stretching across the row. Sibling buttons on the same row sit side by side when their heights are close and each takes its own row when they differ a lot — in the screenshot below Remote is 42px and ours is 32px, so each gets its own row:
The check-for-updates popover
Clicking opens a popover anchored to the button, not a full-screen overlay. It is portalled to body with fixed positioning, so it is not clipped even when the sidebar collapses to a narrow strip:
Progress while updating
Starting an update no longer closes the window — it turns into the progress window in place, with a ✕ in the top right to hide it. Hiding it does not stop the run, and clicking the sidebar button brings it back.
Inside is a band that sweeps from left to right and repeats. The server reports stages, never a total duration, so no percentage is shown: movement alone tells you it is still working.
The sidebar button switches to progressive wording (Installing, Building…) and animates the same band. On completion it turns green and reads "Update complete" or "Rollback complete".
Features
Version comparison
Reads the dsh-v* release tags on origin with git ls-remote and compares them with the local repo. It is read-only throughout and never modifies the repo. Finding a new version starts nothing: it just turns the button into "Update available" and adds a red dot after the label (a separate flex item, so it never covers the last glyph), then waits for your click.
Three network sources
The top of the popover lets you switch the connection path on the fly; the choice (including the official mode's proxy port and the mirror id) is stored in browser localStorage and restored the next time you open the panel — no need to pick again:
| Source | Behavior |
|---|---|
| Auto (default) | Tries GitHub directly first; after an 8-second timeout, retries gitProxy and the mirror list (gh-proxy.com / ghproxy.net / ghfast.top) in turn, and remembers the first mirror that works |
| Official | GitHub direct only, with an optional local proxy port (7890 for Clash / V2Ray and the like) |
| Mirror | Pins one of gh-proxy.com / ghproxy.net / ghfast.top; if the repo origin is not a GitHub URL, it fails immediately with an error instead of continuing |
An empty proxy port means a direct connection. Choosing "Official + local proxy port" applies end-to-end: not only to version checks (git ls-remote) and update/rollback fetches (git fetch), but also to /api/dsh-update/release-notes when fetching GitHub release notes, via an HTTP CONNECT tunnel built on Node's node:http / node:tls.
After fetching via a third-party mirror (gh-proxy.com / ghproxy.net / ghfast.top or gitProxy), the plugin automatically verifies the target tag's commit SHA against the official GitHub API (and aborts immediately without checking out if they differ). If the official API is unreachable, it warns about the risk and proceeds by default (relying on trust in that mirror); set verifyMirrorSha: true to require strict verification, or choose "Official + local proxy port" when strict trust boundaries are required.
Automatic checks
On by default, once every 6 hours, with 1 / 6 / 12 / 24 hour options. Every dsh web start also triggers one check. A background check that finds a new version only changes how the button looks — no dialog, no interruption; a failure quietly falls back to the next mirror.
One-click update pipeline
git fetch --tags
↓ recompute the target from the tag just fetched (no stale-list decisions)
required-path check → peer-conflict check
↓
git stash push -u (preserves your uncommitted work, untracked files included)
git checkout <tag>
↓ delete leftover lib/ of packages that disappeared
pnpm install → pnpm run clean → pnpm run build
↓ only counts as done when all three pass
auto restart → wait for the new process → page reloads by itself → watch the boot log
↓ unhealthy log rolls back
Every step is streamed as text/event-stream, so the output of each step shows up live.
Automatic restart, the page comes back by itself
After a successful build, dsh restarts automatically (the completion notice shows a real countdown, about 2 seconds) — no manual page refresh and no watching a terminal:
The plugin first records the boot id of the current process, then requests /api/dsh-update/ping every 0.2 seconds (the first probe is immediate). When boot changes, the new process has bound the port, and only then does it call location.reload(). The same boot baseline is written to browser localStorage, so even if the build replaces the web assets, blanks the page and severs the SSE, a freshly loaded page still polls /ping on its own and completes the reload without depending on that stream.
Before reloading it checks one more thing: whether this page needs it at all. The first half of boot is the host process start time, so if that predates this page load, the new process was already serving this page — the marker is cleared and no reload happens. That is why pressing F5 yourself is not followed by a second automatic reload.
Why not just reload: between the old process exiting and the new one listening there is a gap, and reloading right away only lands you on "This site can't be reached". Waiting until the new process is confirmed ready means the page drops straight back into a working UI.
In practice the window where the page is truly unusable is much shorter than it feels. Sampling a real update every 2 seconds showed dist empty for only about 2 seconds, and the restart gap (the new process has not bound its port yet) at about 18 seconds. During the several minutes of host tsc compilation before that, dist stays intact and the page remains fully usable — that stretch does not produce a blank page.
- Polling runs for 90 seconds by default; detached background mode hands out a longer window
- Once the window is over it stops waiting and gives control back to you, rather than locking you into a loop
- If the automatic restart doesn't happen (disabled in the config, say), the completion panel shows "Restart failed, please restart manually", and the "Restart now" button beside it retries once
- When a supervisor (system/user systemd, PM2, supervisord, macOS launchd, or Docker/containers) is detected, or
allowRestart: falseis set, there is no automatic restart and therefore no polling
Four safety gates
The dangerous part of an update is not failing to fetch — it is ending up with a checkout that won't run. The four checks below each map to a real failure:
| Gate | Blocks | How to release it |
|---|---|---|
| Required paths | The target tag is missing packages/client/ui-context-menu/package.json (which provides contextMenus) — after checkout the web UI sits at Failed to load plugins |
Click "Check out anyway" in the panel, or set allowMissingRequiredPaths: true; requiredPaths: [] turns the check off entirely |
| Peer conflicts | Enabled plugins' harness / dsh peerDependencies don't cover the target version (WorkBuddy-style pins). Scans only enabled bundles in dsh.profile.bundles (including symlink / Junction plugin directories), supports standard npm semver ranges (including whitespace-separated operators and hyphen ranges), and cross-checks prereleases against their stable version to avoid false positives. Only packages on the harness version line are compared (@deepseek-ai/dsh-* etc.); independently versioned peers such as cordis and schemastery are not. It also inspects the profile manifest for @deepseek-ai/dsh* dependencies pinned to an exact version — ranges (^/~) float to the new version on install while an exact pin never moves, so the package stays old and DSH disables the plugin rows that need it on boot |
Pre-checked in the panel (grouped per plugin) when you press "start update", so a run is never interrupted halfway; can be set to block / ignore |
| Leftover lib/ | A lib/ directory gitignored by an older version survives on disk after the new tag deletes that package (the classic case: an old ui-context-menu/lib keeps injecting contextMenus) |
Automatic: deletes only the lib/ of packages that exist in the old tree but not the new one, under the whitelisted top-level dirs (packages/, apps/) |
| Startup log | The build succeeded but the log after restart contains did not activate / Failed to load plugins |
Automatic rollback, no intervention needed |
A failing pnpm run clean aborts and rolls back the same way — it is never treated as a warning you can build past. An exit code of 0 doesn't count as success either: the startup log has to stay clean for the observation window (15 seconds by default).
Rolling back
To go back, pick an older dsh-v* tag under "Or roll back to an older version"; the button always says "Roll back to this version". Tag comparison and version ordering use full semver numeric ordering for prereleases (such as alpha.10 vs alpha.2). The version list only contains tags older than current — upgrades are handled by the top-level "Start update" button, so there is no duplication, and an up-to-date view has no contradictory "update to this version" option. Rollbacks go through the same safety checks as updates.
A successful rollback also restarts automatically and refreshes the page, with nothing to do by hand.
When a rollback is blocked by a safety gate (conflicting local changes, a target missing a required path, incompatible peers), a confirmation card lists the reason: which files conflict, which plugin is incompatible, which path is missing — with a "Roll back anyway" button. Confirming keeps the progress you already made; cancelling restores the button to normal. Conflict details are collapsed by default instead of flooding the panel.
Your local changes are never lost
- Checks
git status --porcelainbefore auto-stashing — when the working tree is clean, it skipsgit stash pushso an existingstash@{0}is never touched - When changes exist, runs
git stash push -ubefore updating (untracked files included), thenstash applyrestores them as they were on success - If the new version touches the same file and
stash applyconflicts, the stash entry is kept (never dropped) andgit reset --hard HEADrestores a clean working tree before continuing the build, while the panel states plainly: "not lost — you can rungit stash applyby hand in the repo directory" - The panel has an "Auto-stash and continue updating / rolling back" button, so you never need to open a terminal
- Before rolling back it also checks
git status --porcelainand runsstash push -uwhen dirty, so a rollback can't wipe out your changes
Automatic rollback on failure
After switching to the new version, if install / clean / build fails at any point, or the startup log is unhealthy after the restart, it automatically git checkouts back to the original version and rebuilds. If pnpm fails again during the rollback it does not pretend to succeed — it tells you plainly that "your local changes are safely stored in the git stash", because the working tree state is unknown at that point and handing it to you beats gambling automatically.
Trilingual interface
Chinese / English / Japanese. The language is resolved in order from ctx.locale (DSH's LocaleRuntime), <html lang> and navigator.language, and it listens for <html lang> changes to switch live without a refresh. Any other language falls back to English — no half-translated UI.
Concurrency and security boundaries
- Only one update task at a time; a duplicate trigger returns 409
- All 5 API routes are mounted on DSH's shared authenticated
/apichannel (ctx.connection.fetch.register). The host applies its Host/Origin trust fence (anti DNS-rebinding / cross-origin) and browser login check before a request reaches the plugin — no web page open in your browser can call them. The 401/403 comes from the host, not the plugin - System-mutating endpoints such as
/runand/restartare therefore login-gated; the plugin keeps only policy checks (supervisor /allowRestart/ in-flight task / target-tag whitelist) POST /api/dsh-update/runcaps the request body at 64 KiB (returns 413 if exceeded) and rejects malformed or non-object JSON with HTTP 400 (never silently falling back to empty options)- When turns are in progress, the force-update second confirmation preserves user options such as auto-stash (
stash); clicking the sidebar button in thedone/errorstate to re-check also preserves the selected network source and proxy configuration - Restart and background-install port probing resolves the host's real listening port first and checks both
127.0.0.1and::1(IPv6 loopback); detached helpers execute via temporary.cjsfiles intmpdir()and only sendSIGTERMto the host after'spawn'succeeds - Every git invocation forces
GIT_TERMINAL_PROMPT=0(credentials are never requested interactively), and embedded URL credentials (https?://user:pass@) in git/pnpm output and errors are redacted as***@ - Both direct and proxied GitHub release-notes fetches enforce a 2MB response cap, and HTTP
CONNECTtunnels pinALPNProtocols: ['http/1.1'] - Rollback targets must carry the
dsh-v*prefix — arbitrary refs are rejected - Mirror fetches automatically verify the target tag's commit SHA against the official GitHub API (mismatches abort immediately without checking out); when the official API is unreachable, it warns and proceeds by default unless
verifyMirrorSha: trueis set (choose "Official + local proxy port" for strict trust boundaries) - Validates that the target directory is a
deepseek-harnessrepository before checking or updating (rejecting npm-installed@deepseek-ai/dshand unrelated git repos unlessallowUnverifiedRepo: trueis set), and refuses checkout when HEAD has local commits not in anydsh-v*tag unlessallowLocalCommits: trueis set - Requires DSH
>=0.2.3(alphas included); the shared/apiadmission model stabilised in 0.2.3.engines.dsh: ">=0.2.3-0"lets0.2.3-alpha.*satisfy it
Installation
This plugin is a Profile Bundle:
package.jsondeclaresdsh.bundleand shipscordis.patch.yml. That meansdsh plugin addinstalls and activates it in a single command, with no config file to edit by hand.
From npm (recommended)
dsh plugin --profile web add @zhucy123/dsh-update
dsh web
From GitHub
dsh plugin --profile web add git+https://github.com/Zhucy123/dsh-update.git
dsh web
From a local checkout (for development)
link: creates a symlink in node_modules pointing at the source directory, so code changes need no reinstall.
dsh plugin --profile web add link:<absolute path to the source directory>
dsh web
# Windows PowerShell example
dsh plugin --profile web add link:C:\Users\me\workspace\dsh-update
After installing you must fully restart
dsh web. Not a page refresh, and not anotherdsh webin a second terminal either — stop the old process, then start it.
The plugin ID and the route prefix are both
dsh-update; the baredsh-updatename on npm was already registered by a third party as a 1.3KB placeholder shell, which is why it is published under a scope. Once installed, you can't tell the difference.
Configuration
Everything here is optional. Set it in the user patch layer of the profile's cordis.patch.yml:
# ~/.dsh/profiles/web/cordis.patch.yml
plugins:
'@zhucy123/dsh-update':
peerConflictPolicy: confirm
bootHealthWindowMs: 20000
| Field | Env var | Description | Default |
|---|---|---|---|
repoDir |
DSH_UPDATE_REPO_DIR |
Root of the repo to update (must be a git checkout) | The first directory containing .git walking up from process.cwd() |
gitProxy |
DSH_UPDATE_GIT_PROXY |
Mirror prefix used after a direct connection fails; "" disables mirror fallback |
https://gh-proxy.com/ |
allowRestart |
— | Whether self-restart is allowed; automatically disabled when a supervisor (system/user systemd, PM2, supervisord, macOS launchd, container) is detected | true |
autoRestart |
— | Whether to restart ~2 seconds after a successful update / rollback and refresh the page once the new process is ready | true |
windowsDetachedUpdate |
— | Detached background update on Windows, see below | false |
requiredPaths |
DSH_UPDATE_REQUIRED_PATHS |
Relative paths that must exist in the target tag before checkout. An empty array disables the check | ["packages/client/ui-context-menu/package.json"] |
allowMissingRequiredPaths |
— | When true, a missing path only warns and the checkout still proceeds |
false |
orphanLibRoots |
— | Top-level repo directories where leftover lib/ may be cleaned up |
["packages", "apps"] |
peerConflictPolicy |
— | confirm (list, then confirm) / block (reject outright) / ignore (log only) |
confirm |
profilesDir |
DSH_UPDATE_PROFILES_DIR |
Profile root scanned for plugin peers | ~/.dsh/profiles |
bootHealthWindowMs |
— | Milliseconds to keep watching the startup log after the port comes up (0–120000). Skipped when automatic restart is off | 15000 |
verifyMirrorSha |
— | When true, abort the update after a mirror fetch if the tag SHA cannot be verified against the official GitHub API (mismatches always abort) |
false |
allowLocalCommits |
— | When true, allow checkout to proceed when HEAD has local commits not included in any dsh-v* tag |
false |
allowUnverifiedRepo |
— | When true, skip the deepseek-harness repository identity check |
false |
Detached updates on Windows
A running dsh on Windows may be holding file handles on the old node_modules, so an in-process pnpm install can't delete the locked packages ([WARN] Failed to remove ...) and trips a rollback instead.
With windowsDetachedUpdate: true, once the git steps are done the update is handed to a detached background process: this process exits and releases the handles, and the background process waits for the port to be freed, then runs install → stash apply → clean → build — restarting on success, rolling back on failure, and writing a log to %TEMP%\dsh-update-apply-*.log.
The cost is that the page disconnects at the handover. The background process still restarts and waits for you, but because the connection was already dropped during the handover, you have to reopen the page yourself. That is why this is off by default: the in-process path keeps everything visible and refreshes the page for you, so it is only worth enabling when you genuinely run into a file lock.
How it works
flowchart TD
A[Click Check for updates] --> B[/status compares versions/]
B --> C{Newer tag?}
C -- no --> D[Already up to date]
C -- yes --> E[Show version diff]
E --> F[fetch --tags<br/>recompute target]
F --> G{Required paths present?}
G -- no --> H[Refuse checkout]
G -- yes --> I{Peer conflicts?}
I -- yes --> J[Wait for confirmation]
I -- no --> K[stash push -u]
J --> K
K --> L[checkout tag<br/>clean leftover lib/]
L --> M[install / clean / build]
M --> N{All succeeded?}
N -- no --> O[Roll back<br/>rebuild]
N -- yes --> P[Auto restart<br/>wait for new process]
P --> PR[Page reloads by itself<br/>watch boot log]
PR --> Q{Log clean?}
Q -- no --> O
Q -- yes --> R[Restore stash<br/>done]
API routes
| Route | Method | Description |
|---|---|---|
/api/dsh-update/status |
GET | Version comparison plus the local list of historical tags; ?source=&mirror=&proxyPort= re-runs the check on the current network source |
/api/dsh-update/ping |
GET | A very lightweight liveness probe returning boot / pid / inFlight, used only by restart polling (no git reads, no profile scan) |
/api/dsh-update/release-notes?tag= |
GET | The GitHub Releases notes for the given version |
/api/dsh-update/run |
POST | Streams an update / rollback (text/event-stream) |
/api/dsh-update/restart |
POST | Starts a new process from the original launch command |
Compatibility
| Platform | Status | Notes |
|---|---|---|
| Windows | ✅ | pnpm goes through its .cmd shim via the shell (timed-out shell subprocesses kill the whole process tree with taskkill /T /F); restart is launched silently with PowerShell -WindowStyle Hidden + windowsHide |
| Linux | ✅ | Falls back to corepack pnpm when pnpm is missing |
| macOS | ✅ | Same as Linux |
- Every path goes through
node:path; no hard-coded separators - Port probing (for restart and detached background updates) checks both
127.0.0.1and::1 - On POSIX the restart uses
detached: trueso the new process becomes its own session — closing the terminal that launched it doesn't affect the service, and output is redirected to a log in tmpdir - Recognizes system/user systemd, PM2, supervisord, macOS launchd, and Docker/container supervision and disables self-restart automatically (preventing two instances from racing to bind the port); set
allowRestart: trueexplicitly to override
Requirements:
- DSH running from source — a cloned
deepseek-harnessrepository whose origin carriesdsh-v*release tags. Global or local npm installs of@deepseek-ai/dshshould be upgraded with npm (e.g.npm install -g @deepseek-ai/dsh@latest); the plugin checks that the target directory is adeepseek-harnessrepository before checking or checking out, refusing unrelated git projects - Node.js ≥ 18, git, pnpm
Troubleshooting
| Symptom | What to do |
|---|---|
| The button doesn't appear after installing | 99% of the time you didn't fully restart (you only refreshed the page). Stop the old dsh web process and start it again |
| The panel is stuck at "Checking version…" | A network problem. Switch the source to "Mirror" and retry; a failed check reports the direct and mirror errors separately in the message |
| "An update is already running" (409) | The concurrency guard — wait for the current task to finish |
| It reports a missing required path | That target tag would break the web UI (typically missing ui-context-menu). Choose another version, or click "Check out anyway" once you accept the risk |
| Peer conflicts are listed for WorkBuddy and other plugins | Counts only enabled plugins pinning harness / dsh to an older version (installed-but-disabled ones are ignored; alpha targets are matched against their stable version to avoid false positives). You can confirm and continue, or change peerConflictPolicy |
MISSING_EXPORT / it won't open after updating |
A leftover lib/ references an export that no longer exists. The plugin runs pnpm run clean and clears the lib/ of vanished packages automatically; doing it by hand, remember pnpm run clean && pnpm run build |
Failed to load plugins / did not activate in the startup log |
The plugin has already rolled back; reopen the panel once the page recovers to see the rollback result |
| It still says "update available" after updating | A successful update refreshes the page automatically, and this doesn't happen after that refresh. A separate tab, or a panel opened before the refresh, stays on the old view — click "Check again" |
| The button stays a green check and won't respond | Clicking in the done / error / confirm state returns it to idle and re-checks with the selected network source and proxy configuration; cancelling the interception card also restores the button |
| The page didn't come back after updating | Wait a few seconds first: even if the build blanks the page and severs the SSE, the reloaded page still polls /ping (every 0.2 s) from the localStorage boot baseline. If the restart genuinely did not happen, the panel shows "Restart failed, please restart manually" — click "Restart now" beside it, or press F5 and start dsh yourself. Polling waits 90 seconds by default, then hands control back to you |
Verifying the install
# 1. The dependency is recorded
Get-Content $HOME\.dsh\profiles\web\package.json | Select-String dsh-update
# 2. The dependency is in place (a link: install shows up as a Junction)
Get-Item $HOME\.dsh\profiles\web\node_modules\@zhucy123\dsh-update
Then restart dsh web; a "Check for updates" button should appear at the bottom of the sidebar.
Development
git clone https://github.com/Zhucy123/dsh-update.git
cd dsh-update
node --test test/*.test.mjs
dsh plugin --profile web add link:$(pwd)
lib/index.js 3697 lines host side: API routes, update/rollback pipeline, stash, boot health check, HTTP CONNECT tunnel
lib/client.js 2667 lines browser side: sidebar button, popover, i18n (classic script, no build)
lib/safety.js 1421 lines pure functions: repo identity check, tag comparison, peer conflicts, path whitelist, secret redaction, env cleanup
test/update-safety.test.mjs 3683 lines 91 tests
icon.svg 18 lines plugin icon (128 grid)
node --test test/*.test.mjs
# ℹ tests 91 · pass 91 · fail 0
Note: revision check and orphan lib deletion use a real git tree requires creating a symlink — on Windows without Developer Mode enabled, symlinkSync throws EPERM, so it probes capability and skips automatically (90 pass / 1 skipped) rather than failing; with symlink permission or on Unix-like systems all 91 tests pass.
Several of the 91 are runtime behavior tests — they spawn real git subprocesses, run a rollback meant to fail, spin up a local proxy to exercise the HTTP CONNECT tunnel, and verify async helper spawn failures and SSE streams on Fetch routes — not regexes over source:
runUpdateStreaming resolves and closes the stream on a non-git directory
runUpdateStreaming with stash: true leaves existing stash@{0} untouched when working tree is clean
runUpdateStreaming restores pre-checkout stash when checkout fails after stash: true
handleRun returns 400 for invalid JSON or non-object JSON without locking the latch
unrelated git repository is rejected by /status and /run unless allowUnverifiedRepo is true
verifyMirrorTagSha and mirror fetch validation block SHA mismatches and honor verifyMirrorSha
async spawn failure on /restart returns 500, resets latch, leaves no .cjs files, and does not kill host
performRollback reports failure instead of throwing when it cannot restore
a git call survives a poisoned GIT_CONFIG_* environment
fetchJson tunnels HTTPS through local HTTP CONNECT proxy (normal & chunked) and forwards HTTP GET
Hard constraints (read before touching the code)
lib/client.jshas no build step — it is a classic script registered throughwindow.__ModuleLoader__.load({ id, factory }), and pulls in platform modules withrequire("react")internally. It can't become ESM/TS, can't use bare imports, and can't gain a bundler.lib/client.jsis CRLF with tab indentation and holds 177tr("中文原文")dictionary entries. Editing it requires exact matching (including\r\n).- React is limited to
useState / useEffect / useRef / useCallbackpluscreateElement(aliasedh) — no JSX. - Host-side routes must go through
ctx.connection.fetch.registerso the host authenticates them. Do not fall back to a barewebServer.register+ a hand-rolled loopback fence — that lets any web page open in the browser trigger an update. Keep the method whitelist andrequestBody(streamingfor/run) in sync with the handler.
Two kinds of change, two ways to take effect
| Changed | Takes effect |
|---|---|
lib/client.js |
A hard refresh of the page (with a link: install) |
lib/index.js / lib/safety.js / package.json |
A restart of dsh web |
Line endings and .gitattributes
The repo standardizes on * text=auto eol=crlf: stored as LF inside the repo, checked out as CRLF in the working tree. This overrides a system-level core.autocrlf=true and stops the LF will be replaced by CRLF notice from recurring on every commit.
If you run into "I added
.gitattributesbut the warnings are still there", first look for-textingit ls-files --eol— usually some file carries a stray bare CR (a\rnot followed by\n), git classifies it as binary, and the attribute doesn't apply to binary files.
Version history
Currently v2.0.4. See CHANGELOG.en.md for the full per-version history.
Privacy
This repo contains no local user data. The source mentions only the public product name deepseek-harness and DSH's default port 3080 — no usernames, absolute working directories, credentials or tokens. The repo contains only lib/, test/, docs/, package.json, cordis.patch.yml, icon.svg, screenshots.json, README.md / README.en.md / README.ja.md, CHANGELOG.md / CHANGELOG.en.md / CHANGELOG.ja.md, LICENSE.
License
MIT © Zhucy123
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-git-graph★ 10735
Git branch selector and Git graph for the dsh web GUI: switch branches and explore branch-lane and commit history from the conversation header. Retired by the author in favour of the official workspace-changes plugin: the published npm package stays installable but is no longer developed.
Akimiya-z/codex-guard#dsh★ 130
Pre-submit pull-request hygiene checks inside DeepSeek Harness: scans the current diff for TODO leftovers, hardcoded secrets, and non-conventional commit subjects.
xbzbing/dsh-git-panel★ 66
IDE-style Git panel in the DSH Web GUI: a resident tab with a three-column overview (branch/tag list, searchable commit-history graph, commit detail with changed-file tree and message) and a changes page (stats bar, uncommitted list with per-file stage/unstage/discard, commit box with amend); side-by-side diffs carry lazy highlight.js syntax highlighting, on-demand between-hunk context expansion and word-level intra-line emphasis, with image files shown as before/after panes; plus a zsh-style branch marker in the input bar. Every git command runs as an argv array through the host subprocess service, cwd locked to the repo root.
Cerbur/clutch-dsh#clutch-dsh-worktree★ 50
Adds a Worktree view to DSH Web UI that groups Sessions by Git worktree while keeping DSH as the source of truth.
KannaKuron/dsh-ide-git★ 42
JetBrains-style Git tool window for the sidebar: branch tree with ahead/behind badges, commit graph with text/author/date/path filters, per-file line diff, changes list and commit box, plus branch, tag and stash actions, merge, rebase, cherry-pick, reset and fetch/pull/push.
Lenonss/DSH_VsCodeMode★ 37
VSCode-style editing experience for DeepSeek Harness: a Monaco-based central file editor (tabs, Ctrl+P quick open, status bar) and interactive diff review of agent edit/write results with per-change Keep/Undo, rollback and archiving, persisted across restarts.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.