diff --git a/config/openclaw/openclaw.json b/config/openclaw/openclaw.json index 0a664b0..4a34977 100644 --- a/config/openclaw/openclaw.json +++ b/config/openclaw/openclaw.json @@ -1,49 +1,51 @@ { - gateway: { - mode: "local", - bind: "loopback", - port: 2470, - trustedProxies: ["127.0.0.1", "::1"], - controlUi: { - enabled: true, - allowedOrigins: ["https://netty.harivan.sh"], - }, - auth: { - mode: "token", - token: "${OPENCLAW_GATEWAY_TOKEN}", + "gateway": { + "mode": "local", + "bind": "loopback", + "port": 2470, + "trustedProxies": ["127.0.0.1", "::1"], + "auth": { + "mode": "token", + "token": "${OPENCLAW_GATEWAY_TOKEN}" }, + "controlUi": { + "allowedOrigins": ["https://netty.harivan.sh"] + } }, - channels: { - telegram: { - enabled: true, - botToken: "${TELEGRAM_BOT_TOKEN}", - dmPolicy: "pairing", - }, + "channels": { + "telegram": { + "enabled": true, + "botToken": "${TELEGRAM_BOT_TOKEN}", + "dmPolicy": "pairing" + } }, - agents: { - defaults: { - workspace: "~/.openclaw/workspace", - model: { - primary: "anthropic/claude-sonnet-4-6", + "session": { + "dmScope": "per-channel-peer", + "reset": { "mode": "idle", "idleMinutes": 120 } + }, + + "agents": { + "defaults": { + "workspace": "~/.openclaw/workspace", + "model": { + "primary": "anthropic/claude-sonnet-4-6", + "fallbacks": ["anthropic/claude-haiku-4-5-20251001"] }, - sandbox: { - mode: "non-main", - }, - }, + "contextTokens": 200000, + "thinkingDefault": "adaptive", + "sandbox": { "mode": "non-main" }, + "compaction": { "mode": "default", "notifyUser": true } + } }, - tools: { - profile: "coding", - deny: [ - "browser", - "canvas", - "cron", - "gateway", - "nodes", - "sessions_send", - "sessions_spawn", - ], + "tools": { + "profile": "full", + "deny": ["gateway"] }, + + "logging": { + "redactSensitive": "tools" + } } diff --git a/home/openclaw.nix b/home/openclaw.nix index 300395d..9f81951 100644 --- a/home/openclaw.nix +++ b/home/openclaw.nix @@ -8,6 +8,7 @@ let openClawStateDir = "${config.home.homeDirectory}/.openclaw"; openClawWorkspaceDir = "${openClawStateDir}/workspace"; + openClawVersion = "2026.4.2"; npmDir = "${config.xdg.dataHome}/npm"; in lib.mkIf hostConfig.isLinux { @@ -22,8 +23,9 @@ lib.mkIf hostConfig.isLinux { export XDG_DATA_HOME="${config.xdg.dataHome}" export XDG_CACHE_HOME="${config.xdg.cacheHome}" - if [ ! -d "${npmDir}/lib/node_modules/openclaw" ]; then - npm install -g openclaw@latest 2>/dev/null || true + INSTALLED=$(npm ls -g openclaw --depth=0 --json 2>/dev/null | ${pkgs.jq}/bin/jq -r '.dependencies.openclaw.version // empty') + if [ "$INSTALLED" != "${openClawVersion}" ]; then + npm install -g "openclaw@${openClawVersion}" 2>/dev/null || true fi '';