DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-performance-optimizer

W

dsh-performance-optimizer

Manifest valid

DSH bundle that exposes host-wide performance metrics (CPU / memory / IO) via a Settings tab, an optional HUD, and a native agent tool.

UI (client)hasBundlePatch

dsh-performance-optimizer

DSH bundle that exposes host-wide and per-event-loop performance metrics so the user (via a Settings tab) and the agent (via a native tool and a stdio MCP server) can reason about scroll lag, memory drift, and tool loops.

The bundle is intentionally minimal — it samples Node process.memoryUsage() / process.cpuUsage() once per second, keeps a 60-sample rolling buffer, and exposes it through three surfaces:

surfaceconsumermechanism
Settings → Plugins tabuserclient.js mounts <perf-settings-tab> into the per-plugin detail page; live table + Canvas2D chart with CPU / RSS / Heap / Wall tabs.
Floating HUDuser (opt-in)client.js mounts <perf-hud> into the document body when hudVisible: true.
Native toolagent (in-session)ctx.tools.register('performance_report') returns a fresh JSON report on demand.

Files

filerole
index.jsHost half. Owns the sampler, the performanceOptimizer Cordis service, and the performance_report tool.
client.jsWeb GUI half. Two custom elements (<perf-settings-tab>, <perf-hud>); routes by ctx.slot. Calls back into the Host via the runtime bridge.
cordis.patch.ymlLoader patch: one insert — the bundle itself.
locale/en.jsonEnglish copy.
locale/zh.json简体/中文 copy.
icon.svgBundle icon.

Install

# from a clone
npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-performance-optimizer

# from a tarball
npx @deepseek-ai/dsh plugin --profile web add ./dsh-performance-optimizer-0.1.0.tgz

# from npm (once published)
npx @deepseek-ai/dsh plugin --profile web add @local/dsh-performance-optimizer

Restart the Web profile and open http://127.0.0.1:3080/settings/plugins.

npx @deepseek-ai/dsh web

To remove:

npx @deepseek-ai/dsh plugin --profile web remove @local/dsh-performance-optimizer

What it measures

sample fieldsourcewhat it answers
t / tHrDate.now() + process.hrtime.bigint()When was this sample taken (clock / monotonic, never trust the wall for ordering).
rssprocess.memoryUsage().rssHas the Host process grown? Did release/manual GC help?
heapUsedprocess.memoryUsage().heapUsedV8 heap pressure (RSS includes native).
heapTotalprocess.memoryUsage().heapTotalDid V8 grow the heap (hint of churn).
externalprocess.memoryUsage().externalNative buffers / modules.
cpuMsprocess.cpuUsage()Cumulative user/system CPU time (ms).
cpuDeltaMsdelta against previous sampleCPU burn between two ticks; correlates with sampler tick & loop work.
wallDeltaMsnow - lastCpu.takenAtSampler timer drift — catches stalled timers caused by event-loop saturation.
uptimeMsprocess.uptime() * 1000Host uptime.

History is the last historySize samples (default 60). Sampling interval is sampleIntervalMs (default 1000 ms). When MCP is enabled, the most recent report is also written to a JSON file under the bundle's plugin directory every tick so the stdio MCP server can read it without holding a reference into the Host process.

How it talks to DSH

The Host half uses only Cordis accessors declared in inject:

  • tools — registers performance_report. Every MCP tool call routed through DSH eventually surfaces through tools.register, so this is the canonical agent interface regardless of whether @deepseek-ai/dsh-mcp-client is also mounted.
  • pluginContext — composition helper; lets the patch layer attach additional reads.

The Client half is mounted once per dsh.client.inject target. The package.json lists three:

  • @deepseek-ai/dsh-client-ui-settings-plugins — registers the per-plugin detail tab. This is the canonical user surface.
  • @deepseek-ai/dsh-client-shell — registers the HUD.
  • @deepseek-ai/dsh-client-ui-conversation — reserved for a future chip; currently no-op.

It looks up the runtime bridge via window.__DSH_HOST__ / window.__DSH__ / window.deepseek.host (whichever is present) and calls plugin:performance-optimizer.snapshot | .history | .config | .sample | .reset. If the bridge is missing, the tab renders an empty state and the HUD shows — — neither blocks the rest of the UI.

Tool surface (native)

{
  "name": "performance_report",
  "arguments": {},
  "result": {
    "kind": "json",
    "value": {
      "intervalMs": 1000,
      "sampleCount": 42,
      "latest": { "t": "2026-10-20T11:39:42.000Z", "rss": 314572800, "heapUsed": 134217728, "cpuMs": { "user": 1234.5, "system": 67.8 }, "...": "..." },
      "history": [ /* last 10 samples */ ],
      "generatedAt": "2026-10-20T11:39:42.000Z"
    }
  }
}

Agent surface

The bundle exposes one native tool:

performance_report

It returns the same JSON-shaped report shown above. Every MCP tool call routed through DSH ultimately surfaces through ctx.tools.register, so this is the canonical agent interface — there is no separate MCP server in this bundle.

If you want external MCP clients (Claude Code, Codex, an inspector) to also pull snapshots, write a small sibling DSH plugin that mounts an MCP server and reads ctx.performanceOptimizer.buildReport() for each tool call. Keeping MCP server concerns out of this bundle avoids coupling to a specific @modelcontextprotocol/sdk version.

Config

sampleIntervalMs: 1000  # sampling cadence in milliseconds
historySize: 60         # rolling buffer length
hudVisible: false       # boot-time HUD visibility
settingsTab: true       # mount the Settings → Plugins detail tab

All keys are optional; defaults are baked into the bundle.

Failure / uninstall

When the bundle is disabled in the Plugins page, ctx.effect cleanups tear down:

  • the sampler timer on the Host,
  • the performance_report tool registration,
  • the HUD element,
  • the <perf-settings-tab> element.

No side effects on the Host process remain.

License

MIT — see LICENSE.

Comments

Loading…

Similar plugins

dsh-client-ui-sidebar-perfmon

Real-time host performance monitoring for the DeepSeek Harness right Sidebar: CPU / memory / swap gauges plus a sortable process table. · DSH 右侧栏实时性能监控

UI & ExperienceManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add @xmwengxing/dsh-client-ui-sidebar-perfmon

by 173787247

Windows host performance counters from WSL: CPU, memory, disk and top processes.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Sep 29, 2026

dsh plugin --profile web add dsh-wsl-perf

by CDeZT

Native DSH foundation bundle that registers a persistent default workspace, provides paged read-only inspection of plugins, skills, memory, sessions, storage, settings, credentials, and DSH_HOME files

Tools & CapabilitiesDevelopment & InfrastructureMemory & ContextManifest valid

★ 0

MIT

JavaScript

Sep 2, 2026

dsh plugin --profile web add better-basicfun

by naitoupi

DeepSeek Harness (DSH) plugin: ? optimize the composer draft with the current model. Installable bundle (dsh.bundle + dsh.client); Settings tab: on/off switch, generation params, editable system promp

Development & InfrastructureTerminal & ClientsSessions & MessagesManifest valid

★ 0

MIT

JavaScript

Sep 21, 2026

dsh plugin --profile web add prompt-optimizer-plugin

Sidebar system monitor for the DSH Web UI: live host overview (CPU/memory/network/disk), process list, and Docker container status, all read-only.

UI & ExperienceManifest valid

★ 1

MIT

JavaScript

dsh plugin --profile web add dsh-side-monitor

by Psynosaur

Benchmark any model, whilst using DSH

Manifest valid

★ 0

MIT

JavaScript

Sep 13, 2026

dsh plugin --profile web add token-gobbler