At a glance
What it does
A DeepSeek Harness web card that tracks peak/off-peak time and estimated API cost for the current session.
Web Profile
>=0.1.0-rc.5
Evidence-verified
Checked Sep 10, 2026, 2:10 PM UTC
Code-evidenced contributions
What it adds to DSH
Shows the current peak/off-peak tier, countdown to the next tier, session token details, and estimated API cost beside the chat input.
Mechanism evidence ↗Before you choose it
dsh-tidewatch adds a floating card beside the DeepSeek Harness chat input. It identifies the current pricing tier, counts down to the next phase, and can expand to show Beijing-time windows, token usage, per-model cost details, and CNY/USD display selection.
Best for
DeepSeek Harness users who want a compact, in-session view of time-based pricing and token spending.
Common tasks
- Check whether the current time falls in a peak or off-peak pricing window.
- See a running estimated cost and token breakdown for the current chat session.
- Expand the card to compare model-level spending or switch between CNY and USD.
Permissions and data
The supplied documentation describes processing model-call usage events into a session cost projection and retaining the selected display currency.
Permissions- Uses the DeepSeek Harness web client surface.
- Reads model-call usage information available to the Harness session.
- Calculates and stores a session cost ledger in USD for display.
- Remembers the user's selected CNY or USD display preference.
- No additional credentials are declared in the supplied evidence.
Limitations
- Costs depend on bundled pricing constants and are not a live official pricing feed.
- The CNY display uses a fixed 6.67 exchange rate.
- Pricing updates require manual changes to both calculation and display constants.
- Peak/off-peak determination uses UTC while the schedule is displayed in Beijing time.
What DSHub checked
- The immutable source commit and bundle structure were verified.
- The manifest declares a web client, a costUsage projection, Node.js >=20, and DeepSeek Harness >=0.1.0-rc.5.
- The source documents a floating peak/off-peak cost card and session token details.
What DSHub did not check
- Installation was not executed.
- Runtime behavior, cost accuracy, and compatibility with a specific Harness installation were not independently verified.
- The npm registry distribution was not found.
Pinned install
Install dsh-tidewatch
This plugin bundle does not have a DSH Plugin install action. Use its source documentation for the delivery method.
Maintainer source
Project README
dsh-tidewatch
DeepSeek 峰谷时刻悬浮徽章:一张悬浮在输入框旁的潮汐卡,告诉你此刻是峰期还是谷期、距下一阶段还有多久、本次会话花了多少钱。
- 状态点:峰期橙红 / 谷期蓝绿,一眼可辨
- 折叠态:
● 峰期 距谷期 03:33 · ¥0.12 - 展开态(点击展开):官方峰谷时段表(北京时间)、当前档位价格、本次会话 Token 明细、汇率设置
- 计费:官方峰谷两档价格(美元口径),按每次调用实际发生时刻的档位计价,缓存命中/未命中分开
- 币种:默认人民币显示(固定汇率 6.67,与官方人民币标价一致),展开面板可一键切换美元(4 位小数)
- 跟随 GUI 亮/暗主题(
--dsw-*变量)
峰谷时段(官方依据)
DeepSeek 官方自 2026-08-17 起实施峰谷分时定价:
| 时段(UTC) | 北京时间 | 档位 |
|---|---|---|
| 01:00 – 04:00 | 09:00 – 12:00 | 峰 |
| 04:00 – 06:00 | 12:00 – 14:00 | 谷 |
| 06:00 – 10:00 | 14:00 – 18:00 | 峰 |
| 10:00 – 次日 01:00 | 18:00 – 次日 09:00 | 谷 |
谷期价格为峰期的一半。徽章按 UTC 窗口判定当前档位(官方口径),时段表展示按北京时间。
周末规则(2026-08-23 起):周六/周日(UTC 自然日)全天按谷期计价,无峰谷切换;下一阶段切换点为下周一首次进入峰时。
计费口径
- 价格单位:美元 / 1M tokens(官方定价页口径),成本 = 输入未命中 × cacheMiss + 输出 × output + (缓存读 + 缓存写) × cacheHit;其中「输出」已含推理 token
- 峰谷时代之前(2026-08-16 16:00 UTC)的调用按当时的基础价计费(历史正确性)
- 每次调用的费用按事件发生时刻的档位计算,跨峰谷切换不漂移
- 账本金额以美元存储,显示时按固定汇率 6.67 换算人民币(默认)或直接显示美元
安装
需求:Node.js ≥ 20 + DeepSeek Harness(带
dsh plugin命令的版本)。
# npm 包安装(发布后可用)
dsh plugin --profile web add dsh-tidewatch
# 或本地目录(开发调试)
dsh plugin --profile web add link:./dsh-tidewatch
安装后重启 dsh web 生效。
使用
- 徽章悬浮在输入框右侧、与输入框垂直居中对齐;窄窗口放不下时自动移到输入框上方,不遮挡输入框与官方统计栏
- 点击徽章展开/收起详情面板:时段表、当前档位价格、Token 明细、币种切换(¥ / $)
- 点击「本次会话费用」行可展开分模型花费明细(各模型的 token 与花费分别列出,合计 = 分模型之和)
- 币种选择即时生效并记住;人民币 2 位小数,美元 4 位小数
文件结构
dsh-tidewatch
├── package.json # dsh.bundle.patch + dsh.client.platform 声明
├── cordis.patch.yml # 装配行
├── scripts/build.sh # 构建:语法检查 + zod junction
├── lib/
│ ├── pricing.js # 纯函数:峰谷窗口、isPeakHour/peakPhaseAt、价格表、costOf
│ ├── index.js # 宿主:costUsage 会话投影(按事件时刻计费)
│ └── client.js # 前端:悬浮徽章(__ModuleLoader__ bundle)
├── docs/PORTING.md # 移植到其他宿主的适配说明
└── test/verify.mjs # 纯模块自检(node test/verify.mjs,30 项)
数据流
模型调用 usage 块(assistant/chunk、assistant/message 事件)
│ lib/index.js:costUsage 会话投影(zod schema 校验)
▼
token 桶 + 美元成本(按事件时刻峰谷档位)
│ useProjection('costUsage')(浏览器端)
▼
lib/client.js:悬浮徽章渲染(秒级倒计时 + 汇率换算显示)
开发与验证
DSH_CHECKOUT=<harness 源码根目录> bash scripts/build.sh # 语法检查 + zod junction
node test/verify.mjs # 峰谷数学与计费自检(30 项,含双份常量一致性)
已知限制
- 价格表内置(V4.1-Flash 2026-09-10 新价 / V4-Pro 官方 2026-08-17 价)。2026-09-14 04:00 UTC(北京 12:00)起
deepseek-v4-pro路由到 Flash 按 Flash 价计费。官方调价后需手动同步lib/pricing.js(计费)与lib/client.js的DISPLAY_PRICES(展示)两处常量 - 时段判定固定按 UTC(官方口径),时段表展示按北京时间(UTC+8)
- 花费为美元账本 × 固定汇率 6.67 换算人民币(与官方人民币标价一致);展开面板可切换美元显示
借鉴与许可
峰谷数学(isPeakHour / peakPhaseAt / tierFor / costOf)与会话投影结构借鉴自 dsh-cost-meter(MIT License),按精简目标改写。
MIT © 2026 KhalilYamber
Operate deliberately
Install and manage
Prerequisites and target Profile
Target: Web Profile
Delivery: Dsh Bundle Git — KhalilYamber/dsh-tidewatch#3d8d27b9d89305ae1a7d577268b630972fb3d887。
Verify, update, and remove
Show lifecycle commands
dsh plugin --profile web listCompatibility and access
DeepSeek Harness web client; Node.js 20 or later declared: >=0.1.0-rc.5。
Review compatibility evidence ↗
Risk facts
Cost figures are estimates based on bundled price tables and a fixed 6.67 CNY/USD conversion.
Evidence ↗Official price changes require manual updates to two bundled price constants.
Evidence ↗Evidence and editorial reviewManifest, Bundle patch, distribution and freshness
Immutable evidence
Review status and source activity
Use the pinned Git bundle rather than relying on the unavailable npm package version.
AI reviewed Sep 10, 2026, 2:11 PM UTC。GitHub facts last checked Sep 10, 2026, 2:11 PM UTC。
No material source change has been recorded since this evidence baseline.