DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-usage-replay

d

dsh-usage-replay

Identified

Cross-session per-model token usage replayed from the harness's own session logs, with a usage panel tab (requires dsh-better-sidebar) and a per-conversation model popover.

dsh-usage-replay

中文 | English

Cross-session per-model token usage for DeepSeek Harness: a usage panel tab, a per-conversation per-model popover, and two local read-only HTTP routes. Every number is replayed from the harness's own persisted session logs — nothing is accounted in a side channel, so uninstalling never loses data and history predating this plugin counts too.

Tokens only. No cost estimates, no price tables, no network calls.

Usage panel — curves Usage panel — bars

What you get

Usage panel tab (needs dsh-better-sidebar ≥ 0.28): register a 用量 / Usage tab in the right sidebar.

  • Models — per provider/model: sessions, requests, uncached input, output, cache read, cache write, total.
  • By day — last 30 days. Toggle stacked bars ⇄ per-model smooth curves; hover for an immediate tooltip (date · day total · per-model rows). The curve view y-scales to the largest single-model day so the highest line reaches the plot top. Log-scale toggle for long-tail data (a single huge day otherwise flattens everything else). Bars stack by real token share.
  • Workspaces — usage ranked by session cwd, with each workspace's model mix.

Composer-dock pill — a neutral 分模型 / Per-model chip next to the native activity/usage pills; click to open this conversation's per-model table (model / requests / input / output / cache read / cache write / total). No duplicated totals in the dock row.

Optional: session-scoped changed files

The native changed-files card summarizes each turn from git working-tree snapshots, so in a workspace shared by several sessions (or edited by a running watcher) it can list files this conversation never touched. Enabling sessionScopedEdits: true narrows that card to the files this conversation's file tools actually touched in the turn:

  • Tracks fs/write-intent / fs/edit-intent per session and turn (the same events the recorder itself uses) and filters the workspaceChanges service summary in place, remapping per-file diff indexes so the card UI keeps working unchanged. Reversible on unload; turns the plugin did not observe fall back to the native summary.
  • Subagent file-tool edits count for the parent conversation's turn.
  • Trade-off: files changed only through shell commands are not attributed and stay hidden while this option is on.

Off by default (it changes another plugin's observable behavior). Enable it in the plugin row config:

- id: usage-replay
  config:
    sessionScopedEdits: true

How it measures

  • Walks $DSH_HOME/sessions (default ~/.dsh/sessions) for session[.vN].jsonl[.zstd] artifacts, decodes the multi-frame Zstandard container frame by frame (torn tail tolerated), and folds assistant/message usage events into the provider/model of the most recent request/header envelope.
  • Applies to the whole session log (not the visible/compacted window), so pruned or compacted turns still count.
  • Results cached per file by size + mtime; unchanged files are never re-read.
  • Retries/attempts count where the provider reported usage — the same billing-shaped semantics as the official token meter.

Privacy

  • Reads local session logs only. No network requests, no telemetry, no uploads.
  • Routes: GET /usage-replay/api/summary, GET /usage-replay/api/session?sessionId=… — loopback/trusted-host admission through the host's Connection service, same fence as every other plugin route. Nothing sensitive is returned beyond per-model token numbers.
  • The plugin adds no model-visible prompt, tool, or schema.

Install

Requires DeepSeek Harness 0.2.1+ (uses the 0.2.1 Connection service).

# from the community market (dsh-market) or npm
dsh plugin --profile <profile> add dsh-usage-replay

# or straight from this repo
dsh plugin --profile <profile> add https://github.com/Eclipse-NotFound/dsh-usage-replay

Desktop app profiles are managed by the app: install from its Plugins page with the package path/spec instead of the CLI. A new host half needs an app restart; client-only updates apply after a hard refresh.

dsh-better-sidebar is an optional peer: without it the sidebar tab is not registered and the composer-dock pill still works.

Develop

No dependencies, no build step. Node 22.19+ / 24 (host runtime) is enough.

node test/offline-check.mjs   # self-contained: synthetic multi-frame zstd logs + route checks

License

MIT

Comments

Loading…

Similar plugins

dsh-session-usage-plugin

by ewoowe

Session usage view: tokens, wall time and cache share per model and per turn, as a conversation view.

Manifest valid

★ 0

MIT

TypeScript

Sep 17, 2026

dsh plugin --profile web add dsh-session-usage

Cross-session reference (mention) plugin — paste @[label](dsh-session:…) into any session, including one in another workspace, and the host injects the referenced session snapshot for the model to rea

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-session-ref

by Marquez807

Cross-session experience memory for DSH: a lesson reaches the model only with a verifiable source, the relevant ones are injected each turn, and what nobody uses is retired.

Tools & CapabilitiesMemory & ContextManifest valid

★ 1

↓ 60/wk

MIT

TypeScript

Sep 22, 2026

dsh plugin --profile web add dsh-experience-memory

by Ansonfishing

Per-model capability profiling for DSH: turns local session history into per-model dashboards of session counts, tool usage, error rates, and top error signatures, with time-range filters and multi-mo

Tools & CapabilitiesTerminal & ClientsModels & ProvidersManifest valid

★ 2

MIT

JavaScript

Aug 29, 2026

dsh plugin --profile web add dsh-cap-profile

Cross-session memory for DeepSeek Harness: list earlier sessions and load one on demand, so a new session can see what was already done without polluting the current context.

Tools & CapabilitiesMemory & ContextManifest valid

★ 0

dsh plugin --profile web add dsh-recall

Persistent provider-reported token usage totals with per-session, per-model, and daily activity statistics.

Tools & CapabilitiesModels & ProvidersManifest valid

★ 0

↓ 279/wk

dsh plugin --profile web add dsh-token-usage-counter