fix(ws): friendlier error when Gateway kernel does not support v3 handshake (#272)

- Detect 'device signature invalid' / 'protocol mismatch' on WebSocket close (code 1008)
- Detect DEVICE_AUTH_SIGNATURE_INVALID/PROTOCOL_VERSION_MISMATCH on connect failure after auto-pair
- Replace cryptic English reason with kernel.tooOldForProtocol message (zh-CN + en)
- Suggest upgrading Gateway kernel to recommended version (2026.5.x)
- Stop auto-reconnect loop in these unrecoverable cases
This commit is contained in:
晴天
2026-05-14 01:16:33 +08:00
parent 1584d53bf9
commit 31dcf64426
3 changed files with 55 additions and 3 deletions

View File

@@ -2237,7 +2237,8 @@
"title": "New kernel available",
"subtitle": "{from} → {to}, click to upgrade",
"dismissTooltip": "Don't remind me this session"
}
},
"tooOldForProtocol": "Gateway kernel is too old and does not support the handshake protocol used by this ClawPanel. Please upgrade the OpenClaw kernel to the recommended version ({recommended}) and retry. You can upgrade from \"Services → OpenClaw → Upgrade\"."
},
"cliConflict": {
"title": "Detected {count} possibly conflicting OpenClaw installation(s)",

View File

@@ -2320,7 +2320,8 @@
"title": "有新内核可用",
"subtitle": "{from} → {to},点此一键升级",
"dismissTooltip": "本次会话不再提醒"
}
},
"tooOldForProtocol": "Gateway 内核版本过旧,不兼容当前 ClawPanel 使用的握手协议。请把 OpenClaw 内核升级到推荐版本({recommended})后重试。可在「服务管理 → OpenClaw → 一键升级」中完成升级。"
},
"cliConflict": {
"title": "检测到 {count} 处可能冲突的 OpenClaw 安装",