@lark-apaas/openclaw-scripts-diagnose-cli 0.1.1-alpha.20 → 0.1.1-alpha.22
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 +36 -4
- package/package.json +1 -1
- package/template/openclaw.json +49 -32
package/dist/index.cjs
CHANGED
|
@@ -199,7 +199,7 @@ function shell(cmd, timeoutMs = 6e4) {
|
|
|
199
199
|
}).trim();
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
|
-
//#region \0@oxc-project+runtime@0.
|
|
202
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/decorate.js
|
|
203
203
|
function __decorate(decorators, target, key, desc) {
|
|
204
204
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
205
205
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -600,6 +600,27 @@ FeishuChannelRule = _FeishuChannelRule = __decorate([Rule({
|
|
|
600
600
|
repairMode: "standard"
|
|
601
601
|
})], FeishuChannelRule);
|
|
602
602
|
//#endregion
|
|
603
|
+
//#region src/rules/feishu-default-account.ts
|
|
604
|
+
let FeishuDefaultAccountRule = class FeishuDefaultAccountRule extends DiagnoseRule {
|
|
605
|
+
validate(ctx) {
|
|
606
|
+
const feishu = getNestedMap(ctx.config, "channels", "feishu");
|
|
607
|
+
if (feishu && "defaultAccount" in feishu) return {
|
|
608
|
+
pass: false,
|
|
609
|
+
message: "channels.feishu.defaultAccount should be removed"
|
|
610
|
+
};
|
|
611
|
+
return { pass: true };
|
|
612
|
+
}
|
|
613
|
+
repair(ctx) {
|
|
614
|
+
const feishu = getNestedMap(ctx.config, "channels", "feishu");
|
|
615
|
+
if (feishu && "defaultAccount" in feishu) delete feishu.defaultAccount;
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
FeishuDefaultAccountRule = __decorate([Rule({
|
|
619
|
+
key: "feishu_default_account",
|
|
620
|
+
dependsOn: ["config_syntax_check"],
|
|
621
|
+
repairMode: "standard"
|
|
622
|
+
})], FeishuDefaultAccountRule);
|
|
623
|
+
//#endregion
|
|
603
624
|
//#region src/rules/gateway.ts
|
|
604
625
|
var _GatewayRule;
|
|
605
626
|
let GatewayRule = class GatewayRule extends DiagnoseRule {
|
|
@@ -1224,7 +1245,7 @@ function waitForInitNpm(maxWaitMs, log) {
|
|
|
1224
1245
|
* starts, avoiding the schema-priority mismatch that caused doctor to
|
|
1225
1246
|
* reject valid config fields like threadSession / footer.
|
|
1226
1247
|
*/
|
|
1227
|
-
function ensureOpenclawBinary(srcDir, log) {
|
|
1248
|
+
function ensureOpenclawBinary(srcDir, configPath, log) {
|
|
1228
1249
|
const targetVersion = loadJSON5().parse(node_fs.default.readFileSync(node_path.default.join(srcDir, "openclaw.json"), "utf-8")).meta?.lastTouchedVersion;
|
|
1229
1250
|
log(`target openclaw version: ${targetVersion ?? "<unset>"}`);
|
|
1230
1251
|
if (targetVersion && isOpenclawAtVersion(targetVersion)) {
|
|
@@ -1232,10 +1253,16 @@ function ensureOpenclawBinary(srcDir, log) {
|
|
|
1232
1253
|
return;
|
|
1233
1254
|
}
|
|
1234
1255
|
if (isOpenclawInstalled()) {
|
|
1235
|
-
const updateCmd = `openclaw update${targetVersion ? " --tag
|
|
1256
|
+
const updateCmd = `openclaw update${targetVersion ? " --tag " + targetVersion : ""} --yes --no-restart`;
|
|
1236
1257
|
log(`openclaw installed but version mismatched, running: ${updateCmd}`);
|
|
1237
1258
|
const timeout = 12 * 6e4;
|
|
1238
1259
|
const t = Date.now();
|
|
1260
|
+
const tmpConfig = configPath + ".update-tmp";
|
|
1261
|
+
const hadConfig = node_fs.default.existsSync(configPath);
|
|
1262
|
+
if (hadConfig) {
|
|
1263
|
+
node_fs.default.renameSync(configPath, tmpConfig);
|
|
1264
|
+
log("temporarily hid config to bypass config guard");
|
|
1265
|
+
}
|
|
1239
1266
|
try {
|
|
1240
1267
|
shell(updateCmd, timeout);
|
|
1241
1268
|
log(`openclaw update done in ${Date.now() - t}ms`);
|
|
@@ -1243,6 +1270,11 @@ function ensureOpenclawBinary(srcDir, log) {
|
|
|
1243
1270
|
const elapsed = Date.now() - t;
|
|
1244
1271
|
if (elapsed >= timeout - 1e3) log(`openclaw update timed out after ${elapsed}ms (non-fatal, continuing)`);
|
|
1245
1272
|
else throw e;
|
|
1273
|
+
} finally {
|
|
1274
|
+
if (hadConfig && node_fs.default.existsSync(tmpConfig)) {
|
|
1275
|
+
node_fs.default.renameSync(tmpConfig, configPath);
|
|
1276
|
+
log("restored config after update");
|
|
1277
|
+
}
|
|
1246
1278
|
}
|
|
1247
1279
|
} else {
|
|
1248
1280
|
log("openclaw binary not found, running full reinstall");
|
|
@@ -1512,7 +1544,7 @@ function runReset(input, taskId, resultFile) {
|
|
|
1512
1544
|
step(4);
|
|
1513
1545
|
waitForInitNpm(10 * 6e4, log);
|
|
1514
1546
|
step(5);
|
|
1515
|
-
ensureOpenclawBinary(srcDir, log);
|
|
1547
|
+
ensureOpenclawBinary(srcDir, configPath, log);
|
|
1516
1548
|
step(6);
|
|
1517
1549
|
mergeCoreBackupAndOrigins(configPath, vars, resetData, log);
|
|
1518
1550
|
step(7);
|
package/package.json
CHANGED
package/template/openclaw.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"lastTouchedVersion": "2026.4.9",
|
|
4
|
-
"lastTouchedAt": "2026-04-
|
|
4
|
+
"lastTouchedAt": "2026-04-13T03:14:33.386Z"
|
|
5
5
|
},
|
|
6
6
|
"wizard": {
|
|
7
7
|
"lastRunAt": "2026-03-30T14:54:56.160Z",
|
|
@@ -448,14 +448,27 @@
|
|
|
448
448
|
"plugins": {
|
|
449
449
|
"allow": [
|
|
450
450
|
"openclaw-lark",
|
|
451
|
-
"openclaw-extension-miaoda",
|
|
452
451
|
"openclaw-extension-miaoda-coding",
|
|
453
|
-
"browser"
|
|
452
|
+
"browser",
|
|
453
|
+
"openclaw-mem0-plugin",
|
|
454
|
+
"openclaw-extension-miaoda"
|
|
454
455
|
],
|
|
455
456
|
"entries": {
|
|
456
457
|
"feishu": {
|
|
457
458
|
"enabled": false
|
|
458
459
|
},
|
|
460
|
+
"openclaw-lark": {
|
|
461
|
+
"enabled": true
|
|
462
|
+
},
|
|
463
|
+
"openclaw-extension-miaoda-coding": {
|
|
464
|
+
"enabled": true
|
|
465
|
+
},
|
|
466
|
+
"browser": {
|
|
467
|
+
"enabled": true
|
|
468
|
+
},
|
|
469
|
+
"openclaw-mem0-plugin": {
|
|
470
|
+
"enabled": false
|
|
471
|
+
},
|
|
459
472
|
"openclaw-extension-miaoda": {
|
|
460
473
|
"enabled": true,
|
|
461
474
|
"config": {
|
|
@@ -466,15 +479,6 @@
|
|
|
466
479
|
]
|
|
467
480
|
}
|
|
468
481
|
}
|
|
469
|
-
},
|
|
470
|
-
"openclaw-lark": {
|
|
471
|
-
"enabled": true
|
|
472
|
-
},
|
|
473
|
-
"openclaw-extension-miaoda-coding": {
|
|
474
|
-
"enabled": true
|
|
475
|
-
},
|
|
476
|
-
"browser": {
|
|
477
|
-
"enabled": true
|
|
478
482
|
}
|
|
479
483
|
},
|
|
480
484
|
"installs": {
|
|
@@ -491,31 +495,44 @@
|
|
|
491
495
|
"resolvedAt": "2026-04-03T06:27:44.706Z",
|
|
492
496
|
"installedAt": "2026-04-03T06:28:10.547Z"
|
|
493
497
|
},
|
|
494
|
-
"openclaw-extension-miaoda": {
|
|
495
|
-
"source": "npm",
|
|
496
|
-
"installPath": "./extensions/openclaw-extension-miaoda",
|
|
497
|
-
"version": "1.0.9",
|
|
498
|
-
"installedAt": "2026-04-11T09:27:06.639Z",
|
|
499
|
-
"spec": "@lark-apaas/openclaw-extension-miaoda@1.0.9",
|
|
500
|
-
"resolvedVersion": "1.0.9",
|
|
501
|
-
"resolvedName": "@lark-apaas/openclaw-extension-miaoda",
|
|
502
|
-
"resolvedSpec": "@lark-apaas/openclaw-extension-miaoda@1.0.9",
|
|
503
|
-
"resolvedAt": "2026-04-11T09:27:06.639Z",
|
|
504
|
-
"integrity": "sha512-McNeuPAUDLrMhT3yZuwk9A7pI262r2CK1N1KNQP6VuzymkDUjx2sTcJPCEBB3bFkdXd0yUU983/OhJiaJo+JWg==",
|
|
505
|
-
"shasum": "a3c75886e40b63f39a33a2660932f8afdae6a514"
|
|
506
|
-
},
|
|
507
498
|
"openclaw-extension-miaoda-coding": {
|
|
508
499
|
"source": "npm",
|
|
509
500
|
"spec": "@lark-apaas/openclaw-extension-miaoda-coding",
|
|
510
501
|
"installPath": "./extensions/openclaw-extension-miaoda-coding",
|
|
511
|
-
"version": "1.0.
|
|
502
|
+
"version": "1.0.11",
|
|
512
503
|
"resolvedName": "@lark-apaas/openclaw-extension-miaoda-coding",
|
|
513
|
-
"resolvedVersion": "1.0.
|
|
514
|
-
"resolvedSpec": "@lark-apaas/openclaw-extension-miaoda-coding@1.0.
|
|
515
|
-
"integrity": "sha512-
|
|
516
|
-
"shasum": "
|
|
517
|
-
"resolvedAt": "2026-04-
|
|
518
|
-
"installedAt": "2026-04-
|
|
504
|
+
"resolvedVersion": "1.0.11",
|
|
505
|
+
"resolvedSpec": "@lark-apaas/openclaw-extension-miaoda-coding@1.0.11",
|
|
506
|
+
"integrity": "sha512-B2i3n367cR37UVJrDCTZSBljxUYzDZ4gWf3dw79XBdaZcq0G88XnkgyFmJoZijQd/HQP13xNBlfcLk4Lz2c6Bg==",
|
|
507
|
+
"shasum": "a6bf5efcec70bbd139ee7a75ea183e4f9751fd39",
|
|
508
|
+
"resolvedAt": "2026-04-13T14:40:18.926Z",
|
|
509
|
+
"installedAt": "2026-04-13T14:40:18.926Z"
|
|
510
|
+
},
|
|
511
|
+
"openclaw-mem0-plugin": {
|
|
512
|
+
"source": "npm",
|
|
513
|
+
"spec": "@shareclz/openclaw-mem0-plugin@1.1.2",
|
|
514
|
+
"installPath": "./extensions/openclaw-mem0-plugin",
|
|
515
|
+
"installedAt": "2026-04-13T03:13:10.564Z",
|
|
516
|
+
"version": "1.1.2",
|
|
517
|
+
"resolvedVersion": "1.1.2",
|
|
518
|
+
"resolvedName": "@shareclz/openclaw-mem0-plugin",
|
|
519
|
+
"resolvedSpec": "@shareclz/openclaw-mem0-plugin@1.1.2",
|
|
520
|
+
"resolvedAt": "2026-04-13T03:13:10.564Z",
|
|
521
|
+
"integrity": "sha512-j6m8oN6ykVc3a1/Bw0o7LmXmNApiGk6wxafrT0zW9m4UiqZe8LM4Y2LzvGEAnKwFdkUIkaSzpl/8Qp7MPy/zcQ==",
|
|
522
|
+
"shasum": "b1bdaa44917ce9535ba1acddb145ea0ed5d26bae"
|
|
523
|
+
},
|
|
524
|
+
"openclaw-extension-miaoda": {
|
|
525
|
+
"source": "npm",
|
|
526
|
+
"installPath": "./extensions/openclaw-extension-miaoda",
|
|
527
|
+
"version": "1.0.10",
|
|
528
|
+
"installedAt": "2026-04-14T12:21:23.090Z",
|
|
529
|
+
"spec": "@lark-apaas/openclaw-extension-miaoda@1.0.10",
|
|
530
|
+
"resolvedVersion": "1.0.10",
|
|
531
|
+
"resolvedName": "@lark-apaas/openclaw-extension-miaoda",
|
|
532
|
+
"resolvedSpec": "@lark-apaas/openclaw-extension-miaoda@1.0.10",
|
|
533
|
+
"resolvedAt": "2026-04-14T12:21:23.090Z",
|
|
534
|
+
"integrity": "sha512-aWXIBdzcjUQAdthiUjLhgGp8G0TMVB3wpAzR3wjscDRX7XAo1zhpmcWkBM0JNdrle1i3e5eB4hxVcLfn1yooNw==",
|
|
535
|
+
"shasum": "5ef5f6ef972d90b43091c79e8a1038a3052cc1f5"
|
|
519
536
|
}
|
|
520
537
|
}
|
|
521
538
|
}
|