@blockrun/clawrouter 0.12.182 → 0.12.183

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/clawrouter",
3
- "version": "0.12.182",
3
+ "version": "0.12.183",
4
4
  "description": "Smart LLM router — save 85% on inference costs. 55+ models (11 free), one wallet, x402 micropayments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -415,11 +415,16 @@ for stale in "$HOME/.openclaw/extensions/clawrouter.backup."* "$HOME/.openclaw/e
415
415
  done
416
416
 
417
417
  echo "→ Installing ClawRouter..."
418
+ # `--force` is required when the plugin is already installed at the same path.
419
+ # Reinstall.sh covers both fresh and re-install flows; without --force the
420
+ # re-install flow fails with "plugin already exists", our EXIT trap rolls back,
421
+ # and the user is stranded on whatever they had before. --force is idempotent.
422
+ #
418
423
  # Run with timeout — openclaw plugins install may hang after printing
419
424
  # "Installed plugin: clawrouter" in OpenClaw v2026.4.5 (parallel plugin loading).
420
425
  # 120s is enough for slow connections; the install itself completes in ~30s.
421
426
  if command -v timeout >/dev/null 2>&1; then
422
- timeout 120 openclaw plugins install @blockrun/clawrouter || {
427
+ timeout 120 openclaw plugins install --force @blockrun/clawrouter || {
423
428
  exit_code=$?
424
429
  if [ $exit_code -eq 124 ]; then
425
430
  echo " (install command timed out — this is normal with OpenClaw v2026.4.5)"
@@ -429,7 +434,7 @@ if command -v timeout >/dev/null 2>&1; then
429
434
  fi
430
435
  }
431
436
  else
432
- openclaw plugins install @blockrun/clawrouter
437
+ openclaw plugins install --force @blockrun/clawrouter
433
438
  fi
434
439
 
435
440
  # Install is complete — clear the rollback trap immediately.
package/scripts/update.sh CHANGED
@@ -314,11 +314,16 @@ for stale in "$HOME/.openclaw/extensions/clawrouter.backup."* "$HOME/.openclaw/e
314
314
  done
315
315
 
316
316
  echo "→ Installing latest ClawRouter..."
317
+ # `--force` is required when the plugin is already installed at the same path
318
+ # (which is always true on update). Without it, OpenClaw exits non-zero with
319
+ # "plugin already exists" and our EXIT trap rolls back, stranding the user on
320
+ # the previous version. `--force` is idempotent for both fresh + upgrade flows.
321
+ #
317
322
  # Run with timeout — openclaw plugins install may hang after printing
318
323
  # "Installed plugin: clawrouter" in OpenClaw v2026.4.5 (parallel plugin loading).
319
324
  # 120s is enough for slow connections; the install itself completes in ~30s.
320
325
  if command -v timeout >/dev/null 2>&1; then
321
- timeout 120 openclaw plugins install @blockrun/clawrouter || {
326
+ timeout 120 openclaw plugins install --force @blockrun/clawrouter || {
322
327
  exit_code=$?
323
328
  if [ $exit_code -eq 124 ]; then
324
329
  echo " (install command timed out — this is normal with OpenClaw v2026.4.5)"
@@ -328,7 +333,7 @@ if command -v timeout >/dev/null 2>&1; then
328
333
  fi
329
334
  }
330
335
  else
331
- openclaw plugins install @blockrun/clawrouter
336
+ openclaw plugins install --force @blockrun/clawrouter
332
337
  fi
333
338
 
334
339
  # Install is complete — clear the rollback trap immediately.