DeepSeek Harness plugin

dsp-deepseek-peak

DeepSeek API 计费峰谷提示:常驻显示当前峰/谷时段;峰时段使用 DeepSeek V4 Pro 提交任务时弹窗二次确认(支持今日不再提醒)

Jump to install

Source facts

Repository
Heldea-xianmiao/dsp-deepseek-peak
Latest update
Aug 20, 2026
Category
Notifications & Integrations
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Heldea-xianmiao/dsp-deepseek-peak
Plugin: dsp-deepseek-peak
Author: Heldea-xianmiao

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsp-deepseek-peak

> DeepSeek API 计费峰谷提示 · 一个为 DeepSeek Harness Web GUI 制作的插件

DeepSeek API 采用分时段计费:北京时间每天 09:00–12:0014:00–18:00峰值时段(价格更高),其余时间为谷值时段。本插件在你的 DSH 界面里常驻显示当前处于峰还是谷,并在峰值时段DeepSeek V4 Pro 提交任务时弹出二次确认,避免在最高价的时间段不知不觉跑完高成本任务。

!license

功能特性

  • 常驻峰/谷徽章:显示在输入框下方的状态栏(conversation.composer.dock),绿点 = 谷时段,橙点 = 峰时段,附实时北京时间与峰时段范围,每 30 秒自动刷新。
  • 峰值时段二次确认:满足以下全部条件时,提交任务会在第一步开始前弹窗确认:

1. 当前为峰值时段(北京时间 09:00–12:00、14:00–18:00); 2. 当前会话使用的模型是 DeepSeek V4 Pro(跟随 composer 模型选择,实时生效); 3. 是你新提交的回合(子代理、工具续步、重试均不会重复弹窗)。

  • 三个选项

- 继续使用 — 按当前配置立即开始任务; - 今日不再提醒 — 继续使用,且北京时间当天之内不再弹窗; - 取消本次 — 本次任务不执行(回合以 blocked 结束,消息保留在会话中)。

  • 「今日不再提醒」跨重启生效:选择后写入浏览器 localStorage,并与宿主内存双向同步;页面刷新、DSH 宿主重启都不会丢失,北京时间零点自动失效。
  • 完全 fail-open:任何判断异常(无弹窗组件、会话异常、模型读取失败)都会直接放行,绝不卡住你的任务。

工作原理

┌───────────────────────── DSH Host ─────────────────────────┐
│  agent/pre-step 拦截(新回合第一步)                         │
│    → 峰时段?  → V4 Pro?  → 今日不再提醒?                  │
│    → userQuestions.ask 弹窗(继续 / 今日不再提醒 / 取消)     │
│    → 取消 = { kind: 'reject' },任务不执行                    │
│  webServer 同源路由:                                        │
│    GET  /dspk/state      → { noRemindDate, peakNow, ... }   │
│    POST /dspk/no-remind  → 上报浏览器侧的「今日不再提醒」      │
└─────────────────────────────────────────────────────────────┘
                          ▲ 同源 HTTP(本机回环)│ 镜像
┌───────────────────────── DSH Client ───────────────────────┐
│  composer.dock 峰/谷徽章(30s 刷新)                         │
│  localStorage 持久化「今日不再提醒」                          │
│  页面加载 / connection/reset 时上报 Host                     │
└─────────────────────────────────────────────────────────────┘
  • 峰谷判断使用北京时间(UTC+8),由 Host 与 Client 各自独立计算,不依赖系统时区设置。
  • 模型来源:agentDefaultModel.currentSelection()(composer 选择模型会同步为默认选择),兜底读取会话最近一次请求头。

安装

方式一:手动加入 profile(推荐)

1. 将本仓库克隆(或复制)到任意位置,例如:

``bash git clone https://github.com/Heldea-xianmiao/dsp-deepseek-peak.git ``

2. 在你的 DSH profile(如 $DSH_HOME/profiles/web)的 package.json 中添加依赖与 bundle:

``jsonc { "dependencies": { "dsp-deepseek-peak": "link:<本仓库的绝对路径>" }, "dsh": { "profile": { "bundles": [ /* ...原有列表... */, "dsp-deepseek-peak" ] } } } ``

3. 在 profile 目录执行 pnpm install(或按需手动建立 node_modules/dsp-deepseek-peak 链接)。 4. 重启 DSH。重启后输入框下方即出现峰/谷徽章;改 Host 侧代码需再次重启,仅改 lib/client.js 刷新页面即可。

方式二:dsh plugin 命令

dsh plugin --profile web add file:/path/to/dsp-deepseek-peak

(该命令转发给 pnpm;仍需在 profile 的 dsh.profile.bundles 中补一行 dsp-deepseek-peak,并重启 DSH。)

自定义

想改什么改哪里
峰谷时段(如改为 08:00–10:00)lib/index.jsisPeakNow()lib/client.jsisPeak()
触发弹窗的模型(如只对 V4 Pro 生效)lib/index.jsisDeepseekV4Pro()
弹窗文案lib/index.jsaskConfirmation() 中的选项与问题
徽章刷新间隔(默认 30s)lib/client.js 中的 window.setInterval(..., 30000)

修改后重启 DSH 生效。

隐私说明

  • 纯本地运行:所有计算(峰谷判断、模型判断、弹窗)都在你自己的 DSH 宿主与浏览器内完成,没有任何数据上传
  • 浏览器侧仅使用 localStorage 存储一个「今日不再提醒」的日期字符串(如 2025-09-06)。
  • Host 与 Client 通过 DSH 内置的 webServer 在本机回环地址通信,不经过任何第三方。
  • 本仓库不含任何凭据、令牌或本地路径。

兼容性

  • DSH Web profile(rc.6+),依赖宿主服务:agentDefaultModeluserQuestionswebServeragents
  • 无任何第三方运行时依赖,Host 为纯 ESM,Client 为标准 ModuleLoader bundle。

许可证

[MIT](LICENSE) © Heldea-xianmiao

---

English

A DSH (DeepSeek Harness) web plugin that shows whether DeepSeek API is currently on peak or off-peak billing (Beijing time 09:00–12:00 / 14:00–18:00 = peak), and asks for a second confirmation before starting a task with DeepSeek V4 Pro during peak hours — with a "don't remind me today" option. Everything runs locally; no data leaves your machine.