meshy-node 0.6.7 → 0.6.9
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-CuYfdgVg.js +134 -0
- package/dashboard/assets/DashboardPage-i714dDoR.css +1 -0
- package/dashboard/assets/{DashboardShared-BohLaqeo.js → DashboardShared-maYk1bPA.js} +1 -1
- package/dashboard/assets/{DiffTab-CPqcA12G.js → DiffTab-BvI6Bfoh.js} +3 -3
- package/dashboard/assets/{FilesTab-CYA4YD9M.js → FilesTab-BNM5CMt8.js} +3 -3
- package/dashboard/assets/{PreviewTab-Cz-QrEJn.js → PreviewTab-DkOXlzkm.js} +4 -4
- package/dashboard/assets/SharedConversationPage-DhGJaqBa.js +7 -0
- package/dashboard/assets/{file-BduJ6PU6.js → file-Cms1lUGF.js} +1 -1
- package/dashboard/assets/index-ByKsIqsl.css +1 -0
- package/dashboard/assets/index-KyuFQeSE.js +316 -0
- package/dashboard/assets/{play-Dc8Adtxz.js → play-D9KadCMh.js} +1 -1
- package/dashboard/index.html +2 -2
- package/main.cjs +63 -18
- package/package.json +1 -1
- package/runtime-metadata.json +5 -5
- package/dashboard/assets/DashboardPage-CUhdRokR.js +0 -139
- package/dashboard/assets/DashboardPage-DWXbz1IY.css +0 -1
- package/dashboard/assets/SharedConversationPage-Bh9Bn_0B.js +0 -7
- package/dashboard/assets/folder-BMmcfsyZ.js +0 -6
- package/dashboard/assets/index-CXPXpidI.css +0 -1
- package/dashboard/assets/index-Dcj0nR-j.js +0 -301
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-KyuFQeSE.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-ByKsIqsl.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/main.cjs
CHANGED
|
@@ -56411,7 +56411,7 @@ function loadClaudeSessionHistory(sessionId) {
|
|
|
56411
56411
|
}
|
|
56412
56412
|
function loadCodexSessionHistory(sessionId) {
|
|
56413
56413
|
const sessionsDir = path7.join(getNativeHomeDir(), ".codex", "sessions");
|
|
56414
|
-
const sessionFile = findFirstMatchingFile(sessionsDir, (filePath) => path7.basename(filePath).toLowerCase().includes(sessionId.toLowerCase()) && filePath.toLowerCase().endsWith(".jsonl"));
|
|
56414
|
+
const sessionFile = findFirstMatchingFile(sessionsDir, (filePath) => path7.basename(filePath).toLowerCase().includes(sessionId.toLowerCase()) && filePath.toLowerCase().endsWith(".jsonl")) ?? findFirstMatchingFile(sessionsDir, (filePath) => filePath.toLowerCase().endsWith(".jsonl") && readJsonLines(filePath).some((entry) => entry.type === "session_meta" && isRecord4(entry.payload) && typeof entry.payload.id === "string" && entry.payload.id.toLowerCase() === sessionId.toLowerCase()));
|
|
56415
56415
|
if (!sessionFile) {
|
|
56416
56416
|
return { logs: [], sourcePath: null };
|
|
56417
56417
|
}
|
|
@@ -56530,6 +56530,25 @@ function listNativeSessions(input) {
|
|
|
56530
56530
|
}).filter((session) => session !== null).sort(compareUpdatedSessions).slice(0, limit);
|
|
56531
56531
|
}
|
|
56532
56532
|
|
|
56533
|
+
// ../../packages/core/src/agents/native-session-payload.ts
|
|
56534
|
+
function nonEmptyString(value) {
|
|
56535
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : "";
|
|
56536
|
+
}
|
|
56537
|
+
function getNativeHistorySessionId(payload) {
|
|
56538
|
+
return nonEmptyString(payload?.nativeSessionId) || nonEmptyString(payload?.sessionId);
|
|
56539
|
+
}
|
|
56540
|
+
function buildPersistedSessionPayload(task, sessionId, cwd) {
|
|
56541
|
+
const payload = task?.payload ?? {};
|
|
56542
|
+
const nextPayload = { ...payload, sessionId, sessionCwd: cwd };
|
|
56543
|
+
if (task?.conversationKind !== "nativeSession") {
|
|
56544
|
+
return nextPayload;
|
|
56545
|
+
}
|
|
56546
|
+
return {
|
|
56547
|
+
...nextPayload,
|
|
56548
|
+
nativeSessionId: getNativeHistorySessionId(payload) || sessionId
|
|
56549
|
+
};
|
|
56550
|
+
}
|
|
56551
|
+
|
|
56533
56552
|
// ../../packages/core/src/tasks/task-forwarding.ts
|
|
56534
56553
|
function getEventType(event) {
|
|
56535
56554
|
return typeof event.type === "string" ? event.type : void 0;
|
|
@@ -57435,9 +57454,8 @@ var ClaudeCodeEngine = class extends ExecutionEngine {
|
|
|
57435
57454
|
persistSession(taskId, sessionId, cwd) {
|
|
57436
57455
|
try {
|
|
57437
57456
|
const current = this.taskEngine.getTask(taskId);
|
|
57438
|
-
const payload = current?.payload ?? {};
|
|
57439
57457
|
this.taskEngine.updateTask(taskId, {
|
|
57440
|
-
payload:
|
|
57458
|
+
payload: buildPersistedSessionPayload(current, sessionId, cwd)
|
|
57441
57459
|
});
|
|
57442
57460
|
} catch {
|
|
57443
57461
|
}
|
|
@@ -57826,9 +57844,8 @@ var CodexEngine = class extends ExecutionEngine {
|
|
|
57826
57844
|
persistSession(taskId, sessionId, cwd) {
|
|
57827
57845
|
try {
|
|
57828
57846
|
const current = this.taskEngine.getTask(taskId);
|
|
57829
|
-
const payload = current?.payload ?? {};
|
|
57830
57847
|
this.taskEngine.updateTask(taskId, {
|
|
57831
|
-
payload:
|
|
57848
|
+
payload: buildPersistedSessionPayload(current, sessionId, cwd)
|
|
57832
57849
|
});
|
|
57833
57850
|
} catch {
|
|
57834
57851
|
}
|
|
@@ -58146,9 +58163,8 @@ var CopilotCliEngine = class extends ExecutionEngine {
|
|
|
58146
58163
|
persistSession(taskId, sessionId, cwd) {
|
|
58147
58164
|
try {
|
|
58148
58165
|
const current = this.taskEngine.getTask(taskId);
|
|
58149
|
-
const payload = current?.payload ?? {};
|
|
58150
58166
|
this.taskEngine.updateTask(taskId, {
|
|
58151
|
-
payload:
|
|
58167
|
+
payload: buildPersistedSessionPayload(current, sessionId, cwd)
|
|
58152
58168
|
});
|
|
58153
58169
|
} catch {
|
|
58154
58170
|
}
|
|
@@ -61949,7 +61965,7 @@ function mergeNativeSessionLogs(nativeLogs, localLogs) {
|
|
|
61949
61965
|
}
|
|
61950
61966
|
function readLocalTaskLogsWithNativeHistory(engineRegistry, task, taskId, after, agent) {
|
|
61951
61967
|
const local = readLocalTaskLogs(engineRegistry, taskId, after, agent);
|
|
61952
|
-
const sessionId =
|
|
61968
|
+
const sessionId = getNativeHistorySessionId(task?.payload);
|
|
61953
61969
|
if (after > 0 || task?.conversationKind !== "nativeSession" || !sessionId || task.agent !== "codex" && task.agent !== "claudecode" && task.agent !== "copilot") {
|
|
61954
61970
|
return local;
|
|
61955
61971
|
}
|
|
@@ -64557,6 +64573,7 @@ async function attachNativeSession(deps, body) {
|
|
|
64557
64573
|
project: body.cwd,
|
|
64558
64574
|
conversationKind: "nativeSession",
|
|
64559
64575
|
payload: {
|
|
64576
|
+
nativeSessionId: body.sessionId,
|
|
64560
64577
|
sessionId: body.sessionId,
|
|
64561
64578
|
sessionCwd: body.cwd,
|
|
64562
64579
|
...body.mode ? { mode: body.mode } : {}
|
|
@@ -64690,6 +64707,9 @@ function createTaskLogsProxyTrace(log2, taskId, nodeId, proxyPath) {
|
|
|
64690
64707
|
|
|
64691
64708
|
// ../../packages/api/src/tasks/task-log-response.ts
|
|
64692
64709
|
var TASK_LOG_PROXY_TIMEOUT_MS = 1e4;
|
|
64710
|
+
function canRepairNativeSessionLogsOnWorker(task, after) {
|
|
64711
|
+
return after === 0 && task?.conversationKind === "nativeSession" && (task.agent === "codex" || task.agent === "claudecode" || task.agent === "copilot");
|
|
64712
|
+
}
|
|
64693
64713
|
async function sendTaskLogsResponse(req, res, taskId) {
|
|
64694
64714
|
const { engineRegistry, taskEngine, nodeRegistry, heartbeat, logger: rootLogger } = req.app.locals.deps;
|
|
64695
64715
|
const log2 = rootLogger.child("tasks/logs");
|
|
@@ -64713,6 +64733,8 @@ async function sendTaskLogsResponse(req, res, taskId) {
|
|
|
64713
64733
|
const proxyNodeId = task?.assignedTo ?? snapshotOwnerId;
|
|
64714
64734
|
const isFollowerRemoteTask = !isLeader && !!(task?.assignedTo && task.assignedTo !== selfId);
|
|
64715
64735
|
const needsProxy = isLeader && !!(proxyNodeId && proxyNodeId !== selfId);
|
|
64736
|
+
const shouldAskWorkerForNativeRepair = needsProxy && canRepairNativeSessionLogsOnWorker(task, after);
|
|
64737
|
+
let leaderLocal = null;
|
|
64716
64738
|
if (proxyRequest.isProxy) {
|
|
64717
64739
|
log2.info("received proxied task logs request", {
|
|
64718
64740
|
taskId,
|
|
@@ -64737,7 +64759,8 @@ async function sendTaskLogsResponse(req, res, taskId) {
|
|
|
64737
64759
|
});
|
|
64738
64760
|
if (isLeader) {
|
|
64739
64761
|
const local2 = readLocalTaskLogsWithNativeHistory(engineRegistry, task, taskId, after, task?.agent ?? "claudecode");
|
|
64740
|
-
|
|
64762
|
+
leaderLocal = local2;
|
|
64763
|
+
if ((local2.total > 0 || !needsProxy) && !shouldAskWorkerForNativeRepair) {
|
|
64741
64764
|
log2.debug("serving leader-local task logs", {
|
|
64742
64765
|
taskId,
|
|
64743
64766
|
assignedTo: task?.assignedTo,
|
|
@@ -64748,17 +64771,27 @@ async function sendTaskLogsResponse(req, res, taskId) {
|
|
|
64748
64771
|
res.json(local2);
|
|
64749
64772
|
return;
|
|
64750
64773
|
}
|
|
64751
|
-
|
|
64752
|
-
|
|
64753
|
-
|
|
64754
|
-
|
|
64755
|
-
|
|
64774
|
+
if (local2.total > 0 && shouldAskWorkerForNativeRepair) {
|
|
64775
|
+
log2.debug("leader-local native session logs may be partial, checking worker repair path", {
|
|
64776
|
+
taskId,
|
|
64777
|
+
assignedTo: task?.assignedTo,
|
|
64778
|
+
selfId,
|
|
64779
|
+
total: local2.total,
|
|
64780
|
+
after
|
|
64781
|
+
});
|
|
64782
|
+
} else {
|
|
64783
|
+
log2.debug("leader-local task log missing, falling back to worker proxy", {
|
|
64784
|
+
taskId,
|
|
64785
|
+
assignedTo: task?.assignedTo,
|
|
64786
|
+
selfId
|
|
64787
|
+
});
|
|
64788
|
+
}
|
|
64756
64789
|
}
|
|
64757
64790
|
if (needsProxy && proxyNodeId) {
|
|
64758
64791
|
const node = nodeRegistry.getNode(proxyNodeId);
|
|
64759
64792
|
log2.debug("proxy target", { nodeId: node?.id, endpoint: node?.endpoint, devtunnel: node?.devtunnelEndpoint, status: node?.status });
|
|
64760
64793
|
if (node) {
|
|
64761
|
-
if (task.assignedTo === proxyNodeId && !snapshotOwnerId) {
|
|
64794
|
+
if (task.assignedTo === proxyNodeId && !snapshotOwnerId && !(shouldAskWorkerForNativeRepair && (leaderLocal?.total ?? 0) > 0)) {
|
|
64762
64795
|
const seededLogs = await seedTaskSnapshotOnWorker(task, [], node, log2).catch((err) => {
|
|
64763
64796
|
log2.warn("failed to seed task snapshot before task logs proxy", {
|
|
64764
64797
|
taskId,
|
|
@@ -64767,7 +64800,19 @@ async function sendTaskLogsResponse(req, res, taskId) {
|
|
|
64767
64800
|
});
|
|
64768
64801
|
return [];
|
|
64769
64802
|
});
|
|
64770
|
-
if (seededLogs.length > 0)
|
|
64803
|
+
if (seededLogs.length > 0) {
|
|
64804
|
+
recordLocalTaskLogs(engineRegistry, task, seededLogs);
|
|
64805
|
+
const seededResponse = { logs: seededLogs.slice(after), total: seededLogs.length };
|
|
64806
|
+
log2.debug("serving worker-seeded task logs without second proxy", {
|
|
64807
|
+
taskId,
|
|
64808
|
+
assignedTo: task?.assignedTo,
|
|
64809
|
+
selfId,
|
|
64810
|
+
total: seededResponse.total,
|
|
64811
|
+
after
|
|
64812
|
+
});
|
|
64813
|
+
res.json(seededResponse);
|
|
64814
|
+
return;
|
|
64815
|
+
}
|
|
64771
64816
|
}
|
|
64772
64817
|
const proxyPath = `/api/tasks/${taskId}/logs?after=${after}`;
|
|
64773
64818
|
try {
|
|
@@ -64807,7 +64852,7 @@ async function sendTaskLogsResponse(req, res, taskId) {
|
|
|
64807
64852
|
}
|
|
64808
64853
|
}
|
|
64809
64854
|
}
|
|
64810
|
-
const local = readLocalTaskLogsWithNativeHistory(engineRegistry, task, taskId, after, task?.agent ?? "claudecode");
|
|
64855
|
+
const local = leaderLocal ?? readLocalTaskLogsWithNativeHistory(engineRegistry, task, taskId, after, task?.agent ?? "claudecode");
|
|
64811
64856
|
if (!proxyRequest.isProxy && isFollowerRemoteTask && local.total === 0 && await maybeProxyReadToLeader(req, res)) return;
|
|
64812
64857
|
log2.debug("serving local task logs after proxy miss", {
|
|
64813
64858
|
taskId,
|
|
@@ -66030,7 +66075,7 @@ function createWorkerRoutes() {
|
|
|
66030
66075
|
const { task } = body;
|
|
66031
66076
|
let { logs } = body;
|
|
66032
66077
|
if (logs.length === 0 && task.conversationKind === "nativeSession") {
|
|
66033
|
-
const sessionId =
|
|
66078
|
+
const sessionId = getNativeHistorySessionId(task.payload);
|
|
66034
66079
|
if (sessionId && (task.agent === "codex" || task.agent === "claudecode" || task.agent === "copilot")) {
|
|
66035
66080
|
logs = loadNativeSessionHistory({ agent: task.agent, sessionId }).logs;
|
|
66036
66081
|
}
|
package/package.json
CHANGED
package/runtime-metadata.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "meshy-node",
|
|
3
|
-
"packageVersion": "0.6.
|
|
3
|
+
"packageVersion": "0.6.9",
|
|
4
4
|
"packages": {
|
|
5
5
|
"workspace": {
|
|
6
6
|
"name": "meshy",
|
|
7
|
-
"version": "0.6.
|
|
7
|
+
"version": "0.6.9"
|
|
8
8
|
},
|
|
9
9
|
"node": {
|
|
10
10
|
"name": "meshy-node",
|
|
11
|
-
"version": "0.6.
|
|
11
|
+
"version": "0.6.9"
|
|
12
12
|
},
|
|
13
13
|
"core": {
|
|
14
14
|
"name": "@meshy/core",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"url": "https://github.com/ai-microsoft/meshy",
|
|
28
|
-
"branch": "
|
|
29
|
-
"commit": "
|
|
28
|
+
"branch": "OptHeader",
|
|
29
|
+
"commit": "4a5aadb"
|
|
30
30
|
}
|
|
31
31
|
}
|