deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:proDreams/dsh-tidewatch
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A floating peak/off-peak tide gauge for the DeepSeek Harness web UI. It docks beside the composer and answers three questions at a glance: which pricing phase is active right now, how long is left in it, and how much this session has cost.
The card follows the DeepSeek Harness interface language (English, Chinese, Russian), renders the official
peak/off-peak windows in your own time zone, and formats money, tokens and clock times with Intl for the active
locale.
This is a fork of dsh-tidewatch by KhalilYamber (MIT), reworked for international use: a real i18n layer instead of hard-coded Chinese copy, a redesigned card, and a local-time window table. The billing math and the session-projection structure come from the original project.
--dsw-* theme tokens (light and dark) and prefers the official StateDot, Tag,
Tooltip and useDismissOnOutsidePointer primitives, falling back to built-in implementations when a shell does not
expose them.aria-expanded /
aria-pressed states and a progressbar role on the tide line.dsh plugin command (a web profile).The badge appears in the web UI, so install it into the
webprofile.
# Option 1: the latest main (recommended; follows the repository)
dsh plugin --profile web add github:proDreams/dsh-tidewatch
# Option 2: a pinned release tag (reproducible installs)
dsh plugin --profile web add github:proDreams/dsh-tidewatch#v2.0.0
# Option 3: the tarball attached to a GitHub Release (pinned and offline-friendly)
dsh plugin --profile web add https://github.com/proDreams/dsh-tidewatch/releases/download/v2.0.0/dsh-tidewatch-2.0.0.tgz
# Local directory (development)
dsh plugin --profile web add link:/path/to/dsh-tidewatch
Restart dsh web after installing; the tide badge appears to the right of the composer.
The npm package
dsh-tidewatchis not ours. npm hosts only an old copy published by the original author (1.0.6, 2026-08-22) whose prices and rules are outdated, and this fork deliberately stays off npm. Do not install it or judge current billing from it — use one of the options above.
dsh plugin --profile web update dsh-tidewatch # or re-run the add above
dsh plugin --profile web list dsh-tidewatch # installed version
dsh plugin --profile web remove dsh-tidewatch # uninstall
See CHANGELOG.md for the release history.
2.0.0 adds the i18n layer, the local-time window table and the redesigned card. Billing itself is unchanged.
Two earlier fixes are worth knowing about if you used the original plugin before 1.1.2:
deepseek-v4-pro to the Flash price from 2026-09-14
04:00 UTC, which understated pro calls by roughly 4.4× (cache miss), 7.3× (cache hit) and 3.3× (output). The
repricing boundary V4_PRO_RETIRE_BOUNDARY is a sentinel again, so pro always bills on its own rates; the routing
branch is kept and only needs the date filled in when an official one appears.costUsage projection
moved to stateVersion 4. Persisted sessions replay once after the upgrade, so calls made between 2026-08-16 and
2026-09-10 are restored to the first peak schedule (they had been billed at the newer, lower rates). Live billing
was never affected.DeepSeek introduced peak/off-peak time-of-day pricing on 2026-08-17:
| Window (UTC) | Beijing time | Tier |
|---|---|---|
| 01:00 – 04:00 | 09:00 – 12:00 | peak |
| 04:00 – 06:00 | 12:00 – 14:00 | off-peak |
| 06:00 – 10:00 | 14:00 – 18:00 | peak |
| 10:00 – next 01:00 | 18:00 – next 09:00 | off-peak |
Off-peak prices are half of the peak prices. The card decides the tier from the UTC windows (the official definition) and renders the table in the viewer's own time zone.
Weekend rule (since 2026-08-23): Saturday and Sunday (UTC calendar days) bill at off-peak prices all day with no peak/off-peak switch; the next switch lands at the first peak window of the following Monday.
Unit: USD per 1M tokens (the official pricing-page basis). Cost = input-miss × cacheMiss + output × output + (cache-read + cache-write) × cacheHit; "output" already includes reasoning tokens.
Three price eras, selected by the call's own timestamp (historical correctness; tiers are listed as cache-hit / cache-miss / output):
| Era | Range (UTC) | deepseek-flash tiers |
|---|---|---|
| Base price | before 2026-08-16 16:00 | 0.0028 / 0.14 / 0.28 |
| First peak schedule | 2026-08-16 16:00 – 2026-09-10 04:00 | peak 0.014 / 0.44 / 1.32, off-peak is half |
| V4.1 Flash repricing | from 2026-09-10 04:00 | peak 0.006 / 0.3 / 1.2, off-peak is half |
Every call is billed at the tier of its event timestamp, so costs do not drift across a phase switch or a repricing.
The ledger stores USD. The panel displays CNY at the fixed 6.67 rate (which matches the official CNY price list) or USD directly.
The card is a normal DeepSeek Harness citizen: it registers the tidewatch locale namespace and reads its copy through
the framework translator, so switching the interface language in Settings → Language switches the card immediately.
| Language | Status |
|---|---|
| English | shipped (en) — the fallback language of the lookup chain |
| Chinese (Simplified) | shipped (zh) |
| Russian | shipped (ru) and offered to the language catalog by the plugin |
zh and en, so the plugin adds Russian to the language list itself. Other plugins fall
back to English for that language.{placeholder} template owned by each language, and the
test suite fails if the dictionaries drift apart.The card follows the DeepSeek Harness theme through --dsw-* variables, and every plugin-local token keeps a
scheme-aware fallback, so it stays correct on a host without the theme layer as well.
StateDot, Tag, Tooltip and
useDismissOnOutsidePointer — and degrades to built-in implementations when the shell's module table does not expose
them.
dsh-tidewatch
├── package.json # dsh.bundle.patch + dsh.client.platform manifest
├── cordis.patch.yml # bundle patch row
├── scripts/build.sh # build: syntax check + zod junction
├── lib/
│ ├── pricing.js # pure functions: windows, isPeakHour/peakPhaseAt, three price eras, costOf
│ ├── index.js # host: costUsage session projection (billed per event time)
│ └── client.js # browser: floating tide card + i18n dictionaries (__ModuleLoader__ bundle)
├── docs/PORTING.md # adaptation notes for other hosts
└── test/verify.mjs # pure-module self-test (node test/verify.mjs)
model-call usage blocks (assistant/chunk, assistant/message events)
│ lib/index.js: costUsage session projection (zod-schema validated)
▼
token buckets + USD cost (per-event-time peak/off-peak tier)
│ useProjection('costUsage') (browser)
▼
lib/client.js: card rendering (per-second countdown, Intl formatting, FX conversion)
DSH_CHECKOUT=<harness source root> bash scripts/build.sh # syntax check + zod junction
node test/verify.mjs # 70 checks: peak math, billing, i18n, time zones
The suite materializes the real client bundle against a stub React and a fake plugin context, so it exercises the shipped dictionaries, the fallback chain, locale-aware formatting and the time-zone window table rather than a copy of them.
V4_PRO_RETIRE_BOUNDARY stays a sentinel pending an official date. When the official prices change, update both
lib/pricing.js (billing) and the DISPLAY_PRICES constant in lib/client.js (display) by hand, and keep the
superseded tiers as another historical era.deepseek-flash is current (V4.1 Flash); the aliases deepseek-v4-flash,
deepseek-v4-flash-vision-exp and deepseek-v4.1-flash are all billed at the current flash rate (see
MODEL_ALIASES).Program author: Ivan Ashikhmin Telegram for contact: https://t.me/proDreams
The program was created as part of the "Code on a Napkin" project.
If you like this project and want to support its further development, consider donating:
Your support helps the project grow and improve future features!
This project is licensed under the MIT License. It is a derivative of dsh-tidewatch by KhalilYamber; both copyright notices are retained in the LICENSE file.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。