@lark-apaas/openclaw-scripts-diagnose-cli 0.1.15-alpha.5 → 0.1.15-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +28 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,7 +52,7 @@ node_assert = __toESM(node_assert);
|
|
|
52
52
|
* it terse and parseable.
|
|
53
53
|
*/
|
|
54
54
|
function getVersion() {
|
|
55
|
-
return "0.1.15-alpha.
|
|
55
|
+
return "0.1.15-alpha.6";
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/rule-engine/base.ts
|
|
@@ -10602,7 +10602,7 @@ async function reportCliRun(opts) {
|
|
|
10602
10602
|
//#region src/help.ts
|
|
10603
10603
|
const BIN = "mclaw-diagnose";
|
|
10604
10604
|
function versionBanner() {
|
|
10605
|
-
return `v0.1.15-alpha.
|
|
10605
|
+
return `v0.1.15-alpha.6`;
|
|
10606
10606
|
}
|
|
10607
10607
|
const COMMANDS = [
|
|
10608
10608
|
{
|
|
@@ -11214,6 +11214,32 @@ function readLogFileTail(filePath, maxBytes = 4e3) {
|
|
|
11214
11214
|
* extraMetrics 记录各阶段耗时(毫秒);未执行的阶段上报 -1 作为哨兵值,
|
|
11215
11215
|
* 便于在 Slardar 查询时区分"未运行"和"运行了 0ms"。
|
|
11216
11216
|
*/
|
|
11217
|
+
/**
|
|
11218
|
+
* 向 Slardar 上报 upgrade-lark 运行结果(upgrade_lark_run 事件)。
|
|
11219
|
+
*
|
|
11220
|
+
* ## 标准字段
|
|
11221
|
+
* - durationMs:整条命令的总耗时(从 CLI 入口到 runUpgradeLark 返回),含重启阶段。
|
|
11222
|
+
* - status:success / failed
|
|
11223
|
+
*
|
|
11224
|
+
* ## extraCategories(字符串维度)
|
|
11225
|
+
* - scene:调用方标识(如 PageUpgradeLark)
|
|
11226
|
+
* - check_only:是否为 --check 仅诊断模式
|
|
11227
|
+
* - exit_code:npx 子进程退出码(跳过安装时为空)
|
|
11228
|
+
* - rollback_ok:回滚是否成功(未触发回滚时为空)
|
|
11229
|
+
* - validation_error:安装后校验失败的错误信息
|
|
11230
|
+
* - error_msg:命令级错误信息
|
|
11231
|
+
* - log_content:日志文件末尾 4000 字节(过滤时间戳和分隔符行)
|
|
11232
|
+
*
|
|
11233
|
+
* ## extraMetrics(数值指标,单位毫秒)
|
|
11234
|
+
* 未执行的阶段上报 -1 作为哨兵值,便于与"运行了 0ms"区分。
|
|
11235
|
+
* - pre_probe_ms:[Pre-check A] 升级前 channels probe 耗时
|
|
11236
|
+
* - version_check_ms:[Pre-check B] 版本兼容性检测耗时
|
|
11237
|
+
* - backup_ms:[1/6] 文件备份耗时
|
|
11238
|
+
* - npx_install_ms:[3/6] npx install 耗时(不含安装后 5s 等待)
|
|
11239
|
+
* - post_probe_ms:[4/5] 安装后 channels probe 耗时
|
|
11240
|
+
* - doctor_fix_ms:[6/6] doctor --fix 耗时
|
|
11241
|
+
* 注:[7/7] 重启耗时写入日志但未单独上报,包含在 durationMs 总耗时中。
|
|
11242
|
+
*/
|
|
11217
11243
|
function reportUpgradeLarkToSlardar(opts) {
|
|
11218
11244
|
console.error(`[slardar] upgrade_lark_run scene=${opts.scene ?? ""} checkOnly=${opts.checkOnly} success=${opts.success} exitCode=${opts.exitCode ?? ""} rollbackOk=${opts.rollbackOk ?? ""}`);
|
|
11219
11245
|
const t = opts.timing ?? {};
|
package/package.json
CHANGED