[δΈ­ζ–‡](./README.md) | [English](./README_EN.md) # @dsh-external/ui-plugin-manager ## Introduction `ui-plugin-manager` is a "Plugin Manager" plugin for the DSH Web client. It adds a "Plugin Manager" tab to Settings β†’ Plugins, allowing users to view and manage all installed third-party plugins that are not bundled with the system, including enabling, disabling, and uninstalling them. ## Installation ### dsh CLI (Official Project Way) If you have the `dsh` CLI installed, follow the official project tutorial to install with `dsh plugin`: ```bash # Install from a local plugin directory dsh plugin --profile web add C:/Users//.dsh/plugins/ui-plugin-manager # Or install from the GitHub repository dsh plugin --profile web add github:xiyue718/dsh-ui-plugin-manager ``` Start after installation: ```bash dsh --profile web ``` View the composed configuration: ```bash dsh --profile web --dump-config ``` See the project documentation for details: `docs/user/develop/basic/publish.md`. Build artifacts: host `lib/index.js` (**self-contained**), client `lib/client.js`, package `dsh-external-ui-plugin-manager-0.1.0.tgz`. Build once before installing: `DSH_CHECKOUT= bash scripts/build.sh`. Once a profile installs this package, the host resolves the plugin's runtime imports from the package's own directory only, so the host half is bundled into a self-contained module (inlining schemastery, zod, and the `@deepseek-ai/dsh-*` helpers); an unbundled `lib/index.js` leaves the row disabled with `failed to import`. ## Usage 1. Open DSH Web settings. 2. Go to the "Plugins" page. 3. Switch to the "Plugin Manager" tab. 4. View the third-party plugin list. 5. Use the search box to filter by name, Entry ID, or author. 6. Click "Enable/Disable" to toggle a plugin, or click "Uninstall" to remove a plugin. 7. The list refreshes automatically and shows the operation result. ## Features - View the third-party plugin list: - Plugin module name - Loader Entry ID - Version - Author - Enabled/disabled state - Current fiber state - Enable/disable plugins: updated dynamically through the Loader, effective immediately without restart. - Uninstall plugins: remove them from the current Loader runtime. - Search: filter by plugin name, Entry ID, or author. - Operation feedback: the list refreshes automatically and shows success or failure messages. - Relationship with system plugins: only third-party plugins are listed and managed; system entries such as `@deepseek-ai/*`, `cordis:*`, `deepseek-harness/packages/*`, and `deepseek-harness/vendor/*` are filtered out and cannot be operated on accidentally. - Safety: uninstall operations show a confirmation dialog. If a plugin was injected through the Super Module Injector, it may be restored automatically after restart; use `dev_uninject_plugin` for permanent uninstall. - This plugin does not provide a configuration form entry; plugins that need configuration can still use the original "Config" tab. ### Host API ```http GET /@dsh-external/ui-plugin-manager/api/plugins ``` ```http POST /@dsh-external/ui-plugin-manager/api/toggle Content-Type: application/json { "entryId": "xxx", "enabled": false } ``` ```http POST /@dsh-external/ui-plugin-manager/api/uninstall Content-Type: application/json { "entryId": "xxx" } ``` ## How It Works The plugin consists of a host half and a client half. On the host side, it gets all plugin entries from `loader.entries()` and filters out system plugins by module name, keeping only third-party plugins. To show version and author, it resolves the plugin's `package.json` from the profile `node_modules`, `DSH_HOME/plugins`, or the Loader base URL. Enable/disable calls `loader.update(entry.id, { disabled: !enabled })`, and uninstall calls `loader.remove(entry.id)`; both take effect immediately in the current runtime. On the client side, it registers the "Plugin Manager" tab in Settings β†’ Plugins, fetches the list through the Host API, renders it, and calls the corresponding API with built-in feedback when operating.