From 4633e570e89c038601fefcc13a33b3b0b6a56dd8 Mon Sep 17 00:00:00 2001 From: DevOps Date: Sun, 12 Jul 2026 14:09:31 +0200 Subject: [PATCH] =?UTF-8?q?fix(agents):=20finish=20sanitized=20config=20mi?= =?UTF-8?q?gration=20=E2=80=94=20GatewayClient=20also=20reads=20agents-san?= =?UTF-8?q?itized.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit f4bee44 updated AgentService.cs but missed OpenClawGatewayClient.cs which also reads agent IDs and model config from the raw openclaw.json. Both LoadAgentIdsFromConfig() and GetAvailableModels() now default to /etc/nexus/agents-sanitized.json. This completes the P4 migration: Nexus no longer needs read access to openclaw.json for any code path. --- backend/Services/OpenClawGatewayClient.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/Services/OpenClawGatewayClient.cs b/backend/Services/OpenClawGatewayClient.cs index b46b92f..8a3acdc 100644 --- a/backend/Services/OpenClawGatewayClient.cs +++ b/backend/Services/OpenClawGatewayClient.cs @@ -123,7 +123,7 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration ) }; - // Load agent IDs from openclaw.json config + // Load agent IDs from sanitized agents config (no secrets) var agentIds = LoadAgentIdsFromConfig(); var agents = new List(); @@ -227,7 +227,7 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration } /// - /// Loads agent IDs from the OpenClaw config file (openclaw.json). + /// Loads agent IDs from the sanitized agents config (no secrets). /// Falls back to the known list if the config file is unavailable. /// private List LoadAgentIdsFromConfig() @@ -235,7 +235,7 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration try { var configPath = configuration.GetValue("AgentConfigPath") - ?? "/home/node/.openclaw/openclaw.json"; + ?? "/etc/nexus/agents-sanitized.json"; if (!System.IO.File.Exists(configPath)) return GetDefaultAgentIds(); @@ -1085,7 +1085,7 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration try { var configPath = configuration.GetValue("AgentConfigPath") - ?? "/home/node/.openclaw/openclaw.json"; + ?? "/etc/nexus/agents-sanitized.json"; if (!System.IO.File.Exists(configPath)) return GetDefaultModels();