fix(plugins): preserve bundled host compatibility floor

This commit is contained in:
Peter Steinberger
2026-04-11 19:58:05 +01:00
parent ada95aefa9
commit 0e3f9657da
24 changed files with 26 additions and 40 deletions

View File

@@ -40,7 +40,7 @@
"install": {
"npmSpec": "@openclaw/bluebubbles",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -49,7 +49,7 @@
"install": {
"npmSpec": "@openclaw/discord",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -40,7 +40,7 @@
"install": {
"npmSpec": "@openclaw/feishu",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -43,7 +43,7 @@
"install": {
"npmSpec": "@openclaw/googlechat",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
}
}
}

View File

@@ -11,7 +11,7 @@
"./index.ts"
],
"install": {
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"setupEntry": "./setup-entry.ts",
"channel": {

View File

@@ -36,7 +36,7 @@
"install": {
"npmSpec": "@openclaw/line",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
}
}
}

View File

@@ -45,7 +45,7 @@
"install": {
"npmSpec": "@openclaw/matrix",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11",
"minHostVersion": ">=2026.4.10",
"allowInvalidConfigRecovery": true
}
}

View File

@@ -36,7 +36,7 @@
"install": {
"npmSpec": "@openclaw/mattermost",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
}
}
}

View File

@@ -18,7 +18,7 @@
"install": {
"npmSpec": "@openclaw/memory-lancedb",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -45,7 +45,7 @@
"install": {
"npmSpec": "@openclaw/msteams",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -37,7 +37,7 @@
"install": {
"npmSpec": "@openclaw/nextcloud-talk",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -36,7 +36,7 @@
"install": {
"npmSpec": "@openclaw/nostr",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -40,7 +40,7 @@
"install": {
"npmSpec": "@openclaw/qa-channel",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
}
}
}

View File

@@ -23,7 +23,7 @@
"install": {
"npmSpec": "@openclaw/qa-lab",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -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"

View File

@@ -23,7 +23,7 @@
"install": {
"npmSpec": "@openclaw/synology-chat",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
}
}
}

View File

@@ -39,7 +39,7 @@
"install": {
"npmSpec": "@openclaw/tlon",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
}
}
}

View File

@@ -16,7 +16,7 @@
"./index.ts"
],
"install": {
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"channel": {
"id": "twitch",

View File

@@ -25,7 +25,7 @@
"./index.ts"
],
"install": {
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -41,7 +41,7 @@
"install": {
"npmSpec": "@openclaw/whatsapp",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -39,7 +39,7 @@
"install": {
"npmSpec": "@openclaw/zalo",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -40,7 +40,7 @@
"install": {
"npmSpec": "@openclaw/zalouser",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.11"
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.4.11"

View File

@@ -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) {

View File

@@ -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");
});