rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ggghhh-11/dsh-peak-hour-reminder
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness 的本地 host 插件:在模型调用高峰时段先暂停并询问是否继续;接受后当前高峰窗口内保持静默;跨入新高峰窗口再询问。另有节假日数据自动更新与清理。
高峰开局询问
跨峰暂停
节假日数据自动更新
coverageThrough(已完整覆盖到哪一年)。retentionYears 可调)。以 DeepSeek 官方 API 峰谷定价为准(2026-11-03 核对):
| 时间段(北京时间) | 状态 |
|---|---|
| 周一至周五 09:00–12:00、14:00–18:00 | 高峰 |
| 周一至周五其余时间 | 空闲 |
| 周六、周日全天 | 空闲 |
| 中国法定节假日全天 | 空闲 |
换算自官方规则:高峰为 UTC 01:00–04:00、06:00–10:00,周一至周五,排除中国法定节假日。来源:
内置基线包含 2026 年完整假期和 2027 年元旦(2027 其余假期待官方通知,由自动更新或 extraHolidays 补全)。
dsh plugin --profile web add github:ggghhh-11/dsh-peak-hour-reminder
然后重启 dsh web。插件包内的 cordis.patch.yml 会自动注册 host 行,不需要手动改 profile 补丁。
DSH Desktop 的 desktop profile 由应用独占管理,CLI 的 dsh plugin --profile desktop ... 会被拒绝。可以:
C:\plugins\dsh-peak-hour-reminder),在 %USERPROFILE%\.dsh\profiles\desktop\package.json 中:"dependencies": {
"dsh-peak-hour-reminder": "link:C:/plugins/dsh-peak-hour-reminder"
}
并在 dsh.profile.bundles 中加入 "dsh-peak-hour-reminder",然后在 profile 目录执行 pnpm install,重启 DSH Desktop。
插件包内的
cordis.patch.yml会自动 insert 一行;不要再往 profile 的cordis.patch.yml手动 insert 同一个 id,否则 duplicate loader entry id 会导致启动失败。
在 profile 的 cordis.patch.yml 用 id 覆盖(不是 insert):
- id: dsh-peak-hour-reminder
config:
timeZone: Asia/Shanghai
peakWindows:
- { start: '09:00', end: '12:00' }
- { start: '14:00', end: '18:00' }
weekendOffPeak: true
pauseOnPeakCrossing: true
askOnPeakStart: true
quietAfterContinue: true
showPriceHint: true
updateEnabled: true
updateUrls:
- https://timor.tech/api/holiday/year/{year}
retentionYears: 1
常用项:
enabled:总开关,默认 true。timeZone:默认 Asia/Shanghai;DeepSeek 峰谷按北京时间。peakWindows:高峰窗口,支持跨午夜(如 22:00–02:00)。weekendOffPeak:周末全天空闲,默认 true。extraHolidays:额外假日 YYYY-MM-DD 数组(补官方尚未发布的假期、公司假日)。pauseOnPeakCrossing:跨峰暂停询问,默认 true。askOnPeakStart:高峰开局立即询问,默认 true。quietAfterContinue:用户选择继续后,本高峰窗口内不再发提醒,默认 true;设为 false 可保留每回合 notice。showPriceHint:是否在高峰提醒里附价格提示,默认 true。updateEnabled:是否联网更新节假日,默认 true;关闭后完全离线。updateUrls:节假日 JSON 模板,必须包含 {year};默认 timor.tech。dataDir:数据目录,默认 $DSH_HOME/peak-hour-reminder(通常是 %USERPROFILE%\.dsh\peak-hour-reminder);一般不需要改。retentionYears:保留多少个过去年份,默认 1(保留上一年)。debugNow / debugForceUpdate / debugForcePause:测试钩子,默认关闭。配置非法时回退默认值并打印 warning,不会让插件加载失败拖垮 DSH。
默认位置:%USERPROFILE%\.dsh\peak-hour-reminder\holidays.json(macOS/Linux 为 ~/.dsh/peak-hour-reminder/holidays.json)。
{
"schemaVersion": 1,
"updatedAt": "2026-11-03T12:00:00.000Z",
"coverageThrough": 2026,
"years": {
"2026": { "status": "complete", "source": "https://...", "fetchedAt": "...", "holidays": ["2026-01-01"] },
"2027": { "status": "partial", "source": "builtin:known-new-year", "fetchedAt": "...", "holidays": ["2027-01-01"] }
},
"lastAttemptAt": "...",
"nextCheckAt": "...",
"lastError": null
}
complete:整年数据;partial:只知部分;unknown:尚未发布。coverageThrough 是所有 complete 年份的最大值。lastError 记录原因,nextCheckAt 控制重试。holidays.json.corrupt-<时间戳>,回退内置基线。更新源响应格式(timor.tech):
{ "code": 0, "holiday": { "01-01": { "holiday": true, "date": "2026-01-01" } } }
只取 holiday: true 的日期;holiday: false 的补班日不影响峰谷定价(周末仍然空闲)。
默认位置:%USERPROFILE%\.dsh\peak-hour-reminder\state.json
{
"schemaVersion": 1,
"acceptedWindowKey": "2026-11-04:14:00-18:00",
"acceptedAt": "2026-11-04T07:46:00.000Z",
"pausedWindowKey": null,
"pausedAt": null
}
acceptedWindowKey:用户已选择继续的窗口;该窗口内不再询问、不再发 notice(quietAfterContinue: true 时)。pausedWindowKey:用户选择暂停、等待「继续」恢复的窗口。node scripts/run-tests.mjs
在 Windows 沙箱下,
node --test会为每个测试文件 spawn 子进程并因 piped stdio 被拒绝(EPERM)。scripts/run-tests.mjs在单进程内导入所有测试文件,效果相同且可在沙箱中运行。
真实网络冒烟检查:
node scripts/net-check.mjs
期望输出 2026 年 status: "complete"、holidays: 33;若网络不可达会打印错误并保留旧数据。
当前时间若不是高峰,可用临时配置强制一个覆盖当前时间的窗口:
- id: dsh-peak-hour-reminder
config:
peakWindows:
- { start: '00:00', end: '23:59' }
发送一条新消息,应在模型回答前弹出“继续/暂停”询问卡。验证完请删除该配置并恢复默认窗口;如需重新测试,可删除 state.json。
验证跨峰询问(step 2)时再加:
debugForcePause: true
debugForcePause 会强制把回合视为“从空闲开始”,从而在第 2 步触发跨峰询问。
package.json 移除 dsh-peak-hour-reminder 依赖和 dsh.profile.bundles 中的条目。node_modules/dsh-peak-hour-reminder 链接/安装目录。%USERPROFILE%\.dsh\peak-hour-reminder 数据目录。临时禁用(不卸载):在 profile 的 cordis.patch.yml 加:
- id: dsh-peak-hour-reminder
disabled: true
插件唯一的出站请求是配置的节假日 JSON URL(默认 https://timor.tech/api/holiday/year/{year})。不发送会话内容、不发送用户标识。updateEnabled: false 可完全关闭联网。
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-api、deepseek-harness。