@cryptiklemur/lattice 1.41.0 → 1.41.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 +1 -1
- package/server/src/project/sdk-bridge.ts +10 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptiklemur/lattice",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.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>",
|
|
@@ -96,22 +96,21 @@ export function addRemoteSessionWatcher(sessionId: string, nodeId: string): void
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export function getBusyOwner(sessionId: string): "cli" | "lattice" | undefined {
|
|
99
|
-
if (
|
|
100
|
-
return "cli";
|
|
99
|
+
if (activeStreams.has(sessionId)) return "lattice";
|
|
100
|
+
if (isSessionLockedByExternal(sessionId)) return "cli";
|
|
101
|
+
return undefined;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
// Poll every 3 seconds for external lock changes
|
|
104
105
|
setInterval(function () {
|
|
105
106
|
for (var sessionId of watchedSessions) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var locked = isSessionLockedByExternal(sessionId);
|
|
107
|
+
var busy = isSessionBusy(sessionId);
|
|
109
108
|
var prev = externalLockState.get(sessionId) ?? false;
|
|
110
109
|
|
|
111
|
-
if (
|
|
112
|
-
externalLockState.set(sessionId,
|
|
113
|
-
var owner =
|
|
114
|
-
broadcast({ type: "session:busy", sessionId, busy:
|
|
110
|
+
if (busy !== prev) {
|
|
111
|
+
externalLockState.set(sessionId, busy);
|
|
112
|
+
var owner = busy ? getBusyOwner(sessionId) : undefined;
|
|
113
|
+
broadcast({ type: "session:busy", sessionId, busy: busy, busyOwner: owner });
|
|
115
114
|
|
|
116
115
|
var watchers = remoteSessionWatchers.get(sessionId);
|
|
117
116
|
if (watchers) {
|
|
@@ -123,7 +122,7 @@ setInterval(function () {
|
|
|
123
122
|
type: "mesh:proxy_response",
|
|
124
123
|
projectSlug: "",
|
|
125
124
|
requestId: "busy-" + sessionId,
|
|
126
|
-
payload: { type: "session:busy", sessionId, busy:
|
|
125
|
+
payload: { type: "session:busy", sessionId, busy: busy, busyOwner: owner },
|
|
127
126
|
}));
|
|
128
127
|
}
|
|
129
128
|
}
|
|
@@ -219,6 +218,7 @@ export function getActiveStreamCount(): number {
|
|
|
219
218
|
* so this ONLY returns true for external CLI instances.
|
|
220
219
|
*/
|
|
221
220
|
export function isSessionBusy(sessionId: string): boolean {
|
|
221
|
+
if (activeStreams.has(sessionId)) return true;
|
|
222
222
|
return isSessionLockedByExternal(sessionId);
|
|
223
223
|
}
|
|
224
224
|
|