meshy-node 0.1.7 → 0.1.8
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/README.md +1 -1
- package/dashboard/assets/{DashboardPage-l_rTZ-Jb.js → DashboardPage-Bu_7sWoy.js} +54 -54
- package/dashboard/assets/{DiffTab-C9xK4VcC.js → DiffTab-L7XOR2ma.js} +4 -4
- package/dashboard/assets/{FilesTab-whvYFVNX.js → FilesTab-MiZ3rGO0.js} +5 -5
- package/dashboard/assets/{PreviewTab-Dmb7EJl7.js → PreviewTab-DdT_r4GF.js} +3 -3
- package/dashboard/assets/{file-BcHgn-IP.js → file-DP1hVNzm.js} +1 -1
- package/dashboard/assets/{index-B6ZKt9Yk.css → index-2UShBZ7T.css} +1 -1
- package/dashboard/assets/{index-CYzyOxWi.js → index-Dc0APxmT.js} +3 -3
- package/dashboard/index.html +2 -2
- package/main.cjs +56 -32
- package/package.json +1 -1
package/dashboard/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Meshy Dashboard</title>
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🕸</text></svg>" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Dc0APxmT.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-2UShBZ7T.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/main.cjs
CHANGED
|
@@ -4029,8 +4029,8 @@ var require_common = __commonJS({
|
|
|
4029
4029
|
}
|
|
4030
4030
|
return debug;
|
|
4031
4031
|
}
|
|
4032
|
-
function extend2(namespace,
|
|
4033
|
-
const newDebug = createDebug(this.namespace + (typeof
|
|
4032
|
+
function extend2(namespace, delimiter3) {
|
|
4033
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter3 === "undefined" ? ":" : delimiter3) + namespace);
|
|
4034
4034
|
newDebug.log = this.log;
|
|
4035
4035
|
return newDebug;
|
|
4036
4036
|
}
|
|
@@ -35370,6 +35370,24 @@ var ClaudeCodeEngine = class extends ExecutionEngine {
|
|
|
35370
35370
|
var fs8 = __toESM(require("fs"), 1);
|
|
35371
35371
|
var path8 = __toESM(require("path"), 1);
|
|
35372
35372
|
var import_node_child_process3 = require("child_process");
|
|
35373
|
+
function resolveCodexInvocation() {
|
|
35374
|
+
if (process.platform !== "win32") {
|
|
35375
|
+
return { command: "codex", argsPrefix: [] };
|
|
35376
|
+
}
|
|
35377
|
+
const pathEntries = (process.env.PATH ?? "").split(path8.delimiter).filter(Boolean);
|
|
35378
|
+
for (const entry of pathEntries) {
|
|
35379
|
+
const shimPath = path8.join(entry, "codex.cmd");
|
|
35380
|
+
if (!fs8.existsSync(shimPath)) continue;
|
|
35381
|
+
const cliPath = path8.join(entry, "node_modules", "@openai", "codex", "bin", "codex.js");
|
|
35382
|
+
if (fs8.existsSync(cliPath)) {
|
|
35383
|
+
return {
|
|
35384
|
+
command: process.execPath,
|
|
35385
|
+
argsPrefix: [cliPath]
|
|
35386
|
+
};
|
|
35387
|
+
}
|
|
35388
|
+
}
|
|
35389
|
+
return { command: "codex", argsPrefix: [] };
|
|
35390
|
+
}
|
|
35373
35391
|
function buildAssistantEvent(text, timestamp = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
35374
35392
|
return {
|
|
35375
35393
|
type: "assistant",
|
|
@@ -35440,7 +35458,8 @@ var CodexEngine = class extends ExecutionEngine {
|
|
|
35440
35458
|
const args = this.buildArgs(prompt, imagePaths, { model: config.model, mode: config.mode ?? "bypass" });
|
|
35441
35459
|
this.ensureLogDir();
|
|
35442
35460
|
this.logger.info("Spawning codex CLI", { taskId: task.id, title: task.title, cwd });
|
|
35443
|
-
const
|
|
35461
|
+
const invocation = resolveCodexInvocation();
|
|
35462
|
+
const proc = (0, import_node_child_process3.spawn)(invocation.command, [...invocation.argsPrefix, ...args], {
|
|
35444
35463
|
cwd,
|
|
35445
35464
|
stdio: ["ignore", "pipe", "pipe"]
|
|
35446
35465
|
});
|
|
@@ -35472,7 +35491,8 @@ var CodexEngine = class extends ExecutionEngine {
|
|
|
35472
35491
|
mode: mode === "plan" || mode === "edit" || mode === "dangerous" || mode === "bypass" ? mode : "bypass"
|
|
35473
35492
|
});
|
|
35474
35493
|
this.logger.info("Sending Codex follow-up message", { taskId, sessionId: session.sessionId });
|
|
35475
|
-
const
|
|
35494
|
+
const invocation = resolveCodexInvocation();
|
|
35495
|
+
const proc = (0, import_node_child_process3.spawn)(invocation.command, [...invocation.argsPrefix, ...args], {
|
|
35476
35496
|
cwd: session.cwd,
|
|
35477
35497
|
stdio: ["ignore", "pipe", "pipe"]
|
|
35478
35498
|
});
|
|
@@ -35919,38 +35939,47 @@ ${joinErrors.map((e) => ` - ${e}`).join("\n")}`
|
|
|
35919
35939
|
const leader = this.nodeRegistry.getLeader();
|
|
35920
35940
|
const leaderEndpoint = this.nodeRegistry.getLeaderEndpoint();
|
|
35921
35941
|
const self2 = this.nodeRegistry.getSelf();
|
|
35922
|
-
if (
|
|
35942
|
+
if (self2.role !== "follower" && (!leader || leader.id === self2.id)) {
|
|
35923
35943
|
log2.info("skipping cluster leave request", {
|
|
35944
|
+
role: self2.role,
|
|
35924
35945
|
hasLeader: !!leader,
|
|
35925
35946
|
leaderEndpoint,
|
|
35926
35947
|
selfId: self2.id
|
|
35927
35948
|
});
|
|
35928
35949
|
return;
|
|
35929
35950
|
}
|
|
35930
|
-
|
|
35931
|
-
|
|
35932
|
-
|
|
35951
|
+
if (leader && leaderEndpoint) {
|
|
35952
|
+
try {
|
|
35953
|
+
log2.info("sending cluster leave request", {
|
|
35954
|
+
leaderId: leader.id,
|
|
35955
|
+
leaderEndpoint,
|
|
35956
|
+
nodeId: self2.id
|
|
35957
|
+
});
|
|
35958
|
+
const response = await fetch(`${leaderEndpoint}/api/cluster/leave`, applyRequestAuthHeaders({
|
|
35959
|
+
method: "POST",
|
|
35960
|
+
headers: { "Content-Type": "application/json" },
|
|
35961
|
+
body: JSON.stringify({ nodeId: self2.id })
|
|
35962
|
+
}));
|
|
35963
|
+
log2.info("received cluster leave response", {
|
|
35964
|
+
leaderId: leader.id,
|
|
35965
|
+
leaderEndpoint,
|
|
35966
|
+
ok: response.ok,
|
|
35967
|
+
statusCode: response.status
|
|
35968
|
+
});
|
|
35969
|
+
} catch (error) {
|
|
35970
|
+
log2.warn("cluster leave request failed", {
|
|
35971
|
+
leaderId: leader.id,
|
|
35972
|
+
leaderEndpoint,
|
|
35973
|
+
nodeId: self2.id,
|
|
35974
|
+
error: error instanceof Error ? error.message : String(error)
|
|
35975
|
+
});
|
|
35976
|
+
}
|
|
35977
|
+
} else {
|
|
35978
|
+
log2.info("leader unavailable for remote leave request; detaching locally", {
|
|
35979
|
+
previousLeaderId: leader?.id ?? null,
|
|
35933
35980
|
leaderEndpoint,
|
|
35934
35981
|
nodeId: self2.id
|
|
35935
35982
|
});
|
|
35936
|
-
const response = await fetch(`${leaderEndpoint}/api/cluster/leave`, applyRequestAuthHeaders({
|
|
35937
|
-
method: "POST",
|
|
35938
|
-
headers: { "Content-Type": "application/json" },
|
|
35939
|
-
body: JSON.stringify({ nodeId: self2.id })
|
|
35940
|
-
}));
|
|
35941
|
-
log2.info("received cluster leave response", {
|
|
35942
|
-
leaderId: leader.id,
|
|
35943
|
-
leaderEndpoint,
|
|
35944
|
-
ok: response.ok,
|
|
35945
|
-
statusCode: response.status
|
|
35946
|
-
});
|
|
35947
|
-
} catch (error) {
|
|
35948
|
-
log2.warn("cluster leave request failed", {
|
|
35949
|
-
leaderId: leader.id,
|
|
35950
|
-
leaderEndpoint,
|
|
35951
|
-
nodeId: self2.id,
|
|
35952
|
-
error: error instanceof Error ? error.message : String(error)
|
|
35953
|
-
});
|
|
35954
35983
|
}
|
|
35955
35984
|
const refreshedSelf = {
|
|
35956
35985
|
...self2,
|
|
@@ -35967,7 +35996,7 @@ ${joinErrors.map((e) => ` - ${e}`).join("\n")}`
|
|
|
35967
35996
|
this.syncSelfInfoFromRegistry();
|
|
35968
35997
|
persistNodeStartupJoin(this.config.storage.path, void 0);
|
|
35969
35998
|
log2.info("detached from leader and assumed solo leadership", {
|
|
35970
|
-
previousLeaderId: leader
|
|
35999
|
+
previousLeaderId: leader?.id ?? null,
|
|
35971
36000
|
nodeId: refreshedSelf.id,
|
|
35972
36001
|
term: this.election.getCurrentTerm()
|
|
35973
36002
|
});
|
|
@@ -41109,11 +41138,6 @@ function createClusterRoutes() {
|
|
|
41109
41138
|
}
|
|
41110
41139
|
});
|
|
41111
41140
|
}));
|
|
41112
|
-
router.post("/election", asyncHandler(async (req, res) => {
|
|
41113
|
-
const { election } = req.app.locals.deps;
|
|
41114
|
-
await election.startElection();
|
|
41115
|
-
res.json({ ok: true });
|
|
41116
|
-
}));
|
|
41117
41141
|
router.post("/promote", asyncHandler(async (req, res) => {
|
|
41118
41142
|
const { election } = req.app.locals.deps;
|
|
41119
41143
|
await election.promote();
|