openfox 2.0.140 → 2.0.141

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 (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/CHANGELOG.md +14 -0
  3. package/dist/{chat-handler-JWRCPG72.js → chat-handler-F7QRNO2E.js} +10 -10
  4. package/dist/{chunk-JTR3PC5I.js → chunk-2OTUYNXD.js} +2 -2
  5. package/dist/{chunk-GZJRXVVJ.js → chunk-BB67GW5P.js} +6 -6
  6. package/dist/{chunk-K227HOLU.js → chunk-CEEBKCGX.js} +3 -3
  7. package/dist/{chunk-7OHSAZLF.js → chunk-DBF5GKZF.js} +14 -16
  8. package/dist/{chunk-FIEFBRTQ.js → chunk-FBOIDBPA.js} +2 -2
  9. package/dist/{chunk-5F7LNEEP.js → chunk-G7BQWMV7.js} +2 -2
  10. package/dist/{chunk-MAUQ6AW4.js → chunk-IZVIN7XC.js} +3 -3
  11. package/dist/chunk-LDWWVUW7.js +7 -0
  12. package/dist/{chunk-5MGCTRKM.js → chunk-NDAXMOD2.js} +10 -10
  13. package/dist/{chunk-IFARTQOK.js → chunk-PS5CHS7S.js} +10 -10
  14. package/dist/{chunk-5EKBZXCU.js → chunk-RCEGPT57.js} +4 -4
  15. package/dist/{chunk-WD354R3H.js → chunk-RHUZLWZV.js} +3 -3
  16. package/dist/{chunk-QIGVYXMH.js → chunk-SKHU4M6L.js} +69 -63
  17. package/dist/{chunk-66XJC5TA.js → chunk-UJO67GFD.js} +4 -4
  18. package/dist/{chunk-RG326HS4.js → chunk-YFTCFJJM.js} +44 -12
  19. package/dist/cli/dev.js +1 -1
  20. package/dist/cli/index.js +1 -1
  21. package/dist/{compactor-UREBHSZQ.js → compactor-QDTK3SZI.js} +4 -4
  22. package/dist/{describe-image-TQOD52IC.js → describe-image-UFOHQIPB.js} +5 -5
  23. package/dist/{dynamic-context-KGSZ7TRQ.js → dynamic-context-UEC6MMEV.js} +4 -4
  24. package/dist/{events-ZLP5V2YU.js → events-73MLUDTX.js} +3 -3
  25. package/dist/{export-import-CJT33IO6.js → export-import-7I7EJKTE.js} +4 -4
  26. package/dist/{launch-7NKOCT5A.js → launch-77CO4C7W.js} +10 -10
  27. package/dist/{orchestrator-VSVDUGBT.js → orchestrator-IRUEM4R4.js} +9 -9
  28. package/dist/package.json +1 -1
  29. package/dist/{path-security-V3XALT5E.js → path-security-MQXMTFRU.js} +4 -4
  30. package/dist/{processor-ACZM62WO.js → processor-VMUKAMG6.js} +9 -9
  31. package/dist/{serve-36D5HXWE.js → serve-HTJREJEC.js} +15 -15
  32. package/dist/server/index.d.ts +3 -3
  33. package/dist/server/index.js +14 -14
  34. package/dist/{server-R3J26IP2.js → server-5FECIKQK.js} +13 -13
  35. package/dist/{session-overrides-7OPGV7CQ.js → session-overrides-WYOY7PVC.js} +3 -3
  36. package/dist/{sessions-VHS47DHO.js → sessions-U6D2T5QP.js} +2 -2
  37. package/dist/{tools-AY6XEVJK.js → tools-F4COIAZR.js} +7 -7
  38. package/dist/{update-JHFZMW3T.js → update-5TGZTHLD.js} +2 -2
  39. package/dist/web/assets/{index-BtkaULxJ.css → index-2WvLd7SC.css} +1 -1
  40. package/dist/web/assets/{index-Bm0_ekvt.js → index-A0-uewf7.js} +67 -67
  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-6RYTDRUR.js +0 -7
@@ -9,7 +9,7 @@ import {
9
9
  terminalManager,
10
10
  tokenFromPassword,
11
11
  verifyPassword
12
- } from "./chunk-IFARTQOK.js";
12
+ } from "./chunk-PS5CHS7S.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-UJO67GFD.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-NDAXMOD2.js";
46
46
  import {
47
47
  deleteOwnedSkill,
48
48
  deleteProjectSkill,
@@ -113,7 +113,7 @@ import {
113
113
  getSessionDisabledServers,
114
114
  initSessionMcpOverrides,
115
115
  setSessionDisabledServers
116
- } from "./chunk-FIEFBRTQ.js";
116
+ } from "./chunk-FBOIDBPA.js";
117
117
  import {
118
118
  serverT
119
119
  } from "./chunk-JLHYB445.js";
@@ -133,7 +133,7 @@ import {
133
133
  import {
134
134
  getPendingConfirmationsBySession,
135
135
  providePathConfirmation
136
- } from "./chunk-RG326HS4.js";
136
+ } from "./chunk-YFTCFJJM.js";
137
137
  import {
138
138
  combineEventsWithSnapshot,
139
139
  emitAssistantMessageStart,
@@ -151,7 +151,7 @@ import {
151
151
  getEventStore,
152
152
  getSessionState,
153
153
  initEventStore
154
- } from "./chunk-JTR3PC5I.js";
154
+ } from "./chunk-2OTUYNXD.js";
155
155
  import {
156
156
  buildMessagesFromStoredEvents
157
157
  } from "./chunk-AE2IBEUH.js";
@@ -181,7 +181,7 @@ import {
181
181
  updateSessionRunning,
182
182
  updateSessionWorkdir,
183
183
  updateWorkflowExecutionStatus
184
- } from "./chunk-7OHSAZLF.js";
184
+ } from "./chunk-DBF5GKZF.js";
185
185
  import {
186
186
  agentExists,
187
187
  deleteAgent,
@@ -222,7 +222,7 @@ import {
222
222
  } from "./chunk-YNMP647F.js";
223
223
  import {
224
224
  VERSION
225
- } from "./chunk-6RYTDRUR.js";
225
+ } from "./chunk-LDWWVUW7.js";
226
226
  import {
227
227
  deleteProject,
228
228
  getProject,
@@ -3145,8 +3145,8 @@ 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");
3148
+ const { parseSessionExport, IMPORTED_SESSION_REMINDER, SESSION_EXPORT_VERSION } = await import("./export-import-7I7EJKTE.js");
3149
+ const { injectContextDriftReminders, getToolSetFingerprint } = await import("./dynamic-context-UEC6MMEV.js");
3150
3150
  const { loadAllAgentsDefault: loadAllAgentsDefault2, resolveDefaultAgentId } = await import("./registry-PVJAAL2Y.js");
3151
3151
  const payload = parseSessionExport(rawPayload);
3152
3152
  if (payload.version !== SESSION_EXPORT_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-UEC6MMEV.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-WYOY7PVC.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-5FECIKQK.js");
7365
7366
  signalMcpReady();
7366
- });
7367
+ }
7367
7368
  const app = express();
7368
7369
  app.use(cors());
7369
7370
  const authMiddleware = async (req, res, next) => {
@@ -7578,7 +7579,7 @@ async function createServerHandle(config3) {
7578
7579
  app.use("/api", sessionFavoriteRouter);
7579
7580
  const { createTasksService } = await import("./service-7QKWUNU4.js");
7580
7581
  const { registerTaskRoutes } = await import("./tasks-E7EG7344.js");
7581
- const { setTasksService } = await import("./tools-AY6XEVJK.js");
7582
+ const { setTasksService } = await import("./tools-F4COIAZR.js");
7582
7583
  const tasksService = createTasksService({
7583
7584
  sessionManager,
7584
7585
  config: config3,
@@ -7610,7 +7611,7 @@ async function createServerHandle(config3) {
7610
7611
  }
7611
7612
  try {
7612
7613
  await checkoutBranch(project.workdir, branch);
7613
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7614
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-U6D2T5QP.js");
7614
7615
  const allSessions = sessionManager.listSessions();
7615
7616
  for (const s of allSessions) {
7616
7617
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -7646,7 +7647,7 @@ async function createServerHandle(config3) {
7646
7647
  );
7647
7648
  }
7648
7649
  await createBranch(project.workdir, name, sb);
7649
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7650
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-U6D2T5QP.js");
7650
7651
  const allSessions = sessionManager.listSessions();
7651
7652
  for (const s of allSessions) {
7652
7653
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -7678,7 +7679,7 @@ async function createServerHandle(config3) {
7678
7679
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
7679
7680
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
7680
7681
  const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-LM646OHC.js");
7681
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7682
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-U6D2T5QP.js");
7682
7683
  try {
7683
7684
  await validateRef2(effectiveWorkdir, branch);
7684
7685
  await checkoutBranch(effectiveWorkdir, branch);
@@ -7721,7 +7722,7 @@ All file and git operations should use this branch.
7721
7722
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
7722
7723
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
7723
7724
  const { validateRef: validateRef2 } = await import("./workspace-LM646OHC.js");
7724
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-VHS47DHO.js");
7725
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-U6D2T5QP.js");
7725
7726
  try {
7726
7727
  await validateRef2(effectiveWorkdir, name);
7727
7728
  if (sourceBranch) {
@@ -7776,8 +7777,8 @@ All file and git operations should use this branch.
7776
7777
  res.json({ workspaces: workspacesList });
7777
7778
  });
7778
7779
  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");
7780
+ const { getRecentUserPromptsForSession } = await import("./events-73MLUDTX.js");
7781
+ const { getPendingConfirmationsBySession: getPendingConfirmationsBySession2 } = await import("./path-security-MQXMTFRU.js");
7781
7782
  const projectId = req.query["projectId"];
7782
7783
  const rawLimit = req.query["limit"];
7783
7784
  const offset = parseInt(req.query["offset"]) || 0;
@@ -7849,7 +7850,7 @@ All file and git operations should use this branch.
7849
7850
  }
7850
7851
  const { providerId, model } = parseDefaultModelSelection(config3.defaultModelSelection);
7851
7852
  const session = sessionManager.createSession(projectId, title, providerId ?? null, model ?? null);
7852
- wssExports.broadcastForProject(projectId, session.id, buildSessionCreatedMessage(session));
7853
+ wssExports.broadcastAll(buildSessionCreatedMessage(session));
7853
7854
  res.status(201).json({ session: toClientSession(session) });
7854
7855
  });
7855
7856
  app.post("/api/sessions/:id/switch-workspace", async (req, res) => {
@@ -7895,9 +7896,9 @@ All file and git operations should use this branch.
7895
7896
  }
7896
7897
  });
7897
7898
  app.get("/api/sessions/:id", async (req, res) => {
7898
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-ZLP5V2YU.js");
7899
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-73MLUDTX.js");
7899
7900
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations } = await import("./folding-BXMVJIFF.js");
7900
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-AY6XEVJK.js");
7901
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-F4COIAZR.js");
7901
7902
  const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
7902
7903
  const session = sessionManager.getSession(req.params.id);
7903
7904
  if (!session) {
@@ -7926,8 +7927,8 @@ All file and git operations should use this branch.
7926
7927
  });
7927
7928
  app.get("/api/sessions/:id/status", async (req, res) => {
7928
7929
  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");
7930
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-F4COIAZR.js");
7931
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEventsWithSnapshot2 } = await import("./events-73MLUDTX.js");
7931
7932
  const { foldPendingConfirmations } = await import("./folding-BXMVJIFF.js");
7932
7933
  const sessionId = req.params["id"];
7933
7934
  if (!sessionId) {
@@ -7958,8 +7959,8 @@ All file and git operations should use this branch.
7958
7959
  if (!session) {
7959
7960
  return res.status(404).json({ error: "Session not found" });
7960
7961
  }
7961
- const { stopSessionExecution } = await import("./chat-handler-JWRCPG72.js");
7962
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
7962
+ const { stopSessionExecution } = await import("./chat-handler-F7QRNO2E.js");
7963
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-F4COIAZR.js");
7963
7964
  sessionManager.clearMessageQueue(sessionId);
7964
7965
  stopSessionExecution(sessionId, sessionManager);
7965
7966
  abortSession(sessionId);
@@ -7988,7 +7989,7 @@ All file and git operations should use this branch.
7988
7989
  res.json({ success: true });
7989
7990
  });
7990
7991
  app.post("/api/sessions/:id/provider", async (req, res) => {
7991
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-ZLP5V2YU.js");
7992
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-73MLUDTX.js");
7992
7993
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
7993
7994
  const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
7994
7995
  const sessionId = req.params.id;
@@ -8019,7 +8020,7 @@ All file and git operations should use this branch.
8019
8020
  res.json({ session: toClientSession(updatedSession), messages, hiddenCount, contextState });
8020
8021
  });
8021
8022
  app.delete("/api/sessions/:id/provider", async (req, res) => {
8022
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-ZLP5V2YU.js");
8023
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-73MLUDTX.js");
8023
8024
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
8024
8025
  const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
8025
8026
  const sessionId = req.params.id;
@@ -8153,7 +8154,7 @@ All file and git operations should use this branch.
8153
8154
  res.json({ success: true });
8154
8155
  });
8155
8156
  app.put("/api/sessions/:id/mode", async (req, res) => {
8156
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-ZLP5V2YU.js");
8157
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-73MLUDTX.js");
8157
8158
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
8158
8159
  const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
8159
8160
  const sessionId = req.params.id;
@@ -8191,7 +8192,7 @@ All file and git operations should use this branch.
8191
8192
  }
8192
8193
  sessionManager.setDangerLevel(sessionId, dangerLevel);
8193
8194
  if (dangerLevel === "dangerous") {
8194
- const { autoApprovePendingConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
8195
+ const { autoApprovePendingConfirmationsForSession } = await import("./tools-F4COIAZR.js");
8195
8196
  const approvedCallIds = autoApprovePendingConfirmationsForSession(sessionId);
8196
8197
  for (const callId of approvedCallIds) {
8197
8198
  wssExports.broadcastForSession(sessionId, {
@@ -8226,7 +8227,7 @@ All file and git operations should use this branch.
8226
8227
  setSessionDisabledServers(sessionId, disabledServers);
8227
8228
  const messages = session.messages ?? [];
8228
8229
  if (messages.length === 0) {
8229
- const { applyDynamicContext } = await import("./dynamic-context-KGSZ7TRQ.js");
8230
+ const { applyDynamicContext } = await import("./dynamic-context-UEC6MMEV.js");
8230
8231
  const modelName = session.providerModel ?? providerManager.getCurrentModel();
8231
8232
  await applyDynamicContext(sessionManager, sessionId, modelName);
8232
8233
  } else {
@@ -8260,7 +8261,7 @@ All file and git operations should use this branch.
8260
8261
  if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
8261
8262
  return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
8262
8263
  }
8263
- const { providePathConfirmation: providePathConfirmation2, getConfirmationSessionId } = await import("./tools-AY6XEVJK.js");
8264
+ const { providePathConfirmation: providePathConfirmation2, getConfirmationSessionId } = await import("./tools-F4COIAZR.js");
8264
8265
  const pendingSessionId = getConfirmationSessionId(callId);
8265
8266
  if (!pendingSessionId) {
8266
8267
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -8272,10 +8273,10 @@ All file and git operations should use this branch.
8272
8273
  if (!result.found) {
8273
8274
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
8274
8275
  }
8275
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-ZLP5V2YU.js");
8276
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-73MLUDTX.js");
8276
8277
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations } = await import("./folding-BXMVJIFF.js");
8277
8278
  const { createSessionStateMessage } = await import("./protocol-MRMOB3P4.js");
8278
- const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-AY6XEVJK.js");
8279
+ const { getPendingQuestionsForSession: getPendingQuestionsForSession2 } = await import("./tools-F4COIAZR.js");
8279
8280
  const { getMaxVisibleItems } = await import("./settings-HCSHADP5.js");
8280
8281
  const eventStore = getEventStore2();
8281
8282
  const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
@@ -8313,7 +8314,7 @@ All file and git operations should use this branch.
8313
8314
  if (!skip && typeof answer !== "string") {
8314
8315
  return res.status(400).json({ error: "answer is required when not skipping" });
8315
8316
  }
8316
- const { provideAnswer: provideAnswer2 } = await import("./tools-AY6XEVJK.js");
8317
+ const { provideAnswer: provideAnswer2 } = await import("./tools-F4COIAZR.js");
8317
8318
  const found = provideAnswer2(callId, answer ?? "", skip ?? false);
8318
8319
  if (!found) {
8319
8320
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -8379,7 +8380,7 @@ All file and git operations should use this branch.
8379
8380
  backend: activeProvider?.backend ?? llmClient.getBackend(),
8380
8381
  model: llmClient.getModel()
8381
8382
  };
8382
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-VSVDUGBT.js");
8383
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-IRUEM4R4.js");
8383
8384
  runAgentTurn(
8384
8385
  {
8385
8386
  sessionManager,
@@ -8417,15 +8418,15 @@ All file and git operations should use this branch.
8417
8418
  if (!session) {
8418
8419
  return res.status(404).json({ error: "Session not found" });
8419
8420
  }
8420
- const { stopSessionExecution } = await import("./chat-handler-JWRCPG72.js");
8421
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
8421
+ const { stopSessionExecution } = await import("./chat-handler-F7QRNO2E.js");
8422
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-F4COIAZR.js");
8422
8423
  const queuedMessages = sessionManager.getQueueState(sessionId);
8423
8424
  sessionManager.clearMessageQueue(sessionId);
8424
8425
  stopSessionExecution(sessionId, sessionManager);
8425
8426
  abortSession(sessionId);
8426
8427
  cancelQuestionsForSession(sessionId, "Session stopped by user");
8427
8428
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
8428
- const eventStore = (await import("./events-ZLP5V2YU.js")).getEventStore();
8429
+ const eventStore = (await import("./events-73MLUDTX.js")).getEventStore();
8429
8430
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
8430
8431
  res.json({ success: true, queuedMessages });
8431
8432
  });
@@ -8466,7 +8467,7 @@ All file and git operations should use this branch.
8466
8467
  if (typeof messageIndex !== "number" || messageIndex < 0) {
8467
8468
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
8468
8469
  }
8469
- const { truncateSessionMessages } = await import("./events-ZLP5V2YU.js");
8470
+ const { truncateSessionMessages } = await import("./events-73MLUDTX.js");
8470
8471
  truncateSessionMessages(sessionId, messageIndex);
8471
8472
  res.json({ success: true });
8472
8473
  });
@@ -8486,7 +8487,7 @@ All file and git operations should use this branch.
8486
8487
  if (attachments !== void 0 && !Array.isArray(attachments)) {
8487
8488
  return res.status(400).json({ error: "attachments must be an array if provided" });
8488
8489
  }
8489
- const { getEventStore: getEventStore2 } = await import("./events-ZLP5V2YU.js");
8490
+ const { getEventStore: getEventStore2 } = await import("./events-73MLUDTX.js");
8490
8491
  const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-BXMVJIFF.js");
8491
8492
  const eventStore = getEventStore2();
8492
8493
  const events = eventStore.getEvents(sessionId);
@@ -8499,7 +8500,7 @@ All file and git operations should use this branch.
8499
8500
  if (msg.role !== "user" || msg.isSystemGenerated) {
8500
8501
  return res.status(400).json({ error: "Can only replay user messages" });
8501
8502
  }
8502
- const { truncateSessionMessages } = await import("./events-ZLP5V2YU.js");
8503
+ const { truncateSessionMessages } = await import("./events-73MLUDTX.js");
8503
8504
  truncateSessionMessages(sessionId, msgIndex - 1);
8504
8505
  sessionManager.queueMessage(
8505
8506
  sessionId,
@@ -8541,7 +8542,7 @@ All file and git operations should use this branch.
8541
8542
  return res.status(404).json({ error: "Session not found" });
8542
8543
  }
8543
8544
  try {
8544
- const { buildSessionExport } = await import("./export-import-CJT33IO6.js");
8545
+ const { buildSessionExport } = await import("./export-import-7I7EJKTE.js");
8545
8546
  const payload = buildSessionExport(sessionManager, sessionId);
8546
8547
  const filename = `${(payload.session.title ?? "session").replace(/[^a-zA-Z0-9-_]/g, "_")}.openfox-session.json`;
8547
8548
  res.setHeader("Content-Disposition", `attachment; filename="${filename}"`);
@@ -9364,7 +9365,7 @@ All file and git operations should use this branch.
9364
9365
  });
9365
9366
  async function rebuildMcpTools() {
9366
9367
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-ZY4FC4C4.js");
9367
- const { setMcpTools: setMcpTools2 } = await import("./tools-AY6XEVJK.js");
9368
+ const { setMcpTools: setMcpTools2 } = await import("./tools-F4COIAZR.js");
9368
9369
  const mcpTools = createMcpTools2(mcpManager);
9369
9370
  setMcpTools2(mcpTools);
9370
9371
  toolRegistry = createToolRegistry();
@@ -9939,8 +9940,8 @@ All file and git operations should use this branch.
9939
9940
  () => mcpManager.getAllServers()
9940
9941
  );
9941
9942
  const wss = wssExports.wss;
9942
- deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
9943
- const { launchWorkflowRun, abortRunnerRun } = await import("./launch-7NKOCT5A.js");
9943
+ deferTasksBroadcast = (_projectId, payload) => wssExports.broadcastAll({ type: "tasks.update", payload });
9944
+ const { launchWorkflowRun, abortRunnerRun } = await import("./launch-77CO4C7W.js");
9944
9945
  deferTasksLaunchWorkflow = (sessionId, launch) => {
9945
9946
  const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
9946
9947
  let llmClient = getLLMClient();
@@ -9985,7 +9986,7 @@ All file and git operations should use this branch.
9985
9986
  const state = sessionManager.getContextState(sessionId);
9986
9987
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
9987
9988
  });
9988
- const { QueueProcessor } = await import("./processor-ACZM62WO.js");
9989
+ const { QueueProcessor } = await import("./processor-VMUKAMG6.js");
9989
9990
  const queueProcessor = new QueueProcessor({
9990
9991
  sessionManager,
9991
9992
  providerManager,
@@ -10027,8 +10028,8 @@ All file and git operations should use this branch.
10027
10028
  launchWorkflow: (sessionId, launch) => deferTasksLaunchWorkflow(sessionId, launch),
10028
10029
  stopSession: (sessionId) => {
10029
10030
  void (async () => {
10030
- const { stopSessionExecution } = await import("./chat-handler-JWRCPG72.js");
10031
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-AY6XEVJK.js");
10031
+ const { stopSessionExecution } = await import("./chat-handler-F7QRNO2E.js");
10032
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-F4COIAZR.js");
10032
10033
  sessionManager.clearMessageQueue(sessionId);
10033
10034
  stopSessionExecution(sessionId, sessionManager);
10034
10035
  abortSession(sessionId);
@@ -10091,6 +10092,11 @@ All file and git operations should use this branch.
10091
10092
  const actualPort = typeof addr === "object" && addr ? addr.port : listenPort;
10092
10093
  setMcpOAuthServerPort(actualPort);
10093
10094
  mcpActualPort = actualPort;
10095
+ connectMcpServers().catch((err) => {
10096
+ logger.error("MCP server startup connection failed", {
10097
+ error: err instanceof Error ? err.message : String(err)
10098
+ });
10099
+ });
10094
10100
  const client = getLLMClient();
10095
10101
  logger.info(`OpenFox server running at http://${host}:${actualPort}`);
10096
10102
  logger.info(`WebSocket available at ws://${host}:${actualPort}/ws`);
@@ -10149,4 +10155,4 @@ export {
10149
10155
  createServerHandle,
10150
10156
  createServer
10151
10157
  };
10152
- //# sourceMappingURL=chunk-QIGVYXMH.js.map
10158
+ //# sourceMappingURL=chunk-SKHU4M6L.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runAgentTurn
3
- } from "./chunk-GZJRXVVJ.js";
3
+ } from "./chunk-BB67GW5P.js";
4
4
  import {
5
5
  executeSubAgent,
6
6
  getToolRegistryForAgent
7
- } from "./chunk-5MGCTRKM.js";
7
+ } from "./chunk-NDAXMOD2.js";
8
8
  import {
9
9
  gitSpawnEnv
10
10
  } from "./chunk-J7GAZGZT.js";
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  getCurrentContextWindowId,
36
36
  getEventStore
37
- } from "./chunk-JTR3PC5I.js";
37
+ } from "./chunk-2OTUYNXD.js";
38
38
  import {
39
39
  findAgentById,
40
40
  getRuntimeConfig,
@@ -1023,4 +1023,4 @@ export {
1023
1023
  abortRunnerRun,
1024
1024
  launchWorkflowRun
1025
1025
  };
1026
- //# sourceMappingURL=chunk-66XJC5TA.js.map
1026
+ //# sourceMappingURL=chunk-UJO67GFD.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getEventStore
3
- } from "./chunk-JTR3PC5I.js";
3
+ } from "./chunk-2OTUYNXD.js";
4
4
  import {
5
5
  createChatPathConfirmationMessage
6
6
  } from "./chunk-OVAHNEFG.js";
@@ -723,20 +723,52 @@ function extractDangerousPatterns(command) {
723
723
  return dangerous;
724
724
  }
725
725
  var GIT_N_NO_VERIFY_SUBCOMMANDS = /* @__PURE__ */ new Set(["commit", "am"]);
726
- function extractGitNoVerify(command) {
727
- const subCommands = command.split(/\s*(?:&&|\|\||\||;)\s*/);
728
- for (const sub of subCommands) {
729
- const parts = sub.trim().split(/\s+/);
730
- const gitIndex = parts.indexOf("git");
731
- const subCmd = parts[gitIndex + 1];
732
- if (gitIndex >= 0 && subCmd && !subCmd.startsWith("-")) {
733
- const gitArgs = parts.slice(gitIndex + 2);
734
- if (gitArgs.includes("--no-verify")) return true;
735
- if (GIT_N_NO_VERIFY_SUBCOMMANDS.has(subCmd) && gitArgs.includes("-n")) return true;
726
+ var COMMAND_SEPARATORS = /* @__PURE__ */ new Set([";", "&&", "||", "|"]);
727
+ function hasDanglingQuote(command) {
728
+ let quote = null;
729
+ for (let i = 0; i < command.length; i++) {
730
+ const ch = command[i];
731
+ if (quote !== null) {
732
+ if (ch === "\\" && quote !== "'") {
733
+ i += 1;
734
+ continue;
735
+ }
736
+ if (ch === quote) quote = null;
737
+ continue;
736
738
  }
739
+ if (ch === "'" || ch === '"' || ch === "`") quote = ch;
740
+ }
741
+ return quote !== null;
742
+ }
743
+ function gitSubHasNoVerify(sub) {
744
+ const gitIndex = sub.indexOf("git");
745
+ const subCmd = sub[gitIndex + 1];
746
+ if (gitIndex >= 0 && subCmd && !subCmd.startsWith("-")) {
747
+ const gitArgs = sub.slice(gitIndex + 2);
748
+ if (gitArgs.includes("--no-verify")) return true;
749
+ if (GIT_N_NO_VERIFY_SUBCOMMANDS.has(subCmd) && gitArgs.includes("-n")) return true;
737
750
  }
738
751
  return false;
739
752
  }
753
+ function extractGitNoVerify(command) {
754
+ if (hasDanglingQuote(command)) {
755
+ for (const sub2 of command.split(/\s*(?:&&|\|\||\||;)\s*/)) {
756
+ if (gitSubHasNoVerify(sub2.trim().split(/\s+/))) return true;
757
+ }
758
+ return false;
759
+ }
760
+ const tokens = tokenizeShell(command);
761
+ let sub = [];
762
+ for (const token of tokens) {
763
+ if (token.isOperator && COMMAND_SEPARATORS.has(token.text)) {
764
+ if (gitSubHasNoVerify(sub)) return true;
765
+ sub = [];
766
+ continue;
767
+ }
768
+ if (!token.isOperator) sub.push(token.text);
769
+ }
770
+ return gitSubHasNoVerify(sub);
771
+ }
740
772
  async function requestPathAccess(paths, workdir, sessionId, callId, tool, onEvent, dangerLevel, command, isSubAgent) {
741
773
  if (isSubAgent) {
742
774
  const result2 = await checkPathsAccess(paths, workdir, sessionId);
@@ -956,4 +988,4 @@ export {
956
988
  getConfirmationSessionId,
957
989
  getPendingConfirmationsBySession
958
990
  };
959
- //# sourceMappingURL=chunk-RG326HS4.js.map
991
+ //# sourceMappingURL=chunk-YFTCFJJM.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-WD354R3H.js";
4
+ } from "../chunk-RHUZLWZV.js";
5
5
  import "../chunk-AGXJ5O63.js";
6
6
  import "../chunk-2OMGR7LN.js";
7
7
  import {
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-WD354R3H.js";
4
+ } from "../chunk-RHUZLWZV.js";
5
5
  import "../chunk-AGXJ5O63.js";
6
6
  import "../chunk-2OMGR7LN.js";
7
7
  import {
@@ -3,12 +3,12 @@ import {
3
3
  COMPACTION_MAX_RATIO,
4
4
  appendCompactionPrompt,
5
5
  shouldCompact
6
- } from "./chunk-5F7LNEEP.js";
6
+ } from "./chunk-G7BQWMV7.js";
7
7
  import "./chunk-OA7KBQ2O.js";
8
8
  import "./chunk-GKRYQ56N.js";
9
- import "./chunk-JTR3PC5I.js";
9
+ import "./chunk-2OTUYNXD.js";
10
10
  import "./chunk-AE2IBEUH.js";
11
- import "./chunk-7OHSAZLF.js";
11
+ import "./chunk-DBF5GKZF.js";
12
12
  import "./chunk-4F4ARGAM.js";
13
13
  import "./chunk-OSXPQSLW.js";
14
14
  import "./chunk-LCLH6ZUL.js";
@@ -31,4 +31,4 @@ export {
31
31
  appendCompactionPrompt,
32
32
  shouldCompact
33
33
  };
34
- //# sourceMappingURL=compactor-UREBHSZQ.js.map
34
+ //# sourceMappingURL=compactor-QDTK3SZI.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  describeImageTool,
3
3
  isDescribeImageEligible
4
- } from "./chunk-MAUQ6AW4.js";
4
+ } from "./chunk-IZVIN7XC.js";
5
5
  import "./chunk-JLHYB445.js";
6
6
  import "./chunk-V5AC2TV7.js";
7
- import "./chunk-RG326HS4.js";
8
- import "./chunk-JTR3PC5I.js";
7
+ import "./chunk-YFTCFJJM.js";
8
+ import "./chunk-2OTUYNXD.js";
9
9
  import "./chunk-AE2IBEUH.js";
10
- import "./chunk-7OHSAZLF.js";
10
+ import "./chunk-DBF5GKZF.js";
11
11
  import "./chunk-4F4ARGAM.js";
12
12
  import "./chunk-OSXPQSLW.js";
13
13
  import "./chunk-OVAHNEFG.js";
@@ -27,4 +27,4 @@ export {
27
27
  describeImageTool,
28
28
  isDescribeImageEligible
29
29
  };
30
- //# sourceMappingURL=describe-image-TQOD52IC.js.map
30
+ //# sourceMappingURL=describe-image-UFOHQIPB.js.map
@@ -16,12 +16,12 @@ import {
16
16
  injectContextDriftRemindersForSessions,
17
17
  renderSystemPromptDiff,
18
18
  renderToolChangeReminder
19
- } from "./chunk-5EKBZXCU.js";
19
+ } from "./chunk-RCEGPT57.js";
20
20
  import "./chunk-CRJ5J7U5.js";
21
21
  import "./chunk-GKRYQ56N.js";
22
- import "./chunk-JTR3PC5I.js";
22
+ import "./chunk-2OTUYNXD.js";
23
23
  import "./chunk-AE2IBEUH.js";
24
- import "./chunk-7OHSAZLF.js";
24
+ import "./chunk-DBF5GKZF.js";
25
25
  import "./chunk-4F4ARGAM.js";
26
26
  import "./chunk-OSXPQSLW.js";
27
27
  import "./chunk-LCLH6ZUL.js";
@@ -51,4 +51,4 @@ export {
51
51
  renderSystemPromptDiff,
52
52
  renderToolChangeReminder
53
53
  };
54
- //# sourceMappingURL=dynamic-context-KGSZ7TRQ.js.map
54
+ //# sourceMappingURL=dynamic-context-UEC6MMEV.js.map
@@ -40,7 +40,7 @@ import {
40
40
  isStoredEvent,
41
41
  isTurnEvent,
42
42
  truncateSessionMessages
43
- } from "./chunk-JTR3PC5I.js";
43
+ } from "./chunk-2OTUYNXD.js";
44
44
  import {
45
45
  buildContextMessagesFromEventHistory,
46
46
  buildContextMessagesFromMessages,
@@ -57,7 +57,7 @@ import {
57
57
  foldTodos,
58
58
  foldTurnEventsToSnapshotMessages
59
59
  } from "./chunk-AE2IBEUH.js";
60
- import "./chunk-7OHSAZLF.js";
60
+ import "./chunk-DBF5GKZF.js";
61
61
  import "./chunk-4F4ARGAM.js";
62
62
  import "./chunk-OSXPQSLW.js";
63
63
  import "./chunk-LCLH6ZUL.js";
@@ -124,4 +124,4 @@ export {
124
124
  isTurnEvent,
125
125
  truncateSessionMessages
126
126
  };
127
- //# sourceMappingURL=events-ZLP5V2YU.js.map
127
+ //# sourceMappingURL=events-73MLUDTX.js.map