DeepSHPlugins
dsh-usage-monitor 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-usage-monitor

安全與運維TypeScriptMIT

設定頁用量儀表盤:從會話日誌彙總 token、請求、輸出 token 與快取命中率,含堆疊圖,並按供應商、模型或工作區分組列表。

4 StarsNOirBRight 更新時間 2026-09-03
訪問 GitHub 倉庫
dsh-usage-monitor 專案預覽

專案介紹

中文

設定頁用量儀表盤:從會話日誌彙總 token、請求、輸出 token 與快取命中率,含堆疊圖,並按供應商、模型或工作區分組列表。

English

Settings usage dashboard: tokens, requests, output tokens, and cache-hit rate from session logs, with a stacked chart and a breakdown table by provider, model, or workspace.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
NOirBRight
倉庫
NOirBRight/dsh-usage-monitor
GitHub Stars
4
Forks
0
開發語言
TypeScript
許可證
MIT
最近推送
2026-09-03
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

57/ 100
維護活躍
95
文件與實用資訊
74
生態關注度
20
安裝便捷訊號
75
專案宣告訊號
100

近 8 天仍在更新;關注度尚低(4)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:NOirBRight/dsh-usage-monitor

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-usage-monitor

English | 中文

Usage dashboard for DeepSeek Harness. It folds provider-reported token usage out of session logs and charts it in Settings.

Settings → Usage: tiles, stacked chart, and provider cards

What it shows

  • Tokens, requests, output tokens, and cache-hit rate
  • Stacked chart with Metric (token / request), By (provider / model / workspace), Group (day / week)
  • Week, month, and custom ranges
  • A responsive overview with a full-width token summary, compact secondary metrics, a stacked chart, and token-share cards that follow the current By grouping
  • On narrow screens, the cards collapse to one column and the chart legend scrolls horizontally

Subscription quotas are not fetched.

Installation

DeepSeek Harness 0.1.0-rc.6 or later is required. Install directly from GitHub:

dsh plugin --profile web add github:NOirBRight/dsh-usage-monitor#v0.2.9
dsh web

The repository tracks release-ready lib artifacts, so GitHub installation needs no build-script allowlist. A source checkout can use a link installation after running pnpm run build.

Then open Settings → Usage.

Data

Reads ctx.sessionQuery (live + persisted sessions). Does not scan session.jsonl.zstd itself and does not read leftover community cache files.

Release

pnpm run check runs the full gate in order: unit tests, TypeScript typecheck, deterministic build-parity (clean temp build vs tracked lib/), package build, and a real npm pack + immutable fixture validation + offline install + Host/client import smoke. The pack check reads only the repository-owned alpha.1 manifest/tarballs, verifies official tag/commit and registry integrity, preserves versioned parent edges including duplicate versions, and uses a fresh pnpm consumer with an invalid registry, offline/no-scripts/no-audit/no-fund settings, empty NODE_PATH, and scoped local-tarball overrides; it uses neither --legacy-peer-deps nor omit/force bypasses. The owner archive is written only below the prefixed temporary directory; repository .tgz files are limited to the 86 alpha.1 fixtures. It does not rewrite lib/ before comparison, so a stale, missing or hand-edited artifact fails.

For a tag, run pnpm run check:strict (the same test, typecheck, parity, build, and pack order with PARITY_CHECK_HEAD=1; it fails if the committed lib/ still differs from the source — the v0.2.5 drift guard). Keep src as the source of truth and commit the rebuilt lib/.

The Settings → Usage nav icon is a DOM patch via ctx.effect + MutationObserver on document.body; see src/client/nav-icon.ts for the ctx.effect disposer and the accepted alpha.1 DOM risk.

Release installation (Latest)

Session-log usage dashboard with responsive metric cards, charting, and provider shares. The release artifact targets DeepSeek Harness 0.1.2-alpha.1 and contains built Host/Client files only; it has no sibling-repository source, workstation path, link:, or workspace: dependency.

Latest installation (the URL never contains a version):

dsh plugin --profile web add --force \
  https://github.com/NOirBRight/dsh-usage-monitor/releases/latest/download/dsh-usage-monitor.tgz

Fixed-version installation:

dsh plugin --profile web add --force \
  https://github.com/NOirBRight/dsh-usage-monitor/releases/download/v0.2.9/dsh-usage-monitor.tgz

Update, uninstall, and verify:

# Update to the latest Release
dsh plugin --profile web add --force \
  https://github.com/NOirBRight/dsh-usage-monitor/releases/latest/download/dsh-usage-monitor.tgz
# Verify the loaded version
dsh plugin --profile web list
dsh plugin --profile web doctor
# Uninstall only this plugin
dsh plugin --profile web remove dsh-usage-monitor

Configuration: use the plugin section in Settings for Web UI plugins, or the profile dsh.profile.bundles entry for Host-only plugins. Start with this README's minimal YAML/JSON example and provide credentials/backend addresses explicitly.

Rollback: rerun the fixed v0.2.9 command, verify the profile list, then restart the Web service once. Inspect journalctl --user -u dsh-web.service and dsh plugin --profile web doctor; never put a source checkout in the production profile.

Release and integrity: v0.2.9 · SHA256SUMS.

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案