openfox 2.0.34 → 2.0.36

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.
@@ -5,8 +5,8 @@ import {
5
5
  } from "./chunk-BGCDJYNU.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-EB2RIVZA.js";
9
- import "./chunk-XJU2PBLN.js";
8
+ } from "./chunk-U4ZRBCSO.js";
9
+ import "./chunk-QCVPT2LZ.js";
10
10
  import "./chunk-DL6ZILAF.js";
11
11
  import "./chunk-PBGOZMVY.js";
12
12
  import "./chunk-VRGRAQDG.js";
@@ -30,7 +30,7 @@ import "./chunk-Z4FMBCJO.js";
30
30
  import "./chunk-ZJ4FP6RS.js";
31
31
  import "./chunk-K44MW7JJ.js";
32
32
  import "./chunk-YD6NDTKF.js";
33
- import "./chunk-BW6DQC2L.js";
33
+ import "./chunk-PWY6EBZ6.js";
34
34
  import "./chunk-CQGTEGKL.js";
35
35
  import "./chunk-V4IE7HJY.js";
36
36
 
@@ -145,4 +145,4 @@ export {
145
145
  startChatSession,
146
146
  stopSessionExecution
147
147
  };
148
- //# sourceMappingURL=chat-handler-YCFYRTFG.js.map
148
+ //# sourceMappingURL=chat-handler-GZOH45BG.js.map
@@ -33,7 +33,7 @@ Options:
33
33
  }
34
34
  async function runNetworkSetup(mode) {
35
35
  const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-56SIRACI.js");
36
- const { saveGlobalConfig } = await import("./config-OV5OLKOC.js");
36
+ const { saveGlobalConfig } = await import("./config-QI3KOU42.js");
37
37
  const { getAuthKeyPath } = await import("./paths-X46PPOI2.js");
38
38
  const existingAuth = await loadAuthConfig(mode);
39
39
  if (existingAuth) {
@@ -89,12 +89,18 @@ async function runNetworkSetup(mode) {
89
89
  logging: { level: "error" },
90
90
  database: { path: "" },
91
91
  workspace: { workdir: process.cwd() },
92
- visionFallback: { enabled: false, url: "http://localhost:11434", model: "qwen3.5:0.8b", timeout: 120 }
92
+ visionFallback: {
93
+ enabled: false,
94
+ url: "http://localhost:11434",
95
+ model: "qwen3.5:0.8b",
96
+ timeout: 120,
97
+ backend: "ollama"
98
+ }
93
99
  });
94
100
  console.log("\u2713 Configuration saved!\n");
95
101
  }
96
102
  async function runConfig(mode) {
97
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-OV5OLKOC.js");
103
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-QI3KOU42.js");
98
104
  const { getGlobalConfigPath } = await import("./paths-X46PPOI2.js");
99
105
  const config = await loadGlobalConfig(mode);
100
106
  const configPath = getGlobalConfigPath(mode);
@@ -152,7 +158,7 @@ async function runCli(options) {
152
158
  break;
153
159
  }
154
160
  case "provider": {
155
- const { runProviderCommand } = await import("./provider-AHIVZZI5.js");
161
+ const { runProviderCommand } = await import("./provider-SHGBQRFO.js");
156
162
  const [, subcommand] = positionals;
157
163
  await runProviderCommand(mode, subcommand);
158
164
  break;
@@ -191,12 +197,12 @@ async function runCli(options) {
191
197
  break;
192
198
  }
193
199
  default: {
194
- const { configFileExists } = await import("./config-OV5OLKOC.js");
200
+ const { configFileExists } = await import("./config-QI3KOU42.js");
195
201
  const configExists = await configFileExists(mode);
196
202
  if (!configExists) {
197
203
  await runNetworkSetup(mode);
198
204
  }
199
- const { runServe } = await import("./serve-CJHC25E3.js");
205
+ const { runServe } = await import("./serve-3SIVWL3C.js");
200
206
  const serveOptions = { mode };
201
207
  if (values.port) serveOptions.port = parseInt(values.port);
202
208
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -208,4 +214,4 @@ async function runCli(options) {
208
214
  export {
209
215
  runCli
210
216
  };
211
- //# sourceMappingURL=chunk-U6IPDG7P.js.map
217
+ //# sourceMappingURL=chunk-GIR5N4A3.js.map
@@ -59,7 +59,8 @@ var visionFallbackSchema = z.object({
59
59
  enabled: z.boolean().default(false),
60
60
  url: z.string().default("http://localhost:11434"),
61
61
  model: z.string().default("qwen3.5:0.8b"),
62
- timeout: z.number().default(120)
62
+ timeout: z.number().default(120),
63
+ backend: z.enum(["ollama", "openai"]).default("ollama")
63
64
  });
64
65
  var mcpServerSchema = z.object({
65
66
  transport: z.enum(["stdio", "http"]).default("stdio"),
@@ -70,7 +71,13 @@ var mcpServerSchema = z.object({
70
71
  headers: z.record(z.string(), z.string()).optional(),
71
72
  disabledTools: z.array(z.string()).optional()
72
73
  });
73
- var defaultVisionFallback = { enabled: false, url: "http://localhost:11434", model: "qwen3.5:0.8b", timeout: 120 };
74
+ var defaultVisionFallback = {
75
+ enabled: false,
76
+ url: "http://localhost:11434",
77
+ model: "qwen3.5:0.8b",
78
+ timeout: 120,
79
+ backend: "ollama"
80
+ };
74
81
  var configSchema = z.object({
75
82
  providers: z.array(providerSchema).default([]),
76
83
  mcpServers: z.record(z.string(), mcpServerSchema).optional(),
@@ -225,12 +232,7 @@ async function saveGlobalConfig(mode, config) {
225
232
  logging: config.logging ?? { level: "error" },
226
233
  database: config.database ?? { path: "" },
227
234
  workspace: config.workspace ?? { workdir: process.cwd() },
228
- visionFallback: config.visionFallback ?? {
229
- enabled: false,
230
- url: "http://localhost:11434",
231
- model: "qwen3.5:0.8b",
232
- timeout: 120
233
- }
235
+ visionFallback: config.visionFallback ?? defaultVisionFallback
234
236
  };
235
237
  await mkdir(dirname(configPath), { recursive: true });
236
238
  await writeFile(configPath, JSON.stringify(fullConfig, null, 2));
@@ -261,12 +263,7 @@ function setDefaultModelSelection(config, providerId, model) {
261
263
  logging: config.logging ?? { level: "error" },
262
264
  database: config.database ?? { path: "" },
263
265
  workspace: config.workspace ?? { workdir: process.cwd() },
264
- visionFallback: config.visionFallback ?? {
265
- enabled: false,
266
- url: "http://localhost:11434",
267
- model: "qwen3.5:0.8b",
268
- timeout: 120
269
- }
266
+ visionFallback: config.visionFallback ?? defaultVisionFallback
270
267
  };
271
268
  }
272
269
  function addProvider(config, provider) {
@@ -289,12 +286,7 @@ function addProvider(config, provider) {
289
286
  logging: config.logging ?? { level: "error" },
290
287
  database: config.database ?? { path: "" },
291
288
  workspace: config.workspace ?? { workdir: process.cwd() },
292
- visionFallback: config.visionFallback ?? {
293
- enabled: false,
294
- url: "http://localhost:11434",
295
- model: "qwen3.5:0.8b",
296
- timeout: 120
297
- }
289
+ visionFallback: config.visionFallback ?? defaultVisionFallback
298
290
  };
299
291
  }
300
292
  function updateProvider(config, providerId, updates) {
@@ -327,12 +319,7 @@ function removeProvider(config, providerId) {
327
319
  logging: config.logging ?? { level: "error" },
328
320
  database: config.database ?? { path: "" },
329
321
  workspace: config.workspace ?? { workdir: process.cwd() },
330
- visionFallback: config.visionFallback ?? {
331
- enabled: false,
332
- url: "http://localhost:11434",
333
- model: "qwen3.5:0.8b",
334
- timeout: 120
335
- }
322
+ visionFallback: config.visionFallback ?? defaultVisionFallback
336
323
  };
337
324
  }
338
325
  function activateProvider(config, providerId) {
@@ -348,12 +335,7 @@ function activateProvider(config, providerId) {
348
335
  logging: config.logging ?? { level: "error" },
349
336
  database: config.database ?? { path: "" },
350
337
  workspace: config.workspace ?? { workdir: process.cwd() },
351
- visionFallback: config.visionFallback ?? {
352
- enabled: false,
353
- url: "http://localhost:11434",
354
- model: "qwen3.5:0.8b",
355
- timeout: 120
356
- }
338
+ visionFallback: config.visionFallback ?? defaultVisionFallback
357
339
  };
358
340
  }
359
341
  return {
@@ -366,12 +348,7 @@ function activateProvider(config, providerId) {
366
348
  logging: config.logging ?? { level: "error" },
367
349
  database: config.database ?? { path: "" },
368
350
  workspace: config.workspace ?? { workdir: process.cwd() },
369
- visionFallback: config.visionFallback ?? {
370
- enabled: false,
371
- url: "http://localhost:11434",
372
- model: "qwen3.5:0.8b",
373
- timeout: 120
374
- }
351
+ visionFallback: config.visionFallback ?? defaultVisionFallback
375
352
  };
376
353
  }
377
354
  function mergeConfigs(...configs) {
@@ -418,4 +395,4 @@ export {
418
395
  activateProvider,
419
396
  mergeConfigs
420
397
  };
421
- //# sourceMappingURL=chunk-BW6DQC2L.js.map
398
+ //# sourceMappingURL=chunk-PWY6EBZ6.js.map
@@ -71,7 +71,7 @@ import {
71
71
  import {
72
72
  loadGlobalConfig,
73
73
  saveGlobalConfig
74
- } from "./chunk-BW6DQC2L.js";
74
+ } from "./chunk-PWY6EBZ6.js";
75
75
  import {
76
76
  getGlobalConfigDir
77
77
  } from "./chunk-CQGTEGKL.js";
@@ -2844,24 +2844,55 @@ var IMAGE_PROMPT = `Describe this image in detail. Focus on:
2844
2844
  - Key elements and their relationships
2845
2845
 
2846
2846
  Provide a concise but comprehensive description.`;
2847
+ function buildPrompt(context) {
2848
+ return context ? `${IMAGE_PROMPT}
2849
+
2850
+ Context: ${context}` : IMAGE_PROMPT;
2851
+ }
2852
+ function buildOllamaRequest(base64Data, model, context) {
2853
+ return {
2854
+ model,
2855
+ messages: [
2856
+ {
2857
+ role: "user",
2858
+ content: buildPrompt(context),
2859
+ images: [base64Data]
2860
+ }
2861
+ ],
2862
+ stream: false,
2863
+ think: false
2864
+ };
2865
+ }
2866
+ function buildOpenAIRequest(base64Data, model, context) {
2867
+ return {
2868
+ model,
2869
+ messages: [
2870
+ {
2871
+ role: "user",
2872
+ content: [
2873
+ { type: "text", text: buildPrompt(context) },
2874
+ { type: "image_url", image_url: { url: `data:image/png;base64,${base64Data}` } }
2875
+ ]
2876
+ }
2877
+ ]
2878
+ };
2879
+ }
2880
+ function parseOllamaResponse(data) {
2881
+ const resp = data;
2882
+ return resp.message?.content?.trim() ?? null;
2883
+ }
2884
+ function parseOpenAIResponse(data) {
2885
+ const resp = data;
2886
+ const choice = resp.choices?.[0];
2887
+ if (!choice) return null;
2888
+ return choice.message?.content?.trim() ?? null;
2889
+ }
2847
2890
  async function describeImage(base64Data, visionModel, options) {
2848
2891
  const timeout = visionModel.timeout;
2849
2892
  try {
2850
- const url = `${visionModel.baseUrl}/api/chat`;
2851
- const requestBody = {
2852
- model: visionModel.model,
2853
- messages: [
2854
- {
2855
- role: "user",
2856
- content: options?.context ? `${IMAGE_PROMPT}
2857
-
2858
- Context: ${options.context}` : IMAGE_PROMPT,
2859
- images: [base64Data]
2860
- }
2861
- ],
2862
- stream: false,
2863
- think: false
2864
- };
2893
+ const isOpenAI = visionModel.backend === "openai";
2894
+ const url = isOpenAI ? `${visionModel.baseUrl.replace(/\/+$/, "")}/chat/completions` : `${visionModel.baseUrl.replace(/\/+$/, "")}/api/chat`;
2895
+ const requestBody = isOpenAI ? buildOpenAIRequest(base64Data, visionModel.model, options?.context) : buildOllamaRequest(base64Data, visionModel.model, options?.context);
2865
2896
  const timeoutController = new AbortController();
2866
2897
  const timeoutId = setTimeout(() => timeoutController.abort(), timeout);
2867
2898
  const signal = options?.signal ? AbortSignal.any([timeoutController.signal, options.signal]) : timeoutController.signal;
@@ -2880,7 +2911,7 @@ Context: ${options.context}` : IMAGE_PROMPT,
2880
2911
  return `[Image description failed: HTTP ${response.status}]`;
2881
2912
  }
2882
2913
  const data = await response.json();
2883
- const description = data.message?.content?.trim();
2914
+ const description = isOpenAI ? parseOpenAIResponse(data) : parseOllamaResponse(data);
2884
2915
  if (!description) {
2885
2916
  logger.warn("Vision fallback returned empty description");
2886
2917
  return "[Image - could not describe]";
@@ -2907,13 +2938,18 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
2907
2938
  import { createHash as createHash2 } from "crypto";
2908
2939
  async function loadVisionModelFromGlobalConfig() {
2909
2940
  try {
2910
- const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-OV5OLKOC.js");
2941
+ const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-QI3KOU42.js");
2911
2942
  const runtimeConfig = getRuntimeConfig();
2912
2943
  const mode = runtimeConfig.mode ?? "production";
2913
2944
  const globalConfig = await loadGlobalConfig2(mode);
2914
2945
  const fallback = getVisionFallback(globalConfig);
2915
2946
  if (fallback?.enabled && fallback.model) {
2916
- return { baseUrl: fallback.url, model: fallback.model, timeout: fallback.timeout * 1e3 };
2947
+ return {
2948
+ baseUrl: fallback.url,
2949
+ model: fallback.model,
2950
+ timeout: fallback.timeout * 1e3,
2951
+ backend: fallback.backend ?? "ollama"
2952
+ };
2917
2953
  }
2918
2954
  } catch {
2919
2955
  }
@@ -3150,7 +3186,12 @@ async function processEventsForConversation(sessionId, llmClient, onEvent) {
3150
3186
  const rawEvents = eventStore.getEvents(sessionId);
3151
3187
  const modelVision = modelSupportsVision(llmClient.getModel());
3152
3188
  const runtimeConfig = getRuntimeConfig();
3153
- const visionModel = runtimeConfig.llm?.visionModel ? { baseUrl: runtimeConfig.llm.baseUrl, model: runtimeConfig.llm.visionModel, timeout: runtimeConfig.llm.timeout } : await loadVisionModelFromGlobalConfig();
3189
+ const visionModel = runtimeConfig.llm?.visionModel ? {
3190
+ baseUrl: runtimeConfig.llm.baseUrl,
3191
+ model: runtimeConfig.llm.visionModel,
3192
+ timeout: runtimeConfig.llm.timeout,
3193
+ backend: runtimeConfig.llm.backend === "ollama" ? "ollama" : "openai"
3194
+ } : await loadVisionModelFromGlobalConfig();
3154
3195
  const { events: processedEvents } = await processContextImages(rawEvents, {
3155
3196
  modelSupportsVision: modelVision,
3156
3197
  ...visionModel ? { visionModel } : {},
@@ -3362,7 +3403,7 @@ var callSubAgentTool = {
3362
3403
  };
3363
3404
  }
3364
3405
  try {
3365
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-2QBZBNDL.js");
3406
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-FJ63BHW2.js");
3366
3407
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3367
3408
  const turnMetrics = new TurnMetrics();
3368
3409
  const result = await executeSubAgent({
@@ -4178,7 +4219,7 @@ function resolveAgentDef2(sessionManager, sessionId) {
4178
4219
  }
4179
4220
  async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
4180
4221
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
4181
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-2QBZBNDL.js");
4222
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-FJ63BHW2.js");
4182
4223
  const tools = getToolRegistryForAgent2(agentDef).definitions;
4183
4224
  const toolFingerprint = getToolFingerprint(tools);
4184
4225
  const allAgents = await loadAllAgentsDefault();
@@ -4191,7 +4232,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
4191
4232
  async function computeSessionHash(sessionManager, sessionId) {
4192
4233
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
4193
4234
  const agentDef = await resolveAgentDef2(sessionManager, sessionId);
4194
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-2QBZBNDL.js");
4235
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-FJ63BHW2.js");
4195
4236
  const tools = getToolRegistryForAgent2(agentDef).definitions;
4196
4237
  const toolFingerprint = getToolFingerprint(tools);
4197
4238
  return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -4298,7 +4339,7 @@ var mcpConfigTool = createTool(
4298
4339
  await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated });
4299
4340
  }
4300
4341
  async function rebuildTools() {
4301
- const { setMcpTools: setMcpTools2 } = await import("./tools-2QBZBNDL.js");
4342
+ const { setMcpTools: setMcpTools2 } = await import("./tools-FJ63BHW2.js");
4302
4343
  const mcpTools = createMcpTools(mcpManagerForTools);
4303
4344
  setMcpTools2(mcpTools);
4304
4345
  }
@@ -4702,4 +4743,4 @@ export {
4702
4743
  getToolRegistryForAgent,
4703
4744
  createToolRegistry
4704
4745
  };
4705
- //# sourceMappingURL=chunk-XJU2PBLN.js.map
4746
+ //# sourceMappingURL=chunk-QCVPT2LZ.js.map
@@ -12,7 +12,7 @@ import {
12
12
  loadAllAgentsDefault,
13
13
  processEventsForConversation,
14
14
  runTopLevelAgentLoop
15
- } from "./chunk-XJU2PBLN.js";
15
+ } from "./chunk-QCVPT2LZ.js";
16
16
  import {
17
17
  TurnMetrics,
18
18
  WORKFLOW_KICKOFF_PROMPT,
@@ -310,4 +310,4 @@ export {
310
310
  runAgentTurn,
311
311
  injectWorkflowKickoffIfNeeded
312
312
  };
313
- //# sourceMappingURL=chunk-EB2RIVZA.js.map
313
+ //# sourceMappingURL=chunk-U4ZRBCSO.js.map
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-IBKGV6OJ.js";
24
+ } from "./chunk-ZXELI3WY.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-XJU2PBLN.js";
64
+ } from "./chunk-QCVPT2LZ.js";
65
65
  import {
66
66
  getPathSeparator,
67
67
  isAbsolutePath
@@ -3440,7 +3440,7 @@ import { Router as Router6 } from "express";
3440
3440
  import { spawn as spawn2 } from "child_process";
3441
3441
 
3442
3442
  // src/constants.ts
3443
- var VERSION = "2.0.34";
3443
+ var VERSION = "2.0.36";
3444
3444
 
3445
3445
  // src/server/routes/auto-update.ts
3446
3446
  var updateInProgress = false;
@@ -3620,7 +3620,7 @@ async function createServerHandle(config4) {
3620
3620
  setMcpTools(mcpTools);
3621
3621
  logger.info("MCP tools registered", { count: mcpTools.length });
3622
3622
  }
3623
- const { signalMcpReady } = await import("./server-RHYGD2Q6.js");
3623
+ const { signalMcpReady } = await import("./server-A5IUSVLK.js");
3624
3624
  signalMcpReady();
3625
3625
  });
3626
3626
  const app = express();
@@ -3813,7 +3813,7 @@ async function createServerHandle(config4) {
3813
3813
  app.get("/api/sessions/:id", async (req, res) => {
3814
3814
  const { getEventStore: getEventStore2 } = await import("./events-YLICLPBY.js");
3815
3815
  const { buildMessagesFromStoredEvents } = await import("./folding-PI67HWBR.js");
3816
- const { getPendingQuestionsForSession } = await import("./tools-2QBZBNDL.js");
3816
+ const { getPendingQuestionsForSession } = await import("./tools-FJ63BHW2.js");
3817
3817
  const session = sessionManager.getSession(req.params.id);
3818
3818
  if (!session) {
3819
3819
  return res.status(404).json({ error: "Session not found" });
@@ -3858,7 +3858,7 @@ async function createServerHandle(config4) {
3858
3858
  const provider = providerManager.getProviders().find((p) => p.id === providerId);
3859
3859
  const resolvedModel = model ?? provider?.models?.[0]?.id ?? "auto";
3860
3860
  sessionManager.setSessionProvider(sessionId, providerId, resolvedModel);
3861
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-OV5OLKOC.js");
3861
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-QI3KOU42.js");
3862
3862
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
3863
3863
  const updatedConfig = setDefaultModelSelection(globalConfig, providerId, resolvedModel);
3864
3864
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -3964,7 +3964,7 @@ async function createServerHandle(config4) {
3964
3964
  if (!callId || approved === void 0) {
3965
3965
  return res.status(400).json({ error: "callId and approved are required" });
3966
3966
  }
3967
- const { providePathConfirmation } = await import("./tools-2QBZBNDL.js");
3967
+ const { providePathConfirmation } = await import("./tools-FJ63BHW2.js");
3968
3968
  const result = providePathConfirmation(callId, approved, alwaysAllow);
3969
3969
  if (!result.found) {
3970
3970
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -3972,7 +3972,7 @@ async function createServerHandle(config4) {
3972
3972
  const { getEventStore: getEventStore2 } = await import("./events-YLICLPBY.js");
3973
3973
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-PI67HWBR.js");
3974
3974
  const { createSessionStateMessage } = await import("./protocol-BKNLAEPJ.js");
3975
- const { getPendingQuestionsForSession } = await import("./tools-2QBZBNDL.js");
3975
+ const { getPendingQuestionsForSession } = await import("./tools-FJ63BHW2.js");
3976
3976
  const eventStore = getEventStore2();
3977
3977
  const events = eventStore.getEvents(sessionId);
3978
3978
  const messages = buildMessagesFromStoredEvents(events);
@@ -3993,7 +3993,7 @@ async function createServerHandle(config4) {
3993
3993
  if (!skip && typeof answer !== "string") {
3994
3994
  return res.status(400).json({ error: "answer is required when not skipping" });
3995
3995
  }
3996
- const { provideAnswer } = await import("./tools-2QBZBNDL.js");
3996
+ const { provideAnswer } = await import("./tools-FJ63BHW2.js");
3997
3997
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
3998
3998
  if (!found) {
3999
3999
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -4029,8 +4029,8 @@ async function createServerHandle(config4) {
4029
4029
  if (!session) {
4030
4030
  return res.status(404).json({ error: "Session not found" });
4031
4031
  }
4032
- const { stopSessionExecution } = await import("./chat-handler-YCFYRTFG.js");
4033
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-2QBZBNDL.js");
4032
+ const { stopSessionExecution } = await import("./chat-handler-GZOH45BG.js");
4033
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-FJ63BHW2.js");
4034
4034
  const queuedMessages = sessionManager.getQueueState(sessionId);
4035
4035
  sessionManager.clearMessageQueue(sessionId);
4036
4036
  stopSessionExecution(sessionId, sessionManager);
@@ -4141,7 +4141,7 @@ async function createServerHandle(config4) {
4141
4141
  let visionFallback;
4142
4142
  let globalWorkdir;
4143
4143
  try {
4144
- const { loadGlobalConfig, getVisionFallback } = await import("./config-OV5OLKOC.js");
4144
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-QI3KOU42.js");
4145
4145
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4146
4146
  const fallback = getVisionFallback(globalConfig);
4147
4147
  if (fallback) {
@@ -4149,7 +4149,8 @@ async function createServerHandle(config4) {
4149
4149
  enabled: fallback.enabled ?? false,
4150
4150
  url: fallback.url ?? "http://localhost:11434",
4151
4151
  model: fallback.model ?? "qwen3.5:0.8b",
4152
- timeout: fallback.timeout ?? 120
4152
+ timeout: fallback.timeout ?? 120,
4153
+ backend: fallback.backend ?? "ollama"
4153
4154
  };
4154
4155
  }
4155
4156
  globalWorkdir = globalConfig.workspace?.workdir;
@@ -4353,7 +4354,7 @@ async function createServerHandle(config4) {
4353
4354
  return res.status(400).json({ error: "name, url, and backend are required" });
4354
4355
  }
4355
4356
  try {
4356
- const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-OV5OLKOC.js");
4357
+ const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-QI3KOU42.js");
4357
4358
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4358
4359
  const providerBackend = backend;
4359
4360
  const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
@@ -4391,7 +4392,7 @@ async function createServerHandle(config4) {
4391
4392
  app.post("/api/init/config", async (req, res) => {
4392
4393
  const { workdir, visionFallback } = req.body;
4393
4394
  try {
4394
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4395
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4395
4396
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4396
4397
  const updatedConfig = {
4397
4398
  ...globalConfig,
@@ -4419,7 +4420,7 @@ async function createServerHandle(config4) {
4419
4420
  });
4420
4421
  app.delete("/api/providers/:id", async (req, res) => {
4421
4422
  const { id } = req.params;
4422
- const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-OV5OLKOC.js");
4423
+ const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-QI3KOU42.js");
4423
4424
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4424
4425
  const updatedConfig = removeProvider(globalConfig, id);
4425
4426
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4431,7 +4432,7 @@ async function createServerHandle(config4) {
4431
4432
  const { id } = req.params;
4432
4433
  const { isLocal } = req.body;
4433
4434
  try {
4434
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-OV5OLKOC.js");
4435
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-QI3KOU42.js");
4435
4436
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4436
4437
  const provider = globalConfig.providers.find((p) => p.id === id);
4437
4438
  if (!provider) {
@@ -4460,7 +4461,7 @@ async function createServerHandle(config4) {
4460
4461
  models: modelConfigs
4461
4462
  } = req.body;
4462
4463
  try {
4463
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-OV5OLKOC.js");
4464
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-QI3KOU42.js");
4464
4465
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4465
4466
  const provider = globalConfig.providers.find((p) => p.id === id);
4466
4467
  if (!provider) {
@@ -4498,7 +4499,7 @@ async function createServerHandle(config4) {
4498
4499
  return res.status(400).json({ error: result.error });
4499
4500
  }
4500
4501
  const llmClient = getLLMClient();
4501
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-OV5OLKOC.js");
4502
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-QI3KOU42.js");
4502
4503
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4503
4504
  const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
4504
4505
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4525,7 +4526,7 @@ async function createServerHandle(config4) {
4525
4526
  });
4526
4527
  async function rebuildMcpTools() {
4527
4528
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-B7QP6NLA.js");
4528
- const { setMcpTools: setMcpTools2 } = await import("./tools-2QBZBNDL.js");
4529
+ const { setMcpTools: setMcpTools2 } = await import("./tools-FJ63BHW2.js");
4529
4530
  const mcpTools = createMcpTools2(mcpManager);
4530
4531
  setMcpTools2(mcpTools);
4531
4532
  }
@@ -4587,7 +4588,7 @@ async function createServerHandle(config4) {
4587
4588
  };
4588
4589
  await mcpManager.addServer(name, serverCfg);
4589
4590
  const server = mcpManager.getServer(name);
4590
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4591
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4591
4592
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4592
4593
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
4593
4594
  await saveGlobalConfig(config4.mode ?? "production", {
@@ -4613,7 +4614,7 @@ async function createServerHandle(config4) {
4613
4614
  return res.status(404).json({ error: `MCP server '${name}' not found` });
4614
4615
  }
4615
4616
  mcpManager.removeServer(name);
4616
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4617
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4617
4618
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4618
4619
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
4619
4620
  delete updatedMcpServers[name];
@@ -4638,7 +4639,7 @@ async function createServerHandle(config4) {
4638
4639
  await mcpManager.setToolEnabled(name, toolName, enabled);
4639
4640
  const server = mcpManager.getServer(name);
4640
4641
  if (server) {
4641
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4642
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4642
4643
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4643
4644
  const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
4644
4645
  const serverCfg = mcpServers2[name];
@@ -4837,7 +4838,7 @@ async function createServerHandle(config4) {
4837
4838
  const state = sessionManager.getContextState(sessionId);
4838
4839
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
4839
4840
  });
4840
- const { QueueProcessor } = await import("./processor-VGVPSVGE.js");
4841
+ const { QueueProcessor } = await import("./processor-3C6MIX7N.js");
4841
4842
  const queueProcessor = new QueueProcessor({
4842
4843
  sessionManager,
4843
4844
  providerManager,
@@ -4912,4 +4913,4 @@ export {
4912
4913
  createServerHandle,
4913
4914
  createServer
4914
4915
  };
4915
- //# sourceMappingURL=chunk-L772ZPG3.js.map
4916
+ //# sourceMappingURL=chunk-Z3RKDS6H.js.map
@@ -2,7 +2,7 @@ import {
2
2
  injectWorkflowKickoffIfNeeded,
3
3
  runAgentTurn,
4
4
  runChatTurn
5
- } from "./chunk-EB2RIVZA.js";
5
+ } from "./chunk-U4ZRBCSO.js";
6
6
  import {
7
7
  applyDynamicContext,
8
8
  checkAborted,
@@ -16,7 +16,7 @@ import {
16
16
  loadAllAgentsDefault,
17
17
  saveItemToDir,
18
18
  spawnShellProcess
19
- } from "./chunk-XJU2PBLN.js";
19
+ } from "./chunk-QCVPT2LZ.js";
20
20
  import {
21
21
  getPlatformShell,
22
22
  onProcessEvent
@@ -2056,4 +2056,4 @@ export {
2056
2056
  signalMcpReady,
2057
2057
  createWebSocketServer
2058
2058
  };
2059
- //# sourceMappingURL=chunk-IBKGV6OJ.js.map
2059
+ //# sourceMappingURL=chunk-ZXELI3WY.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-U6IPDG7P.js";
4
+ } from "../chunk-GIR5N4A3.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.js";
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-U6IPDG7P.js";
4
+ } from "../chunk-GIR5N4A3.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.js";
@@ -13,7 +13,7 @@ import {
13
13
  saveGlobalConfig,
14
14
  setDefaultModelSelection,
15
15
  updateProvider
16
- } from "./chunk-BW6DQC2L.js";
16
+ } from "./chunk-PWY6EBZ6.js";
17
17
  import "./chunk-CQGTEGKL.js";
18
18
  export {
19
19
  activateProvider,
@@ -31,4 +31,4 @@ export {
31
31
  setDefaultModelSelection,
32
32
  updateProvider
33
33
  };
34
- //# sourceMappingURL=config-OV5OLKOC.js.map
34
+ //# sourceMappingURL=config-QI3KOU42.js.map