dsh-scope
Manifest valid★ 4Context visibility + GitHub-style usage heatmap for DeepSeek Harness (dsh) — Codex-style /context lens + 53-week contribution graph
dsh-scope
English · 简体中文
Context visibility for DeepSeek Harness (dsh) — a Codex-style /context lens for every session, plus a GitHub-style usage heatmap for your whole history.
Two UI contributions, one plugin:
- Context Lens (session header) — live context-window occupancy with a segmented system / tools / messages composition bar, per-bucket session totals, and KV-cache hit rate. All data flows through the official
token-metersession projections viauseProjection— no RPC, no custom wire protocol. - Usage Heatmap (sidebar footer) — a GitHub-contribution-graph-style rolling 53-week token-usage grid. Click any day for the four token buckets, cache hit rate, session count, and per-model ranking. Fed by this plugin's own loopback-only aggregation endpoint.
Screenshots

Why
DeepSeek Harness treats wording and context as first-class engineering concerns, yet the stock Web UI shows no context occupancy and no usage history. dsh-scope fills both gaps the harness-native way: reading the projections the platform already computes, styling with the platform's design tokens (--dsw-alias-*), and mounting through the platform's slot registry — light/dark themes both correct with zero media queries.
Install
Requires dsh ≥ 0.1.0-rc.6 on your PATH.
dsh plugin --profile web add dsh-scope
dsh web # restart dsh to load the plugin
Install from source
git clone https://github.com/helloxkk/dsh-scope.git
cd dsh-scope
npm install && npm run build
node scripts/install.mjs web # or: node scripts/install.mjs <profile>
dsh web # restart dsh to load the plugin
The installer copies lib/, cordis.patch.yml, and package.json into the profile's node_modules and appends the bundle insert to the profile's cordis.patch.yml (idempotent — safe to re-run after every rebuild).
Uninstall
rm -rf ~/.dsh/profiles/web/node_modules/dsh-scope
# then remove the "# dsh-scope" block from ~/.dsh/profiles/web/cordis.patch.yml
rm -f ~/.dsh/storages/dsh-scope-cache.json # optional: drop the fold cache
How it works
Client half (lib/client.js, loaded via the package's dsh.client declaration):
conversation.session.header.actions(order 30, after the job list) renders the lens trigger: an occupancy ring with the live percentage. The popover reads three official projections —tokenUsage(four buckets accumulated over the whole durable log),contextPressure(input-side window pressure + the route's context window), andcontextBreakdown(heuristic system/tools/message composition of the next request).sidebar.footer.actionrenders the heatmap trigger (label when the sidebar is wide, icon on the rail). The popover fetchesGET /api/dsh-scope/dayssame-origin.
Host half (lib/index.js): one read-only, loopback-fenced endpoint (/api/dsh-scope/days). Aggregation is incremental: per-session fold state is cached in memory and persisted to ~/.dsh/storages/dsh-scope-cache.json; each request folds only events added since the last fold. Live sessions fold their in-memory tail; persisted sessions use the storage backend's opaque revision and readFrom(id, fromSeq), with contiguity checks and a full refold on log rewrites. Steady-state cost stays O(new events) no matter how large the logs grow.
Fold semantics mirror dsh-token-meter's tokenUsage projection: a usage sample rides an assistant/chunk (data.chunk.type === "usage") or assistant/message (data.usage); a repeated sample for the same (turn, step) replaces the earlier value instead of double counting, re-attributed to the later event's day and model. Model attribution follows assistant/message's data.message.source, falling back to the last request/header config.
Nothing is sent anywhere: the endpoint refuses non-loopback callers and non-GET methods before any work, and no provider credentials are read.
Development
npm run build # tsdown: host ESM + browser ModuleLoader bundle
node scripts/fixture-session.mjs # optional: write a demo session log with usage events
node scripts/install.mjs web && dsh web
Compatibility
Built and verified against dsh 0.1.0-rc.6 (@deepseek-ai/dsh-base / dsh-web-app bundles). The harness is in developer preview and iterates quickly — expect compatibility-breaking changes.
License
MIT
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.2.0 | — | — |
| 0.3.0 | — | — |
Comments
Loading…
Similar plugins
by yokesky
DeepSeek Harness (DSH) 用量统计面板 — usage statistics dashboard: GitHub-style heatmap, daily token trend, model usage donut.
★ 3
↓ 118/wk
MIT
TypeScript
Aug 15, 2026
dsh plugin --profile web add @yokesky/dsh-usage-lensby Make0209
DeepSeek Harness 插件:GitHub 风格用量热力图 + Token / 缓存命中 / 账户余额看板 + 工作区别名管理。
★ 31
↓ 191/wk
MIT
JavaScript
Aug 14, 2026
dsh plugin --profile web add dsh-usage-statsby skkjkk
DSH (DeepSeek Harness) usage statistics dashboard plugin: token / cost / duration / session aggregation with trend, heatmap and calendar views.
★ 3
↓ 179/wk
Apache-2.0
JavaScript
Oct 23, 2026
dsh plugin --profile web add @skkjkk/dsh-usage-dashboardby 2327644800
Personal usage analytics & activity dashboard for the DeepSeek Harness (dsh) web GUI: token totals, session activity, GitHub-style contribution heatmap, model / reasoning-effort / tool / skill / plugin rankings, streaks and insights. Aggregates real session events through ctx.sessionPersistence; no dsh core changes, no prompt content leaves the machine.
★ 0
Apache-2.0
JavaScript
Aug 26, 2026
dsh plugin --profile web add dsh-usage-analyticsby skystart233-code
🫡 把 DSH 挤成 Codex 的形状:设置页里的用量看板——Token 热力图、常用工具、技能与近 30 天明细,数据来自本机会话日志。
★ 0
MIT
JavaScript
Oct 20, 2026
dsh plugin --profile web add dsh-codex-usage-boardby menglian001
Per-request token ledger for DSH with four-bucket accounting, a 53-week heat map and a live concurrency gauge, plus an on-disk JSONL ledger that outlives the 600-row session projection window and is s
★ 1
MIT
JavaScript
Oct 24, 2026
dsh plugin --profile web add dsh-token-usage