Preface¶
DeepSeek Harness (DSH) adopts a plugin-based architecture. When developing and debugging GLM Coding Plan routing, it is necessary to have real-time visibility into the quota consumption of various windows (5-hour window, weekly window, tool window). Existing methods typically require switching pages or manual queries, lacking a persistent feedback mechanism.
The dsh-glm-quota-dock plugin solves this problem. It persists a “GLM Coding Plan quota pill” within the statistics line below the session input box, displaying the usage percentage and reset countdown for each window in real-time. This allows users to grasp the quota status without switching pages.
Feature Overview¶
The plugin implements the following features within the DSH client:
- Persistent Statistics Line Display: A GLM Coding Plan quota pill is persistently displayed in the statistics line below the session input box. The plugin real-time displays the usage percentage for the 5h window, weekly window, and tool window.
- 5-Hour Window Reset Countdown: A reset countdown for the 5-hour window is persistently displayed at the end of the pill, with the color changing according to the 5h window status. Clicking the details panel allows viewing the specific reset time.
- Session-Level Filtering: Displayed only in GLM sessions. It renders only when the current session uses the Coding Plan routing and a
glm-*model. Pure API billing routes do not trigger the display. - Details Panel: Clicking the pill opens a two-column card-style details panel. Each window is represented by a card displaying the title, percentage, reset time, and progress bar. Normal status colors are green/blue, warning (≥80%) is amber, and critical (≥95%) is red.
- Idle Frequency Reduction: When the page is visible but idle for 5 minutes, polling automatically reduces to once every 5 minutes. It refreshes immediately upon resuming operation.
- Plugin Updates: The panel footer displays the plugin version number. It silently checks npm for new versions every hour and supports Host-side pnpm self-updates.
- Plan Version Adaptation: Supports V1 (Lite tier), V2 (including weekly window), and the new credit-based system. Unknown shapes gracefully fall back.
- Key Security: The API Key is parsed and used only within the Host process; the browser side only receives aggregated percentage data.
Installation and Activation¶
The installation process requires no building; install directly using the npm package.
Command Line Installation¶
Use DSH’s plugin management command to add the plugin:
dsh plugin --profile <your_profile> add dsh-glm-quota-dock
Agent Installation¶
In a DSH session, you can instruct the Agent to execute the following command for installation:
Please use
plugin_manager’sinstall_bundleto install https://github.com/Everglow28/dsh-glm-quota-dock
After installation, you need to restart DSH (Host side) and refresh the webpage (Client side).
Configuration¶
After installation, the plugin generates configuration items under the config of the generated Cordis entry. You need to restart DSH after modifying the configuration.
| Field | Default Value | Description |
|---|---|---|
endpoint |
https://open.bigmodel.cn |
GLM API endpoint. Global site users need to change this to https://api.z.ai |
minIntervalSec |
60 |
Minimum interval (seconds) for upstream requests, lower limit is 30 |
apiKeyRef |
ZAI_CODING_CN_API_KEY |
Credential reference name; must match the reference configured on the model page |
apiKey |
None | Directly inline API Key (not recommended, prioritize credential references) |
cwd |
\ |
Working directory for upstream requests, generally no need to modify |
Usage Example¶
In the session statistics line, the plugin displays quota information in the following format:
◔ GLM 5h 9% · Wk 45% · Tool 7% · 🕐 2h 15m
Notes¶
- Environment Requirements: A relatively new version of DeepSeek Harness (Desktop or
dsh web) is required. - Provider Configuration: You need to configure the GLM Coding Plan provider (e.g.,
zai-coding-cn) on the DSH model page and ensure the credential reference is correct. - Verification Status: The author has only performed actual verification on the Lite tier (historical version V1: 5-hour window + monthly tool quota). V2 (including weekly window) and the new credit-based system are logically compatible but have not been verified on real hardware; if the display is abnormal, it is recommended to submit an Issue with the returned structure attached.
- Host Changes Effective: Configurations or changes on the Host side require restarting the process, not just refreshing the webpage.
Summary¶
dsh-glm-quota-dock provides DSH users with an intuitive tool for monitoring quotas while developing with the GLM Coding Plan. By combining persistent statistics lines and a details panel with automatic frequency reduction and version adaptation, it provides clear usage feedback while ensuring performance.