@cryptiklemur/lattice 1.36.4 → 1.36.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptiklemur/lattice",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.5",
|
|
4
4
|
"description": "Multi-machine agentic dashboard for Claude Code. Monitor sessions, manage MCP servers and skills, orchestrate across mesh-networked nodes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Aaron Scherer <me@aaronscherer.me>",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { chmodSync,
|
|
1
|
+
import { chmodSync, writeFileSync, accessSync, copyFileSync, unlinkSync, constants as fsConstants } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { execSync } from "node:child_process";
|
|
@@ -60,13 +60,16 @@ async function downloadBinaryUpdate(): Promise<{ success: boolean; message: stri
|
|
|
60
60
|
|
|
61
61
|
if (needsSudo) {
|
|
62
62
|
try {
|
|
63
|
-
execSync("sudo
|
|
63
|
+
execSync("sudo cp " + JSON.stringify(tmpPath) + " " + JSON.stringify(execPath), { stdio: "pipe", timeout: 10000 });
|
|
64
64
|
execSync("sudo chmod +x " + JSON.stringify(execPath), { stdio: "pipe", timeout: 5000 });
|
|
65
|
+
unlinkSync(tmpPath);
|
|
65
66
|
} catch {
|
|
66
|
-
return { success: false, message: "Update downloaded but needs sudo to install. Run: sudo
|
|
67
|
+
return { success: false, message: "Update downloaded but needs sudo to install. Run: sudo cp " + tmpPath + " " + execPath };
|
|
67
68
|
}
|
|
68
69
|
} else {
|
|
69
|
-
|
|
70
|
+
copyFileSync(tmpPath, execPath);
|
|
71
|
+
chmodSync(execPath, 0o755);
|
|
72
|
+
unlinkSync(tmpPath);
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
return { success: true, message: "Updated successfully. Restart the server to apply." };
|
package/server/src/index.ts
CHANGED
|
@@ -259,10 +259,13 @@ async function runUpdate(): Promise<void> {
|
|
|
259
259
|
if (needsSudo) {
|
|
260
260
|
console.log("[lattice] Needs elevated permissions to replace binary...");
|
|
261
261
|
var { execSync } = await import("node:child_process");
|
|
262
|
-
execSync("sudo
|
|
262
|
+
execSync("sudo cp " + JSON.stringify(tmpPath) + " " + JSON.stringify(process.execPath), { stdio: "inherit" });
|
|
263
263
|
execSync("sudo chmod +x " + JSON.stringify(process.execPath), { stdio: "inherit" });
|
|
264
264
|
} else {
|
|
265
|
-
|
|
265
|
+
var { copyFileSync: cpSync, unlinkSync: rmSync } = await import("node:fs");
|
|
266
|
+
cpSync(tmpPath, process.execPath);
|
|
267
|
+
chmodSync(process.execPath, 0o755);
|
|
268
|
+
rmSync(tmpPath);
|
|
266
269
|
}
|
|
267
270
|
code = 0;
|
|
268
271
|
} catch (err) {
|