@blockrun/clawrouter 0.12.110 → 0.12.111
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 +1 -1
- package/scripts/reinstall.sh +33 -0
- package/scripts/update.sh +33 -0
package/package.json
CHANGED
package/scripts/reinstall.sh
CHANGED
|
@@ -519,6 +519,39 @@ if (fs.existsSync(configPath)) {
|
|
|
519
519
|
}
|
|
520
520
|
"
|
|
521
521
|
|
|
522
|
+
# 8. Ensure gateway.mode is set (required by OpenClaw v2026.4.5+)
|
|
523
|
+
echo "→ Ensuring gateway.mode is set..."
|
|
524
|
+
node -e "
|
|
525
|
+
const os = require('os');
|
|
526
|
+
const fs = require('fs');
|
|
527
|
+
const path = require('path');
|
|
528
|
+
const configPath = path.join(os.homedir(), '.openclaw', 'openclaw.json');
|
|
529
|
+
function atomicWrite(filePath, data) {
|
|
530
|
+
const tmpPath = filePath + '.tmp.' + process.pid;
|
|
531
|
+
fs.writeFileSync(tmpPath, data);
|
|
532
|
+
fs.renameSync(tmpPath, filePath);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
if (fs.existsSync(configPath)) {
|
|
536
|
+
try {
|
|
537
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
538
|
+
if (!config.gateway) config.gateway = {};
|
|
539
|
+
if (!config.gateway.mode) {
|
|
540
|
+
config.gateway.mode = 'local';
|
|
541
|
+
atomicWrite(configPath, JSON.stringify(config, null, 2));
|
|
542
|
+
console.log(' Set gateway.mode = local (required by OpenClaw v2026.4.5+)');
|
|
543
|
+
} else {
|
|
544
|
+
console.log(' gateway.mode already set: ' + config.gateway.mode);
|
|
545
|
+
}
|
|
546
|
+
} catch (e) {
|
|
547
|
+
console.log(' Could not update config:', e.message);
|
|
548
|
+
console.log(' Fix manually: openclaw config set gateway.mode local');
|
|
549
|
+
}
|
|
550
|
+
} else {
|
|
551
|
+
console.log(' No openclaw.json found, skipping');
|
|
552
|
+
}
|
|
553
|
+
"
|
|
554
|
+
|
|
522
555
|
# Final: verify wallet survived reinstall
|
|
523
556
|
echo "→ Verifying wallet integrity..."
|
|
524
557
|
if [ -f "$WALLET_FILE" ]; then
|
package/scripts/update.sh
CHANGED
|
@@ -405,6 +405,39 @@ try {
|
|
|
405
405
|
}
|
|
406
406
|
"
|
|
407
407
|
|
|
408
|
+
# Ensure gateway.mode is set (required by OpenClaw v2026.4.5+)
|
|
409
|
+
echo "→ Ensuring gateway.mode is set..."
|
|
410
|
+
node -e "
|
|
411
|
+
const os = require('os');
|
|
412
|
+
const fs = require('fs');
|
|
413
|
+
const path = require('path');
|
|
414
|
+
const configPath = path.join(os.homedir(), '.openclaw', 'openclaw.json');
|
|
415
|
+
function atomicWrite(filePath, data) {
|
|
416
|
+
const tmpPath = filePath + '.tmp.' + process.pid;
|
|
417
|
+
fs.writeFileSync(tmpPath, data);
|
|
418
|
+
fs.renameSync(tmpPath, filePath);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if (fs.existsSync(configPath)) {
|
|
422
|
+
try {
|
|
423
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
424
|
+
if (!config.gateway) config.gateway = {};
|
|
425
|
+
if (!config.gateway.mode) {
|
|
426
|
+
config.gateway.mode = 'local';
|
|
427
|
+
atomicWrite(configPath, JSON.stringify(config, null, 2));
|
|
428
|
+
console.log(' Set gateway.mode = local (required by OpenClaw v2026.4.5+)');
|
|
429
|
+
} else {
|
|
430
|
+
console.log(' gateway.mode already set: ' + config.gateway.mode);
|
|
431
|
+
}
|
|
432
|
+
} catch (e) {
|
|
433
|
+
console.log(' Could not update config:', e.message);
|
|
434
|
+
console.log(' Fix manually: openclaw config set gateway.mode local');
|
|
435
|
+
}
|
|
436
|
+
} else {
|
|
437
|
+
console.log(' No openclaw.json found, skipping');
|
|
438
|
+
}
|
|
439
|
+
"
|
|
440
|
+
|
|
408
441
|
# ── Summary ─────────────────────────────────────────────────────
|
|
409
442
|
echo ""
|
|
410
443
|
echo "✓ ClawRouter updated successfully!"
|