openfox 2.0.93 → 2.0.95

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 (77) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/CHANGELOG.md +25 -0
  3. package/dist/{chat-handler-MSQFJH7S.js → chat-handler-5FV3TGQD.js} +22 -22
  4. package/dist/{chunk-IAAHDCJN.js → chunk-27SDWNKL.js} +8 -5
  5. package/dist/{chunk-TQATAKVV.js → chunk-4R7G5JB6.js} +1 -1
  6. package/dist/{chunk-3NGD6IVM.js → chunk-5N5JXT7R.js} +3 -3
  7. package/dist/{chunk-NV63HYNR.js → chunk-5UFTFBNW.js} +8 -8
  8. package/dist/{chunk-BJHPUMRX.js → chunk-62X2MPO6.js} +2 -2
  9. package/dist/{chunk-FK6R2YTQ.js → chunk-6RHMIMID.js} +17 -17
  10. package/dist/{chunk-PYJ2SRVC.js → chunk-7P7OKBYQ.js} +20 -4
  11. package/dist/{chunk-GAIAJDPH.js → chunk-D6T3X22W.js} +149 -52
  12. package/dist/{chunk-6OAJNCRY.js → chunk-GLF65XDS.js} +22 -1
  13. package/dist/{chunk-U7D72C4O.js → chunk-HAFRPV7I.js} +13 -3
  14. package/dist/{chunk-AA4PXMSI.js → chunk-KG2PJVOE.js} +253 -95
  15. package/dist/{chunk-NW2KP7PE.js → chunk-MB7STVMR.js} +6 -6
  16. package/dist/{chunk-SXHGRPCI.js → chunk-MC3MCMAF.js} +4 -4
  17. package/dist/{chunk-U2RSFH6A.js → chunk-MRWR3SIT.js} +2 -2
  18. package/dist/{chunk-WWC3R3YL.js → chunk-NLN5LPQ4.js} +2 -2
  19. package/dist/{chunk-NGN3Q26A.js → chunk-OHBY2673.js} +2 -2
  20. package/dist/{chunk-RJQDC2OO.js → chunk-OZD247P4.js} +10 -10
  21. package/dist/{chunk-3QQKKZMF.js → chunk-P637C6X3.js} +2 -2
  22. package/dist/{chunk-C56Z4OVW.js → chunk-SJJVNSA6.js} +2 -2
  23. package/dist/{chunk-7YBGCZSI.js → chunk-TDHDLDGQ.js} +10 -20
  24. package/dist/{chunk-6J5IZ2NL.js → chunk-TSHJW7OC.js} +37 -6
  25. package/dist/{chunk-54Q4TGG6.js → chunk-UEOEA6BB.js} +2 -2
  26. package/dist/chunk-VKU7YBLH.js +7 -0
  27. package/dist/{chunk-ESJNJ5B6.js → chunk-W7P5P54O.js} +3 -3
  28. package/dist/{chunk-ST4NYXLH.js → chunk-WWFH5GAR.js} +2 -2
  29. package/dist/{chunk-YM267G4F.js → chunk-YCPUV7AR.js} +4 -4
  30. package/dist/{chunk-GH5PL3JW.js → chunk-YPBV47DH.js} +6 -9
  31. package/dist/{chunk-DH32AHTL.js → chunk-ZASSAZ73.js} +2 -2
  32. package/dist/{chunk-AQ4KCGXL.js → chunk-ZMSHE564.js} +3 -3
  33. package/dist/cli/dev.js +1 -1
  34. package/dist/cli/index.js +1 -1
  35. package/dist/{client-RBXMHFX3.js → client-RENSCJPZ.js} +5 -5
  36. package/dist/{compactor-R7GGPBPR.js → compactor-3RXIAIPR.js} +10 -10
  37. package/dist/{dynamic-context-4UPNVL3N.js → dynamic-context-CJFDFUJF.js} +9 -9
  38. package/dist/{events-D5AFN2CW.js → events-QHZDLHEB.js} +9 -7
  39. package/dist/{folding-BO6Z6HMP.js → folding-O4OYOTPS.js} +5 -5
  40. package/dist/http-client-U6DVFL7F.js +11 -0
  41. package/dist/{inspect-proxy-NZ3VSMSC.js → inspect-proxy-GF6OI7MR.js} +4 -4
  42. package/dist/{manager-ZPQ6VSM5.js → manager-53J5P4EZ.js} +5 -5
  43. package/dist/{orchestrator-YQI2D4LW.js → orchestrator-LDVMBC23.js} +21 -21
  44. package/dist/package.json +1 -1
  45. package/dist/{path-security-DP75YZK5.js → path-security-72KGHGSV.js} +10 -10
  46. package/dist/{platform-UKZ2QC34.js → platform-7KXP3VVA.js} +4 -4
  47. package/dist/{processor-LVQWRG6M.js → processor-32QUVPV6.js} +21 -21
  48. package/dist/{project-creator-2WMZYQME.js → project-creator-SMWFMIU5.js} +3 -3
  49. package/dist/{projects-N6KVZGMS.js → projects-M5XKC7O6.js} +3 -3
  50. package/dist/{protocol-8BzyapcK.d.ts → protocol-C5ROb3nH.d.ts} +5 -4
  51. package/dist/{protocol-4ZDERZNC.js → protocol-YDNGGADL.js} +3 -3
  52. package/dist/provider/index.d.ts +4 -4
  53. package/dist/{provider-SYYZI2KX.js → provider-A74GHQUO.js} +6 -6
  54. package/dist/{provider-manager-P3ZSA5QS.js → provider-manager-PBOF77RQ.js} +6 -6
  55. package/dist/{registry-ERUV33AP.js → registry-XBEHPY7C.js} +4 -4
  56. package/dist/{serve-HEHWSYMX.js → serve-GL5WUPRP.js} +29 -29
  57. package/dist/server/index.d.ts +39 -3
  58. package/dist/server/index.js +28 -28
  59. package/dist/server-OYVGQU7O.js +46 -0
  60. package/dist/{session-overrides-NPVYNHTM.js → session-overrides-QWD4V5KW.js} +6 -6
  61. package/dist/{sessions-7KCM5QH4.js → sessions-BT4PION7.js} +15 -7
  62. package/dist/{settings-2OVKFWR5.js → settings-2WVGUPYV.js} +3 -3
  63. package/dist/shared/index.d.ts +3 -3
  64. package/dist/shared/index.js +1 -1
  65. package/dist/{tools-HDD7RHEG.js → tools-UTA3TV7P.js} +19 -19
  66. package/dist/{types-_OEK96iM.d.ts → types-D-dEQIrh.d.ts} +1 -1
  67. package/dist/{types-Ci7Tdpq3.d.ts → types-DHxO1nqw.d.ts} +17 -1
  68. package/dist/{update-JARYMNGH.js → update-VUTN743C.js} +2 -2
  69. package/dist/web/assets/{index-DxTIqntH.js → index-BUiw9fSe.js} +22 -22
  70. package/dist/web/assets/{index-B3lfsL1_.css → index-BlV1FebL.css} +1 -1
  71. package/dist/web/index.html +2 -2
  72. package/dist/web/sw.js +1 -1
  73. package/dist/{workspace-YLTMP3OX.js → workspace-IIRKILYL.js} +4 -4
  74. package/package.json +1 -1
  75. package/dist/chunk-LVZ6VQ3K.js +0 -7
  76. package/dist/http-client-E3CV6E5D.js +0 -11
  77. package/dist/server-AAIYC4BH.js +0 -46
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-GAIAJDPH.js";
24
+ } from "./chunk-D6T3X22W.js";
25
25
  import {
26
26
  createToolRegistry,
27
27
  devServerManager,
@@ -30,7 +30,7 @@ import {
30
30
  setMcpManagerForTools,
31
31
  setMcpTools,
32
32
  setNotifyMcpServersChanged
33
- } from "./chunk-FK6R2YTQ.js";
33
+ } from "./chunk-6RHMIMID.js";
34
34
  import {
35
35
  createMcpTools
36
36
  } from "./chunk-NWO6GRYE.js";
@@ -48,7 +48,7 @@ import {
48
48
  validateRef,
49
49
  validateWorkspaceName,
50
50
  workspaceExists
51
- } from "./chunk-BJHPUMRX.js";
51
+ } from "./chunk-62X2MPO6.js";
52
52
  import {
53
53
  deleteOwnedSkill,
54
54
  deleteProjectSkill,
@@ -67,14 +67,14 @@ import {
67
67
  setSkillEnabled,
68
68
  skillExists,
69
69
  updateOwnedSkill
70
- } from "./chunk-SXHGRPCI.js";
70
+ } from "./chunk-MC3MCMAF.js";
71
71
  import {
72
72
  getSessionDisabledServers,
73
73
  setSessionDisabledServers
74
- } from "./chunk-3NGD6IVM.js";
74
+ } from "./chunk-5N5JXT7R.js";
75
75
  import {
76
76
  createContextStateMessage
77
- } from "./chunk-IAAHDCJN.js";
77
+ } from "./chunk-27SDWNKL.js";
78
78
  import {
79
79
  EventEmitter
80
80
  } from "./chunk-EU3WWTFH.js";
@@ -82,12 +82,12 @@ import {
82
82
  getProject,
83
83
  getProjectByWorkdir,
84
84
  updateProject
85
- } from "./chunk-ST4NYXLH.js";
85
+ } from "./chunk-WWFH5GAR.js";
86
86
  import {
87
87
  ALWAYS_ALLOWED,
88
88
  ALWAYS_ALLOWED_FOR_SUBAGENTS,
89
89
  TOP_LEVEL_ONLY_TOOLS
90
- } from "./chunk-U2RSFH6A.js";
90
+ } from "./chunk-MRWR3SIT.js";
91
91
  import {
92
92
  emitAssistantMessageStart,
93
93
  emitContextState,
@@ -99,21 +99,25 @@ import {
99
99
  emitRunningChanged,
100
100
  emitSessionInitialized,
101
101
  emitUserMessage,
102
+ emitWorkflowExecutionChanged,
102
103
  getCurrentContextWindowId,
103
104
  getEventStore,
104
105
  getSessionState,
105
106
  initEventStore
106
- } from "./chunk-PYJ2SRVC.js";
107
+ } from "./chunk-7P7OKBYQ.js";
107
108
  import {
108
109
  getPathSeparator,
109
110
  isAbsolutePath
110
- } from "./chunk-WWC3R3YL.js";
111
+ } from "./chunk-NLN5LPQ4.js";
111
112
  import {
112
113
  VERSION
113
- } from "./chunk-LVZ6VQ3K.js";
114
+ } from "./chunk-VKU7YBLH.js";
114
115
  import {
116
+ clearWorkflowExecution,
115
117
  createSession,
118
+ createWorkflowExecution,
116
119
  deleteSession,
120
+ getActiveWorkflowExecution,
117
121
  getSession,
118
122
  getSessionCachedPrompt,
119
123
  listSessions,
@@ -125,8 +129,9 @@ import {
125
129
  updateSessionMetadata,
126
130
  updateSessionProvider,
127
131
  updateSessionRunning,
128
- updateSessionWorkdir
129
- } from "./chunk-6J5IZ2NL.js";
132
+ updateSessionWorkdir,
133
+ updateWorkflowExecutionStatus
134
+ } from "./chunk-TSHJW7OC.js";
130
135
  import {
131
136
  agentExists,
132
137
  deleteAgent,
@@ -148,13 +153,13 @@ import {
148
153
  saveAgentToProject,
149
154
  saveItemToDir,
150
155
  setRuntimeConfig
151
- } from "./chunk-NGN3Q26A.js";
156
+ } from "./chunk-OHBY2673.js";
152
157
  import {
153
158
  createProviderManager,
154
159
  detectModel,
155
160
  getLlmStatus,
156
161
  parseDefaultModelSelection
157
- } from "./chunk-GH5PL3JW.js";
162
+ } from "./chunk-YPBV47DH.js";
158
163
  import {
159
164
  getModelProfile
160
165
  } from "./chunk-V4IE7HJY.js";
@@ -166,24 +171,23 @@ import {
166
171
  } from "./chunk-HNCM3D7Y.js";
167
172
  import {
168
173
  SessionNotFoundError,
169
- WorkspaceInUseError,
170
- proxyFetch
171
- } from "./chunk-7YBGCZSI.js";
174
+ WorkspaceInUseError
175
+ } from "./chunk-TDHDLDGQ.js";
172
176
  import {
173
177
  deleteSetting,
174
178
  getSetting,
175
179
  setSetting
176
- } from "./chunk-54Q4TGG6.js";
180
+ } from "./chunk-UEOEA6BB.js";
177
181
  import {
178
182
  initDatabase
179
- } from "./chunk-6OAJNCRY.js";
183
+ } from "./chunk-GLF65XDS.js";
180
184
  import {
181
185
  logger,
182
186
  setLogLevel
183
187
  } from "./chunk-K44MW7JJ.js";
184
188
  import {
185
189
  createServerMessage
186
- } from "./chunk-TQATAKVV.js";
190
+ } from "./chunk-4R7G5JB6.js";
187
191
  import {
188
192
  getGlobalConfigDir
189
193
  } from "./chunk-CQGTEGKL.js";
@@ -2947,6 +2951,138 @@ var SessionManager = class {
2947
2951
  return updatedSession;
2948
2952
  }
2949
2953
  // ============================================================================
2954
+ // Workflow Execution
2955
+ // ============================================================================
2956
+ /**
2957
+ * Start a new workflow execution. Cancels any existing active execution first,
2958
+ * then inserts a new row and emits events.
2959
+ */
2960
+ startWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor, params) {
2961
+ const existing = this.getActiveWorkflowExecution(sessionId);
2962
+ if (existing) {
2963
+ this.cancelWorkflow(sessionId, existing.id, existing.workflowId, existing.workflowName, existing.workflowColor);
2964
+ }
2965
+ createWorkflowExecution(executionId, sessionId, workflowId, workflowName, workflowColor, params);
2966
+ emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "running");
2967
+ const updatedSession = this.requireSession(sessionId);
2968
+ this.emit({ type: "session_updated", session: updatedSession });
2969
+ }
2970
+ /**
2971
+ * Update the current step of a running workflow execution.
2972
+ */
2973
+ updateWorkflowStep(sessionId, executionId, stepId, stepName, workflowId, workflowName, workflowColor) {
2974
+ updateWorkflowExecutionStatus(executionId, "running", stepId, stepName);
2975
+ emitWorkflowExecutionChanged(
2976
+ sessionId,
2977
+ executionId,
2978
+ workflowId,
2979
+ workflowName,
2980
+ workflowColor,
2981
+ "running",
2982
+ stepId,
2983
+ stepName
2984
+ );
2985
+ const updatedSession = this.requireSession(sessionId);
2986
+ this.emit({ type: "session_updated", session: updatedSession });
2987
+ }
2988
+ /**
2989
+ * Pause at a user step. Sets status to 'waiting' and records step output.
2990
+ */
2991
+ waitAtStep(sessionId, executionId, stepId, stepName, stepOutput, workflowId, workflowName, workflowColor) {
2992
+ updateWorkflowExecutionStatus(executionId, "waiting", stepId, stepName, stepOutput);
2993
+ emitWorkflowExecutionChanged(
2994
+ sessionId,
2995
+ executionId,
2996
+ workflowId,
2997
+ workflowName,
2998
+ workflowColor,
2999
+ "waiting",
3000
+ stepId,
3001
+ stepName
3002
+ );
3003
+ this.setPhase(sessionId, "waiting");
3004
+ const updatedSession = this.requireSession(sessionId);
3005
+ this.emit({ type: "session_updated", session: updatedSession });
3006
+ }
3007
+ /**
3008
+ * Resume a paused workflow. Returns the saved params and step output.
3009
+ */
3010
+ resumeWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
3011
+ const row = getActiveWorkflowExecution(sessionId);
3012
+ if (!row || row.id !== executionId) return null;
3013
+ updateWorkflowExecutionStatus(executionId, "running");
3014
+ emitWorkflowExecutionChanged(
3015
+ sessionId,
3016
+ executionId,
3017
+ workflowId,
3018
+ workflowName,
3019
+ workflowColor,
3020
+ "running",
3021
+ row.current_step_id ?? void 0,
3022
+ row.current_step_name ?? void 0
3023
+ );
3024
+ const updatedSession = this.requireSession(sessionId);
3025
+ this.emit({ type: "session_updated", session: updatedSession });
3026
+ return {
3027
+ params: JSON.parse(row.params ?? "{}"),
3028
+ stepOutput: JSON.parse(row.step_output ?? "{}")
3029
+ };
3030
+ }
3031
+ /**
3032
+ * Mark workflow as completed and clean up.
3033
+ */
3034
+ completeWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
3035
+ updateWorkflowExecutionStatus(executionId, "completed");
3036
+ clearWorkflowExecution(executionId);
3037
+ emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "completed");
3038
+ this.setPhase(sessionId, "done");
3039
+ const updatedSession = this.requireSession(sessionId);
3040
+ this.emit({ type: "session_updated", session: updatedSession });
3041
+ }
3042
+ /**
3043
+ * Cancel/exit a workflow execution.
3044
+ */
3045
+ cancelWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
3046
+ updateWorkflowExecutionStatus(executionId, "cancelled");
3047
+ clearWorkflowExecution(executionId);
3048
+ emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "cancelled");
3049
+ this.setPhase(sessionId, "build");
3050
+ const updatedSession = this.requireSession(sessionId);
3051
+ this.emit({ type: "session_updated", session: updatedSession });
3052
+ }
3053
+ /**
3054
+ * Mark workflow as blocked.
3055
+ */
3056
+ blockWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
3057
+ updateWorkflowExecutionStatus(executionId, "blocked");
3058
+ clearWorkflowExecution(executionId);
3059
+ emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "blocked");
3060
+ this.setPhase(sessionId, "blocked");
3061
+ const updatedSession = this.requireSession(sessionId);
3062
+ this.emit({ type: "session_updated", session: updatedSession });
3063
+ }
3064
+ /**
3065
+ * Get the active workflow execution for a session, mapped to the shared type.
3066
+ */
3067
+ getActiveWorkflowExecution(sessionId) {
3068
+ const row = getActiveWorkflowExecution(sessionId);
3069
+ if (!row) return null;
3070
+ return {
3071
+ id: row.id,
3072
+ sessionId: row.session_id,
3073
+ workflowId: row.workflow_id,
3074
+ workflowName: row.workflow_name,
3075
+ ...row.workflow_color ? { workflowColor: row.workflow_color } : {},
3076
+ status: row.status,
3077
+ ...row.current_step_id ? { currentStepId: row.current_step_id } : {},
3078
+ ...row.current_step_name ? { currentStepName: row.current_step_name } : {},
3079
+ stepOutput: JSON.parse(row.step_output ?? "{}"),
3080
+ params: JSON.parse(row.params ?? "{}"),
3081
+ createdAt: row.created_at,
3082
+ updatedAt: row.updated_at
3083
+ };
3084
+ }
3085
+ // ============================================================================
2950
3086
  // Session Metadata (DB operations)
2951
3087
  // ============================================================================
2952
3088
  /**
@@ -5575,7 +5711,7 @@ async function createServerHandle(config3) {
5575
5711
  setMcpTools(mcpTools);
5576
5712
  logger.info("MCP tools registered", { count: mcpTools.length });
5577
5713
  }
5578
- const { signalMcpReady } = await import("./server-AAIYC4BH.js");
5714
+ const { signalMcpReady } = await import("./server-OYVGQU7O.js");
5579
5715
  signalMcpReady();
5580
5716
  });
5581
5717
  const app = express();
@@ -5653,7 +5789,7 @@ async function createServerHandle(config3) {
5653
5789
  res.json({ tools });
5654
5790
  });
5655
5791
  app.get("/api/projects", async (_req, res) => {
5656
- const { listProjects } = await import("./projects-N6KVZGMS.js");
5792
+ const { listProjects } = await import("./projects-M5XKC7O6.js");
5657
5793
  const projects = listProjects();
5658
5794
  res.json({ projects });
5659
5795
  });
@@ -5662,7 +5798,7 @@ async function createServerHandle(config3) {
5662
5798
  if (!name || !workdir) {
5663
5799
  return res.status(400).json({ error: "name and workdir are required" });
5664
5800
  }
5665
- const { createDirectoryWithGit } = await import("./project-creator-2WMZYQME.js");
5801
+ const { createDirectoryWithGit } = await import("./project-creator-SMWFMIU5.js");
5666
5802
  try {
5667
5803
  const project = await createDirectoryWithGit(name, workdir);
5668
5804
  res.status(201).json({ project });
@@ -5707,7 +5843,7 @@ async function createServerHandle(config3) {
5707
5843
  }
5708
5844
  });
5709
5845
  app.get("/api/projects/:id", async (req, res) => {
5710
- const { getProject: getProject2 } = await import("./projects-N6KVZGMS.js");
5846
+ const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
5711
5847
  const project = getProject2(req.params.id);
5712
5848
  if (!project) {
5713
5849
  return res.status(404).json({ error: "Project not found" });
@@ -5715,7 +5851,7 @@ async function createServerHandle(config3) {
5715
5851
  res.json({ project });
5716
5852
  });
5717
5853
  app.put("/api/projects/:id", async (req, res) => {
5718
- const { updateProject: updateProject2 } = await import("./projects-N6KVZGMS.js");
5854
+ const { updateProject: updateProject2 } = await import("./projects-M5XKC7O6.js");
5719
5855
  const { name, customInstructions, dangerLevel } = req.body;
5720
5856
  const updates = {};
5721
5857
  if (name !== void 0) updates.name = name;
@@ -5728,7 +5864,7 @@ async function createServerHandle(config3) {
5728
5864
  res.json({ project: updated });
5729
5865
  });
5730
5866
  app.delete("/api/projects/:id", async (req, res) => {
5731
- const { getProject: getProject2, deleteProject } = await import("./projects-N6KVZGMS.js");
5867
+ const { getProject: getProject2, deleteProject } = await import("./projects-M5XKC7O6.js");
5732
5868
  const project = getProject2(req.params.id);
5733
5869
  if (!project) {
5734
5870
  return res.status(404).json({ error: "Project not found" });
@@ -5737,7 +5873,7 @@ async function createServerHandle(config3) {
5737
5873
  res.json({ success: true });
5738
5874
  });
5739
5875
  app.put("/api/projects/:id/star", async (req, res) => {
5740
- const { toggleStar } = await import("./projects-N6KVZGMS.js");
5876
+ const { toggleStar } = await import("./projects-M5XKC7O6.js");
5741
5877
  const { isStarred } = req.body;
5742
5878
  if (typeof isStarred !== "boolean") {
5743
5879
  return res.status(400).json({ error: "isStarred is required and must be a boolean" });
@@ -5749,26 +5885,26 @@ async function createServerHandle(config3) {
5749
5885
  res.json({ project });
5750
5886
  });
5751
5887
  app.get("/api/projects/:id/branches", async (req, res) => {
5752
- const { getProject: getProject2 } = await import("./projects-N6KVZGMS.js");
5888
+ const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
5753
5889
  const project = getProject2(req.params.id);
5754
5890
  if (!project) return res.status(404).json({ error: "Project not found" });
5755
- const { listBranches } = await import("./workspace-YLTMP3OX.js");
5891
+ const { listBranches } = await import("./workspace-IIRKILYL.js");
5756
5892
  const branches = await listBranches(project.workdir);
5757
5893
  res.json({ branches });
5758
5894
  });
5759
5895
  app.post("/api/projects/:id/checkout", async (req, res) => {
5760
- const { getProject: getProject2 } = await import("./projects-N6KVZGMS.js");
5896
+ const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
5761
5897
  const project = getProject2(req.params.id);
5762
5898
  if (!project) return res.status(404).json({ error: "Project not found" });
5763
5899
  const { branch } = req.body;
5764
5900
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
5765
- const { checkoutBranch, isGitRepository } = await import("./workspace-YLTMP3OX.js");
5901
+ const { checkoutBranch, isGitRepository } = await import("./workspace-IIRKILYL.js");
5766
5902
  if (!await isGitRepository(project.workdir)) {
5767
5903
  return res.status(400).json({ error: "Project is not a git repository" });
5768
5904
  }
5769
5905
  try {
5770
5906
  await checkoutBranch(project.workdir, branch);
5771
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-7KCM5QH4.js");
5907
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
5772
5908
  const allSessions = sessionManager.listSessions();
5773
5909
  for (const s of allSessions) {
5774
5910
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -5782,12 +5918,12 @@ async function createServerHandle(config3) {
5782
5918
  }
5783
5919
  });
5784
5920
  app.post("/api/projects/:id/checkout-new", async (req, res) => {
5785
- const { getProject: getProject2 } = await import("./projects-N6KVZGMS.js");
5921
+ const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
5786
5922
  const project = getProject2(req.params.id);
5787
5923
  if (!project) return res.status(404).json({ error: "Project not found" });
5788
5924
  const { name, sourceBranch } = req.body;
5789
5925
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
5790
- const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-YLTMP3OX.js");
5926
+ const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-IIRKILYL.js");
5791
5927
  if (!await isGitRepository(project.workdir)) {
5792
5928
  return res.status(400).json({ error: "Project is not a git repository" });
5793
5929
  }
@@ -5804,7 +5940,7 @@ async function createServerHandle(config3) {
5804
5940
  );
5805
5941
  }
5806
5942
  await createBranch(project.workdir, name, sb);
5807
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-7KCM5QH4.js");
5943
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
5808
5944
  const allSessions = sessionManager.listSessions();
5809
5945
  for (const s of allSessions) {
5810
5946
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -5821,7 +5957,7 @@ async function createServerHandle(config3) {
5821
5957
  const session = sessionManager.getSession(req.params.id);
5822
5958
  if (!session) return res.status(404).json({ error: "Session not found" });
5823
5959
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
5824
- const { listBranches, getDefaultBranch } = await import("./workspace-YLTMP3OX.js");
5960
+ const { listBranches, getDefaultBranch } = await import("./workspace-IIRKILYL.js");
5825
5961
  const [branches, defaultBranch] = await Promise.all([
5826
5962
  listBranches(effectiveWorkdir),
5827
5963
  getDefaultBranch(session.workdir)
@@ -5835,8 +5971,8 @@ async function createServerHandle(config3) {
5835
5971
  const { branch } = req.body;
5836
5972
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
5837
5973
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
5838
- const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-YLTMP3OX.js");
5839
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-7KCM5QH4.js");
5974
+ const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-IIRKILYL.js");
5975
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
5840
5976
  try {
5841
5977
  await validateRef2(effectiveWorkdir, branch);
5842
5978
  await checkoutBranch(effectiveWorkdir, branch);
@@ -5878,16 +6014,16 @@ All file and git operations should use this branch.
5878
6014
  const { name, sourceBranch } = req.body;
5879
6015
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
5880
6016
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
5881
- const { validateRef: validateRef2 } = await import("./workspace-YLTMP3OX.js");
5882
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-7KCM5QH4.js");
6017
+ const { validateRef: validateRef2 } = await import("./workspace-IIRKILYL.js");
6018
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
5883
6019
  try {
5884
6020
  await validateRef2(effectiveWorkdir, name);
5885
6021
  if (sourceBranch) {
5886
- const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-YLTMP3OX.js");
6022
+ const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-IIRKILYL.js");
5887
6023
  const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
5888
6024
  await createBranch(effectiveWorkdir, name, sb);
5889
6025
  } else {
5890
- const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-YLTMP3OX.js");
6026
+ const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-IIRKILYL.js");
5891
6027
  const defaultBranch = await getDefaultBranch(session.workdir);
5892
6028
  const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
5893
6029
  await createBranch(effectiveWorkdir, name, sb);
@@ -5925,17 +6061,17 @@ All file and git operations should use this branch.
5925
6061
  }
5926
6062
  });
5927
6063
  app.get("/api/projects/:id/workspaces", async (req, res) => {
5928
- const { getProject: getProject2 } = await import("./projects-N6KVZGMS.js");
6064
+ const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
5929
6065
  const project = getProject2(req.params.id);
5930
6066
  if (!project) return res.status(404).json({ error: "Project not found" });
5931
- const { listWorkspaces } = await import("./workspace-YLTMP3OX.js");
6067
+ const { listWorkspaces } = await import("./workspace-IIRKILYL.js");
5932
6068
  const all = await listWorkspaces(project.name, project.workdir);
5933
6069
  const workspacesList = all.filter((ws) => ws.path !== project.workdir);
5934
6070
  res.json({ workspaces: workspacesList });
5935
6071
  });
5936
6072
  app.get("/api/sessions", async (req, res) => {
5937
- const { getRecentUserPromptsForSession } = await import("./events-D5AFN2CW.js");
5938
- const { getPendingConfirmationsBySession } = await import("./path-security-DP75YZK5.js");
6073
+ const { getRecentUserPromptsForSession } = await import("./events-QHZDLHEB.js");
6074
+ const { getPendingConfirmationsBySession } = await import("./path-security-72KGHGSV.js");
5939
6075
  const projectId = req.query["projectId"];
5940
6076
  const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
5941
6077
  const offset = parseInt(req.query["offset"]) || 0;
@@ -5981,7 +6117,7 @@ All file and git operations should use this branch.
5981
6117
  disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
5982
6118
  }
5983
6119
  if (disabledServers.length > 0) {
5984
- const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-NPVYNHTM.js");
6120
+ const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-QWD4V5KW.js");
5985
6121
  setSessionDisabledServers2(session.id, disabledServers);
5986
6122
  }
5987
6123
  } catch {
@@ -6018,7 +6154,7 @@ All file and git operations should use this branch.
6018
6154
  if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
6019
6155
  const project = sessionManager.getProject(session.projectId);
6020
6156
  if (!project) return res.status(404).json({ error: "Project not found" });
6021
- const { isGitRepository } = await import("./workspace-YLTMP3OX.js");
6157
+ const { isGitRepository } = await import("./workspace-IIRKILYL.js");
6022
6158
  if (!await isGitRepository(project.workdir)) {
6023
6159
  return res.status(400).json({ error: "Project is not a git repository" });
6024
6160
  }
@@ -6036,7 +6172,7 @@ All file and git operations should use this branch.
6036
6172
  if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
6037
6173
  const project = sessionManager.getProject(session.projectId);
6038
6174
  if (!project) return res.status(404).json({ error: "Project not found" });
6039
- const { isGitRepository } = await import("./workspace-YLTMP3OX.js");
6175
+ const { isGitRepository } = await import("./workspace-IIRKILYL.js");
6040
6176
  if (!await isGitRepository(project.workdir)) {
6041
6177
  return res.status(400).json({ error: "Project is not a git repository" });
6042
6178
  }
@@ -6054,10 +6190,10 @@ All file and git operations should use this branch.
6054
6190
  }
6055
6191
  });
6056
6192
  app.get("/api/sessions/:id", async (req, res) => {
6057
- const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-D5AFN2CW.js");
6058
- const { buildMessagesFromStoredEvents, foldPendingConfirmations, foldWaitingWorkflow } = await import("./folding-BO6Z6HMP.js");
6059
- const { getPendingQuestionsForSession } = await import("./tools-HDD7RHEG.js");
6060
- const { getMaxVisibleItems } = await import("./settings-2OVKFWR5.js");
6193
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-QHZDLHEB.js");
6194
+ const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-O4OYOTPS.js");
6195
+ const { getPendingQuestionsForSession } = await import("./tools-UTA3TV7P.js");
6196
+ const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
6061
6197
  const session = sessionManager.getSession(req.params.id);
6062
6198
  if (!session) {
6063
6199
  return res.status(404).json({ error: "Session not found" });
@@ -6071,7 +6207,7 @@ All file and git operations should use this branch.
6071
6207
  const queueState = sessionManager.getQueueState(req.params.id);
6072
6208
  const pendingQuestions = getPendingQuestionsForSession(req.params.id);
6073
6209
  const pendingConfirmations = foldPendingConfirmations(events);
6074
- const waitingWorkflow = foldWaitingWorkflow(events);
6210
+ const activeWorkflowExecution = sessionManager.getActiveWorkflowExecution(req.params.id);
6075
6211
  res.json({
6076
6212
  session,
6077
6213
  messages,
@@ -6080,7 +6216,7 @@ All file and git operations should use this branch.
6080
6216
  queueState,
6081
6217
  pendingQuestions,
6082
6218
  pendingConfirmations,
6083
- waitingWorkflow
6219
+ activeWorkflowExecution
6084
6220
  });
6085
6221
  });
6086
6222
  app.delete("/api/sessions/:id", async (req, res) => {
@@ -6089,8 +6225,8 @@ All file and git operations should use this branch.
6089
6225
  if (!session) {
6090
6226
  return res.status(404).json({ error: "Session not found" });
6091
6227
  }
6092
- const { stopSessionExecution } = await import("./chat-handler-MSQFJH7S.js");
6093
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-HDD7RHEG.js");
6228
+ const { stopSessionExecution } = await import("./chat-handler-5FV3TGQD.js");
6229
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-UTA3TV7P.js");
6094
6230
  sessionManager.clearMessageQueue(sessionId);
6095
6231
  stopSessionExecution(sessionId, sessionManager);
6096
6232
  abortSession(sessionId);
@@ -6119,9 +6255,9 @@ All file and git operations should use this branch.
6119
6255
  res.json({ success: true });
6120
6256
  });
6121
6257
  app.post("/api/sessions/:id/provider", async (req, res) => {
6122
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-D5AFN2CW.js");
6123
- const { buildMessagesFromStoredEvents } = await import("./folding-BO6Z6HMP.js");
6124
- const { getMaxVisibleItems } = await import("./settings-2OVKFWR5.js");
6258
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-QHZDLHEB.js");
6259
+ const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
6260
+ const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
6125
6261
  const sessionId = req.params.id;
6126
6262
  const session = sessionManager.getSession(sessionId);
6127
6263
  if (!session) {
@@ -6234,9 +6370,9 @@ All file and git operations should use this branch.
6234
6370
  res.json({ success: true });
6235
6371
  });
6236
6372
  app.put("/api/sessions/:id/mode", async (req, res) => {
6237
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-D5AFN2CW.js");
6238
- const { buildMessagesFromStoredEvents } = await import("./folding-BO6Z6HMP.js");
6239
- const { getMaxVisibleItems } = await import("./settings-2OVKFWR5.js");
6373
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-QHZDLHEB.js");
6374
+ const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
6375
+ const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
6240
6376
  const sessionId = req.params.id;
6241
6377
  const session = sessionManager.getSession(sessionId);
6242
6378
  if (!session) {
@@ -6322,7 +6458,7 @@ All file and git operations should use this branch.
6322
6458
  if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
6323
6459
  return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
6324
6460
  }
6325
- const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-HDD7RHEG.js");
6461
+ const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-UTA3TV7P.js");
6326
6462
  const pendingSessionId = getConfirmationSessionId(callId);
6327
6463
  if (!pendingSessionId) {
6328
6464
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -6334,11 +6470,11 @@ All file and git operations should use this branch.
6334
6470
  if (!result.found) {
6335
6471
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
6336
6472
  }
6337
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-D5AFN2CW.js");
6338
- const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-BO6Z6HMP.js");
6339
- const { createSessionStateMessage } = await import("./protocol-4ZDERZNC.js");
6340
- const { getPendingQuestionsForSession } = await import("./tools-HDD7RHEG.js");
6341
- const { getMaxVisibleItems } = await import("./settings-2OVKFWR5.js");
6473
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-QHZDLHEB.js");
6474
+ const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-O4OYOTPS.js");
6475
+ const { createSessionStateMessage } = await import("./protocol-YDNGGADL.js");
6476
+ const { getPendingQuestionsForSession } = await import("./tools-UTA3TV7P.js");
6477
+ const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
6342
6478
  const eventStore = getEventStore2();
6343
6479
  const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
6344
6480
  const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
@@ -6374,7 +6510,7 @@ All file and git operations should use this branch.
6374
6510
  if (!skip && typeof answer !== "string") {
6375
6511
  return res.status(400).json({ error: "answer is required when not skipping" });
6376
6512
  }
6377
- const { provideAnswer } = await import("./tools-HDD7RHEG.js");
6513
+ const { provideAnswer } = await import("./tools-UTA3TV7P.js");
6378
6514
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
6379
6515
  if (!found) {
6380
6516
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -6407,7 +6543,7 @@ All file and git operations should use this branch.
6407
6543
  if (!session) {
6408
6544
  return res.status(404).json({ error: "Session not found" });
6409
6545
  }
6410
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2OVKFWR5.js");
6546
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
6411
6547
  if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
6412
6548
  return res.json({ success: false, reason: "disabled" });
6413
6549
  }
@@ -6439,7 +6575,7 @@ All file and git operations should use this branch.
6439
6575
  backend: activeProvider?.backend ?? llmClient.getBackend(),
6440
6576
  model: llmClient.getModel()
6441
6577
  };
6442
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-YQI2D4LW.js");
6578
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-LDVMBC23.js");
6443
6579
  runAgentTurn(
6444
6580
  {
6445
6581
  sessionManager,
@@ -6477,15 +6613,15 @@ All file and git operations should use this branch.
6477
6613
  if (!session) {
6478
6614
  return res.status(404).json({ error: "Session not found" });
6479
6615
  }
6480
- const { stopSessionExecution } = await import("./chat-handler-MSQFJH7S.js");
6481
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-HDD7RHEG.js");
6616
+ const { stopSessionExecution } = await import("./chat-handler-5FV3TGQD.js");
6617
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-UTA3TV7P.js");
6482
6618
  const queuedMessages = sessionManager.getQueueState(sessionId);
6483
6619
  sessionManager.clearMessageQueue(sessionId);
6484
6620
  stopSessionExecution(sessionId, sessionManager);
6485
6621
  abortSession(sessionId);
6486
6622
  cancelQuestionsForSession(sessionId, "Session stopped by user");
6487
6623
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
6488
- const eventStore = (await import("./events-D5AFN2CW.js")).getEventStore();
6624
+ const eventStore = (await import("./events-QHZDLHEB.js")).getEventStore();
6489
6625
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
6490
6626
  res.json({ success: true, queuedMessages });
6491
6627
  });
@@ -6499,7 +6635,7 @@ All file and git operations should use this branch.
6499
6635
  if (typeof messageIndex !== "number" || messageIndex < 0) {
6500
6636
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
6501
6637
  }
6502
- const { truncateSessionMessages } = await import("./events-D5AFN2CW.js");
6638
+ const { truncateSessionMessages } = await import("./events-QHZDLHEB.js");
6503
6639
  truncateSessionMessages(sessionId, messageIndex);
6504
6640
  res.json({ success: true });
6505
6641
  });
@@ -6516,8 +6652,8 @@ All file and git operations should use this branch.
6516
6652
  if (content !== void 0 && (typeof content !== "string" || !content.trim())) {
6517
6653
  return res.status(400).json({ error: "content must be a non-empty string if provided" });
6518
6654
  }
6519
- const { getEventStore: getEventStore2 } = await import("./events-D5AFN2CW.js");
6520
- const { buildMessagesFromStoredEvents } = await import("./folding-BO6Z6HMP.js");
6655
+ const { getEventStore: getEventStore2 } = await import("./events-QHZDLHEB.js");
6656
+ const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
6521
6657
  const eventStore = getEventStore2();
6522
6658
  const events = eventStore.getEvents(sessionId);
6523
6659
  const { messages } = buildMessagesFromStoredEvents(events);
@@ -6529,7 +6665,7 @@ All file and git operations should use this branch.
6529
6665
  if (msg.role !== "user" || msg.isSystemGenerated) {
6530
6666
  return res.status(400).json({ error: "Can only replay user messages" });
6531
6667
  }
6532
- const { truncateSessionMessages } = await import("./events-D5AFN2CW.js");
6668
+ const { truncateSessionMessages } = await import("./events-QHZDLHEB.js");
6533
6669
  truncateSessionMessages(sessionId, msgIndex - 1);
6534
6670
  sessionManager.queueMessage(sessionId, "asap", content ?? msg.content, msg.attachments, msg.messageKind);
6535
6671
  res.json({ success: true });
@@ -6585,7 +6721,7 @@ All file and git operations should use this branch.
6585
6721
  res.json({ accepted: true });
6586
6722
  });
6587
6723
  app.get("/api/settings", async (req, res) => {
6588
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2OVKFWR5.js");
6724
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
6589
6725
  const keysParam = req.query["keys"];
6590
6726
  if (!keysParam) {
6591
6727
  return res.status(400).json({ error: "keys query parameter is required" });
@@ -6598,19 +6734,19 @@ All file and git operations should use this branch.
6598
6734
  res.json(result);
6599
6735
  });
6600
6736
  app.get("/api/settings/:key", async (req, res) => {
6601
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2OVKFWR5.js");
6737
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
6602
6738
  const key = req.params.key;
6603
6739
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
6604
6740
  res.json({ key, value });
6605
6741
  });
6606
6742
  app.get("/api/settings/:key", async (req, res) => {
6607
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2OVKFWR5.js");
6743
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
6608
6744
  const key = req.params.key;
6609
6745
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
6610
6746
  res.json({ key, value });
6611
6747
  });
6612
6748
  app.put("/api/settings/:key", async (req, res) => {
6613
- const { setSetting: setSetting2 } = await import("./settings-2OVKFWR5.js");
6749
+ const { setSetting: setSetting2 } = await import("./settings-2WVGUPYV.js");
6614
6750
  const key = req.params.key;
6615
6751
  const { value } = req.body;
6616
6752
  if (value === void 0) {
@@ -6637,7 +6773,7 @@ All file and git operations should use this branch.
6637
6773
  }
6638
6774
  });
6639
6775
  app.get("/api/tools/shells", async (_req, res) => {
6640
- const { listAvailableShells } = await import("./platform-UKZ2QC34.js");
6776
+ const { listAvailableShells } = await import("./platform-7KXP3VVA.js");
6641
6777
  res.json({ shells: listAvailableShells() });
6642
6778
  });
6643
6779
  app.get("/api/config", async (_req, res) => {
@@ -6725,6 +6861,28 @@ All file and git operations should use this branch.
6725
6861
  ...m.selected !== void 0 && { selected: m.selected }
6726
6862
  }));
6727
6863
  }
6864
+ app.post("/api/proxy/test", async (_req, res) => {
6865
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
6866
+ const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
6867
+ if (!proxyUrl) {
6868
+ return res.status(400).json({ success: false, error: "No proxy URL configured" });
6869
+ }
6870
+ try {
6871
+ const response = await fetch("http://example.com", {
6872
+ signal: AbortSignal.timeout(1e4)
6873
+ });
6874
+ if (!response.ok) {
6875
+ return res.status(400).json({ success: false, error: `Proxy returned HTTP ${response.status}` });
6876
+ }
6877
+ return res.json({ success: true, message: "Proxy connection OK" });
6878
+ } catch (error) {
6879
+ const message = error instanceof Error ? error.message : "Connection failed";
6880
+ if (error instanceof DOMException && error.name === "AbortError") {
6881
+ return res.status(400).json({ success: false, error: "Connection timed out" });
6882
+ }
6883
+ return res.status(400).json({ success: false, error: message });
6884
+ }
6885
+ });
6728
6886
  app.post("/api/providers/test", async (req, res) => {
6729
6887
  const { url, backend: reqBackend } = req.body;
6730
6888
  if (!url) {
@@ -6796,13 +6954,13 @@ All file and git operations should use this branch.
6796
6954
  }
6797
6955
  });
6798
6956
  app.post("/api/proxy/test", async (_req, res) => {
6799
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2OVKFWR5.js");
6957
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
6800
6958
  const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
6801
6959
  if (!proxyUrl) {
6802
6960
  return res.status(400).json({ success: false, error: "No proxy URL configured" });
6803
6961
  }
6804
6962
  try {
6805
- const response = await proxyFetch("http://example.com", {
6963
+ const response = await fetch("http://example.com", {
6806
6964
  signal: AbortSignal.timeout(1e4)
6807
6965
  });
6808
6966
  if (!response.ok) {
@@ -6823,7 +6981,7 @@ All file and git operations should use this branch.
6823
6981
  const backend = req.query["backend"];
6824
6982
  if (!url) return res.status(400).json({ error: "url is required" });
6825
6983
  try {
6826
- const { fetchModelsWithContext } = await import("./provider-manager-P3ZSA5QS.js");
6984
+ const { fetchModelsWithContext } = await import("./provider-manager-PBOF77RQ.js");
6827
6985
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
6828
6986
  const models = await fetchModelsWithContext(
6829
6987
  url,
@@ -6894,7 +7052,7 @@ All file and git operations should use this branch.
6894
7052
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
6895
7053
  const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
6896
7054
  const { buildNonStreamingCreateParams } = await import("./client-pure-5YE5WFJP.js");
6897
- const { OpenAIHttpClient } = await import("./http-client-E3CV6E5D.js");
7055
+ const { OpenAIHttpClient } = await import("./http-client-U6DVFL7F.js");
6898
7056
  const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
6899
7057
  const profile = getModelProfile2(model);
6900
7058
  const capabilities = getBackendCapabilities(backend || "unknown");
@@ -7152,7 +7310,7 @@ All file and git operations should use this branch.
7152
7310
  });
7153
7311
  async function rebuildMcpTools() {
7154
7312
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
7155
- const { setMcpTools: setMcpTools2 } = await import("./tools-HDD7RHEG.js");
7313
+ const { setMcpTools: setMcpTools2 } = await import("./tools-UTA3TV7P.js");
7156
7314
  const mcpTools = createMcpTools2(mcpManager);
7157
7315
  setMcpTools2(mcpTools);
7158
7316
  }
@@ -7408,13 +7566,13 @@ All file and git operations should use this branch.
7408
7566
  })
7409
7567
  );
7410
7568
  app.get("/api/sessions/:id/background-processes", async (req, res) => {
7411
- const { getSessionProcesses } = await import("./manager-ZPQ6VSM5.js");
7569
+ const { getSessionProcesses } = await import("./manager-53J5P4EZ.js");
7412
7570
  const sessionId = req.params.id;
7413
7571
  const processes = getSessionProcesses(sessionId);
7414
7572
  res.json({ processes });
7415
7573
  });
7416
7574
  app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
7417
- const { stopProcess } = await import("./manager-ZPQ6VSM5.js");
7575
+ const { stopProcess } = await import("./manager-53J5P4EZ.js");
7418
7576
  const sessionId = req.params.id;
7419
7577
  const processId = req.params.processId;
7420
7578
  const session = sessionManager.getSession(sessionId);
@@ -7559,7 +7717,7 @@ All file and git operations should use this branch.
7559
7717
  const state = sessionManager.getContextState(sessionId);
7560
7718
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
7561
7719
  });
7562
- const { QueueProcessor } = await import("./processor-LVQWRG6M.js");
7720
+ const { QueueProcessor } = await import("./processor-32QUVPV6.js");
7563
7721
  const queueProcessor = new QueueProcessor({
7564
7722
  sessionManager,
7565
7723
  providerManager,
@@ -7601,7 +7759,7 @@ All file and git operations should use this branch.
7601
7759
  void (async () => {
7602
7760
  await devServerManager.stopAll();
7603
7761
  await mcpManager.disconnectAll();
7604
- const { stopAllInspectProxies } = await import("./inspect-proxy-NZ3VSMSC.js");
7762
+ const { stopAllInspectProxies } = await import("./inspect-proxy-GF6OI7MR.js");
7605
7763
  stopAllInspectProxies();
7606
7764
  const { cleanupAllProcesses } = await import("./store-SARB6V2N.js");
7607
7765
  cleanupAllProcesses();
@@ -7643,4 +7801,4 @@ export {
7643
7801
  createServerHandle,
7644
7802
  createServer
7645
7803
  };
7646
- //# sourceMappingURL=chunk-AA4PXMSI.js.map
7804
+ //# sourceMappingURL=chunk-KG2PJVOE.js.map