Skip to content

Commit aab5f94

Browse files
committed
fix: clean stale clawrouter from plugins.allow during reinstall
Users who had 'clawrouter' in plugins.allow were getting 'plugin not found' error after reinstall because the plugin ID changed. Script now removes stale references.
1 parent 6781280 commit aab5f94

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@blockrun/clawrouter",
3-
"version": "0.3.30",
3+
"version": "0.3.31",
44
"description": "Smart LLM router — save 78% on inference costs. 30+ models, one wallet, x402 micropayments.",
55
"type": "module",
66
"main": "dist/index.js",

scripts/reinstall.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ const f = require('os').homedir() + '/.openclaw/openclaw.json';
1515
const fs = require('fs');
1616
if (fs.existsSync(f)) {
1717
const c = JSON.parse(fs.readFileSync(f, 'utf8'));
18+
// Clean plugin entries
1819
if (c.plugins?.entries?.clawrouter) delete c.plugins.entries.clawrouter;
1920
if (c.plugins?.installs?.clawrouter) delete c.plugins.installs.clawrouter;
21+
// Clean plugins.allow (removes stale clawrouter reference)
22+
if (Array.isArray(c.plugins?.allow)) {
23+
c.plugins.allow = c.plugins.allow.filter(p => p !== 'clawrouter' && p !== '@blockrun/clawrouter');
24+
}
2025
fs.writeFileSync(f, JSON.stringify(c, null, 2));
2126
}
2227
"

0 commit comments

Comments
 (0)