DeepSeek Harness Peak-Valley Prompt Plugin

Introduction

DeepSeek Harness (DSH) supports extensible functionality through plugins. When you need to quickly check the current API billing window during a session, manually switching tabs to view the official pricing page is inefficient. The oldcat-cn/deepseek-pricing-window plugin displays peak/off-peak status indicators in the session interface, reducing the cost of context switching.

Plugin Overview

deepseek-pricing-window is a client-side plugin maintained by OldCat-CN. It displays whether the current DeepSeek API is in peak or off-peak hours to the right of the “Standard Mode” button in the DSH session title bar and on the new session homepage. Clicking the badge opens the official DeepSeek pricing page (language follows the UI locale) in a new tab.

Billing Rules

The plugin calculates time windows in UTC; the UI displays them in Beijing time.

  • Peak hours: Monday–Friday, 09:00–12:00 and 14:00–18:00 Beijing time (corresponding to UTC 01:00–04:00 and 06:00–10:00). Pricing is 2× the off-peak rate.
  • Off-peak hours: All other times, including weekends and Chinese public holidays. Pricing is at the base rate (1×).

Peak days exclude Chinese public holidays. Saturdays and Sundays are always treated as off-peak (weekend), even if they fall on a make-up workday, because DeepSeek’s rules define only Monday through Friday as peak days.

Installation & Activation

Install via DSH Web

  1. Open DSH Web and navigate to Plugins in the left sidebar.
  2. Click the arrow next to Add plugin and select Install a third-party plugin.
  3. Enter the following in the address field:
https://github.com/OldCat-CN/deepseek-pricing-window.git

Or the pnpm GitHub shorthand:

github:OldCat-CN/deepseek-pricing-window
  1. Click Install. Once complete, activate the plugin and refresh the page.

Simply entering deepseek-pricing-window will not work: that is the npm package name, but this project is currently distributed via Git only and has not been published to npm.

Install via Agent

Instruct the agent to call plugin_manager’s install_bundle with target set to the Git URL above.

Badge Description

  • Hover to see a countdown to the next window switch and the Beijing-time peak hours.
  • The badge only displays the time window and multiplier; it does not show specific unit prices. Prices may change at any time—refer to the official page for current rates.
  • The native title tooltip is not available on touch devices; when focused via keyboard, a screen reader announces the same detailed information.

Holiday Handling

The plugin ships with initial 2026–2027 State Council holiday schedule data. Going forward, a scheduled task in the repository fetches and validates updates from holiday-cn. Validation rules include: reference to State Council notices on gov.cn, presence of all seven holiday groups (New Year’s Day, Spring Festival, Qingming, Labor Day, Dragon Boat, Mid-Autumn, National Day), at least 20 days off, dates must fall within the target year and be non-duplicated.

The workflow runs daily at 02:17 UTC (10:17 Beijing time). After validation passes, it updates client.js and commits/pushes. Copies already installed in DSH do not auto-pull updates; after a repository update, you must reinstall (or install a pinned commit and then use Update) to get the new holiday table.

Limitations

  • Web GUI only; the badge appears to the right of the “Standard Mode” button on the new session homepage, and moves to the right side of the title bar once you enter a session.
  • Auto-updates depend on the community-maintained holiday-cn dataset.
  • Installed copies do not auto-update; a Git installation will not appear in npm’s version update list.

Development & Testing

The plugin includes the following key files:

  • client.js: Handles slot registration, peak/off-peak calculation, badge rendering, and click-through navigation.
  • index.js: Host-side half (empty implementation).
  • cordis.patch.yml: Injects the plugin entry.
  • locale/*.json: Titles and descriptions for the plugin management page.
  • icon.svg: Plugin icon.
  • test/verify-window.mjs: Local smoke test that simulates React and slots, verifying 6 time points and Chinese/English links.
  • scripts/update-holidays.mjs: Holiday fetching, validation, write-back, and heartbeat.
  • .github/workflows/update-holidays.yml: Daily scheduled task.

Run tests:

pnpm test
# or
node test/verify-window.mjs

Manually check holiday fetching (without writing files):

node scripts/update-holidays.mjs --target-year 2027 --dry-run

Use Cases

Suitable for developers who frequently call the DeepSeek API through DSH, enabling quick confirmation of the current billing window and avoiding unexpected costs during peak hours. Review the source code and license before use.

Summary

deepseek-pricing-window provides peak/off-peak status indicators in the session interface, with click-through to the official pricing page, reducing manual context-switching costs. The plugin maintains holiday data via scheduled tasks and supports manual testing and validation. For more details, refer to the plugin directory page and the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye