openfox 2.0.113 → 2.0.114

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 (94) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/CHANGELOG.md +22 -0
  3. package/dist/agent-defaults/builder.agent.md +1 -0
  4. package/dist/agent-defaults/planner.agent.md +1 -0
  5. package/dist/{backend-P3GHHLHJ.js → backend-LVYHLGQJ.js} +2 -2
  6. package/dist/{chat-handler-PEK5JDHO.js → chat-handler-KWXRSWXZ.js} +31 -25
  7. package/dist/{chunk-HKD4IMOE.js → chunk-2XD65L7M.js} +2 -2
  8. package/dist/{chunk-AZFZE36I.js → chunk-3O77NT4T.js} +17 -7
  9. package/dist/{chunk-HGOTZWON.js → chunk-7GWARYQC.js} +60 -1064
  10. package/dist/{chunk-YHEQTVFV.js → chunk-AZHWLLPP.js} +1 -1
  11. package/dist/{chunk-6UPBZ2ZR.js → chunk-BZVW77PI.js} +4 -4
  12. package/dist/{chunk-YGPPFVLJ.js → chunk-FW4NDUBL.js} +15 -15
  13. package/dist/{chunk-O2YSYW2F.js → chunk-GUHHUDNL.js} +6 -6
  14. package/dist/{chunk-WWTYWLDM.js → chunk-HP5CIB66.js} +2 -2
  15. package/dist/{chunk-ONONXV3N.js → chunk-HV6IALXF.js} +4 -4
  16. package/dist/{chunk-4NMGX5F2.js → chunk-I7FY2LTR.js} +2 -2
  17. package/dist/{chunk-Y64PEWKP.js → chunk-JP7NM545.js} +2 -2
  18. package/dist/{chunk-CP44U7BT.js → chunk-JXLRL5JR.js} +5 -5
  19. package/dist/{chunk-5VYSKVZT.js → chunk-K733B5T2.js} +254 -20
  20. package/dist/{chunk-SNLLOXCM.js → chunk-L63Q4JQJ.js} +3 -3
  21. package/dist/{chunk-43M7QZMX.js → chunk-LXYPMFTH.js} +3 -3
  22. package/dist/{chunk-TCGWZBTS.js → chunk-MUSPWEBB.js} +3 -3
  23. package/dist/chunk-NCZRWCJN.js +7 -0
  24. package/dist/{chunk-JR54MDZI.js → chunk-NLO64UE3.js} +2 -2
  25. package/dist/{chunk-3R43CMLS.js → chunk-NWJLWLKF.js} +8 -8
  26. package/dist/chunk-OSXPQSLW.js +128 -0
  27. package/dist/chunk-OTYAEEX3.js +1081 -0
  28. package/dist/{chunk-V4664YKR.js → chunk-OXSTNSCF.js} +2 -2
  29. package/dist/{chunk-R2MTWC7C.js → chunk-P5UANBBX.js} +6 -4
  30. package/dist/{chunk-PWXBIUEY.js → chunk-PBW3YC3G.js} +85 -1
  31. package/dist/{chunk-TEQEDOWI.js → chunk-QD7MRMCH.js} +245 -289
  32. package/dist/{chunk-BNFGDTEU.js → chunk-SA34STZ6.js} +2 -2
  33. package/dist/{chunk-VGRVPYZ5.js → chunk-SBSUDHL4.js} +2 -2
  34. package/dist/{chunk-XQR76MQ5.js → chunk-SFZGMB2G.js} +2 -2
  35. package/dist/{chunk-EC5T5A6O.js → chunk-TKKP56QK.js} +3 -3
  36. package/dist/{chunk-BYSUSSSC.js → chunk-UPBWEHIL.js} +30 -148
  37. package/dist/{chunk-YB6WYVNY.js → chunk-UTIQ7OO5.js} +2 -2
  38. package/dist/{chunk-EMI3YYLP.js → chunk-VPVLO436.js} +4 -4
  39. package/dist/chunk-W77NBJAZ.js +957 -0
  40. package/dist/{chunk-BKCW3JLL.js → chunk-X25Q6RAV.js} +1 -1
  41. package/dist/{chunk-FF2EKUQO.js → chunk-YGJIK3CG.js} +4 -4
  42. package/dist/cli/dev.js +1 -1
  43. package/dist/cli/index.js +1 -1
  44. package/dist/{client-3LJGD6KY.js → client-EM7ISGUP.js} +6 -6
  45. package/dist/{compactor-ZBNKANHV.js → compactor-V3LR7APW.js} +13 -12
  46. package/dist/{dynamic-context-F2XTQJR5.js → dynamic-context-MVGOF5V2.js} +10 -9
  47. package/dist/{events-224IO5NJ.js → events-PI7IMPHT.js} +8 -7
  48. package/dist/{folding-YTTTVS56.js → folding-FO57K4JM.js} +6 -5
  49. package/dist/http-client-33EZ3BLR.js +11 -0
  50. package/dist/{inspect-proxy-B7LGGTM7.js → inspect-proxy-NHKQQ2CD.js} +4 -4
  51. package/dist/launch-L5ROVNI3.js +52 -0
  52. package/dist/{manager-4QGXI6WZ.js → manager-66YAEO7K.js} +5 -5
  53. package/dist/{model-overrides-OY2YKUNV.js → model-overrides-L53PZNZA.js} +4 -4
  54. package/dist/orchestrator-XK5K3RPL.js +63 -0
  55. package/dist/package.json +3 -3
  56. package/dist/{path-security-PFMZY7IA.js → path-security-RSEI3YKB.js} +12 -11
  57. package/dist/{platform-QNGCKX4L.js → platform-WA4GK5BO.js} +4 -4
  58. package/dist/{processor-NYPJ5PFA.js → processor-WDZSFBVO.js} +30 -24
  59. package/dist/{project-creator-AWP2JUFS.js → project-creator-676WQXVI.js} +3 -3
  60. package/dist/{projects-C4353IQK.js → projects-SSBWIYL4.js} +3 -3
  61. package/dist/{protocol-CBT1d98i.d.ts → protocol-BzHs024-.d.ts} +21 -3
  62. package/dist/{protocol-LZZ7C4VQ.js → protocol-RKSWKNXI.js} +3 -3
  63. package/dist/provider/index.d.ts +4 -4
  64. package/dist/{provider-PIRPN2CC.js → provider-PLIWRBCF.js} +7 -7
  65. package/dist/{provider-manager-GNEPR6UN.js → provider-manager-2QSJTPWS.js} +7 -7
  66. package/dist/{registry-VCKDSVKA.js → registry-ZP4TN2IN.js} +5 -4
  67. package/dist/{serve-6DRHQLCG.js → serve-MZ3BCCWC.js} +35 -32
  68. package/dist/server/index.d.ts +4 -4
  69. package/dist/server/index.js +34 -31
  70. package/dist/server-EPXODFMB.js +55 -0
  71. package/dist/service-54PGIPDQ.js +25 -0
  72. package/dist/{session-overrides-RNKV35MU.js → session-overrides-LXN6W7SA.js} +7 -6
  73. package/dist/{sessions-D5CEPQGU.js → sessions-CHPVUG6H.js} +6 -5
  74. package/dist/{settings-BNRNX6IW.js → settings-NEBM3GQX.js} +3 -3
  75. package/dist/shared/index.d.ts +3 -3
  76. package/dist/shared/index.js +1 -1
  77. package/dist/skill-defaults/workflows/SKILL.md +24 -6
  78. package/dist/tasks-TJXG2V3U.js +217 -0
  79. package/dist/{tools-2B363F7L.js → tools-CIM26IFB.js} +30 -22
  80. package/dist/{types-BAxh20ZL.d.ts → types-CMtHpDWT.d.ts} +74 -1
  81. package/dist/{types-cVfqOj6M.d.ts → types-CbggXFvR.d.ts} +1 -1
  82. package/dist/{update-IQMRYN7J.js → update-UZBBO42X.js} +2 -2
  83. package/dist/web/assets/{index-CjWC6EQ4.css → index-BmILAZrT.css} +1 -1
  84. package/dist/web/assets/index-rZHXkfMq.js +324 -0
  85. package/dist/web/index.html +2 -2
  86. package/dist/web/sw.js +1 -1
  87. package/dist/workflow-defaults/default.workflow.json +5 -3
  88. package/dist/{workspace-YUNHV4WS.js → workspace-2XODU4YJ.js} +4 -4
  89. package/package.json +3 -3
  90. package/dist/chunk-B2PHPBFU.js +0 -7
  91. package/dist/http-client-YC3UA5OZ.js +0 -11
  92. package/dist/orchestrator-JKBY7B3P.js +0 -57
  93. package/dist/server-HUHFJW7U.js +0 -48
  94. package/dist/web/assets/index-DBUtUSHK.js +0 -323
@@ -7,33 +7,19 @@ import {
7
7
  setMcpOAuthStorePath
8
8
  } from "./chunk-IJ53Y77N.js";
9
9
  import {
10
- TEMPLATE_VARIABLES,
11
10
  createWebSocketServer,
12
- deleteProjectWorkflow,
13
- deleteWorkflow,
14
- findWorkflowById,
15
11
  getAuthConfig,
16
- getDefaultWorkflowIds,
17
12
  hasPassword,
18
- isDefaultWorkflow,
19
13
  isValidToken,
20
- loadAllWorkflows,
21
- loadDefaultWorkflows,
22
- loadProjectWorkflows,
23
14
  loadServerAuthConfig,
24
- loadUserWorkflows,
25
- normalizeWorkflowScope,
26
15
  requiresAuth,
27
- saveWorkflow,
28
- saveWorkflowToProject,
29
16
  terminalManager,
30
17
  tokenFromPassword,
31
- verifyPassword,
32
- workflowExists
33
- } from "./chunk-HGOTZWON.js";
18
+ verifyPassword
19
+ } from "./chunk-7GWARYQC.js";
34
20
  import {
35
- openFolder
36
- } from "./chunk-WLJJRX22.js";
21
+ TEMPLATE_VARIABLES
22
+ } from "./chunk-W77NBJAZ.js";
37
23
  import {
38
24
  createToolRegistry,
39
25
  devServerManager,
@@ -43,7 +29,7 @@ import {
43
29
  setMcpManagerForTools,
44
30
  setMcpTools,
45
31
  setNotifyMcpServersChanged
46
- } from "./chunk-5VYSKVZT.js";
32
+ } from "./chunk-K733B5T2.js";
47
33
  import {
48
34
  deleteOwnedSkill,
49
35
  deleteProjectSkill,
@@ -62,12 +48,15 @@ import {
62
48
  setSkillEnabled,
63
49
  skillExists,
64
50
  updateOwnedSkill
65
- } from "./chunk-FF2EKUQO.js";
51
+ } from "./chunk-YGJIK3CG.js";
52
+ import {
53
+ openFolder
54
+ } from "./chunk-WLJJRX22.js";
66
55
  import {
67
56
  ALWAYS_ALLOWED,
68
57
  ALWAYS_ALLOWED_FOR_SUBAGENTS,
69
58
  TOP_LEVEL_ONLY_TOOLS
70
- } from "./chunk-HKD4IMOE.js";
59
+ } from "./chunk-2XD65L7M.js";
71
60
  import {
72
61
  createMcpTools
73
62
  } from "./chunk-JE7LW7Y6.js";
@@ -86,11 +75,38 @@ import {
86
75
  validateRef,
87
76
  validateWorkspaceName,
88
77
  workspaceExists
89
- } from "./chunk-VGRVPYZ5.js";
78
+ } from "./chunk-SBSUDHL4.js";
79
+ import {
80
+ commandExists,
81
+ deleteCommand,
82
+ deleteProjectCommand,
83
+ deleteProjectWorkflow,
84
+ deleteWorkflow,
85
+ findCommandById,
86
+ findWorkflowById,
87
+ getDefaultCommandIds,
88
+ getDefaultWorkflowIds,
89
+ isDefaultCommand,
90
+ isDefaultWorkflow,
91
+ loadAllCommands,
92
+ loadAllWorkflows,
93
+ loadDefaultCommands,
94
+ loadDefaultWorkflows,
95
+ loadProjectCommands,
96
+ loadProjectWorkflows,
97
+ loadUserCommands,
98
+ loadUserWorkflows,
99
+ normalizeWorkflowScope,
100
+ saveCommand,
101
+ saveCommandToProject,
102
+ saveWorkflow,
103
+ saveWorkflowToProject,
104
+ workflowExists
105
+ } from "./chunk-OTYAEEX3.js";
90
106
  import {
91
107
  getSessionDisabledServers,
92
108
  setSessionDisabledServers
93
- } from "./chunk-SNLLOXCM.js";
109
+ } from "./chunk-L63Q4JQJ.js";
94
110
  import {
95
111
  emitAssistantMessageStart,
96
112
  emitContextState,
@@ -107,15 +123,15 @@ import {
107
123
  getEventStore,
108
124
  getSessionState,
109
125
  initEventStore
110
- } from "./chunk-CP44U7BT.js";
126
+ } from "./chunk-JXLRL5JR.js";
111
127
  import {
112
128
  createContextStateMessage,
113
129
  toClientSession
114
- } from "./chunk-4NMGX5F2.js";
130
+ } from "./chunk-I7FY2LTR.js";
115
131
  import {
116
132
  getPathSeparator,
117
133
  isAbsolutePath
118
- } from "./chunk-BNFGDTEU.js";
134
+ } from "./chunk-SA34STZ6.js";
119
135
  import {
120
136
  EventEmitter
121
137
  } from "./chunk-JURM3RPZ.js";
@@ -124,15 +140,15 @@ import {
124
140
  getAgentModelOverrides,
125
141
  resolveLLMClientForAgent,
126
142
  setAgentModelOverride
127
- } from "./chunk-Y64PEWKP.js";
143
+ } from "./chunk-JP7NM545.js";
128
144
  import {
129
145
  getProject,
130
146
  getProjectByWorkdir,
131
147
  updateProject
132
- } from "./chunk-XQR76MQ5.js";
148
+ } from "./chunk-SFZGMB2G.js";
133
149
  import {
134
150
  VERSION
135
- } from "./chunk-B2PHPBFU.js";
151
+ } from "./chunk-NCZRWCJN.js";
136
152
  import {
137
153
  clearWorkflowExecution,
138
154
  createSession,
@@ -155,64 +171,62 @@ import {
155
171
  updateSessionRunning,
156
172
  updateSessionWorkdir,
157
173
  updateWorkflowExecutionStatus
158
- } from "./chunk-AZFZE36I.js";
174
+ } from "./chunk-3O77NT4T.js";
159
175
  import {
160
176
  agentExists,
161
177
  deleteAgent,
162
- deleteItemFromDir,
163
178
  deleteProjectAgent,
164
179
  findAgentById,
165
- findFileByInternalId,
166
180
  getDefaultAgentIds,
167
- getDefaultIds,
168
181
  getTopLevelAgents,
169
182
  isDefaultAgent,
170
183
  loadAllAgents,
171
184
  loadAllAgentsDefault,
172
185
  loadDefaultAgents,
173
- loadItemsFromDir,
174
186
  loadProjectAgents,
175
187
  loadUserAgents,
176
- pathExists,
177
188
  saveAgent,
178
189
  saveAgentToProject,
179
- saveItemToDir,
180
190
  setRuntimeConfig
181
- } from "./chunk-BYSUSSSC.js";
191
+ } from "./chunk-UPBWEHIL.js";
192
+ import {
193
+ findFileByInternalId,
194
+ pathExists
195
+ } from "./chunk-OSXPQSLW.js";
182
196
  import {
183
197
  createProviderManager,
184
198
  detectModel,
185
199
  getLlmStatus,
186
200
  parseDefaultModelSelection
187
- } from "./chunk-TCGWZBTS.js";
201
+ } from "./chunk-MUSPWEBB.js";
188
202
  import {
189
203
  getModelProfile
190
204
  } from "./chunk-V4IE7HJY.js";
191
205
  import {
192
206
  getBackendDisplayName
193
- } from "./chunk-YHEQTVFV.js";
207
+ } from "./chunk-AZHWLLPP.js";
194
208
  import {
195
209
  buildModelsUrl
196
210
  } from "./chunk-HNCM3D7Y.js";
197
211
  import {
198
212
  SessionNotFoundError,
199
213
  WorkspaceInUseError
200
- } from "./chunk-V4664YKR.js";
214
+ } from "./chunk-OXSTNSCF.js";
201
215
  import {
202
216
  deleteSetting,
203
217
  getSetting,
204
218
  setSetting
205
- } from "./chunk-WWTYWLDM.js";
219
+ } from "./chunk-HP5CIB66.js";
206
220
  import {
207
221
  initDatabase
208
- } from "./chunk-PWXBIUEY.js";
222
+ } from "./chunk-PBW3YC3G.js";
209
223
  import {
210
224
  logger,
211
225
  setLogLevel
212
226
  } from "./chunk-K44MW7JJ.js";
213
227
  import {
214
228
  createServerMessage
215
- } from "./chunk-BKCW3JLL.js";
229
+ } from "./chunk-X25Q6RAV.js";
216
230
  import {
217
231
  getGlobalConfigDir
218
232
  } from "./chunk-CQGTEGKL.js";
@@ -221,8 +235,8 @@ import {
221
235
  import express from "express";
222
236
  import cors from "cors";
223
237
  import { createServer as createHttpServer } from "http";
224
- import { fileURLToPath as fileURLToPath7 } from "url";
225
- import { dirname as dirname8, resolve as resolve8, join as join10 } from "path";
238
+ import { fileURLToPath as fileURLToPath6 } from "url";
239
+ import { dirname as dirname7, resolve as resolve8, join as join9 } from "path";
226
240
  import { readFile as readFile4 } from "fs/promises";
227
241
  import { createServer as createViteServer } from "vite";
228
242
 
@@ -3095,12 +3109,12 @@ var SessionManager = class {
3095
3109
  * Start a new workflow execution. Cancels any existing active execution first,
3096
3110
  * then inserts a new row and emits events.
3097
3111
  */
3098
- startWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor, params) {
3112
+ startWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor, params, subGroup) {
3099
3113
  const existing = this.getActiveWorkflowExecution(sessionId);
3100
3114
  if (existing) {
3101
3115
  this.cancelWorkflow(sessionId, existing.id, existing.workflowId, existing.workflowName, existing.workflowColor);
3102
3116
  }
3103
- createWorkflowExecution(executionId, sessionId, workflowId, workflowName, workflowColor, params);
3117
+ createWorkflowExecution(executionId, sessionId, workflowId, workflowName, workflowColor, params, subGroup);
3104
3118
  emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "running");
3105
3119
  const updatedSession = this.requireSession(sessionId);
3106
3120
  this.emit({ type: "session_updated", session: updatedSession });
@@ -3248,6 +3262,7 @@ var SessionManager = class {
3248
3262
  ...row.current_step_name ? { currentStepName: row.current_step_name } : {},
3249
3263
  stepOutput: JSON.parse(row.step_output ?? "{}"),
3250
3264
  params: JSON.parse(row.params ?? "{}"),
3265
+ ...row.sub_group ? { subGroup: row.sub_group } : {},
3251
3266
  ...row.pending_choices ? { pendingChoices: JSON.parse(row.pending_choices) } : {},
3252
3267
  createdAt: row.created_at,
3253
3268
  updatedAt: row.updated_at
@@ -4420,117 +4435,6 @@ function createSkillRoutes(configDir, projectDir) {
4420
4435
  return router;
4421
4436
  }
4422
4437
 
4423
- // src/server/commands/registry.ts
4424
- import { writeFile as writeFile2, mkdir as mkdir3, unlink } from "fs/promises";
4425
- import { join as join5, dirname as dirname4 } from "path";
4426
- import { fileURLToPath as fileURLToPath4 } from "url";
4427
- import matter2 from "gray-matter";
4428
- var __bundleDir = dirname4(fileURLToPath4(import.meta.url));
4429
- var DEFAULTS_DIR = join5(__bundleDir, "defaults");
4430
- var DEFAULTS_DIR_ALT = join5(__bundleDir, "command-defaults");
4431
- var COMMAND_EXTENSION = ".command.md";
4432
- function getCommandsDir(configDir) {
4433
- return join5(configDir, "commands");
4434
- }
4435
- function getProjectCommandsDir(projectDir) {
4436
- return join5(projectDir, ".openfox", "commands");
4437
- }
4438
- async function loadDefaultCommands() {
4439
- let defaults = await loadItemsFromDir(DEFAULTS_DIR, {
4440
- extension: COMMAND_EXTENSION,
4441
- logName: "command"
4442
- });
4443
- if (!defaults.length) {
4444
- defaults = await loadItemsFromDir(DEFAULTS_DIR_ALT, {
4445
- extension: COMMAND_EXTENSION,
4446
- logName: "command"
4447
- });
4448
- }
4449
- return defaults;
4450
- }
4451
- async function loadUserCommands(configDir) {
4452
- return loadItemsFromDir(getCommandsDir(configDir), {
4453
- extension: COMMAND_EXTENSION,
4454
- logName: "command"
4455
- });
4456
- }
4457
- async function loadProjectCommands(projectDir) {
4458
- return loadItemsFromDir(getProjectCommandsDir(projectDir), {
4459
- extension: COMMAND_EXTENSION,
4460
- logName: "command"
4461
- });
4462
- }
4463
- async function loadAllCommands(configDir, projectDir) {
4464
- const [defaultCommands, userCommands] = await Promise.all([loadDefaultCommands(), loadUserCommands(configDir)]);
4465
- const commandMap = /* @__PURE__ */ new Map();
4466
- for (const cmd of defaultCommands) {
4467
- commandMap.set(cmd.metadata.id, cmd);
4468
- }
4469
- for (const cmd of userCommands) {
4470
- commandMap.set(cmd.metadata.id, cmd);
4471
- }
4472
- if (projectDir) {
4473
- const projectCommands = await loadProjectCommands(projectDir);
4474
- for (const cmd of projectCommands) {
4475
- commandMap.set(cmd.metadata.id, cmd);
4476
- }
4477
- }
4478
- return Array.from(commandMap.values());
4479
- }
4480
- async function getDefaultCommandIds() {
4481
- const ids = await getDefaultIds(DEFAULTS_DIR, COMMAND_EXTENSION);
4482
- if (ids.length) return ids;
4483
- return getDefaultIds(DEFAULTS_DIR_ALT, COMMAND_EXTENSION);
4484
- }
4485
- async function isDefaultCommand(commandId) {
4486
- const defaultIds = await getDefaultCommandIds();
4487
- return defaultIds.includes(commandId);
4488
- }
4489
- function findCommandById(commandId, commands) {
4490
- return commands.find((c) => c.metadata.id === commandId);
4491
- }
4492
- async function commandExists(configDir, commandId, projectDir) {
4493
- if (await pathExists(join5(getCommandsDir(configDir), `${commandId}${COMMAND_EXTENSION}`))) return true;
4494
- if (projectDir && await pathExists(join5(getProjectCommandsDir(projectDir), `${commandId}${COMMAND_EXTENSION}`)))
4495
- return true;
4496
- return false;
4497
- }
4498
- async function saveCommand(configDir, command) {
4499
- const commandsDir = getCommandsDir(configDir);
4500
- if (!await pathExists(commandsDir)) {
4501
- await mkdir3(commandsDir, { recursive: true });
4502
- }
4503
- const filePath = join5(commandsDir, `${command.metadata.id}${COMMAND_EXTENSION}`);
4504
- const content = matter2.stringify(command.prompt, command.metadata);
4505
- await writeFile2(filePath, content, "utf-8");
4506
- }
4507
- async function saveCommandToProject(projectDir, command) {
4508
- await saveItemToDir(
4509
- getProjectCommandsDir(projectDir),
4510
- command,
4511
- COMMAND_EXTENSION,
4512
- (c) => matter2.stringify(c.prompt, c.metadata)
4513
- );
4514
- }
4515
- async function deleteProjectCommand(projectDir, commandId) {
4516
- return deleteItemFromDir(getProjectCommandsDir(projectDir), commandId, COMMAND_EXTENSION);
4517
- }
4518
- async function deleteCommand(configDir, commandId) {
4519
- const filePath = join5(getCommandsDir(configDir), `${commandId}${COMMAND_EXTENSION}`);
4520
- if (!await pathExists(filePath)) {
4521
- if (await isDefaultCommand(commandId)) {
4522
- return { success: false, reason: "Cannot delete built-in defaults" };
4523
- }
4524
- return { success: false };
4525
- }
4526
- try {
4527
- await unlink(filePath);
4528
- return { success: true };
4529
- } catch {
4530
- return { success: false, reason: "Failed to delete command" };
4531
- }
4532
- }
4533
-
4534
4438
  // src/server/routes/commands.ts
4535
4439
  var config = {
4536
4440
  dirName: "commands",
@@ -4768,9 +4672,9 @@ function createDevServerRoutes() {
4768
4672
 
4769
4673
  // src/server/routes/workspace-config.ts
4770
4674
  import { Router as Router5 } from "express";
4771
- import { stat as stat2, mkdir as mkdir4, readdir, access as access3 } from "fs/promises";
4675
+ import { stat as stat2, mkdir as mkdir3, readdir, access as access3 } from "fs/promises";
4772
4676
  import { constants as constants3 } from "fs";
4773
- import { resolve as resolve4, isAbsolute as isAbsolute3, join as join6, win32 } from "path";
4677
+ import { resolve as resolve4, isAbsolute as isAbsolute3, join as join5, win32 } from "path";
4774
4678
 
4775
4679
  // src/shared/workspace.ts
4776
4680
  var BLOCKED_EXACT_PATHS = [
@@ -4848,7 +4752,7 @@ async function findOrphanedWorkspaces(dir) {
4848
4752
  for (const entry of entries) {
4849
4753
  if (entry.isDirectory()) {
4850
4754
  try {
4851
- const gitStat = await stat2(join6(dir, entry.name, ".git"));
4755
+ const gitStat = await stat2(join5(dir, entry.name, ".git"));
4852
4756
  if (gitStat.isDirectory()) {
4853
4757
  results.push({ name: entry.name });
4854
4758
  }
@@ -4972,7 +4876,7 @@ function createWorkspaceConfigRoutes(sessionManager) {
4972
4876
  }
4973
4877
  let created = false;
4974
4878
  if (!dirExists && createIfMissing) {
4975
- await mkdir4(resolvedPath, { recursive: true });
4879
+ await mkdir3(resolvedPath, { recursive: true });
4976
4880
  dirExists = true;
4977
4881
  created = true;
4978
4882
  }
@@ -4984,7 +4888,7 @@ function createWorkspaceConfigRoutes(sessionManager) {
4984
4888
  const orphans = await findOrphanedWorkspaces(previousRootDir);
4985
4889
  workspaces.push(...orphans);
4986
4890
  } else if (!previousRootDir && projectName && typeof projectName === "string") {
4987
- const defaultDir = join6(getGlobalDataDir(), "workspaces", projectName);
4891
+ const defaultDir = join5(getGlobalDataDir(), "workspaces", projectName);
4988
4892
  if (!isSameDir(defaultDir, resolvedPath)) {
4989
4893
  const orphans = await findOrphanedWorkspaces(defaultDir);
4990
4894
  workspaces.push(...orphans);
@@ -5041,7 +4945,7 @@ function createTerminalRoutes() {
5041
4945
  // src/server/routes/directories.ts
5042
4946
  import { Router as Router7 } from "express";
5043
4947
  import { readdir as readdir2 } from "fs/promises";
5044
- import { resolve as resolve5, join as join7, dirname as dirname5, basename as basename2 } from "path";
4948
+ import { resolve as resolve5, join as join6, dirname as dirname4, basename as basename2 } from "path";
5045
4949
  function createDirectoryRoutes() {
5046
4950
  const router = Router7();
5047
4951
  const DEFAULT_BASE_PATH = process.cwd();
@@ -5052,9 +4956,9 @@ function createDirectoryRoutes() {
5052
4956
  const entries = await readdir2(resolvedPath, { withFileTypes: true });
5053
4957
  const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => ({
5054
4958
  name: entry.name,
5055
- path: join7(resolvedPath, entry.name)
4959
+ path: join6(resolvedPath, entry.name)
5056
4960
  })).sort((a, b) => a.name.localeCompare(b.name));
5057
- const parent = dirname5(resolvedPath);
4961
+ const parent = dirname4(resolvedPath);
5058
4962
  const hasParent = parent !== resolvedPath;
5059
4963
  res.json({
5060
4964
  current: resolvedPath,
@@ -5533,8 +5437,8 @@ var ProviderRegistry = class {
5533
5437
 
5534
5438
  // src/server/providers/plugins/loader.ts
5535
5439
  import { readdir as readdir3, readFile as readFile2, stat as stat3 } from "fs/promises";
5536
- import { dirname as dirname6, join as join8, resolve as resolve6 } from "path";
5537
- import { fileURLToPath as fileURLToPath5, pathToFileURL } from "url";
5440
+ import { dirname as dirname5, join as join7, resolve as resolve6 } from "path";
5441
+ import { fileURLToPath as fileURLToPath4, pathToFileURL } from "url";
5538
5442
  async function packageDirectories(root) {
5539
5443
  let entries;
5540
5444
  try {
@@ -5544,13 +5448,13 @@ async function packageDirectories(root) {
5544
5448
  }
5545
5449
  const directories = [];
5546
5450
  for (const entry of entries) {
5547
- const entryPath = join8(root, entry.name);
5451
+ const entryPath = join7(root, entry.name);
5548
5452
  const isDirectory = entry.isDirectory() || entry.isSymbolicLink() && (await stat3(entryPath).catch(() => void 0))?.isDirectory();
5549
5453
  if (!isDirectory) continue;
5550
5454
  if (entry.name.startsWith("@")) {
5551
5455
  const scoped = await readdir3(entryPath, { withFileTypes: true }).catch(() => []);
5552
5456
  for (const child of scoped) {
5553
- const childPath = join8(entryPath, child.name);
5457
+ const childPath = join7(entryPath, child.name);
5554
5458
  const childIsDirectory = child.isDirectory() || child.isSymbolicLink() && (await stat3(childPath).catch(() => void 0))?.isDirectory();
5555
5459
  if (childIsDirectory) directories.push(childPath);
5556
5460
  }
@@ -5561,10 +5465,10 @@ async function packageDirectories(root) {
5561
5465
  return directories;
5562
5466
  }
5563
5467
  async function loadProviderPlugins(options) {
5564
- const moduleDirectory = dirname6(fileURLToPath5(import.meta.url));
5468
+ const moduleDirectory = dirname5(fileURLToPath4(import.meta.url));
5565
5469
  const roots = [
5566
- join8(options.configDirectory, "plugins"),
5567
- join8(options.cwd ?? process.cwd(), "node_modules"),
5470
+ join7(options.configDirectory, "plugins"),
5471
+ join7(options.cwd ?? process.cwd(), "node_modules"),
5568
5472
  resolve6(moduleDirectory, "node_modules"),
5569
5473
  resolve6(moduleDirectory, "../../../../node_modules")
5570
5474
  ];
@@ -5572,7 +5476,7 @@ async function loadProviderPlugins(options) {
5572
5476
  const diagnostics = [];
5573
5477
  for (const root of roots) {
5574
5478
  for (const packageDir of await packageDirectories(root)) {
5575
- const manifestPath = join8(packageDir, "package.json");
5479
+ const manifestPath = join7(packageDir, "package.json");
5576
5480
  let manifest;
5577
5481
  try {
5578
5482
  manifest = JSON.parse(await readFile2(manifestPath, "utf8"));
@@ -5613,7 +5517,7 @@ async function loadProviderPlugins(options) {
5613
5517
  }
5614
5518
  };
5615
5519
  try {
5616
- const module = await import(pathToFileURL(join8(packageDir, plugin)).href);
5520
+ const module = await import(pathToFileURL(join7(packageDir, plugin)).href);
5617
5521
  if (typeof module.register !== "function") throw new Error("Plugin does not export register(registry)");
5618
5522
  await module.register(trackingRegistry);
5619
5523
  diagnostic.loaded = true;
@@ -5627,8 +5531,8 @@ async function loadProviderPlugins(options) {
5627
5531
 
5628
5532
  // src/server/routes/plugins.ts
5629
5533
  import { Router as Router11 } from "express";
5630
- import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL2 } from "url";
5631
- import { dirname as dirname7, resolve as resolve7, join as join9 } from "path";
5534
+ import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL2 } from "url";
5535
+ import { dirname as dirname6, resolve as resolve7, join as join8 } from "path";
5632
5536
  import { existsSync } from "fs";
5633
5537
  import { readFile as readFile3, readdir as readdir4, rm as rm2, rename as rename2 } from "fs/promises";
5634
5538
  import { execFile } from "child_process";
@@ -5652,7 +5556,7 @@ function createPluginRoutes(options) {
5652
5556
  if (registryCache && now - registryCache.ts < 3e5) {
5653
5557
  return res.json({ plugins: registryCache.data });
5654
5558
  }
5655
- const moduleDir = dirname7(fileURLToPath6(import.meta.url));
5559
+ const moduleDir = dirname6(fileURLToPath5(import.meta.url));
5656
5560
  let registryPath = resolve7(moduleDir, "../plugins-registry.json");
5657
5561
  if (!existsSync(registryPath)) {
5658
5562
  registryPath = resolve7(moduleDir, "../../../plugins-registry.json");
@@ -5678,9 +5582,9 @@ function createPluginRoutes(options) {
5678
5582
  if (!/^[a-zA-Z0-9_-]+$/.test(repoName)) {
5679
5583
  return res.status(400).json({ error: "Invalid repository name" });
5680
5584
  }
5681
- const pluginsDir = join9(getGlobalConfigDir(config3.mode ?? "production"), "plugins");
5682
- const targetDir = join9(pluginsDir, repoName);
5683
- const tmpDir = join9(pluginsDir, `.${repoName}-tmp-${Date.now()}`);
5585
+ const pluginsDir = join8(getGlobalConfigDir(config3.mode ?? "production"), "plugins");
5586
+ const targetDir = join8(pluginsDir, repoName);
5587
+ const tmpDir = join8(pluginsDir, `.${repoName}-tmp-${Date.now()}`);
5684
5588
  try {
5685
5589
  await execFileP("mkdir", ["-p", pluginsDir], { timeout: 5e3 });
5686
5590
  } catch {
@@ -5711,7 +5615,7 @@ function createPluginRoutes(options) {
5711
5615
  }
5712
5616
  if (!loadError) {
5713
5617
  try {
5714
- const manifest = JSON.parse(await readFile3(join9(targetDir, "package.json"), "utf8"));
5618
+ const manifest = JSON.parse(await readFile3(join8(targetDir, "package.json"), "utf8"));
5715
5619
  const pluginEntry = manifest.openfox?.plugin;
5716
5620
  const apiVersion = manifest.openfox?.apiVersion;
5717
5621
  if (!pluginEntry || !manifest.name) {
@@ -5719,7 +5623,7 @@ function createPluginRoutes(options) {
5719
5623
  } else if (apiVersion !== 1) {
5720
5624
  loadError = `Unsupported plugin API version: ${String(apiVersion)}`;
5721
5625
  } else {
5722
- const mod = await import(pathToFileURL2(join9(targetDir, pluginEntry)).href);
5626
+ const mod = await import(pathToFileURL2(join8(targetDir, pluginEntry)).href);
5723
5627
  if (typeof mod.register !== "function") {
5724
5628
  loadError = "Plugin does not export register(registry)";
5725
5629
  } else {
@@ -5768,13 +5672,13 @@ function createPluginRoutes(options) {
5768
5672
  }
5769
5673
  });
5770
5674
  router.get("/installed", async (_req, res) => {
5771
- const pluginsDir = join9(getGlobalConfigDir(config3.mode ?? "production"), "plugins");
5675
+ const pluginsDir = join8(getGlobalConfigDir(config3.mode ?? "production"), "plugins");
5772
5676
  try {
5773
5677
  const entries = await readdir4(pluginsDir, { withFileTypes: true });
5774
5678
  const installed = [];
5775
5679
  for (const entry of entries) {
5776
5680
  if (!entry.isDirectory()) continue;
5777
- const pkgPath = join9(pluginsDir, entry.name, "package.json");
5681
+ const pkgPath = join8(pluginsDir, entry.name, "package.json");
5778
5682
  let version = null;
5779
5683
  try {
5780
5684
  const pkg = JSON.parse(await readFile3(pkgPath, "utf8"));
@@ -5789,13 +5693,13 @@ function createPluginRoutes(options) {
5789
5693
  }
5790
5694
  });
5791
5695
  router.get("/open-folder", async (_req, res) => {
5792
- const pluginsDir = join9(getGlobalConfigDir(config3.mode ?? "production"), "plugins");
5696
+ const pluginsDir = join8(getGlobalConfigDir(config3.mode ?? "production"), "plugins");
5793
5697
  await openFolderRoute(pluginsDir, res);
5794
5698
  });
5795
5699
  router.get("/:name/open-folder", async (req, res) => {
5796
5700
  const name = req.params.name;
5797
5701
  if (!/^[a-zA-Z0-9_-]+$/.test(name)) return res.status(400).json({ error: "Invalid plugin name" });
5798
- const targetDir = join9(getGlobalConfigDir(config3.mode ?? "production"), "plugins", name);
5702
+ const targetDir = join8(getGlobalConfigDir(config3.mode ?? "production"), "plugins", name);
5799
5703
  await openFolderRoute(targetDir, res);
5800
5704
  });
5801
5705
  router.delete("/:name", async (req, res) => {
@@ -5803,7 +5707,7 @@ function createPluginRoutes(options) {
5803
5707
  if (!/^[a-zA-Z0-9_-]+$/.test(name)) {
5804
5708
  return res.status(400).json({ error: "Invalid plugin name" });
5805
5709
  }
5806
- const targetDir = join9(getGlobalConfigDir(config3.mode ?? "production"), "plugins", name);
5710
+ const targetDir = join8(getGlobalConfigDir(config3.mode ?? "production"), "plugins", name);
5807
5711
  try {
5808
5712
  await rm2(targetDir, { recursive: true, force: true });
5809
5713
  for (let i = pluginDiagnostics.length - 1; i >= 0; i--) {
@@ -5883,13 +5787,17 @@ function detectWsl() {
5883
5787
  }
5884
5788
 
5885
5789
  // src/server/index.ts
5886
- var __dirname3 = dirname8(fileURLToPath7(import.meta.url));
5790
+ var __dirname3 = dirname7(fileURLToPath6(import.meta.url));
5887
5791
  async function createServerHandle(config3) {
5888
5792
  setRuntimeConfig(config3);
5889
5793
  setLogLevel(config3.logging?.level ?? void 0, config3.mode);
5890
5794
  await loadServerAuthConfig();
5891
5795
  const db = initDatabase(config3);
5892
5796
  initEventStore(db);
5797
+ let deferTasksBroadcast = () => {
5798
+ };
5799
+ let deferTasksLaunchWorkflow = () => {
5800
+ };
5893
5801
  const configDir = getGlobalConfigDir(config3.mode ?? "production");
5894
5802
  const providerAdapters = new ProviderRegistry({
5895
5803
  mode: config3.mode === "development" ? "development" : "production",
@@ -5969,7 +5877,7 @@ async function createServerHandle(config3) {
5969
5877
  setMcpConfigMode(config3.mode ?? "production");
5970
5878
  setMcpConfigPath(config3.globalConfigPath);
5971
5879
  setMcpOAuthStoreMode(config3.mode ?? "production");
5972
- setMcpOAuthStorePath(config3.globalConfigPath ? join10(dirname8(config3.globalConfigPath), "mcp-auth.json") : void 0);
5880
+ setMcpOAuthStorePath(config3.globalConfigPath ? join9(dirname7(config3.globalConfigPath), "mcp-auth.json") : void 0);
5973
5881
  const mcpServers = config3.mcpServers ?? {};
5974
5882
  Promise.all(
5975
5883
  Object.entries(mcpServers).map(
@@ -5984,7 +5892,7 @@ async function createServerHandle(config3) {
5984
5892
  toolRegistry = createToolRegistry();
5985
5893
  logger.info("MCP tools registered", { count: mcpTools.length });
5986
5894
  }
5987
- const { signalMcpReady } = await import("./server-HUHFJW7U.js");
5895
+ const { signalMcpReady } = await import("./server-EPXODFMB.js");
5988
5896
  signalMcpReady();
5989
5897
  });
5990
5898
  const app = express();
@@ -6014,11 +5922,11 @@ async function createServerHandle(config3) {
6014
5922
  try {
6015
5923
  const fs = await import("fs");
6016
5924
  const path = await import("path");
6017
- const { fileURLToPath: fileURLToPath8 } = await import("url");
6018
- const dirname9 = path.dirname(fileURLToPath8(import.meta.url));
6019
- let changelogPath = path.resolve(dirname9, "../CHANGELOG.md");
5925
+ const { fileURLToPath: fileURLToPath7 } = await import("url");
5926
+ const dirname8 = path.dirname(fileURLToPath7(import.meta.url));
5927
+ let changelogPath = path.resolve(dirname8, "../CHANGELOG.md");
6020
5928
  if (!fs.existsSync(changelogPath)) {
6021
- changelogPath = path.resolve(dirname9, "../../CHANGELOG.md");
5929
+ changelogPath = path.resolve(dirname8, "../../CHANGELOG.md");
6022
5930
  }
6023
5931
  const content = fs.readFileSync(changelogPath, "utf-8");
6024
5932
  res.json({ content });
@@ -6065,7 +5973,7 @@ async function createServerHandle(config3) {
6065
5973
  res.json({ tools });
6066
5974
  });
6067
5975
  app.get("/api/projects", async (_req, res) => {
6068
- const { listProjects: listProjects2 } = await import("./projects-C4353IQK.js");
5976
+ const { listProjects: listProjects2 } = await import("./projects-SSBWIYL4.js");
6069
5977
  const projects = listProjects2();
6070
5978
  res.json({ projects });
6071
5979
  });
@@ -6074,7 +5982,7 @@ async function createServerHandle(config3) {
6074
5982
  if (!name || !workdir) {
6075
5983
  return res.status(400).json({ error: "name and workdir are required" });
6076
5984
  }
6077
- const { createDirectoryWithGit } = await import("./project-creator-AWP2JUFS.js");
5985
+ const { createDirectoryWithGit } = await import("./project-creator-676WQXVI.js");
6078
5986
  try {
6079
5987
  const project = await createDirectoryWithGit(name, workdir);
6080
5988
  res.status(201).json({ project });
@@ -6119,7 +6027,7 @@ async function createServerHandle(config3) {
6119
6027
  }
6120
6028
  });
6121
6029
  app.get("/api/projects/:id", async (req, res) => {
6122
- const { getProject: getProject2 } = await import("./projects-C4353IQK.js");
6030
+ const { getProject: getProject2 } = await import("./projects-SSBWIYL4.js");
6123
6031
  const project = getProject2(req.params.id);
6124
6032
  if (!project) {
6125
6033
  return res.status(404).json({ error: "Project not found" });
@@ -6127,7 +6035,7 @@ async function createServerHandle(config3) {
6127
6035
  res.json({ project });
6128
6036
  });
6129
6037
  app.get("/api/projects/:id/open-folder", async (req, res) => {
6130
- const { getProject: getProject2 } = await import("./projects-C4353IQK.js");
6038
+ const { getProject: getProject2 } = await import("./projects-SSBWIYL4.js");
6131
6039
  const project = getProject2(req.params.id);
6132
6040
  if (!project) {
6133
6041
  return res.status(404).json({ error: "Project not found" });
@@ -6141,7 +6049,7 @@ async function createServerHandle(config3) {
6141
6049
  }
6142
6050
  });
6143
6051
  app.put("/api/projects/:id", async (req, res) => {
6144
- const { updateProject: updateProject2 } = await import("./projects-C4353IQK.js");
6052
+ const { updateProject: updateProject2 } = await import("./projects-SSBWIYL4.js");
6145
6053
  const { name, customInstructions, dangerLevel } = req.body;
6146
6054
  const updates = {};
6147
6055
  if (name !== void 0) updates.name = name;
@@ -6154,7 +6062,7 @@ async function createServerHandle(config3) {
6154
6062
  res.json({ project: updated });
6155
6063
  });
6156
6064
  app.delete("/api/projects/:id", async (req, res) => {
6157
- const { getProject: getProject2, deleteProject } = await import("./projects-C4353IQK.js");
6065
+ const { getProject: getProject2, deleteProject } = await import("./projects-SSBWIYL4.js");
6158
6066
  const project = getProject2(req.params.id);
6159
6067
  if (!project) {
6160
6068
  return res.status(404).json({ error: "Project not found" });
@@ -6163,7 +6071,7 @@ async function createServerHandle(config3) {
6163
6071
  res.json({ success: true });
6164
6072
  });
6165
6073
  app.put("/api/projects/:id/star", async (req, res) => {
6166
- const { toggleStar } = await import("./projects-C4353IQK.js");
6074
+ const { toggleStar } = await import("./projects-SSBWIYL4.js");
6167
6075
  const { isStarred } = req.body;
6168
6076
  if (typeof isStarred !== "boolean") {
6169
6077
  return res.status(400).json({ error: "isStarred is required and must be a boolean" });
@@ -6177,27 +6085,41 @@ async function createServerHandle(config3) {
6177
6085
  const sessionFavoriteRouter = express.Router();
6178
6086
  registerSessionFavoriteRoute(sessionFavoriteRouter, sessionManager);
6179
6087
  app.use("/api", sessionFavoriteRouter);
6088
+ const { createTasksService } = await import("./service-54PGIPDQ.js");
6089
+ const { registerTaskRoutes } = await import("./tasks-TJXG2V3U.js");
6090
+ const { setTasksService } = await import("./tools-CIM26IFB.js");
6091
+ const tasksService = createTasksService({
6092
+ sessionManager,
6093
+ config: config3,
6094
+ broadcast: (projectId, payload) => deferTasksBroadcast(projectId, payload),
6095
+ configDir,
6096
+ launchWorkflow: (sessionId, launch) => deferTasksLaunchWorkflow(sessionId, launch)
6097
+ });
6098
+ setTasksService(tasksService);
6099
+ const tasksRouter = express.Router();
6100
+ registerTaskRoutes(tasksRouter, tasksService);
6101
+ app.use("/api", tasksRouter);
6180
6102
  app.get("/api/projects/:id/branches", async (req, res) => {
6181
- const { getProject: getProject2 } = await import("./projects-C4353IQK.js");
6103
+ const { getProject: getProject2 } = await import("./projects-SSBWIYL4.js");
6182
6104
  const project = getProject2(req.params.id);
6183
6105
  if (!project) return res.status(404).json({ error: "Project not found" });
6184
- const { listBranches } = await import("./workspace-YUNHV4WS.js");
6106
+ const { listBranches } = await import("./workspace-2XODU4YJ.js");
6185
6107
  const branches = await listBranches(project.workdir);
6186
6108
  res.json({ branches });
6187
6109
  });
6188
6110
  app.post("/api/projects/:id/checkout", async (req, res) => {
6189
- const { getProject: getProject2 } = await import("./projects-C4353IQK.js");
6111
+ const { getProject: getProject2 } = await import("./projects-SSBWIYL4.js");
6190
6112
  const project = getProject2(req.params.id);
6191
6113
  if (!project) return res.status(404).json({ error: "Project not found" });
6192
6114
  const { branch } = req.body;
6193
6115
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
6194
- const { checkoutBranch, isGitRepository } = await import("./workspace-YUNHV4WS.js");
6116
+ const { checkoutBranch, isGitRepository } = await import("./workspace-2XODU4YJ.js");
6195
6117
  if (!await isGitRepository(project.workdir)) {
6196
6118
  return res.status(400).json({ error: "Project is not a git repository" });
6197
6119
  }
6198
6120
  try {
6199
6121
  await checkoutBranch(project.workdir, branch);
6200
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D5CEPQGU.js");
6122
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-CHPVUG6H.js");
6201
6123
  const allSessions = sessionManager.listSessions();
6202
6124
  for (const s of allSessions) {
6203
6125
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -6211,12 +6133,12 @@ async function createServerHandle(config3) {
6211
6133
  }
6212
6134
  });
6213
6135
  app.post("/api/projects/:id/checkout-new", async (req, res) => {
6214
- const { getProject: getProject2 } = await import("./projects-C4353IQK.js");
6136
+ const { getProject: getProject2 } = await import("./projects-SSBWIYL4.js");
6215
6137
  const project = getProject2(req.params.id);
6216
6138
  if (!project) return res.status(404).json({ error: "Project not found" });
6217
6139
  const { name, sourceBranch } = req.body;
6218
6140
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
6219
- const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-YUNHV4WS.js");
6141
+ const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-2XODU4YJ.js");
6220
6142
  if (!await isGitRepository(project.workdir)) {
6221
6143
  return res.status(400).json({ error: "Project is not a git repository" });
6222
6144
  }
@@ -6233,7 +6155,7 @@ async function createServerHandle(config3) {
6233
6155
  );
6234
6156
  }
6235
6157
  await createBranch(project.workdir, name, sb);
6236
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D5CEPQGU.js");
6158
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-CHPVUG6H.js");
6237
6159
  const allSessions = sessionManager.listSessions();
6238
6160
  for (const s of allSessions) {
6239
6161
  if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
@@ -6250,7 +6172,7 @@ async function createServerHandle(config3) {
6250
6172
  const session = sessionManager.getSession(req.params.id);
6251
6173
  if (!session) return res.status(404).json({ error: "Session not found" });
6252
6174
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
6253
- const { listBranches, getDefaultBranch } = await import("./workspace-YUNHV4WS.js");
6175
+ const { listBranches, getDefaultBranch } = await import("./workspace-2XODU4YJ.js");
6254
6176
  const [branches, defaultBranch] = await Promise.all([
6255
6177
  listBranches(effectiveWorkdir),
6256
6178
  getDefaultBranch(session.workdir)
@@ -6264,8 +6186,8 @@ async function createServerHandle(config3) {
6264
6186
  const { branch } = req.body;
6265
6187
  if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
6266
6188
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
6267
- const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-YUNHV4WS.js");
6268
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D5CEPQGU.js");
6189
+ const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-2XODU4YJ.js");
6190
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-CHPVUG6H.js");
6269
6191
  try {
6270
6192
  await validateRef2(effectiveWorkdir, branch);
6271
6193
  await checkoutBranch(effectiveWorkdir, branch);
@@ -6307,16 +6229,16 @@ All file and git operations should use this branch.
6307
6229
  const { name, sourceBranch } = req.body;
6308
6230
  if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
6309
6231
  const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
6310
- const { validateRef: validateRef2 } = await import("./workspace-YUNHV4WS.js");
6311
- const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D5CEPQGU.js");
6232
+ const { validateRef: validateRef2 } = await import("./workspace-2XODU4YJ.js");
6233
+ const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-CHPVUG6H.js");
6312
6234
  try {
6313
6235
  await validateRef2(effectiveWorkdir, name);
6314
6236
  if (sourceBranch) {
6315
- const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-YUNHV4WS.js");
6237
+ const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-2XODU4YJ.js");
6316
6238
  const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
6317
6239
  await createBranch(effectiveWorkdir, name, sb);
6318
6240
  } else {
6319
- const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-YUNHV4WS.js");
6241
+ const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-2XODU4YJ.js");
6320
6242
  const defaultBranch = await getDefaultBranch(session.workdir);
6321
6243
  const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
6322
6244
  await createBranch(effectiveWorkdir, name, sb);
@@ -6354,17 +6276,17 @@ All file and git operations should use this branch.
6354
6276
  }
6355
6277
  });
6356
6278
  app.get("/api/projects/:id/workspaces", async (req, res) => {
6357
- const { getProject: getProject2 } = await import("./projects-C4353IQK.js");
6279
+ const { getProject: getProject2 } = await import("./projects-SSBWIYL4.js");
6358
6280
  const project = getProject2(req.params.id);
6359
6281
  if (!project) return res.status(404).json({ error: "Project not found" });
6360
- const { listWorkspaces } = await import("./workspace-YUNHV4WS.js");
6282
+ const { listWorkspaces } = await import("./workspace-2XODU4YJ.js");
6361
6283
  const all = await listWorkspaces(project.name, project.workdir);
6362
6284
  const workspacesList = all.filter((ws) => ws.path !== project.workdir);
6363
6285
  res.json({ workspaces: workspacesList });
6364
6286
  });
6365
6287
  app.get("/api/sessions", async (req, res) => {
6366
- const { getRecentUserPromptsForSession } = await import("./events-224IO5NJ.js");
6367
- const { getPendingConfirmationsBySession } = await import("./path-security-PFMZY7IA.js");
6288
+ const { getRecentUserPromptsForSession } = await import("./events-PI7IMPHT.js");
6289
+ const { getPendingConfirmationsBySession } = await import("./path-security-RSEI3YKB.js");
6368
6290
  const projectId = req.query["projectId"];
6369
6291
  const rawLimit = req.query["limit"];
6370
6292
  const offset = parseInt(req.query["offset"]) || 0;
@@ -6419,7 +6341,7 @@ All file and git operations should use this branch.
6419
6341
  disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
6420
6342
  }
6421
6343
  if (disabledServers.length > 0) {
6422
- const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-RNKV35MU.js");
6344
+ const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-LXN6W7SA.js");
6423
6345
  setSessionDisabledServers2(session.id, disabledServers);
6424
6346
  }
6425
6347
  } catch {
@@ -6456,7 +6378,7 @@ All file and git operations should use this branch.
6456
6378
  if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
6457
6379
  const project = sessionManager.getProject(session.projectId);
6458
6380
  if (!project) return res.status(404).json({ error: "Project not found" });
6459
- const { isGitRepository } = await import("./workspace-YUNHV4WS.js");
6381
+ const { isGitRepository } = await import("./workspace-2XODU4YJ.js");
6460
6382
  if (!await isGitRepository(project.workdir)) {
6461
6383
  return res.status(400).json({ error: "Project is not a git repository" });
6462
6384
  }
@@ -6474,7 +6396,7 @@ All file and git operations should use this branch.
6474
6396
  if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
6475
6397
  const project = sessionManager.getProject(session.projectId);
6476
6398
  if (!project) return res.status(404).json({ error: "Project not found" });
6477
- const { isGitRepository } = await import("./workspace-YUNHV4WS.js");
6399
+ const { isGitRepository } = await import("./workspace-2XODU4YJ.js");
6478
6400
  if (!await isGitRepository(project.workdir)) {
6479
6401
  return res.status(400).json({ error: "Project is not a git repository" });
6480
6402
  }
@@ -6492,12 +6414,12 @@ All file and git operations should use this branch.
6492
6414
  }
6493
6415
  });
6494
6416
  app.get("/api/sessions/:id", async (req, res) => {
6495
- const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-224IO5NJ.js");
6496
- const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-YTTTVS56.js");
6497
- const { getPendingQuestionsForSession } = await import("./tools-2B363F7L.js");
6498
- const { getMaxVisibleItems } = await import("./settings-BNRNX6IW.js");
6499
- const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-OY2YKUNV.js");
6500
- const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-D5CEPQGU.js");
6417
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-PI7IMPHT.js");
6418
+ const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-FO57K4JM.js");
6419
+ const { getPendingQuestionsForSession } = await import("./tools-CIM26IFB.js");
6420
+ const { getMaxVisibleItems } = await import("./settings-NEBM3GQX.js");
6421
+ const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-L53PZNZA.js");
6422
+ const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-CHPVUG6H.js");
6501
6423
  let session = sessionManager.getSession(req.params.id);
6502
6424
  if (!session) {
6503
6425
  return res.status(404).json({ error: "Session not found" });
@@ -6536,8 +6458,8 @@ All file and git operations should use this branch.
6536
6458
  if (!session) {
6537
6459
  return res.status(404).json({ error: "Session not found" });
6538
6460
  }
6539
- const { stopSessionExecution } = await import("./chat-handler-PEK5JDHO.js");
6540
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-2B363F7L.js");
6461
+ const { stopSessionExecution } = await import("./chat-handler-KWXRSWXZ.js");
6462
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-CIM26IFB.js");
6541
6463
  sessionManager.clearMessageQueue(sessionId);
6542
6464
  stopSessionExecution(sessionId, sessionManager);
6543
6465
  abortSession(sessionId);
@@ -6566,9 +6488,9 @@ All file and git operations should use this branch.
6566
6488
  res.json({ success: true });
6567
6489
  });
6568
6490
  app.post("/api/sessions/:id/provider", async (req, res) => {
6569
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-224IO5NJ.js");
6570
- const { buildMessagesFromStoredEvents } = await import("./folding-YTTTVS56.js");
6571
- const { getMaxVisibleItems } = await import("./settings-BNRNX6IW.js");
6491
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-PI7IMPHT.js");
6492
+ const { buildMessagesFromStoredEvents } = await import("./folding-FO57K4JM.js");
6493
+ const { getMaxVisibleItems } = await import("./settings-NEBM3GQX.js");
6572
6494
  const sessionId = req.params.id;
6573
6495
  const session = sessionManager.getSession(sessionId);
6574
6496
  if (!session) {
@@ -6681,11 +6603,11 @@ All file and git operations should use this branch.
6681
6603
  res.json({ success: true });
6682
6604
  });
6683
6605
  app.put("/api/sessions/:id/mode", async (req, res) => {
6684
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-224IO5NJ.js");
6685
- const { buildMessagesFromStoredEvents } = await import("./folding-YTTTVS56.js");
6686
- const { getMaxVisibleItems } = await import("./settings-BNRNX6IW.js");
6687
- const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-OY2YKUNV.js");
6688
- const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-D5CEPQGU.js");
6606
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-PI7IMPHT.js");
6607
+ const { buildMessagesFromStoredEvents } = await import("./folding-FO57K4JM.js");
6608
+ const { getMaxVisibleItems } = await import("./settings-NEBM3GQX.js");
6609
+ const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-L53PZNZA.js");
6610
+ const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-CHPVUG6H.js");
6689
6611
  const sessionId = req.params.id;
6690
6612
  const session = sessionManager.getSession(sessionId);
6691
6613
  if (!session) {
@@ -6787,7 +6709,7 @@ All file and git operations should use this branch.
6787
6709
  if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
6788
6710
  return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
6789
6711
  }
6790
- const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-2B363F7L.js");
6712
+ const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-CIM26IFB.js");
6791
6713
  const pendingSessionId = getConfirmationSessionId(callId);
6792
6714
  if (!pendingSessionId) {
6793
6715
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -6799,11 +6721,11 @@ All file and git operations should use this branch.
6799
6721
  if (!result.found) {
6800
6722
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
6801
6723
  }
6802
- const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-224IO5NJ.js");
6803
- const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-YTTTVS56.js");
6804
- const { createSessionStateMessage } = await import("./protocol-LZZ7C4VQ.js");
6805
- const { getPendingQuestionsForSession } = await import("./tools-2B363F7L.js");
6806
- const { getMaxVisibleItems } = await import("./settings-BNRNX6IW.js");
6724
+ const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-PI7IMPHT.js");
6725
+ const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-FO57K4JM.js");
6726
+ const { createSessionStateMessage } = await import("./protocol-RKSWKNXI.js");
6727
+ const { getPendingQuestionsForSession } = await import("./tools-CIM26IFB.js");
6728
+ const { getMaxVisibleItems } = await import("./settings-NEBM3GQX.js");
6807
6729
  const eventStore = getEventStore2();
6808
6730
  const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
6809
6731
  const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
@@ -6839,7 +6761,7 @@ All file and git operations should use this branch.
6839
6761
  if (!skip && typeof answer !== "string") {
6840
6762
  return res.status(400).json({ error: "answer is required when not skipping" });
6841
6763
  }
6842
- const { provideAnswer } = await import("./tools-2B363F7L.js");
6764
+ const { provideAnswer } = await import("./tools-CIM26IFB.js");
6843
6765
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
6844
6766
  if (!found) {
6845
6767
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -6872,7 +6794,7 @@ All file and git operations should use this branch.
6872
6794
  if (!session) {
6873
6795
  return res.status(404).json({ error: "Session not found" });
6874
6796
  }
6875
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-BNRNX6IW.js");
6797
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-NEBM3GQX.js");
6876
6798
  if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
6877
6799
  return res.json({ success: false, reason: "disabled" });
6878
6800
  }
@@ -6904,7 +6826,7 @@ All file and git operations should use this branch.
6904
6826
  backend: activeProvider?.backend ?? llmClient.getBackend(),
6905
6827
  model: llmClient.getModel()
6906
6828
  };
6907
- const { runAgentTurn, TurnMetrics } = await import("./orchestrator-JKBY7B3P.js");
6829
+ const { runAgentTurn, TurnMetrics } = await import("./orchestrator-XK5K3RPL.js");
6908
6830
  runAgentTurn(
6909
6831
  {
6910
6832
  sessionManager,
@@ -6942,15 +6864,15 @@ All file and git operations should use this branch.
6942
6864
  if (!session) {
6943
6865
  return res.status(404).json({ error: "Session not found" });
6944
6866
  }
6945
- const { stopSessionExecution } = await import("./chat-handler-PEK5JDHO.js");
6946
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-2B363F7L.js");
6867
+ const { stopSessionExecution } = await import("./chat-handler-KWXRSWXZ.js");
6868
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-CIM26IFB.js");
6947
6869
  const queuedMessages = sessionManager.getQueueState(sessionId);
6948
6870
  sessionManager.clearMessageQueue(sessionId);
6949
6871
  stopSessionExecution(sessionId, sessionManager);
6950
6872
  abortSession(sessionId);
6951
6873
  cancelQuestionsForSession(sessionId, "Session stopped by user");
6952
6874
  cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
6953
- const eventStore = (await import("./events-224IO5NJ.js")).getEventStore();
6875
+ const eventStore = (await import("./events-PI7IMPHT.js")).getEventStore();
6954
6876
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
6955
6877
  res.json({ success: true, queuedMessages });
6956
6878
  });
@@ -6964,7 +6886,7 @@ All file and git operations should use this branch.
6964
6886
  if (typeof messageIndex !== "number" || messageIndex < 0) {
6965
6887
  return res.status(400).json({ error: "messageIndex must be a non-negative number" });
6966
6888
  }
6967
- const { truncateSessionMessages } = await import("./events-224IO5NJ.js");
6889
+ const { truncateSessionMessages } = await import("./events-PI7IMPHT.js");
6968
6890
  truncateSessionMessages(sessionId, messageIndex);
6969
6891
  res.json({ success: true });
6970
6892
  });
@@ -6984,8 +6906,8 @@ All file and git operations should use this branch.
6984
6906
  if (attachments !== void 0 && !Array.isArray(attachments)) {
6985
6907
  return res.status(400).json({ error: "attachments must be an array if provided" });
6986
6908
  }
6987
- const { getEventStore: getEventStore2 } = await import("./events-224IO5NJ.js");
6988
- const { buildMessagesFromStoredEvents } = await import("./folding-YTTTVS56.js");
6909
+ const { getEventStore: getEventStore2 } = await import("./events-PI7IMPHT.js");
6910
+ const { buildMessagesFromStoredEvents } = await import("./folding-FO57K4JM.js");
6989
6911
  const eventStore = getEventStore2();
6990
6912
  const events = eventStore.getEvents(sessionId);
6991
6913
  const { messages } = buildMessagesFromStoredEvents(events);
@@ -6997,7 +6919,7 @@ All file and git operations should use this branch.
6997
6919
  if (msg.role !== "user" || msg.isSystemGenerated) {
6998
6920
  return res.status(400).json({ error: "Can only replay user messages" });
6999
6921
  }
7000
- const { truncateSessionMessages } = await import("./events-224IO5NJ.js");
6922
+ const { truncateSessionMessages } = await import("./events-PI7IMPHT.js");
7001
6923
  truncateSessionMessages(sessionId, msgIndex - 1);
7002
6924
  sessionManager.queueMessage(
7003
6925
  sessionId,
@@ -7059,7 +6981,7 @@ All file and git operations should use this branch.
7059
6981
  res.json({ accepted: true });
7060
6982
  });
7061
6983
  app.get("/api/settings", async (req, res) => {
7062
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-BNRNX6IW.js");
6984
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-NEBM3GQX.js");
7063
6985
  const keysParam = req.query["keys"];
7064
6986
  if (!keysParam) {
7065
6987
  return res.status(400).json({ error: "keys query parameter is required" });
@@ -7072,19 +6994,19 @@ All file and git operations should use this branch.
7072
6994
  res.json(result);
7073
6995
  });
7074
6996
  app.get("/api/settings/:key", async (req, res) => {
7075
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-BNRNX6IW.js");
6997
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-NEBM3GQX.js");
7076
6998
  const key = req.params.key;
7077
6999
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
7078
7000
  res.json({ key, value });
7079
7001
  });
7080
7002
  app.get("/api/settings/:key", async (req, res) => {
7081
- const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-BNRNX6IW.js");
7003
+ const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-NEBM3GQX.js");
7082
7004
  const key = req.params.key;
7083
7005
  const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
7084
7006
  res.json({ key, value });
7085
7007
  });
7086
7008
  app.put("/api/settings/:key", async (req, res) => {
7087
- const { setSetting: setSetting2 } = await import("./settings-BNRNX6IW.js");
7009
+ const { setSetting: setSetting2 } = await import("./settings-NEBM3GQX.js");
7088
7010
  const key = req.params.key;
7089
7011
  const { value } = req.body;
7090
7012
  if (value === void 0) {
@@ -7111,7 +7033,7 @@ All file and git operations should use this branch.
7111
7033
  }
7112
7034
  });
7113
7035
  app.get("/api/tools/shells", async (_req, res) => {
7114
- const { listAvailableShells } = await import("./platform-QNGCKX4L.js");
7036
+ const { listAvailableShells } = await import("./platform-WA4GK5BO.js");
7115
7037
  res.json({ shells: listAvailableShells() });
7116
7038
  });
7117
7039
  app.get("/api/config", async (_req, res) => {
@@ -7201,7 +7123,7 @@ All file and git operations should use this branch.
7201
7123
  }));
7202
7124
  }
7203
7125
  app.post("/api/proxy/test", async (_req, res) => {
7204
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-BNRNX6IW.js");
7126
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-NEBM3GQX.js");
7205
7127
  const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
7206
7128
  if (!proxyUrl) {
7207
7129
  return res.status(400).json({ success: false, error: "No proxy URL configured" });
@@ -7293,7 +7215,7 @@ All file and git operations should use this branch.
7293
7215
  }
7294
7216
  });
7295
7217
  app.post("/api/proxy/test", async (_req, res) => {
7296
- const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-BNRNX6IW.js");
7218
+ const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-NEBM3GQX.js");
7297
7219
  const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
7298
7220
  if (!proxyUrl) {
7299
7221
  return res.status(400).json({ success: false, error: "No proxy URL configured" });
@@ -7320,7 +7242,7 @@ All file and git operations should use this branch.
7320
7242
  const backend = req.query["backend"];
7321
7243
  if (!url) return res.status(400).json({ error: "url is required" });
7322
7244
  try {
7323
- const { fetchModelsWithContext } = await import("./provider-manager-GNEPR6UN.js");
7245
+ const { fetchModelsWithContext } = await import("./provider-manager-2QSJTPWS.js");
7324
7246
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
7325
7247
  const models = await fetchModelsWithContext(
7326
7248
  url,
@@ -7389,9 +7311,9 @@ All file and git operations should use this branch.
7389
7311
  return res.json({ success: true, message: { content: response2.content }, raw: response2 });
7390
7312
  }
7391
7313
  const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
7392
- const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
7314
+ const { getBackendCapabilities } = await import("./backend-LVYHLGQJ.js");
7393
7315
  const { buildNonStreamingCreateParams } = await import("./client-pure-VFZIIK4S.js");
7394
- const { OpenAIHttpClient } = await import("./http-client-YC3UA5OZ.js");
7316
+ const { OpenAIHttpClient } = await import("./http-client-33EZ3BLR.js");
7395
7317
  const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
7396
7318
  const profile = getModelProfile2(model);
7397
7319
  const capabilities = getBackendCapabilities(backend || "unknown");
@@ -7743,7 +7665,7 @@ All file and git operations should use this branch.
7743
7665
  });
7744
7666
  async function rebuildMcpTools() {
7745
7667
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-FEAHWU5C.js");
7746
- const { setMcpTools: setMcpTools2 } = await import("./tools-2B363F7L.js");
7668
+ const { setMcpTools: setMcpTools2 } = await import("./tools-CIM26IFB.js");
7747
7669
  const mcpTools = createMcpTools2(mcpManager);
7748
7670
  setMcpTools2(mcpTools);
7749
7671
  toolRegistry = createToolRegistry();
@@ -8124,7 +8046,7 @@ All file and git operations should use this branch.
8124
8046
  res.status(400).json({ error: error instanceof Error ? error.message : String(error) });
8125
8047
  }
8126
8048
  });
8127
- const { listProjects } = await import("./projects-C4353IQK.js");
8049
+ const { listProjects } = await import("./projects-SSBWIYL4.js");
8128
8050
  const allProjects = listProjects();
8129
8051
  const projectDir = allProjects.find(
8130
8052
  (p) => p.workdir === config3.workdir || config3.workdir && p.workdir.startsWith(config3.workdir + "/")
@@ -8151,13 +8073,13 @@ All file and git operations should use this branch.
8151
8073
  })
8152
8074
  );
8153
8075
  app.get("/api/sessions/:id/background-processes", async (req, res) => {
8154
- const { getSessionProcesses } = await import("./manager-4QGXI6WZ.js");
8076
+ const { getSessionProcesses } = await import("./manager-66YAEO7K.js");
8155
8077
  const sessionId = req.params.id;
8156
8078
  const processes = getSessionProcesses(sessionId);
8157
8079
  res.json({ processes });
8158
8080
  });
8159
8081
  app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
8160
- const { stopProcess } = await import("./manager-4QGXI6WZ.js");
8082
+ const { stopProcess } = await import("./manager-66YAEO7K.js");
8161
8083
  const sessionId = req.params.id;
8162
8084
  const processId = req.params.processId;
8163
8085
  const session = sessionManager.getSession(sessionId);
@@ -8204,7 +8126,7 @@ All file and git operations should use this branch.
8204
8126
  }
8205
8127
  });
8206
8128
  app.get("/fox.svg", (_req, res) => {
8207
- readFile4(join10(webDir, "fox.svg")).then((content) => {
8129
+ readFile4(join9(webDir, "fox.svg")).then((content) => {
8208
8130
  res.set("Content-Type", "image/svg+xml");
8209
8131
  res.send(content);
8210
8132
  }).catch(() => {
@@ -8213,7 +8135,7 @@ All file and git operations should use this branch.
8213
8135
  });
8214
8136
  app.use(
8215
8137
  "/sounds",
8216
- express.static(join10(webDir, "public", "sounds"), {
8138
+ express.static(join9(webDir, "public", "sounds"), {
8217
8139
  setHeaders: (res) => {
8218
8140
  res.set("Content-Type", "audio/mpeg");
8219
8141
  }
@@ -8222,13 +8144,13 @@ All file and git operations should use this branch.
8222
8144
  app.use("/__inspect__.js", (_req, res) => {
8223
8145
  res.set("Access-Control-Allow-Origin", "*");
8224
8146
  res.set("Content-Type", "application/javascript");
8225
- readFile4(join10(webDir, "public", "__inspect__.js")).then((content) => res.send(content)).catch(() => res.status(404).send("Not found"));
8147
+ readFile4(join9(webDir, "public", "__inspect__.js")).then((content) => res.send(content)).catch(() => res.status(404).send("Not found"));
8226
8148
  });
8227
8149
  app.get("/*path", (req, res) => {
8228
8150
  if (req.path.startsWith("/api/")) {
8229
8151
  return;
8230
8152
  }
8231
- readFile4(join10(webDir, "index.html"), "utf-8").then((indexHtml) => viteServer.transformIndexHtml(req.originalUrl, indexHtml)).then((transformed) => res.send(transformed)).catch((err) => {
8153
+ readFile4(join9(webDir, "index.html"), "utf-8").then((indexHtml) => viteServer.transformIndexHtml(req.originalUrl, indexHtml)).then((transformed) => res.send(transformed)).catch((err) => {
8232
8154
  logger.error("Error serving index.html", { error: err });
8233
8155
  res.status(500).send("Server error");
8234
8156
  });
@@ -8239,7 +8161,7 @@ All file and git operations should use this branch.
8239
8161
  const distWebDir = resolve8(__dirname3, "web");
8240
8162
  app.use(
8241
8163
  "/assets",
8242
- express.static(join10(distWebDir, "assets"), {
8164
+ express.static(join9(distWebDir, "assets"), {
8243
8165
  setHeaders: (res, filepath) => {
8244
8166
  if (filepath.endsWith(".css")) {
8245
8167
  res.set("Content-Type", "text/css");
@@ -8247,11 +8169,11 @@ All file and git operations should use this branch.
8247
8169
  }
8248
8170
  })
8249
8171
  );
8250
- app.use("/manifest.webmanifest", express.static(join10(distWebDir, "manifest.webmanifest")));
8251
- app.use("/registerSW.js", express.static(join10(distWebDir, "registerSW.js")));
8252
- app.use("/sw.js", express.static(join10(distWebDir, "sw.js")));
8172
+ app.use("/manifest.webmanifest", express.static(join9(distWebDir, "manifest.webmanifest")));
8173
+ app.use("/registerSW.js", express.static(join9(distWebDir, "registerSW.js")));
8174
+ app.use("/sw.js", express.static(join9(distWebDir, "sw.js")));
8253
8175
  app.get("/fox.svg", (_req, res) => {
8254
- readFile4(join10(distWebDir, "fox.svg")).then((content) => {
8176
+ readFile4(join9(distWebDir, "fox.svg")).then((content) => {
8255
8177
  res.set("Content-Type", "image/svg+xml");
8256
8178
  res.send(content);
8257
8179
  }).catch(() => {
@@ -8260,7 +8182,7 @@ All file and git operations should use this branch.
8260
8182
  });
8261
8183
  app.use(
8262
8184
  "/sounds",
8263
- express.static(join10(distWebDir, "sounds"), {
8185
+ express.static(join9(distWebDir, "sounds"), {
8264
8186
  setHeaders: (res) => {
8265
8187
  res.set("Content-Type", "audio/mpeg");
8266
8188
  }
@@ -8269,10 +8191,10 @@ All file and git operations should use this branch.
8269
8191
  app.use("/__inspect__.js", (_req, res) => {
8270
8192
  res.set("Access-Control-Allow-Origin", "*");
8271
8193
  res.set("Content-Type", "application/javascript");
8272
- readFile4(join10(distWebDir, "__inspect__.js")).then((content) => res.send(content)).catch(() => res.status(404).send("Not found"));
8194
+ readFile4(join9(distWebDir, "__inspect__.js")).then((content) => res.send(content)).catch(() => res.status(404).send("Not found"));
8273
8195
  });
8274
8196
  app.get("/", (_req, res) => {
8275
- readFile4(join10(distWebDir, "index.html"), "utf-8").then((content) => res.send(content)).catch(() => {
8197
+ readFile4(join9(distWebDir, "index.html"), "utf-8").then((content) => res.send(content)).catch(() => {
8276
8198
  res.status(404).send("Web UI not built. Run `npm run build:web`");
8277
8199
  });
8278
8200
  });
@@ -8280,7 +8202,7 @@ All file and git operations should use this branch.
8280
8202
  if (req.path.startsWith("/api/") || req.path.startsWith("/assets/") || req.path.startsWith("/sounds/") || req.path.startsWith("/manifest.webmanifest") || req.path.startsWith("/registerSW.js") || req.path.startsWith("/sw.js") || req.path === "/fox.svg") {
8281
8203
  return;
8282
8204
  }
8283
- readFile4(join10(distWebDir, "index.html"), "utf-8").then((content) => res.send(content)).catch(() => {
8205
+ readFile4(join9(distWebDir, "index.html"), "utf-8").then((content) => res.send(content)).catch(() => {
8284
8206
  res.status(404).send("Web UI not built");
8285
8207
  });
8286
8208
  });
@@ -8296,13 +8218,46 @@ All file and git operations should use this branch.
8296
8218
  () => mcpManager.getAllServers()
8297
8219
  );
8298
8220
  const wss = wssExports.wss;
8221
+ deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
8222
+ const { launchWorkflowRun, abortRunnerRun } = await import("./launch-L5ROVNI3.js");
8223
+ deferTasksLaunchWorkflow = (sessionId, launch) => {
8224
+ const session = sessionManager.getSession(sessionId);
8225
+ let llmClient = getLLMClient();
8226
+ if (session?.providerId && session.providerModel) {
8227
+ const resolvedModel = providerManager.resolveModel(session.providerId, session.providerModel);
8228
+ llmClient = getLLMClientForProvider(session.providerId, resolvedModel ?? session.providerModel) ?? getLLMClient();
8229
+ }
8230
+ const provider = providerManager.getActiveProvider();
8231
+ const controller = new AbortController();
8232
+ launchWorkflowRun(
8233
+ {
8234
+ sessionManager,
8235
+ sessionId,
8236
+ controller,
8237
+ llmClient,
8238
+ statsIdentity: {
8239
+ providerId: provider?.id ?? `provider:${llmClient.getModel()}`,
8240
+ providerName: provider?.name ?? "Unknown Provider",
8241
+ backend: provider?.backend ?? llmClient.getBackend(),
8242
+ model: llmClient.getModel()
8243
+ },
8244
+ broadcastForSession: wssExports.broadcastForSession
8245
+ },
8246
+ {
8247
+ workflowId: launch.workflowId,
8248
+ ...launch.params && Object.keys(launch.params).length > 0 ? { params: launch.params } : {},
8249
+ ...launch.scope ? { scope: launch.scope } : {},
8250
+ ...launch.attachments && launch.attachments.length > 0 ? { attachments: launch.attachments } : {}
8251
+ }
8252
+ );
8253
+ };
8299
8254
  setNotifyMcpServersChanged((sessionId) => {
8300
8255
  const servers = mcpManager.getAllServers();
8301
8256
  wssExports.broadcastAll(createServerMessage("mcp.servers.changed", { servers }));
8302
8257
  const state = sessionManager.getContextState(sessionId);
8303
8258
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
8304
8259
  });
8305
- const { QueueProcessor } = await import("./processor-NYPJ5PFA.js");
8260
+ const { QueueProcessor } = await import("./processor-WDZSFBVO.js");
8306
8261
  const queueProcessor = new QueueProcessor({
8307
8262
  sessionManager,
8308
8263
  providerManager,
@@ -8315,7 +8270,8 @@ All file and git operations should use this branch.
8315
8270
  const abortSession = (sessionId) => {
8316
8271
  const wsAborted = wssExports.abortSession(sessionId);
8317
8272
  const qpAborted = queueProcessor.abortSession(sessionId);
8318
- const aborted = wsAborted || qpAborted;
8273
+ const taskAborted = abortRunnerRun(sessionId);
8274
+ const aborted = wsAborted || qpAborted || taskAborted;
8319
8275
  if (aborted) {
8320
8276
  sessionManager.setRunning(sessionId, false);
8321
8277
  wssExports.broadcastForSession(sessionId, { type: "session.running", payload: { isRunning: false } });
@@ -8345,14 +8301,14 @@ All file and git operations should use this branch.
8345
8301
  void (async () => {
8346
8302
  await devServerManager.stopAll();
8347
8303
  await mcpManager.disconnectAll();
8348
- const { stopAllInspectProxies } = await import("./inspect-proxy-B7LGGTM7.js");
8304
+ const { stopAllInspectProxies } = await import("./inspect-proxy-NHKQQ2CD.js");
8349
8305
  stopAllInspectProxies();
8350
8306
  const { cleanupAllProcesses } = await import("./store-SARB6V2N.js");
8351
8307
  cleanupAllProcesses();
8352
8308
  viteServer?.close();
8353
8309
  if (config3.globalConfigPath) {
8354
- const { unlink: unlink2 } = await import("fs/promises");
8355
- unlink2(config3.globalConfigPath).catch(() => {
8310
+ const { unlink } = await import("fs/promises");
8311
+ unlink(config3.globalConfigPath).catch(() => {
8356
8312
  });
8357
8313
  }
8358
8314
  for (const client of wss.clients) {
@@ -8387,4 +8343,4 @@ export {
8387
8343
  createServerHandle,
8388
8344
  createServer
8389
8345
  };
8390
- //# sourceMappingURL=chunk-TEQEDOWI.js.map
8346
+ //# sourceMappingURL=chunk-QD7MRMCH.js.map