The DeepSeek Harness (DSH) plugin system allows users to extend functionality. The dsh-usage plugin adds a “Usage” section to the DSH settings panel for monitoring token consumption and API quotas. It is maintained by user linanbuan and is open source under the MIT license.

Core Features

This panel mainly addresses cost monitoring issues in agent development and usage, providing the following capabilities:

  • Usage details: Displays daily and cumulative token usage, cache hits, and a detailed breakdown of input/output/cache writes/billing counts.
  • History calendar: Provides a monthly calendar view, where each day uses two proportional bars to show total usage and cache hits. Clicking a day reveals exact numbers, and you can navigate to previous/next months.
  • API quota monitoring: Supports querying connected API quotas, including usage percentage and refresh time.
  • Performance and caching: Local folded/collapsed usage display at the 60 ms level, while provider quotas are fetched concurrently with a 90-second freshness window.
  • Privacy and robustness: API keys are kept only on the Host side, and the browser only receives response bodies. Network reads have a 20-second timeout; if a request times out or fails, it is retried once. If both rounds fail, the last valid numbers are retained and the reason is noted.

Installation and Enablement

  1. Prerequisite: The DeepSeek Harness desktop client must be installed first.
  2. Install the plugin: Place this directory anywhere. Run the following command to install it into the specified profile:
    dsh plugin --profile <你的 profile> add <本目录的绝对路径>
  1. Activation: After installation, the Host module must restart Harness for the changes to take effect; the browser side is usually updated immediately via HMR.
  2. Disable: To disable it, override the configuration in the profile’s own cordis.patch.yml:
    - id: usage-panel
      disabled: true

Display Details

  • Number format: Usage numbers are displayed as full integers without K / M abbreviations.
  • CommandCode: Only the percentage is displayed; no monetary amount is shown.
  • OpenCode-Go: Displays the window percentage and refresh time.

Self-Check

Run the following commands to perform a plugin self-check and ensure routing, assertions, and configuration are all working properly:

pnpm test
# 或
node test/selfcheck.mjs

License and Addresses

This project follows the MIT license. For more details, refer to:
* GitHub repository
* Skill Center catalog