baldovinmarques391-design/dsh-plugin-hot-reload ↗★ 0

dsh-plugin-hot-reload

从磁盘实时读取插件元数据与浏览器模块以实现热重载。 适合插件开发者,修改代码或配置后无需重启 DSH 即可生效。

包名
dsh-plugin-hot-reload
兼容性
待验证
版本
0.1.1
最近更新
2026年10月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:baldovinmarques391-design/dsh-plugin-hot-reload

dsh-plugin-hot-reload

标题、简介、图标和浏览器模块都按磁盘现读现发布:改完立即生效,不用重启 DSH。

A DeepSeek Harness bundle. It replaces three cached resolvers with plain filesystem walks, so a plugin's display metadata and browser module follow the package on disk instead of a verdict cached for the life of the process:

ServiceWhy it is patched
pluginPackages.metaOfThe Host resolves locale/*.json and icon.svg through the Node ESM resolver. A package whose export was added after its first read stays bare until restart.
pluginManager.listBundlesThe plugin inventory calls the Host reader directly, so it needs the same disk result even when the Host already produced a fallback.
clientModules.resolveMeta / locatePkgJsonVerdicts are cached in pkgMeta, null included. Moving a linked package makes its browser half disappear.

Install it into a profile:

dsh plugin --profile web add 

Editing another plugin's locale/, icon.svg, or manifest then needs only a page refresh. Editing this plugin's own index.js, or adding a new importable subpath export, still needs a restart: Node caches modules by URL.

Test

$env:DSH_RUNTIME = ''
$env:DSH_PROFILE_DIR = '
'
node test/live.test.mjs

The check compares this reader against the Host reader for every package the profile depends on, and reproduces the late-locale case.