openfox 1.6.2 → 1.6.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.
@@ -2339,7 +2339,7 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
2339
2339
  sessionLLMClients.delete(sessionId);
2340
2340
  }
2341
2341
  const isSubscribedToSession = (client, sessionId) => {
2342
- return client.activeSessionId === sessionId || client.eventStoreSubscriptions.has(sessionId);
2342
+ return client.activeSessionId === sessionId;
2343
2343
  };
2344
2344
  const broadcastForSession = (sessionId, msg) => {
2345
2345
  for (const [clientWs, client] of clients) {
@@ -2499,7 +2499,7 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
2499
2499
  const sessionId = msg.sessionId;
2500
2500
  if (!sessionId) return;
2501
2501
  for (const [clientWs, client] of clients) {
2502
- if (client.activeSessionId === sessionId || client.subscribedSessions.has(sessionId) || client.eventStoreSubscriptions.has(sessionId)) {
2502
+ if (client.activeSessionId === sessionId) {
2503
2503
  if (clientWs.readyState === WebSocket2.OPEN) {
2504
2504
  clientWs.send(serializeServerMessage(msg));
2505
2505
  }
@@ -2519,7 +2519,7 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
2519
2519
  }
2520
2520
  }
2521
2521
  logger.debug("WebSocket client connected");
2522
- clients.set(ws, { ws, activeSessionId: null, subscribedSessions: /* @__PURE__ */ new Map(), eventStoreSubscriptions: /* @__PURE__ */ new Map(), globalSubscription: null });
2522
+ clients.set(ws, { ws, activeSessionId: null, globalSubscription: null });
2523
2523
  const eventStore = getEventStore();
2524
2524
  const { iterator: globalIterator, unsubscribe: globalUnsubscribe } = eventStore.subscribeAll();
2525
2525
  clients.get(ws).globalSubscription = globalUnsubscribe;
@@ -2563,16 +2563,8 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
2563
2563
  ws.on("close", () => {
2564
2564
  logger.debug("WebSocket client disconnected");
2565
2565
  const client = clients.get(ws);
2566
- if (client) {
2567
- for (const unsubscribe of client.subscribedSessions.values()) {
2568
- unsubscribe();
2569
- }
2570
- for (const unsubscribe of client.eventStoreSubscriptions.values()) {
2571
- unsubscribe();
2572
- }
2573
- if (client.globalSubscription) {
2574
- client.globalSubscription();
2575
- }
2566
+ if (client?.globalSubscription) {
2567
+ client.globalSubscription();
2576
2568
  }
2577
2569
  unsubscribeAllFromTerminal(ws);
2578
2570
  clients.delete(ws);
@@ -2832,23 +2824,6 @@ ${content}` : workflowInfo;
2832
2824
  const sessionId = client.activeSessionId;
2833
2825
  const eventStore = getEventStore();
2834
2826
  send({ type: "ack", payload: {}, id: message.id });
2835
- if (!client.eventStoreSubscriptions.has(sessionId)) {
2836
- const sid = sessionId;
2837
- const { iterator, unsubscribe } = eventStore.subscribe(sid);
2838
- client.eventStoreSubscriptions.set(sessionId, unsubscribe);
2839
- (async () => {
2840
- try {
2841
- for await (const storedEvent of iterator) {
2842
- const serverMsg = storedEventToServerMessage(storedEvent);
2843
- if (serverMsg && ws.readyState === WebSocket2.OPEN) {
2844
- ws.send(serializeServerMessage({ ...serverMsg, seq: storedEvent.seq, sessionId: sid }));
2845
- }
2846
- }
2847
- } catch (error) {
2848
- logger.debug("EventStore subscription ended", { sessionId: sid, error });
2849
- }
2850
- })();
2851
- }
2852
2827
  sessionManager.setRunning(sessionId, true);
2853
2828
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: true } });
2854
2829
  sendForSession(sessionId, createSessionRunningMessage(true));
@@ -5568,7 +5543,7 @@ function createTerminalRoutes() {
5568
5543
  }
5569
5544
 
5570
5545
  // src/constants.ts
5571
- var VERSION = "1.6.2";
5546
+ var VERSION = "1.6.4";
5572
5547
 
5573
5548
  // src/server/index.ts
5574
5549
  var __dirname2 = dirname5(fileURLToPath4(import.meta.url));
@@ -6457,4 +6432,4 @@ export {
6457
6432
  createServerHandle,
6458
6433
  createServer
6459
6434
  };
6460
- //# sourceMappingURL=chunk-3B2E5PIQ.js.map
6435
+ //# sourceMappingURL=chunk-4HSEOMJV.js.map
@@ -154,7 +154,7 @@ async function runCli(options) {
154
154
  if (!configExists) {
155
155
  await runNetworkSetup(mode);
156
156
  }
157
- const { runServe } = await import("./serve-3Z4Q6BWP.js");
157
+ const { runServe } = await import("./serve-OKXWQVUY.js");
158
158
  await runServe({
159
159
  mode,
160
160
  port: values.port ? parseInt(values.port) : void 0,
@@ -167,4 +167,4 @@ async function runCli(options) {
167
167
  export {
168
168
  runCli
169
169
  };
170
- //# sourceMappingURL=chunk-4NKDXE5Q.js.map
170
+ //# sourceMappingURL=chunk-AJMU5EFR.js.map
package/dist/cli/dev.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-4NKDXE5Q.js";
4
+ } from "../chunk-AJMU5EFR.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-4NKDXE5Q.js";
4
+ } from "../chunk-AJMU5EFR.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  VERSION,
8
8
  createServer
9
- } from "./chunk-3B2E5PIQ.js";
9
+ } from "./chunk-4HSEOMJV.js";
10
10
  import "./chunk-QDEKU5RL.js";
11
11
  import "./chunk-S73ATBSR.js";
12
12
  import "./chunk-GBBTJ6ND.js";
@@ -188,4 +188,4 @@ async function runServe(options) {
188
188
  export {
189
189
  runServe
190
190
  };
191
- //# sourceMappingURL=serve-3Z4Q6BWP.js.map
191
+ //# sourceMappingURL=serve-OKXWQVUY.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createServer,
3
3
  createServerHandle
4
- } from "../chunk-3B2E5PIQ.js";
4
+ } from "../chunk-4HSEOMJV.js";
5
5
  import "../chunk-QDEKU5RL.js";
6
6
  import "../chunk-S73ATBSR.js";
7
7
  import "../chunk-GBBTJ6ND.js";