{"_id":"@dfy-plugins/dsh-turn-guard","_rev":"2-07a7619560351afcb0101a5c9b856e3f","name":"@dfy-plugins/dsh-turn-guard","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.2":{"name":"@dfy-plugins/dsh-turn-guard","version":"0.1.2","keywords":["deepseek-harness","dsh-plugin"],"license":"MIT","_id":"@dfy-plugins/dsh-turn-guard@0.1.2","maintainers":[{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"}],"homepage":"https://github.com/xiaoxiao44443/dfy-dsh-plugins#readme","bugs":{"url":"https://github.com/xiaoxiao44443/dfy-dsh-plugins/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-ui-settings"],"platform":"web"}},"dist":{"shasum":"88d3765daea5f8d1fa611e4b83a0aa7cef8f9730","tarball":"https://registry.npmjs.org/@dfy-plugins/dsh-turn-guard/-/dsh-turn-guard-0.1.2.tgz","fileCount":9,"integrity":"sha512-Ch30a59MsqknYUpXF6JmQvHP9mdx3nwhrwSW1B7A55vm/GdejKeTc7do3rAjP4lplYPj7Gd/T3685ir2iLY8Ig==","signatures":[{"sig":"MEUCIQCorSu5lmt0WZtR2q6wPSD63scRFa6GuPIKgH5KbwJdqgIgEfuYzdlDRoSoI+wGquF8C24Jk+E3IIELEzgpjYc0Wso=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47332},"main":"lib/index.js","type":"module","_from":"file:/Users/xiao/Projects/dfy-dsh-plugins/release/npm/dfy-plugins-dsh-turn-guard-0.1.2.tgz","types":"lib/index.d.ts","exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"scripts":{"test":"tsc -p tsconfig.json && node --test","build":"tsc -p tsconfig.json && node scripts/build-client.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit"},"_npmUser":{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"},"_resolved":"/Users/xiao/Projects/dfy-dsh-plugins/release/npm/dfy-plugins-dsh-turn-guard-0.1.2.tgz","_integrity":"sha512-Ch30a59MsqknYUpXF6JmQvHP9mdx3nwhrwSW1B7A55vm/GdejKeTc7do3rAjP4lplYPj7Gd/T3685ir2iLY8Ig==","repository":{"url":"git+https://github.com/xiaoxiao44443/dfy-dsh-plugins.git","type":"git","directory":"plugins/turn-guard"},"_npmVersion":"11.13.0","description":"为单轮任务提供收敛提醒、重复调用检测和可配置的硬停止预算。","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","esbuild":"^0.24.0","typescript":"^5.5.0","@types/react":"~18.3.1","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.1.1-rc.2","@deepseek-ai/dsh-agent":"^0.1.1-rc.2","@deepseek-ai/dsh-tools":"^0.1.1-rc.2","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-settings":"^0.1.1-rc.2","@deepseek-ai/dsh-client-ui-settings":"^0.1.1-rc.2","@deepseek-ai/dsh-client-ui-primitives":"^0.1.1-rc.2"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-llm":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-agent":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-tools":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-settings":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-client-ui-settings":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1","@deepseek-ai/dsh-client-ui-primitives":"^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.5-alpha.1"},"_npmOperationalInternal":{"tmp":"tmp/dsh-turn-guard_0.1.2_1789009099883_0.30636662058011477","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"_id":"@dfy-plugins/dsh-turn-guard@0.1.3","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-ui-settings"],"platform":"web"}},"bugs":{"url":"https://github.com/xiaoxiao44443/dfy-dsh-plugins/issues"},"dist":{"shasum":"6e0609890d0321add86bc53e73d480170bb1045c","tarball":"https://registry.npmjs.org/@dfy-plugins/dsh-turn-guard/-/dsh-turn-guard-0.1.3.tgz","fileCount":11,"integrity":"sha512-jT0ylBGgqQ1XvCnXtSr+BuZS6kWpd+ze2nfnQk775pv0TWTor2yPLz2qIricxy6b0SHywNRq174EyTqMg0/Pyw==","signatures":[{"sig":"MEUCIQDvgRrq9BZznD/IxI/3RVRq+UB6wVvpQFvs8KM5B3BFDQIgCAR1yYgZhdJYia7eKpuYXRkNkC7EuJkP1BQSvDJLSns=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDYlyE6GJSXn9f/OOCym6cFoiRx5GVMzOcdlzL1MY4llgIhAPzNBRZ9BEqXsNzGFwwDQ2HBK6GP8JWi9BVwyh8nS08Y"}],"unpackedSize":47887},"main":"lib/index.js","name":"@dfy-plugins/dsh-turn-guard","type":"module","_from":"file:E:/项目文件/dfy-dsh-plugins/release/npm/dfy-plugins-dsh-turn-guard-0.1.3.tgz","types":"lib/index.d.ts","exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json","./locale/*.json":"./locale/*.json"},"license":"MIT","scripts":{"test":"tsc -p tsconfig.json && node --test","build":"tsc -p tsconfig.json && node scripts/build-client.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit"},"version":"0.1.3","_npmUser":{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"},"homepage":"https://github.com/xiaoxiao44443/dfy-dsh-plugins#readme","keywords":["deepseek-harness","dsh-plugin"],"_resolved":"E:\\项目文件\\dfy-dsh-plugins\\release\\npm\\dfy-plugins-dsh-turn-guard-0.1.3.tgz","_integrity":"sha512-jT0ylBGgqQ1XvCnXtSr+BuZS6kWpd+ze2nfnQk775pv0TWTor2yPLz2qIricxy6b0SHywNRq174EyTqMg0/Pyw==","repository":{"url":"git+https://github.com/xiaoxiao44443/dfy-dsh-plugins.git","type":"git","directory":"plugins/turn-guard"},"_npmVersion":"11.16.0","description":"为单轮任务提供收敛提醒、重复调用检测和可配置的硬停止预算。","directories":{},"maintainers":[{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"}],"_nodeVersion":"24.18.0","dependencies":{"@dfy-plugins/resource-core":"^0.1.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","esbuild":"^0.24.0","typescript":"^6.0.3","@types/react":"~18.3.1","@deepseek-ai/cordis":"^4.0.3","@deepseek-ai/dsh-llm":"0.1.7-alpha.1","@deepseek-ai/dsh-agent":"0.1.7-alpha.1","@deepseek-ai/dsh-tools":"0.1.7-alpha.1","@deepseek-ai/schemastery":"^3.18.3","@deepseek-ai/dsh-settings":"0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-settings":"0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-primitives":"0.1.7-alpha.1"},"peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.3","@deepseek-ai/dsh-llm":">=0.1.7-alpha.1","@deepseek-ai/dsh-agent":">=0.1.7-alpha.1","@deepseek-ai/dsh-tools":">=0.1.7-alpha.1","@deepseek-ai/schemastery":"^3.18.3","@deepseek-ai/dsh-settings":">=0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-settings":">=0.1.7-alpha.1","@deepseek-ai/dsh-client-ui-primitives":">=0.1.7-alpha.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-turn-guard_0.1.3_1790088657326_0.17000309871201913"}}},"time":{"created":"2026-09-10T02:58:19.708Z","modified":"2026-09-22T14:50:57.634Z","0.1.2":"2026-09-10T02:58:20.008Z","0.1.3":"2026-09-22T14:50:57.447Z"},"bugs":{"url":"https://github.com/xiaoxiao44443/dfy-dsh-plugins/issues"},"license":"MIT","homepage":"https://github.com/xiaoxiao44443/dfy-dsh-plugins#readme","keywords":["deepseek-harness","dsh-plugin"],"repository":{"url":"git+https://github.com/xiaoxiao44443/dfy-dsh-plugins.git","type":"git","directory":"plugins/turn-guard"},"description":"为单轮任务提供收敛提醒、重复调用检测和可配置的硬停止预算。","maintainers":[{"name":"xiaoxiao44443","email":"xiaoxiao44443@163.com"}],"readme":"# @dfy-plugins/dsh-turn-guard\n\nDeepSeek Harness 的单轮任务收敛守卫。它在模型运行过久、连续发出相同工具调用或连续得到同类错误时先注入提醒，再按设置决定是否停止当前回合。\n\n默认策略：\n\n- 第 12 个模型步骤、第 6 次工具调用或时间预算接近上限时提醒收敛；\n- 每轮首次模型步骤注入通用执行契约：最新纠正优先、用户输入原样传递、工具和技能按明确任务动作选择；\n- 先定义可观察的完成条件与最小验证方式，每次调用必须减少关键不确定性、推进所需状态或验证结果；\n- 成功结果中的实际内容才算外部证据；失败、超时、空结果、未打开页面、搜索标题和模型记忆不能支撑引用或确定结论；\n- 比较多个解释、实现或候选时使用同一组决定性约束，并在冲突事实出现后立即作废对应假设；\n- 回答前区分已验证、合理推断和未知，决定性结论仍未验证时不得强答；\n- 连续两次调用没有实质进展时停止工具循环，下一条内容直接面向用户，不再内部猜测、反复比较或补全结论；\n- 工具必须按契约使用，URL、本地路径、命令和资源类型不得混用，失败后不得换个近似参数重复同一思路；\n- 超过 20 个模型步骤、50 次根工具调用或 15 分钟时停止；\n- 相同工具与参数或相同错误连续出现 3 次时停止；\n- 工具内部的嵌套调用不重复计数；\n- 达到硬限制时先封锁后续工具，并给模型一次仅用于说明原因与现状的收尾步骤；仍不收敛才强制停止；\n- 停止时保留已经产生的消息、工具结果和待处理用户输入。\n\n设置侧栏的“任务守卫”页面可以独立调整所有阈值，也可改为只提醒不停止。\n\n```bash\npnpm --filter @dfy-plugins/dsh-turn-guard test\npnpm --filter @dfy-plugins/dsh-turn-guard build\ndsh plugin --profile web add ./plugins/turn-guard\n```\n","readmeFilename":"README.md"}