dsh-monitor
Verified@tom2012/dsh-monitor Β· v1.0.1 Β· MIT Β· Web UI
DeepSeek Harness plugin: local and remote server CPU/memory/disk readout under the composer, with a Monitor tab in Settings
Install
dsh plugin add @tom2012/dsh-monitor Confirm the layer applied with dsh --profile default --dump-config β see the install guide.
Source
Tags
Creators
Readme
dsh-monitor
A DeepSeek Harness (DSH) plugin that shows CPU / memory / disk usage of this machine and any number of remote Linux servers, live, right below the chat composer.
What it does
Renders a single compact entry under the composer (input box) showing the currently selected host:
Local βΎ CPU 12.3% Mem 45.6% Disk 70.5%
Clicking the entry opens a popover that lists every host β the machine running DSH ("local") plus all configured servers β with their live readings. Pick one to make it the displayed host; the choice is remembered across reloads.
- The local host is the machine running DSH.
- Values refresh every 2 seconds; remote readings are cached for 5 seconds.
- Follows the built-in composer statistics styling (same color as the token / cache-hit pills).
- Bilingual labels (
Local/ζ¬ζΊ,Mem/ε ε,Disk/η£η), localized through the DSH locale service.
Install
Install the bundle into a profile:
dsh plugin --profile <profile-name> add @tom2012/dsh-monitor
Or, during local development, link the source directory directly:
dsh plugin --profile <profile-name> add /path/to/dsh-monitor
The plugin registers a conversation.composer.dock entry (order: 2, after the built-in activity and usage pills), so the local host appears with no further configuration.
Configure remote servers
Remote servers are managed from the settings window β no file editing needed:
- Open Settings (βοΈ).
- Pick the Monitor tab in the left-hand nav.
- Add, edit, or remove servers, then Save.
Each server has these fields:
| Field | Required | Default | Notes |
|---|---|---|---|
id |
β | β | Short unique name, e.g. node01 |
label |
β | falls back to id |
Display name |
host |
β | β | IP or hostname, e.g. 192.168.1.10 |
port |
β | 22 |
SSH port |
user |
β | root |
SSH login user |
keyPath |
β | "" |
Explicit private key path; empty uses the default ssh key |
Changes take effect immediately (no restart). The same servers array can also be set declaratively in the profile's cordis.patch.yml (that patch layer survives bundle upgrades):
- id: dsh-monitor
name: "@tom2012/dsh-monitor"
config:
servers:
- id: node01
label: node01 # optional; falls back to id
host: 192.168.51.110
port: 22 # optional; default 22
user: root # optional; default root
keyPath: "" # optional; use an explicit private key, else the default ssh key
- Remote collection uses SSH with key authentication (
BatchMode=yes); password prompts are intentionally unsupported. - The remote host must be Linux (reads
/proc/stat,/proc/meminfo, anddf). - A server that fails to connect shows a dash for its row without affecting the others.
How it works
@tom2012/dsh-monitor is a dual-face bundle plugin:
Host half (
index.js, Node.js) β samples localos.cpus(),os.totalmem()/freemem(), andstatfs('/'), and, for each configured server, runs a short SSH command that reports CPU / memory / disk. It serves everything as JSON through the Harness connection layer:ctx.connection.fetch.register({ path: '/api/dsh-monitor/metrics', methods: ['GET'], requestBody: 'buffered', fetch: async () => Response.json({ local, servers }), });Client half (
client.js, browser) β polls/api/dsh-monitor/metricswith a same-originfetchevery 2 seconds and renders the selected host's reading intoconversation.composer.dock, with a popover to switch hosts. It also registers asettings.sectionentry (iddsh-monitor, order 16) that renders the server editor as its own tab in the Settings window, reading and writing thedsh-monitornamespace through theconfigFormsservice (form.getSnapshot/form.subscribe/form.mutate).
No persistent data is collected; all metrics are read on demand.
Project layout
.
βββ index.js # Host half: local + SSH sampling, /api fetch route
βββ client.js # Client half: composer.dock UI + server settings page
βββ cordis.patch.yml # Loader insert for the bundle
βββ package.json # Bundle manifest (dsh.bundle.patch + dsh.client)
βββ locale/
β βββ en.json # English meta
β βββ zh.json # Chinese meta
βββ icon.svg # Plugin icon
Requirements
- DeepSeek Harness (DSH) with the
@deepseek-ai/dsh-client-connectionbundle (ships with the standard Desktop / Web profile). - An
sshclient onPATHfor remote-server monitoring.