openfox 2.0.140 → 2.0.142

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 (84) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/CHANGELOG.md +30 -0
  3. package/dist/{chat-handler-JWRCPG72.js → chat-handler-OFB4426F.js} +26 -26
  4. package/dist/{chunk-CRJ5J7U5.js → chunk-2CEZQAGQ.js} +3 -3
  5. package/dist/{chunk-GZJRXVVJ.js → chunk-5CZAKVGZ.js} +12 -12
  6. package/dist/{chunk-SSHXYKW3.js → chunk-5HDPFHHJ.js} +2 -2
  7. package/dist/{chunk-K227HOLU.js → chunk-ACILWRPU.js} +7 -7
  8. package/dist/{chunk-TJOKDC34.js → chunk-CSUMZAYY.js} +399 -86
  9. package/dist/{chunk-EE6VFEE6.js → chunk-DNL2NUDB.js} +2 -2
  10. package/dist/{chunk-UA2ATO3B.js → chunk-DQEANXXF.js} +3 -3
  11. package/dist/{chunk-4F4ARGAM.js → chunk-DRIR2IZR.js} +3 -3
  12. package/dist/{chunk-AE2IBEUH.js → chunk-EFEHIJXF.js} +2 -2
  13. package/dist/chunk-EPZO3MGM.js +7 -0
  14. package/dist/{chunk-7OHSAZLF.js → chunk-F3R4YS3F.js} +16 -18
  15. package/dist/{chunk-WD354R3H.js → chunk-FFVIO6GL.js} +4 -4
  16. package/dist/{chunk-5EKBZXCU.js → chunk-HQDKHNWS.js} +7 -7
  17. package/dist/{chunk-H7YL7PH3.js → chunk-J556QIRD.js} +2 -2
  18. package/dist/{chunk-DPFET73G.js → chunk-JYYBSODN.js} +2 -2
  19. package/dist/{chunk-46Q2SHGJ.js → chunk-MEPTCUYN.js} +2 -2
  20. package/dist/{chunk-RG326HS4.js → chunk-N5AJHJG5.js} +45 -13
  21. package/dist/{chunk-JTR3PC5I.js → chunk-NJFXYSXP.js} +5 -5
  22. package/dist/{chunk-XE6UC5Z3.js → chunk-PHR64A6U.js} +2 -2
  23. package/dist/{chunk-5F7LNEEP.js → chunk-Q5JCBAQF.js} +3 -3
  24. package/dist/{chunk-5MGCTRKM.js → chunk-RM4ZBI2B.js} +20 -20
  25. package/dist/{chunk-EMXMTCSY.js → chunk-SKNPOZYP.js} +4 -2
  26. package/dist/{chunk-IFARTQOK.js → chunk-TEUVZCPS.js} +17 -17
  27. package/dist/{chunk-JLHYB445.js → chunk-TIIWXMGE.js} +2 -2
  28. package/dist/{chunk-66XJC5TA.js → chunk-TRZZCMJ3.js} +9 -9
  29. package/dist/{chunk-LW6MMSTD.js → chunk-VGE6UYND.js} +2 -2
  30. package/dist/{chunk-QIGVYXMH.js → chunk-VK2BSIJP.js} +141 -131
  31. package/dist/{chunk-JU757HVI.js → chunk-WOVWVB5J.js} +11 -1
  32. package/dist/{chunk-FIEFBRTQ.js → chunk-WSDR27YV.js} +4 -4
  33. package/dist/{chunk-MAUQ6AW4.js → chunk-XADIBENX.js} +6 -6
  34. package/dist/{chunk-GKRYQ56N.js → chunk-Z7IT3V22.js} +3 -3
  35. package/dist/cli/dev.js +1 -1
  36. package/dist/cli/index.js +1 -1
  37. package/dist/{client-KJS7QIIV.js → client-2A766XZK.js} +5 -5
  38. package/dist/{compactor-UREBHSZQ.js → compactor-3BVVHO4M.js} +11 -11
  39. package/dist/{describe-image-TQOD52IC.js → describe-image-F22VNBWY.js} +12 -12
  40. package/dist/{dynamic-context-KGSZ7TRQ.js → dynamic-context-5SFXTEAP.js} +12 -12
  41. package/dist/{events-ZLP5V2YU.js → events-UAUOGRSV.js} +8 -8
  42. package/dist/{export-import-CJT33IO6.js → export-import-PBEX3KWU.js} +9 -9
  43. package/dist/{folding-BXMVJIFF.js → folding-IHD244OU.js} +6 -6
  44. package/dist/http-client-RA7XFYPO.js +11 -0
  45. package/dist/{inspect-proxy-A3OROWPG.js → inspect-proxy-24Q2CNCZ.js} +4 -4
  46. package/dist/{launch-7NKOCT5A.js → launch-L5NL75KK.js} +26 -26
  47. package/dist/{manager-JZNNVDYR.js → manager-4SMHCFXY.js} +5 -5
  48. package/dist/{orchestrator-VSVDUGBT.js → orchestrator-53SS74LD.js} +25 -25
  49. package/dist/package.json +1 -1
  50. package/dist/{path-security-V3XALT5E.js → path-security-WOA6MTWQ.js} +10 -10
  51. package/dist/{platform-DBPLSLE4.js → platform-EAZNZDAE.js} +4 -4
  52. package/dist/{processor-ACZM62WO.js → processor-T4VWZMXT.js} +25 -25
  53. package/dist/{project-creator-T3A4H3YV.js → project-creator-K5EGKY2P.js} +3 -3
  54. package/dist/{projects-5U37RUTL.js → projects-VDWCFPVE.js} +3 -3
  55. package/dist/{protocol-D6DZzkSH.d.ts → protocol-Dpf4FBF2.d.ts} +1 -1
  56. package/dist/provider/index.d.ts +4 -4
  57. package/dist/{provider-7LNTLWRB.js → provider-5XNJEDKW.js} +6 -6
  58. package/dist/{provider-manager-TV5I5YJH.js → provider-manager-RHJYUU5W.js} +6 -6
  59. package/dist/{registry-PVJAAL2Y.js → registry-C7RKKHZB.js} +5 -5
  60. package/dist/scheduler-VLTPMGGJ.js +25 -0
  61. package/dist/{serve-36D5HXWE.js → serve-LP3ZX6CW.js} +31 -31
  62. package/dist/server/index.d.ts +6 -6
  63. package/dist/server/index.js +30 -30
  64. package/dist/server-IGZLCNZG.js +61 -0
  65. package/dist/{service-7QKWUNU4.js → service-AZU4YTS2.js} +9 -9
  66. package/dist/{session-overrides-7OPGV7CQ.js → session-overrides-CKS2AVE5.js} +7 -7
  67. package/dist/{sessions-VHS47DHO.js → sessions-DAHLRQE2.js} +6 -6
  68. package/dist/{settings-HCSHADP5.js → settings-TR4BF2C4.js} +3 -3
  69. package/dist/shared/index.d.ts +3 -3
  70. package/dist/{tasks-E7EG7344.js → tasks-T5KZXKMD.js} +18 -12
  71. package/dist/{tools-AY6XEVJK.js → tools-BL6XCTUV.js} +23 -23
  72. package/dist/{types-ofYNpiqi.d.ts → types-CZJf6Fnb.d.ts} +1 -1
  73. package/dist/{types-CLcL33hJ.d.ts → types-LO8296aY.d.ts} +34 -1
  74. package/dist/{update-JHFZMW3T.js → update-M5DMX3FC.js} +2 -2
  75. package/dist/web/assets/{index-BtkaULxJ.css → index-2WvLd7SC.css} +1 -1
  76. package/dist/web/assets/index-BPhet33M.js +313 -0
  77. package/dist/web/index.html +2 -2
  78. package/dist/web/sw.js +1 -1
  79. package/dist/{workspace-LM646OHC.js → workspace-ENN27P56.js} +4 -4
  80. package/package.json +1 -1
  81. package/dist/chunk-6RYTDRUR.js +0 -7
  82. package/dist/http-client-JVJ43TBY.js +0 -11
  83. package/dist/server-R3J26IP2.js +0 -61
  84. package/dist/web/assets/index-Bm0_ekvt.js +0 -313
@@ -9,7 +9,7 @@ import {
9
9
  terminalManager,
10
10
  tokenFromPassword,
11
11
  verifyPassword
12
- } from "./chunk-IFARTQOK.js";
12
+ } from "./chunk-TEUVZCPS.js";
13
13
  import {
14
14
  projectSessionStatus
15
15
  } from "./chunk-T3S5MTMD.js";
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-IJ53Y77N.js";
28
28
  import {
29
29
  TEMPLATE_VARIABLES
30
- } from "./chunk-66XJC5TA.js";
30
+ } from "./chunk-TRZZCMJ3.js";
31
31
  import {
32
32
  createToolRegistry,
33
33
  devServerManager,
@@ -42,7 +42,7 @@ import {
42
42
  setMcpManagerForTools,
43
43
  setMcpTools,
44
44
  setNotifyMcpServersChanged
45
- } from "./chunk-5MGCTRKM.js";
45
+ } from "./chunk-RM4ZBI2B.js";
46
46
  import {
47
47
  deleteOwnedSkill,
48
48
  deleteProjectSkill,
@@ -61,7 +61,7 @@ import {
61
61
  setSkillEnabled,
62
62
  skillExists,
63
63
  updateOwnedSkill
64
- } from "./chunk-CRJ5J7U5.js";
64
+ } from "./chunk-2CEZQAGQ.js";
65
65
  import {
66
66
  checkoutBranchFromSharedSource,
67
67
  deleteWorkspace,
@@ -78,7 +78,7 @@ import {
78
78
  validateRef,
79
79
  validateWorkspaceName,
80
80
  workspaceExists
81
- } from "./chunk-XE6UC5Z3.js";
81
+ } from "./chunk-PHR64A6U.js";
82
82
  import {
83
83
  commandExists,
84
84
  deleteCommand,
@@ -106,22 +106,22 @@ import {
106
106
  saveWorkflow,
107
107
  saveWorkflowToProject,
108
108
  workflowExists
109
- } from "./chunk-TJOKDC34.js";
109
+ } from "./chunk-CSUMZAYY.js";
110
110
  import {
111
111
  clearSessionOverrides,
112
112
  computeDisabledServersForProject,
113
113
  getSessionDisabledServers,
114
114
  initSessionMcpOverrides,
115
115
  setSessionDisabledServers
116
- } from "./chunk-FIEFBRTQ.js";
116
+ } from "./chunk-WSDR27YV.js";
117
117
  import {
118
118
  serverT
119
- } from "./chunk-JLHYB445.js";
119
+ } from "./chunk-TIIWXMGE.js";
120
120
  import {
121
121
  ALWAYS_ALLOWED,
122
122
  ALWAYS_ALLOWED_FOR_SUBAGENTS,
123
123
  TOP_LEVEL_ONLY_TOOLS
124
- } from "./chunk-GKRYQ56N.js";
124
+ } from "./chunk-Z7IT3V22.js";
125
125
  import {
126
126
  createMcpTools
127
127
  } from "./chunk-VIJVLLPT.js";
@@ -133,7 +133,7 @@ import {
133
133
  import {
134
134
  getPendingConfirmationsBySession,
135
135
  providePathConfirmation
136
- } from "./chunk-RG326HS4.js";
136
+ } from "./chunk-N5AJHJG5.js";
137
137
  import {
138
138
  combineEventsWithSnapshot,
139
139
  emitAssistantMessageStart,
@@ -151,10 +151,10 @@ import {
151
151
  getEventStore,
152
152
  getSessionState,
153
153
  initEventStore
154
- } from "./chunk-JTR3PC5I.js";
154
+ } from "./chunk-NJFXYSXP.js";
155
155
  import {
156
156
  buildMessagesFromStoredEvents
157
- } from "./chunk-AE2IBEUH.js";
157
+ } from "./chunk-EFEHIJXF.js";
158
158
  import {
159
159
  clearWorkflowExecution,
160
160
  createSession,
@@ -181,7 +181,7 @@ import {
181
181
  updateSessionRunning,
182
182
  updateSessionWorkdir,
183
183
  updateWorkflowExecutionStatus
184
- } from "./chunk-7OHSAZLF.js";
184
+ } from "./chunk-F3R4YS3F.js";
185
185
  import {
186
186
  agentExists,
187
187
  deleteAgent,
@@ -198,7 +198,7 @@ import {
198
198
  saveAgent,
199
199
  saveAgentToProject,
200
200
  setRuntimeConfig
201
- } from "./chunk-4F4ARGAM.js";
201
+ } from "./chunk-DRIR2IZR.js";
202
202
  import {
203
203
  findFileByInternalId,
204
204
  pathExists
@@ -210,25 +210,25 @@ import {
210
210
  import {
211
211
  getPathSeparator,
212
212
  isAbsolutePath
213
- } from "./chunk-46Q2SHGJ.js";
213
+ } from "./chunk-MEPTCUYN.js";
214
214
  import {
215
215
  createProviderManager,
216
216
  detectModel,
217
217
  getLlmStatus,
218
218
  parseDefaultModelSelection
219
- } from "./chunk-H7YL7PH3.js";
219
+ } from "./chunk-J556QIRD.js";
220
220
  import {
221
221
  buildOpenFoxMcpBootstrap
222
222
  } from "./chunk-YNMP647F.js";
223
223
  import {
224
224
  VERSION
225
- } from "./chunk-6RYTDRUR.js";
225
+ } from "./chunk-EPZO3MGM.js";
226
226
  import {
227
227
  deleteProject,
228
228
  getProject,
229
229
  getProjectByWorkdir,
230
230
  updateProject
231
- } from "./chunk-DPFET73G.js";
231
+ } from "./chunk-JYYBSODN.js";
232
232
  import {
233
233
  getModelProfile
234
234
  } from "./chunk-TS5WKTFB.js";
@@ -245,15 +245,15 @@ import {
245
245
  import {
246
246
  SessionNotFoundError,
247
247
  WorkspaceInUseError
248
- } from "./chunk-EE6VFEE6.js";
248
+ } from "./chunk-DNL2NUDB.js";
249
249
  import {
250
250
  deleteSetting,
251
251
  getSetting,
252
252
  setSetting
253
- } from "./chunk-EMXMTCSY.js";
253
+ } from "./chunk-SKNPOZYP.js";
254
254
  import {
255
255
  initDatabase
256
- } from "./chunk-JU757HVI.js";
256
+ } from "./chunk-WOVWVB5J.js";
257
257
  import {
258
258
  isReasoningEffortValidForModel,
259
259
  isReasoningEffortValue
@@ -3145,9 +3145,9 @@ var SessionManager = class {
3145
3145
  * @throws Error for invalid payloads or unknown project
3146
3146
  */
3147
3147
  async importSession(projectId, rawPayload) {
3148
- const { parseSessionExport, IMPORTED_SESSION_REMINDER, SESSION_EXPORT_VERSION } = await import("./export-import-CJT33IO6.js");
3149
- const { injectContextDriftReminders, getToolSetFingerprint } = await import("./dynamic-context-KGSZ7TRQ.js");
3150
- const { loadAllAgentsDefault: loadAllAgentsDefault2, resolveDefaultAgentId } = await import("./registry-PVJAAL2Y.js");
3148
+ const { parseSessionExport, IMPORTED_SESSION_REMINDER, SESSION_EXPORT_VERSION } = await import("./export-import-PBEX3KWU.js");
3149
+ const { injectContextDriftReminders, getToolSetFingerprint } = await import("./dynamic-context-5SFXTEAP.js");
3150
+ const { loadAllAgentsDefault: loadAllAgentsDefault2, resolveDefaultAgentId } = await import("./registry-C7RKKHZB.js");
3151
3151
  const payload = parseSessionExport(rawPayload);
3152
3152
  if (payload.version !== SESSION_EXPORT_VERSION) {
3153
3153
  throw new Error(`Unsupported session export version: ${payload.version}`);
@@ -3246,11 +3246,11 @@ var SessionManager = class {
3246
3246
  return listSessions();
3247
3247
  }
3248
3248
  /**
3249
- * Lightweight homepage list: the N most recently updated sessions per
3250
- * project, summaries only (no prompt extraction, no snapshot parsing).
3249
+ * Lightweight homepage list: the 20 most recently updated sessions across
3250
+ * all projects, summaries only (no prompt extraction, no snapshot parsing).
3251
3251
  */
3252
- listHomeSessions(sessionsPerProject = 5) {
3253
- return listHomeSessions(sessionsPerProject);
3252
+ listHomeSessions(limit = 20) {
3253
+ return listHomeSessions(limit);
3254
3254
  }
3255
3255
  /**
3256
3256
  * List sessions for a project with pagination.
@@ -7246,7 +7246,7 @@ function detectWsl() {
7246
7246
  // src/server/index.ts
7247
7247
  var __dirname3 = dirname7(fileURLToPath6(import.meta.url));
7248
7248
  async function announceContextDrift(sessionManager, sessionIds) {
7249
- const { injectContextDriftRemindersForSessions } = await import("./dynamic-context-KGSZ7TRQ.js");
7249
+ const { injectContextDriftRemindersForSessions } = await import("./dynamic-context-5SFXTEAP.js");
7250
7250
  await injectContextDriftRemindersForSessions(sessionManager, sessionIds);
7251
7251
  }
7252
7252
  async function createServerHandle(config3) {
@@ -7339,7 +7339,7 @@ async function createServerHandle(config3) {
7339
7339
  }
7340
7340
  });
7341
7341
  setMcpManagerForTools(mcpManager);
7342
- const { setGlobalMcpServersProvider } = await import("./session-overrides-7OPGV7CQ.js");
7342
+ const { setGlobalMcpServersProvider } = await import("./session-overrides-CKS2AVE5.js");
7343
7343
  setGlobalMcpServersProvider(
7344
7344
  () => mcpManager.getAllServers().map((s) => ({ name: s.name, disabled: s.config.disabled }))
7345
7345
  );
@@ -7348,22 +7348,23 @@ async function createServerHandle(config3) {
7348
7348
  setMcpOAuthStoreMode(config3.mode ?? "production");
7349
7349
  setMcpOAuthStorePath(config3.globalConfigPath ? join9(dirname7(config3.globalConfigPath), "mcp-auth.json") : void 0);
7350
7350
  const mcpServers = config3.mcpServers ?? {};
7351
- Promise.all(
7352
- Object.entries(mcpServers).map(
7353
- ([name, serverConfig]) => mcpManager.addServer(name, serverConfig).catch((err) => {
7354
- logger.warn("Failed to connect MCP server on startup", { name, error: String(err) });
7355
- })
7356
- )
7357
- ).then(async () => {
7351
+ async function connectMcpServers() {
7352
+ await Promise.all(
7353
+ Object.entries(mcpServers).map(
7354
+ ([name, serverConfig]) => mcpManager.addServer(name, serverConfig).catch((err) => {
7355
+ logger.warn("Failed to connect MCP server on startup", { name, error: String(err) });
7356
+ })
7357
+ )
7358
+ );
7358
7359
  const mcpTools = createMcpTools(mcpManager);
7359
7360
  if (mcpTools.length > 0) {
7360
7361
  setMcpTools(mcpTools);
7361
7362
  toolRegistry = createToolRegistry();
7362
7363
  logger.info("MCP tools registered", { count: mcpTools.length });
7363
7364
  }
7364
- const { signalMcpReady } = await import("./server-R3J26IP2.js");
7365
+ const { signalMcpReady } = await import("./server-IGZLCNZG.js");
7365
7366
  signalMcpReady();
7366
- });
7367
+ }
7367
7368
  const app = express();
7368
7369
  app.use(cors());
7369
7370
  const authMiddleware = async (req, res, next) => {
@@ -7463,7 +7464,7 @@ async function createServerHandle(config3) {
7463
7464
  res.json({ tools });
7464
7465
  });
7465
7466
  app.get("/api/projects", async (_req, res) => {
7466
- const { listProjects: listProjects2 } = await import("./projects-5U37RUTL.js");
7467
+ const { listProjects: listProjects2 } = await import("./projects-VDWCFPVE.js");
7467
7468
  const projects = listProjects2();
7468
7469
  res.json({ projects });
7469
7470
  });
@@ -7472,7 +7473,7 @@ async function createServerHandle(config3) {
7472
7473
  if (!name || !workdir) {
7473
7474
  return res.status(400).json({ error: "name and workdir are required" });
7474
7475
  }
7475
- const { createProjectDirectory } = await import("./project-creator-T3A4H3YV.js");
7476
+ const { createProjectDirectory } = await import("./project-creator-K5EGKY2P.js");
7476
7477
  try {
7477
7478
  const project = await createProjectDirectory(name, workdir);
7478
7479
  res.status(201).json({ project });
@@ -7517,7 +7518,7 @@ async function createServerHandle(config3) {
7517
7518
  }
7518
7519
  });
7519
7520
  app.get("/api/projects/:id", async (req, res) => {
7520
- const { getProject: getProject2 } = await import("./projects-5U37RUTL.js");
7521
+ const { getProject: getProject2 } = await import("./projects-VDWCFPVE.js");
7521
7522
  const project = getProject2(req.params.id);
7522
7523
  if (!project) {
7523
7524
  return res.status(404).json({ error: "Project not found" });
@@ -7525,7 +7526,7 @@ async function createServerHandle(config3) {
7525
7526
  res.json({ project });
7526
7527
  });
7527
7528
  app.get("/api/projects/:id/open-folder", async (req, res) => {
7528
- const { getProject: getProject2 } = await import("./projects-5U37RUTL.js");
7529
+ const { getProject: getProject2 } = await import("./projects-VDWCFPVE.js");
7529
7530
  const project = getProject2(req.params.id);
7530
7531
  if (!project) {
7531
7532
  return res.status(404).json({ error: "Project not found" });
@@ -7539,7 +7540,7 @@ async function createServerHandle(config3) {
7539
7540
  }
7540
7541
  });
7541
7542
  app.put("/api/projects/:id", async (req, res) => {
7542
- const { updateProject: updateProject2 } = await import("./projects-5U37RUTL.js");
7543
+ const { updateProject: updateProject2 } = await import("./projects-VDWCFPVE.js");
7543
7544
  const { name, customInstructions, dangerLevel, defaultAgent } = req.body;
7544
7545
  const updates = {};
7545
7546
  if (name !== void 0) updates.name = name;
@@ -7553,7 +7554,7 @@ async function createServerHandle(config3) {
7553
7554
  res.json({ project: updated });
7554
7555
  });
7555
7556
  app.delete("/api/projects/:id", async (req, res) => {
7556
- const { getProject: getProject2, deleteProject: deleteProject2 } = await import("./projects-5U37RUTL.js");
7557
+ const { getProject: getProject2, deleteProject: deleteProject2 } = await import("./projects-VDWCFPVE.js");
7557
7558
  const project = getProject2(req.params.id);
7558
7559
  if (!project) {
7559
7560
  return res.status(404).json({ error: "Project not found" });
@@ -7562,7 +7563,7 @@ async function createServerHandle(config3) {
7562
7563
  res.json({ success: true });
7563
7564
  });
7564
7565
  app.put("/api/projects/:id/star", async (req, res) => {
7565
- const { toggleStar } = await import("./projects-5U37RUTL.js");
7566
+ const { toggleStar } = await import("./projects-VDWCFPVE.js");
7566
7567
  const { isStarred } = req.body;
7567
7568
  if (typeof isStarred !== "boolean") {
7568
7569
  return res.status(400).json({ error: "isStarred is required and must be a boolean" });
@@ -7576,9 +7577,9 @@ async function createServerHandle(config3) {
7576
7577
  const sessionFavoriteRouter = express.Router();
7577
7578
  registerSessionFavoriteRoute(sessionFavoriteRouter, sessionManager);
7578
7579
  app.use("/api", sessionFavoriteRouter);
7579
- const { createTasksService } = await import("./service-7QKWUNU4.js");
7580
- const { registerTaskRoutes } = await import("./tasks-E7EG7344.js");
7581
- const { setTasksService } = await import("./tools-AY6XEVJK.js");
7580
+ const { createTasksService } = await import("./service-AZU4YTS2.js");
7581
+ const { registerTaskRoutes } = await import("./tasks-T5KZXKMD.js");
7582
+ const { setTasksService } = await import("./tools-BL6XCTUV.js");
7582
7583
  const tasksService = createTasksService({
7583
7584
  sessionManager,
7584
7585
  config: config3,
@@ -7587,30 +7588,33 @@ async function createServerHandle(config3) {
7587
7588
  launchWorkflow: (sessionId, launch) => deferTasksLaunchWorkflow(sessionId, launch)
7588
7589
  });
7589
7590
  setTasksService(tasksService);
7591
+ const { createTaskScheduler } = await import("./scheduler-VLTPMGGJ.js");
7592
+ const taskScheduler = createTaskScheduler({ run: () => tasksService.runScheduled() });
7593
+ taskScheduler.start();
7590
7594
  const tasksRouter = express.Router();
7591
7595
  registerTaskRoutes(tasksRouter, tasksService);
7592
7596
  app.use("/api", tasksRouter);
7593
7597
  app.get("/api/projects/:id/branches", async (req, res) => {
7594
- const { getProject: getProject2 } = await import("./projects-5U37RUTL.js");
7598
+ const { getProject: getProject2 } = await import("./projects-VDWCFPVE.js");
7595
7599
  const project = getProject2(req.params.id);
7596
7600
  if (!project) return res.status(404).json({ error: "Project not found" });
7597
- const { listBranches } = await import("./workspace-LM646OHC.js");
7601
+ const { listBranches } = await import("./workspace-ENN27P56.js");
7598
7602
  const branches = await listBranches(project.workdir);
7599
7603
  res.json({ branches });
7600
7604
  });
7601
7605
  app.post("/api/projects/:id/checkout", async (req, res) => {
7602
- const { getProject: getProject2 } = await import("./projects-5U37RUTL.js");
7606
+ const { getProject: getProject2 } = await import("./projects-VDWCFPVE.js");
7603
7607
  const project = getProject2(req.params.id);
7604
7608
  if (!project) return res.status(404).json({ error: "Project not found" });
7605
7609
  const { branch } = req.body;
7606
7610
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
7607
- const { checkoutBranch, isGitRepository } = await import("./workspace-LM646OHC.js");
7611
+ const { checkoutBranch, isGitRepository } = await import("./workspace-ENN27P56.js");
7608
7612
  if (!await isGitRepository(project.workdir)) {
7609
7613
  return res.status(400).json({ error: "Project is not a git repository" });
7610
7614
  }
7611
7615
  try {
7612
7616
  await checkoutBranch(project.workdir, branch);
7613
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7617
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-DAHLRQE2.js");
7614
7618
  const allSessions = sessionManager.listSessions();
7615
7619
  for (const s of allSessions) {
7616
7620
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -7624,12 +7628,12 @@ async function createServerHandle(config3) {
7624
7628
  }
7625
7629
  });
7626
7630
  app.post("/api/projects/:id/checkout-new", async (req, res) => {
7627
- const { getProject: getProject2 } = await import("./projects-5U37RUTL.js");
7631
+ const { getProject: getProject2 } = await import("./projects-VDWCFPVE.js");
7628
7632
  const project = getProject2(req.params.id);
7629
7633
  if (!project) return res.status(404).json({ error: "Project not found" });
7630
7634
  const { name, sourceBranch } = req.body;
7631
7635
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
7632
- const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-LM646OHC.js");
7636
+ const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-ENN27P56.js");
7633
7637
  if (!await isGitRepository(project.workdir)) {
7634
7638
  return res.status(400).json({ error: "Project is not a git repository" });
7635
7639
  }
@@ -7646,7 +7650,7 @@ async function createServerHandle(config3) {
7646
7650
  );
7647
7651
  }
7648
7652
  await createBranch(project.workdir, name, sb);
7649
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7653
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-DAHLRQE2.js");
7650
7654
  const allSessions = sessionManager.listSessions();
7651
7655
  for (const s of allSessions) {
7652
7656
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -7663,7 +7667,7 @@ async function createServerHandle(config3) {
7663
7667
  const session = sessionManager.getSession(req.params.id);
7664
7668
  if (!session) return res.status(404).json({ error: "Session not found" });
7665
7669
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
7666
- const { listBranches, getDefaultBranch } = await import("./workspace-LM646OHC.js");
7670
+ const { listBranches, getDefaultBranch } = await import("./workspace-ENN27P56.js");
7667
7671
  const [branches, defaultBranch] = await Promise.all([
7668
7672
  listBranches(effectiveWorkdir),
7669
7673
  getDefaultBranch(session.workdir)
@@ -7677,8 +7681,8 @@ async function createServerHandle(config3) {
7677
7681
  const { branch } = req.body;
7678
7682
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
7679
7683
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
7680
- const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-LM646OHC.js");
7681
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7684
+ const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-ENN27P56.js");
7685
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-DAHLRQE2.js");
7682
7686
  try {
7683
7687
  await validateRef2(effectiveWorkdir, branch);
7684
7688
  await checkoutBranch(effectiveWorkdir, branch);
@@ -7720,16 +7724,16 @@ All file and git operations should use this branch.
7720
7724
  const { name, sourceBranch } = req.body;
7721
7725
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
7722
7726
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
7723
- const { validateRef: validateRef2 } = await import("./workspace-LM646OHC.js");
7724
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7727
+ const { validateRef: validateRef2 } = await import("./workspace-ENN27P56.js");
7728
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-DAHLRQE2.js");
7725
7729
  try {
7726
7730
  await validateRef2(effectiveWorkdir, name);
7727
7731
  if (sourceBranch) {
7728
- const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-LM646OHC.js");
7732
+ const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-ENN27P56.js");
7729
7733
  const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
7730
7734
  await createBranch(effectiveWorkdir, name, sb);
7731
7735
  } else {
7732
- const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-LM646OHC.js");
7736
+ const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-ENN27P56.js");
7733
7737
  const defaultBranch = await getDefaultBranch(session.workdir);
7734
7738
  const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
7735
7739
  await createBranch(effectiveWorkdir, name, sb);
@@ -7767,17 +7771,17 @@ All file and git operations should use this branch.
7767
7771
  }
7768
7772
  });
7769
7773
  app.get("/api/projects/:id/workspaces", async (req, res) => {
7770
- const { getProject: getProject2 } = await import("./projects-5U37RUTL.js");
7774
+ const { getProject: getProject2 } = await import("./projects-VDWCFPVE.js");
7771
7775
  const project = getProject2(req.params.id);
7772
7776
  if (!project) return res.status(404).json({ error: "Project not found" });
7773
- const { listWorkspaces } = await import("./workspace-LM646OHC.js");
7777
+ const { listWorkspaces } = await import("./workspace-ENN27P56.js");
7774
7778
  const all = await listWorkspaces(project.name, project.workdir);
7775
7779
  const workspacesList = all.filter((ws) => ws.path !== project.workdir);
7776
7780
  res.json({ workspaces: workspacesList });
7777
7781
  });
7778
7782
  app.get("/api/sessions", async (req, res) => {
7779
- const { getRecentUserPromptsForSession } = await import("./events-ZLP5V2YU.js");
7780
- const { getPendingConfirmationsBySession: getPendingConfirmationsBySession2 } = await import("./path-security-V3XALT5E.js");
7783
+ const { getRecentUserPromptsForSession } = await import("./events-UAUOGRSV.js");
7784
+ const { getPendingConfirmationsBySession: getPendingConfirmationsBySession2 } = await import("./path-security-WOA6MTWQ.js");
7781
7785
  const projectId = req.query["projectId"];
7782
7786
  const rawLimit = req.query["limit"];
7783
7787
  const offset = parseInt(req.query["offset"]) || 0;
@@ -7849,7 +7853,7 @@ All file and git operations should use this branch.
7849
7853
  }
7850
7854
  const { providerId, model } = parseDefaultModelSelection(config3.defaultModelSelection);
7851
7855
  const session = sessionManager.createSession(projectId, title, providerId ?? null, model ?? null);
7852
- wssExports.broadcastForProject(projectId, session.id, buildSessionCreatedMessage(session));
7856
+ wssExports.broadcastAll(buildSessionCreatedMessage(session));
7853
7857
  res.status(201).json({ session: toClientSession(session) });
7854
7858
  });
7855
7859
  app.post("/api/sessions/:id/switch-workspace", async (req, res) => {
@@ -7859,7 +7863,7 @@ All file and git operations should use this branch.
7859
7863
  if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
7860
7864
  const project = sessionManager.getProject(session.projectId);
7861
7865
  if (!project) return res.status(404).json({ error: "Project not found" });
7862
- const { isGitRepository } = await import("./workspace-LM646OHC.js");
7866
+ const { isGitRepository } = await import("./workspace-ENN27P56.js");
7863
7867
  if (!await isGitRepository(project.workdir)) {
7864
7868
  return res.status(400).json({ error: "Project is not a git repository" });
7865
7869
  }
@@ -7877,7 +7881,7 @@ All file and git operations should use this branch.
7877
7881
  if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
7878
7882
  const project = sessionManager.getProject(session.projectId);
7879
7883
  if (!project) return res.status(404).json({ error: "Project not found" });
7880
- const { isGitRepository } = await import("./workspace-LM646OHC.js");
7884
+ const { isGitRepository } = await import("./workspace-ENN27P56.js");
7881
7885
  if (!await isGitRepository(project.workdir)) {
7882
7886
  return res.status(400).json({ error: "Project is not a git repository" });
7883
7887
  }
@@ -7895,10 +7899,10 @@ All file and git operations should use this branch.
7895
7899
  }
7896
7900
  });
7897
7901
  app.get("/api/sessions/:id", async (req, res) => {
7898
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-ZLP5V2YU.js");
7899
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations } = await import("./folding-BXMVJIFF.js");
7900
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-AY6XEVJK.js");
7901
- const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
7902
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-UAUOGRSV.js");
7903
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations } = await import("./folding-IHD244OU.js");
7904
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-BL6XCTUV.js");
7905
+ const { getMaxVisibleItems } = await import("./settings-TR4BF2C4.js");
7902
7906
  const session = sessionManager.getSession(req.params.id);
7903
7907
  if (!session) {
7904
7908
  return res.status(404).json({ error: "Session not found" });
@@ -7926,9 +7930,9 @@ All file and git operations should use this branch.
7926
7930
  });
7927
7931
  app.get("/api/sessions/:id/status", async (req, res) => {
7928
7932
  const { projectSessionStatus: projectSessionStatus2 } = await import("./session-status-UFO5IFI7.js");
7929
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-AY6XEVJK.js");
7930
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-ZLP5V2YU.js");
7931
- const { foldPendingConfirmations } = await import("./folding-BXMVJIFF.js");
7933
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-BL6XCTUV.js");
7934
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-UAUOGRSV.js");
7935
+ const { foldPendingConfirmations } = await import("./folding-IHD244OU.js");
7932
7936
  const sessionId = req.params["id"];
7933
7937
  if (!sessionId) {
7934
7938
  return res.status(400).json({ error: "Session id is required" });
@@ -7958,8 +7962,8 @@ All file and git operations should use this branch.
7958
7962
  if (!session) {
7959
7963
  return res.status(404).json({ error: "Session not found" });
7960
7964
  }
7961
- const { stopSessionExecution } = await import("./chat-handler-JWRCPG72.js");
7962
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
7965
+ const { stopSessionExecution } = await import("./chat-handler-OFB4426F.js");
7966
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-BL6XCTUV.js");
7963
7967
  sessionManager.clearMessageQueue(sessionId);
7964
7968
  stopSessionExecution(sessionId, sessionManager);
7965
7969
  abortSession(sessionId);
@@ -7988,9 +7992,9 @@ All file and git operations should use this branch.
7988
7992
  res.json({ success: true });
7989
7993
  });
7990
7994
  app.post("/api/sessions/:id/provider", async (req, res) => {
7991
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-ZLP5V2YU.js");
7992
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
7993
- const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
7995
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-UAUOGRSV.js");
7996
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-IHD244OU.js");
7997
+ const { getMaxVisibleItems } = await import("./settings-TR4BF2C4.js");
7994
7998
  const sessionId = req.params.id;
7995
7999
  const session = sessionManager.getSession(sessionId);
7996
8000
  if (!session) {
@@ -8019,9 +8023,9 @@ All file and git operations should use this branch.
8019
8023
  res.json({ session: toClientSession(updatedSession), messages, hiddenCount, contextState });
8020
8024
  });
8021
8025
  app.delete("/api/sessions/:id/provider", async (req, res) => {
8022
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-ZLP5V2YU.js");
8023
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
8024
- const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
8026
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-UAUOGRSV.js");
8027
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-IHD244OU.js");
8028
+ const { getMaxVisibleItems } = await import("./settings-TR4BF2C4.js");
8025
8029
  const sessionId = req.params.id;
8026
8030
  const session = sessionManager.getSession(sessionId);
8027
8031
  if (!session) {
@@ -8153,9 +8157,9 @@ All file and git operations should use this branch.
8153
8157
  res.json({ success: true });
8154
8158
  });
8155
8159
  app.put("/api/sessions/:id/mode", async (req, res) => {
8156
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-ZLP5V2YU.js");
8157
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
8158
- const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
8160
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-UAUOGRSV.js");
8161
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-IHD244OU.js");
8162
+ const { getMaxVisibleItems } = await import("./settings-TR4BF2C4.js");
8159
8163
  const sessionId = req.params.id;
8160
8164
  const session = sessionManager.getSession(sessionId);
8161
8165
  if (!session) {
@@ -8191,7 +8195,7 @@ All file and git operations should use this branch.
8191
8195
  }
8192
8196
  sessionManager.setDangerLevel(sessionId, dangerLevel);
8193
8197
  if (dangerLevel === "dangerous") {
8194
- const { autoApprovePendingConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
8198
+ const { autoApprovePendingConfirmationsForSession } = await import("./tools-BL6XCTUV.js");
8195
8199
  const approvedCallIds = autoApprovePendingConfirmationsForSession(sessionId);
8196
8200
  for (const callId of approvedCallIds) {
8197
8201
  wssExports.broadcastForSession(sessionId, {
@@ -8226,7 +8230,7 @@ All file and git operations should use this branch.
8226
8230
  setSessionDisabledServers(sessionId, disabledServers);
8227
8231
  const messages = session.messages ?? [];
8228
8232
  if (messages.length === 0) {
8229
- const { applyDynamicContext } = await import("./dynamic-context-KGSZ7TRQ.js");
8233
+ const { applyDynamicContext } = await import("./dynamic-context-5SFXTEAP.js");
8230
8234
  const modelName = session.providerModel ?? providerManager.getCurrentModel();
8231
8235
  await applyDynamicContext(sessionManager, sessionId, modelName);
8232
8236
  } else {
@@ -8260,7 +8264,7 @@ All file and git operations should use this branch.
8260
8264
  if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
8261
8265
  return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
8262
8266
  }
8263
- const { providePathConfirmation: providePathConfirmation2, getConfirmationSessionId } = await import("./tools-AY6XEVJK.js");
8267
+ const { providePathConfirmation: providePathConfirmation2, getConfirmationSessionId } = await import("./tools-BL6XCTUV.js");
8264
8268
  const pendingSessionId = getConfirmationSessionId(callId);
8265
8269
  if (!pendingSessionId) {
8266
8270
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -8272,11 +8276,11 @@ All file and git operations should use this branch.
8272
8276
  if (!result.found) {
8273
8277
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
8274
8278
  }
8275
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-ZLP5V2YU.js");
8276
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations } = await import("./folding-BXMVJIFF.js");
8279
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-UAUOGRSV.js");
8280
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations } = await import("./folding-IHD244OU.js");
8277
8281
  const { createSessionStateMessage } = await import("./protocol-MRMOB3P4.js");
8278
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-AY6XEVJK.js");
8279
- const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
8282
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-BL6XCTUV.js");
8283
+ const { getMaxVisibleItems } = await import("./settings-TR4BF2C4.js");
8280
8284
  const eventStore = getEventStore2();
8281
8285
  const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
8282
8286
  const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
@@ -8313,7 +8317,7 @@ All file and git operations should use this branch.
8313
8317
  if (!skip && typeof answer !== "string") {
8314
8318
  return res.status(400).json({ error: "answer is required when not skipping" });
8315
8319
  }
8316
- const { provideAnswer: provideAnswer2 } = await import("./tools-AY6XEVJK.js");
8320
+ const { provideAnswer: provideAnswer2 } = await import("./tools-BL6XCTUV.js");
8317
8321
  const found = provideAnswer2(callId, answer ?? "", skip ?? false);
8318
8322
  if (!found) {
8319
8323
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -8346,7 +8350,7 @@ All file and git operations should use this branch.
8346
8350
  if (!session) {
8347
8351
  return res.status(404).json({ error: "Session not found" });
8348
8352
  }
8349
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-HCSHADP5.js");
8353
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-TR4BF2C4.js");
8350
8354
  if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
8351
8355
  return res.json({ success: false, reason: "disabled" });
8352
8356
  }
@@ -8379,7 +8383,7 @@ All file and git operations should use this branch.
8379
8383
  backend: activeProvider?.backend ?? llmClient.getBackend(),
8380
8384
  model: llmClient.getModel()
8381
8385
  };
8382
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-VSVDUGBT.js");
8386
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-53SS74LD.js");
8383
8387
  runAgentTurn(
8384
8388
  {
8385
8389
  sessionManager,
@@ -8417,15 +8421,15 @@ All file and git operations should use this branch.
8417
8421
  if (!session) {
8418
8422
  return res.status(404).json({ error: "Session not found" });
8419
8423
  }
8420
- const { stopSessionExecution } = await import("./chat-handler-JWRCPG72.js");
8421
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
8424
+ const { stopSessionExecution } = await import("./chat-handler-OFB4426F.js");
8425
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-BL6XCTUV.js");
8422
8426
  const queuedMessages = sessionManager.getQueueState(sessionId);
8423
8427
  sessionManager.clearMessageQueue(sessionId);
8424
8428
  stopSessionExecution(sessionId, sessionManager);
8425
8429
  abortSession(sessionId);
8426
8430
  cancelQuestionsForSession(sessionId, "Session stopped by user");
8427
8431
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
8428
- const eventStore = (await import("./events-ZLP5V2YU.js")).getEventStore();
8432
+ const eventStore = (await import("./events-UAUOGRSV.js")).getEventStore();
8429
8433
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
8430
8434
  res.json({ success: true, queuedMessages });
8431
8435
  });
@@ -8466,7 +8470,7 @@ All file and git operations should use this branch.
8466
8470
  if (typeof messageIndex !== "number" || messageIndex < 0) {
8467
8471
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
8468
8472
  }
8469
- const { truncateSessionMessages } = await import("./events-ZLP5V2YU.js");
8473
+ const { truncateSessionMessages } = await import("./events-UAUOGRSV.js");
8470
8474
  truncateSessionMessages(sessionId, messageIndex);
8471
8475
  res.json({ success: true });
8472
8476
  });
@@ -8486,8 +8490,8 @@ All file and git operations should use this branch.
8486
8490
  if (attachments !== void 0 && !Array.isArray(attachments)) {
8487
8491
  return res.status(400).json({ error: "attachments must be an array if provided" });
8488
8492
  }
8489
- const { getEventStore: getEventStore2 } = await import("./events-ZLP5V2YU.js");
8490
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
8493
+ const { getEventStore: getEventStore2 } = await import("./events-UAUOGRSV.js");
8494
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-IHD244OU.js");
8491
8495
  const eventStore = getEventStore2();
8492
8496
  const events = eventStore.getEvents(sessionId);
8493
8497
  const { messages } = buildMessagesFromStoredEvents2(events);
@@ -8499,7 +8503,7 @@ All file and git operations should use this branch.
8499
8503
  if (msg.role !== "user" || msg.isSystemGenerated) {
8500
8504
  return res.status(400).json({ error: "Can only replay user messages" });
8501
8505
  }
8502
- const { truncateSessionMessages } = await import("./events-ZLP5V2YU.js");
8506
+ const { truncateSessionMessages } = await import("./events-UAUOGRSV.js");
8503
8507
  truncateSessionMessages(sessionId, msgIndex - 1);
8504
8508
  sessionManager.queueMessage(
8505
8509
  sessionId,
@@ -8541,7 +8545,7 @@ All file and git operations should use this branch.
8541
8545
  return res.status(404).json({ error: "Session not found" });
8542
8546
  }
8543
8547
  try {
8544
- const { buildSessionExport } = await import("./export-import-CJT33IO6.js");
8548
+ const { buildSessionExport } = await import("./export-import-PBEX3KWU.js");
8545
8549
  const payload = buildSessionExport(sessionManager, sessionId);
8546
8550
  const filename = `${(payload.session.title ?? "session").replace(/[^a-zA-Z0-9-_]/g, "_")}.openfox-session.json`;
8547
8551
  res.setHeader("Content-Disposition", `attachment; filename="${filename}"`);
@@ -8598,7 +8602,7 @@ All file and git operations should use this branch.
8598
8602
  res.json({ accepted: true });
8599
8603
  });
8600
8604
  app.get("/api/settings", async (req, res) => {
8601
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-HCSHADP5.js");
8605
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-TR4BF2C4.js");
8602
8606
  const keysParam = req.query["keys"];
8603
8607
  if (!keysParam) {
8604
8608
  return res.status(400).json({ error: "keys query parameter is required" });
@@ -8611,19 +8615,19 @@ All file and git operations should use this branch.
8611
8615
  res.json(result);
8612
8616
  });
8613
8617
  app.get("/api/settings/:key", async (req, res) => {
8614
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-HCSHADP5.js");
8618
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-TR4BF2C4.js");
8615
8619
  const key = req.params.key;
8616
8620
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
8617
8621
  res.json({ key, value });
8618
8622
  });
8619
8623
  app.get("/api/settings/:key", async (req, res) => {
8620
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-HCSHADP5.js");
8624
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-TR4BF2C4.js");
8621
8625
  const key = req.params.key;
8622
8626
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
8623
8627
  res.json({ key, value });
8624
8628
  });
8625
8629
  app.put("/api/settings/:key", async (req, res) => {
8626
- const { setSetting: setSetting2 } = await import("./settings-HCSHADP5.js");
8630
+ const { setSetting: setSetting2 } = await import("./settings-TR4BF2C4.js");
8627
8631
  const key = req.params.key;
8628
8632
  const { value } = req.body;
8629
8633
  if (value === void 0) {
@@ -8650,7 +8654,7 @@ All file and git operations should use this branch.
8650
8654
  }
8651
8655
  });
8652
8656
  app.get("/api/tools/shells", async (_req, res) => {
8653
- const { listAvailableShells } = await import("./platform-DBPLSLE4.js");
8657
+ const { listAvailableShells } = await import("./platform-EAZNZDAE.js");
8654
8658
  res.json({ shells: listAvailableShells() });
8655
8659
  });
8656
8660
  app.get("/api/config", async (_req, res) => {
@@ -8688,7 +8692,7 @@ All file and git operations should use this branch.
8688
8692
  defaultModelSelection: config3.defaultModelSelection,
8689
8693
  visionFallback,
8690
8694
  platform: platformInfo,
8691
- locale: (await import("./settings-HCSHADP5.js")).getSetting("display.locale") ?? "automatic"
8695
+ locale: (await import("./settings-TR4BF2C4.js")).getSetting("display.locale") ?? "automatic"
8692
8696
  });
8693
8697
  });
8694
8698
  app.post("/api/model/refresh", async (_req, res) => {
@@ -8744,7 +8748,7 @@ All file and git operations should use this branch.
8744
8748
  }));
8745
8749
  }
8746
8750
  app.post("/api/proxy/test", async (_req, res) => {
8747
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-HCSHADP5.js");
8751
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-TR4BF2C4.js");
8748
8752
  const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
8749
8753
  if (!proxyUrl) {
8750
8754
  return res.status(400).json({ success: false, error: "No proxy URL configured" });
@@ -8836,7 +8840,7 @@ All file and git operations should use this branch.
8836
8840
  }
8837
8841
  });
8838
8842
  app.post("/api/proxy/test", async (_req, res) => {
8839
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-HCSHADP5.js");
8843
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-TR4BF2C4.js");
8840
8844
  const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
8841
8845
  if (!proxyUrl) {
8842
8846
  return res.status(400).json({ success: false, error: "No proxy URL configured" });
@@ -8863,7 +8867,7 @@ All file and git operations should use this branch.
8863
8867
  const backend = req.query["backend"];
8864
8868
  if (!url) return res.status(400).json({ error: "url is required" });
8865
8869
  try {
8866
- const { fetchModelsWithContext } = await import("./provider-manager-TV5I5YJH.js");
8870
+ const { fetchModelsWithContext } = await import("./provider-manager-RHJYUU5W.js");
8867
8871
  const { getModelProfile: getModelProfile2 } = await import("./profiles-EBCVFYG7.js");
8868
8872
  const { getCatalogEntry } = await import("./model-catalog-Y5MA5OZP.js");
8869
8873
  const models = await fetchModelsWithContext(
@@ -8938,7 +8942,7 @@ All file and git operations should use this branch.
8938
8942
  const { getModelProfile: getModelProfile2 } = await import("./profiles-EBCVFYG7.js");
8939
8943
  const { getBackendCapabilities } = await import("./backend-EPISSWLB.js");
8940
8944
  const { buildNonStreamingCreateParams } = await import("./client-pure-YZ4IGCU4.js");
8941
- const { OpenAIHttpClient } = await import("./http-client-JVJ43TBY.js");
8945
+ const { OpenAIHttpClient } = await import("./http-client-RA7XFYPO.js");
8942
8946
  const { ensureVersionPrefix } = await import("./url-utils-C5BM7NF7.js");
8943
8947
  const profile = getModelProfile2(model);
8944
8948
  const capabilities = getBackendCapabilities(backend || "unknown");
@@ -9215,7 +9219,7 @@ All file and git operations should use this branch.
9215
9219
  if (clearedSessions > 0) {
9216
9220
  logger.info("Cleared provider from sessions of deleted provider", { providerId: id, sessions: clearedSessions });
9217
9221
  }
9218
- const { pruneFavoriteModels } = await import("./settings-HCSHADP5.js");
9222
+ const { pruneFavoriteModels } = await import("./settings-TR4BF2C4.js");
9219
9223
  pruneFavoriteModels(updatedConfig.providers);
9220
9224
  res.json({ success: true });
9221
9225
  });
@@ -9278,7 +9282,7 @@ All file and git operations should use this branch.
9278
9282
  await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
9279
9283
  providerManager.setProviders(updatedConfig.providers, updatedConfig.defaultModelSelection ?? void 0);
9280
9284
  config3.defaultModelSelection = updatedConfig.defaultModelSelection;
9281
- const { pruneFavoriteModels } = await import("./settings-HCSHADP5.js");
9285
+ const { pruneFavoriteModels } = await import("./settings-TR4BF2C4.js");
9282
9286
  pruneFavoriteModels(updatedConfig.providers);
9283
9287
  res.json({ success: true, provider: updatedConfig.providers.find((p) => p.id === id) });
9284
9288
  } catch (error) {
@@ -9364,7 +9368,7 @@ All file and git operations should use this branch.
9364
9368
  });
9365
9369
  async function rebuildMcpTools() {
9366
9370
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-ZY4FC4C4.js");
9367
- const { setMcpTools: setMcpTools2 } = await import("./tools-AY6XEVJK.js");
9371
+ const { setMcpTools: setMcpTools2 } = await import("./tools-BL6XCTUV.js");
9368
9372
  const mcpTools = createMcpTools2(mcpManager);
9369
9373
  setMcpTools2(mcpTools);
9370
9374
  toolRegistry = createToolRegistry();
@@ -9767,7 +9771,7 @@ All file and git operations should use this branch.
9767
9771
  res.status(400).json({ error: error instanceof Error ? error.message : String(error) });
9768
9772
  }
9769
9773
  });
9770
- const { listProjects } = await import("./projects-5U37RUTL.js");
9774
+ const { listProjects } = await import("./projects-VDWCFPVE.js");
9771
9775
  const allProjects = listProjects();
9772
9776
  const projectDir = allProjects.find(
9773
9777
  (p) => p.workdir === config3.workdir || config3.workdir && p.workdir.startsWith(config3.workdir + "/")
@@ -9794,13 +9798,13 @@ All file and git operations should use this branch.
9794
9798
  })
9795
9799
  );
9796
9800
  app.get("/api/sessions/:id/background-processes", async (req, res) => {
9797
- const { getSessionProcesses } = await import("./manager-JZNNVDYR.js");
9801
+ const { getSessionProcesses } = await import("./manager-4SMHCFXY.js");
9798
9802
  const sessionId = req.params.id;
9799
9803
  const processes = getSessionProcesses(sessionId);
9800
9804
  res.json({ processes });
9801
9805
  });
9802
9806
  app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
9803
- const { stopProcess } = await import("./manager-JZNNVDYR.js");
9807
+ const { stopProcess } = await import("./manager-4SMHCFXY.js");
9804
9808
  const sessionId = req.params.id;
9805
9809
  const processId = req.params.processId;
9806
9810
  const session = sessionManager.getSession(sessionId);
@@ -9939,8 +9943,8 @@ All file and git operations should use this branch.
9939
9943
  () => mcpManager.getAllServers()
9940
9944
  );
9941
9945
  const wss = wssExports.wss;
9942
- deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
9943
- const { launchWorkflowRun, abortRunnerRun } = await import("./launch-7NKOCT5A.js");
9946
+ deferTasksBroadcast = (_projectId, payload) => wssExports.broadcastAll({ type: "tasks.update", payload });
9947
+ const { launchWorkflowRun, abortRunnerRun } = await import("./launch-L5NL75KK.js");
9944
9948
  deferTasksLaunchWorkflow = (sessionId, launch) => {
9945
9949
  const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
9946
9950
  let llmClient = getLLMClient();
@@ -9985,7 +9989,7 @@ All file and git operations should use this branch.
9985
9989
  const state = sessionManager.getContextState(sessionId);
9986
9990
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
9987
9991
  });
9988
- const { QueueProcessor } = await import("./processor-ACZM62WO.js");
9992
+ const { QueueProcessor } = await import("./processor-T4VWZMXT.js");
9989
9993
  const queueProcessor = new QueueProcessor({
9990
9994
  sessionManager,
9991
9995
  providerManager,
@@ -10010,7 +10014,7 @@ All file and git operations should use this branch.
10010
10014
  sessionManager,
10011
10015
  listProjects: () => listProjects(),
10012
10016
  createProject: async (name, workdir) => {
10013
- const { createProjectDirectory } = await import("./project-creator-T3A4H3YV.js");
10017
+ const { createProjectDirectory } = await import("./project-creator-K5EGKY2P.js");
10014
10018
  return createProjectDirectory(name, workdir);
10015
10019
  },
10016
10020
  deleteProject: (projectId) => {
@@ -10027,8 +10031,8 @@ All file and git operations should use this branch.
10027
10031
  launchWorkflow: (sessionId, launch) => deferTasksLaunchWorkflow(sessionId, launch),
10028
10032
  stopSession: (sessionId) => {
10029
10033
  void (async () => {
10030
- const { stopSessionExecution } = await import("./chat-handler-JWRCPG72.js");
10031
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
10034
+ const { stopSessionExecution } = await import("./chat-handler-OFB4426F.js");
10035
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-BL6XCTUV.js");
10032
10036
  sessionManager.clearMessageQueue(sessionId);
10033
10037
  stopSessionExecution(sessionId, sessionManager);
10034
10038
  abortSession(sessionId);
@@ -10091,6 +10095,11 @@ All file and git operations should use this branch.
10091
10095
  const actualPort = typeof addr === "object" && addr ? addr.port : listenPort;
10092
10096
  setMcpOAuthServerPort(actualPort);
10093
10097
  mcpActualPort = actualPort;
10098
+ connectMcpServers().catch((err) => {
10099
+ logger.error("MCP server startup connection failed", {
10100
+ error: err instanceof Error ? err.message : String(err)
10101
+ });
10102
+ });
10094
10103
  const client = getLLMClient();
10095
10104
  logger.info(`OpenFox server running at http://${host}:${actualPort}`);
10096
10105
  logger.info(`WebSocket available at ws://${host}:${actualPort}/ws`);
@@ -10107,7 +10116,8 @@ All file and git operations should use this branch.
10107
10116
  void (async () => {
10108
10117
  await devServerManager.stopAll();
10109
10118
  await mcpManager.disconnectAll();
10110
- const { stopAllInspectProxies } = await import("./inspect-proxy-A3OROWPG.js");
10119
+ taskScheduler.stop();
10120
+ const { stopAllInspectProxies } = await import("./inspect-proxy-24Q2CNCZ.js");
10111
10121
  stopAllInspectProxies();
10112
10122
  const { cleanupAllProcesses } = await import("./store-JYPZ2RXB.js");
10113
10123
  cleanupAllProcesses();
@@ -10149,4 +10159,4 @@ export {
10149
10159
  createServerHandle,
10150
10160
  createServer
10151
10161
  };
10152
- //# sourceMappingURL=chunk-QIGVYXMH.js.map
10162
+ //# sourceMappingURL=chunk-VK2BSIJP.js.map