feat: v0.9.0 — Usage analytics, Communication config, 晴辰云 branding, multi-agent channels, 7 bug fixes

This commit is contained in:
晴天
2026-03-14 07:09:50 +08:00
parent 8bd8b82351
commit 205d349917
28 changed files with 1163 additions and 63 deletions

View File

@@ -2386,6 +2386,27 @@ const handlers = {
}
},
// 运行时状态摘要openclaw status --json
get_status_summary() {
try {
const raw = execSync('openclaw status --json 2>&1', { windowsHide: true, timeout: 10000 }).toString()
// 提取第一个 JSON 对象
const idx = raw.indexOf('{')
if (idx >= 0) {
try { return JSON.parse(raw.slice(idx)) } catch {}
// 流式解析:找到匹配的 } 结束
let depth = 0
for (let i = idx; i < raw.length; i++) {
if (raw[i] === '{') depth++
else if (raw[i] === '}') { depth--; if (depth === 0) { try { return JSON.parse(raw.slice(idx, i + 1)) } catch { break } } }
}
}
return { error: '解析失败' }
} catch (e) {
return { error: e.message || String(e) }
}
},
// 版本信息
get_version_info() {
let current = null