@cryptiklemur/lattice 1.29.0 → 1.29.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.
@@ -57,11 +57,20 @@ export var PairingDialog = memo(function PairingDialog(props: PairingDialogProps
57
57
  }
58
58
  }
59
59
 
60
+ function handlePairFailed(msg: ServerMessage) {
61
+ if (msg.type !== "mesh:pair_failed") return;
62
+ var data = msg as { type: string; message: string };
63
+ setPairStatus("failed");
64
+ setPairError(data.message);
65
+ }
66
+
60
67
  ws.subscribe("mesh:invite_code", handleInvite);
61
68
  ws.subscribe("mesh:paired", handlePaired);
69
+ ws.subscribe("mesh:pair_failed", handlePairFailed);
62
70
  return function () {
63
71
  ws.unsubscribe("mesh:invite_code", handleInvite);
64
72
  ws.unsubscribe("mesh:paired", handlePaired);
73
+ ws.unsubscribe("mesh:pair_failed", handlePairFailed);
65
74
  };
66
75
  }, []);
67
76
 
@@ -220,8 +229,9 @@ export var PairingDialog = memo(function PairingDialog(props: PairingDialogProps
220
229
  type="text"
221
230
  value={pairCode}
222
231
  onChange={function (e) {
223
- var raw = e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, "");
224
- if (raw.startsWith("LTCE")) raw = raw.slice(4);
232
+ var raw = e.target.value.replace(/[^A-Za-z0-9]/g, "");
233
+ var upper = raw.toUpperCase();
234
+ if (upper.startsWith("LTCE")) raw = raw.slice(4);
225
235
  if (raw.length > 16) raw = raw.slice(0, 16);
226
236
  var chunks: string[] = [];
227
237
  for (var i = 0; i < raw.length; i += 4) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptiklemur/lattice",
3
- "version": "1.29.0",
3
+ "version": "1.29.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>",
@@ -75,11 +75,11 @@ registerHandler("mesh", function (clientId: string, message: ClientMessage) {
75
75
  var pairMsg = message as MeshPairMessage;
76
76
  var parsed = parseInviteCode(pairMsg.code);
77
77
  if (!parsed) {
78
- sendTo(clientId, { type: "chat:error", message: "Invalid invite code format" });
78
+ sendTo(clientId, { type: "mesh:pair_failed", message: "Invalid invite code format" });
79
79
  return;
80
80
  }
81
81
  if (!validatePairingToken(parsed.token)) {
82
- sendTo(clientId, { type: "chat:error", message: "Invite code is invalid or expired" });
82
+ sendTo(clientId, { type: "mesh:pair_failed", message: "Invite code is invalid or expired" });
83
83
  return;
84
84
  }
85
85
  consumePairingToken(parsed.token);
@@ -127,7 +127,7 @@ registerHandler("mesh", function (clientId: string, message: ClientMessage) {
127
127
  });
128
128
  ws.addEventListener("error", function () {
129
129
  console.error("[lattice] mesh:pair — failed to connect to", wsUrl);
130
- sendTo(clientId, { type: "chat:error", message: "Failed to connect to " + parsed!.address + ":" + parsed!.port });
130
+ sendTo(clientId, { type: "mesh:pair_failed", message: "Failed to connect to " + parsed!.address + ":" + parsed!.port });
131
131
  });
132
132
  return;
133
133
  }
@@ -761,6 +761,11 @@ export interface MeshPairedMessage {
761
761
  node: NodeInfo;
762
762
  }
763
763
 
764
+ export interface MeshPairFailedMessage {
765
+ type: "mesh:pair_failed";
766
+ message: string;
767
+ }
768
+
764
769
  export interface MeshNodeOnlineMessage {
765
770
  type: "mesh:node_online";
766
771
  nodeId: string;
@@ -1022,6 +1027,7 @@ export type ServerMessage =
1022
1027
  | MeshNodesMessage
1023
1028
  | MeshInviteCodeMessage
1024
1029
  | MeshPairedMessage
1030
+ | MeshPairFailedMessage
1025
1031
  | MeshNodeOnlineMessage
1026
1032
  | MeshNodeOfflineMessage
1027
1033
  | ProjectsListMessage