Liang Wengu (dsh-liangwengu): Automatically Sending Queuing Commands During DeepSeek Off-Peak Hours

Introduction

When running long conversations or batch tasks in DeepSeek Harness (DSH), token costs often concentrate during peak hours on weekdays. If you have pre-written instructions and wish to trigger them uniformly during cheaper valley price windows, manual scheduling is prone to missing the switch and is inconvenient for managing “New Conversation” and “Append to History” together.

Below is an introduction to the community plugin Liang Wengu (maqimakabaka/dsh-liangwengu): it places pre-edited dialogue instructions into a queue, and the plugin automatically sends them during valley price periods (or specified times) according to peak/valley rules. It is combined with balance reminders, usage estimation, and scheduling strategies, belonging to the workflow type extension in the DSH ecosystem. Maintained by GitHub user maqimakabaka, the current repository version is v0.3.12 (MIT license). The plugin runs with the current DSH process permissions; it is recommended to review the source code and license yourself before installation; all facts in this article come from the GitHub README and package metadata.

What is it

DSH Valley Price Scheduler: Open the panel through the “Liang Wengu” entry in the sidebar. Through four tabs—New Conversation / Historical Conversations / Ledger / Settings—you can complete instruction queuing, scheduled triggering, balance gates, and local accounting estimation. External network requests are only sent to the DeepSeek official interface; the panel communicates with the host via the same-origin route /dsh-liangwengu/*.

Core Features

Valley Price Queue and Trigger

  1. After writing instructions, you can choose the model, reasoningEffort (reasoning level), permission presets, and attachments, then add them to the queue.
  2. The default trigger is “execute 10 seconds after valley price starts” (used to avoid the one-minute pricing switch), or you can specify a specific time.
  3. Targets support New Conversation (can set title, work directory, model, permissions, attachments) or Existing Historical Conversation (append sending).
  4. Tasks due during peak hours are automatically delayed to the next valley window; this can be changed to “send immediately” in settings.
  5. Failed tasks automatically retry once; if they still fail, they are marked as failed with the reason retained. Starting from v0.3.12: the same task creates a session only once; the scheduling loop includes mutual exclusion to avoid concurrent grabbing by multiple expirations; Scheduling → Task Execution can be selected as Serial (next task after the previous ends) or Parallel (send together at the scheduled time).

Peak and Valley Periods and Pricing

The plugin includes built-in official peak/valley rules (Weekdays UTC 01:00–04:00, 06:00–10:00, corresponding to Beijing Time 09:00–12:00, 14:00–18:00 as peak; the rest including weekends and statutory holidays as valley, valley pricing is estimated at peak price × 0.5). You can fetch from the official pricing page on startup / daily / weekly / manual; on failure, the cache and built-in reference price are used. Chinese statutory holiday data is fetched automatically (chinese-days, with jsdelivr and unpkg fallback); holidays are priced at valley rate for the whole day. The panel top displays the current “Valley” or “Peak” tag, along with a countdown and “Today Used” estimation.

Balance Reminders

It supports both DEEPSEEK_API_KEY environment variable query and account balance using only the DSH account login (Recharge Wallet + Gift Wallet). Below the threshold, it can pause the queue, record an alarm, and play an alert sound; sent instructions are not affected and can be resumed after confirmation. v0.3.12 allows configuring the low balance trigger frequency; turning off the balance gate automatically lifts the pause and the queue continues. Balance query failures do not block scheduling (fail-open), only prompting in the panel and logs; balance refreshes at the end of each conversation round; a manual “Refresh” provides the success or error reason.

Ledger

It monitors session usage events, estimates the token cost for each assistant based on official peak/valley unit prices, and displays local cumulative, today’s, cumulative tokens, record rounds, and the last 7 days of records. This is only an estimation; it does not account for account discounts, gift quotas, Search/Fetch, and cache differences; the actual bill is subject to DeepSeek’s official records.

Settings and Others

Display mode (Light / Dark / Follow DSH), Language (Chinese / English / Follow DSH), scheduling master switch, peak/valley pricing fetch, balance gate, three-way alert sound (balance alarm / valley / peak, can change file and volume 0–100), runtime logs. The interface draft state is preserved in localStorage when switching tabs. Data directory: ~/.dsh/liangwengu/ (state.json, pricing cache, uploaded attachments, etc.); attachments only support images and text types, subject to whitelist validation.

Installation and Enablement

The plugin is installed into a profile in the form of a DSH bundle; on the desktop, the desktop profile is usually used, DSH needs to be restarted after installation to load it.

# Local directory install (easiest for development)
dsh plugin --profile <profile> add link:C:/Users/96596/dsh-liangwengu

# Or install from Git repository
dsh plugin --profile <profile> add github:maqimakabaka/dsh-liangwengu

The runtime environment requires Node.js >= 20 (see engines in package.json).

Typical Usage

  1. Open “Liang Wengu” in the DSH left sidebar, edit instructions in New Conversation or Historical Conversations, select the model, reasoning level, permission preset, and upload files as needed.
  2. Confirm the trigger time (default 10 seconds after valley price starts, or a custom time point) and add the task to the queue.
  3. Open the scheduling master switch in Settings, select peak time strategy, serial/parallel execution, balance gate, and alert sound as needed; observe the peak/valley tag and countdown at the top of the panel.
  4. After the task executes in the valley window, check the estimated usage in Ledger; if the official pricing changes, perform a pricing fetch in settings (including “Fetch Now”).

Applicable Scenarios and Notes

  • Suitable: DSH users with obvious peak/valley price differences on weekdays who want to pre-write a batch of instructions and deliver them uniformly during valley prices; scenarios requiring queues, balance pauses, and local usage references.
  • Notes: Pricing and peak/valley rules are subject to DeepSeek’s official records; you should refresh pricing in the plugin after changes; the Ledger cannot replace official bills.
  • Security: The plugin inherits DSH process permissions; sensitive configurations and state.json are located in the user directory; please review repository source code and the MIT license before installation.

The community directory SkillHub Plugin Page and the GitHub repository are independent of each other, neither is the DeepSeek / Huanfang official app store; the DSH ecosystem philosophy is “Everything is a Plugin”; refer to README and version releases for selection.

Conclusion

Liang Wengu brings “Write Instructions + Peak/Valley Scheduling + Balance Gate” into the DSH sidebar, reducing the cost of manually sending instructions during peak times. For further understanding, visit the directory page skillhub.cn/plugins/maqimakabaka/dsh-liangwengu and source code github.com/maqimakabaka/dsh-liangwengu.

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

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

Xiaoye