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 标记,并只对「真的什么都没产出」的轮次补发一条继续。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Jessicaisleep/dsh-dsml-guardドキュメント
README 全文を読む ↗一次性配置(已经做过,换电脑或换仓库才需要重来)
在 npmjs.com → 该 package → Settings → Trusted Publisher → GitHub Actions 填:
| 字段 | 值 |
|---|---|
| Organization or user | Jessicaisleep |
| Repository | dsh-dsml-guard |
| Workflow filename | publish.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]