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 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目