




















@@ -560,7 +560,9 @@ const path = require("node:path");
560560561561const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json");
562562const index = JSON.parse(fs.readFileSync(indexPath, "utf8"));
563-const installRecords = index.installRecords ?? index.records ?? {};
563+const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");
564+const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {};
565+const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {};
564566for (const id of ["marketplace-shortcut", "marketplace-direct"]) {
565567 const record = installRecords[id];
566568 if (!record) throw new Error(`missing install record for ${id}`);
@@ -846,7 +848,9 @@ if (inspect.plugin?.id !== pluginId) {
846848847849const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json");
848850const index = JSON.parse(fs.readFileSync(indexPath, "utf8"));
849-const installRecords = index.installRecords ?? index.records ?? {};
851+const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");
852+const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {};
853+const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {};
850854const record = installRecords[pluginId];
851855if (!record) throw new Error(`missing ClawHub install record for ${pluginId}`);
852856if (record.source !== "clawhub") {
@@ -892,7 +896,9 @@ if ((list.plugins || []).some((entry) => entry.id === pluginId)) {
892896893897const indexPath = path.join(process.env.HOME, ".openclaw", "plugins", "installs.json");
894898const index = fs.existsSync(indexPath) ? JSON.parse(fs.readFileSync(indexPath, "utf8")) : {};
895-const installRecords = index.installRecords ?? index.records ?? {};
899+const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json");
900+const config = fs.existsSync(configPath) ? JSON.parse(fs.readFileSync(configPath, "utf8")) : {};
901+const installRecords = index.installRecords ?? index.records ?? config.plugins?.installs ?? {};
896902if (installRecords[pluginId]) {
897903 throw new Error(`ClawHub install record still present after uninstall: ${pluginId}`);
898904}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。