Skip to content
dsh.fish
Bundle

dsh-doctor

DeepSeek Harness diagnostic plugin: home, leftover processes, ports, and oversized sessions as a paste-ready report.

Source
henrytian1998
License
MIT
Updated
Updated 2 hours ago

Readme

# dsh-doctor

English | [中文](README.zh.md)

DeepSeek Harness diagnostic plugin: collect home, leftover processes, ports, oversized sessions, and version problems into one paste-ready report. It does not replace Desktop / TUI.

This is a **bundle**, not a profile. Install it into an existing `web` / `tui` / custom profile. There is no doctor profile and no third chat UI.

## Install

You already have official Web:

```bash
dsh plugin --profile web add github:henrytian1998/dsh-doctor
dsh --profile web
```

Then run `/doctor` in the UI.

After npm publish the install command becomes `dsh plugin --profile web add dsh-doctor`.

Restart the profile after install. If `dump-config` has no doctor row, the manifest failed — do not debug check logic first.

## Verify the bundle landed

```bash
dsh --profile web --dump-config
```

The composed config must contain both:

- `id: doctor`
- `name: dsh-doctor`

Host log on boot must include `doctor loaded`.

## Isolated development home (do not touch `~/.dsh`)

Windows PowerShell:

```powershell
$env:DSH_HOME = "C:\work\dsh-doctor-home"
dsh plugin --profile web add .
dsh --profile web
dsh --profile web --dump-config
```

Then run `/doctor`. Reports are written to `$DSH_HOME/logs/doctor-<timestamp>.md` and `.json`.

## What v0.1 checks

| Check | Behavior |
| --- | --- |
| DSH_HOME / profile / bundles | Reads the current home, profile name, and `dsh.profile.bundles` |
| dsh / Node version | Node `^22.19 \|\| >=24`; best-effort dsh version from the CLI package |
| Ports | Default `3080` or argv `--port`; who is LISTENING; current process tree is not an error |
| Leftover node / dsh | Windows process tree; marks “possibly this profile”; never kills; ignores unrelated Node apps |
| Oversized sessions | `stat` on `$DSH_HOME/sessions/**/*.jsonl` and `*.jsonl.zstd`; reports path + bytes only |

Default session warning threshold: 50 MiB. v0.1 does not delete files and does not open the event stream.

## Report

`/doctor` echoes Markdown and saves:

- `$DSH_HOME/logs/doctor-<timestamp>.md`
- `$DSH_HOME/logs/doctor-<timestamp>.json` (`schema: dsh-doctor/v1`)

Paste the Markdown into GitHub Discussions. Conclusion is PASS / WARN / FAIL.

## Not in v0.1

- Desktop shell / Electron / Wails / Tauri
- A new TUI
- Settings card (v0.2)
- Auto-kill as the default
- Optional `bin` CLI for when Host cannot start (v0.2)
- Edits to official `packages/client/*`
- A second session history

## Sample report

A paste-ready example lives in [`docs/sample-report.md`](docs/sample-report.md). Real runs write `$DSH_HOME/logs/doctor-<timestamp>.md`.

## GitHub topics

Set repository topics to: `dsh-plugin`, `deepseek-harness`, `dsh`.

A topic without `dsh.bundle` is an empty shell. This package declares:

```json
"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
```

`package.json` `files` includes `cordis.patch.yml`. The patch references the package name `dsh-doctor`, not a relative source path.

## License

MIT

Install

dsh plugin --profile web add github:henrytian1998/dsh-doctor

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