# dsh-restart English | [简体中文](README.zh-CN.md) [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) web-GUI plugin that adds a **Settings → Restart** section: restart the `dsh web` process in one click, enable/disable installed plugins, and jump straight to the Community plugins tab to install more. Bilingual UI (English / Simplified Chinese) that follows the host's global language setting and switches live. ## Features - **Restart dsh web** — one button restarts the host web process. The restarter is a detached helper that polls until the port is actually released (up to 20 s) before relaunching, so a slow-shutting-down old process cannot make the new one die with `EADDRINUSE`; the new instance inherits the original terminal's stdio and the page reloads itself once the server is back. - **Enable / disable installed plugins** — lists every third-party plugin of the active profile (union of `dsh.profile.bundles` and `dependencies`, excluding `@deepseek-ai/*` and `cordis:*` built-ins) with a toggle per plugin that edits the profile manifest (`dsh.profile.bundles`); changes apply after a restart. Enabled state shows as a status dot (green / gray), and every async action (restart, install, branch switch, uninstall, …) carries a spinner. Rows with a pending change show a **Restart to apply** chip, and a notice bar offers a one-click restart. Plugins installed from a local checkout (`link:`/`file:` specs) additionally show git metadata when it is already present on disk — **local build** vs **local branch**, the current branch, the first remote's name/URL (e.g. `Local branch · origin/main · https://github.com/dujar/dsh-pocket.git`) — read from `.git` only, no network, worktrees included. - **More plugins** — when dsh-community-plugins is installed and enabled, a button jumps straight to **Settings → Plugins → Community plugins**; otherwise the card advertises **dujar/dsh-community-plugins** with a one-click install (runs `dsh plugin --profile
add github:dujar/dsh-community-plugins`) and a link to the repository. - **Switch branches & reinstall** — local git checkouts get a git panel (⎇): switch branch across repos (Local / origin / upstream, with tracking retargeting for same-name branches). *Reinstall* sits in its own dashed-divider group; the button is neutral until the two-step confirmation, then turns red. Fresh-clean the checkout from one of three sources: **Local** (`git reset --hard` + `git clean -fdx`), any of its own remotes (`fetch` + hard-reset to the default branch), or **Plugin (npm)** (runs `dsh plugin --profile
add add link: install`, and pnpm re-materializes the symlink from the manifest and rewrites the lockfile.
- **Uninstall** — every plugin row offers a two-step-confirmed removal from `dsh.profile.bundles` and `dependencies` (builtin packages are refused); files on disk stay untouched.
- **Fail-closed trust guard** — all routes reuse the same-origin/localhost check shared with dsh-trader and dsh-community-plugins.
## Screenshots
Settings → Restart section (English):

Toggling a plugin shows the pending state and a restart shortcut:

The *More plugins* button redirects in-app to the Community plugins tab:

The git panel — switch branch across repos (local / origin / upstream), and reinstall (fresh cleanup) from the same sources:

## Install
> Requires Node.js 22.19+ and pnpm (`dsh plugin` installs through pnpm under the hood).
```sh
# local checkout (development)
dsh plugin --profile web add /path/to/dsh-restart
# from GitHub
dsh plugin --profile web add github:dujar/dsh-restart
```
Then **restart `dsh web`** and refresh the browser page. The install adds `dsh-restart` to the profile's `dsh.profile.bundles` automatically; if it is not added, append `"dsh-restart"` to that array in `$DSH_HOME/profiles/web/package.json` and restart. A **Restart** section then appears at the bottom of the Settings sidebar.
## Usage
1. Open **Settings → Restart**.
2. **Restart now** restarts the dsh web process; the page reloads once the new instance answers.
3. Toggle any plugin to mount/unmount it — the profile manifest is updated immediately, and the change is applied after a restart. The **Restart to apply** chip and the notice bar's *Restart* button show you exactly what is pending.
4. **Browse more plugins** opens **Settings → Plugins → Community plugins**, where you can search and install from the community catalog (via dsh-community-plugins).
5. For local checkouts, **⎇ Switch branch** opens the git panel: pick a repo (Local / each remote) and a branch — the same branch name from a different repo retargets tracking (`git branch --set-upstream-to` / `--unset-upstream`) instead of being a no-op. The **Reinstall** row below it is a fresh cleanup from one of three sources (all two-step confirmed): *Local* discards every local change and untracked file (`git reset --hard` + `git clean -fdx`), a remote fetches and hard-resets the checkout to that remote's default branch, and *Plugin (npm)* reinstalls the latest release from the registry (`dsh plugin add