DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Llm Stats — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

@aiwayds/dsh-llm-stats

Llm Stats

dsh plugin: persistent whole-machine LLM usage ledger with a markdown /llm-stats report (GFM tables + emoji: tokens, cache hit, model/tool time, per-day bars)

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add @aiwayds/dsh-llm-stats@0.6.0
READMECompatibilityVersions

Compatibility and provenance

Llm Stats is published as @aiwayds/dsh-llm-stats and currently resolves to version 0.6.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
npm
Registry updated
9/20/2026

Versions

0.6.0stable
9/11/2026
0.5.1stable
9/5/2026
0.5.0stable
9/3/2026
Show 5 more versionsCollapse versions
0.4.1stable
9/2/2026
0.4.0stable
9/1/2026
0.3.0stable
9/1/2026
0.2.0stable
9/1/2026
0.1.0stable
9/1/2026
Latest
0.6.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
226.4 kB
Files
33
Surface
any
License
MIT
Source
npm
Weekly downloads
248
Security scan
✓ v0.6.0 scan passed
View source ↗Project homepage ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

README

@aiwayds/dsh-llm-stats

English | 中文

Persistent LLM usage ledger for the DeepSeek Harness with a /llm-stats slash command that reports usage as a markdown report (GFM tables + emoji). The plugin folds every closed agent step into one durable record line — tokens (four provider buckets), model wall time, first-token latency, decode throughput, tool wall time — appended to a process-private shard under $DSH_HOME/llm-stats/. Every dsh process on the machine that mounts the plugin feeds the same machine-wide ledger, and /llm-stats renders it over rolling calendar-day windows on any surface:

Requires dsh >= 0.1.5-rc.2 — this plugin targets the dsh RC/stable line only (CI and releases resolve the newest of the latest/next dist-tags at runtime). The alpha line is no longer supported.

## 📊 LLM stats · last 30 days (Aug 3 – Sep 1)

| ⚡ Sessions | 💬 Turns | 📡 Requests | 👣 Steps |
| --- | --- | --- | --- |
| 132 | 196 | 2710 | 2742 |

| 📥 In | 🔥 Cache hit | 📤 Out | 🧮 Total |
| --- | --- | --- | --- |
| 141M | 93% | 2.5M | 144M |

⏱ Model 13h15m · 🔧 Tools 18h35m · 🚀 TTFT 4.5s · ⚡ 69.2 tok/s

## 🤖 By model

| Model | 📥 In | 📤 Out | 🔥 Cache | 📡 Req |
| --- | --- | --- | --- | --- |
| glm-5.3-flash | 46.8M | 930K | 90% | 1053 |
| deepseek-flash | 78.1M | 1.1M | 94% | 1304 |
| glm-5.3 | 14.6M | 369K | 93% | 301 |
| MiniMax-M3 | 186K | 15.3K | 45% | 7 |
| kimi | 393K | 6.8K | 79% | 10 |
| minimax/minimax-m3:free | 1.2M | 14.2K | 96% | 35 |

## 📈 Activity

| 📅 Date | 📊 Tokens | 📈 |
| --- | --- | --- |
| Aug 28 | 168K | ▇ |
| Aug 31 | 4.6M | ▇▇▇▇▇▇▇▇▇▇▇▇▇▇ |
| Sep 1 | 8M | ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ |

dsh-tui-pi detects the table separators and renders the report through its markdown component as boxed tables; other surfaces (such as headless runs) show the raw markdown as-is.

Install

dsh plugin add @aiwayds/dsh-llm-stats

Then restart dsh. Install it into every profile whose usage you want counted (the ledger is machine-wide, but recording only happens where the plugin is mounted).

Uninstall

dsh plugin --profile <name> remove @aiwayds/dsh-llm-stats

The host reconciles the profile automatically (bundles entry spliced, patch layer dropped). The ledger at ~/.dsh/llm-stats/ (baseline.jsonl, records.*.jsonl shards, backfill files) stays — it is the usage history, and a reinstall continues it. Since 0.5.1 the plugin also sweeps orphaned compact.lock.stale-* takeover dirs and dead-pid .baseline.jsonl.tmp-* staging files at startup. Purge: back up, then rm -rf ~/.dsh/llm-stats.

Usage

CommandMeaning
/llm-statsHelp: usage, active config, ledger coverage
/llm-stats day|week|month|3m|6m|12mRolling calendar-day windows ending now
/llm-stats d|w|mShorthand for day / week / month
/llm-stats backfillImport past usage from the stored session logs

Ranges are rolling: week covers the last 7 local calendar days including today, so the rendered date range always matches what you would call "the last 7 days". Windows of 3 months and longer fold the per-day bars into Monday-aligned weeks.

Configuration

- id: dsh-llm-stats
  config:
    mode: on              # off stops recording; /llm-stats and cleanup keep working
    retentionDays: 365    # records older than this are dropped at compaction (min 7)

How it works

  • One record per step. The fold anchors on step/end (the step lifecycle authority: completed, failed, cancelled, and max-tokens steps all land exactly one) and mirrors the fold semantics of the upstream @deepseek-ai/dsh-session-stats projection that powers the web chat stats strip. Token fields are nullable — steps without provider-reported usage still count as steps and turns, just not as requests.
  • Sharded append-only ledger. Each dsh process appends to its own records.<boot-id>.jsonl shard and never rewrites a shared file while alive — concurrent TUI + headless + bot processes can never clobber each other. Dead shards are merged into baseline.jsonl under a lock during compaction, which is also where retentionDays drops expired records. Records are billing side facts, not session truth: writes are best-effort and a failed line is dropped, never surfaced into the session.
  • Overlap-safe aggregation. Aggregation dedupes on (sid, turn, step) last-wins, so replayed or (future) backfilled history cannot double count.
  • No content recorded. The ledger stores numbers, model ids, and session ids — never prompts, tool names, or results.

Backfill

The ledger starts when the plugin starts; everything before that is invisible until you run:

/llm-stats backfill

That scans $DSH_HOME/sessions/ (all projects), decodes each stored log (concatenated zstd frames — the production format, including packed-chunk rows), folds it with the same step semantics as live recording, and appends the records to the ledger. Respects retentionDays (sessions last written before the cutoff are skipped), skips fork/subagent seed history so parent work is never counted twice, marks processed sessions in a done-ledger so repeat runs are fast, and can be aborted mid-run and resumed.

Known limitations

  • A step whose process crashes before step/end is not recorded live; backfill recovers it from the session log on the next run.
  • Subagent child sessions are recorded live only when their events bubble to the host listener; any that slip through are picked up by backfill.

Development

npm install                          # devDependencies resolve the @deepseek-ai/* type closure
node scripts/link-dsh-closure.mjs    # re-point local @deepseek-ai/* at the global closure (rerun after every install)
npm run check                        # tsc --noEmit
npm test                             # build + node --test (fold / aggregate / render / store / plugin wiring)

@deepseek-ai/* packages are peer dependencies only (devDependencies carry them for local builds); bundling a second closure into a dsh profile breaks cordis service identity. When the repo is link-mounted into a live dsh profile, the link step above is what keeps the plugin resolving against the same closure the profile runs on — do not skip it.

License

MIT