Introduction¶
The philosophy of DSH is “everything is a plugin”. In the DeepSeek Harness Web profile, usage information is scattered across provider dispatch, retries, cached tokens, and session history; if you wish to view this after restarting and filter by provider, model, and time range, the following introduces a community repository: xie-tj/dsh-token-usage-ledger.
The community directory is an independent site with no official affiliation to DeepSeek / High-Flyer. This article does not describe it as an official app store.
What is it¶
xie-tj/dsh-token-usage-ledger provides a persistent usage ledger and a visualized Usage dashboard for the DeepSeek Harness Web profile. The repository owner is xie-tj; as there is no separate “maintainer” field documented, this article only refers to it by repository name and installation commands.
The license is MIT.
It solves the following issues:
- Records every provider dispatch, including failures and retries, and saves input, output, and cached tokens.
- Backfills data using session history.
- View usage by provider, model, and time range in Settings → Usage.
- Provides an independent persistent ledger: retains history after restart and performs best-effort backfill on existing sessions.
Core Features¶
The capabilities verified below are listed.
Recording and Backfilling¶
- Records every provider dispatch, including failures and retries.
- Saves input, output, and cached tokens.
- Backfills data using session history.
- Independent persistent ledger: retains history after restart and performs best-effort backfill on existing sessions.
Display and Filtering¶
- View usage in Settings → Usage.
- Supports filtering by provider, model, and recent 7 days / 30 days.
- Curves, bar charts, and API request counts retain precise values.
- Model details use K/M/B/T compact units.
- Hover tooltips on token traffic charts show daily input, output, cached, and total.
- Displays cached hit tokens separately, and retains failed, unmeasured, and retry requests.
Data and Interfaces¶
- Opens the
usage_ledgerstorage domain version 2. - Provides the Remote method
usageLedgerPlugin/snapshot, returningevents,models, anddaily.
Installation and Enabling¶
First install it to the Web profile, then start the Web profile. The commands verified in the documentation are as follows:
dsh plugin --profile web add github:xie-tj/dsh-token-usage-ledger
dsh --profile web
After installation, open Settings → Usage to view usage.
In production environments, the Git spec should be pinned to a commit SHA. For example:
dsh plugin --profile web add github:xie-tj/dsh-token-usage-ledger#<commit-sha>
The current version is built against the @deepseek-ai/dsh 0.1.0-rc.8 dependency line, requiring Node.js ^22.19.0 || >=24.0.0.
Typical Usage¶
View Usage¶
- Install to Web profile:
dsh plugin --profile web add github:xie-tj/dsh-token-usage-ledger
- Start Web profile:
dsh --profile web
-
Open Settings → Usage.
-
Use provider, model, and recent 7 days / 30 days filters.
Uninstall¶
dsh plugin --profile web remove dsh-plugin-usage-ledger
Uninstalling does not delete existing data in the usage_ledger storage domain.
Build from Source¶
pnpm install
pnpm run build
Verify before submitting:
pnpm run typecheck
pnpm run build
pnpm run test
pnpm run pack:check
Runtime Dependencies and Limitations¶
Host Dependencies¶
Host plugins have hard dependencies on the following services:
storageDomain: Opens theusage_ledgerstorage domain version 2.sessions.sessionPersistence.
Optional dependencies:
settings.
cordis.patch.yml will not install the storage-domain backend, session persistence provider, nor add service routes for custom profiles. Persistence capabilities depend on the backend configured for the profile in storageDomain.
Data Boundaries¶
- The ledger is best-effort derived data, not part of request transactions.
- The plugin does not estimate tokens, calculate fees, discounts, cache prices, or quota impact.
- The page merges cache read/write display and does not plot them separately; it also does not show prices or amounts.
- Persistence retention, cleanup, export, and migration tools are not implemented.
- Regression tests do not replace actual Web profile startup tests.
Current Limitations¶
- Web currently has no workspace selector.
- Legacy sessions may display an unknown route.
- The plugin settings card is currently read-only with no runtime configuration options.
Use Cases and Notes¶
Suitable for those who wish to view persistent usage, cached tokens, and failed/retry requests in a DSH Web profile, and filter by provider and model.
Please note the following:
- The plugin loads into the Web profile as DSH plugin code and runs with permissions equivalent to the current
dshprocess; you should check the source code and license before installing. - The license is MIT.
- In production environments, the Git spec should be pinned to a commit SHA.
- Uninstalling does not delete existing data in the
usage_ledgerstorage domain. - The plugin does not calculate fees, discounts, cache prices, or quota impact.
Conclusion¶
The value of this repository lies in persisting usage data to an independent usage_ledger storage domain and providing a visualized interface in Settings → Usage to view by provider, model, and time range.
The directory page link did not appear in the verified materials, so this article does not list a specific address.