Skip to content

Commit 3c6bc6b

Browse files
amir20claude
andcommitted
Add host_id to ContainerStatEntry proto for LLM tool routing
The LLM agent needs host_id to call targeted container tools (fetch_logs, inspect, start/stop/restart). Stats responses only had host name, causing the LLM to pass the wrong value. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e079e5f commit 3c6bc6b

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

internal/cloud/tools_containers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ func executeGetRunningContainerStats(hostService ToolHostService, labels contain
137137
Id: c.ID,
138138
Name: c.Name,
139139
Host: resolveHostName(c.Host, hostNames),
140+
HostId: c.Host,
140141
CpuPercent: latest.CPUPercent,
141142
MemoryPercent: latest.MemoryPercent,
142143
MemoryUsage: latest.MemoryUsage,

proto/cloud/cloud.pb.go

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/cloud.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ message ContainerStatEntry {
101101
double memory_usage = 6;
102102
double max_cpu_5min = 7;
103103
double max_memory_5min = 8;
104+
string host_id = 9;
104105
}
105106

106107
message ContainerStatsResult {

0 commit comments

Comments
 (0)