fix: upgrade Node to v22.16.0 (OpenClaw requires >=22.16.0) and fix config format

- Node v22.14.0 → v22.16.0 in all install scripts
- Config: remove deprecated agent.* format, use minimal gateway-only config
- OpenClaw auto-migrates agent config on first run
This commit is contained in:
dongsheng123132
2026-03-18 19:03:15 +08:00
parent 3b98a7351f
commit e9f8a01fc3
3 changed files with 5 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ $RUNTIME_DIR = "$UCLAW_DIR\runtime"
$CORE_DIR = "$UCLAW_DIR\core" $CORE_DIR = "$UCLAW_DIR\core"
$DATA_DIR = "$UCLAW_DIR\data" $DATA_DIR = "$UCLAW_DIR\data"
$CONFIG_PATH = "$DATA_DIR\.openclaw\openclaw.json" $CONFIG_PATH = "$DATA_DIR\.openclaw\openclaw.json"
$NODE_VERSION = "v22.14.0" $NODE_VERSION = "v22.16.0"
$MIRROR = "https://registry.npmmirror.com" $MIRROR = "https://registry.npmmirror.com"
$NODE_MIRROR = "https://npmmirror.com/mirrors/node" $NODE_MIRROR = "https://npmmirror.com/mirrors/node"

View File

@@ -17,9 +17,9 @@ if (-not (Test-Path $NODE)) {
Write-Host "下载 Node.js..." Write-Host "下载 Node.js..."
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://npmmirror.com/mirrors/node/v22.14.0/node-v22.14.0-win-x64.zip" -OutFile "$env:TEMP\node.zip" -UseBasicParsing Invoke-WebRequest -Uri "https://npmmirror.com/mirrors/node/v22.14.0/node-v22.16.0-win-x64.zip" -OutFile "$env:TEMP\node.zip" -UseBasicParsing
Expand-Archive "$env:TEMP\node.zip" "$env:TEMP\node-ext" -Force Expand-Archive "$env:TEMP\node.zip" "$env:TEMP\node-ext" -Force
Move-Item "$env:TEMP\node-ext\node-v22.14.0-win-x64" "$UCLAW\runtime\node-win-x64" -Force Move-Item "$env:TEMP\node-ext\node-v22.16.0-win-x64" "$UCLAW\runtime\node-win-x64" -Force
Remove-Item "$env:TEMP\node.zip","$env:TEMP\node-ext" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item "$env:TEMP\node.zip","$env:TEMP\node-ext" -Recurse -Force -ErrorAction SilentlyContinue
} }
Write-Host "[OK] Node: $(& $NODE --version)" Write-Host "[OK] Node: $(& $NODE --version)"
@@ -40,7 +40,7 @@ Write-Host "[OK] OpenClaw: $(Test-Path "$CORE\node_modules\openclaw\openclaw.mjs
# Step 3: 默认配置 (DeepSeek) # Step 3: 默认配置 (DeepSeek)
$cfg = "$DATA\.openclaw\openclaw.json" $cfg = "$DATA\.openclaw\openclaw.json"
if (-not (Test-Path $cfg)) { if (-not (Test-Path $cfg)) {
$json = '{"gateway":{"mode":"local","auth":{"token":"uclaw"}},"agent":{"model":"deepseek-chat","apiKey":"","baseUrl":"https://api.deepseek.com/v1"}}' $json = '{"gateway":{"mode":"local","auth":{"token":"uclaw"}}}'
[IO.File]::WriteAllText($cfg, $json, (New-Object System.Text.UTF8Encoding $false)) [IO.File]::WriteAllText($cfg, $json, (New-Object System.Text.UTF8Encoding $false))
} }
Write-Host "[OK] Config" Write-Host "[OK] Config"

View File

@@ -18,7 +18,7 @@ $RUNTIME_DIR = "$UCLAW_DIR\runtime"
$CORE_DIR = "$UCLAW_DIR\core" $CORE_DIR = "$UCLAW_DIR\core"
$DATA_DIR = "$UCLAW_DIR\data" $DATA_DIR = "$UCLAW_DIR\data"
$CONFIG_PATH = "$DATA_DIR\.openclaw\openclaw.json" $CONFIG_PATH = "$DATA_DIR\.openclaw\openclaw.json"
$NODE_VERSION = "v22.14.0" $NODE_VERSION = "v22.16.0"
$MIRROR = "https://registry.npmmirror.com" $MIRROR = "https://registry.npmmirror.com"
$NODE_MIRROR = "https://npmmirror.com/mirrors/node" $NODE_MIRROR = "https://npmmirror.com/mirrors/node"