imrpove updating clients

This commit is contained in:
KingKDot
2026-03-13 12:51:48 -05:00
parent d5c0ab1523
commit 3beef903c9
6 changed files with 72 additions and 7 deletions
@@ -1,3 +1,4 @@
import { createHash } from "crypto";
import fs from "fs/promises";
import path from "path";
import { v4 as uuidv4 } from "uuid";
@@ -298,12 +299,13 @@ export async function handleDeployRoutes(
);
}
const hash = createHash("sha256").update(bytes).digest("hex");
target.ws.send(
encodeMessage({
type: "command",
commandType: "agent_update",
id: uuidv4(),
payload: { path: destPath },
payload: { path: destPath, hash },
}),
);