Compare commits

..

2 Commits

Author SHA1 Message Date
devops 0241130c2f chore: bump version to v0.2.33 [skip ci] 2026-06-09 22:27:10 +00:00
developer 889af65ae7 fix: GatewayClient Tool-Namen + Response-Unwrapping
CI - Build & Test / Backend (.NET) (push) Successful in 23s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 16s
CI - Build & Test / Security Check (push) Successful in 3s
- sub_agents_list → subagents (action: list)
- cron_list → cron (action: list)
- Ping / → /health
- Unwrap {ok, result} envelope in InvokeToolAsync
2026-06-10 00:26:22 +02:00
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
0.2.32
0.2.33
+8 -4
View File
@@ -50,7 +50,11 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration
if (string.IsNullOrWhiteSpace(json))
return null;
return JsonNode.Parse(json);
var node = JsonNode.Parse(json);
// Unwrap the { ok: true, result: ... } envelope
if (node?["ok"]?.GetValue<bool>() == true && node["result"] is not null)
return node["result"];
return node;
}
catch
{
@@ -91,7 +95,7 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration
}
// Also get subagents list
var subagentsResult = await InvokeToolAsync("sub_agents_list");
var subagentsResult = await InvokeToolAsync("subagents", new { action = "list" });
if (subagentsResult is not null && subagentsResult is JsonArray subArray)
{
foreach (var sub in subArray)
@@ -190,7 +194,7 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration
{
try
{
var result = await InvokeToolAsync("cron_list");
var result = await InvokeToolAsync("cron", new { action = "list" });
if (result is null)
return new List<QueueItem>();
@@ -226,7 +230,7 @@ public sealed class OpenClawGatewayClient(HttpClient httpClient, IConfiguration
try
{
// Check gateway health
using var pingRequest = new HttpRequestMessage(HttpMethod.Get, "/");
using var pingRequest = new HttpRequestMessage(HttpMethod.Get, "/health");
ApplyAuth(pingRequest);
using var pingResponse = await httpClient.SendAsync(pingRequest);
gatewayOk = pingResponse.IsSuccessStatusCode;