@cryptiklemur/lattice 1.40.0 → 1.40.1

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.40.0",
3
+ "version": "1.40.1",
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>",
@@ -245,9 +245,9 @@ registerHandler("mesh", function (clientId: string, message: ClientMessage) {
245
245
  }
246
246
 
247
247
  var inboundWs = getClientWebSocket(clientId);
248
- log.meshHello(" registering inbound connection for %s (ws=%s)", hello.name, !!inboundWs);
248
+ log.meshHello(" registering inbound connection for %s (ws=%s, projects=%d)", hello.name, !!inboundWs, hello.projects?.length ?? 0);
249
249
  if (inboundWs) {
250
- registerInboundPeer(hello.nodeId, inboundWs as any);
250
+ registerInboundPeer(hello.nodeId, inboundWs as any, hello.projects ?? []);
251
251
  }
252
252
 
253
253
  var identity = loadOrCreateIdentity();
@@ -252,7 +252,7 @@ export function getPeerConnection(nodeId: string): WebSocket | undefined {
252
252
  return conn.ws;
253
253
  }
254
254
 
255
- export function registerInboundPeer(nodeId: string, ws: { send: (data: string) => void; readyState: number }): void {
255
+ export function registerInboundPeer(nodeId: string, ws: { send: (data: string) => void; readyState: number }, peerProjects?: Array<{ slug: string; title: string }>): void {
256
256
  var existing = connections.get(nodeId);
257
257
  if (existing && !existing.dead && existing.ws.readyState === WebSocket.OPEN) {
258
258
  log.meshConnect("inbound peer %s already connected, skipping", nodeId.slice(0, 8));
@@ -269,15 +269,20 @@ export function registerInboundPeer(nodeId: string, ws: { send: (data: string) =
269
269
 
270
270
  circuitBreakers.delete(nodeId);
271
271
 
272
+ var incomingProjects = peerProjects ?? [];
272
273
  var conn: PeerConnection = {
273
274
  nodeId: nodeId,
274
275
  ws: ws as WebSocket,
275
276
  backoffMs: 1000,
276
277
  retryTimer: null,
277
278
  dead: false,
278
- projects: [],
279
+ projects: incomingProjects,
279
280
  };
280
281
 
282
+ if (incomingProjects.length > 0) {
283
+ lastKnownProjects.set(nodeId, incomingProjects);
284
+ }
285
+
281
286
  connections.set(nodeId, conn);
282
287
 
283
288
  var peers = loadPeers();