Skip to content
dsh.fish
Bundle

dsh-local-plugin-installer

Install and build local DeepSeek Harness plugins from the Web settings Plugins section.

Source
JMweitao
stars
1 stars
License
MIT
Updated
Updated 5 days ago

Readme

# dsh-local-plugin-installer

[中文](#中文) · [English](#english)

---

## 中文

一个 DeepSeek Harness(DSH)Web 插件,为本地及 Git DSH 插件开发提供 **设置 → 插件 → 安装插件** 页面。

> 版本:`0.2.0`

### 功能

- 在 Web 设置页面中选择本地 DSH 插件目录,或粘贴 Git/GitHub 地址。
- 将本地目录或 Git 源安装到当前 `web` profile。
- 修改本地插件源码后,直接在所选目录中执行 `pnpm build`。
- 在界面中显示执行的命令、工作目录、退出码、标准输出和标准错误。
- 安装时检查目标目录是否包含 `package.json` 与 `dsh.bundle.patch` 声明。

### 安装

#### 从本地源码安装

```sh
pnpm install
pnpm build
dsh plugin --profile web add .
```

安装完成后重启 DSH Web。

#### 从 GitHub 安装

```sh
dsh plugin --profile web add github:JMweitao/dsh-local-plugin-installer#v0.1.0
```

也可以使用 Git URL:

```sh
dsh plugin --profile web add git+https://github.com/JMweitao/dsh-local-plugin-installer.git#v0.1.0
```

> 如果终端找不到 `dsh` 命令,请用启动 DSH 时使用的命令/入口执行,或先全局安装对应的 DSH CLI。安装完成后需要重启 DSH Web。

### 使用方法

1. 打开 DSH Web。
2. 进入 **设置 → 插件 → 安装本地插件**。
3. 选择本地插件目录,或粘贴 Git 安装地址。
4. 本地插件还没有构建产物、或修改了源码时,点击 **pnpm build**。
5. 点击安装按钮,插件会执行:

```sh
dsh plugin --profile web add <本地目录或 Git 地址>
```

Git 地址支持:

```sh
github:JMweitao/dsh-local-plugin-installer#v0.1.0
git+https://github.com/JMweitao/dsh-local-plugin-installer.git#v0.1.0
https://github.com/JMweitao/dsh-local-plugin-installer
```

> Git 安装源会由包管理器下载,不能在本插件页面直接执行 `pnpm build`;`pnpm build` 只适用于本地目录。

6. 重启 DSH Web,使 Host 和 Client bundle 重新组合加载。

### 安全说明

本插件会从 Web UI 发起本地命令:

- `dsh plugin --profile web add <所选目录>`
- 在所选目录中执行 `pnpm build`

请只选择你信任的插件目录。`pnpm build` 会执行目标包在 `package.json` 中定义的构建脚本,该脚本可能在本机执行任意代码。

### 开发

```sh
pnpm install
pnpm run check
```

构建输出:

- `lib/index.mjs`:Host 入口
- `lib/client.cjs`:Web Client bundle

---

## English

A DeepSeek Harness (DSH) Web plugin that adds a **Settings → Plugins → Install plugin** tab for local and Git-based DSH plugin development.

> Version: `0.2.0`

### Features

- Pick a local DSH plugin directory or paste a Git/GitHub source from the Web settings page.
- Install a local directory or Git source into the current `web` profile.
- Run `pnpm build` inside a selected local plugin directory after source changes.
- Show the command, working directory, exit code, stdout, and stderr in the UI.
- Validate that install targets contain `package.json` and a `dsh.bundle.patch` declaration.

### Installation

#### From a local checkout

```sh
pnpm install
pnpm build
dsh plugin --profile web add .
```

Restart DSH Web after installation.

#### From GitHub

```sh
dsh plugin --profile web add github:JMweitao/dsh-local-plugin-installer#v0.1.0
```

Or use a Git URL:

```sh
dsh plugin --profile web add git+https://github.com/JMweitao/dsh-local-plugin-installer.git#v0.1.0
```

> If your terminal cannot find `dsh`, use the same DSH entry point used to start the application, or install the relevant DSH CLI globally. Restart DSH Web after installation.

### Usage

1. Open DSH Web.
2. Go to **Settings → Plugins → Install local plugin**.
3. Select a local plugin directory or paste a Git installation source.
4. Click **pnpm build** when a selected local plugin needs to be built or its source changed.
5. Click the install button to run:

```sh
dsh plugin --profile web add <local-directory-or-git-source>
```

Supported Git sources:

```sh
github:JMweitao/dsh-local-plugin-installer#v0.1.0
git+https://github.com/JMweitao/dsh-local-plugin-installer.git#v0.1.0
https://github.com/JMweitao/dsh-local-plugin-installer
```

> A Git source is downloaded by the package manager and cannot be built directly from this page; **pnpm build** applies only to local directories.

6. Restart DSH Web so Host and Client bundle composition reloads.

### Security notes

This plugin intentionally runs local commands from the Web UI:

- `dsh plugin --profile web add <selected-directory>`
- `pnpm build` inside the selected directory

Only use it with plugin directories you trust. A package's `pnpm build` script can execute arbitrary code on your machine.

### Development

```sh
pnpm install
pnpm run check
```

Build outputs:

- `lib/index.mjs` — Host entry
- `lib/client.cjs` — Web client bundle

---

## Plugin structure

```text
.
├─ cordis.patch.yml
├─ package.json
├─ src/
│  ├─ index.ts
│  └─ client.tsx
└─ lib/
   ├─ index.mjs
   └─ client.cjs
```

## License

MIT

Install

dsh plugin --profile web add github:JMweitao/dsh-local-plugin-installer

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source