DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Ration — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
R

dsh-ration

Ration

DeepSeek Harness plugin: ration — a self-imposed 5-hour/week token limit to prevent overuse (benchmarked against Kimi: 40 million/200 million); once exceeded, it stops accepting new work

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:wobenshiwomu/dsh-ration#814a55a7acde7f6cdbc934497a567072c32057c9
READMECompatibilityVersions

Compatibility and provenance

Ration is published as dsh-ration and currently resolves to version 0.1.2. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/13/2026

Versions

0.1.2stable
10/13/2026
0.1.1stable
10/12/2026

Related plugins

Loading related plugins…

Latest
0.1.2
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/13/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Whale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinClient Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilitiesPer-model capability declarations (image input and reasoning efforts) for custom pi-ai providers, edited in place on the Models settings cards; writes the official llm-pi-ai settings namespace, no DSH source changes.Cost Meterdsh-cost-meterDeepSeek Harness session cost statistics plugin: current session cost, today’s charges, historical records, and synchronization with official pricing; supports multi-provider, multi-model price calculation (built-in pricing catalog for 170+ model IDs with automatic matching); queries and displays suCodex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode

README

dsh-ration(配给)

自己给自己防沉迷的 token 限额插件 —— 5 小时滚动窗 + 周,两把闸;越线就不接新活。 刻度对标 Kimi:5h : 周 = 1 : 5(默认 4000 万 / 2 亿)。

是什么

DSH 里没有"套餐额度"这回事,按 token 烧钱、无限续杯——很容易一坐就是十几个小时。 配给给你装两把闸:

闸默认额度重置方式
5 小时滚动窗4000 万 token滚动:烧掉的份额随时间自己流回来(Kimi 式)
周2 亿 token每周一 00:00

越线不做:任一把闸越线 → 左下角挂件变红,新的指令发不出去(正在跑的回合不受影响)。 "/" 开头的命令永远放行,所以被拦时可以用 /ration off 当场自救。

界面

  • 左下角小挂件:两根细条 —— 5 小时窗、周(平时不打扰,瞄一眼就知道用了多少)。 亮暗跟随 DSH 主题(走设计令牌,不需要手动切)。
  • 点开:两把闸的进度 + 详细 Token 消耗(今日拆分:新 prompt / 输出 / 缓存读; 缓存占比;近 7 天迷你柱状图)。
  • 配色会自动预警:80% 起变黄,越线变红。

命令

/ration                          查看两闸状态
/ration on | off                 越线不做 开 / 关
/ration set 5h|week N            改额度(支持 k/m/b/万/亿:/ration set week 1.5亿)
/ration unset 5h|week            撤回改值,回到 profile 配置
/ration gate 5h|week on|off      单独开关某把闸

实现要点

  • 账本:启动时回填全部会话日志(sessionPersistence),之后由 session/event 实时增量;按 (会话, seq) 幂等,重启/重放不重复计。零 token、不打扰模型。
  • 统计口径:每条 assistant 消息的 usage.totalTokens(含缓存读与写入)。
  • 越线拦截:客户端在捕获层拦下输入框 Enter 与发送按钮;状态过期时自动 fail-open (不会因为插件故障挡住你干活)。
  • 状态持久化在 $DSH_HOME/storages/dsh-ration/state.json,账本默认保留 35 天。
  • 跨插件接口(v0.1.2):ctx.provide('ration') 服务(setCaps / getCaps)+ POST /dsh-ration/set 路由——供 dsh-plan 订阅后自动校准额度。

配置(profile 层可覆盖)

- id: dsh-ration
  config:
    cap5h: 40000000      # 5 小时滚动窗
    capWeek: 200000000   # 周
    enforce: true        # 越线不做
    gate5h: true
    gateWeek: true
    warnPct: 0.8
    keepDays: 35

安装

dsh plugin --profile web add 'https://codeload.github.com/wobenshiwomu/dsh-ration/tar.gz/v0.1.1'

或在图形界面:侧栏「插件」→ 添加插件 → 填上面这条 URL。装完重启 DSH 生效。 URL 末段的 v0.1.1 是版本标签;升级时换成本仓库的新版本标签重装即可。

开发

node test/sim.mjs          # 72 项断言(含真实会话日志回填校验)
# 重建客户端(需要一个 esbuild 二进制:cp 别家的 scripts/esbuild,或 npm i -g esbuild)
ESBUILD_BIN=scripts/esbuild node scripts/build-client.mjs