openfox 2.0.45 → 2.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +20 -19
  2. package/dist/{chat-handler-N455RNSL.js → chat-handler-QSIPCVYT.js} +7 -7
  3. package/dist/{chunk-4EFNO4BV.js → chunk-2DKFKTLY.js} +2 -2
  4. package/dist/{chunk-K3NOKF5A.js → chunk-C7NO4BBK.js} +10 -143
  5. package/dist/{chunk-SM2PK6TV.js → chunk-CDFPKVOF.js} +2 -2
  6. package/dist/{chunk-JNSSFTVD.js → chunk-CDRQJDSJ.js} +3 -1
  7. package/dist/{chunk-IPTJ3MYR.js → chunk-EU6XT5ST.js} +6 -6
  8. package/dist/{chunk-ZBLT7MNL.js → chunk-H5AC62SN.js} +2 -2
  9. package/dist/{chunk-4GBKQZ2U.js → chunk-HSXSRVW2.js} +97 -42
  10. package/dist/{chunk-BSDMJT53.js → chunk-LB3E24TN.js} +5 -3
  11. package/dist/{chunk-OBKCUYR5.js → chunk-LNE4QPNW.js} +6 -6
  12. package/dist/{chunk-CTGMHRHD.js → chunk-MH73ZSPY.js} +35 -10
  13. package/dist/{chunk-QOZ2DIWF.js → chunk-U62IKLKM.js} +8 -3
  14. package/dist/{chunk-IEDE6VK4.js → chunk-UFFLA4W6.js} +2 -6
  15. package/dist/{chunk-JREYASTD.js → chunk-VVBHUTJ5.js} +9 -6
  16. package/dist/cli/dev.js +1 -1
  17. package/dist/cli/index.js +1 -1
  18. package/dist/{client-ZUL4AR4J.js → client-5FOFNUXM.js} +3 -3
  19. package/dist/{compactor-LQ46XQJV.js → compactor-VIN5YWQF.js} +3 -3
  20. package/dist/{config-G5MVFHLP.js → config-G5GNT4UT.js} +2 -6
  21. package/dist/{events-7RIPFG62.js → events-S4EOKSYA.js} +2 -2
  22. package/dist/{http-client-3OLSDU63.js → http-client-JTRLBNJC.js} +2 -2
  23. package/dist/{orchestrator-5S2D5XWE.js → orchestrator-3PQ6KQAG.js} +6 -6
  24. package/dist/package.json +1 -1
  25. package/dist/{processor-X53RROTI.js → processor-MHNIP32O.js} +7 -7
  26. package/dist/{protocol-COpRaEpx.d.ts → protocol-A2CLNSAK.d.ts} +2 -0
  27. package/dist/{provider-DLH5GJH2.js → provider-BYKY7BS3.js} +8 -8
  28. package/dist/{provider-manager-5UZXYOZZ.js → provider-manager-7ARKB5FZ.js} +4 -4
  29. package/dist/{serve-XY327IVV.js → serve-TKOKRJTR.js} +14 -13
  30. package/dist/server/index.d.ts +5 -1
  31. package/dist/server/index.js +11 -11
  32. package/dist/{server-RRS5ZQ7I.js → server-KZ3UARRZ.js} +10 -10
  33. package/dist/{settings-L2V4ZUA2.js → settings-X43DCM55.js} +2 -2
  34. package/dist/shared/index.d.ts +2 -2
  35. package/dist/{tools-ZPKIMLNI.js → tools-UMI2IMYI.js} +5 -5
  36. package/dist/web/assets/{index-D8oQRDLg.js → index-C4UaPDjy.js} +51 -51
  37. package/dist/web/index.html +1 -1
  38. package/dist/web/sw.js +1 -1
  39. package/package.json +1 -1
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-IPTJ3MYR.js";
24
+ } from "./chunk-EU6XT5ST.js";
25
25
  import {
26
26
  agentExists,
27
27
  createToolRegistry,
@@ -61,7 +61,7 @@ import {
61
61
  setMcpTools,
62
62
  setNotifyMcpServersChanged,
63
63
  skillExists
64
- } from "./chunk-CTGMHRHD.js";
64
+ } from "./chunk-MH73ZSPY.js";
65
65
  import {
66
66
  getPathSeparator,
67
67
  isAbsolutePath
@@ -109,14 +109,14 @@ import {
109
109
  updateSessionMetadata,
110
110
  updateSessionProvider,
111
111
  updateSessionRunning
112
- } from "./chunk-BSDMJT53.js";
112
+ } from "./chunk-LB3E24TN.js";
113
113
  import {
114
114
  initDatabase
115
115
  } from "./chunk-ZPIZLTWU.js";
116
116
  import {
117
117
  createProviderManager,
118
118
  parseDefaultModelSelection
119
- } from "./chunk-SM2PK6TV.js";
119
+ } from "./chunk-CDFPKVOF.js";
120
120
  import {
121
121
  detectModel,
122
122
  getLlmStatus
@@ -129,7 +129,7 @@ import {
129
129
  } from "./chunk-HNCM3D7Y.js";
130
130
  import {
131
131
  SessionNotFoundError
132
- } from "./chunk-IEDE6VK4.js";
132
+ } from "./chunk-UFFLA4W6.js";
133
133
  import {
134
134
  logger,
135
135
  setLogLevel
@@ -2502,6 +2502,7 @@ var SessionManager = class {
2502
2502
  providerManager;
2503
2503
  dynamicContextChangedStore = /* @__PURE__ */ new Map();
2504
2504
  debugDumpStore = /* @__PURE__ */ new Map();
2505
+ warmedUpSessions = /* @__PURE__ */ new Set();
2505
2506
  constructor(providerManager) {
2506
2507
  this.providerManager = providerManager;
2507
2508
  }
@@ -2587,6 +2588,7 @@ var SessionManager = class {
2587
2588
  const eventStore = getEventStore();
2588
2589
  eventStore.deleteSession(id);
2589
2590
  this.messageQueues.delete(id);
2591
+ this.warmedUpSessions.delete(id);
2590
2592
  deleteSession(id);
2591
2593
  if (this.activeSessionId === id) {
2592
2594
  this.activeSessionId = null;
@@ -3049,8 +3051,18 @@ var SessionManager = class {
3049
3051
  updateExecutionState(sessionId, updates) {
3050
3052
  logger.debug("updateExecutionState called", { sessionId, updates });
3051
3053
  }
3054
+ isWarmedUp(sessionId) {
3055
+ return this.warmedUpSessions.has(sessionId);
3056
+ }
3057
+ markWarmedUp(sessionId) {
3058
+ this.warmedUpSessions.add(sessionId);
3059
+ }
3060
+ resetWarmup(sessionId) {
3061
+ this.warmedUpSessions.delete(sessionId);
3062
+ }
3052
3063
  setCachedPrompt(sessionId, systemPrompt, tools, hash) {
3053
3064
  updateSessionCachedPrompt(sessionId, systemPrompt, tools, hash);
3065
+ this.resetWarmup(sessionId);
3054
3066
  }
3055
3067
  getCachedPrompt(sessionId) {
3056
3068
  const result = getSessionCachedPrompt(sessionId);
@@ -3837,7 +3849,7 @@ import { Router as Router7 } from "express";
3837
3849
  import { spawn as spawn2 } from "child_process";
3838
3850
 
3839
3851
  // src/constants.ts
3840
- var VERSION = "2.0.45";
3852
+ var VERSION = "2.0.46";
3841
3853
 
3842
3854
  // src/server/routes/auto-update.ts
3843
3855
  var updateInProgress = false;
@@ -4004,7 +4016,7 @@ async function createServerHandle(config4) {
4004
4016
  const mcpManager = new McpManager({
4005
4017
  onToolsDiscovered: async (name, tools) => {
4006
4018
  try {
4007
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5MVFHLP.js");
4019
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5GNT4UT.js");
4008
4020
  const mode = config4.mode ?? "production";
4009
4021
  const globalConfig = await loadGlobalConfig(mode);
4010
4022
  const mcpServers2 = {
@@ -4034,7 +4046,7 @@ async function createServerHandle(config4) {
4034
4046
  setMcpTools(mcpTools);
4035
4047
  logger.info("MCP tools registered", { count: mcpTools.length });
4036
4048
  }
4037
- const { signalMcpReady } = await import("./server-RRS5ZQ7I.js");
4049
+ const { signalMcpReady } = await import("./server-KZ3UARRZ.js");
4038
4050
  signalMcpReady();
4039
4051
  });
4040
4052
  const app = express();
@@ -4192,7 +4204,7 @@ async function createServerHandle(config4) {
4192
4204
  res.json({ project });
4193
4205
  });
4194
4206
  app.get("/api/sessions", async (req, res) => {
4195
- const { getRecentUserPromptsForSession } = await import("./events-7RIPFG62.js");
4207
+ const { getRecentUserPromptsForSession } = await import("./events-S4EOKSYA.js");
4196
4208
  const projectId = req.query["projectId"];
4197
4209
  const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
4198
4210
  const offset = parseInt(req.query["offset"]) || 0;
@@ -4225,9 +4237,9 @@ async function createServerHandle(config4) {
4225
4237
  res.status(201).json({ session });
4226
4238
  });
4227
4239
  app.get("/api/sessions/:id", async (req, res) => {
4228
- const { getEventStore: getEventStore2 } = await import("./events-7RIPFG62.js");
4240
+ const { getEventStore: getEventStore2 } = await import("./events-S4EOKSYA.js");
4229
4241
  const { buildMessagesFromStoredEvents } = await import("./folding-H5C6HS7O.js");
4230
- const { getPendingQuestionsForSession } = await import("./tools-ZPKIMLNI.js");
4242
+ const { getPendingQuestionsForSession } = await import("./tools-UMI2IMYI.js");
4231
4243
  const session = sessionManager.getSession(req.params.id);
4232
4244
  if (!session) {
4233
4245
  return res.status(404).json({ error: "Session not found" });
@@ -4258,7 +4270,7 @@ async function createServerHandle(config4) {
4258
4270
  res.json({ success: true });
4259
4271
  });
4260
4272
  app.post("/api/sessions/:id/provider", async (req, res) => {
4261
- const { getEventStore: getEventStore2 } = await import("./events-7RIPFG62.js");
4273
+ const { getEventStore: getEventStore2 } = await import("./events-S4EOKSYA.js");
4262
4274
  const { buildMessagesFromStoredEvents } = await import("./folding-H5C6HS7O.js");
4263
4275
  const sessionId = req.params.id;
4264
4276
  const session = sessionManager.getSession(sessionId);
@@ -4272,7 +4284,7 @@ async function createServerHandle(config4) {
4272
4284
  const provider = providerManager.getProviders().find((p) => p.id === providerId);
4273
4285
  const resolvedModel = model ?? provider?.models?.[0]?.id ?? "auto";
4274
4286
  sessionManager.setSessionProvider(sessionId, providerId, resolvedModel);
4275
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-G5MVFHLP.js");
4287
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-G5GNT4UT.js");
4276
4288
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4277
4289
  const updatedConfig = setDefaultModelSelection(globalConfig, providerId, resolvedModel);
4278
4290
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4321,7 +4333,7 @@ async function createServerHandle(config4) {
4321
4333
  res.json({ success: true });
4322
4334
  });
4323
4335
  app.put("/api/sessions/:id/mode", async (req, res) => {
4324
- const { getEventStore: getEventStore2 } = await import("./events-7RIPFG62.js");
4336
+ const { getEventStore: getEventStore2 } = await import("./events-S4EOKSYA.js");
4325
4337
  const { buildMessagesFromStoredEvents } = await import("./folding-H5C6HS7O.js");
4326
4338
  const sessionId = req.params.id;
4327
4339
  const session = sessionManager.getSession(sessionId);
@@ -4378,15 +4390,15 @@ async function createServerHandle(config4) {
4378
4390
  if (!callId || approved === void 0) {
4379
4391
  return res.status(400).json({ error: "callId and approved are required" });
4380
4392
  }
4381
- const { providePathConfirmation } = await import("./tools-ZPKIMLNI.js");
4393
+ const { providePathConfirmation } = await import("./tools-UMI2IMYI.js");
4382
4394
  const result = providePathConfirmation(callId, approved, alwaysAllow);
4383
4395
  if (!result.found) {
4384
4396
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
4385
4397
  }
4386
- const { getEventStore: getEventStore2 } = await import("./events-7RIPFG62.js");
4398
+ const { getEventStore: getEventStore2 } = await import("./events-S4EOKSYA.js");
4387
4399
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-H5C6HS7O.js");
4388
4400
  const { createSessionStateMessage } = await import("./protocol-CTNE3ANP.js");
4389
- const { getPendingQuestionsForSession } = await import("./tools-ZPKIMLNI.js");
4401
+ const { getPendingQuestionsForSession } = await import("./tools-UMI2IMYI.js");
4390
4402
  const eventStore = getEventStore2();
4391
4403
  const events = eventStore.getEvents(sessionId);
4392
4404
  const messages = buildMessagesFromStoredEvents(events);
@@ -4407,7 +4419,7 @@ async function createServerHandle(config4) {
4407
4419
  if (!skip && typeof answer !== "string") {
4408
4420
  return res.status(400).json({ error: "answer is required when not skipping" });
4409
4421
  }
4410
- const { provideAnswer } = await import("./tools-ZPKIMLNI.js");
4422
+ const { provideAnswer } = await import("./tools-UMI2IMYI.js");
4411
4423
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
4412
4424
  if (!found) {
4413
4425
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -4427,6 +4439,49 @@ async function createServerHandle(config4) {
4427
4439
  sessionManager.queueMessage(sessionId, "asap", content, attachments, messageKind);
4428
4440
  res.json({ success: true, queueState: sessionManager.getQueueState(sessionId) });
4429
4441
  });
4442
+ app.post("/api/sessions/:id/warmup", async (req, res) => {
4443
+ const sessionId = req.params.id;
4444
+ const session = sessionManager.getSession(sessionId);
4445
+ if (!session) {
4446
+ return res.status(404).json({ error: "Session not found" });
4447
+ }
4448
+ const { getSetting, SETTINGS_KEYS } = await import("./settings-X43DCM55.js");
4449
+ if (getSetting(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
4450
+ return res.json({ success: false, reason: "disabled" });
4451
+ }
4452
+ if (session.messages.length > 0) {
4453
+ return res.json({ success: false, reason: "not_empty" });
4454
+ }
4455
+ if (sessionManager.isWarmedUp(sessionId)) {
4456
+ return res.json({ success: false, reason: "already_warmed" });
4457
+ }
4458
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-3PQ6KQAG.js");
4459
+ runAgentTurn(
4460
+ {
4461
+ sessionManager,
4462
+ sessionId,
4463
+ llmClient: getLLMClient(),
4464
+ statsIdentity: {
4465
+ providerId: "warmup",
4466
+ providerName: "Warmup",
4467
+ backend: getLLMClient().getBackend(),
4468
+ model: getLLMClient().getModel()
4469
+ },
4470
+ onMessage: () => {
4471
+ },
4472
+ warmup: true
4473
+ },
4474
+ new TurnMetrics(),
4475
+ session.mode,
4476
+ () => {
4477
+ }
4478
+ ).then(() => {
4479
+ sessionManager.markWarmedUp(sessionId);
4480
+ }).catch((err) => {
4481
+ logger.debug("Warmup failed (expected)", { sessionId, error: err instanceof Error ? err.message : String(err) });
4482
+ });
4483
+ res.json({ success: true });
4484
+ });
4430
4485
  app.delete("/api/sessions/:id/queue/:queueId", (req, res) => {
4431
4486
  const sessionId = req.params.id;
4432
4487
  const { queueId } = req.params;
@@ -4443,15 +4498,15 @@ async function createServerHandle(config4) {
4443
4498
  if (!session) {
4444
4499
  return res.status(404).json({ error: "Session not found" });
4445
4500
  }
4446
- const { stopSessionExecution } = await import("./chat-handler-N455RNSL.js");
4447
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-ZPKIMLNI.js");
4501
+ const { stopSessionExecution } = await import("./chat-handler-QSIPCVYT.js");
4502
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-UMI2IMYI.js");
4448
4503
  const queuedMessages = sessionManager.getQueueState(sessionId);
4449
4504
  sessionManager.clearMessageQueue(sessionId);
4450
4505
  stopSessionExecution(sessionId, sessionManager);
4451
4506
  abortSession(sessionId);
4452
4507
  cancelQuestionsForSession(sessionId, "Session stopped by user");
4453
4508
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
4454
- const eventStore = (await import("./events-7RIPFG62.js")).getEventStore();
4509
+ const eventStore = (await import("./events-S4EOKSYA.js")).getEventStore();
4455
4510
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
4456
4511
  res.json({ success: true, queuedMessages });
4457
4512
  });
@@ -4465,7 +4520,7 @@ async function createServerHandle(config4) {
4465
4520
  if (typeof messageIndex !== "number" || messageIndex < 0) {
4466
4521
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
4467
4522
  }
4468
- const { truncateSessionMessages } = await import("./events-7RIPFG62.js");
4523
+ const { truncateSessionMessages } = await import("./events-S4EOKSYA.js");
4469
4524
  truncateSessionMessages(sessionId, messageIndex);
4470
4525
  res.json({ success: true });
4471
4526
  });
@@ -4483,7 +4538,7 @@ async function createServerHandle(config4) {
4483
4538
  if (!msg) {
4484
4539
  return res.status(400).json({ error: "Message not found at this index" });
4485
4540
  }
4486
- const { truncateSessionMessages } = await import("./events-7RIPFG62.js");
4541
+ const { truncateSessionMessages } = await import("./events-S4EOKSYA.js");
4487
4542
  truncateSessionMessages(sessionId, messageIndex - 1);
4488
4543
  sessionManager.queueMessage(sessionId, "asap", msg.content, msg.attachments, msg.messageKind);
4489
4544
  res.json({ success: true });
@@ -4515,7 +4570,7 @@ async function createServerHandle(config4) {
4515
4570
  res.json({ accepted: true });
4516
4571
  });
4517
4572
  app.get("/api/settings", async (req, res) => {
4518
- const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-L2V4ZUA2.js");
4573
+ const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-X43DCM55.js");
4519
4574
  const keysParam = req.query["keys"];
4520
4575
  if (!keysParam) {
4521
4576
  return res.status(400).json({ error: "keys query parameter is required" });
@@ -4528,19 +4583,19 @@ async function createServerHandle(config4) {
4528
4583
  res.json(result);
4529
4584
  });
4530
4585
  app.get("/api/settings/:key", async (req, res) => {
4531
- const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-L2V4ZUA2.js");
4586
+ const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-X43DCM55.js");
4532
4587
  const key = req.params.key;
4533
4588
  const value = getSetting(key) ?? SETTINGS_DEFAULTS[key] ?? null;
4534
4589
  res.json({ key, value });
4535
4590
  });
4536
4591
  app.get("/api/settings/:key", async (req, res) => {
4537
- const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-L2V4ZUA2.js");
4592
+ const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-X43DCM55.js");
4538
4593
  const key = req.params.key;
4539
4594
  const value = getSetting(key) ?? SETTINGS_DEFAULTS[key] ?? null;
4540
4595
  res.json({ key, value });
4541
4596
  });
4542
4597
  app.put("/api/settings/:key", async (req, res) => {
4543
- const { setSetting } = await import("./settings-L2V4ZUA2.js");
4598
+ const { setSetting } = await import("./settings-X43DCM55.js");
4544
4599
  const key = req.params.key;
4545
4600
  const { value } = req.body;
4546
4601
  if (value === void 0) {
@@ -4555,7 +4610,7 @@ async function createServerHandle(config4) {
4555
4610
  let visionFallback;
4556
4611
  let globalWorkdir;
4557
4612
  try {
4558
- const { loadGlobalConfig, getVisionFallback } = await import("./config-G5MVFHLP.js");
4613
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-G5GNT4UT.js");
4559
4614
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4560
4615
  const fallback = getVisionFallback(globalConfig);
4561
4616
  if (fallback) {
@@ -4652,7 +4707,7 @@ async function createServerHandle(config4) {
4652
4707
  const apiKey = req.query["apiKey"];
4653
4708
  if (!url) return res.status(400).json({ error: "url is required" });
4654
4709
  try {
4655
- const { fetchModelsWithContext } = await import("./provider-manager-5UZXYOZZ.js");
4710
+ const { fetchModelsWithContext } = await import("./provider-manager-7ARKB5FZ.js");
4656
4711
  const models = await fetchModelsWithContext(url, apiKey);
4657
4712
  if (models.length === 0) {
4658
4713
  return res.status(404).json({ error: `No models found at ${buildModelsUrl(url)}`, url });
@@ -4701,7 +4756,7 @@ async function createServerHandle(config4) {
4701
4756
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
4702
4757
  const { getBackendCapabilities } = await import("./backend-4HGUPY6W.js");
4703
4758
  const { buildNonStreamingCreateParams } = await import("./client-pure-DO3S675T.js");
4704
- const { OpenAIHttpClient } = await import("./http-client-3OLSDU63.js");
4759
+ const { OpenAIHttpClient } = await import("./http-client-JTRLBNJC.js");
4705
4760
  const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
4706
4761
  const profile = getModelProfile2(model);
4707
4762
  const capabilities = getBackendCapabilities(backend || "unknown");
@@ -4768,7 +4823,7 @@ async function createServerHandle(config4) {
4768
4823
  return res.status(400).json({ error: "name, url, and backend are required" });
4769
4824
  }
4770
4825
  try {
4771
- const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-G5MVFHLP.js");
4826
+ const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-G5GNT4UT.js");
4772
4827
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4773
4828
  const providerBackend = backend;
4774
4829
  const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
@@ -4806,7 +4861,7 @@ async function createServerHandle(config4) {
4806
4861
  app.post("/api/init/config", async (req, res) => {
4807
4862
  const { workdir, visionFallback } = req.body;
4808
4863
  try {
4809
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5MVFHLP.js");
4864
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5GNT4UT.js");
4810
4865
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4811
4866
  const updatedConfig = {
4812
4867
  ...globalConfig,
@@ -4834,7 +4889,7 @@ async function createServerHandle(config4) {
4834
4889
  });
4835
4890
  app.delete("/api/providers/:id", async (req, res) => {
4836
4891
  const { id } = req.params;
4837
- const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-G5MVFHLP.js");
4892
+ const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-G5GNT4UT.js");
4838
4893
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4839
4894
  const updatedConfig = removeProvider(globalConfig, id);
4840
4895
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4846,7 +4901,7 @@ async function createServerHandle(config4) {
4846
4901
  const { id } = req.params;
4847
4902
  const { isLocal } = req.body;
4848
4903
  try {
4849
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-G5MVFHLP.js");
4904
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-G5GNT4UT.js");
4850
4905
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4851
4906
  const provider = globalConfig.providers.find((p) => p.id === id);
4852
4907
  if (!provider) {
@@ -4875,7 +4930,7 @@ async function createServerHandle(config4) {
4875
4930
  models: modelConfigs
4876
4931
  } = req.body;
4877
4932
  try {
4878
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-G5MVFHLP.js");
4933
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-G5GNT4UT.js");
4879
4934
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4880
4935
  const provider = globalConfig.providers.find((p) => p.id === id);
4881
4936
  if (!provider) {
@@ -4913,7 +4968,7 @@ async function createServerHandle(config4) {
4913
4968
  return res.status(400).json({ error: result.error });
4914
4969
  }
4915
4970
  const llmClient = getLLMClient();
4916
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-G5MVFHLP.js");
4971
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-G5GNT4UT.js");
4917
4972
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4918
4973
  const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
4919
4974
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4940,7 +4995,7 @@ async function createServerHandle(config4) {
4940
4995
  });
4941
4996
  async function rebuildMcpTools() {
4942
4997
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
4943
- const { setMcpTools: setMcpTools2 } = await import("./tools-ZPKIMLNI.js");
4998
+ const { setMcpTools: setMcpTools2 } = await import("./tools-UMI2IMYI.js");
4944
4999
  const mcpTools = createMcpTools2(mcpManager);
4945
5000
  setMcpTools2(mcpTools);
4946
5001
  }
@@ -5002,7 +5057,7 @@ async function createServerHandle(config4) {
5002
5057
  };
5003
5058
  await mcpManager.addServer(name, serverCfg);
5004
5059
  const server = mcpManager.getServer(name);
5005
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5MVFHLP.js");
5060
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5GNT4UT.js");
5006
5061
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5007
5062
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
5008
5063
  await saveGlobalConfig(config4.mode ?? "production", {
@@ -5028,7 +5083,7 @@ async function createServerHandle(config4) {
5028
5083
  return res.status(404).json({ error: `MCP server '${name}' not found` });
5029
5084
  }
5030
5085
  mcpManager.removeServer(name);
5031
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5MVFHLP.js");
5086
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5GNT4UT.js");
5032
5087
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5033
5088
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
5034
5089
  delete updatedMcpServers[name];
@@ -5053,7 +5108,7 @@ async function createServerHandle(config4) {
5053
5108
  await mcpManager.setToolEnabled(name, toolName, enabled);
5054
5109
  const server = mcpManager.getServer(name);
5055
5110
  if (server) {
5056
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5MVFHLP.js");
5111
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-G5GNT4UT.js");
5057
5112
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5058
5113
  const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
5059
5114
  const serverCfg = mcpServers2[name];
@@ -5248,7 +5303,7 @@ async function createServerHandle(config4) {
5248
5303
  const state = sessionManager.getContextState(sessionId);
5249
5304
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
5250
5305
  });
5251
- const { QueueProcessor } = await import("./processor-X53RROTI.js");
5306
+ const { QueueProcessor } = await import("./processor-MHNIP32O.js");
5252
5307
  const queueProcessor = new QueueProcessor({
5253
5308
  sessionManager,
5254
5309
  providerManager,
@@ -5323,4 +5378,4 @@ export {
5323
5378
  createServerHandle,
5324
5379
  createServer
5325
5380
  };
5326
- //# sourceMappingURL=chunk-4GBKQZ2U.js.map
5381
+ //# sourceMappingURL=chunk-HSXSRVW2.js.map
@@ -933,7 +933,8 @@ var envSchema = z.object({
933
933
  OPENFOX_DISABLE_THINKING: z.coerce.boolean().default(false),
934
934
  OPENFOX_LLM_TIMEOUT: z.coerce.number().default(3e5),
935
935
  OPENFOX_LLM_IDLE_TIMEOUT: z.coerce.number().default(3e5),
936
- OPENFOX_DEV: z.coerce.boolean().default(false)
936
+ OPENFOX_DEV: z.coerce.boolean().default(false),
937
+ OPENFOX_DISABLE_AUTO_SESSION_TITLE: z.coerce.boolean().optional()
937
938
  });
938
939
  function loadConfig() {
939
940
  const env = envSchema.parse(process.env);
@@ -966,7 +967,8 @@ function loadConfig() {
966
967
  path: env.OPENFOX_DB_PATH
967
968
  },
968
969
  mode: env.OPENFOX_DEV ? "development" : "production",
969
- workdir
970
+ workdir,
971
+ ...env.OPENFOX_DISABLE_AUTO_SESSION_TITLE !== void 0 ? { disableAutoSessionTitle: env.OPENFOX_DISABLE_AUTO_SESSION_TITLE } : {}
970
972
  };
971
973
  }
972
974
 
@@ -1432,4 +1434,4 @@ export {
1432
1434
  truncateSessionMessages,
1433
1435
  getRecentUserPromptsForSession
1434
1436
  };
1435
- //# sourceMappingURL=chunk-BSDMJT53.js.map
1437
+ //# sourceMappingURL=chunk-LB3E24TN.js.map
@@ -39,7 +39,7 @@ Options:
39
39
  }
40
40
  async function runNetworkSetup(mode) {
41
41
  const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-YY5PJYSC.js");
42
- const { saveGlobalConfig } = await import("./config-G5MVFHLP.js");
42
+ const { saveGlobalConfig } = await import("./config-G5GNT4UT.js");
43
43
  const { getAuthKeyPath } = await import("./paths-F27V3S4I.js");
44
44
  const existingAuth = await loadAuthConfig(mode);
45
45
  if (existingAuth) {
@@ -106,7 +106,7 @@ async function runNetworkSetup(mode) {
106
106
  console.log("\u2713 Configuration saved!\n");
107
107
  }
108
108
  async function runConfig(mode) {
109
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-G5MVFHLP.js");
109
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-G5GNT4UT.js");
110
110
  const { getGlobalConfigPath } = await import("./paths-F27V3S4I.js");
111
111
  const config = await loadGlobalConfig(mode);
112
112
  const configPath = getGlobalConfigPath(mode);
@@ -164,7 +164,7 @@ async function runCli(options) {
164
164
  break;
165
165
  }
166
166
  case "provider": {
167
- const { runProviderCommand } = await import("./provider-DLH5GJH2.js");
167
+ const { runProviderCommand } = await import("./provider-BYKY7BS3.js");
168
168
  const [, subcommand] = positionals;
169
169
  await runProviderCommand(mode, subcommand);
170
170
  break;
@@ -203,12 +203,12 @@ async function runCli(options) {
203
203
  break;
204
204
  }
205
205
  default: {
206
- const { configFileExists } = await import("./config-G5MVFHLP.js");
206
+ const { configFileExists } = await import("./config-G5GNT4UT.js");
207
207
  const configExists = await configFileExists(mode);
208
208
  if (!configExists) {
209
209
  await runNetworkSetup(mode);
210
210
  }
211
- const { runServe } = await import("./serve-XY327IVV.js");
211
+ const { runServe } = await import("./serve-TKOKRJTR.js");
212
212
  const serveOptions = { mode };
213
213
  if (values.port) serveOptions.port = parseInt(values.port);
214
214
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -220,4 +220,4 @@ async function runCli(options) {
220
220
  export {
221
221
  runCli
222
222
  };
223
- //# sourceMappingURL=chunk-OBKCUYR5.js.map
223
+ //# sourceMappingURL=chunk-LNE4QPNW.js.map
@@ -32,7 +32,7 @@ import {
32
32
  SETTINGS_KEYS,
33
33
  deleteSetting,
34
34
  getSetting
35
- } from "./chunk-JNSSFTVD.js";
35
+ } from "./chunk-CDRQJDSJ.js";
36
36
  import {
37
37
  getProject
38
38
  } from "./chunk-YQ3SOPBI.js";
@@ -55,7 +55,7 @@ import {
55
55
  getCurrentWindowMessageOptions,
56
56
  getEventStore,
57
57
  getRuntimeConfig
58
- } from "./chunk-BSDMJT53.js";
58
+ } from "./chunk-LB3E24TN.js";
59
59
  import {
60
60
  buildContextMessagesFromEventHistory,
61
61
  foldContextState,
@@ -71,7 +71,7 @@ import {
71
71
  import {
72
72
  loadGlobalConfig,
73
73
  saveGlobalConfig
74
- } from "./chunk-K3NOKF5A.js";
74
+ } from "./chunk-C7NO4BBK.js";
75
75
  import {
76
76
  getGlobalConfigDir
77
77
  } from "./chunk-CQGTEGKL.js";
@@ -2455,6 +2455,31 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
2455
2455
  let returnValueNudgeCount = 0;
2456
2456
  for (; ; ) {
2457
2457
  if (signal?.aborted) throw new Error("Aborted");
2458
+ if (config.warmup) {
2459
+ const session2 = sessionManager.requireSession(sessionId);
2460
+ const runtimeConfig2 = getRuntimeConfig();
2461
+ const configDir2 = getGlobalConfigDir(runtimeConfig2.mode ?? "production");
2462
+ const skills2 = await getEnabledSkillMetadata(configDir2, runtimeConfig2.workdir);
2463
+ const { content: instructionContent2 } = await getAllInstructions(session2.workdir, session2.projectId);
2464
+ const toolRegistry2 = config.getToolRegistry();
2465
+ const assembledRequest2 = await config.assembleRequest({
2466
+ workdir: session2.workdir,
2467
+ messages: [],
2468
+ injectedFiles: [],
2469
+ promptTools: toolRegistry2.definitions,
2470
+ toolChoice: "none",
2471
+ ...instructionContent2 ? { customInstructions: instructionContent2 } : {},
2472
+ ...skills2.length > 0 ? { skills: skills2 } : {}
2473
+ });
2474
+ await llmClient.complete({
2475
+ messages: [{ role: "system", content: assembledRequest2.systemPrompt }],
2476
+ tools: assembledRequest2.tools,
2477
+ maxTokens: 1,
2478
+ temperature: 0,
2479
+ skipClientReasoningEffort: true
2480
+ });
2481
+ return {};
2482
+ }
2458
2483
  const session = sessionManager.requireSession(sessionId);
2459
2484
  if (retryLimiter.count() === 0) {
2460
2485
  await config.injectKickoff?.();
@@ -2581,7 +2606,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
2581
2606
  sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
2582
2607
  if (!compacting) {
2583
2608
  const contextState2 = sessionManager.getContextState(sessionId);
2584
- const { shouldCompact, appendCompactionPrompt } = await import("./compactor-LQ46XQJV.js");
2609
+ const { shouldCompact, appendCompactionPrompt } = await import("./compactor-VIN5YWQF.js");
2585
2610
  if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
2586
2611
  appendCompactionPrompt(sessionId, append);
2587
2612
  compacting = true;
@@ -2938,7 +2963,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
2938
2963
  import { createHash as createHash2 } from "crypto";
2939
2964
  async function loadVisionModelFromGlobalConfig() {
2940
2965
  try {
2941
- const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-G5MVFHLP.js");
2966
+ const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-G5GNT4UT.js");
2942
2967
  const runtimeConfig = getRuntimeConfig();
2943
2968
  const mode = runtimeConfig.mode ?? "production";
2944
2969
  const globalConfig = await loadGlobalConfig2(mode);
@@ -3452,7 +3477,7 @@ var callSubAgentTool = {
3452
3477
  };
3453
3478
  }
3454
3479
  try {
3455
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ZPKIMLNI.js");
3480
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-UMI2IMYI.js");
3456
3481
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3457
3482
  const turnMetrics = new TurnMetrics();
3458
3483
  const result = await executeSubAgent({
@@ -4268,7 +4293,7 @@ function resolveAgentDef2(sessionManager, sessionId) {
4268
4293
  }
4269
4294
  async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
4270
4295
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
4271
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ZPKIMLNI.js");
4296
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-UMI2IMYI.js");
4272
4297
  const tools = getToolRegistryForAgent2(agentDef).definitions;
4273
4298
  const toolFingerprint = getToolFingerprint(tools);
4274
4299
  const allAgents = await loadAllAgentsDefault();
@@ -4281,7 +4306,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
4281
4306
  async function computeSessionHash(sessionManager, sessionId) {
4282
4307
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
4283
4308
  const agentDef = await resolveAgentDef2(sessionManager, sessionId);
4284
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ZPKIMLNI.js");
4309
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-UMI2IMYI.js");
4285
4310
  const tools = getToolRegistryForAgent2(agentDef).definitions;
4286
4311
  const toolFingerprint = getToolFingerprint(tools);
4287
4312
  return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -4388,7 +4413,7 @@ var mcpConfigTool = createTool(
4388
4413
  await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated });
4389
4414
  }
4390
4415
  async function rebuildTools() {
4391
- const { setMcpTools: setMcpTools2 } = await import("./tools-ZPKIMLNI.js");
4416
+ const { setMcpTools: setMcpTools2 } = await import("./tools-UMI2IMYI.js");
4392
4417
  const mcpTools = createMcpTools(mcpManagerForTools);
4393
4418
  setMcpTools2(mcpTools);
4394
4419
  }
@@ -5058,4 +5083,4 @@ export {
5058
5083
  getToolRegistryForAgent,
5059
5084
  createToolRegistry
5060
5085
  };
5061
- //# sourceMappingURL=chunk-CTGMHRHD.js.map
5086
+ //# sourceMappingURL=chunk-MH73ZSPY.js.map
@@ -7,8 +7,9 @@ import {
7
7
  } from "./chunk-EU3WWTFH.js";
8
8
  import {
9
9
  getEventStore,
10
+ getRuntimeConfig,
10
11
  updateSessionMetadata
11
- } from "./chunk-BSDMJT53.js";
12
+ } from "./chunk-LB3E24TN.js";
12
13
  import {
13
14
  buildMessagesFromStoredEvents,
14
15
  foldPendingConfirmations
@@ -115,6 +116,10 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
115
116
  const { sessionManager, providerManager, broadcastForSession, eventStore } = deps;
116
117
  const session = sessionManager.getSession(sessionId);
117
118
  if (!session) return;
119
+ if (getRuntimeConfig().disableAutoSessionTitle) {
120
+ logger.debug("Session name generation disabled by config", { sessionId });
121
+ return;
122
+ }
118
123
  const messageCount = getSessionMessageCount(sessionId);
119
124
  if (!needsNameGenerationCheck(sessionId, session.metadata.title, messageCount)) return;
120
125
  const providerConfig = resolveSessionProvider(session, providerManager);
@@ -126,7 +131,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
126
131
  client = deps.getLLMClient();
127
132
  client.setModel(providerConfig.model);
128
133
  } else if (providerConfig) {
129
- const { createLLMClient } = await import("./client-ZUL4AR4J.js");
134
+ const { createLLMClient } = await import("./client-5FOFNUXM.js");
130
135
  client = createLLMClient({
131
136
  llm: {
132
137
  baseUrl: providerConfig.baseUrl,
@@ -175,4 +180,4 @@ export {
175
180
  buildRunChatTurnParams,
176
181
  generateSessionNameForSession
177
182
  };
178
- //# sourceMappingURL=chunk-QOZ2DIWF.js.map
183
+ //# sourceMappingURL=chunk-U62IKLKM.js.map
@@ -44,11 +44,7 @@ var OpenAIHttpClient = class {
44
44
  Authorization: `Bearer ${this.apiKey}`
45
45
  };
46
46
  const bodyStr = JSON.stringify(params);
47
- logger.debug("HTTP request to LLM", {
48
- url,
49
- body: bodyStr.slice(0, 2e3),
50
- bodyKeys: Object.keys(params)
51
- });
47
+ logger.debug("HTTP request to LLM", { url, bodyKeys: Object.keys(params) });
52
48
  const response = await fetch(url, {
53
49
  method: "POST",
54
50
  headers,
@@ -121,4 +117,4 @@ export {
121
117
  LLMError,
122
118
  OpenAIHttpClient
123
119
  };
124
- //# sourceMappingURL=chunk-IEDE6VK4.js.map
120
+ //# sourceMappingURL=chunk-UFFLA4W6.js.map