πŸ€– dsh-subagent-monitor

DeepSeek Harness (DSH) Web extension plugin Β· live subagent run monitor panel
license platform dsh

[δΈ­ζ–‡](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. ![Subagent monitor panel (running + done statuses)](docs/screenshot.png) ## 🎯 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