DeepSHPlugins
dsh-hot-plugin-host 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-hot-plugin-host

生態與開發JavaScriptMIT

Web UI 執行時外掛載入:監視熱目錄,執行中安裝/更新客戶端外掛 bundle,所有頁面即時生效,免重啟。附子智慧體看板示例。

2 StarstianyaZTY 更新時間 2026-08-14
訪問 GitHub 倉庫
dsh-hot-plugin-host 專案預覽

專案介紹

中文

Web UI 執行時外掛載入:監視熱目錄,執行中安裝/更新客戶端外掛 bundle,所有頁面即時生效,免重啟。附子智慧體看板示例。

English

Runtime plugin loading for the Web UI: a watched hot directory installs/updates client-plugin bundles live on every open page, no restart. Includes a right-column subagent dashboard example.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
tianyaZTY
倉庫
tianyaZTY/dsh-hot-plugin-host
GitHub Stars
2
Forks
0
開發語言
JavaScript
許可證
MIT
最近推送
2026-08-14
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

55/ 100
維護活躍
81
文件與實用資訊
100
生態關注度
14
安裝便捷訊號
75
專案宣告訊號
85

README 含完整安裝與使用說明;關注度尚低(2)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:tianyaZTY/dsh-hot-plugin-host

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-hot-plugin-host

Runtime plugin loading for DeepSeek Harness Web — no restarts.

The DSH loader tree is composed at boot, so adding a *static* client plugin (a UI panel, a widget, a dashboard) normally requires restarting dsh web. This plugin fixes that: it watches a hot directory and installs/updates client plugin bundles at runtime on every open page.

write a bundle → ~/.dsh/hot-plugins/<id>/client.js
      ↓ (host polls every 1.5s)
/ hot-plugins/list + SSE events + bundle serving
      ↓ (browser half)
fetch → __ModuleLoader__.load → loader.create (full cordis fiber lifecycle)
      ↓
the plugin goes live on every open page — no restart, no refresh

Updates work the same way (overwrite the file → invalidate + live refresh). Delete the directory → the plugin disappears on next page load.

Install

# from this repo
mkdir -p ~/.dsh/profiles/web/node_modules
ln -s "$PWD" ~/.dsh/profiles/web/node_modules/dsh-hot-plugin-host
# add "dsh-hot-plugin-host" to dsh.profile.bundles in
# ~/.dsh/profiles/web/package.json

Then restart dsh web once (the host itself is a boot plugin). From then on, every future plugin ships through the hot dir with zero restarts.

npm: dsh-hot-plugin-host (once published)

Usage

Drop a bundle into the hot directory:

mkdir -p ~/.dsh/hot-plugins/my-widget
cp examples/demo-widget/client.js ~/.dsh/hot-plugins/my-widget/
# within ~1.5s it is live on every open page

A hot bundle is the same __ModuleLoader__.load format as a boot bundle:

window.__ModuleLoader__.load({
  id: "my-widget",                       // must equal the directory name
  factory: (require) => {
    // require() only modules in the client table: react, react/jsx-runtime,
    // @deepseek-ai/dsh-client-runtime/client, ...
    const inject = ["sessions", "slots", "locale"];
    function apply(ctx) { /* full plugin powers: ctx.slots.register(...) */ }
    exports.apply = apply;
    exports.inject = inject;
    return module.exports;
  }
});
  • id: [A-Za-z0-9@._-], single path segment, no /
  • routes: GET /hot-plugins/list, GET /hot-plugins/events (SSE), GET /hot-plugins/<id>/client.js
  • hot dir: DSH_HOT_PLUGINS env override, default ~/.dsh/hot-plugins (auto-created)

Examples

ExampleDescription
packages/dsh-client-ui-subagent-dashboardSubagent dashboard in the right column: live status, expandable details, background jobs, one-click open of the child session transcript. Ships as its own npm package; also works as a hot bundle.
examples/demo-widgetMinimal self-contained hot bundle: a live status chip.

Security

The hot directory is a trust boundary, equivalent to the boot bundles list (a hot plugin gets full client-side service access). Local development machines only — never point it at untrusted content.

How it works

  • Host half (lib/index.js): registers /hot-plugins routes on ctx.webServer (list / SSE / bundle), polls the hot dir (mtime+size → rev), broadcasts change events.
  • Browser half (lib/client.js): injects loader; reconciles on connect (list), subscribes to SSE, fetches changed bundles, executes them via the standard module loader, then mounts them with loader.create — the exact mechanism the official dsh-cordis-client-runner uses for dynamic packages, giving hot plugins the full fiber lifecycle (activation gating, effect cleanup, status projection).

Related

  • dsh-market — the community plugin market UI inside DSH (browse/search/one-click install)
  • awesome-dsh-plugin — the curated registry this project is listed in

MIT

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案