dsh-progress-bar
v2.0.0
Published
A task progress bar for the DSH Web GUI. Host-inject mode: the host half serves /dsh-progress-bar/state and injects plain JS through webserver/index-inject; it deliberately declares no client half. The progress source defaults to $DSH_HOME/dsh-progress/st
Maintainers
Readme
dsh-progress-bar
A task progress bar for the DeepSeek Harness Web GUI. It renders a native-DOM bar directly above the composer card and polls a local state file.
What it does
- Registers
GET /dsh-progress-bar/state(read the current progress) andGET /dsh-progress-bar/health(self-check). - Injects its CSS and a polling script through the host half's
webserver/index-injectrow, so it needs no client plugin entry and no build step. - Ships as a bundle (
dsh.bundle.patch) and is manageable from the Web sidebar's Plugins page.
Install
dsh plugin --profile <profile> add dsh-progress-barBuilt and tested against DSH 0.2.0-rc.2.
The state file
The bar is shown only while the state is active, and hidden otherwise. Point a task at it by writing JSON to:
$DSH_HOME/dsh-progress/state.json # defaultOverride the location with the PROGRESS_BAR_STATE environment variable (the same variable also moves the selfcheck.json written next to it). The file must be UTF-8 without a BOM — the host half parses it with JSON.parse, and a BOM makes the bar silently disappear. Write it atomically (temp file + rename) so a reader never sees a half-written document.
{
"active": true,
"label": "Downloading XnView MP",
"percent": 63,
"detail": "43 MB / 67 MB",
"startedAt": 1791370181179,
"updatedAt": 1791370181179
}percent may be null for indeterminate progress (the fill sweeps back and forth). Set "active": false to collapse the bar. If updatedAt goes stale (20 s) the fill turns into the warning colour and the detail line says how long the source has been quiet.
It deliberately declares no client half
Same reason as dsh-xp-skin: adding any client half to this profile changed the client plugin composition and removed the user's avatar (measured three times). The browser-side code is injected from the host half instead.
Context for reviewers
The package is host-only by design, has zero runtime dependencies, and the injected browser script never throws into the page. Its inline script text must not contain a closing script tag — /dsh-progress-bar/health reports hasClosingScriptTag so that can be checked at runtime.
License
MIT
