dsh-plugin-manager
其他 活跃维护

dsh-plugin-manager

czx1111/dsh-plugin-manager

轻量级开源插件管理工具,支持插件一键安装、卸载与版本切换,可自动同步插件更新日志,支持插件依赖检测与冲突提示,无需复杂配置统一管理多项目依赖插件,减少重复维护工作量。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
TypeScript
主要语言
None
开源协议
31 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:czx1111/dsh-plugin-manager
git clone https://github.com/czx1111/dsh-plugin-manager.git
git clone git@github.com:czx1111/dsh-plugin-manager.git
README.md main

dsh-plugin-manager

DSH web plugin: unified manager for profile bundles and MCP integrations (Settings → Plugins → 管理).

Toggles write managed disable overrides into the profile cordis.patch.yml and take effect through config hot-reload — no restart required.

Architecture

This plugin has two halves:

  • Node half (src/index.ts, exports ".") — mounts the /plugin-manager/api/* JSON API:

    • plugins.list — the full inventory: profile bundles + manual patch inserts, joined with live Loader entry state.
    • plugin.toggle — enable/disable one item; writes a managed disabled override block at the end of the profile's cordis.patch.yml.
  • Browser half (src/client/index.ts, exports "./client") — registers the 管理 tab in Settings → Plugins:

    • One card per bundle / entry with a live status dot and an enable/disable switch.
    • zh/en locale dictionaries.
    • Switches hold optimistic state (card border highlighted) until the live Loader state converges via config hot-reload.

Build

pnpm install
pnpm build        # produces lib/index.js + lib/client.js
pnpm typecheck    # tsc --noEmit
pnpm watch        # rebuild on save

How toggles work

  1. The user clicks a switch in the 管理 tab.
  2. The browser calls POST /plugin-manager/api/plugin.toggle with { key, disabled }.
  3. The host finds the item, rewrites the managed block (delimited by # >>> dsh-plugin-manager >>> / # <<< dsh-plugin-manager <<<) at the end of the profile's cordis.patch.yml.
  4. The launcher watches that file and hot-reloads the config — the change takes effect live.

System bundles (@deepseek-ai/dsh-base, @deepseek-ai/dsh-web-app, @deepseek-ai/dsh-headless) are never toggleable.

Trust fence

Every route passes the same browser-trust fence as the /api gateway: Host-header loopback or a configured trusted authority passes; cross-site browser markers are refused. This is a DNS-rebinding / cross-site defense, not authentication.

License

MIT