Introduction¶
When running agents with DeepSeek Harness Desktop, API pricing follows peak and off-peak rates: specific weekday periods are peak (1×), while the rest are off-peak (0.5×). While these rules are listed on the official pricing page, you have to manually convert to Beijing Time and exclude public holidays to determine if “it is currently peak hours.”
The community plugin dsh-offpeak-alert (Maintainer: wenxiuncle; Category: Client) solves this. It places a persistent badge on the desktop window’s title bar, displaying the current peak/off-peak status and a countdown to the next switch. The badge turns deep red during peak hours, allowing you to decide at a glance whether it is suitable for high-volume API calls.
What is this?¶
dsh-offpeak-alert is a DSH client plugin designed for DeepSeek Harness Desktop. By default, the badge is attached to the top center of the viewport (top: 4px), corresponding to the center of the self-drawn window title bar in the Desktop version; it can be dragged to any position. The plugin works offline; peak/off-peak determination and holiday data are hardcoded in client.js, aligning with the DeepSeek API Official Pricing Page.
- Directory Page: https://www.skillhub.cn/plugins/wenxiuncle/dsh-offpeak-alert
- Source Code: https://github.com/wenxiuncle/dsh-offpeak-alert
- License: MIT (
package.jsonversion 1.0.0)
For the Browser version (DSH Web), there is no title bar like in the desktop version, so the badge will fall at the very top of the page. It has not been adapted or verified for the browser version.
Peak/Off-Peak Rules and Badge Text¶
Determination criteria (consistent with the README):
- Peak: UTC 01:00–04:00 and 06:00–10:00, Monday to Friday only, excluding Chinese statutory public holidays.
- Off-Peak: All other times (including weekends and statutory holidays all day), priced at 0.5× of peak.
- Converted to Beijing Time: Weekdays 09:00–12:00 and 14:00–18:00 are Peak.
The badge recalculates every 30 seconds, with a color change delay of up to approximately 30 seconds across time zone boundaries. The text will include the holiday name on holidays.
| Time Period | Text Example |
|---|---|
| Off-Peak | Off-Peak 0.5× · National Day · Switch to Peak in 132h 0m |
| Peak | Peak 1× · Switch to Off-Peak in 2h 30m |
Visual conventions: Peak is deep red background + near-white text (consistent in light and dark themes); Off-Peak is neutral gray background for a quiet indication. The plugin does not modify any background colors or theme tokens; the interface color scheme is determined by the DSH theme.
Installation and Activation¶
The plugin is installed as a local directory (registered as a link: dependency in the profile). Changes in the repository take effect directly after reloading the plugin; upgrades can be done by git pull in the local directory followed by reloading. The README does not provide commands like dsh plugin add github:...; do not attempt to construct installation commands based on the plugin name.
- Clone or download the repository to any local directory (see the path example in the next step).
- Open DeepSeek Harness Desktop and go to the sidebar Plugins.
- Click “Add Plugin”.
- Enter the absolute path of the directory in “Package Name or Address”, for example:
<Your absolute path to this repo>\dsh-offpeak-alert
- Confirm installation and enable it in the plugin list.
The Host side only exports apply; the effect is entirely on the browser side. In package.json, dsh.client is set to platform: "web" and immediately: true.
Typical Usage¶
Dismissing and Restoring the Badge¶
The × on the right side of the badge can dismiss it. The dismissed state is recorded in sessionStorage, so it will not appear again during the current run; it will reappear after restarting the application. To restore it immediately, execute the following in the Developer Tools Console:
__dshOffpeak.showBadge()
Dragging and Resetting¶
The default position is horizontally centered on the title bar, flush with the top edge of the window. You can drag it by holding any area of the badge (except the close button); the position is saved in localStorage and persists after restarting the app. If not dragged, it will recenter if the window widens. To return to the center of the title bar:
__dshOffpeak.resetPosition()
Console Queries¶
__dshOffpeak.status() // { status:'peak'|'off-peak', holidayName, reason, beijing, ... }
__dshOffpeak.nextSwitch() // { at: <timestamp>, peak: <state after switch> }
__dshOffpeak.showBadge() // Restore the badge dismissed by ×
Rule Obsolescence and Maintenance¶
The plugin is offline; if the official website adjusts peak/off-peak or holiday schedules, it will not automatically update. A built-in reminder (purely local) triggers in two cases: more than the default 90 days have passed since SCHEDULE_VERIFIED_ON, or there is no precise data for the current year in OFFICIAL_HOLIDAYS (Lunar calendar estimation). When triggered, · Rules Stale appears at the end of the badge, accompanied by a small yellow data-stale dot; a warning is printed to the Console once per session, and the return value of __dshOffpeak.status() includes scheduleNotes and scheduleVerifiedOn.
When verifying peak hours, open the official pricing page, modify the minute judgment in statusAt() in client.js if necessary, and change SCHEDULE_VERIFIED_ON to the day of verification. 2026 statutory holidays are in OFFICIAL_HOLIDAYS; new years require adding year entries according to State Council notices.
To change colors, edit BADGE_CSS in client.js (intentionally using literal color values; separate selectors are needed for peak status in light and dark themes). After modification, you must reload the plugin; replacing an installed package sometimes requires restarting DSH.
Use Cases and Notes¶
Who it is for: Developers who develop long-term in DSH Desktop, want to see API peak/off-peak status and countdowns at any time, and do not want the plugin to modify themes or backgrounds.
Runtime and Permissions: The plugin injects the badge into the client document along with the current DSH process. Before installation, you should read index.js, client.js, and the MIT license to confirm you accept local storage (position localStorage, closed state sessionStorage) and fixed-position UI.
Known Limitations (excerpted from README):
- Only affects the main window document; the badge is not displayed in independent iframes such as terminals or document previews.
- The badge uses
position: fixed; no interaction other than dragging/closing. It is centered on the title bar by default; if it overlaps with other elements, it can be dragged away. - Uninstallation restores the original state; no global events are registered.
The DeepSeek Harness ecosystem emphasizes “Everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek or Quantilla (Higgsfield).
Conclusion¶
dsh-offpeak-alert turns official peak/off-peak rules into a title bar badge: deep red for peak, neutral gray for off-peak, with a switch countdown and an optional “Rules Stale” reminder. It is suitable for a quick glance at pricing windows during daily development in the Desktop version. For details and screenshots, see the GitHub README; installation is done via the plugin panel using an absolute local path.
- Plugin Directory: https://www.skillhub.cn/plugins/wenxiuncle/dsh-offpeak-alert
- Repository: https://github.com/wenxiuncle/dsh-offpeak-alert