Jessicaisleep/dsh-dsml-guard ↗★ 0

dsh-dsml-guard

Strips DSML markers leaked into assistant prose and resumes a turn only when it truly produced nothing; quota, rate-limit and context errors are never retried. / 抹掉漏进正文的 DSML 标记,并只对「真的什么都没产出」的轮次补发一条继续。

Package
dsh-dsml-guard
Compatibility
Unverified
Harness peer range
>=0.2.1-rc.2 <0.3.0
Version
0.1.2
License
MIT
Last updated
Oct 28, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Jessicaisleep/dsh-dsml-guard

一次性配置(已经做过,换电脑或换仓库才需要重来)

在 npmjs.com → 该 package → Settings → Trusted Publisher → GitHub Actions 填:

字段值
Organization or userJessicaisleep
Repositorydsh-dsml-guard
Workflow filenamepublish.yml
Environment留空

配好之后,本地 pnpm publish 就不再需要了;也建议到 npm 上吊销之前那个 npm_ token(它现在没用了,留着只是多一个可被滥用的凭据)。

配置(可选)

- id: dsml-guard
  name: dsh-dsml-guard
  config:
    enabled: true            # 总开关
    sanitize: true           # 抹标记
    autoContinue: true       # 自动补「继续」
    continueText: "继续"
    maxConsecutive: 5        # 连续续跑上限
    tailCloseMinChars: 80    # tail-close 形态下,正文短于这个才续跑
    retryCodes: [TIMEOUT, TRANSPORT, SERVER, MALFORMED_RESPONSE, PI_AI_ERROR, UNKNOWN]
    neverCodes: [QUOTA, QUOTA_EXCEEDED, ACCOUNT_QUOTA, RATE_LIMIT, AUTH,
                 MISSING_CREDENTIAL, CONTEXT_WINDOW_EXCEEDED, UNKNOWN_MODEL,
                 HTTP_413, INVALID_REQUEST]