π€ dsh-subagent-monitor
DeepSeek Harness (DSH) Web extension plugin Β· live subagent run monitor panel
[δΈζ](README.md) | **English**
---
## β¨ What is it
Adds a **Subagents** entry at the bottom of the DSH Web sidebar and a card-style panel pinned to the **top-right** corner of the screen, showing the live run status of every subagent spawned from the current session.
```
ββ β€’ Running subagents ββββββββββββββ [Collapse β΄] [β] β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β β π΅ Count TS files in ui dir [Open chat] β β
β β one-shot Β· 1a2b3c4d running Β· 00:42 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β β π’ Demo subagent: count file types [Open chat] β β
β β spawn Β· 2b3c4d5e done Β· 03:12 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β running 1 Β· done 1 Β· failed 0 [Clear done] β
β βββββββββββββββββββββββββββββββββββββββββββββββ β β drag to resize
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
> The `β€’` four-arrow grip left of the title moves the panel, the bottom `β` grip resizes it; both are remembered, double-click resets.

## π― Features
| Feature | Description |
| --- | --- |
| π’ Live status | running (π΅ blue pixel-chase animation, same as the DSH sidebar state dot + stopwatch), done (green dot + halo), failed, interrupted, token limit, rejected |
| π Card list | one rounded card per subagent; **Open chat** on the right, status and elapsed time on the second line |
| π² Tree indent | grandchild subagents are indented to the right |
| π One-click back | inside a subagent session, the panel shows a **β Main session** button |
| π Movable | drag the four-arrow grip left of the title to move the panel; position is remembered (shared across sessions), double-click resets |
| π Resizable | drag the bottom grip to resize the panel height; height is remembered per session, double-click resets |
| π Refresh-proof | persistent composition row: the panel auto-recovers after page refresh / service restart |
| π± Mobile-friendly | hidden by default at β€768px viewport; the sidebar entry still opens it manually |
## π¦ Installation
### Option A Β· npm (recommended, one line)
```bash
dsh plugin --profile add @leetoners/dsh-ui-subagent-monitor
```
> β
Published as `v0.2.0` (built and signed by GitHub Actions; SLSA provenance verifiable).
### Option B Β· Install from GitHub
```bash
dsh plugin --profile add github:Mombrane/dsh-subagent-monitor
# On first install, if prompted to allow build scripts, confirm in the profile's pnpm-workspace.yaml
```
Restart `dsh web` to take effect. This repository is both a **DSH client plugin** (`dsh.client`) and a **composition bundle** (`dsh.bundle` + `cordis.patch.yml`), shipped with a prebuilt `lib/`.
### Option C Β· Inline into the DSH source tree (for secondary development)
```bash
# 1. Copy this repo's src/ to /packages/client/ui-subagent-monitor/
# 2. Add the dependency to /packages/bundle/web-app/package.json
"@leetoners/dsh-ui-subagent-monitor": "workspace:*"
```
```yaml
# 3. /packages/bundle/web-app/cordis.patch.yml (after the ui-subagent row)
- id: ui-subagent-monitor
name: '@leetoners/dsh-ui-subagent-monitor'
```
```bash
# 4. Build + restart
pnpm install && pnpm --filter @leetoners/dsh-ui-subagent-monitor bundle
# restart dsh web
```
> Also add this package path to `references` in /tsconfig.client.json, and point this
> package's `tsdown.config.ts` at the monorepo preset (`import { clientBundle } from '../tsdown.client.ts'`).
## π·οΈ Status legend
| Status | Meaning |
| --- | --- |
| π΅ Running | in progress, blue pixel-chase animation (same as the DSH sidebar tab ongoing state) + live stopwatch |
| π’ Done | the panel witnessed a successful finish; shows elapsed time (green dot + halo) |
| βͺ Ended | backfilled history row: created before a service restart, outcome not observed (success/failure unknown) |
| π΄ Failed | ended in error (red dot + halo) |
| π Interrupted / token limit / rejected | aborted / hit the token cap / request rejected (amber dot + halo) |
## β FAQ
**Does the panel disappear on page refresh?** No. It is a persistent composition row; the panel auto-recovers on every page load.
**What is the difference between βDoneβ and βEndedβ?** π’ is an outcome the panel observed live; βͺ is history from before a service restart, outcome not observed.
**How much history does the panel keep?** At most 200 rows per root session; the oldest ended rows are evicted beyond that.
**Are the panel position and height remembered?** Yes, with two different policies: the **position is shared across sessions** (one spot for all of them), while the **height is remembered per session** (localStorage key carries the session id, so switching sessions never leaks the size); they survive page reload / browser restart. Double-click a grip to reset.
**Is it safe?** The polling route `/api/subagent-monitor/snapshot` binds to the loopback address with no auth; recommended for local / intranet use only.
## π Ecosystem
| Channel | Status |
| --- | --- |
| GitHub topics | `dsh-plugin`, `deepseek-harness` (auto-synced by Oh-My-DSH every 4 hours) |
| Oh-My-DSH catalog | PR [#8](https://github.com/like-study1/Oh-My-DSH/pull/8) pending maintainer merge |
| awesome-dsh-plugin | β
Listed (commit `c7ad36e9`, PR [#675](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/675) merged) |
## π Changelog
See [CHANGELOG.md](./CHANGELOG.md) for the full history. Current version **0.2.0** (aligned with `package.json`).
## π Architecture
Design decisions (why persistent, why a custom polling route, event attribution model) and data-flow details: [ARCHITECTURE.md](./ARCHITECTURE.md).
## π License
[MIT](./LICENSE) Β© Mombrane