Introduction

DeepSeek Harness (DSH) is currently in developer preview, and the Web UI does not directly display session context usage and token usage history by default. When debugging sessions, you often need to confirm how much of the current window is occupied by system, tools, and messages, how the KV-cache hit rate is, and which days over the past few weeks the token consumption was concentrated on.

dsh-scope is a plugin for the dsh Web UI that provides a Codex-style /context session context usage view, as well as a GitHub contribution graph-style rolling 53-week token usage heatmap. Below is an introduction to its core features, installation method, typical usage, and notes.

What is this

dsh-scope is maintained by helloxkk and is licensed under MIT; the package.json declares the client platform as web.

It mainly provides two interface capabilities:

  1. Display the current session’s context window usage in the dsh Web UI, and show the composition ratio of system / tools / messages, total sessions per bucket, and KV-cache hit rate.
  2. Provide a GitHub contribution graph-style rolling 53-week token usage heatmap in the sidebar footer; clicking on a date allows viewing the four buckets of tokens, cache hit rate, number of sessions, and model ranking.

The plugin reads data via the official token-meter session projections, using useProjection, without using RPC or a custom wire protocol. The host side provides a read-only, loopback-only aggregation endpoint /api/dsh-scope/days.

Core Features

Session Context View

dsh-scope provides a session context usage view in the dsh Web UI, where you can view:

  • The context window usage of the current session;
  • The composition ratio of system / tools / messages;
  • Total sessions per bucket;
  • KV-cache hit rate.

This data is read via the official token-meter session projections and retrieved using useProjection, without introducing custom RPC or wire protocols.

53-Week Token Usage Heatmap

The plugin provides a GitHub contribution graph-style rolling 53-week token usage heatmap in the sidebar footer.

After clicking on a date in the heatmap, you can see the following for that day:

  • Four buckets of tokens;
  • Cache hit rate;
  • Number of sessions;
  • Model ranking.

Local Aggregation and Theme Adaptation

The host side provides the /api/dsh-scope/days endpoint for reading data aggregated by day. This endpoint is read-only and only allows loopback callers and GET methods.

Aggregation supports incremental calculation. The state is cached in memory and persisted to:

~/.dsh/storages/dsh-scope-cache.json

The plugin uses dsh’s platform design variables to adapt to light/dark themes.

Installation and Enabling

First, confirm that dsh >= 0.1.0-rc.6 is already in your PATH on the local machine. Then install the plugin to the web profile, and start or restart dsh web to load the plugin:

dsh plugin --profile web add dsh-scope
dsh web

If installing from source code, first build, then install to the web profile:

git clone https://github.com/helloxkk/dsh-scope.git
cd dsh-scope
npm install && npm run build
node scripts/install.mjs web
dsh web

Where node scripts/install.mjs web is used to install the plugin into the web profile, and the final dsh web is used to restart dsh to load the plugin.

Typical Usage

After the installation steps above, you can see the following when opening the dsh Web UI:

  1. View window usage, system / tools / messages ratio, total sessions per bucket, and KV-cache hit rate in the session context.
  2. View the rolling 53-week token usage heatmap in the sidebar footer.
  3. Click on a date in the heatmap to view the four buckets of tokens, cache hit rate, number of sessions, and model ranking.

This data comes from dsh’s already calculated session projections and is aggregated and returned via the read-only endpoint provided by the plugin. The plugin does not read provider credentials and does not send data externally.

Uninstallation and Cleanup

Remove the plugin directory under the web profile:

rm -rf ~/.dsh/profiles/web/node_modules/dsh-scope

Then open ~/.dsh/profiles/web/cordis.patch.yml and delete the dsh-scope block within it.

If you also want to clear the aggregation cache, you can run:

rm -f ~/.dsh/storages/dsh-scope-cache.json

This file saves the aggregation state of dsh-scope; deleting it only affects the cache and the aggregation state will no longer be retained.

Suitable Scenarios and Notes

Suitable for developers or debugging scenarios where you want to view context usage, token history, model ranking, and KV-cache hit rate in the dsh Web UI. Notes to consider:

  • dsh-scope requires dsh >= 0.1.0-rc.6 to be in PATH.
  • DeepSeek Harness is in developer preview; there may be breaking changes in the future.
  • The plugin runs with the permissions of the current dsh process; you should check the source code and license before installing.
  • The license is MIT.
  • /api/dsh-scope/days only allows loopback callers and GET methods; it does not read provider credentials and does not send data externally.
  • The community directory is an independent site and has no official affiliation with DeepSeek / Huanfang; it should not be understood as an official app store.

Links

  • GitHub: https://github.com/helloxkk/dsh-scope
  • Directory Page (plugin link provided by): https://www.skillhub.cn/plugins/helloxkk/dsh-scope