
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
dsh-high-fee-alert
Advanced tools
DeepSeek Harness 高峰资费提醒插件:每次启动时从 DeepSeek API 文档抓取最新定价,从 ntp.ntsc.ac.cn 获取北京时间,在峰时段弹出居中提醒窗口(710×430)。
DeepSeek Harness 高峰资费提醒插件:每次启动 DSH 时从
DeepSeek API 定价文档
抓取最新定价,从 ntp.ntsc.ac.cn(中国科学院国家授时中心)获取北京时间
(精确到分,UTC+8),处于高峰时段(峰谷定价中的“峰”)时在页面中央弹出
710×430 的提醒窗口。
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))
→ 反推高峰窗口(每天)。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调用价格偏高,请等待至 <最近的下一非峰时刻> 再使用。 |
# 安装到指定 profile(例如 web),CLI 会自动把本包追加进 bundles
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),均有内置默认值:
| 配置项 | 默认值 | 说明 |
|---|---|---|
pricingUrl | https://api-docs.deepseek.com/quick_start/pricing | 定价文档地址 |
ntpHost | ntp.ntsc.ac.cn | NTP 服务器 |
ntpPort | 123 | NTP 端口 |
ntpTimeoutMs | 2500 | NTP 超时 |
fetchTimeoutMs | 8000 | 定价文档抓取超时 |
pricingRefetchMs | 21600000 | 定价刷新间隔(6h) |
exitCode | 0 | 「好的」退出码 |
peakWindows | [] | 显式高峰窗口(北京时间 HH:mm-HH:mm 数组,覆盖文档解析) |
weekdaysOnly | null | 高峰是否仅限周一至周五(布尔;缺省跟随文档/回退) |
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
| 方法 | 路径 | 说明 |
|---|---|---|
| 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
FAQs
DeepSeek Harness 高峰资费提醒插件:每次启动时从 DeepSeek API 文档抓取最新定价,从 ntp.ntsc.ac.cn 获取北京时间,在峰时段弹出居中提醒窗口(710×430)。
We found that dsh-high-fee-alert demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.