DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Nightshift — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
N

dsh-nightshift

Nightshift

dsh 第三方插件:在高峰时段排队,非高峰时段清空队列,并报告节省的费用。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:mikasaxin529/dsh-nightshift#358052402749c2830045216bdb0345250f6f32f1
README兼容性版本
dsh web panel demo

兼容性与来源证明

Nightshift 以 dsh-nightshift 发布,当前版本为 1.0.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/9/2

版本

1.0.1stable
2026/9/2
1.0.0stable
2026/9/2

相关插件

正在加载相关插件…

最新版
1.0.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/9/2
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编码计划配额,并提供实时令牌使用记录,同时在侧边栏条目中显示当前会话提供商今日的使用量Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。Ui Usage Billing@kenz1117/dsh-ui-usage-billingDeepSeek Harness 的用量计费仪表板:侧边栏成本指标和完整的仪表板模态窗口,依据当前多提供商目录定价,并汇总会话日志中的实际用量。

README

dsh-nightshift (Night Shift) 🌙

English | 简体中文

Queue during peak hours. Drain off-peak. Read the savings in the morning.

A third-party plugin for DeepSeek Harness (dsh). During the daytime peak windows your tasks wait in a queue; when the off-peak window opens, nightshift dispatches them one at a time into your sessions, retries failures with backoff, auto-continues max-tokens truncations, and books the real token spend against your peak/off-peak prices. When the queue empties (or peak returns) it writes a per-day savings report.

 daytime (peak)              night (off-peak)
┌────────────────────┐      ┌────────────────────┐
│ 🌙 等低谷  2小时13分 │ ───▶ │ 🚀 夜航中  8小时40分 │
│ queued: 3 tasks     │      │ ▶ task 1/3 done    │
│ (frozen, no spend)  │      │ ▶ task 2/3 running │
└────────────────────┘      └────────────────────┘
                             2026-09-01 report:
                             12 tasks · 8.4M tokens
                             cost ¥8.40 · saved ¥8.40

dsh web panel demo

Why

DeepSeek's off-peak pricing (roughly UTC+8 night hours — check the current announcement) is a fraction of the peak price. But agents run when you are at the keyboard, which is exactly when compute is most expensive. Nightshift inverts that: write the task now, let the queue hold it until the price drops, wake up to finished work and a report of what the patience bought.

Features

  • One-chip enqueue — a 🌙 chip next to the conversation composer hands the current draft to nightshift (default target: continue the current session); the "new session" button runs it in a fresh session instead (directory follows the current workspace and joins its sidebar group, or the dsh default when ungrouped).
  • Peak freeze — no dispatch during peak windows; a task already running when peak arrives is left to finish naturally (finished work is never interrupted).
  • Off-peak drain — one task at a time, drainGapMs between dispatches, cold sessions auto-resumed by the harness.
  • Failure policy — turn/end reasons are classified: error/interrupted → exponential backoff retry (bounded); max-tokens → auto-send the continuation prompt (bounded); blocked → parked for a human; aborted → treated as your cancellation.
  • Savings ledger — per-turn token deltas (four buckets) are priced at the window in effect when they happened, so cross-window and retried tasks book faithful money.
  • Daily reports — generated when the queue empties or peak returns; same-day re-runs merge without double counting.
  • Durable queue — a restart re-queues orphaned running tasks (at-least-once); nothing is lost to a reload or crash.
  • Panel — sidebar entry with window banner, live task row, queue with run-now/cancel, history, and the latest report.

Requirements

  • dsh with the web profile (the host process must stay resident — it does, independent of the browser tab).
  • Node.js ≥ 20.

Install

Official channel (recommended) — dsh's built-in plugin command does everything in one line (link + auto-added to the profile's bundles; no file edits):

dsh plugin --profile web add github:mikasaxin529/dsh-nightshift

Swap the profile name for another (headless, …); pin a commit with github:mikasaxin529/dsh-nightshift#<sha>; uninstall with dsh plugin --profile web remove dsh-nightshift. Restart dsh to activate. From a local clone, pass the repo path instead of the github: spec.

Script — from this repo's directory (wraps the official channel; falls back to manual mode when dsh is not on PATH):

.\install.ps1                    # installs into the web profile
.\install.ps1 -Profile headless  # another profile

Manual fallback (no dsh CLI) — three steps:

.\install.ps1 -Manual -Target "$env:USERPROFILE\.dsh\profiles\node_modules" -Profile "$env:USERPROFILE\.dsh\profiles\web"

Or fully by hand:

  1. Link or copy this folder into the node_modules the profile resolves plugins from, named dsh-nightshift (the default dsh layout shares ~\.dsh\profiles\node_modules).

  2. Append to the target profile's cordis.patch.yml:

    - insert:
      - id: nightshift
        name: dsh-nightshift
    
  3. Restart dsh (or let the loader hot-apply the patch).

The plugin shares the host's own @deepseek-ai/* instances (declared as optional peerDependencies on purpose — bundling a second copy would break cordis service identity). Do not npm install its dependencies into the plugin folder on the host side; devDependencies are only for running the test suite.

Configuration

All keys live under the nightshift entry in your loader config (defaults shown):

keydefaultmeaning
timeZoneAsia/ShanghaiIANA zone the windows are interpreted in
peakWindows09:00–12:00, 14:00–18:00[start, end) wall-clock windows; may cross midnight; [] = never peak
peakPricePerMTok2price per million tokens during peak (fill your real number)
offPeakPricePerMTok1price per million tokens off-peak
currency¥display only
tickMs30000window-check / dispatch tick
maxRetries3retries for error/interrupted turns
retryBaseMs / retryFactor / retryMaxMs60000 / 2 / 1800000exponential backoff base, factor, ceiling
continuationLimit3auto-「继续」sends per task on max-tokens
continuationPrompt继续the continuation prompt text
drainGapMs5000pause between dispatches
allowRunNowtruewhether the panel's run-now button is honored
reportRetentionDays30report pruning
exposeToolfalsereserved for v1.1 (nightshift_enqueue tool)

How it works

  • The host half (index.js) is a cordis function plugin: one self-rescheduling setTimeout tick (never setInterval), a session/event listener that reacts to turn/end, two GET exact-fetch routes (/api/nightshift/state, /api/nightshift/report) and three POST webServer routes (enqueue, task/cancel, task/run-now) guarded by the connection's request rejection. Queue and reports persist through ctx.storageDomain (zod row schemas).
  • The client half (client.js) is a hand-authored window.__ModuleLoader__.load factory — a classic script registering two slots: the composer chip (conversation.input.dock) and the sidebar panel (sidebar.footer.action). It polls the state route (30s when the panel is open, 2min closed) and never holds UI state that a reload cannot rebuild.
  • Display helpers live in lib/format.js (shared semantics, re-inlined in the client factory, which cannot reach the host's module graph).

Differences from adjacent plugins

  • vs sleep-send / scheduled tasks: those send at a time you name; nightshift follows the price window — you configure windows once, not per task, and re-configuring re-freezes/unfreezes the whole queue.
  • vs session-guard / input-traffic: those shape or gate interactive input; nightshift never touches your live sessions. Freeze means "no dispatch", not "session frozen" — manual work keeps flowing at any hour.

Known limitations

  • Cache pricing is simplified: all four token buckets bill at the same window price (cache reads are overcharged versus DeepSeek's real cache pricing, so the reported savings are conservative on that axis).
  • At-least-once: a crash mid-task re-runs the task on restart. The task is idempotent or re-runnable at your discretion.
  • One task at a time — a deliberate v1 invariant.
  • Prices are your declared numbers; nightshift has no balance/pricing API to check against.
  • Changing config triggers an HMR reload (timers/domain/listeners are disposed cleanly); queued tasks survive in storage.

Develop

npm install   # devDependencies only (test tooling + type-real imports)
npm test      # 117 vitest cases

Layout and the full design contract live in SPEC.md.

License

MIT