← 返回列表
✓ 可直接安装
🌐 dsh-plugin-weaknet-adaptor
自动检查通过:npm 包已发布且 engines 声明满足基线(声明 Node >=18);该结论来自程序自动检查,未经人工实机验证。 · 最近上游提交 2026/8/17 · 已提供中文文档
综合分
32.8
GitHub 分
32.8
用户评分
—
★ Stars
3
周下载量
—
安装插件(需先安装 dsh CLI 引擎:npm install -g @deepseek-ai/dsh)
dsh plugin --profile web add dsh-plugin-weaknet-adaptornpm 包 dsh-plugin-weaknet-adaptor 已校验归属本仓库,走 npm 安装最省事
信任档位:已验证本站已于 4 天前真实安装成功(L4 · 真实安装)
- 是什么
- dsh 原生插件 · chat
- 装得上吗
- 本站已真实安装成功(L4 · 真实安装,非静态推断)
- 安全吗
- 本站尚未对该插件做风险分级(暂未覆盖,不等同于无风险)
- 还在维护吗
- 更新放缓:最近一次提交在 39 天前
档位由下列信号合成:本站实装验证(真实安装,当前最高到 L4)· 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。下方各区块是它的证据明细。 验证判据与等级说明 →
🟢实装验证通过· 2026/9/22
由本站实装验证器在真实 dsh 环境安装成功,非静态推断。
数据截至 2026/9/20(元数据每日更新 · 实装验证按队列轮转,单条结论的验证时间见上方)
安装兼容性检查✓ 自动检查通过
以下结论由程序自动检查 npm 包、engines 声明与入口文件得出,未做人工实机验证——能装不等于用着没问题。
✓npm 包dsh-plugin-weaknet-adaptor @ 1.0.5
✓Node 引擎要求 >=18 · 基线 Node 22.19 满足
✓dsh CLI 依赖未声明 dsh 版本约束
✓入口文件main/exports/bin 已声明
验证方式:npm registry 存在性 + package.json 静态校验 · 最后验证 2026/9/20 18:49:06
依赖的 DSH / Cordis 模块
@deepseek-ai/dsh-typert-protocol@deepseek-ai/cordis@deepseek-ai/dsh-agent@deepseek-ai/dsh-fs@deepseek-ai/dsh-llm@deepseek-ai/dsh-sandbox-policy@deepseek-ai/dsh-session@deepseek-ai/dsh-tool-result-pruner@deepseek-ai/dsh-web用户评分
还没有人投票,来当第一个
订阅周报,不错过优质插件更新
每周一封 · 高评分插件 + 新用户活动
README
由 DeepSeek 最新模型翻译生成🌐 dsh-plugin-weaknet-adaptor Weak-network adaptor for the DeepSeek Harness — 弱网适配插件 Keep model reply chains alive on flaky networks: transparent long-backoff retries, local response cache, heartbeat auto-reconnect, and degraded-mode token economy — with a fully structured, bilingual (zh/en) settings page. 弱网下保护模型回复链条不断裂:透明长退避重试、本地响应缓存、心跳自动重连、降级省 token——全部参数结构化,设置页中英双语。 npm version License: MIT dsh-plugin node ✨ Features / 特性 | | 中文 | English | |---|---|---| | 🔁 | 模型流在 llm/stream 瀑布层透明拦截:降级模式下全缓冲 + 指数退避重试(默认最长等待 10 分钟),网络抖动不再打断回复链条 | Transparent interception in the llm/stream waterfall: degraded mode buffers and retries with exponential backoff (up to a 10-minute cap by default), so network blips no longer break the reply chain | | 💾 | 完整成功响应本地缓存(请求指纹 key、LRU、TTL 可配):相同请求零 token 本地重放 | Local replay cache for fully successful responses (fingerprint keys, LRU, configurable TTL): identical requests replay with zero tokens | | ❤️ | 断网后本地心跳任务按指数退避自动探测重连(间隔上限默认 10 分钟);任意模型流成功也立即被动恢复 | After an outage a local heartbeat task probes and auto-reconnects with exponential backoff (cap: 10 minutes by default); any successful model stream passively restores online state | | 🪙 | 重试等待期间零模型调用(零 token);重连后可选输出上限降级与 tool-result 确定性裁剪 | Zero model calls (zero tokens) while waiting; optional output-cap and deterministic tool-result pruning after reconnect | | 🎛️ | 24 个参数全部结构化(分组/类型/范围/默认值),设置页「弱网适配」可全部调整 | All 24 parameters are fully structured (group/type/range/default) and adjustable in the "Weak Network" settings page | | 🌍 | 每个参数的说明与场景预期效果均为中英双语,UI 跟随系统语言 | Every parameter ships with bilingual (zh/en) descriptions and expected-effect notes; the UI follows the interface language | 🚀 Install / 安装 npm install dsh-plugin-weaknet-adaptor Add to your composition (cordis.yml), e.g. in the DSH profile you run: plugins: - name: dsh-plugin-weaknet-adaptor The Host half activates automatically; the browser half (settings page + status dock) is picked up through the package's dsh.client declaration and served by client-modules — no extra wiring needed. Peer dependencies (@deepseek-ai/, cordis) are installed automatically by npm. 💡 为什么用正式包而不是动态插件? 动态插件(会话内 cordis_define 创建)只存在于进程内存,进程崩溃或重启后即丢失;本包由 cordis.yml 静态加载,重启后依然生效,真正"安装即用"。 💡 Why a real package instead of a dynamic plugin? Dynamic plugins live only in process memory and vanish on crash/restart; this package is loaded statically from cordis.yml and survives restarts. ⚙️ Configuration / 参数配置 所有参数均可在 Settings → Weak Network(设置 → 弱网适配)中实时修改。 更改会尽力持久化到 /.dsh/weaknet-params.json。 | 组 Group | 参数 Key | 类型 Type | 默认 Default | 说明与预期效果 Description & expected effect | |---|---|---|---|---| | 总开关 Master | enabled | boolean | true | 总开关;关闭后完全恢复原生流程。Master switch; off restores the native flow entirely. | | 网络探测与心跳 Probing & heartbeat | probeUrl | string | https://www.gstatic.com/generate_204 | 心跳探测地址;任意 HTTP 响应(含非 2xx)视为可达。Probe URL; any HTTP response (incl. non-2xx) counts as reachable. 内网/代理环境请改内网轻量端点。 | | | probeTimeoutMs | number | 5000 | 探测超时(500–60000)。调小判定更快但高延迟易误报。Probe timeout; smaller = faster detection, larger = fewer false positives. | | | probeMode | enum | fetch | fetch(web 服务探测)/ off(仅被动恢复)。off 用于无 fetch provider 的环境。 | | | heartbeatBaseIntervalMs | number | 1000 | 探测失败后的初始间隔(200–60000)。Heartbeat base interval. | | | heartbeatMaxIntervalMs | number | 600000 | 重连最长等待(10 分钟)(10000–3600000)。间隔指数增长到此封顶。Longest reconnect wait (10 min) — the interval caps here. | | | heartbeatBackoffFactor | number | 2 | 探测间隔倍增系数(1.1–5);抖动频繁建议接近 1.1。 | | | successThreshold | number | 1 | 连续成功多少次判定恢复(1–10);波动网络建议 2–3。 | | | criticalFailures | number | 3 | 连续失败达到该次数状态变红(离线告警),此前为黄(弱网)。 | | 请求重试 Request retry | maxAttempts | number | 10 | 单个请求最大重试次数(1–100);超限按原流程终止,消息不丢。 | | | backoffBaseMs | number | 1000 | 重试基础退避(100–60000)。 | | | backoffMaxMs | number | 600000 | 重试退避上限(1000–3600000)。 | | | backoffFactor | number | 2 | 重试退避倍增系数(1.1–5)。 | | | jitterRatio | number | 0.2 | 退避抖动(0–0.5);多会话并发建议 ≥0.2 避免重试风暴。 | | | retryableCodes | string[] | TRANSPORT, TIMEOUT, STREAM_CLOSED, EMPTY_RESPONSE, MALFORMED_RESPONSE | 视为网络故障的错误码;供应商自定义码可追加。 | | | retryStatuses | number[] | 429, 500, 502, 503, 504 | 视为可重试的 HTTP 状态;勿加入 4xx 认证错误。 | | 本地缓存 Local cache | cacheEnabled | boolean | true | 完整成功响应缓存;命中零 token 重放。 | | | cacheMaxEntries | number | 50 | LRU 条目上限(1–1000)。 | | | cacheMaxAgeMs | number | 600000 | 缓存有效期(1000–86400000)。 | | 降级省 token Economy | reduceMaxTokens | number\|null | null | 降级期间输出 token 上限(100–128000);留空不限制。建议从 2000 起步。 | | | pruneToolResults | boolean | false | 降级期间对会话 tool-result 确定性裁剪(不可逆),长任务接近上下文上限时开启。 | | 界面 UI | showStatusDock | boolean | true | composer 底部信息栏显示网络状态(绿=正常、黄=弱网、红=中断)。 | | | statusPollMs | number | 5000 | 状态轮询间隔(1000–60000)。 | | 存储 Storage | persistParams | boolean | true | 参数 best-effort 持久化;写失败静默回退内存。 | 🧠 How it works / 工作原理 模型请求 │ ▼ llm/stream 瀑布(本插件 prepend 挂载) │ ├─ 缓存命中? ──► 本地重放(零 token,不调 next()) │ ├─ online 模式:流式转发 + 收集缓存 + 观察失败(网络类失败 → degrade) │ └─ degraded 模式:全缓冲 → finish 判定 ├─ 成功 → 写缓存 + 被动恢复 online + 整体交付 └─ 网络类失败 → 指数退避 sleep(可被取消中断)→ 重试(≤ maxAttempts) │ ▼ 心跳任务(仅 degraded 时运行) 探测 probeUrl → 失败:间隔 ×factor(封顶 10 分钟) → 连续成功 ≥successThreshold:恢复 online - 重试为何放在 llm/stream 而不是 agent/request-error? 宿主 llm-retry 默认已接管 agent/request-error(DEFAULT_RETRYABLE_CODES 覆盖 TRANSPORT/TIMEOUT 等),后注册的监听器会被短路;llm/stream 是每个模型请求必经的瀑布,可确定性接管。agent/request-error 仅作降级观察。 - 缓存指纹:provider + model + reasoningEffort + temperature + maxTokens + stop + system + tools + messages + purpose(键排序规范序列化)。只有逐字节一致的请求才命中。 - 不做什么:不做工具集裁剪(动态插件沙箱白名单限制不适用于本包,但裁剪工具集会改变模型能力面,保持克制);不做流中断“前缀续传”(LLM API 不支持续传,重试即重新生成)。 - RPC:设置页通过 @Remote(dsh-typert-protocol)的 SRC markers 机制调用 weaknet/ 命名空间(getParamDefs / getParams / setParams / getStatus / resetStats),无需手写 typert 生成物。 🧪 快速验证 / Quick verification 1. 打开 设置 → 弱网适配:状态卡 + 7 组参数(每项有双语说明与「▸ 预期效果」)。 2. 把 心跳探测地址 改为 http://127.0.0.1:1/x 并保存 → composer 底部信息栏依次变黄(弱网)→ 红(网络中断,连续 3 次探测失败),“下次探测”秒数随指数退避逐次拉长(封顶 10 分钟);改回默认 → 变绿自动恢复。 3. 切换界面语言(中/英):设置页文案即时跟随。 🛠 开发 / Development git clone https://github.com//dsh-plugin-weaknet-adaptor.git cd dsh-plugin-weaknet-adaptor npm install npm run check # node --check lib/index.js && node --check lib/client.js npm pack # build the tarball 目录结构: lib/index.js 宿主端(cordis 插件 + weaknet Remote 服务) lib/client.js 浏览器端(ModuleLoader bundle:设置页 + 状态停靠栏) lib/types/index.d.ts 类型声明 📜 更新日志 / Changelog 见 CHANGELOG.md — 1.0.3(WiFi 图标 + 设置页诊断),1.0.2(关键 WebUI 卡死修复),1.0.1(支持 dsh plugin add),1.0.0(首次发布)。 📄 许可证 / License MIT — 见 LICENSE。