fix: only return queried machines from an agent

This commit is contained in:
Aarnav Tale 2025-04-24 12:37:19 -04:00
parent e974d7ef60
commit abd0d39aeb
No known key found for this signature in database

View File

@ -252,7 +252,16 @@ class AgentManager {
await this.requestData(missing);
}
return entries;
return Object.entries(entries).reduce<Record<string, HostInfo>>(
(acc, [key, value]) => {
if (nodeIds.includes(key)) {
acc[key] = value;
}
return acc;
},
{},
);
}
// Request data from the internal agent by sending a message to the process