{"_id":"@aiwayds/dsh-llm-net-retry","_rev":"10-cb068bc2178da9c0d1a42ed9ab55463c","name":"@aiwayds/dsh-llm-net-retry","dist-tags":{"latest":"0.7.0"},"versions":{"0.1.0":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.1.0","keywords":["dsh","plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.1.0","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"5d7d30c0ae7d02d2eff8f963c5c95af923f35f82","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.1.0.tgz","fileCount":16,"integrity":"sha512-ej44UIIIMq5/NCFaqd9lyl+/KlRlvDWvsyfM+6rzuqTrYE9R+0w7aMODNN5s/FYWh/RTIMFgrXYKx8pl/d95gA==","signatures":[{"sig":"MEYCIQCFWqp4eOeMEGjZET2c3rAdzaukCyL0Ve8Dh2Mk5DMzdwIhAPujF/Ax+nBImIQd0rpCuv1Jn8NROQopiKg6mNwkOFmu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48060},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"f6f58c149829c1b8a52d88ce9e4f89d5c5717f51","scripts":{"test":"node --test test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"11.17.0","description":"dsh plugin: bounded retry for gateway network_error failures the stock retry policy cannot classify (e.g. OpenCode Zen finish_reason: network_error)","directories":{},"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@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-brand":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/schemastery":"3.18.1","@deepseek-ai/dsh-llm-pi-ai":"0.1.1-rc.2","@deepseek-ai/dsh-llm-retry":"0.1.1-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.1-rc.2","@deepseek-ai/dsh-agent-loop-testkit":"0.1.1-rc.2"},"peerDependencies":{"@deepseek-ai/dsh-llm":"0.1.1-rc.2","@deepseek-ai/dsh-agent":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/schemastery":"3.18.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.1.0_1787369876979_0.8900847633857434","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.1.1","keywords":["dsh","plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.1.1","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"e7df6efe3af938add71a4597bc73407f2e87ac1c","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.1.1.tgz","fileCount":17,"integrity":"sha512-3hHuhxP7FmjBYVHjnuujKM49AB/mFSRXnxBYMQN9UwfTLFABGt2SsbQlhOsu1NXJ9E7vPjMUAi1GRIUvMfMRuA==","signatures":[{"sig":"MEYCIQC8r/wsWphuJITtphuRiV4yvPjy4jVeq6b9DM2P6y825QIhAIvrimJW7rRoRQaNb6dEdTMY1wtMn7yDzUj1ERYvTOeS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53488},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"bd1f375de9b25c317e36a618c94294d173e58eb5","scripts":{"test":"node --test test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"11.17.0","description":"dsh plugin: bounded retry for gateway network_error failures the stock retry policy cannot classify (e.g. OpenCode Zen finish_reason: network_error)","directories":{},"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@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-brand":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/schemastery":"3.18.1","@deepseek-ai/dsh-llm-pi-ai":"0.1.1-rc.2","@deepseek-ai/dsh-llm-retry":"0.1.1-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.1-rc.2","@deepseek-ai/dsh-agent-loop-testkit":"0.1.1-rc.2"},"peerDependencies":{"@deepseek-ai/dsh-llm":"0.1.1-rc.2","@deepseek-ai/dsh-agent":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/schemastery":"3.18.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.1.1_1787549307039_0.7087631526984042","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.1.2","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.1.2","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"46b3682b41cbec102687d5bb4e293647c8a11afa","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.1.2.tgz","fileCount":17,"integrity":"sha512-AV9M4scXKv2q/aEg3xzWcFS1b5gAx9X8m80N4sMkleI2Q4llM+b3QhJNXWg3eBaCxvgPeQArb46lYzMfA/I3+g==","signatures":[{"sig":"MEQCIB0E9LsYifKtg08X+A6OMdwhmWtIuaYaszIPfqwDigIuAiBPp3w9eUHlFYbxKFvqq6ecP/S6aLkSGKgNQmnPlrw/gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53492},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"2b6c1cc07c4471d607b04f0578923fbf8313f36e","scripts":{"test":"node --test test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"11.17.0","description":"dsh plugin: bounded retry for gateway network_error failures the stock retry policy cannot classify (e.g. OpenCode Zen finish_reason: network_error)","directories":{},"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@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-brand":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/schemastery":"3.18.1","@deepseek-ai/dsh-llm-pi-ai":"0.1.1-rc.2","@deepseek-ai/dsh-llm-retry":"0.1.1-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.1-rc.2","@deepseek-ai/dsh-agent-loop-testkit":"0.1.1-rc.2"},"peerDependencies":{"@deepseek-ai/dsh-llm":"0.1.1-rc.2","@deepseek-ai/dsh-agent":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/schemastery":"3.18.1"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.1.2_1787730005981_0.6037080590879371","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.2.0","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.2.0","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"185fccf43c17fedb30c1fe16863d9dc95434cfe6","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.2.0.tgz","fileCount":17,"integrity":"sha512-VnFq5JiIqKTWoSJDqh37Kjm8A6zYaPowa9ru1Z8RQxx1uIpBQH65H3824qNGkTjaEC4yHP1JLVGv+5ewukbmIg==","signatures":[{"sig":"MEYCIQCHweypNCNYgmKU8sowOfTyl6afIBhPMpyaDkWcg0PCwQIhAIWddqDfJ+vE5r99cwZVxiojypkRjq0POyKFBBNbod5H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiwayds%2fdsh-llm-net-retry@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":59777},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"b67608505f65a60379f6761c90b7576d863f2d79","scripts":{"test":"node --test test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"10.9.8","description":"dsh plugin: bounded retry for gateway network_error failures the stock retry policy cannot classify (e.g. OpenCode Zen finish_reason: network_error)","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-llm":"0.1.2-alpha.4","@deepseek-ai/dsh-agent":"0.1.2-alpha.4","@deepseek-ai/dsh-brand":"0.1.2-alpha.4","@deepseek-ai/dsh-session":"0.1.2-alpha.4","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-alpha.4","@deepseek-ai/dsh-llm-retry":"0.1.2-alpha.4","@deepseek-ai/dsh-agent-loop":"0.1.2-alpha.4","@deepseek-ai/dsh-agent-loop-testkit":"0.1.2-alpha.4","@deepseek-ai/dsh-session-projection":"0.1.2-alpha.4"},"peerDependencies":{"@deepseek-ai/dsh-llm":">=0.1.2-alpha.4","@deepseek-ai/dsh-agent":">=0.1.2-alpha.4","@deepseek-ai/dsh-session":">=0.1.2-alpha.4","@deepseek-ai/schemastery":">=3.18.2"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.2.0_1788282398697_0.32077956601392765","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.3.0","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.3.0","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"5882686b634d3af48fc9723147e4283e9f4405e4","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.3.0.tgz","fileCount":17,"integrity":"sha512-b+oyyNlZZWt05qfFIK5AJDlF+FnMoDgLnCHsTCEdw1LDuATA9ybBP+lHF/XDZrSqcM474WV1rWA4P4cc8Y3U7Q==","signatures":[{"sig":"MEQCIF0UOSG2D1TU7XdbbP1T21umGDtWpuxVHG5hVe//P6CfAiBach+LARNfPnsVlt0RomhSmZ/8z96SmGiBaBdV/VDS6g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiwayds%2fdsh-llm-net-retry@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":60235},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"dedafd3e490922031447df4d3421f2f4c26f53d9","scripts":{"test":"node --test test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"10.9.8","description":"dsh plugin: bounded retry for gateway network_error failures the stock retry policy cannot classify (e.g. OpenCode Zen finish_reason: network_error)","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-llm":"0.1.2-rc.1","@deepseek-ai/dsh-agent":"0.1.2-rc.1","@deepseek-ai/dsh-brand":"0.1.2-rc.1","@deepseek-ai/dsh-session":"0.1.2-rc.1","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-rc.1","@deepseek-ai/dsh-llm-retry":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop-testkit":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection":"0.1.2-rc.1"},"peerDependencies":{"@deepseek-ai/dsh-llm":">=0.1.2-rc.1","@deepseek-ai/dsh-agent":">=0.1.2-rc.1","@deepseek-ai/dsh-session":">=0.1.2-rc.1","@deepseek-ai/schemastery":">=3.18.2"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.3.0_1788442277674_0.5412035962893744","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.3.1","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.3.1","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"9f778c01f9bea032fdee004a1bcf469f33f55ef6","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.3.1.tgz","fileCount":17,"integrity":"sha512-6rOYRrNPPZj3y35JmEcrx9iF/YChsRPe30bjAwcjtz+7q/vF4oO0/q9mg448XlalTg1KuVIoXo+h7y5r6M6r5g==","signatures":[{"sig":"MEUCIQD/EHXbeEK1J+q2BF2blS2ilDuIyWz3+4z0pvLE3dH1ewIgCIHaHRi9RvgwF4woY/TUKue/QMtqsj7g1UaOyJZ5gW0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiwayds%2fdsh-llm-net-retry@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61295},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"134083d4992d84e32d8c9ca5a732b9140e0b49f9","scripts":{"test":"node --test test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json","smoke":"node scripts/smoke-boot.mjs"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"10.9.8","description":"dsh plugin: bounded retry for gateway network_error failures the stock retry policy cannot classify (e.g. OpenCode Zen finish_reason: network_error)","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-llm":"0.1.2-rc.1","@deepseek-ai/dsh-agent":"0.1.2-rc.1","@deepseek-ai/dsh-brand":"0.1.2-rc.1","@deepseek-ai/dsh-session":"0.1.2-rc.1","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-llm-pi-ai":"0.1.2-rc.1","@deepseek-ai/dsh-llm-retry":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop":"0.1.2-rc.1","@deepseek-ai/dsh-agent-loop-testkit":"0.1.2-rc.1","@deepseek-ai/dsh-session-projection":"0.1.2-rc.1"},"peerDependencies":{"@deepseek-ai/dsh-llm":">=0.1.2-rc.1","@deepseek-ai/dsh-agent":">=0.1.2-rc.1","@deepseek-ai/dsh-session":">=0.1.2-rc.1","@deepseek-ai/schemastery":">=3.18.2"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.3.1_1788603282712_0.7643344892566515","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.4.0","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.4.0","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"701de79ab7a41b528d8d4241499976e1486c6494","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.4.0.tgz","fileCount":17,"integrity":"sha512-11pJkYnPkT2MYemphwQAXWHbnb6BU7tCir+VRu4CtMj/bbfEdzKkFznUuRDru65PfCK2+vRGVZBdrc/20xs0/Q==","signatures":[{"sig":"MEUCIAETpsAHq/jM/iZUC/IQv0/WpH0B5AGA4JZCYDOTLiucAiEA2XlLwmdZyilFGm6uJQQrlbRwOnlVOt3xq45GGjZKkRQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQD8DTMDbJi+l8LVaaQhieYHVG1gAIx+ubbnFYHPvSrALwIhAOpo8jMo2s+kNHTm6++X5XgTA7dUzVgr0OeqBrh+F+3t","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiwayds%2fdsh-llm-net-retry@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61904},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"e323bd15703237ddbd5b1fb7c8f23f31cb4b6f19","scripts":{"test":"node --test --test-force-exit test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test --test-force-exit test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json","smoke":"node scripts/smoke-boot.mjs"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"10.9.8","description":"dsh plugin: bounded retry for gateway network_error failures the stock retry policy cannot classify (e.g. OpenCode Zen finish_reason: network_error)","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-llm":"0.1.5-rc.2","@deepseek-ai/dsh-agent":"0.1.5-rc.2","@deepseek-ai/dsh-brand":"0.1.5-rc.2","@deepseek-ai/dsh-session":"0.1.5-rc.2","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-llm-pi-ai":"0.1.5-rc.2","@deepseek-ai/dsh-llm-retry":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop-testkit":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection":"0.1.5-rc.2"},"peerDependencies":{"@deepseek-ai/dsh-llm":">=0.1.5-rc.2","@deepseek-ai/dsh-agent":">=0.1.5-rc.2","@deepseek-ai/dsh-session":">=0.1.5-rc.2","@deepseek-ai/schemastery":">=3.18.2"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.4.0_1789134038776_0.8828814435352426","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.5.0","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.5.0","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"9fb44eafd551f57cd7a7d36bc740e2db6cb49300","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.5.0.tgz","fileCount":17,"integrity":"sha512-rSNFLnzdaBuD27NTEhTE77j6ss0bma5GUThm3Cj0//puYObpNLs5IYNA1NtQMJoBi4+zMhgdK9i76khhMYqBNw==","signatures":[{"sig":"MEUCIQCGLsX3OoYZvnMbSu2N7FD77TZV4qd6Pq91cOefk1iWPAIgCcq9z7BZGOYHZ+iIq1+8Yj+kEo0gVqo2zK15d+GQRWE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIF6XtMTiWYyjfGdaKBY0wsmYEpBVw/g3b5yGgU1mHbCKAiEA0o4ffZgzt+NkUMbAlsKZysmD86Ik3CKbNLYrV3yIeCQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiwayds%2fdsh-llm-net-retry@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":76508},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"c7745be9c0938b9d0e9a5440682ae362bbebbe24","scripts":{"test":"node --test --test-force-exit test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test --test-force-exit test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json","smoke":"node scripts/smoke-boot.mjs"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"10.9.8","description":"dsh plugin: bounded retry for transient gateway network failures the stock retry policy cannot classify (finish_reason: network_error, unexpected EOF, TLS alerts, stream read errors)","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.2","@deepseek-ai/dsh-llm":"0.1.5-rc.2","@deepseek-ai/dsh-agent":"0.1.5-rc.2","@deepseek-ai/dsh-brand":"0.1.5-rc.2","@deepseek-ai/dsh-session":"0.1.5-rc.2","@deepseek-ai/schemastery":"3.18.2","@deepseek-ai/dsh-llm-pi-ai":"0.1.5-rc.2","@deepseek-ai/dsh-llm-retry":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop":"0.1.5-rc.2","@deepseek-ai/dsh-agent-loop-testkit":"0.1.5-rc.2","@deepseek-ai/dsh-session-projection":"0.1.5-rc.2"},"peerDependencies":{"@deepseek-ai/dsh-llm":">=0.1.5-rc.2","@deepseek-ai/dsh-agent":">=0.1.5-rc.2","@deepseek-ai/dsh-session":">=0.1.5-rc.2","@deepseek-ai/schemastery":">=3.18.2"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.5.0_1789305532547_0.5605681719039328","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@aiwayds/dsh-llm-net-retry","version":"0.6.0","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"author":{"name":"fliu56"},"license":"MIT","_id":"@aiwayds/dsh-llm-net-retry@0.6.0","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"homepage":"https://github.com/fan56/dsh-llm-net-retry","bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"972c4fc4964717895ae9979cdf13d8cac2dc6721","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.6.0.tgz","fileCount":20,"integrity":"sha512-1q3fxJMRTLfiT7u3eQjB7k69Nvkz7b1U2Q5G8k2TJ3s8bsd8AeX5O7lVvhyJ5kkmimx8F+TKkJZ7ROVOhuCikw==","signatures":[{"sig":"MEUCIQC+dTFkOJWKIui9CtSPYcUv2kBOlSJZl4b7IRWRW3axfQIgNczA5NOMvSDVSzMhBbe+MGY/o4ut8tSNLlvsMVHKsQk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQC96FAjpWGZHBoiVYhqKGwQ3stHxa/la2KN+OKBYKscAgIhANckpQGfxA5uLunkJ8Xfi5IqAkgksD9Gcrh5zSWyq6Cr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiwayds%2fdsh-llm-net-retry@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":92867},"icon":"./icon.svg","main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=22.19.0"},"gitHead":"a5492ae160b82bc470831b4b8c53eafb1e194521","scripts":{"test":"node --test --test-force-exit test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test --test-force-exit test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json","smoke":"node scripts/smoke-boot.mjs"},"_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"10.9.8","description":"dsh plugin: bounded retry for transient gateway network failures the stock retry policy cannot classify (finish_reason: network_error, unexpected EOF, TLS alerts, stream read errors)","directories":{},"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.4","@deepseek-ai/dsh-llm":"0.1.7-rc.1","@deepseek-ai/dsh-agent":"0.1.7-rc.1","@deepseek-ai/dsh-brand":"0.1.7-rc.1","@deepseek-ai/dsh-session":"0.1.7-rc.1","@deepseek-ai/schemastery":"3.18.4","@deepseek-ai/dsh-llm-pi-ai":"0.1.7-rc.1","@deepseek-ai/dsh-llm-retry":"0.1.7-rc.1","@deepseek-ai/dsh-agent-loop":"0.1.7-rc.1","@deepseek-ai/dsh-agent-loop-testkit":"0.1.7-rc.1","@deepseek-ai/dsh-session-projection":"0.1.7-rc.1"},"peerDependencies":{"@deepseek-ai/dsh-llm":">=0.1.7-rc.1","@deepseek-ai/dsh-agent":">=0.1.7-rc.1","@deepseek-ai/dsh-session":">=0.1.7-rc.1","@deepseek-ai/schemastery":">=3.18.2"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/dsh-llm-net-retry_0.6.0_1790230095879_0.871590210286143","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"_id":"@aiwayds/dsh-llm-net-retry@0.7.0","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"dist":{"shasum":"718142fc080f79a216b71a12ff5862efe739cdb0","tarball":"https://registry.npmjs.org/@aiwayds/dsh-llm-net-retry/-/dsh-llm-net-retry-0.7.0.tgz","fileCount":20,"integrity":"sha512-mAHbS0G8t8gxPkstL2g8e5R6AEl+sJTNQBJETGwJqaxxoAhA52APFzpW/Ux8dfDxy6VpUtE5Pe4TNg1IHYkd9g==","signatures":[{"sig":"MEUCIQC/PmyAbzwacp18F4lcorVgd/cmZFKUeDTC6YwXutbYxwIgW3u/TNCYHef7UMZb69hN+Coz41BgozjggheSAYI/glE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDhsq+0feZWyQsJpoPsczSy4EIXWgGoCB1ihQ8PSUm0AwIhAMfSjhvI4xlPGaGrNn/VFSXVVHBmu/0pa+b2jR6X/RoR"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiwayds%2fdsh-llm-net-retry@0.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":93567},"icon":"./icon.svg","main":"lib/index.js","name":"@aiwayds/dsh-llm-net-retry","type":"module","types":"lib/index.d.ts","author":{"name":"fliu56"},"engines":{"node":">=22.19.0"},"gitHead":"b3823d1744d5c8a8a1db2846b560bea62678be92","license":"MIT","scripts":{"test":"node --test --test-force-exit test/match.test.mjs test/backoff.test.mjs test/decision.test.mjs && node --test --test-force-exit test/e2e.pi-ai.test.mjs","build":"tsc -p tsconfig.json","check":"tsc --noEmit -p tsconfig.json","smoke":"node scripts/smoke-boot.mjs"},"version":"0.7.0","_npmUser":{"name":"aiwayds","email":"aiway.ds@qq.com"},"homepage":"https://github.com/fan56/dsh-llm-net-retry","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"_npmVersion":"10.9.8","description":"dsh plugin: bounded retry for transient gateway network failures the stock retry policy cannot classify (finish_reason: network_error, unexpected EOF, TLS alerts, stream read errors)","directories":{},"maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.0","@types/node":"^24.0.0","@deepseek-ai/cordis":"4.0.4","@deepseek-ai/dsh-llm":"0.2.0-rc.2","@deepseek-ai/dsh-agent":"0.2.0-rc.2","@deepseek-ai/dsh-brand":"0.2.0-rc.2","@deepseek-ai/dsh-session":"0.2.0-rc.2","@deepseek-ai/schemastery":"3.18.4","@deepseek-ai/dsh-llm-pi-ai":"0.2.0-rc.2","@deepseek-ai/dsh-llm-retry":"0.2.0-rc.2","@deepseek-ai/dsh-agent-loop":"0.2.0-rc.2","@deepseek-ai/dsh-agent-loop-testkit":"0.2.0-rc.2","@deepseek-ai/dsh-session-projection":"0.2.0-rc.2"},"peerDependencies":{"@deepseek-ai/dsh-llm":">=0.2.0-rc.2","@deepseek-ai/dsh-agent":">=0.2.0-rc.2","@deepseek-ai/dsh-session":">=0.2.0-rc.2","@deepseek-ai/schemastery":">=3.18.2"},"peerDependenciesMeta":{"@deepseek-ai/dsh-llm":{"optional":true},"@deepseek-ai/dsh-agent":{"optional":true},"@deepseek-ai/dsh-session":{"optional":true},"@deepseek-ai/schemastery":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-llm-net-retry_0.7.0_1790685584491_0.638884229153863"}}},"time":{"created":"2026-08-22T03:37:56.836Z","modified":"2026-09-29T12:39:44.880Z","0.1.0":"2026-08-22T03:37:57.149Z","0.1.1":"2026-08-24T05:28:27.180Z","0.1.2":"2026-08-26T07:40:06.115Z","0.2.0":"2026-09-01T17:06:38.844Z","0.3.0":"2026-09-03T13:31:17.848Z","0.3.1":"2026-09-05T10:14:42.864Z","0.4.0":"2026-09-11T13:40:38.859Z","0.5.0":"2026-09-13T13:18:52.647Z","0.6.0":"2026-09-24T06:08:16.020Z","0.7.0":"2026-09-29T12:39:44.569Z"},"bugs":{"url":"https://github.com/fan56/dsh-llm-net-retry/issues"},"author":{"name":"fliu56"},"license":"MIT","homepage":"https://github.com/fan56/dsh-llm-net-retry","keywords":["dsh","dsh-plugin","retry","network-error","deepseek-harness","llm"],"repository":{"url":"git+https://github.com/fan56/dsh-llm-net-retry.git","type":"git"},"description":"dsh plugin: bounded retry for transient gateway network failures the stock retry policy cannot classify (finish_reason: network_error, unexpected EOF, TLS alerts, stream read errors)","maintainers":[{"name":"aiwayds","email":"aiway.ds@qq.com"}],"readme":"# dsh-llm-net-retry\n\n[English](README.en.md)\n\n[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)（dsh）插件：重试网关以\n非标准措辞上报的瞬时网络失败——这类失败被 dsh 原生重试策略归为不可重试，导致整个 turn\n直接硬失败。\n\n## 背景\n\n一些 OpenAI 兼容网关（如 [OpenCode Zen](https://opencode.ai/zen)）把自身上游连接的瞬时失败\n回传给客户端（流的终止 `finish_reason`、错误负载回显等），而不是走 HTTP/传输层错误。在\ndsh `0.1.5-rc.2`（迁移前跟随的 rc/stable 线；0.1.7 Messages 线同此，见下节）中，这些措辞仍被误分类：\n\n| 路径 | 产出的失败 | 原生分类 |\n|---|---|---|\n| `llm-pi-ai`（`openai-completions`） | `Provider finish_reason: network_error` | `PI_AI_ERROR`——不可重试 |\n| `llm-deepseek` | `model stopped: network_error`，code `NETWORK_ERROR` | 不可重试 |\n| `llm-pi-ai`（网关回传自身上游错误文本，[#4361](https://github.com/deepseek-ai/deepseek-harness/discussions/4361)） | `unexpected EOF` / `remote error: tls: bad record MAC` | `PI_AI_ERROR`——不可重试 |\n| `llm-pi-ai`（[#3158](https://github.com/deepseek-ai/deepseek-harness/discussions/3158)） | `stream_read_error` | `PI_AI_ERROR`——不可重试 |\n\n`dsh-llm-retry` 只重试 provider `retryableCodes` 里的码（`TRANSPORT`、`RATE_LIMIT`、`SERVER`、\n`TIMEOUT`、`EMPTY_RESPONSE`），于是没人重试，turn——包括 subagent turn——直接失败。\n而这类故障立即重试几乎总能成功。\n\n**dsh `0.1.7` 起**，官方 DeepSeek 适配器 Messages API-only（Chat Completions 与 `protocol`\n选项删除，改走 anthropic 风格 `/messages` SSE），错误文案来源随之变化（对照 tag\n`dsh-v0.1.7-rc.1` 的 `llm-deepseek` 源码核实）：\n\n| 路径（0.1.7 Messages 线） | 产出的失败 | 原生分类 | 本插件 |\n|---|---|---|---|\n| 未知 `stop_reason`（`translate.ts` `stopReason()`） | `DeepSeek Messages stream: unsupported stop reason <reason>` | `MALFORMED_RESPONSE`——不可重试 | 认领（`network_error` 拼写由网络 pattern 覆盖，其余 reason 由 `unsupported stop reason` pattern 覆盖） |\n| 流在 `message_stop` 前干净收尾（网关半关、代理 failover） | `DeepSeek Messages stream ended before message_stop`（pi-ai 线为 `pi-ai event stream ended without done/error`） | `STREAM_CLOSED`——不可重试 | 认领 |\n| 读路径抛错（fetch 拒绝、body 读错误、TLS、undici 截断） | `DeepSeek Messages transport failed` | `TRANSPORT`——可重试 | 让位（原生策略接管） |\n| SSE 带内 `error` 事件（`providerError`） | 网关回显文本 | 恒落在可重试集（`SERVER` 等） | 让位 |\n\n即：旧的 EOF/TLS/stream-read 措辞在新线上多数落进 `TRANSPORT` 由原生策略接管（这正是 code\n守卫的既有契约）；真正**漏出**分类盲区的是 `MALFORMED_RESPONSE` / `STREAM_CLOSED` 两个新面。\n\nopencode 在上游修过同样的问题：\n[40282c1](https://github.com/anomalyco/opencode/commit/40282c1d4d5476e6b536a72c0baf3a27bcf0e4df)、\n[e0b9e68](https://github.com/anomalyco/opencode/commit/e0b9e68a68a8bc8367d84e305efd114d0445348a)。\n\ndsh 本体的修复已备好并充分测试（fork 分支\n[`fix/network-error-retryable`](https://github.com/fan56/deepseek-harness/tree/fix/network-error-retryable)；\ndsh 目前不接受外部 PR，已按官方渠道报告至\n[Discussions #3949](https://github.com/deepseek-ai/deepseek-harness/discussions/3949)）。\n此后同族问题仍在官方仓持续新增报告（[#3158](https://github.com/deepseek-ai/deepseek-harness/discussions/3158)、\n[#4361](https://github.com/deepseek-ai/deepseek-harness/discussions/4361) 及其 2026-09-13 追评），\n修复尚未合入。在此之前，本插件就是解决方案；合入后它也无害：只在整个 `agent/request-error`\nwaterfall 弃权且 code 落在官方分类盲区时才行动，且绝不触碰 llm-retry 自身的重试计数。\n\n## 工作原理\n\n插件挂在 `agent/request-error` waterfall 的**末端**：\n\n1. 先调用 `next()`——provider 的策略执行器（`dsh-llm-retry`）先决策。任何一方决定重试，\n   该决策原样透传。\n2. 只有当所有 listener 都弃权，且失败落在官方分类的盲区（消息 + code 双重判定，见下），\n   才调度本插件自己的有界重试。消息侧覆盖：`network_error` / `network-error` /\n   `network error`，pi-ai 对未识别网关 stop reason 的 `Provider finish_reason:` 渲染，\n   Messages 线的 `unsupported stop reason`（`0.1.7` 起 llm-deepseek 对未知 anthropic\n   stop_reason 的渲染），网关回传的传输层措辞 `unexpected EOF`（含 `HPE_UNEXPECTED_EOF…`、\n   zlib 的 `unexpected end of file` 变体）、`remote error: tls: bad record MAC`、\n   `stream_read_error`，以及流提前收尾措辞 `stream ended before/without …`\n   （`STREAM_CLOSED`；与 pi-ai 自身把同族措辞归 `TRANSPORT` 的规则同形，code 守卫保证\n   只有未分类的 `STREAM_CLOSED` 落到本插件）。\n3. 重试持久化且可见：`llm/retry` / `llm/retry-started` session 事件，schema 与 llm-retry\n   兼容，TUI 无需改动即可展示。计数使用本插件自己的 policy key（`net-retry:v1…`），\n   绝不污染 llm-retry 的计数。\n\n**code 守卫**：官方策略已认领的码即使消息命中也让位——默认可重试集（`EMPTY_RESPONSE` /\n`RATE_LIMIT` / `SERVER` / `TIMEOUT` / `TRANSPORT`）的恢复权（含其放弃重试的决定）归原生\n策略，永久性失败（`AUTH`、`INVALID_REQUEST`、`QUOTA` 等）与用户中止（`ABORTED`）重试也\n无济于事。其余码（`PI_AI_ERROR` 兜底、deepseek 未知 reason 码、裸抛 `UNKNOWN`、\n`HTTP_<status>` 零星码）落到消息匹配。这也意味着：上游将来若把某措辞归类为 `TRANSPORT`，\n原生策略自动接管，本插件自然让位，不会叠加双重重试。\n\n## 安装\n\n本插件是独立的 dsh 插件，与宿主 UI 无关：装入**任意 dsh profile** 即可（把 `<profile>`\n换成你的 profile 名——profile 由 `dsh` CLI 自建自管，不是 tui 专属）：\n\n```bash\ndsh plugin --profile <profile> add @aiwayds/dsh-llm-net-retry\n```\n\n包内的 `cordis.patch.yml` 会以插件 id `dsh-llm-net-retry` 挂载，挂在哪个 profile，\n就对哪个 profile 启动的 dsh 实例生效（tui / web / 自定义 launcher 均可）。\n\n> ⚠️ 所有 `@deepseek-ai/*` 包都是 peerDependencies（由 dsh 闭包解析）——绝不要把它们当普通\n> dependencies 装进插件，否则会出现第二份 cordis 闭包和诡异的崩溃。\n\n## 卸载\n\n```bash\ndsh plugin --profile <profile> remove @aiwayds/dsh-llm-net-retry\n```\n\n宿主自动清掉 profile `bundles` 里对应的条目和插件的 patch 层。本插件**零落盘状态**——\n没有数据文件，也不占用 settings 命名空间——卸载后不留任何残留（见「兼容性」一节的\n「dispose 即干净移除」）。旧会话日志里历史留下的 `llm/retry` 事件不受影响——那是宿主\n自己的良性数据，不属于本插件。\n\n## 配置\n\n全部可选，默认即用。本插件**不占用 settings 命名空间**——配置走组合树 entry config，\n即在 patch 层（profile 的 `cordis.patch.yml`）的挂载条目里给 `config:` 段：\n\n```yaml\n- insert:\n    - id: dsh-llm-net-retry\n      name: '@aiwayds/dsh-llm-net-retry'\n      config:\n        mode: on            # 'off' 完全摘除 listener\n        maxRetries: 5\n        backoff:\n          initialDelayMs: 500\n          maxDelayMs: 10000\n          jitterRatio: 0.1\n```\n\n未知 key 报错。默认值对齐 llm-retry 原生策略（5 次重试、500 ms→10 s 指数退避、对称抖动 0.1）。\n\n## 验证\n\n- 单测：匹配表（正/负例 × 各错误码、code 守卫、近失拼写）、注入随机数的退避计算、配置校验、\n  真实 cordis context 上的决策链（透传/重试/计数/abort/mode off/下游异常韧性）。\n- e2e：真实 agent loop + 真实 `llm-pi-ai` `openai-completions` adapter，打脚本化本地网关\n  （前两次请求回 `finish_reason: \"network_error\"`；另一条 leg 回 relay-echo 形态的\n  `finish_reason: \"unexpected EOF\"`）——重试后完成 turn、`llm/retry` 事件落盘；负向对照\n  （无插件）一次请求后 turn 即硬失败。\n- 集成核验：以本机安装的 dsh `0.1.7-rc.1` 分类器的真实输出为基准，逐措辞断言\n  \"官方归 `PI_AI_ERROR` ⇔ 本插件认领\"。\n- 真实宿主：smoke-boot 把构建产物装进隔离 scratch profile，真实 `dsh` CLI 组树、启动、\n  卸载复原；另曾在 dsh 0.1.0-rc.8 的 `--profile tui`（dsh-tui-pi）上实测，重试链\n  （指数退避、稳定 retryId、事件落盘、TUI 展示）全部正确。\n\n```bash\nnpm test        # 先构建：npm run build\n```\n\ne2e 在隔离的临时 `$HOME` 下运行，绝不触碰 `~/.dsh`。\n\n## 兼容性\n\n**要求 dsh >= 0.2.0-rc.2** — 本插件只跟随 dsh RC/stable 线（CI 与发版在运行时解析 latest/next 中更新的 dist-tag）。**不再支持 alpha 线。**\n\n面向 dsh `>=0.2.0-rc.2` 的 `agent/request-error` waterfall 与 `llm/retry` 事件 schema（`snapshotEvents`\n软废弃照官方约定保留存量用法）。插件对\ndsh 本体零侵入：无 monkey-patch、不替换服务，dispose 即干净移除。\n\n## 许可证\n\nMIT\n","readmeFilename":"README.md"}