ClawRouter
ClawRouter copied to clipboard
fix(openclaw): avoid plugin ID collision with bundled @openclaw/clawrouter
Summary
OpenClaw ships a bundled plugin named @openclaw/clawrouter with plugin ID clawrouter (enabled by default since the OpenClaw 2026.7.1 release line). BlockRun's @blockrun/clawrouter declares the same plugin ID, so modern OpenClaw overrides the BlockRun plugin at runtime.
These are separate products: OpenClaw's provider uses clawrouter/*, CLAWROUTER_API_KEY, and https://clawrouter.openclaw.ai; BlockRun uses blockrun/*, a local proxy on 127.0.0.1:8402, a self-custodial wallet, and x402 payments.
Reproduction
Environment:
- macOS arm64
- Node.js 24.20.0
- OpenClaw 2026.8.2
@blockrun/clawrouterinstalled under~/.openclaw/extensions/clawrouter
Steps:
- Install/configure
@blockrun/clawrouterwithclawrouter setup. - Restart the OpenClaw gateway.
- Run
openclaw plugins list --json. - Check
http://127.0.0.1:8402/healthwithout separately starting the Desktop/standalone proxy.
Observed diagnostic:
duplicate plugin id detected; global plugin will be overridden by bundled plugin
pluginId: clawrouter
source: ~/.openclaw/extensions/clawrouter/dist/index.js
The only loaded clawrouter plugin is:
name: @openclaw/clawrouter
origin: bundled
status: loaded
providerIds: [clawrouter]
The local BlockRun proxy was not started by the gateway (127.0.0.1:8402 was not listening).
User impact
- Installation/setup can appear successful even though the BlockRun plugin is shadowed.
- Static
blockrun/*provider configuration can still work if Desktop or a standalone CLI process starts port 8402 separately. - Plugin-native BlockRun commands, tools, hooks, and gateway-managed proxy startup are not registered.
- Desktop status detection can report
Configuredby seeing the officialclawrouterentry. - Desktop disconnect/deactivation currently removes
clawrouterfrom plugin entries/allowlists and can modify the official bundled plugin's configuration. - There is no automatic wallet/payment or traffic handoff to OpenClaw's service; the provider namespaces and credentials remain separate.
Suggested fix
- Rename the BlockRun technical plugin ID from
clawroutertoblockrun-clawrouterwhile keeping:- npm package:
@blockrun/clawrouter - provider ID:
blockrun - model refs:
blockrun/*
- npm package:
- Add a version-aware migration for install/update/reinstall paths.
- Never delete or disable
plugins.entries.clawrouteror theclawrouterallowlist entry on OpenClaw versions that bundle the official plugin. - Make Desktop status/verification check the loaded plugin ID, origin/version, local proxy health, and a
blockrun/*model probe instead of matching the stringclawrouterin config. - Add OpenClaw 2026.7.1+ coexistence E2E coverage for install, restart, connect, disconnect, and uninstall.
Related code
openclaw.plugin.jsonsrc/cli.ts(clawrouter setup)src/index.ts(deactivatecleanup)scripts/update.shscripts/reinstall.shapps/desktop/electron/adapters/openclaw.tsapps/desktop/electron/core/config.ts