ClawRouter icon indicating copy to clipboard operation
ClawRouter copied to clipboard

fix(openclaw): avoid plugin ID collision with bundled @openclaw/clawrouter

Open KillerQueen-Z opened this issue 3 months ago • 0 comments

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/clawrouter installed under ~/.openclaw/extensions/clawrouter

Steps:

  1. Install/configure @blockrun/clawrouter with clawrouter setup.
  2. Restart the OpenClaw gateway.
  3. Run openclaw plugins list --json.
  4. Check http://127.0.0.1:8402/health without 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 Configured by seeing the official clawrouter entry.
  • Desktop disconnect/deactivation currently removes clawrouter from 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

  1. Rename the BlockRun technical plugin ID from clawrouter to blockrun-clawrouter while keeping:
    • npm package: @blockrun/clawrouter
    • provider ID: blockrun
    • model refs: blockrun/*
  2. Add a version-aware migration for install/update/reinstall paths.
  3. Never delete or disable plugins.entries.clawrouter or the clawrouter allowlist entry on OpenClaw versions that bundle the official plugin.
  4. Make Desktop status/verification check the loaded plugin ID, origin/version, local proxy health, and a blockrun/* model probe instead of matching the string clawrouter in config.
  5. Add OpenClaw 2026.7.1+ coexistence E2E coverage for install, restart, connect, disconnect, and uninstall.

Related code

  • openclaw.plugin.json
  • src/cli.ts (clawrouter setup)
  • src/index.ts (deactivate cleanup)
  • scripts/update.sh
  • scripts/reinstall.sh
  • apps/desktop/electron/adapters/openclaw.ts
  • apps/desktop/electron/core/config.ts

KillerQueen-Z avatar Sep 02 '26 03:09 KillerQueen-Z