Preface¶
When developing client-side plugins in DeepSeek Harness (DSH), after modifying lib/client.js, the official pipeline polls bundle metadata via @deepseek-ai/dsh-client-hmr and pushes a rebuilt frame upon changes. The browser side then follows the invalidate → prefetch → refresh flow. While this path exists, daily development often defaults to a full-page F5, or users may be unclear on when it is sufficient to reload only specific bundles. A full-graph reload discards React state within each plugin, which carries a significant cost.
dsh-hot-refresh (maintained by liuhaolong16) turns the aforementioned official client hot reload into an explicit entry point on the panel: if it can determine “which lines have changed,” it reloads only those; a full-graph reload requires secondary confirmation or an explicit parameter. The plugin does not implement module replacement itself, relying solely on triggering and observation to avoid conflicting with the official HMR mechanism.
What is this¶
- Name:
dsh-hot-refresh(npm package name is the same) - Category: Client-side (Classified as a client plugin in the SkillHub directory)
- Current Version (from
package.jsonin the materials):0.4.0 - License: MIT
- Positioning: Calls
clientModules.rebuilt(id)on the host side to push frames immediately, provides HTTP self-checks and panel buttons; full-graph reloads include guardrails.
Community Directory Page: SkillHub - dsh-hot-refresh. Source Code & Docs: GitHub - liuhaolong16/dsh-hot-refresh.
Relationship with Official Hot Reload¶
Based on reverse engineering of the local app.asar, the README outlines the official division of labor as follows:
| Package | Responsibility |
|---|---|
@deepseek-ai/dsh-client-hmr v0.2.0-rc.2 |
Host polls each client bundle’s {mtimeMs, ctimeMs, size} every pollIntervalMs (default 500ms); upon change, calls ctx.clientModules.rebuilt(id) and pushes a rebuilt frame via SSE /plugins/events |
@deepseek-ai/dsh-client-modules |
Browser side: invalidate → prefetch → refresh; entries.sync(graph) for full synchronization, entries.reload(id, rev) for in-place single entry reload |
@deepseek-ai/dsh-hmr |
Host-side hot reload queue; documentation states that operations initiated via Plugin Manager may not wait for file events |
Beyond “file changed, waiting for polling,” this plugin provides the capability to trigger immediately along the same rebuilt path.
Core Features¶
HTTP Interface¶
-
POST /hot-refresh/reload?id=<rowId>
Directly callsclientModules.rebuilt(id)to push a frame immediately, without waiting for the 500ms poll or requiring a file change first. -
POST /hot-refresh/reload?ids=a,b,c(v0.4.0)
Precisely reloads a set of rows. The client remembers therevof every row seen previously and compares it against the graph info in/healthto diff out changed rows; the panel can display “⟳ Hot Refresh · N changed” and reload only those.
- Contains unknown IDs: Returns 503, and reloads none of them (validation before execution).
- Empty?ids=: Returns 400need-explicit-all(an empty list cannot be treated as “all”). -
POST /hot-refresh/reload?all=1
Full-graph reload (will lose React state of all plugins). Must be explicitly parameterized; otherwise returns 400 with an explanation of the impact scope (row count). -
GET /hot-refresh/health
Read-only self-check:clientModulesavailability, graph row count,graph:[{id,rev}],appliesreplay count, and recent client self-reports. -
POST /hot-refresh/report
Client self-report (whether button was pressed, success status, host version, etc.).
Panel Entry Points¶
- “⟳ Hot Refresh” next to Settings (
sidebar.footer.action): When changes exist, reloads only changed rows; when no changes exist, the first click enters a pending confirmation state, and a second click within 5 seconds triggers a full-graph reload. - “⟳ In-place Reload” in the Plugin Details header (
plugins.detail.actions): Immediate reload for a single row.
Compatibility Gate (v0.4.0)¶
The client only sends ?ids= when the host version is ≥ 0.4.0. If an older host does not recognize this parameter, it will fall back to a full-graph reload, potentially wiping the entire page state without warning. Under older hosts, it still follows the “secondary confirmation + ?all=1” flow. Version comparison is based on numeric segments (e.g., 0.10.0 > 0.9.0); empty or unknown versions are treated as older.
Installation and Activation¶
Installation commands follow the original README (example paths are for Windows; please replace the path after link: with your local bundle directory):
plugin_manager install_bundle link:E:\DeepSeek\skills\hot-refresh\bundle
plugin_manager set_bundle target=dsh-hot-refresh enabled=true
Before upgrading, you can run the gate check (README mentions 14 checks):
node _preflight.cjs
The plugin runs with the permissions of the current DSH process; please review the repository source code and MIT license before installation. SkillHub is a community directory site and is not officially affiliated with DeepSeek / High-Flyer.
Typical Usage¶
Daily Client Code Changes¶
- Modify the installed plugin’s
lib/client.js. - In most cases, the official 500ms stat polling will trigger the client-side hot update automatically without needing a page refresh (README local test, 2026-10-15).
- If you wish to reload immediately without waiting for polling, click “⟳ Hot Refresh” in the sidebar; if the plugin has detected changed rows in the graph, it will only reload those rows.
- On a specific plugin’s detail page, you can use “⟳ In-place Reload” for a single row.
When a Full-Graph Reload is Needed¶
If no changes are detected, the first click on the sidebar button enters a pending confirmation state; clicking again within 5 seconds will proceed with a full-graph reload. You can also explicitly call POST /hot-refresh/reload?all=1 via the API. Be aware before operating: React state within the reloaded plugin will be lost (a coarse-grained behavior described in official docs; the data layer is unaffected).
Observation and Troubleshooting¶
Access GET /hot-refresh/health to view clientModules, graph scale, graph and rev for each ID, and the applies replay count. This helps confirm whether the host side is ready and if the diff logic has seen the changes.
Applicable Scenarios and Known Boundaries¶
Who it is for: Developers who frequently modify DSH client plugin UI / injection logic, want to minimize F5 usage, and need to avoid accidental full-graph reloads.
Host-side halves cannot be hot-swapped via this plugin: README local testing (2026-10-15) conclusion—after modifying an installed plugin’s lib/index.js (host side), simply disabling and enabling it may still result in old code running; Node ESM caches by URL, so changing the entry filename might not work either. Client-side changes can go through official hot updates; Host-side changes require restarting the App locally. This plugin does not pretend to be able to hot-swap the host.
Other official limitations (cited from README): Replacing the version of an installed package still requires a restart; reload granularity is coarse, and React state within plugins will be lost.
Comparison with community implementations like dshmarket (README excerpt): The community saying “install and refresh the page to use” refers to refreshing the web page, not host hot reload; their profile hot disable/enable relies on HMR recomposite, which likewise cannot replace already loaded host modules. One-click restart is often unavailable on desktop supervised hosts, requiring the user to close and reopen the window.
Conclusion¶
dsh-hot-refresh consolidates the DSH official client clientModules.rebuilt pipeline into a one-click panel operation, using ?ids= diffing and ?all=1 guardrails to distinguish between “reload only the changed lines” and “full-graph reload,” while exposing the graph and replay counts via /health. When developing client plugins, prioritize using it to reduce ineffective full-page refreshes, while keeping in mind that host code changes still require an application restart.
- Directory Page: https://www.skillhub.cn/plugins/liuhaolong16/dsh-hot-refresh
- GitHub: https://github.com/liuhaolong16/dsh-hot-refresh