openfox 2.0.35 → 2.0.37

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 (40) hide show
  1. package/dist/{chat-handler-YCFYRTFG.js → chat-handler-HPXOVKUX.js} +9 -9
  2. package/dist/{chunk-4MEYFRSN.js → chunk-2G2H4HUO.js} +128 -46
  3. package/dist/{chunk-OSMUHB5F.js → chunk-55RWNJBT.js} +6 -2
  4. package/dist/{chunk-XJU2PBLN.js → chunk-BJPPDLJX.js} +136 -46
  5. package/dist/{chunk-IBKGV6OJ.js → chunk-DAC7YKYW.js} +7 -7
  6. package/dist/{chunk-6PLAWCHQ.js → chunk-EHYFYQXY.js} +4 -2
  7. package/dist/{chunk-BGCDJYNU.js → chunk-JGNAYJJZ.js} +6 -5
  8. package/dist/{chunk-WTDCC4IP.js → chunk-NF6WHQAT.js} +9 -2
  9. package/dist/{chunk-Y2CUJ7JD.js → chunk-PKE4MQWI.js} +13 -7
  10. package/dist/{chunk-BW6DQC2L.js → chunk-PWY6EBZ6.js} +16 -39
  11. package/dist/{chunk-EB2RIVZA.js → chunk-QG2WM7EX.js} +5 -5
  12. package/dist/{chunk-DHOOJDHX.js → chunk-SM2PK6TV.js} +4 -4
  13. package/dist/{chunk-ZMONCXGW.js → chunk-WXAOEWJS.js} +3 -3
  14. package/dist/{chunk-ZJ4FP6RS.js → chunk-Z6W4YHJB.js} +7 -1
  15. package/dist/{chunk-QYP6MOB5.js → chunk-ZBLT7MNL.js} +2 -2
  16. package/dist/cli/dev.js +1 -1
  17. package/dist/cli/index.js +1 -1
  18. package/dist/{client-X6BVH4Q4.js → client-XTPAYYRH.js} +3 -3
  19. package/dist/{client-pure-5NOTSIRK.js → client-pure-N2MOIDQ6.js} +2 -2
  20. package/dist/{compactor-SHEOFZDB.js → compactor-RZA5VSRT.js} +6 -6
  21. package/dist/{config-OV5OLKOC.js → config-QI3KOU42.js} +2 -2
  22. package/dist/{events-YLICLPBY.js → events-KZZPCW2Q.js} +3 -3
  23. package/dist/{folding-PI67HWBR.js → folding-ENYH4LMG.js} +2 -2
  24. package/dist/{orchestrator-YJV4CXKV.js → orchestrator-PTKTND5E.js} +8 -8
  25. package/dist/package.json +1 -1
  26. package/dist/{processor-VGVPSVGE.js → processor-D6HYPRZD.js} +9 -9
  27. package/dist/{protocol-BC1QSQ-Y.d.ts → protocol-COpRaEpx.d.ts} +1 -0
  28. package/dist/{provider-AHIVZZI5.js → provider-ZLMMOORK.js} +6 -6
  29. package/dist/{provider-manager-5742XBEI.js → provider-manager-GTWFGTCV.js} +4 -4
  30. package/dist/{serve-6IHK22FM.js → serve-NGAWODZ2.js} +13 -13
  31. package/dist/server/index.d.ts +2 -2
  32. package/dist/server/index.js +12 -12
  33. package/dist/{server-RHYGD2Q6.js → server-K2BDDDL4.js} +11 -11
  34. package/dist/shared/index.d.ts +2 -2
  35. package/dist/{tools-2QBZBNDL.js → tools-JPKBLAQ5.js} +7 -7
  36. package/dist/web/assets/{index-DIvNnXne.css → index-GFd2V-Ja.css} +1 -1
  37. package/dist/web/assets/{index-BRf6aPnh.js → index-I3ZLVKAn.js} +65 -64
  38. package/dist/web/index.html +2 -2
  39. package/dist/web/sw.js +1 -1
  40. package/package.json +1 -1
@@ -2,11 +2,11 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-BGCDJYNU.js";
5
+ } from "./chunk-JGNAYJJZ.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-EB2RIVZA.js";
9
- import "./chunk-XJU2PBLN.js";
8
+ } from "./chunk-QG2WM7EX.js";
9
+ import "./chunk-BJPPDLJX.js";
10
10
  import "./chunk-DL6ZILAF.js";
11
11
  import "./chunk-PBGOZMVY.js";
12
12
  import "./chunk-VRGRAQDG.js";
@@ -19,18 +19,18 @@ import {
19
19
  import "./chunk-EU3WWTFH.js";
20
20
  import "./chunk-JNSSFTVD.js";
21
21
  import "./chunk-YQ3SOPBI.js";
22
- import "./chunk-OSMUHB5F.js";
22
+ import "./chunk-55RWNJBT.js";
23
23
  import {
24
24
  getEventStore
25
- } from "./chunk-WTDCC4IP.js";
26
- import "./chunk-6PLAWCHQ.js";
25
+ } from "./chunk-NF6WHQAT.js";
26
+ import "./chunk-EHYFYQXY.js";
27
27
  import "./chunk-ZPIZLTWU.js";
28
28
  import "./chunk-J2GP3J3X.js";
29
29
  import "./chunk-Z4FMBCJO.js";
30
- import "./chunk-ZJ4FP6RS.js";
30
+ import "./chunk-Z6W4YHJB.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-HPXOVKUX.js.map
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-IBKGV6OJ.js";
24
+ } from "./chunk-DAC7YKYW.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-BJPPDLJX.js";
65
65
  import {
66
66
  getPathSeparator,
67
67
  isAbsolutePath
@@ -82,7 +82,7 @@ import {
82
82
  ALWAYS_ALLOWED,
83
83
  ALWAYS_ALLOWED_FOR_SUBAGENTS,
84
84
  TOP_LEVEL_ONLY_TOOLS
85
- } from "./chunk-OSMUHB5F.js";
85
+ } from "./chunk-55RWNJBT.js";
86
86
  import {
87
87
  createSession,
88
88
  deleteSession,
@@ -109,14 +109,14 @@ import {
109
109
  updateSessionMetadata,
110
110
  updateSessionProvider,
111
111
  updateSessionRunning
112
- } from "./chunk-WTDCC4IP.js";
112
+ } from "./chunk-NF6WHQAT.js";
113
113
  import {
114
114
  initDatabase
115
115
  } from "./chunk-ZPIZLTWU.js";
116
116
  import {
117
117
  createProviderManager,
118
118
  parseDefaultModelSelection
119
- } from "./chunk-DHOOJDHX.js";
119
+ } from "./chunk-SM2PK6TV.js";
120
120
  import {
121
121
  detectModel,
122
122
  getLlmStatus
@@ -2190,8 +2190,9 @@ var SessionManager = class {
2190
2190
  }
2191
2191
  getCurrentModelSettings() {
2192
2192
  const model = this.providerManager.getCurrentModel();
2193
- if (!model) return void 0;
2194
- return this.providerManager.getModelSettings(model);
2193
+ const providerId = this.providerManager.getActiveProviderId();
2194
+ if (!model || !providerId) return void 0;
2195
+ return this.providerManager.getModelSettings(providerId, model);
2195
2196
  }
2196
2197
  getCurrentModelContext() {
2197
2198
  return this.providerManager.getCurrentModelContext();
@@ -3435,12 +3436,91 @@ function createDirectoryRoutes() {
3435
3436
  return router;
3436
3437
  }
3437
3438
 
3438
- // src/server/routes/auto-update.ts
3439
+ // src/server/routes/file-search.ts
3439
3440
  import { Router as Router6 } from "express";
3441
+ import fg from "fast-glob";
3442
+ function createFileSearchRoutes() {
3443
+ const router = Router6();
3444
+ router.get("/", async (req, res) => {
3445
+ const query = req.query["q"] || "";
3446
+ const workdir = req.query["workdir"] || process.cwd();
3447
+ try {
3448
+ const results = await searchFiles(query, workdir);
3449
+ res.json(results);
3450
+ } catch {
3451
+ res.status(500).json({ error: "File search failed" });
3452
+ }
3453
+ });
3454
+ return router;
3455
+ }
3456
+ async function searchFiles(query, workdir) {
3457
+ const entries = await fg(["**/*"], {
3458
+ cwd: workdir,
3459
+ dot: true,
3460
+ deep: 5,
3461
+ onlyFiles: false,
3462
+ ignore: [
3463
+ "**/node_modules/**",
3464
+ "**/.git/**",
3465
+ "**/dist/**",
3466
+ "**/.next/**",
3467
+ "**/.cache/**",
3468
+ "**/__pycache__/**",
3469
+ "**/*.lock",
3470
+ "**/.openfox/**"
3471
+ ],
3472
+ objectMode: true
3473
+ });
3474
+ const scored = [];
3475
+ for (const entry of entries) {
3476
+ const filePath = entry.path;
3477
+ let score = fuzzyScore(filePath, query);
3478
+ if (score === 0) {
3479
+ continue;
3480
+ }
3481
+ const isDir = entry.dirent.isDirectory();
3482
+ if (isDir) {
3483
+ score += 10;
3484
+ }
3485
+ scored.push({
3486
+ path: filePath,
3487
+ name: filePath.split("/").pop() || filePath,
3488
+ type: isDir ? "directory" : "file",
3489
+ score
3490
+ });
3491
+ }
3492
+ scored.sort((a, b) => b.score - a.score);
3493
+ return scored.slice(0, 20);
3494
+ }
3495
+ function fuzzyScore(filePath, query) {
3496
+ if (!query) {
3497
+ return 1;
3498
+ }
3499
+ const fileName = filePath.split("/").pop() || filePath;
3500
+ const fileNameLower = fileName.toLowerCase();
3501
+ const fullPathLower = filePath.toLowerCase();
3502
+ const lowerQuery = query.toLowerCase();
3503
+ if (fileNameLower === lowerQuery) {
3504
+ return 100;
3505
+ }
3506
+ if (fileNameLower.startsWith(lowerQuery)) {
3507
+ return 80;
3508
+ }
3509
+ if (fileNameLower.includes(lowerQuery)) {
3510
+ return 60;
3511
+ }
3512
+ if (fullPathLower.includes(lowerQuery)) {
3513
+ return 40;
3514
+ }
3515
+ return 0;
3516
+ }
3517
+
3518
+ // src/server/routes/auto-update.ts
3519
+ import { Router as Router7 } from "express";
3440
3520
  import { spawn as spawn2 } from "child_process";
3441
3521
 
3442
3522
  // src/constants.ts
3443
- var VERSION = "2.0.35";
3523
+ var VERSION = "2.0.37";
3444
3524
 
3445
3525
  // src/server/routes/auto-update.ts
3446
3526
  var updateInProgress = false;
@@ -3458,7 +3538,7 @@ async function checkAuth(req, opts) {
3458
3538
  return true;
3459
3539
  }
3460
3540
  function createAutoUpdateRoutes(options = {}) {
3461
- const router = Router6();
3541
+ const router = Router7();
3462
3542
  router.get("/check", async (_req, res) => {
3463
3543
  const isService = isRunningAsService();
3464
3544
  const current = VERSION;
@@ -3620,7 +3700,7 @@ async function createServerHandle(config4) {
3620
3700
  setMcpTools(mcpTools);
3621
3701
  logger.info("MCP tools registered", { count: mcpTools.length });
3622
3702
  }
3623
- const { signalMcpReady } = await import("./server-RHYGD2Q6.js");
3703
+ const { signalMcpReady } = await import("./server-K2BDDDL4.js");
3624
3704
  signalMcpReady();
3625
3705
  });
3626
3706
  const app = express();
@@ -3778,7 +3858,7 @@ async function createServerHandle(config4) {
3778
3858
  res.json({ project });
3779
3859
  });
3780
3860
  app.get("/api/sessions", async (req, res) => {
3781
- const { getRecentUserPromptsForSession } = await import("./events-YLICLPBY.js");
3861
+ const { getRecentUserPromptsForSession } = await import("./events-KZZPCW2Q.js");
3782
3862
  const projectId = req.query["projectId"];
3783
3863
  const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
3784
3864
  const offset = parseInt(req.query["offset"]) || 0;
@@ -3811,9 +3891,9 @@ async function createServerHandle(config4) {
3811
3891
  res.status(201).json({ session });
3812
3892
  });
3813
3893
  app.get("/api/sessions/:id", async (req, res) => {
3814
- const { getEventStore: getEventStore2 } = await import("./events-YLICLPBY.js");
3815
- const { buildMessagesFromStoredEvents } = await import("./folding-PI67HWBR.js");
3816
- const { getPendingQuestionsForSession } = await import("./tools-2QBZBNDL.js");
3894
+ const { getEventStore: getEventStore2 } = await import("./events-KZZPCW2Q.js");
3895
+ const { buildMessagesFromStoredEvents } = await import("./folding-ENYH4LMG.js");
3896
+ const { getPendingQuestionsForSession } = await import("./tools-JPKBLAQ5.js");
3817
3897
  const session = sessionManager.getSession(req.params.id);
3818
3898
  if (!session) {
3819
3899
  return res.status(404).json({ error: "Session not found" });
@@ -3844,8 +3924,8 @@ async function createServerHandle(config4) {
3844
3924
  res.json({ success: true });
3845
3925
  });
3846
3926
  app.post("/api/sessions/:id/provider", async (req, res) => {
3847
- const { getEventStore: getEventStore2 } = await import("./events-YLICLPBY.js");
3848
- const { buildMessagesFromStoredEvents } = await import("./folding-PI67HWBR.js");
3927
+ const { getEventStore: getEventStore2 } = await import("./events-KZZPCW2Q.js");
3928
+ const { buildMessagesFromStoredEvents } = await import("./folding-ENYH4LMG.js");
3849
3929
  const sessionId = req.params.id;
3850
3930
  const session = sessionManager.getSession(sessionId);
3851
3931
  if (!session) {
@@ -3858,7 +3938,7 @@ async function createServerHandle(config4) {
3858
3938
  const provider = providerManager.getProviders().find((p) => p.id === providerId);
3859
3939
  const resolvedModel = model ?? provider?.models?.[0]?.id ?? "auto";
3860
3940
  sessionManager.setSessionProvider(sessionId, providerId, resolvedModel);
3861
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-OV5OLKOC.js");
3941
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-QI3KOU42.js");
3862
3942
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
3863
3943
  const updatedConfig = setDefaultModelSelection(globalConfig, providerId, resolvedModel);
3864
3944
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -3907,8 +3987,8 @@ async function createServerHandle(config4) {
3907
3987
  res.json({ success: true });
3908
3988
  });
3909
3989
  app.put("/api/sessions/:id/mode", async (req, res) => {
3910
- const { getEventStore: getEventStore2 } = await import("./events-YLICLPBY.js");
3911
- const { buildMessagesFromStoredEvents } = await import("./folding-PI67HWBR.js");
3990
+ const { getEventStore: getEventStore2 } = await import("./events-KZZPCW2Q.js");
3991
+ const { buildMessagesFromStoredEvents } = await import("./folding-ENYH4LMG.js");
3912
3992
  const sessionId = req.params.id;
3913
3993
  const session = sessionManager.getSession(sessionId);
3914
3994
  if (!session) {
@@ -3964,15 +4044,15 @@ async function createServerHandle(config4) {
3964
4044
  if (!callId || approved === void 0) {
3965
4045
  return res.status(400).json({ error: "callId and approved are required" });
3966
4046
  }
3967
- const { providePathConfirmation } = await import("./tools-2QBZBNDL.js");
4047
+ const { providePathConfirmation } = await import("./tools-JPKBLAQ5.js");
3968
4048
  const result = providePathConfirmation(callId, approved, alwaysAllow);
3969
4049
  if (!result.found) {
3970
4050
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
3971
4051
  }
3972
- const { getEventStore: getEventStore2 } = await import("./events-YLICLPBY.js");
3973
- const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-PI67HWBR.js");
4052
+ const { getEventStore: getEventStore2 } = await import("./events-KZZPCW2Q.js");
4053
+ const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-ENYH4LMG.js");
3974
4054
  const { createSessionStateMessage } = await import("./protocol-BKNLAEPJ.js");
3975
- const { getPendingQuestionsForSession } = await import("./tools-2QBZBNDL.js");
4055
+ const { getPendingQuestionsForSession } = await import("./tools-JPKBLAQ5.js");
3976
4056
  const eventStore = getEventStore2();
3977
4057
  const events = eventStore.getEvents(sessionId);
3978
4058
  const messages = buildMessagesFromStoredEvents(events);
@@ -3993,7 +4073,7 @@ async function createServerHandle(config4) {
3993
4073
  if (!skip && typeof answer !== "string") {
3994
4074
  return res.status(400).json({ error: "answer is required when not skipping" });
3995
4075
  }
3996
- const { provideAnswer } = await import("./tools-2QBZBNDL.js");
4076
+ const { provideAnswer } = await import("./tools-JPKBLAQ5.js");
3997
4077
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
3998
4078
  if (!found) {
3999
4079
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -4029,15 +4109,15 @@ async function createServerHandle(config4) {
4029
4109
  if (!session) {
4030
4110
  return res.status(404).json({ error: "Session not found" });
4031
4111
  }
4032
- const { stopSessionExecution } = await import("./chat-handler-YCFYRTFG.js");
4033
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-2QBZBNDL.js");
4112
+ const { stopSessionExecution } = await import("./chat-handler-HPXOVKUX.js");
4113
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-JPKBLAQ5.js");
4034
4114
  const queuedMessages = sessionManager.getQueueState(sessionId);
4035
4115
  sessionManager.clearMessageQueue(sessionId);
4036
4116
  stopSessionExecution(sessionId, sessionManager);
4037
4117
  abortSession(sessionId);
4038
4118
  cancelQuestionsForSession(sessionId, "Session stopped by user");
4039
4119
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
4040
- const eventStore = (await import("./events-YLICLPBY.js")).getEventStore();
4120
+ const eventStore = (await import("./events-KZZPCW2Q.js")).getEventStore();
4041
4121
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
4042
4122
  res.json({ success: true, queuedMessages });
4043
4123
  });
@@ -4051,7 +4131,7 @@ async function createServerHandle(config4) {
4051
4131
  if (typeof messageIndex !== "number" || messageIndex < 0) {
4052
4132
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
4053
4133
  }
4054
- const { truncateSessionMessages } = await import("./events-YLICLPBY.js");
4134
+ const { truncateSessionMessages } = await import("./events-KZZPCW2Q.js");
4055
4135
  truncateSessionMessages(sessionId, messageIndex);
4056
4136
  res.json({ success: true });
4057
4137
  });
@@ -4069,7 +4149,7 @@ async function createServerHandle(config4) {
4069
4149
  if (!msg) {
4070
4150
  return res.status(400).json({ error: "Message not found at this index" });
4071
4151
  }
4072
- const { truncateSessionMessages } = await import("./events-YLICLPBY.js");
4152
+ const { truncateSessionMessages } = await import("./events-KZZPCW2Q.js");
4073
4153
  truncateSessionMessages(sessionId, messageIndex - 1);
4074
4154
  sessionManager.queueMessage(sessionId, "asap", msg.content, msg.attachments, msg.messageKind);
4075
4155
  res.json({ success: true });
@@ -4141,7 +4221,7 @@ async function createServerHandle(config4) {
4141
4221
  let visionFallback;
4142
4222
  let globalWorkdir;
4143
4223
  try {
4144
- const { loadGlobalConfig, getVisionFallback } = await import("./config-OV5OLKOC.js");
4224
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-QI3KOU42.js");
4145
4225
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4146
4226
  const fallback = getVisionFallback(globalConfig);
4147
4227
  if (fallback) {
@@ -4149,7 +4229,8 @@ async function createServerHandle(config4) {
4149
4229
  enabled: fallback.enabled ?? false,
4150
4230
  url: fallback.url ?? "http://localhost:11434",
4151
4231
  model: fallback.model ?? "qwen3.5:0.8b",
4152
- timeout: fallback.timeout ?? 120
4232
+ timeout: fallback.timeout ?? 120,
4233
+ backend: fallback.backend ?? "ollama"
4153
4234
  };
4154
4235
  }
4155
4236
  globalWorkdir = globalConfig.workspace?.workdir;
@@ -4237,7 +4318,7 @@ async function createServerHandle(config4) {
4237
4318
  const apiKey = req.query["apiKey"];
4238
4319
  if (!url) return res.status(400).json({ error: "url is required" });
4239
4320
  try {
4240
- const { fetchModelsWithContext } = await import("./provider-manager-5742XBEI.js");
4321
+ const { fetchModelsWithContext } = await import("./provider-manager-GTWFGTCV.js");
4241
4322
  const models = await fetchModelsWithContext(url, apiKey);
4242
4323
  if (models.length === 0) {
4243
4324
  return res.status(404).json({ error: `No models found at ${buildModelsUrl(url)}`, url });
@@ -4285,7 +4366,7 @@ async function createServerHandle(config4) {
4285
4366
  try {
4286
4367
  const { getModelProfile: getModelProfile2 } = await import("./profiles-Q36ELWQF.js");
4287
4368
  const { getBackendCapabilities } = await import("./backend-AGXWAU7A.js");
4288
- const { buildNonStreamingCreateParams } = await import("./client-pure-5NOTSIRK.js");
4369
+ const { buildNonStreamingCreateParams } = await import("./client-pure-N2MOIDQ6.js");
4289
4370
  const { OpenAIHttpClient } = await import("./http-client-SIPAW7IM.js");
4290
4371
  const { ensureVersionPrefix } = await import("./url-utils-QWAHP54Q.js");
4291
4372
  const profile = getModelProfile2(model);
@@ -4353,7 +4434,7 @@ async function createServerHandle(config4) {
4353
4434
  return res.status(400).json({ error: "name, url, and backend are required" });
4354
4435
  }
4355
4436
  try {
4356
- const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-OV5OLKOC.js");
4437
+ const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-QI3KOU42.js");
4357
4438
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4358
4439
  const providerBackend = backend;
4359
4440
  const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
@@ -4391,7 +4472,7 @@ async function createServerHandle(config4) {
4391
4472
  app.post("/api/init/config", async (req, res) => {
4392
4473
  const { workdir, visionFallback } = req.body;
4393
4474
  try {
4394
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4475
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4395
4476
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4396
4477
  const updatedConfig = {
4397
4478
  ...globalConfig,
@@ -4419,7 +4500,7 @@ async function createServerHandle(config4) {
4419
4500
  });
4420
4501
  app.delete("/api/providers/:id", async (req, res) => {
4421
4502
  const { id } = req.params;
4422
- const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-OV5OLKOC.js");
4503
+ const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-QI3KOU42.js");
4423
4504
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4424
4505
  const updatedConfig = removeProvider(globalConfig, id);
4425
4506
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4431,7 +4512,7 @@ async function createServerHandle(config4) {
4431
4512
  const { id } = req.params;
4432
4513
  const { isLocal } = req.body;
4433
4514
  try {
4434
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-OV5OLKOC.js");
4515
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-QI3KOU42.js");
4435
4516
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4436
4517
  const provider = globalConfig.providers.find((p) => p.id === id);
4437
4518
  if (!provider) {
@@ -4460,7 +4541,7 @@ async function createServerHandle(config4) {
4460
4541
  models: modelConfigs
4461
4542
  } = req.body;
4462
4543
  try {
4463
- const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-OV5OLKOC.js");
4544
+ const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-QI3KOU42.js");
4464
4545
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4465
4546
  const provider = globalConfig.providers.find((p) => p.id === id);
4466
4547
  if (!provider) {
@@ -4498,7 +4579,7 @@ async function createServerHandle(config4) {
4498
4579
  return res.status(400).json({ error: result.error });
4499
4580
  }
4500
4581
  const llmClient = getLLMClient();
4501
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-OV5OLKOC.js");
4582
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-QI3KOU42.js");
4502
4583
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4503
4584
  const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
4504
4585
  await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
@@ -4525,7 +4606,7 @@ async function createServerHandle(config4) {
4525
4606
  });
4526
4607
  async function rebuildMcpTools() {
4527
4608
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-B7QP6NLA.js");
4528
- const { setMcpTools: setMcpTools2 } = await import("./tools-2QBZBNDL.js");
4609
+ const { setMcpTools: setMcpTools2 } = await import("./tools-JPKBLAQ5.js");
4529
4610
  const mcpTools = createMcpTools2(mcpManager);
4530
4611
  setMcpTools2(mcpTools);
4531
4612
  }
@@ -4587,7 +4668,7 @@ async function createServerHandle(config4) {
4587
4668
  };
4588
4669
  await mcpManager.addServer(name, serverCfg);
4589
4670
  const server = mcpManager.getServer(name);
4590
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4671
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4591
4672
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4592
4673
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
4593
4674
  await saveGlobalConfig(config4.mode ?? "production", {
@@ -4613,7 +4694,7 @@ async function createServerHandle(config4) {
4613
4694
  return res.status(404).json({ error: `MCP server '${name}' not found` });
4614
4695
  }
4615
4696
  mcpManager.removeServer(name);
4616
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4697
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4617
4698
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4618
4699
  const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
4619
4700
  delete updatedMcpServers[name];
@@ -4638,7 +4719,7 @@ async function createServerHandle(config4) {
4638
4719
  await mcpManager.setToolEnabled(name, toolName, enabled);
4639
4720
  const server = mcpManager.getServer(name);
4640
4721
  if (server) {
4641
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-OV5OLKOC.js");
4722
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-QI3KOU42.js");
4642
4723
  const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4643
4724
  const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
4644
4725
  const serverCfg = mcpServers2[name];
@@ -4709,6 +4790,7 @@ async function createServerHandle(config4) {
4709
4790
  await getCurrentBranch(req, res);
4710
4791
  });
4711
4792
  app.use("/api/directories", createDirectoryRoutes());
4793
+ app.use("/api/files", createFileSearchRoutes());
4712
4794
  const webDir = resolve3(__dirname3, "../../web");
4713
4795
  const isDev = config4.mode === "development";
4714
4796
  let viteServer;
@@ -4837,7 +4919,7 @@ async function createServerHandle(config4) {
4837
4919
  const state = sessionManager.getContextState(sessionId);
4838
4920
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
4839
4921
  });
4840
- const { QueueProcessor } = await import("./processor-VGVPSVGE.js");
4922
+ const { QueueProcessor } = await import("./processor-D6HYPRZD.js");
4841
4923
  const queueProcessor = new QueueProcessor({
4842
4924
  sessionManager,
4843
4925
  providerManager,
@@ -4912,4 +4994,4 @@ export {
4912
4994
  createServerHandle,
4913
4995
  createServer
4914
4996
  };
4915
- //# sourceMappingURL=chunk-4MEYFRSN.js.map
4997
+ //# sourceMappingURL=chunk-2G2H4HUO.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-Z4FMBCJO.js";
7
7
  import {
8
8
  buildModelParams
9
- } from "./chunk-ZJ4FP6RS.js";
9
+ } from "./chunk-Z6W4YHJB.js";
10
10
  import {
11
11
  logger
12
12
  } from "./chunk-K44MW7JJ.js";
@@ -69,6 +69,10 @@ Platform: ${process.platform} (${process.arch})${modelLine}
69
69
  - If the current runtime reminder says build mode, focus on implementation, verification, and completing approved criteria.
70
70
  - Respect tool and permission constraints enforced by the server even if the conversation suggests otherwise.
71
71
 
72
+ ## FILE REFERENCES
73
+ - The user may reference files or directories with an @ prefix, e.g. @src/index.ts or @web/components/.
74
+ - These are paths relative to the working directory above. Strip the leading @ and resolve against the working directory \u2014 never treat an @-reference as an absolute path.
75
+
72
76
  ## IMPORTANT GUARDRAILS
73
77
  - NEVER delete/git checkout an already modified file: that would result in a data loss.
74
78
 
@@ -701,4 +705,4 @@ export {
701
705
  createChatDoneEvent,
702
706
  consumeStreamGenerator
703
707
  };
704
- //# sourceMappingURL=chunk-OSMUHB5F.js.map
708
+ //# sourceMappingURL=chunk-55RWNJBT.js.map