Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions scripts/reinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,28 +210,13 @@ for (const key of ['clawrouter', 'ClawRouter', '@blockrun/clawrouter']) {
if (c.plugins?.installs?.[key]) delete c.plugins.installs[key];
}

// Clean plugins.allow — remove clawrouter (will be re-added after install)
// and strip any non-bundled plugin names that don't exist (e.g. "wallet" added
// by an AI agent trying to fix a different problem — causes a warning on every start).
// Clean plugins.allow — remove only ClawRouter entries; preserve every other
// plugin the user has allowed, including bare local/custom plugin IDs.
if (Array.isArray(c.plugins?.allow)) {
const BUNDLED_OPENCLAW_PLUGINS = [
// OpenClaw v2026.x bundled plugin IDs (safe to keep in allow list)
'http', 'mcp', 'computer-use', 'browser', 'code', 'image', 'voice',
'search', 'memory', 'calendar', 'email', 'slack', 'discord', 'telegram',
'whatsapp', 'matrix', 'teams', 'notion', 'github', 'jira', 'linear',
'comfyui',
];
const before = c.plugins.allow.length;
c.plugins.allow = c.plugins.allow.filter(p => {
if (p === 'clawrouter' || p === '@blockrun/clawrouter') return false; // re-added later
if (BUNDLED_OPENCLAW_PLUGINS.includes(p)) return true; // known-good bundled plugins
// Keep entries that look like npm package names (scoped or plain)
if (p.startsWith('@') || p.includes('/')) return true;
// Drop bare single-word entries that aren't bundled (e.g. "wallet" added by mistake)
return false;
});
c.plugins.allow = c.plugins.allow.filter(p => p !== 'clawrouter' && p !== 'ClawRouter' && p !== '@blockrun/clawrouter');
const removed = before - c.plugins.allow.length;
if (removed > 0) console.log(' Removed ' + removed + ' stale plugins.allow entry(ies)');
if (removed > 0) console.log(' Removed ClawRouter from plugins.allow (re-added after install)');
}

// OpenClaw 2026.5.2+ validates tools.web.search.provider at config-load time.
Expand Down
20 changes: 4 additions & 16 deletions scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,25 +223,13 @@ try {
if (installs?.[key]) { delete installs[key]; changed = true; console.log(' Removed plugins.installs.' + key); }
}

// Clean plugins.allow — remove clawrouter (re-added later) and any stale bare
// single-word entries that aren't bundled OpenClaw plugins (e.g. "wallet" added
// by an AI agent — shows a warning on every gateway start).
// Clean plugins.allow — remove only ClawRouter entries; preserve every other
// plugin the user has allowed, including bare local/custom plugin IDs.
if (Array.isArray(config?.plugins?.allow)) {
const BUNDLED = [
'http','mcp','computer-use','browser','code','image','voice',
'search','memory','calendar','email','slack','discord','telegram',
'whatsapp','matrix','teams','notion','github','jira','linear',
'comfyui',
];
const before = config.plugins.allow.length;
config.plugins.allow = config.plugins.allow.filter(p => {
if (p === 'clawrouter' || p === '@blockrun/clawrouter') return false;
if (BUNDLED.includes(p)) return true;
if (p.startsWith('@') || p.includes('/')) return true;
return false;
});
config.plugins.allow = config.plugins.allow.filter(p => p !== 'clawrouter' && p !== 'ClawRouter' && p !== '@blockrun/clawrouter');
const removed = before - config.plugins.allow.length;
if (removed > 0) { changed = true; console.log(' Removed ' + removed + ' stale plugins.allow entry(ies)'); }
if (removed > 0) { changed = true; console.log(' Removed ClawRouter from plugins.allow (re-added after install)'); }
}

// OpenClaw 2026.5.2+ validates tools.web.search.provider at config-load
Expand Down
Loading