openfox 2.0.56 → 2.0.58

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 (41) hide show
  1. package/dist/{auto-config-F5Y6KAQ6.js → auto-config-T5GR2N6X.js} +20 -1
  2. package/dist/{backend-B23GIKKD.js → backend-P3GHHLHJ.js} +2 -2
  3. package/dist/{chat-handler-TVFUXHXP.js → chat-handler-W5D5LKKU.js} +9 -9
  4. package/dist/{chunk-ITN5PD7H.js → chunk-55VITQP3.js} +6 -6
  5. package/dist/{chunk-VZHN46NW.js → chunk-6VDCH5ML.js} +2 -2
  6. package/dist/{chunk-CYJEQF7U.js → chunk-ADOXTORQ.js} +9 -1
  7. package/dist/{chunk-OCILP3SJ.js → chunk-BIWVYBIE.js} +2 -2
  8. package/dist/{chunk-7VFX3QXQ.js → chunk-CFLGVCYT.js} +7 -7
  9. package/dist/{chunk-4566MTWM.js → chunk-GJU35MDV.js} +2 -2
  10. package/dist/{chunk-R2QCDYYR.js → chunk-H774GQJW.js} +53 -2
  11. package/dist/{chunk-ZZLCX7YT.js → chunk-JKLPWTUN.js} +2 -2
  12. package/dist/{chunk-H5YF6DVQ.js → chunk-LAWUUAN7.js} +15 -14
  13. package/dist/{chunk-UOKVBO67.js → chunk-NVPVDDQZ.js} +2 -2
  14. package/dist/{chunk-YVRGXDIX.js → chunk-UDZNMYWN.js} +82 -49
  15. package/dist/{chunk-4R6YPRLX.js → chunk-XR2XC7WM.js} +3 -3
  16. package/dist/{chunk-PSJON33Y.js → chunk-YHEQTVFV.js} +7 -1
  17. package/dist/{chunk-QQ5XY6BH.js → chunk-YMEZFRY2.js} +12 -2
  18. package/dist/cli/dev.js +1 -1
  19. package/dist/cli/index.js +1 -1
  20. package/dist/{client-Y3ESMMZA.js → client-KRFGMNGN.js} +3 -3
  21. package/dist/{compactor-ZKZYSNMD.js → compactor-Q33AJPCQ.js} +4 -4
  22. package/dist/{config-5ZHFKWOW.js → config-C2YDEF3N.js} +2 -2
  23. package/dist/{manager-FV4BDEVU.js → manager-CZOVNTSN.js} +3 -3
  24. package/dist/{orchestrator-ZBWWJZPN.js → orchestrator-Q47D6JXG.js} +8 -8
  25. package/dist/package.json +1 -1
  26. package/dist/{processor-KXXQKBQV.js → processor-2YJ33KUH.js} +9 -9
  27. package/dist/{protocol-DRe5K6Id.d.ts → protocol-PSKVUhdN.d.ts} +1 -1
  28. package/dist/{provider-V6Q6WJAF.js → provider-SNXYPSPH.js} +6 -6
  29. package/dist/{provider-manager-PR64DEN2.js → provider-manager-ABEUYU3K.js} +4 -4
  30. package/dist/{serve-QD3KZNSX.js → serve-LOPGRMFP.js} +13 -13
  31. package/dist/server/index.d.ts +3 -3
  32. package/dist/server/index.js +12 -12
  33. package/dist/{server-URL2FOSC.js → server-XUDZRBD3.js} +11 -11
  34. package/dist/shared/index.d.ts +2 -2
  35. package/dist/{store-TTU4UQQ7.js → store-NS2RMRA7.js} +2 -2
  36. package/dist/{tools-3ULXCV6F.js → tools-YJLXW3QS.js} +7 -7
  37. package/dist/web/assets/{index-CvIUuius.css → index-DjfRXOO7.css} +1 -1
  38. package/dist/web/assets/{index-CRW5qofP.js → index-Dqqp_j-f.js} +71 -71
  39. package/dist/web/index.html +2 -2
  40. package/dist/web/sw.js +1 -1
  41. package/package.json +1 -1
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-7VFX3QXQ.js";
24
+ } from "./chunk-CFLGVCYT.js";
25
25
  import {
26
26
  agentExists,
27
27
  createToolRegistry,
@@ -61,11 +61,11 @@ import {
61
61
  setMcpTools,
62
62
  setNotifyMcpServersChanged,
63
63
  skillExists
64
- } from "./chunk-H5YF6DVQ.js";
64
+ } from "./chunk-LAWUUAN7.js";
65
65
  import {
66
66
  getPathSeparator,
67
67
  isAbsolutePath
68
- } from "./chunk-OCILP3SJ.js";
68
+ } from "./chunk-BIWVYBIE.js";
69
69
  import {
70
70
  createMcpTools
71
71
  } from "./chunk-NWO6GRYE.js";
@@ -82,7 +82,7 @@ import {
82
82
  ALWAYS_ALLOWED,
83
83
  ALWAYS_ALLOWED_FOR_SUBAGENTS,
84
84
  TOP_LEVEL_ONLY_TOOLS
85
- } from "./chunk-VZHN46NW.js";
85
+ } from "./chunk-6VDCH5ML.js";
86
86
  import {
87
87
  createSession,
88
88
  deleteSession,
@@ -116,14 +116,14 @@ import {
116
116
  import {
117
117
  createProviderManager,
118
118
  parseDefaultModelSelection
119
- } from "./chunk-R2QCDYYR.js";
119
+ } from "./chunk-H774GQJW.js";
120
120
  import {
121
121
  detectModel,
122
122
  getLlmStatus
123
123
  } from "./chunk-M3RB4IF6.js";
124
124
  import {
125
125
  getBackendDisplayName
126
- } from "./chunk-PSJON33Y.js";
126
+ } from "./chunk-YHEQTVFV.js";
127
127
  import {
128
128
  buildModelsUrl
129
129
  } from "./chunk-HNCM3D7Y.js";
@@ -2506,9 +2506,20 @@ var SessionManager = class {
2506
2506
  constructor(providerManager) {
2507
2507
  this.providerManager = providerManager;
2508
2508
  }
2509
- getCurrentModelSettings() {
2510
- const model = this.providerManager.getCurrentModel();
2511
- const providerId = this.providerManager.getActiveProviderId();
2509
+ getCurrentModelSettings(sessionId) {
2510
+ let providerId;
2511
+ let model;
2512
+ if (sessionId) {
2513
+ const session = this.getSession(sessionId);
2514
+ if (session?.providerId && session?.providerModel) {
2515
+ providerId = session.providerId;
2516
+ model = session.providerModel;
2517
+ }
2518
+ }
2519
+ if (!providerId || !model) {
2520
+ model = this.providerManager.getCurrentModel();
2521
+ providerId = this.providerManager.getActiveProviderId();
2522
+ }
2512
2523
  if (!model || !providerId) return void 0;
2513
2524
  return this.providerManager.getModelSettings(providerId, model);
2514
2525
  }
@@ -3849,7 +3860,7 @@ import { Router as Router7 } from "express";
3849
3860
  import { spawn as spawn2 } from "child_process";
3850
3861
 
3851
3862
  // src/constants.ts
3852
- var VERSION = "2.0.56";
3863
+ var VERSION = "2.0.58";
3853
3864
 
3854
3865
  // src/server/routes/auto-update.ts
3855
3866
  var updateInProgress = false;
@@ -4020,7 +4031,7 @@ async function createServerHandle(config4) {
4020
4031
  const mcpManager = new McpManager({
4021
4032
  onToolsDiscovered: async (name, tools) => {
4022
4033
  try {
4023
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-5ZHFKWOW.js");
4034
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
4024
4035
  const mode = config4.mode ?? "production";
4025
4036
  const globalConfig = await loadGlobalConfig(mode);
4026
4037
  const mcpServers2 = {
@@ -4050,7 +4061,7 @@ async function createServerHandle(config4) {
4050
4061
  setMcpTools(mcpTools);
4051
4062
  logger.info("MCP tools registered", { count: mcpTools.length });
4052
4063
  }
4053
- const { signalMcpReady } = await import("./server-URL2FOSC.js");
4064
+ const { signalMcpReady } = await import("./server-XUDZRBD3.js");
4054
4065
  signalMcpReady();
4055
4066
  });
4056
4067
  const app = express();
@@ -4243,7 +4254,7 @@ async function createServerHandle(config4) {
4243
4254
  app.get("/api/sessions/:id", async (req, res) => {
4244
4255
  const { getEventStore: getEventStore2 } = await import("./events-52XADT6Y.js");
4245
4256
  const { buildMessagesFromStoredEvents } = await import("./folding-2BGFLV5J.js");
4246
- const { getPendingQuestionsForSession } = await import("./tools-3ULXCV6F.js");
4257
+ const { getPendingQuestionsForSession } = await import("./tools-YJLXW3QS.js");
4247
4258
  const session = sessionManager.getSession(req.params.id);
4248
4259
  if (!session) {
4249
4260
  return res.status(404).json({ error: "Session not found" });
@@ -4262,8 +4273,8 @@ async function createServerHandle(config4) {
4262
4273
  if (!session) {
4263
4274
  return res.status(404).json({ error: "Session not found" });
4264
4275
  }
4265
- const { stopSessionExecution } = await import("./chat-handler-TVFUXHXP.js");
4266
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-3ULXCV6F.js");
4276
+ const { stopSessionExecution } = await import("./chat-handler-W5D5LKKU.js");
4277
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YJLXW3QS.js");
4267
4278
  sessionManager.clearMessageQueue(sessionId);
4268
4279
  stopSessionExecution(sessionId, sessionManager);
4269
4280
  abortSession(sessionId);
@@ -4316,7 +4327,7 @@ async function createServerHandle(config4) {
4316
4327
  if (!result.success) {
4317
4328
  return res.status(500).json({ error: result.error ?? "Failed to set default model" });
4318
4329
  }
4319
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-5ZHFKWOW.js");
4330
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-C2YDEF3N.js");
4320
4331
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4321
4332
  const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model);
4322
4333
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4417,7 +4428,7 @@ async function createServerHandle(config4) {
4417
4428
  if (!callId || approved === void 0) {
4418
4429
  return res.status(400).json({ error: "callId and approved are required" });
4419
4430
  }
4420
- const { providePathConfirmation } = await import("./tools-3ULXCV6F.js");
4431
+ const { providePathConfirmation } = await import("./tools-YJLXW3QS.js");
4421
4432
  const result = providePathConfirmation(callId, approved, alwaysAllow);
4422
4433
  if (!result.found) {
4423
4434
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -4425,7 +4436,7 @@ async function createServerHandle(config4) {
4425
4436
  const { getEventStore: getEventStore2 } = await import("./events-52XADT6Y.js");
4426
4437
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-2BGFLV5J.js");
4427
4438
  const { createSessionStateMessage } = await import("./protocol-CTNE3ANP.js");
4428
- const { getPendingQuestionsForSession } = await import("./tools-3ULXCV6F.js");
4439
+ const { getPendingQuestionsForSession } = await import("./tools-YJLXW3QS.js");
4429
4440
  const eventStore = getEventStore2();
4430
4441
  const events = eventStore.getEvents(sessionId);
4431
4442
  const messages = buildMessagesFromStoredEvents(events);
@@ -4446,7 +4457,7 @@ async function createServerHandle(config4) {
4446
4457
  if (!skip && typeof answer !== "string") {
4447
4458
  return res.status(400).json({ error: "answer is required when not skipping" });
4448
4459
  }
4449
- const { provideAnswer } = await import("./tools-3ULXCV6F.js");
4460
+ const { provideAnswer } = await import("./tools-YJLXW3QS.js");
4450
4461
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
4451
4462
  if (!found) {
4452
4463
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -4484,18 +4495,35 @@ async function createServerHandle(config4) {
4484
4495
  if (sessionManager.isWarmedUp(sessionId)) {
4485
4496
  return res.json({ success: false, reason: "already_warmed" });
4486
4497
  }
4487
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-ZBWWJZPN.js");
4498
+ if (session.providerId && session.providerModel) {
4499
+ const currentActiveProviderId = providerManager.getActiveProviderId();
4500
+ const currentModel = providerManager.getCurrentModel();
4501
+ if (currentActiveProviderId !== session.providerId || currentModel !== session.providerModel) {
4502
+ const result = await providerManager.activateProvider(session.providerId, { model: session.providerModel });
4503
+ if (!result.success) {
4504
+ logger.error("Failed to activate session provider for warmup", {
4505
+ sessionId,
4506
+ providerId: session.providerId,
4507
+ error: result.error
4508
+ });
4509
+ }
4510
+ }
4511
+ }
4512
+ const llmClient = getLLMClient();
4513
+ const activeProvider = providerManager.getActiveProvider();
4514
+ const statsIdentity = {
4515
+ providerId: activeProvider?.id ?? `provider:${llmClient.getModel()}`,
4516
+ providerName: activeProvider?.name ?? "Unknown Provider",
4517
+ backend: activeProvider?.backend ?? llmClient.getBackend(),
4518
+ model: llmClient.getModel()
4519
+ };
4520
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-Q47D6JXG.js");
4488
4521
  runAgentTurn(
4489
4522
  {
4490
4523
  sessionManager,
4491
4524
  sessionId,
4492
- llmClient: getLLMClient(),
4493
- statsIdentity: {
4494
- providerId: "warmup",
4495
- providerName: "Warmup",
4496
- backend: getLLMClient().getBackend(),
4497
- model: getLLMClient().getModel()
4498
- },
4525
+ llmClient,
4526
+ statsIdentity,
4499
4527
  onMessage: () => {
4500
4528
  },
4501
4529
  warmup: true
@@ -4527,8 +4555,8 @@ async function createServerHandle(config4) {
4527
4555
  if (!session) {
4528
4556
  return res.status(404).json({ error: "Session not found" });
4529
4557
  }
4530
- const { stopSessionExecution } = await import("./chat-handler-TVFUXHXP.js");
4531
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-3ULXCV6F.js");
4558
+ const { stopSessionExecution } = await import("./chat-handler-W5D5LKKU.js");
4559
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YJLXW3QS.js");
4532
4560
  const queuedMessages = sessionManager.getQueueState(sessionId);
4533
4561
  sessionManager.clearMessageQueue(sessionId);
4534
4562
  stopSessionExecution(sessionId, sessionManager);
@@ -4648,7 +4676,7 @@ async function createServerHandle(config4) {
4648
4676
  let visionFallback;
4649
4677
  let globalWorkdir;
4650
4678
  try {
4651
- const { loadGlobalConfig, getVisionFallback } = await import("./config-5ZHFKWOW.js");
4679
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-C2YDEF3N.js");
4652
4680
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4653
4681
  const fallback = getVisionFallback(globalConfig);
4654
4682
  if (fallback) {
@@ -4744,11 +4772,16 @@ async function createServerHandle(config4) {
4744
4772
  app.get("/api/providers/models", async (req, res) => {
4745
4773
  const url = req.query["url"];
4746
4774
  const apiKey = req.query["apiKey"];
4775
+ const backend = req.query["backend"];
4747
4776
  if (!url) return res.status(400).json({ error: "url is required" });
4748
4777
  try {
4749
- const { fetchModelsWithContext } = await import("./provider-manager-PR64DEN2.js");
4778
+ const { fetchModelsWithContext } = await import("./provider-manager-ABEUYU3K.js");
4750
4779
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
4751
- const models = await fetchModelsWithContext(url, apiKey);
4780
+ const models = await fetchModelsWithContext(
4781
+ url,
4782
+ apiKey,
4783
+ backend
4784
+ );
4752
4785
  if (models.length === 0) {
4753
4786
  return res.status(404).json({ error: `No models found at ${buildModelsUrl(url)}`, url });
4754
4787
  }
@@ -4778,7 +4811,7 @@ async function createServerHandle(config4) {
4778
4811
  if (!url) return res.status(400).json({ error: "url is required" });
4779
4812
  if (!models?.length) return res.status(400).json({ error: "models is required" });
4780
4813
  try {
4781
- const { autoConfig } = await import("./auto-config-F5Y6KAQ6.js");
4814
+ const { autoConfig } = await import("./auto-config-T5GR2N6X.js");
4782
4815
  const result = await autoConfig({
4783
4816
  url,
4784
4817
  ...apiKey ? { apiKey } : {},
@@ -4797,7 +4830,7 @@ async function createServerHandle(config4) {
4797
4830
  if (!mode) return res.status(400).json({ error: "mode is required" });
4798
4831
  try {
4799
4832
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
4800
- const { getBackendCapabilities } = await import("./backend-B23GIKKD.js");
4833
+ const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
4801
4834
  const { buildNonStreamingCreateParams } = await import("./client-pure-DO3S675T.js");
4802
4835
  const { OpenAIHttpClient } = await import("./http-client-PIWB7BXK.js");
4803
4836
  const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
@@ -4866,7 +4899,7 @@ async function createServerHandle(config4) {
4866
4899
  return res.status(400).json({ error: "name, url, and backend are required" });
4867
4900
  }
4868
4901
  try {
4869
- const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-5ZHFKWOW.js");
4902
+ const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-C2YDEF3N.js");
4870
4903
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4871
4904
  const providerBackend = backend;
4872
4905
  const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
@@ -4904,7 +4937,7 @@ async function createServerHandle(config4) {
4904
4937
  app.post("/api/init/config", async (req, res) => {
4905
4938
  const { workdir, visionFallback } = req.body;
4906
4939
  try {
4907
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-5ZHFKWOW.js");
4940
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
4908
4941
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4909
4942
  const updatedConfig = {
4910
4943
  ...globalConfig,
@@ -4932,7 +4965,7 @@ async function createServerHandle(config4) {
4932
4965
  });
4933
4966
  app.delete("/api/providers/:id", async (req, res) => {
4934
4967
  const { id } = req.params;
4935
- const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-5ZHFKWOW.js");
4968
+ const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-C2YDEF3N.js");
4936
4969
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4937
4970
  const updatedConfig = removeProvider(globalConfig, id);
4938
4971
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4944,7 +4977,7 @@ async function createServerHandle(config4) {
4944
4977
  const { id } = req.params;
4945
4978
  const { isLocal } = req.body;
4946
4979
  try {
4947
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-5ZHFKWOW.js");
4980
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-C2YDEF3N.js");
4948
4981
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4949
4982
  const provider = globalConfig.providers.find((p) => p.id === id);
4950
4983
  if (!provider) {
@@ -4973,7 +5006,7 @@ async function createServerHandle(config4) {
4973
5006
  models: modelConfigs
4974
5007
  } = req.body;
4975
5008
  try {
4976
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-5ZHFKWOW.js");
5009
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-C2YDEF3N.js");
4977
5010
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4978
5011
  const provider = globalConfig.providers.find((p) => p.id === id);
4979
5012
  if (!provider) {
@@ -5011,7 +5044,7 @@ async function createServerHandle(config4) {
5011
5044
  return res.status(400).json({ error: result.error });
5012
5045
  }
5013
5046
  const llmClient = getLLMClient();
5014
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-5ZHFKWOW.js");
5047
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-C2YDEF3N.js");
5015
5048
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5016
5049
  const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
5017
5050
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -5038,7 +5071,7 @@ async function createServerHandle(config4) {
5038
5071
  });
5039
5072
  async function rebuildMcpTools() {
5040
5073
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
5041
- const { setMcpTools: setMcpTools2 } = await import("./tools-3ULXCV6F.js");
5074
+ const { setMcpTools: setMcpTools2 } = await import("./tools-YJLXW3QS.js");
5042
5075
  const mcpTools = createMcpTools2(mcpManager);
5043
5076
  setMcpTools2(mcpTools);
5044
5077
  }
@@ -5100,7 +5133,7 @@ async function createServerHandle(config4) {
5100
5133
  };
5101
5134
  await mcpManager.addServer(name, serverCfg);
5102
5135
  const server = mcpManager.getServer(name);
5103
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-5ZHFKWOW.js");
5136
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
5104
5137
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5105
5138
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
5106
5139
  await saveGlobalConfig(config4.mode ?? "production", {
@@ -5126,7 +5159,7 @@ async function createServerHandle(config4) {
5126
5159
  return res.status(404).json({ error: `MCP server '${name}' not found` });
5127
5160
  }
5128
5161
  mcpManager.removeServer(name);
5129
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-5ZHFKWOW.js");
5162
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
5130
5163
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5131
5164
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
5132
5165
  delete updatedMcpServers[name];
@@ -5151,7 +5184,7 @@ async function createServerHandle(config4) {
5151
5184
  await mcpManager.setToolEnabled(name, toolName, enabled);
5152
5185
  const server = mcpManager.getServer(name);
5153
5186
  if (server) {
5154
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-5ZHFKWOW.js");
5187
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
5155
5188
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5156
5189
  const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
5157
5190
  const serverCfg = mcpServers2[name];
@@ -5197,13 +5230,13 @@ async function createServerHandle(config4) {
5197
5230
  })
5198
5231
  );
5199
5232
  app.get("/api/sessions/:id/background-processes", async (req, res) => {
5200
- const { getSessionProcesses } = await import("./manager-FV4BDEVU.js");
5233
+ const { getSessionProcesses } = await import("./manager-CZOVNTSN.js");
5201
5234
  const sessionId = req.params.id;
5202
5235
  const processes = getSessionProcesses(sessionId);
5203
5236
  res.json({ processes });
5204
5237
  });
5205
5238
  app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
5206
- const { stopProcess } = await import("./manager-FV4BDEVU.js");
5239
+ const { stopProcess } = await import("./manager-CZOVNTSN.js");
5207
5240
  const sessionId = req.params.id;
5208
5241
  const processId = req.params.processId;
5209
5242
  const session = sessionManager.getSession(sessionId);
@@ -5346,7 +5379,7 @@ async function createServerHandle(config4) {
5346
5379
  const state = sessionManager.getContextState(sessionId);
5347
5380
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
5348
5381
  });
5349
- const { QueueProcessor } = await import("./processor-KXXQKBQV.js");
5382
+ const { QueueProcessor } = await import("./processor-2YJ33KUH.js");
5350
5383
  const queueProcessor = new QueueProcessor({
5351
5384
  sessionManager,
5352
5385
  providerManager,
@@ -5389,7 +5422,7 @@ async function createServerHandle(config4) {
5389
5422
  await mcpManager.disconnectAll();
5390
5423
  const { stopAllInspectProxies } = await import("./inspect-proxy-BV25JERQ.js");
5391
5424
  stopAllInspectProxies();
5392
- const { cleanupAllProcesses } = await import("./store-TTU4UQQ7.js");
5425
+ const { cleanupAllProcesses } = await import("./store-NS2RMRA7.js");
5393
5426
  cleanupAllProcesses();
5394
5427
  viteServer?.close();
5395
5428
  for (const client of wss.clients) {
@@ -5421,4 +5454,4 @@ export {
5421
5454
  createServerHandle,
5422
5455
  createServer
5423
5456
  };
5424
- //# sourceMappingURL=chunk-YVRGXDIX.js.map
5457
+ //# sourceMappingURL=chunk-UDZNMYWN.js.map
@@ -12,7 +12,7 @@ import {
12
12
  loadAllAgentsDefault,
13
13
  processEventsForConversation,
14
14
  runTopLevelAgentLoop
15
- } from "./chunk-H5YF6DVQ.js";
15
+ } from "./chunk-LAWUUAN7.js";
16
16
  import {
17
17
  TurnMetrics,
18
18
  WORKFLOW_KICKOFF_PROMPT,
@@ -20,7 +20,7 @@ import {
20
20
  buildAgentSmallReminder,
21
21
  createChatDoneEvent,
22
22
  createMessageStartEvent
23
- } from "./chunk-VZHN46NW.js";
23
+ } from "./chunk-6VDCH5ML.js";
24
24
  import {
25
25
  getCurrentContextWindowId,
26
26
  getCurrentWindowMessageOptions,
@@ -324,4 +324,4 @@ export {
324
324
  runAgentTurn,
325
325
  injectWorkflowKickoffIfNeeded
326
326
  };
327
- //# sourceMappingURL=chunk-4R6YPRLX.js.map
327
+ //# sourceMappingURL=chunk-XR2XC7WM.js.map
@@ -24,6 +24,10 @@ var BACKEND_CAPABILITIES = {
24
24
  supportsChatTemplateKwargs: false,
25
25
  supportsTopK: true
26
26
  },
27
+ lmstudio: {
28
+ supportsChatTemplateKwargs: false,
29
+ supportsTopK: true
30
+ },
27
31
  "opencode-go": {
28
32
  supportsChatTemplateKwargs: false,
29
33
  supportsTopK: true
@@ -46,6 +50,8 @@ function getBackendDisplayName(backend) {
46
50
  return "Ollama";
47
51
  case "llamacpp":
48
52
  return "llama.cpp";
53
+ case "lmstudio":
54
+ return "LM Studio";
49
55
  case "opencode-go":
50
56
  return "OpenCode Go";
51
57
  case "openai":
@@ -61,4 +67,4 @@ export {
61
67
  getBackendCapabilities,
62
68
  getBackendDisplayName
63
69
  };
64
- //# sourceMappingURL=chunk-PSJON33Y.js.map
70
+ //# sourceMappingURL=chunk-YHEQTVFV.js.map
@@ -16,7 +16,17 @@ async function configFileExists(mode) {
16
16
  return false;
17
17
  }
18
18
  }
19
- var backendSchema = z.enum(["vllm", "sglang", "ollama", "llamacpp", "openai", "anthropic", "opencode-go", "unknown"]);
19
+ var backendSchema = z.enum([
20
+ "vllm",
21
+ "sglang",
22
+ "ollama",
23
+ "llamacpp",
24
+ "lmstudio",
25
+ "openai",
26
+ "anthropic",
27
+ "opencode-go",
28
+ "unknown"
29
+ ]);
20
30
  var modelConfigSchema = z.object({
21
31
  id: z.string(),
22
32
  contextWindow: z.number(),
@@ -281,4 +291,4 @@ export {
281
291
  removeProvider,
282
292
  activateProvider
283
293
  };
284
- //# sourceMappingURL=chunk-QQ5XY6BH.js.map
294
+ //# sourceMappingURL=chunk-YMEZFRY2.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-ITN5PD7H.js";
4
+ } from "../chunk-55VITQP3.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-ITN5PD7H.js";
4
+ } from "../chunk-55VITQP3.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLLMClient
3
- } from "./chunk-ZZLCX7YT.js";
4
- import "./chunk-PSJON33Y.js";
3
+ } from "./chunk-JKLPWTUN.js";
4
+ import "./chunk-YHEQTVFV.js";
5
5
  import "./chunk-HNCM3D7Y.js";
6
6
  import "./chunk-Z6W4YHJB.js";
7
7
  import "./chunk-ZO5EXQMG.js";
@@ -11,4 +11,4 @@ import "./chunk-5WRI5ZAA.js";
11
11
  export {
12
12
  createLLMClient
13
13
  };
14
- //# sourceMappingURL=client-Y3ESMMZA.js.map
14
+ //# sourceMappingURL=client-KRFGMNGN.js.map
@@ -2,13 +2,13 @@ import {
2
2
  appendCompactionPrompt,
3
3
  getCompactionTarget,
4
4
  shouldCompact
5
- } from "./chunk-4566MTWM.js";
6
- import "./chunk-VZHN46NW.js";
5
+ } from "./chunk-GJU35MDV.js";
6
+ import "./chunk-6VDCH5ML.js";
7
7
  import "./chunk-AIJE3RYH.js";
8
8
  import "./chunk-TMUBLQFC.js";
9
9
  import "./chunk-ZPIZLTWU.js";
10
10
  import "./chunk-J2GP3J3X.js";
11
- import "./chunk-PSJON33Y.js";
11
+ import "./chunk-YHEQTVFV.js";
12
12
  import "./chunk-Z6W4YHJB.js";
13
13
  import "./chunk-K44MW7JJ.js";
14
14
  import "./chunk-V4IE7HJY.js";
@@ -18,4 +18,4 @@ export {
18
18
  getCompactionTarget,
19
19
  shouldCompact
20
20
  };
21
- //# sourceMappingURL=compactor-ZKZYSNMD.js.map
21
+ //# sourceMappingURL=compactor-Q33AJPCQ.js.map
@@ -11,7 +11,7 @@ import {
11
11
  saveGlobalConfig,
12
12
  setDefaultModelSelection,
13
13
  updateProvider
14
- } from "./chunk-QQ5XY6BH.js";
14
+ } from "./chunk-YMEZFRY2.js";
15
15
  import "./chunk-CQGTEGKL.js";
16
16
  import "./chunk-5WRI5ZAA.js";
17
17
  export {
@@ -28,4 +28,4 @@ export {
28
28
  setDefaultModelSelection,
29
29
  updateProvider
30
30
  };
31
- //# sourceMappingURL=config-5ZHFKWOW.js.map
31
+ //# sourceMappingURL=config-C2YDEF3N.js.map
@@ -6,8 +6,8 @@ import {
6
6
  onProcessEvent,
7
7
  startProcessCommand,
8
8
  stopProcess
9
- } from "./chunk-OCILP3SJ.js";
10
- import "./chunk-CYJEQF7U.js";
9
+ } from "./chunk-BIWVYBIE.js";
10
+ import "./chunk-ADOXTORQ.js";
11
11
  import "./chunk-5WRI5ZAA.js";
12
12
  export {
13
13
  createProcess,
@@ -18,4 +18,4 @@ export {
18
18
  startProcessCommand,
19
19
  stopProcess
20
20
  };
21
- //# sourceMappingURL=manager-FV4BDEVU.js.map
21
+ //# sourceMappingURL=manager-CZOVNTSN.js.map
@@ -2,11 +2,11 @@ import {
2
2
  injectWorkflowKickoffIfNeeded,
3
3
  runAgentTurn,
4
4
  runChatTurn
5
- } from "./chunk-4R6YPRLX.js";
6
- import "./chunk-H5YF6DVQ.js";
5
+ } from "./chunk-XR2XC7WM.js";
6
+ import "./chunk-LAWUUAN7.js";
7
7
  import "./chunk-LBGHZLLH.js";
8
- import "./chunk-OCILP3SJ.js";
9
- import "./chunk-CYJEQF7U.js";
8
+ import "./chunk-BIWVYBIE.js";
9
+ import "./chunk-ADOXTORQ.js";
10
10
  import "./chunk-NWO6GRYE.js";
11
11
  import "./chunk-F4PMNP7S.js";
12
12
  import "./chunk-EU3WWTFH.js";
@@ -19,16 +19,16 @@ import {
19
19
  createMessageStartEvent,
20
20
  createToolCallEvent,
21
21
  createToolResultEvent
22
- } from "./chunk-VZHN46NW.js";
22
+ } from "./chunk-6VDCH5ML.js";
23
23
  import "./chunk-AIJE3RYH.js";
24
24
  import "./chunk-TMUBLQFC.js";
25
25
  import "./chunk-ZPIZLTWU.js";
26
26
  import "./chunk-J2GP3J3X.js";
27
- import "./chunk-PSJON33Y.js";
27
+ import "./chunk-YHEQTVFV.js";
28
28
  import "./chunk-Z6W4YHJB.js";
29
29
  import "./chunk-K44MW7JJ.js";
30
30
  import "./chunk-YD6NDTKF.js";
31
- import "./chunk-QQ5XY6BH.js";
31
+ import "./chunk-YMEZFRY2.js";
32
32
  import "./chunk-CQGTEGKL.js";
33
33
  import "./chunk-V4IE7HJY.js";
34
34
  import "./chunk-5WRI5ZAA.js";
@@ -43,4 +43,4 @@ export {
43
43
  runAgentTurn,
44
44
  runChatTurn
45
45
  };
46
- //# sourceMappingURL=orchestrator-ZBWWJZPN.js.map
46
+ //# sourceMappingURL=orchestrator-Q47D6JXG.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "2.0.56",
3
+ "version": "2.0.58",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,11 +2,11 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-UOKVBO67.js";
6
- import "./chunk-H5YF6DVQ.js";
5
+ } from "./chunk-NVPVDDQZ.js";
6
+ import "./chunk-LAWUUAN7.js";
7
7
  import "./chunk-LBGHZLLH.js";
8
- import "./chunk-OCILP3SJ.js";
9
- import "./chunk-CYJEQF7U.js";
8
+ import "./chunk-BIWVYBIE.js";
9
+ import "./chunk-ADOXTORQ.js";
10
10
  import "./chunk-NWO6GRYE.js";
11
11
  import {
12
12
  createChatMessageMessage,
@@ -15,20 +15,20 @@ import {
15
15
  import "./chunk-EU3WWTFH.js";
16
16
  import "./chunk-CDRQJDSJ.js";
17
17
  import "./chunk-YQ3SOPBI.js";
18
- import "./chunk-VZHN46NW.js";
18
+ import "./chunk-6VDCH5ML.js";
19
19
  import {
20
20
  getEventStore
21
21
  } from "./chunk-AIJE3RYH.js";
22
22
  import "./chunk-TMUBLQFC.js";
23
23
  import "./chunk-ZPIZLTWU.js";
24
24
  import "./chunk-J2GP3J3X.js";
25
- import "./chunk-PSJON33Y.js";
25
+ import "./chunk-YHEQTVFV.js";
26
26
  import "./chunk-Z6W4YHJB.js";
27
27
  import {
28
28
  logger
29
29
  } from "./chunk-K44MW7JJ.js";
30
30
  import "./chunk-YD6NDTKF.js";
31
- import "./chunk-QQ5XY6BH.js";
31
+ import "./chunk-YMEZFRY2.js";
32
32
  import "./chunk-CQGTEGKL.js";
33
33
  import "./chunk-V4IE7HJY.js";
34
34
  import "./chunk-5WRI5ZAA.js";
@@ -174,7 +174,7 @@ var QueueProcessor = class {
174
174
  backend: provider?.backend ?? llmClient.getBackend(),
175
175
  model: llmClient.getModel()
176
176
  };
177
- const { runChatTurn } = await import("./orchestrator-ZBWWJZPN.js");
177
+ const { runChatTurn } = await import("./orchestrator-Q47D6JXG.js");
178
178
  const runChatTurnParams = buildRunChatTurnParams({
179
179
  sessionManager,
180
180
  sessionId,
@@ -222,4 +222,4 @@ var QueueProcessor = class {
222
222
  export {
223
223
  QueueProcessor
224
224
  };
225
- //# sourceMappingURL=processor-KXXQKBQV.js.map
225
+ //# sourceMappingURL=processor-2YJ33KUH.js.map
@@ -394,7 +394,7 @@ interface Diagnostic {
394
394
  code?: string | number;
395
395
  }
396
396
  /** Supported LLM inference backends */
397
- type LlmBackend = 'vllm' | 'sglang' | 'ollama' | 'llamacpp' | 'opencode-go' | 'unknown';
397
+ type LlmBackend = 'vllm' | 'sglang' | 'ollama' | 'llamacpp' | 'lmstudio' | 'opencode-go' | 'unknown';
398
398
  /** Extended backend type including cloud providers */
399
399
  type ProviderBackend = LlmBackend | 'openai' | 'anthropic';
400
400
  /** Model configuration with context window */