openfox 2.0.81 → 2.0.83

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 (49) hide show
  1. package/dist/{branch.api-3YJSWOZG.js → branch.api-XVTYACSH.js} +2 -2
  2. package/dist/{chat-handler-NRJWHZB2.js → chat-handler-6KBOE4YA.js} +17 -17
  3. package/dist/chunk-2X3V4SQC.js +7 -0
  4. package/dist/{chunk-4GMRZU7A.js → chunk-3D3N2PXI.js} +4 -4
  5. package/dist/{chunk-VZYC5OLW.js → chunk-5ZHVQOI3.js} +2 -2
  6. package/dist/{chunk-PVO2XVLV.js → chunk-7ROIY3QN.js} +122 -81
  7. package/dist/{chunk-WYJTY63G.js → chunk-CNJ63FXJ.js} +3 -2
  8. package/dist/{chunk-EZDTCQMR.js → chunk-D324ULDG.js} +7 -19
  9. package/dist/{chunk-E3MS5CF7.js → chunk-DQP5HSDS.js} +2 -2
  10. package/dist/{chunk-QHLWWQRC.js → chunk-FVY2JOTO.js} +2 -2
  11. package/dist/{chunk-XW7BCI3O.js → chunk-HLZUN7OR.js} +4 -4
  12. package/dist/{chunk-ZO5EXQMG.js → chunk-IIRXKSB5.js} +53 -2
  13. package/dist/chunk-J7GAZGZT.js +57 -0
  14. package/dist/{chunk-AIIFQYU5.js → chunk-JKZPMRH2.js} +2 -2
  15. package/dist/{chunk-37WF2Z3T.js → chunk-JXTHW3YX.js} +2 -2
  16. package/dist/{chunk-NLMT2HII.js → chunk-KMGVUOLT.js} +36 -32
  17. package/dist/{chunk-D25OSL6V.js → chunk-OBQN5ATP.js} +32 -32
  18. package/dist/{chunk-WL2WEJAK.js → chunk-SBSQD7MG.js} +2 -2
  19. package/dist/{chunk-CJDYSUU5.js → chunk-VB23QPW3.js} +9 -6
  20. package/dist/{chunk-3Q5WQMPA.js → chunk-WL6AOKRD.js} +8 -8
  21. package/dist/cli/dev.js +1 -1
  22. package/dist/cli/index.js +1 -1
  23. package/dist/{client-V5DZRO2D.js → client-TA2VD4LR.js} +5 -3
  24. package/dist/{compactor-3UHLN554.js → compactor-YKESKGHL.js} +6 -6
  25. package/dist/http-client-QZY7W36Q.js +11 -0
  26. package/dist/{manager-FIE2LCGJ.js → manager-WOUOQVLV.js} +4 -4
  27. package/dist/{orchestrator-KOL34NS2.js → orchestrator-BO62JYFM.js} +12 -12
  28. package/dist/package.json +1 -1
  29. package/dist/{path-security-EKTUMDJW.js → path-security-AWDNKRZ4.js} +3 -3
  30. package/dist/{platform-KME5DVX5.js → platform-7AK5MB4K.js} +3 -3
  31. package/dist/{processor-S3SDZHQC.js → processor-BLGEVOPK.js} +16 -16
  32. package/dist/{provider-TIZV4IFE.js → provider-QVVJ6XNZ.js} +6 -4
  33. package/dist/{provider-manager-PD3BXUHY.js → provider-manager-7246YSJT.js} +6 -4
  34. package/dist/{serve-PESDYZZP.js → serve-HXV2RX3Q.js} +19 -19
  35. package/dist/server/index.d.ts +0 -5
  36. package/dist/server/index.js +18 -18
  37. package/dist/{server-LWXTOEIJ.js → server-V4VA4A2E.js} +14 -14
  38. package/dist/{settings-DMYBLBDQ.js → settings-6TJIHDVX.js} +2 -2
  39. package/dist/{tools-FZ7HWHOW.js → tools-X4YLRR2Y.js} +11 -11
  40. package/dist/{update-SVJRA6YZ.js → update-MFOCAROI.js} +2 -2
  41. package/dist/web/assets/{index-BkC11Dy_.js → index-C9jXZWzN.js} +76 -76
  42. package/dist/web/assets/{index-CO9RvnPX.css → index-DfmXvFVe.css} +1 -1
  43. package/dist/web/index.html +2 -2
  44. package/dist/web/sw.js +1 -1
  45. package/dist/{workspace-J74ZMSOJ.js → workspace-N2PIBOJV.js} +3 -3
  46. package/package.json +1 -1
  47. package/dist/chunk-UP5CYTEC.js +0 -7
  48. package/dist/chunk-WGMJCFCE.js +0 -14
  49. package/dist/http-client-PIWB7BXK.js +0 -9
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  gitSpawnEnv
3
- } from "./chunk-WGMJCFCE.js";
3
+ } from "./chunk-J7GAZGZT.js";
4
4
  import {
5
5
  logger
6
6
  } from "./chunk-K44MW7JJ.js";
@@ -51,4 +51,4 @@ function getGitBranch(cwd) {
51
51
  export {
52
52
  getCurrentBranch
53
53
  };
54
- //# sourceMappingURL=branch.api-3YJSWOZG.js.map
54
+ //# sourceMappingURL=branch.api-XVTYACSH.js.map
@@ -2,21 +2,25 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-3Q5WQMPA.js";
5
+ } from "./chunk-WL6AOKRD.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-EZDTCQMR.js";
9
- import "./chunk-D25OSL6V.js";
10
- import "./chunk-AIIFQYU5.js";
8
+ } from "./chunk-D324ULDG.js";
9
+ import "./chunk-OBQN5ATP.js";
10
+ import "./chunk-JKZPMRH2.js";
11
11
  import "./chunk-NWO6GRYE.js";
12
12
  import "./chunk-VPFUXGMM.js";
13
- import "./chunk-37WF2Z3T.js";
14
- import "./chunk-WGMJCFCE.js";
15
- import "./chunk-4GMRZU7A.js";
13
+ import "./chunk-JXTHW3YX.js";
14
+ import "./chunk-J7GAZGZT.js";
15
+ import "./chunk-3D3N2PXI.js";
16
+ import {
17
+ createChatMessageMessage,
18
+ createPhaseChangedMessage,
19
+ createSessionRunningMessage
20
+ } from "./chunk-SJTG56CH.js";
16
21
  import "./chunk-EU3WWTFH.js";
17
- import "./chunk-QHLWWQRC.js";
18
- import "./chunk-VZYC5OLW.js";
19
- import "./chunk-WYJTY63G.js";
22
+ import "./chunk-FVY2JOTO.js";
23
+ import "./chunk-5ZHVQOI3.js";
20
24
  import "./chunk-EYIWUONA.js";
21
25
  import "./chunk-6AE3JPDJ.js";
22
26
  import "./chunk-I72ACQ6R.js";
@@ -25,16 +29,12 @@ import {
25
29
  } from "./chunk-BUXIESO5.js";
26
30
  import "./chunk-A2IZ4PWQ.js";
27
31
  import "./chunk-AANVMTYU.js";
28
- import "./chunk-RGUUZD5B.js";
29
- import {
30
- createChatMessageMessage,
31
- createPhaseChangedMessage,
32
- createSessionRunningMessage
33
- } from "./chunk-SJTG56CH.js";
34
32
  import "./chunk-J2GP3J3X.js";
35
33
  import "./chunk-V4IE7HJY.js";
36
34
  import "./chunk-YHEQTVFV.js";
37
35
  import "./chunk-RMXPVQP4.js";
36
+ import "./chunk-CNJ63FXJ.js";
37
+ import "./chunk-RGUUZD5B.js";
38
38
  import "./chunk-K44MW7JJ.js";
39
39
  import "./chunk-X6BXZFO7.js";
40
40
  import "./chunk-NH2PVB6R.js";
@@ -160,4 +160,4 @@ export {
160
160
  startChatSession,
161
161
  stopSessionExecution
162
162
  };
163
- //# sourceMappingURL=chat-handler-NRJWHZB2.js.map
163
+ //# sourceMappingURL=chat-handler-6KBOE4YA.js.map
@@ -0,0 +1,7 @@
1
+ // src/constants.ts
2
+ var VERSION = "2.0.83";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-2X3V4SQC.js.map
@@ -1,9 +1,9 @@
1
- import {
2
- getEventStore
3
- } from "./chunk-BUXIESO5.js";
4
1
  import {
5
2
  createChatPathConfirmationMessage
6
3
  } from "./chunk-SJTG56CH.js";
4
+ import {
5
+ getEventStore
6
+ } from "./chunk-BUXIESO5.js";
7
7
 
8
8
  // src/server/tools/path-security.ts
9
9
  import { realpath } from "fs/promises";
@@ -494,4 +494,4 @@ export {
494
494
  getConfirmationSessionId,
495
495
  getPendingConfirmationsBySession
496
496
  };
497
- //# sourceMappingURL=chunk-4GMRZU7A.js.map
497
+ //# sourceMappingURL=chunk-3D3N2PXI.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-WYJTY63G.js";
4
+ } from "./chunk-CNJ63FXJ.js";
5
5
 
6
6
  // src/server/utils/platform.ts
7
7
  import os from "os";
@@ -63,4 +63,4 @@ export {
63
63
  isWindowsPath,
64
64
  isAbsolutePath
65
65
  };
66
- //# sourceMappingURL=chunk-VZYC5OLW.js.map
66
+ //# sourceMappingURL=chunk-5ZHVQOI3.js.map
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-NLMT2HII.js";
24
+ } from "./chunk-KMGVUOLT.js";
25
25
  import {
26
26
  agentExists,
27
27
  createToolRegistry,
@@ -66,7 +66,7 @@ import {
66
66
  setSkillEnabled,
67
67
  skillExists,
68
68
  updateOwnedSkill
69
- } from "./chunk-D25OSL6V.js";
69
+ } from "./chunk-OBQN5ATP.js";
70
70
  import {
71
71
  createMcpTools
72
72
  } from "./chunk-NWO6GRYE.js";
@@ -85,7 +85,10 @@ import {
85
85
  validateRef,
86
86
  validateWorkspaceName,
87
87
  workspaceExists
88
- } from "./chunk-37WF2Z3T.js";
88
+ } from "./chunk-JXTHW3YX.js";
89
+ import {
90
+ createContextStateMessage
91
+ } from "./chunk-SJTG56CH.js";
89
92
  import {
90
93
  EventEmitter
91
94
  } from "./chunk-EU3WWTFH.js";
@@ -93,22 +96,17 @@ import {
93
96
  ALWAYS_ALLOWED,
94
97
  ALWAYS_ALLOWED_FOR_SUBAGENTS,
95
98
  TOP_LEVEL_ONLY_TOOLS
96
- } from "./chunk-QHLWWQRC.js";
99
+ } from "./chunk-FVY2JOTO.js";
97
100
  import {
98
101
  getPathSeparator,
99
102
  isAbsolutePath
100
- } from "./chunk-VZYC5OLW.js";
101
- import {
102
- deleteSetting,
103
- getSetting,
104
- setSetting
105
- } from "./chunk-WYJTY63G.js";
103
+ } from "./chunk-5ZHVQOI3.js";
106
104
  import {
107
105
  getProject
108
106
  } from "./chunk-6AE3JPDJ.js";
109
107
  import {
110
108
  VERSION
111
- } from "./chunk-UP5CYTEC.js";
109
+ } from "./chunk-2X3V4SQC.js";
112
110
  import {
113
111
  emitAssistantMessageStart,
114
112
  emitContextState,
@@ -140,18 +138,12 @@ import {
140
138
  updateSessionRunning,
141
139
  updateSessionWorkdir
142
140
  } from "./chunk-AANVMTYU.js";
143
- import {
144
- initDatabase
145
- } from "./chunk-RGUUZD5B.js";
146
- import {
147
- createContextStateMessage
148
- } from "./chunk-SJTG56CH.js";
149
141
  import {
150
142
  createProviderManager,
151
143
  detectModel,
152
144
  getLlmStatus,
153
145
  parseDefaultModelSelection
154
- } from "./chunk-CJDYSUU5.js";
146
+ } from "./chunk-VB23QPW3.js";
155
147
  import {
156
148
  getModelProfile
157
149
  } from "./chunk-V4IE7HJY.js";
@@ -162,8 +154,17 @@ import {
162
154
  buildModelsUrl
163
155
  } from "./chunk-HNCM3D7Y.js";
164
156
  import {
165
- SessionNotFoundError
166
- } from "./chunk-ZO5EXQMG.js";
157
+ SessionNotFoundError,
158
+ proxyFetch
159
+ } from "./chunk-IIRXKSB5.js";
160
+ import {
161
+ deleteSetting,
162
+ getSetting,
163
+ setSetting
164
+ } from "./chunk-CNJ63FXJ.js";
165
+ import {
166
+ initDatabase
167
+ } from "./chunk-RGUUZD5B.js";
167
168
  import {
168
169
  logger,
169
170
  setLogLevel
@@ -2653,19 +2654,6 @@ var SessionManager = class {
2653
2654
  const branch = await getGitBranch(effectiveWorkdir);
2654
2655
  return { workdir: effectiveWorkdir, branch };
2655
2656
  }
2656
- /**
2657
- * Check that the session's persisted branch matches the actual branch on disk.
2658
- * If they differ (and persisted branch exists), returns a warning message.
2659
- */
2660
- async checkBranchConsistency(sessionId) {
2661
- const session = this.getSession(sessionId);
2662
- if (!session?.branch) return null;
2663
- const actualBranch = await getGitBranch(session.workspace ?? session.workdir);
2664
- if (actualBranch && actualBranch !== session.branch) {
2665
- return `Branch mismatch: session expects "${session.branch}" but workspace is on "${actualBranch}". The workspace branch was changed externally.`;
2666
- }
2667
- return null;
2668
- }
2669
2657
  // ============================================================================
2670
2658
  // Session Lifecycle
2671
2659
  // ============================================================================
@@ -3312,8 +3300,7 @@ var SessionManager = class {
3312
3300
  * Uses workspace path when active, otherwise the project workdir.
3313
3301
  */
3314
3302
  getLspManager(sessionId) {
3315
- const session = this.requireSession(sessionId);
3316
- const effectiveWorkdir = session.workspace ?? session.workdir;
3303
+ const effectiveWorkdir = this.getEffectiveWorkdir(sessionId);
3317
3304
  return getLspManager(sessionId, effectiveWorkdir);
3318
3305
  }
3319
3306
  async applyBranchIfNeeded(projectDir, projectName, workspaceName, branch, sourceBranch) {
@@ -3355,7 +3342,7 @@ var SessionManager = class {
3355
3342
  if (target === "original" && !session.workspace && !branch) return session;
3356
3343
  if (target !== "original" && session.workspace?.split("/").pop() === target && !branch) return session;
3357
3344
  if (isBranchChangeOnly) {
3358
- const currentBranch = await getGitBranch(session.workspace ?? session.workdir);
3345
+ const currentBranch = await getGitBranch(this.getEffectiveWorkdir(sessionId));
3359
3346
  if (currentBranch === branch) return session;
3360
3347
  }
3361
3348
  const previousPath = session.workspace;
@@ -5409,7 +5396,7 @@ async function createServerHandle(config3) {
5409
5396
  setMcpTools(mcpTools);
5410
5397
  logger.info("MCP tools registered", { count: mcpTools.length });
5411
5398
  }
5412
- const { signalMcpReady } = await import("./server-LWXTOEIJ.js");
5399
+ const { signalMcpReady } = await import("./server-V4VA4A2E.js");
5413
5400
  signalMcpReady();
5414
5401
  });
5415
5402
  const app = express();
@@ -5570,7 +5557,7 @@ async function createServerHandle(config3) {
5570
5557
  const { getProject: getProject2 } = await import("./projects-ZGJGICGT.js");
5571
5558
  const project = getProject2(req.params.id);
5572
5559
  if (!project) return res.status(404).json({ error: "Project not found" });
5573
- const { listBranches } = await import("./workspace-J74ZMSOJ.js");
5560
+ const { listBranches } = await import("./workspace-N2PIBOJV.js");
5574
5561
  const branches = await listBranches(project.workdir);
5575
5562
  res.json({ branches });
5576
5563
  });
@@ -5580,14 +5567,13 @@ async function createServerHandle(config3) {
5580
5567
  if (!project) return res.status(404).json({ error: "Project not found" });
5581
5568
  const { branch } = req.body;
5582
5569
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
5583
- const { checkoutBranch } = await import("./workspace-J74ZMSOJ.js");
5570
+ const { checkoutBranch } = await import("./workspace-N2PIBOJV.js");
5584
5571
  try {
5585
5572
  await checkoutBranch(project.workdir, branch);
5586
5573
  const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
5587
5574
  const allSessions = sessionManager.listSessions();
5588
5575
  for (const s of allSessions) {
5589
- const effectiveWorkdir = s.workspace ?? s.workdir;
5590
- if (effectiveWorkdir === project.workdir) {
5576
+ if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
5591
5577
  updateSessionBranch2(s.id, branch);
5592
5578
  sessionManager.emitBranchChange(s.id);
5593
5579
  }
@@ -5603,7 +5589,7 @@ async function createServerHandle(config3) {
5603
5589
  if (!project) return res.status(404).json({ error: "Project not found" });
5604
5590
  const { name, sourceBranch } = req.body;
5605
5591
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
5606
- const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2 } = await import("./workspace-J74ZMSOJ.js");
5592
+ const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2 } = await import("./workspace-N2PIBOJV.js");
5607
5593
  try {
5608
5594
  await validateRef2(project.workdir, name);
5609
5595
  let sb;
@@ -5614,8 +5600,7 @@ async function createServerHandle(config3) {
5614
5600
  const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
5615
5601
  const allSessions = sessionManager.listSessions();
5616
5602
  for (const s of allSessions) {
5617
- const effectiveWorkdir = s.workspace ?? s.workdir;
5618
- if (effectiveWorkdir === project.workdir) {
5603
+ if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
5619
5604
  updateSessionBranch2(s.id, name);
5620
5605
  sessionManager.emitBranchChange(s.id);
5621
5606
  }
@@ -5628,8 +5613,8 @@ async function createServerHandle(config3) {
5628
5613
  app.get("/api/sessions/:id/branches", async (req, res) => {
5629
5614
  const session = sessionManager.getSession(req.params.id);
5630
5615
  if (!session) return res.status(404).json({ error: "Session not found" });
5631
- const effectiveWorkdir = session.workspace ?? session.workdir;
5632
- const { listBranches, getDefaultBranch: getDefaultBranch2 } = await import("./workspace-J74ZMSOJ.js");
5616
+ const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
5617
+ const { listBranches, getDefaultBranch: getDefaultBranch2 } = await import("./workspace-N2PIBOJV.js");
5633
5618
  const [branches, defaultBranch] = await Promise.all([
5634
5619
  listBranches(effectiveWorkdir),
5635
5620
  getDefaultBranch2(session.workdir)
@@ -5642,8 +5627,8 @@ async function createServerHandle(config3) {
5642
5627
  if (!session) return res.status(404).json({ error: "Session not found" });
5643
5628
  const { branch } = req.body;
5644
5629
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
5645
- const effectiveWorkdir = session.workspace ?? session.workdir;
5646
- const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-J74ZMSOJ.js");
5630
+ const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
5631
+ const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-N2PIBOJV.js");
5647
5632
  const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
5648
5633
  try {
5649
5634
  await validateRef2(effectiveWorkdir, branch);
@@ -5658,6 +5643,23 @@ async function createServerHandle(config3) {
5658
5643
  }
5659
5644
  }
5660
5645
  }
5646
+ const reminderContent = `<system-reminder>
5647
+ This session is now operating on branch "${branch}".
5648
+ All file and git operations should use this branch.
5649
+ </system-reminder>`;
5650
+ sessionManager.addMessage(req.params.id, {
5651
+ role: "user",
5652
+ content: reminderContent,
5653
+ isSystemGenerated: true,
5654
+ messageKind: "auto-prompt",
5655
+ metadata: {
5656
+ type: "branch",
5657
+ name: "Branch",
5658
+ color: "#22c55e",
5659
+ kind: "definition",
5660
+ branchName: branch
5661
+ }
5662
+ });
5661
5663
  res.json({ branch });
5662
5664
  } catch (err) {
5663
5665
  res.status(400).json({ error: err instanceof Error ? err.message : "Failed to checkout branch" });
@@ -5668,17 +5670,17 @@ async function createServerHandle(config3) {
5668
5670
  if (!session) return res.status(404).json({ error: "Session not found" });
5669
5671
  const { name, sourceBranch } = req.body;
5670
5672
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
5671
- const effectiveWorkdir = session.workspace ?? session.workdir;
5672
- const { validateRef: validateRef2 } = await import("./workspace-J74ZMSOJ.js");
5673
+ const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
5674
+ const { validateRef: validateRef2 } = await import("./workspace-N2PIBOJV.js");
5673
5675
  const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
5674
5676
  try {
5675
5677
  await validateRef2(effectiveWorkdir, name);
5676
5678
  if (sourceBranch) {
5677
- const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-J74ZMSOJ.js");
5679
+ const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-N2PIBOJV.js");
5678
5680
  const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
5679
5681
  await createBranch(effectiveWorkdir, name, sb);
5680
5682
  } else {
5681
- const { createBranch } = await import("./workspace-J74ZMSOJ.js");
5683
+ const { createBranch } = await import("./workspace-N2PIBOJV.js");
5682
5684
  await createBranch(effectiveWorkdir, name);
5683
5685
  }
5684
5686
  updateSessionBranch2(req.params.id, name);
@@ -5691,6 +5693,23 @@ async function createServerHandle(config3) {
5691
5693
  }
5692
5694
  }
5693
5695
  }
5696
+ const reminderContent = `<system-reminder>
5697
+ This session is now operating on branch "${name}".
5698
+ All file and git operations should use this branch.
5699
+ </system-reminder>`;
5700
+ sessionManager.addMessage(req.params.id, {
5701
+ role: "user",
5702
+ content: reminderContent,
5703
+ isSystemGenerated: true,
5704
+ messageKind: "auto-prompt",
5705
+ metadata: {
5706
+ type: "branch",
5707
+ name: "Branch",
5708
+ color: "#22c55e",
5709
+ kind: "definition",
5710
+ branchName: name
5711
+ }
5712
+ });
5694
5713
  res.json({ branch: name, sourceBranch: sourceBranch ?? null });
5695
5714
  } catch (err) {
5696
5715
  res.status(400).json({ error: err instanceof Error ? err.message : "Failed to create branch" });
@@ -5700,14 +5719,14 @@ async function createServerHandle(config3) {
5700
5719
  const { getProject: getProject2 } = await import("./projects-ZGJGICGT.js");
5701
5720
  const project = getProject2(req.params.id);
5702
5721
  if (!project) return res.status(404).json({ error: "Project not found" });
5703
- const { listWorkspaces } = await import("./workspace-J74ZMSOJ.js");
5722
+ const { listWorkspaces } = await import("./workspace-N2PIBOJV.js");
5704
5723
  const all = await listWorkspaces(project.name, project.workdir);
5705
5724
  const workspacesList = all.filter((ws) => ws.path !== project.workdir);
5706
5725
  res.json({ workspaces: workspacesList });
5707
5726
  });
5708
5727
  app.get("/api/sessions", async (req, res) => {
5709
5728
  const { getRecentUserPromptsForSession } = await import("./events-GF2WNELM.js");
5710
- const { getPendingConfirmationsBySession } = await import("./path-security-EKTUMDJW.js");
5729
+ const { getPendingConfirmationsBySession } = await import("./path-security-AWDNKRZ4.js");
5711
5730
  const projectId = req.query["projectId"];
5712
5731
  const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
5713
5732
  const offset = parseInt(req.query["offset"]) || 0;
@@ -5797,8 +5816,8 @@ async function createServerHandle(config3) {
5797
5816
  app.get("/api/sessions/:id", async (req, res) => {
5798
5817
  const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-GF2WNELM.js");
5799
5818
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-UACKBHUZ.js");
5800
- const { getPendingQuestionsForSession } = await import("./tools-FZ7HWHOW.js");
5801
- const { getMaxVisibleItems } = await import("./settings-DMYBLBDQ.js");
5819
+ const { getPendingQuestionsForSession } = await import("./tools-X4YLRR2Y.js");
5820
+ const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
5802
5821
  const session = sessionManager.getSession(req.params.id);
5803
5822
  if (!session) {
5804
5823
  return res.status(404).json({ error: "Session not found" });
@@ -5828,8 +5847,8 @@ async function createServerHandle(config3) {
5828
5847
  if (!session) {
5829
5848
  return res.status(404).json({ error: "Session not found" });
5830
5849
  }
5831
- const { stopSessionExecution } = await import("./chat-handler-NRJWHZB2.js");
5832
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-FZ7HWHOW.js");
5850
+ const { stopSessionExecution } = await import("./chat-handler-6KBOE4YA.js");
5851
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-X4YLRR2Y.js");
5833
5852
  sessionManager.clearMessageQueue(sessionId);
5834
5853
  stopSessionExecution(sessionId, sessionManager);
5835
5854
  abortSession(sessionId);
@@ -5860,7 +5879,7 @@ async function createServerHandle(config3) {
5860
5879
  app.post("/api/sessions/:id/provider", async (req, res) => {
5861
5880
  const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-GF2WNELM.js");
5862
5881
  const { buildMessagesFromStoredEvents } = await import("./folding-UACKBHUZ.js");
5863
- const { getMaxVisibleItems } = await import("./settings-DMYBLBDQ.js");
5882
+ const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
5864
5883
  const sessionId = req.params.id;
5865
5884
  const session = sessionManager.getSession(sessionId);
5866
5885
  if (!session) {
@@ -5975,7 +5994,7 @@ async function createServerHandle(config3) {
5975
5994
  app.put("/api/sessions/:id/mode", async (req, res) => {
5976
5995
  const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-GF2WNELM.js");
5977
5996
  const { buildMessagesFromStoredEvents } = await import("./folding-UACKBHUZ.js");
5978
- const { getMaxVisibleItems } = await import("./settings-DMYBLBDQ.js");
5997
+ const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
5979
5998
  const sessionId = req.params.id;
5980
5999
  const session = sessionManager.getSession(sessionId);
5981
6000
  if (!session) {
@@ -6036,7 +6055,7 @@ async function createServerHandle(config3) {
6036
6055
  if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
6037
6056
  return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
6038
6057
  }
6039
- const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-FZ7HWHOW.js");
6058
+ const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-X4YLRR2Y.js");
6040
6059
  const pendingSessionId = getConfirmationSessionId(callId);
6041
6060
  if (!pendingSessionId) {
6042
6061
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -6051,8 +6070,8 @@ async function createServerHandle(config3) {
6051
6070
  const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-GF2WNELM.js");
6052
6071
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-UACKBHUZ.js");
6053
6072
  const { createSessionStateMessage } = await import("./protocol-Q7X4NEME.js");
6054
- const { getPendingQuestionsForSession } = await import("./tools-FZ7HWHOW.js");
6055
- const { getMaxVisibleItems } = await import("./settings-DMYBLBDQ.js");
6073
+ const { getPendingQuestionsForSession } = await import("./tools-X4YLRR2Y.js");
6074
+ const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
6056
6075
  const eventStore = getEventStore2();
6057
6076
  const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
6058
6077
  const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
@@ -6088,7 +6107,7 @@ async function createServerHandle(config3) {
6088
6107
  if (!skip && typeof answer !== "string") {
6089
6108
  return res.status(400).json({ error: "answer is required when not skipping" });
6090
6109
  }
6091
- const { provideAnswer } = await import("./tools-FZ7HWHOW.js");
6110
+ const { provideAnswer } = await import("./tools-X4YLRR2Y.js");
6092
6111
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
6093
6112
  if (!found) {
6094
6113
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -6116,7 +6135,7 @@ async function createServerHandle(config3) {
6116
6135
  if (!session) {
6117
6136
  return res.status(404).json({ error: "Session not found" });
6118
6137
  }
6119
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-DMYBLBDQ.js");
6138
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-6TJIHDVX.js");
6120
6139
  if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
6121
6140
  return res.json({ success: false, reason: "disabled" });
6122
6141
  }
@@ -6148,7 +6167,7 @@ async function createServerHandle(config3) {
6148
6167
  backend: activeProvider?.backend ?? llmClient.getBackend(),
6149
6168
  model: llmClient.getModel()
6150
6169
  };
6151
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-KOL34NS2.js");
6170
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-BO62JYFM.js");
6152
6171
  runAgentTurn(
6153
6172
  {
6154
6173
  sessionManager,
@@ -6186,8 +6205,8 @@ async function createServerHandle(config3) {
6186
6205
  if (!session) {
6187
6206
  return res.status(404).json({ error: "Session not found" });
6188
6207
  }
6189
- const { stopSessionExecution } = await import("./chat-handler-NRJWHZB2.js");
6190
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-FZ7HWHOW.js");
6208
+ const { stopSessionExecution } = await import("./chat-handler-6KBOE4YA.js");
6209
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-X4YLRR2Y.js");
6191
6210
  const queuedMessages = sessionManager.getQueueState(sessionId);
6192
6211
  sessionManager.clearMessageQueue(sessionId);
6193
6212
  stopSessionExecution(sessionId, sessionManager);
@@ -6270,7 +6289,7 @@ async function createServerHandle(config3) {
6270
6289
  res.json({ accepted: true });
6271
6290
  });
6272
6291
  app.get("/api/settings", async (req, res) => {
6273
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-DMYBLBDQ.js");
6292
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-6TJIHDVX.js");
6274
6293
  const keysParam = req.query["keys"];
6275
6294
  if (!keysParam) {
6276
6295
  return res.status(400).json({ error: "keys query parameter is required" });
@@ -6283,19 +6302,19 @@ async function createServerHandle(config3) {
6283
6302
  res.json(result);
6284
6303
  });
6285
6304
  app.get("/api/settings/:key", async (req, res) => {
6286
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-DMYBLBDQ.js");
6305
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-6TJIHDVX.js");
6287
6306
  const key = req.params.key;
6288
6307
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
6289
6308
  res.json({ key, value });
6290
6309
  });
6291
6310
  app.get("/api/settings/:key", async (req, res) => {
6292
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-DMYBLBDQ.js");
6311
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-6TJIHDVX.js");
6293
6312
  const key = req.params.key;
6294
6313
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
6295
6314
  res.json({ key, value });
6296
6315
  });
6297
6316
  app.put("/api/settings/:key", async (req, res) => {
6298
- const { setSetting: setSetting2 } = await import("./settings-DMYBLBDQ.js");
6317
+ const { setSetting: setSetting2 } = await import("./settings-6TJIHDVX.js");
6299
6318
  const key = req.params.key;
6300
6319
  const { value } = req.body;
6301
6320
  if (value === void 0) {
@@ -6322,7 +6341,7 @@ async function createServerHandle(config3) {
6322
6341
  }
6323
6342
  });
6324
6343
  app.get("/api/tools/shells", async (_req, res) => {
6325
- const { listAvailableShells } = await import("./platform-KME5DVX5.js");
6344
+ const { listAvailableShells } = await import("./platform-7AK5MB4K.js");
6326
6345
  res.json({ shells: listAvailableShells() });
6327
6346
  });
6328
6347
  app.get("/api/config", async (_req, res) => {
@@ -6480,13 +6499,35 @@ async function createServerHandle(config3) {
6480
6499
  return res.status(400).json({ success: false, error: message });
6481
6500
  }
6482
6501
  });
6502
+ app.post("/api/proxy/test", async (_req, res) => {
6503
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-6TJIHDVX.js");
6504
+ const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
6505
+ if (!proxyUrl) {
6506
+ return res.status(400).json({ success: false, error: "No proxy URL configured" });
6507
+ }
6508
+ try {
6509
+ const response = await proxyFetch("http://example.com", {
6510
+ signal: AbortSignal.timeout(1e4)
6511
+ });
6512
+ if (!response.ok) {
6513
+ return res.status(400).json({ success: false, error: `Proxy returned HTTP ${response.status}` });
6514
+ }
6515
+ return res.json({ success: true, message: "Proxy connection OK" });
6516
+ } catch (error) {
6517
+ const message = error instanceof Error ? error.message : "Connection failed";
6518
+ if (error instanceof DOMException && error.name === "AbortError") {
6519
+ return res.status(400).json({ success: false, error: "Connection timed out" });
6520
+ }
6521
+ return res.status(400).json({ success: false, error: message });
6522
+ }
6523
+ });
6483
6524
  app.get("/api/providers/models", async (req, res) => {
6484
6525
  const url = req.query["url"];
6485
6526
  const apiKey = req.query["apiKey"];
6486
6527
  const backend = req.query["backend"];
6487
6528
  if (!url) return res.status(400).json({ error: "url is required" });
6488
6529
  try {
6489
- const { fetchModelsWithContext } = await import("./provider-manager-PD3BXUHY.js");
6530
+ const { fetchModelsWithContext } = await import("./provider-manager-7246YSJT.js");
6490
6531
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
6491
6532
  const models = await fetchModelsWithContext(
6492
6533
  url,
@@ -6557,7 +6598,7 @@ async function createServerHandle(config3) {
6557
6598
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
6558
6599
  const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
6559
6600
  const { buildNonStreamingCreateParams } = await import("./client-pure-5YE5WFJP.js");
6560
- const { OpenAIHttpClient } = await import("./http-client-PIWB7BXK.js");
6601
+ const { OpenAIHttpClient } = await import("./http-client-QZY7W36Q.js");
6561
6602
  const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
6562
6603
  const profile = getModelProfile2(model);
6563
6604
  const capabilities = getBackendCapabilities(backend || "unknown");
@@ -6815,7 +6856,7 @@ async function createServerHandle(config3) {
6815
6856
  });
6816
6857
  async function rebuildMcpTools() {
6817
6858
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
6818
- const { setMcpTools: setMcpTools2 } = await import("./tools-FZ7HWHOW.js");
6859
+ const { setMcpTools: setMcpTools2 } = await import("./tools-X4YLRR2Y.js");
6819
6860
  const mcpTools = createMcpTools2(mcpManager);
6820
6861
  setMcpTools2(mcpTools);
6821
6862
  }
@@ -7062,13 +7103,13 @@ async function createServerHandle(config3) {
7062
7103
  })
7063
7104
  );
7064
7105
  app.get("/api/sessions/:id/background-processes", async (req, res) => {
7065
- const { getSessionProcesses } = await import("./manager-FIE2LCGJ.js");
7106
+ const { getSessionProcesses } = await import("./manager-WOUOQVLV.js");
7066
7107
  const sessionId = req.params.id;
7067
7108
  const processes = getSessionProcesses(sessionId);
7068
7109
  res.json({ processes });
7069
7110
  });
7070
7111
  app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
7071
- const { stopProcess } = await import("./manager-FIE2LCGJ.js");
7112
+ const { stopProcess } = await import("./manager-WOUOQVLV.js");
7072
7113
  const sessionId = req.params.id;
7073
7114
  const processId = req.params.processId;
7074
7115
  const session = sessionManager.getSession(sessionId);
@@ -7082,7 +7123,7 @@ async function createServerHandle(config3) {
7082
7123
  res.status(500).json({ error: err instanceof Error ? err.message : "Failed to stop process" });
7083
7124
  }
7084
7125
  });
7085
- const { getCurrentBranch } = await import("./branch.api-3YJSWOZG.js");
7126
+ const { getCurrentBranch } = await import("./branch.api-XVTYACSH.js");
7086
7127
  app.get("/api/branch", async (req, res) => {
7087
7128
  await getCurrentBranch(req, res);
7088
7129
  });
@@ -7211,7 +7252,7 @@ async function createServerHandle(config3) {
7211
7252
  const state = sessionManager.getContextState(sessionId);
7212
7253
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
7213
7254
  });
7214
- const { QueueProcessor } = await import("./processor-S3SDZHQC.js");
7255
+ const { QueueProcessor } = await import("./processor-BLGEVOPK.js");
7215
7256
  const queueProcessor = new QueueProcessor({
7216
7257
  sessionManager,
7217
7258
  providerManager,
@@ -7291,4 +7332,4 @@ export {
7291
7332
  createServerHandle,
7292
7333
  createServer
7293
7334
  };
7294
- //# sourceMappingURL=chunk-PVO2XVLV.js.map
7335
+ //# sourceMappingURL=chunk-7ROIY3QN.js.map
@@ -27,7 +27,8 @@ var SETTINGS_KEYS = {
27
27
  SEARCH_SEARXNG_API_KEY: "search.searxngApiKey",
28
28
  TOOLS_USE_RTK: "tools.useRtk",
29
29
  TOOLS_SHELL: "tools.shell",
30
- CONFIRM_ON_WORKSPACE_ACTIONS: "tools.confirmOnWorkspaceActions"
30
+ CONFIRM_ON_WORKSPACE_ACTIONS: "tools.confirmOnWorkspaceActions",
31
+ PROXY_URL: "network.proxyUrl"
31
32
  };
32
33
  var SETTINGS_DEFAULTS = {
33
34
  [SETTINGS_KEYS.DISPLAY_SHOW_THINKING]: "true",
@@ -108,4 +109,4 @@ export {
108
109
  getAllSettings,
109
110
  getMaxVisibleItems
110
111
  };
111
- //# sourceMappingURL=chunk-WYJTY63G.js.map
112
+ //# sourceMappingURL=chunk-CNJ63FXJ.js.map