diff --git a/openclaw-version-policy.json b/openclaw-version-policy.json index ad42691..6aec46a 100644 --- a/openclaw-version-policy.json +++ b/openclaw-version-policy.json @@ -9,10 +9,10 @@ }, "default": { "official": { - "recommended": "2026.5.12" + "recommended": "2026.5.19" }, "chinese": { - "recommended": "2026.5.12-zh.2" + "recommended": "2026.5.18-zh.1" } }, "panels": { diff --git a/src/lib/feature-catalog.js b/src/lib/feature-catalog.js index c5e7dfe..e03f49d 100644 --- a/src/lib/feature-catalog.js +++ b/src/lib/feature-catalog.js @@ -196,8 +196,8 @@ export const KERNEL_TARGET = { // 不要与 dev-api.js 中设备签名 payload 字符串前缀 `v3|deviceId|...` 混淆—— // 后者是 **device signature payload 字符串格式版本**,两者完全独立、互不相关。 // 即使在 v4 握手协议下,签名 payload 字符串仍以 `v3|` 开头(这是 payload schema 版本)。 - official: '2026.5.12', - chinese: '2026.5.12-zh.2', + official: '2026.5.19', + chinese: '2026.5.18-zh.1', }, hermes: { default: '0.13.x', diff --git a/src/lib/kernel.js b/src/lib/kernel.js index 6dced96..bc0d845 100644 --- a/src/lib/kernel.js +++ b/src/lib/kernel.js @@ -2,7 +2,7 @@ * 内核版本与特性门控 * * 此模块是 ClawPanel 多内核版本兼容的核心: - * - 连接 Gateway 成功后,从 hello.serverVersion 构造 kernel snapshot + * - 连接 Gateway 成功后,从 hello.server.version / hello.serverVersion 构造 kernel snapshot * - 页面通过 hasFeature(id) 同步查询特性可用性 * - 低于硬地板时通过 onKernelChange 触发 floor blocker * diff --git a/src/lib/ws-client.js b/src/lib/ws-client.js index ba985fd..f7559dc 100644 --- a/src/lib/ws-client.js +++ b/src/lib/ws-client.js @@ -660,7 +660,7 @@ export class WsClient { this._authRetryCount = 0 this._hello = payload || null this._snapshot = payload?.snapshot || null - this._serverVersion = payload?.serverVersion || null + this._serverVersion = payload?.serverVersion || payload?.server?.version || null // 新连接 → 清空 method 降级缓存(可能换了 Gateway 版本) this.resetCompatCache() const defaults = this._snapshot?.sessionDefaults diff --git a/tests/kernel.test.js b/tests/kernel.test.js index a35b60d..6f174be 100644 --- a/tests/kernel.test.js +++ b/tests/kernel.test.js @@ -160,10 +160,12 @@ test('buildSnapshot edge case: version slightly below 5.6 feature requirement', }) test('buildSnapshot.isLatest works against KERNEL_TARGET', () => { - const at_target = buildSnapshot('openclaw', '2026.5.6') + const at_target = buildSnapshot('openclaw', '2026.5.19') + const at_chinese_target = buildSnapshot('openclaw', '2026.5.18-zh.1') const above_target = buildSnapshot('openclaw', '2026.6.0') - const below_target = buildSnapshot('openclaw', '2026.5.5') + const below_target = buildSnapshot('openclaw', '2026.5.18') assert.equal(at_target.isLatest, true) + assert.equal(at_chinese_target.isLatest, true) assert.equal(above_target.isLatest, true) assert.equal(below_target.isLatest, false) })