dsh-output-loop-guard:在流式输出中拦截模型自重复退化环

dsh-output-loop-guard 是 ADistanceThereIs 维护的 DSH bundle 插件,监听 agent/assistant-stream,用滑动窗口与四条结构信号(repeated-block、dominant-gram、repeated-line、flat-tic)检测推理或可见文本中的退化循环。触发后通过 agent.cancel 中止生成,并以 agent.steer 注入纠正通知唤醒智能体,弥补仅检测重复工具调用的 repeat-tool-reminder 盲区。要求 DSH >= 0.2.0-rc.2,支持 dryRun、可配置阈值;README 记载 27 会话语料回放 24 检 0 误报。安装可用 GitHub commit、本地 tgz 或 v0.1.0 Release URL,需重启 DSH 生效。

阅读全文