mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 13:10:43 +00:00
fix(release): accept config-only survivor plugin rows
This commit is contained in:
@@ -433,20 +433,36 @@ function assertConfiguredPluginInstalls() {
|
||||
}
|
||||
const index = readInstalledPluginIndex();
|
||||
const records = index.installRecords ?? {};
|
||||
const matrix = records.matrix;
|
||||
const bundledMatrix = (index.plugins ?? []).find((plugin) => plugin?.pluginId === "matrix");
|
||||
if (matrix) {
|
||||
assertExternalPluginInstall(records, "matrix", "@openclaw/matrix");
|
||||
} else if (bundledMatrix) {
|
||||
assert(bundledMatrix.enabled !== false, "configured bundled matrix plugin is disabled");
|
||||
}
|
||||
const brave = (index.plugins ?? []).find((plugin) => plugin?.pluginId === "brave");
|
||||
assert(brave, "configured external brave plugin is missing from the plugin index");
|
||||
assert(brave.enabled !== false, "configured external brave plugin is disabled");
|
||||
assertExternalPluginInstall(records, "brave", "@openclaw/brave-plugin");
|
||||
assertOptionalConfiguredPluginIndex(records, index.plugins ?? [], {
|
||||
bundled: true,
|
||||
packageName: "@openclaw/matrix",
|
||||
pluginId: "matrix",
|
||||
});
|
||||
assertOptionalConfiguredPluginIndex(records, index.plugins ?? [], {
|
||||
packageName: "@openclaw/brave-plugin",
|
||||
pluginId: "brave",
|
||||
});
|
||||
assert(!records.telegram, "internal telegram plugin should not be installed externally");
|
||||
}
|
||||
|
||||
function assertOptionalConfiguredPluginIndex(
|
||||
records,
|
||||
plugins,
|
||||
{ bundled = false, packageName, pluginId },
|
||||
) {
|
||||
const record = records[pluginId];
|
||||
const plugin = plugins.find((entry) => entry?.pluginId === pluginId);
|
||||
if (record) {
|
||||
assertExternalPluginInstall(records, pluginId, packageName);
|
||||
}
|
||||
if (plugin) {
|
||||
assert(
|
||||
plugin.enabled !== false,
|
||||
`configured ${bundled ? "bundled" : "external"} ${pluginId} plugin is disabled`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function assertStatusJson([file]) {
|
||||
const status = readJson(file);
|
||||
assert(status && typeof status === "object", "gateway status JSON was not an object");
|
||||
|
||||
Reference in New Issue
Block a user