# ๐Ÿ‹ dsh-plugin-optimization **Plugin Manager for DeepSeek Harness ยท DSH ๆ’ไปถ็ฎก็†ๅ™จ** Splits **Settings โ†’ Plugins** into **Built-in / Custom** partitions, with visual management, dependency auto-check & one-click repair, auto classification, auto-tidy and a **bilingual UI that follows the DSH language instantly**.

English ไธญๆ–‡

--- ## Features - **Custom / Built-in partitions** โ€” third-party plugins live in `~/.dsh/custom-plugins/`, clearly separated from the official `@deepseek-ai/*` packages (which stay read-only). - **Browse folders** โ€” open the custom / built-in partition or any plugin directory in your file manager with one click. - **Import** โ€” paste a **git URL / local folder path / npm package name**; it is downloaded into the custom partition and registered automatically. - **Register / Enable / Disable / Delete** โ€” full lifecycle management. - **Auto-tidy (migration)** โ€” plugins previously installed via `dsh plugin add` are moved into the custom partition automatically after boot (one-time). - **8-category auto classification** โ€” color tags (MCP / Skill / Hook / Workflow / Model / UI / System / Security). - **Dependency check & one-click repair** โ€” detect missing / broken links / version conflicts (the usual cause of *"plugin failed to start"*) and repair them with one click. - **Bilingual UI** โ€” follows the DSH locale instantly, no page refresh (even the settings tab label switches). ## Screenshot Plugin Manager ## Install ```bash dsh plugin --profile web add https://github.com/AJUbest/dsh-plugin-optimization.git ``` > Requirements: Node.js and **pnpm** (`npm install -g pnpm` or `corepack enable pnpm`). Restart the gateway, then open **Settings โ†’ Plugins โ†’ Plugin Manager**. > Tip: restart twice after a fresh install so the auto-tidy fully applies. ## How it works - Host side (`lib/index.js`, Node built-ins only) registers JSON APIs via `ctx.webServer.register`: `/plugins/dsh-plugin-optimization/api/{state,open,import,register,toggle,remove,migrate,deps/scan,deps/fix,...}` - Register / remove / migrate reuse the official `dsh plugin` CLI; enable/disable edits `dsh.profile.bundles` (kept in sync with the plugin market) and cleans up legacy `cordis.patch.yml` disable blocks. - Dependency check resolves against plugin dir โ†’ partition `node_modules` โ†’ profile โ†’ dsh install, matching real module resolution. - Security: same-host / loopback origins only; every path is containment-checked. ## Directory layout ``` ~/.dsh/ โ”œโ”€โ”€ custom-plugins/ โ† custom partition (maintained here) โ””โ”€โ”€ profiles/web/ โ† profile (deps point at the partition via link:) ``` ## Uninstall ```bash dsh plugin --profile web remove dsh-plugin-optimization ``` ## License MIT