openfox 2.0.117 → 2.0.118

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/CHANGELOG.md +16 -0
  3. package/dist/{chat-handler-URSNELCE.js → chat-handler-KNBP6WVI.js} +10 -10
  4. package/dist/{chunk-7SDJXHJH.js → chunk-45OS4H3L.js} +31 -128
  5. package/dist/{chunk-3PEYTWCS.js → chunk-5E5G3DLI.js} +3 -3
  6. package/dist/{chunk-ZS6MW2WM.js → chunk-5ZR5O5GC.js} +3 -3
  7. package/dist/chunk-BSULZIPW.js +7 -0
  8. package/dist/{chunk-X3XKYGUN.js → chunk-CIYA6BNB.js} +3 -3
  9. package/dist/{chunk-I6MY65LO.js → chunk-CX7UJZA5.js} +17 -12
  10. package/dist/{chunk-2PQA3DHY.js → chunk-IDUXGSQV.js} +169 -110
  11. package/dist/{chunk-TGVDUK4N.js → chunk-JOCR4CF4.js} +1 -1
  12. package/dist/{chunk-ZKLE2Q3I.js → chunk-KSDWQ6IZ.js} +1 -1
  13. package/dist/{chunk-6XHDNSA3.js → chunk-MTFLMNLN.js} +7 -4
  14. package/dist/{chunk-EQ7DK2TG.js → chunk-NP2SV2CX.js} +74 -6
  15. package/dist/{chunk-ECCSVMRT.js → chunk-RXIDGWNV.js} +35 -34
  16. package/dist/{chunk-4GHLULHB.js → chunk-XAAEP5XM.js} +8 -16
  17. package/dist/{chunk-QQVPUZQB.js → chunk-XZGQZ42D.js} +3 -3
  18. package/dist/{chunk-EZD7WFBZ.js → chunk-Y6WWEQPC.js} +71 -11
  19. package/dist/cli/dev.js +1 -1
  20. package/dist/cli/index.js +1 -1
  21. package/dist/{compactor-LAXZLPPA.js → compactor-5ATICQ2A.js} +4 -4
  22. package/dist/{dynamic-context-NNBVVFBT.js → dynamic-context-4SKLIPJ4.js} +2 -2
  23. package/dist/{events-IVPAMMR5.js → events-KDFMBVP5.js} +2 -2
  24. package/dist/{launch-HSSFGQ5A.js → launch-Q6GUJ22H.js} +10 -10
  25. package/dist/{orchestrator-FVXUJW3K.js → orchestrator-DVCGWWNA.js} +9 -9
  26. package/dist/package.json +1 -1
  27. package/dist/{path-security-JTCHWYG3.js → path-security-L4AJJN2V.js} +5 -5
  28. package/dist/{processor-JRVW5QBA.js → processor-G6UJGA2K.js} +20 -9
  29. package/dist/{protocol-CfUkCYxF.d.ts → protocol-DzJrspsl.d.ts} +15 -8
  30. package/dist/{protocol-HYA5BYVN.js → protocol-TLODRZSB.js} +7 -7
  31. package/dist/{serve-CW6PR3M2.js → serve-23YIIMXH.js} +15 -15
  32. package/dist/server/index.d.ts +1 -1
  33. package/dist/server/index.js +14 -14
  34. package/dist/{server-V46SOIGP.js → server-IDXIAC5L.js} +13 -13
  35. package/dist/shared/index.d.ts +1 -1
  36. package/dist/shared/index.js +1 -1
  37. package/dist/{tools-2Q3GRECI.js → tools-GOGLGTNV.js} +7 -7
  38. package/dist/{update-YP7IRT6M.js → update-T3YMIWQO.js} +2 -2
  39. package/dist/web/assets/index-BgENxR9h.js +324 -0
  40. package/dist/web/assets/{index-DTiVSJJu.css → index-XTp1QlHA.css} +1 -1
  41. package/dist/web/index.html +2 -2
  42. package/dist/web/sw.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunk-NPTI5RCQ.js +0 -7
  45. package/dist/web/assets/index-C58KXxRi.js +0 -324
@@ -16,10 +16,10 @@ import {
16
16
  terminalManager,
17
17
  tokenFromPassword,
18
18
  verifyPassword
19
- } from "./chunk-EZD7WFBZ.js";
19
+ } from "./chunk-Y6WWEQPC.js";
20
20
  import {
21
21
  TEMPLATE_VARIABLES
22
- } from "./chunk-7SDJXHJH.js";
22
+ } from "./chunk-45OS4H3L.js";
23
23
  import {
24
24
  createToolRegistry,
25
25
  devServerManager,
@@ -29,7 +29,7 @@ import {
29
29
  setMcpManagerForTools,
30
30
  setMcpTools,
31
31
  setNotifyMcpServersChanged
32
- } from "./chunk-2PQA3DHY.js";
32
+ } from "./chunk-IDUXGSQV.js";
33
33
  import {
34
34
  deleteOwnedSkill,
35
35
  deleteProjectSkill,
@@ -123,7 +123,7 @@ import {
123
123
  getEventStore,
124
124
  getSessionState,
125
125
  initEventStore
126
- } from "./chunk-TGVDUK4N.js";
126
+ } from "./chunk-JOCR4CF4.js";
127
127
  import {
128
128
  clearWorkflowExecution,
129
129
  createSession,
@@ -151,7 +151,7 @@ import {
151
151
  import {
152
152
  createContextStateMessage,
153
153
  toClientSession
154
- } from "./chunk-4GHLULHB.js";
154
+ } from "./chunk-XAAEP5XM.js";
155
155
  import {
156
156
  getPathSeparator,
157
157
  isAbsolutePath
@@ -167,7 +167,7 @@ import {
167
167
  } from "./chunk-JLAR2CMV.js";
168
168
  import {
169
169
  VERSION
170
- } from "./chunk-NPTI5RCQ.js";
170
+ } from "./chunk-BSULZIPW.js";
171
171
  import {
172
172
  agentExists,
173
173
  deleteAgent,
@@ -227,7 +227,7 @@ import {
227
227
  } from "./chunk-K44MW7JJ.js";
228
228
  import {
229
229
  createServerMessage
230
- } from "./chunk-ZKLE2Q3I.js";
230
+ } from "./chunk-KSDWQ6IZ.js";
231
231
  import {
232
232
  getGlobalConfigDir
233
233
  } from "./chunk-CQGTEGKL.js";
@@ -5947,7 +5947,7 @@ async function createServerHandle(config3) {
5947
5947
  toolRegistry = createToolRegistry();
5948
5948
  logger.info("MCP tools registered", { count: mcpTools.length });
5949
5949
  }
5950
- const { signalMcpReady } = await import("./server-V46SOIGP.js");
5950
+ const { signalMcpReady } = await import("./server-IDXIAC5L.js");
5951
5951
  signalMcpReady();
5952
5952
  });
5953
5953
  const app = express();
@@ -6145,7 +6145,7 @@ async function createServerHandle(config3) {
6145
6145
  app.use("/api", sessionFavoriteRouter);
6146
6146
  const { createTasksService } = await import("./service-M7XJHAK4.js");
6147
6147
  const { registerTaskRoutes } = await import("./tasks-X5H5HM4J.js");
6148
- const { setTasksService } = await import("./tools-2Q3GRECI.js");
6148
+ const { setTasksService } = await import("./tools-GOGLGTNV.js");
6149
6149
  const tasksService = createTasksService({
6150
6150
  sessionManager,
6151
6151
  config: config3,
@@ -6343,8 +6343,8 @@ All file and git operations should use this branch.
6343
6343
  res.json({ workspaces: workspacesList });
6344
6344
  });
6345
6345
  app.get("/api/sessions", async (req, res) => {
6346
- const { getRecentUserPromptsForSession } = await import("./events-IVPAMMR5.js");
6347
- const { getPendingConfirmationsBySession } = await import("./path-security-JTCHWYG3.js");
6346
+ const { getRecentUserPromptsForSession } = await import("./events-KDFMBVP5.js");
6347
+ const { getPendingConfirmationsBySession } = await import("./path-security-L4AJJN2V.js");
6348
6348
  const projectId = req.query["projectId"];
6349
6349
  const rawLimit = req.query["limit"];
6350
6350
  const offset = parseInt(req.query["offset"]) || 0;
@@ -6472,9 +6472,9 @@ All file and git operations should use this branch.
6472
6472
  }
6473
6473
  });
6474
6474
  app.get("/api/sessions/:id", async (req, res) => {
6475
- const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-IVPAMMR5.js");
6475
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-KDFMBVP5.js");
6476
6476
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-RTGU63BW.js");
6477
- const { getPendingQuestionsForSession } = await import("./tools-2Q3GRECI.js");
6477
+ const { getPendingQuestionsForSession } = await import("./tools-GOGLGTNV.js");
6478
6478
  const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
6479
6479
  const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-7F2EOA4U.js");
6480
6480
  const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-I7ELDIIP.js");
@@ -6516,8 +6516,8 @@ All file and git operations should use this branch.
6516
6516
  if (!session) {
6517
6517
  return res.status(404).json({ error: "Session not found" });
6518
6518
  }
6519
- const { stopSessionExecution } = await import("./chat-handler-URSNELCE.js");
6520
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-2Q3GRECI.js");
6519
+ const { stopSessionExecution } = await import("./chat-handler-KNBP6WVI.js");
6520
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-GOGLGTNV.js");
6521
6521
  sessionManager.clearMessageQueue(sessionId);
6522
6522
  stopSessionExecution(sessionId, sessionManager);
6523
6523
  abortSession(sessionId);
@@ -6546,7 +6546,7 @@ All file and git operations should use this branch.
6546
6546
  res.json({ success: true });
6547
6547
  });
6548
6548
  app.post("/api/sessions/:id/provider", async (req, res) => {
6549
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-IVPAMMR5.js");
6549
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-KDFMBVP5.js");
6550
6550
  const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
6551
6551
  const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
6552
6552
  const sessionId = req.params.id;
@@ -6661,7 +6661,7 @@ All file and git operations should use this branch.
6661
6661
  res.json({ success: true });
6662
6662
  });
6663
6663
  app.put("/api/sessions/:id/mode", async (req, res) => {
6664
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-IVPAMMR5.js");
6664
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-KDFMBVP5.js");
6665
6665
  const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
6666
6666
  const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
6667
6667
  const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-7F2EOA4U.js");
@@ -6767,7 +6767,7 @@ All file and git operations should use this branch.
6767
6767
  if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
6768
6768
  return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
6769
6769
  }
6770
- const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-2Q3GRECI.js");
6770
+ const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-GOGLGTNV.js");
6771
6771
  const pendingSessionId = getConfirmationSessionId(callId);
6772
6772
  if (!pendingSessionId) {
6773
6773
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -6779,10 +6779,10 @@ All file and git operations should use this branch.
6779
6779
  if (!result.found) {
6780
6780
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
6781
6781
  }
6782
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-IVPAMMR5.js");
6782
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-KDFMBVP5.js");
6783
6783
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-RTGU63BW.js");
6784
- const { createSessionStateMessage } = await import("./protocol-HYA5BYVN.js");
6785
- const { getPendingQuestionsForSession } = await import("./tools-2Q3GRECI.js");
6784
+ const { createSessionStateMessage } = await import("./protocol-TLODRZSB.js");
6785
+ const { getPendingQuestionsForSession } = await import("./tools-GOGLGTNV.js");
6786
6786
  const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
6787
6787
  const eventStore = getEventStore2();
6788
6788
  const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
@@ -6800,7 +6800,8 @@ All file and git operations should use this branch.
6800
6800
  pendingQuestions,
6801
6801
  void 0,
6802
6802
  void 0,
6803
- hiddenCount
6803
+ hiddenCount,
6804
+ sessionManager.getDisplayWorkflowExecution(sessionId) ?? void 0
6804
6805
  );
6805
6806
  wssExports.broadcastForSession(sessionId, { ...stateMsg, sessionId });
6806
6807
  }
@@ -6819,7 +6820,7 @@ All file and git operations should use this branch.
6819
6820
  if (!skip && typeof answer !== "string") {
6820
6821
  return res.status(400).json({ error: "answer is required when not skipping" });
6821
6822
  }
6822
- const { provideAnswer } = await import("./tools-2Q3GRECI.js");
6823
+ const { provideAnswer } = await import("./tools-GOGLGTNV.js");
6823
6824
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
6824
6825
  if (!found) {
6825
6826
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -6884,7 +6885,7 @@ All file and git operations should use this branch.
6884
6885
  backend: activeProvider?.backend ?? llmClient.getBackend(),
6885
6886
  model: llmClient.getModel()
6886
6887
  };
6887
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-FVXUJW3K.js");
6888
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-DVCGWWNA.js");
6888
6889
  runAgentTurn(
6889
6890
  {
6890
6891
  sessionManager,
@@ -6922,15 +6923,15 @@ All file and git operations should use this branch.
6922
6923
  if (!session) {
6923
6924
  return res.status(404).json({ error: "Session not found" });
6924
6925
  }
6925
- const { stopSessionExecution } = await import("./chat-handler-URSNELCE.js");
6926
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-2Q3GRECI.js");
6926
+ const { stopSessionExecution } = await import("./chat-handler-KNBP6WVI.js");
6927
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-GOGLGTNV.js");
6927
6928
  const queuedMessages = sessionManager.getQueueState(sessionId);
6928
6929
  sessionManager.clearMessageQueue(sessionId);
6929
6930
  stopSessionExecution(sessionId, sessionManager);
6930
6931
  abortSession(sessionId);
6931
6932
  cancelQuestionsForSession(sessionId, "Session stopped by user");
6932
6933
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
6933
- const eventStore = (await import("./events-IVPAMMR5.js")).getEventStore();
6934
+ const eventStore = (await import("./events-KDFMBVP5.js")).getEventStore();
6934
6935
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
6935
6936
  res.json({ success: true, queuedMessages });
6936
6937
  });
@@ -6944,7 +6945,7 @@ All file and git operations should use this branch.
6944
6945
  if (typeof messageIndex !== "number" || messageIndex < 0) {
6945
6946
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
6946
6947
  }
6947
- const { truncateSessionMessages } = await import("./events-IVPAMMR5.js");
6948
+ const { truncateSessionMessages } = await import("./events-KDFMBVP5.js");
6948
6949
  truncateSessionMessages(sessionId, messageIndex);
6949
6950
  res.json({ success: true });
6950
6951
  });
@@ -6964,7 +6965,7 @@ All file and git operations should use this branch.
6964
6965
  if (attachments !== void 0 && !Array.isArray(attachments)) {
6965
6966
  return res.status(400).json({ error: "attachments must be an array if provided" });
6966
6967
  }
6967
- const { getEventStore: getEventStore2 } = await import("./events-IVPAMMR5.js");
6968
+ const { getEventStore: getEventStore2 } = await import("./events-KDFMBVP5.js");
6968
6969
  const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
6969
6970
  const eventStore = getEventStore2();
6970
6971
  const events = eventStore.getEvents(sessionId);
@@ -6977,7 +6978,7 @@ All file and git operations should use this branch.
6977
6978
  if (msg.role !== "user" || msg.isSystemGenerated) {
6978
6979
  return res.status(400).json({ error: "Can only replay user messages" });
6979
6980
  }
6980
- const { truncateSessionMessages } = await import("./events-IVPAMMR5.js");
6981
+ const { truncateSessionMessages } = await import("./events-KDFMBVP5.js");
6981
6982
  truncateSessionMessages(sessionId, msgIndex - 1);
6982
6983
  sessionManager.queueMessage(
6983
6984
  sessionId,
@@ -7723,7 +7724,7 @@ All file and git operations should use this branch.
7723
7724
  });
7724
7725
  async function rebuildMcpTools() {
7725
7726
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-FJAFLDZA.js");
7726
- const { setMcpTools: setMcpTools2 } = await import("./tools-2Q3GRECI.js");
7727
+ const { setMcpTools: setMcpTools2 } = await import("./tools-GOGLGTNV.js");
7727
7728
  const mcpTools = createMcpTools2(mcpManager);
7728
7729
  setMcpTools2(mcpTools);
7729
7730
  toolRegistry = createToolRegistry();
@@ -8277,7 +8278,7 @@ All file and git operations should use this branch.
8277
8278
  );
8278
8279
  const wss = wssExports.wss;
8279
8280
  deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
8280
- const { launchWorkflowRun, abortRunnerRun } = await import("./launch-HSSFGQ5A.js");
8281
+ const { launchWorkflowRun, abortRunnerRun } = await import("./launch-Q6GUJ22H.js");
8281
8282
  deferTasksLaunchWorkflow = (sessionId, launch) => {
8282
8283
  const session = sessionManager.getSession(sessionId);
8283
8284
  let llmClient = getLLMClient();
@@ -8315,7 +8316,7 @@ All file and git operations should use this branch.
8315
8316
  const state = sessionManager.getContextState(sessionId);
8316
8317
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
8317
8318
  });
8318
- const { QueueProcessor } = await import("./processor-JRVW5QBA.js");
8319
+ const { QueueProcessor } = await import("./processor-G6UJGA2K.js");
8319
8320
  const queueProcessor = new QueueProcessor({
8320
8321
  sessionManager,
8321
8322
  providerManager,
@@ -8401,4 +8402,4 @@ export {
8401
8402
  createServerHandle,
8402
8403
  createServer
8403
8404
  };
8404
- //# sourceMappingURL=chunk-ECCSVMRT.js.map
8405
+ //# sourceMappingURL=chunk-RXIDGWNV.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createServerMessage,
6
6
  isClientMessage
7
- } from "./chunk-ZKLE2Q3I.js";
7
+ } from "./chunk-KSDWQ6IZ.js";
8
8
 
9
9
  // src/server/session/client-session.ts
10
10
  function toClientSession(session) {
@@ -140,11 +140,11 @@ function createChatDoneMessage(messageId, reason, stats, agentType) {
140
140
  function createChatErrorMessage(error, recoverable) {
141
141
  return createServerMessage("chat.error", { error, recoverable });
142
142
  }
143
- function createChatMessageRemovedMessage(messageIds) {
144
- return createServerMessage("chat.message_removed", { messageIds });
143
+ function createChatLLMRetryMessage(attempt, retryInMs) {
144
+ return createServerMessage("chat.llm_retry", { attempt, retryInMs });
145
145
  }
146
- function createChatStepRetryMessage(stepName, attempt, retryInMs) {
147
- return createServerMessage("chat.step_retry", { stepName, attempt, retryInMs });
146
+ function createChatLLMRetryFailedMessage(error, attempts) {
147
+ return createServerMessage("chat.llm_retry_failed", { error, attempts });
148
148
  }
149
149
  function createChatPathConfirmationMessage(callId, tool, paths, workdir, reason) {
150
150
  return createServerMessage("chat.path_confirmation", { callId, tool, paths, workdir, reason });
@@ -322,14 +322,6 @@ function storedEventToServerMessage(event) {
322
322
  const data = event.data;
323
323
  return createChatFormatRetryMessage(data.attempt, data.maxAttempts, data.pattern, data.field, data.matchedContent);
324
324
  }
325
- case "message.removed": {
326
- const data = event.data;
327
- return createChatMessageRemovedMessage(data.messageIds);
328
- }
329
- case "workflow.step_retry": {
330
- const data = event.data;
331
- return createChatStepRetryMessage(data.stepName, data.attempt, data.retryInMs);
332
- }
333
325
  case "path.confirmation_pending":
334
326
  case "path.confirmation_responded":
335
327
  return null;
@@ -365,8 +357,8 @@ export {
365
357
  createChatMessageUpdatedMessage,
366
358
  createChatDoneMessage,
367
359
  createChatErrorMessage,
368
- createChatMessageRemovedMessage,
369
- createChatStepRetryMessage,
360
+ createChatLLMRetryMessage,
361
+ createChatLLMRetryFailedMessage,
370
362
  createChatPathConfirmationMessage,
371
363
  createChatAskUserMessage,
372
364
  createModeChangedMessage,
@@ -382,4 +374,4 @@ export {
382
374
  createQueueStateMessage,
383
375
  storedEventToServerMessage
384
376
  };
385
- //# sourceMappingURL=chunk-4GHLULHB.js.map
377
+ //# sourceMappingURL=chunk-XAAEP5XM.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getEventStore
3
- } from "./chunk-TGVDUK4N.js";
3
+ } from "./chunk-JOCR4CF4.js";
4
4
  import {
5
5
  createChatPathConfirmationMessage
6
- } from "./chunk-4GHLULHB.js";
6
+ } from "./chunk-XAAEP5XM.js";
7
7
  import {
8
8
  getPlatformShell
9
9
  } from "./chunk-AESOGRFK.js";
@@ -671,4 +671,4 @@ export {
671
671
  getConfirmationSessionId,
672
672
  getPendingConfirmationsBySession
673
673
  };
674
- //# sourceMappingURL=chunk-QQVPUZQB.js.map
674
+ //# sourceMappingURL=chunk-XZGQZ42D.js.map
@@ -2,24 +2,28 @@ import {
2
2
  generateSessionNameForSession,
3
3
  getSessionMessageCount,
4
4
  needsNameGeneration
5
- } from "./chunk-6XHDNSA3.js";
5
+ } from "./chunk-MTFLMNLN.js";
6
6
  import {
7
7
  launchWorkflowRun
8
- } from "./chunk-7SDJXHJH.js";
8
+ } from "./chunk-45OS4H3L.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-I6MY65LO.js";
11
+ } from "./chunk-CX7UJZA5.js";
12
12
  import {
13
13
  devServerManager
14
- } from "./chunk-2PQA3DHY.js";
14
+ } from "./chunk-IDUXGSQV.js";
15
15
  import {
16
16
  applyDynamicContext,
17
17
  computeSessionHash,
18
18
  computeUnifiedDiff
19
- } from "./chunk-3PEYTWCS.js";
19
+ } from "./chunk-5E5G3DLI.js";
20
20
  import {
21
21
  appendCompactionPrompt
22
- } from "./chunk-X3XKYGUN.js";
22
+ } from "./chunk-CIYA6BNB.js";
23
+ import {
24
+ hasRecentLLMFailure,
25
+ interruptLLMRetryWait
26
+ } from "./chunk-NP2SV2CX.js";
23
27
  import {
24
28
  onProcessEvent
25
29
  } from "./chunk-ZTOG6LJD.js";
@@ -32,7 +36,7 @@ import {
32
36
  import {
33
37
  combineEventsWithSnapshot,
34
38
  getEventStore
35
- } from "./chunk-TGVDUK4N.js";
39
+ } from "./chunk-JOCR4CF4.js";
36
40
  import {
37
41
  createChatErrorMessage,
38
42
  createChatMessageMessage,
@@ -47,7 +51,7 @@ import {
47
51
  parseClientMessage,
48
52
  serializeServerMessage,
49
53
  storedEventToServerMessage
50
- } from "./chunk-4GHLULHB.js";
54
+ } from "./chunk-XAAEP5XM.js";
51
55
  import {
52
56
  getPlatformShell
53
57
  } from "./chunk-AESOGRFK.js";
@@ -70,7 +74,7 @@ import {
70
74
  } from "./chunk-K44MW7JJ.js";
71
75
  import {
72
76
  createServerMessage
73
- } from "./chunk-ZKLE2Q3I.js";
77
+ } from "./chunk-KSDWQ6IZ.js";
74
78
 
75
79
  // src/server/ws/server.ts
76
80
  import { WebSocketServer, WebSocket as WebSocket2 } from "ws";
@@ -801,6 +805,7 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
801
805
  sessionManager,
802
806
  sessionId,
803
807
  llmClient: llmForSession(sessionId),
808
+ getSessionLLMClient: () => llmForSession(sessionId),
804
809
  statsIdentity: statsForSession(sessionId),
805
810
  signal: controller.signal,
806
811
  onMessage: (msg) => broadcastForSession(sessionId, msg)
@@ -1192,6 +1197,7 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1192
1197
  sessionManager,
1193
1198
  sessionId,
1194
1199
  llmClient: llmForSession(sessionId),
1200
+ getSessionLLMClient: () => llmForSession(sessionId),
1195
1201
  statsIdentity: statsForSession(sessionId),
1196
1202
  signal: controller.signal,
1197
1203
  onMessage: (msg) => _broadcastForSession(sessionId, msg),
@@ -1275,7 +1281,7 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1275
1281
  }
1276
1282
  const session = sessionManager.requireSession(sessionId);
1277
1283
  try {
1278
- const { buildCachedPrompt } = await import("./dynamic-context-NNBVVFBT.js");
1284
+ const { buildCachedPrompt } = await import("./dynamic-context-4SKLIPJ4.js");
1279
1285
  const allAgents = await import("./registry-5QL3BOWN.js");
1280
1286
  const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
1281
1287
  const modelName = session.providerModel ?? _providerManager?.getCurrentModel();
@@ -1431,6 +1437,7 @@ ${content}` : workflowInfo;
1431
1437
  sessionId,
1432
1438
  controller,
1433
1439
  llmClient: llmForSession(sessionId),
1440
+ getSessionLLMClient: () => llmForSession(sessionId),
1434
1441
  statsIdentity: statsForSession(sessionId),
1435
1442
  broadcastForSession: (sid, msg) => _broadcastForSession(sid, msg),
1436
1443
  onFinished: () => cleanupAfterTurn(sessionId, controller, sendForSession, true)
@@ -1528,6 +1535,59 @@ ${content}` : workflowInfo;
1528
1535
  send({ type: "ack", payload: {}, id: message.id });
1529
1536
  break;
1530
1537
  }
1538
+ // =========================================================================
1539
+ // LLM Retry
1540
+ // =========================================================================
1541
+ case "chat.llm_retry_now": {
1542
+ const payload = message.payload;
1543
+ const retrySessionId = payload?.sessionId ?? client.activeSessionId;
1544
+ if (!retrySessionId) {
1545
+ send(createErrorMessage("NO_SESSION", "No active session", message.id));
1546
+ return;
1547
+ }
1548
+ const interrupted = interruptLLMRetryWait(retrySessionId);
1549
+ send({ type: "ack", payload: { interrupted }, id: message.id });
1550
+ break;
1551
+ }
1552
+ case "chat.retry": {
1553
+ const payload = message.payload;
1554
+ const retrySessionId = payload?.sessionId ?? client.activeSessionId;
1555
+ if (!retrySessionId) {
1556
+ send(createErrorMessage("NO_SESSION", "No active session", message.id));
1557
+ return;
1558
+ }
1559
+ const retrySession = sessionManager.getSession(retrySessionId);
1560
+ if (!retrySession) {
1561
+ send(createErrorMessage("NOT_FOUND", "Session not found", message.id));
1562
+ return;
1563
+ }
1564
+ if (retrySession.isRunning) {
1565
+ send(createErrorMessage("SESSION_RUNNING", "Session is already running", message.id));
1566
+ return;
1567
+ }
1568
+ if (!hasRecentLLMFailure(retrySessionId, 30 * 6e4)) {
1569
+ send(createErrorMessage("NO_FAILED_TURN", "No failed turn to retry", message.id));
1570
+ return;
1571
+ }
1572
+ const latestExec = sessionManager.getLatestWorkflowExecution(retrySessionId);
1573
+ if (latestExec && (latestExec.status === "blocked" || latestExec.status === "running" || latestExec.status === "waiting")) {
1574
+ send(createErrorMessage("WORKFLOW_ACTIVE", "A workflow run is active", message.id));
1575
+ return;
1576
+ }
1577
+ if (retrySession.phase === "blocked") {
1578
+ sessionManager.setPhase(retrySessionId, "build");
1579
+ }
1580
+ const controller = new AbortController();
1581
+ const existingController = activeAgents.get(retrySessionId);
1582
+ if (existingController) {
1583
+ logger.warn("Aborting existing agent before retrying turn", { sessionId: retrySessionId });
1584
+ existingController.abort();
1585
+ }
1586
+ activeAgents.set(retrySessionId, controller);
1587
+ send({ type: "ack", payload: {}, id: message.id });
1588
+ _startTurnWithCompletionChain(retrySessionId, controller);
1589
+ break;
1590
+ }
1531
1591
  default: {
1532
1592
  send(createErrorMessage("UNKNOWN_MESSAGE", `Unknown message type: ${message.type}`, message.id));
1533
1593
  }
@@ -1546,4 +1606,4 @@ export {
1546
1606
  signalMcpReady,
1547
1607
  createWebSocketServer
1548
1608
  };
1549
- //# sourceMappingURL=chunk-EZD7WFBZ.js.map
1609
+ //# sourceMappingURL=chunk-Y6WWEQPC.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-ZS6MW2WM.js";
4
+ } from "../chunk-5ZR5O5GC.js";
5
5
  import "../chunk-AGXJ5O63.js";
6
6
  import {
7
7
  logger
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-ZS6MW2WM.js";
4
+ } from "../chunk-5ZR5O5GC.js";
5
5
  import "../chunk-AGXJ5O63.js";
6
6
  import {
7
7
  logger
@@ -3,10 +3,10 @@ import {
3
3
  COMPACTION_MAX_RATIO,
4
4
  appendCompactionPrompt,
5
5
  shouldCompact
6
- } from "./chunk-X3XKYGUN.js";
7
- import "./chunk-EQ7DK2TG.js";
6
+ } from "./chunk-CIYA6BNB.js";
7
+ import "./chunk-NP2SV2CX.js";
8
8
  import "./chunk-27NABDXB.js";
9
- import "./chunk-TGVDUK4N.js";
9
+ import "./chunk-JOCR4CF4.js";
10
10
  import "./chunk-KLQEL2DZ.js";
11
11
  import "./chunk-AESOGRFK.js";
12
12
  import "./chunk-3KBRMBTP.js";
@@ -29,4 +29,4 @@ export {
29
29
  appendCompactionPrompt,
30
30
  shouldCompact
31
31
  };
32
- //# sourceMappingURL=compactor-LAXZLPPA.js.map
32
+ //# sourceMappingURL=compactor-5ATICQ2A.js.map
@@ -5,7 +5,7 @@ import {
5
5
  computeSessionHash,
6
6
  computeUnifiedDiff,
7
7
  getToolFingerprint
8
- } from "./chunk-3PEYTWCS.js";
8
+ } from "./chunk-5E5G3DLI.js";
9
9
  import "./chunk-2FCLCUVR.js";
10
10
  import "./chunk-27NABDXB.js";
11
11
  import "./chunk-AESOGRFK.js";
@@ -25,4 +25,4 @@ export {
25
25
  computeUnifiedDiff,
26
26
  getToolFingerprint
27
27
  };
28
- //# sourceMappingURL=dynamic-context-NNBVVFBT.js.map
28
+ //# sourceMappingURL=dynamic-context-4SKLIPJ4.js.map
@@ -40,7 +40,7 @@ import {
40
40
  isStoredEvent,
41
41
  isTurnEvent,
42
42
  truncateSessionMessages
43
- } from "./chunk-TGVDUK4N.js";
43
+ } from "./chunk-JOCR4CF4.js";
44
44
  import "./chunk-KLQEL2DZ.js";
45
45
  import {
46
46
  buildContextMessagesFromEventHistory,
@@ -126,4 +126,4 @@ export {
126
126
  isTurnEvent,
127
127
  truncateSessionMessages
128
128
  };
129
- //# sourceMappingURL=events-IVPAMMR5.js.map
129
+ //# sourceMappingURL=events-KDFMBVP5.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  abortRunnerRun,
3
3
  launchWorkflowRun
4
- } from "./chunk-7SDJXHJH.js";
5
- import "./chunk-I6MY65LO.js";
6
- import "./chunk-2PQA3DHY.js";
7
- import "./chunk-3PEYTWCS.js";
4
+ } from "./chunk-45OS4H3L.js";
5
+ import "./chunk-CX7UJZA5.js";
6
+ import "./chunk-IDUXGSQV.js";
7
+ import "./chunk-5E5G3DLI.js";
8
8
  import "./chunk-2FCLCUVR.js";
9
- import "./chunk-EQ7DK2TG.js";
9
+ import "./chunk-NP2SV2CX.js";
10
10
  import "./chunk-27NABDXB.js";
11
11
  import "./chunk-M6X6AIEG.js";
12
12
  import "./chunk-ZTOG6LJD.js";
@@ -17,10 +17,10 @@ import "./chunk-O6DU226D.js";
17
17
  import "./chunk-J7GAZGZT.js";
18
18
  import "./chunk-HZSKKJHQ.js";
19
19
  import "./chunk-EQ5CGNOT.js";
20
- import "./chunk-QQVPUZQB.js";
21
- import "./chunk-TGVDUK4N.js";
20
+ import "./chunk-XZGQZ42D.js";
21
+ import "./chunk-JOCR4CF4.js";
22
22
  import "./chunk-KLQEL2DZ.js";
23
- import "./chunk-4GHLULHB.js";
23
+ import "./chunk-XAAEP5XM.js";
24
24
  import "./chunk-AESOGRFK.js";
25
25
  import "./chunk-JURM3RPZ.js";
26
26
  import "./chunk-JLAR2CMV.js";
@@ -41,7 +41,7 @@ import "./chunk-HD6Y77RO.js";
41
41
  import "./chunk-5PT4UMRR.js";
42
42
  import "./chunk-K44MW7JJ.js";
43
43
  import "./chunk-VUQCQXXJ.js";
44
- import "./chunk-ZKLE2Q3I.js";
44
+ import "./chunk-KSDWQ6IZ.js";
45
45
  import "./chunk-KSXCOHHW.js";
46
46
  import "./chunk-CQGTEGKL.js";
47
47
  import "./chunk-YLJ4XMA6.js";
@@ -49,4 +49,4 @@ export {
49
49
  abortRunnerRun,
50
50
  launchWorkflowRun
51
51
  };
52
- //# sourceMappingURL=launch-HSSFGQ5A.js.map
52
+ //# sourceMappingURL=launch-Q6GUJ22H.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  runAgentTurn,
3
3
  runChatTurn
4
- } from "./chunk-I6MY65LO.js";
5
- import "./chunk-2PQA3DHY.js";
6
- import "./chunk-3PEYTWCS.js";
4
+ } from "./chunk-CX7UJZA5.js";
5
+ import "./chunk-IDUXGSQV.js";
6
+ import "./chunk-5E5G3DLI.js";
7
7
  import "./chunk-2FCLCUVR.js";
8
8
  import {
9
9
  TurnMetrics,
@@ -12,7 +12,7 @@ import {
12
12
  createMessageStartEvent,
13
13
  createToolCallEvent,
14
14
  createToolResultEvent
15
- } from "./chunk-EQ7DK2TG.js";
15
+ } from "./chunk-NP2SV2CX.js";
16
16
  import "./chunk-27NABDXB.js";
17
17
  import "./chunk-M6X6AIEG.js";
18
18
  import "./chunk-ZTOG6LJD.js";
@@ -23,10 +23,10 @@ import "./chunk-O6DU226D.js";
23
23
  import "./chunk-J7GAZGZT.js";
24
24
  import "./chunk-HZSKKJHQ.js";
25
25
  import "./chunk-EQ5CGNOT.js";
26
- import "./chunk-QQVPUZQB.js";
27
- import "./chunk-TGVDUK4N.js";
26
+ import "./chunk-XZGQZ42D.js";
27
+ import "./chunk-JOCR4CF4.js";
28
28
  import "./chunk-KLQEL2DZ.js";
29
- import "./chunk-4GHLULHB.js";
29
+ import "./chunk-XAAEP5XM.js";
30
30
  import "./chunk-AESOGRFK.js";
31
31
  import "./chunk-JURM3RPZ.js";
32
32
  import "./chunk-JLAR2CMV.js";
@@ -46,7 +46,7 @@ import "./chunk-LTYL6ZGH.js";
46
46
  import "./chunk-HD6Y77RO.js";
47
47
  import "./chunk-5PT4UMRR.js";
48
48
  import "./chunk-K44MW7JJ.js";
49
- import "./chunk-ZKLE2Q3I.js";
49
+ import "./chunk-KSDWQ6IZ.js";
50
50
  import "./chunk-KSXCOHHW.js";
51
51
  import "./chunk-CQGTEGKL.js";
52
52
  import "./chunk-YLJ4XMA6.js";
@@ -60,4 +60,4 @@ export {
60
60
  runAgentTurn,
61
61
  runChatTurn
62
62
  };
63
- //# sourceMappingURL=orchestrator-FVXUJW3K.js.map
63
+ //# sourceMappingURL=orchestrator-DVCGWWNA.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "2.0.117",
3
+ "version": "2.0.118",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {