mirror of
https://github.com/Dasemu/remote-mcp-manager.git
synced 2026-11-26 15:26:27 +00:00
The manager clones SELF_UPDATE_REPO_URL, builds a new image in the shared build queue and hands over to a short-lived updater container (new image) that swaps the manager container, health-checks it and rolls back on failure. Exposed as GET/POST /api/system behind requireAuth; installation changes answer 409 while an update runs. Session cookie is now SameSite=Lax. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
12 lines
391 B
TypeScript
12 lines
391 B
TypeScript
/** Demuxes Docker's non-tty log stream (8-byte frame headers) into plain text. */
|
|
export function demuxLogs(buf: Buffer): string {
|
|
const out: string[] = [];
|
|
let offset = 0;
|
|
while (offset + 8 <= buf.length) {
|
|
const size = buf.readUInt32BE(offset + 4);
|
|
out.push(buf.subarray(offset + 8, offset + 8 + size).toString("utf8"));
|
|
offset += 8 + size;
|
|
}
|
|
return out.join("");
|
|
}
|