@lark-apaas/openclaw-scripts-diagnose-cli 0.1.13-alpha.3 → 0.1.13-alpha.4
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 +37 -29
- 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.13-alpha.
|
|
55
|
+
return "0.1.13-alpha.4";
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/rule-engine/base.ts
|
|
@@ -10132,7 +10132,7 @@ async function reportCliRun(opts) {
|
|
|
10132
10132
|
//#region src/help.ts
|
|
10133
10133
|
const BIN = "mclaw-diagnose";
|
|
10134
10134
|
function versionBanner() {
|
|
10135
|
-
return `v0.1.13-alpha.
|
|
10135
|
+
return `v0.1.13-alpha.4`;
|
|
10136
10136
|
}
|
|
10137
10137
|
const COMMANDS = [
|
|
10138
10138
|
{
|
|
@@ -10886,22 +10886,7 @@ function runUpgradeLark(opts) {
|
|
|
10886
10886
|
log("wait done");
|
|
10887
10887
|
}
|
|
10888
10888
|
log("");
|
|
10889
|
-
log("── [4/6]
|
|
10890
|
-
const gatewayStatusResult = (0, node_child_process.spawnSync)("openclaw", ["gateway", "status"], {
|
|
10891
|
-
cwd,
|
|
10892
|
-
encoding: "utf-8",
|
|
10893
|
-
stdio: [
|
|
10894
|
-
"ignore",
|
|
10895
|
-
"pipe",
|
|
10896
|
-
"pipe"
|
|
10897
|
-
],
|
|
10898
|
-
timeout: 15e3
|
|
10899
|
-
});
|
|
10900
|
-
if (gatewayStatusResult.stdout?.trim()) log(`gateway stdout:\n${gatewayStatusResult.stdout.trim()}`);
|
|
10901
|
-
if (gatewayStatusResult.stderr?.trim()) log(`gateway stderr:\n${gatewayStatusResult.stderr.trim()}`);
|
|
10902
|
-
log(`gateway status exit: ${gatewayStatusResult.status ?? "null"}${gatewayStatusResult.error ? ` error: ${gatewayStatusResult.error.message}` : ""}`);
|
|
10903
|
-
log("");
|
|
10904
|
-
log("── [5/6] doctor check ────────────────────────────────────");
|
|
10889
|
+
log("── [4/6] doctor check ────────────────────────────────────");
|
|
10905
10890
|
const doctorArgs = ["doctor"];
|
|
10906
10891
|
if (opts.scene) doctorArgs.push(`--scene=${opts.scene}`);
|
|
10907
10892
|
const doctorResult = (0, node_child_process.spawnSync)(process.execPath, [cliScript, ...doctorArgs], {
|
|
@@ -10919,7 +10904,7 @@ function runUpgradeLark(opts) {
|
|
|
10919
10904
|
if (doctorResult.stderr?.trim()) log(`doctor stderr:\n${doctorResult.stderr.trim()}`);
|
|
10920
10905
|
log(`doctor exit: ${doctorResult.status ?? "null"}${doctorResult.error ? ` error: ${doctorResult.error.message}` : ""}`);
|
|
10921
10906
|
log("");
|
|
10922
|
-
log("── [
|
|
10907
|
+
log("── [5/6] channels probe ──────────────────────────────────");
|
|
10923
10908
|
try {
|
|
10924
10909
|
const channelsResult = runChannelsProbe(3e4);
|
|
10925
10910
|
log(`channels available: ${channelsResult.available}`);
|
|
@@ -10931,6 +10916,21 @@ function runUpgradeLark(opts) {
|
|
|
10931
10916
|
log(`channels probe threw: ${e.message}`);
|
|
10932
10917
|
}
|
|
10933
10918
|
log("");
|
|
10919
|
+
log("── [6/6] openclaw gateway status ────────────────────────");
|
|
10920
|
+
const gatewayStatusResult = (0, node_child_process.spawnSync)("openclaw", ["gateway", "status"], {
|
|
10921
|
+
cwd,
|
|
10922
|
+
encoding: "utf-8",
|
|
10923
|
+
stdio: [
|
|
10924
|
+
"ignore",
|
|
10925
|
+
"pipe",
|
|
10926
|
+
"pipe"
|
|
10927
|
+
],
|
|
10928
|
+
timeout: 15e3
|
|
10929
|
+
});
|
|
10930
|
+
if (gatewayStatusResult.stdout?.trim()) log(`gateway stdout:\n${gatewayStatusResult.stdout.trim()}`);
|
|
10931
|
+
if (gatewayStatusResult.stderr?.trim()) log(`gateway stderr:\n${gatewayStatusResult.stderr.trim()}`);
|
|
10932
|
+
log(`gateway status exit: ${gatewayStatusResult.status ?? "null"}${gatewayStatusResult.error ? ` error: ${gatewayStatusResult.error.message}` : ""}`);
|
|
10933
|
+
log("");
|
|
10934
10934
|
log(`${"=".repeat(60)}`);
|
|
10935
10935
|
log("upgrade-lark completed (validation disabled)");
|
|
10936
10936
|
log(`${"=".repeat(60)}`);
|
|
@@ -11464,10 +11464,11 @@ async function main() {
|
|
|
11464
11464
|
runId: rc.runId,
|
|
11465
11465
|
scene
|
|
11466
11466
|
});
|
|
11467
|
+
const upgradeDurationMs = Date.now() - t0;
|
|
11467
11468
|
console.log(JSON.stringify(result));
|
|
11468
11469
|
reportUpgradeLarkToSlardar({
|
|
11469
11470
|
scene,
|
|
11470
|
-
durationMs:
|
|
11471
|
+
durationMs: upgradeDurationMs,
|
|
11471
11472
|
success: result.ok,
|
|
11472
11473
|
logFile: result.logFile,
|
|
11473
11474
|
exitCode: result.exitCode,
|
|
@@ -11475,15 +11476,22 @@ async function main() {
|
|
|
11475
11476
|
validationError: result.validationError,
|
|
11476
11477
|
error: result.error
|
|
11477
11478
|
});
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11479
|
+
try {
|
|
11480
|
+
await reportCliRun({
|
|
11481
|
+
command: "upgrade-lark",
|
|
11482
|
+
runId: rc.runId,
|
|
11483
|
+
version: getVersion(),
|
|
11484
|
+
invocation: args.join(" "),
|
|
11485
|
+
durationMs: upgradeDurationMs,
|
|
11486
|
+
caller: rc.caller,
|
|
11487
|
+
traceId: rc.traceId,
|
|
11488
|
+
success: result.ok,
|
|
11489
|
+
result,
|
|
11490
|
+
error: result.ok ? void 0 : { message: result.error ?? "upgrade-lark failed" }
|
|
11491
|
+
});
|
|
11492
|
+
} catch (e) {
|
|
11493
|
+
console.error(`[telemetry] reportCliRun failed: ${e.message}`);
|
|
11494
|
+
}
|
|
11487
11495
|
if (!result.ok) {
|
|
11488
11496
|
node_process.default.exitCode = 1;
|
|
11489
11497
|
return;
|
package/package.json
CHANGED