rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:songliu1992-glitch/dsh-fenggu-time
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness plugin that puts a 22px badge in the window titlebar showing which DeepSeek API pricing period is in force right now:
● 梁文峰时间 yellow #ffd60a peak hours — full price
● 梁文谷时间 green #55ff55 off-peak hours — half the peak price
The two labels are a pun on the name 梁文峰: 峰 (peak) and 谷 (valley). Green means your API calls are billed at the off-peak rate, which is half of the peak rate.
The badge is a passive indicator: fixed to the titlebar row, vertically centred on the window's caption buttons, click-through, and identical on every page (conversation, Plugins, Settings). Nothing pops up and nothing polls.
Straight from Models & Pricing:
Off-peak rates are half of the peak rates. Peak hours are 01:00 - 04:00 and 06:00 - 10:00 UTC, Monday through Friday, excluding Chinese public holidays. All other hours are off-peak, including weekends and Chinese public holidays in full.
In Beijing time that is 09:00–12:00 and 14:00–18:00, Monday to Friday, which is what the badge evaluates. Both UTC windows fall inside the same Beijing calendar day, so the weekday is unambiguous. In short:
| When | Badge | |
|---|---|---|
| Peak hours | Mon–Fri, not a Chinese public holiday, 09:00–12:00 / 14:00–18:00 Beijing | 梁文峰时间, yellow |
| Off-peak hours | everything else, including every weekend and Chinese public holidays in full | 梁文谷时间, green |
Chinese public holidays apply to every account worldwide, so the off-peak windows are the same for users outside China — only the wall-clock time differs:
| Local time zone | Peak hours, local |
|---|---|
| Beijing (UTC+8) | 09:00–12:00, 14:00–18:00 |
| Tokyo (UTC+9) | 10:00–13:00, 15:00–19:00 |
| Sydney (UTC+11) | 12:00–15:00, 17:00–21:00 |
| Berlin / Paris (UTC+1) | 02:00–05:00, 07:00–11:00 |
| London (UTC+0) | 01:00–04:00, 06:00–10:00 |
| New York (UTC-5) | 20:00–23:00 (previous day), 01:00–05:00 |
| Los Angeles (UTC-8) | 17:00–20:00, 22:00–02:00 |
Boundaries are left-closed and right-open: 09:00 and 14:00 are peak, 12:00 and 18:00 are off-peak. Two consequences worth stating plainly:
dsh plugin add dsh-fenggu-time@latest
Or in the app: Plugins → Add plugin, paste dsh-fenggu-time@latest (the @latest is
part of the string), choose the official npm registry, install, then restart DSH.
Always include @latest, in the CLI and in the dialog. DSH pins an installed version in
its lockfile, and pnpm will not move it on its own; worse, a bare package name can be
silently resolved to an older release by pnpm's minimumReleaseAge supply-chain policy (a
freshly published version is skipped without an error). @latest forces a fresh resolution.
DSH has no in-place upgrade for third-party plugins. To move to a newer release:
dsh-fenggu-time@latestUpgrading with the bare name can install an older release again, which looks like a success.
China publishes the next year's holiday arrangement every November, so a hard-coded table goes stale. There is nothing to press: the plugin checks itself once a year, on 31 December at 12:00 Beijing time, and the first run is 2027-12-31 — the 2026 and 2027 arrangements already ship, and 2028 is the first one nobody knows yet.
~/.dsh/plugin-state/fenggu-time-holidays.json # Windows: %USERPROFILE%\.dsh\plugin-state\...
How the check behaves:
node_modules so it survives reinstalls.The shipped dates come from the State Council notices, transcribed per day:
Limit worth knowing: only the holiday table is updatable. The two daily peak windows are constants in the code — if DeepSeek changes the schedule itself (it has before: the old 00:30–08:30 Beijing discount window was retired on 2025-09-06), the plugin needs a release.
One badge, one alarm. The label can only change at 00:00, 09:00, 12:00, 14:00 and 18:00
Beijing time, so the plugin computes the next instant the label flips and sleeps until then
(setTimeout), then re-arms. About five wake-ups per day, none in between. Window focus and
visibilitychange re-read the clock and re-arm, so a sleep or a stalled renderer cannot
leave it on a stale label.
Tested against DSH 0.2.2-rc.3 (desktop, Windows). The package deliberately declares no
engines.dsh: DSH ships release candidates, semver excludes prereleases from ordinary
ranges, and a range that rejects the running rc would get the plugin row silently disabled
by the compatibility preflight — a failure that shows up as a missing badge, not an error.
The badge uses internal client slots (shell.overlay, settings.general.item). They are
not a compatibility contract; if a future DSH renames them the badge and the settings row
disappear, and the plugin fails closed instead of breaking the page.
Plain JavaScript, no build step: lib/client.js is the browser bundle the DSH client loads
(window.__ModuleLoader__.load({ id, factory })), lib/index.js is the host half (ESM,
node built-ins only).
npm test # classification, alarm scheduling, holiday-document validation, both routes
The tests load the shipped bundle with a stubbed module loader and drive the host routes
through a fake webServer, so they exercise the artifact that ships rather than a copy.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。