@lark-apaas/openclaw-scripts-diagnose-cli 0.1.18-beta.0 → 0.1.19-alpha.0
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 -6
- 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.
|
|
55
|
+
return "0.1.19-alpha.0";
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/rule-engine/base.ts
|
|
@@ -3347,6 +3347,14 @@ function cleanupLegacyResiduals(ctx) {
|
|
|
3347
3347
|
//#endregion
|
|
3348
3348
|
//#region src/version-compat.ts
|
|
3349
3349
|
const VERSION_COMPAT_MAP = Object.freeze([
|
|
3350
|
+
{
|
|
3351
|
+
openclawLarkVersion: "2026.5.20",
|
|
3352
|
+
minOpenclawVersion: "2026.5.7"
|
|
3353
|
+
},
|
|
3354
|
+
{
|
|
3355
|
+
openclawLarkVersion: "2026.5.13",
|
|
3356
|
+
minOpenclawVersion: "2026.5.7"
|
|
3357
|
+
},
|
|
3350
3358
|
{
|
|
3351
3359
|
openclawLarkVersion: "2026.5.12",
|
|
3352
3360
|
minOpenclawVersion: "2026.5.7"
|
|
@@ -4294,8 +4302,14 @@ CleanupInstallBackupDirsRule = __decorate([Rule({
|
|
|
4294
4302
|
})], CleanupInstallBackupDirsRule);
|
|
4295
4303
|
//#endregion
|
|
4296
4304
|
//#region src/rules/lark-cli-missing-for-installed-lark-plugin.ts
|
|
4297
|
-
/**
|
|
4305
|
+
/** 触发本规则的特定 fork 飞书插件版本(仅用于 isTargetForkPlugin 检测,不作安装 tag)。 */
|
|
4298
4306
|
const TARGET_VERSION = "2026.4.4";
|
|
4307
|
+
/**
|
|
4308
|
+
* 缺省安装 tag:当 ctx 未携带 recommendedOpenclawTag 时,install-cli 用它拉 OSS manifest。
|
|
4309
|
+
* 必须是有效的 openclaw 推荐版本(manifest 以 openclaw 版本为 key),不能用 fork 插件版本
|
|
4310
|
+
* (如 2026.4.4 不是 openclaw manifest tag,会导致 fetchManifest 报 "manifest signed URL missing")。
|
|
4311
|
+
*/
|
|
4312
|
+
const FALLBACK_OPENCLAW_TAG = "2026.4.11";
|
|
4299
4313
|
function readInstalledLarkPlugin(ctx) {
|
|
4300
4314
|
const pkgPath = node_path.default.join(getExtensionsDir(ctx.configPath), LARK_PLUGIN_NAME, "package.json");
|
|
4301
4315
|
if (!node_fs.default.existsSync(pkgPath)) return null;
|
|
@@ -4374,7 +4388,9 @@ let LarkCliMissingForInstalledLarkPluginRule = class LarkCliMissingForInstalledL
|
|
|
4374
4388
|
repair(ctx) {
|
|
4375
4389
|
if (!isTargetForkPlugin(readInstalledLarkPlugin(ctx))) return;
|
|
4376
4390
|
if (isLarkCliAvailable()) return;
|
|
4377
|
-
|
|
4391
|
+
const tag = ctx.vars.recommendedOpenclawTag || FALLBACK_OPENCLAW_TAG;
|
|
4392
|
+
console.error(`[lark-cli-missing] installing lark-cli via 'install-cli ${tag} --cli=lark-cli'`);
|
|
4393
|
+
installLarkCliOnce(tag);
|
|
4378
4394
|
}
|
|
4379
4395
|
};
|
|
4380
4396
|
LarkCliMissingForInstalledLarkPluginRule = __decorate([Rule({
|
|
@@ -11236,7 +11252,7 @@ async function reportCliRun(opts) {
|
|
|
11236
11252
|
//#region src/help.ts
|
|
11237
11253
|
const BIN = "mclaw-diagnose";
|
|
11238
11254
|
function versionBanner() {
|
|
11239
|
-
return `v0.1.
|
|
11255
|
+
return `v0.1.19-alpha.0`;
|
|
11240
11256
|
}
|
|
11241
11257
|
const COMMANDS = [
|
|
11242
11258
|
{
|
|
@@ -12429,6 +12445,21 @@ const mode = args.find((a) => !a.startsWith("-"));
|
|
|
12429
12445
|
const t0 = Date.now();
|
|
12430
12446
|
const scene = getFlag(args, "scene");
|
|
12431
12447
|
/**
|
|
12448
|
+
* Decode `--ctx=<base64>` into an opaque JSON object. Returns undefined when
|
|
12449
|
+
* the flag isn't present — the caller decides whether to fall back to the
|
|
12450
|
+
* innerapi or to error out.
|
|
12451
|
+
*
|
|
12452
|
+
* The object's shape is not enforced here; downstream code consumes it via
|
|
12453
|
+
* either `normalizeCtx()` (new path) or direct field access for the legacy
|
|
12454
|
+
* check/repair/reset contract still used by sandbox_console push.
|
|
12455
|
+
*/
|
|
12456
|
+
function parseCtxFlag(args) {
|
|
12457
|
+
const ctxArg = args.find((a) => a.startsWith("--ctx="));
|
|
12458
|
+
if (!ctxArg) return void 0;
|
|
12459
|
+
const b64 = ctxArg.slice(6);
|
|
12460
|
+
return JSON.parse(Buffer.from(b64, "base64").toString("utf-8"));
|
|
12461
|
+
}
|
|
12462
|
+
/**
|
|
12432
12463
|
* Pull the first non-flag positional after the mode name.
|
|
12433
12464
|
* (The mode itself is args[0] in the filtered set, so we skip index 0.)
|
|
12434
12465
|
*/
|
|
@@ -12519,7 +12550,7 @@ async function main() {
|
|
|
12519
12550
|
console.error(`${mode}: begin argv=[${args.join(" ")}] version=${getVersion()} traceId=${traceId ?? "-"} caller=${caller ?? "-"} runIdGenerated=${rc.generated}`);
|
|
12520
12551
|
switch (mode) {
|
|
12521
12552
|
case "check": {
|
|
12522
|
-
const raw = await fetchCtxViaInnerApi({
|
|
12553
|
+
const raw = parseCtxFlag(args) ?? await fetchCtxViaInnerApi({
|
|
12523
12554
|
populate: planCtxPopulate({
|
|
12524
12555
|
command: "check",
|
|
12525
12556
|
profile
|
|
@@ -12544,7 +12575,7 @@ async function main() {
|
|
|
12544
12575
|
break;
|
|
12545
12576
|
}
|
|
12546
12577
|
case "repair": {
|
|
12547
|
-
const raw = await fetchCtxViaInnerApi({
|
|
12578
|
+
const raw = parseCtxFlag(args) ?? await fetchCtxViaInnerApi({
|
|
12548
12579
|
populate: planCtxPopulate({
|
|
12549
12580
|
command: "repair",
|
|
12550
12581
|
profile
|
package/package.json
CHANGED