# Install the DSH Hub plugin marketplace

DSH Hub is a DSH bundle. After installation, it adds a **DSH HUB Market** page beside **Plugins** in Settings.

## Pre-install review

- Package: https://dsh-hub.cc/downloads/dsh-hub-0.2.0.tgz
- Version: 0.2.0
- SHA-256: 85b0f04865a90ec464c669a073f211126c031df462ea457587dbd2cd6c60a2b1
- The package should contribute one Host marker plugin named `dsh-hub` and one Web Client settings page.
- The client reads `https://dsh-hub.cc/api/v1`. Your current DSH task still reviews and executes installation requests.
- The target directory is `$DSH_HOME/profiles/web`, normally `~/.dsh/profiles/web` when `DSH_HOME` is unset.

## Recommended procedure

1. Download the package into a new temporary directory.
2. Verify the SHA-256 above with `sha256sum` on Linux or `shasum -a 256` on macOS.
3. Unpack and review `package/package.json`, `package/cordis.patch.yml`, and every lifecycle script.
4. Resolve the target profile. If its `node_modules/.modules.yaml` exists, read `packageManager` and `storeDir`, then inspect the pnpm that DSH will actually invoke through these read-only DSH commands:

```sh
dsh plugin --profile web --version
dsh plugin --profile web store path
```

Do not run `pnpm install` or `pnpm add` directly in the profile. If the profile is outside the writable sandbox, request one host permission scoped to `dsh plugin --profile web` and the profile directory before the first DSH check instead of first attempting it with insufficient access.
5. If the `packageManager` major and store path match, or if `.modules.yaml` does not exist yet, select the normal install command:

```sh
dsh plugin --profile web add ./dsh-hub-0.2.0.tgz
```

6. If either the major version or store path differs, do not try the normal `add` first and do not pass `--force` to `add`; that still fails with `ERR_PNPM_UNEXPECTED_STORE`. Run this recovery sequence in order instead: the first command forwards `pnpm install --force` through DSH to recreate the incompatible modules directory, then the second installs DSH Hub.

```sh
dsh plugin --profile web install --force
dsh plugin --profile web add ./dsh-hub-0.2.0.tgz
```

7. Based on the preflight, run either the normal install command or the two-step recovery sequence above. Do not try both paths.
8. Restart `dsh --profile web`, then verify **Settings > DSH HUB Market**.

Use only `dsh plugin` to manage the profile; do not modify DeepSeek Harness source. Do not skip the checksum or manifest review. Stop and report the problem if the checksum is still a placeholder.
