mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 05:32:53 +00:00
fix(plugins): preserve bundled host compatibility floor
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/bluebubbles",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/discord",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/feishu",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/googlechat",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"./index.ts"
|
||||
],
|
||||
"install": {
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"setupEntry": "./setup-entry.ts",
|
||||
"channel": {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/line",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/matrix",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11",
|
||||
"minHostVersion": ">=2026.4.10",
|
||||
"allowInvalidConfigRecovery": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/mattermost",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/memory-lancedb",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/msteams",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/nextcloud-talk",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/nostr",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/qa-channel",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/qa-lab",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"npmSpec": "@openclaw/qqbot",
|
||||
"localPath": "extensions/qqbot",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/synology-chat",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/tlon",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"./index.ts"
|
||||
],
|
||||
"install": {
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"channel": {
|
||||
"id": "twitch",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"./index.ts"
|
||||
],
|
||||
"install": {
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/whatsapp",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/zalo",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"install": {
|
||||
"npmSpec": "@openclaw/zalouser",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.4.11"
|
||||
"minHostVersion": ">=2026.4.10"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.4.11"
|
||||
|
||||
@@ -37,20 +37,6 @@ function syncOpenClawDependencyRange(
|
||||
return true;
|
||||
}
|
||||
|
||||
function syncMinHostVersion(pkg: PackageJson, targetVersion: string): boolean {
|
||||
const installConfig = pkg.openclaw?.install;
|
||||
const current = installConfig?.minHostVersion;
|
||||
if (!current || !OPENCLAW_VERSION_RANGE_RE.test(current)) {
|
||||
return false;
|
||||
}
|
||||
const next = `>=${targetVersion}`;
|
||||
if (current === next) {
|
||||
return false;
|
||||
}
|
||||
installConfig.minHostVersion = next;
|
||||
return true;
|
||||
}
|
||||
|
||||
function syncPluginApiVersion(pkg: PackageJson, targetVersion: string): boolean {
|
||||
const compat = pkg.openclaw?.compat;
|
||||
const current = compat?.pluginApi;
|
||||
@@ -136,14 +122,14 @@ export function syncPluginVersions(rootDir = resolve(".")) {
|
||||
const versionChanged = pkg.version !== targetVersion;
|
||||
const devDependencyChanged = syncOpenClawDependencyRange(pkg.devDependencies, targetVersion);
|
||||
const peerDependencyChanged = syncOpenClawDependencyRange(pkg.peerDependencies, targetVersion);
|
||||
const minHostVersionChanged = syncMinHostVersion(pkg, targetVersion);
|
||||
// minHostVersion is a compatibility floor, not release alignment metadata.
|
||||
// Keep it stable unless the owning plugin intentionally raises it.
|
||||
const pluginApiChanged = syncPluginApiVersion(pkg, targetVersion);
|
||||
const buildOpenClawVersionChanged = syncBuildOpenClawVersion(pkg, targetVersion);
|
||||
const packageChanged =
|
||||
versionChanged ||
|
||||
devDependencyChanged ||
|
||||
peerDependencyChanged ||
|
||||
minHostVersionChanged ||
|
||||
pluginApiChanged ||
|
||||
buildOpenClawVersionChanged;
|
||||
if (!packageChanged) {
|
||||
|
||||
@@ -16,7 +16,7 @@ describe("syncPluginVersions", () => {
|
||||
cleanupTempDirs(tempDirs);
|
||||
});
|
||||
|
||||
it("preserves workspace openclaw devDependencies while bumping plugin host constraints", () => {
|
||||
it("preserves workspace openclaw devDependencies and plugin host floors", () => {
|
||||
const rootDir = makeTempDir(tempDirs, "openclaw-sync-plugin-versions-");
|
||||
|
||||
writeJson(path.join(rootDir, "package.json"), {
|
||||
@@ -69,7 +69,7 @@ describe("syncPluginVersions", () => {
|
||||
expect(updatedPackage.version).toBe("2026.4.1");
|
||||
expect(updatedPackage.devDependencies?.openclaw).toBe("workspace:*");
|
||||
expect(updatedPackage.peerDependencies?.openclaw).toBe(">=2026.4.1");
|
||||
expect(updatedPackage.openclaw?.install?.minHostVersion).toBe(">=2026.4.1");
|
||||
expect(updatedPackage.openclaw?.install?.minHostVersion).toBe(">=2026.3.30");
|
||||
expect(updatedPackage.openclaw?.compat?.pluginApi).toBe(">=2026.4.1");
|
||||
expect(updatedPackage.openclaw?.build?.openclawVersion).toBe("2026.4.1");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user