aqiu817/dsh-plugin-continue-on-limit ↗★ 0

dsh-plugin-continue-on-limit

DeepSeek Harness plugin that auto-continues a turn the model ended by exhausting its output-token limit, with a per-session burst cap and a minimum interval between continuations. 适合长文本生成任务,可自动延续被截断的对话,支持设置最大续写次数与最小间隔。

パッケージ
dsh-plugin-continue-on-limit
互換性
未検証
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/10/12

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:aqiu817/dsh-plugin-continue-on-limit

ドキュメント

README 全文を読む ↗

配置

三个字段全部是 .volatile():在 Plugins 页面改了不重载 fiber, enabled: false 中途就能掐断一条正在跑的链。

字段类型默认说明
enabledbooleantrue总开关
continueTextstring (1–200)继续发什么文字
maxConsecutiveinteger (0–16)3单会话一条截断链最多自动续写几次;0 = 无上限
minIntervalMsinteger (0–600000)1500两次续写的最小间隔,防死循环

cordis.patch.yml 里的默认值:

- insert:
    - id: continue-on-limit
      name: 'dsh-plugin-continue-on-limit'
      config:
        enabled: true
        continueText: '继续'
        maxConsecutive: 3
        minIntervalMs: 1500

配置值不会被敲错一个数就失控

.volatile() 字段是从 Plugins 页面直接写进 reference cell 的,不走加载器的 Config 校验。也就是说 schema 只守住了初始组合那一次,运行期改值无人把关。

如果不加防护,在设置页把 maxConsecutive 敲成 -1 就能让它失效: decide() 里 if (maxConsecutive > 0 && ...) 直接短路,上限静默变成无限制。 minIntervalMs: -1 同理让冷却失效。

所以 readSettings() 对每个字段做了类型检查 + 钳制(LIMITS 和 schema 共用同一份 边界常量):

输入结果
maxConsecutive: -1 / 99 / 2.5 / 'lots'回落到默认 3
maxConsecutive: 0保留 0(显式的"无上限"是刻意选项)
minIntervalMs: -50 / 7000000回落到默认 1500
continueText: 42 / ' '回落到默认 '继续'
continueText: 'x'.repeat(400)截到 200
continueText: ' trim me '去空白 → 'trim me'
enabled: 'nope'回落到默认 true

关键点是负数回落到默认值,而不是回落到 0。0 是"关掉这道闸",一个误输的 负数不该有这个权力。