@lark-apaas/openclaw-scripts-diagnose-cli 0.1.14-alpha.8 → 0.1.14-alpha.9
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 +16 -9
- 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.14-alpha.
|
|
55
|
+
return "0.1.14-alpha.9";
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/rule-engine/base.ts
|
|
@@ -3607,6 +3607,7 @@ function parseChannelsProbeOutput(text) {
|
|
|
3607
3607
|
*/
|
|
3608
3608
|
function runChannelsProbe(timeoutMs = 6e4) {
|
|
3609
3609
|
let stdout = "";
|
|
3610
|
+
let stderrText = "";
|
|
3610
3611
|
let execError;
|
|
3611
3612
|
try {
|
|
3612
3613
|
stdout = (0, node_child_process.execSync)("openclaw channels status --probe", {
|
|
@@ -3624,8 +3625,8 @@ function runChannelsProbe(timeoutMs = 6e4) {
|
|
|
3624
3625
|
stdout = typeof stdoutRaw === "string" ? stdoutRaw : stdoutRaw?.toString("utf-8") ?? "";
|
|
3625
3626
|
execError = err.message;
|
|
3626
3627
|
const stderrRaw = err.stderr;
|
|
3627
|
-
|
|
3628
|
-
if (
|
|
3628
|
+
stderrText = (typeof stderrRaw === "string" ? stderrRaw : stderrRaw?.toString("utf-8") ?? "").trim();
|
|
3629
|
+
if (stderrText) console.error(`channels-probe: stderr from CLI: ${stderrText}`);
|
|
3629
3630
|
}
|
|
3630
3631
|
if (stdout.trim()) return {
|
|
3631
3632
|
available: true,
|
|
@@ -3634,7 +3635,7 @@ function runChannelsProbe(timeoutMs = 6e4) {
|
|
|
3634
3635
|
return {
|
|
3635
3636
|
available: false,
|
|
3636
3637
|
gatewayReachable: false,
|
|
3637
|
-
feishuConfigInvalid:
|
|
3638
|
+
feishuConfigInvalid: stderrText.includes(FEISHU_INVALID_CONFIG_MSG),
|
|
3638
3639
|
accounts: [],
|
|
3639
3640
|
anyAccountWorking: false,
|
|
3640
3641
|
error: execError ?? "no output from openclaw channels status --probe"
|
|
@@ -3668,9 +3669,15 @@ let UpgradeLarkNeededRule = class UpgradeLarkNeededRule extends DiagnoseRule {
|
|
|
3668
3669
|
}
|
|
3669
3670
|
let probeResult;
|
|
3670
3671
|
try {
|
|
3671
|
-
probeResult = runChannelsProbe(
|
|
3672
|
+
probeResult = runChannelsProbe(6e4);
|
|
3672
3673
|
} catch {
|
|
3673
|
-
|
|
3674
|
+
probeResult = {
|
|
3675
|
+
available: false,
|
|
3676
|
+
gatewayReachable: false,
|
|
3677
|
+
feishuConfigInvalid: false,
|
|
3678
|
+
accounts: [],
|
|
3679
|
+
anyAccountWorking: false
|
|
3680
|
+
};
|
|
3674
3681
|
}
|
|
3675
3682
|
const feishuConfigInvalid = probeResult.feishuConfigInvalid;
|
|
3676
3683
|
if (!(versionIncompatible || feishuConfigInvalid)) return { pass: true };
|
|
@@ -10388,7 +10395,7 @@ async function reportCliRun(opts) {
|
|
|
10388
10395
|
//#region src/help.ts
|
|
10389
10396
|
const BIN = "mclaw-diagnose";
|
|
10390
10397
|
function versionBanner() {
|
|
10391
|
-
return `v0.1.14-alpha.
|
|
10398
|
+
return `v0.1.14-alpha.9`;
|
|
10392
10399
|
}
|
|
10393
10400
|
const COMMANDS = [
|
|
10394
10401
|
{
|
|
@@ -11138,7 +11145,7 @@ function runUpgradeLark(opts) {
|
|
|
11138
11145
|
log(`${"=".repeat(60)}`);
|
|
11139
11146
|
log("");
|
|
11140
11147
|
log("── [Pre-check A] channels probe(升级前)────────────────");
|
|
11141
|
-
const beforeChannels = probeChannels("before", log,
|
|
11148
|
+
const beforeChannels = probeChannels("before", log, 6e4);
|
|
11142
11149
|
log("");
|
|
11143
11150
|
log("── [Pre-check B] 版本兼容预检 ───────────────────────────");
|
|
11144
11151
|
let versionIncompatible = false;
|
|
@@ -11279,7 +11286,7 @@ function runUpgradeLark(opts) {
|
|
|
11279
11286
|
log(` version-compat post-check error: ${e.message} — treating as still-incompatible`);
|
|
11280
11287
|
afterVersionIncompatible = true;
|
|
11281
11288
|
}
|
|
11282
|
-
const afterChannels = probeChannels("after", log,
|
|
11289
|
+
const afterChannels = probeChannels("after", log, 6e4);
|
|
11283
11290
|
log(` feishu config invalid after: ${afterChannels.feishuConfigInvalid}`);
|
|
11284
11291
|
const stillNeedsUpgrade = (afterVersionIncompatible || afterChannels.feishuConfigInvalid) && !afterChannels.anyAccountWorking;
|
|
11285
11292
|
log(` post-check: stillNeedsUpgrade=${stillNeedsUpgrade} (version=${afterVersionIncompatible}, feishuConfig=${afterChannels.feishuConfigInvalid}, channelsWorking=${afterChannels.anyAccountWorking})`);
|
package/package.json
CHANGED