返回目录
模型与 MCP 插件

dsh-quota-autoresume

shuijhu/dsh-quota-autoresume

DeepSeek Harness plugin that resumes tasks stopped by plan-quota exhaustion, right after the next quota reset (05:00/10:00/15:00/20:00/24:00).

Stars
0
Forks
0
Issues
0
更新
18 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:shuijhu/dsh-quota-autoresume

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

Quota Auto-Resume (套餐额度自动续跑)

A DeepSeek Harness plugin that keeps a task alive across a plan-quota reset.

dsh-plugin

What it does

  1. A model request that exhausts the plan quota ends the turn with an error. The plugin recognises that failure (HTTP 429, rate_limit, quota, insufficient, 余额不足, 额度, …) and parks the Session instead of losing it.
  2. It arms a timer for the next quota reset boundary — by default 05:00, 10:00, 15:00, 20:00 and 24:00 local time.
  3. At that boundary it admits a short "continue" prompt into every parked Session, so the agent picks the work up again from where it stopped.

The parked list is written to state.json next to the plugin, so a restart of the Harness does not lose a stopped task. If the Harness was closed while a task was parked and it starts again after a reset boundary already passed, the task is resumed immediately. Every action is appended to plugin.log.

Install

git clone https://github.com/shuijhu/dsh-quota-autoresume.git

Then install the cloned directory as a bundle — in the Harness Web UI under Settings → Plugins → Install bundle, or from the Plugin Manager tool with the clone path as the bundle target. The bundle inserts the plugin row quota-autoresume, which is enabled with the defaults below.

Configuration

The row config lives in cordis.patch.yml of this package. To change it for your profile, add an override to the profile patch layer (~/.dsh/profiles/<profile>/cordis.patch.yml):

- id: quota-autoresume
  name: '@local/dsh-quota-autoresume'
  config:
    enabled: true
    resetHours: [5, 10, 15, 20, 24]
    resumeMessage: '套餐额度已重置,请继续之前中断的任务。'
    detectAllErrors: false
    maxAttempts: 0
Option Default Meaning
enabled true Master switch.
resetHours [5,10,15,20,24] Local hours of the quota reset. 24 means midnight.
resumeMessage Chinese continue prompt Message handed to the parked task.
detectAllErrors false Park on any turn error, not only quota-shaped ones.
maxAttempts 0 Resume attempts per parked task; 0 means unlimited.
quotaPatterns built-in list Extra regular expressions that mark a failure as a quota failure.

Controls

  • Slash command /quota-resume — prints the parked tasks and the next reset time; /quota-resume now resumes every parked task immediately.
  • Tool quota_autoresume — action: "status" | "resume_now" | "forget". The tool is registered globally, so an agent preset that restricts the tool set hides it; the slash command always works.

Files

File Purpose
index.js Plugin entry: detection, parking, reset timer, resume.
schedule.js Pure reset-boundary arithmetic and quota-failure detection.
test/schedule.test.mjs Checks for both — run node test/schedule.test.mjs.
state.json / plugin.log Runtime state and log (git-ignored).

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。