openfox 1.6.99 → 1.6.101

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 (39) hide show
  1. package/dist/{auto-compaction-ZYKJQPGM.js → auto-compaction-JSXVY2CJ.js} +9 -9
  2. package/dist/{chat-handler-N3FYFHYQ.js → chat-handler-45TB6QWI.js} +12 -12
  3. package/dist/{chunk-KR7N2ONG.js → chunk-5LYWA56Z.js} +92 -32
  4. package/dist/{chunk-T67WWSM7.js → chunk-C5U6NRAY.js} +10 -10
  5. package/dist/{chunk-XVWVAWSG.js → chunk-DCYDTDWO.js} +7 -9
  6. package/dist/{chunk-5GVCNVKV.js → chunk-FBGWG4N6.js} +1 -5
  7. package/dist/{chunk-6UBQ4BNN.js → chunk-L6LTCUCO.js} +3 -3
  8. package/dist/{chunk-7Y3HFCTD.js → chunk-MBLZSLPH.js} +12 -28
  9. package/dist/{chunk-K7F73QLL.js → chunk-NASF624P.js} +4 -4
  10. package/dist/{chunk-NVVKBL4S.js → chunk-SBQ36AOQ.js} +4 -4
  11. package/dist/{chunk-QAMG73V3.js → chunk-SCAFZ75C.js} +47 -66
  12. package/dist/{chunk-ROWFVGB6.js → chunk-TYIHIHJF.js} +2 -2
  13. package/dist/{chunk-ERFRUQQR.js → chunk-UTBDR6KM.js} +1 -1
  14. package/dist/{chunk-RGRBWDZP.js → chunk-VUQCQXXJ.js} +5 -2
  15. package/dist/{chunk-ZHBL5G5X.js → chunk-XAMAYRDA.js} +2 -2
  16. package/dist/cli/dev.js +1 -1
  17. package/dist/cli/index.js +1 -1
  18. package/dist/{events-Z2SXIOUX.js → events-JP746DV3.js} +4 -4
  19. package/dist/{folding-4VHGQE6Y.js → folding-EQPDQKQS.js} +2 -2
  20. package/dist/{orchestrator-2A6RG6ZR.js → orchestrator-RRO2XLYZ.js} +10 -10
  21. package/dist/package.json +1 -1
  22. package/dist/{processor-V34TTHI2.js → processor-C4KLV5SV.js} +8 -8
  23. package/dist/{project-creator-25F7KUPX.js → project-creator-6DU7E75S.js} +3 -3
  24. package/dist/{projects-55F45PH3.js → projects-2HYIZC4Y.js} +3 -3
  25. package/dist/{protocol-BFKDuZ7J.d.ts → protocol-BkFgSJVU.d.ts} +3 -6
  26. package/dist/{protocol-FZUIA4BS.js → protocol-SVQYBN2X.js} +3 -5
  27. package/dist/{serve-65V7N6ZV.js → serve-5B36ZPK3.js} +12 -12
  28. package/dist/server/index.d.ts +1 -5
  29. package/dist/server/index.js +11 -11
  30. package/dist/{settings-TTYCUHWU.js → settings-4334IX63.js} +3 -3
  31. package/dist/shared/index.d.ts +2 -2
  32. package/dist/shared/index.js +2 -2
  33. package/dist/{tools-ASM4FNUG.js → tools-AGVKG553.js} +9 -9
  34. package/dist/web/assets/index-Du9Uz0qZ.js +299 -0
  35. package/dist/web/assets/{index-D3nUB0zb.css → index-aAebFDVk.css} +1 -1
  36. package/dist/web/index.html +2 -2
  37. package/dist/web/sw.js +1 -1
  38. package/package.json +1 -1
  39. package/dist/web/assets/index-BEkw-EHs.js +0 -299
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  getEventStore,
3
3
  updateSessionMetadata
4
- } from "./chunk-7Y3HFCTD.js";
4
+ } from "./chunk-MBLZSLPH.js";
5
5
  import {
6
6
  buildMessagesFromStoredEvents,
7
7
  foldPendingConfirmations
8
- } from "./chunk-XVWVAWSG.js";
8
+ } from "./chunk-DCYDTDWO.js";
9
9
  import {
10
10
  createContextStateMessage,
11
11
  createSessionStateMessage
12
- } from "./chunk-T67WWSM7.js";
12
+ } from "./chunk-C5U6NRAY.js";
13
13
  import {
14
14
  logger
15
15
  } from "./chunk-K44MW7JJ.js";
@@ -143,4 +143,4 @@ export {
143
143
  needsNameGenerationCheck,
144
144
  applyGeneratedSessionName
145
145
  };
146
- //# sourceMappingURL=chunk-NVVKBL4S.js.map
146
+ //# sourceMappingURL=chunk-SBQ36AOQ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createVerifierNudgeConfig,
3
3
  runBuilderTurn,
4
4
  runChatTurn
5
- } from "./chunk-K7F73QLL.js";
5
+ } from "./chunk-NASF624P.js";
6
6
  import {
7
7
  TurnMetrics,
8
8
  agentExists,
@@ -46,10 +46,10 @@ import {
46
46
  saveSkillToProject,
47
47
  skillExists,
48
48
  spawnShellProcess
49
- } from "./chunk-KR7N2ONG.js";
49
+ } from "./chunk-5LYWA56Z.js";
50
50
  import {
51
51
  getProject
52
- } from "./chunk-ZHBL5G5X.js";
52
+ } from "./chunk-XAMAYRDA.js";
53
53
  import {
54
54
  getPathSeparator,
55
55
  getPlatformShell,
@@ -94,16 +94,15 @@ import {
94
94
  updateSessionDangerLevel,
95
95
  updateSessionMetadata,
96
96
  updateSessionProvider,
97
- updateSessionRunning,
98
- updateSessionSummary
99
- } from "./chunk-7Y3HFCTD.js";
97
+ updateSessionRunning
98
+ } from "./chunk-MBLZSLPH.js";
100
99
  import {
101
100
  initDatabase
102
- } from "./chunk-5GVCNVKV.js";
101
+ } from "./chunk-FBGWG4N6.js";
103
102
  import {
104
103
  buildMessagesFromStoredEvents,
105
104
  foldPendingConfirmations
106
- } from "./chunk-XVWVAWSG.js";
105
+ } from "./chunk-DCYDTDWO.js";
107
106
  import {
108
107
  createChatErrorMessage,
109
108
  createChatMessageMessage,
@@ -118,17 +117,17 @@ import {
118
117
  parseClientMessage,
119
118
  serializeServerMessage,
120
119
  storedEventToServerMessage
121
- } from "./chunk-T67WWSM7.js";
120
+ } from "./chunk-C5U6NRAY.js";
122
121
  import {
123
122
  EventEmitter,
124
123
  provideAnswer
125
124
  } from "./chunk-BJYPTN5S.js";
126
125
  import {
127
126
  computeSessionStats
128
- } from "./chunk-RGRBWDZP.js";
127
+ } from "./chunk-VUQCQXXJ.js";
129
128
  import {
130
129
  createServerMessage
131
- } from "./chunk-ERFRUQQR.js";
130
+ } from "./chunk-UTBDR6KM.js";
132
131
  import {
133
132
  getGlobalConfigDir
134
133
  } from "./chunk-CQGTEGKL.js";
@@ -1287,6 +1286,7 @@ function createMockLLMClient() {
1287
1286
  // src/server/ws/server.ts
1288
1287
  import { WebSocketServer, WebSocket as WebSocket2 } from "ws";
1289
1288
  import { spawn as spawn2 } from "child_process";
1289
+ import { createHash as createHash2 } from "crypto";
1290
1290
 
1291
1291
  // src/server/ws/terminal.ts
1292
1292
  import WebSocket from "ws";
@@ -1733,7 +1733,6 @@ var TEMPLATE_VARIABLES = [
1733
1733
  },
1734
1734
  { name: "criteriaCount", description: "Total number of criteria" },
1735
1735
  { name: "pendingCount", description: "Number of pending/failed criteria" },
1736
- { name: "summary", description: "Session summary generated by planner" },
1737
1736
  { name: "criteriaList", description: "Formatted list of all criteria with status" },
1738
1737
  { name: "modifiedFiles", description: "List of modified files" }
1739
1738
  ];
@@ -1905,7 +1904,6 @@ async function executeWorkflow(workflow, options) {
1905
1904
  previousStepOutput: lastStepOutput["stdout"] ?? "",
1906
1905
  criteriaCount: criteria.length,
1907
1906
  pendingCount: criteria.filter((c) => c.status.type !== "passed").length,
1908
- summary: session.summary ?? "No summary available",
1909
1907
  criteriaList: formatCriteriaList(criteria),
1910
1908
  modifiedFiles: formatModifiedFiles(session),
1911
1909
  stepOutput: lastStepOutput
@@ -2323,6 +2321,9 @@ function moduleGitBranch(cwd) {
2323
2321
  proc.on("error", () => resolve3(null));
2324
2322
  });
2325
2323
  }
2324
+ function hashContent(content) {
2325
+ return createHash2("sha256").update(content).digest("hex");
2326
+ }
2326
2327
  function moduleGitDiff(cwd) {
2327
2328
  return new Promise((resolve3) => {
2328
2329
  const proc = spawn2("git", ["diff", "--stat", "--numstat", "--format=", "HEAD"], {
@@ -2350,17 +2351,7 @@ function moduleGitDiff(cwd) {
2350
2351
  resolve3({ hash: "", files: [] });
2351
2352
  return;
2352
2353
  }
2353
- const hashProc = spawn2("git", ["rev-parse", "HEAD"], { cwd, stdio: ["ignore", "pipe", "ignore"] });
2354
- let hash = "";
2355
- hashProc.stdout.on("data", (data) => {
2356
- hash += data.toString();
2357
- });
2358
- hashProc.on("close", (hCode) => {
2359
- if (hCode !== 0) hash = "";
2360
- });
2361
- hashProc.on("error", () => {
2362
- hash = "";
2363
- });
2354
+ const hash = hashContent(diffStdout + statusStdout);
2364
2355
  const files = [];
2365
2356
  for (const line of diffStdout.split("\n")) {
2366
2357
  if (!line) continue;
@@ -2387,7 +2378,7 @@ function moduleGitDiff(cwd) {
2387
2378
  deletions: 0
2388
2379
  });
2389
2380
  }
2390
- resolve3({ hash: hash.trim(), files });
2381
+ resolve3({ hash, files });
2391
2382
  };
2392
2383
  proc.on("close", (code) => {
2393
2384
  procExited = true;
@@ -2409,7 +2400,7 @@ function moduleGitDiff(cwd) {
2409
2400
  }
2410
2401
  var moduleWorkdirLastHash = /* @__PURE__ */ new Map();
2411
2402
  var moduleWorkdirInterval = /* @__PURE__ */ new Map();
2412
- var gitPollInterval = 1e4;
2403
+ var gitPollInterval = parseInt(process.env["OPENFOX_GIT_POLL_INTERVAL"] ?? "", 10) || 1e4;
2413
2404
  var moduleClients = null;
2414
2405
  var moduleEnqueueSend = null;
2415
2406
  function moduleGitPoll(workdir) {
@@ -4296,16 +4287,6 @@ var SessionManager = class {
4296
4287
  this.emit({ type: "running_changed", sessionId, isRunning });
4297
4288
  return updatedSession;
4298
4289
  }
4299
- /**
4300
- * Set session summary. Updates DB directly (metadata, not event).
4301
- */
4302
- setSummary(sessionId, summary) {
4303
- logger.debug("Setting session summary", { sessionId, summaryLength: summary.length });
4304
- updateSessionSummary(sessionId, summary);
4305
- const updatedSession = this.requireSession(sessionId);
4306
- this.emit({ type: "session_updated", session: updatedSession });
4307
- return updatedSession;
4308
- }
4309
4290
  /**
4310
4291
  * Set session provider/model. Updates DB directly.
4311
4292
  */
@@ -5384,7 +5365,7 @@ import { Router as Router6 } from "express";
5384
5365
  import { spawn as spawn4 } from "child_process";
5385
5366
 
5386
5367
  // src/constants.ts
5387
- var VERSION = "1.6.99";
5368
+ var VERSION = "1.6.101";
5388
5369
 
5389
5370
  // src/server/routes/auto-update.ts
5390
5371
  var updateInProgress = false;
@@ -5585,7 +5566,7 @@ async function createServerHandle(config4) {
5585
5566
  res.json({ tools });
5586
5567
  });
5587
5568
  app.get("/api/projects", async (_req, res) => {
5588
- const { listProjects } = await import("./projects-55F45PH3.js");
5569
+ const { listProjects } = await import("./projects-2HYIZC4Y.js");
5589
5570
  const projects = listProjects();
5590
5571
  res.json({ projects });
5591
5572
  });
@@ -5594,7 +5575,7 @@ async function createServerHandle(config4) {
5594
5575
  if (!name || !workdir) {
5595
5576
  return res.status(400).json({ error: "name and workdir are required" });
5596
5577
  }
5597
- const { createDirectoryWithGit } = await import("./project-creator-25F7KUPX.js");
5578
+ const { createDirectoryWithGit } = await import("./project-creator-6DU7E75S.js");
5598
5579
  try {
5599
5580
  const project = await createDirectoryWithGit(name, workdir);
5600
5581
  res.status(201).json({ project });
@@ -5639,7 +5620,7 @@ async function createServerHandle(config4) {
5639
5620
  }
5640
5621
  });
5641
5622
  app.get("/api/projects/:id", async (req, res) => {
5642
- const { getProject: getProject2 } = await import("./projects-55F45PH3.js");
5623
+ const { getProject: getProject2 } = await import("./projects-2HYIZC4Y.js");
5643
5624
  const project = getProject2(req.params.id);
5644
5625
  if (!project) {
5645
5626
  return res.status(404).json({ error: "Project not found" });
@@ -5647,7 +5628,7 @@ async function createServerHandle(config4) {
5647
5628
  res.json({ project });
5648
5629
  });
5649
5630
  app.put("/api/projects/:id", async (req, res) => {
5650
- const { updateProject } = await import("./projects-55F45PH3.js");
5631
+ const { updateProject } = await import("./projects-2HYIZC4Y.js");
5651
5632
  const { name, customInstructions, dangerLevel } = req.body;
5652
5633
  const updates = {};
5653
5634
  if (name !== void 0) updates.name = name;
@@ -5660,7 +5641,7 @@ async function createServerHandle(config4) {
5660
5641
  res.json({ project: updated });
5661
5642
  });
5662
5643
  app.delete("/api/projects/:id", async (req, res) => {
5663
- const { getProject: getProject2, deleteProject } = await import("./projects-55F45PH3.js");
5644
+ const { getProject: getProject2, deleteProject } = await import("./projects-2HYIZC4Y.js");
5664
5645
  const project = getProject2(req.params.id);
5665
5646
  if (!project) {
5666
5647
  return res.status(404).json({ error: "Project not found" });
@@ -5669,7 +5650,7 @@ async function createServerHandle(config4) {
5669
5650
  res.json({ success: true });
5670
5651
  });
5671
5652
  app.put("/api/projects/:id/star", async (req, res) => {
5672
- const { toggleStar } = await import("./projects-55F45PH3.js");
5653
+ const { toggleStar } = await import("./projects-2HYIZC4Y.js");
5673
5654
  const { isStarred } = req.body;
5674
5655
  if (typeof isStarred !== "boolean") {
5675
5656
  return res.status(400).json({ error: "isStarred is required and must be a boolean" });
@@ -5681,7 +5662,7 @@ async function createServerHandle(config4) {
5681
5662
  res.json({ project });
5682
5663
  });
5683
5664
  app.get("/api/sessions", async (req, res) => {
5684
- const { getRecentUserPromptsForSession } = await import("./events-Z2SXIOUX.js");
5665
+ const { getRecentUserPromptsForSession } = await import("./events-JP746DV3.js");
5685
5666
  const projectId = req.query["projectId"];
5686
5667
  const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
5687
5668
  const offset = parseInt(req.query["offset"]) || 0;
@@ -5714,8 +5695,8 @@ async function createServerHandle(config4) {
5714
5695
  res.status(201).json({ session });
5715
5696
  });
5716
5697
  app.get("/api/sessions/:id", async (req, res) => {
5717
- const { getEventStore: getEventStore2 } = await import("./events-Z2SXIOUX.js");
5718
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
5698
+ const { getEventStore: getEventStore2 } = await import("./events-JP746DV3.js");
5699
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-EQPDQKQS.js");
5719
5700
  const session = sessionManager.getSession(req.params.id);
5720
5701
  if (!session) {
5721
5702
  return res.status(404).json({ error: "Session not found" });
@@ -5745,8 +5726,8 @@ async function createServerHandle(config4) {
5745
5726
  res.json({ success: true });
5746
5727
  });
5747
5728
  app.post("/api/sessions/:id/provider", async (req, res) => {
5748
- const { getEventStore: getEventStore2 } = await import("./events-Z2SXIOUX.js");
5749
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
5729
+ const { getEventStore: getEventStore2 } = await import("./events-JP746DV3.js");
5730
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-EQPDQKQS.js");
5750
5731
  const sessionId = req.params.id;
5751
5732
  const session = sessionManager.getSession(sessionId);
5752
5733
  if (!session) {
@@ -5783,8 +5764,8 @@ async function createServerHandle(config4) {
5783
5764
  res.json({ success: true });
5784
5765
  });
5785
5766
  app.put("/api/sessions/:id/mode", async (req, res) => {
5786
- const { getEventStore: getEventStore2 } = await import("./events-Z2SXIOUX.js");
5787
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
5767
+ const { getEventStore: getEventStore2 } = await import("./events-JP746DV3.js");
5768
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-EQPDQKQS.js");
5788
5769
  const sessionId = req.params.id;
5789
5770
  const session = sessionManager.getSession(sessionId);
5790
5771
  if (!session) {
@@ -5840,14 +5821,14 @@ async function createServerHandle(config4) {
5840
5821
  if (!callId || approved === void 0) {
5841
5822
  return res.status(400).json({ error: "callId and approved are required" });
5842
5823
  }
5843
- const { providePathConfirmation } = await import("./tools-ASM4FNUG.js");
5824
+ const { providePathConfirmation } = await import("./tools-AGVKG553.js");
5844
5825
  const result = providePathConfirmation(callId, approved, alwaysAllow);
5845
5826
  if (!result.found) {
5846
5827
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
5847
5828
  }
5848
- const { getEventStore: getEventStore2 } = await import("./events-Z2SXIOUX.js");
5849
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-4VHGQE6Y.js");
5850
- const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-FZUIA4BS.js");
5829
+ const { getEventStore: getEventStore2 } = await import("./events-JP746DV3.js");
5830
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-EQPDQKQS.js");
5831
+ const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-SVQYBN2X.js");
5851
5832
  const eventStore = getEventStore2();
5852
5833
  const events = eventStore.getEvents(sessionId);
5853
5834
  const messages = buildMessagesFromStoredEvents2(events);
@@ -5864,7 +5845,7 @@ async function createServerHandle(config4) {
5864
5845
  if (!callId || !answer) {
5865
5846
  return res.status(400).json({ error: "callId and answer are required" });
5866
5847
  }
5867
- const { provideAnswer: provideAnswer2 } = await import("./tools-ASM4FNUG.js");
5848
+ const { provideAnswer: provideAnswer2 } = await import("./tools-AGVKG553.js");
5868
5849
  const found = provideAnswer2(callId, answer);
5869
5850
  if (!found) {
5870
5851
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -5900,14 +5881,14 @@ async function createServerHandle(config4) {
5900
5881
  if (!session) {
5901
5882
  return res.status(404).json({ error: "Session not found" });
5902
5883
  }
5903
- const { stopSessionExecution } = await import("./chat-handler-N3FYFHYQ.js");
5904
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-ASM4FNUG.js");
5884
+ const { stopSessionExecution } = await import("./chat-handler-45TB6QWI.js");
5885
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-AGVKG553.js");
5905
5886
  stopSessionExecution(sessionId, sessionManager);
5906
5887
  abortSession(sessionId);
5907
5888
  cancelQuestionsForSession(sessionId, "Session stopped by user");
5908
5889
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
5909
5890
  sessionManager.clearMessageQueue(sessionId);
5910
- const eventStore = (await import("./events-Z2SXIOUX.js")).getEventStore();
5891
+ const eventStore = (await import("./events-JP746DV3.js")).getEventStore();
5911
5892
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
5912
5893
  res.json({ success: true });
5913
5894
  });
@@ -5921,7 +5902,7 @@ async function createServerHandle(config4) {
5921
5902
  if (typeof messageIndex !== "number" || messageIndex < 0) {
5922
5903
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
5923
5904
  }
5924
- const { truncateSessionMessages } = await import("./events-Z2SXIOUX.js");
5905
+ const { truncateSessionMessages } = await import("./events-JP746DV3.js");
5925
5906
  truncateSessionMessages(sessionId, messageIndex);
5926
5907
  res.json({ success: true });
5927
5908
  });
@@ -5939,7 +5920,7 @@ async function createServerHandle(config4) {
5939
5920
  if (!msg) {
5940
5921
  return res.status(400).json({ error: "Message not found at this index" });
5941
5922
  }
5942
- const { truncateSessionMessages } = await import("./events-Z2SXIOUX.js");
5923
+ const { truncateSessionMessages } = await import("./events-JP746DV3.js");
5943
5924
  truncateSessionMessages(sessionId, messageIndex - 1);
5944
5925
  sessionManager.queueMessage(sessionId, "asap", msg.content, msg.attachments, msg.messageKind);
5945
5926
  res.json({ success: true });
@@ -5971,7 +5952,7 @@ async function createServerHandle(config4) {
5971
5952
  res.json({ accepted: true });
5972
5953
  });
5973
5954
  app.get("/api/settings", async (req, res) => {
5974
- const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-TTYCUHWU.js");
5955
+ const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-4334IX63.js");
5975
5956
  const keysParam = req.query["keys"];
5976
5957
  if (!keysParam) {
5977
5958
  return res.status(400).json({ error: "keys query parameter is required" });
@@ -5984,19 +5965,19 @@ async function createServerHandle(config4) {
5984
5965
  res.json(result);
5985
5966
  });
5986
5967
  app.get("/api/settings/:key", async (req, res) => {
5987
- const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-TTYCUHWU.js");
5968
+ const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-4334IX63.js");
5988
5969
  const key = req.params.key;
5989
5970
  const value = getSetting(key) ?? SETTINGS_DEFAULTS[key] ?? null;
5990
5971
  res.json({ key, value });
5991
5972
  });
5992
5973
  app.get("/api/settings/:key", async (req, res) => {
5993
- const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-TTYCUHWU.js");
5974
+ const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-4334IX63.js");
5994
5975
  const key = req.params.key;
5995
5976
  const value = getSetting(key) ?? SETTINGS_DEFAULTS[key] ?? null;
5996
5977
  res.json({ key, value });
5997
5978
  });
5998
5979
  app.put("/api/settings/:key", async (req, res) => {
5999
- const { setSetting } = await import("./settings-TTYCUHWU.js");
5980
+ const { setSetting } = await import("./settings-4334IX63.js");
6000
5981
  const key = req.params.key;
6001
5982
  const { value } = req.body;
6002
5983
  if (value === void 0) {
@@ -6416,7 +6397,7 @@ async function createServerHandle(config4) {
6416
6397
  providerManager
6417
6398
  );
6418
6399
  const wss = wssExports.wss;
6419
- const { QueueProcessor } = await import("./processor-V34TTHI2.js");
6400
+ const { QueueProcessor } = await import("./processor-C4KLV5SV.js");
6420
6401
  const queueProcessor = new QueueProcessor({
6421
6402
  sessionManager,
6422
6403
  providerManager,
@@ -6488,4 +6469,4 @@ export {
6488
6469
  createServerHandle,
6489
6470
  createServer
6490
6471
  };
6491
- //# sourceMappingURL=chunk-QAMG73V3.js.map
6472
+ //# sourceMappingURL=chunk-SCAFZ75C.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-5GVCNVKV.js";
3
+ } from "./chunk-FBGWG4N6.js";
4
4
 
5
5
  // src/server/db/settings.ts
6
6
  var SETTINGS_KEYS = {
@@ -86,4 +86,4 @@ export {
86
86
  deleteSetting,
87
87
  getAllSettings
88
88
  };
89
- //# sourceMappingURL=chunk-ROWFVGB6.js.map
89
+ //# sourceMappingURL=chunk-TYIHIHJF.js.map
@@ -26,4 +26,4 @@ export {
26
26
  isClientMessage,
27
27
  isServerMessage
28
28
  };
29
- //# sourceMappingURL=chunk-ERFRUQQR.js.map
29
+ //# sourceMappingURL=chunk-UTBDR6KM.js.map
@@ -1,5 +1,8 @@
1
1
  // src/shared/stats.ts
2
2
  var roundTo1 = (n) => Math.round(n * 10) / 10;
3
+ function hasValidStats(stats) {
4
+ return typeof stats.totalTime === "number" && !Number.isNaN(stats.totalTime);
5
+ }
3
6
  function getStatsIdentity(stats) {
4
7
  return {
5
8
  providerId: stats.providerId,
@@ -94,7 +97,7 @@ function buildSessionStats(messagesWithStats) {
94
97
  };
95
98
  }
96
99
  function computeSessionStats(messages) {
97
- const messagesWithStats = messages.filter((msg) => msg.stats !== void 0 && msg.stats !== null).sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
100
+ const messagesWithStats = messages.filter((msg) => msg.stats !== void 0 && msg.stats !== null && hasValidStats(msg.stats)).sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
98
101
  if (messagesWithStats.length === 0) {
99
102
  return null;
100
103
  }
@@ -123,4 +126,4 @@ function computeSessionStats(messages) {
123
126
  export {
124
127
  computeSessionStats
125
128
  };
126
- //# sourceMappingURL=chunk-RGRBWDZP.js.map
129
+ //# sourceMappingURL=chunk-VUQCQXXJ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-5GVCNVKV.js";
3
+ } from "./chunk-FBGWG4N6.js";
4
4
 
5
5
  // src/server/db/projects.ts
6
6
  function createProject(name, workdir) {
@@ -113,4 +113,4 @@ export {
113
113
  deleteProject,
114
114
  toggleStar
115
115
  };
116
- //# sourceMappingURL=chunk-ZHBL5G5X.js.map
116
+ //# sourceMappingURL=chunk-XAMAYRDA.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-6UBQ4BNN.js";
4
+ } from "../chunk-L6LTCUCO.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.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-6UBQ4BNN.js";
4
+ } from "../chunk-L6LTCUCO.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.js";
@@ -37,8 +37,8 @@ import {
37
37
  isStoredEvent,
38
38
  isTurnEvent,
39
39
  truncateSessionMessages
40
- } from "./chunk-7Y3HFCTD.js";
41
- import "./chunk-5GVCNVKV.js";
40
+ } from "./chunk-MBLZSLPH.js";
41
+ import "./chunk-FBGWG4N6.js";
42
42
  import {
43
43
  buildContextMessagesFromEventHistory,
44
44
  buildContextMessagesFromMessages,
@@ -55,7 +55,7 @@ import {
55
55
  foldTodos,
56
56
  foldTurnEventsToSnapshotMessages,
57
57
  getMessagesForWindow
58
- } from "./chunk-XVWVAWSG.js";
58
+ } from "./chunk-DCYDTDWO.js";
59
59
  import "./chunk-CGZHLM3K.js";
60
60
  import "./chunk-K44MW7JJ.js";
61
61
  export {
@@ -113,4 +113,4 @@ export {
113
113
  isTurnEvent,
114
114
  truncateSessionMessages
115
115
  };
116
- //# sourceMappingURL=events-Z2SXIOUX.js.map
116
+ //# sourceMappingURL=events-JP746DV3.js.map
@@ -22,7 +22,7 @@ import {
22
22
  handleToolResult,
23
23
  spreadOptionalMessageFields,
24
24
  stripOrphanedToolCalls
25
- } from "./chunk-XVWVAWSG.js";
25
+ } from "./chunk-DCYDTDWO.js";
26
26
  export {
27
27
  buildContextMessagesFromEventHistory,
28
28
  buildContextMessagesFromMessages,
@@ -48,4 +48,4 @@ export {
48
48
  spreadOptionalMessageFields,
49
49
  stripOrphanedToolCalls
50
50
  };
51
- //# sourceMappingURL=folding-4VHGQE6Y.js.map
51
+ //# sourceMappingURL=folding-EQPDQKQS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  runBuilderTurn,
4
4
  runChatTurn,
5
5
  runVerifierTurn
6
- } from "./chunk-K7F73QLL.js";
6
+ } from "./chunk-NASF624P.js";
7
7
  import {
8
8
  TurnMetrics,
9
9
  createChatDoneEvent,
@@ -11,19 +11,19 @@ import {
11
11
  createMessageStartEvent,
12
12
  createToolCallEvent,
13
13
  createToolResultEvent
14
- } from "./chunk-KR7N2ONG.js";
15
- import "./chunk-ROWFVGB6.js";
16
- import "./chunk-ZHBL5G5X.js";
14
+ } from "./chunk-5LYWA56Z.js";
15
+ import "./chunk-TYIHIHJF.js";
16
+ import "./chunk-XAMAYRDA.js";
17
17
  import "./chunk-DL6ZILAF.js";
18
18
  import "./chunk-PBGOZMVY.js";
19
19
  import "./chunk-VRGRAQDG.js";
20
20
  import "./chunk-HGAMIPFO.js";
21
- import "./chunk-7Y3HFCTD.js";
22
- import "./chunk-5GVCNVKV.js";
23
- import "./chunk-XVWVAWSG.js";
24
- import "./chunk-T67WWSM7.js";
21
+ import "./chunk-MBLZSLPH.js";
22
+ import "./chunk-FBGWG4N6.js";
23
+ import "./chunk-DCYDTDWO.js";
24
+ import "./chunk-C5U6NRAY.js";
25
25
  import "./chunk-BJYPTN5S.js";
26
- import "./chunk-ERFRUQQR.js";
26
+ import "./chunk-UTBDR6KM.js";
27
27
  import "./chunk-CQGTEGKL.js";
28
28
  import "./chunk-CGZHLM3K.js";
29
29
  import "./chunk-SZKEGZIB.js";
@@ -40,4 +40,4 @@ export {
40
40
  runChatTurn,
41
41
  runVerifierTurn
42
42
  };
43
- //# sourceMappingURL=orchestrator-2A6RG6ZR.js.map
43
+ //# sourceMappingURL=orchestrator-RRO2XLYZ.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.99",
3
+ "version": "1.6.101",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,17 +5,17 @@ import {
5
5
  generateSessionName,
6
6
  getSessionMessageCount,
7
7
  needsNameGenerationCheck
8
- } from "./chunk-NVVKBL4S.js";
8
+ } from "./chunk-SBQ36AOQ.js";
9
9
  import {
10
10
  getEventStore
11
- } from "./chunk-7Y3HFCTD.js";
12
- import "./chunk-5GVCNVKV.js";
13
- import "./chunk-XVWVAWSG.js";
11
+ } from "./chunk-MBLZSLPH.js";
12
+ import "./chunk-FBGWG4N6.js";
13
+ import "./chunk-DCYDTDWO.js";
14
14
  import {
15
15
  createChatMessageMessage,
16
16
  createSessionRunningMessage
17
- } from "./chunk-T67WWSM7.js";
18
- import "./chunk-ERFRUQQR.js";
17
+ } from "./chunk-C5U6NRAY.js";
18
+ import "./chunk-UTBDR6KM.js";
19
19
  import "./chunk-CGZHLM3K.js";
20
20
  import {
21
21
  logger
@@ -177,7 +177,7 @@ var QueueProcessor = class {
177
177
  backend: provider?.backend ?? llmClient.getBackend(),
178
178
  model: llmClient.getModel()
179
179
  };
180
- const { runChatTurn } = await import("./orchestrator-2A6RG6ZR.js");
180
+ const { runChatTurn } = await import("./orchestrator-RRO2XLYZ.js");
181
181
  const runChatTurnParams = buildRunChatTurnParams({
182
182
  sessionManager,
183
183
  sessionId,
@@ -221,4 +221,4 @@ var QueueProcessor = class {
221
221
  export {
222
222
  QueueProcessor
223
223
  };
224
- //# sourceMappingURL=processor-V34TTHI2.js.map
224
+ //# sourceMappingURL=processor-C4KLV5SV.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createProject
3
- } from "./chunk-ZHBL5G5X.js";
4
- import "./chunk-5GVCNVKV.js";
3
+ } from "./chunk-XAMAYRDA.js";
4
+ import "./chunk-FBGWG4N6.js";
5
5
  import "./chunk-K44MW7JJ.js";
6
6
 
7
7
  // src/server/utils/project-creator.ts
@@ -108,4 +108,4 @@ export {
108
108
  createDirectoryWithGit,
109
109
  validateProjectName
110
110
  };
111
- //# sourceMappingURL=project-creator-25F7KUPX.js.map
111
+ //# sourceMappingURL=project-creator-6DU7E75S.js.map
@@ -6,8 +6,8 @@ import {
6
6
  listProjects,
7
7
  toggleStar,
8
8
  updateProject
9
- } from "./chunk-ZHBL5G5X.js";
10
- import "./chunk-5GVCNVKV.js";
9
+ } from "./chunk-XAMAYRDA.js";
10
+ import "./chunk-FBGWG4N6.js";
11
11
  import "./chunk-K44MW7JJ.js";
12
12
  export {
13
13
  createProject,
@@ -18,4 +18,4 @@ export {
18
18
  toggleStar,
19
19
  updateProject
20
20
  };
21
- //# sourceMappingURL=projects-55F45PH3.js.map
21
+ //# sourceMappingURL=projects-2HYIZC4Y.js.map