DSH Plugins Marketplace

DSH Plugins

Plugins

/

Notifications & Integrations

/

dsh-high-fee-alert

d

dsh-high-fee-alert

Manifest valid

Automatically retrieves time-of-use pricing data (with Beijing Time) and notifies users during peak periods to reduce costs.

UI (client)hasBundlePatch

dsh-high-fee-alert

DeepSeek Harness 高峰资费提醒插件:每次启动 DSH 时从 DeepSeek API 定价文档 抓取最新定价,从 ntp.ntsc.ac.cn(中国科学院国家授时中心)获取北京时间 (精确到分,UTC+8),处于高峰时段(峰谷定价中的“峰”)时在页面中央弹出 710×430 的提醒窗口。

注意

此插件使用Deepseek Harness + Deepseek V4 Pro(推理等级Max)生成,作者只是一名学生,无力维护更新,此插件出现的所有bug也无力修复,以后也不会有版本更新。

行为

  • 启动抓取:宿主启动时抓取一次官方定价文档并解析高峰时段,之后每 6 小时刷新一次。解析器兼容两种文档格式:
    • 现行版(脚注给出高峰窗口,如 Peak hours are 01:00 - 04:00 and 06:00 - 10:00 UTC, Monday through Friday) → 换算为北京时间多段高峰窗口 + 工作日限定;当前官方时段为 周一至周五 09:00–12:00、14:00–18:00(北京时间);
    • 旧版(脚注给出低谷窗口,如 off-peak pricing between 16:30 and 00:30 (UTC)) → 反推高峰窗口(每天)。
  • 精确时间:每次状态查询经 NTP 取北京时间,失败自动回退本机时钟, 并在 30 秒内复用上一次结果,避免高频请求授时中心。
  • 高峰弹窗:浏览器端挂载后立即查询状态,之后每 30 秒复查一次; 一旦处于高峰时段即弹出居中窗口(见下文视觉规格)。
  • 两个按钮(位于窗口右下角):
    • 左「好的」——蓝底 rgb(103, 158, 254)、白字:请求宿主关闭 DeepSeek Harness 前后端(ctx.appExit → 整棵树 dispose → 进程退出, 窗口随之关闭);
    • 右「继续」——rgb(67, 69, 74) 底、白字:仅关闭本次提醒窗口, 本次页面生命周期内不再重复弹出。
  • 回退:文档抓取/解析失败时回退到内置默认时段(当前官方载明的 工作日两段高峰),状态接口会注明 pricingSource: fallback; NTP 失败时注明 timeSource: local。

弹窗视觉规格

项值
设计尺寸710 × 430 px
位置屏幕正中央(上下左右对称),小屏时等比收缩并保留 24px 对称边距
圆角16px
背景rgb(27, 27, 28)
文案现在是 <实际时间>,API调用价格偏高,请等待至 <最近的下一非峰时刻> 再使用。

已知问题

1.在点击“好的”之后,dsh网页可能不会关闭,需要手动关闭(此时后台已关闭)

安装

# 建议使用npm安装
dsh plugin add --profile web dsh-high-fee-alert
# 或使用github仓库安装
dsh plugin --profile web add "file:D:/Deepseek Harness/chajian/dsh-high-fee-alert"

安装后重启 DSH 生效(profile 在启动时扫描 bundle 层)。

卸载:

dsh plugin --profile web remove dsh-high-fee-alert

配置

全部配置项均可在 profile 的 cordis.patch.yml 中按行 id 覆盖 (dsh-high-fee-alert),均有内置默认值:

配置项默认值说明
pricingUrlhttps://api-docs.deepseek.com/quick_start/pricing定价文档地址
ntpHostntp.ntsc.ac.cnNTP 服务器
ntpPort123NTP 端口
ntpTimeoutMs2500NTP 超时
fetchTimeoutMs8000定价文档抓取超时
pricingRefetchMs21600000定价刷新间隔(6h)
exitCode0「好的」退出码
peakWindows[]显式高峰窗口(北京时间 HH:mm-HH:mm 数组,覆盖文档解析)
weekdaysOnlynull高峰是否仅限周一至周五(布尔;缺省跟随文档/回退)
offPeakStart''旧语义:每日低谷开始(北京时间 HH:mm,反推高峰)
offPeakEnd''旧语义:每日低谷结束(北京时间 HH:mm)

示例(固定工作日 09:00–18:00 为高峰):

- id: dsh-high-fee-alert
  config:
    peakWindows:
      - '09:00-12:00'
      - '14:00-18:00'
    weekdaysOnly: true

HTTP 接口(同源)

方法路径说明
GET/dsh-high-fee-alert/status当前时间、是否高峰、高峰窗口、下一非峰时刻、数据来源
POST/dsh-high-fee-alert/exit关闭前后端;仅接受同源 POST(Origin == Host)

结构

dsh-high-fee-alert/
├── package.json          # dsh.bundle + dsh.client 声明
├── cordis.patch.yml      # bundle patch:插入宿主行(inject: [webServer])
├── index.js              # 宿主端入口:路由、退出、缓存
├── lib/
│   ├── ntp.js            # NTPv4 客户端与报文解析
│   ├── pricing.js        # 定价文档抓取/解析(新旧两种格式)/回退
│   └── schedule.js       # 高峰窗口纯逻辑(多段窗口 + 工作日限定)
├── client/client.js      # 浏览器端 bundle(__ModuleLoader__ 工厂格式)
├── demo/popup-demo.html  # 弹窗视觉规格静态演示页(npm 打包不含此目录)
└── test/logic.test.mjs   # node --test 单元测试
    test/client.test.mjs  # jsdom 弹窗渲染测试(缺依赖时自动跳过)

开发验证

node --test test/

test/client.test.mjs(jsdom 弹窗渲染测试)需要 react、react-dom、 jsdom:优先从当前 DSH 的 profile node_modules($DSH_HOME/profiles/web) 解析,也可安装到插件旁的 .test-deps 目录;三者均不可用时该测试自动跳过:

npm install --prefix .test-deps --no-save jsdom react react-dom

Compatibility

DSH 0.1.7-rc.1: failedDSH 0.1.7-rc.2: failedDSH 0.2.0-rc.1: failed

Versions

Latest versionPublishedSize
0.1.0——

Comments

Loading…

Similar plugins

dsh-peak-cost-mode

by moon09300731

Auto-switches the agent to ultra-compressed caveman-style output during DeepSeek peak-pricing hours (Beijing 09:00–12:00 / 14:00–18:00, price x2) and shows a status badge plus transition toasts.

Notifications & IntegrationsModels & ProvidersManifest valid

★ 3

↓ 230/wk

MIT

JavaScript

Aug 25, 2026

dsh plugin --profile web add dsh-peak-cost-mode

by hojas

侧栏的 DeepSeek API 价格时段提醒:当前处于空闲时段还是高峰时段、距离切换还有多久,以及当前生效的价目表。

Tools & CapabilitiesManifest valid

★ 0

JavaScript

Oct 12, 2026

dsh plugin --profile web add dsh-price-tip

by OwlNjust

DeepSeek balance and usage monitor for DSH: a corner widget showing topped-up balance, per-model period consumption, token breakdown, and a Beijing-time peak/off-peak price reminder. Add a DeepSeek AP

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Oct 22, 2026

dsh plugin --profile web add deepseek-balance-dsh

by xiangrikuibaize

DSH 输入框下方的计费时段与余额药丸:峰价/谷价(含中国法定节假日与周末规则)、切换倒计时、账户余额(桌面端账号优先,API Key 兜底)

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 3

↓ 126/wk

NOASSERTION

JavaScript

Oct 5, 2026

dsh plugin --profile web add dsh-tide-badge

DeepSeek Harness usage analytics dock on the composer: Beijing-time peak/valley pricing with all-day weekend valley rate, live balance, cross-session history, by-date drill-down and charts.

Tools & CapabilitiesModels & ProvidersManifest valid

★ 0

dsh plugin --profile web add @deepseek-ai/dsh-client-ui-usage

Shows DeepSeek peak/off-peak pricing status, a countdown to the next rate change, and the estimated session cost as inline text beside the model selector.

UI & ExperienceManifest valid

★ 0

dsh plugin --profile web add @imnotndesh/dsh-peak-pricing-warning