deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Peak-hour price guard for DeepSeek API tidal pricing
Intercept your message before it's sent during peak hours — schedule it to run when it's cheaper.
Read this in 中文
DeepSeek moved to peak/off-peak (tidal) API pricing effective 2026-08-17 (Beijing time):
| Period | Hours (Beijing) | Output price vs. before |
|---|---|---|
| Peak | 09:00–12:00, 14:00–18:00 | up to 4.5× |
| Off-peak | everything else | half of peak |
New per-million-token rates (¥):
| Model | Item | Peak | Off-peak |
|---|---|---|---|
| V4 Flash | input (cache miss) | 3 | 1.5 |
| output | 9 | 4.5 | |
| input (cache hit) | 0.1 | 0.05 | |
| V4 Pro | input (cache miss) | 9 | 4.5 |
| output | 27 | 13.5 | |
| input (cache hit) | 0.3 | 0.15 |
If you mostly run long tasks with DeepSeek V4 Flash, sending them at 10:00 costs 3× more than sending them at 19:00. OffPeak makes sure you notice that before you press send — not after.
While your current model is DeepSeek V4 Flash / Pro and the Beijing clock is inside a peak window, pressing Enter (or clicking send) in the composer intercepts the message before it is sent. The text stays in the input box and a dialog appears:
Running commands are never interrupted: if a task crosses into a peak window mid-execution, nothing pops up — the reminder appears on your next command inside peak hours.
Requires the web profile (dsh web).
dsh plugin --profile web add dsh-offpeak
Manual install (no pnpm needed):
Copy the package into the shared plugin directory:
%USERPROFILE%\.dsh\profiles\node_modules\dsh-offpeak~/.dsh/profiles/node_modules/dsh-offpeakAppend to $DSH_HOME/profiles/web/cordis.patch.yml:
- insert:
- id: offpeak
name: 'dsh-offpeak'
config:
effectiveFrom: '2026-08-17'
debug: false
Restart dsh web.
The plugin is dormant before
effectiveFrom(2026-08-17 — the day tidal pricing starts). Set it to today's date to try it out sooner.
peak hours (Beijing 09:00–12:00 / 14:00–18:00), model = V4 Flash/Pro
│
user presses Enter / clicks send ──► composer intercepts (client-side)
│ message stays in the input box
▼
┌─ dialog ─────────────────────────┐
│ prices · command preview │
│ [Continue] [Schedule] │
│ ☐ Don't remind me today │
└──────────────────────────────────┘
│ │
Continue Schedule
│ │
▼ ▼
native composer submit POST /ds-offpeak/schedule
(message sent normally) { text, atMs, sessionId }
draft cleared
│
server timer fires at atMs
▼
session.prompt → original session
(works with the browser closed)
isComposing) is never intercepted.Asia/Shanghai wall-clock time regardless of the machine's timezone.| Key | Default | Meaning |
|---|---|---|
effectiveFrom |
"2026-08-17" |
Tidal-pricing start date (Beijing); plugin is dormant before it |
debug |
false |
Bypass effectiveFrom; enables /ds-offpeak/debug-remind |
peakWindows |
09:00–12:00, 14:00–18:00 |
Peak windows in minutes ({ start, end }), overridable |
profile |
auto (web) |
Profile that owns the state file |
| Method | Path | Purpose |
|---|---|---|
| GET | /ds-offpeak/state |
Status: peak? model, price table, pending reminder, wheel options, tasks |
| POST | /ds-offpeak/ack |
Acknowledge a fallback reminder |
| POST | /ds-offpeak/dismiss |
Don't remind today |
| POST | /ds-offpeak/schedule |
{ text, atMs, sessionId } — record a scheduled execution |
| POST | /ds-offpeak/cancel |
{ id } — cancel a task |
| POST | /ds-offpeak/execute |
{ id } — run a task immediately |
| POST | /ds-offpeak/debug-remind |
Simulate a peak command (debug only) |
All writes accept same-origin POSTs only. State and tasks persist in $DSH_HOME/profiles/<profile>/offpeak.json.
Why does the hour wheel skip 12–14? 12:00–14:00 is technically off-peak, but it sits between the two peak windows. OffPeak plays it safe and only offers clearly-safe hours (0–8, 18–23).
Does it block subagent / queued messages? No — only the composer's own send gesture is intercepted.
What if I close the dialog? Nothing is sent; the draft stays in the input box.
Multiple tabs? Each tab intercepts independently; "don't remind today" is server-side and shared.
src/index.js server half — peak detection, fallback reminder, scheduler, persistence
client/client.js browser half — interception, dialog, time wheel (zero-dependency DOM)
node --check src/index.js && node --check client/client.js
MIT © christophersmith2737
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。