Implemented generating agent payloads from the ImGui client.

This commit is contained in:
Jakob Friedl
2025-09-27 15:18:45 +02:00
parent ceba377939
commit 47799ee5f5
11 changed files with 86 additions and 56 deletions

View File

@@ -59,12 +59,11 @@ proc sendAgentCheckin*(client: UIClient, agentId: string) =
if client != nil:
client.ws.sendEvent(event)
proc sendAgentPayload*(client: UIClient, agentId: string, bytes: seq[byte]) =
proc sendAgentPayload*(client: UIClient, bytes: seq[byte]) =
let event = Event(
eventType: CLIENT_AGENT_PAYLOAD,
timestamp: now().toTime().toUnix(),
data: %*{
"agentId": agentId,
"payload": encode(bytes)
}
)