openfox 2.0.58 → 2.0.59

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 (32) hide show
  1. package/dist/agent-defaults/explorer.agent.md +4 -0
  2. package/dist/{branch.api-5DMEAIBI.js → branch.api-LAN42BA5.js} +3 -2
  3. package/dist/{chat-handler-W5D5LKKU.js → chat-handler-AS44EMQE.js} +6 -6
  4. package/dist/{chunk-YMEZFRY2.js → chunk-43UFGATL.js} +5 -5
  5. package/dist/{chunk-CFLGVCYT.js → chunk-5MDIKIMG.js} +20 -9
  6. package/dist/{chunk-BIWVYBIE.js → chunk-BGTEIA2S.js} +4 -3
  7. package/dist/{chunk-XR2XC7WM.js → chunk-EKI5SZC7.js} +2 -2
  8. package/dist/{chunk-LAWUUAN7.js → chunk-FRU2X3IZ.js} +69 -29
  9. package/dist/{chunk-UDZNMYWN.js → chunk-LQFCQ6PY.js} +95 -72
  10. package/dist/{chunk-55VITQP3.js → chunk-P7C6KF2H.js} +9 -9
  11. package/dist/{chunk-ADOXTORQ.js → chunk-PK2RMVMB.js} +2 -2
  12. package/dist/cli/dev.js +2 -2
  13. package/dist/cli/index.js +2 -2
  14. package/dist/{config-C2YDEF3N.js → config-GMQUPNBY.js} +2 -2
  15. package/dist/{manager-CZOVNTSN.js → manager-344C5JLZ.js} +3 -3
  16. package/dist/{orchestrator-Q47D6JXG.js → orchestrator-MH7J2YVP.js} +6 -6
  17. package/dist/package.json +1 -1
  18. package/dist/{permissions-QLHZUEGW.js → permissions-CGEK3DGZ.js} +21 -17
  19. package/dist/{processor-2YJ33KUH.js → processor-34MVJZTD.js} +6 -6
  20. package/dist/{project-creator-7RBHP6K6.js → project-creator-IDW7RACH.js} +4 -4
  21. package/dist/{protocol-PSKVUhdN.d.ts → protocol-J7khRG62.d.ts} +2 -0
  22. package/dist/{provider-SNXYPSPH.js → provider-LBYBC5AG.js} +3 -3
  23. package/dist/{pwa-M6QZ52ZO.js → pwa-T6JRAYJB.js} +11 -10
  24. package/dist/{serve-LOPGRMFP.js → serve-NHF6B5RQ.js} +8 -8
  25. package/dist/server/index.d.ts +1 -1
  26. package/dist/server/index.js +7 -7
  27. package/dist/{server-XUDZRBD3.js → server-KDGQZNYQ.js} +7 -7
  28. package/dist/{service-YYJ5Y7CN.js → service-6DL3MJZD.js} +7 -5
  29. package/dist/shared/index.d.ts +2 -2
  30. package/dist/{store-NS2RMRA7.js → store-FXTCHBI4.js} +2 -2
  31. package/dist/{tools-YJLXW3QS.js → tools-FQ54IAYG.js} +5 -5
  32. package/package.json +1 -1
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-CFLGVCYT.js";
24
+ } from "./chunk-5MDIKIMG.js";
25
25
  import {
26
26
  agentExists,
27
27
  createToolRegistry,
@@ -57,15 +57,16 @@ import {
57
57
  saveSkill,
58
58
  saveSkillToProject,
59
59
  setMcpConfigMode,
60
+ setMcpConfigPath,
60
61
  setMcpManagerForTools,
61
62
  setMcpTools,
62
63
  setNotifyMcpServersChanged,
63
64
  skillExists
64
- } from "./chunk-LAWUUAN7.js";
65
+ } from "./chunk-FRU2X3IZ.js";
65
66
  import {
66
67
  getPathSeparator,
67
68
  isAbsolutePath
68
- } from "./chunk-BIWVYBIE.js";
69
+ } from "./chunk-BGTEIA2S.js";
69
70
  import {
70
71
  createMcpTools
71
72
  } from "./chunk-NWO6GRYE.js";
@@ -1698,7 +1699,8 @@ var LspServer = class {
1698
1699
  ...process.env,
1699
1700
  HOME: process.env["HOME"],
1700
1701
  PATH: process.env["PATH"]
1701
- }
1702
+ },
1703
+ windowsHide: true
1702
1704
  });
1703
1705
  if (!this.process.stdin || !this.process.stdout) {
1704
1706
  throw new Error("Failed to get stdio streams from language server process");
@@ -3860,7 +3862,7 @@ import { Router as Router7 } from "express";
3860
3862
  import { spawn as spawn2 } from "child_process";
3861
3863
 
3862
3864
  // src/constants.ts
3863
- var VERSION = "2.0.58";
3865
+ var VERSION = "2.0.59";
3864
3866
 
3865
3867
  // src/server/routes/auto-update.ts
3866
3868
  var updateInProgress = false;
@@ -3885,7 +3887,8 @@ function createAutoUpdateRoutes(options = {}) {
3885
3887
  try {
3886
3888
  const latest = await new Promise((resolve4, reject) => {
3887
3889
  const child = spawn2("npm", ["view", "openfox", "version"], {
3888
- stdio: ["ignore", "pipe", "pipe"]
3890
+ stdio: ["ignore", "pipe", "pipe"],
3891
+ windowsHide: true
3889
3892
  });
3890
3893
  let stdout = "";
3891
3894
  child.stdout?.on("data", (data) => {
@@ -3923,7 +3926,8 @@ function createAutoUpdateRoutes(options = {}) {
3923
3926
  try {
3924
3927
  const isService = isRunningAsService();
3925
3928
  const child = spawn2("bash", ["-c", "openfox update"], {
3926
- stdio: ["ignore", "pipe", "pipe"]
3929
+ stdio: ["ignore", "pipe", "pipe"],
3930
+ windowsHide: true
3927
3931
  });
3928
3932
  let stdout = "";
3929
3933
  let stderr = "";
@@ -3963,7 +3967,8 @@ function createAutoUpdateRoutes(options = {}) {
3963
3967
  try {
3964
3968
  const child = spawn2("bash", ["-c", "openfox service restart"], {
3965
3969
  detached: true,
3966
- stdio: "ignore"
3970
+ stdio: "ignore",
3971
+ windowsHide: true
3967
3972
  });
3968
3973
  child.unref();
3969
3974
  res.json({ success: true });
@@ -4031,15 +4036,15 @@ async function createServerHandle(config4) {
4031
4036
  const mcpManager = new McpManager({
4032
4037
  onToolsDiscovered: async (name, tools) => {
4033
4038
  try {
4034
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
4039
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-GMQUPNBY.js");
4035
4040
  const mode = config4.mode ?? "production";
4036
- const globalConfig = await loadGlobalConfig(mode);
4041
+ const globalConfig = await loadGlobalConfig(mode, config4.globalConfigPath);
4037
4042
  const mcpServers2 = {
4038
4043
  ...globalConfig.mcpServers ?? {}
4039
4044
  };
4040
4045
  if (mcpServers2[name]) {
4041
4046
  mcpServers2[name] = { ...mcpServers2[name], cachedTools: tools };
4042
- await saveGlobalConfig(mode, { ...globalConfig, mcpServers: mcpServers2 });
4047
+ await saveGlobalConfig(mode, { ...globalConfig, mcpServers: mcpServers2 }, config4.globalConfigPath);
4043
4048
  }
4044
4049
  } catch (err) {
4045
4050
  logger.warn("Failed to persist MCP tool cache", { name, error: String(err) });
@@ -4048,6 +4053,7 @@ async function createServerHandle(config4) {
4048
4053
  });
4049
4054
  setMcpManagerForTools(mcpManager);
4050
4055
  setMcpConfigMode(config4.mode ?? "production");
4056
+ setMcpConfigPath(config4.globalConfigPath);
4051
4057
  const mcpServers = config4.mcpServers ?? {};
4052
4058
  Promise.all(
4053
4059
  Object.entries(mcpServers).map(
@@ -4061,7 +4067,7 @@ async function createServerHandle(config4) {
4061
4067
  setMcpTools(mcpTools);
4062
4068
  logger.info("MCP tools registered", { count: mcpTools.length });
4063
4069
  }
4064
- const { signalMcpReady } = await import("./server-XUDZRBD3.js");
4070
+ const { signalMcpReady } = await import("./server-KDGQZNYQ.js");
4065
4071
  signalMcpReady();
4066
4072
  });
4067
4073
  const app = express();
@@ -4132,7 +4138,7 @@ async function createServerHandle(config4) {
4132
4138
  if (!name || !workdir) {
4133
4139
  return res.status(400).json({ error: "name and workdir are required" });
4134
4140
  }
4135
- const { createDirectoryWithGit } = await import("./project-creator-7RBHP6K6.js");
4141
+ const { createDirectoryWithGit } = await import("./project-creator-IDW7RACH.js");
4136
4142
  try {
4137
4143
  const project = await createDirectoryWithGit(name, workdir);
4138
4144
  res.status(201).json({ project });
@@ -4150,7 +4156,7 @@ async function createServerHandle(config4) {
4150
4156
  if (!targetPath) {
4151
4157
  return res.status(400).json({ error: "path is required" });
4152
4158
  }
4153
- const { checkPermissions } = await import("./permissions-QLHZUEGW.js");
4159
+ const { checkPermissions } = await import("./permissions-CGEK3DGZ.js");
4154
4160
  const result = await checkPermissions(targetPath);
4155
4161
  if (result.success) {
4156
4162
  res.json(result);
@@ -4167,7 +4173,7 @@ async function createServerHandle(config4) {
4167
4173
  if (!["group", "ownership", "join_group", "join_group_and_group"].includes(action)) {
4168
4174
  return res.status(400).json({ error: 'action must be "group", "ownership", "join_group", or "join_group_and_group"' });
4169
4175
  }
4170
- const { fixPermissions } = await import("./permissions-QLHZUEGW.js");
4176
+ const { fixPermissions } = await import("./permissions-CGEK3DGZ.js");
4171
4177
  const result = await fixPermissions(targetPath, action);
4172
4178
  if (result.success) {
4173
4179
  res.json(result);
@@ -4254,7 +4260,7 @@ async function createServerHandle(config4) {
4254
4260
  app.get("/api/sessions/:id", async (req, res) => {
4255
4261
  const { getEventStore: getEventStore2 } = await import("./events-52XADT6Y.js");
4256
4262
  const { buildMessagesFromStoredEvents } = await import("./folding-2BGFLV5J.js");
4257
- const { getPendingQuestionsForSession } = await import("./tools-YJLXW3QS.js");
4263
+ const { getPendingQuestionsForSession } = await import("./tools-FQ54IAYG.js");
4258
4264
  const session = sessionManager.getSession(req.params.id);
4259
4265
  if (!session) {
4260
4266
  return res.status(404).json({ error: "Session not found" });
@@ -4273,8 +4279,8 @@ async function createServerHandle(config4) {
4273
4279
  if (!session) {
4274
4280
  return res.status(404).json({ error: "Session not found" });
4275
4281
  }
4276
- const { stopSessionExecution } = await import("./chat-handler-W5D5LKKU.js");
4277
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YJLXW3QS.js");
4282
+ const { stopSessionExecution } = await import("./chat-handler-AS44EMQE.js");
4283
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-FQ54IAYG.js");
4278
4284
  sessionManager.clearMessageQueue(sessionId);
4279
4285
  stopSessionExecution(sessionId, sessionManager);
4280
4286
  abortSession(sessionId);
@@ -4327,10 +4333,10 @@ async function createServerHandle(config4) {
4327
4333
  if (!result.success) {
4328
4334
  return res.status(500).json({ error: result.error ?? "Failed to set default model" });
4329
4335
  }
4330
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-C2YDEF3N.js");
4331
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4336
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-GMQUPNBY.js");
4337
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
4332
4338
  const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model);
4333
- await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
4339
+ await saveGlobalConfig(config4.mode ?? "production", updatedConfig, config4.globalConfigPath);
4334
4340
  config4.defaultModelSelection = updatedConfig.defaultModelSelection;
4335
4341
  res.json({ success: true, defaultModelSelection: config4.defaultModelSelection });
4336
4342
  });
@@ -4428,7 +4434,7 @@ async function createServerHandle(config4) {
4428
4434
  if (!callId || approved === void 0) {
4429
4435
  return res.status(400).json({ error: "callId and approved are required" });
4430
4436
  }
4431
- const { providePathConfirmation } = await import("./tools-YJLXW3QS.js");
4437
+ const { providePathConfirmation } = await import("./tools-FQ54IAYG.js");
4432
4438
  const result = providePathConfirmation(callId, approved, alwaysAllow);
4433
4439
  if (!result.found) {
4434
4440
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -4436,7 +4442,7 @@ async function createServerHandle(config4) {
4436
4442
  const { getEventStore: getEventStore2 } = await import("./events-52XADT6Y.js");
4437
4443
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-2BGFLV5J.js");
4438
4444
  const { createSessionStateMessage } = await import("./protocol-CTNE3ANP.js");
4439
- const { getPendingQuestionsForSession } = await import("./tools-YJLXW3QS.js");
4445
+ const { getPendingQuestionsForSession } = await import("./tools-FQ54IAYG.js");
4440
4446
  const eventStore = getEventStore2();
4441
4447
  const events = eventStore.getEvents(sessionId);
4442
4448
  const messages = buildMessagesFromStoredEvents(events);
@@ -4457,7 +4463,7 @@ async function createServerHandle(config4) {
4457
4463
  if (!skip && typeof answer !== "string") {
4458
4464
  return res.status(400).json({ error: "answer is required when not skipping" });
4459
4465
  }
4460
- const { provideAnswer } = await import("./tools-YJLXW3QS.js");
4466
+ const { provideAnswer } = await import("./tools-FQ54IAYG.js");
4461
4467
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
4462
4468
  if (!found) {
4463
4469
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -4517,7 +4523,7 @@ async function createServerHandle(config4) {
4517
4523
  backend: activeProvider?.backend ?? llmClient.getBackend(),
4518
4524
  model: llmClient.getModel()
4519
4525
  };
4520
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-Q47D6JXG.js");
4526
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-MH7J2YVP.js");
4521
4527
  runAgentTurn(
4522
4528
  {
4523
4529
  sessionManager,
@@ -4555,8 +4561,8 @@ async function createServerHandle(config4) {
4555
4561
  if (!session) {
4556
4562
  return res.status(404).json({ error: "Session not found" });
4557
4563
  }
4558
- const { stopSessionExecution } = await import("./chat-handler-W5D5LKKU.js");
4559
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YJLXW3QS.js");
4564
+ const { stopSessionExecution } = await import("./chat-handler-AS44EMQE.js");
4565
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-FQ54IAYG.js");
4560
4566
  const queuedMessages = sessionManager.getQueueState(sessionId);
4561
4567
  sessionManager.clearMessageQueue(sessionId);
4562
4568
  stopSessionExecution(sessionId, sessionManager);
@@ -4676,8 +4682,8 @@ async function createServerHandle(config4) {
4676
4682
  let visionFallback;
4677
4683
  let globalWorkdir;
4678
4684
  try {
4679
- const { loadGlobalConfig, getVisionFallback } = await import("./config-C2YDEF3N.js");
4680
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4685
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-GMQUPNBY.js");
4686
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
4681
4687
  const fallback = getVisionFallback(globalConfig);
4682
4688
  if (fallback) {
4683
4689
  visionFallback = {
@@ -4899,8 +4905,8 @@ async function createServerHandle(config4) {
4899
4905
  return res.status(400).json({ error: "name, url, and backend are required" });
4900
4906
  }
4901
4907
  try {
4902
- const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-C2YDEF3N.js");
4903
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4908
+ const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-GMQUPNBY.js");
4909
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
4904
4910
  const providerBackend = backend;
4905
4911
  const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
4906
4912
  const configWithProvider = addProvider(globalConfig, {
@@ -4919,7 +4925,7 @@ async function createServerHandle(config4) {
4919
4925
  configWithProvider.providers[configWithProvider.providers.length - 1].id,
4920
4926
  firstModelId
4921
4927
  );
4922
- await saveGlobalConfig(config4.mode ?? "production", finalConfig);
4928
+ await saveGlobalConfig(config4.mode ?? "production", finalConfig, config4.globalConfigPath);
4923
4929
  providerManager.setProviders(finalConfig.providers, finalConfig.defaultModelSelection ?? void 0);
4924
4930
  config4.defaultModelSelection = finalConfig.defaultModelSelection;
4925
4931
  const newProvider = finalConfig.providers[finalConfig.providers.length - 1];
@@ -4937,14 +4943,14 @@ async function createServerHandle(config4) {
4937
4943
  app.post("/api/init/config", async (req, res) => {
4938
4944
  const { workdir, visionFallback } = req.body;
4939
4945
  try {
4940
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
4941
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4946
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-GMQUPNBY.js");
4947
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
4942
4948
  const updatedConfig = {
4943
4949
  ...globalConfig,
4944
4950
  workspace: workdir ? { workdir } : globalConfig.workspace,
4945
4951
  visionFallback: visionFallback ?? globalConfig.visionFallback
4946
4952
  };
4947
- await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
4953
+ await saveGlobalConfig(config4.mode ?? "production", updatedConfig, config4.globalConfigPath);
4948
4954
  res.json({ success: true });
4949
4955
  } catch (error) {
4950
4956
  res.status(500).json({
@@ -4965,10 +4971,10 @@ async function createServerHandle(config4) {
4965
4971
  });
4966
4972
  app.delete("/api/providers/:id", async (req, res) => {
4967
4973
  const { id } = req.params;
4968
- const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-C2YDEF3N.js");
4969
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4974
+ const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-GMQUPNBY.js");
4975
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
4970
4976
  const updatedConfig = removeProvider(globalConfig, id);
4971
- await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
4977
+ await saveGlobalConfig(config4.mode ?? "production", updatedConfig, config4.globalConfigPath);
4972
4978
  providerManager.setProviders(updatedConfig.providers, updatedConfig.defaultModelSelection ?? void 0);
4973
4979
  config4.defaultModelSelection = updatedConfig.defaultModelSelection;
4974
4980
  res.json({ success: true });
@@ -4977,8 +4983,8 @@ async function createServerHandle(config4) {
4977
4983
  const { id } = req.params;
4978
4984
  const { isLocal } = req.body;
4979
4985
  try {
4980
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-C2YDEF3N.js");
4981
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4986
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-GMQUPNBY.js");
4987
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
4982
4988
  const provider = globalConfig.providers.find((p) => p.id === id);
4983
4989
  if (!provider) {
4984
4990
  return res.status(404).json({ error: "Provider not found" });
@@ -4986,7 +4992,7 @@ async function createServerHandle(config4) {
4986
4992
  const updates = {};
4987
4993
  if (isLocal !== void 0) updates["isLocal"] = isLocal;
4988
4994
  const updatedConfig = updateProvider(globalConfig, id, updates);
4989
- await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
4995
+ await saveGlobalConfig(config4.mode ?? "production", updatedConfig, config4.globalConfigPath);
4990
4996
  providerManager.setProviders(updatedConfig.providers, updatedConfig.defaultModelSelection ?? void 0);
4991
4997
  config4.defaultModelSelection = updatedConfig.defaultModelSelection;
4992
4998
  res.json({ success: true, provider: updatedConfig.providers.find((p) => p.id === id) });
@@ -5006,8 +5012,8 @@ async function createServerHandle(config4) {
5006
5012
  models: modelConfigs
5007
5013
  } = req.body;
5008
5014
  try {
5009
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-C2YDEF3N.js");
5010
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5015
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-GMQUPNBY.js");
5016
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
5011
5017
  const provider = globalConfig.providers.find((p) => p.id === id);
5012
5018
  if (!provider) {
5013
5019
  return res.status(404).json({ error: "Provider not found" });
@@ -5023,7 +5029,7 @@ async function createServerHandle(config4) {
5023
5029
  updates["models"] = buildModelConfigs(modelConfigs);
5024
5030
  }
5025
5031
  const updatedConfig = updateProvider(globalConfig, id, updates);
5026
- await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
5032
+ await saveGlobalConfig(config4.mode ?? "production", updatedConfig, config4.globalConfigPath);
5027
5033
  providerManager.setProviders(updatedConfig.providers, updatedConfig.defaultModelSelection ?? void 0);
5028
5034
  config4.defaultModelSelection = updatedConfig.defaultModelSelection;
5029
5035
  res.json({ success: true, provider: updatedConfig.providers.find((p) => p.id === id) });
@@ -5044,10 +5050,10 @@ async function createServerHandle(config4) {
5044
5050
  return res.status(400).json({ error: result.error });
5045
5051
  }
5046
5052
  const llmClient = getLLMClient();
5047
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-C2YDEF3N.js");
5048
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5053
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-GMQUPNBY.js");
5054
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
5049
5055
  const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
5050
- await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
5056
+ await saveGlobalConfig(config4.mode ?? "production", updatedConfig, config4.globalConfigPath);
5051
5057
  res.json({
5052
5058
  success: true,
5053
5059
  activeProviderId: id,
@@ -5071,7 +5077,7 @@ async function createServerHandle(config4) {
5071
5077
  });
5072
5078
  async function rebuildMcpTools() {
5073
5079
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
5074
- const { setMcpTools: setMcpTools2 } = await import("./tools-YJLXW3QS.js");
5080
+ const { setMcpTools: setMcpTools2 } = await import("./tools-FQ54IAYG.js");
5075
5081
  const mcpTools = createMcpTools2(mcpManager);
5076
5082
  setMcpTools2(mcpTools);
5077
5083
  }
@@ -5133,13 +5139,17 @@ async function createServerHandle(config4) {
5133
5139
  };
5134
5140
  await mcpManager.addServer(name, serverCfg);
5135
5141
  const server = mcpManager.getServer(name);
5136
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
5137
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5142
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-GMQUPNBY.js");
5143
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
5138
5144
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
5139
- await saveGlobalConfig(config4.mode ?? "production", {
5140
- ...globalConfig,
5141
- mcpServers: updatedMcpServers
5142
- });
5145
+ await saveGlobalConfig(
5146
+ config4.mode ?? "production",
5147
+ {
5148
+ ...globalConfig,
5149
+ mcpServers: updatedMcpServers
5150
+ },
5151
+ config4.globalConfigPath
5152
+ );
5143
5153
  await rebuildMcpTools();
5144
5154
  if (server) {
5145
5155
  const sessions = sessionManager.listSessions();
@@ -5159,14 +5169,18 @@ async function createServerHandle(config4) {
5159
5169
  return res.status(404).json({ error: `MCP server '${name}' not found` });
5160
5170
  }
5161
5171
  mcpManager.removeServer(name);
5162
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
5163
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5172
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-GMQUPNBY.js");
5173
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
5164
5174
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
5165
5175
  delete updatedMcpServers[name];
5166
- await saveGlobalConfig(config4.mode ?? "production", {
5167
- ...globalConfig,
5168
- mcpServers: updatedMcpServers
5169
- });
5176
+ await saveGlobalConfig(
5177
+ config4.mode ?? "production",
5178
+ {
5179
+ ...globalConfig,
5180
+ mcpServers: updatedMcpServers
5181
+ },
5182
+ config4.globalConfigPath
5183
+ );
5170
5184
  await rebuildMcpTools();
5171
5185
  const sessions = sessionManager.listSessions();
5172
5186
  for (const s of sessions) {
@@ -5184,18 +5198,22 @@ async function createServerHandle(config4) {
5184
5198
  await mcpManager.setToolEnabled(name, toolName, enabled);
5185
5199
  const server = mcpManager.getServer(name);
5186
5200
  if (server) {
5187
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-C2YDEF3N.js");
5188
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
5201
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-GMQUPNBY.js");
5202
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production", config4.globalConfigPath);
5189
5203
  const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
5190
5204
  const serverCfg = mcpServers2[name];
5191
5205
  if (serverCfg) {
5192
5206
  const disabledTools = server.tools.filter((t) => !t.enabled).map((t) => t.name);
5193
5207
  const cfg = { ...serverCfg, ...disabledTools.length > 0 ? { disabledTools } : { disabledTools: void 0 } };
5194
5208
  mcpServers2[name] = cfg;
5195
- await saveGlobalConfig(config4.mode ?? "production", {
5196
- ...globalConfig,
5197
- mcpServers: mcpServers2
5198
- });
5209
+ await saveGlobalConfig(
5210
+ config4.mode ?? "production",
5211
+ {
5212
+ ...globalConfig,
5213
+ mcpServers: mcpServers2
5214
+ },
5215
+ config4.globalConfigPath
5216
+ );
5199
5217
  }
5200
5218
  }
5201
5219
  await rebuildMcpTools();
@@ -5230,13 +5248,13 @@ async function createServerHandle(config4) {
5230
5248
  })
5231
5249
  );
5232
5250
  app.get("/api/sessions/:id/background-processes", async (req, res) => {
5233
- const { getSessionProcesses } = await import("./manager-CZOVNTSN.js");
5251
+ const { getSessionProcesses } = await import("./manager-344C5JLZ.js");
5234
5252
  const sessionId = req.params.id;
5235
5253
  const processes = getSessionProcesses(sessionId);
5236
5254
  res.json({ processes });
5237
5255
  });
5238
5256
  app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
5239
- const { stopProcess } = await import("./manager-CZOVNTSN.js");
5257
+ const { stopProcess } = await import("./manager-344C5JLZ.js");
5240
5258
  const sessionId = req.params.id;
5241
5259
  const processId = req.params.processId;
5242
5260
  const session = sessionManager.getSession(sessionId);
@@ -5250,7 +5268,7 @@ async function createServerHandle(config4) {
5250
5268
  res.status(500).json({ error: err instanceof Error ? err.message : "Failed to stop process" });
5251
5269
  }
5252
5270
  });
5253
- const { getCurrentBranch } = await import("./branch.api-5DMEAIBI.js");
5271
+ const { getCurrentBranch } = await import("./branch.api-LAN42BA5.js");
5254
5272
  app.get("/api/branch", async (req, res) => {
5255
5273
  await getCurrentBranch(req, res);
5256
5274
  });
@@ -5379,7 +5397,7 @@ async function createServerHandle(config4) {
5379
5397
  const state = sessionManager.getContextState(sessionId);
5380
5398
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
5381
5399
  });
5382
- const { QueueProcessor } = await import("./processor-2YJ33KUH.js");
5400
+ const { QueueProcessor } = await import("./processor-34MVJZTD.js");
5383
5401
  const queueProcessor = new QueueProcessor({
5384
5402
  sessionManager,
5385
5403
  providerManager,
@@ -5422,9 +5440,14 @@ async function createServerHandle(config4) {
5422
5440
  await mcpManager.disconnectAll();
5423
5441
  const { stopAllInspectProxies } = await import("./inspect-proxy-BV25JERQ.js");
5424
5442
  stopAllInspectProxies();
5425
- const { cleanupAllProcesses } = await import("./store-NS2RMRA7.js");
5443
+ const { cleanupAllProcesses } = await import("./store-FXTCHBI4.js");
5426
5444
  cleanupAllProcesses();
5427
5445
  viteServer?.close();
5446
+ if (config4.globalConfigPath) {
5447
+ const { unlink: unlink2 } = await import("fs/promises");
5448
+ unlink2(config4.globalConfigPath).catch(() => {
5449
+ });
5450
+ }
5428
5451
  for (const client of wss.clients) {
5429
5452
  client.terminate();
5430
5453
  }
@@ -5454,4 +5477,4 @@ export {
5454
5477
  createServerHandle,
5455
5478
  createServer
5456
5479
  };
5457
- //# sourceMappingURL=chunk-UDZNMYWN.js.map
5480
+ //# sourceMappingURL=chunk-LQFCQ6PY.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-C2YDEF3N.js");
42
+ const { saveGlobalConfig } = await import("./config-GMQUPNBY.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-C2YDEF3N.js");
109
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-GMQUPNBY.js");
110
110
  const { getGlobalConfigPath } = await import("./paths-F27V3S4I.js");
111
111
  const config = await loadGlobalConfig(mode);
112
112
  const configPath = getGlobalConfigPath(mode);
@@ -164,13 +164,13 @@ async function runCli(options) {
164
164
  break;
165
165
  }
166
166
  case "provider": {
167
- const { runProviderCommand } = await import("./provider-SNXYPSPH.js");
167
+ const { runProviderCommand } = await import("./provider-LBYBC5AG.js");
168
168
  const [, subcommand] = positionals;
169
169
  await runProviderCommand(mode, subcommand);
170
170
  break;
171
171
  }
172
172
  case "service": {
173
- const { runServiceCommand } = await import("./service-YYJ5Y7CN.js");
173
+ const { runServiceCommand } = await import("./service-6DL3MJZD.js");
174
174
  const [, subcommand, ...serviceArgs] = positionals;
175
175
  if (values.follow) {
176
176
  serviceArgs.push("-f");
@@ -183,7 +183,7 @@ async function runCli(options) {
183
183
  break;
184
184
  }
185
185
  case "pwa": {
186
- const { runPwaCommand, printPwaHelp } = await import("./pwa-M6QZ52ZO.js");
186
+ const { runPwaCommand, printPwaHelp } = await import("./pwa-T6JRAYJB.js");
187
187
  const [, subcommand] = positionals;
188
188
  if (subcommand === "--help" || subcommand === "-h" || values.help) {
189
189
  printPwaHelp();
@@ -196,19 +196,19 @@ async function runCli(options) {
196
196
  const __filename = fileURLToPath(import.meta.url);
197
197
  const __dirname = dirname(__filename);
198
198
  const updateScriptPath = join(__dirname, "cli", "update.sh");
199
- const result = spawnSync(updateScriptPath, [], { shell: true, stdio: "inherit" });
199
+ const result = spawnSync(updateScriptPath, [], { shell: true, stdio: "inherit", windowsHide: true });
200
200
  if (result.status !== 0) {
201
201
  process.exit(result.status ?? 1);
202
202
  }
203
203
  break;
204
204
  }
205
205
  default: {
206
- const { configFileExists } = await import("./config-C2YDEF3N.js");
206
+ const { configFileExists } = await import("./config-GMQUPNBY.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-LOPGRMFP.js");
211
+ const { runServe } = await import("./serve-NHF6B5RQ.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-55VITQP3.js.map
223
+ //# sourceMappingURL=chunk-P7C6KF2H.js.map
@@ -5,7 +5,7 @@ var SIGKILL_TIMEOUT_MS = 200;
5
5
  async function getDescendantPids(rootPid) {
6
6
  try {
7
7
  const { stdout } = await new Promise((resolve, reject) => {
8
- execFile("ps", ["-eo", "pid=,ppid="], { timeout: 5e3 }, (err, stdout2) => {
8
+ execFile("ps", ["-eo", "pid=,ppid="], { timeout: 5e3, windowsHide: true }, (err, stdout2) => {
9
9
  if (err) reject(err);
10
10
  else resolve({ stdout: stdout2 });
11
11
  });
@@ -224,4 +224,4 @@ export {
224
224
  getProcessById,
225
225
  cleanupAllProcesses
226
226
  };
227
- //# sourceMappingURL=chunk-ADOXTORQ.js.map
227
+ //# sourceMappingURL=chunk-PK2RMVMB.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-55VITQP3.js";
4
+ } from "../chunk-P7C6KF2H.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
@@ -30,7 +30,7 @@ if (currentHeap < MIN_HEAP_MB && !process.env["OPENFOX_HEAP_INCREASED"]) {
30
30
  const result = spawnSync(
31
31
  process.execPath,
32
32
  ["--max-old-space-size=" + heapMB, ...process.execArgv, scriptPath, ...process.argv.slice(2)],
33
- { stdio: "inherit", env }
33
+ { stdio: "inherit", env, windowsHide: true }
34
34
  );
35
35
  process.exit(result.status ?? 0);
36
36
  }
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-55VITQP3.js";
4
+ } from "../chunk-P7C6KF2H.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
@@ -29,7 +29,7 @@ if (currentHeap < MIN_HEAP_MB && !process.env["OPENFOX_HEAP_INCREASED"]) {
29
29
  const result = spawnSync(
30
30
  process.execPath,
31
31
  ["--max-old-space-size=" + heapMB, ...process.execArgv, scriptPath, ...process.argv.slice(2)],
32
- { stdio: "inherit", env }
32
+ { stdio: "inherit", env, windowsHide: true }
33
33
  );
34
34
  process.exit(result.status ?? 0);
35
35
  }
@@ -11,7 +11,7 @@ import {
11
11
  saveGlobalConfig,
12
12
  setDefaultModelSelection,
13
13
  updateProvider
14
- } from "./chunk-YMEZFRY2.js";
14
+ } from "./chunk-43UFGATL.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-C2YDEF3N.js.map
31
+ //# sourceMappingURL=config-GMQUPNBY.js.map
@@ -6,8 +6,8 @@ import {
6
6
  onProcessEvent,
7
7
  startProcessCommand,
8
8
  stopProcess
9
- } from "./chunk-BIWVYBIE.js";
10
- import "./chunk-ADOXTORQ.js";
9
+ } from "./chunk-BGTEIA2S.js";
10
+ import "./chunk-PK2RMVMB.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-CZOVNTSN.js.map
21
+ //# sourceMappingURL=manager-344C5JLZ.js.map
@@ -2,11 +2,11 @@ import {
2
2
  injectWorkflowKickoffIfNeeded,
3
3
  runAgentTurn,
4
4
  runChatTurn
5
- } from "./chunk-XR2XC7WM.js";
6
- import "./chunk-LAWUUAN7.js";
5
+ } from "./chunk-EKI5SZC7.js";
6
+ import "./chunk-FRU2X3IZ.js";
7
7
  import "./chunk-LBGHZLLH.js";
8
- import "./chunk-BIWVYBIE.js";
9
- import "./chunk-ADOXTORQ.js";
8
+ import "./chunk-BGTEIA2S.js";
9
+ import "./chunk-PK2RMVMB.js";
10
10
  import "./chunk-NWO6GRYE.js";
11
11
  import "./chunk-F4PMNP7S.js";
12
12
  import "./chunk-EU3WWTFH.js";
@@ -28,7 +28,7 @@ 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-YMEZFRY2.js";
31
+ import "./chunk-43UFGATL.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-Q47D6JXG.js.map
46
+ //# sourceMappingURL=orchestrator-MH7J2YVP.js.map