DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-plugin-profiler

d

dsh-plugin-profiler

Manifest valid

Plugin load audit for your installed set. `/diet` prints one card: context tokens per request, hot-path host time outside the tool body, listener fan-out per plugin, and which three plugins to look at

hasBundlePatch

dsh-plugin-profiler

Your DSH did not get slower because of the model. It got slower because of what you installed.

/diet prints what your current plugin set costs while the session runs: how many tokens your tool definitions eat on every request, how much wall time sits outside the tool body on the hot path, how many listeners each plugin puts on that path, and which three plugins to look at first.

This is not another benchmark. dsh-benchup and dsh-eval answer "is DSH good?" with black-box totals over a task. This answers "what is my install costing me right now?" using data from the live event bus and the live tool registry, with no changes to any other plugin.

AnswersWhat it needs from you
dsh-benchupIs this model or config good overall?a benchmark task to run
dsh-evalDoes it choose the right tool?a task suite
this pluginWhat is my installed plugin set costing me right now?the session you are already in

Install

dsh plugin add dsh-plugin-profiler

The bundle declares its own patch (cordis.patch.yml), so the command is the only install step. /diet works immediately in the running session.

What it reports

SectionSourceMeaning
Context taxctx.tools.schemas()Estimated tokens for every tool definition sent on each request, plus the heaviest tools
Hot pathprepended agent/pre-step, agent/request, llm/stream setup, tools/pre-execute listenersWall time of the remaining chain, builtins included, provider and tool body excluded
Tool callstools/pre-execute → tools/resultWall time per call, keyed by callId; includes approval and post-tool work, not only the tool body
Listener fan-outlive ctx.events._hooks snapshotWhich plugin registered how many listeners, and how many sit on hot events
Event volumeinternal/dispatchHow often each event actually fires

Sample output

From a synthetic two-plugin run against the real rc.7 runtime (not fabricated numbers):

DSH plugin tax · 0s observed
  context   4 tools ≈ 210 tokens per request
  hot path  1 call, 37.3ms of host work (provider and tool body excluded)
  listeners 2 plugins · 4 on hot events
  cut first plugin-b (3 hot listeners), plugin-a (1 hot listener)
  fan-out is a suspicion, not a measurement: rc.7 cannot time another plugin's callback

Hot chains (wall time of every listener after this one, builtins included)
event                 calls  total     avg       max
agent/pre-step        1      37.3ms    37.3ms    37.3ms
  before each step

Context tax, per tool definition
4 tools ≈ 210 tokens; heaviest: bash ≈ 68, read_file ≈ 54, apply_patch ≈ 45
  Owner is not exposed by rc.7, so this is per tool, not per plugin.

Listeners per plugin (snapshot)
plugin-b              agent/pre-step ×1, llm/stream ×1, tools/result ×1
plugin-a              agent/pre-step ×1

Event volume (top dispatches, all modes)
agent/pre-step ×1 · tools/result ×1

What this cannot measure

Read this before installing. It is the reason the card says "fan-out is a suspicion":

  • No per-plugin milliseconds. rc.7 gives internal/listener only a veto over registration (vendor/cordis/src/events.ts, on() returns a non-null value as the disposer instead of registering), and it has no post-dispatch event. A plugin therefore cannot wrap another plugin's callback. Any tool claiming "plugin A's pre-execute took N ms" on rc.7 is not measuring what it says.
  • No tool owner. tools.register() stores the definition but not the registering fiber, so the context tax is priced per tool, not per plugin.
  • Two scopes are intentionally excluded from the tax line. llm/stream is timed only up to interception, not stream consumption, and the provider call dominates it. rc.7 dispatches that event synchronously and iterates the handler's return value, so the listener must stay synchronous; an async wrapper would return a Promise and break every model call. Tool body time is measured separately under "Tool calls", which also contains approval and post-tool work.

If a host seam lands later (a post-registration or post-dispatch hook, plus an owner field on tool records), this plugin can add real per-plugin attribution without changing its report format.

Robustness

Written so it can never be the reason your host breaks:

  • Every listener body is contained: a bookkeeping failure is dropped, never thrown into the chain the host is running.
  • A dispatch with no next callback (a plain emit of a waterfall event name) passes through untouched instead of being called as a function.
  • No commands service, or a /diet name already taken by another copy, costs the command only — counters keep running, /profiler is still attempted, and the rest of the session is unaffected.
  • tools.schemas() throwing, circular parameter objects, or a proxy that refuses enumeration degrade that one section and leave the rest of the card intact.
  • Counters are bounded (200 in-flight calls with oldest-first eviction, 200 distinct events, 200 tools), so a very long session cannot grow them without limit. A call that started before /diet reset is discarded instead of being backfilled into the empty window.
  • Tables are padded by display width, so Chinese, Japanese or emoji plugin names line up like ASCII ones.

Usage

Add the package to your DSH plugin list like any other plugin, then:

  • /diet — print the tax card and the detail sections
  • /diet reset — clear counters and keep the live listener inventory
  • /profiler — alias of /diet

No config keys. No network calls. No file writes. If the commands service is absent, counters still collect silently and nothing is shown.

Limitations

  • Chain timing includes builtins and any other listener in the remaining chain; it is the cost of the path, not one plugin.
  • The listener snapshot is live: plugins loaded after /diet are visible on the next call, plugins already unloaded are gone.
  • Token estimates use ~4 characters per token; treat them as relative weights, not billing.
  • commands.register is called once at load; a hot-reloaded commands service is not re-bound.

Compatibility

DeepSeek Harness 0.1.0-rc.7 (@deepseek-ai/cordis 4.x event bus). Node ^22.19.0 || >=24.0.0.

Tests

npm test

Thirteen tests run against a real cordis runtime, loaded from CORDIS_PATH when set, otherwise from the @deepseek-ai/cordis dev dependency, so a clean clone can verify itself after npm install. They cover silent degradation, chain timing with two plugins, tool call timing, tool-definition pricing, reset (including an in-flight call started before it), missing commands service, duplicate command name, dispatch without next, unserializable tool parameters, a throwing tools service, the synchronous llm/stream return value, and listener removal on unload.

License

MIT

Comments

Loading…

Similar plugins

dsh-my-plugins

by 7gzgn

See what you actually installed: a chip shows how many plugins your profile really loads, and a searchable panel lists every one with its version, its author-written one-liner, and whether it is built

UI & ExperienceManifest valid

★ 0

JavaScript

Nov 5, 2026

dsh plugin --profile web add dsh-my-plugins

by 121212165

dsh plugin: live usage meter — per-session token/turns/cost tracking injected into the system prompt, /qm panel, quota_meter card tool; also the family's universal plugin-development test template

Tools & CapabilitiesManifest valid

★ 0

MIT

TypeScript

Oct 7, 2026

dsh plugin --profile web add dsh-plugin-quota

by JularDepick

A plugin for dsh: monitor the resource utilization of dsh system processes and report the results to the user in the form of charts.

Tools & CapabilitiesManifest valid

★ 0

Apache-2.0

TypeScript

Sep 26, 2026

dsh plugin --profile web add dsh-system-monitor-plugin

by EIGHTfs

Plugin development toolset: mark files read by shell commands, sync code into a profile, mock a plugin backend, preview a plugin frontend, verify plugin loading, spin up an isolated test instance, run

Development & InfrastructureManifest valid

★ 0

JavaScript

Oct 28, 2026

dsh plugin --profile web add dsh-useful-tools

Plugin insight center: one answer to "哪些值得装" — plugin_guide matches needs to plugins, recipe installs whole environments, plugin_rank scores health (0-100), plugin_audit static-scans a local checkout

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

dsh plugin --profile web add dsh-insight

by oxlyn

Card-style plugin manager in Settings: enable/disable each plugin through the profile patch layer, install-source details, npm update check with one-click update, uninstall, search, and load-error bad

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 3

↓ 716/wk

MIT

TypeScript

Nov 8, 2026

dsh plugin --profile web add dsh-plugin-mgr