@cryptiklemur/lattice 1.11.3 → 1.11.4
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.11.
|
|
3
|
+
"version": "1.11.4",
|
|
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>",
|
package/server/src/daemon.ts
CHANGED
|
@@ -15,7 +15,7 @@ import type { ClientMessage, MeshMessage } from "@lattice/shared";
|
|
|
15
15
|
import "./handlers/session";
|
|
16
16
|
import "./handlers/chat";
|
|
17
17
|
import "./handlers/attachment";
|
|
18
|
-
import { loadInterruptedSessions, unwatchSessionLock } from "./project/sdk-bridge";
|
|
18
|
+
import { loadInterruptedSessions, unwatchSessionLock, cleanupClientPermissions } from "./project/sdk-bridge";
|
|
19
19
|
import { clearActiveSession, getActiveSession } from "./handlers/chat";
|
|
20
20
|
import "./handlers/fs";
|
|
21
21
|
import "./handlers/terminal";
|
|
@@ -312,6 +312,7 @@ export async function startDaemon(portOverride?: number | null): Promise<void> {
|
|
|
312
312
|
removeClient(ws.data.id);
|
|
313
313
|
cleanupClientTerminals(ws.data.id);
|
|
314
314
|
cleanupClientAttachments(ws.data.id);
|
|
315
|
+
cleanupClientPermissions(ws.data.id);
|
|
315
316
|
console.log(`[lattice] Client disconnected: ${ws.data.id}`);
|
|
316
317
|
},
|
|
317
318
|
},
|
|
@@ -141,6 +141,22 @@ export function deletePendingPermission(requestId: string): void {
|
|
|
141
141
|
pendingPermissions.delete(requestId);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
export function cleanupClientPermissions(clientId: string): void {
|
|
145
|
+
var toRemove: string[] = [];
|
|
146
|
+
pendingPermissions.forEach(function (entry, requestId) {
|
|
147
|
+
if (entry.clientId === clientId) {
|
|
148
|
+
toRemove.push(requestId);
|
|
149
|
+
entry.resolve({ behavior: "deny", message: "Client disconnected.", toolUseID: entry.toolUseID });
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
for (var i = 0; i < toRemove.length; i++) {
|
|
153
|
+
pendingPermissions.delete(toRemove[i]);
|
|
154
|
+
}
|
|
155
|
+
if (toRemove.length > 0) {
|
|
156
|
+
console.log("[lattice] Cleaned up " + toRemove.length + " pending permission(s) for disconnected client " + clientId);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
144
160
|
export function addAutoApprovedTool(sessionId: string, toolName: string): void {
|
|
145
161
|
var tools = autoApprovedTools.get(sessionId);
|
|
146
162
|
if (!tools) {
|